Skip to content

Commit dac94f2

Browse files
committed
[X86] combineAndNotOrIntoAndNotAnd - pull out repeated SDLoc(). NFC.
1 parent 896e187 commit dac94f2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51308,13 +51308,11 @@ static bool hasBZHI(const X86Subtarget &Subtarget, MVT VT) {
5130851308

5130951309
/// Folds (and X, (or Y, ~Z)) --> (and X, ~(and ~Y, Z))
5131051310
/// This undoes the inverse fold performed in InstCombine
51311-
static SDValue combineAndNotOrIntoAndNotAnd(SDNode *N, SelectionDAG &DAG) {
51312-
51311+
static SDValue combineAndNotOrIntoAndNotAnd(SDNode *N, const SDLoc &DL,
51312+
SelectionDAG &DAG) {
5131351313
using namespace llvm::SDPatternMatch;
5131451314
MVT VT = N->getSimpleValueType(0);
51315-
SDLoc DL(N);
51316-
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
51317-
if (!TLI.hasAndNot(SDValue(N, 0)))
51315+
if (!DAG.getTargetLoweringInfo().hasAndNot(SDValue(N, 0)))
5131851316
return SDValue();
5131951317

5132051318
SDValue X, Y, Z;
@@ -51850,7 +51848,7 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
5185051848
if (SDValue R = combineAndLoadToBZHI(N, DAG, Subtarget))
5185151849
return R;
5185251850

51853-
if (SDValue R = combineAndNotOrIntoAndNotAnd(N, DAG))
51851+
if (SDValue R = combineAndNotOrIntoAndNotAnd(N, dl, DAG))
5185451852
return R;
5185551853

5185651854
// fold (and (mul x, c1), c2) -> (mul x, (and c1, c2))

0 commit comments

Comments
 (0)