https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10945
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |7.0
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
simple2.c and revised2.c produce the same code for a while now:
x:
movl 12(%esp), %edx
movl 8(%esp), %eax
xorl %edx, %eax
andl 4(%esp), %eax
xorl %edx, %eax
ret
y:
movl 12(%esp), %edx
movl 8(%esp), %eax
xorl %edx, %eax
andl 4(%esp), %eax
xorl %edx, %eax
ret
.cfi_endproc
---- CUT ----
as for simple.c and revised.c:
f:
.LFB0:
.cfi_startproc
movl 8(%esp), %edx
movl 12(%esp), %ecx
movl %edx, %eax
andl %ecx, %edx
orl %ecx, %eax
andl 4(%esp), %eax
orl %edx, %eax
ret
g:
movl 4(%esp), %edx
movl 8(%esp), %ecx
movl %edx, %eax
andl %ecx, %edx
orl %ecx, %eax
andl 12(%esp), %eax
orl %edx, %eax
ret
I am going to close it as fixed for GCC 7 (even though it has been fixed maybe
long before that).