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