Skip to content

Commit 51ff8f2

Browse files
committed
[X86] foldXor1SetCC - pull out repeated SDLoc. NFC.
1 parent a282c68 commit 51ff8f2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54822,9 +54822,8 @@ static SDValue lowerX86FPLogicOp(SDNode *N, SelectionDAG &DAG,
5482254822
return DAG.getBitcast(VT, IntOp);
5482354823
}
5482454824

54825-
5482654825
/// Fold a xor(setcc cond, val), 1 --> setcc (inverted(cond), val)
54827-
static SDValue foldXor1SetCC(SDNode *N, SelectionDAG &DAG) {
54826+
static SDValue foldXor1SetCC(SDNode *N, const SDLoc &DL, SelectionDAG &DAG) {
5482854827
if (N->getOpcode() != ISD::XOR)
5482954828
return SDValue();
5483054829

@@ -54834,7 +54833,6 @@ static SDValue foldXor1SetCC(SDNode *N, SelectionDAG &DAG) {
5483454833

5483554834
X86::CondCode NewCC = X86::GetOppositeBranchCondition(
5483654835
X86::CondCode(LHS->getConstantOperandVal(0)));
54837-
SDLoc DL(N);
5483854836
return getSETCC(NewCC, LHS->getOperand(1), DL, DAG);
5483954837
}
5484054838

@@ -54932,7 +54930,7 @@ static SDValue combineXor(SDNode *N, SelectionDAG &DAG,
5493254930
if (DCI.isBeforeLegalizeOps())
5493354931
return SDValue();
5493454932

54935-
if (SDValue SetCC = foldXor1SetCC(N, DAG))
54933+
if (SDValue SetCC = foldXor1SetCC(N, DL, DAG))
5493654934
return SetCC;
5493754935

5493854936
if (SDValue R = combineOrXorWithSETCC(N->getOpcode(), DL, VT, N0, N1, DAG))

0 commit comments

Comments
 (0)