<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - B3-&gt;Air lowering needs the same defenses in effectiveAddr() that it has in tryAppendLea()"
   href="https://bugs.webkit.org/show_bug.cgi?id=163264#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - B3-&gt;Air lowering needs the same defenses in effectiveAddr() that it has in tryAppendLea()"
   href="https://bugs.webkit.org/show_bug.cgi?id=163264">bug 163264</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>Yup, this test generates wrong code and crashes:

void testLoadBaseIndexShift32()
{
    Procedure proc;
    BasicBlock* root = proc.addBlock();
    root-&gt;appendNew&lt;Value&gt;(
        proc, Return, Origin(),
        root-&gt;appendNew&lt;MemoryValue&gt;(
            proc, Load, Int32, Origin(),
            root-&gt;appendNew&lt;Value&gt;(
                proc, Add, Origin(),
                root-&gt;appendNew&lt;ArgumentRegValue&gt;(proc, Origin(), GPRInfo::argumentGPR0),
                root-&gt;appendNew&lt;Value&gt;(
                    proc, Shl, Origin(),
                    root-&gt;appendNew&lt;ArgumentRegValue&gt;(proc, Origin(), GPRInfo::argumentGPR1),
                    root-&gt;appendNew&lt;Const32Value&gt;(proc, Origin(), 32)))));
    auto code = compile(proc);
    int32_t value = 12341234;
    char* ptr = bitwise_cast&lt;char*&gt;(&amp;value);
    for (unsigned i = 0; i &lt; 10; ++i)
        CHECK_EQ(invoke&lt;int32_t&gt;(*code, ptr - (static_cast&lt;intptr_t&gt;(1) &lt;&lt; static_cast&lt;intptr_t&gt;(32)) * i, i), 12341234);
}</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>