Skip to content

Commit 0a0df33

Browse files
committed
sort kernel's names which use asserts. refuse of CHECK-DAG.
Kernel's names in tests are sorted so that order of checking was strictly fixed.
1 parent d734118 commit 0a0df33

File tree

6 files changed

+118
-104
lines changed

6 files changed

+118
-104
lines changed

llvm/test/tools/sycl-post-link/assert-indirect-with-split-2.ll

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
; marked as using asserts.
1010

1111
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
12-
; RUN: FileCheck %s -input-file=%t_0.prop --implicit-check-not main_TU0_kernel1
12+
; RUN: FileCheck %s -input-file=%t_0.prop
1313

1414
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
1515
target triple = "spir64-unknown-linux"
@@ -24,17 +24,15 @@ target triple = "spir64-unknown-linux"
2424

2525
; CHECK: [SYCL/assert used]
2626

27-
; CHECK-DAG: main_TU1_kernel1
28-
define dso_local spir_kernel void @main_TU1_kernel1() #2 {
27+
define dso_local spir_func void @foo() #2 {
2928
entry:
30-
call spir_func void @foo()
31-
call spir_func void @bar()
29+
call spir_func void @_Z4foo1v()
3230
ret void
3331
}
3432

35-
define dso_local spir_func void @foo() #2 {
36-
entry:
37-
call spir_func void @_Z4foo1v()
33+
; CHECK-NOT: empty_kernel
34+
define dso_local spir_kernel void @empty_kernel() {
35+
%1 = ptrtoint void ()* @bar to i64
3836
ret void
3937
}
4038

@@ -45,13 +43,14 @@ entry:
4543
ret void
4644
}
4745

48-
; CHECK-DAG: main_TU0_kernel0
46+
; CHECK: main_TU0_kernel0
4947
define dso_local spir_kernel void @main_TU0_kernel0() #0 {
5048
entry:
5149
call spir_func void @_Z3foov() ; call assert
5250
ret void
5351
}
5452

53+
5554
define dso_local spir_func void @_Z3foov() {
5655
entry:
5756
%a = alloca i32, align 4
@@ -63,6 +62,7 @@ entry:
6362
ret void
6463
}
6564

65+
; CHECK-NOT: main_TU0_kernel1
6666
define dso_local spir_kernel void @main_TU0_kernel1() #0 {
6767
entry:
6868
call spir_func void @_Z4foo1v()
@@ -77,7 +77,7 @@ entry:
7777
ret void
7878
}
7979

80-
; CHECK-DAG: main_TU1_kernel0
80+
; CHECK: main_TU1_kernel0
8181
define dso_local spir_kernel void @main_TU1_kernel0() #2 {
8282
entry:
8383
call spir_func void @_Z3foov() ; call assert
@@ -96,6 +96,13 @@ entry:
9696
ret void
9797
}
9898

99+
; CHECK: main_TU1_kernel1
100+
define dso_local spir_kernel void @main_TU1_kernel1() #2 {
101+
entry:
102+
call spir_func void @foo()
103+
call spir_func void @bar()
104+
ret void
105+
}
99106

100107
; Function Attrs: convergent norecurse mustprogress
101108
define weak dso_local spir_func void @__assert_fail(i8 addrspace(4)* %expr, i8 addrspace(4)* %file, i32 %line, i8 addrspace(4)* %func) local_unnamed_addr {

llvm/test/tools/sycl-post-link/assert-indirect-with-split.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ target triple = "spir64-unknown-linux"
2222

2323
; CHECK: [SYCL/assert used]
2424

25-
; CHECK-DAG: main_TU0_kernel0
25+
; CHECK: main_TU0_kernel0
2626
define dso_local spir_kernel void @main_TU0_kernel0() #0 {
2727
entry:
2828
call spir_func void @_Z3foov()
@@ -40,7 +40,7 @@ entry:
4040
ret void
4141
}
4242

43-
; CHECK-DAG: main_TU0_kernel1
43+
; CHECK: main_TU0_kernel1
4444
define dso_local spir_kernel void @main_TU0_kernel1() #0 {
4545
entry:
4646
call spir_func void @_Z4foo1v()
@@ -55,14 +55,14 @@ entry:
5555
ret void
5656
}
5757

58-
; CHECK-DAG: main_TU1_kernel0
58+
; CHECK: main_TU1_kernel0
5959
define dso_local spir_kernel void @main_TU1_kernel0() #2 {
6060
entry:
6161
call spir_func void @_Z3foov()
6262
ret void
6363
}
6464

65-
; CHECK-DAG: main_TU1_kernel1
65+
; CHECK: main_TU1_kernel1
6666
define dso_local spir_kernel void @main_TU1_kernel1() #2 {
6767
entry:
6868
call spir_func void @_Z4foo2v()

llvm/test/tools/sycl-post-link/assert-property-1.ll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ entry:
5757
ret void
5858
}
5959

60+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE10TheKernel3
61+
; Function Attrs: convergent norecurse
62+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE10TheKernel3"() #0 {
63+
entry:
64+
call spir_func void @"_ZZZ4mainENK3$_0clERN2cl4sycl7handlerEENKUlNS1_4itemILi2ELb1EEEE1_clES5_"()
65+
ret void
66+
}
67+
6068
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE9TheKernel
6169
; Function Attrs: convergent norecurse
6270
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE9TheKernel"() #0 {
@@ -94,14 +102,6 @@ entry:
94102
ret void
95103
}
96104

97-
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE10TheKernel3
98-
; Function Attrs: convergent norecurse
99-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE10TheKernel3"() #0 {
100-
entry:
101-
call spir_func void @"_ZZZ4mainENK3$_0clERN2cl4sycl7handlerEENKUlNS1_4itemILi2ELb1EEEE1_clES5_"()
102-
ret void
103-
}
104-
105105
; Function Attrs: convergent norecurse mustprogress
106106
define weak dso_local spir_func void @__assert_fail(i8 addrspace(4)* %expr, i8 addrspace(4)* %file, i32 %line, i8 addrspace(4)* %func) {
107107
entry:

llvm/test/tools/sycl-post-link/assert-property-2.ll

Lines changed: 72 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; graph.
44

55
; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.table
6-
; RUN: FileCheck %s -input-file=%t_0.prop --implicit-check-not _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel6
6+
; RUN: FileCheck %s -input-file=%t_0.prop
77

88
; SYCL source:
99
; void assert_func() {
@@ -122,15 +122,84 @@ entry:
122122
ret void
123123
}
124124

125-
; CHECK-DAG: _ZTSZZ4mainENKUlRN2cl4sycl7handlerEE_clES2_E7Kernel9
125+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE6Kernel
126+
; Function Attrs: convergent norecurse mustprogress
127+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE6Kernel"() local_unnamed_addr #0 {
128+
entry:
129+
call spir_func void @_Z6A_exclv()
130+
call spir_func void @_Z6B_inclv()
131+
ret void
132+
}
133+
134+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel2
135+
; Function Attrs: convergent norecurse mustprogress
136+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel2"() local_unnamed_addr #0 {
137+
entry:
138+
call spir_func void @_Z6A_inclv()
139+
call spir_func void @_Z6B_exclv()
140+
ret void
141+
}
142+
143+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel3
144+
; Function Attrs: convergent norecurse mustprogress
145+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel3"() local_unnamed_addr #0 {
146+
entry:
147+
call spir_func void @_Z6commonv()
148+
ret void
149+
}
150+
151+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel4
152+
; Function Attrs: convergent norecurse mustprogress
153+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel4"() local_unnamed_addr #0 {
154+
entry:
155+
call spir_func void @_Z7common2v()
156+
ret void
157+
}
158+
159+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel5
160+
; Function Attrs: convergent norecurse mustprogress
161+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel5"() local_unnamed_addr #0 {
162+
entry:
163+
call spir_func void @_Z6B_inclv()
164+
call spir_func void @_Z6A_exclv()
165+
ret void
166+
}
167+
168+
; CHECK-NOT: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel6
169+
; Function Attrs: convergent norecurse mustprogress
170+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel6"() local_unnamed_addr #0 {
171+
entry:
172+
call spir_func void @_Z6E_exclv()
173+
call spir_func void @_Z6E_exclv()
174+
ret void
175+
}
176+
177+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel7
178+
; Function Attrs: convergent norecurse mustprogress
179+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel7"() local_unnamed_addr #0 {
180+
entry:
181+
call spir_func void @_Z6F_inclv()
182+
call spir_func void @_Z6F_inclv()
183+
ret void
184+
}
185+
186+
; CHECK: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel8
187+
; Function Attrs: convergent norecurse mustprogress
188+
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel8"() local_unnamed_addr #0 {
189+
call spir_func void @_Z1Gv()
190+
call spir_func void @_Z1Hv()
191+
ret void
192+
}
193+
194+
; CHECK: _ZTSZZ4mainENKUlRN2cl4sycl7handlerEE_clES2_E7Kernel9
126195
; Function Attrs: convergent noinline norecurse mustprogress
127196
define weak_odr dso_local spir_kernel void @_ZTSZZ4mainENKUlRN2cl4sycl7handlerEE_clES2_E7Kernel9() #0 {
128197
entry:
129198
call spir_func void @_Z1Jv()
130199
ret void
131200
}
132201

133-
; CHECK-DAG: _ZTSZZ4mainENKUlRN2cl4sycl7handlerEE_clES2_E8Kernel10
202+
; CHECK: _ZTSZZ4mainENKUlRN2cl4sycl7handlerEE_clES2_E8Kernel10
134203
; Function Attrs: convergent noinline norecurse optnone mustprogress
135204
define weak_odr dso_local spir_kernel void @_ZTSZZ4mainENKUlRN2cl4sycl7handlerEE_clES2_E8Kernel10() #0 {
136205
entry:
@@ -164,15 +233,6 @@ entry:
164233
ret void
165234
}
166235

167-
; CHECK-DAG: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE6Kernel
168-
; Function Attrs: convergent norecurse mustprogress
169-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE6Kernel"() local_unnamed_addr #0 {
170-
entry:
171-
call spir_func void @_Z6A_exclv()
172-
call spir_func void @_Z6B_inclv()
173-
ret void
174-
}
175-
176236
; Function Attrs: convergent norecurse nounwind mustprogress
177237
define dso_local spir_func void @_Z6A_inclv() local_unnamed_addr {
178238
entry:
@@ -186,15 +246,6 @@ entry:
186246
ret void
187247
}
188248

189-
; CHECK-DAG: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel2
190-
; Function Attrs: convergent norecurse mustprogress
191-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel2"() local_unnamed_addr #0 {
192-
entry:
193-
call spir_func void @_Z6A_inclv()
194-
call spir_func void @_Z6B_exclv()
195-
ret void
196-
}
197-
198249
; Function Attrs: convergent norecurse nounwind mustprogress
199250
define dso_local spir_func void @_Z6commonv() local_unnamed_addr {
200251
entry:
@@ -216,14 +267,6 @@ entry:
216267
ret void
217268
}
218269

219-
; CHECK-DAG: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel3
220-
; Function Attrs: convergent norecurse mustprogress
221-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel3"() local_unnamed_addr #0 {
222-
entry:
223-
call spir_func void @_Z6commonv()
224-
ret void
225-
}
226-
227270
; Function Attrs: convergent norecurse nounwind mustprogress
228271
define dso_local spir_func void @_Z7common2v() local_unnamed_addr {
229272
entry:
@@ -244,53 +287,19 @@ entry:
244287
ret void
245288
}
246289

247-
; CHECK-DAG: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel4
248-
; Function Attrs: convergent norecurse mustprogress
249-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel4"() local_unnamed_addr #0 {
250-
entry:
251-
call spir_func void @_Z7common2v()
252-
ret void
253-
}
254-
255-
; CHECK-DAG: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel5
256-
; Function Attrs: convergent norecurse mustprogress
257-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel5"() local_unnamed_addr #0 {
258-
entry:
259-
call spir_func void @_Z6B_inclv()
260-
call spir_func void @_Z6A_exclv()
261-
ret void
262-
}
263-
264290
; Function Attrs: nofree norecurse nosync nounwind readnone willreturn mustprogress
265291
define dso_local spir_func void @_Z6E_exclv() local_unnamed_addr {
266292
entry:
267293
ret void
268294
}
269295

270-
; Function Attrs: convergent norecurse mustprogress
271-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel6"() local_unnamed_addr #0 {
272-
entry:
273-
call spir_func void @_Z6E_exclv()
274-
call spir_func void @_Z6E_exclv()
275-
ret void
276-
}
277-
278296
; Function Attrs: convergent norecurse nounwind mustprogress
279297
define dso_local spir_func void @_Z6F_inclv() local_unnamed_addr {
280298
entry:
281299
call spir_func void @_Z11assert_funcv()
282300
ret void
283301
}
284302

285-
; CHECK-DAG: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel7
286-
; Function Attrs: convergent norecurse mustprogress
287-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel7"() local_unnamed_addr #0 {
288-
entry:
289-
call spir_func void @_Z6F_inclv()
290-
call spir_func void @_Z6F_inclv()
291-
ret void
292-
}
293-
294303
; Function Attrs: convergent inlinehint norecurse nounwind mustprogress
295304
define internal spir_func void @"_ZZZ4mainENK3$_0clERN2cl4sycl7handlerEENKUlNS1_2idILi1EEEE6_clES5_"() unnamed_addr align 2 {
296305
entry:
@@ -327,14 +336,6 @@ entry:
327336
ret void
328337
}
329338

330-
; CHECK-DAG: _ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel8
331-
; Function Attrs: convergent norecurse mustprogress
332-
define weak_odr dso_local spir_kernel void @"_ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEE7Kernel8"() local_unnamed_addr #0 {
333-
call spir_func void @_Z1Gv()
334-
call spir_func void @_Z1Hv()
335-
ret void
336-
}
337-
338339
; Function Attrs: convergent norecurse mustprogress
339340
define weak dso_local spir_func void @__assert_fail(i8 addrspace(4)* %expr, i8 addrspace(4)* %file, i32 %line, i8 addrspace(4)* %func) local_unnamed_addr {
340341
entry:

0 commit comments

Comments
 (0)