|
8 | 8 | ; RUN: FileCheck %s -input-file=%t.files_2.ll --check-prefixes CHECK-MODULE2,CHECK |
9 | 9 | ; RUN: FileCheck %s -input-file=%t.files_2.sym --check-prefixes CHECK-MODULE2-TXT |
10 | 10 |
|
11 | | -;CHECK-MODULE2-NOT: @GV |
12 | | -;CHECK-MODULE1-NOT: @GV |
13 | 11 | ;CHECK-MODULE0: @GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4 |
| 12 | +;CHECK-MODULE1-NOT: @GV |
| 13 | +;CHECK-MODULE2-NOT: @GV |
14 | 14 | @GV = internal addrspace(1) constant [1 x i32] [i32 42], align 4 |
15 | 15 |
|
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 |
22 | 19 |
|
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 { |
24 | 24 | entry: |
| 25 | +; CHECK-MODULE2: call spir_func void @foo() |
25 | 26 | call spir_func void @foo() |
26 | 27 | ret void |
27 | 28 | } |
28 | 29 |
|
29 | | -; CHECK-MODULE2: define {{.*}} spir_func void @foo() |
30 | | -; CHECK-MODULE1-NOT: define {{.*}} spir_func void @foo() |
31 | 30 | ; 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() |
35 | 33 | define dso_local spir_func void @foo() { |
36 | 34 | entry: |
| 35 | +; CHECK-MODULE2: call spir_func void @bar() |
37 | 36 | call spir_func void @bar() |
38 | 37 | ret void |
39 | 38 | } |
40 | 39 |
|
41 | | -; CHECK-MODULE2: define {{.*}} spir_func void @bar() |
42 | | -; CHECK-MODULE1-NOT: define {{.*}} spir_func void @bar() |
43 | 40 | ; 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() |
45 | 43 | define linkonce_odr dso_local spir_func void @bar() { |
46 | 44 | entry: |
47 | 45 | ret void |
48 | 46 | } |
49 | 47 |
|
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 |
56 | 51 |
|
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 { |
60 | 56 | entry: |
| 57 | +; CHECK-MODULE1: call spir_func void @foo1() |
61 | 58 | call spir_func void @foo1() |
62 | 59 | ret void |
63 | 60 | } |
64 | 61 |
|
65 | | -; CHECK-MODULE2-NOT: define {{.*}} spir_func void @foo1() |
66 | | -; CHECK-MODULE1: define {{.*}} spir_func void @foo1() |
67 | 62 | ; 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() |
69 | 65 | define dso_local spir_func void @foo1() { |
70 | 66 | entry: |
71 | 67 | ret void |
72 | 68 | } |
73 | 69 |
|
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() |
79 | 70 | ; CHECK-MODULE0-TXT: TU1_kernel |
| 71 | +; CHECK-MODULE1-TXT-NOT: TU1_kernel |
| 72 | +; CHECK-MODULE2-TXT-NOT: TU1_kernel |
80 | 73 |
|
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() |
83 | 77 | define dso_local spir_kernel void @TU1_kernel() #1 { |
84 | 78 | entry: |
| 79 | +; CHECK-MODULE0: call spir_func void @foo2() |
85 | 80 | call spir_func void @foo2() |
86 | 81 | ret void |
87 | 82 | } |
88 | 83 |
|
89 | | -; CHECK-MODULE2-NOT: define {{.*}} spir_func void @foo2() |
90 | | -; CHECK-MODULE1-NOT: define {{.*}} spir_func void @foo2() |
91 | 84 | ; 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() |
93 | 87 | define dso_local spir_func void @foo2() { |
94 | 88 | entry: |
95 | 89 | ; CHECK-MODULE0: %0 = load i32, ptr addrspace(4) addrspacecast (ptr addrspace(1) @GV to ptr addrspace(4)), align 4 |
|
0 commit comments