Revert the last patch as it violates the conditions of sext/zext.

llvm-svn: 35068
This commit is contained in:
Reid Spencer
2007-03-12 18:37:25 +00:00
parent 72ac14ed29
commit 6223c05805

View File

@@ -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();