Skip to content

Commit e27fe82

Browse files
[SYCL][NFC] Add additional test case to emit_program_metadata (#7135)
This commit adds an additional test case to emit_program_metadata for checking that the "sycl-work-group-size" gets correctly represented in program metadata. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 44aa363 commit e27fe82

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

llvm/test/tools/sycl-post-link/emit_program_metadata.ll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
; This test checks that the post-link tool generates SYCL program metadata.
22
;
3-
; RUN: sycl-post-link -emit-program-metadata -S %s -o %t.files.table
3+
; RUN: sycl-post-link -emit-program-metadata -device-globals -S %s -o %t.files.table
44
; RUN: FileCheck %s -input-file=%t.files.table --check-prefixes CHECK-TABLE
55
; RUN: FileCheck %s -input-file=%t.files_0.prop --match-full-lines --check-prefixes CHECK-PROP
66

77
target triple = "spir64-unknown-unknown"
88

9+
attributes #0 = { "sycl-work-group-size"="4,2,1" }
10+
911
!0 = !{i32 1, i32 2, i32 4}
1012

1113
define weak_odr spir_kernel void @SpirKernel1(float %arg1) !reqd_work_group_size !0 {
1214
call void @foo(float %arg1)
1315
ret void
1416
}
1517

18+
define weak_odr spir_kernel void @SpirKernel2(float %arg1) #0 {
19+
call void @foo(float %arg1)
20+
ret void
21+
}
22+
1623
declare void @foo(float)
1724

1825
; CHECK-PROP: [SYCL/program metadata]
1926
; // Base64 encoding in the prop file (including 8 bytes length):
2027
; CHECK-PROP-NEXT: SpirKernel1@reqd_work_group_size=2|gBAAAAAAAAQAAAAACAAAAQAAAAA
28+
; CHECK-PROP-NEXT: SpirKernel2@reqd_work_group_size=2|gBAAAAAAAAQAAAAACAAAAQAAAAA
2129

2230
; CHECK-TABLE: [Code|Properties]
2331
; CHECK-TABLE-NEXT: {{.*}}files_0.prop

0 commit comments

Comments
 (0)