[PATCH] D60512: [X86][AVX] Combine shuffles extracted from a common vector

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 07:52:22 PDT 2019


RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel.
Herald added a project: LLVM.
RKSimon marked an inline comment as done.
RKSimon added inline comments.


================
Comment at: test/CodeGen/X86/avx512-shuffles/partial_permute.ll:4411
+; CHECK-NEXT:    vmovapd {{.*#+}} zmm2 = <1,4,u,u,u,u,u,u>
+; CHECK-NEXT:    vpermpd (%rdi), %zmm2, %zmm2
 ; CHECK-NEXT:    vxorpd %xmm3, %xmm3, %xmm3
----------------
This is annoying - I'd be happier if the mask in zmm2 was at least reduced to a <1,4> xmm load (or broadcasted) but that's a common issue in a lot of the masks generated in this patch.


A small step towards combining shuffles across vector sizes - this recognises when a shuffle's operands are all extracted from the same larger source and tries to combine to an unary shuffle of that source instead. Fixes one of the test cases from PR34380.


Repository:
  rL LLVM

https://reviews.llvm.org/D60512

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx512-shuffles/partial_permute.ll
  test/CodeGen/X86/vector-shuffle-512-v16.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60512.194512.patch
Type: text/x-patch
Size: 15738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190410/15cf9156/attachment.bin>


More information about the llvm-commits mailing list