summaryrefslogtreecommitdiffstats
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
commit5dee3b25264c735e7b69fe8b41d43585d8202d9c (patch)
tree59347ebab9f77a27e0e0c8d666d6cc564957a90f
parentc5c11a80708047d6b755d0cbf5661cc29550b228 (diff)
downloadbcm5719-llvm-5dee3b25264c735e7b69fe8b41d43585d8202d9c.tar.gz
bcm5719-llvm-5dee3b25264c735e7b69fe8b41d43585d8202d9c.zip
Fix miscompilation of MallocBench/espresso which code review pointed out
but apparently didn't make it into the final patch. llvm-svn: 31070
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index c30c0c924f8..bcb4888b6ae 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud