@@ -51308,13 +51308,11 @@ static bool hasBZHI(const X86Subtarget &Subtarget, MVT VT) {
51308
51308
51309
51309
/// Folds (and X, (or Y, ~Z)) --> (and X, ~(and ~Y, Z))
51310
51310
/// 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) {
51313
51313
using namespace llvm::SDPatternMatch;
51314
51314
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)))
51318
51316
return SDValue();
51319
51317
51320
51318
SDValue X, Y, Z;
@@ -51850,7 +51848,7 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
51850
51848
if (SDValue R = combineAndLoadToBZHI(N, DAG, Subtarget))
51851
51849
return R;
51852
51850
51853
- if (SDValue R = combineAndNotOrIntoAndNotAnd(N, DAG))
51851
+ if (SDValue R = combineAndNotOrIntoAndNotAnd(N, dl, DAG))
51854
51852
return R;
51855
51853
51856
51854
// fold (and (mul x, c1), c2) -> (mul x, (and c1, c2))
0 commit comments