On 12/10/2013 10:44 AM, Richard Sandiford wrote:
> Sorry, I don't understand.  I never said it was invalid.  I said
> (subreg:SF (reg:V4SF X) 1) was invalid if (reg:V4SF X) represents
> a single register.  On a little-endian target, the offset cannot be
> anything other than 0 in that case.
> 
> So the CANNOT_CHANGE_MODE_CLASS code above seems to be checking for
> something that is always invalid, regardless of the target.  That kind
> of situation should be rejected by target-independent code instead.

But, we want to disable the subreg before we know whether or not (reg:V4SF X)
will be allocated to a single hard register.  That is something that we can't
know in target-independent code before register allocation.

> In other words I'm arguing against the idea of passing the offset to
> CANNOT_CHANGE_MODE_CLASS (which you seemed to be supporting in the
> quote above).  I think Kirill's patch to remove the i386.c check was
> the right way to go.


Unless you can figure a way around the above, I think passing the offset to
C_C_M_C is probably the way to go.  I need to have a look over the patches
though...

> 
> There's no need for a separate insn though.  Once you allow the subregs
> (as per Kirill's patch), the normal move patterns will handle them.

Absolutely.


r~

Reply via email to