aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/NVPTX/addrspacecast-gvar.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/NVPTX/addrspacecast-gvar.ll')
-rw-r--r--test/CodeGen/NVPTX/addrspacecast-gvar.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/NVPTX/addrspacecast-gvar.ll b/test/CodeGen/NVPTX/addrspacecast-gvar.ll
new file mode 100644
index 0000000..6afbdb8
--- /dev/null
+++ b/test/CodeGen/NVPTX/addrspacecast-gvar.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
+
+; CHECK: .visible .global .align 4 .u32 g = 42;
+; CHECK: .visible .global .align 4 .u32 g2 = generic(g);
+; CHECK: .visible .global .align 4 .u32 g3 = g;
+
+@g = addrspace(1) global i32 42
+@g2 = addrspace(1) global i32* addrspacecast (i32 addrspace(1)* @g to i32*)
+@g3 = addrspace(1) global i32 addrspace(1)* @g