diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-27 14:04:17 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-27 14:04:17 +0000 |
commit | 7edecb0ffe8dbb18f0fab5f5a28fa77095de6b4c (patch) | |
tree | 0c171b755271163d8c64219f823f59bc45b7f8c4 /gcc/tree-ssa-loop-niter.c | |
parent | f4d7629dd75afd6ac0ac9a64f51c01beb8460957 (diff) | |
download | gcc-7edecb0ffe8dbb18f0fab5f5a28fa77095de6b4c.tar.gz |
PR tree-optimize/22348
* tree-ssa-loop-niter.c (number_of_iterations_cond):
Fold the partial computation.
* gcc.c-torture/execute/pr22348.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 891dc0c13d1..37cd4003d47 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -275,7 +275,7 @@ number_of_iterations_cond (tree type, tree base0, tree step0, step = fold_unary_to_constant (NEGATE_EXPR, type, step1); else step = step0; - delta = build2 (MINUS_EXPR, type, base1, base0); + delta = fold_build2 (MINUS_EXPR, type, base1, base0); delta = fold_build2 (FLOOR_MOD_EXPR, type, delta, step); may_xform = boolean_false_node; |