@@ -40016,10 +40016,8 @@ static SDValue combineShuffle(SDNode *N, SelectionDAG &DAG,
40016
40016
40017
40017
// Simplify source operands based on shuffle mask.
40018
40018
// TODO - merge this into combineX86ShufflesRecursively.
40019
- APInt KnownUndef, KnownZero;
40020
40019
APInt DemandedElts = APInt::getAllOnes(VT.getVectorNumElements());
40021
- if (TLI.SimplifyDemandedVectorElts(Op, DemandedElts, KnownUndef, KnownZero,
40022
- DCI))
40020
+ if (TLI.SimplifyDemandedVectorElts(Op, DemandedElts, DCI))
40023
40021
return SDValue(N, 0);
40024
40022
40025
40023
// Canonicalize SHUFFLE(BINOP(X,Y)) -> BINOP(SHUFFLE(X),SHUFFLE(Y)).
@@ -46034,11 +46032,9 @@ static SDValue combineVectorShiftVar(SDNode *N, SelectionDAG &DAG,
46034
46032
EltBits[0].getZExtValue(), DAG);
46035
46033
}
46036
46034
46037
- APInt KnownUndef, KnownZero;
46038
46035
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
46039
46036
APInt DemandedElts = APInt::getAllOnes(VT.getVectorNumElements());
46040
- if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, KnownUndef,
46041
- KnownZero, DCI))
46037
+ if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, DCI))
46042
46038
return SDValue(N, 0);
46043
46039
46044
46040
return SDValue();
@@ -46915,9 +46911,7 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
46915
46911
DemandedElts.setBit(I);
46916
46912
}
46917
46913
46918
- APInt KnownUndef, KnownZero;
46919
- return TLI.SimplifyDemandedVectorElts(OtherOp, DemandedElts, KnownUndef,
46920
- KnownZero, DCI) ||
46914
+ return TLI.SimplifyDemandedVectorElts(OtherOp, DemandedElts, DCI) ||
46921
46915
TLI.SimplifyDemandedBits(OtherOp, DemandedBits, DemandedElts, DCI);
46922
46916
};
46923
46917
if (SimplifyUndemandedElts(N0, N1) || SimplifyUndemandedElts(N1, N0)) {
@@ -47389,9 +47383,7 @@ static SDValue combineOr(SDNode *N, SelectionDAG &DAG,
47389
47383
if (!EltBits[I].isAllOnes())
47390
47384
DemandedElts.setBit(I);
47391
47385
47392
- APInt KnownUndef, KnownZero;
47393
- return TLI.SimplifyDemandedVectorElts(OtherOp, DemandedElts, KnownUndef,
47394
- KnownZero, DCI);
47386
+ return TLI.SimplifyDemandedVectorElts(OtherOp, DemandedElts, DCI);
47395
47387
};
47396
47388
if (SimplifyUndemandedElts(N0, N1) || SimplifyUndemandedElts(N1, N0)) {
47397
47389
if (N->getOpcode() != ISD::DELETED_NODE)
@@ -48531,10 +48523,8 @@ static SDValue combineVEXTRACT_STORE(SDNode *N, SelectionDAG &DAG,
48531
48523
unsigned StElts = MemVT.getSizeInBits() / VT.getScalarSizeInBits();
48532
48524
APInt DemandedElts = APInt::getLowBitsSet(VT.getVectorNumElements(), StElts);
48533
48525
48534
- APInt KnownUndef, KnownZero;
48535
48526
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
48536
- if (TLI.SimplifyDemandedVectorElts(StoredVal, DemandedElts, KnownUndef,
48537
- KnownZero, DCI)) {
48527
+ if (TLI.SimplifyDemandedVectorElts(StoredVal, DemandedElts, DCI)) {
48538
48528
if (N->getOpcode() != ISD::DELETED_NODE)
48539
48529
DCI.AddToWorklist(N);
48540
48530
return SDValue(N, 0);
@@ -50074,10 +50064,8 @@ static SDValue combineX86INT_TO_FP(SDNode *N, SelectionDAG &DAG,
50074
50064
EVT VT = N->getValueType(0);
50075
50065
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
50076
50066
50077
- APInt KnownUndef, KnownZero;
50078
50067
APInt DemandedElts = APInt::getAllOnes(VT.getVectorNumElements());
50079
- if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, KnownUndef,
50080
- KnownZero, DCI))
50068
+ if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, DCI))
50081
50069
return SDValue(N, 0);
50082
50070
50083
50071
// Convert a full vector load into vzload when not all bits are needed.
@@ -50191,11 +50179,9 @@ static SDValue combineCVTPH2PS(SDNode *N, SelectionDAG &DAG,
50191
50179
SDValue Src = N->getOperand(IsStrict ? 1 : 0);
50192
50180
50193
50181
if (N->getValueType(0) == MVT::v4f32 && Src.getValueType() == MVT::v8i16) {
50194
- APInt KnownUndef, KnownZero;
50195
50182
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
50196
50183
APInt DemandedElts = APInt::getLowBitsSet(8, 4);
50197
- if (TLI.SimplifyDemandedVectorElts(Src, DemandedElts, KnownUndef, KnownZero,
50198
- DCI)) {
50184
+ if (TLI.SimplifyDemandedVectorElts(Src, DemandedElts, DCI)) {
50199
50185
if (N->getOpcode() != ISD::DELETED_NODE)
50200
50186
DCI.AddToWorklist(N);
50201
50187
return SDValue(N, 0);
@@ -53476,11 +53462,9 @@ static SDValue combineVPMADD(SDNode *N, SelectionDAG &DAG,
53476
53462
ISD::isBuildVectorAllZeros(RHS.getNode()))
53477
53463
return DAG.getConstant(0, SDLoc(N), VT);
53478
53464
53479
- APInt KnownUndef, KnownZero;
53480
53465
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
53481
53466
APInt DemandedElts = APInt::getAllOnes(VT.getVectorNumElements());
53482
- if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, KnownUndef,
53483
- KnownZero, DCI))
53467
+ if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, DCI))
53484
53468
return SDValue(N, 0);
53485
53469
53486
53470
return SDValue();
@@ -53549,11 +53533,9 @@ static SDValue combineKSHIFT(SDNode *N, SelectionDAG &DAG,
53549
53533
if (ISD::isBuildVectorAllZeros(N->getOperand(0).getNode()))
53550
53534
return DAG.getConstant(0, SDLoc(N), VT);
53551
53535
53552
- APInt KnownUndef, KnownZero;
53553
53536
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
53554
53537
APInt DemandedElts = APInt::getAllOnes(VT.getVectorNumElements());
53555
- if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, KnownUndef,
53556
- KnownZero, DCI))
53538
+ if (TLI.SimplifyDemandedVectorElts(SDValue(N, 0), DemandedElts, DCI))
53557
53539
return SDValue(N, 0);
53558
53540
53559
53541
return SDValue();
0 commit comments