File: spirv_report_bad_input.spt

package info (click to toggle)
spirv-llvm-translator-14 14.0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,700 kB
  • sloc: cpp: 47,811; lisp: 3,704; sh: 153; python: 43; makefile: 41
file content (33 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (3)
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
; RUN: llvm-spirv %s -to-binary -o %t.spv
; The next line is to corrupt the binary file by changing its Magic Number
; RUN: echo "0" > %t_corrupted.spv && cat %t.spv >> %t_corrupted.spv
; RUN: not llvm-spirv --spirv-print-report %t_corrupted.spv 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
;
; CHECK-ERROR: Invalid SPIR-V binary

119734787 65536 393230 10 0
2 Capability Addresses
2 Capability Kernel
2 Capability LoopFuseINTEL
2 Capability BitInstructions
6 Extension "SPV_INTEL_loop_fuse"
8 Extension "SPV_KHR_bit_instructions"
5 ExtInstImport 1 "OpenCL.std"
3 MemoryModel 1 2
7 EntryPoint 6 5 "TestSatPacked"
3 Source 3 102000

5 Decorate 5 FuseLoopsInFunctionINTEL 3 1
4 TypeInt 3 32 0
2 TypeVoid 2
5 TypeFunction 4 2 3 3

5 Function 2 5 0 4
3 FunctionParameter 3 6
3 FunctionParameter 3 7

2 Label 8
4 BitReverse 3 9 6
1 Return

1 FunctionEnd