[Bug target/92492] [AVX512F] Icc generate much better code for loop vectorization
crazylht at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 13 08:53:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92492
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
Much more simple case, exclude disturb of point alias and unknown loop count
cat test.c:
typedef unsigned char uint8_t;
static inline uint8_t x264_clip_uint8( int x )
{
return x&(~63) ? (-x)>>7 : x;
}
void mc_weight( uint8_t *__restrict dst, uint8_t *__restrict src)
{
for( int x = 0; x < 16; x++ )
dst[x] = x264_clip_uint8(src[x]);
}
Refer to https://godbolt.org/z/YJXWRD
Gcc failed to vectorize loop, icc succeed.
More information about the Gcc-bugs
mailing list