aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 158d2e8289e0..edbd4091d1d2 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -2040,9 +2040,7 @@ Instruction *InstCombinerImpl::foldICmpMulConstant(ICmpInst &Cmp,
NewC = ConstantInt::get(
Mul->getType(),
APIntOps::RoundingSDiv(C, *MulC, APInt::Rounding::DOWN));
- }
-
- if (Mul->hasNoUnsignedWrap()) {
+ } else if (Mul->hasNoUnsignedWrap()) {
if (Pred == ICmpInst::ICMP_ULT || Pred == ICmpInst::ICMP_UGE)
NewC = ConstantInt::get(
Mul->getType(),