[Bug tree-optimization/43965] Missed VRP and/or jump-threading
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Tue Jan 31 21:18:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43965
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |law at redhat dot com
Resolution|--- |FIXED
--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
Fixed by the combination of a variety of commits through the last few years.
Now we get:
movl 4(%esp), %eax
movl (%eax), %edx
movl 8(%esp), %eax
testl %edx, %edx
movl (%eax), %eax
je .L2
movl (%edx), %ecx
xorl %edx, %edx
testl %eax, %eax
je .L3
.L5:
movl (%eax), %edx
.L3:
movl %ecx, %eax
subl %edx, %eax
cmpl %ecx, %edx
movl $0, %edx
cmove %edx, %eax
ret
.p2align 4,,7
.p2align 3
.L2:
xorl %ecx, %ecx
testl %eax, %eax
jne .L5
ret
More information about the Gcc-bugs
mailing list