<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:jason@jlekstrand.net" title="Jason Ekstrand <jason@jlekstrand.net>"> <span class="fn">Jason Ekstrand</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - nir_instr_as_deref: Assertion `parent && parent->type == nir_instr_type_deref' failed."
href="https://bugs.freedesktop.org/show_bug.cgi?id=109603">bug 109603</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - nir_instr_as_deref: Assertion `parent && parent->type == nir_instr_type_deref' failed."
href="https://bugs.freedesktop.org/show_bug.cgi?id=109603#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - nir_instr_as_deref: Assertion `parent && parent->type == nir_instr_type_deref' failed."
href="https://bugs.freedesktop.org/show_bug.cgi?id=109603">bug 109603</a>
from <span class="vcard"><a class="email" href="mailto:jason@jlekstrand.net" title="Jason Ekstrand <jason@jlekstrand.net>"> <span class="fn">Jason Ekstrand</span></a>
</span></b>
<pre>This has been fixed by the following commit in master:
commit 9e6a6ef0d45a5bb61a541c495fe12e54e646ecfe (public/master)
Author: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>>
Date: Sun Feb 10 22:23:01 2019 -0600
nir/deref: Rematerialize parents in rematerialize_derefs_in_use_blocks
When nir_rematerialize_derefs_in_use_blocks_impl was first written, I
attempted to optimize things a bit by not bothering to re-materialize
the sources of deref instructions figuring that the final caller would
take care of that. However, in the case of more complex deref chains
where the first link or two lives in block A and then another link and
the load/store_deref intrinsic live in block B it doesn't work. The
code in rematerialize_deref_in_block looks at the tail of the chain,
sees that it's already in block B and skips it, not realizing that part
of the chain also lives in block A.
The easy solution here is to just rematerialize deref sources of deref
instructions as well. This may potentially lead to a few more deref
instructions being created by the conditions required for that to
actually happen are fairly unlikely and, thanks to the caching, it's all
linear time regardless.
Bugzilla: <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - nir_instr_as_deref: Assertion `parent && parent->type == nir_instr_type_deref' failed."
href="show_bug.cgi?id=109603">https://bugs.freedesktop.org/show_bug.cgi?id=109603</a>
Fixes: 7d1d1208c2b "nir: Add a small pass to rematerialize derefs
per-block"
Reviewed-by: Alejandro PiƱeiro <<a href="mailto:apinheiro@igalia.com">apinheiro@igalia.com</a>>
Sorry, but I forgot to add your tested-by before pushing. :-(</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>