mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 22:50:47 +00:00
fix crash in my previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86987 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34e992da38
commit
4459145c2c
@ -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
Block a user