<p dir="ltr"><br>
On Apr 12, 2016 10:16 AM, "Connor Abbott" <<a href="mailto:cwabbott0@gmail.com">cwabbott0@gmail.com</a>> wrote:<br>
><br>
> I'm not sure I'm so comfortable with this. For one, this is the sort<br>
> of thing the backend can (and should) do. Why should be be adding<br>
> stuff at the NIR level to help the backend's copy propagation pass?<br>
> And perhaps more importantly, why should we be adding stuff at the NIR<br>
> level to workaround the lack of spilling support for doubles? I know<br>
> it's more difficult to implement than normal spilling, but it just<br>
> feels dirty to workaround it because some tests happen to use too many<br>
> registers.<br>
><br>
> Jason, what do you think?</p>
<p dir="ltr">Agreed. The solution to spilling problems is to fix spilling. At first I thought this *might* be a good idea but thinking a bit more, I have to agree with Connor. The only thing this does is short-cut part of the use-def graph in such a way as to make RA happier.</p>
<p dir="ltr">> On Tue, Apr 12, 2016 at 4:05 AM, Samuel Iglesias Gonsálvez<br>
> <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>> wrote:<br>
> > From: Iago Toral Quiroga <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>><br>
> ><br>
> > This is useful when we only need to modify the high 32-bit chunk of a double.<br>
> > This is a common case, because this is the part that encodes the exponent<br>
> > which we manipulate in some double lowering passes. Although we can accomplish<br>
> > the same by using pack_double_2x32, this new opcode is better for register<br>
> > pressure, since we don't have to unpack both parts of the double and keep<br>
> > the low 32-bits around until we can recombine the new exponent.<br>
> ><br>
> > We will use this opcode in the set_exponent() function of the double lowering<br>
> > pass and with that we will fix spilling issues in some dmat4 divide<br>
> > piglit tests on Intel.<br>
> > ---<br>
> > src/compiler/nir/nir_opcodes.py | 14 ++++++++++++++<br>
> > 1 file changed, 14 insertions(+)<br>
> ><br>
> > diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py<br>
> > index 9f62e08..f92dd8d 100644<br>
> > --- a/src/compiler/nir/nir_opcodes.py<br>
> > +++ b/src/compiler/nir/nir_opcodes.py<br>
> > @@ -276,6 +276,20 @@ di.i2 = src0.y;<br>
> > dst.x = di.u64;<br>
> > """)<br>
> ><br>
> > +opcode("pack_double_2x32_split_y", 0, tuint64, [0, 0], [tuint64, tuint32], "", """<br>
> > +union {<br>
> > + uint64_t u64;<br>
> > + struct {<br>
> > + uint32_t i1;<br>
> > + uint32_t i2;<br>
> > + };<br>
> > +} di;<br>
> > +<br>
> > +di.u64 = src0;<br>
> > +di.i1 = src1;<br>
> > +dst = di.u64;<br>
> > +""")<br>
> > +<br>
> > unop_horiz("unpack_double_2x32", 2, tuint32, 1, tuint64, """<br>
> > union {<br>
> > uint64_t u64;<br>
> > --<br>
> > 2.5.0<br>
> ><br>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>