[PATCH] D61189: [X86][SSE] Extract i1 elements from vXi1 bool vectors (WIP)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 08:11:30 PDT 2019
RKSimon added inline comments.
================
Comment at: test/CodeGen/X86/avx2-masked-gather.ll:55
; NOGATHER-NEXT: vmovdqa %xmm1, %xmm0
; NOGATHER-NEXT: retq
entry:
----------------
Annoyingly this doesn't drop through the code, skipping zero-element gathers, instead repeating tests+branches.
================
Comment at: test/CodeGen/X86/avx2-masked-gather.ll:393
+; NOGATHER-NEXT: vpacksswb %xmm0, %xmm2, %xmm4
+; NOGATHER-NEXT: vpmovmskb %xmm4, %eax
+; NOGATHER-NEXT: testb $2, %al
----------------
Repeated PACKSS+MOVMSK instructions - I assume due to it having a undef argument in the xmm0 slot.
================
Comment at: test/CodeGen/X86/avx512-insert-extract.ll:1024
+; KNL-NEXT: shrq $63, %rax
+; KNL-NEXT: cmpq $1, %rax
+; KNL-NEXT: sete %al
----------------
we should be able to replace both shifts and the cmp with a single BT $32, %RAX ?
================
Comment at: test/CodeGen/X86/masked_compressstore.ll:51
+; HSW-NEXT: vpacksswb %xmm0, %xmm1, %xmm2
+; HSW-NEXT: vpmovmskb %xmm2, %eax
+; HSW-NEXT: testb $2, %al
----------------
More repeated PACKSS+MOVMSK
================
Comment at: test/CodeGen/X86/movmsk-cmp.ll:4376
+; AVX-NEXT: andb %dl, %al
+; AVX-NEXT: andb %cl, %al
; AVX-NEXT: retq
----------------
We should be able to reduce this to a TEST
================
Comment at: test/CodeGen/X86/movmsk-cmp.ll:4655
+; SSE2-NEXT: ucomisd %xmm1, %xmm0
+; SSE2-NEXT: cmovbel %ecx, %eax
; SSE2-NEXT: retq
----------------
Repeated comparisons
================
Comment at: test/CodeGen/X86/setcc-combine.ll:10
+; CHECK-NEXT: pxor %xmm0, %xmm0
+; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
+; CHECK-NEXT: movmskps %xmm0, %eax
----------------
I think this is effectively a NOT that we should be able to handle somehow.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61189/new/
https://reviews.llvm.org/D61189
More information about the llvm-commits
mailing list