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