Special case shifting by zero in operator_rshift::op1_range.
gcc/ChangeLog: * range-op.cc (operator_rshift::op1_range): Special case shifting by zero.
This commit is contained in:
parent
8f70460005
commit
f0c0f124eb
@ -1642,6 +1642,11 @@ operator_rshift::op1_range (irange &r,
|
||||
wi::uhwi (prec, TYPE_PRECISION (TREE_TYPE (shift))),
|
||||
UNSIGNED))
|
||||
return false;
|
||||
if (wi::to_wide (shift) == 0)
|
||||
{
|
||||
r = lhs;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Folding the original operation may discard some impossible
|
||||
// ranges from the LHS.
|
||||
|
Loading…
Reference in New Issue
Block a user