150
|
1 ;RUN: llc < %s -march=amdgcn -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
|
|
3
|
|
4 %struct.S = type { i32 addrspace(5)*, i32 addrspace(1)*, i32 addrspace(4)*, i32 addrspace(3)*, i32*, i32 addrspace(2)*}
|
|
5
|
|
6 ; CHECK-LABEL: nullptr_priv:
|
221
|
7 ; CHECK-NEXT: .long -1
|
150
|
8 @nullptr_priv = global i32 addrspace(5)* addrspacecast (i32* null to i32 addrspace(5)*)
|
|
9
|
|
10 ; CHECK-LABEL: nullptr_glob:
|
|
11 ; GCN-NEXT: .quad 0
|
|
12 ; R600-NEXT: .long 0
|
|
13 @nullptr_glob = global i32 addrspace(1)* addrspacecast (i32* null to i32 addrspace(1)*)
|
|
14
|
|
15 ; CHECK-LABEL: nullptr_const:
|
|
16 ; GCN-NEXT: .quad 0
|
|
17 ; R600-NEXT: .long 0
|
|
18 @nullptr_const = global i32 addrspace(4)* addrspacecast (i32* null to i32 addrspace(4)*)
|
|
19
|
|
20 ; CHECK-LABEL: nullptr_local:
|
|
21 ; CHECK-NEXT: .long -1
|
|
22 @nullptr_local = global i32 addrspace(3)* addrspacecast (i32* null to i32 addrspace(3)*)
|
|
23
|
|
24 ; CHECK-LABEL: nullptr_region:
|
|
25 ; CHECK-NEXT: .long -1
|
|
26 @nullptr_region = global i32 addrspace(2)* addrspacecast (i32* null to i32 addrspace(2)*)
|
|
27
|
|
28 ; CHECK-LABEL: nullptr6:
|
|
29 ; R600-NEXT: .long 0
|
|
30 @nullptr6 = global i32 addrspace(6)* addrspacecast (i32* null to i32 addrspace(6)*)
|
|
31
|
|
32 ; CHECK-LABEL: nullptr7:
|
|
33 ; R600-NEXT: .long 0
|
|
34 @nullptr7 = global i32 addrspace(7)* addrspacecast (i32* null to i32 addrspace(7)*)
|
|
35
|
|
36 ; CHECK-LABEL: nullptr8:
|
|
37 ; R600-NEXT: .long 0
|
|
38 @nullptr8 = global i32 addrspace(8)* addrspacecast (i32* null to i32 addrspace(8)*)
|
|
39
|
|
40 ; CHECK-LABEL: nullptr9:
|
|
41 ; R600-NEXT: .long 0
|
|
42 @nullptr9 = global i32 addrspace(9)* addrspacecast (i32* null to i32 addrspace(9)*)
|
|
43
|
|
44 ; CHECK-LABEL: nullptr10:
|
|
45 ; R600-NEXT: .long 0
|
|
46 @nullptr10 = global i32 addrspace(10)* addrspacecast (i32* null to i32 addrspace(10)*)
|
|
47
|
|
48 ; CHECK-LABEL: nullptr11:
|
|
49 ; R600-NEXT: .long 0
|
|
50 @nullptr11 = global i32 addrspace(11)* addrspacecast (i32* null to i32 addrspace(11)*)
|
|
51
|
|
52 ; CHECK-LABEL: nullptr12:
|
|
53 ; R600-NEXT: .long 0
|
|
54 @nullptr12 = global i32 addrspace(12)* addrspacecast (i32* null to i32 addrspace(12)*)
|
|
55
|
|
56 ; CHECK-LABEL: nullptr13:
|
|
57 ; R600-NEXT: .long 0
|
|
58 @nullptr13 = global i32 addrspace(13)* addrspacecast (i32* null to i32 addrspace(13)*)
|
|
59
|
|
60 ; CHECK-LABEL: nullptr14:
|
|
61 ; R600-NEXT: .long 0
|
|
62 @nullptr14 = global i32 addrspace(14)* addrspacecast (i32* null to i32 addrspace(14)*)
|
|
63
|
|
64 ; CHECK-LABEL: nullptr15:
|
|
65 ; R600-NEXT: .long 0
|
|
66 @nullptr15 = global i32 addrspace(15)* addrspacecast (i32* null to i32 addrspace(15)*)
|
|
67
|
|
68 ; CHECK-LABEL: nullptr16:
|
|
69 ; R600-NEXT: .long 0
|
|
70 @nullptr16 = global i32 addrspace(16)* addrspacecast (i32* null to i32 addrspace(16)*)
|
|
71
|
|
72 ; CHECK-LABEL: nullptr17:
|
|
73 ; R600-NEXT: .long 0
|
|
74 @nullptr17 = global i32 addrspace(17)* addrspacecast (i32* null to i32 addrspace(17)*)
|
|
75
|
|
76 ; CHECK-LABEL: nullptr18:
|
|
77 ; R600-NEXT: .long 0
|
|
78 @nullptr18 = global i32 addrspace(18)* addrspacecast (i32* null to i32 addrspace(18)*)
|
|
79
|
|
80 ; CHECK-LABEL: nullptr19:
|
|
81 ; R600-NEXT: .long 0
|
|
82 @nullptr19 = global i32 addrspace(19)* addrspacecast (i32* null to i32 addrspace(19)*)
|
|
83
|
|
84 ; CHECK-LABEL: nullptr20:
|
|
85 ; R600-NEXT: .long 0
|
|
86 @nullptr20 = global i32 addrspace(20)* addrspacecast (i32* null to i32 addrspace(20)*)
|
|
87
|
|
88 ; CHECK-LABEL: nullptr21:
|
|
89 ; R600-NEXT: .long 0
|
|
90 @nullptr21 = global i32 addrspace(21)* addrspacecast (i32* null to i32 addrspace(21)*)
|
|
91
|
|
92 ; CHECK-LABEL: nullptr22:
|
|
93 ; R600-NEXT: .long 0
|
|
94 @nullptr22 = global i32 addrspace(22)* addrspacecast (i32* null to i32 addrspace(22)*)
|
|
95
|
|
96 ; CHECK-LABEL: nullptr23:
|
|
97 ; R600-NEXT: .long 0
|
|
98 @nullptr23 = global i32 addrspace(23)* addrspacecast (i32* null to i32 addrspace(23)*)
|
|
99
|
|
100 ; CHECK-LABEL: structWithPointers:
|
221
|
101 ; CHECK-NEXT: .long -1
|
150
|
102 ; GCN-NEXT: .zero 4
|
|
103 ; GCN-NEXT: .quad 0
|
|
104 ; R600-NEXT: .long 0
|
|
105 ; GCN-NEXT: .quad 0
|
|
106 ; R600-NEXT: .long 0
|
|
107 ; CHECK-NEXT: .long -1
|
|
108 ; GCN-NEXT: .zero 4
|
|
109 ; GCN-NEXT: .quad 0
|
|
110 ; R600-NEXT: .long 0
|
|
111 ; CHECK-NEXT: .long -1
|
|
112 ; GCN-NEXT: .zero 4
|
|
113 @structWithPointers = addrspace(1) global %struct.S {
|
|
114 i32 addrspace(5)* addrspacecast (i32* null to i32 addrspace(5)*),
|
|
115 i32 addrspace(1)* addrspacecast (i32* null to i32 addrspace(1)*),
|
|
116 i32 addrspace(4)* addrspacecast (i32* null to i32 addrspace(4)*),
|
|
117 i32 addrspace(3)* addrspacecast (i32* null to i32 addrspace(3)*),
|
|
118 i32* null,
|
|
119 i32 addrspace(2)* addrspacecast (i32* null to i32 addrspace(2)*)}, align 4
|