]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/crc32: improve crc32c_arch() code generation with clang
authorEric Biggers <ebiggers@google.com>
Mon, 10 Feb 2025 21:07:41 +0000 (13:07 -0800)
committerEric Biggers <ebiggers@google.com>
Wed, 12 Feb 2025 20:08:56 +0000 (12:08 -0800)
commitcf1ea3a7c1f63cba7d1dd313ee3accde0c0c8988
treeb2e673e8e0f67ece26cf5d2078dfaff3869f32ed
parent4ffd50862d41e5aaf2e749efa354afaa1317c309
x86/crc32: improve crc32c_arch() code generation with clang

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.

Link: https://lore.kernel.org/r/20250210210741.471725-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
arch/x86/lib/crc32-glue.c