diff options
author | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-17 03:56:20 +0000 |
---|---|---|
committer | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-17 03:56:20 +0000 |
commit | e7be49a3657a93f302f4516cebe02f773b95b745 (patch) | |
tree | bf56b200973247a5d5406c02f3422ef6f6a55621 /gcc/fold-const.c | |
parent | 1a8c2b13d8312529cebe89bf0c25d5cd5dbf7e3d (diff) | |
download | gcc-e7be49a3657a93f302f4516cebe02f773b95b745.tar.gz |
2005-08-16 James A. Morrison <phython@gcc.gnu.org>
* fold-const.c (optimize_bit_field_compare): Remove extra fold call.
(try_move_mult_to_index): Call fold_build2 instead of build2.
(fold_binary): Don't call fold after calls to try_move_mult_to_index.
* tree-ssa-loop-niter.c (inverse): Call int_const_binop instead of
fold_binary_to_constant.
(infer_loop_bounds_from_undefined): Call fold_build2 instead of
fold (build.
* tree-data-ref.c (tree_fold_divides_p): Use tree_int_cst_equal to
check if A == gcd (A, B). Remove TYPE argument.
(analyze_offset) Use fold_build2 instead of fold (build.
(create_data_ref): Likewise.
(analyze_siv_subscript_cst_affine): Update calls to tree_fold_divides_p. * tree-ssa-ccp.c (widen_bitfield): Call fold_build2 instead of build2
then fold.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103200 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index db82baae00c..6853b413f09 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3340,11 +3340,11 @@ optimize_bit_field_compare (enum tree_code code, tree compare_type, TREE_THIS_VOLATILE (lhs) = 1; } - rhs = fold (const_binop (BIT_AND_EXPR, - const_binop (LSHIFT_EXPR, - fold_convert (unsigned_type, rhs), - size_int (lbitpos), 0), - mask, 0)); + rhs = const_binop (BIT_AND_EXPR, + const_binop (LSHIFT_EXPR, + fold_convert (unsigned_type, rhs), + size_int (lbitpos), 0), + mask, 0); return build2 (code, compare_type, build2 (BIT_AND_EXPR, unsigned_type, lhs, mask), @@ -6468,7 +6468,7 @@ try_move_mult_to_index (enum tree_code code, tree addr, tree op1) TREE_OPERAND (pos, 1)), fold_convert (itype, delta)); - return build1 (ADDR_EXPR, TREE_TYPE (addr), ret); + return fold_build1 (ADDR_EXPR, TREE_TYPE (addr), ret); } @@ -7305,13 +7305,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) { tem = try_move_mult_to_index (PLUS_EXPR, arg0, arg1); if (tem) - return fold_convert (type, fold (tem)); + return fold_convert (type, tem); } else if (TREE_CODE (arg1) == ADDR_EXPR) { tem = try_move_mult_to_index (PLUS_EXPR, arg1, arg0); if (tem) - return fold_convert (type, fold (tem)); + return fold_convert (type, tem); } } else @@ -7730,7 +7730,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) { tem = try_move_mult_to_index (MINUS_EXPR, arg0, arg1); if (tem) - return fold_convert (type, fold (tem)); + return fold_convert (type, tem); } if (flag_unsafe_math_optimizations |