[llvm] e73f4e1 - [InstCombine] remove unused function argument; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 17 05:16:26 PDT 2021
Author: Sanjay Patel
Date: 2021-08-17T08:10:42-04:00
New Revision: e73f4e11233323d66f1d47c4f8510f9bf812402d
URL: https://github.com/llvm/llvm-project/commit/e73f4e11233323d66f1d47c4f8510f9bf812402d
DIFF: https://github.com/llvm/llvm-project/commit/e73f4e11233323d66f1d47c4f8510f9bf812402d.diff
LOG: [InstCombine] remove unused function argument; NFC
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index e3dd12c0c773..579a4bb77377 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -796,13 +796,12 @@ static Instruction *foldClampRangeOfTwo(IntrinsicInst *II,
}
/// Reduce a sequence of min/max intrinsics with a common operand.
-static Instruction *factorizeMinMaxTree(IntrinsicInst *II,
- InstCombiner::BuilderTy &Builder) {
+static Instruction *factorizeMinMaxTree(IntrinsicInst *II) {
// Match 3 of the same min/max ops. Example: umin(umin(), umin()).
auto *LHS = dyn_cast<IntrinsicInst>(II->getArgOperand(0));
auto *RHS = dyn_cast<IntrinsicInst>(II->getArgOperand(1));
Intrinsic::ID MinMaxID = II->getIntrinsicID();
- if (!LHS || !RHS || LHS->getIntrinsicID() != MinMaxID ||
+ if (!LHS || !RHS || LHS->getIntrinsicID() != MinMaxID ||
RHS->getIntrinsicID() != MinMaxID ||
(!LHS->hasOneUse() && !RHS->hasOneUse()))
return nullptr;
@@ -1128,7 +1127,7 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
if (Instruction *R = FoldOpIntoSelect(*II, Sel))
return R;
- if (Instruction *NewMinMax = factorizeMinMaxTree(II, Builder))
+ if (Instruction *NewMinMax = factorizeMinMaxTree(II))
return NewMinMax;
break;
More information about the llvm-commits
mailing list