191e9f4d6SNAKAMURA Takumi; RUN: llc < %s -mtriple=xcore-unknown-unknown -O0 | FileCheck %s
237d3fa7eSRobert Lytton
337d3fa7eSRobert Lytton; target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32-f64:32-a:0:32-n32"
437d3fa7eSRobert Lytton; target triple = "xcore"
537d3fa7eSRobert Lytton
637d3fa7eSRobert Lytton; CHECK-LABEL: f
7*c045c557SMatthias Braun; CHECK: entsp [[S:[0-9]+]]
837d3fa7eSRobert Lytton; ...the prologue...
9b786572dSDuncan P. N. Exon Smith; CHECK: .loc 1 2 0 prologue_end      # test.c:2:0
1037d3fa7eSRobert Lytton; CHECK: add r0, r0, 1
11*c045c557SMatthias Braun; CHECK: retsp [[S]]
12d4bff303SPeter Collingbournedefine i32 @f(i32 %a) !dbg !4 {
1337d3fa7eSRobert Lyttonentry:
1437d3fa7eSRobert Lytton  %a.addr = alloca i32, align 4
1537d3fa7eSRobert Lytton  store i32 %a, i32* %a.addr, align 4
16a9308c49SDuncan P. N. Exon Smith  call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !11, metadata !DIExpression()), !dbg !12
17a79ac14fSDavid Blaikie  %0 = load i32, i32* %a.addr, align 4, !dbg !12
1837d3fa7eSRobert Lytton  %add = add nsw i32 %0, 1, !dbg !12
1937d3fa7eSRobert Lytton  ret i32 %add, !dbg !12
2037d3fa7eSRobert Lytton}
2137d3fa7eSRobert Lytton
2287b7eb9dSAdrian Prantldeclare void @llvm.dbg.declare(metadata, metadata, metadata)
2337d3fa7eSRobert Lytton
2437d3fa7eSRobert Lytton!llvm.dbg.cu = !{!0}
2537d3fa7eSRobert Lytton!llvm.module.flags = !{!9, !10}
2675819aedSAdrian Prantl!0 = distinct !DICompileUnit(language: DW_LANG_C99, isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
27a9308c49SDuncan P. N. Exon Smith!1 = !DIFile(filename: "test.c", directory: "")
28be7ea19bSDuncan P. N. Exon Smith!2 = !{}
292c864551SShiva Chen!4 = distinct !DISubprogram(name: "f", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !1, type: !6, retainedNodes: !2)
30a9308c49SDuncan P. N. Exon Smith!6 = !DISubroutineType(types: !7)
31be7ea19bSDuncan P. N. Exon Smith!7 = !{!8, !8}
32a9308c49SDuncan P. N. Exon Smith!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
33be7ea19bSDuncan P. N. Exon Smith!9 = !{i32 2, !"Dwarf Version", i32 4}
34e274180fSDuncan P. N. Exon Smith!10 = !{i32 2, !"Debug Info Version", i32 3}
35ed013cd2SDuncan P. N. Exon Smith!11 = !DILocalVariable(name: "a", line: 2, arg: 1, scope: !4, file: !1, type: !8)
36a9308c49SDuncan P. N. Exon Smith!12 = !DILocation(line: 2, scope: !4)
3737d3fa7eSRobert Lytton
38