From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15153 invoked by alias); 24 Feb 2008 04:28:45 -0000 Received: (qmail 14997 invoked by uid 48); 24 Feb 2008 04:28:01 -0000 Date: Sun, 24 Feb 2008 04:28:00 -0000 Subject: [Bug middle-end/35343] New: Sum-reduction loop not recognized X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "xinliangli at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg02519.txt.bz2 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