<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - B3::LowerToAir should do copy propagation"
   href="https://bugs.webkit.org/show_bug.cgi?id=150775">150775</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>B3::LowerToAir should do copy propagation
          </td>
        </tr>

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

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fpizlo&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>For example, the Trunc value in B3 is really just an identity in Air.  Currently we emit a Move.  But, it would be more efficient to copy propagate: just set the tmp of the Trunc to the tmp of the input.

We could do similar things for ZExt and SExt.  For ZExt, we could record if the tmp for the input value was produced by an instruction that already zero-extends.  For SExt, we could record if the tmp for the input value was produced by an instruction that already sign-extends.  For both of them, we could also use an analysis of whether the input is non-negative.  If so, the we could copy-propagate through ZExt and SExt provided that the source either zero- or sign-extended.  For example, we could copy-prop through a SExt if the source zero-extended and the value is proved non-negative.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>