1 ; RUN: llc %s -stop-after=livedebugvars -o - | FileCheck %s
2 source_filename = "/tmp/t.ll"
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-apple-macosx10.13"
8 declare swiftcc i1 @f()
10 ; Function Attrs: nounwind readnone speculatable
11 declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
13 ; Function Attrs: nounwind readnone speculatable
14 define swiftcc void @g() #0 !dbg !5 {
16 %0 = alloca %TSb, align 1
17 %1 = call swiftcc i1 @f(), !dbg !7
18 ; CHECK: DBG_VALUE $rcx, $noreg, !8, !DIExpression(), debug-location !7
19 call void @llvm.dbg.value(metadata i1 %1, metadata !8, metadata !DIExpression()), !dbg !7
20 %2 = getelementptr inbounds %TSb, %TSb* %0, i32 0, i32 0, !dbg !7
21 store i1 %1, i1* %2, align 1, !dbg !7
22 %3 = zext i1 %1 to i64, !dbg !7
23 call void asm sideeffect "", "r"(i64 %3), !dbg !7
27 ; Function Attrs: nounwind readnone speculatable
28 declare void @llvm.dbg.value(metadata, metadata, metadata) #0
30 attributes #0 = { nounwind readnone speculatable }
33 !llvm.module.flags = !{!3, !4}
35 !0 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !1, isOptimized: false, runtimeVersion: 4, emissionKind: FullDebug, enums: !2, imports: !2)
36 !1 = !DIFile(filename: "t.swift", directory: "/tmp")
38 !3 = !{i32 2, !"Dwarf Version", i32 4}
39 !4 = !{i32 2, !"Debug Info Version", i32 3}
40 !5 = distinct !DISubprogram(name: "g", scope: !0, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !2)
41 !6 = !DISubroutineType(types: !2)
42 !7 = !DILocation(line: 4, scope: !5)
43 !8 = !DILocalVariable(name: "hasInput", scope: !5, file: !1, line: 3, type: !9)
44 !9 = !DICompositeType(tag: DW_TAG_structure_type, name: "Bool", scope: !11, file: !10, size: 8, elements: !2, runtimeLang: DW_LANG_Swift, identifier: "_T0SbD")
45 !10 = !DIFile(filename: "Swift.swiftmodule", directory: "/usr/lib/swift/macosx/x86_64")
46 !11 = !DIModule(scope: null, name: "Swift", includePath: "/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk")