[llvm-bugs] [Bug 35220] New: WebAssembly - llvm.umul.with.overflow.i64 lowered to the wrong intrinsic
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 6 17:18:04 PST 2017
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: unassignedbugs at nondot.org
Reporter: alex at crichton.co
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171107/edee12c6/attachment.html>
More information about the llvm-bugs
mailing list