lkml.org 
[lkml]   [2019]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] lib/raid6: use vdupq_n_u8 to avoid endianness warnings
    On Mon, Feb 25, 2019 at 08:03:42PM -0800, ndesaulniers@google.com wrote:
    > 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>
    > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
    > ---
    > lib/raid6/neon.uc | 5 ++---
    > lib/raid6/recov_neon_inner.c | 7 ++-----
    > 2 files changed, 4 insertions(+), 8 deletions(-)

    Queued for 5.1. Thanks.

    --
    Catalin

    \
     
     \ /
      Last update: 2019-02-28 18:48    [W:4.969 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site