[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner sabre at nondot.org
Fri Oct 20 11:20:35 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.526 -> 1.527
---
Log message:

Fix miscompilation of MallocBench/espresso which code review pointed out
but apparently didn't make it into the final patch.


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

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


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.526 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.527
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.526	Fri Oct 20 02:07:24 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Fri Oct 20 13:20:21 2006
@@ -4913,7 +4913,7 @@
   // shr int -1, X = -1   (for any arithmetic shift rights of ~0)
   if (!isLeftShift)
     if (ConstantInt *CSI = dyn_cast<ConstantInt>(Op0))
-      if (CSI->isAllOnesValue())
+      if (CSI->isAllOnesValue() && Op0->getType()->isSigned())
         return ReplaceInstUsesWith(I, CSI);
 
   // Try to fold constant and into select arguments.






More information about the llvm-commits mailing list