From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7475 invoked by alias); 12 Jun 2007 23:31:11 -0000 Received: (qmail 7421 invoked by alias); 12 Jun 2007 23:30:58 -0000 Date: Tue, 12 Jun 2007 23:31:00 -0000 Message-ID: <20070612233058.7420.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/32296] [4.3 Regression] Bootstrap failure in stage1 on hppa*-*-* In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dave at hiauly1 dot hia dot nrc dot ca" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg00964.txt.bz2 ------- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca 2007-06-12 23:30 ------- Subject: Re: [4.3 Regression] Bootstrap failure in stage1 on hppa*-*-* > hppa_can_use_return_insn_p() is called > from "return" insn pattern in pa.md. > The pattern looks: > > (define_insn "return" > [(return) > (use (reg:SI 2)) > (const_int 0)] > "hppa_can_use_return_insn_p ()" > "* > > i.e. there's a use of reg 2. > > Before dataflow branch got merged, regs_ever_live(2) was not true > for reg 2, even though it is used at the return (hence it's live > throughout the function body) - unless there's some other use > within the function. > > Now, with df, we always have the correct and precise regs_ever_live. > Since the condition hppa_can_use_return_p() is checking > is really that there are no other insn that uses reg 2 > AND since we know the pattern has a use of reg 2, > checking the number of use count to be 1 > checks effectively the same assertion. Thanks for the detailed explanation. I don't think the change is correct. The problem is the epilogue expander also calls hppa_can_use_return_p(). It's not going to be true before before the simple return is emitted. As a result, we will never emit a trivial return. I think the solution is to remove this check from the insn definition in pa.md and change the check in hppa_can_use_return_insn_p() to ! df_hard_reg_used_p(). Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32296