1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[ConstantRange] Add another truncate unittest for wrapped set staying a wrapped set.

llvm-svn: 304695
This commit is contained in:
Craig Topper 2017-06-04 23:07:53 +00:00
parent 3c3b867d31
commit aaeb1c5b96

View File

@ -200,6 +200,10 @@ TEST_F(ConstantRangeTest, Trunc) {
// trunc([5, 7), 3->2) = [1, 3)
ConstantRange FiveSeven(APInt(3, 5), APInt(3, 7));
EXPECT_EQ(FiveSeven.truncate(2), ConstantRange(APInt(2, 1), APInt(2, 3)));
// trunc([7, 1), 3->2) = [3, 1)
ConstantRange SevenOne(APInt(3, 7), APInt(3, 1));
EXPECT_EQ(SevenOne.truncate(2), ConstantRange(APInt(2, 3), APInt(2, 1)));
}
TEST_F(ConstantRangeTest, ZExt) {