[llvm-bugs] [Bug 47572] New: Better codegen for AVX512 scatter
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 17 23:59:12 PDT 2020
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: unassignedbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
#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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200918/513c22f0/attachment.html>
More information about the llvm-bugs
mailing list