mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Multiply was very wrong for wrapped ranges. This supplies a half-fix that will
generally return Full on all wrapped inputs. "Fixes" PR4545. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75444 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -275,6 +275,11 @@ TEST_F(ConstantRangeTest, Multiply) {
|
||||
EXPECT_TRUE(Some.multiply(Some).isFullSet());
|
||||
EXPECT_EQ(Some.multiply(Wrap), Full);
|
||||
EXPECT_EQ(Wrap.multiply(Wrap), Full);
|
||||
|
||||
// http://llvm.org/PR4545
|
||||
EXPECT_EQ(ConstantRange(APInt(4, 1), APInt(4, 6)).multiply(
|
||||
ConstantRange(APInt(4, 6), APInt(4, 2))),
|
||||
ConstantRange(4, /*isFullSet=*/true));
|
||||
}
|
||||
|
||||
TEST_F(ConstantRangeTest, UMax) {
|
||||
|
Reference in New Issue
Block a user