|
| 1 | +# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| 2 | +# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=si-insert-waitcnts -o - %s | FileCheck %s |
| 3 | + |
| 4 | +# Verify that si-insert-waitcnts copies debug locations from the s_endpgm to the |
| 5 | +# "dealloc vgprs" s_sendmsg. If these are not present, the debugger will be |
| 6 | +# unable to break at the end of the shader. |
| 7 | + |
| 8 | +--- | |
| 9 | + define amdgpu_ps void @test() !dbg !5 { ret void, !dbg !8 } |
| 10 | + |
| 11 | + !llvm.dbg.cu = !{!0} |
| 12 | + !llvm.debugify = !{!2, !3} |
| 13 | + !llvm.module.flags = !{!4} |
| 14 | + |
| 15 | + !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug) |
| 16 | + !1 = !DIFile(filename: "t.ll", directory: "/") |
| 17 | + !2 = !{i32 1} |
| 18 | + !3 = !{i32 0} |
| 19 | + !4 = !{i32 2, !"Debug Info Version", i32 3} |
| 20 | + !5 = distinct !DISubprogram(name: "test", linkageName: "test", scope: null, file: !1, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0) |
| 21 | + !6 = !DISubroutineType(types: !7) |
| 22 | + !7 = !{} |
| 23 | + !8 = !DILocation(line: 1, column: 1, scope: !5) |
| 24 | +... |
| 25 | + |
| 26 | +--- |
| 27 | +name: test |
| 28 | +machineFunctionInfo: |
| 29 | + isEntryFunction: true |
| 30 | +body: | |
| 31 | + bb.0: |
| 32 | + ; CHECK-LABEL: name: test |
| 33 | + ; CHECK: GLOBAL_STORE_DWORD undef renamable $vgpr0_vgpr1, killed renamable $vgpr1, 0, 4, implicit $exec |
| 34 | + ; CHECK-NEXT: S_NOP 0, debug-location !8 |
| 35 | + ; CHECK-NEXT: S_SENDMSG 3, implicit $exec, implicit $m0, debug-location !8 |
| 36 | + ; CHECK-NEXT: S_ENDPGM 0, debug-location !8 |
| 37 | + GLOBAL_STORE_DWORD undef renamable $vgpr0_vgpr1, killed renamable $vgpr1, 0, 4, implicit $exec |
| 38 | + S_ENDPGM 0, debug-location !8 |
| 39 | +... |
| 40 | + |
0 commit comments