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
This commit is contained in:
Nick Lewycky
2012-09-28 09:33:53 +00:00
parent 8bb12aeeb4
commit 7e0e166d17
2 changed files with 12 additions and 0 deletions

View File

@@ -930,6 +930,10 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
Value *V = Builder->CreateShuffleVector(TrueVal, FalseVal, MaskVal);
return ReplaceInstUsesWith(SI, V);
}
if (isa<ConstantAggregateZero>(CondVal)) {
return ReplaceInstUsesWith(SI, FalseVal);
}
}
return 0;