252
|
1 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -amdgpu-spill-vgpr-to-agpr=true -verify-machineinstrs -run-pass=prologepilog -o - %s | FileCheck %s
|
|
2
|
|
3 # After handling the VGPR spill to AGPR copy, we replace the dead frame index in the DBG_VALUE instruction with reg 0.
|
|
4 # Skip looking for frame indices in the debug value instruction for incoming arguments passed via stack. The test would crash otherwise.
|
|
5 # It is safe to skip the fixed stack objects as they will never become the spill objects.
|
|
6
|
|
7 --- |
|
|
8 define amdgpu_kernel void @test() { ret void }
|
|
9
|
|
10 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !4, producer: "llvm", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4)
|
|
11 !1 = !DILocalVariable(name: "a", scope: !2, file: !4, line: 126, type: !6)
|
|
12 !2 = distinct !DISubprogram(name: "test", scope: !4, file: !4, line: 1, type: !3, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !5)
|
|
13 !3 = !DISubroutineType(types: !4)
|
|
14 !4 = !{null}
|
|
15 !5 = !{!1}
|
|
16 !6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 32)
|
|
17 !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
18 !8 = !DIExpression()
|
|
19 !9 = !DILocation(line: 10, column: 9, scope: !2)
|
|
20
|
|
21 ...
|
|
22 ---
|
|
23 name: test
|
|
24 tracksRegLiveness: true
|
|
25 frameInfo:
|
|
26 maxAlignment: 4
|
|
27 fixedStack:
|
|
28 - { id: 0, type: default, offset: 4, size: 4, alignment: 4, stack-id: default }
|
|
29 stack:
|
|
30 - { id: 0, type: spill-slot, size: 4, alignment: 4 }
|
|
31 machineFunctionInfo:
|
|
32 maxKernArgAlign: 4
|
|
33 isEntryFunction: true
|
|
34 waveLimiter: true
|
|
35 scratchRSrcReg: '$sgpr96_sgpr97_sgpr98_sgpr99'
|
|
36 stackPtrOffsetReg: '$sgpr32'
|
|
37 frameOffsetReg: '$sgpr33'
|
|
38 hasSpilledVGPRs: true
|
|
39 argumentInfo:
|
|
40 privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
|
|
41 dispatchPtr: { reg: '$sgpr4_sgpr5' }
|
|
42 kernargSegmentPtr: { reg: '$sgpr6_sgpr7' }
|
|
43 workGroupIDX: { reg: '$sgpr8' }
|
|
44 privateSegmentWaveByteOffset: { reg: '$sgpr9' }
|
|
45 body: |
|
|
46 ; CHECK-LABEL: name: test
|
|
47 ; CHECK: bb.0:
|
|
48 ; CHECK: DBG_VALUE $noreg, 0
|
|
49 bb.0:
|
|
50 $vgpr2 = IMPLICIT_DEF
|
|
51 SI_SPILL_V32_SAVE $vgpr2, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, align 4, addrspace 5)
|
|
52 DBG_VALUE %fixed-stack.0, 0, !1, !8, debug-location !9
|
|
53
|
|
54 bb.1:
|
|
55 renamable $vgpr2 = SI_SPILL_V32_RESTORE %stack.0, $sgpr32, 0, implicit $exec :: (load (s32) from %stack.0, align 4, addrspace 5)
|
|
56 S_ENDPGM 0
|