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

            Bug ID: 35220
           Summary: WebAssembly - llvm.umul.with.overflow.i64 lowered to
                    the wrong intrinsic
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedb...@nondot.org
          Reporter: a...@crichton.co
                CC: llvm-bugs@lists.llvm.org

In playing around with IR that looks like:



define i64 @wut(i64, i64) {
start:
  %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1)
  %3 = extractvalue { i64, i1 } %2, 0
  ret i64 %3
}

declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1


I've found that LLVM is lowering this to a call of the `__multi3` intrinsic to
be defined in compiler-rt. From what I can surmise though the `__multi3`
intrinsic is  multiplication of two 128-bit integers, not 64-bit multiplication
with overflow. I'm not sure of the correct intrinsic off the top of my head,
but is this expected? Or do the intrinsics have different meaning on
WebAssembly?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to