mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 19:32:16 +00:00
Fix AVX512 Gather and Scatter execution domains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204804 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0de31d52d5
commit
4de1039403
@ -3809,15 +3809,20 @@ let mayLoad = 1,
|
||||
" \t{$src2, ${dst} {${mask}}|${dst} {${mask}}, $src2}"),
|
||||
[]>, EVEX, EVEX_K;
|
||||
}
|
||||
|
||||
let ExeDomain = SSEPackedDouble in {
|
||||
defm VGATHERDPDZ : avx512_gather<0x92, "vgatherdpd", VK8WM, VR512, vy64xmem>,
|
||||
EVEX_V512, VEX_W, EVEX_CD8<64, CD8VT1>;
|
||||
defm VGATHERDPSZ : avx512_gather<0x92, "vgatherdps", VK16WM, VR512, vz32mem>,
|
||||
EVEX_V512, EVEX_CD8<32, CD8VT1>;
|
||||
|
||||
defm VGATHERQPDZ : avx512_gather<0x93, "vgatherqpd", VK8WM, VR512, vz64mem>,
|
||||
EVEX_V512, VEX_W, EVEX_CD8<64, CD8VT1>;
|
||||
}
|
||||
|
||||
let ExeDomain = SSEPackedSingle in {
|
||||
defm VGATHERDPSZ : avx512_gather<0x92, "vgatherdps", VK16WM, VR512, vz32mem>,
|
||||
EVEX_V512, EVEX_CD8<32, CD8VT1>;
|
||||
defm VGATHERQPSZ : avx512_gather<0x93, "vgatherqps", VK8WM, VR256X, vz64mem>,
|
||||
EVEX_V512, EVEX_CD8<32, CD8VT1>;
|
||||
}
|
||||
|
||||
defm VPGATHERDQZ : avx512_gather<0x90, "vpgatherdq", VK8WM, VR512, vy64xmem>,
|
||||
EVEX_V512, VEX_W, EVEX_CD8<64, CD8VT1>;
|
||||
@ -3839,16 +3844,20 @@ let mayStore = 1, Constraints = "$mask = $mask_wb" in
|
||||
[]>, EVEX, EVEX_K;
|
||||
}
|
||||
|
||||
let ExeDomain = SSEPackedDouble in {
|
||||
defm VSCATTERDPDZ : avx512_scatter<0xA2, "vscatterdpd", VK8WM, VR512, vy64xmem>,
|
||||
EVEX_V512, VEX_W, EVEX_CD8<64, CD8VT1>;
|
||||
defm VSCATTERDPSZ : avx512_scatter<0xA2, "vscatterdps", VK16WM, VR512, vz32mem>,
|
||||
EVEX_V512, EVEX_CD8<32, CD8VT1>;
|
||||
|
||||
defm VSCATTERQPDZ : avx512_scatter<0xA3, "vscatterqpd", VK8WM, VR512, vz64mem>,
|
||||
EVEX_V512, VEX_W, EVEX_CD8<64, CD8VT1>;
|
||||
}
|
||||
|
||||
let ExeDomain = SSEPackedSingle in {
|
||||
defm VSCATTERDPSZ : avx512_scatter<0xA2, "vscatterdps", VK16WM, VR512, vz32mem>,
|
||||
EVEX_V512, EVEX_CD8<32, CD8VT1>;
|
||||
defm VSCATTERQPSZ : avx512_scatter<0xA3, "vscatterqps", VK8WM, VR256X, vz64mem>,
|
||||
EVEX_V512, EVEX_CD8<32, CD8VT1>;
|
||||
|
||||
}
|
||||
|
||||
defm VPSCATTERDQZ : avx512_scatter<0xA0, "vpscatterdq", VK8WM, VR512, vy64xmem>,
|
||||
EVEX_V512, VEX_W, EVEX_CD8<64, CD8VT1>;
|
||||
defm VPSCATTERDDZ : avx512_scatter<0xA0, "vpscatterdd", VK16WM, VR512, vz32mem>,
|
||||
|
@ -223,3 +223,81 @@ define void @gather_qpi(<8 x i64> %ind, i8* %base, i8* %stbuf) {
|
||||
call void @llvm.x86.avx512.scatter.qpi.512 (i8* %stbuf, <8 x i64>%ind2, <8 x i32> %x, i32 4)
|
||||
ret void
|
||||
}
|
||||
|
||||
;CHECK-LABEL: gather_mask_dpd_execdomain
|
||||
;CHECK: vgatherdpd
|
||||
;CHECK: vmovapd
|
||||
;CHECK: ret
|
||||
define void @gather_mask_dpd_execdomain(<8 x i32> %ind, <8 x double> %src, i8 %mask, i8* %base, <8 x double>* %stbuf) {
|
||||
%x = call <8 x double> @llvm.x86.avx512.gather.dpd.mask.512 (<8 x double> %src, i8 %mask, <8 x i32>%ind, i8* %base, i32 4)
|
||||
store <8 x double> %x, <8 x double>* %stbuf
|
||||
ret void
|
||||
}
|
||||
|
||||
;CHECK-LABEL: gather_mask_qpd_execdomain
|
||||
;CHECK: vgatherqpd
|
||||
;CHECK: vmovapd
|
||||
;CHECK: ret
|
||||
define void @gather_mask_qpd_execdomain(<8 x i64> %ind, <8 x double> %src, i8 %mask, i8* %base, <8 x double>* %stbuf) {
|
||||
%x = call <8 x double> @llvm.x86.avx512.gather.qpd.mask.512 (<8 x double> %src, i8 %mask, <8 x i64>%ind, i8* %base, i32 4)
|
||||
store <8 x double> %x, <8 x double>* %stbuf
|
||||
ret void
|
||||
}
|
||||
|
||||
;CHECK-LABEL: gather_mask_dps_execdomain
|
||||
;CHECK: vgatherdps
|
||||
;CHECK: vmovaps
|
||||
;CHECK: ret
|
||||
define <16 x float> @gather_mask_dps_execdomain(<16 x i32> %ind, <16 x float> %src, i16 %mask, i8* %base) {
|
||||
%res = call <16 x float> @llvm.x86.avx512.gather.dps.mask.512 (<16 x float> %src, i16 %mask, <16 x i32>%ind, i8* %base, i32 4)
|
||||
ret <16 x float> %res;
|
||||
}
|
||||
|
||||
;CHECK-LABEL: gather_mask_qps_execdomain
|
||||
;CHECK: vgatherqps
|
||||
;CHECK: vmovaps
|
||||
;CHECK: ret
|
||||
define <8 x float> @gather_mask_qps_execdomain(<8 x i64> %ind, <8 x float> %src, i8 %mask, i8* %base) {
|
||||
%res = call <8 x float> @llvm.x86.avx512.gather.qps.mask.512 (<8 x float> %src, i8 %mask, <8 x i64>%ind, i8* %base, i32 4)
|
||||
ret <8 x float> %res;
|
||||
}
|
||||
|
||||
;CHECK-LABEL: scatter_mask_dpd_execdomain
|
||||
;CHECK: vmovapd
|
||||
;CHECK: vscatterdpd
|
||||
;CHECK: ret
|
||||
define void @scatter_mask_dpd_execdomain(<8 x i32> %ind, <8 x double>* %src, i8 %mask, i8* %base, i8* %stbuf) {
|
||||
%x = load <8 x double>* %src, align 64
|
||||
call void @llvm.x86.avx512.scatter.dpd.mask.512 (i8* %stbuf, i8 %mask, <8 x i32>%ind, <8 x double> %x, i32 4)
|
||||
ret void
|
||||
}
|
||||
|
||||
;CHECK-LABEL: scatter_mask_qpd_execdomain
|
||||
;CHECK: vmovapd
|
||||
;CHECK: vscatterqpd
|
||||
;CHECK: ret
|
||||
define void @scatter_mask_qpd_execdomain(<8 x i64> %ind, <8 x double>* %src, i8 %mask, i8* %base, i8* %stbuf) {
|
||||
%x = load <8 x double>* %src, align 64
|
||||
call void @llvm.x86.avx512.scatter.qpd.mask.512 (i8* %stbuf, i8 %mask, <8 x i64>%ind, <8 x double> %x, i32 4)
|
||||
ret void
|
||||
}
|
||||
|
||||
;CHECK-LABEL: scatter_mask_dps_execdomain
|
||||
;CHECK: vmovaps
|
||||
;CHECK: vscatterdps
|
||||
;CHECK: ret
|
||||
define void @scatter_mask_dps_execdomain(<16 x i32> %ind, <16 x float>* %src, i16 %mask, i8* %base, i8* %stbuf) {
|
||||
%x = load <16 x float>* %src, align 64
|
||||
call void @llvm.x86.avx512.scatter.dps.mask.512 (i8* %stbuf, i16 %mask, <16 x i32>%ind, <16 x float> %x, i32 4)
|
||||
ret void
|
||||
}
|
||||
|
||||
;CHECK-LABEL: scatter_mask_qps_execdomain
|
||||
;CHECK: vmovaps
|
||||
;CHECK: vscatterqps
|
||||
;CHECK: ret
|
||||
define void @scatter_mask_qps_execdomain(<8 x i64> %ind, <8 x float>* %src, i8 %mask, i8* %base, i8* %stbuf) {
|
||||
%x = load <8 x float>* %src, align 32
|
||||
call void @llvm.x86.avx512.scatter.qps.mask.512 (i8* %stbuf, i8 %mask, <8 x i64>%ind, <8 x float> %x, i32 4)
|
||||
ret void
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user