[PATCH] D29690: [AVX512] Improve EXTRACT_VECTOR_ELT with variable index.
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 06:14:26 PST 2017
delena added inline comments.
================
Comment at: test/CodeGen/X86/avx512-insert-extract.ll:1463
+; SKX-NEXT: ## kill: %EDI<def> %EDI<kill> %RDI<def>
+; SKX-NEXT: vmovaps %xmm0, -{{[0-9]+}}(%rsp)
+; SKX-NEXT: andl $1, %edi
----------------
You can use VPERMQ here.
Permute qwords in ymm3/m256/m64bcst using indexes in ymm2 and store the result in ymm1.
VPERMQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst
================
Comment at: test/CodeGen/X86/avx512-insert-extract.ll:1595
+
+define i32 @test_extractelement_varible_v4i32(<4 x i32> %t1, i32 %index) {
+; KNL-LABEL: test_extractelement_varible_v4i32:
----------------
varible -> variable
================
Comment at: test/CodeGen/X86/avx512-insert-extract.ll:1609
+; SKX-NEXT: andl $3, %edi
+; SKX-NEXT: movl -24(%rsp,%rdi,4), %eax
+; SKX-NEXT: retq
----------------
You don't need stack. Use VPEMD, for the both KNL and SKX.
================
Comment at: test/CodeGen/X86/avx512-insert-extract.ll:1719
+; SKX-NEXT: ## kill: %EDI<def> %EDI<kill> %RDI<def>
+; SKX-NEXT: vmovdqu %xmm0, -{{[0-9]+}}(%rsp)
+; SKX-NEXT: andl $7, %edi
----------------
Please use VPSHUFB instead of stack.
Repository:
rL LLVM
https://reviews.llvm.org/D29690
More information about the llvm-commits
mailing list