lib/raid6: use vdupq_n_u8 to avoid endianness warnings
authorndesaulniers@google.com <ndesaulniers@google.com>
Tue, 26 Feb 2019 04:03:42 +0000 (20:03 -0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 28 Feb 2019 17:44:51 +0000 (17:44 +0000)
commit1ad3935b39da78a403e7df7a3813f866c731bc64
tree4c0b6a742d68947162aea49171c4ece244ca43e8
parent2c97a9cc35a7a73a7580a8e2632419ff3c0b0fe5
lib/raid6: use vdupq_n_u8 to avoid endianness warnings

Clang warns: vector initializers are not compatible with NEON intrinsics
in big endian mode [-Wnonportable-vector-initialization]

While this is usually the case, it's not an issue for this case since
we're initializing the uint8x16_t (16x uint8_t's) with the same value.

Instead, use vdupq_n_u8 which both compilers lower into a single movi
instruction: https://godbolt.org/z/vBrgzt

This avoids the static storage for a constant value.

Link: https://github.com/ClangBuiltLinux/linux/issues/214
Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
lib/raid6/neon.uc
lib/raid6/recov_neon_inner.c