[llvm] [Support] Add KnownBits::computeForSubBorrow (PR #67788)

Christian Kissig via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 02:04:34 PDT 2023


================
@@ -3736,14 +3736,19 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
     assert(Op.getResNo() == 0 &&
            "We only compute knownbits for the difference here.");
 
-    // TODO: Compute influence of the carry operand.
-    if (Opcode == ISD::USUBO_CARRY || Opcode == ISD::SSUBO_CARRY)
-      break;
+    // With UADDO_CARRY and SSUBO_CARRY a borrow bit may be added in.
----------------
christiankissig wrote:

Done

https://github.com/llvm/llvm-project/pull/67788


More information about the llvm-commits mailing list