This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13373] optimization with -frerun-cse-after-loop -fexpensive-optimizations produces wrong code on mcore
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Dec 2003 05:30:54 -0000
- Subject: [Bug optimization/13373] optimization with -frerun-cse-after-loop -fexpensive-optimizations produces wrong code on mcore
- References: <20031210103832.13373.olaf@bonorden.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kazu at cs dot umass dot edu 2003-12-24 05:30 -------
Confirmed on 3.3.
Not the case on mainline.
Reduced to:
short
foo (short crc)
{
if (crc)
crc ^= 0x4002;
return crc;
}
With -O1 instead of -O0, the difference is easier to see:
foo:
zexth r2
cmpnei r2,0
jbf .L2
- bgeni r7,14
- addi r7,2 // 16386 0x4002
- xor r2,r7
+ zexth r2
.L2:
sexth r2
jmp r15
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at cs dot umass dot edu
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-12-24 05:30:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13373