diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-12 18:37:25 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-12 18:37:25 +0000 |
commit | 6223c058052d61947d4284694a0070e3c03dbd64 (patch) | |
tree | 88e8e87baa55dc834c876dda9119a9f94721dee5 /llvm/lib/Support/APInt.cpp | |
parent | 72ac14ed294c34e67d298014d0ffccd4e9db6fbd (diff) | |
download | bcm5719-llvm-6223c058052d61947d4284694a0070e3c03dbd64.tar.gz bcm5719-llvm-6223c058052d61947d4284694a0070e3c03dbd64.zip |
Revert the last patch as it violates the conditions of sext/zext.
llvm-svn: 35068
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index ae8f6e4e395..08ec2362007 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/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(); |