<div dir="ltr">On 18 October 2013 10:30, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">I know we can specify stride if we have a brw_reg :-<br></div></div>
fs_reg (stride(brw_vec1_grf(0, 0), 2, 4, 0));<br>
<br>
But I could not  find a reliable way to use stride if we have a fs_reg.<br>
That's why I used OR to get the desired result.<br></blockquote><div><br></div><div>The right way to do this, IMHO, is to create a special back-end instruction opcode to do the work.  That way you can put the call to stride() in fs_generator, and it will happen after registers have been assigned and everything has been turned into brw_reg's.  See for example what happens in FS_OPCODE_SET_SIMD4X2_OFFSET, which does a similar thing except that instead of changing the stride of the register it changes its width.<br>
</div></div></div></div>