diff options
author | Gábor Spaits <gaborspaits1@gmail.com> | 2024-06-19 16:27:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 16:27:12 +0200 |
commit | f4504083634ee73cfbb4593613a8f11487207ce6 (patch) | |
tree | a03f93571e01a102c903165ba63568cf56a10d96 /llvm/lib/Target | |
parent | 5b007582bb9142ccab47134e5d2de0dd451338af (diff) | |
download | llvm-f4504083634ee73cfbb4593613a8f11487207ce6.zip llvm-f4504083634ee73cfbb4593613a8f11487207ce6.tar.gz llvm-f4504083634ee73cfbb4593613a8f11487207ce6.tar.bz2 |
[GISel][RISCV]Implement indirect parameter passing (#95429)
Some targets like RISC-V pass scalars wider than 2×XLEN bits by
reference, so those arguments are replaced in the argument list with an
address (See RISC-V ABIs Specification 1.0 section 2.1).
This commit implements this indirect parameter passing in GlobalISel.
---------
Co-authored-by: Gabor Spaits <Gabor.Spaits@hightec-rt.com>
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp b/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp index 2bfee45..b5f8715 100644 --- a/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp +++ b/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp @@ -341,10 +341,8 @@ static bool isLegalElementTypeForRVV(Type *EltTy, // TODO: Remove IsLowerArgs argument by adding support for vectors in lowerCall. static bool isSupportedArgumentType(Type *T, const RISCVSubtarget &Subtarget, bool IsLowerArgs = false) { - // TODO: Integers larger than 2*XLen are passed indirectly which is not - // supported yet. if (T->isIntegerTy()) - return T->getIntegerBitWidth() <= Subtarget.getXLen() * 2; + return true; if (T->isHalfTy() || T->isFloatTy() || T->isDoubleTy()) return true; if (T->isPointerTy()) |