| # RUN: llc -mtriple=amdgpu10.10 -run-pass=si-optimize-exec-masking %s -o - | FileCheck %s | |
| # Debug instructions must not consume findExecCopy's 25-instruction search | |
| # limit or hide the copy from exec. | |
| --- | | |
| define void @ignore_debug_in_find_exec_copy() !dbg !5 { | |
| entry: | |
| #dbg_value(i32 0, !9, !DIExpression(), !11) | |
| unreachable, !dbg !11 | |
| } | |
| !llvm.dbg.cu = !{!0} | |
| !llvm.module.flags = !{!4} | |
| !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug) | |
| !1 = !DIFile(filename: "optimize-exec-masking-debug-limit.mir", directory: "/") | |
| !4 = !{i32 2, !"Debug Info Version", i32 3} | |
| !5 = distinct !DISubprogram(name: "ignore_debug_in_find_exec_copy", linkageName: "ignore_debug_in_find_exec_copy", scope: null, file: !1, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !8) | |
| !6 = !DISubroutineType(types: !7) | |
| !7 = !{} | |
| !8 = !{!9} | |
| !9 = !DILocalVariable(name: "1", scope: !5, file: !1, line: 1, type: !10) | |
| !10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned) | |
| !11 = !DILocation(line: 1, column: 1, scope: !5) | |
| ... | |
| --- | |
| name: ignore_debug_in_find_exec_copy | |
| tracksRegLiveness: true | |
| body: | | |
| bb.0: | |
| liveins: $vgpr0, $sgpr2 | |
| ; CHECK-LABEL: name: ignore_debug_in_find_exec_copy | |
| ; CHECK: $sgpr1 = S_AND_SAVEEXEC_B32 $sgpr0 | |
| renamable $sgpr0 = V_CMP_GT_U32_e64 $sgpr2, killed $vgpr0, implicit $exec | |
| DBG_VALUE $sgpr0, $noreg, !9, !DIExpression(), debug-location !11 | |
| $sgpr1 = COPY $exec_lo, implicit-def $exec_lo | |
| DBG_VALUE $sgpr1, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $exec_lo, $noreg, !9, !DIExpression(), debug-location !11 | |
| $sgpr1 = S_AND_B32 killed renamable $sgpr1, killed renamable $sgpr0, implicit-def dead $scc | |
| DBG_VALUE $sgpr1, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $scc, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11 | |
| $exec_lo = S_MOV_B32_term killed renamable $sgpr1 | |
| ... |