public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35343]  New: Sum-reduction loop not recognized
@ 2008-02-24  4:28 xinliangli at gmail dot com
  2008-02-24 21:56 ` [Bug middle-end/35343] " rguenth at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-24  4:28 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-29  6:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-24  4:28 [Bug middle-end/35343] New: Sum-reduction loop not recognized xinliangli at gmail dot com
2008-02-24 21:56 ` [Bug middle-end/35343] " rguenth at gcc dot gnu dot org
2008-02-25 10:22 ` dorit at gcc dot gnu dot org
2008-02-25 21:37 ` xinliangli at gmail dot com
2008-12-29  6:32 ` [Bug middle-end/35343] Sum-reduction loop not recognized (enable -fvariable-expansion-in-unroller by default) pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).