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 rtl-optimization/25848] New: missed-rtl-optimization


This C example:

int f1(int a)
{
  int b = a*2;
  return b+a;
}
---
Currently we produce:
_f1:
        mr 0,3
        slwi 3,3,1
        add 3,3,0
        extsw 3,0
        blr

-----

We should be able to produce:
_f1:
        mr 0,3
        slwi 3,3,1
        add 3,0,3
        blr

,so the "extsw" instruction should go out.


-- 
           Summary: missed-rtl-optimization
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dtemirbulatov at gmail dot com
GCC target triplet: powerpc64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25848


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