summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorSuyog Sarda <suyog.sarda@samsung.com>2014-07-17 06:28:15 +0000
committerSuyog Sarda <suyog.sarda@samsung.com>2014-07-17 06:28:15 +0000
commit68862414b5f4849333bb1a2141729bb3ab5e6f43 (patch)
tree05dc8d3c8b7b09e15d8e7e878bf82c00d293fe64 /llvm/lib/Transforms/InstCombine
parentac6e39cf3bee83b7e6a258befe2e3b188801bfe3 (diff)
downloadbcm5719-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.cpp5
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;
}
OpenPOWER on IntegriCloud