Changes in directory llvm/lib/Support:

APInt.cpp updated: 1.43 -> 1.44
---
Log message:

Fix sext operation. Shifting by zero would leave an incorrect mask.


---
Diffs of the changes:  (+1 -1)

 APInt.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.43 llvm/lib/Support/APInt.cpp:1.44
--- llvm/lib/Support/APInt.cpp:1.43     Sun Feb 25 17:44:53 2007
+++ llvm/lib/Support/APInt.cpp  Sun Feb 25 17:54:00 2007
@@ -889,7 +889,7 @@
     return;
   }
 
-  uint64_t mask = ~0ULL << wordBits;
+  uint64_t mask = wordBits == 0 ? 0 : ~0ULL << wordBits;
   uint64_t *newVal = getMemory(wordsAfter);
   if (wordsBefore == 1)
     newVal[0] = VAL | mask;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to