From 7f4db7c80779ecbc57d1146654daf0acfe18de66 Mon Sep 17 00:00:00 2001 From: rus Date: Mon, 9 Nov 2009 20:58:24 +0000 Subject: merge from trunk git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@154052 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-vrp.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'gcc/tree-vrp.c') 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; -- cgit v1.2.1