blob: 53fe89730f3aa81969afeb824920455b3c4cc5b8 [file] [log] [blame]
Rafael Espindolade28b732015-06-12 12:20:03 +00001; RUN: llc -march=r600 -mcpu=redwood -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
2; RUN: FileCheck --check-prefix=BUG64 %s < %t
3
4; RUN: llc -march=r600 -mcpu=sumo -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
5; RUN: FileCheck --check-prefix=BUG64 %s < %t
6
7; RUN: llc -march=r600 -mcpu=barts -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
8; RUN: FileCheck --check-prefix=BUG64 %s < %t
9
10; RUN: llc -march=r600 -mcpu=turks -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
11; RUN: FileCheck --check-prefix=BUG64 %s < %t
12
13; RUN: llc -march=r600 -mcpu=caicos -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
14; RUN: FileCheck --check-prefix=BUG64 %s < %t
15
16; RUN: llc -march=r600 -mcpu=cedar -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
17; RUN: FileCheck --check-prefix=BUG32 %s < %t
18
19; RUN: llc -march=r600 -mcpu=juniper -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
20; RUN: FileCheck --check-prefix=NOBUG %s < %t
21
22; RUN: llc -march=r600 -mcpu=cypress -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
23; RUN: FileCheck --check-prefix=NOBUG %s < %t
24
25; RUN: llc -march=r600 -mcpu=cayman -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
26; RUN: FileCheck --check-prefix=NOBUG %s < %t
Tom Stellard348273d2014-01-23 16:18:02 +000027
28; REQUIRES: asserts
29
30; We are currently allocating 2 extra sub-entries on Evergreen / NI for
31; non-WQM push instructions if we change this to 1, then we will need to
32; add one level of depth to each of these tests.
33
34; BUG64-NOT: Applying bug work-around
35; BUG32-NOT: Applying bug work-around
36; NOBUG-NOT: Applying bug work-around
Tom Stellard79243d92014-10-01 17:15:17 +000037; FUNC-LABEL: {{^}}nested3:
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000038define amdgpu_kernel void @nested3(i32 addrspace(1)* %out, i32 %cond) {
Tom Stellard348273d2014-01-23 16:18:02 +000039entry:
40 %0 = icmp sgt i32 %cond, 0
41 br i1 %0, label %if.1, label %end
42
43if.1:
44 %1 = icmp sgt i32 %cond, 10
45 br i1 %1, label %if.2, label %if.store.1
46
47if.store.1:
48 store i32 1, i32 addrspace(1)* %out
49 br label %end
50
51if.2:
52 %2 = icmp sgt i32 %cond, 20
53 br i1 %2, label %if.3, label %if.2.store
54
55if.2.store:
56 store i32 2, i32 addrspace(1)* %out
57 br label %end
58
59if.3:
60 store i32 3, i32 addrspace(1)* %out
61 br label %end
62
63end:
64 ret void
65}
66
67; BUG64: Applying bug work-around
68; BUG32-NOT: Applying bug work-around
69; NOBUG-NOT: Applying bug work-around
Tom Stellard79243d92014-10-01 17:15:17 +000070; FUNC-LABEL: {{^}}nested4:
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000071define amdgpu_kernel void @nested4(i32 addrspace(1)* %out, i32 %cond) {
Tom Stellard348273d2014-01-23 16:18:02 +000072entry:
73 %0 = icmp sgt i32 %cond, 0
74 br i1 %0, label %if.1, label %end
75
76if.1:
77 %1 = icmp sgt i32 %cond, 10
78 br i1 %1, label %if.2, label %if.1.store
79
80if.1.store:
81 store i32 1, i32 addrspace(1)* %out
82 br label %end
83
84if.2:
85 %2 = icmp sgt i32 %cond, 20
86 br i1 %2, label %if.3, label %if.2.store
87
88if.2.store:
89 store i32 2, i32 addrspace(1)* %out
90 br label %end
91
92if.3:
93 %3 = icmp sgt i32 %cond, 30
94 br i1 %3, label %if.4, label %if.3.store
95
96if.3.store:
97 store i32 3, i32 addrspace(1)* %out
98 br label %end
99
100if.4:
101 store i32 4, i32 addrspace(1)* %out
102 br label %end
103
104end:
105 ret void
106}
107
108; BUG64: Applying bug work-around
109; BUG32-NOT: Applying bug work-around
110; NOBUG-NOT: Applying bug work-around
Tom Stellard79243d92014-10-01 17:15:17 +0000111; FUNC-LABEL: {{^}}nested7:
Matt Arsenault3dbeefa2017-03-21 21:39:51 +0000112define amdgpu_kernel void @nested7(i32 addrspace(1)* %out, i32 %cond) {
Tom Stellard348273d2014-01-23 16:18:02 +0000113entry:
114 %0 = icmp sgt i32 %cond, 0
115 br i1 %0, label %if.1, label %end
116
117if.1:
118 %1 = icmp sgt i32 %cond, 10
119 br i1 %1, label %if.2, label %if.1.store
120
121if.1.store:
122 store i32 1, i32 addrspace(1)* %out
123 br label %end
124
125if.2:
126 %2 = icmp sgt i32 %cond, 20
127 br i1 %2, label %if.3, label %if.2.store
128
129if.2.store:
130 store i32 2, i32 addrspace(1)* %out
131 br label %end
132
133if.3:
134 %3 = icmp sgt i32 %cond, 30
135 br i1 %3, label %if.4, label %if.3.store
136
137if.3.store:
138 store i32 3, i32 addrspace(1)* %out
139 br label %end
140
141if.4:
142 %4 = icmp sgt i32 %cond, 40
143 br i1 %4, label %if.5, label %if.4.store
144
145if.4.store:
146 store i32 4, i32 addrspace(1)* %out
147 br label %end
148
149if.5:
150 %5 = icmp sgt i32 %cond, 50
151 br i1 %5, label %if.6, label %if.5.store
152
153if.5.store:
154 store i32 5, i32 addrspace(1)* %out
155 br label %end
156
157if.6:
158 %6 = icmp sgt i32 %cond, 60
159 br i1 %6, label %if.7, label %if.6.store
160
161if.6.store:
162 store i32 6, i32 addrspace(1)* %out
163 br label %end
164
165if.7:
166 store i32 7, i32 addrspace(1)* %out
167 br label %end
168
169end:
170 ret void
171}
172
173; BUG64: Applying bug work-around
174; BUG32: Applying bug work-around
175; NOBUG-NOT: Applying bug work-around
Tom Stellard79243d92014-10-01 17:15:17 +0000176; FUNC-LABEL: {{^}}nested8:
Matt Arsenault3dbeefa2017-03-21 21:39:51 +0000177define amdgpu_kernel void @nested8(i32 addrspace(1)* %out, i32 %cond) {
Tom Stellard348273d2014-01-23 16:18:02 +0000178entry:
179 %0 = icmp sgt i32 %cond, 0
180 br i1 %0, label %if.1, label %end
181
182if.1:
183 %1 = icmp sgt i32 %cond, 10
184 br i1 %1, label %if.2, label %if.1.store
185
186if.1.store:
187 store i32 1, i32 addrspace(1)* %out
188 br label %end
189
190if.2:
191 %2 = icmp sgt i32 %cond, 20
192 br i1 %2, label %if.3, label %if.2.store
193
194if.2.store:
195 store i32 2, i32 addrspace(1)* %out
196 br label %end
197
198if.3:
199 %3 = icmp sgt i32 %cond, 30
200 br i1 %3, label %if.4, label %if.3.store
201
202if.3.store:
203 store i32 3, i32 addrspace(1)* %out
204 br label %end
205
206if.4:
207 %4 = icmp sgt i32 %cond, 40
208 br i1 %4, label %if.5, label %if.4.store
209
210if.4.store:
211 store i32 4, i32 addrspace(1)* %out
212 br label %end
213
214if.5:
215 %5 = icmp sgt i32 %cond, 50
216 br i1 %5, label %if.6, label %if.5.store
217
218if.5.store:
219 store i32 5, i32 addrspace(1)* %out
220 br label %end
221
222if.6:
223 %6 = icmp sgt i32 %cond, 60
224 br i1 %6, label %if.7, label %if.6.store
225
226if.6.store:
227 store i32 6, i32 addrspace(1)* %out
228 br label %end
229
230if.7:
231 %7 = icmp sgt i32 %cond, 70
232 br i1 %7, label %if.8, label %if.7.store
233
234if.7.store:
235 store i32 7, i32 addrspace(1)* %out
236 br label %end
237
238if.8:
239 store i32 8, i32 addrspace(1)* %out
240 br label %end
241
242end:
243 ret void
244}