|
1 | 1 | // RUN: %clang_cc1 -triple spir64 -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s |
2 | 2 | void bar(int &Data) {} |
3 | | -// CHECK-DAG: define{{.*}} spir_func void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef align 4 dereferenceable(4) % |
| 3 | +// CHECK-DAG: define{{.*}} void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef align 4 dereferenceable(4) % |
4 | 4 | void bar2(int &Data) {} |
5 | | -// CHECK-DAG: define{{.*}} spir_func void @[[RAW_REF2:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef align 4 dereferenceable(4) % |
| 5 | +// CHECK-DAG: define{{.*}} void @[[RAW_REF2:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef align 4 dereferenceable(4) % |
6 | 6 | void bar(__attribute__((opencl_local)) int &Data) {} |
7 | | -// CHECK-DAG: define{{.*}} spir_func void [[LOC_REF:@[a-zA-Z0-9_]+]](ptr addrspace(3) noundef align 4 dereferenceable(4) % |
| 7 | +// CHECK-DAG: define{{.*}} void [[LOC_REF:@[a-zA-Z0-9_]+]](ptr addrspace(3) noundef align 4 dereferenceable(4) % |
8 | 8 | void foo(int *Data) {} |
9 | | -// CHECK-DAG: define{{.*}} spir_func void @[[RAW_PTR:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef % |
| 9 | +// CHECK-DAG: define{{.*}} void @[[RAW_PTR:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef % |
10 | 10 | void foo2(int *Data) {} |
11 | | -// CHECK-DAG: define{{.*}} spir_func void @[[RAW_PTR2:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef % |
| 11 | +// CHECK-DAG: define{{.*}} void @[[RAW_PTR2:[a-zA-Z0-9_]+]](ptr addrspace(4) noundef % |
12 | 12 | void foo(__attribute__((opencl_local)) int *Data) {} |
13 | | -// CHECK-DAG: define{{.*}} spir_func void [[LOC_PTR:@[a-zA-Z0-9_]+]](ptr addrspace(3) noundef % |
| 13 | +// CHECK-DAG: define{{.*}} void [[LOC_PTR:@[a-zA-Z0-9_]+]](ptr addrspace(3) noundef % |
14 | 14 |
|
15 | 15 | template <typename T> |
16 | 16 | void tmpl(T t) {} |
@@ -79,65 +79,65 @@ void tmpl(T t) {} |
79 | 79 | bar(*GLOB); |
80 | 80 | // CHECK-DAG: [[GLOB_LOAD:%[a-zA-Z0-9]+]] = load ptr addrspace(1), ptr addrspace(4) [[GLOB]].ascast |
81 | 81 | // CHECK-DAG: [[GLOB_CAST:%[a-zA-Z0-9]+]] = addrspacecast ptr addrspace(1) [[GLOB_LOAD]] to ptr addrspace(4) |
82 | | - // CHECK-DAG: call spir_func void @[[RAW_REF]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[GLOB_CAST]]) |
| 82 | + // CHECK-DAG: call{{.*}} void @[[RAW_REF]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[GLOB_CAST]]) |
83 | 83 | bar2(*GLOB); |
84 | 84 | // CHECK-DAG: [[GLOB_LOAD2:%[a-zA-Z0-9]+]] = load ptr addrspace(1), ptr addrspace(4) [[GLOB]].ascast |
85 | 85 | // CHECK-DAG: [[GLOB_CAST2:%[a-zA-Z0-9]+]] = addrspacecast ptr addrspace(1) [[GLOB_LOAD2]] to ptr addrspace(4) |
86 | | - // CHECK-DAG: call spir_func void @[[RAW_REF2]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[GLOB_CAST2]]) |
| 86 | + // CHECK-DAG: call{{.*}} void @[[RAW_REF2]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[GLOB_CAST2]]) |
87 | 87 |
|
88 | 88 | bar(*LOC); |
89 | 89 | // CHECK-DAG: [[LOC_LOAD:%[a-zA-Z0-9]+]] = load ptr addrspace(3), ptr addrspace(4) [[LOC]].ascast |
90 | | - // CHECK-DAG: call spir_func void [[LOC_REF]](ptr addrspace(3) noundef align 4 dereferenceable(4) [[LOC_LOAD]]) |
| 90 | + // CHECK-DAG: call{{.*}} void [[LOC_REF]](ptr addrspace(3) noundef align 4 dereferenceable(4) [[LOC_LOAD]]) |
91 | 91 | bar2(*LOC); |
92 | 92 | // CHECK-DAG: [[LOC_LOAD2:%[a-zA-Z0-9]+]] = load ptr addrspace(3), ptr addrspace(4) [[LOC]].ascast |
93 | 93 | // CHECK-DAG: [[LOC_CAST2:%[a-zA-Z0-9]+]] = addrspacecast ptr addrspace(3) [[LOC_LOAD2]] to ptr addrspace(4) |
94 | | - // CHECK-DAG: call spir_func void @[[RAW_REF2]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[LOC_CAST2]]) |
| 94 | + // CHECK-DAG: call{{.*}} void @[[RAW_REF2]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[LOC_CAST2]]) |
95 | 95 |
|
96 | 96 | bar(*NoAS); |
97 | 97 | // CHECK-DAG: [[NoAS_LOAD:%[a-zA-Z0-9]+]] = load ptr addrspace(4), ptr addrspace(4) [[NoAS]].ascast |
98 | | - // CHECK-DAG: call spir_func void @[[RAW_REF]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[NoAS_LOAD]]) |
| 98 | + // CHECK-DAG: call{{.*}} void @[[RAW_REF]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[NoAS_LOAD]]) |
99 | 99 | bar2(*NoAS); |
100 | 100 | // CHECK-DAG: [[NoAS_LOAD2:%[a-zA-Z0-9]+]] = load ptr addrspace(4), ptr addrspace(4) [[NoAS]].ascast |
101 | | - // CHECK-DAG: call spir_func void @[[RAW_REF2]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[NoAS_LOAD2]]) |
| 101 | + // CHECK-DAG: call{{.*}} void @[[RAW_REF2]](ptr addrspace(4) noundef align 4 dereferenceable(4) [[NoAS_LOAD2]]) |
102 | 102 |
|
103 | 103 | foo(GLOB); |
104 | 104 | // CHECK-DAG: [[GLOB_LOAD3:%[a-zA-Z0-9]+]] = load ptr addrspace(1), ptr addrspace(4) [[GLOB]].ascast |
105 | 105 | // CHECK-DAG: [[GLOB_CAST3:%[a-zA-Z0-9]+]] = addrspacecast ptr addrspace(1) [[GLOB_LOAD3]] to ptr addrspace(4) |
106 | | - // CHECK-DAG: call spir_func void @[[RAW_PTR]](ptr addrspace(4) noundef [[GLOB_CAST3]]) |
| 106 | + // CHECK-DAG: call{{.*}} void @[[RAW_PTR]](ptr addrspace(4) noundef [[GLOB_CAST3]]) |
107 | 107 | foo2(GLOB); |
108 | 108 | // CHECK-DAG: [[GLOB_LOAD4:%[a-zA-Z0-9]+]] = load ptr addrspace(1), ptr addrspace(4) [[GLOB]].ascast |
109 | 109 | // CHECK-DAG: [[GLOB_CAST4:%[a-zA-Z0-9]+]] = addrspacecast ptr addrspace(1) [[GLOB_LOAD4]] to ptr addrspace(4) |
110 | | - // CHECK-DAG: call spir_func void @[[RAW_PTR2]](ptr addrspace(4) noundef [[GLOB_CAST4]]) |
| 110 | + // CHECK-DAG: call{{.*}} void @[[RAW_PTR2]](ptr addrspace(4) noundef [[GLOB_CAST4]]) |
111 | 111 | foo(LOC); |
112 | 112 | // CHECK-DAG: [[LOC_LOAD3:%[a-zA-Z0-9]+]] = load ptr addrspace(3), ptr addrspace(4) [[LOC]].ascast |
113 | | - // CHECK-DAG: call spir_func void [[LOC_PTR]](ptr addrspace(3) noundef [[LOC_LOAD3]]) |
| 113 | + // CHECK-DAG: call{{.*}} void [[LOC_PTR]](ptr addrspace(3) noundef [[LOC_LOAD3]]) |
114 | 114 | foo2(LOC); |
115 | 115 | // CHECK-DAG: [[LOC_LOAD4:%[a-zA-Z0-9]+]] = load ptr addrspace(3), ptr addrspace(4) [[LOC]].ascast |
116 | 116 | // CHECK-DAG: [[LOC_CAST4:%[a-zA-Z0-9]+]] = addrspacecast ptr addrspace(3) [[LOC_LOAD4]] to ptr addrspace(4) |
117 | | - // CHECK-DAG: call spir_func void @[[RAW_PTR2]](ptr addrspace(4) noundef [[LOC_CAST4]]) |
| 117 | + // CHECK-DAG: call{{.*}} void @[[RAW_PTR2]](ptr addrspace(4) noundef [[LOC_CAST4]]) |
118 | 118 | foo(NoAS); |
119 | 119 | // CHECK-DAG: [[NoAS_LOAD3:%[a-zA-Z0-9]+]] = load ptr addrspace(4), ptr addrspace(4) [[NoAS]].ascast |
120 | | - // CHECK-DAG: call spir_func void @[[RAW_PTR]](ptr addrspace(4) noundef [[NoAS_LOAD3]]) |
| 120 | + // CHECK-DAG: call{{.*}} void @[[RAW_PTR]](ptr addrspace(4) noundef [[NoAS_LOAD3]]) |
121 | 121 | foo2(NoAS); |
122 | 122 | // CHECK-DAG: [[NoAS_LOAD4:%[a-zA-Z0-9]+]] = load ptr addrspace(4), ptr addrspace(4) [[NoAS]].ascast |
123 | | - // CHECK-DAG: call spir_func void @[[RAW_PTR2]](ptr addrspace(4) noundef [[NoAS_LOAD4]]) |
| 123 | + // CHECK-DAG: call{{.*}} void @[[RAW_PTR2]](ptr addrspace(4) noundef [[NoAS_LOAD4]]) |
124 | 124 |
|
125 | 125 | // Ensure that we still get 3 different template instantiations. |
126 | 126 | tmpl(GLOB); |
127 | 127 | // CHECK-DAG: [[GLOB_LOAD4:%[a-zA-Z0-9]+]] = load ptr addrspace(1), ptr addrspace(4) [[GLOB]].ascast |
128 | | - // CHECK-DAG: call spir_func void @_Z4tmplIPU3AS1iEvT_(ptr addrspace(1) noundef [[GLOB_LOAD4]]) |
| 128 | + // CHECK-DAG: call{{.*}} void @_Z4tmplIPU3AS1iEvT_(ptr addrspace(1) noundef [[GLOB_LOAD4]]) |
129 | 129 | tmpl(LOC); |
130 | 130 | // CHECK-DAG: [[LOC_LOAD5:%[a-zA-Z0-9]+]] = load ptr addrspace(3), ptr addrspace(4) [[LOC]].ascast |
131 | | - // CHECK-DAG: call spir_func void @_Z4tmplIPU3AS3iEvT_(ptr addrspace(3) noundef [[LOC_LOAD5]]) |
| 131 | + // CHECK-DAG: call{{.*}} void @_Z4tmplIPU3AS3iEvT_(ptr addrspace(3) noundef [[LOC_LOAD5]]) |
132 | 132 | tmpl(PRIV); |
133 | 133 | // CHECK-DAG: [[PRIV_LOAD5:%[a-zA-Z0-9]+]] = load ptr, ptr addrspace(4) [[PRIV]].ascast |
134 | | - // CHECK-DAG: call spir_func void @_Z4tmplIPU3AS0iEvT_(ptr noundef [[PRIV_LOAD5]]) |
| 134 | + // CHECK-DAG: call{{.*}} void @_Z4tmplIPU3AS0iEvT_(ptr noundef [[PRIV_LOAD5]]) |
135 | 135 | tmpl(NoAS); |
136 | 136 | // CHECK-DAG: [[NoAS_LOAD5:%[a-zA-Z0-9]+]] = load ptr addrspace(4), ptr addrspace(4) [[NoAS]].ascast |
137 | | - // CHECK-DAG: call spir_func void @_Z4tmplIPiEvT_(ptr addrspace(4) noundef [[NoAS_LOAD5]]) |
| 137 | + // CHECK-DAG: call{{.*}} void @_Z4tmplIPiEvT_(ptr addrspace(4) noundef [[NoAS_LOAD5]]) |
138 | 138 | } |
139 | 139 |
|
140 | | -// CHECK-DAG: define linkonce_odr spir_func void @_Z4tmplIPU3AS1iEvT_(ptr addrspace(1) noundef % |
141 | | -// CHECK-DAG: define linkonce_odr spir_func void @_Z4tmplIPU3AS3iEvT_(ptr addrspace(3) noundef % |
142 | | -// CHECK-DAG: define linkonce_odr spir_func void @_Z4tmplIPU3AS0iEvT_(ptr noundef % |
143 | | -// CHECK-DAG: define linkonce_odr spir_func void @_Z4tmplIPiEvT_(ptr addrspace(4) noundef % |
| 140 | +// CHECK-DAG: define{{.*}} void @_Z4tmplIPU3AS1iEvT_(ptr addrspace(1) noundef % |
| 141 | +// CHECK-DAG: define{{.*}} void @_Z4tmplIPU3AS3iEvT_(ptr addrspace(3) noundef % |
| 142 | +// CHECK-DAG: define{{.*}} void @_Z4tmplIPU3AS0iEvT_(ptr noundef % |
| 143 | +// CHECK-DAG: define{{.*}} void @_Z4tmplIPiEvT_(ptr addrspace(4) noundef % |
0 commit comments