https://bugs.llvm.org/show_bug.cgi?id=47572
Bug ID: 47572
Summary: Better codegen for AVX512 scatter
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
#include <immintrin.h>
void sct(int *data) {
_mm512_mask_i32scatter_epi32(data - 1, 0xffff, _mm512_set1_epi32(1),
_mm512_set1_epi32(1), 1);
}
-O3 -march=skylake-avx512
Clang:
.LCPI0_0:
.long 1 # 0x1
sct(int*): # @sct(int*)
add rdi, -4
kxnorw k1, k0, k0
vpbroadcastd zmm0, dword ptr [rip + .LCPI0_0] # zmm0 =
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
vpscatterdd zmmword ptr [rdi + zmm0] {k1}, zmm0
vzeroupper
ret
ICC:
sct(int*):
vmovups zmm0, ZMMWORD PTR .L_2il0floatpacket.0[rip] #3.3
vpcmpeqb k1, xmm0, xmm0 #3.3
vpscatterdd DWORD PTR [-4+rdi+zmm0]{k1}, zmm0 #3.3
vzeroupper #4.1
ret #4.1
.L_2il0floatpacket.0:
.long
0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001
https://godbolt.org/z/xKbePG
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs