Skip to content

Commit

Permalink
[InstCombine] remove unused function argument; NFC
Browse files Browse the repository at this point in the history
This was just added with 6de1dbb , and I missed
pulling the extra arg from the final revision.
  • Loading branch information
rotateright committed Aug 12, 2021
1 parent 4e7d7ca commit cd44cc8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1111,7 +1110,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;
Expand Down

0 comments on commit cd44cc8

Please sign in to comment.