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/31360] New: [4.3 Regression] rtl loop invariant is broken


Testcase:
void f(int *a)
{
  int i;
  for (i = 0;i<100;i++)
    a[i] = 0;
}


-----------cut-------------
we get:
_f:
        li r0,0
        li r2,4
        stw r0,0(r3)
        li r0,99
        mtctr r0
L2:
        li r0,0
        stwx r0,r2,r3
        addi r2,r2,4
        bdnz L2
        blr


the "li r0,0" should be moved out of the loop but is not.


-- 
           Summary: [4.3 Regression] rtl loop invariant is broken
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc-darwin


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


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