This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix rtx_renumbered_equal_p for unrepresentable subregs
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Feb 2009 07:45:24 -0800
- Subject: Re: Fix rtx_renumbered_equal_p for unrepresentable subregs
- References: <Pine.LNX.4.64.0808021813050.9890@digraph.polyomino.org.uk>
On Sat, Aug 2, 2008 at 10:14 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This patch fixes a problem with the handling of unrepresentable
> subregs in rtx_renumbered_equal_p. It would both call
> subreg_regno_offset to do a meaningless conversion for subregs for
> which subreg_offset_representable_p fails, and treat such subregs as
> equal to other regs or subregs with the same outer mode but different
> semantics.
>
> The original problem was observed on E500v2 in a 3.4-based toolchain,
> where (reg:DF 3) (double value on one 64-bit register) and (subreg:DF
> (reg:DI 3)) (double value in the 32-bit low parts of two registers)
> were treated as equal, leading to incorrect crossjumping and a
> miscompilation of glibc's pow function. I don't have a testcase
> reproducing this with trunk (it's very sensitive to details of
> register allocation and other optimizations), but I believe the issue
> is still present in the code.
>
> Tested with no regressions with cross to powerpc-none-linux-gnuspe
> --enable-e500_double. OK to commit?
>
> 2008-08-02 Joseph Myers <joseph@codesourcery.com>
>
> * jump.c (rtx_renumbered_equal_p): Do not call subreg_regno_offset
> for unrepresentable subregs or treat them as equal to other regs
> or subregs with the same register number.
>
This patch caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39241
--
H.J.