1 ; RUN: llc -mtriple=r600 -mcpu=redwood -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
2 ; RUN: FileCheck --check-prefix=BUG64 %s < %t
4 ; RUN: llc -mtriple=r600 -mcpu=sumo -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
5 ; RUN: FileCheck --check-prefix=BUG64 %s < %t
7 ; RUN: llc -mtriple=r600 -mcpu=barts -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
8 ; RUN: FileCheck --check-prefix=BUG64 %s < %t
10 ; RUN: llc -mtriple=r600 -mcpu=turks -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
11 ; RUN: FileCheck --check-prefix=BUG64 %s < %t
13 ; RUN: llc -mtriple=r600 -mcpu=caicos -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
14 ; RUN: FileCheck --check-prefix=BUG64 %s < %t
16 ; RUN: llc -mtriple=r600 -mcpu=cedar -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
17 ; RUN: FileCheck --check-prefix=BUG32 %s < %t
19 ; RUN: llc -mtriple=r600 -mcpu=juniper -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
20 ; RUN: FileCheck --check-prefix=NOBUG %s < %t
22 ; RUN: llc -mtriple=r600 -mcpu=cypress -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
23 ; RUN: FileCheck --check-prefix=NOBUG %s < %t
25 ; RUN: llc -mtriple=r600 -mcpu=cayman -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC
26 ; RUN: FileCheck --check-prefix=NOBUG %s < %t
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.
34 ; BUG64-NOT: Applying bug work-around
35 ; BUG32-NOT: Applying bug work-around
36 ; NOBUG-NOT: Applying bug work-around
37 ; FUNC-LABEL: {{^}}nested3:
38 define amdgpu_kernel void @nested3(ptr addrspace(1) %out, i32 %cond) {
40 %0 = icmp sgt i32 %cond, 0
41 br i1 %0, label %if.1, label %end
44 %1 = icmp sgt i32 %cond, 10
45 br i1 %1, label %if.2, label %if.store.1
48 store i32 1, ptr addrspace(1) %out
52 %2 = icmp sgt i32 %cond, 20
53 br i1 %2, label %if.3, label %if.2.store
56 store i32 2, ptr addrspace(1) %out
60 store i32 3, ptr addrspace(1) %out
67 ; BUG64: Applying bug work-around
68 ; BUG32-NOT: Applying bug work-around
69 ; NOBUG-NOT: Applying bug work-around
70 ; FUNC-LABEL: {{^}}nested4:
71 define amdgpu_kernel void @nested4(ptr addrspace(1) %out, i32 %cond) {
73 %0 = icmp sgt i32 %cond, 0
74 br i1 %0, label %if.1, label %end
77 %1 = icmp sgt i32 %cond, 10
78 br i1 %1, label %if.2, label %if.1.store
81 store i32 1, ptr addrspace(1) %out
85 %2 = icmp sgt i32 %cond, 20
86 br i1 %2, label %if.3, label %if.2.store
89 store i32 2, ptr addrspace(1) %out
93 %3 = icmp sgt i32 %cond, 30
94 br i1 %3, label %if.4, label %if.3.store
97 store i32 3, ptr addrspace(1) %out
101 store i32 4, ptr addrspace(1) %out
108 ; BUG64: Applying bug work-around
109 ; BUG32-NOT: Applying bug work-around
110 ; NOBUG-NOT: Applying bug work-around
111 ; FUNC-LABEL: {{^}}nested7:
112 define amdgpu_kernel void @nested7(ptr addrspace(1) %out, i32 %cond) {
114 %0 = icmp sgt i32 %cond, 0
115 br i1 %0, label %if.1, label %end
118 %1 = icmp sgt i32 %cond, 10
119 br i1 %1, label %if.2, label %if.1.store
122 store i32 1, ptr addrspace(1) %out
126 %2 = icmp sgt i32 %cond, 20
127 br i1 %2, label %if.3, label %if.2.store
130 store i32 2, ptr addrspace(1) %out
134 %3 = icmp sgt i32 %cond, 30
135 br i1 %3, label %if.4, label %if.3.store
138 store i32 3, ptr addrspace(1) %out
142 %4 = icmp sgt i32 %cond, 40
143 br i1 %4, label %if.5, label %if.4.store
146 store i32 4, ptr addrspace(1) %out
150 %5 = icmp sgt i32 %cond, 50
151 br i1 %5, label %if.6, label %if.5.store
154 store i32 5, ptr addrspace(1) %out
158 %6 = icmp sgt i32 %cond, 60
159 br i1 %6, label %if.7, label %if.6.store
162 store i32 6, ptr addrspace(1) %out
166 store i32 7, ptr addrspace(1) %out
173 ; BUG64: Applying bug work-around
174 ; BUG32: Applying bug work-around
175 ; NOBUG-NOT: Applying bug work-around
176 ; FUNC-LABEL: {{^}}nested8:
177 define amdgpu_kernel void @nested8(ptr addrspace(1) %out, i32 %cond) {
179 %0 = icmp sgt i32 %cond, 0
180 br i1 %0, label %if.1, label %end
183 %1 = icmp sgt i32 %cond, 10
184 br i1 %1, label %if.2, label %if.1.store
187 store i32 1, ptr addrspace(1) %out
191 %2 = icmp sgt i32 %cond, 20
192 br i1 %2, label %if.3, label %if.2.store
195 store i32 2, ptr addrspace(1) %out
199 %3 = icmp sgt i32 %cond, 30
200 br i1 %3, label %if.4, label %if.3.store
203 store i32 3, ptr addrspace(1) %out
207 %4 = icmp sgt i32 %cond, 40
208 br i1 %4, label %if.5, label %if.4.store
211 store i32 4, ptr addrspace(1) %out
215 %5 = icmp sgt i32 %cond, 50
216 br i1 %5, label %if.6, label %if.5.store
219 store i32 5, ptr addrspace(1) %out
223 %6 = icmp sgt i32 %cond, 60
224 br i1 %6, label %if.7, label %if.6.store
227 store i32 6, ptr addrspace(1) %out
231 %7 = icmp sgt i32 %cond, 70
232 br i1 %7, label %if.8, label %if.7.store
235 store i32 7, ptr addrspace(1) %out
239 store i32 8, ptr addrspace(1) %out