summaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 0cb227abbd1..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,