[Bug target/93002] while(i--) optimization
getchar_gnu at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 19 18:03:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93002
--- Comment #7 from getchar_gnu at hotmail dot com ---
Actually for `while (i--) sink=i;` with knowledge that `i!=0` it's valid to
compile as
.L11:
subl $1, %edi
movl %edi, sink(%rip)
jne .L11
ret
which can be made with c code `while(sink=--i);` (leaving different resulting
i)
More information about the Gcc-bugs
mailing list