Skip to content
Commit 1ad3935b authored by ndesaulniers@google.com's avatar ndesaulniers@google.com Committed by Catalin Marinas
Browse files

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: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 2c97a9cc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment