@@ -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