1 ;RUN: llc < %s -mtriple=amdgcn-- -verify-machineinstrs | FileCheck -check-prefixes=CHECK,GCN %s
2 ;RUN: llc < %s -march=r600 -mtriple=r600-- -verify-machineinstrs | FileCheck -check-prefixes=CHECK,R600 %s
4 %struct.S = type { ptr addrspace(5), ptr addrspace(1), ptr addrspace(4), ptr addrspace(3), ptr, ptr addrspace(2)}
6 ; CHECK-LABEL: nullptr_priv:
8 @nullptr_priv = global ptr addrspace(5) addrspacecast (ptr null to ptr addrspace(5))
10 ; CHECK-LABEL: nullptr_glob:
13 @nullptr_glob = global ptr addrspace(1) addrspacecast (ptr null to ptr addrspace(1))
15 ; CHECK-LABEL: nullptr_const:
18 @nullptr_const = global ptr addrspace(4) addrspacecast (ptr null to ptr addrspace(4))
20 ; CHECK-LABEL: nullptr_local:
21 ; CHECK-NEXT: .long -1
22 @nullptr_local = global ptr addrspace(3) addrspacecast (ptr null to ptr addrspace(3))
24 ; CHECK-LABEL: nullptr_region:
25 ; CHECK-NEXT: .long -1
26 @nullptr_region = global ptr addrspace(2) addrspacecast (ptr null to ptr addrspace(2))
28 ; CHECK-LABEL: nullptr6:
30 @nullptr6 = global ptr addrspace(6) addrspacecast (ptr null to ptr addrspace(6))
32 ; FIXME: AsmPrinter can't handle 128-bit constants
33 ; FIXME-LABEL: nullptr7:
34 ; FIXME-R600-NEXT: .long 0
35 ; FIXME @nullptr7 = global ptr addrspace(7) addrspacecast (ptr null to ptr addrspace(7))
37 ; FIXME-LABEL: nullptr8:
38 ; FIXME-R600-NEXT: .long 0
39 ; FIXME @nullptr8 = global ptr addrspace(8) addrspacecast (ptr null to ptr addrspace(8))
41 ; CHECK-LABEL: nullptr9:
43 @nullptr9 = global ptr addrspace(9) addrspacecast (ptr null to ptr addrspace(9))
45 ; CHECK-LABEL: nullptr10:
47 @nullptr10 = global ptr addrspace(10) addrspacecast (ptr null to ptr addrspace(10))
49 ; CHECK-LABEL: nullptr11:
51 @nullptr11 = global ptr addrspace(11) addrspacecast (ptr null to ptr addrspace(11))
53 ; CHECK-LABEL: nullptr12:
55 @nullptr12 = global ptr addrspace(12) addrspacecast (ptr null to ptr addrspace(12))
57 ; CHECK-LABEL: nullptr13:
59 @nullptr13 = global ptr addrspace(13) addrspacecast (ptr null to ptr addrspace(13))
61 ; CHECK-LABEL: nullptr14:
63 @nullptr14 = global ptr addrspace(14) addrspacecast (ptr null to ptr addrspace(14))
65 ; CHECK-LABEL: nullptr15:
67 @nullptr15 = global ptr addrspace(15) addrspacecast (ptr null to ptr addrspace(15))
69 ; CHECK-LABEL: nullptr16:
71 @nullptr16 = global ptr addrspace(16) addrspacecast (ptr null to ptr addrspace(16))
73 ; CHECK-LABEL: nullptr17:
75 @nullptr17 = global ptr addrspace(17) addrspacecast (ptr null to ptr addrspace(17))
77 ; CHECK-LABEL: nullptr18:
79 @nullptr18 = global ptr addrspace(18) addrspacecast (ptr null to ptr addrspace(18))
81 ; CHECK-LABEL: nullptr19:
83 @nullptr19 = global ptr addrspace(19) addrspacecast (ptr null to ptr addrspace(19))
85 ; CHECK-LABEL: nullptr20:
87 @nullptr20 = global ptr addrspace(20) addrspacecast (ptr null to ptr addrspace(20))
89 ; CHECK-LABEL: nullptr21:
91 @nullptr21 = global ptr addrspace(21) addrspacecast (ptr null to ptr addrspace(21))
93 ; CHECK-LABEL: nullptr22:
95 @nullptr22 = global ptr addrspace(22) addrspacecast (ptr null to ptr addrspace(22))
97 ; CHECK-LABEL: nullptr23:
99 @nullptr23 = global ptr addrspace(23) addrspacecast (ptr null to ptr addrspace(23))
101 ; CHECK-LABEL: structWithPointers:
102 ; CHECK-NEXT: .long -1
108 ; CHECK-NEXT: .long -1
112 ; CHECK-NEXT: .long -1
114 @structWithPointers = addrspace(1) global %struct.S {
115 ptr addrspace(5) addrspacecast (ptr null to ptr addrspace(5)),
116 ptr addrspace(1) addrspacecast (ptr null to ptr addrspace(1)),
117 ptr addrspace(4) addrspacecast (ptr null to ptr addrspace(4)),
118 ptr addrspace(3) addrspacecast (ptr null to ptr addrspace(3)),
120 ptr addrspace(2) addrspacecast (ptr null to ptr addrspace(2))}, align 4