https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97968
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[11 Regression] Unnecessary |[12 Regression] Unnecessary |mov instruction with |mov instruction with |comparison and cmov |comparison and cmov Target Milestone|11.5 |12.5 Known to fail| |11.5.0, 12.4.0 --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC 11.5 produces f: .LFB0: .cfi_startproc xorl %edx, %edx movl %edi, %eax cmpl %esi, %edi cmovle %edx, %eax ret likewise GCC 12. GCC 13 produces f: .LFB0: .cfi_startproc xorl %eax, %eax cmpl %esi, %edi cmovg %edi, %eax ret