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
4; Make sure we emit these globals in def-use order
5
6
7; PTX32:      .visible .global .align 1 .u8 a = 2;
8; PTX32-NEXT: .visible .global .align 4 .u32 a2 = a;
9; PTX64:      .visible .global .align 1 .u8 a = 2;
10; PTX64-NEXT: .visible .global .align 8 .u64 a2 = a;
11@a2 = addrspace(1) global i8 addrspace(1)* @a
12@a = addrspace(1) global i8 2
13
14
15; PTX32:      .visible .global .align 1 .u8 b = 1;
16; PTX32-NEXT: .visible .global .align 4 .u32 b2[2] = {b, b};
17; PTX64:      .visible .global .align 1 .u8 b = 1;
18; PTX64-NEXT: .visible .global .align 8 .u64 b2[2] = {b, b};
19@b2 = addrspace(1) global [2 x i8 addrspace(1)*] [i8 addrspace(1)* @b, i8 addrspace(1)* @b]
20@b = addrspace(1) global i8 1
21