@@ -1489,13 +1489,13 @@ bool TargetLowering::SimplifyDemandedBits(
14891489 SDNodeFlags Flags = Op.getNode ()->getFlags ();
14901490 if (SimplifyDemandedBits (Op1, DemandedBits, DemandedElts, Known, TLO,
14911491 Depth + 1 )) {
1492- Op->clearFlags (SDNodeFlags::Disjoint);
1492+ Op->dropFlags (SDNodeFlags::Disjoint);
14931493 return true ;
14941494 }
14951495
14961496 if (SimplifyDemandedBits (Op0, ~Known.One & DemandedBits, DemandedElts,
14971497 Known2, TLO, Depth + 1 )) {
1498- Op->clearFlags (SDNodeFlags::Disjoint);
1498+ Op->dropFlags (SDNodeFlags::Disjoint);
14991499 return true ;
15001500 }
15011501
@@ -1802,7 +1802,7 @@ bool TargetLowering::SimplifyDemandedBits(
18021802 Depth + 1 )) {
18031803 // Disable the nsw and nuw flags. We can no longer guarantee that we
18041804 // won't wrap after simplification.
1805- Op->clearFlags (SDNodeFlags::NoWrap);
1805+ Op->dropFlags (SDNodeFlags::NoWrap);
18061806 return true ;
18071807 }
18081808 Known.Zero <<= ShAmt;
@@ -1888,7 +1888,7 @@ bool TargetLowering::SimplifyDemandedBits(
18881888 Depth + 1 )) {
18891889 // Disable the nsw and nuw flags. We can no longer guarantee that we
18901890 // won't wrap after simplification.
1891- Op->clearFlags (SDNodeFlags::NoWrap);
1891+ Op->dropFlags (SDNodeFlags::NoWrap);
18921892 return true ;
18931893 }
18941894 Known.resetAll ();
@@ -2444,7 +2444,7 @@ bool TargetLowering::SimplifyDemandedBits(
24442444 APInt InDemandedElts = DemandedElts.zext (InElts);
24452445 if (SimplifyDemandedBits (Src, InDemandedBits, InDemandedElts, Known, TLO,
24462446 Depth + 1 )) {
2447- Op->clearFlags (SDNodeFlags::NonNeg);
2447+ Op->dropFlags (SDNodeFlags::NonNeg);
24482448 return true ;
24492449 }
24502450 assert (Known.getBitWidth () == InBits && " Src width has changed?" );
@@ -2508,7 +2508,7 @@ bool TargetLowering::SimplifyDemandedBits(
25082508 if (!TLO.LegalOperations () || isOperationLegal (Opc, VT)) {
25092509 SDNodeFlags Flags;
25102510 if (!IsVecInReg)
2511- Flags = SDNodeFlags::NonNeg;
2511+ Flags | = SDNodeFlags::NonNeg;
25122512 return TLO.CombineTo (Op, TLO.DAG .getNode (Opc, dl, VT, Src, Flags));
25132513 }
25142514 }
@@ -2818,7 +2818,7 @@ bool TargetLowering::SimplifyDemandedBits(
28182818 ShrinkDemandedOp (Op, BitWidth, DemandedBits, TLO)) {
28192819 // Disable the nsw and nuw flags. We can no longer guarantee that we
28202820 // won't wrap after simplification.
2821- Op->clearFlags (SDNodeFlags::NoWrap);
2821+ Op->dropFlags (SDNodeFlags::NoWrap);
28222822 return true ;
28232823 }
28242824
0 commit comments