diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-07-13 04:50:21 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-07-13 04:50:21 +0000 |
commit | 337b3c23eee5e824586b963767289556688927c0 (patch) | |
tree | 3eb9d1299fa478b4599b91f6a16bf3b9420521fd /unittests | |
parent | 5c94ac933728f491da94f1467d4cb1513f4931fc (diff) | |
download | external_llvm-337b3c23eee5e824586b963767289556688927c0.zip external_llvm-337b3c23eee5e824586b963767289556688927c0.tar.gz external_llvm-337b3c23eee5e824586b963767289556688927c0.tar.bz2 |
Fix an error in ConstantRange::getSignedMax on wrapped ranges. Thanks once
again to Daniel Dunbar and KLEE!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Support/ConstantRangeTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Support/ConstantRangeTest.cpp b/unittests/Support/ConstantRangeTest.cpp index f929425..3ebb929 100644 --- a/unittests/Support/ConstantRangeTest.cpp +++ b/unittests/Support/ConstantRangeTest.cpp @@ -137,6 +137,10 @@ TEST_F(ConstantRangeTest, GetMinsAndMaxes) { EXPECT_EQ(One.getSignedMin(), APInt(16, 0xa)); EXPECT_EQ(Some.getSignedMin(), APInt(16, 0xa)); EXPECT_EQ(Wrap.getSignedMin(), APInt(16, INT16_MIN)); + + // Found by Klee + EXPECT_EQ(ConstantRange(APInt(4, 7), APInt(4, 0)).getSignedMax(), + APInt(4, 7)); } TEST_F(ConstantRangeTest, Trunc) { |