30 #define DEBUG_TYPE "arm-pseudo" 34 cl::desc(
"Verify machine code after expanding ARM pseudos"));
36 #define ARM_EXPAND_PSEUDO_NAME "ARM pseudo instruction expansion pass" 71 unsigned Opc,
bool IsExt);
76 unsigned StrexOp,
unsigned UxtOp,
91 void ARMExpandPseudo::TransferImpOps(
MachineInstr &OldMI,
95 for (
unsigned i = Desc.
getNumOperands(), e = OldMI.getNumOperands();
122 struct NEONLdStTableEntry {
127 bool hasWritebackOperand;
136 bool copyAllListRegs;
139 bool operator<(
const NEONLdStTableEntry &TE)
const {
140 return PseudoOpc < TE.PseudoOpc;
142 friend bool operator<(
const NEONLdStTableEntry &TE,
unsigned PseudoOpc) {
143 return TE.PseudoOpc < PseudoOpc;
146 const NEONLdStTableEntry &TE) {
147 return PseudoOpc < TE.PseudoOpc;
153 { ARM::VLD1LNq16Pseudo, ARM::VLD1LNd16,
true,
false,
false, EvenDblSpc, 1, 4 ,
true},
154 { ARM::VLD1LNq16Pseudo_UPD, ARM::VLD1LNd16_UPD,
true,
true,
true, EvenDblSpc, 1, 4 ,
true},
155 { ARM::VLD1LNq32Pseudo, ARM::VLD1LNd32,
true,
false,
false, EvenDblSpc, 1, 2 ,
true},
156 { ARM::VLD1LNq32Pseudo_UPD, ARM::VLD1LNd32_UPD,
true,
true,
true, EvenDblSpc, 1, 2 ,
true},
157 { ARM::VLD1LNq8Pseudo, ARM::VLD1LNd8,
true,
false,
false, EvenDblSpc, 1, 8 ,
true},
158 { ARM::VLD1LNq8Pseudo_UPD, ARM::VLD1LNd8_UPD,
true,
true,
true, EvenDblSpc, 1, 8 ,
true},
160 { ARM::VLD1d16QPseudo, ARM::VLD1d16Q,
true,
false,
false, SingleSpc, 4, 4 ,
false},
161 { ARM::VLD1d16TPseudo, ARM::VLD1d16T,
true,
false,
false, SingleSpc, 3, 4 ,
false},
162 { ARM::VLD1d32QPseudo, ARM::VLD1d32Q,
true,
false,
false, SingleSpc, 4, 2 ,
false},
163 { ARM::VLD1d32TPseudo, ARM::VLD1d32T,
true,
false,
false, SingleSpc, 3, 2 ,
false},
164 { ARM::VLD1d64QPseudo, ARM::VLD1d64Q,
true,
false,
false, SingleSpc, 4, 1 ,
false},
165 { ARM::VLD1d64QPseudoWB_fixed, ARM::VLD1d64Qwb_fixed,
true,
true,
false, SingleSpc, 4, 1 ,
false},
166 { ARM::VLD1d64QPseudoWB_register, ARM::VLD1d64Qwb_register,
true,
true,
true, SingleSpc, 4, 1 ,
false},
167 { ARM::VLD1d64TPseudo, ARM::VLD1d64T,
true,
false,
false, SingleSpc, 3, 1 ,
false},
168 { ARM::VLD1d64TPseudoWB_fixed, ARM::VLD1d64Twb_fixed,
true,
true,
false, SingleSpc, 3, 1 ,
false},
169 { ARM::VLD1d64TPseudoWB_register, ARM::VLD1d64Twb_register,
true,
true,
true, SingleSpc, 3, 1 ,
false},
170 { ARM::VLD1d8QPseudo, ARM::VLD1d8Q,
true,
false,
false, SingleSpc, 4, 8 ,
false},
171 { ARM::VLD1d8TPseudo, ARM::VLD1d8T,
true,
false,
false, SingleSpc, 3, 8 ,
false},
172 { ARM::VLD1q16HighQPseudo, ARM::VLD1d16Q,
true,
false,
false, SingleHighQSpc, 4, 4 ,
false},
173 { ARM::VLD1q16HighTPseudo, ARM::VLD1d16T,
true,
false,
false, SingleHighTSpc, 3, 4 ,
false},
174 { ARM::VLD1q16LowQPseudo_UPD, ARM::VLD1d16Qwb_fixed,
true,
true,
true, SingleLowSpc, 4, 4 ,
false},
175 { ARM::VLD1q16LowTPseudo_UPD, ARM::VLD1d16Twb_fixed,
true,
true,
true, SingleLowSpc, 3, 4 ,
false},
176 { ARM::VLD1q32HighQPseudo, ARM::VLD1d32Q,
true,
false,
false, SingleHighQSpc, 4, 2 ,
false},
177 { ARM::VLD1q32HighTPseudo, ARM::VLD1d32T,
true,
false,
false, SingleHighTSpc, 3, 2 ,
false},
178 { ARM::VLD1q32LowQPseudo_UPD, ARM::VLD1d32Qwb_fixed,
true,
true,
true, SingleLowSpc, 4, 2 ,
false},
179 { ARM::VLD1q32LowTPseudo_UPD, ARM::VLD1d32Twb_fixed,
true,
true,
true, SingleLowSpc, 3, 2 ,
false},
180 { ARM::VLD1q64HighQPseudo, ARM::VLD1d64Q,
true,
false,
false, SingleHighQSpc, 4, 1 ,
false},
181 { ARM::VLD1q64HighTPseudo, ARM::VLD1d64T,
true,
false,
false, SingleHighTSpc, 3, 1 ,
false},
182 { ARM::VLD1q64LowQPseudo_UPD, ARM::VLD1d64Qwb_fixed,
true,
true,
true, SingleLowSpc, 4, 1 ,
false},
183 { ARM::VLD1q64LowTPseudo_UPD, ARM::VLD1d64Twb_fixed,
true,
true,
true, SingleLowSpc, 3, 1 ,
false},
184 { ARM::VLD1q8HighQPseudo, ARM::VLD1d8Q,
true,
false,
false, SingleHighQSpc, 4, 8 ,
false},
185 { ARM::VLD1q8HighTPseudo, ARM::VLD1d8T,
true,
false,
false, SingleHighTSpc, 3, 8 ,
false},
186 { ARM::VLD1q8LowQPseudo_UPD, ARM::VLD1d8Qwb_fixed,
true,
true,
true, SingleLowSpc, 4, 8 ,
false},
187 { ARM::VLD1q8LowTPseudo_UPD, ARM::VLD1d8Twb_fixed,
true,
true,
true, SingleLowSpc, 3, 8 ,
false},
189 { ARM::VLD2DUPq16EvenPseudo, ARM::VLD2DUPd16x2,
true,
false,
false, EvenDblSpc, 2, 4 ,
false},
190 { ARM::VLD2DUPq16OddPseudo, ARM::VLD2DUPd16x2,
true,
false,
false, OddDblSpc, 2, 4 ,
false},
191 { ARM::VLD2DUPq32EvenPseudo, ARM::VLD2DUPd32x2,
true,
false,
false, EvenDblSpc, 2, 2 ,
false},
192 { ARM::VLD2DUPq32OddPseudo, ARM::VLD2DUPd32x2,
true,
false,
false, OddDblSpc, 2, 2 ,
false},
193 { ARM::VLD2DUPq8EvenPseudo, ARM::VLD2DUPd8x2,
true,
false,
false, EvenDblSpc, 2, 8 ,
false},
194 { ARM::VLD2DUPq8OddPseudo, ARM::VLD2DUPd8x2,
true,
false,
false, OddDblSpc, 2, 8 ,
false},
196 { ARM::VLD2LNd16Pseudo, ARM::VLD2LNd16,
true,
false,
false, SingleSpc, 2, 4 ,
true},
197 { ARM::VLD2LNd16Pseudo_UPD, ARM::VLD2LNd16_UPD,
true,
true,
true, SingleSpc, 2, 4 ,
true},
198 { ARM::VLD2LNd32Pseudo, ARM::VLD2LNd32,
true,
false,
false, SingleSpc, 2, 2 ,
true},
199 { ARM::VLD2LNd32Pseudo_UPD, ARM::VLD2LNd32_UPD,
true,
true,
true, SingleSpc, 2, 2 ,
true},
200 { ARM::VLD2LNd8Pseudo, ARM::VLD2LNd8,
true,
false,
false, SingleSpc, 2, 8 ,
true},
201 { ARM::VLD2LNd8Pseudo_UPD, ARM::VLD2LNd8_UPD,
true,
true,
true, SingleSpc, 2, 8 ,
true},
202 { ARM::VLD2LNq16Pseudo, ARM::VLD2LNq16,
true,
false,
false, EvenDblSpc, 2, 4 ,
true},
203 { ARM::VLD2LNq16Pseudo_UPD, ARM::VLD2LNq16_UPD,
true,
true,
true, EvenDblSpc, 2, 4 ,
true},
204 { ARM::VLD2LNq32Pseudo, ARM::VLD2LNq32,
true,
false,
false, EvenDblSpc, 2, 2 ,
true},
205 { ARM::VLD2LNq32Pseudo_UPD, ARM::VLD2LNq32_UPD,
true,
true,
true, EvenDblSpc, 2, 2 ,
true},
207 { ARM::VLD2q16Pseudo, ARM::VLD2q16,
true,
false,
false, SingleSpc, 4, 4 ,
false},
208 { ARM::VLD2q16PseudoWB_fixed, ARM::VLD2q16wb_fixed,
true,
true,
false, SingleSpc, 4, 4 ,
false},
209 { ARM::VLD2q16PseudoWB_register, ARM::VLD2q16wb_register,
true,
true,
true, SingleSpc, 4, 4 ,
false},
210 { ARM::VLD2q32Pseudo, ARM::VLD2q32,
true,
false,
false, SingleSpc, 4, 2 ,
false},
211 { ARM::VLD2q32PseudoWB_fixed, ARM::VLD2q32wb_fixed,
true,
true,
false, SingleSpc, 4, 2 ,
false},
212 { ARM::VLD2q32PseudoWB_register, ARM::VLD2q32wb_register,
true,
true,
true, SingleSpc, 4, 2 ,
false},
213 { ARM::VLD2q8Pseudo, ARM::VLD2q8,
true,
false,
false, SingleSpc, 4, 8 ,
false},
214 { ARM::VLD2q8PseudoWB_fixed, ARM::VLD2q8wb_fixed,
true,
true,
false, SingleSpc, 4, 8 ,
false},
215 { ARM::VLD2q8PseudoWB_register, ARM::VLD2q8wb_register,
true,
true,
true, SingleSpc, 4, 8 ,
false},
217 { ARM::VLD3DUPd16Pseudo, ARM::VLD3DUPd16,
true,
false,
false, SingleSpc, 3, 4,
true},
218 { ARM::VLD3DUPd16Pseudo_UPD, ARM::VLD3DUPd16_UPD,
true,
true,
true, SingleSpc, 3, 4,
true},
219 { ARM::VLD3DUPd32Pseudo, ARM::VLD3DUPd32,
true,
false,
false, SingleSpc, 3, 2,
true},
220 { ARM::VLD3DUPd32Pseudo_UPD, ARM::VLD3DUPd32_UPD,
true,
true,
true, SingleSpc, 3, 2,
true},
221 { ARM::VLD3DUPd8Pseudo, ARM::VLD3DUPd8,
true,
false,
false, SingleSpc, 3, 8,
true},
222 { ARM::VLD3DUPd8Pseudo_UPD, ARM::VLD3DUPd8_UPD,
true,
true,
true, SingleSpc, 3, 8,
true},
223 { ARM::VLD3DUPq16EvenPseudo, ARM::VLD3DUPq16,
true,
false,
false, EvenDblSpc, 3, 4 ,
true},
224 { ARM::VLD3DUPq16OddPseudo, ARM::VLD3DUPq16,
true,
false,
false, OddDblSpc, 3, 4 ,
true},
225 { ARM::VLD3DUPq32EvenPseudo, ARM::VLD3DUPq32,
true,
false,
false, EvenDblSpc, 3, 2 ,
true},
226 { ARM::VLD3DUPq32OddPseudo, ARM::VLD3DUPq32,
true,
false,
false, OddDblSpc, 3, 2 ,
true},
227 { ARM::VLD3DUPq8EvenPseudo, ARM::VLD3DUPq8,
true,
false,
false, EvenDblSpc, 3, 8 ,
true},
228 { ARM::VLD3DUPq8OddPseudo, ARM::VLD3DUPq8,
true,
false,
false, OddDblSpc, 3, 8 ,
true},
230 { ARM::VLD3LNd16Pseudo, ARM::VLD3LNd16,
true,
false,
false, SingleSpc, 3, 4 ,
true},
231 { ARM::VLD3LNd16Pseudo_UPD, ARM::VLD3LNd16_UPD,
true,
true,
true, SingleSpc, 3, 4 ,
true},
232 { ARM::VLD3LNd32Pseudo, ARM::VLD3LNd32,
true,
false,
false, SingleSpc, 3, 2 ,
true},
233 { ARM::VLD3LNd32Pseudo_UPD, ARM::VLD3LNd32_UPD,
true,
true,
true, SingleSpc, 3, 2 ,
true},
234 { ARM::VLD3LNd8Pseudo, ARM::VLD3LNd8,
true,
false,
false, SingleSpc, 3, 8 ,
true},
235 { ARM::VLD3LNd8Pseudo_UPD, ARM::VLD3LNd8_UPD,
true,
true,
true, SingleSpc, 3, 8 ,
true},
236 { ARM::VLD3LNq16Pseudo, ARM::VLD3LNq16,
true,
false,
false, EvenDblSpc, 3, 4 ,
true},
237 { ARM::VLD3LNq16Pseudo_UPD, ARM::VLD3LNq16_UPD,
true,
true,
true, EvenDblSpc, 3, 4 ,
true},
238 { ARM::VLD3LNq32Pseudo, ARM::VLD3LNq32,
true,
false,
false, EvenDblSpc, 3, 2 ,
true},
239 { ARM::VLD3LNq32Pseudo_UPD, ARM::VLD3LNq32_UPD,
true,
true,
true, EvenDblSpc, 3, 2 ,
true},
241 { ARM::VLD3d16Pseudo, ARM::VLD3d16,
true,
false,
false, SingleSpc, 3, 4 ,
true},
242 { ARM::VLD3d16Pseudo_UPD, ARM::VLD3d16_UPD,
true,
true,
true, SingleSpc, 3, 4 ,
true},
243 { ARM::VLD3d32Pseudo, ARM::VLD3d32,
true,
false,
false, SingleSpc, 3, 2 ,
true},
244 { ARM::VLD3d32Pseudo_UPD, ARM::VLD3d32_UPD,
true,
true,
true, SingleSpc, 3, 2 ,
true},
245 { ARM::VLD3d8Pseudo, ARM::VLD3d8,
true,
false,
false, SingleSpc, 3, 8 ,
true},
246 { ARM::VLD3d8Pseudo_UPD, ARM::VLD3d8_UPD,
true,
true,
true, SingleSpc, 3, 8 ,
true},
248 { ARM::VLD3q16Pseudo_UPD, ARM::VLD3q16_UPD,
true,
true,
true, EvenDblSpc, 3, 4 ,
true},
249 { ARM::VLD3q16oddPseudo, ARM::VLD3q16,
true,
false,
false, OddDblSpc, 3, 4 ,
true},
250 { ARM::VLD3q16oddPseudo_UPD, ARM::VLD3q16_UPD,
true,
true,
true, OddDblSpc, 3, 4 ,
true},
251 { ARM::VLD3q32Pseudo_UPD, ARM::VLD3q32_UPD,
true,
true,
true, EvenDblSpc, 3, 2 ,
true},
252 { ARM::VLD3q32oddPseudo, ARM::VLD3q32,
true,
false,
false, OddDblSpc, 3, 2 ,
true},
253 { ARM::VLD3q32oddPseudo_UPD, ARM::VLD3q32_UPD,
true,
true,
true, OddDblSpc, 3, 2 ,
true},
254 { ARM::VLD3q8Pseudo_UPD, ARM::VLD3q8_UPD,
true,
true,
true, EvenDblSpc, 3, 8 ,
true},
255 { ARM::VLD3q8oddPseudo, ARM::VLD3q8,
true,
false,
false, OddDblSpc, 3, 8 ,
true},
256 { ARM::VLD3q8oddPseudo_UPD, ARM::VLD3q8_UPD,
true,
true,
true, OddDblSpc, 3, 8 ,
true},
258 { ARM::VLD4DUPd16Pseudo, ARM::VLD4DUPd16,
true,
false,
false, SingleSpc, 4, 4,
true},
259 { ARM::VLD4DUPd16Pseudo_UPD, ARM::VLD4DUPd16_UPD,
true,
true,
true, SingleSpc, 4, 4,
true},
260 { ARM::VLD4DUPd32Pseudo, ARM::VLD4DUPd32,
true,
false,
false, SingleSpc, 4, 2,
true},
261 { ARM::VLD4DUPd32Pseudo_UPD, ARM::VLD4DUPd32_UPD,
true,
true,
true, SingleSpc, 4, 2,
true},
262 { ARM::VLD4DUPd8Pseudo, ARM::VLD4DUPd8,
true,
false,
false, SingleSpc, 4, 8,
true},
263 { ARM::VLD4DUPd8Pseudo_UPD, ARM::VLD4DUPd8_UPD,
true,
true,
true, SingleSpc, 4, 8,
true},
264 { ARM::VLD4DUPq16EvenPseudo, ARM::VLD4DUPq16,
true,
false,
false, EvenDblSpc, 4, 4 ,
true},
265 { ARM::VLD4DUPq16OddPseudo, ARM::VLD4DUPq16,
true,
false,
false, OddDblSpc, 4, 4 ,
true},
266 { ARM::VLD4DUPq32EvenPseudo, ARM::VLD4DUPq32,
true,
false,
false, EvenDblSpc, 4, 2 ,
true},
267 { ARM::VLD4DUPq32OddPseudo, ARM::VLD4DUPq32,
true,
false,
false, OddDblSpc, 4, 2 ,
true},
268 { ARM::VLD4DUPq8EvenPseudo, ARM::VLD4DUPq8,
true,
false,
false, EvenDblSpc, 4, 8 ,
true},
269 { ARM::VLD4DUPq8OddPseudo, ARM::VLD4DUPq8,
true,
false,
false, OddDblSpc, 4, 8 ,
true},
271 { ARM::VLD4LNd16Pseudo, ARM::VLD4LNd16,
true,
false,
false, SingleSpc, 4, 4 ,
true},
272 { ARM::VLD4LNd16Pseudo_UPD, ARM::VLD4LNd16_UPD,
true,
true,
true, SingleSpc, 4, 4 ,
true},
273 { ARM::VLD4LNd32Pseudo, ARM::VLD4LNd32,
true,
false,
false, SingleSpc, 4, 2 ,
true},
274 { ARM::VLD4LNd32Pseudo_UPD, ARM::VLD4LNd32_UPD,
true,
true,
true, SingleSpc, 4, 2 ,
true},
275 { ARM::VLD4LNd8Pseudo, ARM::VLD4LNd8,
true,
false,
false, SingleSpc, 4, 8 ,
true},
276 { ARM::VLD4LNd8Pseudo_UPD, ARM::VLD4LNd8_UPD,
true,
true,
true, SingleSpc, 4, 8 ,
true},
277 { ARM::VLD4LNq16Pseudo, ARM::VLD4LNq16,
true,
false,
false, EvenDblSpc, 4, 4 ,
true},
278 { ARM::VLD4LNq16Pseudo_UPD, ARM::VLD4LNq16_UPD,
true,
true,
true, EvenDblSpc, 4, 4 ,
true},
279 { ARM::VLD4LNq32Pseudo, ARM::VLD4LNq32,
true,
false,
false, EvenDblSpc, 4, 2 ,
true},
280 { ARM::VLD4LNq32Pseudo_UPD, ARM::VLD4LNq32_UPD,
true,
true,
true, EvenDblSpc, 4, 2 ,
true},
282 { ARM::VLD4d16Pseudo, ARM::VLD4d16,
true,
false,
false, SingleSpc, 4, 4 ,
true},
283 { ARM::VLD4d16Pseudo_UPD, ARM::VLD4d16_UPD,
true,
true,
true, SingleSpc, 4, 4 ,
true},
284 { ARM::VLD4d32Pseudo, ARM::VLD4d32,
true,
false,
false, SingleSpc, 4, 2 ,
true},
285 { ARM::VLD4d32Pseudo_UPD, ARM::VLD4d32_UPD,
true,
true,
true, SingleSpc, 4, 2 ,
true},
286 { ARM::VLD4d8Pseudo, ARM::VLD4d8,
true,
false,
false, SingleSpc, 4, 8 ,
true},
287 { ARM::VLD4d8Pseudo_UPD, ARM::VLD4d8_UPD,
true,
true,
true, SingleSpc, 4, 8 ,
true},
289 { ARM::VLD4q16Pseudo_UPD, ARM::VLD4q16_UPD,
true,
true,
true, EvenDblSpc, 4, 4 ,
true},
290 { ARM::VLD4q16oddPseudo, ARM::VLD4q16,
true,
false,
false, OddDblSpc, 4, 4 ,
true},
291 { ARM::VLD4q16oddPseudo_UPD, ARM::VLD4q16_UPD,
true,
true,
true, OddDblSpc, 4, 4 ,
true},
292 { ARM::VLD4q32Pseudo_UPD, ARM::VLD4q32_UPD,
true,
true,
true, EvenDblSpc, 4, 2 ,
true},
293 { ARM::VLD4q32oddPseudo, ARM::VLD4q32,
true,
false,
false, OddDblSpc, 4, 2 ,
true},
294 { ARM::VLD4q32oddPseudo_UPD, ARM::VLD4q32_UPD,
true,
true,
true, OddDblSpc, 4, 2 ,
true},
295 { ARM::VLD4q8Pseudo_UPD, ARM::VLD4q8_UPD,
true,
true,
true, EvenDblSpc, 4, 8 ,
true},
296 { ARM::VLD4q8oddPseudo, ARM::VLD4q8,
true,
false,
false, OddDblSpc, 4, 8 ,
true},
297 { ARM::VLD4q8oddPseudo_UPD, ARM::VLD4q8_UPD,
true,
true,
true, OddDblSpc, 4, 8 ,
true},
299 { ARM::VST1LNq16Pseudo, ARM::VST1LNd16,
false,
false,
false, EvenDblSpc, 1, 4 ,
true},
300 { ARM::VST1LNq16Pseudo_UPD, ARM::VST1LNd16_UPD,
false,
true,
true, EvenDblSpc, 1, 4 ,
true},
301 { ARM::VST1LNq32Pseudo, ARM::VST1LNd32,
false,
false,
false, EvenDblSpc, 1, 2 ,
true},
302 { ARM::VST1LNq32Pseudo_UPD, ARM::VST1LNd32_UPD,
false,
true,
true, EvenDblSpc, 1, 2 ,
true},
303 { ARM::VST1LNq8Pseudo, ARM::VST1LNd8,
false,
false,
false, EvenDblSpc, 1, 8 ,
true},
304 { ARM::VST1LNq8Pseudo_UPD, ARM::VST1LNd8_UPD,
false,
true,
true, EvenDblSpc, 1, 8 ,
true},
306 { ARM::VST1d16QPseudo, ARM::VST1d16Q,
false,
false,
false, SingleSpc, 4, 4 ,
false},
307 { ARM::VST1d16TPseudo, ARM::VST1d16T,
false,
false,
false, SingleSpc, 3, 4 ,
false},
308 { ARM::VST1d32QPseudo, ARM::VST1d32Q,
false,
false,
false, SingleSpc, 4, 2 ,
false},
309 { ARM::VST1d32TPseudo, ARM::VST1d32T,
false,
false,
false, SingleSpc, 3, 2 ,
false},
310 { ARM::VST1d64QPseudo, ARM::VST1d64Q,
false,
false,
false, SingleSpc, 4, 1 ,
false},
311 { ARM::VST1d64QPseudoWB_fixed, ARM::VST1d64Qwb_fixed,
false,
true,
false, SingleSpc, 4, 1 ,
false},
312 { ARM::VST1d64QPseudoWB_register, ARM::VST1d64Qwb_register,
false,
true,
true, SingleSpc, 4, 1 ,
false},
313 { ARM::VST1d64TPseudo, ARM::VST1d64T,
false,
false,
false, SingleSpc, 3, 1 ,
false},
314 { ARM::VST1d64TPseudoWB_fixed, ARM::VST1d64Twb_fixed,
false,
true,
false, SingleSpc, 3, 1 ,
false},
315 { ARM::VST1d64TPseudoWB_register, ARM::VST1d64Twb_register,
false,
true,
true, SingleSpc, 3, 1 ,
false},
316 { ARM::VST1d8QPseudo, ARM::VST1d8Q,
false,
false,
false, SingleSpc, 4, 8 ,
false},
317 { ARM::VST1d8TPseudo, ARM::VST1d8T,
false,
false,
false, SingleSpc, 3, 8 ,
false},
318 { ARM::VST1q16HighQPseudo, ARM::VST1d16Q,
false,
false,
false, SingleHighQSpc, 4, 4 ,
false},
319 { ARM::VST1q16HighTPseudo, ARM::VST1d16T,
false,
false,
false, SingleHighTSpc, 3, 4 ,
false},
320 { ARM::VST1q16LowQPseudo_UPD, ARM::VST1d16Qwb_fixed,
false,
true,
true, SingleLowSpc, 4, 4 ,
false},
321 { ARM::VST1q16LowTPseudo_UPD, ARM::VST1d16Twb_fixed,
false,
true,
true, SingleLowSpc, 3, 4 ,
false},
322 { ARM::VST1q32HighQPseudo, ARM::VST1d32Q,
false,
false,
false, SingleHighQSpc, 4, 2 ,
false},
323 { ARM::VST1q32HighTPseudo, ARM::VST1d32T,
false,
false,
false, SingleHighTSpc, 3, 2 ,
false},
324 { ARM::VST1q32LowQPseudo_UPD, ARM::VST1d32Qwb_fixed,
false,
true,
true, SingleLowSpc, 4, 2 ,
false},
325 { ARM::VST1q32LowTPseudo_UPD, ARM::VST1d32Twb_fixed,
false,
true,
true, SingleLowSpc, 3, 2 ,
false},
326 { ARM::VST1q64HighQPseudo, ARM::VST1d64Q,
false,
false,
false, SingleHighQSpc, 4, 1 ,
false},
327 { ARM::VST1q64HighTPseudo, ARM::VST1d64T,
false,
false,
false, SingleHighTSpc, 3, 1 ,
false},
328 { ARM::VST1q64LowQPseudo_UPD, ARM::VST1d64Qwb_fixed,
false,
true,
true, SingleLowSpc, 4, 1 ,
false},
329 { ARM::VST1q64LowTPseudo_UPD, ARM::VST1d64Twb_fixed,
false,
true,
true, SingleLowSpc, 3, 1 ,
false},
330 { ARM::VST1q8HighQPseudo, ARM::VST1d8Q,
false,
false,
false, SingleHighQSpc, 4, 8 ,
false},
331 { ARM::VST1q8HighTPseudo, ARM::VST1d8T,
false,
false,
false, SingleHighTSpc, 3, 8 ,
false},
332 { ARM::VST1q8LowQPseudo_UPD, ARM::VST1d8Qwb_fixed,
false,
true,
true, SingleLowSpc, 4, 8 ,
false},
333 { ARM::VST1q8LowTPseudo_UPD, ARM::VST1d8Twb_fixed,
false,
true,
true, SingleLowSpc, 3, 8 ,
false},
335 { ARM::VST2LNd16Pseudo, ARM::VST2LNd16,
false,
false,
false, SingleSpc, 2, 4 ,
true},
336 { ARM::VST2LNd16Pseudo_UPD, ARM::VST2LNd16_UPD,
false,
true,
true, SingleSpc, 2, 4 ,
true},
337 { ARM::VST2LNd32Pseudo, ARM::VST2LNd32,
false,
false,
false, SingleSpc, 2, 2 ,
true},
338 { ARM::VST2LNd32Pseudo_UPD, ARM::VST2LNd32_UPD,
false,
true,
true, SingleSpc, 2, 2 ,
true},
339 { ARM::VST2LNd8Pseudo, ARM::VST2LNd8,
false,
false,
false, SingleSpc, 2, 8 ,
true},
340 { ARM::VST2LNd8Pseudo_UPD, ARM::VST2LNd8_UPD,
false,
true,
true, SingleSpc, 2, 8 ,
true},
341 { ARM::VST2LNq16Pseudo, ARM::VST2LNq16,
false,
false,
false, EvenDblSpc, 2, 4,
true},
342 { ARM::VST2LNq16Pseudo_UPD, ARM::VST2LNq16_UPD,
false,
true,
true, EvenDblSpc, 2, 4,
true},
343 { ARM::VST2LNq32Pseudo, ARM::VST2LNq32,
false,
false,
false, EvenDblSpc, 2, 2,
true},
344 { ARM::VST2LNq32Pseudo_UPD, ARM::VST2LNq32_UPD,
false,
true,
true, EvenDblSpc, 2, 2,
true},
346 { ARM::VST2q16Pseudo, ARM::VST2q16,
false,
false,
false, SingleSpc, 4, 4 ,
false},
347 { ARM::VST2q16PseudoWB_fixed, ARM::VST2q16wb_fixed,
false,
true,
false, SingleSpc, 4, 4 ,
false},
348 { ARM::VST2q16PseudoWB_register, ARM::VST2q16wb_register,
false,
true,
true, SingleSpc, 4, 4 ,
false},
349 { ARM::VST2q32Pseudo, ARM::VST2q32,
false,
false,
false, SingleSpc, 4, 2 ,
false},
350 { ARM::VST2q32PseudoWB_fixed, ARM::VST2q32wb_fixed,
false,
true,
false, SingleSpc, 4, 2 ,
false},
351 { ARM::VST2q32PseudoWB_register, ARM::VST2q32wb_register,
false,
true,
true, SingleSpc, 4, 2 ,
false},
352 { ARM::VST2q8Pseudo, ARM::VST2q8,
false,
false,
false, SingleSpc, 4, 8 ,
false},
353 { ARM::VST2q8PseudoWB_fixed, ARM::VST2q8wb_fixed,
false,
true,
false, SingleSpc, 4, 8 ,
false},
354 { ARM::VST2q8PseudoWB_register, ARM::VST2q8wb_register,
false,
true,
true, SingleSpc, 4, 8 ,
false},
356 { ARM::VST3LNd16Pseudo, ARM::VST3LNd16,
false,
false,
false, SingleSpc, 3, 4 ,
true},
357 { ARM::VST3LNd16Pseudo_UPD, ARM::VST3LNd16_UPD,
false,
true,
true, SingleSpc, 3, 4 ,
true},
358 { ARM::VST3LNd32Pseudo, ARM::VST3LNd32,
false,
false,
false, SingleSpc, 3, 2 ,
true},
359 { ARM::VST3LNd32Pseudo_UPD, ARM::VST3LNd32_UPD,
false,
true,
true, SingleSpc, 3, 2 ,
true},
360 { ARM::VST3LNd8Pseudo, ARM::VST3LNd8,
false,
false,
false, SingleSpc, 3, 8 ,
true},
361 { ARM::VST3LNd8Pseudo_UPD, ARM::VST3LNd8_UPD,
false,
true,
true, SingleSpc, 3, 8 ,
true},
362 { ARM::VST3LNq16Pseudo, ARM::VST3LNq16,
false,
false,
false, EvenDblSpc, 3, 4,
true},
363 { ARM::VST3LNq16Pseudo_UPD, ARM::VST3LNq16_UPD,
false,
true,
true, EvenDblSpc, 3, 4,
true},
364 { ARM::VST3LNq32Pseudo, ARM::VST3LNq32,
false,
false,
false, EvenDblSpc, 3, 2,
true},
365 { ARM::VST3LNq32Pseudo_UPD, ARM::VST3LNq32_UPD,
false,
true,
true, EvenDblSpc, 3, 2,
true},
367 { ARM::VST3d16Pseudo, ARM::VST3d16,
false,
false,
false, SingleSpc, 3, 4 ,
true},
368 { ARM::VST3d16Pseudo_UPD, ARM::VST3d16_UPD,
false,
true,
true, SingleSpc, 3, 4 ,
true},
369 { ARM::VST3d32Pseudo, ARM::VST3d32,
false,
false,
false, SingleSpc, 3, 2 ,
true},
370 { ARM::VST3d32Pseudo_UPD, ARM::VST3d32_UPD,
false,
true,
true, SingleSpc, 3, 2 ,
true},
371 { ARM::VST3d8Pseudo, ARM::VST3d8,
false,
false,
false, SingleSpc, 3, 8 ,
true},
372 { ARM::VST3d8Pseudo_UPD, ARM::VST3d8_UPD,
false,
true,
true, SingleSpc, 3, 8 ,
true},
374 { ARM::VST3q16Pseudo_UPD, ARM::VST3q16_UPD,
false,
true,
true, EvenDblSpc, 3, 4 ,
true},
375 { ARM::VST3q16oddPseudo, ARM::VST3q16,
false,
false,
false, OddDblSpc, 3, 4 ,
true},
376 { ARM::VST3q16oddPseudo_UPD, ARM::VST3q16_UPD,
false,
true,
true, OddDblSpc, 3, 4 ,
true},
377 { ARM::VST3q32Pseudo_UPD, ARM::VST3q32_UPD,
false,
true,
true, EvenDblSpc, 3, 2 ,
true},
378 { ARM::VST3q32oddPseudo, ARM::VST3q32,
false,
false,
false, OddDblSpc, 3, 2 ,
true},
379 { ARM::VST3q32oddPseudo_UPD, ARM::VST3q32_UPD,
false,
true,
true, OddDblSpc, 3, 2 ,
true},
380 { ARM::VST3q8Pseudo_UPD, ARM::VST3q8_UPD,
false,
true,
true, EvenDblSpc, 3, 8 ,
true},
381 { ARM::VST3q8oddPseudo, ARM::VST3q8,
false,
false,
false, OddDblSpc, 3, 8 ,
true},
382 { ARM::VST3q8oddPseudo_UPD, ARM::VST3q8_UPD,
false,
true,
true, OddDblSpc, 3, 8 ,
true},
384 { ARM::VST4LNd16Pseudo, ARM::VST4LNd16,
false,
false,
false, SingleSpc, 4, 4 ,
true},
385 { ARM::VST4LNd16Pseudo_UPD, ARM::VST4LNd16_UPD,
false,
true,
true, SingleSpc, 4, 4 ,
true},
386 { ARM::VST4LNd32Pseudo, ARM::VST4LNd32,
false,
false,
false, SingleSpc, 4, 2 ,
true},
387 { ARM::VST4LNd32Pseudo_UPD, ARM::VST4LNd32_UPD,
false,
true,
true, SingleSpc, 4, 2 ,
true},
388 { ARM::VST4LNd8Pseudo, ARM::VST4LNd8,
false,
false,
false, SingleSpc, 4, 8 ,
true},
389 { ARM::VST4LNd8Pseudo_UPD, ARM::VST4LNd8_UPD,
false,
true,
true, SingleSpc, 4, 8 ,
true},
390 { ARM::VST4LNq16Pseudo, ARM::VST4LNq16,
false,
false,
false, EvenDblSpc, 4, 4,
true},
391 { ARM::VST4LNq16Pseudo_UPD, ARM::VST4LNq16_UPD,
false,
true,
true, EvenDblSpc, 4, 4,
true},
392 { ARM::VST4LNq32Pseudo, ARM::VST4LNq32,
false,
false,
false, EvenDblSpc, 4, 2,
true},
393 { ARM::VST4LNq32Pseudo_UPD, ARM::VST4LNq32_UPD,
false,
true,
true, EvenDblSpc, 4, 2,
true},
395 { ARM::VST4d16Pseudo, ARM::VST4d16,
false,
false,
false, SingleSpc, 4, 4 ,
true},
396 { ARM::VST4d16Pseudo_UPD, ARM::VST4d16_UPD,
false,
true,
true, SingleSpc, 4, 4 ,
true},
397 { ARM::VST4d32Pseudo, ARM::VST4d32,
false,
false,
false, SingleSpc, 4, 2 ,
true},
398 { ARM::VST4d32Pseudo_UPD, ARM::VST4d32_UPD,
false,
true,
true, SingleSpc, 4, 2 ,
true},
399 { ARM::VST4d8Pseudo, ARM::VST4d8,
false,
false,
false, SingleSpc, 4, 8 ,
true},
400 { ARM::VST4d8Pseudo_UPD, ARM::VST4d8_UPD,
false,
true,
true, SingleSpc, 4, 8 ,
true},
402 { ARM::VST4q16Pseudo_UPD, ARM::VST4q16_UPD,
false,
true,
true, EvenDblSpc, 4, 4 ,
true},
403 { ARM::VST4q16oddPseudo, ARM::VST4q16,
false,
false,
false, OddDblSpc, 4, 4 ,
true},
404 { ARM::VST4q16oddPseudo_UPD, ARM::VST4q16_UPD,
false,
true,
true, OddDblSpc, 4, 4 ,
true},
405 { ARM::VST4q32Pseudo_UPD, ARM::VST4q32_UPD,
false,
true,
true, EvenDblSpc, 4, 2 ,
true},
406 { ARM::VST4q32oddPseudo, ARM::VST4q32,
false,
false,
false, OddDblSpc, 4, 2 ,
true},
407 { ARM::VST4q32oddPseudo_UPD, ARM::VST4q32_UPD,
false,
true,
true, OddDblSpc, 4, 2 ,
true},
408 { ARM::VST4q8Pseudo_UPD, ARM::VST4q8_UPD,
false,
true,
true, EvenDblSpc, 4, 8 ,
true},
409 { ARM::VST4q8oddPseudo, ARM::VST4q8,
false,
false,
false, OddDblSpc, 4, 8 ,
true},
410 { ARM::VST4q8oddPseudo_UPD, ARM::VST4q8_UPD,
false,
true,
true, OddDblSpc, 4, 8 ,
true}
418 static std::atomic<bool> TableChecked(
false);
419 if (!TableChecked.load(std::memory_order_relaxed)) {
421 "NEONLdStTable is not sorted!");
422 TableChecked.store(
true, std::memory_order_relaxed);
428 if (
I !=
std::end(NEONLdStTable) &&
I->PseudoOpc == Opcode)
438 unsigned &D1,
unsigned &D2,
unsigned &D3) {
439 if (RegSpc == SingleSpc || RegSpc == SingleLowSpc) {
444 }
else if (RegSpc == SingleHighQSpc) {
449 }
else if (RegSpc == SingleHighTSpc) {
454 }
else if (RegSpc == EvenDblSpc) {
460 assert(RegSpc == OddDblSpc &&
"unknown register spacing");
475 assert(TableEntry && TableEntry->IsLoad &&
"NEONLdStTable lookup failed");
477 unsigned NumRegs = TableEntry->NumRegs;
480 TII->get(TableEntry->RealOpc));
485 if(TableEntry->RealOpc == ARM::VLD2DUPd8x2 ||
486 TableEntry->RealOpc == ARM::VLD2DUPd16x2 ||
487 TableEntry->RealOpc == ARM::VLD2DUPd32x2) {
488 unsigned SubRegIndex;
489 if (RegSpc == EvenDblSpc) {
490 SubRegIndex = ARM::dsub_0;
492 assert(RegSpc == OddDblSpc &&
"Unexpected spacing!");
493 SubRegIndex = ARM::dsub_1;
495 unsigned SubReg =
TRI->getSubReg(DstReg, SubRegIndex);
496 unsigned DstRegPair =
TRI->getMatchingSuperReg(SubReg, ARM::dsub_0,
497 &ARM::DPairSpcRegClass);
500 unsigned D0, D1, D2, D3;
503 if (NumRegs > 1 && TableEntry->copyAllListRegs)
505 if (NumRegs > 2 && TableEntry->copyAllListRegs)
507 if (NumRegs > 3 && TableEntry->copyAllListRegs)
511 if (TableEntry->isUpdating)
519 if (TableEntry->hasWritebackOperand) {
528 if (TableEntry->RealOpc == ARM::VLD1d8Qwb_fixed ||
529 TableEntry->RealOpc == ARM::VLD1d16Qwb_fixed ||
530 TableEntry->RealOpc == ARM::VLD1d32Qwb_fixed ||
531 TableEntry->RealOpc == ARM::VLD1d64Qwb_fixed ||
532 TableEntry->RealOpc == ARM::VLD1d8Twb_fixed ||
533 TableEntry->RealOpc == ARM::VLD1d16Twb_fixed ||
534 TableEntry->RealOpc == ARM::VLD1d32Twb_fixed ||
535 TableEntry->RealOpc == ARM::VLD1d64Twb_fixed) {
537 "A fixed writing-back pseudo instruction provides an offset " 547 unsigned SrcOpIdx = 0;
548 if(TableEntry->RealOpc != ARM::VLD2DUPd8x2 &&
549 TableEntry->RealOpc != ARM::VLD2DUPd16x2 &&
550 TableEntry->RealOpc != ARM::VLD2DUPd32x2) {
551 if (RegSpc == EvenDblSpc || RegSpc == OddDblSpc ||
552 RegSpc == SingleLowSpc || RegSpc == SingleHighQSpc ||
553 RegSpc == SingleHighTSpc)
570 TransferImpOps(MI, MIB, MIB);
573 MIB.cloneMemRefs(MI);
585 assert(TableEntry && !TableEntry->IsLoad &&
"NEONLdStTable lookup failed");
587 unsigned NumRegs = TableEntry->NumRegs;
590 TII->get(TableEntry->RealOpc));
592 if (TableEntry->isUpdating)
599 if (TableEntry->hasWritebackOperand) {
608 if (TableEntry->RealOpc == ARM::VST1d8Qwb_fixed ||
609 TableEntry->RealOpc == ARM::VST1d16Qwb_fixed ||
610 TableEntry->RealOpc == ARM::VST1d32Qwb_fixed ||
611 TableEntry->RealOpc == ARM::VST1d64Qwb_fixed ||
612 TableEntry->RealOpc == ARM::VST1d8Twb_fixed ||
613 TableEntry->RealOpc == ARM::VST1d16Twb_fixed ||
614 TableEntry->RealOpc == ARM::VST1d32Twb_fixed ||
615 TableEntry->RealOpc == ARM::VST1d64Twb_fixed) {
617 "A fixed writing-back pseudo instruction provides an offset " 627 unsigned D0, D1, D2, D3;
630 if (NumRegs > 1 && TableEntry->copyAllListRegs)
632 if (NumRegs > 2 && TableEntry->copyAllListRegs)
634 if (NumRegs > 3 && TableEntry->copyAllListRegs)
641 if (SrcIsKill && !SrcIsUndef)
642 MIB->addRegisterKilled(SrcReg,
TRI,
true);
643 else if (!SrcIsUndef)
645 TransferImpOps(MI, MIB, MIB);
648 MIB.cloneMemRefs(MI);
660 assert(TableEntry &&
"NEONLdStTable lookup failed");
662 unsigned NumRegs = TableEntry->NumRegs;
663 unsigned RegElts = TableEntry->RegElts;
666 TII->get(TableEntry->RealOpc));
673 assert(RegSpc != OddDblSpc &&
"unexpected register spacing for VLD/VST-lane");
674 if (RegSpc == EvenDblSpc && Lane >= RegElts) {
678 assert(Lane < RegElts &&
"out of range lane for VLD/VST-lane");
680 unsigned D0 = 0, D1 = 0, D2 = 0, D3 = 0;
682 bool DstIsDead =
false;
683 if (TableEntry->IsLoad) {
696 if (TableEntry->isUpdating)
703 if (TableEntry->hasWritebackOperand)
708 if (!TableEntry->IsLoad)
714 MIB.addReg(D0, SrcFlags);
716 MIB.addReg(D1, SrcFlags);
718 MIB.addReg(D2, SrcFlags);
720 MIB.addReg(D3, SrcFlags);
733 if (TableEntry->IsLoad)
736 TransferImpOps(MI, MIB, MIB);
738 MIB.cloneMemRefs(MI);
745 unsigned Opc,
bool IsExt) {
761 unsigned D0, D1, D2, D3;
775 TransferImpOps(MI, MIB, MIB);
825 unsigned PredReg = 0;
829 bool isCC = Opcode == ARM::MOVCCi32imm || Opcode == ARM::t2MOVCCi32imm;
834 if (!STI->hasV6T2Ops() &&
835 (Opcode == ARM::MOVi32imm || Opcode == ARM::MOVCCi32imm)) {
837 assert(!STI->isTargetWindows() &&
"Windows on ARM requires ARMv7+");
845 assert (MO.
isImm() &&
"MOVi32imm w/ non-immediate source operand!");
849 LO16 = LO16.addImm(SOImmValV1);
850 HI16 = HI16.addImm(SOImmValV2);
851 LO16.cloneMemRefs(MI);
852 HI16.cloneMemRefs(MI);
853 LO16.addImm(Pred).addReg(PredReg).add(
condCodeOp());
854 HI16.addImm(Pred).addReg(PredReg).add(
condCodeOp());
857 TransferImpOps(MI, LO16, HI16);
862 unsigned LO16Opc = 0;
863 unsigned HI16Opc = 0;
864 if (Opcode == ARM::t2MOVi32imm || Opcode == ARM::t2MOVCCi32imm) {
865 LO16Opc = ARM::t2MOVi16;
866 HI16Opc = ARM::t2MOVTi16;
868 LO16Opc = ARM::MOVi16;
869 HI16Opc = ARM::MOVTi16;
879 unsigned Imm = MO.
getImm();
880 unsigned Lo16 = Imm & 0xffff;
881 unsigned Hi16 = (Imm >> 16) & 0xffff;
907 if (RequiresBundling)
912 TransferImpOps(MI, LO16, HI16);
921 unsigned LdrexOp,
unsigned StrexOp,
924 bool IsThumb = STI->isThumb();
942 MF->
insert(++LoadCmpBB->getIterator(), StoreBB);
943 MF->
insert(++StoreBB->getIterator(), DoneBB);
947 BuildMI(MBB, MBBI, DL,
TII->get(UxtOp), DesiredReg)
962 if (LdrexOp == ARM::t2LDREX)
966 unsigned CMPrr = IsThumb ? ARM::tCMPhir : ARM::CMPrr;
971 unsigned Bcc = IsThumb ? ARM::tBcc : ARM::Bcc;
976 LoadCmpBB->addSuccessor(DoneBB);
977 LoadCmpBB->addSuccessor(StoreBB);
983 MIB =
BuildMI(StoreBB, DL,
TII->get(StrexOp), TempReg)
986 if (StrexOp == ARM::t2STREX)
990 unsigned CMPri = IsThumb ? ARM::t2CMPri : ARM::CMPri;
999 StoreBB->addSuccessor(LoadCmpBB);
1000 StoreBB->addSuccessor(DoneBB);
1002 DoneBB->splice(DoneBB->end(), &MBB,
MI, MBB.
end());
1003 DoneBB->transferSuccessors(&MBB);
1007 NextMBBI = MBB.
end();
1008 MI.eraseFromParent();
1016 StoreBB->clearLiveIns();
1018 LoadCmpBB->clearLiveIns();
1028 unsigned Flags,
bool IsThumb,
1033 MIB.
addReg(RegLo, Flags);
1034 MIB.
addReg(RegHi, Flags);
1043 bool IsThumb = STI->isThumb();
1056 unsigned DestLo =
TRI->getSubReg(Dest.
getReg(), ARM::gsub_0);
1057 unsigned DestHi =
TRI->getSubReg(Dest.
getReg(), ARM::gsub_1);
1058 unsigned DesiredLo =
TRI->getSubReg(DesiredReg, ARM::gsub_0);
1059 unsigned DesiredHi =
TRI->getSubReg(DesiredReg, ARM::gsub_1);
1067 MF->
insert(++LoadCmpBB->getIterator(), StoreBB);
1068 MF->
insert(++StoreBB->getIterator(), DoneBB);
1075 unsigned LDREXD = IsThumb ? ARM::t2LDREXD : ARM::LDREXD;
1077 MIB =
BuildMI(LoadCmpBB, DL,
TII->get(LDREXD));
1081 unsigned CMPrr = IsThumb ? ARM::tCMPhir : ARM::CMPrr;
1092 unsigned Bcc = IsThumb ? ARM::tBcc : ARM::Bcc;
1097 LoadCmpBB->addSuccessor(DoneBB);
1098 LoadCmpBB->addSuccessor(StoreBB);
1104 unsigned STREXD = IsThumb ? ARM::t2STREXD : ARM::STREXD;
1105 MIB =
BuildMI(StoreBB, DL,
TII->get(STREXD), TempReg);
1110 unsigned CMPri = IsThumb ? ARM::t2CMPri : ARM::CMPri;
1119 StoreBB->addSuccessor(LoadCmpBB);
1120 StoreBB->addSuccessor(DoneBB);
1122 DoneBB->splice(DoneBB->end(), &MBB,
MI, MBB.
end());
1123 DoneBB->transferSuccessors(&MBB);
1127 NextMBBI = MBB.
end();
1128 MI.eraseFromParent();
1136 StoreBB->clearLiveIns();
1138 LoadCmpBB->clearLiveIns();
1154 case ARM::TCRETURNdi:
1155 case ARM::TCRETURNri: {
1157 assert(MBBI->isReturn() &&
1158 "Can only insert epilog into returning blocks");
1159 unsigned RetOpcode = MBBI->getOpcode();
1169 if (RetOpcode == ARM::TCRETURNdi) {
1172 ? (STI->isTargetMachO() ? ARM::tTAILJMPd : ARM::tTAILJMPdND)
1187 }
else if (RetOpcode == ARM::TCRETURNri) {
1189 STI->isThumb() ? ARM::tTAILJMPr
1190 : (STI->hasV4TOps() ? ARM::TAILJMPr : ARM::TAILJMPr4);
1196 auto NewMI = std::prev(MBBI);
1197 for (
unsigned i = 1, e = MBBI->getNumOperands(); i != e; ++i)
1198 NewMI->addOperand(MBBI->getOperand(i));
1206 case ARM::VMOVDcc: {
1207 unsigned newOpc = Opcode == ARM::VMOVScc ? ARM::VMOVS : ARM::VMOVD;
1220 unsigned Opc = AFI->isThumbFunction() ? ARM::t2MOVr : ARM::MOVr;
1232 case ARM::MOVCCsi: {
1245 case ARM::MOVCCsr: {
1259 case ARM::t2MOVCCi16:
1260 case ARM::MOVCCi16: {
1261 unsigned NewOpc = AFI->isThumbFunction() ? ARM::t2MOVi16 : ARM::MOVi16;
1273 unsigned Opc = AFI->isThumbFunction() ? ARM::t2MOVi : ARM::MOVi;
1287 unsigned Opc = AFI->isThumbFunction() ? ARM::t2MVNi : ARM::MVNi;
1299 case ARM::t2MOVCClsl:
1300 case ARM::t2MOVCClsr:
1301 case ARM::t2MOVCCasr:
1302 case ARM::t2MOVCCror: {
1305 case ARM::t2MOVCClsl: NewOpc = ARM::t2LSLri;
break;
1306 case ARM::t2MOVCClsr: NewOpc = ARM::t2LSRri;
break;
1307 case ARM::t2MOVCCasr: NewOpc = ARM::t2ASRri;
break;
1308 case ARM::t2MOVCCror: NewOpc = ARM::t2RORri;
break;
1322 case ARM::Int_eh_sjlj_dispatchsetup: {
1331 int32_t NumBytes = AFI->getFramePtrSpillOffset();
1334 "base pointer without frame pointer?");
1336 if (AFI->isThumb2Function()) {
1339 }
else if (AFI->isThumbFunction()) {
1341 FramePtr, -NumBytes, *
TII, RI);
1348 if (RI.needsStackRealignment(MF)) {
1351 assert (!AFI->isThumb1OnlyFunction());
1353 assert(MaxAlign <= 256 &&
"The BIC instruction cannot encode " 1354 "immediates larger than 256 with all lower " 1356 unsigned bicOpc = AFI->isThumbFunction() ?
1357 ARM::t2BICri : ARM::BICri;
1370 case ARM::MOVsrl_flag:
1371 case ARM::MOVsra_flag: {
1392 TransferImpOps(MI, MIB, MIB);
1398 const bool Thumb = Opcode == ARM::tTPsoft;
1401 if (STI->genLongCalls()) {
1404 unsigned PCLabelID = AFI->createPICLabelUId();
1407 "__aeabi_read_tp", PCLabelID, 0);
1410 TII->get(Thumb ? ARM::tLDRpci : ARM::LDRi12),
Reg)
1417 TII->get(Thumb ? ARM::tBLXr : ARM::BLX));
1430 TransferImpOps(MI, MIB, MIB);
1434 case ARM::tLDRpci_pic:
1435 case ARM::t2LDRpci_pic: {
1436 unsigned NewLdOpc = (Opcode == ARM::tLDRpci_pic)
1437 ? ARM::tLDRpci : ARM::t2LDRpci;
1450 TransferImpOps(MI, MIB1, MIB2);
1455 case ARM::LDRLIT_ga_abs:
1456 case ARM::LDRLIT_ga_pcrel:
1457 case ARM::LDRLIT_ga_pcrel_ldr:
1458 case ARM::tLDRLIT_ga_abs:
1459 case ARM::tLDRLIT_ga_pcrel: {
1466 Opcode != ARM::tLDRLIT_ga_pcrel && Opcode != ARM::tLDRLIT_ga_abs;
1468 Opcode != ARM::LDRLIT_ga_abs && Opcode != ARM::tLDRLIT_ga_abs;
1469 unsigned LDRLITOpc = IsARM ? ARM::LDRi12 : ARM::tLDRpci;
1470 unsigned PICAddOpc =
1472 ? (Opcode == ARM::LDRLIT_ga_pcrel_ldr ? ARM::PICLDR : ARM::PICADD)
1477 unsigned ARMPCLabelIndex = 0;
1481 unsigned PCAdj = IsARM ? 8 : 4;
1485 ARMPCLabelIndex = AFI->createPICLabelUId();
1494 .addConstantPoolIndex(MCP->getConstantPoolIndex(CPV, 4));
1504 .
addImm(ARMPCLabelIndex);
1513 case ARM::MOV_ga_pcrel:
1514 case ARM::MOV_ga_pcrel_ldr:
1515 case ARM::t2MOV_ga_pcrel: {
1517 unsigned LabelId = AFI->createPICLabelUId();
1523 bool isARM = Opcode != ARM::t2MOV_ga_pcrel;
1524 unsigned LO16Opc = isARM ? ARM::MOVi16_ga_pcrel : ARM::t2MOVi16_ga_pcrel;
1525 unsigned HI16Opc = isARM ? ARM::MOVTi16_ga_pcrel :ARM::t2MOVTi16_ga_pcrel;
1528 unsigned PICAddOpc = isARM
1529 ? (Opcode == ARM::MOV_ga_pcrel_ldr ? ARM::PICLDR : ARM::PICADD)
1532 TII->get(LO16Opc), DstReg)
1533 .addGlobalAddress(GV, MO1.
getOffset(), TF | LO16TF)
1542 TII->get(PICAddOpc))
1544 .addReg(DstReg).
addImm(LabelId);
1547 if (Opcode == ARM::MOV_ga_pcrel_ldr)
1550 TransferImpOps(MI, MIB1, MIB3);
1555 case ARM::MOVi32imm:
1556 case ARM::MOVCCi32imm:
1557 case ARM::t2MOVi32imm:
1558 case ARM::t2MOVCCi32imm:
1559 ExpandMOV32BitImm(MBB, MBBI);
1562 case ARM::SUBS_PC_LR: {
1570 TransferImpOps(MI, MIB, MIB);
1574 case ARM::VLDMQIA: {
1575 unsigned NewOpc = ARM::VLDMDIA;
1592 unsigned D0 =
TRI->getSubReg(DstReg, ARM::dsub_0);
1593 unsigned D1 =
TRI->getSubReg(DstReg, ARM::dsub_1);
1599 TransferImpOps(MI, MIB, MIB);
1605 case ARM::VSTMQIA: {
1606 unsigned NewOpc = ARM::VSTMDIA;
1624 unsigned D0 =
TRI->getSubReg(SrcReg, ARM::dsub_0);
1625 unsigned D1 =
TRI->getSubReg(SrcReg, ARM::dsub_1);
1627 .
addReg(D1, SrcIsKill ? RegState::Kill : 0);
1632 TransferImpOps(MI, MIB, MIB);
1638 case ARM::VLD2q8Pseudo:
1639 case ARM::VLD2q16Pseudo:
1640 case ARM::VLD2q32Pseudo:
1641 case ARM::VLD2q8PseudoWB_fixed:
1642 case ARM::VLD2q16PseudoWB_fixed:
1643 case ARM::VLD2q32PseudoWB_fixed:
1644 case ARM::VLD2q8PseudoWB_register:
1645 case ARM::VLD2q16PseudoWB_register:
1646 case ARM::VLD2q32PseudoWB_register:
1647 case ARM::VLD3d8Pseudo:
1648 case ARM::VLD3d16Pseudo:
1649 case ARM::VLD3d32Pseudo:
1650 case ARM::VLD1d8TPseudo:
1651 case ARM::VLD1d16TPseudo:
1652 case ARM::VLD1d32TPseudo:
1653 case ARM::VLD1d64TPseudo:
1654 case ARM::VLD1d64TPseudoWB_fixed:
1655 case ARM::VLD1d64TPseudoWB_register:
1656 case ARM::VLD3d8Pseudo_UPD:
1657 case ARM::VLD3d16Pseudo_UPD:
1658 case ARM::VLD3d32Pseudo_UPD:
1659 case ARM::VLD3q8Pseudo_UPD:
1660 case ARM::VLD3q16Pseudo_UPD:
1661 case ARM::VLD3q32Pseudo_UPD:
1662 case ARM::VLD3q8oddPseudo:
1663 case ARM::VLD3q16oddPseudo:
1664 case ARM::VLD3q32oddPseudo:
1665 case ARM::VLD3q8oddPseudo_UPD:
1666 case ARM::VLD3q16oddPseudo_UPD:
1667 case ARM::VLD3q32oddPseudo_UPD:
1668 case ARM::VLD4d8Pseudo:
1669 case ARM::VLD4d16Pseudo:
1670 case ARM::VLD4d32Pseudo:
1671 case ARM::VLD1d8QPseudo:
1672 case ARM::VLD1d16QPseudo:
1673 case ARM::VLD1d32QPseudo:
1674 case ARM::VLD1d64QPseudo:
1675 case ARM::VLD1d64QPseudoWB_fixed:
1676 case ARM::VLD1d64QPseudoWB_register:
1677 case ARM::VLD1q8HighQPseudo:
1678 case ARM::VLD1q8LowQPseudo_UPD:
1679 case ARM::VLD1q8HighTPseudo:
1680 case ARM::VLD1q8LowTPseudo_UPD:
1681 case ARM::VLD1q16HighQPseudo:
1682 case ARM::VLD1q16LowQPseudo_UPD:
1683 case ARM::VLD1q16HighTPseudo:
1684 case ARM::VLD1q16LowTPseudo_UPD:
1685 case ARM::VLD1q32HighQPseudo:
1686 case ARM::VLD1q32LowQPseudo_UPD:
1687 case ARM::VLD1q32HighTPseudo:
1688 case ARM::VLD1q32LowTPseudo_UPD:
1689 case ARM::VLD1q64HighQPseudo:
1690 case ARM::VLD1q64LowQPseudo_UPD:
1691 case ARM::VLD1q64HighTPseudo:
1692 case ARM::VLD1q64LowTPseudo_UPD:
1693 case ARM::VLD4d8Pseudo_UPD:
1694 case ARM::VLD4d16Pseudo_UPD:
1695 case ARM::VLD4d32Pseudo_UPD:
1696 case ARM::VLD4q8Pseudo_UPD:
1697 case ARM::VLD4q16Pseudo_UPD:
1698 case ARM::VLD4q32Pseudo_UPD:
1699 case ARM::VLD4q8oddPseudo:
1700 case ARM::VLD4q16oddPseudo:
1701 case ARM::VLD4q32oddPseudo:
1702 case ARM::VLD4q8oddPseudo_UPD:
1703 case ARM::VLD4q16oddPseudo_UPD:
1704 case ARM::VLD4q32oddPseudo_UPD:
1705 case ARM::VLD3DUPd8Pseudo:
1706 case ARM::VLD3DUPd16Pseudo:
1707 case ARM::VLD3DUPd32Pseudo:
1708 case ARM::VLD3DUPd8Pseudo_UPD:
1709 case ARM::VLD3DUPd16Pseudo_UPD:
1710 case ARM::VLD3DUPd32Pseudo_UPD:
1711 case ARM::VLD4DUPd8Pseudo:
1712 case ARM::VLD4DUPd16Pseudo:
1713 case ARM::VLD4DUPd32Pseudo:
1714 case ARM::VLD4DUPd8Pseudo_UPD:
1715 case ARM::VLD4DUPd16Pseudo_UPD:
1716 case ARM::VLD4DUPd32Pseudo_UPD:
1717 case ARM::VLD2DUPq8EvenPseudo:
1718 case ARM::VLD2DUPq8OddPseudo:
1719 case ARM::VLD2DUPq16EvenPseudo:
1720 case ARM::VLD2DUPq16OddPseudo:
1721 case ARM::VLD2DUPq32EvenPseudo:
1722 case ARM::VLD2DUPq32OddPseudo:
1723 case ARM::VLD3DUPq8EvenPseudo:
1724 case ARM::VLD3DUPq8OddPseudo:
1725 case ARM::VLD3DUPq16EvenPseudo:
1726 case ARM::VLD3DUPq16OddPseudo:
1727 case ARM::VLD3DUPq32EvenPseudo:
1728 case ARM::VLD3DUPq32OddPseudo:
1729 case ARM::VLD4DUPq8EvenPseudo:
1730 case ARM::VLD4DUPq8OddPseudo:
1731 case ARM::VLD4DUPq16EvenPseudo:
1732 case ARM::VLD4DUPq16OddPseudo:
1733 case ARM::VLD4DUPq32EvenPseudo:
1734 case ARM::VLD4DUPq32OddPseudo:
1738 case ARM::VST2q8Pseudo:
1739 case ARM::VST2q16Pseudo:
1740 case ARM::VST2q32Pseudo:
1741 case ARM::VST2q8PseudoWB_fixed:
1742 case ARM::VST2q16PseudoWB_fixed:
1743 case ARM::VST2q32PseudoWB_fixed:
1744 case ARM::VST2q8PseudoWB_register:
1745 case ARM::VST2q16PseudoWB_register:
1746 case ARM::VST2q32PseudoWB_register:
1747 case ARM::VST3d8Pseudo:
1748 case ARM::VST3d16Pseudo:
1749 case ARM::VST3d32Pseudo:
1750 case ARM::VST1d8TPseudo:
1751 case ARM::VST1d16TPseudo:
1752 case ARM::VST1d32TPseudo:
1753 case ARM::VST1d64TPseudo:
1754 case ARM::VST3d8Pseudo_UPD:
1755 case ARM::VST3d16Pseudo_UPD:
1756 case ARM::VST3d32Pseudo_UPD:
1757 case ARM::VST1d64TPseudoWB_fixed:
1758 case ARM::VST1d64TPseudoWB_register:
1759 case ARM::VST3q8Pseudo_UPD:
1760 case ARM::VST3q16Pseudo_UPD:
1761 case ARM::VST3q32Pseudo_UPD:
1762 case ARM::VST3q8oddPseudo:
1763 case ARM::VST3q16oddPseudo:
1764 case ARM::VST3q32oddPseudo:
1765 case ARM::VST3q8oddPseudo_UPD:
1766 case ARM::VST3q16oddPseudo_UPD:
1767 case ARM::VST3q32oddPseudo_UPD:
1768 case ARM::VST4d8Pseudo:
1769 case ARM::VST4d16Pseudo:
1770 case ARM::VST4d32Pseudo:
1771 case ARM::VST1d8QPseudo:
1772 case ARM::VST1d16QPseudo:
1773 case ARM::VST1d32QPseudo:
1774 case ARM::VST1d64QPseudo:
1775 case ARM::VST4d8Pseudo_UPD:
1776 case ARM::VST4d16Pseudo_UPD:
1777 case ARM::VST4d32Pseudo_UPD:
1778 case ARM::VST1d64QPseudoWB_fixed:
1779 case ARM::VST1d64QPseudoWB_register:
1780 case ARM::VST1q8HighQPseudo:
1781 case ARM::VST1q8LowQPseudo_UPD:
1782 case ARM::VST1q8HighTPseudo:
1783 case ARM::VST1q8LowTPseudo_UPD:
1784 case ARM::VST1q16HighQPseudo:
1785 case ARM::VST1q16LowQPseudo_UPD:
1786 case ARM::VST1q16HighTPseudo:
1787 case ARM::VST1q16LowTPseudo_UPD:
1788 case ARM::VST1q32HighQPseudo:
1789 case ARM::VST1q32LowQPseudo_UPD:
1790 case ARM::VST1q32HighTPseudo:
1791 case ARM::VST1q32LowTPseudo_UPD:
1792 case ARM::VST1q64HighQPseudo:
1793 case ARM::VST1q64LowQPseudo_UPD:
1794 case ARM::VST1q64HighTPseudo:
1795 case ARM::VST1q64LowTPseudo_UPD:
1796 case ARM::VST4q8Pseudo_UPD:
1797 case ARM::VST4q16Pseudo_UPD:
1798 case ARM::VST4q32Pseudo_UPD:
1799 case ARM::VST4q8oddPseudo:
1800 case ARM::VST4q16oddPseudo:
1801 case ARM::VST4q32oddPseudo:
1802 case ARM::VST4q8oddPseudo_UPD:
1803 case ARM::VST4q16oddPseudo_UPD:
1804 case ARM::VST4q32oddPseudo_UPD:
1808 case ARM::VLD1LNq8Pseudo:
1809 case ARM::VLD1LNq16Pseudo:
1810 case ARM::VLD1LNq32Pseudo:
1811 case ARM::VLD1LNq8Pseudo_UPD:
1812 case ARM::VLD1LNq16Pseudo_UPD:
1813 case ARM::VLD1LNq32Pseudo_UPD:
1814 case ARM::VLD2LNd8Pseudo:
1815 case ARM::VLD2LNd16Pseudo:
1816 case ARM::VLD2LNd32Pseudo:
1817 case ARM::VLD2LNq16Pseudo:
1818 case ARM::VLD2LNq32Pseudo:
1819 case ARM::VLD2LNd8Pseudo_UPD:
1820 case ARM::VLD2LNd16Pseudo_UPD:
1821 case ARM::VLD2LNd32Pseudo_UPD:
1822 case ARM::VLD2LNq16Pseudo_UPD:
1823 case ARM::VLD2LNq32Pseudo_UPD:
1824 case ARM::VLD3LNd8Pseudo:
1825 case ARM::VLD3LNd16Pseudo:
1826 case ARM::VLD3LNd32Pseudo:
1827 case ARM::VLD3LNq16Pseudo:
1828 case ARM::VLD3LNq32Pseudo:
1829 case ARM::VLD3LNd8Pseudo_UPD:
1830 case ARM::VLD3LNd16Pseudo_UPD:
1831 case ARM::VLD3LNd32Pseudo_UPD:
1832 case ARM::VLD3LNq16Pseudo_UPD:
1833 case ARM::VLD3LNq32Pseudo_UPD:
1834 case ARM::VLD4LNd8Pseudo:
1835 case ARM::VLD4LNd16Pseudo:
1836 case ARM::VLD4LNd32Pseudo:
1837 case ARM::VLD4LNq16Pseudo:
1838 case ARM::VLD4LNq32Pseudo:
1839 case ARM::VLD4LNd8Pseudo_UPD:
1840 case ARM::VLD4LNd16Pseudo_UPD:
1841 case ARM::VLD4LNd32Pseudo_UPD:
1842 case ARM::VLD4LNq16Pseudo_UPD:
1843 case ARM::VLD4LNq32Pseudo_UPD:
1844 case ARM::VST1LNq8Pseudo:
1845 case ARM::VST1LNq16Pseudo:
1846 case ARM::VST1LNq32Pseudo:
1847 case ARM::VST1LNq8Pseudo_UPD:
1848 case ARM::VST1LNq16Pseudo_UPD:
1849 case ARM::VST1LNq32Pseudo_UPD:
1850 case ARM::VST2LNd8Pseudo:
1851 case ARM::VST2LNd16Pseudo:
1852 case ARM::VST2LNd32Pseudo:
1853 case ARM::VST2LNq16Pseudo:
1854 case ARM::VST2LNq32Pseudo:
1855 case ARM::VST2LNd8Pseudo_UPD:
1856 case ARM::VST2LNd16Pseudo_UPD:
1857 case ARM::VST2LNd32Pseudo_UPD:
1858 case ARM::VST2LNq16Pseudo_UPD:
1859 case ARM::VST2LNq32Pseudo_UPD:
1860 case ARM::VST3LNd8Pseudo:
1861 case ARM::VST3LNd16Pseudo:
1862 case ARM::VST3LNd32Pseudo:
1863 case ARM::VST3LNq16Pseudo:
1864 case ARM::VST3LNq32Pseudo:
1865 case ARM::VST3LNd8Pseudo_UPD:
1866 case ARM::VST3LNd16Pseudo_UPD:
1867 case ARM::VST3LNd32Pseudo_UPD:
1868 case ARM::VST3LNq16Pseudo_UPD:
1869 case ARM::VST3LNq32Pseudo_UPD:
1870 case ARM::VST4LNd8Pseudo:
1871 case ARM::VST4LNd16Pseudo:
1872 case ARM::VST4LNd32Pseudo:
1873 case ARM::VST4LNq16Pseudo:
1874 case ARM::VST4LNq32Pseudo:
1875 case ARM::VST4LNd8Pseudo_UPD:
1876 case ARM::VST4LNd16Pseudo_UPD:
1877 case ARM::VST4LNd32Pseudo_UPD:
1878 case ARM::VST4LNq16Pseudo_UPD:
1879 case ARM::VST4LNq32Pseudo_UPD:
1883 case ARM::VTBL3Pseudo: ExpandVTBL(MBBI, ARM::VTBL3,
false);
return true;
1884 case ARM::VTBL4Pseudo: ExpandVTBL(MBBI, ARM::VTBL4,
false);
return true;
1885 case ARM::VTBX3Pseudo: ExpandVTBL(MBBI, ARM::VTBX3,
true);
return true;
1886 case ARM::VTBX4Pseudo: ExpandVTBL(MBBI, ARM::VTBX4,
true);
return true;
1888 case ARM::CMP_SWAP_8:
1890 return ExpandCMP_SWAP(MBB, MBBI, ARM::t2LDREXB, ARM::t2STREXB,
1891 ARM::tUXTB, NextMBBI);
1893 return ExpandCMP_SWAP(MBB, MBBI, ARM::LDREXB, ARM::STREXB,
1895 case ARM::CMP_SWAP_16:
1897 return ExpandCMP_SWAP(MBB, MBBI, ARM::t2LDREXH, ARM::t2STREXH,
1898 ARM::tUXTH, NextMBBI);
1900 return ExpandCMP_SWAP(MBB, MBBI, ARM::LDREXH, ARM::STREXH,
1902 case ARM::CMP_SWAP_32:
1904 return ExpandCMP_SWAP(MBB, MBBI, ARM::t2LDREX, ARM::t2STREX, 0,
1907 return ExpandCMP_SWAP(MBB, MBBI, ARM::LDREX, ARM::STREX, 0, NextMBBI);
1909 case ARM::CMP_SWAP_64:
1910 return ExpandCMP_SWAP_64(MBB, MBBI, NextMBBI);
1920 Modified |= ExpandMI(MBB, MBBI, NMBBI);
1929 TII = STI->getInstrInfo();
1930 TRI = STI->getRegisterInfo();
1935 Modified |= ExpandMBB(MBB);
1937 MF.verify(
this,
"After expanding ARM pseudo instructions.");
1944 return new ARMExpandPseudo();
unsigned getTargetFlags() const
const MachineInstrBuilder & add(const MachineOperand &MO) const
const_iterator end(StringRef path)
Get end iterator over path.
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
static ARMConstantPoolSymbol * Create(LLVMContext &C, StringRef s, unsigned ID, unsigned char PCAdj)
This class represents lattice values for constants.
static cl::opt< bool > VerifyARMPseudo("verify-arm-pseudo-expand", cl::Hidden, cl::desc("Verify machine code after expanding ARM pseudos"))
static const NEONLdStTableEntry * LookupNEONLdSt(unsigned Opcode)
LookupNEONLdSt - Search the NEONLdStTable for information about a NEON load or store pseudo instructi...
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
Describe properties that are true of each instruction in the target description file.
unsigned getReg() const
getReg - Returns the register number.
Address of indexed Jump Table for switch.
FunctionPass * createARMExpandPseudoPass()
createARMExpandPseudoPass - returns an instance of the pseudo instruction expansion pass...
MO_GOT - On a symbol operand, this represents a GOT relative relocation.
MachineBasicBlock reference.
unsigned const TargetRegisterInfo * TRI
const MachineInstrBuilder & addGlobalAddress(const GlobalValue *GV, int64_t Offset=0, unsigned char TargetFlags=0) const
Mask of live-out registers.
unsigned getSOImmTwoPartSecond(unsigned V)
getSOImmTwoPartSecond - If V is a value that satisfies isSOImmTwoPartVal, return the second chunk of ...
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
Mask of preserved registers.
instr_iterator erase(instr_iterator I)
Remove an instruction from the instruction list and delete it.
static const NEONLdStTableEntry NEONLdStTable[]
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
unsigned getNumOperands() const
Return the number of declared MachineOperands for this MachineInstruction.
const HexagonInstrInfo * TII
virtual bool hasFP(const MachineFunction &MF) const =0
hasFP - Return true if the specified function should have a dedicated frame pointer register...
Target-dependent index+offset operand.
unsigned getFrameRegister(const MachineFunction &MF) const override
void setImplicit(bool Val=true)
void eraseFromParent()
Unlink 'this' from the containing basic block and delete it.
void emitT2RegPlusImmediate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const DebugLoc &dl, unsigned DestReg, unsigned BaseReg, int NumBytes, ARMCC::CondCodes Pred, unsigned PredReg, const ARMBaseInstrInfo &TII, unsigned MIFlags=0)
Name of external global symbol.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const char * getSymbolName() const
const MCInstrDesc & getDesc() const
Returns the target instruction descriptor of this MachineInstr.
static std::array< MachineOperand, 2 > predOps(ARMCC::CondCodes Pred, unsigned PredReg=0)
Get the operands corresponding to the given Pred value.
Immediate >64bit operand.
auto lower_bound(R &&Range, ForwardIt I) -> decltype(adl_begin(Range))
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
iterator getLastNonDebugInstr()
Returns an iterator to the last non-debug instruction in the basic block, or end().
virtual const TargetInstrInfo * getInstrInfo() const
unsigned getUndefRegState(bool B)
MachineBasicBlock * CreateMachineBasicBlock(const BasicBlock *bb=nullptr)
CreateMachineBasicBlock - Allocate a new MachineBasicBlock.
unsigned getKillRegState(bool B)
unsigned getDeadRegState(bool B)
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
Address of a global value.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
MachineInstrBuilder & UseMI
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
const GlobalValue * getGlobal() const
unsigned getSubReg(unsigned Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
unsigned getMaxAlignment() const
Return the alignment in bytes that this function must be aligned to, which is greater than the defaul...
Address of a basic block.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
bool hasBasePointer(const MachineFunction &MF) const
FunctionPass class - This class is used to implement most global optimizations.
Thread Local Storage (General Dynamic Mode)
self_iterator getIterator()
MachineConstantPool * getConstantPool()
getConstantPool - Return the constant pool object for the current function.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
void emitARMRegPlusImmediate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const DebugLoc &dl, unsigned DestReg, unsigned BaseReg, int NumBytes, ARMCC::CondCodes Pred, unsigned PredReg, const ARMBaseInstrInfo &TII, unsigned MIFlags=0)
emitARMRegPlusImmediate / emitT2RegPlusImmediate - Emits a series of instructions to materializea des...
ARMCC::CondCodes getInstrPredicate(const MachineInstr &MI, unsigned &PredReg)
getInstrPredicate - If instruction is predicated, returns its predicate condition, otherwise returns AL.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This file implements the LivePhysRegs utility for tracking liveness of physical registers.
Abstract base class for all machine specific constantpool value subclasses.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
MO_LO16 - On a symbol operand, this represents a relocation containing lower 16 bit of the address...
void setIsKill(bool Val=true)
void addSuccessor(MachineBasicBlock *Succ, BranchProbability Prob=BranchProbability::getUnknown())
Add Succ as a successor of this MachineBasicBlock.
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
Generic predicate for ISel.
MachineOperand class - Representation of each machine instruction operand.
MachineInstrBuilder MachineInstrBuilder & DefMI
static void addExclusiveRegPair(MachineInstrBuilder &MIB, MachineOperand &Reg, unsigned Flags, bool IsThumb, const TargetRegisterInfo *TRI)
ARM's ldrexd/strexd take a consecutive register pair (represented as a single GPRPair register)...
unsigned getSORegOpc(ShiftOpc ShOp, unsigned Imm)
const Function & getFunction() const
Return the LLVM function that this machine code represents.
MCSymbol reference (for debug/eh info)
void computeAndAddLiveIns(LivePhysRegs &LiveRegs, MachineBasicBlock &MBB)
Convenience function combining computeLiveIns() and addLiveIns().
const MachineBasicBlock * getParent() const
MachineFunctionProperties & set(Property P)
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
static MachineOperand condCodeOp(unsigned CCReg=0)
Get the operand corresponding to the conditional code result.
A set of physical registers with utility functions to track liveness when walking backward/forward th...
static void GetDSubRegs(unsigned Reg, NEONRegSpacing RegSpc, const TargetRegisterInfo *TRI, unsigned &D0, unsigned &D1, unsigned &D2, unsigned &D3)
GetDSubRegs - Get 4 D subregisters of a Q, QQ, or QQQQ register, corresponding to the specified regis...
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
int64_t getOffset() const
Return the offset from the symbol in this operand.
const MachineInstrBuilder & addExternalSymbol(const char *FnName, unsigned char TargetFlags=0) const
const MachineInstrBuilder & cloneMemRefs(const MachineInstr &OtherMI) const
virtual const TargetFrameLowering * getFrameLowering() const
void emitThumbRegPlusImmediate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const DebugLoc &dl, unsigned DestReg, unsigned BaseReg, int NumBytes, const TargetInstrInfo &TII, const ARMBaseRegisterInfo &MRI, unsigned MIFlags=0)
emitThumbRegPlusImmediate - Emits a series of instructions to materialize a destreg = basereg + immed...
const BasicBlock * getBasicBlock() const
Return the LLVM basic block that this instance corresponded to originally.
#define ARM_EXPAND_PSEUDO_NAME
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
Abstract Stack Frame Index.
bool isSymbol() const
isSymbol - Tests if this is a MO_ExternalSymbol operand.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void insert(iterator MBBI, MachineBasicBlock *MBB)
bool operator<(int64_t V1, const APSInt &V2)
virtual const ARMBaseRegisterInfo & getRegisterInfo() const =0
Floating-point immediate operand.
INITIALIZE_PASS(ARMExpandPseudo, DEBUG_TYPE, ARM_EXPAND_PSEUDO_NAME, false, false) void ARMExpandPseudo
TransferImpOps - Transfer implicit operands on the pseudo instruction to the instructions created fro...
static bool IsAnAddressOperand(const MachineOperand &MO)
bool addRegisterKilled(unsigned IncomingReg, const TargetRegisterInfo *RegInfo, bool AddIfNotFound=false)
We have determined MI kills a register.
StringRef - Represent a constant reference to a string, i.e.
Address of indexed Constant in Constant Pool.
#define LLVM_ATTRIBUTE_UNUSED
const MachineOperand & getOperand(unsigned i) const
void finalizeBundle(MachineBasicBlock &MBB, MachineBasicBlock::instr_iterator FirstMI, MachineBasicBlock::instr_iterator LastMI)
finalizeBundle - Finalize a machine instruction bundle which includes a sequence of instructions star...
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
unsigned getSOImmTwoPartFirst(unsigned V)
getSOImmTwoPartFirst - If V is a value that satisfies isSOImmTwoPartVal, return the first chunk of it...
static ARMConstantPoolConstant * Create(const Constant *C, unsigned ID)
unsigned getConstantPoolIndex(const Constant *C, unsigned Alignment)
getConstantPoolIndex - Create a new entry in the constant pool or return an existing one...
static MachineOperand makeImplicit(const MachineOperand &MO)
MO_HI16 - On a symbol operand, this represents a relocation containing higher 16 bit of the address...
Properties which a MachineFunction may have at a given point in time.
Metadata reference (for debug info)