This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/6984: wrong code generated with -O2, -O3, -Os for do-while loop on PowerPC
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 17 Jun 2002 07:36:02 -0000
- Subject: Re: optimization/6984: wrong code generated with -O2, -O3, -Os for do-while loop on PowerPC
- Reply-to: Alan Modra <amodra at bigpond dot net dot au>
The following reply was made to PR optimization/6984; it has been noted by GNATS.
From: Alan Modra <amodra@bigpond.net.au>
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