[PATCH] D60610: [X86][SSE] Recognise vXi1 boolean anyof/allof reduction patterns
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 06:44:37 PDT 2019
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - see inline for a minor potential follow-up.
If we can assume vXi1 IR, then I can probably abandon my recent movmsk efforts:
D59669 <https://reviews.llvm.org/D59669>
D59912 <https://reviews.llvm.org/D59912>
================
Comment at: test/CodeGen/X86/vector-compare-all_of.ll:1295-1296
; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
-; AVX1-NEXT: vpackssdw %xmm2, %xmm0, %xmm1
-; AVX1-NEXT: vpackssdw %xmm0, %xmm2, %xmm0
-; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
-; AVX1-NEXT: vpshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
-; AVX1-NEXT: vpand %xmm0, %xmm1, %xmm0
-; AVX1-NEXT: vpextrb $0, %xmm0, %eax
-; AVX1-NEXT: # kill: def $al killed $al killed $eax
+; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
+; AVX1-NEXT: vmovmskpd %ymm0, %eax
+; AVX1-NEXT: cmpb $15, %al
----------------
I think the other path prefers to use packss and a 128-bit movmsk for AVX1 here which could be a slight win since it avoids ymm?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60610/new/
https://reviews.llvm.org/D60610
More information about the llvm-commits
mailing list