Skip to content

Commit a5ec1aa

Browse files
committed
Fixed a typo causing a bug
1 parent 29aa3cc commit a5ec1aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4785,7 +4785,7 @@ Instruction *InstCombinerImpl::foldICmpBinOp(ICmpInst &I,
47854785
APInt Diff = *AP2 - *AP1;
47864786
Constant *C3 = Constant::getIntegerValue(BO0->getType(), Diff);
47874787
Value *NewAdd = Builder.CreateAdd(
4788-
C, C3, "", Op1HasNUW && Diff.ule(*AP1), Op1HasNSW);
4788+
C, C3, "", Op1HasNUW && Diff.ule(*AP2), Op1HasNSW);
47894789
return new ICmpInst(Pred, A, NewAdd);
47904790
}
47914791
}

0 commit comments

Comments
 (0)