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 11// 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_, {{.*}})
42
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.
84
95#include " Inputs/sycl.hpp"
106
@@ -23,11 +19,17 @@ int main() {
2319 cl::sycl::ext::intel::property::buffer_location::instance<1 >>>
2420 accessorB;
2521
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_, {{.*}})
2624 cl::sycl::kernel_single_task<class kernel_function1 >(
2725 [=]() {
2826 accessorA.use ();
2927 });
3028
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: {
3133 cl::sycl::kernel_single_task<class kernel_function2 >(
3234 [=]() {
3335 accessorB.use ();
You can’t perform that action at this time.
0 commit comments