| 1 |
; RUN: llvm-spirv %s -to-binary -o %t.spv |
| 2 |
; The next line is to corrupt the binary file by changing its Magic Number |
| 3 |
; RUN: echo "0" > %t_corrupted.spv && cat %t.spv >> %t_corrupted.spv |
| 4 |
; RUN: not llvm-spirv --spirv-print-report %t_corrupted.spv 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR |
| 5 |
; |
| 6 |
; CHECK-ERROR: Invalid SPIR-V binary |
| 7 |
|
| 8 |
119734787 65536 393230 10 0 |
| 9 |
2 Capability Addresses |
| 10 |
2 Capability Kernel |
| 11 |
2 Capability LoopFuseINTEL |
| 12 |
2 Capability BitInstructions |
| 13 |
6 Extension "SPV_INTEL_loop_fuse" |
| 14 |
8 Extension "SPV_KHR_bit_instructions" |
| 15 |
5 ExtInstImport 1 "OpenCL.std" |
| 16 |
3 MemoryModel 1 2 |
| 17 |
7 EntryPoint 6 5 "TestSatPacked" |
| 18 |
3 Source 3 102000 |
| 19 |
|
| 20 |
5 Decorate 5 FuseLoopsInFunctionINTEL 3 1 |
| 21 |
4 TypeInt 3 32 0 |
| 22 |
2 TypeVoid 2 |
| 23 |
5 TypeFunction 4 2 3 3 |
| 24 |
|
| 25 |
5 Function 2 5 0 4 |
| 26 |
3 FunctionParameter 3 6 |
| 27 |
3 FunctionParameter 3 7 |
| 28 |
|
| 29 |
2 Label 8 |
| 30 |
4 BitReverse 3 9 6 |
| 31 |
1 Return |
| 32 |
|
| 33 |
1 FunctionEnd |