1- // RUN: %clangxx --offload-new-driver -fsyclbin -o %t.syclbin %s
2- // RUN: syclbin-dump %t.syclbin | FileCheck %s
1+ // RUN: %clangxx --offload-new-driver -fsyclbin=input -o %t.input.syclbin %s
2+ // RUN: %clangxx --offload-new-driver -fsyclbin=object -o %t.object.syclbin %s
3+ // RUN: %clangxx --offload-new-driver -fsyclbin=executable -o %t.executable.syclbin %s
4+ // RUN: %clangxx --offload-new-driver -fsyclbin -o %t.default.syclbin %s
5+ // RUN: syclbin-dump %t.input.syclbin | FileCheck %s --check-prefix CHECK-INPUT
6+ // RUN: syclbin-dump %t.object.syclbin | FileCheck %s --check-prefix CHECK-OBJECT
7+ // RUN: syclbin-dump %t.executable.syclbin | FileCheck %s --check-prefix CHECK-EXECUTABLE
8+ // RUN: syclbin-dump %t.default.syclbin | FileCheck %s --check-prefix CHECK-EXECUTABLE
39
410// Checks the generated SYCLBIN contents of a simple SYCL free function kernel.
511
@@ -14,17 +20,47 @@ void TestKernel(int *Ptr, int Size) {
1420}
1521}
1622
17- // CHECK: Version: {{[1-9]+}}
18- // CHECK-NEXT: Global metadata:
19- // CHECK-NEXT: SYCLBIN/global metadata:
20- // CHECK-NEXT: state: 0
21- // CHECK-NEXT: Number of Abstract Modules: 1
22- // CHECK-NEXT: Abstract Module 0:
23- // CHECK-NEXT: Metadata:
24- // CHECK: Number of IR Modules: 1
25- // CHECK-NEXT: IR module 0:
26- // CHECK-NEXT: Metadata:
27- // CHECK-NEXT: SYCLBIN/ir module metadata:
28- // CHECK-NEXT: type: 0
29- // CHECK-NEXT: Raw IR bytes: <Binary blob of {{.*}} bytes>
30- // CHECK-NEXT: Number of Native Device Code Images: 0
23+ // CHECK-INPUT: Version: {{[1-9]+}}
24+ // CHECK-INPUT-NEXT: Global metadata:
25+ // CHECK-INPUT-NEXT: SYCLBIN/global metadata:
26+ // CHECK-INPUT-NEXT: state: 0
27+ // CHECK-INPUT-NEXT: Number of Abstract Modules: 1
28+ // CHECK-INPUT-NEXT: Abstract Module 0:
29+ // CHECK-INPUT-NEXT: Metadata:
30+ // CHECK-INPUT: Number of IR Modules: 1
31+ // CHECK-INPUT-NEXT: IR module 0:
32+ // CHECK-INPUT-NEXT: Metadata:
33+ // CHECK-INPUT-NEXT: SYCLBIN/ir module metadata:
34+ // CHECK-INPUT-NEXT: type: 0
35+ // CHECK-INPUT-NEXT: Raw IR bytes: <Binary blob of {{.*}} bytes>
36+ // CHECK-INPUT-NEXT: Number of Native Device Code Images: 0
37+
38+ // CHECK-OBJECT: Version: {{[1-9]+}}
39+ // CHECK-OBJECT-NEXT: Global metadata:
40+ // CHECK-OBJECT-NEXT: SYCLBIN/global metadata:
41+ // CHECK-OBJECT-NEXT: state: 1
42+ // CHECK-OBJECT-NEXT: Number of Abstract Modules: 1
43+ // CHECK-OBJECT-NEXT: Abstract Module 0:
44+ // CHECK-OBJECT-NEXT: Metadata:
45+ // CHECK-OBJECT: Number of IR Modules: 1
46+ // CHECK-OBJECT-NEXT: IR module 0:
47+ // CHECK-OBJECT-NEXT: Metadata:
48+ // CHECK-OBJECT-NEXT: SYCLBIN/ir module metadata:
49+ // CHECK-OBJECT-NEXT: type: 0
50+ // CHECK-OBJECT-NEXT: Raw IR bytes: <Binary blob of {{.*}} bytes>
51+ // CHECK-OBJECT-NEXT: Number of Native Device Code Images: 0
52+
53+ // CHECK-EXECUTABLE: Version: {{[1-9]+}}
54+ // CHECK-EXECUTABLE-NEXT: Global metadata:
55+ // CHECK-EXECUTABLE-NEXT: SYCLBIN/global metadata:
56+ // CHECK-EXECUTABLE-NEXT: state: 2
57+ // CHECK-EXECUTABLE-NEXT: Number of Abstract Modules: 1
58+ // CHECK-EXECUTABLE-NEXT: Abstract Module 0:
59+ // CHECK-EXECUTABLE-NEXT: Metadata:
60+ // CHECK-EXECUTABLE: Number of IR Modules: 1
61+ // CHECK-EXECUTABLE-NEXT: IR module 0:
62+ // CHECK-EXECUTABLE-NEXT: Metadata:
63+ // CHECK-EXECUTABLE-NEXT: SYCLBIN/ir module metadata:
64+ // CHECK-EXECUTABLE-NEXT: type: 0
65+ // CHECK-EXECUTABLE-NEXT: Raw IR bytes: <Binary blob of {{.*}} bytes>
66+ // CHECK-EXECUTABLE-NEXT: Number of Native Device Code Images: 0
0 commit comments