Commit 26e4f1ba by Alexandre Oliva Committed by Alexandre Oliva

tree-vrp.c (extract_range_from_binary_expr): Don't shift by floor_log2 of zero.

* tree-vrp.c (extract_range_from_binary_expr): Don't shift by
floor_log2 of zero.  Negate widened zero.

From-SVN: r142702
parent db231d5d
2008-12-12 Alexandre Oliva <aoliva@redhat.com>
* tree-vrp.c (extract_range_from_binary_expr): Don't shift by
floor_log2 of zero. Negate widened zero.
2008-12-12 Ben Elliston <bje@au.ibm.com> 2008-12-12 Ben Elliston <bje@au.ibm.com>
* config/fp-bit.c (nan): Rename from this .. * config/fp-bit.c (nan): Rename from this ..
...@@ -2557,11 +2557,11 @@ extract_range_from_binary_expr (value_range_t *vr, ...@@ -2557,11 +2557,11 @@ extract_range_from_binary_expr (value_range_t *vr,
ior_max.high = vr0_max.high | vr1_max.high; ior_max.high = vr0_max.high | vr1_max.high;
if (ior_max.high != 0) if (ior_max.high != 0)
{ {
ior_max.low = ~0u; ior_max.low = ~(unsigned HOST_WIDE_INT)0u;
ior_max.high |= ((HOST_WIDE_INT) 1 ior_max.high |= ((HOST_WIDE_INT) 1
<< floor_log2 (ior_max.high)) - 1; << floor_log2 (ior_max.high)) - 1;
} }
else else if (ior_max.low != 0)
ior_max.low |= ((unsigned HOST_WIDE_INT) 1u ior_max.low |= ((unsigned HOST_WIDE_INT) 1u
<< floor_log2 (ior_max.low)) - 1; << floor_log2 (ior_max.low)) - 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment