[llvm-bugs] [Bug 34553] New: [X86][AVX512VL] Infinite loop in bool vector sign extension
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Sep 11 05:34:50 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34553
Bug ID: 34553
Summary: [X86][AVX512VL] Infinite loop in bool vector sign
extension
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: craig.topper at gmail.com, elena.demikhovsky at intel.com,
llvm-bugs at lists.llvm.org, zvi.rackover at intel.com
Found while working on D37680
-mtriple=x86_64-unknown -mattr=+avx512f,+avx512vl
define <16 x i8> @vselect_packss_v16i32(<16 x i32> %a0, <16 x i32> %a1, <16 x
i8> %a2, <16 x i8> %a3) {
%1 = icmp eq <16 x i32> %a0, %a1
%2 = sext <16 x i1> %1 to <16 x i8>
%3 = and <16 x i8> %2, %a2
%4 = xor <16 x i8> %2, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8
-1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
%5 = and <16 x i8> %4, %a3
%6 = or <16 x i8> %3, %5
ret <16 x i8> %6
}
-mtriple=x86_64-unknown -mattr=+avx512f works OK:
vselect_packss_v16i32:
vpcmpeqd %zmm1, %zmm0, %k1
vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
vpmovdb %zmm0, %xmm0
vpand %xmm2, %xmm0, %xmm1
vpandn %xmm3, %xmm0, %xmm0
vpor %xmm0, %xmm1, %xmm0
vzeroupper
retq
As does -mtriple=x86_64-unknown -mcpu=skx
vselect_packss_v16i32:
vpcmpeqd %zmm1, %zmm0, %k0
vpmovm2b %k0, %xmm0
vpblendvb %xmm0, %xmm2, %xmm3, %xmm0
vzeroupper
retq
--
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/20170911/30048c72/attachment.html>
More information about the llvm-bugs
mailing list