On Mon, Sep 6, 2021 at 12:15 PM Segher Boessenkool
<seg...@kernel.crashing.org> wrote:
>
> On Sun, Sep 05, 2021 at 11:28:30PM +0100, Roger Sayle wrote:
> > This patch simplifies the RTX (subreg:HI (truncate:QI (reg:SI))) as
> > (truncate:HI (reg:SI)), and closely related variants.
>
> Subregs of other than regs are undefined in RTL.  You will first have to
> define this (in documentation as well as in other code that handles
> subregs).  I doubt this is possible to do, subreg have so many
> overloaded meanings already.

I suppose (subreg:MODE1 (xyz:MODE2 ..)) where xyz is not REG or MEM
is equal to

  (set (reg:MODE2) (xyz:MODE2 ..))
  (subreg:MODE1 (reg:MODE2) ...)

with 'reg' being a pseudo reg is the (only?) sensible way of defining it.

That would make the simplification apply when substituting the pseudos
definition inside the subreg which maybe is what this targets?

Richard.

>
>
> Segher

Reply via email to