mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[AVX-512] Fix lowering for mask register concatenation with undef in the lower half.
Previously this test case fired an assertion in getNode because we tried to create an insert_subvector with both input types the same size and the index pointing to half the vector width. llvm-svn: 293446
This commit is contained in:
parent
a76ba55906
commit
f455f0ffda
@ -7791,7 +7791,7 @@ static SDValue LowerCONCAT_VECTORSvXi1(SDValue Op,
|
||||
|
||||
SDValue IdxVal = DAG.getIntPtrConstant(NumElems/2, dl);
|
||||
if (V1.isUndef())
|
||||
V2 = DAG.getNode(ISD::INSERT_SUBVECTOR, dl, ResVT, Undef, V2, IdxVal);
|
||||
return DAG.getNode(ISD::INSERT_SUBVECTOR, dl, ResVT, Undef, V2, IdxVal);
|
||||
|
||||
if (IsZeroV1)
|
||||
return DAG.getNode(ISD::INSERT_SUBVECTOR, dl, ResVT, ZeroVec, V2, IdxVal);
|
||||
|
@ -167,3 +167,15 @@ define <2 x i1> @test10(<4 x i1> %a, <4 x i1> %b) {
|
||||
%res = shufflevector <4 x i1> %a, <4 x i1> %b, <2 x i32> <i32 2, i32 3>
|
||||
ret <2 x i1> %res
|
||||
}
|
||||
|
||||
define <8 x i1> @test11(<4 x i1> %a, <4 x i1>%b) {
|
||||
; CHECK-LABEL: test11:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vpslld $31, %xmm0, %xmm0
|
||||
; CHECK-NEXT: vptestmd %xmm0, %xmm0, %k0
|
||||
; CHECK-NEXT: kshiftlb $4, %k0, %k0
|
||||
; CHECK-NEXT: vpmovm2w %k0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = shufflevector <4 x i1> %a, <4 x i1> undef, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 0, i32 1, i32 2, i32 3>
|
||||
ret <8 x i1> %res
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user