https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38592
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2017-08-15 00:00:00 |2020-11-11
--- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
For the C test case, we now get
yes:
.LFB0:
.cfi_startproc
movl $25977, %eax
movb $115, -1(%rsp)
movw %ax, -3(%rsp)
movzbl -2(%rsp), %eax
subl $101, %eax
jne .L1
movzbl -1(%rsp), %eax
subl $115, %eax
.L1:
ret
So, optimized further, but not folded.
clang 7 folds this completely:
yes: # @yes
.cfi_startproc
# %bb.0:
xorl %eax, %eax
retq
.Lfunc_end0: