From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25652 invoked by alias); 30 Oct 2006 16:01:21 -0000 Received: (qmail 25593 invoked by uid 48); 30 Oct 2006 16:01:09 -0000 Date: Mon, 30 Oct 2006 16:01:00 -0000 Message-ID: <20061030160109.25592.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/28970] [4.1 regression] wrong code for simple loop test case In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ebotcazou at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg02583.txt.bz2 List-Id: ------- Comment #9 from ebotcazou at gcc dot gnu dot org 2006-10-30 16:01 ------- > Bug in biv selection, so strength reduction messes up: > > Loop from 45 to 46: 12 real insns. > Biv 60: insn 19 const (reg 59 [ pretmp.26 ]) > Biv 60: insn 22 const (1) > Biv 60: verified > Biv 60: initialized at insn 13: initial value (0) > > 60 is not a Biv: Yeah, the limitations of loop.c are blatantly exposed by the new dialect generated by the RTL expanders in 4.x because of the 100 tree-opt passes. It turns out that 3.x finds the same BIVs: Biv 61: insn 22 const (1) Biv 61: insn 28 const (reg 65) Biv 61: verified Biv 61: initialized at insn 12: initial value (0) but the non-constant increment comes after the constant one, which is enough to prevent the GIV from being eliminated... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28970