From c8c560867f2ebafaa98956fa2718971af6262e58 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Wed, 7 Jan 2015 00:39:42 +0000 Subject: [PATCH] InstCombine: Just a small tidy-up git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225328 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineCalls.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 11a28d4ac87..c42202a2fa6 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -441,11 +441,10 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) { 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. -- 2.11.0