From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4854 invoked by alias); 12 Oct 2002 18:46:02 -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 4836 invoked by uid 71); 12 Oct 2002 18:46:01 -0000 Date: Sat, 12 Oct 2002 11:46:00 -0000 Message-ID: <20021012184601.4835.qmail@sources.redhat.com> To: rth@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/msg00520.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, gcc-patches@gcc.gnu.org Cc: Subject: Re: optimization/8165: builtin string functions SEGV on alpha-pc-linux-gnu at -O2 Date: Sat, 12 Oct 2002 08:39:25 -1000 On Fri, Oct 11, 2002 at 05:51:43PM -0700, Richard Henderson wrote: > I guess your original patch is probably correct. I was > focused so much on the LO_SUM/HIGH simplification that > I missed the fact that we were failing to process the > internal regs of the LO_SUM at all. Looking at try_replace_reg() again, I noticed that the REG_EQUAL note isn't always replaced. Is the "else" really okay? static int try_replace_reg (from, to, insn) rtx from, to, insn; { rtx note = find_reg_equal_equiv_note (insn); ... if (!success && set && reg_mentioned_p (from, SET_SRC (set))) { ... /* If we've failed to do replacement, have a single SET, and don't already have a note, add a REG_EQUAL note to not lose information. */ if (!success && note == 0 && set != 0) note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src)); } /* If there is already a NOTE, update the expression in it with our replacement. */ else if (note != 0) ^^^^ XEXP (note, 0) = simplify_replace_rtx (XEXP (note, 0), from, to);