mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 20:59:51 +00:00
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:
parent
8bb12aeeb4
commit
7e0e166d17
@ -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;
|
||||
|
@ -188,3 +188,11 @@ define <4 x i16> @test13d(<4 x i16> %lhs, <4 x i16> %rhs) {
|
||||
<4 x i16> %lhs, <4 x i16> %rhs
|
||||
ret <4 x i16> %A
|
||||
}
|
||||
|
||||
define <4 x i16> @test13e(<4 x i16> %lhs, <4 x i16> %rhs) {
|
||||
; CHECK: @test13e
|
||||
; CHECK-NEXT: ret <4 x i16> %rhs
|
||||
%A = select <4 x i1> <i1 false, i1 false, i1 false, i1 false>,
|
||||
<4 x i16> %lhs, <4 x i16> %rhs
|
||||
ret <4 x i16> %A
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user