summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-08-30 14:04:57 +0000
committerSanjay Patel <spatel@rotateright.com>2017-08-30 14:04:57 +0000
commit6f7ac7e4028e7b20ea54dc5beaf3bc7be6863a24 (patch)
tree356aa581be1b591d5a74042ad8c43deb1aeb2dae /llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
parenta8c34530df869ce48bb7f968c2ddb56735e35686 (diff)
downloadbcm5719-llvm-6f7ac7e4028e7b20ea54dc5beaf3bc7be6863a24.tar.gz
bcm5719-llvm-6f7ac7e4028e7b20ea54dc5beaf3bc7be6863a24.zip
[InstCombine] remove unnecessary vector select fold; NFCI
This code is double-dead: 1. We simplify all selects with constant true/false condition in InstSimplify. I've minimized/moved the tests to show that works as expected. 2. All remaining vector selects with a constant condition are canonicalized to shufflevector, so we really can't see this pattern. llvm-svn: 312123
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index c43dad53704..11602ab101e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -1566,10 +1566,6 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
return replaceInstUsesWith(SI, V);
return &SI;
}
-
- if (isa<ConstantAggregateZero>(CondVal)) {
- return replaceInstUsesWith(SI, FalseVal);
- }
}
// See if we can determine the result of this select based on a dominating
OpenPOWER on IntegriCloud