diff options
author | Aldy Hernandez <aldyh@gcc.gnu.org> | 2019-06-28 14:53:33 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2019-06-28 14:53:33 +0000 |
commit | 543e733fc85824caee7af9e86606f2113df76fdd (patch) | |
tree | 7304ffb096eca66ea374b58be6b4a999d333c9b4 /gcc | |
parent | 1012d01592a36d6b6d2aa4b675d82248b8c06964 (diff) | |
download | gcc-543e733fc85824caee7af9e86606f2113df76fdd.zip gcc-543e733fc85824caee7af9e86606f2113df76fdd.tar.gz gcc-543e733fc85824caee7af9e86606f2113df76fdd.tar.bz2 |
Normalize symbolics in extract_range_from_multiplicative_op.
From-SVN: r272785
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-vrp.c | 10 |
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); |