summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorphython <phython@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-17 03:56:20 +0000
committerphython <phython@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-17 03:56:20 +0000
commite7be49a3657a93f302f4516cebe02f773b95b745 (patch)
treebf56b200973247a5d5406c02f3422ef6f6a55621 /gcc/tree-ssa-loop-niter.c
parent1a8c2b13d8312529cebe89bf0c25d5cd5dbf7e3d (diff)
downloadgcc-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/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index ce4b3cf7df1..fc5491b857e 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -117,10 +117,10 @@ inverse (tree x, tree mask)
rslt = build_int_cst_type (type, 1);
for (; ctr; ctr--)
{
- rslt = fold_binary_to_constant (MULT_EXPR, type, rslt, x);
- x = fold_binary_to_constant (MULT_EXPR, type, x, x);
+ rslt = int_const_binop (MULT_EXPR, rslt, x, 0);
+ x = int_const_binop (MULT_EXPR, x, x, 0);
}
- rslt = fold_binary_to_constant (BIT_AND_EXPR, type, rslt, mask);
+ rslt = int_const_binop (BIT_AND_EXPR, rslt, mask, 0);
}
return rslt;
@@ -1465,14 +1465,14 @@ infer_loop_bounds_from_undefined (struct loop *loop)
utype = unsigned_type_for (type);
if (tree_int_cst_lt (step, integer_zero_node))
- diff = fold (build2 (MINUS_EXPR, utype, init,
- TYPE_MIN_VALUE (type)));
+ diff = fold_build2 (MINUS_EXPR, utype, init,
+ TYPE_MIN_VALUE (type));
else
- diff = fold (build2 (MINUS_EXPR, utype,
- TYPE_MAX_VALUE (type), init));
+ diff = fold_build2 (MINUS_EXPR, utype,
+ TYPE_MAX_VALUE (type), init);
- estimation = fold (build2 (CEIL_DIV_EXPR, utype, diff,
- step));
+ estimation = fold_build2 (CEIL_DIV_EXPR, utype, diff,
+ step);
record_estimate (loop, estimation, boolean_true_node, stmt);
}