File: composite_construct_struct_non_constant.spt

package info (click to toggle)
spirv-llvm-translator-21 21.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,620 kB
  • sloc: cpp: 47,835; ansic: 6,283; lisp: 3,878; sh: 162; python: 58; makefile: 42
file content (48 lines) | stat: -rw-r--r-- 1,348 bytes parent folder | download | duplicates (7)
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
; RUN: llvm-spirv %s -to-binary -o %t.spv
; RUN: spirv-val %t.spv
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
; RUN: llvm-dis %t.rev.bc
; RUN: FileCheck < %t.rev.ll %s

; CHECK: %[[StructTy:[0-9a-z.]+]] = type { float, i32 }
; CHECK: %[[#StructPtr:]] = alloca %[[StructTy]]
; CHECK: %[[GEP:[0-9a-z.]+]] = getelementptr inbounds %[[StructTy]], ptr %[[#StructPtr]], i32 0, i32 0
; CHECK: store float %[[#]], ptr %[[GEP]]
; CHECK: %[[GEP1:[0-9a-z.]+]] = getelementptr inbounds %[[StructTy]], ptr %[[#StructPtr]], i32 0, i32 1
; CHECK: store i32 %[[#]], ptr %[[GEP1]]
; CHECK: %[[LoadStr:[0-9a-z.]+]] = load %[[StructTy]], ptr %[[#StructPtr]]
; CHECK: ret %[[StructTy]] %[[LoadStr]]

119734787 65536 393230 23 0 
2 Capability Addresses 
2 Capability Linkage 
2 Capability Kernel 
5 ExtInstImport 1 "OpenCL.std" 
3 MemoryModel 2 2 
3 Source 0 0 
5 Name 2 "structtype" 
9 Name 6 "non_constant_struct_fields" 
11 Decorate 6 LinkageAttributes "non_constant_struct_fields" Export 
4 Decorate 9 Alignment 4 
4 Decorate 11 Alignment 4 
4 TypeInt 4 32 0 
4 Constant 4 17 0 
4 Constant 4 20 1 
3 TypeFloat 3 32 
4 TypeStruct 2 3 4 

3 TypeFunction 5 2 
4 TypePointer 8 7 4 
4 TypePointer 10 7 3 

5 Function 2 6 0 5 

2 Label 7 
4 Variable 8 9 7 
4 Variable 10 11 7 
4 Load 4 12 9 
4 Load 3 13 11 
5 CompositeConstruct 2 14 13 12
2 ReturnValue 14 

1 FunctionEnd