Fix __m128i_u / __m256i_u alignment

Building with clang-16 complains with:
./simd-checksum-x86_64.cpp:204:25: warning: passing 1-byte aligned argument to
  16-byte aligned parameter 1 of '_mm_store_si128' may result in an unaligned pointer
  access [-Walign-mismatch]

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
This commit is contained in:
Holger Hoffstätte
2023-09-04 14:00:20 +02:00
committed by Wayne Davison
parent f654e47691
commit 48d51a1370

View File

@@ -68,8 +68,8 @@
#endif
// Missing from the headers on gcc 6 and older, clang 8 and older
typedef long long __m128i_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(1)));
typedef long long __m256i_u __attribute__((__vector_size__(32), __may_alias__, __aligned__(1)));
typedef long long __m128i_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(16)));
typedef long long __m256i_u __attribute__((__vector_size__(32), __may_alias__, __aligned__(16)));
/* Compatibility macros to let our SSSE3 algorithm run with only SSE2.
These used to be neat individual functions with target attributes switching between SSE2 and SSSE3 implementations