From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4885 invoked by alias); 27 Jan 2003 13:36:00 -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 4870 invoked by uid 71); 27 Jan 2003 13:36:00 -0000 Date: Mon, 27 Jan 2003 13:36:00 -0000 Message-ID: <20030127133600.4869.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Josef Zlomek Subject: Re: optimization/9448: [mainline] Wrong code with -O2 -fprefetch-loop-arrays Reply-To: Josef Zlomek X-SW-Source: 2003-01/txt/msg01501.txt.bz2 List-Id: The following reply was made to PR optimization/9448; it has been noted by GNATS. From: Josef Zlomek To: Falk Hueffner Cc: gcc-gnats@gcc.gnu.org Subject: Re: optimization/9448: [mainline] Wrong code with -O2 -fprefetch-loop-arrays Date: Mon, 27 Jan 2003 14:28:40 +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 What I'm concerned is that the instructions are placed on the wrong place, no matter what they do. This can be problem with some real sources. > Perhaps > you could provide a smaller example with the assembly you get, and the > assembly you'd rather like to see? I'll attach the RTL after loop to bug report if it is possible. Josef