<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - 64/32 register mismatch compiling with LLC"
href="https://llvm.org/bugs/show_bug.cgi?id=27346">27346</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>64/32 register mismatch compiling with LLC
</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>normal
</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>gareth_morgan77@hotmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The attached LL file Ashara.opt.ll will generate incorrect .S code for the
function StraightenBlobExterior.
Specifically this code on line 73:
%0 = load i32, i32* %m_Count.i.i, align 4
%1 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 12)
%2 = extractvalue { i32, i1 } %1, 1
%3 = extractvalue { i32, i1 } %1, 0
%4 = select i1 %2, i32 -1, i32 %3
Will generate this .s (line 19):
i64.extend_u/i32 $push2=, $38
i64.const $push3=, 12
i64.mul $36=, $pop2, $pop3
i64.const $18=, 32
i32.const $19=, -1
block
i64.shr_u $push5=, $36, $18
i32.wrap/i64 $push6=, $pop5
i32.wrap/i64 $push4=, $36
i32.select $push7=, $pop6, $19, $pop4
But as register 36 is listed as type i32 in the .locals line for that function
this causes an assert in s2wasm as i64.shr_u expects i64 arguments.
Source code with makefile attached.</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>