This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix rtx_renumbered_equal_p for unrepresentable subregs


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]