[PATCH] D116801: [PowerPC] Avoid perfect shuffle when mask has multiple uses
Qiu Chaofan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 02:13:10 PST 2022
qiucf created this revision.
qiucf added reviewers: nemanjai, shchenz, jsji, PowerPC.
Herald added subscribers: kbarton, hiraditya.
qiucf requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The perfect shuffle (only enabled in big endian yet) may transform a shuffle vector into multiple merge/inserts, but when the shuffle mask is shared between multiple shuffles, it's better to use a single load with multiple `vperm`.
An obvious blocker is the mask is not operand of `vector_shuffle` in DAG, so I have to record all masks and check number of uses of each mask.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116801
Files:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/perfect-shuffle.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116801.398085.patch
Type: text/x-patch
Size: 6865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220107/5c5353ad/attachment.bin>
More information about the llvm-commits
mailing list