@@ -12812,13 +12812,11 @@ static bool isCompatibleLoad(SDValue N, unsigned ExtOpcode) {
12812
12812
/// This function is called by the DAGCombiner when visiting sext/zext/aext
12813
12813
/// dag nodes (see for example method DAGCombiner::visitSIGN_EXTEND).
12814
12814
static SDValue tryToFoldExtendSelectLoad(SDNode *N, const TargetLowering &TLI,
12815
- SelectionDAG &DAG,
12815
+ SelectionDAG &DAG, const SDLoc &DL,
12816
12816
CombineLevel Level) {
12817
12817
unsigned Opcode = N->getOpcode();
12818
12818
SDValue N0 = N->getOperand(0);
12819
12819
EVT VT = N->getValueType(0);
12820
- SDLoc DL(N);
12821
-
12822
12820
assert((Opcode == ISD::SIGN_EXTEND || Opcode == ISD::ZERO_EXTEND ||
12823
12821
Opcode == ISD::ANY_EXTEND) &&
12824
12822
"Expected EXTEND dag node in input!");
@@ -13775,7 +13773,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
13775
13773
return DAG.getNode(ISD::ADD, DL, VT, Zext, DAG.getAllOnesConstant(DL, VT));
13776
13774
}
13777
13775
13778
- if (SDValue Res = tryToFoldExtendSelectLoad(N, TLI, DAG, Level))
13776
+ if (SDValue Res = tryToFoldExtendSelectLoad(N, TLI, DAG, DL, Level))
13779
13777
return Res;
13780
13778
13781
13779
return SDValue();
@@ -13860,8 +13858,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
13860
13858
// fold (zext (zext_extend_vector_inreg x)) -> (zext_extend_vector_inreg x)
13861
13859
if (N0.getOpcode() == ISD::ANY_EXTEND_VECTOR_INREG ||
13862
13860
N0.getOpcode() == ISD::ZERO_EXTEND_VECTOR_INREG)
13863
- return DAG.getNode(ISD::ZERO_EXTEND_VECTOR_INREG, SDLoc(N), VT,
13864
- N0.getOperand(0));
13861
+ return DAG.getNode(ISD::ZERO_EXTEND_VECTOR_INREG, DL, VT, N0.getOperand(0));
13865
13862
13866
13863
// fold (zext (truncate x)) -> (zext x) or
13867
13864
// (zext (truncate x)) -> (truncate x)
@@ -14147,7 +14144,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
14147
14144
if (SDValue V = widenAbs(N, DAG))
14148
14145
return V;
14149
14146
14150
- if (SDValue Res = tryToFoldExtendSelectLoad(N, TLI, DAG, Level))
14147
+ if (SDValue Res = tryToFoldExtendSelectLoad(N, TLI, DAG, DL, Level))
14151
14148
return Res;
14152
14149
14153
14150
// CSE zext nneg with sext if the zext is not free.
@@ -14322,7 +14319,7 @@ SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) {
14322
14319
if (SDValue NewCtPop = widenCtPop(N, DAG))
14323
14320
return NewCtPop;
14324
14321
14325
- if (SDValue Res = tryToFoldExtendSelectLoad(N, TLI, DAG, Level))
14322
+ if (SDValue Res = tryToFoldExtendSelectLoad(N, TLI, DAG, DL, Level))
14326
14323
return Res;
14327
14324
14328
14325
return SDValue();
0 commit comments