@@ -3457,7 +3457,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
34573457 case ISD::BUILD_VECTOR:
34583458 assert(!Op.getValueType().isScalableVector());
34593459 // Collect the known bits that are shared by every demanded vector element.
3460- Known.Zero.setAllBits(); Known.One.setAllBits ();
3460+ Known.setAllConflict ();
34613461 for (unsigned i = 0, e = Op.getNumOperands(); i != e; ++i) {
34623462 if (!DemandedElts[i])
34633463 continue;
@@ -3492,7 +3492,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
34923492 break;
34933493
34943494 // Known bits are the values that are shared by every demanded element.
3495- Known.Zero.setAllBits(); Known.One.setAllBits ();
3495+ Known.setAllConflict ();
34963496 if (!!DemandedLHS) {
34973497 SDValue LHS = Op.getOperand(0);
34983498 Known2 = computeKnownBits(LHS, DemandedLHS, Depth + 1);
@@ -3518,7 +3518,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
35183518 if (Op.getValueType().isScalableVector())
35193519 break;
35203520 // Split DemandedElts and test each of the demanded subvectors.
3521- Known.Zero.setAllBits(); Known.One.setAllBits ();
3521+ Known.setAllConflict ();
35223522 EVT SubVectorVT = Op.getOperand(0).getValueType();
35233523 unsigned NumSubVectorElts = SubVectorVT.getVectorNumElements();
35243524 unsigned NumSubVectors = Op.getNumOperands();
@@ -3549,8 +3549,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
35493549 APInt DemandedSrcElts = DemandedElts;
35503550 DemandedSrcElts.clearBits(Idx, Idx + NumSubElts);
35513551
3552- Known.One.setAllBits();
3553- Known.Zero.setAllBits();
3552+ Known.setAllConflict();
35543553 if (!!DemandedSubElts) {
35553554 Known = computeKnownBits(Sub, DemandedSubElts, Depth + 1);
35563555 if (Known.isUnknown())
@@ -3643,7 +3642,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
36433642 APIntOps::ScaleBitMask(DemandedElts, NumElts / SubScale);
36443643 Known2 = computeKnownBits(N0, SubDemandedElts, Depth + 1);
36453644
3646- Known.Zero.setAllBits(); Known.One.setAllBits ();
3645+ Known.setAllConflict ();
36473646 for (unsigned i = 0; i != NumElts; ++i)
36483647 if (DemandedElts[i]) {
36493648 unsigned Shifts = IsLE ? i : NumElts - 1 - i;
@@ -3991,8 +3990,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
39913990 // TODO - do we need to handle different bitwidths?
39923991 if (CstTy->isVectorTy() && BitWidth == CstTy->getScalarSizeInBits()) {
39933992 // Iterate across all vector elements finding common known bits.
3994- Known.One.setAllBits();
3995- Known.Zero.setAllBits();
3993+ Known.setAllConflict();
39963994 for (unsigned i = 0; i != NumElts; ++i) {
39973995 if (!DemandedElts[i])
39983996 continue;
@@ -4277,8 +4275,7 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
42774275 DemandedVal = !!DemandedElts[EltIdx];
42784276 DemandedVecElts.clearBit(EltIdx);
42794277 }
4280- Known.One.setAllBits();
4281- Known.Zero.setAllBits();
4278+ Known.setAllConflict();
42824279 if (DemandedVal) {
42834280 Known2 = computeKnownBits(InVal, Depth + 1);
42844281 Known = Known.intersectWith(Known2.zextOrTrunc(BitWidth));
0 commit comments