From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16537 invoked by alias); 1 Apr 2004 14:53:43 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16473 invoked from network); 1 Apr 2004 14:53:35 -0000 Received: from unknown (HELO mtagate6.de.ibm.com) (195.212.29.155) by sources.redhat.com with SMTP; 1 Apr 2004 14:53:35 -0000 Received: from d12relay01.megacenter.de.ibm.com (d12relay01.megacenter.de.ibm.com [9.149.165.180]) by mtagate6.de.ibm.com (8.12.10/8.12.10) with ESMTP id i31Er7hW110410; Thu, 1 Apr 2004 14:53:11 GMT Received: from d12ml102.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12relay01.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i31EqsT9097128; Thu, 1 Apr 2004 16:52:54 +0200 To: rakdver@atrey.karlin.mff.cuni.cz, gcc@gcc.gnu.org MIME-Version: 1.0 Subject: loop unroll question From: Revital Eres Message-ID: Date: Thu, 01 Apr 2004 14:53:00 -0000 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2004-04/txt/msg00010.txt.bz2 Hello, For mainline on power-pc 4 with the option -O3 -funroll-loops, the following loop is not unrolled, but in GCC 3.4 it is. Also for mainline the bct is not inserted, but again in GCC 3.4 it is. void example_new(int a[],int b[],int c[], int j) { int i; for(i=0 ; i<=j ; i++) { c[i]=a[i]+b[i]; } return; } If the condition is changed to < (instead of <=) the unrolling is done as expected and bct is inserted. Thanks, Revital