<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 - v8i1 build_vector legalizer miscompile"
href="https://bugs.llvm.org/show_bug.cgi?id=43507">43507</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>v8i1 build_vector legalizer miscompile
</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>Linux
</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: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>benny.kra@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>$ cat t.ll
define <8 x i1> @ham(i64 %arg) {
%tmp = trunc i64 %arg to i1
%tmp1 = insertelement <8 x i1> undef, i1 %tmp, i32 0
%tmp2 = shufflevector <8 x i1> %tmp1, <8 x i1> undef, <8 x i32>
zeroinitializer
ret <8 x i1> %tmp2
}
$ llc -mcpu=skx < t.ll
ham:
xorl %eax, %eax
testb %dil, %dil
movl $255, %ecx
cmovel %eax, %ecx
kmovd %ecx, %k0
vpmovm2w %k0, %xmm0
retq
This drops the trunc to i1, giving wrong results for all even inputs > 0. I'd
expect `testb $1, %dil` here.</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>