[llvm] [NVPTX] Annotate CUDA kernel pointer arguments with .ptr .space .align attributes. (PR #79646)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 10:33:09 PDT 2024
https://github.com/Vandana2896 updated https://github.com/llvm/llvm-project/pull/79646
>From d5bd0215f22440e10e1a4af2b4391973831795be Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Fri, 26 Jan 2024 13:03:27 -0800
Subject: [PATCH 01/12] Enable .ptr .global .align attributes for kernel
attributes for CUDA
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 4 +++
llvm/test/CodeGen/NVPTX/kernel-param-align.ll | 34 +++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 llvm/test/CodeGen/NVPTX/kernel-param-align.ll
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 6c4879ba183c0..0a0fbff2ad6c1 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1610,6 +1610,10 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
}
Align ParamAlign = I->getParamAlign().valueOrOne();
O << ".align " << ParamAlign.value() << " ";
+ } else if (I->getParamAlign().valueOrOne() != 1) {
+ O << ".ptr .global ";
+ Align ParamAlign = I->getParamAlign().value();
+ O << ".align " << ParamAlign.value() << " ";
}
O << TLI->getParamName(F, paramIndex);
continue;
diff --git a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
new file mode 100644
index 0000000000000..eda45928ea305
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
@@ -0,0 +1,34 @@
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_72 2>&1 | FileCheck %s
+; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_72 | %ptxas-verify %}
+
+%struct.Large = type { [16 x double] }
+
+; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
+; CHECK: .param .u64 func_align_param_1,
+; CHECK: .param .u32 func_align_param_2
+define void @func_align(ptr nocapture readonly align 16 %input, ptr nocapture %out, i32 %n) {
+entry:
+ %0 = addrspacecast ptr %out to ptr addrspace(1)
+ %1 = addrspacecast ptr %input to ptr addrspace(1)
+ %getElem = getelementptr inbounds %struct.Large, ptr addrspace(1) %1, i64 0, i32 0, i64 5
+ %tmp2 = load i32, ptr addrspace(1) %getElem, align 8
+ store i32 %tmp2, ptr addrspace(1) %0, align 4
+ ret void
+}
+
+; CHECK: .param .u64 func_param_0,
+; CHECK: .param .u64 func_param_1,
+; CHECK: .param .u32 func_param_2
+define void @func(ptr nocapture readonly %input, ptr nocapture %out, i32 %n) {
+entry:
+ %0 = addrspacecast ptr %out to ptr addrspace(1)
+ %1 = addrspacecast ptr %input to ptr addrspace(1)
+ %getElem = getelementptr inbounds %struct.Large, ptr addrspace(1) %1, i64 0, i32 0, i64 5
+ %tmp2 = load i32, ptr addrspace(1) %getElem, align 8
+ store i32 %tmp2, ptr addrspace(1) %0, align 4
+ ret void
+}
+
+!nvvm.annotations = !{!0, !1}
+!0 = !{ptr @func_align, !"kernel", i32 1}
+!1 = !{ptr @func, !"kernel", i32 1}
\ No newline at end of file
>From a952cc1c655125829e49d11b46d7979b9052a671 Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Thu, 1 Feb 2024 19:44:36 -0800
Subject: [PATCH 02/12] Rearrange code, add comment
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 0a0fbff2ad6c1..4d2da1f56050c 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1589,11 +1589,16 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
if (isKernelFunc) {
if (PTy) {
// Special handling for pointer arguments to kernel
+ // CUDA kernels assume that pointers are in global address space
+ // See:
+ // https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parameter-state-space
O << "\t.param .u" << PTySizeInBits << " ";
- if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() !=
- NVPTX::CUDA) {
- int addrSpace = PTy->getAddressSpace();
+ int addrSpace = PTy->getAddressSpace();
+ if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() == NVPTX::CUDA) {
+ assert(addrSpace == 0 && "Invalid address space");
+ O << ".ptr .global ";
+ } else {
switch (addrSpace) {
default:
O << ".ptr ";
@@ -1608,13 +1613,9 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
O << ".ptr .global ";
break;
}
- Align ParamAlign = I->getParamAlign().valueOrOne();
- O << ".align " << ParamAlign.value() << " ";
- } else if (I->getParamAlign().valueOrOne() != 1) {
- O << ".ptr .global ";
- Align ParamAlign = I->getParamAlign().value();
- O << ".align " << ParamAlign.value() << " ";
}
+ Align ParamAlign = I->getParamAlign().valueOrOne();
+ O << ".align " << ParamAlign.value() << " ";
O << TLI->getParamName(F, paramIndex);
continue;
}
>From f5e72769cf3357c4ac18eb8295498d54d08343ad Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Thu, 1 Feb 2024 19:50:49 -0800
Subject: [PATCH 03/12] Fixed clang formatting
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 4d2da1f56050c..f7e5ce2e0f85a 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1595,7 +1595,8 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
O << "\t.param .u" << PTySizeInBits << " ";
int addrSpace = PTy->getAddressSpace();
- if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() == NVPTX::CUDA) {
+ if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() ==
+ NVPTX::CUDA) {
assert(addrSpace == 0 && "Invalid address space");
O << ".ptr .global ";
} else {
>From 761d8a0aeeef340948181bc92ac0f290aaccb051 Mon Sep 17 00:00:00 2001
From: Vandana2896 <129426835+Vandana2896 at users.noreply.github.com>
Date: Tue, 20 Feb 2024 14:50:55 -0800
Subject: [PATCH 04/12] Update NVPTXAsmPrinter.cpp
Clang formatting reverted.
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index f7e5ce2e0f85a..4d2da1f56050c 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1595,8 +1595,7 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
O << "\t.param .u" << PTySizeInBits << " ";
int addrSpace = PTy->getAddressSpace();
- if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() ==
- NVPTX::CUDA) {
+ if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() == NVPTX::CUDA) {
assert(addrSpace == 0 && "Invalid address space");
O << ".ptr .global ";
} else {
>From 3d49f303bf577c7ef5e308d30d92236a0899e7c8 Mon Sep 17 00:00:00 2001
From: Vandana2896 <129426835+Vandana2896 at users.noreply.github.com>
Date: Tue, 20 Feb 2024 15:07:09 -0800
Subject: [PATCH 05/12] Update NVPTXAsmPrinter.cpp
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 4d2da1f56050c..f7e5ce2e0f85a 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1595,7 +1595,8 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
O << "\t.param .u" << PTySizeInBits << " ";
int addrSpace = PTy->getAddressSpace();
- if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() == NVPTX::CUDA) {
+ if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() ==
+ NVPTX::CUDA) {
assert(addrSpace == 0 && "Invalid address space");
O << ".ptr .global ";
} else {
>From 424667b4efa95fb996a7171f307ade2447eb86ec Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Mon, 11 Mar 2024 04:28:12 -0700
Subject: [PATCH 06/12] Update .global and .align
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 12 ++++++++++--
llvm/test/CodeGen/NVPTX/kernel-param-align.ll | 6 +++---
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index f7e5ce2e0f85a..3388edc8802fe 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1597,8 +1597,16 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
int addrSpace = PTy->getAddressSpace();
if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() ==
NVPTX::CUDA) {
+ // Special handling for pointer arguments to kernel
+ // CUDA kernels assume that pointers are in global address space
+ // See:
+ // https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parameter-state-space
assert(addrSpace == 0 && "Invalid address space");
O << ".ptr .global ";
+ if (I->getParamAlign().valueOrOne() != 1) {
+ Align ParamAlign = I->getParamAlign().value();
+ O << ".align " << ParamAlign.value() << " ";
+ }
} else {
switch (addrSpace) {
default:
@@ -1614,9 +1622,9 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
O << ".ptr .global ";
break;
}
+ Align ParamAlign = I->getParamAlign().valueOrOne();
+ O << ".align " << ParamAlign.value() << " ";
}
- Align ParamAlign = I->getParamAlign().valueOrOne();
- O << ".align " << ParamAlign.value() << " ";
O << TLI->getParamName(F, paramIndex);
continue;
}
diff --git a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
index eda45928ea305..81446a78bfc73 100644
--- a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
+++ b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
@@ -4,7 +4,7 @@
%struct.Large = type { [16 x double] }
; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
-; CHECK: .param .u64 func_align_param_1,
+; CHECK: .param .u64 .ptr .global func_align_param_1,
; CHECK: .param .u32 func_align_param_2
define void @func_align(ptr nocapture readonly align 16 %input, ptr nocapture %out, i32 %n) {
entry:
@@ -16,8 +16,8 @@ entry:
ret void
}
-; CHECK: .param .u64 func_param_0,
-; CHECK: .param .u64 func_param_1,
+; CHECK: .param .ptr .global .u64 func_param_0,
+; CHECK: .param .ptr .global .u64 func_param_1,
; CHECK: .param .u32 func_param_2
define void @func(ptr nocapture readonly %input, ptr nocapture %out, i32 %n) {
entry:
>From 391221174f7d98bbca8aeecf80d430ade1c41635 Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Mon, 11 Mar 2024 04:32:04 -0700
Subject: [PATCH 07/12] Fix comment
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 3388edc8802fe..ebdca29981157 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1588,10 +1588,6 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
if (isKernelFunc) {
if (PTy) {
- // Special handling for pointer arguments to kernel
- // CUDA kernels assume that pointers are in global address space
- // See:
- // https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parameter-state-space
O << "\t.param .u" << PTySizeInBits << " ";
int addrSpace = PTy->getAddressSpace();
>From ce29dc1282d6ed5e9540c6b8e003c2dda01a4d0f Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Thu, 25 Apr 2024 07:30:51 -0700
Subject: [PATCH 08/12] add addrspace
---
llvm/test/CodeGen/NVPTX/kernel-param-align.ll | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
index 81446a78bfc73..bc6d7844dc79e 100644
--- a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
+++ b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
@@ -5,8 +5,8 @@
; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
; CHECK: .param .u64 .ptr .global func_align_param_1,
-; CHECK: .param .u32 func_align_param_2
-define void @func_align(ptr nocapture readonly align 16 %input, ptr nocapture %out, i32 %n) {
+; CHECK: .param .u32 .ptr .global func_align_param_2
+define void @func_align(ptr nocapture readonly align 16 %input, ptr addrspace(3) nocapture %out, i32 %n) {
entry:
%0 = addrspacecast ptr %out to ptr addrspace(1)
%1 = addrspacecast ptr %input to ptr addrspace(1)
>From fbedea5e4d9681a3ba5deb3bca2ed5d5086daaf9 Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Thu, 25 Apr 2024 10:58:15 -0700
Subject: [PATCH 09/12] Fix typo
---
llvm/test/CodeGen/NVPTX/kernel-param-align.ll | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
index bc6d7844dc79e..cdf904792cdae 100644
--- a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
+++ b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
@@ -5,7 +5,7 @@
; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
; CHECK: .param .u64 .ptr .global func_align_param_1,
-; CHECK: .param .u32 .ptr .global func_align_param_2
+; CHECK: .param .u32 func_align_param_2
define void @func_align(ptr nocapture readonly align 16 %input, ptr addrspace(3) nocapture %out, i32 %n) {
entry:
%0 = addrspacecast ptr %out to ptr addrspace(1)
>From 75cce1bf3a1faa8df796387a76ca0617ea22c457 Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Thu, 25 Apr 2024 11:08:14 -0700
Subject: [PATCH 10/12] CHECK-LABEL
---
llvm/test/CodeGen/NVPTX/kernel-param-align.ll | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
index cdf904792cdae..1bd4a0f9fc04f 100644
--- a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
+++ b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
@@ -3,6 +3,7 @@
%struct.Large = type { [16 x double] }
+; CHECK-LABEL: func_align
; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
; CHECK: .param .u64 .ptr .global func_align_param_1,
; CHECK: .param .u32 func_align_param_2
@@ -16,6 +17,7 @@ entry:
ret void
}
+; CHECK-LABEL: func
; CHECK: .param .ptr .global .u64 func_param_0,
; CHECK: .param .ptr .global .u64 func_param_1,
; CHECK: .param .u32 func_param_2
>From 9fc5d6cf8f9515fd02d53032def62e996c89d5b1 Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Fri, 26 Apr 2024 18:40:08 -0700
Subject: [PATCH 11/12] Update testcase
---
llvm/test/CodeGen/NVPTX/kernel-param-align.ll | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
index 1bd4a0f9fc04f..b46972fc1044b 100644
--- a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
+++ b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
@@ -6,8 +6,8 @@
; CHECK-LABEL: func_align
; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
; CHECK: .param .u64 .ptr .global func_align_param_1,
-; CHECK: .param .u32 func_align_param_2
-define void @func_align(ptr nocapture readonly align 16 %input, ptr addrspace(3) nocapture %out, i32 %n) {
+; CHECK: .param .u64 .ptr .global func_align_param_2
+define void @func_align(ptr nocapture readonly align 16 %input, ptr nocapture %out, ptr addrspace(3) %n) {
entry:
%0 = addrspacecast ptr %out to ptr addrspace(1)
%1 = addrspacecast ptr %input to ptr addrspace(1)
@@ -18,8 +18,8 @@ entry:
}
; CHECK-LABEL: func
-; CHECK: .param .ptr .global .u64 func_param_0,
-; CHECK: .param .ptr .global .u64 func_param_1,
+; CHECK: .param .u64 .ptr .global func_param_0,
+; CHECK: .param .u64 .ptr .global func_param_1,
; CHECK: .param .u32 func_param_2
define void @func(ptr nocapture readonly %input, ptr nocapture %out, i32 %n) {
entry:
>From 14291a96612a86157d77053a77243ba90894f1ad Mon Sep 17 00:00:00 2001
From: Vandana <vandanak at nvidia.com>
Date: Mon, 20 May 2024 10:32:51 -0700
Subject: [PATCH 12/12] upadte test
---
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 1 -
llvm/test/CodeGen/NVPTX/i1-param.ll | 2 +-
llvm/test/CodeGen/NVPTX/kernel-param-align.ll | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 99d09a835436b..486ec76f60ec3 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1597,7 +1597,6 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
// CUDA kernels assume that pointers are in global address space
// See:
// https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parameter-state-space
- assert(addrSpace == 0 && "Invalid address space");
O << ".ptr .global ";
if (I->getParamAlign().valueOrOne() != 1) {
Align ParamAlign = I->getParamAlign().value();
diff --git a/llvm/test/CodeGen/NVPTX/i1-param.ll b/llvm/test/CodeGen/NVPTX/i1-param.ll
index 375752b619a58..3673ee7c77a13 100644
--- a/llvm/test/CodeGen/NVPTX/i1-param.ll
+++ b/llvm/test/CodeGen/NVPTX/i1-param.ll
@@ -8,7 +8,7 @@ target triple = "nvptx-nvidia-cuda"
; CHECK: .entry foo
; CHECK: .param .u8 foo_param_0
-; CHECK: .param .u64 foo_param_1
+; CHECK: .param .u64 .ptr .global foo_param_1
define void @foo(i1 %p, ptr %out) {
%val = zext i1 %p to i32
store i32 %val, ptr %out
diff --git a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
index b46972fc1044b..3350b4fcda83e 100644
--- a/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
+++ b/llvm/test/CodeGen/NVPTX/kernel-param-align.ll
@@ -6,7 +6,7 @@
; CHECK-LABEL: func_align
; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
; CHECK: .param .u64 .ptr .global func_align_param_1,
-; CHECK: .param .u64 .ptr .global func_align_param_2
+; CHECK: .param .u32 .ptr .global func_align_param_2
define void @func_align(ptr nocapture readonly align 16 %input, ptr nocapture %out, ptr addrspace(3) %n) {
entry:
%0 = addrspacecast ptr %out to ptr addrspace(1)
More information about the llvm-commits
mailing list