forked from OSchip/llvm-project
[X86][AVX] Add extra vperm2f128+vpermilvar combine coverage
The existing test /should/ reduce to a vmovaps (concat xmm with zero upper).
This commit is contained in:
parent
9ad261540d
commit
aa3fcb9671
|
@ -142,8 +142,19 @@ define <8 x float> @combine_vpermilvar_vperm2f128_zero_8f32(<8 x float> %a0) {
|
|||
ret <8 x float> %3
|
||||
}
|
||||
|
||||
define <4 x double> @combine_vperm2f128_vpermilvar_as_vpblendpd(<4 x double> %a0) {
|
||||
; CHECK-LABEL: combine_vperm2f128_vpermilvar_as_vpblendpd:
|
||||
define <4 x double> @combine_vperm2f128_vpermilvar_as_vperm2f128(<4 x double> %a0) {
|
||||
; CHECK-LABEL: combine_vperm2f128_vpermilvar_as_vperm2f128:
|
||||
; CHECK: # %bb.0:
|
||||
; CHECK-NEXT: vperm2f128 {{.*#+}} ymm0 = zero,zero,ymm0[0,1]
|
||||
; CHECK-NEXT: ret{{[l|q]}}
|
||||
%1 = tail call <4 x double> @llvm.x86.avx.vpermilvar.pd.256(<4 x double> %a0, <4 x i64> <i64 2, i64 0, i64 2, i64 0>)
|
||||
%2 = shufflevector <4 x double> %1, <4 x double> zeroinitializer, <4 x i32> <i32 4, i32 5, i32 0, i32 1>
|
||||
%3 = tail call <4 x double> @llvm.x86.avx.vpermilvar.pd.256(<4 x double> %2, <4 x i64> <i64 2, i64 0, i64 2, i64 0>)
|
||||
ret <4 x double> %3
|
||||
}
|
||||
|
||||
define <4 x double> @combine_vperm2f128_vpermilvar_as_vmovaps(<4 x double> %a0) {
|
||||
; CHECK-LABEL: combine_vperm2f128_vpermilvar_as_vmovaps:
|
||||
; CHECK: # %bb.0:
|
||||
; CHECK-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
|
||||
; CHECK-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2]
|
||||
|
|
Loading…
Reference in New Issue