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 c/19078] New: [4.0 Regression] Poor quality code after loop unrolling.


The function:

int* find(int* a,int *b)
{
for(;a!=b;++a)
  if(*a==2) return a;
return a;
}

Is unrolled in both 3.3 and 4.0 with -O2 -funroll-loops. The code from 4.0 is
however about twice as large, and seems to feature a large amount of unnessasary
rearranging of registers, and is somewhat slower.

-- 
           Summary: [4.0 Regression] Poor quality code after loop unrolling.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chris at bubblescope dot net
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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