This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/6984: wrong code generated with -O2, -O3, -Os for do-while loop on PowerPC


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]