This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/42522] [m68k] Wrong code generated with -O2/-O3
- From: "ami_stuff at o2 dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Dec 2009 23:38:27 -0000
- Subject: [Bug c/42522] [m68k] Wrong code generated with -O2/-O3
- References: <bug-42522-17839@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from ami_stuff at o2 dot pl 2009-12-28 23:38 -------
I found which optimization doesn't work correctly on my config:
-O2 ("Unknown format"):
_flv_probe:
clr.l d0
rts
.even
-O2 -fno-cse-follow-jumps (works OK):
_flv_probe:
move.l 4(sp),a0
move.l 4(a0),a0
cmp.b #70,(a0)
jeq L10
L7:
clr.l d0
rts
L10:
cmp.b #76,1(a0)
jne L7
cmp.b #86,2(a0)
jne L7
cmp.b #4,3(a0)
jhi L7
tst.b 5(a0)
jne L7
move.l 5(a0),d0
moveq #8,d1
cmp.l d0,d1
jcc L7
moveq #100,d0
rts
.even
--
ami_stuff at o2 dot pl changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |major
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42522