From 3822ff5c71478c7c90a50ca57045fb676fcb5005 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/Local.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Transforms/Utils/Local.cpp') diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 28864fd613..1e032a3bd0 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/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-18-g5258