[PATCH] D88934: [unittests] Add a few tests for computeKnownBits with ranges
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 01:08:28 PDT 2020
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM with minor query
================
Comment at: llvm/unittests/Analysis/ValueTrackingTest.cpp:1134
+ EXPECT_EQ(Known.Zero.getZExtValue(), (~(65536llu - 1)) << 1);
+ EXPECT_EQ(Known.One.getZExtValue(), 0u);
+}
----------------
Is it worth adding Known.getMinValue()/getMaxValue() checks as well?
================
Comment at: llvm/unittests/Analysis/ValueTrackingTest.cpp:1157
+ EXPECT_EQ(Known.Zero.getZExtValue(), ~512llu & ~(64llu - 1));
+ EXPECT_EQ(Known.One.getZExtValue(), 512u | 32u);
+}
----------------
Is it worth adding Known.getMinValue()/getMaxValue() checks as well?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88934/new/
https://reviews.llvm.org/D88934
More information about the llvm-commits
mailing list