1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 ; Check that this testcase does not crash.
6 target triple = "hexagon"
8 ; Function Attrs: nounwind
9 declare void @foo0() local_unnamed_addr #0
11 ; Function Attrs: nounwind
12 define void @foo1() local_unnamed_addr #0 !dbg !33 {
14 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !51, metadata !52), !dbg !53
15 tail call void @foo0(), !dbg !54
19 ; Function Attrs: nounwind readnone speculatable
20 declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
22 attributes #0 = { nounwind "disable-tail-calls"="true" "frame-pointer"="all" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv5" "target-features"=",-hvx,-long-calls" }
23 attributes #1 = { nounwind readnone speculatable }
26 !llvm.module.flags = !{!26, !27}
27 !llvm.linker.options = !{!29, !30, !31, !32, !29, !30, !31, !32, !29, !30, !31, !32, !29, !30, !31, !32, !29, !30, !31, !32, !29, !30, !31, !32}
29 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !22)
30 !1 = !DIFile(filename: "foo.i", directory: "/path")
32 !3 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !4, line: 122, size: 8, elements: !5)
33 !4 = !DIFile(filename: "foo.h", directory: "/path")
34 !5 = !{!6, !7, !8, !9, !10, !11, !12, !13, !14, !15}
35 !6 = !DIEnumerator(name: "E0", value: 7)
36 !7 = !DIEnumerator(name: "E1", value: 6)
37 !8 = !DIEnumerator(name: "E2", value: 5)
38 !9 = !DIEnumerator(name: "E3", value: 0)
39 !10 = !DIEnumerator(name: "E4", value: 1)
40 !11 = !DIEnumerator(name: "E5", value: 7)
41 !12 = !DIEnumerator(name: "E6", value: 5)
42 !13 = !DIEnumerator(name: "E7", value: 4)
43 !14 = !DIEnumerator(name: "E8", value: 4)
44 !15 = !DIEnumerator(name: "E9", value: 10)
45 !16 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !4, line: 136, size: 8, elements: !17)
46 !17 = !{!18, !19, !20, !21}
47 !18 = !DIEnumerator(name: "F0", value: 1)
48 !19 = !DIEnumerator(name: "F1", value: 2)
49 !20 = !DIEnumerator(name: "F2", value: 4)
50 !21 = !DIEnumerator(name: "F3", value: 7)
51 !22 = !{!23, !24, !25}
52 !23 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
53 !24 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
54 !25 = !DIDerivedType(tag: DW_TAG_typedef, name: "t0_t", file: !4, line: 38, baseType: !24)
55 !26 = !{i32 2, !"Debug Info Version", i32 3}
56 !27 = !{i32 6, !"Linker Options", !28}
57 !28 = !{!29, !30, !31, !32}
58 !29 = !{!"foo0", !".text"}
59 !30 = !{!"foo1", !".text"}
60 !31 = !{!"foo2", !".text"}
61 !32 = !{!"foo3", !".text"}
62 !33 = distinct !DISubprogram(name: "foo1", scope: !34, file: !34, line: 84, type: !35, isLocal: false, isDefinition: true, scopeLine: 85, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !44)
63 !34 = !DIFile(filename: "foo.c", directory: "/path")
64 !35 = !DISubroutineType(types: !36)
65 !36 = !{!37, !38, !39, !40, !41, !42, !43, !37}
66 !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
67 !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !23, size: 32)
68 !39 = !DIDerivedType(tag: DW_TAG_typedef, name: "t1_t", file: !4, line: 35, baseType: !23)
69 !40 = !DIDerivedType(tag: DW_TAG_typedef, name: "t2_t", file: !4, line: 36, baseType: !23)
70 !41 = !DIDerivedType(tag: DW_TAG_typedef, name: "t3_t", file: !4, line: 43, baseType: !23)
71 !42 = !DIDerivedType(tag: DW_TAG_typedef, name: "t4_t", file: !4, line: 133, baseType: !3)
72 !43 = !DIDerivedType(tag: DW_TAG_typedef, name: "t5_t", file: !4, line: 141, baseType: !16)
73 !44 = !{!45, !46, !47, !48, !49, !50, !51}
74 !45 = !DILocalVariable(name: "a0", arg: 1, scope: !33, file: !34, line: 84, type: !38)
75 !46 = !DILocalVariable(name: "a1", arg: 2, scope: !33, file: !34, line: 84, type: !39)
76 !47 = !DILocalVariable(name: "a2", arg: 3, scope: !33, file: !34, line: 84, type: !40)
77 !48 = !DILocalVariable(name: "a3", arg: 4, scope: !33, file: !34, line: 84, type: !41)
78 !49 = !DILocalVariable(name: "a4", arg: 5, scope: !33, file: !34, line: 84, type: !42)
79 !50 = !DILocalVariable(name: "a5", arg: 6, scope: !33, file: !34, line: 84, type: !43)
80 !51 = !DILocalVariable(name: "a6", arg: 7, scope: !33, file: !34, line: 84, type: !37)
82 !53 = !DILocation(line: 84, column: 169, scope: !33)
83 !54 = !DILocation(line: 86, column: 12, scope: !33)