File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
2
- // check that noalias parameter attribute is emitted when no_alias accessor property is used
3
- // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function1({{.*}} noalias {{.*}} %_arg_, {{.*}})
4
2
5
- // check that noalias parameter attribute is NOT emitted when it is not used
6
- // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2{{.*}} !kernel_arg_buffer_location
7
- // CHECK-NOT: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2({{.*}} noalias {{.*}}
3
+ // This test validates the behaviour of noalias parameter attribute.
8
4
9
5
#include " Inputs/sycl.hpp"
10
6
@@ -23,11 +19,17 @@ int main() {
23
19
cl::sycl::ext::intel::property::buffer_location::instance<1 >>>
24
20
accessorB;
25
21
22
+ // Check that noalias parameter attribute is emitted when no_alias accessor property is used
23
+ // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function1({{.*}} noalias {{.*}} %_arg_, {{.*}})
26
24
cl::sycl::kernel_single_task<class kernel_function1 >(
27
25
[=]() {
28
26
accessorA.use ();
29
27
});
30
28
29
+ // Check that noalias parameter attribute is NOT emitted when it is not used
30
+ // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2
31
+ // CHECK-NOT: noalias
32
+ // CHECK-SAME: {
31
33
cl::sycl::kernel_single_task<class kernel_function2 >(
32
34
[=]() {
33
35
accessorB.use ();
You can’t perform that action at this time.
0 commit comments