<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:t_arceri@yahoo.com.au" title="Timothy Arceri <t_arceri@yahoo.com.au>"> <span class="fn">Timothy Arceri</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Convert phi nodes to logical operations"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94747">bug 94747</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;">QA Contact</td>
           <td>intel-3d-bugs@lists.freedesktop.org
           </td>
           <td>mesa-dev@lists.freedesktop.org
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Convert phi nodes to logical operations"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94747#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Convert phi nodes to logical operations"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94747">bug 94747</a>
              from <span class="vcard"><a class="email" href="mailto:t_arceri@yahoo.com.au" title="Timothy Arceri <t_arceri@yahoo.com.au>"> <span class="fn">Timothy Arceri</span></a>
</span></b>
        <pre>As (In reply to Jason Ekstrand from <a href="show_bug.cgi?id=94747#c1">comment #1</a>)
<span class="quote">> The code for this already exists.  It's called nir_opt_peephole_select.  The
> only problem is that it only triggers if both sides of the if are empty. 
> I've been wanting to add some sort of heuristic to it for some time now. 
> The only problem is that it's really back-end specific.</span >

Although i965 doesn't use it I believe this is otherwise fixed by the following
commit. We should probably close this bug:

commit 36f0f0318275f65f8744ec6f9471702e2f58e6d5
Author: Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>>
Date:   Tue Sep 6 19:45:51 2016 -0700

    nir: Allow opt_peephole_sel to be more aggressive in flattening IFs.

    VC4 was running into a major performance regression from enabling control
    flow in the glmark2 conditionals test, because of short if statements
    containing an ffract.

    This pass seems like it was was trying to ensure that we only flattened
    IFs that should be entirely a win by guaranteeing that there would be
    fewer bcsels than there were MOVs otherwise.  However, if the number of
    ALU ops is small, we can avoid the overhead of branching (which itself
    costs cycles) and still get a win, even if it means moving real
    instructions out of the THEN/ELSE blocks.

    For now, just turn on aggressive flattening on vc4.  i965 will need some
    tuning to avoid regressions.  It does looks like this may be useful to
    replace freedreno code.

    Improves glmark2 -b conditionals:fragment-steps=5:vertex-steps=0 from 47
    fps to 95 fps on vc4.

    vc4 shader-db:
    total instructions in shared programs: 101282 -> 99543 (-1.72%)
    instructions in affected programs:     17365 -> 15626 (-10.01%)
    total uniforms in shared programs: 31295 -> 31172 (-0.39%)
    uniforms in affected programs:     3580 -> 3457 (-3.44%)
    total estimated cycles in shared programs: 225182 -> 223746 (-0.64%)
    estimated cycles in affected programs:     26085 -> 24649 (-5.51%)

    v2: Update shader-db output.

    Reviewed-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>> (v1)</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>