Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/NonSemantic/Shader200/FortranArray.ll

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; Translation shouldn't crash:
3 ; RUN: llvm-spirv %t.bc -spirv-text --spirv-debug-info-version=nonsemantic-shader-200 -o %t.spt
4 ; RUN: FileCheck < %t.spt %s -check-prefix=CHECK-SPIRV
5 ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200
6 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.rev.bc
7 ; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefix=CHECK-LLVM
8
9
10 ; CHECK-SPIRV: [[#CompUnit:]] [[#]] DebugCompilationUnit
11 ; CHECK-SPIRV: [[#None:]] [[#]] DebugInfoNone
12 ; CHECK-SPIRV: [[#EntryFunc:]] [[#]] DebugFunction
13 ; CHECK-SPIRV: [[#BaseTy:]] [[#]] DebugTypeBasic
14 ; CHECK-SPIRV: [[#Subrange:]] [[#]] DebugTypeSubrange
15 ; CHECK-SPIRV: DebugTypeArrayDynamic [[#BaseTy]] [[#]] [[#]] [[#None]] [[#None]] [[#Subrange]]
16 ; CHECK-SPIRV: DebugEntryPoint [[#EntryFunc]] [[#CompUnit]] [[#]] [[#]] {{$}}
17
18 ; CHECK-LLVM: !DICompileUnit(language: DW_LANG_Fortran95
19 ; CHECK-LLVM: !DICompositeType(tag: DW_TAG_array_type, baseType: ![[#BaseT:]], size: 32, elements: ![[#Elements:]], dataLocation: !DIExpression(DW_OP_push_object_address, DW_OP_deref), associated: !DIExpression(DW_OP_push_object_address, DW_OP_deref, DW_OP_constu, 0, DW_OP_or))
20 ; CHECK-LLVM: ![[#BaseT:]] = !DIBasicType(name: "INTEGER*4", size: 32, encoding: DW_ATE_signed)
21 ; CHECK-LLVM: ![[#Elements]] = !{![[#SubRange:]]}
22 ; CHECK-LLVM: ![[#SubRange]] = !DISubrange(lowerBound: !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 64, DW_OP_deref), upperBound: !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 64, DW_OP_deref, DW_OP_push_object_address, DW_OP_plus_uconst, 48, DW_OP_deref, DW_OP_plus, DW_OP_constu, 1, DW_OP_minus), stride: !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 56, DW_OP_deref))
23
24 source_filename = "llvm-link"
25 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
26 target triple = "spir64"
27
28 !llvm.module.flags = !{!5, !6, !7, !8}
29 !llvm.dbg.cu = !{!9}
30
31 !0 = !{}
32 !5 = !{i32 1, !"wchar_size", i32 4}
33 !6 = !{i32 7, !"PIC Level", i32 2}
34 !7 = !{i32 2, !"Debug Info Version", i32 3}
35 !8 = !{i32 2, !"Dwarf Version", i32 4}
36 !9 = distinct !DICompileUnit(language: DW_LANG_Fortran95, file: !10, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !0, globals: !0, imports: !22, splitDebugInlining: false, nameTableKind: None)
37 !10 = !DIFile(filename: "declare_target_subroutine.F90", directory: "/test")
38 !19 = !DIBasicType(name: "INTEGER*4", size: 32, encoding: DW_ATE_signed)
39 !22 = !{!23}
40 !23 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !24, entity: !34, file: !10, line: 24)
41 !24 = distinct !DISubprogram(name: "declare_target_subroutine", linkageName: "MAIN__", scope: !10, file: !10, line: 23, type: !25, scopeLine: 23, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !9, retainedNodes: !27)
42 !25 = !DISubroutineType(types: !26)
43 !26 = !{null}
44 !27 = !{!30}
45 !30 = !DILocalVariable(name: "a", scope: !24, file: !10, line: 28, type: !31)
46 !31 = !DICompositeType(tag: DW_TAG_array_type, baseType: !19, elements: !32, dataLocation: !DIExpression(DW_OP_push_object_address, DW_OP_deref), associated: !DIExpression(DW_OP_push_object_address, DW_OP_deref, DW_OP_constu, 0, DW_OP_or))
47 !32 = !{!33}
48 !33 = !DISubrange(lowerBound: !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 64, DW_OP_deref), upperBound: !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 64, DW_OP_deref, DW_OP_push_object_address, DW_OP_plus_uconst, 48, DW_OP_deref, DW_OP_plus, DW_OP_constu, 1, DW_OP_minus), stride: !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 56, DW_OP_deref))
49 !34 = !DIModule(scope: !24, name: "iso_fortran_env", isDecl: true)