diff options
author | Sanjay Patel <spatel@rotateright.com> | 2017-08-30 14:04:57 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2017-08-30 14:04:57 +0000 |
commit | 6f7ac7e4028e7b20ea54dc5beaf3bc7be6863a24 (patch) | |
tree | 356aa581be1b591d5a74042ad8c43deb1aeb2dae /llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp | |
parent | a8c34530df869ce48bb7f968c2ddb56735e35686 (diff) | |
download | bcm5719-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.cpp | 4 |
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 |