From: Holger Hoffstätte Date: Mon, 4 Sep 2023 12:00:20 +0000 (+0200) Subject: Fix __m128i_u / __m256i_u alignment X-Git-Tag: v3.4.0~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48d51a1370f0facb54fa80864077fd7d769cb03d;p=thirdparty%2Frsync.git 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 --- diff --git a/simd-checksum-x86_64.cpp b/simd-checksum-x86_64.cpp index 33f26e92..d649091e 100644 --- a/simd-checksum-x86_64.cpp +++ b/simd-checksum-x86_64.cpp @@ -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