[llvm] [KnownBits] Remove `hasConflict()` assertions (PR #94568)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 08:10:19 PDT 2024


================
@@ -752,8 +765,10 @@ TEST(KnownBitsTest, CommonBitsSet) {
           HasCommonBitsSet |= N1.intersects(N2);
         });
       });
-      EXPECT_EQ(!HasCommonBitsSet,
-                KnownBits::haveNoCommonBitsSet(Known1, Known2));
+      if (!Known1.hasConflict() && !Known2.hasConflict()) {
----------------
jayfoad wrote:

I meant that you could save some time here by testing for conflict as the first thing in the loop body, before the nested ForeachNumInKnownBits loops.

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


More information about the llvm-commits mailing list