[llvm-bugs] [Bug 45518] New: _mulx_u64() intrinsic does not generate MULX

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 13 14:21:52 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45518

            Bug ID: 45518
           Summary: _mulx_u64() intrinsic does not generate MULX
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: atdt at google.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

The _mulx_u64() intrinsic generates a MUL instead of a MULX:

  #include <cstdint>
  #include <x86intrin.h>

  auto mulx(uint64_t a, uint64_t b, uint64_t* c) {
    return _mulx_u64(a, b, (unsigned long long *)c); 
  }

clang trunk, -O2 -march=skylake:

  mulx(unsigned long, unsigned long, unsigned long*):                          
 # 
  @mulx(unsigned long, unsigned long, unsigned long*)
        mov     rcx, rdx
        mov     rax, rsi
        mul     rdi
        mov     qword ptr [rcx], rdx
        ret

https://godbolt.org/z/rsGQWm

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200413/14f31bf3/attachment.html>


More information about the llvm-bugs mailing list