@@ -1399,13 +1399,11 @@ static void computeKnownBitsFromOperator(const Operator *I,
13991399
14001400 // Note that inbounds does *not* guarantee nsw for the addition, as only
14011401 // the offset is signed, while the base address is unsigned.
1402- Known = KnownBits::computeForAddSub (
1403- /* Add=*/ true , /* NSW=*/ false , /* NUW=*/ false , Known, IndexBits);
1402+ Known = KnownBits::add (Known, IndexBits);
14041403 }
14051404 if (!Known.isUnknown () && !AccConstIndices.isZero ()) {
14061405 KnownBits Index = KnownBits::makeConstant (AccConstIndices);
1407- Known = KnownBits::computeForAddSub (
1408- /* Add=*/ true , /* NSW=*/ false , /* NUW=*/ false , Known, Index);
1406+ Known = KnownBits::add (Known, Index);
14091407 }
14101408 break ;
14111409 }
@@ -1802,9 +1800,7 @@ static void computeKnownBitsFromOperator(const Operator *I,
18021800 Known = computeKnownBitsForHorizontalOperation (
18031801 I, DemandedElts, Depth, Q,
18041802 [](const KnownBits &KnownLHS, const KnownBits &KnownRHS) {
1805- return KnownBits::computeForAddSub (/* Add=*/ true , /* NSW=*/ false ,
1806- /* NUW=*/ false , KnownLHS,
1807- KnownRHS);
1803+ return KnownBits::add (KnownLHS, KnownRHS);
18081804 });
18091805 break ;
18101806 }
@@ -1821,9 +1817,7 @@ static void computeKnownBitsFromOperator(const Operator *I,
18211817 Known = computeKnownBitsForHorizontalOperation (
18221818 I, DemandedElts, Depth, Q,
18231819 [](const KnownBits &KnownLHS, const KnownBits &KnownRHS) {
1824- return KnownBits::computeForAddSub (/* Add=*/ false , /* NSW=*/ false ,
1825- /* NUW=*/ false , KnownLHS,
1826- KnownRHS);
1820+ return KnownBits::sub (KnownLHS, KnownRHS);
18271821 });
18281822 break ;
18291823 }
@@ -2642,8 +2636,7 @@ static bool isNonZeroAdd(const APInt &DemandedElts, unsigned Depth,
26422636 isKnownToBeAPowerOfTwo (X, /* OrZero*/ false , Depth, Q))
26432637 return true ;
26442638
2645- return KnownBits::computeForAddSub (/* Add=*/ true , NSW, NUW, XKnown, YKnown)
2646- .isNonZero ();
2639+ return KnownBits::add (XKnown, YKnown, NSW, NUW).isNonZero ();
26472640}
26482641
26492642static bool isNonZeroSub (const APInt &DemandedElts, unsigned Depth,
0 commit comments