diff options
-rw-r--r-- | gcc/gimple-range.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 75c03d6..2461bb7 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -620,6 +620,8 @@ gimple_ranger::range_of_builtin_call (irange &r, gcall *call) // If some high bits are known to be zero, decrease the maximum. if (!r.undefined_p ()) { + if (TYPE_SIGN (r.type ()) == SIGNED) + range_cast (r, unsigned_type_for (r.type ())); wide_int max = r.upper_bound (); maxi = wi::floor_log2 (max) + 1; } |