aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-12 18:37:25 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-12 18:37:25 +0000
commit4fd8606791e0ff67a9dd13a21d95cda7e114c0e0 (patch)
treec42decaea43d5264eca116a9c43cf3cff095e55f /lib/Support/APInt.cpp
parent2b7d7b57ae8334687d6d4fea045fbfbea4864db0 (diff)
Revert the last patch as it violates the conditions of sext/zext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APInt.cpp')
-rw-r--r--lib/Support/APInt.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp
index ae8f6e4e39..08ec236200 100644
--- a/lib/Support/APInt.cpp
+++ b/lib/Support/APInt.cpp
@@ -921,8 +921,6 @@ APInt &APInt::trunc(uint32_t width) {
// Sign extend to a new width.
APInt &APInt::sext(uint32_t width) {
- if (width == BitWidth)
- return *this;
assert(width > BitWidth && "Invalid APInt SignExtend request");
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
// If the sign bit isn't set, this is the same as zext.
@@ -971,8 +969,6 @@ APInt &APInt::sext(uint32_t width) {
// Zero extend to a new width.
APInt &APInt::zext(uint32_t width) {
- if (width == BitWidth)
- return *this;
assert(width > BitWidth && "Invalid APInt ZeroExtend request");
assert(width <= IntegerType::MAX_INT_BITS && "Too many bits");
uint32_t wordsBefore = getNumWords();