diff options
author | Gautam Chakrabarti <gchakrabarti@nvidia.com> | 2014-01-28 18:35:29 +0000 |
---|---|---|
committer | Gautam Chakrabarti <gchakrabarti@nvidia.com> | 2014-01-28 18:35:29 +0000 |
commit | 3dcb2a2d92cca5d5ebac11fafab923520341b265 (patch) | |
tree | 9a609538b6933d2d87a91cfe4322e8745d3e50d7 /lib | |
parent | 106b79744b185969faf8a74c6bd7cad35e6f11bd (diff) | |
download | llvm-3dcb2a2d92cca5d5ebac11fafab923520341b265.tar.gz llvm-3dcb2a2d92cca5d5ebac11fafab923520341b265.tar.bz2 llvm-3dcb2a2d92cca5d5ebac11fafab923520341b265.tar.xz |
[NVPTX] Fix emitting aggregate parameters
The code was missing the case for aggregate parameters and
hence was emitting them as .b0 type. Also fixed a couple
of comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index 2c8e7e70f6..5fad27e47a 100644 --- a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -1522,8 +1522,8 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) { } if (PAL.hasAttribute(paramIndex + 1, Attribute::ByVal) == false) { - if (Ty->isVectorTy()) { - // Just print .param .b8 .align <a> .param[size]; + if (Ty->isAggregateType() || Ty->isVectorTy()) { + // Just print .param .align <a> .b8 .param[size]; // <a> = PAL.getparamalignment // size = typeallocsize of element type unsigned align = PAL.getParamAlignment(paramIndex + 1); @@ -1603,7 +1603,7 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) { Type *ETy = PTy->getElementType(); if (isABI || isKernelFunc) { - // Just print .param .b8 .align <a> .param[size]; + // Just print .param .align <a> .b8 .param[size]; // <a> = PAL.getparamalignment // size = typeallocsize of element type unsigned align = PAL.getParamAlignment(paramIndex + 1); |