[llvm] [NVPTX] Basic support for fp128 as a storage type (PR #136006)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 12:30:23 PDT 2025
================
@@ -264,26 +259,21 @@ void NVPTXAsmPrinter::printReturnValStr(const Function *F, raw_ostream &O) {
return;
O << " (";
- if ((Ty->isFloatingPointTy() || Ty->isIntegerTy()) &&
- !ShouldPassAsArray(Ty)) {
- unsigned size = 0;
- if (auto *ITy = dyn_cast<IntegerType>(Ty)) {
- size = ITy->getBitWidth();
- } else {
- assert(Ty->isFloatingPointTy() && "Floating point type expected here");
- size = Ty->getPrimitiveSizeInBits();
- }
- size = promoteScalarArgumentSize(size);
- O << ".param .b" << size << " func_retval0";
- } else if (isa<PointerType>(Ty)) {
- O << ".param .b" << TLI->getPointerTy(DL).getSizeInBits()
- << " func_retval0";
- } else if (ShouldPassAsArray(Ty)) {
- unsigned totalsz = DL.getTypeAllocSize(Ty);
- Align RetAlignment = TLI->getFunctionArgumentAlignment(
+ auto PrintScalarParam = [&](unsigned Size) {
----------------
Artem-B wrote:
`PrintScalarRetVal`? If it's intended to be for params other than the return value, then we'd probably need to accept the name as an argument, too.
https://github.com/llvm/llvm-project/pull/136006
More information about the llvm-commits
mailing list