[llvm] 0875bee - [X86] combineAndNotIntoANDNP - pull out repeated SDLoc(). NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 00:17:27 PDT 2025
Author: Simon Pilgrim
Date: 2025-06-18T08:17:07+01:00
New Revision: 0875bee2b10185eca40aea3b3f49eb8462522eda
URL: https://github.com/llvm/llvm-project/commit/0875bee2b10185eca40aea3b3f49eb8462522eda
DIFF: https://github.com/llvm/llvm-project/commit/0875bee2b10185eca40aea3b3f49eb8462522eda.diff
LOG: [X86] combineAndNotIntoANDNP - pull out repeated SDLoc(). NFC.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 62912f1c8d123..1ca5fc5376f0f 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -50839,7 +50839,8 @@ static SDValue combineCompareEqual(SDNode *N, SelectionDAG &DAG,
}
/// Try to fold: (and (xor X, -1), Y) -> (andnp X, Y).
-static SDValue combineAndNotIntoANDNP(SDNode *N, SelectionDAG &DAG) {
+static SDValue combineAndNotIntoANDNP(SDNode *N, const SDLoc &DL,
+ SelectionDAG &DAG) {
assert(N->getOpcode() == ISD::AND && "Unexpected opcode combine into ANDNP");
MVT VT = N->getSimpleValueType(0);
@@ -50861,7 +50862,7 @@ static SDValue combineAndNotIntoANDNP(SDNode *N, SelectionDAG &DAG) {
X = DAG.getBitcast(VT, X);
Y = DAG.getBitcast(VT, Y);
- return DAG.getNode(X86ISD::ANDNP, SDLoc(N), VT, X, Y);
+ return DAG.getNode(X86ISD::ANDNP, DL, VT, X, Y);
}
/// Try to fold:
@@ -51839,7 +51840,7 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
if (SDValue R = combineCompareEqual(N, DAG, DCI, Subtarget))
return R;
- if (SDValue R = combineAndNotIntoANDNP(N, DAG))
+ if (SDValue R = combineAndNotIntoANDNP(N, dl ,DAG))
return R;
if (SDValue ShiftRight = combineAndMaskToShift(N, dl, DAG, Subtarget))
More information about the llvm-commits
mailing list