1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* DAG Instruction Selector for the Lanai target *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* *| |
7 | \*===----------------------------------------------------------------------===*/ |
8 | |
9 | // *** NOTE: This file is #included into the middle of the target |
10 | // *** instruction selector class. These functions are really methods. |
11 | |
12 | // If GET_DAGISEL_DECL is #defined with any value, only function |
13 | // declarations will be included when this file is included. |
14 | // If GET_DAGISEL_BODY is #defined, its value should be the name of |
15 | // the instruction selector class. Function bodies will be emitted |
16 | // and each function's name will be qualified with the name of the |
17 | // class. |
18 | // |
19 | // When neither of the GET_DAGISEL* macros is defined, the functions |
20 | // are emitted inline. |
21 | |
22 | #if defined(GET_DAGISEL_DECL) && defined(GET_DAGISEL_BODY) |
23 | #error GET_DAGISEL_DECL and GET_DAGISEL_BODY cannot be both defined, undef both for inline definitions |
24 | #endif |
25 | |
26 | #ifdef GET_DAGISEL_BODY |
27 | #define LOCAL_DAGISEL_STRINGIZE(X) LOCAL_DAGISEL_STRINGIZE_(X) |
28 | #define LOCAL_DAGISEL_STRINGIZE_(X) #X |
29 | static_assert(sizeof(LOCAL_DAGISEL_STRINGIZE(GET_DAGISEL_BODY)) > 1, |
30 | "GET_DAGISEL_BODY is empty: it should be defined with the class name" ); |
31 | #undef LOCAL_DAGISEL_STRINGIZE_ |
32 | #undef LOCAL_DAGISEL_STRINGIZE |
33 | #endif |
34 | |
35 | #if !defined(GET_DAGISEL_DECL) && !defined(GET_DAGISEL_BODY) |
36 | #define DAGISEL_INLINE 1 |
37 | #else |
38 | #define DAGISEL_INLINE 0 |
39 | #endif |
40 | |
41 | #if !DAGISEL_INLINE |
42 | #define DAGISEL_CLASS_COLONCOLON GET_DAGISEL_BODY :: |
43 | #else |
44 | #define DAGISEL_CLASS_COLONCOLON |
45 | #endif |
46 | |
47 | #ifdef GET_DAGISEL_DECL |
48 | void SelectCode(SDNode *N); |
49 | #endif |
50 | #if defined(GET_DAGISEL_BODY) || DAGISEL_INLINE |
51 | void DAGISEL_CLASS_COLONCOLON SelectCode(SDNode *N) |
52 | { |
53 | // Some target values are emitted as 2 bytes, TARGET_VAL handles |
54 | // this. Coverage indexes are emitted as 4 bytes, |
55 | // COVERAGE_IDX_VAL handles this. |
56 | #define TARGET_VAL(X) X & 255, unsigned(X) >> 8 |
57 | #define COVERAGE_IDX_VAL(X) X & 255, (unsigned(X) >> 8) & 255, (unsigned(X) >> 16) & 255, (unsigned(X) >> 24) & 255 |
58 | static const unsigned char MatcherTable[] = { |
59 | OPC_SwitchOpcode , 97|128,1, TARGET_VAL(ISD::LOAD), |
60 | OPC_RecordMemRef, |
61 | OPC_RecordNode, |
62 | OPC_RecordChild1, |
63 | OPC_CheckChild1TypeI32, |
64 | OPC_CheckPredicate, 12, |
65 | OPC_CheckTypeI32, |
66 | OPC_Scope, 30, |
67 | OPC_CheckPredicate, 9, |
68 | OPC_Scope, 12, |
69 | OPC_CheckComplexPat2, /*#*/1, |
70 | OPC_EmitMergeInputChains1_0, |
71 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDW_RI), 0|OPFL_Chain|OPFL_MemRefs, |
72 | 7, 3, 2, 3, 4, |
73 | 12, |
74 | OPC_CheckComplexPat1, /*#*/1, |
75 | OPC_EmitMergeInputChains1_0, |
76 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDW_RR), 0|OPFL_Chain|OPFL_MemRefs, |
77 | 7, 3, 2, 3, 4, |
78 | 0, |
79 | 46, |
80 | OPC_CheckPredicate4, |
81 | OPC_Scope, 14, |
82 | OPC_CheckPredicate, 13, |
83 | OPC_CheckComplexPat1, /*#*/1, |
84 | OPC_EmitMergeInputChains1_0, |
85 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDWz_RR), 0|OPFL_Chain|OPFL_MemRefs, |
86 | 7, 3, 2, 3, 4, |
87 | 13, |
88 | OPC_CheckPredicate3, |
89 | OPC_CheckComplexPat1, /*#*/1, |
90 | OPC_EmitMergeInputChains1_0, |
91 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDHz_RR), 0|OPFL_Chain|OPFL_MemRefs, |
92 | 7, 3, 2, 3, 4, |
93 | 13, |
94 | OPC_CheckPredicate2, |
95 | OPC_CheckComplexPat1, /*#*/1, |
96 | OPC_EmitMergeInputChains1_0, |
97 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDBz_RR), 0|OPFL_Chain|OPFL_MemRefs, |
98 | 7, 3, 2, 3, 4, |
99 | 0, |
100 | 31, |
101 | OPC_CheckPredicate5, |
102 | OPC_Scope, 13, |
103 | OPC_CheckPredicate3, |
104 | OPC_CheckComplexPat1, /*#*/1, |
105 | OPC_EmitMergeInputChains1_0, |
106 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDHs_RR), 0|OPFL_Chain|OPFL_MemRefs, |
107 | 7, 3, 2, 3, 4, |
108 | 13, |
109 | OPC_CheckPredicate2, |
110 | OPC_CheckComplexPat1, /*#*/1, |
111 | OPC_EmitMergeInputChains1_0, |
112 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDBs_RR), 0|OPFL_Chain|OPFL_MemRefs, |
113 | 7, 3, 2, 3, 4, |
114 | 0, |
115 | 14, |
116 | OPC_CheckPredicate4, |
117 | OPC_CheckPredicate3, |
118 | OPC_CheckComplexPat0, /*#*/1, |
119 | OPC_EmitMergeInputChains1_0, |
120 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDHz_RI), 0|OPFL_Chain|OPFL_MemRefs, |
121 | 7, 3, 2, 3, 4, |
122 | 14, |
123 | OPC_CheckPredicate5, |
124 | OPC_CheckPredicate3, |
125 | OPC_CheckComplexPat0, /*#*/1, |
126 | OPC_EmitMergeInputChains1_0, |
127 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDHs_RI), 0|OPFL_Chain|OPFL_MemRefs, |
128 | 7, 3, 2, 3, 4, |
129 | 14, |
130 | OPC_CheckPredicate4, |
131 | OPC_CheckPredicate2, |
132 | OPC_CheckComplexPat0, /*#*/1, |
133 | OPC_EmitMergeInputChains1_0, |
134 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDBz_RI), 0|OPFL_Chain|OPFL_MemRefs, |
135 | 7, 3, 2, 3, 4, |
136 | 14, |
137 | OPC_CheckPredicate5, |
138 | OPC_CheckPredicate2, |
139 | OPC_CheckComplexPat0, /*#*/1, |
140 | OPC_EmitMergeInputChains1_0, |
141 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDBs_RI), 0|OPFL_Chain|OPFL_MemRefs, |
142 | 7, 3, 2, 3, 4, |
143 | 32, |
144 | OPC_CheckPredicate, 14, |
145 | OPC_Scope, 13, |
146 | OPC_CheckPredicate2, |
147 | OPC_CheckComplexPat0, /*#*/1, |
148 | OPC_EmitMergeInputChains1_0, |
149 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDBz_RI), 0|OPFL_Chain|OPFL_MemRefs, |
150 | 7, 3, 2, 3, 4, |
151 | 13, |
152 | OPC_CheckPredicate3, |
153 | OPC_CheckComplexPat0, /*#*/1, |
154 | OPC_EmitMergeInputChains1_0, |
155 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDHz_RI), 0|OPFL_Chain|OPFL_MemRefs, |
156 | 7, 3, 2, 3, 4, |
157 | 0, |
158 | 12, |
159 | OPC_CheckPredicate, 9, |
160 | OPC_CheckComplexPat3, /*#*/1, |
161 | OPC_EmitMergeInputChains1_0, |
162 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDADDR), 0|OPFL_Chain|OPFL_MemRefs, |
163 | 7, 1, 2, |
164 | 0, |
165 | 115, TARGET_VAL(ISD::STORE), |
166 | OPC_RecordMemRef, |
167 | OPC_RecordNode, |
168 | OPC_RecordChild1, |
169 | OPC_CheckChild1TypeI32, |
170 | OPC_RecordChild2, |
171 | OPC_CheckChild2TypeI32, |
172 | OPC_CheckPredicate, 15, |
173 | OPC_Scope, 30, |
174 | OPC_CheckPredicate, 10, |
175 | OPC_Scope, 12, |
176 | OPC_CheckComplexPat1, /*#*/2, |
177 | OPC_EmitMergeInputChains1_0, |
178 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::SW_RR), 0|OPFL_Chain|OPFL_MemRefs, |
179 | 4, 1, 3, 4, 5, |
180 | 12, |
181 | OPC_CheckComplexPat2, /*#*/2, |
182 | OPC_EmitMergeInputChains1_0, |
183 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::SW_RI), 0|OPFL_Chain|OPFL_MemRefs, |
184 | 4, 1, 3, 4, 5, |
185 | 0, |
186 | 60, |
187 | OPC_CheckPredicate, 16, |
188 | OPC_Scope, 13, |
189 | OPC_CheckPredicate3, |
190 | OPC_CheckComplexPat1, /*#*/2, |
191 | OPC_EmitMergeInputChains1_0, |
192 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::STH_RR), 0|OPFL_Chain|OPFL_MemRefs, |
193 | 4, 1, 3, 4, 5, |
194 | 13, |
195 | OPC_CheckPredicate2, |
196 | OPC_CheckComplexPat1, /*#*/2, |
197 | OPC_EmitMergeInputChains1_0, |
198 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::STB_RR), 0|OPFL_Chain|OPFL_MemRefs, |
199 | 4, 1, 3, 4, 5, |
200 | 13, |
201 | OPC_CheckPredicate3, |
202 | OPC_CheckComplexPat0, /*#*/2, |
203 | OPC_EmitMergeInputChains1_0, |
204 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::STH_RI), 0|OPFL_Chain|OPFL_MemRefs, |
205 | 4, 1, 3, 4, 5, |
206 | 13, |
207 | OPC_CheckPredicate2, |
208 | OPC_CheckComplexPat0, /*#*/2, |
209 | OPC_EmitMergeInputChains1_0, |
210 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::STB_RI), 0|OPFL_Chain|OPFL_MemRefs, |
211 | 4, 1, 3, 4, 5, |
212 | 0, |
213 | 12, |
214 | OPC_CheckPredicate, 10, |
215 | OPC_CheckComplexPat3, /*#*/2, |
216 | OPC_EmitMergeInputChains1_0, |
217 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::STADDR), 0|OPFL_Chain|OPFL_MemRefs, |
218 | 2, 1, 3, |
219 | 0, |
220 | 39, TARGET_VAL(ISD::ATOMIC_LOAD), |
221 | OPC_RecordMemRef, |
222 | OPC_RecordNode, |
223 | OPC_RecordChild1, |
224 | OPC_CheckChild1TypeI32, |
225 | OPC_CheckTypeI32, |
226 | OPC_Scope, 15, |
227 | OPC_CheckPredicate, 17, |
228 | OPC_CheckPredicate2, |
229 | OPC_CheckComplexPat0, /*#*/1, |
230 | OPC_EmitMergeInputChains1_0, |
231 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDBz_RI), 0|OPFL_Chain|OPFL_MemRefs, |
232 | 7, 3, 2, 3, 4, |
233 | 15, |
234 | OPC_CheckPredicate, 18, |
235 | OPC_CheckPredicate2, |
236 | OPC_CheckComplexPat0, /*#*/1, |
237 | OPC_EmitMergeInputChains1_0, |
238 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::LDBz_RI), 0|OPFL_Chain|OPFL_MemRefs, |
239 | 7, 3, 2, 3, 4, |
240 | 0, |
241 | 21, TARGET_VAL(ISD::CALLSEQ_START), |
242 | OPC_RecordNode, |
243 | OPC_RecordChild1, |
244 | OPC_MoveChild1, |
245 | OPC_CheckOpcode, TARGET_VAL(ISD::TargetConstant), |
246 | OPC_MoveSibling2, |
247 | OPC_CheckOpcode, TARGET_VAL(ISD::TargetConstant), |
248 | OPC_RecordNode, |
249 | OPC_MoveParent, |
250 | OPC_EmitMergeInputChains1_0, |
251 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::ADJCALLSTACKDOWN), 0|OPFL_Chain|OPFL_GlueOutput, |
252 | 7, 2, 1, 2, |
253 | 22, TARGET_VAL(ISD::CALLSEQ_END), |
254 | OPC_RecordNode, |
255 | OPC_CaptureGlueInput, |
256 | OPC_RecordChild1, |
257 | OPC_MoveChild1, |
258 | OPC_CheckOpcode, TARGET_VAL(ISD::TargetConstant), |
259 | OPC_MoveSibling2, |
260 | OPC_CheckOpcode, TARGET_VAL(ISD::TargetConstant), |
261 | OPC_RecordNode, |
262 | OPC_MoveParent, |
263 | OPC_EmitMergeInputChains1_0, |
264 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::ADJCALLSTACKUP), 0|OPFL_Chain|OPFL_GlueInput|OPFL_GlueOutput, |
265 | 7, 2, 1, 2, |
266 | 74|128,2, TARGET_VAL(ISD::OR), |
267 | OPC_Scope, 25|128,1, |
268 | OPC_RecordChild0, |
269 | OPC_MoveChild1, |
270 | OPC_SwitchOpcode , 69, TARGET_VAL(LanaiISD::LO), |
271 | OPC_RecordChild0, |
272 | OPC_MoveChild0, |
273 | OPC_SwitchOpcode , 10, TARGET_VAL(ISD::TargetGlobalAddress), |
274 | OPC_MoveParent, |
275 | OPC_MoveParent, |
276 | OPC_CheckTypeI32, |
277 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
278 | 7, 2, 0, 1, |
279 | 10, TARGET_VAL(ISD::TargetExternalSymbol), |
280 | OPC_MoveParent, |
281 | OPC_MoveParent, |
282 | OPC_CheckTypeI32, |
283 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
284 | 7, 2, 0, 1, |
285 | 10, TARGET_VAL(ISD::TargetBlockAddress), |
286 | OPC_MoveParent, |
287 | OPC_MoveParent, |
288 | OPC_CheckTypeI32, |
289 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
290 | 7, 2, 0, 1, |
291 | 10, TARGET_VAL(ISD::TargetJumpTable), |
292 | OPC_MoveParent, |
293 | OPC_MoveParent, |
294 | OPC_CheckTypeI32, |
295 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
296 | 7, 2, 0, 1, |
297 | 10, TARGET_VAL(ISD::TargetConstantPool), |
298 | OPC_MoveParent, |
299 | OPC_MoveParent, |
300 | OPC_CheckTypeI32, |
301 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
302 | 7, 2, 0, 1, |
303 | 0, |
304 | 74, TARGET_VAL(LanaiISD::SMALL), |
305 | OPC_RecordChild0, |
306 | OPC_MoveChild0, |
307 | OPC_SwitchOpcode , 11, TARGET_VAL(ISD::TargetGlobalAddress), |
308 | OPC_MoveParent, |
309 | OPC_MoveParent, |
310 | OPC_CheckTypeI32, |
311 | OPC_EmitCopyToReg0, Lanai::R0, |
312 | OPC_MorphNodeTo1GlueInput, TARGET_VAL(Lanai::SLI), |
313 | 7, 1, 1, |
314 | 11, TARGET_VAL(ISD::TargetExternalSymbol), |
315 | OPC_MoveParent, |
316 | OPC_MoveParent, |
317 | OPC_CheckTypeI32, |
318 | OPC_EmitCopyToReg0, Lanai::R0, |
319 | OPC_MorphNodeTo1GlueInput, TARGET_VAL(Lanai::SLI), |
320 | 7, 1, 1, |
321 | 11, TARGET_VAL(ISD::TargetBlockAddress), |
322 | OPC_MoveParent, |
323 | OPC_MoveParent, |
324 | OPC_CheckTypeI32, |
325 | OPC_EmitCopyToReg0, Lanai::R0, |
326 | OPC_MorphNodeTo1GlueInput, TARGET_VAL(Lanai::SLI), |
327 | 7, 1, 1, |
328 | 11, TARGET_VAL(ISD::TargetJumpTable), |
329 | OPC_MoveParent, |
330 | OPC_MoveParent, |
331 | OPC_CheckTypeI32, |
332 | OPC_EmitCopyToReg0, Lanai::R0, |
333 | OPC_MorphNodeTo1GlueInput, TARGET_VAL(Lanai::SLI), |
334 | 7, 1, 1, |
335 | 11, TARGET_VAL(ISD::TargetConstantPool), |
336 | OPC_MoveParent, |
337 | OPC_MoveParent, |
338 | OPC_CheckTypeI32, |
339 | OPC_EmitCopyToReg0, Lanai::R0, |
340 | OPC_MorphNodeTo1GlueInput, TARGET_VAL(Lanai::SLI), |
341 | 7, 1, 1, |
342 | 0, |
343 | 0, |
344 | 78, |
345 | OPC_MoveChild0, |
346 | OPC_CheckOpcode, TARGET_VAL(LanaiISD::LO), |
347 | OPC_RecordChild0, |
348 | OPC_MoveChild0, |
349 | OPC_SwitchOpcode , 11, TARGET_VAL(ISD::TargetGlobalAddress), |
350 | OPC_MoveParent, |
351 | OPC_MoveParent, |
352 | OPC_RecordChild1, |
353 | OPC_CheckTypeI32, |
354 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
355 | 7, 2, 1, 0, |
356 | 11, TARGET_VAL(ISD::TargetExternalSymbol), |
357 | OPC_MoveParent, |
358 | OPC_MoveParent, |
359 | OPC_RecordChild1, |
360 | OPC_CheckTypeI32, |
361 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
362 | 7, 2, 1, 0, |
363 | 11, TARGET_VAL(ISD::TargetBlockAddress), |
364 | OPC_MoveParent, |
365 | OPC_MoveParent, |
366 | OPC_RecordChild1, |
367 | OPC_CheckTypeI32, |
368 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
369 | 7, 2, 1, 0, |
370 | 11, TARGET_VAL(ISD::TargetJumpTable), |
371 | OPC_MoveParent, |
372 | OPC_MoveParent, |
373 | OPC_RecordChild1, |
374 | OPC_CheckTypeI32, |
375 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
376 | 7, 2, 1, 0, |
377 | 11, TARGET_VAL(ISD::TargetConstantPool), |
378 | OPC_MoveParent, |
379 | OPC_MoveParent, |
380 | OPC_RecordChild1, |
381 | OPC_CheckTypeI32, |
382 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
383 | 7, 2, 1, 0, |
384 | 0, |
385 | 93, |
386 | OPC_RecordChild0, |
387 | OPC_RecordChild1, |
388 | OPC_Scope, 64, |
389 | OPC_MoveChild1, |
390 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
391 | OPC_Scope, 13, |
392 | OPC_CheckPredicate0, |
393 | OPC_MoveParent, |
394 | OPC_EmitConvertToTarget1, |
395 | OPC_EmitNodeXForm, 0, 2, |
396 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
397 | 7, 2, 0, 3, |
398 | 13, |
399 | OPC_CheckPredicate1, |
400 | OPC_MoveParent, |
401 | OPC_EmitConvertToTarget1, |
402 | OPC_EmitNodeXForm, 1, 2, |
403 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_HI), |
404 | 7, 2, 0, 3, |
405 | 14, |
406 | OPC_CheckPredicate0, |
407 | OPC_MoveParent, |
408 | OPC_EmitConvertToTarget1, |
409 | OPC_EmitNodeXForm, 0, 2, |
410 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::OR_F_I_LO), |
411 | 7, 7, 2, 0, 3, |
412 | 14, |
413 | OPC_CheckPredicate1, |
414 | OPC_MoveParent, |
415 | OPC_EmitConvertToTarget1, |
416 | OPC_EmitNodeXForm, 1, 2, |
417 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::OR_F_I_HI), |
418 | 7, 7, 2, 0, 3, |
419 | 0, |
420 | 23, |
421 | OPC_EmitInteger32, 0, |
422 | OPC_Scope, 8, |
423 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_R), |
424 | 7, 3, 0, 1, 2, |
425 | 9, |
426 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::OR_F_R), |
427 | 7, 7, 3, 0, 1, 2, |
428 | 0, |
429 | 0, |
430 | 0, |
431 | 93, TARGET_VAL(ISD::AND), |
432 | OPC_RecordChild0, |
433 | OPC_RecordChild1, |
434 | OPC_Scope, 64, |
435 | OPC_MoveChild1, |
436 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
437 | OPC_Scope, 13, |
438 | OPC_CheckPredicate6, |
439 | OPC_MoveParent, |
440 | OPC_EmitConvertToTarget1, |
441 | OPC_EmitNodeXForm, 0, 2, |
442 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::AND_I_LO), |
443 | 7, 2, 0, 3, |
444 | 13, |
445 | OPC_CheckPredicate7, |
446 | OPC_MoveParent, |
447 | OPC_EmitConvertToTarget1, |
448 | OPC_EmitNodeXForm, 1, 2, |
449 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::AND_I_HI), |
450 | 7, 2, 0, 3, |
451 | 14, |
452 | OPC_CheckPredicate6, |
453 | OPC_MoveParent, |
454 | OPC_EmitConvertToTarget1, |
455 | OPC_EmitNodeXForm, 0, 2, |
456 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::AND_F_I_LO), |
457 | 7, 7, 2, 0, 3, |
458 | 14, |
459 | OPC_CheckPredicate7, |
460 | OPC_MoveParent, |
461 | OPC_EmitConvertToTarget1, |
462 | OPC_EmitNodeXForm, 1, 2, |
463 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::AND_F_I_HI), |
464 | 7, 7, 2, 0, 3, |
465 | 0, |
466 | 23, |
467 | OPC_EmitInteger32, 0, |
468 | OPC_Scope, 8, |
469 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::AND_R), |
470 | 7, 3, 0, 1, 2, |
471 | 9, |
472 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::AND_F_R), |
473 | 7, 7, 3, 0, 1, 2, |
474 | 0, |
475 | 0, |
476 | 93, TARGET_VAL(ISD::XOR), |
477 | OPC_RecordChild0, |
478 | OPC_RecordChild1, |
479 | OPC_Scope, 64, |
480 | OPC_MoveChild1, |
481 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
482 | OPC_Scope, 13, |
483 | OPC_CheckPredicate0, |
484 | OPC_MoveParent, |
485 | OPC_EmitConvertToTarget1, |
486 | OPC_EmitNodeXForm, 0, 2, |
487 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::XOR_I_LO), |
488 | 7, 2, 0, 3, |
489 | 13, |
490 | OPC_CheckPredicate1, |
491 | OPC_MoveParent, |
492 | OPC_EmitConvertToTarget1, |
493 | OPC_EmitNodeXForm, 1, 2, |
494 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::XOR_I_HI), |
495 | 7, 2, 0, 3, |
496 | 14, |
497 | OPC_CheckPredicate0, |
498 | OPC_MoveParent, |
499 | OPC_EmitConvertToTarget1, |
500 | OPC_EmitNodeXForm, 0, 2, |
501 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::XOR_F_I_LO), |
502 | 7, 7, 2, 0, 3, |
503 | 14, |
504 | OPC_CheckPredicate1, |
505 | OPC_MoveParent, |
506 | OPC_EmitConvertToTarget1, |
507 | OPC_EmitNodeXForm, 1, 2, |
508 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::XOR_F_I_HI), |
509 | 7, 7, 2, 0, 3, |
510 | 0, |
511 | 23, |
512 | OPC_EmitInteger32, 0, |
513 | OPC_Scope, 8, |
514 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::XOR_R), |
515 | 7, 3, 0, 1, 2, |
516 | 9, |
517 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::XOR_F_R), |
518 | 7, 7, 3, 0, 1, 2, |
519 | 0, |
520 | 0, |
521 | 64, TARGET_VAL(ISD::ADD), |
522 | OPC_RecordChild0, |
523 | OPC_RecordChild1, |
524 | OPC_Scope, 48, |
525 | OPC_MoveChild1, |
526 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
527 | OPC_Scope, 13, |
528 | OPC_CheckPredicate0, |
529 | OPC_MoveParent, |
530 | OPC_EmitConvertToTarget1, |
531 | OPC_EmitNodeXForm, 0, 2, |
532 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::ADD_I_LO), |
533 | 7, 2, 0, 3, |
534 | 13, |
535 | OPC_CheckPredicate1, |
536 | OPC_MoveParent, |
537 | OPC_EmitConvertToTarget1, |
538 | OPC_EmitNodeXForm, 1, 2, |
539 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::ADD_I_HI), |
540 | 7, 2, 0, 3, |
541 | 13, |
542 | OPC_CheckPredicate, 11, |
543 | OPC_MoveParent, |
544 | OPC_EmitNodeXForm, 2, 1, |
545 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SUB_I_LO), |
546 | 7, 2, 0, 2, |
547 | 0, |
548 | 10, |
549 | OPC_EmitInteger32, 0, |
550 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::ADD_R), |
551 | 7, 3, 0, 1, 2, |
552 | 0, |
553 | 64, TARGET_VAL(ISD::SUB), |
554 | OPC_RecordChild0, |
555 | OPC_RecordChild1, |
556 | OPC_Scope, 48, |
557 | OPC_MoveChild1, |
558 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
559 | OPC_Scope, 13, |
560 | OPC_CheckPredicate0, |
561 | OPC_MoveParent, |
562 | OPC_EmitConvertToTarget1, |
563 | OPC_EmitNodeXForm, 0, 2, |
564 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SUB_I_LO), |
565 | 7, 2, 0, 3, |
566 | 13, |
567 | OPC_CheckPredicate1, |
568 | OPC_MoveParent, |
569 | OPC_EmitConvertToTarget1, |
570 | OPC_EmitNodeXForm, 1, 2, |
571 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SUB_I_HI), |
572 | 7, 2, 0, 3, |
573 | 13, |
574 | OPC_CheckPredicate, 11, |
575 | OPC_MoveParent, |
576 | OPC_EmitNodeXForm, 2, 1, |
577 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::ADD_I_LO), |
578 | 7, 2, 0, 2, |
579 | 0, |
580 | 10, |
581 | OPC_EmitInteger32, 0, |
582 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SUB_R), |
583 | 7, 3, 0, 1, 2, |
584 | 0, |
585 | 53, TARGET_VAL(ISD::ADDC), |
586 | OPC_RecordChild0, |
587 | OPC_RecordChild1, |
588 | OPC_Scope, 36, |
589 | OPC_MoveChild1, |
590 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
591 | OPC_Scope, 14, |
592 | OPC_CheckPredicate0, |
593 | OPC_MoveParent, |
594 | OPC_EmitConvertToTarget1, |
595 | OPC_EmitNodeXForm, 0, 2, |
596 | OPC_MorphNodeTo2GlueOutput, TARGET_VAL(Lanai::ADD_F_I_LO), |
597 | 7, 7, 2, 0, 3, |
598 | 14, |
599 | OPC_CheckPredicate1, |
600 | OPC_MoveParent, |
601 | OPC_EmitConvertToTarget1, |
602 | OPC_EmitNodeXForm, 1, 2, |
603 | OPC_MorphNodeTo2GlueOutput, TARGET_VAL(Lanai::ADD_F_I_HI), |
604 | 7, 7, 2, 0, 3, |
605 | 0, |
606 | 11, |
607 | OPC_EmitInteger32, 0, |
608 | OPC_MorphNodeTo2GlueOutput, TARGET_VAL(Lanai::ADD_F_R), |
609 | 7, 7, 3, 0, 1, 2, |
610 | 0, |
611 | 53, TARGET_VAL(ISD::SUBC), |
612 | OPC_RecordChild0, |
613 | OPC_RecordChild1, |
614 | OPC_Scope, 36, |
615 | OPC_MoveChild1, |
616 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
617 | OPC_Scope, 14, |
618 | OPC_CheckPredicate0, |
619 | OPC_MoveParent, |
620 | OPC_EmitConvertToTarget1, |
621 | OPC_EmitNodeXForm, 0, 2, |
622 | OPC_MorphNodeTo2GlueOutput, TARGET_VAL(Lanai::SUB_F_I_LO), |
623 | 7, 7, 2, 0, 3, |
624 | 14, |
625 | OPC_CheckPredicate1, |
626 | OPC_MoveParent, |
627 | OPC_EmitConvertToTarget1, |
628 | OPC_EmitNodeXForm, 1, 2, |
629 | OPC_MorphNodeTo2GlueOutput, TARGET_VAL(Lanai::SUB_F_I_HI), |
630 | 7, 7, 2, 0, 3, |
631 | 0, |
632 | 11, |
633 | OPC_EmitInteger32, 0, |
634 | OPC_MorphNodeTo2GlueOutput, TARGET_VAL(Lanai::SUB_F_R), |
635 | 7, 7, 3, 0, 1, 2, |
636 | 0, |
637 | 68, TARGET_VAL(ISD::ADDE), |
638 | OPC_CaptureGlueInput, |
639 | OPC_RecordChild0, |
640 | OPC_RecordChild1, |
641 | OPC_Scope, 36, |
642 | OPC_MoveChild1, |
643 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
644 | OPC_Scope, 14, |
645 | OPC_CheckPredicate0, |
646 | OPC_MoveParent, |
647 | OPC_EmitConvertToTarget1, |
648 | OPC_EmitNodeXForm, 0, 2, |
649 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::ADDC_I_LO), 0|OPFL_GlueInput|OPFL_GlueOutput, |
650 | 7, 2, 0, 3, |
651 | 14, |
652 | OPC_CheckPredicate1, |
653 | OPC_MoveParent, |
654 | OPC_EmitConvertToTarget1, |
655 | OPC_EmitNodeXForm, 1, 2, |
656 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::ADDC_I_HI), 0|OPFL_GlueInput|OPFL_GlueOutput, |
657 | 7, 2, 0, 3, |
658 | 0, |
659 | 25, |
660 | OPC_EmitInteger32, 0, |
661 | OPC_Scope, 9, |
662 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::ADDC_R), 0|OPFL_GlueInput|OPFL_GlueOutput, |
663 | 7, 3, 0, 1, 2, |
664 | 10, |
665 | OPC_MorphNodeTo2, TARGET_VAL(Lanai::ADDC_F_R), 0|OPFL_GlueInput|OPFL_GlueOutput, |
666 | 7, 7, 3, 0, 1, 2, |
667 | 0, |
668 | 0, |
669 | 68, TARGET_VAL(ISD::SUBE), |
670 | OPC_CaptureGlueInput, |
671 | OPC_RecordChild0, |
672 | OPC_RecordChild1, |
673 | OPC_Scope, 36, |
674 | OPC_MoveChild1, |
675 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
676 | OPC_Scope, 14, |
677 | OPC_CheckPredicate0, |
678 | OPC_MoveParent, |
679 | OPC_EmitConvertToTarget1, |
680 | OPC_EmitNodeXForm, 0, 2, |
681 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::SUBB_I_LO), 0|OPFL_GlueInput|OPFL_GlueOutput, |
682 | 7, 2, 0, 3, |
683 | 14, |
684 | OPC_CheckPredicate1, |
685 | OPC_MoveParent, |
686 | OPC_EmitConvertToTarget1, |
687 | OPC_EmitNodeXForm, 1, 2, |
688 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::SUBB_I_HI), 0|OPFL_GlueInput|OPFL_GlueOutput, |
689 | 7, 2, 0, 3, |
690 | 0, |
691 | 25, |
692 | OPC_EmitInteger32, 0, |
693 | OPC_Scope, 9, |
694 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::SUBB_R), 0|OPFL_GlueInput|OPFL_GlueOutput, |
695 | 7, 3, 0, 1, 2, |
696 | 10, |
697 | OPC_MorphNodeTo2, TARGET_VAL(Lanai::SUBB_F_R), 0|OPFL_GlueInput|OPFL_GlueOutput, |
698 | 7, 7, 3, 0, 1, 2, |
699 | 0, |
700 | 0, |
701 | 59, TARGET_VAL(LanaiISD::SUBBF), |
702 | OPC_CaptureGlueInput, |
703 | OPC_RecordChild0, |
704 | OPC_Scope, 39, |
705 | OPC_RecordChild1, |
706 | OPC_MoveChild1, |
707 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
708 | OPC_Scope, 15, |
709 | OPC_CheckPredicate0, |
710 | OPC_MoveParent, |
711 | OPC_EmitConvertToTarget1, |
712 | OPC_EmitNodeXForm, 0, 2, |
713 | OPC_MorphNodeTo2, TARGET_VAL(Lanai::SUBB_F_I_LO), 0|OPFL_GlueInput|OPFL_GlueOutput, |
714 | 7, 7, 2, 0, 3, |
715 | 15, |
716 | OPC_CheckPredicate1, |
717 | OPC_MoveParent, |
718 | OPC_EmitConvertToTarget1, |
719 | OPC_EmitNodeXForm, 1, 2, |
720 | OPC_MorphNodeTo2, TARGET_VAL(Lanai::SUBB_F_I_HI), 0|OPFL_GlueInput|OPFL_GlueOutput, |
721 | 7, 7, 2, 0, 3, |
722 | 0, |
723 | 14, |
724 | OPC_CheckChild0TypeI32, |
725 | OPC_RecordChild1, |
726 | OPC_EmitInteger32, 0, |
727 | OPC_MorphNodeTo2, TARGET_VAL(Lanai::SUBB_F_R), 0|OPFL_GlueInput|OPFL_GlueOutput, |
728 | 7, 7, 3, 0, 1, 2, |
729 | 0, |
730 | 31, TARGET_VAL(ISD::SHL), |
731 | OPC_RecordChild0, |
732 | OPC_RecordChild1, |
733 | OPC_Scope, 15, |
734 | OPC_MoveChild1, |
735 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
736 | OPC_CheckPredicate, 8, |
737 | OPC_MoveParent, |
738 | OPC_EmitConvertToTarget1, |
739 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SL_I), |
740 | 7, 2, 0, 2, |
741 | 10, |
742 | OPC_EmitInteger32, 0, |
743 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SHL_R), |
744 | 7, 3, 0, 1, 2, |
745 | 0, |
746 | 45, TARGET_VAL(ISD::SRL), |
747 | OPC_RecordChild0, |
748 | OPC_RecordChild1, |
749 | OPC_Scope, 17, |
750 | OPC_MoveChild1, |
751 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
752 | OPC_CheckPredicate, 8, |
753 | OPC_MoveParent, |
754 | OPC_EmitNodeXForm, 2, 1, |
755 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SL_I), |
756 | 7, 2, 0, 2, |
757 | 22, |
758 | OPC_EmitRegisterI32, Lanai::R0, |
759 | OPC_EmitInteger32, 0, |
760 | OPC_EmitNode1None, TARGET_VAL(Lanai::SUB_R), |
761 | 7, 3, 2, 1, 3, |
762 | OPC_EmitInteger32, 0, |
763 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SRL_R), |
764 | 7, 3, 0, 4, 5, |
765 | 0, |
766 | 45, TARGET_VAL(ISD::SRA), |
767 | OPC_RecordChild0, |
768 | OPC_RecordChild1, |
769 | OPC_Scope, 17, |
770 | OPC_MoveChild1, |
771 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
772 | OPC_CheckPredicate, 8, |
773 | OPC_MoveParent, |
774 | OPC_EmitNodeXForm, 2, 1, |
775 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SA_I), |
776 | 7, 2, 0, 2, |
777 | 22, |
778 | OPC_EmitRegisterI32, Lanai::R0, |
779 | OPC_EmitInteger32, 0, |
780 | OPC_EmitNode1None, TARGET_VAL(Lanai::SUB_R), |
781 | 7, 3, 2, 1, 3, |
782 | OPC_EmitInteger32, 0, |
783 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SRA_R), |
784 | 7, 3, 0, 4, 5, |
785 | 0, |
786 | 49, TARGET_VAL(LanaiISD::SET_FLAG), |
787 | OPC_RecordChild0, |
788 | OPC_Scope, 35, |
789 | OPC_RecordChild1, |
790 | OPC_MoveChild1, |
791 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
792 | OPC_Scope, 13, |
793 | OPC_CheckPredicate0, |
794 | OPC_MoveParent, |
795 | OPC_EmitConvertToTarget1, |
796 | OPC_EmitNodeXForm, 0, 2, |
797 | OPC_MorphNodeTo1GlueOutput, TARGET_VAL(Lanai::SFSUB_F_RI_LO), |
798 | 7, 2, 0, 3, |
799 | 13, |
800 | OPC_CheckPredicate1, |
801 | OPC_MoveParent, |
802 | OPC_EmitConvertToTarget1, |
803 | OPC_EmitNodeXForm, 1, 2, |
804 | OPC_MorphNodeTo1GlueOutput, TARGET_VAL(Lanai::SFSUB_F_RI_HI), |
805 | 7, 2, 0, 3, |
806 | 0, |
807 | 9, |
808 | OPC_CheckChild0TypeI32, |
809 | OPC_RecordChild1, |
810 | OPC_MorphNodeTo1GlueOutput, TARGET_VAL(Lanai::SFSUB_F_RR), |
811 | 7, 2, 0, 1, |
812 | 0, |
813 | 22, TARGET_VAL(LanaiISD::BR_CC), |
814 | OPC_RecordNode, |
815 | OPC_CaptureGlueInput, |
816 | OPC_RecordChild1, |
817 | OPC_MoveChild1, |
818 | OPC_CheckOpcode, TARGET_VAL(ISD::BasicBlock), |
819 | OPC_MoveSibling2, |
820 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
821 | OPC_RecordNode, |
822 | OPC_MoveParent, |
823 | OPC_EmitMergeInputChains1_0, |
824 | OPC_EmitConvertToTarget2, |
825 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::BRCC), 0|OPFL_Chain|OPFL_GlueInput, |
826 | 2, 1, 3, |
827 | 14, TARGET_VAL(LanaiISD::SETCC), |
828 | OPC_CaptureGlueInput, |
829 | OPC_RecordChild0, |
830 | OPC_MoveChild0, |
831 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
832 | OPC_MoveParent, |
833 | OPC_EmitConvertToTarget0, |
834 | OPC_MorphNodeTo1GlueInput, TARGET_VAL(Lanai::SCC), |
835 | 7, 1, 1, |
836 | 19, TARGET_VAL(LanaiISD::SELECT_CC), |
837 | OPC_CaptureGlueInput, |
838 | OPC_RecordChild0, |
839 | OPC_RecordChild1, |
840 | OPC_RecordChild2, |
841 | OPC_MoveChild2, |
842 | OPC_CheckOpcode, TARGET_VAL(ISD::Constant), |
843 | OPC_MoveParent, |
844 | OPC_CheckTypeI32, |
845 | OPC_EmitConvertToTarget2, |
846 | OPC_MorphNodeTo1GlueInput, TARGET_VAL(Lanai::SELECT), |
847 | 7, 3, 0, 1, 3, |
848 | 42, TARGET_VAL(LanaiISD::CALL), |
849 | OPC_RecordNode, |
850 | OPC_CaptureGlueInput, |
851 | OPC_RecordChild1, |
852 | OPC_Scope, 27, |
853 | OPC_MoveChild1, |
854 | OPC_SwitchOpcode , 9, TARGET_VAL(ISD::TargetGlobalAddress), |
855 | OPC_MoveParent, |
856 | OPC_EmitMergeInputChains1_0, |
857 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::CALL), 0|OPFL_Chain|OPFL_GlueInput|OPFL_GlueOutput|OPFL_Variadic1, |
858 | 7, 1, 1, |
859 | 9, TARGET_VAL(ISD::TargetExternalSymbol), |
860 | OPC_MoveParent, |
861 | OPC_EmitMergeInputChains1_0, |
862 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::CALL), 0|OPFL_Chain|OPFL_GlueInput|OPFL_GlueOutput|OPFL_Variadic1, |
863 | 7, 1, 1, |
864 | 0, |
865 | 8, |
866 | OPC_EmitMergeInputChains1_0, |
867 | OPC_MorphNodeTo1, TARGET_VAL(Lanai::CALLR), 0|OPFL_Chain|OPFL_GlueInput|OPFL_GlueOutput|OPFL_Variadic1, |
868 | 7, 1, 1, |
869 | 0, |
870 | 59, TARGET_VAL(LanaiISD::HI), |
871 | OPC_RecordChild0, |
872 | OPC_MoveChild0, |
873 | OPC_SwitchOpcode , 8, TARGET_VAL(ISD::TargetGlobalAddress), |
874 | OPC_MoveParent, |
875 | OPC_CheckTypeI32, |
876 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::MOVHI), |
877 | 7, 1, 0, |
878 | 8, TARGET_VAL(ISD::TargetExternalSymbol), |
879 | OPC_MoveParent, |
880 | OPC_CheckTypeI32, |
881 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::MOVHI), |
882 | 7, 1, 0, |
883 | 8, TARGET_VAL(ISD::TargetBlockAddress), |
884 | OPC_MoveParent, |
885 | OPC_CheckTypeI32, |
886 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::MOVHI), |
887 | 7, 1, 0, |
888 | 8, TARGET_VAL(ISD::TargetJumpTable), |
889 | OPC_MoveParent, |
890 | OPC_CheckTypeI32, |
891 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::MOVHI), |
892 | 7, 1, 0, |
893 | 8, TARGET_VAL(ISD::TargetConstantPool), |
894 | OPC_MoveParent, |
895 | OPC_CheckTypeI32, |
896 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::MOVHI), |
897 | 7, 1, 0, |
898 | 0, |
899 | 74, TARGET_VAL(LanaiISD::LO), |
900 | OPC_RecordChild0, |
901 | OPC_MoveChild0, |
902 | OPC_SwitchOpcode , 11, TARGET_VAL(ISD::TargetGlobalAddress), |
903 | OPC_MoveParent, |
904 | OPC_CheckTypeI32, |
905 | OPC_EmitRegisterI32, Lanai::R0, |
906 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
907 | 7, 2, 1, 0, |
908 | 11, TARGET_VAL(ISD::TargetExternalSymbol), |
909 | OPC_MoveParent, |
910 | OPC_CheckTypeI32, |
911 | OPC_EmitRegisterI32, Lanai::R0, |
912 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
913 | 7, 2, 1, 0, |
914 | 11, TARGET_VAL(ISD::TargetBlockAddress), |
915 | OPC_MoveParent, |
916 | OPC_CheckTypeI32, |
917 | OPC_EmitRegisterI32, Lanai::R0, |
918 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
919 | 7, 2, 1, 0, |
920 | 11, TARGET_VAL(ISD::TargetJumpTable), |
921 | OPC_MoveParent, |
922 | OPC_CheckTypeI32, |
923 | OPC_EmitRegisterI32, Lanai::R0, |
924 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
925 | 7, 2, 1, 0, |
926 | 11, TARGET_VAL(ISD::TargetConstantPool), |
927 | OPC_MoveParent, |
928 | OPC_CheckTypeI32, |
929 | OPC_EmitRegisterI32, Lanai::R0, |
930 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
931 | 7, 2, 1, 0, |
932 | 0, |
933 | 59, TARGET_VAL(LanaiISD::SMALL), |
934 | OPC_RecordChild0, |
935 | OPC_MoveChild0, |
936 | OPC_SwitchOpcode , 8, TARGET_VAL(ISD::TargetGlobalAddress), |
937 | OPC_MoveParent, |
938 | OPC_CheckTypeI32, |
939 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SLI), |
940 | 7, 1, 0, |
941 | 8, TARGET_VAL(ISD::TargetExternalSymbol), |
942 | OPC_MoveParent, |
943 | OPC_CheckTypeI32, |
944 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SLI), |
945 | 7, 1, 0, |
946 | 8, TARGET_VAL(ISD::TargetBlockAddress), |
947 | OPC_MoveParent, |
948 | OPC_CheckTypeI32, |
949 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SLI), |
950 | 7, 1, 0, |
951 | 8, TARGET_VAL(ISD::TargetJumpTable), |
952 | OPC_MoveParent, |
953 | OPC_CheckTypeI32, |
954 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SLI), |
955 | 7, 1, 0, |
956 | 8, TARGET_VAL(ISD::TargetConstantPool), |
957 | OPC_MoveParent, |
958 | OPC_CheckTypeI32, |
959 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SLI), |
960 | 7, 1, 0, |
961 | 0, |
962 | 92, TARGET_VAL(ISD::Constant), |
963 | OPC_RecordNode, |
964 | OPC_Scope, 14, |
965 | OPC_CheckPredicate6, |
966 | OPC_EmitRegisterI32, Lanai::R1, |
967 | OPC_EmitConvertToTarget0, |
968 | OPC_EmitNodeXForm, 0, 2, |
969 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::AND_I_LO), |
970 | 7, 2, 1, 3, |
971 | 14, |
972 | OPC_CheckPredicate7, |
973 | OPC_EmitRegisterI32, Lanai::R1, |
974 | OPC_EmitConvertToTarget0, |
975 | OPC_EmitNodeXForm, 1, 2, |
976 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::AND_I_HI), |
977 | 7, 2, 1, 3, |
978 | 11, |
979 | OPC_CheckPredicate1, |
980 | OPC_EmitConvertToTarget0, |
981 | OPC_EmitNodeXForm, 1, 1, |
982 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::MOVHI), |
983 | 7, 1, 2, |
984 | 12, |
985 | OPC_CheckPredicate, 19, |
986 | OPC_EmitConvertToTarget0, |
987 | OPC_EmitNodeXForm, 3, 1, |
988 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::SLI), |
989 | 7, 1, 2, |
990 | 11, |
991 | OPC_CheckPredicate0, |
992 | OPC_EmitRegisterI32, Lanai::R0, |
993 | OPC_EmitConvertToTarget0, |
994 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
995 | 7, 2, 1, 2, |
996 | 21, |
997 | OPC_EmitConvertToTarget0, |
998 | OPC_EmitNodeXForm, 1, 1, |
999 | OPC_EmitNode1None, TARGET_VAL(Lanai::MOVHI), |
1000 | 7, 1, 2, |
1001 | OPC_EmitConvertToTarget0, |
1002 | OPC_EmitNodeXForm, 0, 4, |
1003 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::OR_I_LO), |
1004 | 7, 2, 3, 5, |
1005 | 0, |
1006 | 13, TARGET_VAL(ISD::BR), |
1007 | OPC_RecordNode, |
1008 | OPC_RecordChild1, |
1009 | OPC_MoveChild1, |
1010 | OPC_CheckOpcode, TARGET_VAL(ISD::BasicBlock), |
1011 | OPC_MoveParent, |
1012 | OPC_EmitMergeInputChains1_0, |
1013 | OPC_MorphNodeTo0Chain, TARGET_VAL(Lanai::BT), |
1014 | 1, 1, |
1015 | 9, TARGET_VAL(ISD::BRIND), |
1016 | OPC_RecordNode, |
1017 | OPC_RecordChild1, |
1018 | OPC_CheckChild1TypeI32, |
1019 | OPC_EmitMergeInputChains1_0, |
1020 | OPC_MorphNodeTo0Chain, TARGET_VAL(Lanai::JR), |
1021 | 1, 1, |
1022 | 8, TARGET_VAL(LanaiISD::RET_GLUE), |
1023 | OPC_RecordNode, |
1024 | OPC_CaptureGlueInput, |
1025 | OPC_EmitMergeInputChains1_0, |
1026 | OPC_MorphNodeTo0, TARGET_VAL(Lanai::RET), 0|OPFL_Chain|OPFL_GlueInput|OPFL_Variadic0, |
1027 | 0, |
1028 | 8, TARGET_VAL(LanaiISD::ADJDYNALLOC), |
1029 | OPC_RecordChild0, |
1030 | OPC_MorphNodeTo2None, TARGET_VAL(Lanai::ADJDYNALLOC), |
1031 | 7, 7, 1, 0, |
1032 | 7, TARGET_VAL(ISD::CTPOP), |
1033 | OPC_RecordChild0, |
1034 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::POPC), |
1035 | 7, 1, 0, |
1036 | 7, TARGET_VAL(ISD::CTLZ), |
1037 | OPC_RecordChild0, |
1038 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::LEADZ), |
1039 | 7, 1, 0, |
1040 | 7, TARGET_VAL(ISD::CTTZ), |
1041 | OPC_RecordChild0, |
1042 | OPC_MorphNodeTo1None, TARGET_VAL(Lanai::TRAILZ), |
1043 | 7, 1, 0, |
1044 | 0, |
1045 | 0 |
1046 | }; // Total Array size is 2084 bytes |
1047 | |
1048 | #undef COVERAGE_IDX_VAL |
1049 | #undef TARGET_VAL |
1050 | SelectCodeCommon(NodeToMatch: N, MatcherTable, TableSize: sizeof(MatcherTable)); |
1051 | } |
1052 | #endif // GET_DAGISEL_BODY |
1053 | |
1054 | #ifdef GET_DAGISEL_DECL |
1055 | bool CheckNodePredicate(SDValue Op, unsigned PredNo) const override; |
1056 | #endif |
1057 | #if defined(GET_DAGISEL_BODY) || DAGISEL_INLINE |
1058 | bool DAGISEL_CLASS_COLONCOLON CheckNodePredicate(SDValue Op, unsigned PredNo) const |
1059 | #if DAGISEL_INLINE |
1060 | override |
1061 | #endif |
1062 | { |
1063 | switch (PredNo) { |
1064 | default: llvm_unreachable("Invalid predicate in table?" ); |
1065 | case 0: { |
1066 | // Predicate_i32lo16z |
1067 | auto *N = cast<ConstantSDNode>(Val: Op.getNode()); |
1068 | (void)N; |
1069 | |
1070 | // i32lo16 predicate - true if the 32-bit immediate has only rightmost 16 |
1071 | // bits set. |
1072 | return ((N->getZExtValue() & 0xFFFFUL) == N->getZExtValue()); |
1073 | } |
1074 | case 1: { |
1075 | // Predicate_i32hi16 |
1076 | auto *N = cast<ConstantSDNode>(Val: Op.getNode()); |
1077 | (void)N; |
1078 | |
1079 | // i32hi16 predicate - true if the 32-bit immediate has only leftmost 16 |
1080 | // bits set. |
1081 | return ((N->getZExtValue() & 0xFFFF0000UL) == N->getZExtValue()); |
1082 | } |
1083 | case 2: { |
1084 | // Predicate_atomic_load_aext_8 |
1085 | // Predicate_atomic_load_zext_8 |
1086 | // Predicate_extloadi8 |
1087 | // Predicate_sextloadi8 |
1088 | // Predicate_truncstorei8 |
1089 | // Predicate_zextloadi8 |
1090 | SDNode *N = Op.getNode(); |
1091 | (void)N; |
1092 | if (cast<MemSDNode>(Val: N)->getMemoryVT() != MVT::i8) return false; |
1093 | return true; |
1094 | |
1095 | } |
1096 | case 3: { |
1097 | // Predicate_extloadi16 |
1098 | // Predicate_sextloadi16 |
1099 | // Predicate_truncstorei16 |
1100 | // Predicate_zextloadi16 |
1101 | SDNode *N = Op.getNode(); |
1102 | (void)N; |
1103 | if (cast<MemSDNode>(Val: N)->getMemoryVT() != MVT::i16) return false; |
1104 | return true; |
1105 | |
1106 | } |
1107 | case 4: { |
1108 | // Predicate_zextload |
1109 | SDNode *N = Op.getNode(); |
1110 | (void)N; |
1111 | if (cast<LoadSDNode>(Val: N)->getExtensionType() != ISD::ZEXTLOAD) return false; |
1112 | return true; |
1113 | |
1114 | } |
1115 | case 5: { |
1116 | // Predicate_sextload |
1117 | SDNode *N = Op.getNode(); |
1118 | (void)N; |
1119 | if (cast<LoadSDNode>(Val: N)->getExtensionType() != ISD::SEXTLOAD) return false; |
1120 | return true; |
1121 | |
1122 | } |
1123 | case 6: { |
1124 | // Predicate_i32lo16and |
1125 | auto *N = cast<ConstantSDNode>(Val: Op.getNode()); |
1126 | (void)N; |
1127 | |
1128 | // i32lo16 predicate - true if the 32-bit immediate has the rightmost 16 |
1129 | // bits set and the leftmost 16 bits 1's. |
1130 | return (N->getZExtValue() >= 0xFFFF0000UL); |
1131 | } |
1132 | case 7: { |
1133 | // Predicate_i32hi16and |
1134 | auto *N = cast<ConstantSDNode>(Val: Op.getNode()); |
1135 | (void)N; |
1136 | |
1137 | // i32lo16 predicate - true if the 32-bit immediate has the leftmost 16 |
1138 | // bits set and the rightmost 16 bits 1's. |
1139 | return ((N->getZExtValue() & 0xFFFFUL) == 0xFFFFUL); |
1140 | } |
1141 | case 8: { |
1142 | // Predicate_immShift |
1143 | auto *N = cast<ConstantSDNode>(Val: Op.getNode()); |
1144 | (void)N; |
1145 | |
1146 | int Imm = N->getSExtValue(); |
1147 | return Imm >= -31 && Imm <= 31; |
1148 | } |
1149 | case 9: { |
1150 | // Predicate_load |
1151 | SDNode *N = Op.getNode(); |
1152 | (void)N; |
1153 | if (cast<LoadSDNode>(Val: N)->getExtensionType() != ISD::NON_EXTLOAD) return false; |
1154 | return true; |
1155 | |
1156 | } |
1157 | case 10: { |
1158 | // Predicate_store |
1159 | SDNode *N = Op.getNode(); |
1160 | (void)N; |
1161 | if (cast<StoreSDNode>(Val: N)->isTruncatingStore()) return false; |
1162 | return true; |
1163 | |
1164 | } |
1165 | case 11: { |
1166 | // Predicate_i32neg16 |
1167 | auto *N = cast<ConstantSDNode>(Val: Op.getNode()); |
1168 | (void)N; |
1169 | |
1170 | // i32neg16 predicate - true if the 32-bit immediate is negative and can |
1171 | // be represented by a 16 bit integer. |
1172 | int Imm = N->getSExtValue(); |
1173 | return (Imm < 0) && (isInt<16>(x: Imm)); |
1174 | } |
1175 | case 12: { |
1176 | // Predicate_unindexedload |
1177 | SDNode *N = Op.getNode(); |
1178 | (void)N; |
1179 | if (cast<LoadSDNode>(Val: N)->getAddressingMode() != ISD::UNINDEXED) return false; |
1180 | return true; |
1181 | |
1182 | } |
1183 | case 13: { |
1184 | // Predicate_zextloadi32 |
1185 | SDNode *N = Op.getNode(); |
1186 | (void)N; |
1187 | if (cast<MemSDNode>(Val: N)->getMemoryVT() != MVT::i32) return false; |
1188 | return true; |
1189 | |
1190 | } |
1191 | case 14: { |
1192 | // Predicate_extload |
1193 | SDNode *N = Op.getNode(); |
1194 | (void)N; |
1195 | if (cast<LoadSDNode>(Val: N)->getExtensionType() != ISD::EXTLOAD) return false; |
1196 | return true; |
1197 | |
1198 | } |
1199 | case 15: { |
1200 | // Predicate_unindexedstore |
1201 | SDNode *N = Op.getNode(); |
1202 | (void)N; |
1203 | if (cast<StoreSDNode>(Val: N)->getAddressingMode() != ISD::UNINDEXED) return false; |
1204 | return true; |
1205 | |
1206 | } |
1207 | case 16: { |
1208 | // Predicate_truncstore |
1209 | SDNode *N = Op.getNode(); |
1210 | (void)N; |
1211 | if (!cast<StoreSDNode>(Val: N)->isTruncatingStore()) return false; |
1212 | return true; |
1213 | |
1214 | } |
1215 | case 17: { |
1216 | // Predicate_atomic_load_aext |
1217 | SDNode *N = Op.getNode(); |
1218 | (void)N; |
1219 | if (cast<AtomicSDNode>(Val: N)->getExtensionType() != ISD::EXTLOAD) return false; |
1220 | return true; |
1221 | |
1222 | } |
1223 | case 18: { |
1224 | // Predicate_atomic_load_zext |
1225 | SDNode *N = Op.getNode(); |
1226 | (void)N; |
1227 | if (cast<AtomicSDNode>(Val: N)->getExtensionType() != ISD::ZEXTLOAD) return false; |
1228 | return true; |
1229 | |
1230 | } |
1231 | case 19: { |
1232 | // Predicate_i32lo21 |
1233 | auto *N = cast<ConstantSDNode>(Val: Op.getNode()); |
1234 | (void)N; |
1235 | |
1236 | // i32lo21 predicate - true if the 32-bit immediate has only rightmost 21 |
1237 | // bits set. |
1238 | return ((N->getZExtValue() & 0x1FFFFFUL) == N->getZExtValue()); |
1239 | } |
1240 | } |
1241 | } |
1242 | #endif // GET_DAGISEL_BODY |
1243 | |
1244 | #ifdef GET_DAGISEL_DECL |
1245 | bool CheckComplexPattern(SDNode *Root, SDNode *Parent, |
1246 | SDValue N, unsigned PatternNo, |
1247 | SmallVectorImpl<std::pair<SDValue, SDNode *>> &Result) override; |
1248 | #endif |
1249 | #if defined(GET_DAGISEL_BODY) || DAGISEL_INLINE |
1250 | bool DAGISEL_CLASS_COLONCOLON CheckComplexPattern(SDNode *Root, SDNode *Parent, |
1251 | SDValue N, unsigned PatternNo, |
1252 | SmallVectorImpl<std::pair<SDValue, SDNode *>> &Result) |
1253 | #if DAGISEL_INLINE |
1254 | override |
1255 | #endif |
1256 | { |
1257 | unsigned NextRes = Result.size(); |
1258 | switch (PatternNo) { |
1259 | default: llvm_unreachable("Invalid pattern # in table?" ); |
1260 | case 0: |
1261 | Result.resize(N: NextRes+3); |
1262 | return selectAddrSpls(Addr: N, Base&: Result[NextRes+0].first, Offset&: Result[NextRes+1].first, AluOp&: Result[NextRes+2].first); |
1263 | case 1: |
1264 | Result.resize(N: NextRes+3); |
1265 | return selectAddrRr(Addr: N, R1&: Result[NextRes+0].first, R2&: Result[NextRes+1].first, AluOp&: Result[NextRes+2].first); |
1266 | case 2: |
1267 | Result.resize(N: NextRes+3); |
1268 | return selectAddrRi(Addr: N, Base&: Result[NextRes+0].first, Offset&: Result[NextRes+1].first, AluOp&: Result[NextRes+2].first); |
1269 | case 3: |
1270 | Result.resize(N: NextRes+1); |
1271 | return selectAddrSls(Addr: N, Offset&: Result[NextRes+0].first); |
1272 | } |
1273 | } |
1274 | #endif // GET_DAGISEL_BODY |
1275 | |
1276 | #ifdef GET_DAGISEL_DECL |
1277 | SDValue RunSDNodeXForm(SDValue V, unsigned XFormNo) override; |
1278 | #endif |
1279 | #if defined(GET_DAGISEL_BODY) || DAGISEL_INLINE |
1280 | SDValue DAGISEL_CLASS_COLONCOLON RunSDNodeXForm(SDValue V, unsigned XFormNo) |
1281 | #if DAGISEL_INLINE |
1282 | override |
1283 | #endif |
1284 | { |
1285 | switch (XFormNo) { |
1286 | default: llvm_unreachable("Invalid xform # in table?" ); |
1287 | case 0: { |
1288 | ConstantSDNode *N = cast<ConstantSDNode>(Val: V.getNode()); |
1289 | |
1290 | return CurDAG->getTargetConstant(Val: (uint64_t)N->getZExtValue() & 0xffff, |
1291 | DL: SDLoc(N), VT: MVT::i32); |
1292 | |
1293 | } |
1294 | case 1: { |
1295 | ConstantSDNode *N = cast<ConstantSDNode>(Val: V.getNode()); |
1296 | |
1297 | return CurDAG->getTargetConstant(Val: (uint64_t)N->getZExtValue() >> 16, DL: SDLoc(N), |
1298 | VT: MVT::i32); |
1299 | |
1300 | } |
1301 | case 2: { |
1302 | ConstantSDNode *N = cast<ConstantSDNode>(Val: V.getNode()); |
1303 | |
1304 | return CurDAG->getSignedTargetConstant(Val: -N->getSExtValue(), DL: SDLoc(N), |
1305 | VT: MVT::i32); |
1306 | |
1307 | } |
1308 | case 3: { |
1309 | ConstantSDNode *N = cast<ConstantSDNode>(Val: V.getNode()); |
1310 | |
1311 | return CurDAG->getTargetConstant(Val: (uint64_t)N->getZExtValue() & 0x1fffff, |
1312 | DL: SDLoc(N), VT: MVT::i32); |
1313 | |
1314 | } |
1315 | } |
1316 | } |
1317 | #endif // GET_DAGISEL_BODY |
1318 | |
1319 | |
1320 | #ifdef DAGISEL_INLINE |
1321 | #undef DAGISEL_INLINE |
1322 | #endif |
1323 | #ifdef DAGISEL_CLASS_COLONCOLON |
1324 | #undef DAGISEL_CLASS_COLONCOLON |
1325 | #endif |
1326 | #ifdef GET_DAGISEL_DECL |
1327 | #undef GET_DAGISEL_DECL |
1328 | #endif |
1329 | #ifdef GET_DAGISEL_BODY |
1330 | #undef GET_DAGISEL_BODY |
1331 | #endif |
1332 | |