[PATCH] D95107: [AArch64][GlobalISel] Allow vector store legalization into 128-bit-wide types
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 17:40:32 PST 2021
paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
paquette requested review of this revision.
Herald added a project: LLVM.
We are allowed to store 128-bit-wide values using the q registers on AArch64.
GlobalISel was clamping the number of elements in vector stores into 64 bits instead.
This results in some poor codegen in cases like below:
https://godbolt.org/z/E56dq8
; SDAG uses a stp + q registers in both cases here.
define void @float(<16 x float> %val, <16 x float>* %ptr) {
store <16 x float> %val, <16 x float>* %ptr
ret void
}
define void @double(<8 x double> %val, <8 x double>* %ptr) {
store <8 x double> %val, <8 x double>* %ptr
ret void
}
This adds similar legalization for vector stores with s8 and s16 elements.
https://reviews.llvm.org/D95107
Files:
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-fpext.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptrunc.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-store.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95107.318074.patch
Type: text/x-patch
Size: 8827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210121/a0781779/attachment.bin>
More information about the llvm-commits
mailing list