aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-20 18:20:21 +0000
committerChris Lattner <sabre@nondot.org>2006-10-20 18:20:21 +0000
commit87d8429506998806b9fe74cab7a16963ad4a088e (patch)
treedf116bcef9681df88e23b450f39be05cc635f5d8
parent3cb0f54ab513eacbf037cd864f70f25d8b40d262 (diff)
Fix miscompilation of MallocBench/espresso which code review pointed out
but apparently didn't make it into the final patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31070 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index c30c0c924f..bcb4888b6a 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -4913,7 +4913,7 @@ Instruction *InstCombiner::visitShiftInst(ShiftInst &I) {
// 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.