[PATCH] D21148: [X86][SSE] Added support for combining target shuffles to (V)PSHUFD/VPERMILPD/VPERMILPS immediate permute
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 12:38:17 PDT 2016
RKSimon created this revision.
RKSimon added reviewers: qcolombet, ab, spatel, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.
This patch allows target shuffles to be combined to single input immediate permute instructions - (V)PSHUFD/VPERMILPD/VPERMILPS - allowing more general pattern matching than what we current do and improves the likelihood of memory folding compared to existing patterns which tend to reuse the input in multiple arguments.
Further permute instructions (V)PSHUFLW/(V)PSHUFHW/(V)PERMQ/(V)PERMPD may be added in the future but its proven tricky to create tests cases for them so far. (V)PSHUFLW/(V)PSHUFHW is already handled quite well in combineTargetShuffle so it may be that removing some of that code may allow us to perform more of the combining in one place without duplication.
Repository:
rL LLVM
http://reviews.llvm.org/D21148
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/2012-01-12-extract-sv.ll
test/CodeGen/X86/2012-04-26-sdglue.ll
test/CodeGen/X86/avx-intrinsics-fast-isel.ll
test/CodeGen/X86/avx-intrinsics-x86.ll
test/CodeGen/X86/avx-splat.ll
test/CodeGen/X86/avx-vbroadcast.ll
test/CodeGen/X86/merge-consecutive-loads-128.ll
test/CodeGen/X86/pshufb-mask-comments.ll
test/CodeGen/X86/sad.ll
test/CodeGen/X86/sse3-avx-addsub-2.ll
test/CodeGen/X86/sse3.ll
test/CodeGen/X86/vector-shuffle-128-v16.ll
test/CodeGen/X86/vector-shuffle-128-v2.ll
test/CodeGen/X86/vector-shuffle-128-v4.ll
test/CodeGen/X86/vector-shuffle-256-v16.ll
test/CodeGen/X86/vector-shuffle-256-v4.ll
test/CodeGen/X86/vector-shuffle-256-v8.ll
test/CodeGen/X86/vector-shuffle-combining-avx.ll
test/CodeGen/X86/vector-shuffle-combining-avx2.ll
test/CodeGen/X86/vector-shuffle-combining-avx512bw.ll
test/CodeGen/X86/vector-shuffle-combining.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21148.60082.patch
Type: text/x-patch
Size: 39478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160608/f38dcbae/attachment.bin>
More information about the llvm-commits
mailing list