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 middle-end/35343] New: Sum-reduction loop not recognized


It is beneficial to unroll reduction loop (and split the reduction target) to
reduce dependence height due to recurrence, but GCC does not perform such
optimization (-O3 -fno-tree-vectorize)


int a[1000];
int b[1000];
int foo(int n)
{

   int s = 0;
   int i = 0;
   for (i = 0; i < 1000 ; i++)
   {
       s += a[i] + b[2*i];
   }
   return s;
}


-- 
           Summary: Sum-reduction loop not recognized
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: xinliangli at gmail dot com


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


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