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 aa4a883855
commit 569944e45f

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