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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to