blob: 68c4589798078056bd4b891e28b38c79fff599c6 [file]
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6
# RUN: llc %s -o - -mtriple=x86_64-unknown-unknown \
# RUN: -experimental-debug-variable-locations \
# RUN: -run-pass=phi-node-elimination,livedebugvars,greedy,virtregrewriter \
# RUN: | FileCheck %s
#
# This test checks phi-node-elimination does not create a debug phi
# with invalid register reference
--- |
define void @f() !dbg !2 {
ret void
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!1}
!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !DIFile(filename: "x", directory: ""), emissionKind: FullDebug)
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = distinct !DISubprogram(scope: !0, type: !DISubroutineType(types: !{null}), unit: !0, retainedNodes: !{!6})
!6 = !DILocalVariable(scope: !2)
...
---
name: f
debugInstrRef: true
body: |
; CHECK-LABEL: name: f
; CHECK: bb.0:
; CHECK-NEXT: successors: %bb.1(0x80000000)
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.1:
; CHECK-NEXT: dead renamable $al = IMPLICIT_DEF
; CHECK-NEXT: DBG_INSTR_REF !7, !DIExpression(), dbg-instr-ref(1, 0), debug-location !DILocation(line: 0, scope: !3)
; CHECK-NEXT: RET 0
bb.0:
successors: %bb.1
bb.1:
%0:gr8 = PHI undef %0:gr8, %bb.0, debug-instr-number 1
DBG_INSTR_REF !6, !DIExpression(), dbg-instr-ref(1, 0), debug-location !DILocation(line: 0, scope: !2)
RET 0
...