<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Refactor MathIC compilation process in Baseline and DFG to turn temporary registers usage more flexible"
   href="https://bugs.webkit.org/show_bug.cgi?id=160588#c44">Comment # 44</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Refactor MathIC compilation process in Baseline and DFG to turn temporary registers usage more flexible"
   href="https://bugs.webkit.org/show_bug.cgi?id=160588">bug 160588</a>
              from <span class="vcard"><a class="email" href="mailto:ticaiolima&#64;gmail.com" title="Caio Lima &lt;ticaiolima&#64;gmail.com&gt;"> <span class="fn">Caio Lima</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=297820&amp;action=diff" name="attach_297820" title="Patch">attachment 297820</a> <a href="attachment.cgi?id=297820&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=297820&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=297820&amp;action=review</a>

<span class="quote">&gt;&gt; Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:3572
&gt;&gt; +            scratchGPR[i] = InvalidGPRReg;
&gt; 
&gt; Is this side of the branch ever taken? It seems like we should almost assert against it, and if a generator knows how to handle using the tags, it should just *always* do that and report that it needs fewer registers.</span >

The problem here actually isn't the DG version, but the Baseline version on JITArithmetic.cpp. Take a look at <a href="https://github.com/caiolima/webkit/blob/math-ic-scratch/Source/JavaScriptCore/jit/JITArithmetic.cpp#L761">https://github.com/caiolima/webkit/blob/math-ic-scratch/Source/JavaScriptCore/jit/JITArithmetic.cpp#L761</a>
In this case, resultRegs = leftRegs, which makes impossible use resultRegs.tagGPR in that case. This way, we really need this mechanism to make sure that Api works across DFG and Baseline.</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>