diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-20 18:20:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-20 18:20:21 +0000 |
commit | 5dee3b25264c735e7b69fe8b41d43585d8202d9c (patch) | |
tree | 59347ebab9f77a27e0e0c8d666d6cc564957a90f /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | c5c11a80708047d6b755d0cbf5661cc29550b228 (diff) | |
download | bcm5719-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
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
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. |