1 # RUN: llc -mtriple=amdgcn-amd-amdhsa -run-pass=none -verify-machineinstrs %s -o - | FileCheck -check-prefixes=FULL,ALL %s
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -run-pass=none -simplify-mir -verify-machineinstrs %s -o - | FileCheck -check-prefixes=SIMPLE,ALL %s
6 # ALL-LABEL: name: kernel0
7 # FULL: machineFunctionInfo:
8 # FULL-NEXT: explicitKernArgSize: 128
9 # FULL-NEXT: maxKernArgAlign: 64
10 # FULL-NEXT: ldsSize: 2048
11 # FULL-NEXT: isEntryFunction: true
12 # FULL-NEXT: noSignedZerosFPMath: false
13 # FULL-NEXT: memoryBound: true
14 # FULL-NEXT: waveLimiter: true
15 # FULL-NEXT: scratchRSrcReg: '$sgpr8_sgpr9_sgpr10_sgpr11'
16 # FULL-NEXT: scratchWaveOffsetReg: '$sgpr12'
17 # FULL-NEXT: frameOffsetReg: '$sgpr12'
18 # FULL-NEXT: stackPtrOffsetReg: '$sgpr13'
19 # FULL-NEXT: argumentInfo:
20 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
21 # FULL-NEXT: kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
22 # FULL-NEXT: workGroupIDX: { reg: '$sgpr6' }
23 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr7' }
24 # FULL-NEXT: workItemIDX: { reg: '$vgpr0' }
26 # FULL-NEXT: ieee: true
27 # FULL-NEXT: dx10-clamp: true
30 # SIMPLE: machineFunctionInfo:
31 # SIMPLE-NEXT: explicitKernArgSize: 128
32 # SIMPLE-NEXT: maxKernArgAlign: 64
33 # SIMPLE-NEXT: ldsSize: 2048
34 # SIMPLE-NEXT: isEntryFunction: true
35 # SIMPLE-NEXT: memoryBound: true
36 # SIMPLE-NEXT: waveLimiter: true
37 # SIMPLE-NEXT: scratchRSrcReg: '$sgpr8_sgpr9_sgpr10_sgpr11'
38 # SIMPLE-NEXT: scratchWaveOffsetReg: '$sgpr12'
39 # SIMPLE-NEXT: frameOffsetReg: '$sgpr12'
40 # SIMPLE-NEXT: stackPtrOffsetReg: '$sgpr13'
41 # SIMPLE-NEXT: argumentInfo:
42 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
43 # SIMPLE-NEXT: kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
44 # SIMPLE-NEXT: workGroupIDX: { reg: '$sgpr6' }
45 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr7' }
46 # SIMPLE-NEXT: workItemIDX: { reg: '$vgpr0' }
50 explicitKernArgSize: 128
54 noSignedZerosFPMath: false
57 scratchRSrcReg: '$sgpr8_sgpr9_sgpr10_sgpr11'
58 scratchWaveOffsetReg: '$sgpr12'
59 frameOffsetReg: '$sgpr12'
60 stackPtrOffsetReg: '$sgpr13'
62 privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
63 kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
64 workGroupIDX: { reg: '$sgpr6' }
65 privateSegmentWaveByteOffset: { reg: '$sgpr7' }
66 workItemIDX: { reg: '$vgpr0' }
73 # FIXME: Should be able to not print section for simple
75 # ALL-LABEL: name: no_mfi
76 # FULL: machineFunctionInfo:
77 # FULL-NEXT: explicitKernArgSize: 0
78 # FULL-NEXT: maxKernArgAlign: 0
79 # FULL-NEXT: ldsSize: 0
80 # FULL-NEXT: isEntryFunction: false
81 # FULL-NEXT: noSignedZerosFPMath: false
82 # FULL-NEXT: memoryBound: false
83 # FULL-NEXT: waveLimiter: false
84 # FULL-NEXT: scratchRSrcReg: '$private_rsrc_reg'
85 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
86 # FULL-NEXT: frameOffsetReg: '$fp_reg'
87 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
88 # FULL-NEXT: argumentInfo:
89 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
90 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
92 # FULL-NEXT: ieee: true
93 # FULL-NEXT: dx10-clamp: true
96 # SIMPLE: machineFunctionInfo:
97 # SIMPLE-NEXT: argumentInfo:
98 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
99 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
110 # ALL-LABEL: name: empty_mfi
111 # FULL: machineFunctionInfo:
112 # FULL-NEXT: explicitKernArgSize: 0
113 # FULL-NEXT: maxKernArgAlign: 0
114 # FULL-NEXT: ldsSize: 0
115 # FULL-NEXT: isEntryFunction: false
116 # FULL-NEXT: noSignedZerosFPMath: false
117 # FULL-NEXT: memoryBound: false
118 # FULL-NEXT: waveLimiter: false
119 # FULL-NEXT: scratchRSrcReg: '$private_rsrc_reg'
120 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
121 # FULL-NEXT: frameOffsetReg: '$fp_reg'
122 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
123 # FULL-NEXT: argumentInfo:
124 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
125 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
127 # FULL-NEXT: ieee: true
128 # FULL-NEXT: dx10-clamp: true
131 # SIMPLE: machineFunctionInfo:
132 # SIMPLE-NEXT: argumentInfo:
133 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
134 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
146 # ALL-LABEL: name: empty_mfi_entry_func
147 # FULL: machineFunctionInfo:
148 # FULL-NEXT: explicitKernArgSize: 0
149 # FULL-NEXT: maxKernArgAlign: 0
150 # FULL-NEXT: ldsSize: 0
151 # FULL-NEXT: isEntryFunction: true
152 # FULL-NEXT: noSignedZerosFPMath: false
153 # FULL-NEXT: memoryBound: false
154 # FULL-NEXT: waveLimiter: false
155 # FULL-NEXT: scratchRSrcReg: '$private_rsrc_reg'
156 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
157 # FULL-NEXT: frameOffsetReg: '$fp_reg'
158 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
159 # FULL-NEXT: argumentInfo:
160 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
161 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
163 # FULL-NEXT: ieee: true
164 # FULL-NEXT: dx10-clamp: true
167 # SIMPLE: machineFunctionInfo:
168 # SIMPLE-NEXT: isEntryFunction: true
169 # SIMPLE-NEXT: argumentInfo:
170 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
171 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
174 name: empty_mfi_entry_func
176 isEntryFunction: true
184 # ALL-LABEL: name: default_regs_mfi
186 # FULL: scratchRSrcReg: '$private_rsrc_reg'
187 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
188 # FULL-NEXT: frameOffsetReg: '$fp_reg'
189 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
191 # SIMPLE-NOT: scratchRSrcReg
192 # SIMPLE-NOT: scratchWaveOffsetReg
193 # SIMPLE-NOT:: stackPtrOffsetReg
194 name: default_regs_mfi
196 scratchRSrcReg: '$private_rsrc_reg'
205 # ALL-LABEL: name: fake_stack_arginfo
207 # FULL: argumentInfo:
208 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
209 # FULL-NEXT: flatScratchInit: { offset: 4 }
210 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
211 # FULL-NEXT: workItemIDY: { reg: '$vgpr0', mask: 65280 }
213 # SIMPLE: argumentInfo:
214 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
215 # SIMPLE-NEXT: flatScratchInit: { offset: 4 }
216 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
217 # SIMPLE-NEXT: workItemIDY: { reg: '$vgpr0', mask: 65280 }
218 name: fake_stack_arginfo
221 flatScratchInit: { offset: 4 }
222 workItemIDY: { reg: '$vgpr0' , mask: 0xff00 }
231 # ALL-LABEL: name: parse_mode
233 # ALL-NEXT: ieee: false
234 # ALL-NEXT: dx10-clamp: false