Skip to content

Commit af7b4df

Browse files
committed
[NVPTXAsmPrinter] Use byval type
Instead of pointer element type.
1 parent 8d24800 commit af7b4df

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,10 +1511,9 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
15111511
continue;
15121512
}
15131513

1514-
// param has byVal attribute. So should be a pointer
1515-
auto *PTy = dyn_cast<PointerType>(Ty);
1516-
assert(PTy && "Param with byval attribute should be a pointer type");
1517-
Type *ETy = PTy->getPointerElementType();
1514+
// param has byVal attribute.
1515+
Type *ETy = PAL.getParamByValType(paramIndex);
1516+
assert(ETy && "Param should have byval type");
15181517

15191518
if (isABI || isKernelFunc) {
15201519
// Just print .param .align <a> .b8 .param[size];

0 commit comments

Comments
 (0)