forked from OSchip/llvm-project
[X86][AVX512DQVL] Add awareness of vcvtqq2ps and vcvtuqq2ps implicit zeroing of upper 64-bits of xmm result
llvm-svn: 287878
This commit is contained in:
parent
ab323ec411
commit
7c26a6f9ef
|
@ -6569,6 +6569,17 @@ let Predicates = [HasAVX512] in {
|
|||
(VCVTPS2PDZrm addr:$src)>;
|
||||
}
|
||||
|
||||
let Predicates = [HasDQI, HasVLX] in {
|
||||
let AddedComplexity = 15 in {
|
||||
def : Pat<(X86vzmovl (v2f64 (bitconvert
|
||||
(v4f32 (X86VSintToFP (v2i64 VR128X:$src)))))),
|
||||
(VCVTQQ2PSZ128rr VR128:$src)>;
|
||||
def : Pat<(X86vzmovl (v2f64 (bitconvert
|
||||
(v4f32 (X86VUintToFP (v2i64 VR128X:$src)))))),
|
||||
(VCVTUQQ2PSZ128rr VR128:$src)>;
|
||||
}
|
||||
}
|
||||
|
||||
let Predicates = [HasDQI, NoVLX] in {
|
||||
def : Pat<(v4i64 (fp_to_sint (v4f32 VR128X:$src1))),
|
||||
(EXTRACT_SUBREG (v8i64 (VCVTTPS2QQZrr
|
||||
|
|
|
@ -183,8 +183,6 @@ define <4 x float>@test_int_x86_avx512_mask_cvt_qq2ps_128_zext(<2 x i64> %x0, <4
|
|||
; CHECK-NEXT: kmovb %edi, %k1 ## encoding: [0xc5,0xf9,0x92,0xcf]
|
||||
; CHECK-NEXT: vcvtqq2ps %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0xfc,0x09,0x5b,0xc8]
|
||||
; CHECK-NEXT: vcvtqq2ps %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfc,0x08,0x5b,0xc0]
|
||||
; CHECK-NEXT: vmovq %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfe,0x08,0x7e,0xc0]
|
||||
; CHECK-NEXT: ## xmm0 = xmm0[0],zero
|
||||
; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 ## encoding: [0x62,0xf1,0x74,0x08,0x58,0xc0]
|
||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||
%res = call <4 x float> @llvm.x86.avx512.mask.cvtqq2ps.128(<2 x i64> %x0, <4 x float> %x1, i8 %x2)
|
||||
|
@ -360,8 +358,6 @@ define <4 x float>@test_int_x86_avx512_mask_cvt_uqq2ps_128_zext(<2 x i64> %x0, <
|
|||
; CHECK-NEXT: kmovb %edi, %k1 ## encoding: [0xc5,0xf9,0x92,0xcf]
|
||||
; CHECK-NEXT: vcvtuqq2ps %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0xff,0x09,0x7a,0xc8]
|
||||
; CHECK-NEXT: vcvtuqq2ps %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xff,0x08,0x7a,0xc0]
|
||||
; CHECK-NEXT: vmovq %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfe,0x08,0x7e,0xc0]
|
||||
; CHECK-NEXT: ## xmm0 = xmm0[0],zero
|
||||
; CHECK-NEXT: vaddps %xmm0, %xmm1, %xmm0 ## encoding: [0x62,0xf1,0x74,0x08,0x58,0xc0]
|
||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||
%res = call <4 x float> @llvm.x86.avx512.mask.cvtuqq2ps.128(<2 x i64> %x0, <4 x float> %x1, i8 %x2)
|
||||
|
|
|
@ -1182,7 +1182,6 @@ define <4 x float> @sitofp_2i64_to_4f32_zero(<2 x i64> %a) {
|
|||
; AVX512VLDQ-LABEL: sitofp_2i64_to_4f32_zero:
|
||||
; AVX512VLDQ: # BB#0:
|
||||
; AVX512VLDQ-NEXT: vcvtqq2ps %xmm0, %xmm0
|
||||
; AVX512VLDQ-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
|
||||
; AVX512VLDQ-NEXT: retq
|
||||
%cvt = sitofp <2 x i64> %a to <2 x float>
|
||||
%ext = shufflevector <2 x float> %cvt, <2 x float> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
|
||||
|
@ -1847,7 +1846,6 @@ define <4 x float> @uitofp_2i64_to_2f32(<2 x i64> %a) {
|
|||
; AVX512VLDQ-LABEL: uitofp_2i64_to_2f32:
|
||||
; AVX512VLDQ: # BB#0:
|
||||
; AVX512VLDQ-NEXT: vcvtuqq2ps %xmm0, %xmm0
|
||||
; AVX512VLDQ-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
|
||||
; AVX512VLDQ-NEXT: retq
|
||||
%cvt = uitofp <2 x i64> %a to <2 x float>
|
||||
%ext = shufflevector <2 x float> %cvt, <2 x float> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
|
||||
|
|
Loading…
Reference in New Issue