[llvm-commits] CVS: llvm/lib/Support/APInt.cpp

Reid Spencer reid at x10sys.com
Mon Mar 12 11:37:42 PDT 2007



Changes in directory llvm/lib/Support:

APInt.cpp updated: 1.70 -> 1.71
---
Log message:

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


---
Diffs of the changes:  (+0 -4)

 APInt.cpp |    4 ----
 1 files changed, 4 deletions(-)


Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.70 llvm/lib/Support/APInt.cpp:1.71
--- llvm/lib/Support/APInt.cpp:1.70	Mon Mar 12 12:47:45 2007
+++ llvm/lib/Support/APInt.cpp	Mon Mar 12 13:37:25 2007
@@ -921,8 +921,6 @@
 
 // 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 @@
 
 //  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();






More information about the llvm-commits mailing list