<div dir="ltr"><div>How about "Use shuffle_from_32bit_read for 64-bit gs_input_load"?  Also, as a general comment, intel/fs would be a bit more specific prefix</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 9, 2018 at 4:13 AM, Jose Maria Casanova Crespo <span dir="ltr"><<a href="mailto:jmcasanova@igalia.com" target="_blank">jmcasanova@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This implementation avoids two unneeded MOVs for each 64-bit<br>
component. One was done in the old shuffle, to avoid cases of<br>
src/dst overlap but this is not the case. And the removed MOV<br>
was already being being done in the shuffle.<br>
<br>
Copy propagation wasn't able to remove them because shuffle<br>
destination values are defined with partial writes because they<br>
have stride == 2.<br>
---<br>
 src/intel/compiler/brw_fs_nir.<wbr>cpp | 10 +++++-----<br>
 1 file changed, 5 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/intel/compiler/brw_fs_<wbr>nir.cpp b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
index 780a9e228de..6abc7c0174d 100644<br>
--- a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
+++ b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
@@ -2305,11 +2305,11 @@ fs_visitor::emit_gs_input_<wbr>load(const fs_reg &dst,<br>
       }<br>
<br>
       if (type_sz(dst.type) == 8) {<br>
-         shuffle_32bit_load_result_to_<wbr>64bit_data(<br>
-            bld, tmp_dst, retype(tmp_dst, BRW_REGISTER_TYPE_F), num_components);<br>
-<br>
-         for (unsigned c = 0; c < num_components; c++)<br>
-            bld.MOV(offset(dst, bld, iter * 2 + c), offset(tmp_dst, bld, c));<br>
+         shuffle_from_32bit_read(bld,<br>
+                                 offset(dst, bld, iter * 2),<br>
+                                 retype(tmp_dst, BRW_REGISTER_TYPE_D),<br>
+                                 0,<br>
+                                 num_components);<br>
       }<br>
<br>
       if (num_iterations > 1) {<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.17.1<br>
<br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>