From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7189 invoked by alias); 8 Oct 2002 23: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 7164 invoked by uid 71); 8 Oct 2002 23:16:01 -0000 Date: Tue, 08 Oct 2002 16:16:00 -0000 Message-ID: <20021008231601.7162.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Glen Nakamura Subject: Re: optimization/8165: builtin string functions SEGV on alpha-pc-linux-gnu at -O2 Reply-To: Glen Nakamura X-SW-Source: 2002-10/txt/msg00317.txt.bz2 List-Id: The following reply was made to PR optimization/8165; it has been noted by GNATS. From: Glen Nakamura To: Richard Henderson , gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org Cc: Subject: Re: optimization/8165: builtin string functions SEGV on alpha-pc-linux-gnu at -O2 Date: Tue, 8 Oct 2002 13:13:26 -1000 On Tue, Oct 08, 2002 at 03:20:53PM -0700, Richard Henderson wrote: > I get the feeling this is simply papering over the problem. > I'll continue to investigate... Thanks, you are quite possibly right. There was a bunch of things happening, and I don't fully understand the semantics of REG_EQUAL notes. I don't have the original rtx dumps, but from memory things looked like this before gcse: SET A ... BEGIN_LOOP ... SET B USE B REG_EQUAL B After gcse USE B is replaced with USE A, but REG_EQUAL still refers to B: SET A ... BEGIN_LOOP ... SET B USE A REG_EQUAL B Then I think the loop pass moved USE A out of the loop (above SET B): SET A ... USE A REG_EQUAL B BEGIN_LOOP ... SET B Eventually, SET B is determined dead and removed but the REG_EQUAL referring to it still exists... Then for some reason, the REG_EQUAL note gets used and bad things happen. One bad side-effect is that life-analysis determines B is live at the entry of basic block 0. I hope this helps. - glen