1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s --check-prefix=PTX32
2 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefix=PTX64
3 ; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -march=nvptx -mcpu=sm_20 | %ptxas-verify %}
4 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
6 ; Make sure we emit these globals in def-use order
9 ; PTX32: .visible .global .align 1 .u8 a = 2;
10 ; PTX32-NEXT: .visible .global .align 4 .u32 a2 = a;
11 ; PTX64: .visible .global .align 1 .u8 a = 2;
12 ; PTX64-NEXT: .visible .global .align 8 .u64 a2 = a;
13 @a2 = addrspace(1) global ptr addrspace(1) @a
14 @a = addrspace(1) global i8 2
17 ; PTX32: .visible .global .align 1 .u8 b = 1;
18 ; PTX32-NEXT: .visible .global .align 4 .u32 b2[2] = {b, b};
19 ; PTX64: .visible .global .align 1 .u8 b = 1;
20 ; PTX64-NEXT: .visible .global .align 8 .u64 b2[2] = {b, b};
21 @b2 = addrspace(1) global [2 x ptr addrspace(1)] [ptr addrspace(1) @b, ptr addrspace(1) @b]
22 @b = addrspace(1) global i8 1