Skip to content

Commit 5048063

Browse files
[SYCL][NFC] Correct incorrect lit test (#4283)
Signed-off-by: Elizabeth Andrews <[email protected]>
1 parent 248da2e commit 5048063

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

clang/test/CodeGenSYCL/accessor_no_alias_property.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
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();

0 commit comments

Comments
 (0)