* tree-ssa-loop-ivopts.c (iv_value): Avoid invalid sharing on niter.

From-SVN: r87143
This commit is contained in:
Jan Hubicka 2004-09-07 16:56:50 +02:00 committed by Jan Hubicka
parent c8cc8542fa
commit 6b094f38d7
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-09-07 Jan Hubicka <jh@suse.cz>
* tree-ssa-loop-ivopts.c (iv_value): Avoid invalid sharing on niter.
2004-09-07 Nathan Sidwell <nathan@codesourcery.com>
* builtins.c (fold_builtin_strchr): Use build_int_cst, not

View File

@ -2908,7 +2908,7 @@ iv_value (struct iv *iv, tree niter)
tree type = TREE_TYPE (iv->base);
niter = fold_convert (type, niter);
val = fold (build2 (MULT_EXPR, type, iv->step, niter));
val = fold (build2 (MULT_EXPR, type, iv->step, unsave_expr_now (niter)));
return fold (build2 (PLUS_EXPR, type, iv->base, val));
}