<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Load + Register Extend should be simplified into Load"
   href="https://bugs.webkit.org/show_bug.cgi?id=154207#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Load + Register Extend should be simplified into Load"
   href="https://bugs.webkit.org/show_bug.cgi?id=154207">bug 154207</a>
              from <span class="vcard"><a class="email" href="mailto:fpizlo&#64;apple.com" title="Filip Pizlo &lt;fpizlo&#64;apple.com&gt;"> <span class="fn">Filip Pizlo</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=154207#c0">comment #0</a>)
<span class="quote">&gt; This:
&gt; &#64;1 = Load(&#64;x);
&gt; &#64;2 = SExt8(&#64;1)
&gt; 
&gt; should be transformed as:
&gt; &#64;3 = Load8(&#64;x)
&gt; 
&gt; This must be done at B3 level instead of lowering in order to have the
&gt; address go through legalizeMemoryOffsets().</span >

Seems like we &quot;just&quot; need use counts to do this, so we prove that the Load is not used for anything else.  reduceStrength() could almost do it, but it would be dangerous, since that phase modifies the IR as it goes - so it will probably mess up any use count calculations.

That implies that we should add a new phase to do this.  This phase should probably also get other things that require use counts.</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>