1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=CHECK -check-prefix=GFX908 %s
3
4---
5name: spill_a64_kill
6tracksRegLiveness: true
7stack:
8  - { id: 0, type: spill-slot, size: 8, alignment: 4 }
9machineFunctionInfo:
10  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
11  stackPtrOffsetReg: '$sgpr32'
12  frameOffsetReg: '$sgpr33'
13body:             |
14  bb.0:
15    liveins: $agpr0_agpr1
16
17    ; CHECK-LABEL: name: spill_a64_kill
18    ; CHECK: liveins: $agpr0_agpr1
19    ; CHECK: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr0, implicit $exec, implicit-def $agpr0_agpr1
20    ; CHECK: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $agpr0_agpr1 :: (store 4 into %stack.0, addrspace 5)
21    ; CHECK: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr1, implicit $exec
22    ; CHECK: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, 0, 0, 0, implicit $exec, implicit killed $agpr0_agpr1 :: (store 4 into %stack.0 + 4, addrspace 5)
23    SI_SPILL_A64_SAVE killed $agpr0_agpr1, %stack.0, $sgpr32, 0, implicit $exec :: (store 8 into %stack.0, addrspace 5)
24...
25
26# Make sure there's no verifier error on the undef spill component when the value is killed.
27
28---
29name: spill_a64_undef_sub1_killed
30tracksRegLiveness: true
31stack:
32  - { id: 0, type: spill-slot, size: 8, alignment: 4 }
33machineFunctionInfo:
34  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
35  stackPtrOffsetReg: '$sgpr32'
36  frameOffsetReg: '$sgpr33'
37body:             |
38  bb.0:
39    liveins: $agpr0
40
41    ; CHECK-LABEL: name: spill_a64_undef_sub1_killed
42    ; CHECK: liveins: $agpr0
43    ; CHECK: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr0, implicit $exec, implicit-def $agpr0_agpr1
44    ; CHECK: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $agpr0_agpr1 :: (store 4 into %stack.0, addrspace 5)
45    ; CHECK: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr1, implicit $exec
46    ; CHECK: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, 0, 0, 0, implicit $exec, implicit killed $agpr0_agpr1 :: (store 4 into %stack.0 + 4, addrspace 5)
47    SI_SPILL_A64_SAVE killed $agpr0_agpr1, %stack.0, $sgpr32, 0, implicit $exec :: (store 8 into %stack.0, addrspace 5)
48...
49
50---
51name: spill_a64_undef_sub0_killed
52tracksRegLiveness: true
53stack:
54  - { id: 0, type: spill-slot, size: 8, alignment: 4 }
55machineFunctionInfo:
56  scratchRSrcReg:  '$sgpr0_sgpr1_sgpr2_sgpr3'
57  stackPtrOffsetReg: '$sgpr32'
58  frameOffsetReg: '$sgpr33'
59body:             |
60  bb.0:
61    liveins: $agpr1
62
63    ; CHECK-LABEL: name: spill_a64_undef_sub0_killed
64    ; CHECK: liveins: $agpr1
65    ; CHECK: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr0, implicit $exec, implicit-def $agpr0_agpr1
66    ; CHECK: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, 0, 0, 0, implicit $exec, implicit $agpr0_agpr1 :: (store 4 into %stack.0, addrspace 5)
67    ; CHECK: $vgpr0 = V_ACCVGPR_READ_B32 killed $agpr1, implicit $exec
68    ; CHECK: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, 0, 0, 0, implicit $exec, implicit killed $agpr0_agpr1 :: (store 4 into %stack.0 + 4, addrspace 5)
69    SI_SPILL_A64_SAVE killed $agpr0_agpr1, %stack.0, $sgpr32, 0, implicit $exec :: (store 8 into %stack.0, addrspace 5)
70...
71