<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Merge similar if-statements"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94744#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Merge similar if-statements"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94744">bug 94744</a>
from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
<pre>(In reply to Timothy Arceri from <a href="show_bug.cgi?id=94744#c2">comment #2</a>)
<span class="quote">> (In reply to Eero Tamminen from <a href="show_bug.cgi?id=94744#c1">comment #1</a>)
> > > Existing optimization passes should turn this into a pair of bcsel instructions.
> >
> > Ian, is this already done or do you have patches for it?
>
> This is done however i965 doesn't make use of it. If you pass a non-zero
> limit to nir_opt_peephole_select() (i965 currently has a limit of zero, all
> other nir drivers seem to pass a value) these if-statments should get turned
> into bcsel.</span >
nip_opt_peephole_select would help with this specific case, but I have seen
other cases where the bodies of the then-blocks and the else-blocks are quite
large. I noticed one or two cases of this recently, but I don't recall which
shaders. I will probably work on this fairly soon (sometime this year) if
someone doesn't beat me to it.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>