[Bug target/105135] [11/12/13 Regression] Optimization regression for handrolled branchless assignment since r11-4717-g3e190757fa332d32
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 26 13:36:30 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105135
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Regarding Clang's code, the key part is not use of 8-bit operations, but setbe
(2 uops) vs. setb (1 uop):
cmpb $25, %cl
setbe %al
vs
cmpb $26, %al
setb %al
(note comparison against 25 or 26).
---
Regarding cmov being a lottery, unless you mean Pentium4, then not really, it's
just 1 or 2 uops, each latency 1 or 2. uops.info has very nice summaries:
https://uops.info/html-instr/CMOVB_R32_R32.html
https://uops.info/html-instr/CMOVBE_R32_R32.html
More information about the Gcc-bugs
mailing list