<p dir="ltr"><br>
On Dec 10, 2015 12:40 PM, "Matt Turner" <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br>
><br>
> On Thu, Dec 10, 2015 at 11:11 AM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> ><br>
> > On Dec 10, 2015 6:58 AM, "Francisco Jerez" <<a href="mailto:currojerez@riseup.net">currojerez@riseup.net</a>> wrote:<br>
> >><br>
> >> Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> writes:<br>
> >><br>
> >> > We aren't using it anymore.<br>
> >><br>
> >> It seems useful to me to be able to represent indirect access as part of<br>
> >> any instruction source or destination register.<br>
> >><br>
> >> The following:<br>
> >><br>
> >> | mov_indirect g0, g1, a0<br>
> >> | foo g2, g0<br>
> >><br>
> >> and the converse case with indirect destination offset (which you don't<br>
> >> seem to represent currently) can be implemented by the hardware more<br>
> >> efficiently using a single instruction in certain cases.  The current IR<br>
> >> is able to represent what the hardware can do, but supporting the<br>
> >> MOV_INDIRECT instruction only would force us to keep the indirection<br>
> >> separate from the instruction that uses it, so it seems like a less<br>
> >> expressive representation to me than the current approach, unless you're<br>
> >> willing to add _INDIRECT variants of most hardware opcodes.<br>
> ><br>
> > Yes and, mostly, no.  Yes, you can put an indirect on almost anything but it<br>
> > has substantial restrictions:<br>
> ><br>
> > 1) Destination indirects must be uniform (I'm only 95% sure this is the<br>
> > case)<br>
><br>
> Almost true. The Register Region Restrictions page gives an example:<br>
><br>
> > // Example:<br>
> > mov (16) r[a0.0]:f r10:f<br>
> > // The above instruction behaves the same as the following two instructions:<br>
> > mov (8) r[a0.0]:f r10:f<br>
> > mov (8) r[a0.1]:f r11:f<br>
><br>
> But that's all you get -- you still have to use 1x1 mode.<br>
><br>
> And that behavior changes on BDW:<br>
><br>
> > // Example:<br>
> > mov (16) r[a0.0]:f r10:f<br>
> > // The above instruction behaves the same as the following two instructions:<br>
> > mov (8) r[a0.0]:f r10:f<br>
> > mov (8) r[a0.0, 8*4]:f r11:f<br>
><br>
><br>
> The BRW_VERTICAL_STRIDE_ONE_DIMENSIONAL (0xF) vertical stride is<br>
> necessary for Vx1 or VxH, and the destination does not have vertical<br>
> stride. It's also not usable in align16 mode or on src1.</p>
<p dir="ltr">Thanks for digging up the details. That all makes sense and is still insane.<br>
--Jason</p>