|
| 1 | +; RUN: llc %s --fast-isel=true --stop-after=finalize-isel -o %t \ |
| 2 | +; RUN: -experimental-debug-variable-locations=false --global-isel=false |
| 3 | +; RUN: FileCheck %s < %t |
| 4 | +; RUN: FileCheck %s --check-prefix=INTRINSICS < %t |
| 5 | + |
| 6 | + |
| 7 | +source_filename = "ir_x86.ll" |
| 8 | +target triple = "x86_64-*" |
| 9 | + |
| 10 | +define swifttailcc void @foo(ptr swiftasync %0) !dbg !43 { |
| 11 | + call void asm sideeffect "", "r"(ptr %0), !dbg !62 |
| 12 | + ; FastISEL doesn't preserve %0 here. Check that this function is lowered with SelectionDAG. |
| 13 | + call void @llvm.dbg.value(metadata ptr %0, metadata !54, metadata !DIExpression(DW_OP_plus_uconst, 4242)), !dbg !62 |
| 14 | + ret void, !dbg !62 |
| 15 | +} |
| 16 | + |
| 17 | +; CHECK-NOT: DBG_VALUE $noreg |
| 18 | +; INTRINSICS: ![[VAR:[0-9]*]] = !DILocalVariable(name: "msg", |
| 19 | +; INTRINSICS: DBG_VALUE {{.*}}, ![[VAR]], !DIExpression(DW_OP_plus_uconst, 4242) |
| 20 | + |
| 21 | + |
| 22 | +declare void @llvm.dbg.value(metadata, metadata, metadata) |
| 23 | + |
| 24 | +!llvm.module.flags = !{!6, !7, !8, !9, !10} |
| 25 | +!llvm.dbg.cu = !{!16} |
| 26 | + |
| 27 | +!6 = !{i32 7, !"Dwarf Version", i32 4} |
| 28 | +!7 = !{i32 2, !"Debug Info Version", i32 3} |
| 29 | +!8 = !{i32 1, !"wchar_size", i32 4} |
| 30 | +!9 = !{i32 8, !"PIC Level", i32 2} |
| 31 | +!10 = !{i32 7, !"uwtable", i32 2} |
| 32 | +!16 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !17, producer: "blah", emissionKind: FullDebug) |
| 33 | +!17 = !DIFile(filename: "blah", directory: "blah") |
| 34 | +!43 = distinct !DISubprogram(name: "blah", linkageName: "blah", file: !17, line: 87, type: !44, scopeLine: 87, unit: !16, retainedNodes: !48) |
| 35 | +!44 = !DISubroutineType(types: !45) |
| 36 | +!45 = !{!46} |
| 37 | +!46 = !DICompositeType(tag: DW_TAG_structure_type, name: "blah") |
| 38 | +!48 = !{!54} |
| 39 | +!54 = !DILocalVariable(name: "msg", arg: 1, scope: !43, file: !17, line: 87, type: !46) |
| 40 | +!62 = !DILocation(line: 87, column: 30, scope: !43) |
0 commit comments