1# RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o - %s \
2# RUN:   -run-pass=livevars,phi-node-elimination,twoaddressinstruction \
3# RUN:   -no-phi-elim-live-out-early-exit=1 -phi-elim-split-all-critical-edges=1 \
4# RUN: | FileCheck %s
5
6--- |
7  define void @test() !dbg !7 {
8  entry:
9    ret void, !dbg !14
10  }
11  !llvm.dbg.cu = !{!0}
12  !llvm.module.flags = !{!3, !4}
13
14  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Adrian", emissionKind: FullDebug)
15  !1 = !DIFile(filename: "/tmp/t.c", directory: "/")
16  !2 = !{}
17  !3 = !{i32 2, !"Dwarf Version", i32 2}
18  !4 = !{i32 2, !"Debug Info Version", i32 4}
19  !5 = !{i32 1, !"PIC Level", i32 2}
20  !7 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0)
21  !8 = !DISubroutineType(types: !{})
22  !14 = !DILocation(line: 1, column: 0, scope: !7)
23
24---
25name: test
26tracksRegLiveness: true
27body: |
28  bb.0:
29    liveins: $nzcv, $wzr
30    Bcc 8, %bb.2, implicit $nzcv
31
32  ; CHECK-LABEL: bb.1:
33  bb.1:
34    %x:gpr32 = COPY $wzr
35  ; Test that the debug location is not copied into bb1!
36  ; CHECK: %3:gpr32 = COPY killed %x{{$}}
37  ; CHECK-LABEL: bb.2:
38  bb.2:
39    %y:gpr32 = PHI %x:gpr32, %bb.1, undef %undef:gpr32, %bb.0, debug-location !14
40    $wzr = COPY %y:gpr32
41...
42