1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs -run-pass=prologepilog %s -o - | FileCheck -check-prefix=CHECK %s
6 tracksRegLiveness: true
8 - { id: 0, type: spill-slot, size: 4, alignment: 4 }
10 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
11 stackPtrOffsetReg: '$sgpr32'
12 frameOffsetReg: '$sgpr33'
17 ; CHECK-LABEL: name: spill_v32
18 ; CHECK: liveins: $vgpr0
20 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)
21 ; CHECK-NEXT: S_NOP 0, implicit $vgpr0
22 SI_SPILL_V32_SAVE $vgpr0, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)
23 S_NOP 0, implicit $vgpr0
28 tracksRegLiveness: true
30 - { id: 0, type: spill-slot, size: 4, alignment: 4 }
32 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
33 stackPtrOffsetReg: '$sgpr32'
34 frameOffsetReg: '$sgpr33'
39 ; CHECK-LABEL: name: spill_v32_kill
40 ; CHECK: liveins: $vgpr0
42 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)
43 SI_SPILL_V32_SAVE killed $vgpr0, %stack.0, $sgpr32, 0, implicit $exec :: (store (s32) into %stack.0, addrspace 5)
48 tracksRegLiveness: true
50 - { id: 0, type: spill-slot, size: 8, alignment: 4 }
52 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
53 stackPtrOffsetReg: '$sgpr32'
54 frameOffsetReg: '$sgpr33'
59 ; CHECK-LABEL: name: spill_v64
60 ; CHECK: liveins: $vgpr0_vgpr1
62 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $vgpr0_vgpr1 :: (store (s32) into %stack.0, addrspace 5)
63 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, implicit $exec, implicit $vgpr0_vgpr1 :: (store (s32) into %stack.0 + 4, addrspace 5)
64 ; CHECK-NEXT: S_NOP 0, implicit $vgpr0_vgpr1
65 SI_SPILL_V64_SAVE $vgpr0_vgpr1, %stack.0, $sgpr32, 0, implicit $exec :: (store (s64) into %stack.0, addrspace 5)
66 S_NOP 0, implicit $vgpr0_vgpr1
71 tracksRegLiveness: true
73 - { id: 0, type: spill-slot, size: 8, alignment: 4 }
75 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
76 stackPtrOffsetReg: '$sgpr32'
77 frameOffsetReg: '$sgpr33'
82 ; CHECK-LABEL: name: spill_v64_kill
83 ; CHECK: liveins: $vgpr0_vgpr1
85 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $vgpr0_vgpr1 :: (store (s32) into %stack.0, addrspace 5)
86 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, implicit $exec, implicit killed $vgpr0_vgpr1 :: (store (s32) into %stack.0 + 4, addrspace 5)
87 SI_SPILL_V64_SAVE killed $vgpr0_vgpr1, %stack.0, $sgpr32, 0, implicit $exec :: (store (s64) into %stack.0, addrspace 5)
90 # Make sure there's no verifier error on the undef spill component when the value is killed.
93 name: spill_v64_undef_sub1_killed
94 tracksRegLiveness: true
96 - { id: 0, type: spill-slot, size: 8, alignment: 4 }
98 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
99 stackPtrOffsetReg: '$sgpr32'
100 frameOffsetReg: '$sgpr33'
105 ; CHECK-LABEL: name: spill_v64_undef_sub1_killed
106 ; CHECK: liveins: $vgpr0
108 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $vgpr0_vgpr1 :: (store (s32) into %stack.0, addrspace 5)
109 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, implicit $exec, implicit killed $vgpr0_vgpr1 :: (store (s32) into %stack.0 + 4, addrspace 5)
110 SI_SPILL_V64_SAVE killed $vgpr0_vgpr1, %stack.0, $sgpr32, 0, implicit $exec :: (store (s64) into %stack.0, addrspace 5)
114 name: spill_v64_undef_sub0_killed
115 tracksRegLiveness: true
117 - { id: 0, type: spill-slot, size: 8, alignment: 4 }
119 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
120 stackPtrOffsetReg: '$sgpr32'
121 frameOffsetReg: '$sgpr33'
126 ; CHECK-LABEL: name: spill_v64_undef_sub0_killed
127 ; CHECK: liveins: $vgpr1
129 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec, implicit-def $vgpr0_vgpr1, implicit $vgpr0_vgpr1 :: (store (s32) into %stack.0, addrspace 5)
130 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, implicit $exec, implicit killed $vgpr0_vgpr1 :: (store (s32) into %stack.0 + 4, addrspace 5)
131 SI_SPILL_V64_SAVE killed $vgpr0_vgpr1, %stack.0, $sgpr32, 0, implicit $exec :: (store (s64) into %stack.0, addrspace 5)
135 name: spill_v128_kill
136 tracksRegLiveness: true
138 - { id: 0, type: spill-slot, size: 16, alignment: 4 }
140 scratchRSrcReg: '$sgpr0_sgpr1_sgpr2_sgpr3'
141 stackPtrOffsetReg: '$sgpr32'
142 frameOffsetReg: '$sgpr33'
145 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
147 ; CHECK-LABEL: name: spill_v128_kill
148 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3
150 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, implicit $exec, implicit-def $vgpr0_vgpr1_vgpr2_vgpr3, implicit $vgpr0_vgpr1_vgpr2_vgpr3 :: (store (s32) into %stack.0, addrspace 5)
151 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr1, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, implicit $exec :: (store (s32) into %stack.0 + 4, addrspace 5)
152 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr2, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 8, 0, 0, implicit $exec :: (store (s32) into %stack.0 + 8, addrspace 5)
153 ; CHECK-NEXT: BUFFER_STORE_DWORD_OFFSET killed $vgpr3, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 12, 0, 0, implicit $exec, implicit killed $vgpr0_vgpr1_vgpr2_vgpr3 :: (store (s32) into %stack.0 + 12, addrspace 5)
154 SI_SPILL_V128_SAVE killed $vgpr0_vgpr1_vgpr2_vgpr3, %stack.0, $sgpr32, 0, implicit $exec :: (store (s128) into %stack.0, addrspace 5)