From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14370 invoked by alias); 25 Feb 2008 05:02:06 -0000 Received: (qmail 14249 invoked by uid 48); 25 Feb 2008 05:01:21 -0000 Date: Mon, 25 Feb 2008 05:02:00 -0000 Subject: [Bug middle-end/35357] New: Loop peeling not happening 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/msg02613.txt.bz2 //David Li Loop peeling is special case of index splitting. Gcc has support for this (under -O3 -funrool_loops, also -fno-tree-vectorize for the simple case), but it does not happen for the following cases: int a[100]; int b[1000]; void foo(int n) { int i; for ( i = 0; i <= n; i++) { b[i*2] = a[3*i+1]; if (i < n) b[i*2] +=1; } } --------------------- int a[100]; int b[1000]; void foo(int n) { int i; for ( i = 0; i < n; i++) { if (i==0) b[i*2] +=1; b[i*2] = a[3*i+1]; } } -- Summary: Loop peeling not happening 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=35357