diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2009-07-13 04:17:23 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2009-07-13 04:17:23 +0000 |
| commit | 5edc4592204d4d4ba85f59ecc607ef45db4ae416 (patch) | |
| tree | eeee796830a3dbec29082563d0feb72a3507015b /llvm/lib/Support/ConstantRange.cpp | |
| parent | ae86c19e68d67d50d2c9cbef51e1129545634ece (diff) | |
| download | llvm-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/lib/Support/ConstantRange.cpp')
| -rw-r--r-- | llvm/lib/Support/ConstantRange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp index d7a57bb..ca25491 100644 --- a/llvm/lib/Support/ConstantRange.cpp +++ b/llvm/lib/Support/ConstantRange.cpp @@ -505,7 +505,7 @@ ConstantRange ConstantRange::signExtend(uint32_t DstTySize) const { assert(SrcTySize < DstTySize && "Not a value extension"); if (isFullSet()) { return ConstantRange(APInt::getHighBitsSet(DstTySize,DstTySize-SrcTySize+1), - APInt::getLowBitsSet(DstTySize, SrcTySize-1)); + APInt::getLowBitsSet(DstTySize, SrcTySize-1) + 1); } APInt L = Lower; L.sext(DstTySize); |
