diff options
| author | Suyog Sarda <suyog.sarda@samsung.com> | 2014-07-17 06:28:15 +0000 |
|---|---|---|
| committer | Suyog Sarda <suyog.sarda@samsung.com> | 2014-07-17 06:28:15 +0000 |
| commit | 68862414b5f4849333bb1a2141729bb3ab5e6f43 (patch) | |
| tree | 05dc8d3c8b7b09e15d8e7e878bf82c00d293fe64 /llvm/lib/Transforms/InstCombine | |
| parent | ac6e39cf3bee83b7e6a258befe2e3b188801bfe3 (diff) | |
| download | bcm5719-llvm-68862414b5f4849333bb1a2141729bb3ab5e6f43.tar.gz bcm5719-llvm-68862414b5f4849333bb1a2141729bb3ab5e6f43.zip | |
Move ashr optimization from InstCombineShift to InstSimplify.
Refactor code, no functionality change, test case moved from instcombine to instsimplify.
Differential Revision: http://reviews.llvm.org/D4102
llvm-svn: 213231
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp index 2495747da5f..2f91c204dbd 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp @@ -815,10 +815,5 @@ Instruction *InstCombiner::visitAShr(BinaryOperator &I) { APInt::getSignBit(I.getType()->getScalarSizeInBits()))) return BinaryOperator::CreateLShr(Op0, Op1); - // Arithmetic shifting an all-sign-bit value is a no-op. - unsigned NumSignBits = ComputeNumSignBits(Op0); - if (NumSignBits == Op0->getType()->getScalarSizeInBits()) - return ReplaceInstUsesWith(I, Op0); - return nullptr; } |

