PATCH [11/n]: Prepare x32: PR rtl-optimization/48155: Reload doesn't handle subreg properly

Ulrich Weigand
Mon Jun 27 15:04:00 GMT 2011

H.J. Lu wrote:

> Given input:
> (plus:SI (subreg:SI (plus:DI (reg/f:DI 7 sp)
>             (const_int 16 [0x10])) 0)
>     (const_int -1 [0xffffffffffffffff]))

Once again, this seems weird as legitimate address ...  If this really
can occur validly, there'll probably need to be an insn+splitter and/or
a secondard reload provided by the back-end to handle it.

> reloads tries to add
> (subreg:SI (plus:DI (reg/f:DI 7 sp)
>         (const_int 16 [0x10])) 0)
> to
> (reg:SI 1 dx)

And what happens then?  If the only problem is that this is then
rejected by the back-end, I don't think we need to change anything
in gen_reload ...

With your change below, it seems you're just falling through to
the generic gen_rtx_SET case, right?   How does this help?


  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

More information about the Gcc-patches mailing list