From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9893 invoked by alias); 28 Feb 2003 16:46: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 9873 invoked by uid 71); 28 Feb 2003 16:46:01 -0000 Date: Fri, 28 Feb 2003 16:46:00 -0000 Message-ID: <20030228164601.9872.qmail@sources.redhat.com> To: wilson@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jim Wilson Subject: Re: c/7871: ICE on legal code, global register variables problems Reply-To: Jim Wilson X-SW-Source: 2003-02/txt/msg01484.txt.bz2 List-Id: The following reply was made to PR c/7871; it has been noted by GNATS. From: Jim Wilson To: Richard Henderson Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, rz@linux-m68k.org, wilson@gcc.gnu.org Subject: Re: c/7871: ICE on legal code, global register variables problems Date: 28 Feb 2003 11:43:48 -0500 On Fri, 2003-02-28 at 00:47, Richard Henderson wrote: > /* Calls may also reference any of the global registers, > so they are made live. */ > for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) > if (global_regs[i]) > mark_used_reg (pbi, regno_reg_rtx[i], cond, insn); We first call mark_set_1 (... CLOBBER...) which kills the register. Then we call mark_used_reg which makes it live again, and adds a REG_DEAD note to the call. This REG_DEAD note is wrong. This confuses combine into deleting the instruction because there is a REG_DEAD note for it and no visible use of it after combination. It doesn't seem right to modify combine to treat REG_DEAD notes for global regs specially. I think we need to avoid adding the REG_DEAD note in the first place. Maybe what we should do here is call mark_set_reg (...SET...) for global regs instead of mark_set_1 (...CLOBBER...). I think this might work. I will try this. I have some other easier patches to deal with, so I will get back to this later. Jim