[PATCH] D69387: [ConstantRange] Add toKnownBits() method

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 09:58:04 PDT 2019


nikic added inline comments.


================
Comment at: llvm/unittests/IR/ConstantRangeTest.cpp:2144
+      EXPECT_EQ(KBFromReferenceUnsignedCR, KBFromReferenceSignedCR);
+      EXPECT_EQ(KBFromReferenceUnsignedCR, Known);
     }
----------------
Your test is checking that the result of toKnownBits() is correct //under the assumption that it came from ConstantRange::fromKnownBits()//. However, fromKnownBits() can not produce all possible ranges.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69387/new/

https://reviews.llvm.org/D69387





More information about the llvm-commits mailing list