diff options
-rw-r--r-- | llvm/unittests/IR/ConstantRangeTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/unittests/IR/ConstantRangeTest.cpp b/llvm/unittests/IR/ConstantRangeTest.cpp index b22f82154f4..6c5c8f50340 100644 --- a/llvm/unittests/IR/ConstantRangeTest.cpp +++ b/llvm/unittests/IR/ConstantRangeTest.cpp @@ -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) { |