[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1-_KRvoeK4w0b8775izox8fRm=NGJC=yicDRn7J5UW2Q@mail.gmail.com>
Date: Fri, 31 May 2019 21:21:13 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Russell King <linux@...linux.org.uk>,
Nicolas Pitre <nico@...xnic.net>,
Stefan Agner <stefan@...er.ch>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] ARM: xor-neon: Replace __GNUC__ checks with CONFIG_CC_IS_GCC
On Fri, May 31, 2019 at 8:32 PM Nathan Chancellor
<natechancellor@...il.com> wrote:
>
> On Fri, May 31, 2019 at 10:05:22AM +0200, Arnd Bergmann wrote:
> > If I remember correctly, we also had the same issue with older versions
> > of clang, possibly even newer ones. Shouldn't we check for a minimum
> > compiler version when building with clang to ensure that the code is
> > really vectorized?
> >
> > Arnd
>
> Even on tip of tree, it doesn't look like vectorization happens
> properly. With -S -Rpass-missed='.*' added to the xor-neon.c command:
>
> /home/nathan/cbl/linux-next/include/asm-generic/xor.h:15:2: remark: the cost-model indicates that interleaving is not beneficial [-Rpass-missed=loop-vectorize]
> /home/nathan/cbl/linux-next/include/asm-generic/xor.h:11:1: remark: List vectorization was possible but not beneficial with cost 0 >= 0 [-Rpass-missed=slp-vectorizer]
> xor_8regs_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
> ^
>
> So right now, it doesn't look like there is a minimum version for clang
> and I don't think adding a warning for clang is productive (what is a
> user supposed to do?)
I see. If we don't have a vectorized version of the xor module with
clang, I would suggest dropping your patch then, and instead adding
a Kconfig dependency on CC_IS_GCC, until clang is able to do it right.
Arnd
Powered by blists - more mailing lists