From: Andrew Pinski Date: Wed, 9 Jun 2004 15:07:03 +0000 (+0000) Subject: tree-complex.c (expand_complex_comparison): Use fold_convert instead of convert. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e072ae27e0898a7244b08d003a43b4cecf146df0;p=gcc.git tree-complex.c (expand_complex_comparison): Use fold_convert instead of convert. 2004-06-09 Andrew Pinski * tree-complex.c (expand_complex_comparison): Use fold_convert instead of convert. * tree-inline.c (setup_one_parameter): Likewise. * tree-sra.c (csc_build_component_ref): Likewise. * tree-ssa-ccp.c (ccp_fold): Likewise. * tree-ssa-copy.c (cprop_operand): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-tailcall.c (tree_optimize_tail_calls_1): Likewise. From-SVN: r82837 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55d2914e97a..a19dcb2da21 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2004-06-09 Andrew Pinski + + * tree-complex.c (expand_complex_comparison): Use fold_convert instead + of convert. + * tree-inline.c (setup_one_parameter): Likewise. + * tree-sra.c (csc_build_component_ref): Likewise. + * tree-ssa-ccp.c (ccp_fold): Likewise. + * tree-ssa-copy.c (cprop_operand): Likewise. + * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. + * tree-tailcall.c (tree_optimize_tail_calls_1): Likewise. + 2004-06-09 J"orn Rennecke PR rtl-optimization/15521: diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index 587c90a1c7a..0e6dab7e471 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -387,7 +387,7 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, /* FALLTHRU */ case MODIFY_EXPR: type = TREE_TYPE (TREE_OPERAND (stmt, 1)); - TREE_OPERAND (stmt, 1) = convert (type, cc); + TREE_OPERAND (stmt, 1) = fold_convert (type, cc); break; case COND_EXPR: TREE_OPERAND (stmt, 0) = cc; diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 58a1c07e072..39dde67dea8 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -779,7 +779,7 @@ setup_one_parameter (inline_data *id, tree p, tree value, the argument to the proper type in case it was promoted. */ if (value) { - tree rhs = convert (TREE_TYPE (var), value); + tree rhs = fold_convert (TREE_TYPE (var), value); if (rhs == error_mark_node) return; diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 46a3c59e117..4f1bbcdd12e 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -587,7 +587,7 @@ csc_build_component_ref (tree base, tree field) the entire structure should be zeroed. */ if (CONSTRUCTOR_ELTS (base)) abort (); - return convert (TREE_TYPE (field), integer_zero_node); + return fold_convert (TREE_TYPE (field), integer_zero_node); default: /* Avoid sharing BASE when building the different COMPONENT_REFs. diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 6127acbe2d3..ab7de37ab4c 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -953,7 +953,7 @@ ccp_fold (tree stmt) if (retval) { if (TREE_TYPE (retval) != TREE_TYPE (rhs)) - retval = convert (TREE_TYPE (rhs), retval); + retval = fold_convert (TREE_TYPE (rhs), retval); if (TREE_TYPE (retval) == TREE_TYPE (rhs)) return retval; diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index e544992251c..688116113b1 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -180,7 +180,7 @@ cprop_operand (stmt_ann_t ann, tree *op_p, varray_type const_and_copies) if (!lang_hooks.types_compatible_p (op_type, val_type) && TREE_CODE (val) != SSA_NAME) { - val = convert (TREE_TYPE (*op_p), val); + val = fold_convert (TREE_TYPE (*op_p), val); if (!is_gimple_min_invariant (val) && TREE_CODE (val) != SSA_NAME) return false; diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 0ca36b09c80..5b311631067 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1875,7 +1875,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), LE_EXPR); TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op; TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1) - = convert (type, integer_zero_node); + = fold_convert (type, integer_zero_node); } val = simplify_cond_and_lookup_avail_expr (dummy_cond, &bd->avail_exprs, @@ -1886,7 +1886,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), GE_EXPR); TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op; TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1) - = convert (type, integer_zero_node); + = fold_convert (type, integer_zero_node); val = simplify_cond_and_lookup_avail_expr (dummy_cond, &bd->avail_exprs, diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 71c9fc67830..5027c2b6f41 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -844,7 +844,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) add_referenced_tmp_var (tmp); phi = create_phi_node (tmp, first); - add_phi_arg (&phi, convert (ret_type, integer_zero_node), + add_phi_arg (&phi, fold_convert (ret_type, integer_zero_node), first->pred); a_acc = PHI_RESULT (phi); } @@ -857,7 +857,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) add_referenced_tmp_var (tmp); phi = create_phi_node (tmp, first); - add_phi_arg (&phi, convert (ret_type, integer_one_node), + add_phi_arg (&phi, fold_convert (ret_type, integer_one_node), first->pred); m_acc = PHI_RESULT (phi); }