forked from OSchip/llvm-project
[AVX-512] Fix some patterns predicates to properly enforce priority for various versions of CVTDQ2PD instruction.
llvm-svn: 282358
This commit is contained in:
parent
3c9faa32c1
commit
60d3ef1d72
|
@ -2186,7 +2186,7 @@ def CVTDQ2PDrr : S2SI<0xE6, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||||
IIC_SSE_CVT_PD_RM>, Sched<[WriteCvtI2F]>;
|
IIC_SSE_CVT_PD_RM>, Sched<[WriteCvtI2F]>;
|
||||||
|
|
||||||
// AVX register conversion intrinsics
|
// AVX register conversion intrinsics
|
||||||
let Predicates = [HasAVX] in {
|
let Predicates = [HasAVX, NoVLX] in {
|
||||||
def : Pat<(v2f64 (X86cvtdq2pd (v4i32 VR128:$src))),
|
def : Pat<(v2f64 (X86cvtdq2pd (v4i32 VR128:$src))),
|
||||||
(VCVTDQ2PDrr VR128:$src)>;
|
(VCVTDQ2PDrr VR128:$src)>;
|
||||||
def : Pat<(v2f64 (X86cvtdq2pd (bc_v4i32 (loadv2i64 addr:$src)))),
|
def : Pat<(v2f64 (X86cvtdq2pd (bc_v4i32 (loadv2i64 addr:$src)))),
|
||||||
|
@ -2198,17 +2198,17 @@ let Predicates = [HasAVX] in {
|
||||||
(VCVTDQ2PDYrr VR128:$src)>;
|
(VCVTDQ2PDYrr VR128:$src)>;
|
||||||
def : Pat<(v4f64 (sint_to_fp (bc_v4i32 (loadv2i64 addr:$src)))),
|
def : Pat<(v4f64 (sint_to_fp (bc_v4i32 (loadv2i64 addr:$src)))),
|
||||||
(VCVTDQ2PDYrm addr:$src)>;
|
(VCVTDQ2PDYrm addr:$src)>;
|
||||||
} // Predicates = [HasAVX]
|
} // Predicates = [HasAVX, NoVLX]
|
||||||
|
|
||||||
// SSE2 register conversion intrinsics
|
// SSE2 register conversion intrinsics
|
||||||
let Predicates = [HasSSE2] in {
|
let Predicates = [UseSSE2] in {
|
||||||
def : Pat<(v2f64 (X86cvtdq2pd (v4i32 VR128:$src))),
|
def : Pat<(v2f64 (X86cvtdq2pd (v4i32 VR128:$src))),
|
||||||
(CVTDQ2PDrr VR128:$src)>;
|
(CVTDQ2PDrr VR128:$src)>;
|
||||||
def : Pat<(v2f64 (X86cvtdq2pd (bc_v4i32 (loadv2i64 addr:$src)))),
|
def : Pat<(v2f64 (X86cvtdq2pd (bc_v4i32 (loadv2i64 addr:$src)))),
|
||||||
(CVTDQ2PDrm addr:$src)>;
|
(CVTDQ2PDrm addr:$src)>;
|
||||||
def : Pat<(v2f64 (X86cvtdq2pd (bc_v4i32 (v2i64 (scalar_to_vector (loadi64 addr:$src)))))),
|
def : Pat<(v2f64 (X86cvtdq2pd (bc_v4i32 (v2i64 (scalar_to_vector (loadi64 addr:$src)))))),
|
||||||
(CVTDQ2PDrm addr:$src)>;
|
(CVTDQ2PDrm addr:$src)>;
|
||||||
} // Predicates = [HasSSE2]
|
} // Predicates = [UseSSE2]
|
||||||
|
|
||||||
// Convert packed double to packed single
|
// Convert packed double to packed single
|
||||||
// The assembler can recognize rr 256-bit instructions by seeing a ymm
|
// The assembler can recognize rr 256-bit instructions by seeing a ymm
|
||||||
|
|
|
@ -3210,7 +3210,7 @@ define <2 x double>@test_int_x86_avx512_mask_cvt_dq2pd_128(<4 x i32> %x0, <2 x d
|
||||||
; CHECK: ## BB#0:
|
; CHECK: ## BB#0:
|
||||||
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
||||||
; CHECK-NEXT: vcvtdq2pd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0xe6,0xc8]
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %xmm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x09,0xe6,0xc8]
|
||||||
; CHECK-NEXT: vcvtdq2pd %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0xe6,0xc0]
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7e,0x08,0xe6,0xc0]
|
||||||
; CHECK-NEXT: vaddpd %xmm0, %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xf5,0x08,0x58,0xc0]
|
; CHECK-NEXT: vaddpd %xmm0, %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xf5,0x08,0x58,0xc0]
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
%res = call <2 x double> @llvm.x86.avx512.mask.cvtdq2pd.128(<4 x i32> %x0, <2 x double> %x1, i8 %x2)
|
%res = call <2 x double> @llvm.x86.avx512.mask.cvtdq2pd.128(<4 x i32> %x0, <2 x double> %x1, i8 %x2)
|
||||||
|
@ -3226,7 +3226,7 @@ define <4 x double>@test_int_x86_avx512_mask_cvt_dq2pd_256(<4 x i32> %x0, <4 x d
|
||||||
; CHECK: ## BB#0:
|
; CHECK: ## BB#0:
|
||||||
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
; CHECK-NEXT: kmovw %edi, %k1 ## encoding: [0xc5,0xf8,0x92,0xcf]
|
||||||
; CHECK-NEXT: vcvtdq2pd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0xe6,0xc8]
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %ymm1 {%k1} ## encoding: [0x62,0xf1,0x7e,0x29,0xe6,0xc8]
|
||||||
; CHECK-NEXT: vcvtdq2pd %xmm0, %ymm0 ## encoding: [0xc5,0xfe,0xe6,0xc0]
|
; CHECK-NEXT: vcvtdq2pd %xmm0, %ymm0 ## encoding: [0x62,0xf1,0x7e,0x28,0xe6,0xc0]
|
||||||
; CHECK-NEXT: vaddpd %ymm0, %ymm1, %ymm0 ## encoding: [0x62,0xf1,0xf5,0x28,0x58,0xc0]
|
; CHECK-NEXT: vaddpd %ymm0, %ymm1, %ymm0 ## encoding: [0x62,0xf1,0xf5,0x28,0x58,0xc0]
|
||||||
; CHECK-NEXT: retq ## encoding: [0xc3]
|
; CHECK-NEXT: retq ## encoding: [0xc3]
|
||||||
%res = call <4 x double> @llvm.x86.avx512.mask.cvtdq2pd.256(<4 x i32> %x0, <4 x double> %x1, i8 %x2)
|
%res = call <4 x double> @llvm.x86.avx512.mask.cvtdq2pd.256(<4 x i32> %x0, <4 x double> %x1, i8 %x2)
|
||||||
|
|
Loading…
Reference in New Issue