annotate llvm/test/CodeGen/AMDGPU/nullptr.ll @ 223:5f17cb93ff66 llvm-original

LLVM13 (2021/7/18)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:43:00 +0900
parents 79ff65ed7e25
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ;RUN: llc < %s -march=amdgcn -mtriple=amdgcn-- -verify-machineinstrs | FileCheck -check-prefixes=CHECK,GCN %s
anatofuz
parents:
diff changeset
2 ;RUN: llc < %s -march=r600 -mtriple=r600-- -verify-machineinstrs | FileCheck -check-prefixes=CHECK,R600 %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 %struct.S = type { i32 addrspace(5)*, i32 addrspace(1)*, i32 addrspace(4)*, i32 addrspace(3)*, i32*, i32 addrspace(2)*}
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 ; CHECK-LABEL: nullptr_priv:
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 ; CHECK-NEXT: .long -1
150
anatofuz
parents:
diff changeset
8 @nullptr_priv = global i32 addrspace(5)* addrspacecast (i32* null to i32 addrspace(5)*)
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 ; CHECK-LABEL: nullptr_glob:
anatofuz
parents:
diff changeset
11 ; GCN-NEXT: .quad 0
anatofuz
parents:
diff changeset
12 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
13 @nullptr_glob = global i32 addrspace(1)* addrspacecast (i32* null to i32 addrspace(1)*)
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 ; CHECK-LABEL: nullptr_const:
anatofuz
parents:
diff changeset
16 ; GCN-NEXT: .quad 0
anatofuz
parents:
diff changeset
17 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
18 @nullptr_const = global i32 addrspace(4)* addrspacecast (i32* null to i32 addrspace(4)*)
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 ; CHECK-LABEL: nullptr_local:
anatofuz
parents:
diff changeset
21 ; CHECK-NEXT: .long -1
anatofuz
parents:
diff changeset
22 @nullptr_local = global i32 addrspace(3)* addrspacecast (i32* null to i32 addrspace(3)*)
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24 ; CHECK-LABEL: nullptr_region:
anatofuz
parents:
diff changeset
25 ; CHECK-NEXT: .long -1
anatofuz
parents:
diff changeset
26 @nullptr_region = global i32 addrspace(2)* addrspacecast (i32* null to i32 addrspace(2)*)
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 ; CHECK-LABEL: nullptr6:
anatofuz
parents:
diff changeset
29 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
30 @nullptr6 = global i32 addrspace(6)* addrspacecast (i32* null to i32 addrspace(6)*)
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 ; CHECK-LABEL: nullptr7:
anatofuz
parents:
diff changeset
33 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
34 @nullptr7 = global i32 addrspace(7)* addrspacecast (i32* null to i32 addrspace(7)*)
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 ; CHECK-LABEL: nullptr8:
anatofuz
parents:
diff changeset
37 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
38 @nullptr8 = global i32 addrspace(8)* addrspacecast (i32* null to i32 addrspace(8)*)
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 ; CHECK-LABEL: nullptr9:
anatofuz
parents:
diff changeset
41 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
42 @nullptr9 = global i32 addrspace(9)* addrspacecast (i32* null to i32 addrspace(9)*)
anatofuz
parents:
diff changeset
43
anatofuz
parents:
diff changeset
44 ; CHECK-LABEL: nullptr10:
anatofuz
parents:
diff changeset
45 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
46 @nullptr10 = global i32 addrspace(10)* addrspacecast (i32* null to i32 addrspace(10)*)
anatofuz
parents:
diff changeset
47
anatofuz
parents:
diff changeset
48 ; CHECK-LABEL: nullptr11:
anatofuz
parents:
diff changeset
49 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
50 @nullptr11 = global i32 addrspace(11)* addrspacecast (i32* null to i32 addrspace(11)*)
anatofuz
parents:
diff changeset
51
anatofuz
parents:
diff changeset
52 ; CHECK-LABEL: nullptr12:
anatofuz
parents:
diff changeset
53 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
54 @nullptr12 = global i32 addrspace(12)* addrspacecast (i32* null to i32 addrspace(12)*)
anatofuz
parents:
diff changeset
55
anatofuz
parents:
diff changeset
56 ; CHECK-LABEL: nullptr13:
anatofuz
parents:
diff changeset
57 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
58 @nullptr13 = global i32 addrspace(13)* addrspacecast (i32* null to i32 addrspace(13)*)
anatofuz
parents:
diff changeset
59
anatofuz
parents:
diff changeset
60 ; CHECK-LABEL: nullptr14:
anatofuz
parents:
diff changeset
61 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
62 @nullptr14 = global i32 addrspace(14)* addrspacecast (i32* null to i32 addrspace(14)*)
anatofuz
parents:
diff changeset
63
anatofuz
parents:
diff changeset
64 ; CHECK-LABEL: nullptr15:
anatofuz
parents:
diff changeset
65 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
66 @nullptr15 = global i32 addrspace(15)* addrspacecast (i32* null to i32 addrspace(15)*)
anatofuz
parents:
diff changeset
67
anatofuz
parents:
diff changeset
68 ; CHECK-LABEL: nullptr16:
anatofuz
parents:
diff changeset
69 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
70 @nullptr16 = global i32 addrspace(16)* addrspacecast (i32* null to i32 addrspace(16)*)
anatofuz
parents:
diff changeset
71
anatofuz
parents:
diff changeset
72 ; CHECK-LABEL: nullptr17:
anatofuz
parents:
diff changeset
73 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
74 @nullptr17 = global i32 addrspace(17)* addrspacecast (i32* null to i32 addrspace(17)*)
anatofuz
parents:
diff changeset
75
anatofuz
parents:
diff changeset
76 ; CHECK-LABEL: nullptr18:
anatofuz
parents:
diff changeset
77 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
78 @nullptr18 = global i32 addrspace(18)* addrspacecast (i32* null to i32 addrspace(18)*)
anatofuz
parents:
diff changeset
79
anatofuz
parents:
diff changeset
80 ; CHECK-LABEL: nullptr19:
anatofuz
parents:
diff changeset
81 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
82 @nullptr19 = global i32 addrspace(19)* addrspacecast (i32* null to i32 addrspace(19)*)
anatofuz
parents:
diff changeset
83
anatofuz
parents:
diff changeset
84 ; CHECK-LABEL: nullptr20:
anatofuz
parents:
diff changeset
85 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
86 @nullptr20 = global i32 addrspace(20)* addrspacecast (i32* null to i32 addrspace(20)*)
anatofuz
parents:
diff changeset
87
anatofuz
parents:
diff changeset
88 ; CHECK-LABEL: nullptr21:
anatofuz
parents:
diff changeset
89 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
90 @nullptr21 = global i32 addrspace(21)* addrspacecast (i32* null to i32 addrspace(21)*)
anatofuz
parents:
diff changeset
91
anatofuz
parents:
diff changeset
92 ; CHECK-LABEL: nullptr22:
anatofuz
parents:
diff changeset
93 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
94 @nullptr22 = global i32 addrspace(22)* addrspacecast (i32* null to i32 addrspace(22)*)
anatofuz
parents:
diff changeset
95
anatofuz
parents:
diff changeset
96 ; CHECK-LABEL: nullptr23:
anatofuz
parents:
diff changeset
97 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
98 @nullptr23 = global i32 addrspace(23)* addrspacecast (i32* null to i32 addrspace(23)*)
anatofuz
parents:
diff changeset
99
anatofuz
parents:
diff changeset
100 ; CHECK-LABEL: structWithPointers:
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
101 ; CHECK-NEXT: .long -1
150
anatofuz
parents:
diff changeset
102 ; GCN-NEXT: .zero 4
anatofuz
parents:
diff changeset
103 ; GCN-NEXT: .quad 0
anatofuz
parents:
diff changeset
104 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
105 ; GCN-NEXT: .quad 0
anatofuz
parents:
diff changeset
106 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
107 ; CHECK-NEXT: .long -1
anatofuz
parents:
diff changeset
108 ; GCN-NEXT: .zero 4
anatofuz
parents:
diff changeset
109 ; GCN-NEXT: .quad 0
anatofuz
parents:
diff changeset
110 ; R600-NEXT: .long 0
anatofuz
parents:
diff changeset
111 ; CHECK-NEXT: .long -1
anatofuz
parents:
diff changeset
112 ; GCN-NEXT: .zero 4
anatofuz
parents:
diff changeset
113 @structWithPointers = addrspace(1) global %struct.S {
anatofuz
parents:
diff changeset
114 i32 addrspace(5)* addrspacecast (i32* null to i32 addrspace(5)*),
anatofuz
parents:
diff changeset
115 i32 addrspace(1)* addrspacecast (i32* null to i32 addrspace(1)*),
anatofuz
parents:
diff changeset
116 i32 addrspace(4)* addrspacecast (i32* null to i32 addrspace(4)*),
anatofuz
parents:
diff changeset
117 i32 addrspace(3)* addrspacecast (i32* null to i32 addrspace(3)*),
anatofuz
parents:
diff changeset
118 i32* null,
anatofuz
parents:
diff changeset
119 i32 addrspace(2)* addrspacecast (i32* null to i32 addrspace(2)*)}, align 4