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
28 # FULL-NEXT: highBitsOf32BitAddress: 0
31 # SIMPLE: machineFunctionInfo:
32 # SIMPLE-NEXT: explicitKernArgSize: 128
33 # SIMPLE-NEXT: maxKernArgAlign: 64
34 # SIMPLE-NEXT: ldsSize: 2048
35 # SIMPLE-NEXT: isEntryFunction: true
36 # SIMPLE-NEXT: memoryBound: true
37 # SIMPLE-NEXT: waveLimiter: true
38 # SIMPLE-NEXT: scratchRSrcReg: '$sgpr8_sgpr9_sgpr10_sgpr11'
39 # SIMPLE-NEXT: scratchWaveOffsetReg: '$sgpr12'
40 # SIMPLE-NEXT: frameOffsetReg: '$sgpr12'
41 # SIMPLE-NEXT: stackPtrOffsetReg: '$sgpr13'
42 # SIMPLE-NEXT: argumentInfo:
43 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
44 # SIMPLE-NEXT: kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
45 # SIMPLE-NEXT: workGroupIDX: { reg: '$sgpr6' }
46 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr7' }
47 # SIMPLE-NEXT: workItemIDX: { reg: '$vgpr0' }
51 explicitKernArgSize: 128
55 noSignedZerosFPMath: false
58 scratchRSrcReg: '$sgpr8_sgpr9_sgpr10_sgpr11'
59 scratchWaveOffsetReg: '$sgpr12'
60 frameOffsetReg: '$sgpr12'
61 stackPtrOffsetReg: '$sgpr13'
63 privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
64 kernargSegmentPtr: { reg: '$sgpr4_sgpr5' }
65 workGroupIDX: { reg: '$sgpr6' }
66 privateSegmentWaveByteOffset: { reg: '$sgpr7' }
67 workItemIDX: { reg: '$vgpr0' }
74 # FIXME: Should be able to not print section for simple
76 # ALL-LABEL: name: no_mfi
77 # FULL: machineFunctionInfo:
78 # FULL-NEXT: explicitKernArgSize: 0
79 # FULL-NEXT: maxKernArgAlign: 1
80 # FULL-NEXT: ldsSize: 0
81 # FULL-NEXT: isEntryFunction: false
82 # FULL-NEXT: noSignedZerosFPMath: false
83 # FULL-NEXT: memoryBound: false
84 # FULL-NEXT: waveLimiter: false
85 # FULL-NEXT: scratchRSrcReg: '$private_rsrc_reg'
86 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
87 # FULL-NEXT: frameOffsetReg: '$fp_reg'
88 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
89 # FULL-NEXT: argumentInfo:
90 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
91 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
93 # FULL-NEXT: ieee: true
94 # FULL-NEXT: dx10-clamp: true
95 # FULL-NEXT: highBitsOf32BitAddress: 0
98 # SIMPLE: machineFunctionInfo:
99 # SIMPLE-NEXT: maxKernArgAlign: 1
100 # SIMPLE-NEXT: argumentInfo:
101 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
102 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
113 # ALL-LABEL: name: empty_mfi
114 # FULL: machineFunctionInfo:
115 # FULL-NEXT: explicitKernArgSize: 0
116 # FULL-NEXT: maxKernArgAlign: 1
117 # FULL-NEXT: ldsSize: 0
118 # FULL-NEXT: isEntryFunction: false
119 # FULL-NEXT: noSignedZerosFPMath: false
120 # FULL-NEXT: memoryBound: false
121 # FULL-NEXT: waveLimiter: false
122 # FULL-NEXT: scratchRSrcReg: '$private_rsrc_reg'
123 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
124 # FULL-NEXT: frameOffsetReg: '$fp_reg'
125 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
126 # FULL-NEXT: argumentInfo:
127 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
128 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
130 # FULL-NEXT: ieee: true
131 # FULL-NEXT: dx10-clamp: true
132 # FULL-NEXT: highBitsOf32BitAddress: 0
135 # SIMPLE: machineFunctionInfo:
136 # SIMPLE-NEXT: maxKernArgAlign: 1
137 # SIMPLE-NEXT: argumentInfo:
138 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
139 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
151 # ALL-LABEL: name: empty_mfi_entry_func
152 # FULL: machineFunctionInfo:
153 # FULL-NEXT: explicitKernArgSize: 0
154 # FULL-NEXT: maxKernArgAlign: 1
155 # FULL-NEXT: ldsSize: 0
156 # FULL-NEXT: isEntryFunction: true
157 # FULL-NEXT: noSignedZerosFPMath: false
158 # FULL-NEXT: memoryBound: false
159 # FULL-NEXT: waveLimiter: false
160 # FULL-NEXT: scratchRSrcReg: '$private_rsrc_reg'
161 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
162 # FULL-NEXT: frameOffsetReg: '$fp_reg'
163 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
164 # FULL-NEXT: argumentInfo:
165 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
166 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
168 # FULL-NEXT: ieee: true
169 # FULL-NEXT: dx10-clamp: true
170 # FULL-NEXT: highBitsOf32BitAddress: 0
173 # SIMPLE: machineFunctionInfo:
174 # SIMPLE-NEXT: maxKernArgAlign: 1
175 # SIMPLE-NEXT: isEntryFunction: true
176 # SIMPLE-NEXT: argumentInfo:
177 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
178 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
181 name: empty_mfi_entry_func
183 isEntryFunction: true
191 # ALL-LABEL: name: default_regs_mfi
193 # FULL: scratchRSrcReg: '$private_rsrc_reg'
194 # FULL-NEXT: scratchWaveOffsetReg: '$scratch_wave_offset_reg'
195 # FULL-NEXT: frameOffsetReg: '$fp_reg'
196 # FULL-NEXT: stackPtrOffsetReg: '$sp_reg'
198 # SIMPLE-NOT: scratchRSrcReg
199 # SIMPLE-NOT: scratchWaveOffsetReg
200 # SIMPLE-NOT:: stackPtrOffsetReg
201 name: default_regs_mfi
203 scratchRSrcReg: '$private_rsrc_reg'
212 # ALL-LABEL: name: fake_stack_arginfo
214 # FULL: argumentInfo:
215 # FULL-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
216 # FULL-NEXT: flatScratchInit: { offset: 4 }
217 # FULL-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
218 # FULL-NEXT: workItemIDY: { reg: '$vgpr0', mask: 65280 }
220 # SIMPLE: argumentInfo:
221 # SIMPLE-NEXT: privateSegmentBuffer: { reg: '$sgpr0_sgpr1_sgpr2_sgpr3' }
222 # SIMPLE-NEXT: flatScratchInit: { offset: 4 }
223 # SIMPLE-NEXT: privateSegmentWaveByteOffset: { reg: '$sgpr33' }
224 # SIMPLE-NEXT: workItemIDY: { reg: '$vgpr0', mask: 65280 }
225 name: fake_stack_arginfo
228 flatScratchInit: { offset: 4 }
229 workItemIDY: { reg: '$vgpr0' , mask: 0xff00 }
238 # ALL-LABEL: name: parse_mode
240 # ALL-NEXT: ieee: false
241 # ALL-NEXT: dx10-clamp: false