From 6f7ac7e4028e7b20ea54dc5beaf3bc7be6863a24 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Wed, 30 Aug 2017 14:04:57 +0000 Subject: [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 --- llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'llvm/lib/Transforms/InstCombine') 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(CondVal)) { - return replaceInstUsesWith(SI, FalseVal); - } } // See if we can determine the result of this select based on a dominating -- cgit v1.2.3