<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 - WebAssembly - llvm.umul.with.overflow.i64 lowered to the wrong intrinsic"
href="https://bugs.llvm.org/show_bug.cgi?id=35220">35220</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>WebAssembly - llvm.umul.with.overflow.i64 lowered to the wrong intrinsic
</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>Windows NT
</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>Backend: WebAssembly
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alex@crichton.co
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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?</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>