[Bug tree-optimization/42046] missed optimization (a?b|1:b&~1) where b is a load from memory
bruck.michael at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 23 21:47:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42046
Michael Bruck <bruck.michael at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Michael Bruck <bruck.michael at googlemail dot com> ---
5.2.1 with -Ofast produces
ldr r2, .L5
ldr r3, [r2]
cmp r0, #0
orrne r3, r3, #1
biceq r3, r3, #1
str r3, [r2]
bx lr
I'll mark it as fixed.
There might be some trick to reduce the core logic (cmp/orrne/biceq) further,
but that wasn't my issue.
More information about the Gcc-bugs
mailing list