Skip to content

[SYCL][NFC] Correct incorrect lit test #4283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions clang/test/CodeGenSYCL/accessor_no_alias_property.cpp
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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<class kernel_function1>(
[=]() {
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<class kernel_function2>(
[=]() {
accessorB.use();
Expand Down