diff options
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index 34caf1a5ab9..20310b41689 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -443,6 +443,8 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) { OverflowResult OR = computeOverflowForUnsignedMul(LHS, RHS, II); if (OR == OverflowResult::NeverOverflows) { return CreateOverflowTuple(II, Builder->CreateNUWMul(LHS, RHS), false); + } else if (OR == OverflowResult::AlwaysOverflows) { + return CreateOverflowTuple(II, Builder->CreateMul(LHS, RHS), true); } } // FALL THROUGH case Intrinsic::smul_with_overflow: |