xref: /llvm-project/llvm/test/CodeGen/AArch64/fastisel-debugvalue-undef.ll (revision 10b03e66629aedad79a804e22d23b575077303b3)
1; RUN: llc -O0 -fast-isel=1 -o - -print-after="finalize-isel" %s 2>&1 | FileCheck %s
2; RUN: llc --try-experimental-debuginfo-iterators -O0 -fast-isel=1 -o - -print-after="finalize-isel" %s 2>&1 | FileCheck %s
3
4; Check that we emit a DBG_VALUE for the `@llvm.dbg.value` which has `undef` has first arg.
5
6target triple = "arm64-apple-ios13.4.0"
7define void @foo() !dbg !6 {
8  ; CHECK: DBG_VALUE $noreg, $noreg, !"1", !DIExpression()
9  call void @llvm.dbg.value(metadata ptr undef, metadata !9, metadata !DIExpression()), !dbg !11
10  ret void, !dbg !12
11}
12
13declare void @llvm.dbg.value(metadata, metadata, metadata)
14
15!llvm.dbg.cu = !{!0}
16!llvm.module.flags = !{!5}
17
18!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
19!1 = !DIFile(filename: "t.ll", directory: "/")
20!2 = !{}
21!5 = !{i32 2, !"Debug Info Version", i32 3}
22!6 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !8)
23!7 = !DISubroutineType(types: !2)
24!8 = !{!9}
25!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
26!10 = !DIBasicType(name: "ty64", size: 64, encoding: DW_ATE_unsigned)
27!11 = !DILocation(line: 1, column: 1, scope: !6)
28!12 = !DILocation(line: 2, column: 1, scope: !6)
29