This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/32296] [4.3 Regression] Bootstrap failure in stage1 on hppa*-*-*
- From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jun 2007 23:30:58 -0000
- Subject: [Bug rtl-optimization/32296] [4.3 Regression] Bootstrap failure in stage1 on hppa*-*-*
- References: <bug-32296-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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