llvm.org GIT mirror llvm / 21adc2d
[ConstantRange] Add test case showing a case where we pick too large of a range for multiply after r271020. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302700 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 3 years ago
1 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
442442 EXPECT_EQ(ConstantRange(APInt(8, 254), APInt(8, 255)).multiply(
443443 ConstantRange(APInt(8, 2), APInt(8, 4))),
444444 ConstantRange(APInt(8, 250), APInt(8, 253)));
445
446 // TODO: This should be return [-2, 0]
447 EXPECT_EQ(ConstantRange(APInt(8, -2)).multiply(
448 ConstantRange(APInt(8, 0), APInt(8, 2))),
449 ConstantRange(APInt(8, 0), APInt(8, 255)));
445450 }
446451
447452 TEST_F(ConstantRangeTest, UMax) {