[PATCH] D156350: [X86] Allow pre-SSE41 targets to extract multiple elements coming from the same DWORD/WORD super-element
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 10:49:41 PDT 2023
RKSimon created this revision.
RKSimon added reviewers: pengfei, goldstein.w.n.
Herald added a subscriber: hiraditya.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a project: LLVM.
Pre-SSE41 targets tended to have weak (serial) GPR<->VEC moves, meaning we only allowed a single extraction before spilling the vector to stack and loading the element instead. But this didn't make use of the DWORD/WORD extraction we had to use could extract multiple i8 elements at the same time.
This patch attempts to determine if all uses of a vector are element extractions, and works out whether all the extractions share the same WORD or (lowest) DWORD, in which case we can perform a single extraction and just shift/truncate the individual elements.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156350
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/bitcast-vector-bool.ll
llvm/test/CodeGen/X86/pr63108.ll
llvm/test/CodeGen/X86/subvectorwise-store-of-vector-splat.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156350.544433.patch
Type: text/x-patch
Size: 18132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230726/f56d2e6b/attachment.bin>
More information about the llvm-commits
mailing list