From 5dee3b25264c735e7b69fe8b41d43585d8202d9c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 20 Oct 2006 18:20:21 +0000 Subject: Fix miscompilation of MallocBench/espresso which code review pointed out but apparently didn't make it into the final patch. llvm-svn: 31070 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(Op0)) - if (CSI->isAllOnesValue()) + if (CSI->isAllOnesValue() && Op0->getType()->isSigned()) return ReplaceInstUsesWith(I, CSI); // Try to fold constant and into select arguments. -- cgit v1.2.3