75 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; Verify store/load for -g prologue3 4; CHECK: allocframe5; CHECK: memw([[MEM:.*]]) = r{{[0-9]+}}6; CHECK: r{{[0-9]+}} = memw([[MEM]])7 8; Function Attrs: nounwind9define i32 @f0(i32 %a0) #0 !dbg !5 {10b0:11 %v0 = alloca i32, align 412 %v1 = alloca i32, align 413 %v2 = alloca i32, align 414 store i32 %a0, ptr %v1, align 415 call void @llvm.dbg.declare(metadata ptr %v1, metadata !9, metadata !DIExpression()), !dbg !1016 call void @llvm.dbg.declare(metadata ptr %v2, metadata !11, metadata !DIExpression()), !dbg !1217 %v3 = load i32, ptr %v1, align 4, !dbg !1318 %v4 = icmp sgt i32 %v3, 1, !dbg !1519 br i1 %v4, label %b1, label %b2, !dbg !1620 21b1: ; preds = %b022 %v5 = load i32, ptr %v1, align 4, !dbg !1723 %v6 = load i32, ptr %v1, align 4, !dbg !1824 %v7 = sub nsw i32 %v6, 1, !dbg !1925 %v8 = call i32 @f0(i32 %v7), !dbg !2026 %v9 = mul nsw i32 %v5, %v8, !dbg !2127 store i32 %v9, ptr %v0, align 4, !dbg !2228 br label %b3, !dbg !2229 30b2: ; preds = %b031 %v10 = load i32, ptr %v1, align 4, !dbg !2332 store i32 %v10, ptr %v0, align 4, !dbg !2433 br label %b3, !dbg !2434 35b3: ; preds = %b2, %b136 %v11 = load i32, ptr %v0, align 4, !dbg !2537 ret i32 %v11, !dbg !2538}39 40; Function Attrs: nounwind readnone speculatable41declare void @llvm.dbg.declare(metadata, metadata, metadata) #142 43attributes #0 = { nounwind "target-cpu"="hexagonv55" }44attributes #1 = { nounwind readnone speculatable }45 46!llvm.dbg.cu = !{!0}47!llvm.module.flags = !{!3, !4}48 49!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)50!1 = !DIFile(filename: "/tmp/test.c", directory: "/tmp")51!2 = !{}52!3 = !{i32 2, !"Dwarf Version", i32 4}53!4 = !{i32 2, !"Debug Info Version", i32 3}54!5 = distinct !DISubprogram(name: "factorial", scope: !1, file: !1, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)55!6 = !DISubroutineType(types: !7)56!7 = !{!8, !8}57!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)58!9 = !DILocalVariable(name: "value", arg: 1, scope: !5, file: !1, line: 1, type: !8)59!10 = !DILocation(line: 1, column: 20, scope: !5)60!11 = !DILocalVariable(name: "local_var", scope: !5, file: !1, line: 2, type: !8)61!12 = !DILocation(line: 2, column: 7, scope: !5)62!13 = !DILocation(line: 3, column: 7, scope: !14)63!14 = distinct !DILexicalBlock(scope: !5, file: !1, line: 3, column: 7)64!15 = !DILocation(line: 3, column: 13, scope: !14)65!16 = !DILocation(line: 3, column: 7, scope: !5)66!17 = !DILocation(line: 4, column: 12, scope: !14)67!18 = !DILocation(line: 4, column: 28, scope: !14)68!19 = !DILocation(line: 4, column: 33, scope: !14)69!20 = !DILocation(line: 4, column: 18, scope: !14)70!21 = !DILocation(line: 4, column: 17, scope: !14)71!22 = !DILocation(line: 4, column: 5, scope: !14)72!23 = !DILocation(line: 5, column: 15, scope: !14)73!24 = !DILocation(line: 5, column: 8, scope: !14)74!25 = !DILocation(line: 6, column: 1, scope: !5)75