[llvm-bugs] [Bug 43507] New: v8i1 build_vector legalizer miscompile
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Sep 30 08:42:37 PDT 2019
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 at nondot.org
Reporter: benny.kra at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190930/dd7f7dcd/attachment.html>
More information about the llvm-bugs
mailing list