<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Adding a single, meaningless if-else to a shader source leads to different image"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100303#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Adding a single, meaningless if-else to a shader source leads to different image"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100303">bug 100303</a>
from <span class="vcard"><a class="email" href="mailto:sroland@vmware.com" title="Roland Scheidegger <sroland@vmware.com>"> <span class="fn">Roland Scheidegger</span></a>
</span></b>
<pre>(In reply to Timothy Arceri from <a href="show_bug.cgi?id=100303#c4">comment #4</a>)
<span class="quote">> (In reply to Roland Scheidegger from <a href="show_bug.cgi?id=100303#c2">comment #2</a>)
> >
> > So, for some reason the compiler completely eliminated the conditional
> > return in the loop inside the branch and figured it will just
> > unconditionally return the value corresponding to not meeting that condition
> > in the loop in the original code. (In fact all code in this function with
> > the exception of the return statement is now effectively dead.)
> > Not sure though which lowering stage did this damage...
>
> I think there is a bug in do_lower_jumps(). I noticed a similar bug when
> working on loop unrolling for NIR. I wrote the following tests that pass on
> NIR unrolling/return lower but fail in GLSL IR.
>
> piglit/tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop.
> shader_tes
> piglit/tests/spec/glsl-1.10/execution/vs-nested-return-sibling-loop2.
> shader_test</span >
Yes, that looks similar. Thease also have a return in a loop inside a
conditional. Albeit the test case here even works without the sibling loop.</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>