[clang-tools-extra] [Support] Add KnownBits::computeForSubBorrow (PR #67788)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 05:33:42 PDT 2023


================
@@ -213,6 +213,37 @@ TEST(KnownBitsTest, AddSubExhaustive) {
   TestAddSubExhaustive(false);
 }
 
+TEST(KnownBitsTest, SubBorrowExhaustive) {
+  unsigned Bits = 4;
+  ForeachKnownBits(Bits, [&](const KnownBits &Known1) {
+    ForeachKnownBits(Bits, [&](const KnownBits &Known2) {
+      ForeachKnownBits(1, [&](const KnownBits &KnownBorrow) {
+        // Explicitly compute known bits of the addition by trying all
----------------
RKSimon wrote:

addition -> subtraction

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


More information about the cfe-commits mailing list