This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/13373] optimization with -frerun-cse-after-loop -fexpensive-optimizations produces wrong code on mcore


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]