<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - i965: Figure out how to remove copy-propagated MOV x, (abs)x"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=80037">80037</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>77547
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>i965: Figure out how to remove copy-propagated MOV x, (abs)x
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mattst88@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Some psychonauts shaders do pow(abs(x), y), which generates

mov vgrf10:F, |vgrf10|:F
pow vgrf53:F, vgrf10:F, vgrf55:F

We copy propagate from the MOV into the POW:

mov vgrf10:F, |vgrf10|:F
pow vgrf53:F, |vgrf10|:F, vgrf55:F

but since vgrf10 is used after the MOV, dead code elimination isn't able to
recognize that it's no longer used and so we can't remove it.

We could probably handle this in copy-propagation. After copy-propagating a MOV
x, (abs)x instruction we'd check if its value has been propagated into all uses
of the MOV's destination, and if so remove the MOV.</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>