Skip to content

Commit 4083038

Browse files
authored
Update InstCombineMulDivRem.cpp
1 parent 59c14ad commit 4083038

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Instruction *InstCombinerImpl::visitMul(BinaryOperator &I) {
268268
BinaryOperator *OpBO = cast<BinaryOperator>(Op0);
269269
if (OpBO->isExact() && (HasNSW || HasNUW)) {
270270
Value *BinOp = Op0;
271-
if (OpBO->getOpcode() == Instruction::AShr && HasNUW &&
271+
if (HasNUW && OpBO->getOpcode() == Instruction::AShr &&
272272
OpBO->hasOneUse())
273273
BinOp = Builder.CreateLShr(
274274
NewOp, ConstantInt::get(Ty, ShiftC->getZExtValue()), "",

0 commit comments

Comments
 (0)