[llvm] r225328 - InstCombine: Just a small tidy-up
David Majnemer
david.majnemer at gmail.com
Tue Jan 6 16:39:43 PST 2015
Author: majnemer
Date: Tue Jan 6 18:39:42 2015
New Revision: 225328
URL: http://llvm.org/viewvc/llvm-project?rev=225328&view=rev
Log:
InstCombine: Just a small tidy-up
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=225328&r1=225327&r2=225328&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Tue Jan 6 18:39:42 2015
@@ -441,11 +441,10 @@ Instruction *InstCombiner::visitCallInst
case Intrinsic::umul_with_overflow: {
Value *LHS = II->getArgOperand(0), *RHS = II->getArgOperand(1);
OverflowResult OR = computeOverflowForUnsignedMul(LHS, RHS, II);
- if (OR == OverflowResult::NeverOverflows) {
+ if (OR == OverflowResult::NeverOverflows)
return CreateOverflowTuple(II, Builder->CreateNUWMul(LHS, RHS), false);
- } else if (OR == OverflowResult::AlwaysOverflows) {
+ if (OR == OverflowResult::AlwaysOverflows)
return CreateOverflowTuple(II, Builder->CreateMul(LHS, RHS), true);
- }
} // FALL THROUGH
case Intrinsic::smul_with_overflow:
// Canonicalize constants into the RHS.
More information about the llvm-commits
mailing list