[PATCH] D12550: AVX-512: store <4 x i1> and <2 x i1> data types in memory
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 00:59:07 PDT 2015
delena created this revision.
delena added a reviewer: igorb.
delena added a subscriber: llvm-commits.
delena set the repository for this revision to rL LLVM.
Store <4 x i1> and <2 x i1> values with KMOVB instruction under DQI predicate.
Repository:
rL LLVM
http://reviews.llvm.org/D12550
Files:
lib/Target/X86/X86InstrAVX512.td
test/CodeGen/X86/avx512-mask-op.ll
Index: test/CodeGen/X86/avx512-mask-op.ll
===================================================================
--- test/CodeGen/X86/avx512-mask-op.ll
+++ test/CodeGen/X86/avx512-mask-op.ll
@@ -407,3 +407,17 @@
%ret = select <32 x i1> %mask, <32 x i16> %x, <32 x i16> zeroinitializer
ret <32 x i16> %ret
}
+
+; SKX-LABEL: test22
+; SKX: kmovb
+define void @test22(<4 x i1> %a, <4 x i1>* %addr) {
+ store <4 x i1> %a, <4 x i1>* %addr
+ ret void
+}
+
+; SKX-LABEL: test23
+; SKX: kmovb
+define void @test23(<2 x i1> %a, <2 x i1>* %addr) {
+ store <2 x i1> %a, <2 x i1>* %addr
+ ret void
+}
Index: lib/Target/X86/X86InstrAVX512.td
===================================================================
--- lib/Target/X86/X86InstrAVX512.td
+++ lib/Target/X86/X86InstrAVX512.td
@@ -1786,6 +1786,11 @@
(KMOVBmk addr:$dst, VK8:$src)>;
def : Pat<(v8i1 (bitconvert (i8 (load addr:$src)))),
(KMOVBkm addr:$src)>;
+
+ def : Pat<(store VK4:$src, addr:$dst),
+ (KMOVBmk addr:$dst, (COPY_TO_REGCLASS VK4:$src, VK8))>;
+ def : Pat<(store VK2:$src, addr:$dst),
+ (KMOVBmk addr:$dst, (COPY_TO_REGCLASS VK2:$src, VK8))>;
}
let Predicates = [HasAVX512, NoDQI] in {
def : Pat<(store (i8 (bitconvert (v8i1 VK8:$src))), addr:$dst),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12550.33781.patch
Type: text/x-patch
Size: 1274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150902/c60e15be/attachment.bin>
More information about the llvm-commits
mailing list