@@ -3457,7 +3457,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
3457
3457
case ISD::BUILD_VECTOR:
3458
3458
assert(!Op.getValueType().isScalableVector());
3459
3459
// Collect the known bits that are shared by every demanded vector element.
3460
- Known.Zero.setAllBits(); Known.One.setAllBits ();
3460
+ Known.setAllConflict ();
3461
3461
for (unsigned i = 0, e = Op.getNumOperands(); i != e; ++i) {
3462
3462
if (!DemandedElts[i])
3463
3463
continue;
@@ -3492,7 +3492,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
3492
3492
break;
3493
3493
3494
3494
// Known bits are the values that are shared by every demanded element.
3495
- Known.Zero.setAllBits(); Known.One.setAllBits ();
3495
+ Known.setAllConflict ();
3496
3496
if (!!DemandedLHS) {
3497
3497
SDValue LHS = Op.getOperand(0);
3498
3498
Known2 = computeKnownBits(LHS, DemandedLHS, Depth + 1);
@@ -3518,7 +3518,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
3518
3518
if (Op.getValueType().isScalableVector())
3519
3519
break;
3520
3520
// Split DemandedElts and test each of the demanded subvectors.
3521
- Known.Zero.setAllBits(); Known.One.setAllBits ();
3521
+ Known.setAllConflict ();
3522
3522
EVT SubVectorVT = Op.getOperand(0).getValueType();
3523
3523
unsigned NumSubVectorElts = SubVectorVT.getVectorNumElements();
3524
3524
unsigned NumSubVectors = Op.getNumOperands();
@@ -3549,8 +3549,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
3549
3549
APInt DemandedSrcElts = DemandedElts;
3550
3550
DemandedSrcElts.clearBits(Idx, Idx + NumSubElts);
3551
3551
3552
- Known.One.setAllBits();
3553
- Known.Zero.setAllBits();
3552
+ Known.setAllConflict();
3554
3553
if (!!DemandedSubElts) {
3555
3554
Known = computeKnownBits(Sub, DemandedSubElts, Depth + 1);
3556
3555
if (Known.isUnknown())
@@ -3643,7 +3642,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
3643
3642
APIntOps::ScaleBitMask(DemandedElts, NumElts / SubScale);
3644
3643
Known2 = computeKnownBits(N0, SubDemandedElts, Depth + 1);
3645
3644
3646
- Known.Zero.setAllBits(); Known.One.setAllBits ();
3645
+ Known.setAllConflict ();
3647
3646
for (unsigned i = 0; i != NumElts; ++i)
3648
3647
if (DemandedElts[i]) {
3649
3648
unsigned Shifts = IsLE ? i : NumElts - 1 - i;
@@ -3991,8 +3990,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
3991
3990
// TODO - do we need to handle different bitwidths?
3992
3991
if (CstTy->isVectorTy() && BitWidth == CstTy->getScalarSizeInBits()) {
3993
3992
// Iterate across all vector elements finding common known bits.
3994
- Known.One.setAllBits();
3995
- Known.Zero.setAllBits();
3993
+ Known.setAllConflict();
3996
3994
for (unsigned i = 0; i != NumElts; ++i) {
3997
3995
if (!DemandedElts[i])
3998
3996
continue;
@@ -4277,8 +4275,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
4277
4275
DemandedVal = !!DemandedElts[EltIdx];
4278
4276
DemandedVecElts.clearBit(EltIdx);
4279
4277
}
4280
- Known.One.setAllBits();
4281
- Known.Zero.setAllBits();
4278
+ Known.setAllConflict();
4282
4279
if (DemandedVal) {
4283
4280
Known2 = computeKnownBits(InVal, Depth + 1);
4284
4281
Known = Known.intersectWith(Known2.zextOrTrunc(BitWidth));
0 commit comments