| 1 |
119734787 65536 458752 36 0 |
| 2 |
2 Capability Addresses |
| 3 |
2 Capability Linkage |
| 4 |
2 Capability Kernel |
| 5 |
2 Capability Int64 |
| 6 |
3 MemoryModel 2 2 |
| 7 |
9 EntryPoint 6 1 "select_if_dont_flatten" |
| 8 |
3 Source 3 102000 |
| 9 |
3 Name 2 "res" |
| 10 |
3 Name 3 "lhs" |
| 11 |
3 Name 4 "rhs" |
| 12 |
4 Decorate 5 FuncParamAttr 5 |
| 13 |
2 DecorationGroup 5 |
| 14 |
4 Decorate 6 BuiltIn 28 |
| 15 |
3 Decorate 6 Constant |
| 16 |
11 Decorate 6 LinkageAttributes "__spirv_GlobalInvocationId" Import |
| 17 |
5 GroupDecorate 5 2 3 4 |
| 18 |
4 TypeInt 7 64 0 |
| 19 |
4 TypeInt 12 32 0 |
| 20 |
5 Constant 7 13 32 0 |
| 21 |
4 Constant 12 14 0 |
| 22 |
4 TypeVector 8 7 3 |
| 23 |
4 TypePointer 9 0 8 |
| 24 |
2 TypeBool 10 |
| 25 |
2 TypeVoid 11 |
| 26 |
4 TypePointer 15 5 12 |
| 27 |
4 TypePointer 16 7 12 |
| 28 |
6 TypeFunction 17 11 15 15 15 |
| 29 |
4 Variable 9 6 0 |
| 30 |
|
| 31 |
5 Function 11 1 0 17 |
| 32 |
3 FunctionParameter 15 2 |
| 33 |
3 FunctionParameter 15 3 |
| 34 |
3 FunctionParameter 15 4 |
| 35 |
|
| 36 |
2 Label 18 |
| 37 |
4 Variable 16 27 7 |
| 38 |
4 Load 8 19 6 |
| 39 |
5 CompositeExtract 7 20 19 0 |
| 40 |
5 ShiftLeftLogical 7 21 20 13 |
| 41 |
5 ShiftRightArithmetic 7 22 21 13 |
| 42 |
5 InBoundsPtrAccessChain 15 23 3 22 |
| 43 |
6 Load 12 24 23 2 4 |
| 44 |
5 InBoundsPtrAccessChain 15 25 4 22 |
| 45 |
6 Load 12 26 25 2 4 |
| 46 |
3 Store 27 14 |
| 47 |
5 SLessThan 10 28 24 26 |
| 48 |
3 SelectionMerge 29 2 |
| 49 |
4 BranchConditional 28 30 31 |
| 50 |
|
| 51 |
2 Label 30 |
| 52 |
5 ISub 12 32 26 24 |
| 53 |
3 Store 27 32 |
| 54 |
2 Branch 29 |
| 55 |
|
| 56 |
2 Label 31 |
| 57 |
5 ISub 12 33 24 26 |
| 58 |
3 Store 27 33 |
| 59 |
2 Branch 29 |
| 60 |
|
| 61 |
2 Label 29 |
| 62 |
4 Load 12 34 27 |
| 63 |
5 InBoundsPtrAccessChain 15 35 2 22 |
| 64 |
5 Store 35 34 2 4 |
| 65 |
1 Return |
| 66 |
|
| 67 |
1 FunctionEnd |
| 68 |
; RUN: llvm-spirv %s -to-binary -o %t.spv |
| 69 |
; RUN: spirv-val %t.spv |
| 70 |
; RUN: llvm-spirv %t.spv -to-text -o %t.spt |
| 71 |
; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV |
| 72 |
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.bc |
| 73 |
|
| 74 |
; CHECK-SPIRV: 3 SelectionMerge {{[0-9]*}} 2 |
| 75 |
; CHECK-SPIRV-NEXT: 4 BranchConditional {{[0-9]*}} {{[0-9]*}} {{[0-9]*}} |