https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118012
--- Comment #32 from Drea Pinski <pinskia at gcc dot gnu.org> --- (In reply to Siddhesh Poyarekar from comment #30) > 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: This one looks like a x86 specific, please if it separately. > > 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
