1; RUN: llc < %s
2; PR6847
3target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64-n32"
4target triple = "armv4t-apple-darwin10"
5
6define hidden i32 @__addvsi3(i32 %a, i32 %b) nounwind {
7entry:
8  tail call void @llvm.dbg.value(metadata i32 %b, i64 0, metadata !0, metadata !MDExpression()), !dbg !MDLocation(scope: !1)
9  %0 = add nsw i32 %b, %a, !dbg !9                ; <i32> [#uses=1]
10  ret i32 %0, !dbg !11
11}
12
13declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
14
15!llvm.dbg.cu = !{!3}
16!llvm.module.flags = !{!15}
17!0 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 93, arg: 0, scope: !1, file: !2, type: !6)
18!1 = !MDSubprogram(name: "__addvsi3", linkageName: "__addvsi3", line: 94, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: null, type: !4)
19!2 = !MDFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc")
20!12 = !MDFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc")
21!3 = !MDCompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: 0, file: !12, enums: !13, retainedTypes: !13, subprograms: !14)
22!4 = !MDSubroutineType(types: !5)
23!5 = !{!6, !6, !6}
24!6 = !MDDerivedType(tag: DW_TAG_typedef, name: "SItype", line: 152, file: !12, baseType: !8)
25!7 = !MDFile(filename: "libgcc2.h", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc")
26!8 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
27!9 = !MDLocation(line: 95, scope: !10)
28!10 = distinct !MDLexicalBlock(line: 94, column: 0, file: !12, scope: !1)
29!11 = !MDLocation(line: 100, scope: !10)
30!13 = !{}
31!14 = !{!1}
32!15 = !{i32 1, !"Debug Info Version", i32 3}
33