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

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


================
@@ -653,8 +656,10 @@ TEST(KnownBitsTest, GetMinMaxVal) {
       Min = APIntOps::umin(Min, N);
       Max = APIntOps::umax(Max, N);
     });
-    EXPECT_EQ(Min, Known.getMinValue());
-    EXPECT_EQ(Max, Known.getMaxValue());
+    if (!Known.hasConflict()) {
----------------
jayfoad wrote:

> Or do people think there is not much value in checking all the functions with conflict inputs?

I'm not sure how much value there is right now.

At some point we should check that KnownBits functions return conflict when they ought to, and part of that would definitely involve testing them on conflict inputs.

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


More information about the llvm-commits mailing list