forked from OSchip/llvm-project
[X86][AVX512F] Add support for uint_to_fp v2i32 to v2f64 on AVX512F-only targets
Use 512-bit instructions (we already do something similar for uint_to_fp v4i32 to v4f64) llvm-svn: 287491
This commit is contained in:
parent
f2fbf43704
commit
096b6d4f81
|
@ -1203,6 +1203,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
|||
setOperationAction(ISD::UINT_TO_FP, MVT::v16i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v8i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v4i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v2i32, Custom);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v16i8, Custom);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v16i16, Custom);
|
||||
setOperationAction(ISD::SINT_TO_FP, MVT::v16i1, Custom);
|
||||
|
@ -1270,7 +1271,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
|||
setOperationAction(ISD::FP_TO_UINT, MVT::v8i32, Legal);
|
||||
setOperationAction(ISD::SINT_TO_FP, MVT::v4i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v4i32, Legal);
|
||||
setOperationAction(ISD::UINT_TO_FP, MVT::v2i32, Custom);
|
||||
setOperationAction(ISD::FP_TO_SINT, MVT::v4i32, Legal);
|
||||
setOperationAction(ISD::FP_TO_UINT, MVT::v4i32, Legal);
|
||||
setOperationAction(ISD::ZERO_EXTEND, MVT::v4i32, Custom);
|
||||
|
|
|
@ -6547,6 +6547,11 @@ def : Pat<(v4f64 (uint_to_fp (v4i32 VR128X:$src1))),
|
|||
(EXTRACT_SUBREG (v8f64 (VCVTUDQ2PDZrr
|
||||
(v8i32 (INSERT_SUBREG (IMPLICIT_DEF),
|
||||
VR128X:$src1, sub_xmm)))), sub_ymm)>;
|
||||
|
||||
def : Pat<(v2f64 (X86cvtudq2pd (v4i32 VR128X:$src1))),
|
||||
(EXTRACT_SUBREG (v8f64 (VCVTUDQ2PDZrr
|
||||
(v8i32 (INSERT_SUBREG (IMPLICIT_DEF),
|
||||
VR128X:$src1, sub_xmm)))), sub_xmm)>;
|
||||
}
|
||||
|
||||
let Predicates = [HasAVX512, HasVLX] in {
|
||||
|
|
|
@ -481,12 +481,9 @@ define <2 x double> @uitofp_2i32_to_2f64(<4 x i32> %a) {
|
|||
;
|
||||
; AVX512F-LABEL: uitofp_2i32_to_2f64:
|
||||
; AVX512F: # BB#0:
|
||||
; AVX512F-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
|
||||
; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
|
||||
; AVX512F-NEXT: vcvtusi2sdq %rax, %xmm1, %xmm1
|
||||
; AVX512F-NEXT: vmovq %xmm0, %rax
|
||||
; AVX512F-NEXT: vcvtusi2sdq %rax, %xmm2, %xmm0
|
||||
; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||||
; AVX512F-NEXT: # kill: %XMM0<def> %XMM0<kill> %YMM0<def>
|
||||
; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
|
||||
; AVX512F-NEXT: # kill: %XMM0<def> %XMM0<kill> %ZMM0<kill>
|
||||
; AVX512F-NEXT: retq
|
||||
;
|
||||
; AVX512VL-LABEL: uitofp_2i32_to_2f64:
|
||||
|
@ -2528,12 +2525,9 @@ define <2 x double> @uitofp_load_2i32_to_2f64(<2 x i32> *%a) {
|
|||
;
|
||||
; AVX512F-LABEL: uitofp_load_2i32_to_2f64:
|
||||
; AVX512F: # BB#0:
|
||||
; AVX512F-NEXT: vpmovzxdq {{.*#+}} xmm0 = mem[0],zero,mem[1],zero
|
||||
; AVX512F-NEXT: vpextrq $1, %xmm0, %rax
|
||||
; AVX512F-NEXT: vcvtusi2sdq %rax, %xmm1, %xmm1
|
||||
; AVX512F-NEXT: vmovq %xmm0, %rax
|
||||
; AVX512F-NEXT: vcvtusi2sdq %rax, %xmm2, %xmm0
|
||||
; AVX512F-NEXT: vunpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||||
; AVX512F-NEXT: vmovq {{.*#+}} xmm0 = mem[0],zero
|
||||
; AVX512F-NEXT: vcvtudq2pd %ymm0, %zmm0
|
||||
; AVX512F-NEXT: # kill: %XMM0<def> %XMM0<kill> %ZMM0<kill>
|
||||
; AVX512F-NEXT: retq
|
||||
;
|
||||
; AVX512VL-LABEL: uitofp_load_2i32_to_2f64:
|
||||
|
|
Loading…
Reference in New Issue