https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118012
Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |siddhesh at gcc dot gnu.org
--- Comment #30 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
We noticed a slowdown in coremark (to the tune of 5-8%) on AMD zenv1 and zenv4
with zenv1 being worse hit due to r13-4459. The main issue seems to be
instruction throughput:
movl %eax, %edi
xorw $024575, %di
andl $1, %r8d
cmovne %edi, %eax
vs
andl $1, %edx
negl %edx
andw $024575, %dx
xorl %edx, %eax
The above AMD cores appear to like the former more. This is on gcc13 though,
newer compilers produce different code here, which likely makes this specific
test irrelevant. However I thought this may be a useful insight to share
anyway as a datapoint on striaghtline sequences vs cmovs even in the context of
x86 where the straightline code ends up being serialized, potentially reducing
overall throughput.
[1] https://github.com/eembc/coremark/blob/v1.01/core_util.c