blob: 900bf34c5f1107413ac1180afaa2b59b965c0256 [file] [edit]
# RUN: llc -mtriple=amdgpu10.10 -run-pass=si-optimize-exec-masking-pre-ra %s -o - | FileCheck %s
# Meta instructions must not consume the backward scan budget for folding a
# copy from exec into its only non-debug user.
--- |
define amdgpu_kernel void @debug_scan_budget() !dbg !5 {
ret void
}
!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: "optimize-exec-mask-pre-ra-debug-limit.mir", directory: "/")
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = distinct !DISubprogram(name: "debug_scan_budget", linkageName: "debug_scan_budget", scope: !1, 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: "value", scope: !5, file: !1, line: 1, type: !10)
!10 = !DIBasicType(name: "unsigned", size: 32, encoding: DW_ATE_unsigned)
!11 = !DILocation(line: 1, column: 1, scope: !5)
...
---
name: debug_scan_budget
tracksRegLiveness: true
machineFunctionInfo:
isEntryFunction: true
body: |
bb.0:
successors: %bb.1
; CHECK-LABEL: name: debug_scan_budget
; CHECK: [[RHS:%[0-9]+]]:sreg_32_xm0_xexec = IMPLICIT_DEF
; CHECK-NOT: COPY $exec_lo
; CHECK: S_XOR_B32 [[RHS]], $exec_lo
%0:sreg_32_xm0_xexec = IMPLICIT_DEF
%1:sreg_32_xm0_xexec = COPY $exec_lo
DBG_VALUE $noreg, $noreg, !9, !DIExpression(), debug-location !11
SCHED_BARRIER 0
%2:sreg_32_xm0_xexec = S_XOR_B32 %0, %1, implicit-def dead $scc
S_NOP 0
S_NOP 0
S_NOP 0
S_NOP 0
S_NOP 0
S_NOP 0
S_NOP 0
S_BRANCH %bb.1
bb.1:
S_ENDPGM 0
...