Re: [PATCH] word-at-a-time: use the same return type for has_zero regardless of endianness

From: Heiko Carstens
Date: Wed Aug 02 2023 - 03:53:40 EST


On Wed, Aug 02, 2023 at 07:59:48AM +0200, Arnd Bergmann wrote:
> On Wed, Aug 2, 2023, at 03:07, Linus Torvalds wrote:
> > On Tue, 1 Aug 2023 at 15:22, <ndesaulniers@xxxxxxxxxx> wrote:
>
> > Who ends up being affected by this? Powerpc does its own
> > word-at-a-time thing because the big-endian case is nasty and you can
> > do better with special instructions that they have.
>
> powerpc needs the same patch though.
>
> > Who else is even BE any more? Some old 32-bit arm setup?
> >
> > I think the patch is fine, but I guess I'd like to know that people
> > who are affected actually don't see any code generation changes (or
> > possibly see improvements from not turning it into a bool until later)
>
> s390 is the main one here, maintainers added to Cc.

The generated code on s390 is identical with and without the patch
using gcc 13.2.
So this looks fine from my point of view.