[Bug target/40499] [missed optimization] branch to return
carrot at google dot com
gcc-bugzilla@gcc.gnu.org
Sat Jun 20 03:56:00 GMT 2009
------- Comment #1 from carrot at google dot com 2009-06-20 03:56 -------
Created an attachment (id=18027)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18027&action=view)
test case
The command line options are: -march=armv5te -mthumb -Os
At the end of the function we can see
b .L3 // This one can be replaced by pop {pc}
.L5:
mov r0, #1
.L3:
@ sp needed for prologue
pop {pc}
With option -O2 we can get similar result.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40499
More information about the Gcc-bugs
mailing list