@@ -52596,7 +52596,8 @@ static SDValue combineOr(SDNode *N, SelectionDAG &DAG,
5259652596/// XOR(TRUNCATE(SRL(X, size(X)-1)), 1)
5259752597/// into:
5259852598/// SETGT(X, -1)
52599- static SDValue foldXorTruncShiftIntoCmp(SDNode *N, SelectionDAG &DAG) {
52599+ static SDValue foldXorTruncShiftIntoCmp(SDNode *N, const SDLoc &DL,
52600+ SelectionDAG &DAG) {
5260052601 // This is only worth doing if the output type is i8 or i1.
5260152602 EVT ResultType = N->getValueType(0);
5260252603 if (ResultType != MVT::i8 && ResultType != MVT::i1)
@@ -52631,7 +52632,6 @@ static SDValue foldXorTruncShiftIntoCmp(SDNode *N, SelectionDAG &DAG) {
5263152632 // Create a greater-than comparison against -1.
5263252633 // N.B. Using SETGE against 0 works but we want a canonical looking
5263352634 // comparison, using SETGT matches up with what TranslateX86CC.
52634- SDLoc DL(N);
5263552635 SDValue ShiftOp = Shift.getOperand(0);
5263652636 EVT ShiftOpTy = ShiftOp.getValueType();
5263752637 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
@@ -54936,7 +54936,7 @@ static SDValue combineXor(SDNode *N, SelectionDAG &DAG,
5493654936 if (SDValue R = combineOrXorWithSETCC(N->getOpcode(), DL, VT, N0, N1, DAG))
5493754937 return R;
5493854938
54939- if (SDValue RV = foldXorTruncShiftIntoCmp(N, DAG))
54939+ if (SDValue RV = foldXorTruncShiftIntoCmp(N, DL, DAG))
5494054940 return RV;
5494154941
5494254942 // Fold not(iX bitcast(vXi1)) -> (iX bitcast(not(vec))) for legal boolvecs.
0 commit comments