Skip to content

Commit 07a43ac

Browse files
committed
Remove unused variable
1 parent 9a0f030 commit 07a43ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,8 +1403,8 @@ Instruction *InstCombinerImpl::foldSelectValueEquivalence(SelectInst &Sel,
14031403
}
14041404

14051405
Value *CmpLHS = Cmp.getOperand(0), *CmpRHS = Cmp.getOperand(1);
1406-
auto ReplaceOldOpWithNewOp = [&](Value *OldOp, Value *NewOp,
1407-
uint32_t Direction) -> Instruction * {
1406+
auto ReplaceOldOpWithNewOp = [&](Value *OldOp,
1407+
Value *NewOp) -> Instruction * {
14081408
// In X == Y ? f(X) : Z, try to evaluate f(Y) and replace the operand.
14091409
// Take care to avoid replacing X == Y ? X : Z with X == Y ? Y : Z, as that
14101410
// would lead to an infinite replacement cycle.
@@ -1452,12 +1452,12 @@ Instruction *InstCombinerImpl::foldSelectValueEquivalence(SelectInst &Sel,
14521452

14531453
bool CanReplaceCmpLHSWithRHS = canReplacePointersIfEqual(CmpLHS, CmpRHS, DL);
14541454
if (CanReplaceCmpLHSWithRHS) {
1455-
if (Instruction *R = ReplaceOldOpWithNewOp(CmpLHS, CmpRHS, 0))
1455+
if (Instruction *R = ReplaceOldOpWithNewOp(CmpLHS, CmpRHS))
14561456
return R;
14571457
}
14581458
bool CanReplaceCmpRHSWithLHS = canReplacePointersIfEqual(CmpRHS, CmpLHS, DL);
14591459
if (CanReplaceCmpRHSWithLHS) {
1460-
if (Instruction *R = ReplaceOldOpWithNewOp(CmpRHS, CmpLHS, 1))
1460+
if (Instruction *R = ReplaceOldOpWithNewOp(CmpRHS, CmpLHS))
14611461
return R;
14621462
}
14631463

0 commit comments

Comments
 (0)