diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-27 18:19:33 +0000 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-27 18:19:33 +0000 |
commit | 6d855ea024186d7dba21b1c178e7a0afd0f13eb0 (patch) | |
tree | f00b6d28611be2583556d7365d885c41b5053095 /llvm/unittests/IR/ConstantRangeTest.cpp | |
parent | beda859a15ae064c5ace8c230709fdf79dc7a602 (diff) | |
download | bcm5719-llvm-6d855ea024186d7dba21b1c178e7a0afd0f13eb0.tar.gz bcm5719-llvm-6d855ea024186d7dba21b1c178e7a0afd0f13eb0.zip |
[ConstantRange] Rename isWrappedSet() to isUpperWrapped()
Split out from D59749. The current implementation of isWrappedSet()
doesn't do what it says on the tin, and treats ranges like
[X, Max] as wrapping, because they are represented as [X, 0) when
using half-inclusive ranges. This also makes it inconsistent with
the semantics of isSignWrappedSet().
This patch renames isWrappedSet() to isUpperWrapped(), in preparation
for the introduction of a new isWrappedSet() method with corrected
behavior.
llvm-svn: 357107
Diffstat (limited to 'llvm/unittests/IR/ConstantRangeTest.cpp')
-rw-r--r-- | llvm/unittests/IR/ConstantRangeTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/unittests/IR/ConstantRangeTest.cpp b/llvm/unittests/IR/ConstantRangeTest.cpp index c63c6cef7e1..0455df5fa5e 100644 --- a/llvm/unittests/IR/ConstantRangeTest.cpp +++ b/llvm/unittests/IR/ConstantRangeTest.cpp @@ -35,7 +35,7 @@ TEST_F(ConstantRangeTest, Basics) { EXPECT_TRUE(Full.isFullSet()); EXPECT_FALSE(Full.isEmptySet()); EXPECT_TRUE(Full.inverse().isEmptySet()); - EXPECT_FALSE(Full.isWrappedSet()); + EXPECT_FALSE(Full.isUpperWrapped()); EXPECT_TRUE(Full.contains(APInt(16, 0x0))); EXPECT_TRUE(Full.contains(APInt(16, 0x9))); EXPECT_TRUE(Full.contains(APInt(16, 0xa))); @@ -45,7 +45,7 @@ TEST_F(ConstantRangeTest, Basics) { EXPECT_FALSE(Empty.isFullSet()); EXPECT_TRUE(Empty.isEmptySet()); EXPECT_TRUE(Empty.inverse().isFullSet()); - EXPECT_FALSE(Empty.isWrappedSet()); + EXPECT_FALSE(Empty.isUpperWrapped()); EXPECT_FALSE(Empty.contains(APInt(16, 0x0))); EXPECT_FALSE(Empty.contains(APInt(16, 0x9))); EXPECT_FALSE(Empty.contains(APInt(16, 0xa))); @@ -54,7 +54,7 @@ TEST_F(ConstantRangeTest, Basics) { EXPECT_FALSE(One.isFullSet()); EXPECT_FALSE(One.isEmptySet()); - EXPECT_FALSE(One.isWrappedSet()); + EXPECT_FALSE(One.isUpperWrapped()); EXPECT_FALSE(One.contains(APInt(16, 0x0))); EXPECT_FALSE(One.contains(APInt(16, 0x9))); EXPECT_TRUE(One.contains(APInt(16, 0xa))); @@ -64,7 +64,7 @@ TEST_F(ConstantRangeTest, Basics) { EXPECT_FALSE(Some.isFullSet()); EXPECT_FALSE(Some.isEmptySet()); - EXPECT_FALSE(Some.isWrappedSet()); + EXPECT_FALSE(Some.isUpperWrapped()); EXPECT_FALSE(Some.contains(APInt(16, 0x0))); EXPECT_FALSE(Some.contains(APInt(16, 0x9))); EXPECT_TRUE(Some.contains(APInt(16, 0xa))); @@ -73,7 +73,7 @@ TEST_F(ConstantRangeTest, Basics) { EXPECT_FALSE(Wrap.isFullSet()); EXPECT_FALSE(Wrap.isEmptySet()); - EXPECT_TRUE(Wrap.isWrappedSet()); + EXPECT_TRUE(Wrap.isUpperWrapped()); EXPECT_TRUE(Wrap.contains(APInt(16, 0x0))); EXPECT_TRUE(Wrap.contains(APInt(16, 0x9))); EXPECT_FALSE(Wrap.contains(APInt(16, 0xa))); |