From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15501 invoked by alias); 3 Feb 2003 20:16:01 -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 15407 invoked by uid 71); 3 Feb 2003 20:16:01 -0000 Resent-Date: 3 Feb 2003 20:16:01 -0000 Resent-Message-ID: <20030203201601.15402.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, binsh00@hotmail.com Received: (qmail 7884 invoked by uid 48); 3 Feb 2003 20:07:18 -0000 Message-Id: <20030203200718.7883.qmail@sources.redhat.com> Date: Mon, 03 Feb 2003 20:16:00 -0000 From: binsh00@hotmail.com Reply-To: binsh00@hotmail.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: optimization/9553: No induction variable elimination X-SW-Source: 2003-02/txt/msg00144.txt.bz2 List-Id: >Number: 9553 >Category: optimization >Synopsis: No induction variable elimination >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: pessimizes-code >Submitter-Id: net >Arrival-Date: Mon Feb 03 20:16:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: binsh00@hotmail.com >Release: gcc (GCC) 3.3 20030129 (prerelease) >Organization: >Environment: Debian GNU/Linux (unstable) Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii gcc 3.2.2-0 The GNU C compiler. >Description: int a[20]; int b[20]; void f() { int i1, i2; for (i1 = 0, i2 = 0; i1 < 20; ++i1) a[i1] = b[i2++]; } In the above code i2 equals i1 and can be eliminated. % /usr/lib/gcc-snapshot/bin/gcc -Wall -O3 -S -o - bug.c [...] xorl %edx, %edx xorl %ecx, %ecx .p2align 2,,3 .L6: movl b(,%ecx,4), %eax movl %eax, a(,%edx,4) incl %edx incl %ecx cmpl $19, %edx jle .L6 [...] >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: