diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-05 13:18:09 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-05 13:18:09 +0000 |
commit | 09d0041cb92d96d749a3a5d5dfab78de3100d9d9 (patch) | |
tree | a75051f3125eb16e951b2147ac6b7ed7152c8259 /gcc/tree-vrp.c | |
parent | c28a9975903eefaa7c171fb5865972ab248f927d (diff) | |
download | gcc-09d0041cb92d96d749a3a5d5dfab78de3100d9d9.tar.gz |
2009-10-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/23821
* tree-vrp.c (vrp_finalize): Do not perform copy propagation.
* tree-ssa-dom.c (cprop_operand): Do not propagate copies into
simple IV increments.
* gcc.dg/torture/pr23821.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152449 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 57800075e94..0cb227abbd1 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -7237,7 +7237,7 @@ vrp_finalize (void) } /* We may have ended with ranges that have exactly one value. Those - values can be substituted as any other copy/const propagated + values can be substituted as any other const propagated value using substitute_and_fold. */ single_val_range = XCNEWVEC (prop_value_t, num_ssa_names); @@ -7245,7 +7245,8 @@ vrp_finalize (void) for (i = 0; i < num_ssa_names; i++) if (vr_value[i] && vr_value[i]->type == VR_RANGE - && vr_value[i]->min == vr_value[i]->max) + && vr_value[i]->min == vr_value[i]->max + && is_gimple_min_invariant (vr_value[i]->min)) { single_val_range[i].value = vr_value[i]->min; do_value_subst_p = true; |