aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@gcc.gnu.org>2019-06-28 14:53:33 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2019-06-28 14:53:33 +0000
commit543e733fc85824caee7af9e86606f2113df76fdd (patch)
tree7304ffb096eca66ea374b58be6b4a999d333c9b4
parent1012d01592a36d6b6d2aa4b675d82248b8c06964 (diff)
downloadgcc-543e733fc85824caee7af9e86606f2113df76fdd.zip
gcc-543e733fc85824caee7af9e86606f2113df76fdd.tar.gz
gcc-543e733fc85824caee7af9e86606f2113df76fdd.tar.bz2
Normalize symbolics in extract_range_from_multiplicative_op.
From-SVN: r272785
-rw-r--r--gcc/tree-vrp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 3d60f17..2aee500 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -1397,8 +1397,14 @@ extract_range_from_multiplicative_op (value_range_base *vr,
/* Even if vr0 is VARYING or otherwise not usable, we can derive
useful ranges just from the shift count. E.g.
x >> 63 for signed 64-bit x is always [-1, 0]. */
- tree vr0_min = vr0->min (), vr0_max = vr0->max ();
- if (vr0->kind () != VR_RANGE || vr0->symbolic_p ())
+ value_range_base tem = vr0->normalize_symbolics ();
+ tree vr0_min, vr0_max;
+ if (tem.kind () == VR_RANGE)
+ {
+ vr0_min = tem.min ();
+ vr0_max = tem.max ();
+ }
+ else
{
vr0_min = vrp_val_min (type);
vr0_max = vrp_val_max (type);