forked from OSchip/llvm-project
parent
60d5b1cfdb
commit
f8fcac7470
|
@ -618,7 +618,7 @@ ConstantRange::shl(const ConstantRange &Amount) const {
|
|||
APInt max = getUnsignedMax() << Amount.getUnsignedMax();
|
||||
|
||||
// there's no overflow!
|
||||
APInt Zeros(sizeof(unsigned)*8, getUnsignedMax().countLeadingZeros());
|
||||
APInt Zeros(getBitWidth(), getUnsignedMax().countLeadingZeros());
|
||||
if (Zeros.uge(Amount.getUnsignedMax()))
|
||||
return ConstantRange(min, max);
|
||||
|
||||
|
|
Loading…
Reference in New Issue