https://bugs.llvm.org/show_bug.cgi?id=49933
Bug ID: 49933
Summary: Missed SLP vectorization
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
typedef unsigned char uint8_t;
static inline uint8_t bar( uint8_t x )
{
return x&(~63) ? -x : x;
}
void foo( uint8_t *__restrict dst, uint8_t *__restrict src)
{
for( int x = 0; x < 8; x++ )
dst[x] = bar(src[x]);
}
ICC:
foo(unsigned char*, unsigned char*):
vpmovzxbd ymm2, QWORD PTR [rsi] #5.25
vpand ymm0, ymm2, YMMWORD PTR .L_2il0floatpacket.0[rip] #5.12
vpxor ymm1, ymm1, ymm1 #5.25
vptestmd k1, ymm0, ymm0 #5.12
vpsubd ymm2{k1}, ymm1, ymm2 #5.25
vpmovdb QWORD PTR [rdi], ymm2 #13.6
vzeroupper #14.1
ret
LLVM does not vectorize it with avx/avx2/avx512 - cost model issue?
https://godbolt.org/z/Kheeec4cG
--
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