[PATCH] D102422: [RISCV] Allow passing fixed-length vectors via the stack
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 13 10:14:56 PDT 2021
frasercrmck created this revision.
frasercrmck added reviewers: craig.topper, HsiangKai, kito-cheng, luismarques.
Herald added subscribers: vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
The vector calling convention dictates that when the vector argument
registers are exhaused, GPRs are used to pass the address via the stack.
When the GPRs themselves are exhausted, at best we would previously
crash with an assertion, and at worst we'd generate incorrect code.
This patch addresses this issue by passing fixed-length vectors via the
stack with their full fixed-length size and aligned to their element
type size. Since the calling convention lowering can't yet handle
scalable vector types, this patch adds a fatal error to make it clear
that we are lacking in this regard.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102422
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-calling-conv.ll
llvm/test/CodeGen/RISCV/rvv/unsupported-calling-conv.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102422.345204.patch
Type: text/x-patch
Size: 11522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210513/70cc770d/attachment.bin>
More information about the llvm-commits
mailing list