diff options
author | rus <rus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-09 20:58:24 +0000 |
---|---|---|
committer | rus <rus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-09 20:58:24 +0000 |
commit | 7f4db7c80779ecbc57d1146654daf0acfe18de66 (patch) | |
tree | 3af522a3b5e149c3fd498ecb1255994daae2129a /gcc/tree-vrp.c | |
parent | 611349f0ec42a37591db2cd02974a11a48d10edb (diff) | |
download | gcc-profile-stdlib.tar.gz |
merge from trunkprofile-stdlib
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@154052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 57800075e94..5adc0da84da 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -6748,13 +6748,9 @@ test_for_singularity (enum tree_code cond_code, tree op0, value range information we have for op0. */ if (min && max) { - if (compare_values (vr->min, min) == -1) - min = min; - else + if (compare_values (vr->min, min) == 1) min = vr->min; - if (compare_values (vr->max, max) == 1) - max = max; - else + if (compare_values (vr->max, max) == -1) max = vr->max; /* If the new min/max values have converged to a single value, @@ -7237,7 +7233,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 +7241,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; |