From fdff938a7e4988da80be038acb1c6717d61b531a Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 8 Nov 2006 06:47:33 +0000 Subject: For PR950: This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542 --- llvm/lib/Transforms/Utils/Local.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/Local.cpp') diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 28864fd613a..1e032a3bd0b 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -120,7 +120,8 @@ Constant *llvm::ConstantFoldInstOperands(unsigned Opc, const Type *DestTy, } return 0; case Instruction::Shl: - case Instruction::Shr: + case Instruction::LShr: + case Instruction::AShr: return ConstantExpr::get(Opc, Ops[0], Ops[1]); case Instruction::Cast: return ConstantExpr::getCast(Ops[0], DestTy); -- cgit v1.2.3