<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Loop unrolling doesn't take into account whether it will decrease or increase performance"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83658#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Loop unrolling doesn't take into account whether it will decrease or increase performance"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83658">bug 83658</a>
              from <span class="vcard"><a class="email" href="mailto:lemody@gmail.com" title="Tapani Pälli <lemody@gmail.com>"> <span class="fn">Tapani Pälli</span></a>
</span></b>
        <pre>(In reply to Eero Tamminen from <a href="show_bug.cgi?id=83658#c2">comment #2</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=83658#c1">comment #1</a>)
> > FWIW there exists code to detect expressions that are constant within a loop
> > (during loop analysis), I think this could be used as starting point for
> > such optimization.

> Loop invariant code handling could also be the root cause making e.g.
> SynMark2 PSPhong 3x slower than it should be:
> - code doesn't get unrolled with all the loop invariant code inside the loop 
> - this resulting in cascade effect that causes also other problems. e.g.
> stuff which on Windows GL is handled with push & no sampler, changes to
> (unecessarily looped) pull and makes thing sampler bound with Mesa instead
> of it being PS ALU bound</span >

For me it looks like invariant code in loop is not the problem within PSPhong
example, I will try to make a handwritten loop with invariant code to
investigate this optimization opportunity more.</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>