Re: [PATCH] x86/crc32: improve crc32c_arch() code generation with clang
From: Eric Biggers
Date: Wed Feb 12 2025 - 15:10:31 EST
On Mon, Feb 10, 2025 at 01:07:41PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
>
> crc32c_arch() is affected by
> https://github.com/llvm/llvm-project/issues/20571 where clang
> unnecessarily spills the inputs to "rm"-constrained operands to the
> stack. Replace "rm" with ASM_INPUT_RM which partially works around this
> by expanding to "r" when the compiler is clang. This results in better
> code generation with clang, though still not optimal.
>
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
>
> This applies to
> https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next
Applied to crc-next.
- Eric