[llvm] [KnownBitsTest] Common up isCorrect and isOptimal. NFC. (PR #89585)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 03:15:40 PDT 2024
================
@@ -201,23 +186,23 @@ static void TestAddSubExhaustive(bool IsAdd) {
KnownBits KnownComputed = KnownBits::computeForAddSub(
IsAdd, /*NSW=*/false, /*NUW=*/false, Known1, Known2);
- EXPECT_TRUE(isOptimal(Known, KnownComputed, {Known1, Known2}));
+ EXPECT_TRUE(checkResult(Known, KnownComputed, {Known1, Known2},
+ /*CheckOptimality=*/true));
KnownBits KnownNSWComputed = KnownBits::computeForAddSub(
IsAdd, /*NSW=*/true, /*NUW=*/false, Known1, Known2);
- if (!KnownNSW.hasConflict())
----------------
jayfoad wrote:
This `if` is now unnecessary since I moved the handling of always-poison results into `checkResult`. Same below.
https://github.com/llvm/llvm-project/pull/89585
More information about the llvm-commits
mailing list