Skip to content

Commit 4df2f48

Browse files
committed
Improve frontend tests
1 parent 38a8d79 commit 4df2f48

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

clang/test/CodeGenSYCL/work_group_memory.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -fsycl-int-header=%t.h %s
44
// RUN: FileCheck < %t.h %s --check-prefix CHECK-INT-HEADER
55
//
6+
// Tests for work_group_memory kernel parameter using the dummy implementation in Inputs/sycl.hpp.
7+
// The first two RUN commands verify that the init call is generated with the correct arguments in LLVM IR
8+
// and the second two RUN commands verify the contents of the integration header produced by the frontend.
9+
//
610
// CHECK-IR: define dso_local spir_kernel void @
711
// CHECK-IR-SAME: ptr addrspace(3) noundef align 4 [[PTR:%[a-zA-Z0-9_]+]]
812
//
@@ -14,8 +18,11 @@
1418
// CHECK-IR: call spir_func void @{{.*}}__init{{.*}}(ptr addrspace(4) noundef align 8 dereferenceable_or_null(8) %{{[a-zA-Z0-9_]+}}, ptr addrspace(3) noundef [[PTR_LOAD]])
1519
//
1620
// CHECK-INT-HEADER: const kernel_param_desc_t kernel_signatures[] = {
17-
// CHECK-INT-HEADER-NEXT: //{{.*}}
18-
// CHECK-INT-HEADER-NEXT: { kernel_param_kind_t::kind_work_group_memory, 8, 0 },
21+
// CHECK-INT-HEADER-NEXT: //--- _ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_EUlNS0_4itemILi1EEEE_
22+
// CHECK-INT-HEADER-NEXT: { kernel_param_kind_t::kind_work_group_memory, {{[4,8]}}, 0 },
23+
// CHECK-INT-HEADER-EMPTY:
24+
// CHECK-INT-HEADER-NEXT: { kernel_param_kind_t::kind_invalid, -987654321, -987654321 },
25+
// CHECK-INT-HEADER-NEXT: }
1926

2027
#include "Inputs/sycl.hpp"
2128

0 commit comments

Comments
 (0)