• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3
4
5---
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: dynLDSAlign: 1
12# FULL-NEXT: isEntryFunction: true
13# FULL-NEXT: noSignedZerosFPMath: false
14# FULL-NEXT: memoryBound:     true
15# FULL-NEXT: waveLimiter:     true
16# FULL-NEXT: hasSpilledSGPRs: false
17# FULL-NEXT: hasSpilledVGPRs: false
18# FULL-NEXT: scratchRSrcReg:  '$sgpr8_sgpr9_sgpr10_sgpr11'
19# FULL-NEXT: frameOffsetReg:  '$sgpr12'
20# FULL-NEXT: stackPtrOffsetReg:  '$sgpr13'
21# FULL-NEXT: argumentInfo:
22# FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
23# FULL-NEXT: kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
24# FULL-NEXT: workGroupIDX: { reg: '$sgpr6' }
25# FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr7' }
26# FULL-NEXT: workItemIDX: { reg: '$vgpr0' }
27# FULL-NEXT: mode:
28# FULL-NEXT: ieee: true
29# FULL-NEXT: dx10-clamp: true
30# FULL-NEXT: fp32-input-denormals: true
31# FULL-NEXT: fp32-output-denormals: true
32# FULL-NEXT: fp64-fp16-input-denormals: true
33# FULL-NEXT: fp64-fp16-output-denormals: true
34# FULL-NEXT:  highBitsOf32BitAddress: 0
35# FULL-NEXT: body:
36
37# SIMPLE: machineFunctionInfo:
38# SIMPLE-NEXT: explicitKernArgSize: 128
39# SIMPLE-NEXT: maxKernArgAlign: 64
40# SIMPLE-NEXT: ldsSize: 2048
41# SIMPLE-NEXT: isEntryFunction: true
42# SIMPLE-NEXT: memoryBound: true
43# SIMPLE-NEXT: waveLimiter: true
44# SIMPLE-NEXT: scratchRSrcReg: '$sgpr8_sgpr9_sgpr10_sgpr11'
45# SIMPLE-NEXT: frameOffsetReg:  '$sgpr12'
46# SIMPLE-NEXT: stackPtrOffsetReg:  '$sgpr13'
47# SIMPLE-NEXT: argumentInfo:
48# SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
49# SIMPLE-NEXT: kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
50# SIMPLE-NEXT: workGroupIDX: { reg: '$sgpr6' }
51# SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr7' }
52# SIMPLE-NEXT: workItemIDX: { reg: '$vgpr0' }
53# SIMPLE-NEXT: body:
54name: kernel0
55machineFunctionInfo:
56  explicitKernArgSize: 128
57  maxKernArgAlign: 64
58  ldsSize: 2048
59  isEntryFunction: true
60  noSignedZerosFPMath: false
61  memoryBound:     true
62  waveLimiter:     true
63  scratchRSrcReg:  '$sgpr8_sgpr9_sgpr10_sgpr11'
64  frameOffsetReg: '$sgpr12'
65  stackPtrOffsetReg:  '$sgpr13'
66  argumentInfo:
67    privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
68    kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
69    workGroupIDX:    { reg: '$sgpr6' }
70    privateSegmentWaveByteOffset: { reg: '$sgpr7' }
71    workItemIDX:     { reg: '$vgpr0' }
72body:             |
73  bb.0:
74    S_ENDPGM 0
75
76...
77
78# FIXME: Should be able to not print section for simple
79---
80# ALL-LABEL: name: no_mfi
81# FULL: machineFunctionInfo:
82# FULL-NEXT: explicitKernArgSize: 0
83# FULL-NEXT: maxKernArgAlign: 1
84# FULL-NEXT: ldsSize: 0
85# FULL-NEXT: dynLDSAlign: 1
86# FULL-NEXT: isEntryFunction: false
87# FULL-NEXT: noSignedZerosFPMath: false
88# FULL-NEXT: memoryBound:     false
89# FULL-NEXT: waveLimiter:     false
90# FULL-NEXT: hasSpilledSGPRs: false
91# FULL-NEXT: hasSpilledVGPRs: false
92# FULL-NEXT: scratchRSrcReg:  '$private_rsrc_reg'
93# FULL-NEXT: frameOffsetReg:  '$fp_reg'
94# FULL-NEXT: stackPtrOffsetReg:  '$sp_reg'
95# FULL-NEXT: argumentInfo:
96# FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
97# FULL-NEXT: mode:
98# FULL-NEXT: ieee: true
99# FULL-NEXT: dx10-clamp: true
100# FULL-NEXT: fp32-input-denormals: true
101# FULL-NEXT: fp32-output-denormals: true
102# FULL-NEXT: fp64-fp16-input-denormals: true
103# FULL-NEXT: fp64-fp16-output-denormals: true
104# FULL-NEXT:  highBitsOf32BitAddress: 0
105# FULL-NEXT: body:
106
107# SIMPLE: machineFunctionInfo:
108# SIMPLE-NEXT: maxKernArgAlign: 1
109# SIMPLE-NEXT: argumentInfo:
110# SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
111# SIMPLE-NEXT: body:
112
113name: no_mfi
114body:             |
115  bb.0:
116    S_ENDPGM 0
117
118...
119
120---
121# ALL-LABEL: name: empty_mfi
122# FULL: machineFunctionInfo:
123# FULL-NEXT: explicitKernArgSize: 0
124# FULL-NEXT: maxKernArgAlign: 1
125# FULL-NEXT: ldsSize: 0
126# FULL-NEXT: dynLDSAlign: 1
127# FULL-NEXT: isEntryFunction: false
128# FULL-NEXT: noSignedZerosFPMath: false
129# FULL-NEXT: memoryBound:     false
130# FULL-NEXT: waveLimiter:     false
131# FULL-NEXT: hasSpilledSGPRs: false
132# FULL-NEXT: hasSpilledVGPRs: false
133# FULL-NEXT: scratchRSrcReg:  '$private_rsrc_reg'
134# FULL-NEXT: frameOffsetReg:  '$fp_reg'
135# FULL-NEXT: stackPtrOffsetReg:  '$sp_reg'
136# FULL-NEXT: argumentInfo:
137# FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
138# FULL-NEXT: mode:
139# FULL-NEXT: ieee: true
140# FULL-NEXT: dx10-clamp: true
141# FULL-NEXT: fp32-input-denormals: true
142# FULL-NEXT: fp32-output-denormals: true
143# FULL-NEXT: fp64-fp16-input-denormals: true
144# FULL-NEXT: fp64-fp16-output-denormals: true
145# FULL-NEXT:  highBitsOf32BitAddress: 0
146# FULL-NEXT: body:
147
148# SIMPLE: machineFunctionInfo:
149# SIMPLE-NEXT: maxKernArgAlign: 1
150# SIMPLE-NEXT: argumentInfo:
151# SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
152# SIMPLE-NEXT: body:
153
154name: empty_mfi
155machineFunctionInfo:
156body:             |
157  bb.0:
158    S_ENDPGM 0
159
160...
161
162---
163# ALL-LABEL: name: empty_mfi_entry_func
164# FULL: machineFunctionInfo:
165# FULL-NEXT: explicitKernArgSize: 0
166# FULL-NEXT: maxKernArgAlign: 1
167# FULL-NEXT: ldsSize: 0
168# FULL-NEXT: dynLDSAlign: 1
169# FULL-NEXT: isEntryFunction: true
170# FULL-NEXT: noSignedZerosFPMath: false
171# FULL-NEXT: memoryBound:     false
172# FULL-NEXT: waveLimiter:     false
173# FULL-NEXT: hasSpilledSGPRs: false
174# FULL-NEXT: hasSpilledVGPRs: false
175# FULL-NEXT: scratchRSrcReg:  '$private_rsrc_reg'
176# FULL-NEXT: frameOffsetReg:  '$fp_reg'
177# FULL-NEXT: stackPtrOffsetReg:  '$sp_reg'
178# FULL-NEXT: argumentInfo:
179# FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
180# FULL-NEXT: mode:
181# FULL-NEXT: ieee: true
182# FULL-NEXT: dx10-clamp: true
183# FULL-NEXT: fp32-input-denormals: true
184# FULL-NEXT: fp32-output-denormals: true
185# FULL-NEXT: fp64-fp16-input-denormals: true
186# FULL-NEXT: fp64-fp16-output-denormals: true
187# FULL-NEXT:  highBitsOf32BitAddress: 0
188# FULL-NEXT: body:
189
190# SIMPLE: machineFunctionInfo:
191# SIMPLE-NEXT: maxKernArgAlign: 1
192# SIMPLE-NEXT: isEntryFunction: true
193# SIMPLE-NEXT: argumentInfo:
194# SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
195# SIMPLE-NEXT: body:
196
197name: empty_mfi_entry_func
198machineFunctionInfo:
199  isEntryFunction: true
200body:             |
201  bb.0:
202    S_ENDPGM 0
203
204...
205
206---
207# ALL-LABEL: name: default_regs_mfi
208
209# FULL: scratchRSrcReg:  '$private_rsrc_reg'
210# FULL-NEXT: frameOffsetReg:  '$fp_reg'
211# FULL-NEXT: stackPtrOffsetReg:  '$sp_reg'
212
213# SIMPLE-NOT: scratchRSrcReg
214# SIMPLE-NOT:: stackPtrOffsetReg
215name: default_regs_mfi
216machineFunctionInfo:
217  scratchRSrcReg:  '$private_rsrc_reg'
218
219body:             |
220  bb.0:
221    S_ENDPGM 0
222
223...
224
225---
226# ALL-LABEL: name: fake_stack_arginfo
227
228# FULL: argumentInfo:
229# FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
230# FULL-NEXT: flatScratchInit: { offset: 4 }
231# FULL-NEXT: workItemIDY: { reg: '$vgpr0', mask: 65280 }
232
233# SIMPLE: argumentInfo:
234# SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
235# SIMPLE-NEXT: flatScratchInit: { offset: 4 }
236# SIMPLE-NEXT: workItemIDY: { reg: '$vgpr0', mask: 65280 }
237name: fake_stack_arginfo
238machineFunctionInfo:
239  argumentInfo:
240    flatScratchInit: { offset: 4 }
241    workItemIDY:     { reg: '$vgpr0' , mask: 0xff00 }
242
243body:             |
244  bb.0:
245    S_ENDPGM 0
246
247...
248
249---
250# ALL-LABEL: name: parse_mode
251# ALL: mode:
252# ALL-NEXT: ieee: false
253# ALL-NEXT: dx10-clamp: false
254# ALL-NEXT: fp32-input-denormals: false
255# ALL-NEXT: fp32-output-denormals: false
256# ALL-NEXT: fp64-fp16-input-denormals: false
257# ALL-NEXT: fp64-fp16-output-denormals: false
258
259name: parse_mode
260machineFunctionInfo:
261  mode:
262    ieee: false
263    dx10-clamp: false
264    fp32-input-denormals: false
265    fp32-output-denormals: false
266    fp64-fp16-input-denormals: false
267    fp64-fp16-output-denormals: false
268
269body:             |
270  bb.0:
271    S_ENDPGM 0
272
273...
274
275
276---
277# ALL-LABEL: name: parse_spilled_regs
278# ALL: machineFunctionInfo:
279# ALL: hasSpilledSGPRs: true
280# ALL-NEXT: hasSpilledVGPRs: true
281
282name: parse_spilled_regs
283machineFunctionInfo:
284  hasSpilledSGPRs: true
285  hasSpilledVGPRs: true
286
287body:             |
288  bb.0:
289    S_ENDPGM 0
290
291...
292
293---
294# ALL-LABEL: name: dyn_lds_with_alignment
295
296# FULL: ldsSize: 0
297# FULL-NEXT: dynLDSAlign: 8
298
299# SIMPLE: dynLDSAlign: 8
300name: dyn_lds_with_alignment
301machineFunctionInfo:
302  dynLDSAlign: 8
303
304body:             |
305  bb.0:
306    S_ENDPGM 0
307
308...
309