forked from KhronosGroup/SPIRV-LLVM-Translator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opundef.spt
58 lines (48 loc) · 1.2 KB
/
opundef.spt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
119734787 65536 393230 16 0
2 Capability Addresses
2 Capability Linkage
2 Capability Kernel
5 ExtInstImport 1 "OpenCL.std"
3 MemoryModel 2 2
3 Source 3 200000
3 Name 4 "foo"
4 Name 5 "entry"
4 Name 11 "agg1"
3 Name 12 "bar"
4 Name 13 "entry"
4 Name 14 "agg2"
5 Decorate 4 LinkageAttributes "foo" Export
5 Decorate 12 LinkageAttributes "bar" Export
4 TypeInt 7 32 0
4 Constant 7 10 1
2 TypeVoid 2
3 TypeFunction 3 2
3 TypeFloat 8 32
4 TypeStruct 6 7 8
5 Function 2 4 0 3
2 Label 5
3 Undef 6 9
6 CompositeInsert 6 11 10 9 0
1 Return
1 FunctionEnd
5 Function 2 12 0 3
2 Label 13
3 Undef 6 15
6 CompositeInsert 6 14 10 15 0
1 Return
1 FunctionEnd
; FIXME: LIT comments/commands are moved at the end because llvm-spirv stops
; reading the file after first ';' symbol
; RUN: llvm-spirv %s -to-binary -o %t.spv
; RUN: llvm-spirv -r %t.spv -o %t.bc
; RUN: llvm-dis < %t.bc | FileCheck %s
; CHECK: define spir_func void @foo() #0 {
; CHECK-NEXT: entry:
; CHECK-NEXT: %agg1 = insertvalue %{{[0-9]*}} undef
; CHECK-NEXT: ret void
; CHECK-NEXT: }
; CHECK: define spir_func void @bar() #0 {
; CHECK-NEXT: entry:
; CHECK-NEXT: %agg2 = insertvalue %{{[0-9]*}} undef
; CHECK-NEXT: ret void
; CHECK-NEXT: }