@@ -23599,7 +23599,7 @@ static SDValue LowerVSETCC(SDValue Op, const X86Subtarget &Subtarget,
23599
23599
23600
23600
if (!FlipSigns && !Invert && ISD::isBuildVectorAllOnes(Op1.getNode())) {
23601
23601
Op0 = DAG.getBitcast(MVT::v4i32, Op0);
23602
- Op1 = DAG.getConstant(-1, dl, MVT::v4i32);
23602
+ Op1 = DAG.getAllOnesConstant( dl, MVT::v4i32);
23603
23603
23604
23604
SDValue GT = DAG.getNode(X86ISD::PCMPGT, dl, MVT::v4i32, Op0, Op1);
23605
23605
static const int MaskHi[] = { 1, 1, 3, 3 };
@@ -24391,7 +24391,7 @@ static SDValue LowerSIGN_EXTEND_Mask(SDValue Op, const SDLoc &dl,
24391
24391
(Subtarget.hasBWI() && WideEltVT.getSizeInBits() <= 16)) {
24392
24392
V = DAG.getNode(Op.getOpcode(), dl, WideVT, In);
24393
24393
} else {
24394
- SDValue NegOne = DAG.getConstant(-1, dl, WideVT);
24394
+ SDValue NegOne = DAG.getAllOnesConstant( dl, WideVT);
24395
24395
SDValue Zero = DAG.getConstant(0, dl, WideVT);
24396
24396
V = DAG.getSelect(dl, WideVT, In, NegOne, Zero);
24397
24397
}
@@ -26095,7 +26095,7 @@ SDValue X86TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
26095
26095
Op.getOperand(3));
26096
26096
} else {
26097
26097
SDValue GenCF = DAG.getNode(X86ISD::ADD, dl, CFVTs, Op.getOperand(1),
26098
- DAG.getConstant(-1, dl, MVT::i8));
26098
+ DAG.getAllOnesConstant( dl, MVT::i8));
26099
26099
Res = DAG.getNode(IntrData->Opc0, dl, VTs, Op.getOperand(2),
26100
26100
Op.getOperand(3), GenCF.getValue(1));
26101
26101
}
@@ -29378,7 +29378,7 @@ static SDValue LowerShiftByScalarVariable(SDValue Op, SelectionDAG &DAG,
29378
29378
29379
29379
// Create the mask using vXi16 shifts. For shift-rights we need to move
29380
29380
// the upper byte down before splatting the vXi8 mask.
29381
- SDValue BitMask = DAG.getConstant(-1, dl, ExtVT);
29381
+ SDValue BitMask = DAG.getAllOnesConstant( dl, ExtVT);
29382
29382
BitMask = getTargetVShiftNode(LogicalX86Op, dl, ExtVT, BitMask,
29383
29383
BaseShAmt, BaseShAmtIdx, Subtarget, DAG);
29384
29384
if (Opcode != ISD::SHL)
@@ -50580,7 +50580,7 @@ static SDValue combineAddOrSubToADCOrSBB(bool IsSub, const SDLoc &DL, EVT VT,
50580
50580
// X - SETAE --> adc X, -1
50581
50581
return DAG.getNode(IsSub ? X86ISD::ADC : X86ISD::SBB, DL,
50582
50582
DAG.getVTList(VT, MVT::i32), X,
50583
- DAG.getConstant(-1, DL, VT), EFLAGS);
50583
+ DAG.getAllOnesConstant( DL, VT), EFLAGS);
50584
50584
}
50585
50585
50586
50586
if (CC == X86::COND_BE) {
@@ -50601,7 +50601,7 @@ static SDValue combineAddOrSubToADCOrSBB(bool IsSub, const SDLoc &DL, EVT VT,
50601
50601
SDValue NewEFLAGS = NewSub.getValue(EFLAGS.getResNo());
50602
50602
return DAG.getNode(IsSub ? X86ISD::ADC : X86ISD::SBB, DL,
50603
50603
DAG.getVTList(VT, MVT::i32), X,
50604
- DAG.getConstant(-1, DL, VT), NewEFLAGS);
50604
+ DAG.getAllOnesConstant( DL, VT), NewEFLAGS);
50605
50605
}
50606
50606
}
50607
50607
@@ -50660,7 +50660,7 @@ static SDValue combineAddOrSubToADCOrSBB(bool IsSub, const SDLoc &DL, EVT VT,
50660
50660
// X + (Z != 0) --> add X, (zext(setne Z, 0)) --> sbb X, -1, (cmp Z, 1)
50661
50661
if (CC == X86::COND_NE)
50662
50662
return DAG.getNode(IsSub ? X86ISD::ADC : X86ISD::SBB, DL, VTs, X,
50663
- DAG.getConstant(-1ULL, DL, VT), Cmp1.getValue(1));
50663
+ DAG.getAllOnesConstant( DL, VT), Cmp1.getValue(1));
50664
50664
50665
50665
// X - (Z == 0) --> sub X, (zext(sete Z, 0)) --> sbb X, 0, (cmp Z, 1)
50666
50666
// X + (Z == 0) --> add X, (zext(sete Z, 0)) --> adc X, 0, (cmp Z, 1)
@@ -50944,8 +50944,9 @@ static SDValue foldXorTruncShiftIntoCmp(SDNode *N, SelectionDAG &DAG) {
50944
50944
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
50945
50945
EVT SetCCResultType = TLI.getSetCCResultType(DAG.getDataLayout(),
50946
50946
*DAG.getContext(), ResultType);
50947
- SDValue Cond = DAG.getSetCC(DL, SetCCResultType, ShiftOp,
50948
- DAG.getConstant(-1, DL, ShiftOpTy), ISD::SETGT);
50947
+ SDValue Cond =
50948
+ DAG.getSetCC(DL, SetCCResultType, ShiftOp,
50949
+ DAG.getAllOnesConstant(DL, ShiftOpTy), ISD::SETGT);
50949
50950
if (SetCCResultType != ResultType)
50950
50951
Cond = DAG.getNode(ISD::ZERO_EXTEND, DL, ResultType, Cond);
50951
50952
return Cond;
0 commit comments