optimization/9448: [mainline] Wrong code with -O2 -fprefetch-loop-arrays

Josef Zlomek zlomekj@suse.cz
Mon Jan 27 13:36:00 GMT 2003


The following reply was made to PR optimization/9448; it has been noted by GNATS.

From: Josef Zlomek <zlomekj@suse.cz>
To: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/9448: [mainline] Wrong code with -O2 -fprefetch-loop-arrays
Date: Mon, 27 Jan 2003 14:32:32 +0100

 > > > In loop.c in function emit_prefetch_instructions on line 4200
 > > > there is the following command:
 > > > init_val = convert_to_mode (Pmode, init_val, 0);
 > > > 
 > > > It finally generates instructions to convert from SImode to DImode
 > > > which are placed to the end of instruction stream and not to the
 > > > place before loop.
 > > 
 > > Also, your example contains an infinite loop, and I don't
 > > think we should be especially concerned about optimizing that.
 > 
 > It does not matter that the loop is infinite, if there was
 > while (i < n)
 >   i++;
 > the code would be also wrong.
 > The testcase was minimized by deleting many lines from gzip's unlzh.c
 
 Actually it was minimal for the gcse bug I have fixed, I have removed
 some more lines.
 
 Josef



More information about the Gcc-prs mailing list