[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-bugs
Subject: [llvm-bugs] [Bug 43507] New: v8i1 build_vector legalizer miscompile
From: via llvm-bugs <llvm-bugs () lists ! llvm ! org>
Date: 2019-09-30 15:42:37
Message-ID: bug-43507-206 () http ! bugs ! llvm ! org/
[Download RAW message or body]
--1569858157.d13a3B71.32240
Date: Mon, 30 Sep 2019 08:42:37 -0700
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.llvm.org/
Auto-Submitted: auto-generated
https://bugs.llvm.org/show_bug.cgi?id=43507
Bug ID: 43507
Summary: v8i1 build_vector legalizer miscompile
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs@nondot.org
Reporter: benny.kra@gmail.com
CC: craig.topper@gmail.com, llvm-bugs@lists.llvm.org,
llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
$ 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
--1569858157.d13a3B71.32240
Date: Mon, 30 Sep 2019 08:42:37 -0700
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.llvm.org/
Auto-Submitted: auto-generated
<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>
--1569858157.d13a3B71.32240--
[Attachment #3 (text/plain)]
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic