From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26081 invoked by alias); 17 Jun 2002 07:36:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26049 invoked by uid 71); 17 Jun 2002 07:36:02 -0000 Date: Mon, 17 Jun 2002 01:45:00 -0000 Message-ID: <20020617073602.26047.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Alan Modra Subject: Re: optimization/6984: wrong code generated with -O2, -O3, -Os for do-while loop on PowerPC Reply-To: Alan Modra X-SW-Source: 2002-06/txt/msg00379.txt.bz2 List-Id: The following reply was made to PR optimization/6984; it has been noted by GNATS. From: Alan Modra To: fshvaige@cisco.com Cc: gcc-gnats@gcc.gnu.org Subject: Re: optimization/6984: wrong code generated with -O2, -O3, -Os for do-while loop on PowerPC Date: Mon, 17 Jun 2002 17:00:07 +0930 Hmm, we get the same sort of bogus code on x86 with -march=k6. The code that this patch disables looks bogus to me. Perhaps it's relevant when doloop_start is defined?? Anyway this cures your testcase on ppc. Index: gcc/doloop.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/doloop.c,v retrieving revision 1.18 diff -u -p -r1.18 doloop.c --- gcc/doloop.c 11 Jun 2002 12:21:52 -0000 1.18 +++ gcc/doloop.c 17 Jun 2002 07:23:22 -0000 @@ -720,7 +720,7 @@ doloop_modify_runtime (loop, iterations_ not executed before the start of the loop. We need to determine if the loop will terminate after the first pass and to limit the iteration count to one if necessary. */ - if (! loop->vtop) + if (0 && ! loop->vtop) { rtx label; -- Alan Modra IBM OzLabs - Linux Technology Centre