diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-11-08 06:47:33 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-11-08 06:47:33 +0000 |
| commit | fdff938a7e4988da80be038acb1c6717d61b531a (patch) | |
| tree | 2270b132b8a1fe22f63b56653ebf71dac480ad84 /llvm/lib/Transforms/Utils | |
| parent | 41f6c7cfb24169288c69d0dc5abf5518c142b76e (diff) | |
| download | bcm5719-llvm-fdff938a7e4988da80be038acb1c6717d61b531a.tar.gz bcm5719-llvm-fdff938a7e4988da80be038acb1c6717d61b531a.zip | |
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
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
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); diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index de9f8ecfa1a..78f5941b7a1 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -368,7 +368,8 @@ static bool DominatesMergePoint(Value *V, BasicBlock *BB, case Instruction::Or: case Instruction::Xor: case Instruction::Shl: - case Instruction::Shr: + case Instruction::LShr: + case Instruction::AShr: case Instruction::SetEQ: case Instruction::SetNE: case Instruction::SetLT: |

