diff --git a/clang/test/CodeGenSYCL/accessor_no_alias_property.cpp b/clang/test/CodeGenSYCL/accessor_no_alias_property.cpp index 042edbbd33f9..947bd8b02a23 100644 --- a/clang/test/CodeGenSYCL/accessor_no_alias_property.cpp +++ b/clang/test/CodeGenSYCL/accessor_no_alias_property.cpp @@ -1,10 +1,6 @@ // RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s -// check that noalias parameter attribute is emitted when no_alias accessor property is used -// CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function1({{.*}} noalias {{.*}} %_arg_, {{.*}}) -// check that noalias parameter attribute is NOT emitted when it is not used -// CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2{{.*}} !kernel_arg_buffer_location -// CHECK-NOT: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2({{.*}} noalias {{.*}} +// This test validates the behaviour of noalias parameter attribute. #include "Inputs/sycl.hpp" @@ -23,11 +19,17 @@ int main() { cl::sycl::ext::intel::property::buffer_location::instance<1>>> accessorB; + // Check that noalias parameter attribute is emitted when no_alias accessor property is used + // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function1({{.*}} noalias {{.*}} %_arg_, {{.*}}) cl::sycl::kernel_single_task( [=]() { accessorA.use(); }); + // Check that noalias parameter attribute is NOT emitted when it is not used + // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2 + // CHECK-NOT: noalias + // CHECK-SAME: { cl::sycl::kernel_single_task( [=]() { accessorB.use();