From 543e733fc85824caee7af9e86606f2113df76fdd Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 28 Jun 2019 14:53:33 +0000 Subject: Normalize symbolics in extract_range_from_multiplicative_op. From-SVN: r272785 --- gcc/tree-vrp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc') 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); -- cgit v1.1