| # RUN: llc -mtriple=hexagon -run-pass=hexagon-gen-mux -verify-machineinstrs \ | |
| # RUN: -o - %s | FileCheck %s | |
| # Two debug values for the same variable sit between the transfers: one reads | |
| # the destination, the other is a constant. Both are copied after the mux, in | |
| # order, and the dependent original is set undef in the gap. | |
| # CHECK: DBG_VALUE $noreg, $noreg, !{{[0-9]+}} | |
| # CHECK-NEXT: DBG_VALUE 42, $noreg, !{{[0-9]+}} | |
| # CHECK-NEXT: $r2 = C2_mux killed $p0, killed $r0, killed $r1 | |
| # CHECK-NEXT: DBG_VALUE $r2, $noreg, !{{[0-9]+}} | |
| # CHECK-NEXT: DBG_VALUE 42, $noreg, !{{[0-9]+}} | |
| --- | | |
| 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-same-var.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 | |
| DBG_VALUE 42, $noreg, !9, !DIExpression(), debug-location !11 | |
| $r2 = A2_tfrf $p0, $r1 | |
| ... |