<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [x86-64] Suboptimal codegen on uint128 negation"
   href="https://bugs.llvm.org/show_bug.cgi?id=40825">bug 40825</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;">See Also</td>
           <td>
                
           </td>
           <td>https://bugs.llvm.org/show_bug.cgi?id=40483
           </td>
         </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-64] Suboptimal codegen on uint128 negation"
   href="https://bugs.llvm.org/show_bug.cgi?id=40825#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [x86-64] Suboptimal codegen on uint128 negation"
   href="https://bugs.llvm.org/show_bug.cgi?id=40825">bug 40825</a>
              from <span class="vcard"><a class="email" href="mailto:llvm-dev@redking.me.uk" title="Simon Pilgrim <llvm-dev@redking.me.uk>"> <span class="fn">Simon Pilgrim</span></a>
</span></b>
        <pre>This is fixed in trunk, I think from the work on [<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [X86] Failure to merge ISD::SUB(x,y) and X86ISD::SUB(x,y)"
   href="show_bug.cgi?id=40483">Bug #40483</a>]

trunk / 9.0:

wider_tests::Tests<unsigned __int128>::neg(unsigned __int128*):
  xorl %eax, %eax
  negq (%rdi)
  sbbq 8(%rdi), %rax
  movq %rax, 8(%rdi)
  retq
wider_tests::Tests<Wider<unsigned long> >::neg(Wider<unsigned long>*):
  xorl %eax, %eax
  negq (%rdi)
  sbbq 8(%rdi), %rax
  movq %rax, 8(%rdi)
  retq

vs 8.0:

wider_tests::Tests<unsigned __int128>::neg(unsigned __int128*):
  xorl %eax, %eax
  xorl %ecx, %ecx
  subq (%rdi), %rcx
  sbbq 8(%rdi), %rax
  movq %rcx, (%rdi)
  movq %rax, 8(%rdi)
  retq
wider_tests::Tests<Wider<unsigned long> >::neg(Wider<unsigned long>*):
  movq (%rdi), %rax
  testq %rax, %rax
  setne %cl
  negq %rax
  xorl %edx, %edx
  addb $-1, %cl
  sbbq 8(%rdi), %rdx
  movq %rax, (%rdi)
  movq %rdx, 8(%rdi)
  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>