<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [X86][SSE] Slow sqrt libcall branch due to dependency on sqrtsd result"
   href="https://bugs.llvm.org/show_bug.cgi?id=31455">bug 31455</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [X86][SSE] Slow sqrt libcall branch due to dependency on sqrtsd result"
   href="https://bugs.llvm.org/show_bug.cgi?id=31455#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [X86][SSE] Slow sqrt libcall branch due to dependency on sqrtsd result"
   href="https://bugs.llvm.org/show_bug.cgi?id=31455">bug 31455</a>
              from <span class="vcard"><a class="email" href="mailto:spatel+llvm@rotateright.com" title="Sanjay Patel <spatel+llvm@rotateright.com>"> <span class="fn">Sanjay Patel</span></a>
</span></b>
        <pre>After:
<a href="https://reviews.llvm.org/rL319094">https://reviews.llvm.org/rL319094</a>

We should see something like this on x86-64:

_sqrt_add:               
        xorps   %xmm2, %xmm2  
        ucomisd %xmm2, %xmm0  # test the arg
        jb      LBB0_2

        sqrtsd  %xmm0, %xmm0  # not negative, so we're good
        addsd   %xmm1, %xmm0
        retq
LBB0_2: 
        pushq   %rax          # defer to libm to set errno
        movsd   %xmm1, (%rsp)    
        callq   _sqrt
        movsd   (%rsp), %xmm1  
        addq    $8, %rsp
        addsd   %xmm1, %xmm0
        retq</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>