1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin -regalloc=basic < %s | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker; Test to check separate label for inlined function argument. 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine i32 @foo(i32 %y) nounwind optsize ssp !dbg !1 { 6*9880d681SAndroid Build Coastguard Workerentry: 7*9880d681SAndroid Build Coastguard Worker tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) 8*9880d681SAndroid Build Coastguard Worker %0 = tail call i32 (...) @zoo(i32 %y) nounwind, !dbg !9 ; <i32> [#uses=1] 9*9880d681SAndroid Build Coastguard Worker ret i32 %0, !dbg !9 10*9880d681SAndroid Build Coastguard Worker} 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workerdeclare i32 @zoo(...) 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerdefine i32 @bar(i32 %x) nounwind optsize ssp !dbg !8 { 17*9880d681SAndroid Build Coastguard Workerentry: 18*9880d681SAndroid Build Coastguard Worker tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !7, metadata !DIExpression()), !dbg !DILocation(scope: !8) 19*9880d681SAndroid Build Coastguard Worker tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !0, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !1, inlinedAt: !DILocation(scope: !8)) 20*9880d681SAndroid Build Coastguard Worker %0 = tail call i32 (...) @zoo(i32 1) nounwind, !dbg !12 ; <i32> [#uses=1] 21*9880d681SAndroid Build Coastguard Worker %1 = add nsw i32 %0, %x, !dbg !13 ; <i32> [#uses=1] 22*9880d681SAndroid Build Coastguard Worker ret i32 %1, !dbg !13 23*9880d681SAndroid Build Coastguard Worker} 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!3} 26*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!20} 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Worker!0 = !DILocalVariable(name: "y", line: 2, arg: 1, scope: !1, file: !2, type: !6) 29*9880d681SAndroid Build Coastguard Worker!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !3, scopeLine: 2, file: !18, scope: !2, type: !4, variables: !15) 30*9880d681SAndroid Build Coastguard Worker!2 = !DIFile(filename: "f.c", directory: "/tmp") 31*9880d681SAndroid Build Coastguard Worker!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19, imports: null) 32*9880d681SAndroid Build Coastguard Worker!4 = !DISubroutineType(types: !5) 33*9880d681SAndroid Build Coastguard Worker!5 = !{!6, !6} 34*9880d681SAndroid Build Coastguard Worker!6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 35*9880d681SAndroid Build Coastguard Worker!7 = !DILocalVariable(name: "x", line: 6, arg: 1, scope: !8, file: !2, type: !6) 36*9880d681SAndroid Build Coastguard Worker!8 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !3, scopeLine: 6, file: !18, scope: !2, type: !4, variables: !16) 37*9880d681SAndroid Build Coastguard Worker!9 = !DILocation(line: 3, scope: !10) 38*9880d681SAndroid Build Coastguard Worker!10 = distinct !DILexicalBlock(line: 2, column: 0, file: !18, scope: !1) 39*9880d681SAndroid Build Coastguard Worker!11 = !{i32 1} 40*9880d681SAndroid Build Coastguard Worker!12 = !DILocation(line: 3, scope: !10, inlinedAt: !13) 41*9880d681SAndroid Build Coastguard Worker!13 = !DILocation(line: 7, scope: !14) 42*9880d681SAndroid Build Coastguard Worker!14 = distinct !DILexicalBlock(line: 6, column: 0, file: !18, scope: !8) 43*9880d681SAndroid Build Coastguard Worker!15 = !{!0} 44*9880d681SAndroid Build Coastguard Worker!16 = !{!7} 45*9880d681SAndroid Build Coastguard Worker!18 = !DIFile(filename: "f.c", directory: "/tmp") 46*9880d681SAndroid Build Coastguard Worker!19 = !{} 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Worker;CHECK: DEBUG_VALUE: bar:x <- %E 49*9880d681SAndroid Build Coastguard Worker;CHECK: Ltmp 50*9880d681SAndroid Build Coastguard Worker;CHECK: DEBUG_VALUE: foo:y <- 1{{$}} 51*9880d681SAndroid Build Coastguard Worker!20 = !{i32 1, !"Debug Info Version", i32 3} 52