[llvm] [InstCombine] Implemented missed optimization in muldivrem (PR #140916)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 08:57:29 PDT 2025
================
@@ -1258,7 +1258,9 @@ static Value *foldIDivShl(BinaryOperator &I, InstCombiner::BuilderTy &Builder) {
/// Common integer divide/remainder transforms
Instruction *InstCombinerImpl::commonIDivRemTransforms(BinaryOperator &I) {
assert(I.isIntDivRem() && "Unexpected instruction");
- Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
+ const APInt *C1, *C2;
+ Value *X;
+ Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1), *Op2 = I.getOperand(2);
----------------
dtcxzyw wrote:
A binary operator has no 3rd operand.
https://github.com/llvm/llvm-project/pull/140916
More information about the llvm-commits
mailing list