On Thu, Feb 20, 2014 at 02:41:06PM -0600, Richard Henderson wrote:
> On 02/20/2014 12:39 PM, Jakub Jelinek wrote:
> > +  if (!d->testing_p)
> > +    {
> > +      dremap.target = gen_reg_rtx (dremap.vmode);
> > +      dfinal.op0 = gen_lowpart (dfinal.vmode, dremap.target);
> > +    }
> ...
> > +     if (d->testing_p)
> > +       d_copy.target = gen_lowpart (V4DFmode, d->target);
> > +     else
> > +       d_copy.target = gen_reg_rtx (V4DFmode);
> 
> I'm not keen on these changes, because they could potentially affect how the
> insn matching happens.  I'm not 100% sure it actually matters, but I think
> there's a simple way around it: use the same gen_raw_REG kind of thing that we
> do to begin.

Note, the patch has been committed already.

Anyway, I don't see why this would matter, when d->testing_p, d->target
is some pseudo register, d->op0 another one and d->op1 either the same as
d->op0 or yet another register.  For testing we are just matching a single
d_copy (or other permutation) at a time, so all we care about is that
target/op0/op1 have the right modes and that target is a different register
from op0 and op0 either the same as op1 or yet another register.

> What about this?  Note that I've also slightly adjusted a few of the breaks, 
> to
> take into account that both arms of the if will always succeed.

The problem I see with this is that we'll need to maintain test_regno
everywhere.  E.g. there are places which even fir !d->testing_p create
temporary structures and set testing_p in it, that would now require
that we also set test_regno there to something (what?).

        Jakub

Reply via email to