diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2014-04-14 02:20:19 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2014-04-14 02:20:19 +0000 |
commit | b5f3ddc7a1dbbbe8e9d26a28bac6682e11fdc9b5 (patch) | |
tree | c3025136f32022fec3f7b4fcf2f04c6f41bf304e /llvm/lib/Transforms | |
parent | fe5bc7b138b592ff914e1cba53d883966f929ebd (diff) | |
download | bcm5719-llvm-b5f3ddc7a1dbbbe8e9d26a28bac6682e11fdc9b5.tar.gz bcm5719-llvm-b5f3ddc7a1dbbbe8e9d26a28bac6682e11fdc9b5.zip |
Use APInt arithmetic, fixed typo. Thanks to Benjamin Kramer for noticing that.
llvm-svn: 206144
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 01fedd1ddff..7085a55fd26 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -2149,7 +2149,7 @@ static Instruction *ProcessUMulZExtIdiom(ICmpInst &I, Value *MulVal, // mulval = mul(zext A, zext B) // cmp ule mulval, max + 1 if (ConstantInt *CI = dyn_cast<ConstantInt>(OtherVal)) { - APInt MaxVal(CI->getBitWidth(), 1ULL << MulWidth); + APInt MaxVal = APInt::getOneBitSet(CI->getBitWidth(), MulWidth); if (MaxVal.eq(CI->getValue())) break; // Recognized } @@ -2176,7 +2176,7 @@ static Instruction *ProcessUMulZExtIdiom(ICmpInst &I, Value *MulVal, // If there are uses of mul result other than the comparison, we know that // they are truncation or binary AND. Change them to use result of - // mul.with.overflow and ajust properly mask/size. + // mul.with.overflow and adjust properly mask/size. if (MulVal->hasNUsesOrMore(2)) { Value *Mul = Builder->CreateExtractValue(Call, 0, "umul.value"); for (User *U : MulVal->users()) { |