[llvm] r206144 - Use APInt arithmetic, fixed typo. Thanks to Benjamin Kramer for noticing that.
Serge Pavlov
sepavloff at gmail.com
Sun Apr 13 19:20:19 PDT 2014
Author: sepavloff
Date: Sun Apr 13 21:20:19 2014
New Revision: 206144
URL: http://llvm.org/viewvc/llvm-project?rev=206144&view=rev
Log:
Use APInt arithmetic, fixed typo. Thanks to Benjamin Kramer for noticing that.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=206144&r1=206143&r2=206144&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Sun Apr 13 21:20:19 2014
@@ -2149,7 +2149,7 @@ static Instruction *ProcessUMulZExtIdiom
// 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
// 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()) {
More information about the llvm-commits
mailing list