fix crash in my previous patch

llvm-svn: 86987
This commit is contained in:
Nuno Lopes 2009-11-12 15:10:33 +00:00
parent 60d5b1cfdb
commit f8fcac7470
1 changed files with 1 additions and 1 deletions

View File

@ -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);