<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 10, 2018 at 12:52 PM, Caio Marcelo de Oliveira Filho <span dir="ltr"><<a href="mailto:caio.oliveira@intel.com" target="_blank">caio.oliveira@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Only fully-qualified direct derefs, collected in direct_deref_nodes,<br>
are checked for aliasing, so it is already known up front that they<br>
have only array derefs of type direct.<br>
---<br>
src/compiler/nir/nir_lower_<wbr>vars_to_ssa.c | 9 +++++----<br>
1 file changed, 5 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/compiler/nir/nir_lower_<wbr>vars_to_ssa.c b/src/compiler/nir/nir_lower_<wbr>vars_to_ssa.c<br>
index fe30c69756..4c41dd69cf 100644<br>
--- a/src/compiler/nir/nir_lower_<wbr>vars_to_ssa.c<br>
+++ b/src/compiler/nir/nir_lower_<wbr>vars_to_ssa.c<br>
@@ -298,15 +298,16 @@ deref_may_be_aliased_node(<wbr>struct deref_node *node, nir_deref *deref,<br>
switch (deref->child->deref_type) {<br>
case nir_deref_type_array: {<br>
nir_deref_array *arr = nir_deref_as_array(deref-><wbr>child);<br>
- if (arr->deref_array_type == nir_deref_array_type_indirect)<br>
- return true;<br>
+<br>
+ /* This is a child of one of the derefs in direct_deref_nodes,<br>
+ * so we know it is direct.<br>
+ */<br>
+ assert(arr->deref_array_type == nir_deref_array_type_direct);<br>
<br>
/* If there is an indirect at this level, we're aliased. */<br>
if (node->indirect)<br>
return true;<br>
<br>
- assert(arr->deref_array_type == nir_deref_array_type_direct);<br>
-<br>
if (node->children[arr->base_<wbr>offset] &&<br>
deref_may_be_aliased_node(<wbr>node->children[arr->base_<wbr>offset],<br>
deref->child, state))<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.17.0<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>