aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ConstantRangeTest.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-07-13 04:17:23 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-07-13 04:17:23 +0000
commit5edc4592204d4d4ba85f59ecc607ef45db4ae416 (patch)
treeeeee796830a3dbec29082563d0feb72a3507015b /llvm/unittests/Support/ConstantRangeTest.cpp
parentae86c19e68d67d50d2c9cbef51e1129545634ece (diff)
downloadllvm-5edc4592204d4d4ba85f59ecc607ef45db4ae416.zip
llvm-5edc4592204d4d4ba85f59ecc607ef45db4ae416.tar.gz
llvm-5edc4592204d4d4ba85f59ecc607ef45db4ae416.tar.bz2
'i8 full-range' sign extended to i16 should equal [-128, 128) not [-128, 127).
Found by Daniel Dunbar and KLEE. llvm-svn: 75448
Diffstat (limited to 'llvm/unittests/Support/ConstantRangeTest.cpp')
-rw-r--r--llvm/unittests/Support/ConstantRangeTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Support/ConstantRangeTest.cpp b/llvm/unittests/Support/ConstantRangeTest.cpp
index 2b073d8..f929425 100644
--- a/llvm/unittests/Support/ConstantRangeTest.cpp
+++ b/llvm/unittests/Support/ConstantRangeTest.cpp
@@ -175,7 +175,7 @@ TEST_F(ConstantRangeTest, SExt) {
ConstantRange SSome = Some.signExtend(20);
ConstantRange SWrap = Wrap.signExtend(20);
EXPECT_EQ(SFull, ConstantRange(APInt(20, INT16_MIN, true),
- APInt(20, INT16_MAX, true)));
+ APInt(20, INT16_MAX + 1, true)));
EXPECT_TRUE(SEmpty.isEmptySet());
EXPECT_EQ(SOne, ConstantRange(APInt(One.getLower()).sext(20),
APInt(One.getUpper()).sext(20)));