summaryrefslogtreecommitdiff
path: root/unittests/IR
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-10-02 02:40:27 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-10-02 02:40:27 +0000
commitd3000982c588933c523e1fb25bc2275f99d7f644 (patch)
tree6edb4e0e7756b347924c328749d64e03a7560922 /unittests/IR
parent4c305bebf0b831b082dfae44edc0beb0b4ea173a (diff)
downloadllvm-d3000982c588933c523e1fb25bc2275f99d7f644.tar.gz
Revert r283057 and r283058
They've broken the sanitizer-bootstrap bots. Reverting while I investigate. Original commit messages: r283057: "[ConstantRange] Make getEquivalentICmp smarter" r283058: "[SCEV] Rely on ConstantRange instead of custom logic; NFCI" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r--unittests/IR/ConstantRangeTest.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/unittests/IR/ConstantRangeTest.cpp b/unittests/IR/ConstantRangeTest.cpp
index 423f06279173..f7a8a82043b9 100644
--- a/unittests/IR/ConstantRangeTest.cpp
+++ b/unittests/IR/ConstantRangeTest.cpp
@@ -760,37 +760,6 @@ TEST(ConstantRange, GetEquivalentICmp) {
EXPECT_FALSE(ConstantRange(APInt::getMinValue(32) - APInt(32, 100),
APInt::getMinValue(32) + APInt(32, 100))
.getEquivalentICmp(Pred, RHS));
-
- EXPECT_TRUE(ConstantRange(APInt(32, 100)).getEquivalentICmp(Pred, RHS));
- EXPECT_EQ(Pred, CmpInst::ICMP_EQ);
- EXPECT_EQ(RHS, APInt(32, 100));
-
- EXPECT_TRUE(
- ConstantRange(APInt(32, 100)).inverse().getEquivalentICmp(Pred, RHS));
- EXPECT_EQ(Pred, CmpInst::ICMP_NE);
- EXPECT_EQ(RHS, APInt(32, 100));
-
- // NB! It would be correct for the following four calls to getEquivalentICmp
- // to return ordered predicates like CmpInst::ICMP_ULT or CmpInst::ICMP_UGT.
- // However, that's not the case today.
-
- EXPECT_TRUE(ConstantRange(APInt(32, 0)).getEquivalentICmp(Pred, RHS));
- EXPECT_EQ(Pred, CmpInst::ICMP_EQ);
- EXPECT_EQ(RHS, APInt(32, 0));
-
- EXPECT_TRUE(
- ConstantRange(APInt(32, 0)).inverse().getEquivalentICmp(Pred, RHS));
- EXPECT_EQ(Pred, CmpInst::ICMP_NE);
- EXPECT_EQ(RHS, APInt(32, 0));
-
- EXPECT_TRUE(ConstantRange(APInt(32, -1)).getEquivalentICmp(Pred, RHS));
- EXPECT_EQ(Pred, CmpInst::ICMP_EQ);
- EXPECT_EQ(RHS, APInt(32, -1));
-
- EXPECT_TRUE(
- ConstantRange(APInt(32, -1)).inverse().getEquivalentICmp(Pred, RHS));
- EXPECT_EQ(Pred, CmpInst::ICMP_NE);
- EXPECT_EQ(RHS, APInt(32, -1));
}
} // anonymous namespace