<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Code generation for 128 bit multiplication - MULX"
   href="https://bugs.llvm.org/show_bug.cgi?id=41164">41164</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Code generation for 128 bit multiplication - MULX
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>david.bolvansky@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>uint64_t wyhash64_x; 


uint64_t wyhash64() {
  wyhash64_x += 0x60bee2bee120fc15;
  __uint128_t tmp;
  tmp = (__uint128_t) wyhash64_x * 0xa3b195354a39b70d;
  uint64_t m1 = (tmp >> 64) ^ tmp;
  tmp = (__uint128_t)m1 * 0x1b03738712fad5c9;
  uint64_t m2 = (tmp >> 64) ^ tmp;
  return m2;
}

Clang trunk -O3 -march=haswell
wyhash64():                           # @wyhash64()
        movabs  rcx, 6971258582664805397
        add     rcx, qword ptr [rip + wyhash64_x]
        mov     qword ptr [rip + wyhash64_x], rcx
        movabs  rsi, -6651371118538410227
        mov     rax, rcx
        mul     rsi
        imul    rcx, rsi
        xor     rcx, rdx
        movabs  rdx, 1946526487930394057
        mov     rax, rcx
        mul     rdx
        xor     rax, rdx
        ret
wyhash64_x:
        .quad   0      


While ICC and GCC generates nicer code:

wyhash64():
        mov       rdx, 0x60bee2bee120fc15                       #10.3
        add       rdx, QWORD PTR wyhash64_x[rip]                #10.3
        mov       rax, 0xa3b195354a39b70d                       #12.3
        mov       QWORD PTR wyhash64_x[rip], rdx                #10.3
        mov       rsi, 0x1b03738712fad5c9                       #14.3
        mulx      rdx, rcx, rax                                 #12.36
        xor       rdx, rcx                                      #13.31
        mulx      rax, rdi, rsi                                 #14.27
        xor       rax, rdi                                      #15.31
        ret</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>