blob: 722db45a7c88d3f7b4d940363e9f21be89dcf6fd [file] [edit]
# RUN: llc -mtriple=hexagon -run-pass=hexagon-gen-mux -verify-machineinstrs \
# RUN: -o - %s | FileCheck %s
# A debug-only use of the conditional destination must not prevent mux
# generation.
# CHECK: $r2 = C2_mux killed $p0, killed $r0, $r1
# CHECK-NEXT: DBG_VALUE $r2, $noreg
# CHECK: $r0 = A2_tfr killed $r1
--- |
define void @fred() !dbg !5 {
entry:
ret void, !dbg !11
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!4}
!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1,
producer: "llvm", isOptimized: true, runtimeVersion: 0,
emissionKind: FullDebug)
!1 = !DIFile(filename: "mux-debug-use.mir", directory: "/")
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = distinct !DISubprogram(name: "fred", linkageName: "fred", scope: null,
file: !1, line: 1, type: !6, scopeLine: 1,
spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0)
!6 = !DISubroutineType(types: !7)
!7 = !{}
!9 = !DILocalVariable(name: "x", scope: !5, file: !1, line: 1, type: !10)
!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!11 = !DILocation(line: 1, column: 1, scope: !5)
...
---
name: fred
noVRegs: true
body: |
bb.0:
liveins: $d0, $p0
$r2 = A2_tfrt $p0, $r0
DBG_VALUE $r2, $noreg, !9, !DIExpression(), debug-location !11
$r0 = A2_tfr $r1
$r2 = A2_tfrf $p0, killed $r1
...