From 7e0e166d1783671e555eff26b9932012fadea691 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 28 Sep 2012 09:33:53 +0000 Subject: Surprisingly, we missed a trivial case here. Fix that! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164814 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineSelect.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Transforms') diff --git a/lib/Transforms/InstCombine/InstCombineSelect.cpp b/lib/Transforms/InstCombine/InstCombineSelect.cpp index 70483ceb06..0ba7340e64 100644 --- a/lib/Transforms/InstCombine/InstCombineSelect.cpp +++ b/lib/Transforms/InstCombine/InstCombineSelect.cpp @@ -930,6 +930,10 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) { Value *V = Builder->CreateShuffleVector(TrueVal, FalseVal, MaskVal); return ReplaceInstUsesWith(SI, V); } + + if (isa(CondVal)) { + return ReplaceInstUsesWith(SI, FalseVal); + } } return 0; -- cgit v1.2.3-70-g09d2