1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[ConstantRange] Add test case showing a case where we pick too large of a range for multiply after r271020.

llvm-svn: 302700
This commit is contained in:
Craig Topper 2017-05-10 18:15:06 +00:00
parent ecf5118408
commit 8ecd061605

View File

@ -443,6 +443,11 @@ TEST_F(ConstantRangeTest, Multiply) {
EXPECT_EQ(ConstantRange(APInt(8, 254), APInt(8, 255)).multiply(
ConstantRange(APInt(8, 2), APInt(8, 4))),
ConstantRange(APInt(8, 250), APInt(8, 253)));
// TODO: This should be return [-2, 0]
EXPECT_EQ(ConstantRange(APInt(8, -2)).multiply(
ConstantRange(APInt(8, 0), APInt(8, 2))),
ConstantRange(APInt(8, 0), APInt(8, 255)));
}
TEST_F(ConstantRangeTest, UMax) {