74 lines · plain
1; RUN: llc -O2 -mtriple=hexagon < %s | FileCheck %s2 3; Broken after r326208.4; XFAIL: *5; CHECK: allocframe{{.*}}6; CHECK-NEXT: }7; CHECK-NEXT:{{.*}}tmp{{[0-9]+}}:8; CHECK-NEXT: .loc {{[0-9 ]+}} prologue_end9 10; Function Attrs: nounwind11define i32 @f0(i32 %a0, i32 %a1) #0 !dbg !5 {12b0:13 %v0 = alloca i32, align 414 %v1 = alloca i32, align 415 %v2 = alloca ptr, align 416 store i32 %a0, ptr %v0, align 417 call void @llvm.dbg.declare(metadata ptr %v0, metadata !9, metadata !DIExpression()), !dbg !1018 store i32 %a1, ptr %v1, align 419 call void @llvm.dbg.declare(metadata ptr %v1, metadata !11, metadata !DIExpression()), !dbg !1220 call void @llvm.dbg.declare(metadata ptr %v2, metadata !13, metadata !DIExpression()), !dbg !1521 store ptr %v1, ptr %v2, align 4, !dbg !1522 %v3 = load i32, ptr %v0, align 4, !dbg !1623 %v4 = load ptr, ptr %v2, align 4, !dbg !1724 %v5 = call i32 @f1(ptr %v4), !dbg !1825 %v6 = add nsw i32 %v3, %v5, !dbg !1926 ret i32 %v6, !dbg !2027}28 29; Function Attrs: nounwind readnone speculatable30declare void @llvm.dbg.declare(metadata, metadata, metadata) #131 32; Function Attrs: nounwind33define i32 @f1(ptr %a0) #0 !dbg !21 {34b0:35 %v0 = alloca ptr, align 436 store ptr %a0, ptr %v0, align 437 call void @llvm.dbg.declare(metadata ptr %v0, metadata !24, metadata !DIExpression()), !dbg !2538 ret i32 0, !dbg !2639}40 41attributes #0 = { nounwind "target-cpu"="hexagonv60" }42attributes #1 = { nounwind readnone speculatable }43 44!llvm.dbg.cu = !{!0}45!llvm.module.flags = !{!3, !4}46 47!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)48!1 = !DIFile(filename: "/tmp/test.c", directory: "/tmp")49!2 = !{}50!3 = !{i32 2, !"Dwarf Version", i32 4}51!4 = !{i32 2, !"Debug Info Version", i32 3}52!5 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)53!6 = !DISubroutineType(types: !7)54!7 = !{!8, !8, !8}55!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)56!9 = !DILocalVariable(name: "a", arg: 1, scope: !5, file: !1, line: 1, type: !8)57!10 = !DILocation(line: 1, column: 13, scope: !5)58!11 = !DILocalVariable(name: "b", arg: 2, scope: !5, file: !1, line: 1, type: !8)59!12 = !DILocation(line: 1, column: 20, scope: !5)60!13 = !DILocalVariable(name: "ptr", scope: !5, file: !1, line: 2, type: !14)61!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 32, align: 32)62!15 = !DILocation(line: 2, column: 8, scope: !5)63!16 = !DILocation(line: 3, column: 10, scope: !5)64!17 = !DILocation(line: 3, column: 16, scope: !5)65!18 = !DILocation(line: 3, column: 12, scope: !5)66!19 = !DILocation(line: 3, column: 11, scope: !5)67!20 = !DILocation(line: 3, column: 3, scope: !5)68!21 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 7, type: !22, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)69!22 = !DISubroutineType(types: !23)70!23 = !{!8, !14}71!24 = !DILocalVariable(name: "var", arg: 1, scope: !21, file: !1, line: 7, type: !14)72!25 = !DILocation(line: 7, column: 14, scope: !21)73!26 = !DILocation(line: 8, column: 3, scope: !21)74