Skip to content

Commit 0a8cc6f

Browse files
committed
rework tests
1 parent e223023 commit 0a8cc6f

File tree

5 files changed

+63
-77
lines changed

5 files changed

+63
-77
lines changed

llvm/test/tools/llvm-split/SYCL/device-code-split/amd-kernel-split.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
; RUN: FileCheck %s -input-file=%tC_0.ll --check-prefixes CHECK-A0
44
; RUN: FileCheck %s -input-file=%tC_1.ll --check-prefixes CHECK-A1
55

6-
define dso_local amdgpu_kernel void @Kernel1() {
6+
define dso_local amdgpu_kernel void @KernelA() {
77
ret void
88
}
99

10-
define dso_local amdgpu_kernel void @Kernel2() {
10+
define dso_local amdgpu_kernel void @KernelB() {
1111
ret void
1212
}
1313

14-
; CHECK-A0: define dso_local amdgpu_kernel void @Kernel2()
15-
; CHECK-A0-NOT: define dso_local amdgpu_kernel void @Kernel1()
16-
; CHECK-A1-NOT: define dso_local amdgpu_kernel void @Kernel2()
17-
; CHECK-A1: define dso_local amdgpu_kernel void @Kernel1()
14+
; CHECK-A0: define dso_local amdgpu_kernel void @KernelB()
15+
; CHECK-A0-NOT: define dso_local amdgpu_kernel void @KernelA()
16+
; CHECK-A1-NOT: define dso_local amdgpu_kernel void @KernelB()
17+
; CHECK-A1: define dso_local amdgpu_kernel void @KernelA()

llvm/test/tools/llvm-split/SYCL/device-code-split/complex-indirect-call-chain.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
; Check that Module splitting can trace through more complex call stacks
22
; involving several nested indirect calls.
33

4-
;
54
; RUN: llvm-split -sycl-split=source -S < %s -o %t
65
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefix CHECK0 \
76
; RUN: --implicit-check-not @foo --implicit-check-not @kernel_A \

llvm/test/tools/llvm-split/SYCL/device-code-split/module-split-func-ptr.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefix=CHECK-IR0
88
; RUN: FileCheck %s -input-file=%t_1.ll --check-prefix=CHECK-IR1
99

10-
; CHECK-SYM0: kernel2
10+
; CHECK-SYM0: kernelA
1111
; CHECK-SYM1: kernel1
1212
;
13-
; CHECK-IR0: define dso_local spir_kernel void @kernel2
13+
; CHECK-IR0: define dso_local spir_kernel void @kernelA
1414
;
1515
; CHECK-IR1: @FuncTable = weak global ptr @func
1616
; CHECK-IR1: define {{.*}} i32 @func
@@ -29,7 +29,7 @@ entry:
2929
ret void
3030
}
3131

32-
define dso_local spir_kernel void @kernel2() #1 {
32+
define dso_local spir_kernel void @kernelA() #1 {
3333
entry:
3434
ret void
3535
}

llvm/test/tools/llvm-split/SYCL/device-code-split/one-kernel-per-module.ll

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,88 +8,82 @@
88
; RUN: FileCheck %s -input-file=%t.files_2.ll --check-prefixes CHECK-MODULE2,CHECK
99
; RUN: FileCheck %s -input-file=%t.files_2.sym --check-prefixes CHECK-MODULE2-TXT
1010

11-
;CHECK-MODULE2-NOT: @GV
12-
;CHECK-MODULE1-NOT: @GV
1311
;CHECK-MODULE0: @GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4
12+
;CHECK-MODULE1-NOT: @GV
13+
;CHECK-MODULE2-NOT: @GV
1414
@GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4
1515

16-
; CHECK-MODULE2: define dso_local spir_kernel void @TU0_kernel0
17-
; CHECK-MODULE2-TXT: TU0_kernel0
18-
; CHECK-MODULE1-NOT: define dso_local spir_kernel void @TU0_kernel0
19-
; CHECK-MODULE1-TXT-NOT: TU0_kernel0
20-
21-
; CHECK-MODULE2: call spir_func void @foo()
16+
; CHECK-MODULE0-TXT-NOT: T0_kernelA
17+
; CHECK-MODULE1-TXT-NOT: TU0_kernelA
18+
; CHECK-MODULE2-TXT: TU0_kernelA
2219

23-
define dso_local spir_kernel void @TU0_kernel0() #0 {
20+
; CHECK-MODULE0-NOT: define dso_local spir_kernel void @TU0_kernelA
21+
; CHECK-MODULE1-NOT: define dso_local spir_kernel void @TU0_kernelA
22+
; CHECK-MODULE2: define dso_local spir_kernel void @TU0_kernelA
23+
define dso_local spir_kernel void @TU0_kernelA() #0 {
2424
entry:
25+
; CHECK-MODULE2: call spir_func void @foo()
2526
call spir_func void @foo()
2627
ret void
2728
}
2829

29-
; CHECK-MODULE2: define {{.*}} spir_func void @foo()
30-
; CHECK-MODULE1-NOT: define {{.*}} spir_func void @foo()
3130
; CHECK-MODULE0-NOT: define {{.*}} spir_func void @foo()
32-
33-
; CHECK-MODULE2: call spir_func void @bar()
34-
31+
; CHECK-MODULE1-NOT: define {{.*}} spir_func void @foo()
32+
; CHECK-MODULE2: define {{.*}} spir_func void @foo()
3533
define dso_local spir_func void @foo() {
3634
entry:
35+
; CHECK-MODULE2: call spir_func void @bar()
3736
call spir_func void @bar()
3837
ret void
3938
}
4039

41-
; CHECK-MODULE2: define {{.*}} spir_func void @bar()
42-
; CHECK-MODULE1-NOT: define {{.*}} spir_func void @bar()
4340
; CHECK-MODULE0-NOT: define {{.*}} spir_func void @bar()
44-
41+
; CHECK-MODULE1-NOT: define {{.*}} spir_func void @bar()
42+
; CHECK-MODULE2: define {{.*}} spir_func void @bar()
4543
define linkonce_odr dso_local spir_func void @bar() {
4644
entry:
4745
ret void
4846
}
4947

50-
; CHECK-MODULE2-NOT: define dso_local spir_kernel void @TU0_kernel1()
51-
; CHECK-MODULE2-TXT-NOT: TU0_kernel1
52-
; CHECK-MODULE1: define dso_local spir_kernel void @TU0_kernel1()
53-
; CHECK-MODULE1-TXT: TU0_kernel1
54-
; CHECK-MODULE0-NOT: define dso_local spir_kernel void @TU0_kernel1()
55-
; CHECK-MODULE0-TXT-NOT: TU0_kernel1
48+
; CHECK-MODULE0-TXT-NOT: TU0_kernelB
49+
; CHECK-MODULE1-TXT: TU0_kernelB
50+
; CHECK-MODULE2-TXT-NOT: TU0_kernelB
5651

57-
; CHECK-MODULE1: call spir_func void @foo1()
58-
59-
define dso_local spir_kernel void @TU0_kernel1() #0 {
52+
; CHECK-MODULE0-NOT: define dso_local spir_kernel void @TU0_kernelB()
53+
; CHECK-MODULE1: define dso_local spir_kernel void @TU0_kernelB()
54+
; CHECK-MODULE2-NOT: define dso_local spir_kernel void @TU0_kernelB()
55+
define dso_local spir_kernel void @TU0_kernelB() #0 {
6056
entry:
57+
; CHECK-MODULE1: call spir_func void @foo1()
6158
call spir_func void @foo1()
6259
ret void
6360
}
6461

65-
; CHECK-MODULE2-NOT: define {{.*}} spir_func void @foo1()
66-
; CHECK-MODULE1: define {{.*}} spir_func void @foo1()
6762
; CHECK-MODULE0-NOT: define {{.*}} spir_func void @foo1()
68-
63+
; CHECK-MODULE1: define {{.*}} spir_func void @foo1()
64+
; CHECK-MODULE2-NOT: define {{.*}} spir_func void @foo1()
6965
define dso_local spir_func void @foo1() {
7066
entry:
7167
ret void
7268
}
7369

74-
; CHECK-MODULE2-NOT: define dso_local spir_kernel void @TU1_kernel()
75-
; CHECK-MODULE2-TXT-NOT: TU1_kernel
76-
; CHECK-MODULE1-NOT: define dso_local spir_kernel void @TU1_kernel()
77-
; CHECK-MODULE1-TXT-NOT: TU1_kernel
78-
; CHECK-MODULE0: define dso_local spir_kernel void @TU1_kernel()
7970
; CHECK-MODULE0-TXT: TU1_kernel
71+
; CHECK-MODULE1-TXT-NOT: TU1_kernel
72+
; CHECK-MODULE2-TXT-NOT: TU1_kernel
8073

81-
; CHECK-MODULE0: call spir_func void @foo2()
82-
74+
; CHECK-MODULE0: define dso_local spir_kernel void @TU1_kernel()
75+
; CHECK-MODULE1-NOT: define dso_local spir_kernel void @TU1_kernel()
76+
; CHECK-MODULE2-NOT: define dso_local spir_kernel void @TU1_kernel()
8377
define dso_local spir_kernel void @TU1_kernel() #1 {
8478
entry:
79+
; CHECK-MODULE0: call spir_func void @foo2()
8580
call spir_func void @foo2()
8681
ret void
8782
}
8883

89-
; CHECK-MODULE2-NOT: define {{.*}} spir_func void @foo2()
90-
; CHECK-MODULE1-NOT: define {{.*}} spir_func void @foo2()
9184
; CHECK-MODULE0: define {{.*}} spir_func void @foo2()
92-
85+
; CHECK-MODULE1-NOT: define {{.*}} spir_func void @foo2()
86+
; CHECK-MODULE2-NOT: define {{.*}} spir_func void @foo2()
9387
define dso_local spir_func void @foo2() {
9488
entry:
9589
; CHECK-MODULE0: %0 = load i32, ptr addrspace(4) addrspacecast (ptr addrspace(1) @GV to ptr addrspace(4)), align 4

llvm/test/tools/llvm-split/SYCL/device-code-split/split-by-source.ll

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,75 +11,68 @@
1111
; CHECK-TU0: @GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4
1212
@GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4
1313

14-
; CHECK-TU1: define dso_local spir_kernel void @TU1_kernel0
15-
; CHECK-TU1-TXT: TU1_kernel0
16-
; CHECK-TU0-NOT: define dso_local spir_kernel void @TU1_kernel0
17-
; CHECK-TU0-TXT-NOT: TU1_kernel0
14+
; CHECK-TU0-TXT-NOT: TU1_kernelA
15+
; CHECK-TU1-TXT: TU1_kernelA
1816

19-
; CHECK-TU1: call spir_func void @func1_TU1()
20-
21-
define dso_local spir_kernel void @TU1_kernel0() #0 {
17+
; CHECK-TU0-NOT: define dso_local spir_kernel void @TU1_kernelA
18+
; CHECK-TU1: define dso_local spir_kernel void @TU1_kernelA
19+
define dso_local spir_kernel void @TU1_kernelA() #0 {
2220
entry:
21+
; CHECK-TU1: call spir_func void @func1_TU1()
2322
call spir_func void @func1_TU1()
2423
ret void
2524
}
2625

27-
; CHECK-TU1: define {{.*}} spir_func void @func1_TU1()
2826
; CHECK-TU0-NOT: define {{.*}} spir_func void @func1_TU1()
29-
30-
; CHECK-TU1: call spir_func void @func2_TU1()
31-
27+
; CHECK-TU1: define {{.*}} spir_func void @func1_TU1()
3228
define dso_local spir_func void @func1_TU1() {
3329
entry:
30+
; CHECK-TU1: call spir_func void @func2_TU1()
3431
call spir_func void @func2_TU1()
3532
ret void
3633
}
3734

38-
; CHECK-TU1: define {{.*}} spir_func void @func2_TU1()
3935
; CHECK-TU0-NOT: define {{.*}} spir_func void @func2_TU1()
40-
36+
; CHECK-TU1: define {{.*}} spir_func void @func2_TU1()
4137
define linkonce_odr dso_local spir_func void @func2_TU1() {
4238
entry:
4339
ret void
4440
}
4541

46-
; CHECK-TU1: define dso_local spir_kernel void @TU1_kernel1()
47-
; CHECK-TU1-TXT: TU1_kernel1
48-
; CHECK-TU0-NOT: define dso_local spir_kernel void @TU1_kernel1()
49-
; CHECK-TU0-TXT-NOT: TU1_kernel1
5042

51-
; CHECK-TU1: call spir_func void @func3_TU1()
43+
; CHECK-TU0-TXT-NOT: TU1_kernelB
44+
; CHECK-TU1-TXT: TU1_kernelB
5245

53-
define dso_local spir_kernel void @TU1_kernel1() #0 {
46+
; CHECK-TU0-NOT: define dso_local spir_kernel void @TU1_kernelB()
47+
; CHECK-TU1: define dso_local spir_kernel void @TU1_kernelB()
48+
define dso_local spir_kernel void @TU1_kernelB() #0 {
5449
entry:
50+
; CHECK-TU1: call spir_func void @func3_TU1()
5551
call spir_func void @func3_TU1()
5652
ret void
5753
}
5854

59-
; CHECK-TU1: define {{.*}} spir_func void @func3_TU1()
6055
; CHECK-TU0-NOT: define {{.*}} spir_func void @func3_TU1()
61-
56+
; CHECK-TU1: define {{.*}} spir_func void @func3_TU1()
6257
define dso_local spir_func void @func3_TU1() {
6358
entry:
6459
ret void
6560
}
6661

67-
; CHECK-TU1-NOT: define dso_local spir_kernel void @TU0_kernel()
68-
; CHECK-TU1-TXT-NOT: TU0_kernel
69-
; CHECK-TU0: define dso_local spir_kernel void @TU0_kernel()
7062
; CHECK-TU0-TXT: TU0_kernel
63+
; CHECK-TU1-TXT-NOT: TU0_kernel
7164

72-
; CHECK-TU0: call spir_func void @func_TU0()
73-
65+
; CHECK-TU0: define dso_local spir_kernel void @TU0_kernel()
66+
; CHECK-TU1-NOT: define dso_local spir_kernel void @TU0_kernel()
7467
define dso_local spir_kernel void @TU0_kernel() #1 {
7568
entry:
69+
; CHECK-TU0: call spir_func void @func_TU0()
7670
call spir_func void @func_TU0()
7771
ret void
7872
}
7973

80-
; CHECK-TU1-NOT: define {{.*}} spir_func void @func_TU0()
8174
; CHECK-TU0: define {{.*}} spir_func void @func_TU0()
82-
75+
; CHECK-TU1-NOT: define {{.*}} spir_func void @func_TU0()
8376
define dso_local spir_func void @func_TU0() {
8477
entry:
8578
; CHECK-TU0: %0 = load i32, ptr addrspace(4) addrspacecast (ptr addrspace(1) @GV to ptr addrspace(4)), align 4

0 commit comments

Comments
 (0)