Skip to content

Commit 48d51a1

Browse files
hhoffstaetteWayneD
authored andcommitted
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>
1 parent f654e47 commit 48d51a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simd-checksum-x86_64.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
#endif
6969

7070
// Missing from the headers on gcc 6 and older, clang 8 and older
71-
typedef long long __m128i_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(1)));
72-
typedef long long __m256i_u __attribute__((__vector_size__(32), __may_alias__, __aligned__(1)));
71+
typedef long long __m128i_u __attribute__((__vector_size__(16), __may_alias__, __aligned__(16)));
72+
typedef long long __m256i_u __attribute__((__vector_size__(32), __may_alias__, __aligned__(16)));
7373

7474
/* Compatibility macros to let our SSSE3 algorithm run with only SSE2.
7575
These used to be neat individual functions with target attributes switching between SSE2 and SSSE3 implementations

0 commit comments

Comments
 (0)