File: InvalidSourceLanguageSPIRVtoLLVM.spvasm

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 (42 lines) | stat: -rw-r--r-- 1,768 bytes parent folder | download
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
; This test checks that any invalid source language in the Compilation Unit instruction is mapped to
; DW_LANG_OpenCL and the original literal value is retained in the "Source Lang Literal" LLVM module flag metadata.

; REQUIRES: spirv-as

; RUN: spirv-as --target-env spv1.3 %s -o %t.spv
; RUN: llvm-spirv -r %t.spv -o - | llvm-dis | FileCheck %s

; SPIR-V
; Version: 1.1
; Generator: Khronos LLVM/SPIR-V Translator; 14
; Bound: 16
; Schema: 0
               OpCapability Addresses
               OpCapability Kernel
          %1 = OpExtInstImport "OpenCL.std"
          %2 = OpExtInstImport "OpenCL.DebugInfo.100"
               OpMemoryModel Physical64 OpenCL
               OpEntryPoint Kernel %5 "func"
          %7 = OpString "kernel_arg_type.func."
          %8 = OpString "/tmp/test.cl"
          %9 = OpString "//__CSK_MD5:18aa9ce738eaafc7b7b7181c19092815"
         %12 = OpString "func"
         %14 = OpString ""
               OpSource Unknown 0
               OpName %entry "entry"
               OpModuleProcessed "Debug info producer: "
       %void = OpTypeVoid
          %4 = OpTypeFunction %void
         %10 = OpExtInst %void %2 DebugSource %8 %9
         %11 = OpExtInst %void %2 DebugCompilationUnit 65536 5 %10 !0x0000002A
         %13 = OpExtInst %void %2 DebugInfoNone
         %15 = OpExtInst %void %2 DebugFunction %12 %13 %10 1 0 %11 %14 FlagIsDefinition|FlagPrototyped|FlagIsOptimized 2 %5 %13
          %5 = OpFunction %void None %4
      %entry = OpLabel
               OpReturn
               OpFunctionEnd

; CHECK: {{![0-9]+}} = !{i32 2, !"Source Lang Literal", [[LIST:![0-9]+]]}
; CHECK: [[LIST]] = !{[[ENTRY:![0-9]+]]}
; CHECK: [[ENTRY]] = !{[[CU:![0-9]+]], i32 42}
; CHECK: [[CU]] = distinct !DICompileUnit(language: DW_LANG_OpenCL