commit | 7e0e166d1783671e555eff26b9932012fadea691 | [log] [tgz] |
---|---|---|
author | Nick Lewycky <nicholas@mxc.ca> | Fri Sep 28 09:33:53 2012 +0000 |
committer | Nick Lewycky <nicholas@mxc.ca> | Fri Sep 28 09:33:53 2012 +0000 |
tree | 7be7078bad57bde7d4b8c9044f0bf35aa75ad074 | |
parent | 8bb12aeeb4f38f62f2d97618d0c688f47c9bd972 [diff] [blame] |
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
diff --git a/lib/Transforms/InstCombine/InstCombineSelect.cpp b/lib/Transforms/InstCombine/InstCombineSelect.cpp index 70483ce..0ba7340 100644 --- a/lib/Transforms/InstCombine/InstCombineSelect.cpp +++ b/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -930,6 +930,10 @@ Value *V = Builder->CreateShuffleVector(TrueVal, FalseVal, MaskVal); return ReplaceInstUsesWith(SI, V); } + + if (isa<ConstantAggregateZero>(CondVal)) { + return ReplaceInstUsesWith(SI, FalseVal); + } } return 0;