1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
3 | |* AMDGPUPreLegalizerCombinerImpl Combiner Match Table *| |
4 | |* *| |
5 | |* Automatically generated file, do not edit! *| |
6 | |* *| |
7 | \*===----------------------------------------------------------------------===*/ |
8 | |
9 | #ifdef GET_GICOMBINER_DEPS |
10 | #include "llvm/ADT/SparseBitVector.h" |
11 | namespace llvm { |
12 | extern cl::OptionCategory GICombinerOptionCategory; |
13 | } // end namespace llvm |
14 | #endif // ifdef GET_GICOMBINER_DEPS |
15 | |
16 | #ifdef GET_GICOMBINER_TYPES |
17 | struct AMDGPUPreLegalizerCombinerImplRuleConfig { |
18 | SparseBitVector<> DisabledRules; |
19 | |
20 | bool isRuleEnabled(unsigned RuleID) const; |
21 | bool parseCommandLineOption(); |
22 | bool setRuleEnabled(StringRef RuleIdentifier); |
23 | bool setRuleDisabled(StringRef RuleIdentifier); |
24 | }; |
25 | |
26 | static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) { |
27 | uint64_t I; |
28 | // getAtInteger(...) returns false on success |
29 | bool Parsed = !RuleIdentifier.getAsInteger(0, I); |
30 | if (Parsed) |
31 | return I; |
32 | |
33 | #ifndef NDEBUG |
34 | switch (RuleIdentifier.size()) { |
35 | default: break; |
36 | case 9: // 5 strings to match. |
37 | switch (RuleIdentifier[0]) { |
38 | default: break; |
39 | case 'c': // 1 string to match. |
40 | if (memcmp(RuleIdentifier.data()+1, "opy_prop" , 8) != 0) |
41 | break; |
42 | return 8; // "copy_prop" |
43 | case 'm': // 3 strings to match. |
44 | switch (RuleIdentifier[1]) { |
45 | default: break; |
46 | case 'a': // 1 string to match. |
47 | if (memcmp(RuleIdentifier.data()+2, "tch_ors" , 7) != 0) |
48 | break; |
49 | return 180; // "match_ors" |
50 | case 'u': // 2 strings to match. |
51 | if (memcmp(RuleIdentifier.data()+2, "lo_by_" , 6) != 0) |
52 | break; |
53 | switch (RuleIdentifier[8]) { |
54 | default: break; |
55 | case '0': // 1 string to match. |
56 | return 130; // "mulo_by_0" |
57 | case '2': // 1 string to match. |
58 | return 129; // "mulo_by_2" |
59 | } |
60 | break; |
61 | } |
62 | break; |
63 | case 'n': // 1 string to match. |
64 | if (memcmp(RuleIdentifier.data()+1, "neg_zext" , 8) != 0) |
65 | break; |
66 | return 187; // "nneg_zext" |
67 | } |
68 | break; |
69 | case 10: // 6 strings to match. |
70 | switch (RuleIdentifier[0]) { |
71 | default: break; |
72 | case 'i': // 1 string to match. |
73 | if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i" , 9) != 0) |
74 | break; |
75 | return 74; // "i2p_to_p2i" |
76 | case 'm': // 2 strings to match. |
77 | switch (RuleIdentifier[1]) { |
78 | default: break; |
79 | case 'a': // 1 string to match. |
80 | if (memcmp(RuleIdentifier.data()+2, "tch_ands" , 8) != 0) |
81 | break; |
82 | return 179; // "match_ands" |
83 | case 'u': // 1 string to match. |
84 | if (memcmp(RuleIdentifier.data()+2, "l_to_shl" , 8) != 0) |
85 | break; |
86 | return 9; // "mul_to_shl" |
87 | } |
88 | break; |
89 | case 'p': // 1 string to match. |
90 | if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p" , 9) != 0) |
91 | break; |
92 | return 73; // "p2i_to_i2p" |
93 | case 's': // 1 string to match. |
94 | if (memcmp(RuleIdentifier.data()+1, "ext_trunc" , 9) != 0) |
95 | break; |
96 | return 185; // "sext_trunc" |
97 | case 'z': // 1 string to match. |
98 | if (memcmp(RuleIdentifier.data()+1, "ext_trunc" , 9) != 0) |
99 | break; |
100 | return 186; // "zext_trunc" |
101 | } |
102 | break; |
103 | case 11: // 5 strings to match. |
104 | switch (RuleIdentifier[0]) { |
105 | default: break; |
106 | case 'a': // 1 string to match. |
107 | if (memcmp(RuleIdentifier.data()+1, "dd_sub_reg" , 10) != 0) |
108 | break; |
109 | return 79; // "add_sub_reg" |
110 | case 'm': // 1 string to match. |
111 | if (memcmp(RuleIdentifier.data()+1, "atch_addos" , 10) != 0) |
112 | break; |
113 | return 184; // "match_addos" |
114 | case 's': // 1 string to match. |
115 | if (memcmp(RuleIdentifier.data()+1, "ub_add_reg" , 10) != 0) |
116 | break; |
117 | return 173; // "sub_add_reg" |
118 | case 't': // 1 string to match. |
119 | if (memcmp(RuleIdentifier.data()+1, "runc_shift" , 10) != 0) |
120 | break; |
121 | return 119; // "trunc_shift" |
122 | case 'u': // 1 string to match. |
123 | if (memcmp(RuleIdentifier.data()+1, "nmerge_cst" , 10) != 0) |
124 | break; |
125 | return 114; // "unmerge_cst" |
126 | } |
127 | break; |
128 | case 12: // 10 strings to match. |
129 | switch (RuleIdentifier[0]) { |
130 | default: break; |
131 | case 'A': // 1 string to match. |
132 | if (memcmp(RuleIdentifier.data()+1, "PlusBMinusB" , 11) != 0) |
133 | break; |
134 | return 2; // "APlusBMinusB" |
135 | case 'B': // 1 string to match. |
136 | if (memcmp(RuleIdentifier.data()+1, "MinusAPlusA" , 11) != 0) |
137 | break; |
138 | return 3; // "BMinusAPlusA" |
139 | case 'a': // 1 string to match. |
140 | if (memcmp(RuleIdentifier.data()+1, "dde_to_addo" , 11) != 0) |
141 | break; |
142 | return 131; // "adde_to_addo" |
143 | case 'e': // 1 string to match. |
144 | if (memcmp(RuleIdentifier.data()+1, "xt_ext_fold" , 11) != 0) |
145 | break; |
146 | return 110; // "ext_ext_fold" |
147 | case 'f': // 1 string to match. |
148 | if (memcmp(RuleIdentifier.data()+1, "sub_to_fneg" , 11) != 0) |
149 | break; |
150 | return 176; // "fsub_to_fneg" |
151 | case 'm': // 1 string to match. |
152 | if (memcmp(RuleIdentifier.data()+1, "ulh_to_lshr" , 11) != 0) |
153 | break; |
154 | return 161; // "mulh_to_lshr" |
155 | case 'n': // 1 string to match. |
156 | if (memcmp(RuleIdentifier.data()+1, "ot_cmp_fold" , 11) != 0) |
157 | break; |
158 | return 111; // "not_cmp_fold" |
159 | case 'r': // 1 string to match. |
160 | if (memcmp(RuleIdentifier.data()+1, "edundant_or" , 11) != 0) |
161 | break; |
162 | return 104; // "redundant_or" |
163 | case 's': // 1 string to match. |
164 | if (memcmp(RuleIdentifier.data()+1, "div_by_pow2" , 11) != 0) |
165 | break; |
166 | return 159; // "sdiv_by_pow2" |
167 | case 'u': // 1 string to match. |
168 | if (memcmp(RuleIdentifier.data()+1, "div_by_pow2" , 11) != 0) |
169 | break; |
170 | return 160; // "udiv_by_pow2" |
171 | } |
172 | break; |
173 | case 13: // 14 strings to match. |
174 | switch (RuleIdentifier[0]) { |
175 | default: break; |
176 | case 'a': // 1 string to match. |
177 | if (memcmp(RuleIdentifier.data()+1, "dd_of_vscale" , 12) != 0) |
178 | break; |
179 | return 44; // "add_of_vscale" |
180 | case 'c': // 1 string to match. |
181 | if (memcmp(RuleIdentifier.data()+1, "ommute_shift" , 12) != 0) |
182 | break; |
183 | return 147; // "commute_shift" |
184 | case 'f': // 1 string to match. |
185 | if (memcmp(RuleIdentifier.data()+1, "oldable_fneg" , 12) != 0) |
186 | break; |
187 | return 190; // "foldable_fneg" |
188 | case 'l': // 1 string to match. |
189 | if (memcmp(RuleIdentifier.data()+1, "oad_and_mask" , 12) != 0) |
190 | break; |
191 | return 54; // "load_and_mask" |
192 | case 'm': // 3 strings to match. |
193 | switch (RuleIdentifier[1]) { |
194 | default: break; |
195 | case 'a': // 1 string to match. |
196 | if (memcmp(RuleIdentifier.data()+2, "tch_selects" , 11) != 0) |
197 | break; |
198 | return 101; // "match_selects" |
199 | case 'e': // 1 string to match. |
200 | if (memcmp(RuleIdentifier.data()+2, "rge_unmerge" , 11) != 0) |
201 | break; |
202 | return 117; // "merge_unmerge" |
203 | case 'u': // 1 string to match. |
204 | if (memcmp(RuleIdentifier.data()+2, "l_of_vscale" , 11) != 0) |
205 | break; |
206 | return 45; // "mul_of_vscale" |
207 | } |
208 | break; |
209 | case 'r': // 1 string to match. |
210 | if (memcmp(RuleIdentifier.data()+1, "edundant_and" , 12) != 0) |
211 | break; |
212 | return 102; // "redundant_and" |
213 | case 's': // 3 strings to match. |
214 | switch (RuleIdentifier[1]) { |
215 | default: break; |
216 | case 'd': // 1 string to match. |
217 | if (memcmp(RuleIdentifier.data()+2, "iv_by_const" , 11) != 0) |
218 | break; |
219 | return 158; // "sdiv_by_const" |
220 | case 'h': // 1 string to match. |
221 | if (memcmp(RuleIdentifier.data()+2, "l_of_vscale" , 11) != 0) |
222 | break; |
223 | return 46; // "shl_of_vscale" |
224 | case 'u': // 1 string to match. |
225 | if (memcmp(RuleIdentifier.data()+2, "b_of_vscale" , 11) != 0) |
226 | break; |
227 | return 47; // "sub_of_vscale" |
228 | } |
229 | break; |
230 | case 'u': // 3 strings to match. |
231 | switch (RuleIdentifier[1]) { |
232 | default: break; |
233 | case 'd': // 1 string to match. |
234 | if (memcmp(RuleIdentifier.data()+2, "iv_by_const" , 11) != 0) |
235 | break; |
236 | return 157; // "udiv_by_const" |
237 | case 'n': // 2 strings to match. |
238 | if (memcmp(RuleIdentifier.data()+2, "merge_" , 6) != 0) |
239 | break; |
240 | switch (RuleIdentifier[8]) { |
241 | default: break; |
242 | case 'm': // 1 string to match. |
243 | if (memcmp(RuleIdentifier.data()+9, "erge" , 4) != 0) |
244 | break; |
245 | return 113; // "unmerge_merge" |
246 | case 'u': // 1 string to match. |
247 | if (memcmp(RuleIdentifier.data()+9, "ndef" , 4) != 0) |
248 | break; |
249 | return 66; // "unmerge_undef" |
250 | } |
251 | break; |
252 | } |
253 | break; |
254 | } |
255 | break; |
256 | case 14: // 8 strings to match. |
257 | switch (RuleIdentifier[0]) { |
258 | default: break; |
259 | case 'b': // 2 strings to match. |
260 | if (RuleIdentifier[1] != 'i') |
261 | break; |
262 | switch (RuleIdentifier[2]) { |
263 | default: break; |
264 | case 'n': // 1 string to match. |
265 | if (memcmp(RuleIdentifier.data()+3, "op_same_val" , 11) != 0) |
266 | break; |
267 | return 70; // "binop_same_val" |
268 | case 't': // 1 string to match. |
269 | if (memcmp(RuleIdentifier.data()+3, "reverse_shl" , 11) != 0) |
270 | break; |
271 | return 145; // "bitreverse_shl" |
272 | } |
273 | break; |
274 | case 'f': // 2 strings to match. |
275 | switch (RuleIdentifier[1]) { |
276 | default: break; |
277 | case 'a': // 1 string to match. |
278 | if (memcmp(RuleIdentifier.data()+2, "bs_fneg_fold" , 12) != 0) |
279 | break; |
280 | return 156; // "fabs_fneg_fold" |
281 | case 'n': // 1 string to match. |
282 | if (memcmp(RuleIdentifier.data()+2, "eg_fneg_fold" , 12) != 0) |
283 | break; |
284 | return 76; // "fneg_fneg_fold" |
285 | } |
286 | break; |
287 | case 'm': // 1 string to match. |
288 | if (memcmp(RuleIdentifier.data()+1, "ul_by_neg_one" , 13) != 0) |
289 | break; |
290 | return 11; // "mul_by_neg_one" |
291 | case 'r': // 1 string to match. |
292 | if (memcmp(RuleIdentifier.data()+1, "eassoc_ptradd" , 13) != 0) |
293 | break; |
294 | return 91; // "reassoc_ptradd" |
295 | case 's': // 1 string to match. |
296 | if (memcmp(RuleIdentifier.data()+1, "hifts_too_big" , 13) != 0) |
297 | break; |
298 | return 90; // "shifts_too_big" |
299 | case 't': // 1 string to match. |
300 | if (memcmp(RuleIdentifier.data()+1, "runc_ext_fold" , 13) != 0) |
301 | break; |
302 | return 118; // "trunc_ext_fold" |
303 | } |
304 | break; |
305 | case 15: // 9 strings to match. |
306 | switch (RuleIdentifier[0]) { |
307 | default: break; |
308 | case 'A': // 1 string to match. |
309 | if (memcmp(RuleIdentifier.data()+1, "PlusZeroMinusB" , 14) != 0) |
310 | break; |
311 | return 1; // "APlusZeroMinusB" |
312 | case 'Z': // 1 string to match. |
313 | if (memcmp(RuleIdentifier.data()+1, "eroMinusAPlusB" , 14) != 0) |
314 | break; |
315 | return 0; // "ZeroMinusAPlusB" |
316 | case 'b': // 1 string to match. |
317 | if (memcmp(RuleIdentifier.data()+1, "itreverse_lshr" , 14) != 0) |
318 | break; |
319 | return 146; // "bitreverse_lshr" |
320 | case 'e': // 1 string to match. |
321 | if (memcmp(RuleIdentifier.data()+1, "xtending_loads" , 14) != 0) |
322 | break; |
323 | return 53; // "extending_loads" |
324 | case 'i': // 1 string to match. |
325 | if (memcmp(RuleIdentifier.data()+1, "dempotent_prop" , 14) != 0) |
326 | break; |
327 | return 12; // "idempotent_prop" |
328 | case 'l': // 1 string to match. |
329 | if (memcmp(RuleIdentifier.data()+1, "oad_or_combine" , 14) != 0) |
330 | break; |
331 | return 138; // "load_or_combine" |
332 | case 'o': // 1 string to match. |
333 | if (memcmp(RuleIdentifier.data()+1, "verlapping_and" , 14) != 0) |
334 | break; |
335 | return 128; // "overlapping_and" |
336 | case 's': // 1 string to match. |
337 | if (memcmp(RuleIdentifier.data()+1, "elect_same_val" , 14) != 0) |
338 | break; |
339 | return 68; // "select_same_val" |
340 | case 'z': // 1 string to match. |
341 | if (memcmp(RuleIdentifier.data()+1, "ext_trunc_fold" , 14) != 0) |
342 | break; |
343 | return 106; // "zext_trunc_fold" |
344 | } |
345 | break; |
346 | case 16: // 4 strings to match. |
347 | switch (RuleIdentifier[0]) { |
348 | default: break; |
349 | case 'c': // 1 string to match. |
350 | if (memcmp(RuleIdentifier.data()+1, "lamp_i64_to_i16" , 15) != 0) |
351 | break; |
352 | return 189; // "clamp_i64_to_i16" |
353 | case 's': // 2 strings to match. |
354 | if (memcmp(RuleIdentifier.data()+1, "elect_" , 6) != 0) |
355 | break; |
356 | switch (RuleIdentifier[7]) { |
357 | default: break; |
358 | case 't': // 1 string to match. |
359 | if (memcmp(RuleIdentifier.data()+8, "o_minmax" , 8) != 0) |
360 | break; |
361 | return 174; // "select_to_minmax" |
362 | case 'u': // 1 string to match. |
363 | if (memcmp(RuleIdentifier.data()+8, "ndef_cmp" , 8) != 0) |
364 | break; |
365 | return 98; // "select_undef_cmp" |
366 | } |
367 | break; |
368 | case 'u': // 1 string to match. |
369 | if (memcmp(RuleIdentifier.data()+1, "ndef_to_fp_zero" , 15) != 0) |
370 | break; |
371 | return 56; // "undef_to_fp_zero" |
372 | } |
373 | break; |
374 | case 17: // 12 strings to match. |
375 | switch (RuleIdentifier[0]) { |
376 | default: break; |
377 | case 'A': // 2 strings to match. |
378 | if (memcmp(RuleIdentifier.data()+1, "PlusBMinus" , 10) != 0) |
379 | break; |
380 | switch (RuleIdentifier[11]) { |
381 | default: break; |
382 | case 'A': // 1 string to match. |
383 | if (memcmp(RuleIdentifier.data()+12, "plusC" , 5) != 0) |
384 | break; |
385 | return 6; // "APlusBMinusAplusC" |
386 | case 'C': // 1 string to match. |
387 | if (memcmp(RuleIdentifier.data()+12, "PlusA" , 5) != 0) |
388 | break; |
389 | return 7; // "APlusBMinusCPlusA" |
390 | } |
391 | break; |
392 | case 'a': // 2 strings to match. |
393 | switch (RuleIdentifier[1]) { |
394 | default: break; |
395 | case 'd': // 1 string to match. |
396 | if (memcmp(RuleIdentifier.data()+2, "d_p2i_to_ptradd" , 15) != 0) |
397 | break; |
398 | return 10; // "add_p2i_to_ptradd" |
399 | case 'n': // 1 string to match. |
400 | if (memcmp(RuleIdentifier.data()+2, "yext_trunc_fold" , 15) != 0) |
401 | break; |
402 | return 75; // "anyext_trunc_fold" |
403 | } |
404 | break; |
405 | case 'c': // 1 string to match. |
406 | if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fma" , 16) != 0) |
407 | break; |
408 | return 154; // "constant_fold_fma" |
409 | case 'd': // 1 string to match. |
410 | if (memcmp(RuleIdentifier.data()+1, "iv_rem_to_divrem" , 16) != 0) |
411 | break; |
412 | return 139; // "div_rem_to_divrem" |
413 | case 'e': // 1 string to match. |
414 | if (memcmp(RuleIdentifier.data()+1, "rase_undef_store" , 16) != 0) |
415 | break; |
416 | return 65; // "erase_undef_store" |
417 | case 'p': // 1 string to match. |
418 | if (memcmp(RuleIdentifier.data()+1, "tr_add_with_zero" , 16) != 0) |
419 | break; |
420 | return 135; // "ptr_add_with_zero" |
421 | case 's': // 2 strings to match. |
422 | switch (RuleIdentifier[1]) { |
423 | default: break; |
424 | case 'e': // 1 string to match. |
425 | if (memcmp(RuleIdentifier.data()+2, "lect_to_iminmax" , 15) != 0) |
426 | break; |
427 | return 100; // "select_to_iminmax" |
428 | case 'h': // 1 string to match. |
429 | if (memcmp(RuleIdentifier.data()+2, "ift_immed_chain" , 15) != 0) |
430 | break; |
431 | return 136; // "shift_immed_chain" |
432 | } |
433 | break; |
434 | case 'u': // 2 strings to match. |
435 | switch (RuleIdentifier[1]) { |
436 | default: break; |
437 | case 'n': // 1 string to match. |
438 | if (memcmp(RuleIdentifier.data()+2, "def_to_int_zero" , 15) != 0) |
439 | break; |
440 | return 57; // "undef_to_int_zero" |
441 | case 'r': // 1 string to match. |
442 | if (memcmp(RuleIdentifier.data()+2, "em_pow2_to_mask" , 15) != 0) |
443 | break; |
444 | return 105; // "urem_pow2_to_mask" |
445 | } |
446 | break; |
447 | } |
448 | break; |
449 | case 18: // 9 strings to match. |
450 | switch (RuleIdentifier[0]) { |
451 | default: break; |
452 | case 'A': // 2 strings to match. |
453 | if (memcmp(RuleIdentifier.data()+1, "MinusBPlus" , 10) != 0) |
454 | break; |
455 | switch (RuleIdentifier[11]) { |
456 | default: break; |
457 | case 'B': // 1 string to match. |
458 | if (memcmp(RuleIdentifier.data()+12, "MinusC" , 6) != 0) |
459 | break; |
460 | return 5; // "AMinusBPlusBMinusC" |
461 | case 'C': // 1 string to match. |
462 | if (memcmp(RuleIdentifier.data()+12, "MinusA" , 6) != 0) |
463 | break; |
464 | return 4; // "AMinusBPlusCMinusA" |
465 | } |
466 | break; |
467 | case 'b': // 1 string to match. |
468 | if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero" , 17) != 0) |
469 | break; |
470 | return 71; // "binop_left_to_zero" |
471 | case 'c': // 3 strings to match. |
472 | if (RuleIdentifier[1] != 'o') |
473 | break; |
474 | switch (RuleIdentifier[2]) { |
475 | default: break; |
476 | case 'm': // 1 string to match. |
477 | if (memcmp(RuleIdentifier.data()+3, "bine_minmax_nan" , 15) != 0) |
478 | break; |
479 | return 132; // "combine_minmax_nan" |
480 | case 'n': // 2 strings to match. |
481 | if (memcmp(RuleIdentifier.data()+3, "stant_fold_f" , 12) != 0) |
482 | break; |
483 | switch (RuleIdentifier[15]) { |
484 | default: break; |
485 | case 'a': // 1 string to match. |
486 | if (memcmp(RuleIdentifier.data()+16, "bs" , 2) != 0) |
487 | break; |
488 | return 121; // "constant_fold_fabs" |
489 | case 'n': // 1 string to match. |
490 | if (memcmp(RuleIdentifier.data()+16, "eg" , 2) != 0) |
491 | break; |
492 | return 120; // "constant_fold_fneg" |
493 | } |
494 | break; |
495 | } |
496 | break; |
497 | case 'e': // 1 string to match. |
498 | if (memcmp(RuleIdentifier.data()+1, "xpand_const_fpowi" , 17) != 0) |
499 | break; |
500 | return 133; // "expand_const_fpowi" |
501 | case 'f': // 1 string to match. |
502 | if (memcmp(RuleIdentifier.data()+1, "ptrunc_fpext_fold" , 17) != 0) |
503 | break; |
504 | return 84; // "fptrunc_fpext_fold" |
505 | case 's': // 1 string to match. |
506 | if (memcmp(RuleIdentifier.data()+1, "ext_inreg_of_load" , 17) != 0) |
507 | break; |
508 | return 95; // "sext_inreg_of_load" |
509 | } |
510 | break; |
511 | case 19: // 12 strings to match. |
512 | switch (RuleIdentifier[0]) { |
513 | default: break; |
514 | case 'b': // 1 string to match. |
515 | if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero" , 18) != 0) |
516 | break; |
517 | return 72; // "binop_right_to_zero" |
518 | case 'c': // 4 strings to match. |
519 | if (memcmp(RuleIdentifier.data()+1, "onst" , 4) != 0) |
520 | break; |
521 | switch (RuleIdentifier[5]) { |
522 | default: break; |
523 | case '_': // 1 string to match. |
524 | if (memcmp(RuleIdentifier.data()+6, "ptradd_to_i2p" , 13) != 0) |
525 | break; |
526 | return 127; // "const_ptradd_to_i2p" |
527 | case 'a': // 3 strings to match. |
528 | if (memcmp(RuleIdentifier.data()+6, "nt_fold_" , 8) != 0) |
529 | break; |
530 | switch (RuleIdentifier[14]) { |
531 | default: break; |
532 | case 'b': // 1 string to match. |
533 | if (memcmp(RuleIdentifier.data()+15, "inop" , 4) != 0) |
534 | break; |
535 | return 152; // "constant_fold_binop" |
536 | case 'f': // 2 strings to match. |
537 | switch (RuleIdentifier[15]) { |
538 | default: break; |
539 | case 'l': // 1 string to match. |
540 | if (memcmp(RuleIdentifier.data()+16, "og2" , 3) != 0) |
541 | break; |
542 | return 123; // "constant_fold_flog2" |
543 | case 's': // 1 string to match. |
544 | if (memcmp(RuleIdentifier.data()+16, "qrt" , 3) != 0) |
545 | break; |
546 | return 122; // "constant_fold_fsqrt" |
547 | } |
548 | break; |
549 | } |
550 | break; |
551 | } |
552 | break; |
553 | case 'e': // 1 string to match. |
554 | if (memcmp(RuleIdentifier.data()+1, "xtend_through_phis" , 18) != 0) |
555 | break; |
556 | return 87; // "extend_through_phis" |
557 | case 'p': // 1 string to match. |
558 | if (memcmp(RuleIdentifier.data()+1, "tr_add_immed_chain" , 18) != 0) |
559 | break; |
560 | return 93; // "ptr_add_immed_chain" |
561 | case 'r': // 2 strings to match. |
562 | switch (RuleIdentifier[1]) { |
563 | default: break; |
564 | case 'e': // 1 string to match. |
565 | if (memcmp(RuleIdentifier.data()+2, "assoc_comm_binops" , 17) != 0) |
566 | break; |
567 | return 92; // "reassoc_comm_binops" |
568 | case 'i': // 1 string to match. |
569 | if (memcmp(RuleIdentifier.data()+2, "ght_identity_zero" , 17) != 0) |
570 | break; |
571 | return 69; // "right_identity_zero" |
572 | } |
573 | break; |
574 | case 's': // 2 strings to match. |
575 | switch (RuleIdentifier[1]) { |
576 | default: break; |
577 | case 'e': // 1 string to match. |
578 | if (memcmp(RuleIdentifier.data()+2, "lect_constant_cmp" , 17) != 0) |
579 | break; |
580 | return 99; // "select_constant_cmp" |
581 | case 'i': // 1 string to match. |
582 | if (memcmp(RuleIdentifier.data()+2, "mplify_add_to_sub" , 17) != 0) |
583 | break; |
584 | return 88; // "simplify_add_to_sub" |
585 | } |
586 | break; |
587 | case 'u': // 1 string to match. |
588 | if (memcmp(RuleIdentifier.data()+1, "nary_undef_to_zero" , 18) != 0) |
589 | break; |
590 | return 61; // "unary_undef_to_zero" |
591 | } |
592 | break; |
593 | case 20: // 5 strings to match. |
594 | switch (RuleIdentifier[0]) { |
595 | default: break; |
596 | case 'a': // 1 string to match. |
597 | if (memcmp(RuleIdentifier.data()+1, "nd_or_disjoint_mask" , 19) != 0) |
598 | break; |
599 | return 163; // "and_or_disjoint_mask" |
600 | case 'b': // 1 string to match. |
601 | if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_fold" , 19) != 0) |
602 | break; |
603 | return 83; // "bitcast_bitcast_fold" |
604 | case 'r': // 2 strings to match. |
605 | if (memcmp(RuleIdentifier.data()+1, "edu" , 3) != 0) |
606 | break; |
607 | switch (RuleIdentifier[4]) { |
608 | default: break; |
609 | case 'c': // 1 string to match. |
610 | if (memcmp(RuleIdentifier.data()+5, "e_shl_of_extend" , 15) != 0) |
611 | break; |
612 | return 96; // "reduce_shl_of_extend" |
613 | case 'n': // 1 string to match. |
614 | if (memcmp(RuleIdentifier.data()+5, "dant_sext_inreg" , 15) != 0) |
615 | break; |
616 | return 103; // "redundant_sext_inreg" |
617 | } |
618 | break; |
619 | case 'u': // 1 string to match. |
620 | if (memcmp(RuleIdentifier.data()+1, "nmerge_zext_to_zext" , 19) != 0) |
621 | break; |
622 | return 116; // "unmerge_zext_to_zext" |
623 | } |
624 | break; |
625 | case 21: // 7 strings to match. |
626 | switch (RuleIdentifier[0]) { |
627 | default: break; |
628 | case 'c': // 3 strings to match. |
629 | if (RuleIdentifier[1] != 'o') |
630 | break; |
631 | switch (RuleIdentifier[2]) { |
632 | default: break; |
633 | case 'm': // 1 string to match. |
634 | if (memcmp(RuleIdentifier.data()+3, "bine_concat_vector" , 18) != 0) |
635 | break; |
636 | return 181; // "combine_concat_vector" |
637 | case 'n': // 2 strings to match. |
638 | if (memcmp(RuleIdentifier.data()+3, "stant_fold_" , 11) != 0) |
639 | break; |
640 | switch (RuleIdentifier[14]) { |
641 | default: break; |
642 | case 'c': // 1 string to match. |
643 | if (memcmp(RuleIdentifier.data()+15, "ast_op" , 6) != 0) |
644 | break; |
645 | return 155; // "constant_fold_cast_op" |
646 | case 'f': // 1 string to match. |
647 | if (memcmp(RuleIdentifier.data()+15, "ptrunc" , 6) != 0) |
648 | break; |
649 | return 124; // "constant_fold_fptrunc" |
650 | } |
651 | break; |
652 | } |
653 | break; |
654 | case 'i': // 1 string to match. |
655 | if (memcmp(RuleIdentifier.data()+1, "nsert_vector_elt_oob" , 20) != 0) |
656 | break; |
657 | return 18; // "insert_vector_elt_oob" |
658 | case 'r': // 1 string to match. |
659 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_fp" , 20) != 0) |
660 | break; |
661 | return 78; // "right_identity_one_fp" |
662 | case 'u': // 2 strings to match. |
663 | if (RuleIdentifier[1] != 'n') |
664 | break; |
665 | switch (RuleIdentifier[2]) { |
666 | default: break; |
667 | case 'd': // 1 string to match. |
668 | if (memcmp(RuleIdentifier.data()+3, "ef_to_negative_one" , 18) != 0) |
669 | break; |
670 | return 58; // "undef_to_negative_one" |
671 | case 'm': // 1 string to match. |
672 | if (memcmp(RuleIdentifier.data()+3, "erge_dead_to_trunc" , 18) != 0) |
673 | break; |
674 | return 115; // "unmerge_dead_to_trunc" |
675 | } |
676 | break; |
677 | } |
678 | break; |
679 | case 22: // 12 strings to match. |
680 | switch (RuleIdentifier[0]) { |
681 | default: break; |
682 | case 'c': // 2 strings to match. |
683 | if (RuleIdentifier[1] != 'o') |
684 | break; |
685 | switch (RuleIdentifier[2]) { |
686 | default: break; |
687 | case 'm': // 1 string to match. |
688 | if (memcmp(RuleIdentifier.data()+3, "bine_shuffle_concat" , 19) != 0) |
689 | break; |
690 | return 188; // "combine_shuffle_concat" |
691 | case 'n': // 1 string to match. |
692 | if (memcmp(RuleIdentifier.data()+3, "stant_fold_fp_binop" , 19) != 0) |
693 | break; |
694 | return 153; // "constant_fold_fp_binop" |
695 | } |
696 | break; |
697 | case 'f': // 4 strings to match. |
698 | switch (RuleIdentifier[1]) { |
699 | default: break; |
700 | case 'o': // 1 string to match. |
701 | if (memcmp(RuleIdentifier.data()+2, "ld_binop_into_select" , 20) != 0) |
702 | break; |
703 | return 172; // "fold_binop_into_select" |
704 | case 'u': // 3 strings to match. |
705 | if (memcmp(RuleIdentifier.data()+2, "nnel_shift_" , 11) != 0) |
706 | break; |
707 | switch (RuleIdentifier[13]) { |
708 | default: break; |
709 | case 'l': // 1 string to match. |
710 | if (memcmp(RuleIdentifier.data()+14, "eft_zero" , 8) != 0) |
711 | break; |
712 | return 143; // "funnel_shift_left_zero" |
713 | case 'o': // 1 string to match. |
714 | if (memcmp(RuleIdentifier.data()+14, "vershift" , 8) != 0) |
715 | break; |
716 | return 144; // "funnel_shift_overshift" |
717 | case 't': // 1 string to match. |
718 | if (memcmp(RuleIdentifier.data()+14, "o_rotate" , 8) != 0) |
719 | break; |
720 | return 141; // "funnel_shift_to_rotate" |
721 | } |
722 | break; |
723 | } |
724 | break; |
725 | case 'i': // 1 string to match. |
726 | if (memcmp(RuleIdentifier.data()+1, "cmp_to_lhs_known_bits" , 21) != 0) |
727 | break; |
728 | return 108; // "icmp_to_lhs_known_bits" |
729 | case 'p': // 1 string to match. |
730 | if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_any_op" , 21) != 0) |
731 | break; |
732 | return 62; // "propagate_undef_any_op" |
733 | case 'r': // 2 strings to match. |
734 | switch (RuleIdentifier[1]) { |
735 | default: break; |
736 | case 'e': // 1 string to match. |
737 | if (memcmp(RuleIdentifier.data()+2, "dundant_neg_operands" , 20) != 0) |
738 | break; |
739 | return 162; // "redundant_neg_operands" |
740 | case 'i': // 1 string to match. |
741 | if (memcmp(RuleIdentifier.data()+2, "ght_identity_one_int" , 20) != 0) |
742 | break; |
743 | return 77; // "right_identity_one_int" |
744 | } |
745 | break; |
746 | case 's': // 1 string to match. |
747 | if (memcmp(RuleIdentifier.data()+1, "hl_ashr_to_sext_inreg" , 21) != 0) |
748 | break; |
749 | return 94; // "shl_ashr_to_sext_inreg" |
750 | case 't': // 1 string to match. |
751 | if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold" , 21) != 0) |
752 | break; |
753 | return 81; // "trunc_buildvector_fold" |
754 | } |
755 | break; |
756 | case 23: // 4 strings to match. |
757 | switch (RuleIdentifier[0]) { |
758 | default: break; |
759 | case 'f': // 1 string to match. |
760 | if (memcmp(RuleIdentifier.data()+1, "unnel_shift_right_zero" , 22) != 0) |
761 | break; |
762 | return 142; // "funnel_shift_right_zero" |
763 | case 'i': // 2 strings to match. |
764 | if (memcmp(RuleIdentifier.data()+1, "tof_const_zero_fold_" , 20) != 0) |
765 | break; |
766 | switch (RuleIdentifier[21]) { |
767 | default: break; |
768 | case 's': // 1 string to match. |
769 | if (RuleIdentifier[22] != 'i') |
770 | break; |
771 | return 125; // "itof_const_zero_fold_si" |
772 | case 'u': // 1 string to match. |
773 | if (RuleIdentifier[22] != 'i') |
774 | break; |
775 | return 126; // "itof_const_zero_fold_ui" |
776 | } |
777 | break; |
778 | case 'p': // 1 string to match. |
779 | if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_all_ops" , 22) != 0) |
780 | break; |
781 | return 63; // "propagate_undef_all_ops" |
782 | } |
783 | break; |
784 | case 24: // 5 strings to match. |
785 | switch (RuleIdentifier[0]) { |
786 | default: break; |
787 | case 'b': // 1 string to match. |
788 | if (memcmp(RuleIdentifier.data()+1, "inop_left_undef_to_zero" , 23) != 0) |
789 | break; |
790 | return 59; // "binop_left_undef_to_zero" |
791 | case 'm': // 1 string to match. |
792 | if (memcmp(RuleIdentifier.data()+1, "atch_extract_of_element" , 23) != 0) |
793 | break; |
794 | return 17; // "match_extract_of_element" |
795 | case 'n': // 1 string to match. |
796 | if (memcmp(RuleIdentifier.data()+1, "arrow_binop_feeding_and" , 23) != 0) |
797 | break; |
798 | return 97; // "narrow_binop_feeding_and" |
799 | case 's': // 1 string to match. |
800 | if (memcmp(RuleIdentifier.data()+1, "ext_inreg_to_zext_inreg" , 23) != 0) |
801 | break; |
802 | return 109; // "sext_inreg_to_zext_inreg" |
803 | case 'x': // 1 string to match. |
804 | if (memcmp(RuleIdentifier.data()+1, "or_of_and_with_same_reg" , 23) != 0) |
805 | break; |
806 | return 134; // "xor_of_and_with_same_reg" |
807 | } |
808 | break; |
809 | case 25: // 5 strings to match. |
810 | switch (RuleIdentifier[0]) { |
811 | default: break; |
812 | case 'b': // 3 strings to match. |
813 | switch (RuleIdentifier[1]) { |
814 | default: break; |
815 | case 'i': // 2 strings to match. |
816 | if (memcmp(RuleIdentifier.data()+2, "tfield_extract_from_" , 20) != 0) |
817 | break; |
818 | switch (RuleIdentifier[22]) { |
819 | default: break; |
820 | case 'a': // 1 string to match. |
821 | if (memcmp(RuleIdentifier.data()+23, "nd" , 2) != 0) |
822 | break; |
823 | return 149; // "bitfield_extract_from_and" |
824 | case 's': // 1 string to match. |
825 | if (memcmp(RuleIdentifier.data()+23, "hr" , 2) != 0) |
826 | break; |
827 | return 150; // "bitfield_extract_from_shr" |
828 | } |
829 | break; |
830 | case 'u': // 1 string to match. |
831 | if (memcmp(RuleIdentifier.data()+2, "ildvector_identity_fold" , 23) != 0) |
832 | break; |
833 | return 80; // "buildvector_identity_fold" |
834 | } |
835 | break; |
836 | case 'e': // 1 string to match. |
837 | if (memcmp(RuleIdentifier.data()+1, "xtract_vec_elt_build_vec" , 24) != 0) |
838 | break; |
839 | return 51; // "extract_vec_elt_build_vec" |
840 | case 'r': // 1 string to match. |
841 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_one_fp" , 24) != 0) |
842 | break; |
843 | return 86; // "right_identity_neg_one_fp" |
844 | } |
845 | break; |
846 | case 26: // 4 strings to match. |
847 | switch (RuleIdentifier[0]) { |
848 | default: break; |
849 | case 'b': // 1 string to match. |
850 | if (memcmp(RuleIdentifier.data()+1, "inop_right_undef_to_undef" , 25) != 0) |
851 | break; |
852 | return 60; // "binop_right_undef_to_undef" |
853 | case 'c': // 1 string to match. |
854 | if (memcmp(RuleIdentifier.data()+1, "ommute_fp_constant_to_rhs" , 25) != 0) |
855 | break; |
856 | return 178; // "commute_fp_constant_to_rhs" |
857 | case 'f': // 1 string to match. |
858 | if (memcmp(RuleIdentifier.data()+1, "unnel_shift_from_or_shift" , 25) != 0) |
859 | break; |
860 | return 140; // "funnel_shift_from_or_shift" |
861 | case 'r': // 1 string to match. |
862 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp" , 25) != 0) |
863 | break; |
864 | return 85; // "right_identity_neg_zero_fp" |
865 | } |
866 | break; |
867 | case 27: // 4 strings to match. |
868 | switch (RuleIdentifier[0]) { |
869 | default: break; |
870 | case 'c': // 1 string to match. |
871 | if (memcmp(RuleIdentifier.data()+1, "ommute_int_constant_to_rhs" , 26) != 0) |
872 | break; |
873 | return 177; // "commute_int_constant_to_rhs" |
874 | case 'd': // 1 string to match. |
875 | if (memcmp(RuleIdentifier.data()+1, "ouble_icmp_zero_or_combine" , 26) != 0) |
876 | break; |
877 | return 183; // "double_icmp_zero_or_combine" |
878 | case 'r': // 1 string to match. |
879 | if (memcmp(RuleIdentifier.data()+1, "edundant_binop_in_equality" , 26) != 0) |
880 | break; |
881 | return 175; // "redundant_binop_in_equality" |
882 | case 't': // 1 string to match. |
883 | if (memcmp(RuleIdentifier.data()+1, "runc_lshr_buildvector_fold" , 26) != 0) |
884 | break; |
885 | return 82; // "trunc_lshr_buildvector_fold" |
886 | } |
887 | break; |
888 | case 28: // 4 strings to match. |
889 | switch (RuleIdentifier[0]) { |
890 | default: break; |
891 | case 'd': // 1 string to match. |
892 | if (memcmp(RuleIdentifier.data()+1, "ouble_icmp_zero_and_combine" , 27) != 0) |
893 | break; |
894 | return 182; // "double_icmp_zero_and_combine" |
895 | case 'o': // 1 string to match. |
896 | if (memcmp(RuleIdentifier.data()+1, "pt_brcond_by_inverting_cond" , 27) != 0) |
897 | break; |
898 | return 112; // "opt_brcond_by_inverting_cond" |
899 | case 'p': // 1 string to match. |
900 | if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_shuffle_mask" , 27) != 0) |
901 | break; |
902 | return 64; // "propagate_undef_shuffle_mask" |
903 | case 's': // 1 string to match. |
904 | if (memcmp(RuleIdentifier.data()+1, "hift_of_shifted_logic_chain" , 27) != 0) |
905 | break; |
906 | return 137; // "shift_of_shifted_logic_chain" |
907 | } |
908 | break; |
909 | case 29: // 3 strings to match. |
910 | switch (RuleIdentifier[0]) { |
911 | default: break; |
912 | case 'b': // 1 string to match. |
913 | if (memcmp(RuleIdentifier.data()+1, "itfield_extract_from_shr_and" , 28) != 0) |
914 | break; |
915 | return 151; // "bitfield_extract_from_shr_and" |
916 | case 'c': // 1 string to match. |
917 | if (memcmp(RuleIdentifier.data()+1, "ombine_extracted_vector_load" , 28) != 0) |
918 | break; |
919 | return 55; // "combine_extracted_vector_load" |
920 | case 'i': // 1 string to match. |
921 | if (memcmp(RuleIdentifier.data()+1, "cmp_to_true_false_known_bits" , 28) != 0) |
922 | break; |
923 | return 107; // "icmp_to_true_false_known_bits" |
924 | } |
925 | break; |
926 | case 30: // 1 string to match. |
927 | if (memcmp(RuleIdentifier.data()+0, "freeze_of_non_undef_non_poison" , 30) != 0) |
928 | break; |
929 | return 48; // "freeze_of_non_undef_non_poison" |
930 | case 31: // 2 strings to match. |
931 | if (memcmp(RuleIdentifier.data()+0, "insert_vector_element_" , 22) != 0) |
932 | break; |
933 | switch (RuleIdentifier[22]) { |
934 | default: break; |
935 | case 'e': // 1 string to match. |
936 | if (memcmp(RuleIdentifier.data()+23, "lt_undef" , 8) != 0) |
937 | break; |
938 | return 16; // "insert_vector_element_elt_undef" |
939 | case 'i': // 1 string to match. |
940 | if (memcmp(RuleIdentifier.data()+23, "dx_undef" , 8) != 0) |
941 | break; |
942 | return 15; // "insert_vector_element_idx_undef" |
943 | } |
944 | break; |
945 | case 32: // 4 strings to match. |
946 | switch (RuleIdentifier[0]) { |
947 | default: break; |
948 | case 'b': // 1 string to match. |
949 | if (memcmp(RuleIdentifier.data()+1, "itfield_extract_from_sext_inreg" , 31) != 0) |
950 | break; |
951 | return 148; // "bitfield_extract_from_sext_inreg" |
952 | case 'c': // 2 strings to match. |
953 | if (memcmp(RuleIdentifier.data()+1, "ombine_f" , 8) != 0) |
954 | break; |
955 | switch (RuleIdentifier[9]) { |
956 | default: break; |
957 | case 'a': // 1 string to match. |
958 | if (memcmp(RuleIdentifier.data()+10, "dd_fmul_to_fmad_or_fma" , 22) != 0) |
959 | break; |
960 | return 164; // "combine_fadd_fmul_to_fmad_or_fma" |
961 | case 's': // 1 string to match. |
962 | if (memcmp(RuleIdentifier.data()+10, "ub_fmul_to_fmad_or_fma" , 22) != 0) |
963 | break; |
964 | return 168; // "combine_fsub_fmul_to_fmad_or_fma" |
965 | } |
966 | break; |
967 | case 'e': // 1 string to match. |
968 | if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_not_const" , 31) != 0) |
969 | break; |
970 | return 19; // "extract_vector_element_not_const" |
971 | } |
972 | break; |
973 | case 34: // 1 string to match. |
974 | if (memcmp(RuleIdentifier.data()+0, "extract_all_elts_from_build_vector" , 34) != 0) |
975 | break; |
976 | return 52; // "extract_all_elts_from_build_vector" |
977 | case 36: // 11 strings to match. |
978 | switch (RuleIdentifier[0]) { |
979 | default: break; |
980 | case 'c': // 2 strings to match. |
981 | if (memcmp(RuleIdentifier.data()+1, "ombine_" , 7) != 0) |
982 | break; |
983 | switch (RuleIdentifier[8]) { |
984 | default: break; |
985 | case 'f': // 1 string to match. |
986 | if (memcmp(RuleIdentifier.data()+9, "add_fma_fmul_to_fmad_or_fma" , 27) != 0) |
987 | break; |
988 | return 166; // "combine_fadd_fma_fmul_to_fmad_or_fma" |
989 | case 'i': // 1 string to match. |
990 | if (memcmp(RuleIdentifier.data()+9, "nsert_vec_elts_build_vector" , 27) != 0) |
991 | break; |
992 | return 50; // "combine_insert_vec_elts_build_vector" |
993 | } |
994 | break; |
995 | case 'e': // 7 strings to match. |
996 | if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_build_vector" , 34) != 0) |
997 | break; |
998 | switch (RuleIdentifier[35]) { |
999 | default: break; |
1000 | case '2': // 1 string to match. |
1001 | return 21; // "extract_vector_element_build_vector2" |
1002 | case '3': // 1 string to match. |
1003 | return 22; // "extract_vector_element_build_vector3" |
1004 | case '4': // 1 string to match. |
1005 | return 23; // "extract_vector_element_build_vector4" |
1006 | case '5': // 1 string to match. |
1007 | return 24; // "extract_vector_element_build_vector5" |
1008 | case '7': // 1 string to match. |
1009 | return 25; // "extract_vector_element_build_vector7" |
1010 | case '8': // 1 string to match. |
1011 | return 26; // "extract_vector_element_build_vector8" |
1012 | case '9': // 1 string to match. |
1013 | return 27; // "extract_vector_element_build_vector9" |
1014 | } |
1015 | break; |
1016 | case 'i': // 1 string to match. |
1017 | if (memcmp(RuleIdentifier.data()+1, "nsert_extract_vec_elt_out_of_bounds" , 35) != 0) |
1018 | break; |
1019 | return 67; // "insert_extract_vec_elt_out_of_bounds" |
1020 | case 'm': // 1 string to match. |
1021 | if (memcmp(RuleIdentifier.data()+1, "atch_extract_of_element_undef_index" , 35) != 0) |
1022 | break; |
1023 | return 14; // "match_extract_of_element_undef_index" |
1024 | } |
1025 | break; |
1026 | case 37: // 11 strings to match. |
1027 | switch (RuleIdentifier[0]) { |
1028 | default: break; |
1029 | case 'c': // 1 string to match. |
1030 | if (memcmp(RuleIdentifier.data()+1, "ombine_fsub_fneg_fmul_to_fmad_or_fma" , 36) != 0) |
1031 | break; |
1032 | return 169; // "combine_fsub_fneg_fmul_to_fmad_or_fma" |
1033 | case 'e': // 8 strings to match. |
1034 | if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_" , 22) != 0) |
1035 | break; |
1036 | switch (RuleIdentifier[23]) { |
1037 | default: break; |
1038 | case 'b': // 7 strings to match. |
1039 | if (memcmp(RuleIdentifier.data()+24, "uild_vector1" , 12) != 0) |
1040 | break; |
1041 | switch (RuleIdentifier[36]) { |
1042 | default: break; |
1043 | case '0': // 1 string to match. |
1044 | return 28; // "extract_vector_element_build_vector10" |
1045 | case '1': // 1 string to match. |
1046 | return 29; // "extract_vector_element_build_vector11" |
1047 | case '2': // 1 string to match. |
1048 | return 30; // "extract_vector_element_build_vector12" |
1049 | case '3': // 1 string to match. |
1050 | return 31; // "extract_vector_element_build_vector13" |
1051 | case '4': // 1 string to match. |
1052 | return 32; // "extract_vector_element_build_vector14" |
1053 | case '5': // 1 string to match. |
1054 | return 33; // "extract_vector_element_build_vector15" |
1055 | case '6': // 1 string to match. |
1056 | return 34; // "extract_vector_element_build_vector16" |
1057 | } |
1058 | break; |
1059 | case 's': // 1 string to match. |
1060 | if (memcmp(RuleIdentifier.data()+24, "huffle_vector" , 13) != 0) |
1061 | break; |
1062 | return 42; // "extract_vector_element_shuffle_vector" |
1063 | } |
1064 | break; |
1065 | case 'h': // 1 string to match. |
1066 | if (memcmp(RuleIdentifier.data()+1, "oist_logic_op_with_same_opcode_hands" , 36) != 0) |
1067 | break; |
1068 | return 89; // "hoist_logic_op_with_same_opcode_hands" |
1069 | case 'm': // 1 string to match. |
1070 | if (memcmp(RuleIdentifier.data()+1, "atch_extract_of_element_undef_vector" , 36) != 0) |
1071 | break; |
1072 | return 13; // "match_extract_of_element_undef_vector" |
1073 | } |
1074 | break; |
1075 | case 38: // 2 strings to match. |
1076 | if (memcmp(RuleIdentifier.data()+0, "combine_f" , 9) != 0) |
1077 | break; |
1078 | switch (RuleIdentifier[9]) { |
1079 | default: break; |
1080 | case 'a': // 1 string to match. |
1081 | if (memcmp(RuleIdentifier.data()+10, "dd_fpext_fmul_to_fmad_or_fma" , 28) != 0) |
1082 | break; |
1083 | return 165; // "combine_fadd_fpext_fmul_to_fmad_or_fma" |
1084 | case 's': // 1 string to match. |
1085 | if (memcmp(RuleIdentifier.data()+10, "ub_fpext_fmul_to_fmad_or_fma" , 28) != 0) |
1086 | break; |
1087 | return 170; // "combine_fsub_fpext_fmul_to_fmad_or_fma" |
1088 | } |
1089 | break; |
1090 | case 40: // 1 string to match. |
1091 | if (memcmp(RuleIdentifier.data()+0, "extract_vector_element_different_indices" , 40) != 0) |
1092 | break; |
1093 | return 20; // "extract_vector_element_different_indices" |
1094 | case 42: // 8 strings to match. |
1095 | switch (RuleIdentifier[0]) { |
1096 | default: break; |
1097 | case 'c': // 1 string to match. |
1098 | if (memcmp(RuleIdentifier.data()+1, "ombine_fadd_fpext_fma_fmul_to_fmad_or_fma" , 41) != 0) |
1099 | break; |
1100 | return 167; // "combine_fadd_fpext_fma_fmul_to_fmad_or_fma" |
1101 | case 'e': // 7 strings to match. |
1102 | if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_build_vector_trunc" , 40) != 0) |
1103 | break; |
1104 | switch (RuleIdentifier[41]) { |
1105 | default: break; |
1106 | case '2': // 1 string to match. |
1107 | return 35; // "extract_vector_element_build_vector_trunc2" |
1108 | case '3': // 1 string to match. |
1109 | return 36; // "extract_vector_element_build_vector_trunc3" |
1110 | case '4': // 1 string to match. |
1111 | return 37; // "extract_vector_element_build_vector_trunc4" |
1112 | case '5': // 1 string to match. |
1113 | return 38; // "extract_vector_element_build_vector_trunc5" |
1114 | case '6': // 1 string to match. |
1115 | return 39; // "extract_vector_element_build_vector_trunc6" |
1116 | case '7': // 1 string to match. |
1117 | return 40; // "extract_vector_element_build_vector_trunc7" |
1118 | case '8': // 1 string to match. |
1119 | return 41; // "extract_vector_element_build_vector_trunc8" |
1120 | } |
1121 | break; |
1122 | } |
1123 | break; |
1124 | case 43: // 1 string to match. |
1125 | if (memcmp(RuleIdentifier.data()+0, "combine_fsub_fpext_fneg_fmul_to_fmad_or_fma" , 43) != 0) |
1126 | break; |
1127 | return 171; // "combine_fsub_fpext_fneg_fmul_to_fmad_or_fma" |
1128 | case 44: // 1 string to match. |
1129 | if (memcmp(RuleIdentifier.data()+0, "insert_vector_element_extract_vector_element" , 44) != 0) |
1130 | break; |
1131 | return 43; // "insert_vector_element_extract_vector_element" |
1132 | case 46: // 1 string to match. |
1133 | if (memcmp(RuleIdentifier.data()+0, "push_freeze_to_prevent_poison_from_propagating" , 46) != 0) |
1134 | break; |
1135 | return 49; // "push_freeze_to_prevent_poison_from_propagating" |
1136 | } |
1137 | #endif // ifndef NDEBUG |
1138 | |
1139 | return std::nullopt; |
1140 | } |
1141 | static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) { |
1142 | std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-'); |
1143 | if (!RangePair.second.empty()) { |
1144 | const auto First = getRuleIdxForIdentifier(RangePair.first); |
1145 | const auto Last = getRuleIdxForIdentifier(RangePair.second); |
1146 | if (!First || !Last) |
1147 | return std::nullopt; |
1148 | if (First >= Last) |
1149 | report_fatal_error("Beginning of range should be before end of range" ); |
1150 | return {{*First, *Last + 1}}; |
1151 | } |
1152 | if (RangePair.first == "*" ) { |
1153 | return {{0, 191}}; |
1154 | } |
1155 | const auto I = getRuleIdxForIdentifier(RangePair.first); |
1156 | if (!I) |
1157 | return std::nullopt; |
1158 | return {{*I, *I + 1}}; |
1159 | } |
1160 | |
1161 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) { |
1162 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
1163 | if (!MaybeRange) |
1164 | return false; |
1165 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
1166 | DisabledRules.reset(I); |
1167 | return true; |
1168 | } |
1169 | |
1170 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) { |
1171 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
1172 | if (!MaybeRange) |
1173 | return false; |
1174 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
1175 | DisabledRules.set(I); |
1176 | return true; |
1177 | } |
1178 | |
1179 | static std::vector<std::string> AMDGPUPreLegalizerCombinerOption; |
1180 | static cl::list<std::string> AMDGPUPreLegalizerCombinerDisableOption( |
1181 | "amdgpuprelegalizercombiner-disable-rule" , |
1182 | cl::desc("Disable one or more combiner rules temporarily in the AMDGPUPreLegalizerCombiner pass" ), |
1183 | cl::CommaSeparated, |
1184 | cl::Hidden, |
1185 | cl::cat(GICombinerOptionCategory), |
1186 | cl::callback([](const std::string &Str) { |
1187 | AMDGPUPreLegalizerCombinerOption.push_back(Str); |
1188 | })); |
1189 | static cl::list<std::string> AMDGPUPreLegalizerCombinerOnlyEnableOption( |
1190 | "amdgpuprelegalizercombiner-only-enable-rule" , |
1191 | cl::desc("Disable all rules in the AMDGPUPreLegalizerCombiner pass then re-enable the specified ones" ), |
1192 | cl::Hidden, |
1193 | cl::cat(GICombinerOptionCategory), |
1194 | cl::callback([](const std::string &CommaSeparatedArg) { |
1195 | StringRef Str = CommaSeparatedArg; |
1196 | AMDGPUPreLegalizerCombinerOption.push_back("*" ); |
1197 | do { |
1198 | auto X = Str.split("," ); |
1199 | AMDGPUPreLegalizerCombinerOption.push_back(("!" + X.first).str()); |
1200 | Str = X.second; |
1201 | } while (!Str.empty()); |
1202 | })); |
1203 | |
1204 | |
1205 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const { |
1206 | return !DisabledRules.test(RuleID); |
1207 | } |
1208 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::parseCommandLineOption() { |
1209 | for (StringRef Identifier : AMDGPUPreLegalizerCombinerOption) { |
1210 | bool Enabled = Identifier.consume_front("!" ); |
1211 | if (Enabled && !setRuleEnabled(Identifier)) |
1212 | return false; |
1213 | if (!Enabled && !setRuleDisabled(Identifier)) |
1214 | return false; |
1215 | } |
1216 | return true; |
1217 | } |
1218 | |
1219 | #endif // ifdef GET_GICOMBINER_TYPES |
1220 | |
1221 | #ifdef GET_GICOMBINER_TYPES |
1222 | const unsigned MAX_SUBTARGET_PREDICATES = 0; |
1223 | using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>; |
1224 | #endif // ifdef GET_GICOMBINER_TYPES |
1225 | |
1226 | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
1227 | PredicateBitset AvailableModuleFeatures; |
1228 | mutable PredicateBitset AvailableFunctionFeatures; |
1229 | PredicateBitset getAvailableFeatures() const { |
1230 | return AvailableModuleFeatures | AvailableFunctionFeatures; |
1231 | } |
1232 | PredicateBitset |
1233 | computeAvailableModuleFeatures(const AMDGPUSubtarget *Subtarget) const; |
1234 | PredicateBitset |
1235 | computeAvailableFunctionFeatures(const AMDGPUSubtarget *Subtarget, |
1236 | const MachineFunction *MF) const; |
1237 | void setupGeneratedPerFunctionState(MachineFunction &MF) override; |
1238 | #endif // ifdef GET_GICOMBINER_CLASS_MEMBERS |
1239 | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
1240 | mutable MatcherState State; |
1241 | typedef ComplexRendererFns(AMDGPUPreLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const; |
1242 | typedef void(AMDGPUPreLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const; |
1243 | const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo; |
1244 | static AMDGPUPreLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[]; |
1245 | static AMDGPUPreLegalizerCombinerImpl::CustomRendererFn CustomRenderers[]; |
1246 | bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override; |
1247 | bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override; |
1248 | bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override; |
1249 | const uint8_t *getMatchTable() const override; |
1250 | bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override; |
1251 | bool testSimplePredicate(unsigned PredicateID) const override; |
1252 | bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override; |
1253 | #endif // ifdef GET_GICOMBINER_CLASS_MEMBERS |
1254 | |
1255 | #ifdef GET_GICOMBINER_IMPL |
1256 | // LLT Objects. |
1257 | enum { |
1258 | GILLT_s1, |
1259 | }; |
1260 | const static size_t NumTypeObjects = 1; |
1261 | const static LLT TypeObjects[] = { |
1262 | LLT::scalar(1), |
1263 | }; |
1264 | |
1265 | // Bits for subtarget features that participate in instruction matching. |
1266 | enum SubtargetFeatureBits : uint8_t { |
1267 | }; |
1268 | |
1269 | PredicateBitset AMDGPUPreLegalizerCombinerImpl:: |
1270 | computeAvailableModuleFeatures(const AMDGPUSubtarget *Subtarget) const { |
1271 | PredicateBitset Features{}; |
1272 | return Features; |
1273 | } |
1274 | |
1275 | void AMDGPUPreLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) { |
1276 | AvailableFunctionFeatures = computeAvailableFunctionFeatures((const AMDGPUSubtarget *)&MF.getSubtarget(), &MF); |
1277 | } |
1278 | PredicateBitset AMDGPUPreLegalizerCombinerImpl:: |
1279 | computeAvailableFunctionFeatures(const AMDGPUSubtarget *Subtarget, const MachineFunction *MF) const { |
1280 | PredicateBitset Features{}; |
1281 | return Features; |
1282 | } |
1283 | |
1284 | // Feature bitsets. |
1285 | enum { |
1286 | GIFBS_Invalid, |
1287 | }; |
1288 | constexpr static PredicateBitset FeatureBitsets[] { |
1289 | {}, // GIFBS_Invalid |
1290 | }; |
1291 | |
1292 | // ComplexPattern predicates. |
1293 | enum { |
1294 | GICP_Invalid, |
1295 | }; |
1296 | // See constructor for table contents |
1297 | |
1298 | AMDGPUPreLegalizerCombinerImpl::ComplexMatcherMemFn |
1299 | AMDGPUPreLegalizerCombinerImpl::ComplexPredicateFns[] = { |
1300 | nullptr, // GICP_Invalid |
1301 | }; |
1302 | |
1303 | enum { |
1304 | GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1, |
1305 | GICXXPred_MI_Predicate_GICombiner1, |
1306 | GICXXPred_MI_Predicate_GICombiner2, |
1307 | GICXXPred_MI_Predicate_GICombiner3, |
1308 | GICXXPred_MI_Predicate_GICombiner4, |
1309 | GICXXPred_MI_Predicate_GICombiner5, |
1310 | GICXXPred_MI_Predicate_GICombiner6, |
1311 | GICXXPred_MI_Predicate_GICombiner7, |
1312 | GICXXPred_MI_Predicate_GICombiner8, |
1313 | }; |
1314 | bool AMDGPUPreLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const { |
1315 | switch (PredicateID) { |
1316 | case GICXXPred_MI_Predicate_GICombiner0: { |
1317 | return isGuaranteedNotToBePoison(State.MIs[0]->getOperand(1).getReg(), MRI); |
1318 | } |
1319 | case GICXXPred_MI_Predicate_GICombiner1: { |
1320 | return isGuaranteedNotToBeUndefOrPoison(State.MIs[0]->getOperand(1).getReg(), MRI); |
1321 | } |
1322 | case GICXXPred_MI_Predicate_GICombiner2: { |
1323 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0); |
1324 | } |
1325 | case GICXXPred_MI_Predicate_GICombiner3: { |
1326 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0); |
1327 | } |
1328 | case GICXXPred_MI_Predicate_GICombiner4: { |
1329 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0); |
1330 | } |
1331 | case GICXXPred_MI_Predicate_GICombiner5: { |
1332 | return Helper.isLegalOrBeforeLegalizer({TargetOpcode::G_LSHR, |
1333 | {MRI.getType(State.MIs[2]->getOperand(1).getReg()), |
1334 | MRI.getType(State.MIs[1]->getOperand(2).getReg())}}); |
1335 | } |
1336 | case GICXXPred_MI_Predicate_GICombiner6: { |
1337 | return Helper.isLegalOrBeforeLegalizer({TargetOpcode::G_SHL, |
1338 | {MRI.getType(State.MIs[2]->getOperand(1).getReg()), |
1339 | MRI.getType(State.MIs[1]->getOperand(2).getReg())}}); |
1340 | } |
1341 | case GICXXPred_MI_Predicate_GICombiner7: { |
1342 | return State.MIs[1]->getOperand(1).getPredicate() == CmpInst::ICMP_EQ && |
1343 | !MRI.getType(State.MIs[1]->getOperand(2).getReg()).getScalarType().isPointer() && |
1344 | (MRI.getType(State.MIs[1]->getOperand(2).getReg()) == |
1345 | MRI.getType(State.MIs[2]->getOperand(2).getReg())); |
1346 | } |
1347 | case GICXXPred_MI_Predicate_GICombiner8: { |
1348 | return State.MIs[1]->getOperand(1).getPredicate() == CmpInst::ICMP_NE && |
1349 | !MRI.getType(State.MIs[1]->getOperand(2).getReg()).getScalarType().isPointer() && |
1350 | (MRI.getType(State.MIs[1]->getOperand(2).getReg()) == |
1351 | MRI.getType(State.MIs[2]->getOperand(2).getReg())); |
1352 | } |
1353 | } |
1354 | llvm_unreachable("Unknown predicate" ); |
1355 | return false; |
1356 | } |
1357 | bool AMDGPUPreLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const { |
1358 | llvm_unreachable("Unknown predicate" ); |
1359 | return false; |
1360 | } |
1361 | bool AMDGPUPreLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const { |
1362 | llvm_unreachable("Unknown predicate" ); |
1363 | return false; |
1364 | } |
1365 | bool AMDGPUPreLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const { |
1366 | llvm_unreachable("Unknown predicate" ); |
1367 | return false; |
1368 | } |
1369 | enum { |
1370 | GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1, |
1371 | GICXXPred_Simple_IsRule1Enabled, |
1372 | GICXXPred_Simple_IsRule2Enabled, |
1373 | GICXXPred_Simple_IsRule3Enabled, |
1374 | GICXXPred_Simple_IsRule4Enabled, |
1375 | GICXXPred_Simple_IsRule5Enabled, |
1376 | GICXXPred_Simple_IsRule6Enabled, |
1377 | GICXXPred_Simple_IsRule7Enabled, |
1378 | GICXXPred_Simple_IsRule8Enabled, |
1379 | GICXXPred_Simple_IsRule9Enabled, |
1380 | GICXXPred_Simple_IsRule10Enabled, |
1381 | GICXXPred_Simple_IsRule11Enabled, |
1382 | GICXXPred_Simple_IsRule12Enabled, |
1383 | GICXXPred_Simple_IsRule13Enabled, |
1384 | GICXXPred_Simple_IsRule14Enabled, |
1385 | GICXXPred_Simple_IsRule15Enabled, |
1386 | GICXXPred_Simple_IsRule16Enabled, |
1387 | GICXXPred_Simple_IsRule17Enabled, |
1388 | GICXXPred_Simple_IsRule18Enabled, |
1389 | GICXXPred_Simple_IsRule19Enabled, |
1390 | GICXXPred_Simple_IsRule20Enabled, |
1391 | GICXXPred_Simple_IsRule21Enabled, |
1392 | GICXXPred_Simple_IsRule22Enabled, |
1393 | GICXXPred_Simple_IsRule23Enabled, |
1394 | GICXXPred_Simple_IsRule24Enabled, |
1395 | GICXXPred_Simple_IsRule25Enabled, |
1396 | GICXXPred_Simple_IsRule26Enabled, |
1397 | GICXXPred_Simple_IsRule27Enabled, |
1398 | GICXXPred_Simple_IsRule28Enabled, |
1399 | GICXXPred_Simple_IsRule29Enabled, |
1400 | GICXXPred_Simple_IsRule30Enabled, |
1401 | GICXXPred_Simple_IsRule31Enabled, |
1402 | GICXXPred_Simple_IsRule32Enabled, |
1403 | GICXXPred_Simple_IsRule33Enabled, |
1404 | GICXXPred_Simple_IsRule34Enabled, |
1405 | GICXXPred_Simple_IsRule35Enabled, |
1406 | GICXXPred_Simple_IsRule36Enabled, |
1407 | GICXXPred_Simple_IsRule37Enabled, |
1408 | GICXXPred_Simple_IsRule38Enabled, |
1409 | GICXXPred_Simple_IsRule39Enabled, |
1410 | GICXXPred_Simple_IsRule40Enabled, |
1411 | GICXXPred_Simple_IsRule41Enabled, |
1412 | GICXXPred_Simple_IsRule42Enabled, |
1413 | GICXXPred_Simple_IsRule43Enabled, |
1414 | GICXXPred_Simple_IsRule44Enabled, |
1415 | GICXXPred_Simple_IsRule45Enabled, |
1416 | GICXXPred_Simple_IsRule46Enabled, |
1417 | GICXXPred_Simple_IsRule47Enabled, |
1418 | GICXXPred_Simple_IsRule48Enabled, |
1419 | GICXXPred_Simple_IsRule49Enabled, |
1420 | GICXXPred_Simple_IsRule50Enabled, |
1421 | GICXXPred_Simple_IsRule51Enabled, |
1422 | GICXXPred_Simple_IsRule52Enabled, |
1423 | GICXXPred_Simple_IsRule53Enabled, |
1424 | GICXXPred_Simple_IsRule54Enabled, |
1425 | GICXXPred_Simple_IsRule55Enabled, |
1426 | GICXXPred_Simple_IsRule56Enabled, |
1427 | GICXXPred_Simple_IsRule57Enabled, |
1428 | GICXXPred_Simple_IsRule58Enabled, |
1429 | GICXXPred_Simple_IsRule59Enabled, |
1430 | GICXXPred_Simple_IsRule60Enabled, |
1431 | GICXXPred_Simple_IsRule61Enabled, |
1432 | GICXXPred_Simple_IsRule62Enabled, |
1433 | GICXXPred_Simple_IsRule63Enabled, |
1434 | GICXXPred_Simple_IsRule64Enabled, |
1435 | GICXXPred_Simple_IsRule65Enabled, |
1436 | GICXXPred_Simple_IsRule66Enabled, |
1437 | GICXXPred_Simple_IsRule67Enabled, |
1438 | GICXXPred_Simple_IsRule68Enabled, |
1439 | GICXXPred_Simple_IsRule69Enabled, |
1440 | GICXXPred_Simple_IsRule70Enabled, |
1441 | GICXXPred_Simple_IsRule71Enabled, |
1442 | GICXXPred_Simple_IsRule72Enabled, |
1443 | GICXXPred_Simple_IsRule73Enabled, |
1444 | GICXXPred_Simple_IsRule74Enabled, |
1445 | GICXXPred_Simple_IsRule75Enabled, |
1446 | GICXXPred_Simple_IsRule76Enabled, |
1447 | GICXXPred_Simple_IsRule77Enabled, |
1448 | GICXXPred_Simple_IsRule78Enabled, |
1449 | GICXXPred_Simple_IsRule79Enabled, |
1450 | GICXXPred_Simple_IsRule80Enabled, |
1451 | GICXXPred_Simple_IsRule81Enabled, |
1452 | GICXXPred_Simple_IsRule82Enabled, |
1453 | GICXXPred_Simple_IsRule83Enabled, |
1454 | GICXXPred_Simple_IsRule84Enabled, |
1455 | GICXXPred_Simple_IsRule85Enabled, |
1456 | GICXXPred_Simple_IsRule86Enabled, |
1457 | GICXXPred_Simple_IsRule87Enabled, |
1458 | GICXXPred_Simple_IsRule88Enabled, |
1459 | GICXXPred_Simple_IsRule89Enabled, |
1460 | GICXXPred_Simple_IsRule90Enabled, |
1461 | GICXXPred_Simple_IsRule91Enabled, |
1462 | GICXXPred_Simple_IsRule92Enabled, |
1463 | GICXXPred_Simple_IsRule93Enabled, |
1464 | GICXXPred_Simple_IsRule94Enabled, |
1465 | GICXXPred_Simple_IsRule95Enabled, |
1466 | GICXXPred_Simple_IsRule96Enabled, |
1467 | GICXXPred_Simple_IsRule97Enabled, |
1468 | GICXXPred_Simple_IsRule98Enabled, |
1469 | GICXXPred_Simple_IsRule99Enabled, |
1470 | GICXXPred_Simple_IsRule100Enabled, |
1471 | GICXXPred_Simple_IsRule101Enabled, |
1472 | GICXXPred_Simple_IsRule102Enabled, |
1473 | GICXXPred_Simple_IsRule103Enabled, |
1474 | GICXXPred_Simple_IsRule104Enabled, |
1475 | GICXXPred_Simple_IsRule105Enabled, |
1476 | GICXXPred_Simple_IsRule106Enabled, |
1477 | GICXXPred_Simple_IsRule107Enabled, |
1478 | GICXXPred_Simple_IsRule108Enabled, |
1479 | GICXXPred_Simple_IsRule109Enabled, |
1480 | GICXXPred_Simple_IsRule110Enabled, |
1481 | GICXXPred_Simple_IsRule111Enabled, |
1482 | GICXXPred_Simple_IsRule112Enabled, |
1483 | GICXXPred_Simple_IsRule113Enabled, |
1484 | GICXXPred_Simple_IsRule114Enabled, |
1485 | GICXXPred_Simple_IsRule115Enabled, |
1486 | GICXXPred_Simple_IsRule116Enabled, |
1487 | GICXXPred_Simple_IsRule117Enabled, |
1488 | GICXXPred_Simple_IsRule118Enabled, |
1489 | GICXXPred_Simple_IsRule119Enabled, |
1490 | GICXXPred_Simple_IsRule120Enabled, |
1491 | GICXXPred_Simple_IsRule121Enabled, |
1492 | GICXXPred_Simple_IsRule122Enabled, |
1493 | GICXXPred_Simple_IsRule123Enabled, |
1494 | GICXXPred_Simple_IsRule124Enabled, |
1495 | GICXXPred_Simple_IsRule125Enabled, |
1496 | GICXXPred_Simple_IsRule126Enabled, |
1497 | GICXXPred_Simple_IsRule127Enabled, |
1498 | GICXXPred_Simple_IsRule128Enabled, |
1499 | GICXXPred_Simple_IsRule129Enabled, |
1500 | GICXXPred_Simple_IsRule130Enabled, |
1501 | GICXXPred_Simple_IsRule131Enabled, |
1502 | GICXXPred_Simple_IsRule132Enabled, |
1503 | GICXXPred_Simple_IsRule133Enabled, |
1504 | GICXXPred_Simple_IsRule134Enabled, |
1505 | GICXXPred_Simple_IsRule135Enabled, |
1506 | GICXXPred_Simple_IsRule136Enabled, |
1507 | GICXXPred_Simple_IsRule137Enabled, |
1508 | GICXXPred_Simple_IsRule138Enabled, |
1509 | GICXXPred_Simple_IsRule139Enabled, |
1510 | GICXXPred_Simple_IsRule140Enabled, |
1511 | GICXXPred_Simple_IsRule141Enabled, |
1512 | GICXXPred_Simple_IsRule142Enabled, |
1513 | GICXXPred_Simple_IsRule143Enabled, |
1514 | GICXXPred_Simple_IsRule144Enabled, |
1515 | GICXXPred_Simple_IsRule145Enabled, |
1516 | GICXXPred_Simple_IsRule146Enabled, |
1517 | GICXXPred_Simple_IsRule147Enabled, |
1518 | GICXXPred_Simple_IsRule148Enabled, |
1519 | GICXXPred_Simple_IsRule149Enabled, |
1520 | GICXXPred_Simple_IsRule150Enabled, |
1521 | GICXXPred_Simple_IsRule151Enabled, |
1522 | GICXXPred_Simple_IsRule152Enabled, |
1523 | GICXXPred_Simple_IsRule153Enabled, |
1524 | GICXXPred_Simple_IsRule154Enabled, |
1525 | GICXXPred_Simple_IsRule155Enabled, |
1526 | GICXXPred_Simple_IsRule156Enabled, |
1527 | GICXXPred_Simple_IsRule157Enabled, |
1528 | GICXXPred_Simple_IsRule158Enabled, |
1529 | GICXXPred_Simple_IsRule159Enabled, |
1530 | GICXXPred_Simple_IsRule160Enabled, |
1531 | GICXXPred_Simple_IsRule161Enabled, |
1532 | GICXXPred_Simple_IsRule162Enabled, |
1533 | GICXXPred_Simple_IsRule163Enabled, |
1534 | GICXXPred_Simple_IsRule164Enabled, |
1535 | GICXXPred_Simple_IsRule165Enabled, |
1536 | GICXXPred_Simple_IsRule166Enabled, |
1537 | GICXXPred_Simple_IsRule167Enabled, |
1538 | GICXXPred_Simple_IsRule168Enabled, |
1539 | GICXXPred_Simple_IsRule169Enabled, |
1540 | GICXXPred_Simple_IsRule170Enabled, |
1541 | GICXXPred_Simple_IsRule171Enabled, |
1542 | GICXXPred_Simple_IsRule172Enabled, |
1543 | GICXXPred_Simple_IsRule173Enabled, |
1544 | GICXXPred_Simple_IsRule174Enabled, |
1545 | GICXXPred_Simple_IsRule175Enabled, |
1546 | GICXXPred_Simple_IsRule176Enabled, |
1547 | GICXXPred_Simple_IsRule177Enabled, |
1548 | GICXXPred_Simple_IsRule178Enabled, |
1549 | GICXXPred_Simple_IsRule179Enabled, |
1550 | GICXXPred_Simple_IsRule180Enabled, |
1551 | GICXXPred_Simple_IsRule181Enabled, |
1552 | GICXXPred_Simple_IsRule182Enabled, |
1553 | GICXXPred_Simple_IsRule183Enabled, |
1554 | GICXXPred_Simple_IsRule184Enabled, |
1555 | GICXXPred_Simple_IsRule185Enabled, |
1556 | GICXXPred_Simple_IsRule186Enabled, |
1557 | GICXXPred_Simple_IsRule187Enabled, |
1558 | GICXXPred_Simple_IsRule188Enabled, |
1559 | GICXXPred_Simple_IsRule189Enabled, |
1560 | GICXXPred_Simple_IsRule190Enabled, |
1561 | }; |
1562 | |
1563 | bool AMDGPUPreLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const { |
1564 | return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1); |
1565 | } |
1566 | // Custom renderers. |
1567 | enum { |
1568 | GICR_Invalid, |
1569 | }; |
1570 | AMDGPUPreLegalizerCombinerImpl::CustomRendererFn |
1571 | AMDGPUPreLegalizerCombinerImpl::CustomRenderers[] = { |
1572 | nullptr, // GICR_Invalid |
1573 | }; |
1574 | |
1575 | bool AMDGPUPreLegalizerCombinerImpl::tryCombineAllImpl(MachineInstr &I) const { |
1576 | const TargetSubtargetInfo &ST = MF.getSubtarget(); |
1577 | const PredicateBitset AvailableFeatures = getAvailableFeatures(); |
1578 | B.setInstrAndDebugLoc(I); |
1579 | State.MIs.clear(); |
1580 | State.MIs.push_back(&I); |
1581 | if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, /*CoverageInfo*/ nullptr)) { |
1582 | return true; |
1583 | } |
1584 | |
1585 | return false; |
1586 | } |
1587 | |
1588 | enum { |
1589 | GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1, |
1590 | GICXXCustomAction_GICombiner1, |
1591 | GICXXCustomAction_GICombiner2, |
1592 | GICXXCustomAction_GICombiner3, |
1593 | GICXXCustomAction_GICombiner4, |
1594 | GICXXCustomAction_GICombiner5, |
1595 | GICXXCustomAction_GICombiner6, |
1596 | GICXXCustomAction_GICombiner7, |
1597 | GICXXCustomAction_GICombiner8, |
1598 | GICXXCustomAction_GICombiner9, |
1599 | GICXXCustomAction_GICombiner10, |
1600 | GICXXCustomAction_GICombiner11, |
1601 | GICXXCustomAction_GICombiner12, |
1602 | GICXXCustomAction_GICombiner13, |
1603 | GICXXCustomAction_GICombiner14, |
1604 | GICXXCustomAction_GICombiner15, |
1605 | GICXXCustomAction_GICombiner16, |
1606 | GICXXCustomAction_GICombiner17, |
1607 | GICXXCustomAction_GICombiner18, |
1608 | GICXXCustomAction_GICombiner19, |
1609 | GICXXCustomAction_GICombiner20, |
1610 | GICXXCustomAction_GICombiner21, |
1611 | GICXXCustomAction_GICombiner22, |
1612 | GICXXCustomAction_GICombiner23, |
1613 | GICXXCustomAction_GICombiner24, |
1614 | GICXXCustomAction_GICombiner25, |
1615 | GICXXCustomAction_GICombiner26, |
1616 | GICXXCustomAction_GICombiner27, |
1617 | GICXXCustomAction_GICombiner28, |
1618 | GICXXCustomAction_GICombiner29, |
1619 | GICXXCustomAction_GICombiner30, |
1620 | GICXXCustomAction_GICombiner31, |
1621 | GICXXCustomAction_GICombiner32, |
1622 | GICXXCustomAction_GICombiner33, |
1623 | GICXXCustomAction_GICombiner34, |
1624 | GICXXCustomAction_GICombiner35, |
1625 | GICXXCustomAction_GICombiner36, |
1626 | GICXXCustomAction_GICombiner37, |
1627 | GICXXCustomAction_GICombiner38, |
1628 | GICXXCustomAction_GICombiner39, |
1629 | GICXXCustomAction_GICombiner40, |
1630 | GICXXCustomAction_GICombiner41, |
1631 | GICXXCustomAction_GICombiner42, |
1632 | GICXXCustomAction_GICombiner43, |
1633 | GICXXCustomAction_GICombiner44, |
1634 | GICXXCustomAction_GICombiner45, |
1635 | GICXXCustomAction_GICombiner46, |
1636 | GICXXCustomAction_GICombiner47, |
1637 | GICXXCustomAction_GICombiner48, |
1638 | GICXXCustomAction_GICombiner49, |
1639 | GICXXCustomAction_GICombiner50, |
1640 | GICXXCustomAction_GICombiner51, |
1641 | GICXXCustomAction_GICombiner52, |
1642 | GICXXCustomAction_GICombiner53, |
1643 | GICXXCustomAction_GICombiner54, |
1644 | GICXXCustomAction_GICombiner55, |
1645 | GICXXCustomAction_GICombiner56, |
1646 | GICXXCustomAction_GICombiner57, |
1647 | GICXXCustomAction_GICombiner58, |
1648 | GICXXCustomAction_GICombiner59, |
1649 | GICXXCustomAction_GICombiner60, |
1650 | GICXXCustomAction_GICombiner61, |
1651 | GICXXCustomAction_GICombiner62, |
1652 | GICXXCustomAction_GICombiner63, |
1653 | GICXXCustomAction_GICombiner64, |
1654 | GICXXCustomAction_GICombiner65, |
1655 | GICXXCustomAction_GICombiner66, |
1656 | GICXXCustomAction_GICombiner67, |
1657 | GICXXCustomAction_GICombiner68, |
1658 | GICXXCustomAction_GICombiner69, |
1659 | GICXXCustomAction_GICombiner70, |
1660 | GICXXCustomAction_GICombiner71, |
1661 | GICXXCustomAction_GICombiner72, |
1662 | GICXXCustomAction_GICombiner73, |
1663 | GICXXCustomAction_GICombiner74, |
1664 | GICXXCustomAction_GICombiner75, |
1665 | GICXXCustomAction_GICombiner76, |
1666 | GICXXCustomAction_GICombiner77, |
1667 | GICXXCustomAction_GICombiner78, |
1668 | GICXXCustomAction_GICombiner79, |
1669 | GICXXCustomAction_GICombiner80, |
1670 | GICXXCustomAction_GICombiner81, |
1671 | GICXXCustomAction_GICombiner82, |
1672 | GICXXCustomAction_GICombiner83, |
1673 | GICXXCustomAction_GICombiner84, |
1674 | GICXXCustomAction_GICombiner85, |
1675 | GICXXCustomAction_GICombiner86, |
1676 | GICXXCustomAction_GICombiner87, |
1677 | GICXXCustomAction_GICombiner88, |
1678 | GICXXCustomAction_GICombiner89, |
1679 | GICXXCustomAction_GICombiner90, |
1680 | GICXXCustomAction_GICombiner91, |
1681 | GICXXCustomAction_GICombiner92, |
1682 | GICXXCustomAction_GICombiner93, |
1683 | GICXXCustomAction_GICombiner94, |
1684 | GICXXCustomAction_GICombiner95, |
1685 | GICXXCustomAction_GICombiner96, |
1686 | GICXXCustomAction_GICombiner97, |
1687 | GICXXCustomAction_GICombiner98, |
1688 | GICXXCustomAction_GICombiner99, |
1689 | GICXXCustomAction_GICombiner100, |
1690 | GICXXCustomAction_GICombiner101, |
1691 | GICXXCustomAction_GICombiner102, |
1692 | GICXXCustomAction_GICombiner103, |
1693 | GICXXCustomAction_GICombiner104, |
1694 | GICXXCustomAction_GICombiner105, |
1695 | GICXXCustomAction_GICombiner106, |
1696 | GICXXCustomAction_GICombiner107, |
1697 | GICXXCustomAction_GICombiner108, |
1698 | GICXXCustomAction_GICombiner109, |
1699 | GICXXCustomAction_GICombiner110, |
1700 | GICXXCustomAction_GICombiner111, |
1701 | GICXXCustomAction_GICombiner112, |
1702 | GICXXCustomAction_GICombiner113, |
1703 | GICXXCustomAction_GICombiner114, |
1704 | GICXXCustomAction_GICombiner115, |
1705 | GICXXCustomAction_GICombiner116, |
1706 | GICXXCustomAction_GICombiner117, |
1707 | GICXXCustomAction_GICombiner118, |
1708 | GICXXCustomAction_GICombiner119, |
1709 | GICXXCustomAction_GICombiner120, |
1710 | GICXXCustomAction_GICombiner121, |
1711 | GICXXCustomAction_GICombiner122, |
1712 | GICXXCustomAction_GICombiner123, |
1713 | GICXXCustomAction_GICombiner124, |
1714 | GICXXCustomAction_GICombiner125, |
1715 | GICXXCustomAction_GICombiner126, |
1716 | GICXXCustomAction_GICombiner127, |
1717 | GICXXCustomAction_GICombiner128, |
1718 | GICXXCustomAction_GICombiner129, |
1719 | GICXXCustomAction_GICombiner130, |
1720 | }; |
1721 | bool AMDGPUPreLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const { |
1722 | Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]); |
1723 | switch(ApplyID) { |
1724 | case GICXXCustomAction_GICombiner0:{ |
1725 | // Match Patterns |
1726 | if(![&](){return Helper.matchCombineCopy(*State.MIs[0]);}()) { |
1727 | return false; |
1728 | } |
1729 | // Apply Patterns |
1730 | Helper.applyCombineCopy(*State.MIs[0]); |
1731 | return true; |
1732 | } |
1733 | case GICXXCustomAction_GICombiner1:{ |
1734 | unsigned GIMatchData_matchinfo; |
1735 | // Match Patterns |
1736 | if(![&](){return Helper.matchCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1737 | return false; |
1738 | } |
1739 | // Apply Patterns |
1740 | Helper.applyCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo); |
1741 | return true; |
1742 | } |
1743 | case GICXXCustomAction_GICombiner2:{ |
1744 | std::pair<Register, bool> GIMatchData_info; |
1745 | // Match Patterns |
1746 | if(![&](){return Helper.matchCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info);}()) { |
1747 | return false; |
1748 | } |
1749 | // Apply Patterns |
1750 | Helper.applyCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info); |
1751 | return true; |
1752 | } |
1753 | case GICXXCustomAction_GICombiner3:{ |
1754 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1755 | // Match Patterns |
1756 | if(![&](){return Helper.matchExtractVectorElement(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1757 | return false; |
1758 | } |
1759 | // Apply Patterns |
1760 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
1761 | return true; |
1762 | } |
1763 | case GICXXCustomAction_GICombiner4:{ |
1764 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1765 | // Match Patterns |
1766 | if(![&](){return Helper.matchInsertVectorElementOOB(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1767 | return false; |
1768 | } |
1769 | // Apply Patterns |
1770 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
1771 | return true; |
1772 | } |
1773 | case GICXXCustomAction_GICombiner5:{ |
1774 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1775 | // Match Patterns |
1776 | if(![&](){return Helper.matchExtractVectorElementWithDifferentIndices(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1777 | return false; |
1778 | } |
1779 | // Apply Patterns |
1780 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1781 | return true; |
1782 | } |
1783 | case GICXXCustomAction_GICombiner6:{ |
1784 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1785 | // Match Patterns |
1786 | if(![&](){return Helper.matchExtractVectorElementWithBuildVector(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1787 | return false; |
1788 | } |
1789 | // Apply Patterns |
1790 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1791 | return true; |
1792 | } |
1793 | case GICXXCustomAction_GICombiner7:{ |
1794 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1795 | // Match Patterns |
1796 | if(![&](){return Helper.matchExtractVectorElementWithBuildVectorTrunc(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1797 | return false; |
1798 | } |
1799 | // Apply Patterns |
1800 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1801 | return true; |
1802 | } |
1803 | case GICXXCustomAction_GICombiner8:{ |
1804 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1805 | // Match Patterns |
1806 | if(![&](){return Helper.matchExtractVectorElementWithShuffleVector(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1807 | return false; |
1808 | } |
1809 | // Apply Patterns |
1810 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1811 | return true; |
1812 | } |
1813 | case GICXXCustomAction_GICombiner9:{ |
1814 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1815 | // Match Patterns |
1816 | if(![&](){return Helper.matchAddOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1817 | return false; |
1818 | } |
1819 | // Apply Patterns |
1820 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1821 | return true; |
1822 | } |
1823 | case GICXXCustomAction_GICombiner10:{ |
1824 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1825 | // Match Patterns |
1826 | if(![&](){return Helper.matchMulOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1827 | return false; |
1828 | } |
1829 | // Apply Patterns |
1830 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1831 | return true; |
1832 | } |
1833 | case GICXXCustomAction_GICombiner11:{ |
1834 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1835 | // Match Patterns |
1836 | if(![&](){return Helper.matchShlOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1837 | return false; |
1838 | } |
1839 | // Apply Patterns |
1840 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1841 | return true; |
1842 | } |
1843 | case GICXXCustomAction_GICombiner12:{ |
1844 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1845 | // Match Patterns |
1846 | if(![&](){return Helper.matchSubOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
1847 | return false; |
1848 | } |
1849 | // Apply Patterns |
1850 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
1851 | return true; |
1852 | } |
1853 | case GICXXCustomAction_GICombiner13:{ |
1854 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1855 | // Match Patterns |
1856 | if(![&](){return !isGuaranteedNotToBePoison(State.MIs[0]->getOperand(1).getReg(), MRI) && Helper.matchFreezeOfSingleMaybePoisonOperand(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1857 | return false; |
1858 | } |
1859 | // Apply Patterns |
1860 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
1861 | return true; |
1862 | } |
1863 | case GICXXCustomAction_GICombiner14:{ |
1864 | SmallVector<Register, 4> GIMatchData_info; |
1865 | // Match Patterns |
1866 | if(![&](){return Helper.matchCombineInsertVecElts(*State.MIs[0], GIMatchData_info);}()) { |
1867 | return false; |
1868 | } |
1869 | // Apply Patterns |
1870 | Helper.applyCombineInsertVecElts(*State.MIs[0], GIMatchData_info); |
1871 | return true; |
1872 | } |
1873 | case GICXXCustomAction_GICombiner15:{ |
1874 | Register GIMatchData_matchinfo; |
1875 | // Match Patterns |
1876 | if(![&](){return Helper.matchExtractVecEltBuildVec(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1877 | return false; |
1878 | } |
1879 | // Apply Patterns |
1880 | Helper.applyExtractVecEltBuildVec(*State.MIs[0], GIMatchData_matchinfo); |
1881 | return true; |
1882 | } |
1883 | case GICXXCustomAction_GICombiner16:{ |
1884 | SmallVector<std::pair<Register, MachineInstr*>> GIMatchData_matchinfo; |
1885 | // Match Patterns |
1886 | if(![&](){return Helper.matchExtractAllEltsFromBuildVector(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1887 | return false; |
1888 | } |
1889 | // Apply Patterns |
1890 | Helper.applyExtractAllEltsFromBuildVector(*State.MIs[0], GIMatchData_matchinfo); |
1891 | return true; |
1892 | } |
1893 | case GICXXCustomAction_GICombiner17:{ |
1894 | PreferredTuple GIMatchData_matchinfo; |
1895 | // Match Patterns |
1896 | if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1897 | return false; |
1898 | } |
1899 | // Apply Patterns |
1900 | Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo); |
1901 | return true; |
1902 | } |
1903 | case GICXXCustomAction_GICombiner18:{ |
1904 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1905 | // Match Patterns |
1906 | if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1907 | return false; |
1908 | } |
1909 | // Apply Patterns |
1910 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
1911 | return true; |
1912 | } |
1913 | case GICXXCustomAction_GICombiner19:{ |
1914 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
1915 | // Match Patterns |
1916 | if(![&](){return Helper.matchCombineExtractedVectorLoad(*State.MIs[0], GIMatchData_matchinfo);}()) { |
1917 | return false; |
1918 | } |
1919 | // Apply Patterns |
1920 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
1921 | return true; |
1922 | } |
1923 | case GICXXCustomAction_GICombiner20:{ |
1924 | // Match Patterns |
1925 | if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) { |
1926 | return false; |
1927 | } |
1928 | // Apply Patterns |
1929 | Helper.replaceInstWithFConstant(*State.MIs[0], 0.0); |
1930 | return true; |
1931 | } |
1932 | case GICXXCustomAction_GICombiner21:{ |
1933 | // Match Patterns |
1934 | if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) { |
1935 | return false; |
1936 | } |
1937 | // Apply Patterns |
1938 | Helper.replaceInstWithConstant(*State.MIs[0], 0); |
1939 | return true; |
1940 | } |
1941 | case GICXXCustomAction_GICombiner22:{ |
1942 | // Match Patterns |
1943 | if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) { |
1944 | return false; |
1945 | } |
1946 | // Apply Patterns |
1947 | Helper.replaceInstWithConstant(*State.MIs[0], -1); |
1948 | return true; |
1949 | } |
1950 | case GICXXCustomAction_GICombiner23:{ |
1951 | // Match Patterns |
1952 | if(![&](){return Helper.matchOperandIsUndef(*State.MIs[0], 1);}()) { |
1953 | return false; |
1954 | } |
1955 | // Apply Patterns |
1956 | Helper.replaceInstWithConstant(*State.MIs[0], 0); |
1957 | return true; |
1958 | } |
1959 | case GICXXCustomAction_GICombiner24:{ |
1960 | // Match Patterns |
1961 | if(![&](){return Helper.matchOperandIsUndef(*State.MIs[0], 2);}()) { |
1962 | return false; |
1963 | } |
1964 | // Apply Patterns |
1965 | Helper.replaceInstWithUndef(*State.MIs[0]); |
1966 | return true; |
1967 | } |
1968 | case GICXXCustomAction_GICombiner25:{ |
1969 | // Match Patterns |
1970 | if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) { |
1971 | return false; |
1972 | } |
1973 | // Apply Patterns |
1974 | Helper.replaceInstWithUndef(*State.MIs[0]); |
1975 | return true; |
1976 | } |
1977 | case GICXXCustomAction_GICombiner26:{ |
1978 | // Match Patterns |
1979 | if(![&](){return Helper.matchAllExplicitUsesAreUndef(*State.MIs[0]);}()) { |
1980 | return false; |
1981 | } |
1982 | // Apply Patterns |
1983 | Helper.replaceInstWithUndef(*State.MIs[0]); |
1984 | return true; |
1985 | } |
1986 | case GICXXCustomAction_GICombiner27:{ |
1987 | // Match Patterns |
1988 | if(![&](){return Helper.matchUndefShuffleVectorMask(*State.MIs[0]);}()) { |
1989 | return false; |
1990 | } |
1991 | // Apply Patterns |
1992 | Helper.replaceInstWithUndef(*State.MIs[0]); |
1993 | return true; |
1994 | } |
1995 | case GICXXCustomAction_GICombiner28:{ |
1996 | // Match Patterns |
1997 | if(![&](){return Helper.matchUndefStore(*State.MIs[0]);}()) { |
1998 | return false; |
1999 | } |
2000 | // Apply Patterns |
2001 | Helper.eraseInst(*State.MIs[0]); |
2002 | return true; |
2003 | } |
2004 | case GICXXCustomAction_GICombiner29:{ |
2005 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2006 | // Match Patterns |
2007 | if(![&](){return Helper.matchCombineUnmergeUndef(*State.MIs[0], GIMatchData_info);}()) { |
2008 | return false; |
2009 | } |
2010 | // Apply Patterns |
2011 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2012 | return true; |
2013 | } |
2014 | case GICXXCustomAction_GICombiner30:{ |
2015 | // Match Patterns |
2016 | if(![&](){return Helper.matchInsertExtractVecEltOutOfBounds(*State.MIs[0]);}()) { |
2017 | return false; |
2018 | } |
2019 | // Apply Patterns |
2020 | Helper.replaceInstWithUndef(*State.MIs[0]); |
2021 | return true; |
2022 | } |
2023 | case GICXXCustomAction_GICombiner31:{ |
2024 | // Match Patterns |
2025 | if(![&](){return Helper.matchSelectSameVal(*State.MIs[0]);}()) { |
2026 | return false; |
2027 | } |
2028 | // Apply Patterns |
2029 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 2); |
2030 | return true; |
2031 | } |
2032 | case GICXXCustomAction_GICombiner32:{ |
2033 | // Match Patterns |
2034 | if(![&](){return Helper.matchOperandIsZero(*State.MIs[0], 1);}()) { |
2035 | return false; |
2036 | } |
2037 | // Apply Patterns |
2038 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 1); |
2039 | return true; |
2040 | } |
2041 | case GICXXCustomAction_GICombiner33:{ |
2042 | Register GIMatchData_info; |
2043 | // Match Patterns |
2044 | if(![&](){return Helper.matchCombineI2PToP2I(*State.MIs[0], GIMatchData_info);}()) { |
2045 | return false; |
2046 | } |
2047 | // Apply Patterns |
2048 | Helper.applyCombineI2PToP2I(*State.MIs[0], GIMatchData_info); |
2049 | return true; |
2050 | } |
2051 | case GICXXCustomAction_GICombiner34:{ |
2052 | Register GIMatchData_info; |
2053 | // Match Patterns |
2054 | if(![&](){GIMatchData_info = State.MIs[1]->getOperand(1).getReg(); return true;}()) { |
2055 | return false; |
2056 | } |
2057 | // Apply Patterns |
2058 | Helper.applyCombineP2IToI2P(*State.MIs[0], GIMatchData_info); |
2059 | return true; |
2060 | } |
2061 | case GICXXCustomAction_GICombiner35:{ |
2062 | Register GIMatchData_matchinfo; |
2063 | // Match Patterns |
2064 | if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2065 | return false; |
2066 | } |
2067 | // Apply Patterns |
2068 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2069 | return true; |
2070 | } |
2071 | case GICXXCustomAction_GICombiner36:{ |
2072 | Register GIMatchData_matchinfo; |
2073 | // Match Patterns |
2074 | if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2075 | return false; |
2076 | } |
2077 | // Apply Patterns |
2078 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2079 | return true; |
2080 | } |
2081 | case GICXXCustomAction_GICombiner37:{ |
2082 | Register GIMatchData_matchinfo; |
2083 | // Match Patterns |
2084 | if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2085 | return false; |
2086 | } |
2087 | // Apply Patterns |
2088 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2089 | return true; |
2090 | } |
2091 | case GICXXCustomAction_GICombiner38:{ |
2092 | Register GIMatchData_matchinfo; |
2093 | // Match Patterns |
2094 | if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2095 | return false; |
2096 | } |
2097 | // Apply Patterns |
2098 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2099 | return true; |
2100 | } |
2101 | case GICXXCustomAction_GICombiner39:{ |
2102 | // Match Patterns |
2103 | if(![&](){return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());}()) { |
2104 | return false; |
2105 | } |
2106 | // Apply Patterns |
2107 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], State.MIs[1]->getOperand(1).getReg()); |
2108 | return true; |
2109 | } |
2110 | case GICXXCustomAction_GICombiner40:{ |
2111 | MachineInstr* GIMatchData_matchinfo; |
2112 | // Match Patterns |
2113 | if(![&](){return Helper.matchExtendThroughPhis(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2114 | return false; |
2115 | } |
2116 | // Apply Patterns |
2117 | Helper.applyExtendThroughPhis(*State.MIs[0], GIMatchData_matchinfo); |
2118 | return true; |
2119 | } |
2120 | case GICXXCustomAction_GICombiner41:{ |
2121 | std::tuple<Register, Register> GIMatchData_info; |
2122 | // Match Patterns |
2123 | if(![&](){return Helper.matchSimplifyAddToSub(*State.MIs[0], GIMatchData_info);}()) { |
2124 | return false; |
2125 | } |
2126 | // Apply Patterns |
2127 | Helper.applySimplifyAddToSub(*State.MIs[0], GIMatchData_info); |
2128 | return true; |
2129 | } |
2130 | case GICXXCustomAction_GICombiner42:{ |
2131 | InstructionStepsMatchInfo GIMatchData_info; |
2132 | // Match Patterns |
2133 | if(![&](){return Helper.matchHoistLogicOpWithSameOpcodeHands(*State.MIs[0], GIMatchData_info);}()) { |
2134 | return false; |
2135 | } |
2136 | // Apply Patterns |
2137 | Helper.applyBuildInstructionSteps(*State.MIs[0], GIMatchData_info); |
2138 | return true; |
2139 | } |
2140 | case GICXXCustomAction_GICombiner43:{ |
2141 | // Match Patterns |
2142 | if(![&](){return Helper.matchShiftsTooBig(*State.MIs[0]);}()) { |
2143 | return false; |
2144 | } |
2145 | // Apply Patterns |
2146 | Helper.replaceInstWithUndef(*State.MIs[0]); |
2147 | return true; |
2148 | } |
2149 | case GICXXCustomAction_GICombiner44:{ |
2150 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2151 | // Match Patterns |
2152 | if(![&](){return Helper.matchReassocPtrAdd(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2153 | return false; |
2154 | } |
2155 | // Apply Patterns |
2156 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo); |
2157 | return true; |
2158 | } |
2159 | case GICXXCustomAction_GICombiner45:{ |
2160 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2161 | // Match Patterns |
2162 | if(![&](){return Helper.matchReassocCommBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2163 | return false; |
2164 | } |
2165 | // Apply Patterns |
2166 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2167 | return true; |
2168 | } |
2169 | case GICXXCustomAction_GICombiner46:{ |
2170 | PtrAddChain GIMatchData_matchinfo; |
2171 | // Match Patterns |
2172 | if(![&](){return Helper.matchPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2173 | return false; |
2174 | } |
2175 | // Apply Patterns |
2176 | Helper.applyPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo); |
2177 | return true; |
2178 | } |
2179 | case GICXXCustomAction_GICombiner47:{ |
2180 | std::tuple<Register, int64_t> GIMatchData_info; |
2181 | // Match Patterns |
2182 | if(![&](){return Helper.matchAshrShlToSextInreg(*State.MIs[0], GIMatchData_info);}()) { |
2183 | return false; |
2184 | } |
2185 | // Apply Patterns |
2186 | Helper.applyAshShlToSextInreg(*State.MIs[0], GIMatchData_info); |
2187 | return true; |
2188 | } |
2189 | case GICXXCustomAction_GICombiner48:{ |
2190 | std::tuple<Register, unsigned> GIMatchData_matchinfo; |
2191 | // Match Patterns |
2192 | if(![&](){return Helper.matchSextInRegOfLoad(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2193 | return false; |
2194 | } |
2195 | // Apply Patterns |
2196 | Helper.applySextInRegOfLoad(*State.MIs[0], GIMatchData_matchinfo); |
2197 | return true; |
2198 | } |
2199 | case GICXXCustomAction_GICombiner49:{ |
2200 | RegisterImmPair GIMatchData_matchinfo; |
2201 | // Match Patterns |
2202 | if(![&](){return Helper.matchCombineShlOfExtend(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2203 | return false; |
2204 | } |
2205 | // Apply Patterns |
2206 | Helper.applyCombineShlOfExtend(*State.MIs[0], GIMatchData_matchinfo); |
2207 | return true; |
2208 | } |
2209 | case GICXXCustomAction_GICombiner50:{ |
2210 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2211 | // Match Patterns |
2212 | if(![&](){return Helper.matchNarrowBinopFeedingAnd(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2213 | return false; |
2214 | } |
2215 | // Apply Patterns |
2216 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo); |
2217 | return true; |
2218 | } |
2219 | case GICXXCustomAction_GICombiner51:{ |
2220 | unsigned GIMatchData_matchinfo; |
2221 | // Match Patterns |
2222 | if(![&](){return Helper.matchConstantSelectCmp(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2223 | return false; |
2224 | } |
2225 | // Apply Patterns |
2226 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], GIMatchData_matchinfo); |
2227 | return true; |
2228 | } |
2229 | case GICXXCustomAction_GICombiner52:{ |
2230 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2231 | // Match Patterns |
2232 | if(![&](){return Helper.matchSelectIMinMax(State.MIs[0]->getOperand(0), GIMatchData_info);}()) { |
2233 | return false; |
2234 | } |
2235 | // Apply Patterns |
2236 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_info); |
2237 | return true; |
2238 | } |
2239 | case GICXXCustomAction_GICombiner53:{ |
2240 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2241 | // Match Patterns |
2242 | if(![&](){return Helper.matchSelect(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2243 | return false; |
2244 | } |
2245 | // Apply Patterns |
2246 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2247 | return true; |
2248 | } |
2249 | case GICXXCustomAction_GICombiner54:{ |
2250 | Register GIMatchData_matchinfo; |
2251 | // Match Patterns |
2252 | if(![&](){return Helper.matchRedundantAnd(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2253 | return false; |
2254 | } |
2255 | // Apply Patterns |
2256 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2257 | return true; |
2258 | } |
2259 | case GICXXCustomAction_GICombiner55:{ |
2260 | // Match Patterns |
2261 | if(![&](){return Helper.matchRedundantSExtInReg(*State.MIs[0]);}()) { |
2262 | return false; |
2263 | } |
2264 | // Apply Patterns |
2265 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 1); |
2266 | return true; |
2267 | } |
2268 | case GICXXCustomAction_GICombiner56:{ |
2269 | Register GIMatchData_matchinfo; |
2270 | // Match Patterns |
2271 | if(![&](){return Helper.matchRedundantOr(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2272 | return false; |
2273 | } |
2274 | // Apply Patterns |
2275 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2276 | return true; |
2277 | } |
2278 | case GICXXCustomAction_GICombiner57:{ |
2279 | // Match Patterns |
2280 | if(![&](){return Helper.matchOperandIsKnownToBeAPowerOfTwo(*State.MIs[0], 2);}()) { |
2281 | return false; |
2282 | } |
2283 | // Apply Patterns |
2284 | Helper.applySimplifyURemByPow2(*State.MIs[0]); |
2285 | return true; |
2286 | } |
2287 | case GICXXCustomAction_GICombiner58:{ |
2288 | Register GIMatchData_matchinfo; |
2289 | // Match Patterns |
2290 | if(![&](){return Helper.matchCombineZextTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2291 | return false; |
2292 | } |
2293 | // Apply Patterns |
2294 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2295 | return true; |
2296 | } |
2297 | case GICXXCustomAction_GICombiner59:{ |
2298 | int64_t GIMatchData_matchinfo; |
2299 | // Match Patterns |
2300 | if(![&](){return Helper.matchICmpToTrueFalseKnownBits(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2301 | return false; |
2302 | } |
2303 | // Apply Patterns |
2304 | Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo); |
2305 | return true; |
2306 | } |
2307 | case GICXXCustomAction_GICombiner60:{ |
2308 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2309 | // Match Patterns |
2310 | if(![&](){return Helper.matchICmpToLHSKnownBits(*State.MIs[0], GIMatchData_info);}()) { |
2311 | return false; |
2312 | } |
2313 | // Apply Patterns |
2314 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2315 | return true; |
2316 | } |
2317 | case GICXXCustomAction_GICombiner61:{ |
2318 | // Match Patterns |
2319 | if(![&](){unsigned BitWidth = MRI.getType(State.MIs[0]->getOperand(1).getReg()).getScalarSizeInBits(); |
2320 | return Helper.getKnownBits()->maskedValueIsZero(State.MIs[0]->getOperand(1).getReg(), |
2321 | APInt::getOneBitSet(BitWidth, State.MIs[0]->getOperand(2).getImm() - 1));}()) { |
2322 | return false; |
2323 | } |
2324 | // Apply Patterns |
2325 | Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]); |
2326 | Helper.getBuilder().buildZExtInReg(State.MIs[0]->getOperand(0), State.MIs[0]->getOperand(1), State.MIs[0]->getOperand(2).getImm()); |
2327 | State.MIs[0]->eraseFromParent(); |
2328 | return true; |
2329 | } |
2330 | case GICXXCustomAction_GICombiner62:{ |
2331 | std::tuple<Register, unsigned> GIMatchData_matchinfo; |
2332 | // Match Patterns |
2333 | if(![&](){return Helper.matchCombineExtOfExt(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2334 | return false; |
2335 | } |
2336 | // Apply Patterns |
2337 | Helper.applyCombineExtOfExt(*State.MIs[0], GIMatchData_matchinfo); |
2338 | return true; |
2339 | } |
2340 | case GICXXCustomAction_GICombiner63:{ |
2341 | SmallVector<Register, 4> GIMatchData_info; |
2342 | // Match Patterns |
2343 | if(![&](){return Helper.matchNotCmp(*State.MIs[0], GIMatchData_info);}()) { |
2344 | return false; |
2345 | } |
2346 | // Apply Patterns |
2347 | Helper.applyNotCmp(*State.MIs[0], GIMatchData_info); |
2348 | return true; |
2349 | } |
2350 | case GICXXCustomAction_GICombiner64:{ |
2351 | MachineInstr * GIMatchData_matchinfo; |
2352 | // Match Patterns |
2353 | if(![&](){return Helper.matchOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2354 | return false; |
2355 | } |
2356 | // Apply Patterns |
2357 | Helper.applyOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo); |
2358 | return true; |
2359 | } |
2360 | case GICXXCustomAction_GICombiner65:{ |
2361 | SmallVector<Register, 8> GIMatchData_info; |
2362 | // Match Patterns |
2363 | if(![&](){return Helper.matchCombineUnmergeMergeToPlainValues(*State.MIs[0], GIMatchData_info);}()) { |
2364 | return false; |
2365 | } |
2366 | // Apply Patterns |
2367 | Helper.applyCombineUnmergeMergeToPlainValues(*State.MIs[0], GIMatchData_info); |
2368 | return true; |
2369 | } |
2370 | case GICXXCustomAction_GICombiner66:{ |
2371 | SmallVector<APInt, 8> GIMatchData_info; |
2372 | // Match Patterns |
2373 | if(![&](){return Helper.matchCombineUnmergeConstant(*State.MIs[0], GIMatchData_info);}()) { |
2374 | return false; |
2375 | } |
2376 | // Apply Patterns |
2377 | Helper.applyCombineUnmergeConstant(*State.MIs[0], GIMatchData_info); |
2378 | return true; |
2379 | } |
2380 | case GICXXCustomAction_GICombiner67:{ |
2381 | // Match Patterns |
2382 | if(![&](){return Helper.matchCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]);}()) { |
2383 | return false; |
2384 | } |
2385 | // Apply Patterns |
2386 | Helper.applyCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]); |
2387 | return true; |
2388 | } |
2389 | case GICXXCustomAction_GICombiner68:{ |
2390 | // Match Patterns |
2391 | if(![&](){return Helper.matchCombineUnmergeZExtToZExt(*State.MIs[0]);}()) { |
2392 | return false; |
2393 | } |
2394 | // Apply Patterns |
2395 | Helper.applyCombineUnmergeZExtToZExt(*State.MIs[0]); |
2396 | return true; |
2397 | } |
2398 | case GICXXCustomAction_GICombiner69:{ |
2399 | Register GIMatchData_matchinfo; |
2400 | // Match Patterns |
2401 | if(![&](){return Helper.matchCombineMergeUnmerge(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2402 | return false; |
2403 | } |
2404 | // Apply Patterns |
2405 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
2406 | return true; |
2407 | } |
2408 | case GICXXCustomAction_GICombiner70:{ |
2409 | std::pair<Register, unsigned> GIMatchData_matchinfo; |
2410 | // Match Patterns |
2411 | if(![&](){return Helper.matchCombineTruncOfExt(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2412 | return false; |
2413 | } |
2414 | // Apply Patterns |
2415 | Helper.applyCombineTruncOfExt(*State.MIs[0], GIMatchData_matchinfo); |
2416 | return true; |
2417 | } |
2418 | case GICXXCustomAction_GICombiner71:{ |
2419 | std::pair<MachineInstr*, LLT> GIMatchData_matchinfo; |
2420 | // Match Patterns |
2421 | if(![&](){return Helper.matchCombineTruncOfShift(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2422 | return false; |
2423 | } |
2424 | // Apply Patterns |
2425 | Helper.applyCombineTruncOfShift(*State.MIs[0], GIMatchData_matchinfo); |
2426 | return true; |
2427 | } |
2428 | case GICXXCustomAction_GICombiner72:{ |
2429 | // Apply Patterns |
2430 | Helper.applyCombineConstantFoldFpUnary(*State.MIs[0], State.MIs[1]->getOperand(1).getFPImm()); |
2431 | return true; |
2432 | } |
2433 | case GICXXCustomAction_GICombiner73:{ |
2434 | // Apply Patterns |
2435 | Helper.replaceInstWithFConstant(*State.MIs[0]->getOperand(0).getParent(), 0.0); |
2436 | return true; |
2437 | } |
2438 | case GICXXCustomAction_GICombiner74:{ |
2439 | APInt GIMatchData_info; |
2440 | // Match Patterns |
2441 | if(![&](){return Helper.matchCombineConstPtrAddToI2P(*State.MIs[0], GIMatchData_info);}()) { |
2442 | return false; |
2443 | } |
2444 | // Apply Patterns |
2445 | Helper.applyCombineConstPtrAddToI2P(*State.MIs[0], GIMatchData_info); |
2446 | return true; |
2447 | } |
2448 | case GICXXCustomAction_GICombiner75:{ |
2449 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2450 | // Match Patterns |
2451 | if(![&](){return Helper.matchOverlappingAnd(*State.MIs[0], GIMatchData_info);}()) { |
2452 | return false; |
2453 | } |
2454 | // Apply Patterns |
2455 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2456 | return true; |
2457 | } |
2458 | case GICXXCustomAction_GICombiner76:{ |
2459 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2460 | // Match Patterns |
2461 | if(![&](){return Helper.matchMulOBy2(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2462 | return false; |
2463 | } |
2464 | // Apply Patterns |
2465 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo); |
2466 | return true; |
2467 | } |
2468 | case GICXXCustomAction_GICombiner77:{ |
2469 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2470 | // Match Patterns |
2471 | if(![&](){return Helper.matchMulOBy0(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2472 | return false; |
2473 | } |
2474 | // Apply Patterns |
2475 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2476 | return true; |
2477 | } |
2478 | case GICXXCustomAction_GICombiner78:{ |
2479 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2480 | // Match Patterns |
2481 | if(![&](){return Helper.matchAddEToAddO(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2482 | return false; |
2483 | } |
2484 | // Apply Patterns |
2485 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo); |
2486 | return true; |
2487 | } |
2488 | case GICXXCustomAction_GICombiner79:{ |
2489 | unsigned GIMatchData_info; |
2490 | // Match Patterns |
2491 | if(![&](){return Helper.matchCombineFMinMaxNaN(*State.MIs[0], GIMatchData_info);}()) { |
2492 | return false; |
2493 | } |
2494 | // Apply Patterns |
2495 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], GIMatchData_info); |
2496 | return true; |
2497 | } |
2498 | case GICXXCustomAction_GICombiner80:{ |
2499 | // Match Patterns |
2500 | if(![&](){return Helper.matchFPowIExpansion(*State.MIs[0], State.MIs[1]->getOperand(1).getCImm()->getSExtValue());}()) { |
2501 | return false; |
2502 | } |
2503 | // Apply Patterns |
2504 | Helper.applyExpandFPowI(*State.MIs[0], State.MIs[1]->getOperand(1).getCImm()->getSExtValue()); |
2505 | return true; |
2506 | } |
2507 | case GICXXCustomAction_GICombiner81:{ |
2508 | std::pair<Register, Register> GIMatchData_matchinfo; |
2509 | // Match Patterns |
2510 | if(![&](){return Helper.matchXorOfAndWithSameReg(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2511 | return false; |
2512 | } |
2513 | // Apply Patterns |
2514 | Helper.applyXorOfAndWithSameReg(*State.MIs[0], GIMatchData_matchinfo); |
2515 | return true; |
2516 | } |
2517 | case GICXXCustomAction_GICombiner82:{ |
2518 | // Match Patterns |
2519 | if(![&](){return Helper.matchPtrAddZero(*State.MIs[0]);}()) { |
2520 | return false; |
2521 | } |
2522 | // Apply Patterns |
2523 | Helper.applyPtrAddZero(*State.MIs[0]); |
2524 | return true; |
2525 | } |
2526 | case GICXXCustomAction_GICombiner83:{ |
2527 | RegisterImmPair GIMatchData_matchinfo; |
2528 | // Match Patterns |
2529 | if(![&](){return Helper.matchShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2530 | return false; |
2531 | } |
2532 | // Apply Patterns |
2533 | Helper.applyShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo); |
2534 | return true; |
2535 | } |
2536 | case GICXXCustomAction_GICombiner84:{ |
2537 | ShiftOfShiftedLogic GIMatchData_matchinfo; |
2538 | // Match Patterns |
2539 | if(![&](){return Helper.matchShiftOfShiftedLogic(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2540 | return false; |
2541 | } |
2542 | // Apply Patterns |
2543 | Helper.applyShiftOfShiftedLogic(*State.MIs[0], GIMatchData_matchinfo); |
2544 | return true; |
2545 | } |
2546 | case GICXXCustomAction_GICombiner85:{ |
2547 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2548 | // Match Patterns |
2549 | if(![&](){return Helper.matchLoadOrCombine(*State.MIs[0], GIMatchData_info);}()) { |
2550 | return false; |
2551 | } |
2552 | // Apply Patterns |
2553 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2554 | return true; |
2555 | } |
2556 | case GICXXCustomAction_GICombiner86:{ |
2557 | MachineInstr * GIMatchData_matchinfo; |
2558 | // Match Patterns |
2559 | if(![&](){return Helper.matchCombineDivRem(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2560 | return false; |
2561 | } |
2562 | // Apply Patterns |
2563 | Helper.applyCombineDivRem(*State.MIs[0], GIMatchData_matchinfo); |
2564 | return true; |
2565 | } |
2566 | case GICXXCustomAction_GICombiner87:{ |
2567 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2568 | // Match Patterns |
2569 | if(![&](){return Helper.matchOrShiftToFunnelShift(*State.MIs[0], GIMatchData_info);}()) { |
2570 | return false; |
2571 | } |
2572 | // Apply Patterns |
2573 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2574 | return true; |
2575 | } |
2576 | case GICXXCustomAction_GICombiner88:{ |
2577 | // Match Patterns |
2578 | if(![&](){return Helper.matchFunnelShiftToRotate(*State.MIs[0]);}()) { |
2579 | return false; |
2580 | } |
2581 | // Apply Patterns |
2582 | Helper.applyFunnelShiftToRotate(*State.MIs[0]); |
2583 | return true; |
2584 | } |
2585 | case GICXXCustomAction_GICombiner89:{ |
2586 | // Match Patterns |
2587 | if(![&](){return Helper.matchConstantLargerBitWidth(*State.MIs[0], 3);}()) { |
2588 | return false; |
2589 | } |
2590 | // Apply Patterns |
2591 | Helper.applyFunnelShiftConstantModulo(*State.MIs[0]); |
2592 | return true; |
2593 | } |
2594 | case GICXXCustomAction_GICombiner90:{ |
2595 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2596 | // Match Patterns |
2597 | if(![&](){return Helper.matchCommuteShift(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2598 | return false; |
2599 | } |
2600 | // Apply Patterns |
2601 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2602 | return true; |
2603 | } |
2604 | case GICXXCustomAction_GICombiner91:{ |
2605 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2606 | // Match Patterns |
2607 | if(![&](){return Helper.matchBitfieldExtractFromSExtInReg(*State.MIs[0], GIMatchData_info);}()) { |
2608 | return false; |
2609 | } |
2610 | // Apply Patterns |
2611 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2612 | return true; |
2613 | } |
2614 | case GICXXCustomAction_GICombiner92:{ |
2615 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2616 | // Match Patterns |
2617 | if(![&](){return Helper.matchBitfieldExtractFromAnd(*State.MIs[0], GIMatchData_info);}()) { |
2618 | return false; |
2619 | } |
2620 | // Apply Patterns |
2621 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2622 | return true; |
2623 | } |
2624 | case GICXXCustomAction_GICombiner93:{ |
2625 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2626 | // Match Patterns |
2627 | if(![&](){return Helper.matchBitfieldExtractFromShr(*State.MIs[0], GIMatchData_info);}()) { |
2628 | return false; |
2629 | } |
2630 | // Apply Patterns |
2631 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2632 | return true; |
2633 | } |
2634 | case GICXXCustomAction_GICombiner94:{ |
2635 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2636 | // Match Patterns |
2637 | if(![&](){return Helper.matchBitfieldExtractFromShrAnd(*State.MIs[0], GIMatchData_info);}()) { |
2638 | return false; |
2639 | } |
2640 | // Apply Patterns |
2641 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2642 | return true; |
2643 | } |
2644 | case GICXXCustomAction_GICombiner95:{ |
2645 | APInt GIMatchData_matchinfo; |
2646 | // Match Patterns |
2647 | if(![&](){return Helper.matchConstantFoldBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2648 | return false; |
2649 | } |
2650 | // Apply Patterns |
2651 | Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo); |
2652 | return true; |
2653 | } |
2654 | case GICXXCustomAction_GICombiner96:{ |
2655 | ConstantFP* GIMatchData_matchinfo; |
2656 | // Match Patterns |
2657 | if(![&](){return Helper.matchConstantFoldFPBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2658 | return false; |
2659 | } |
2660 | // Apply Patterns |
2661 | Helper.replaceInstWithFConstant(*State.MIs[0], GIMatchData_matchinfo); |
2662 | return true; |
2663 | } |
2664 | case GICXXCustomAction_GICombiner97:{ |
2665 | ConstantFP* GIMatchData_matchinfo; |
2666 | // Match Patterns |
2667 | if(![&](){return Helper.matchConstantFoldFMA(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2668 | return false; |
2669 | } |
2670 | // Apply Patterns |
2671 | Helper.replaceInstWithFConstant(*State.MIs[0], GIMatchData_matchinfo); |
2672 | return true; |
2673 | } |
2674 | case GICXXCustomAction_GICombiner98:{ |
2675 | APInt GIMatchData_matchinfo; |
2676 | // Match Patterns |
2677 | if(![&](){return Helper.matchConstantFoldCastOp(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2678 | return false; |
2679 | } |
2680 | // Apply Patterns |
2681 | Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo); |
2682 | return true; |
2683 | } |
2684 | case GICXXCustomAction_GICombiner99:{ |
2685 | // Match Patterns |
2686 | if(![&](){return Helper.matchUDivByConst(*State.MIs[0]);}()) { |
2687 | return false; |
2688 | } |
2689 | // Apply Patterns |
2690 | Helper.applyUDivByConst(*State.MIs[0]); |
2691 | return true; |
2692 | } |
2693 | case GICXXCustomAction_GICombiner100:{ |
2694 | // Match Patterns |
2695 | if(![&](){return Helper.matchSDivByConst(*State.MIs[0]);}()) { |
2696 | return false; |
2697 | } |
2698 | // Apply Patterns |
2699 | Helper.applySDivByConst(*State.MIs[0]); |
2700 | return true; |
2701 | } |
2702 | case GICXXCustomAction_GICombiner101:{ |
2703 | // Match Patterns |
2704 | if(![&](){return Helper.matchDivByPow2(*State.MIs[0], /*IsSigned=*/true);}()) { |
2705 | return false; |
2706 | } |
2707 | // Apply Patterns |
2708 | Helper.applySDivByPow2(*State.MIs[0]); |
2709 | return true; |
2710 | } |
2711 | case GICXXCustomAction_GICombiner102:{ |
2712 | // Match Patterns |
2713 | if(![&](){return Helper.matchDivByPow2(*State.MIs[0], /*IsSigned=*/false);}()) { |
2714 | return false; |
2715 | } |
2716 | // Apply Patterns |
2717 | Helper.applyUDivByPow2(*State.MIs[0]); |
2718 | return true; |
2719 | } |
2720 | case GICXXCustomAction_GICombiner103:{ |
2721 | // Match Patterns |
2722 | if(![&](){return Helper.matchUMulHToLShr(*State.MIs[0]);}()) { |
2723 | return false; |
2724 | } |
2725 | // Apply Patterns |
2726 | Helper.applyUMulHToLShr(*State.MIs[0]); |
2727 | return true; |
2728 | } |
2729 | case GICXXCustomAction_GICombiner104:{ |
2730 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2731 | // Match Patterns |
2732 | if(![&](){return Helper.matchRedundantNegOperands(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2733 | return false; |
2734 | } |
2735 | // Apply Patterns |
2736 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo); |
2737 | return true; |
2738 | } |
2739 | case GICXXCustomAction_GICombiner105:{ |
2740 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2741 | // Match Patterns |
2742 | if(![&](){return Helper.matchAndOrDisjointMask(*State.MIs[0], GIMatchData_info);}()) { |
2743 | return false; |
2744 | } |
2745 | // Apply Patterns |
2746 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_info); |
2747 | return true; |
2748 | } |
2749 | case GICXXCustomAction_GICombiner106:{ |
2750 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2751 | // Match Patterns |
2752 | if(![&](){return Helper.matchCombineFAddFMulToFMadOrFMA(*State.MIs[0], |
2753 | GIMatchData_info);}()) { |
2754 | return false; |
2755 | } |
2756 | // Apply Patterns |
2757 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2758 | return true; |
2759 | } |
2760 | case GICXXCustomAction_GICombiner107:{ |
2761 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2762 | // Match Patterns |
2763 | if(![&](){return Helper.matchCombineFAddFpExtFMulToFMadOrFMA(*State.MIs[0], |
2764 | GIMatchData_info);}()) { |
2765 | return false; |
2766 | } |
2767 | // Apply Patterns |
2768 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2769 | return true; |
2770 | } |
2771 | case GICXXCustomAction_GICombiner108:{ |
2772 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2773 | // Match Patterns |
2774 | if(![&](){return Helper.matchCombineFAddFMAFMulToFMadOrFMA(*State.MIs[0], |
2775 | GIMatchData_info);}()) { |
2776 | return false; |
2777 | } |
2778 | // Apply Patterns |
2779 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2780 | return true; |
2781 | } |
2782 | case GICXXCustomAction_GICombiner109:{ |
2783 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2784 | // Match Patterns |
2785 | if(![&](){return Helper.matchCombineFAddFpExtFMulToFMadOrFMAAggressive( |
2786 | *State.MIs[0], GIMatchData_info);}()) { |
2787 | return false; |
2788 | } |
2789 | // Apply Patterns |
2790 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2791 | return true; |
2792 | } |
2793 | case GICXXCustomAction_GICombiner110:{ |
2794 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2795 | // Match Patterns |
2796 | if(![&](){return Helper.matchCombineFSubFMulToFMadOrFMA(*State.MIs[0], |
2797 | GIMatchData_info);}()) { |
2798 | return false; |
2799 | } |
2800 | // Apply Patterns |
2801 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2802 | return true; |
2803 | } |
2804 | case GICXXCustomAction_GICombiner111:{ |
2805 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2806 | // Match Patterns |
2807 | if(![&](){return Helper.matchCombineFSubFNegFMulToFMadOrFMA(*State.MIs[0], |
2808 | GIMatchData_info);}()) { |
2809 | return false; |
2810 | } |
2811 | // Apply Patterns |
2812 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2813 | return true; |
2814 | } |
2815 | case GICXXCustomAction_GICombiner112:{ |
2816 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2817 | // Match Patterns |
2818 | if(![&](){return Helper.matchCombineFSubFpExtFMulToFMadOrFMA(*State.MIs[0], |
2819 | GIMatchData_info);}()) { |
2820 | return false; |
2821 | } |
2822 | // Apply Patterns |
2823 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2824 | return true; |
2825 | } |
2826 | case GICXXCustomAction_GICombiner113:{ |
2827 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2828 | // Match Patterns |
2829 | if(![&](){return Helper.matchCombineFSubFpExtFNegFMulToFMadOrFMA( |
2830 | *State.MIs[0], GIMatchData_info);}()) { |
2831 | return false; |
2832 | } |
2833 | // Apply Patterns |
2834 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2835 | return true; |
2836 | } |
2837 | case GICXXCustomAction_GICombiner114:{ |
2838 | unsigned GIMatchData_select_op_no; |
2839 | // Match Patterns |
2840 | if(![&](){return Helper.matchFoldBinOpIntoSelect(*State.MIs[0], GIMatchData_select_op_no);}()) { |
2841 | return false; |
2842 | } |
2843 | // Apply Patterns |
2844 | Helper.applyFoldBinOpIntoSelect(*State.MIs[0], GIMatchData_select_op_no); |
2845 | return true; |
2846 | } |
2847 | case GICXXCustomAction_GICombiner115:{ |
2848 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2849 | // Match Patterns |
2850 | if(![&](){return Helper.matchSubAddSameReg(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2851 | return false; |
2852 | } |
2853 | // Apply Patterns |
2854 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2855 | return true; |
2856 | } |
2857 | case GICXXCustomAction_GICombiner116:{ |
2858 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2859 | // Match Patterns |
2860 | if(![&](){return Helper.matchSimplifySelectToMinMax(*State.MIs[0], GIMatchData_info);}()) { |
2861 | return false; |
2862 | } |
2863 | // Apply Patterns |
2864 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2865 | return true; |
2866 | } |
2867 | case GICXXCustomAction_GICombiner117:{ |
2868 | std::function<void(MachineIRBuilder &)> GIMatchData_info; |
2869 | // Match Patterns |
2870 | if(![&](){return Helper.matchRedundantBinOpInEquality(*State.MIs[0], GIMatchData_info);}()) { |
2871 | return false; |
2872 | } |
2873 | // Apply Patterns |
2874 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_info); |
2875 | return true; |
2876 | } |
2877 | case GICXXCustomAction_GICombiner118:{ |
2878 | Register GIMatchData_matchinfo; |
2879 | // Match Patterns |
2880 | if(![&](){return Helper.matchFsubToFneg(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2881 | return false; |
2882 | } |
2883 | // Apply Patterns |
2884 | Helper.applyFsubToFneg(*State.MIs[0], GIMatchData_matchinfo); |
2885 | return true; |
2886 | } |
2887 | case GICXXCustomAction_GICombiner119:{ |
2888 | // Match Patterns |
2889 | if(![&](){return Helper.matchCommuteConstantToRHS(*State.MIs[0]);}()) { |
2890 | return false; |
2891 | } |
2892 | // Apply Patterns |
2893 | Helper.applyCommuteBinOpOperands(*State.MIs[0]); |
2894 | return true; |
2895 | } |
2896 | case GICXXCustomAction_GICombiner120:{ |
2897 | // Match Patterns |
2898 | if(![&](){return Helper.matchCommuteFPConstantToRHS(*State.MIs[0]);}()) { |
2899 | return false; |
2900 | } |
2901 | // Apply Patterns |
2902 | Helper.applyCommuteBinOpOperands(*State.MIs[0]); |
2903 | return true; |
2904 | } |
2905 | case GICXXCustomAction_GICombiner121:{ |
2906 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2907 | // Match Patterns |
2908 | if(![&](){return Helper.matchAnd(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2909 | return false; |
2910 | } |
2911 | // Apply Patterns |
2912 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2913 | return true; |
2914 | } |
2915 | case GICXXCustomAction_GICombiner122:{ |
2916 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2917 | // Match Patterns |
2918 | if(![&](){return Helper.matchOr(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2919 | return false; |
2920 | } |
2921 | // Apply Patterns |
2922 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2923 | return true; |
2924 | } |
2925 | case GICXXCustomAction_GICombiner123:{ |
2926 | SmallVector<Register> GIMatchData_matchinfo; |
2927 | // Match Patterns |
2928 | if(![&](){return Helper.matchCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2929 | return false; |
2930 | } |
2931 | // Apply Patterns |
2932 | Helper.applyCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo); |
2933 | return true; |
2934 | } |
2935 | case GICXXCustomAction_GICombiner124:{ |
2936 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2937 | // Match Patterns |
2938 | if(![&](){return Helper.matchAddOverflow(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2939 | return false; |
2940 | } |
2941 | // Apply Patterns |
2942 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
2943 | return true; |
2944 | } |
2945 | case GICXXCustomAction_GICombiner125:{ |
2946 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2947 | // Match Patterns |
2948 | if(![&](){return Helper.matchSextOfTrunc(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
2949 | return false; |
2950 | } |
2951 | // Apply Patterns |
2952 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
2953 | return true; |
2954 | } |
2955 | case GICXXCustomAction_GICombiner126:{ |
2956 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2957 | // Match Patterns |
2958 | if(![&](){return Helper.matchZextOfTrunc(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
2959 | return false; |
2960 | } |
2961 | // Apply Patterns |
2962 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
2963 | return true; |
2964 | } |
2965 | case GICXXCustomAction_GICombiner127:{ |
2966 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
2967 | // Match Patterns |
2968 | if(![&](){return Helper.matchNonNegZext(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) { |
2969 | return false; |
2970 | } |
2971 | // Apply Patterns |
2972 | Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo); |
2973 | return true; |
2974 | } |
2975 | case GICXXCustomAction_GICombiner128:{ |
2976 | SmallVector<Register> GIMatchData_matchinfo; |
2977 | // Match Patterns |
2978 | if(![&](){return Helper.matchCombineShuffleConcat(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2979 | return false; |
2980 | } |
2981 | // Apply Patterns |
2982 | Helper.applyCombineShuffleConcat(*State.MIs[0], GIMatchData_matchinfo); |
2983 | return true; |
2984 | } |
2985 | case GICXXCustomAction_GICombiner129:{ |
2986 | ClampI64ToI16MatchInfo GIMatchData_matchinfo; |
2987 | // Match Patterns |
2988 | if(![&](){return matchClampI64ToI16(*State.MIs[0], MRI, MF, GIMatchData_matchinfo);}()) { |
2989 | return false; |
2990 | } |
2991 | // Apply Patterns |
2992 | applyClampI64ToI16(*State.MIs[0], GIMatchData_matchinfo); |
2993 | return true; |
2994 | } |
2995 | case GICXXCustomAction_GICombiner130:{ |
2996 | MachineInstr * GIMatchData_matchinfo; |
2997 | // Match Patterns |
2998 | if(![&](){return Helper.matchFoldableFneg(*State.MIs[0], GIMatchData_matchinfo);}()) { |
2999 | return false; |
3000 | } |
3001 | // Apply Patterns |
3002 | Helper.applyFoldableFneg(*State.MIs[0], GIMatchData_matchinfo); |
3003 | return true; |
3004 | } |
3005 | } |
3006 | llvm_unreachable("Unknown Apply Action" ); |
3007 | } |
3008 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
3009 | #define GIMT_Encode2(Val) uint8_t(Val), uint8_t((uint16_t)Val >> 8) |
3010 | #define GIMT_Encode4(Val) uint8_t(Val), uint8_t((uint32_t)Val >> 8), uint8_t((uint32_t)Val >> 16), uint8_t((uint32_t)Val >> 24) |
3011 | #define GIMT_Encode8(Val) uint8_t(Val), uint8_t((uint64_t)Val >> 8), uint8_t((uint64_t)Val >> 16), uint8_t((uint64_t)Val >> 24), uint8_t((uint64_t)Val >> 32), uint8_t((uint64_t)Val >> 40), uint8_t((uint64_t)Val >> 48), uint8_t((uint64_t)Val >> 56) |
3012 | #else |
3013 | #define GIMT_Encode2(Val) uint8_t((uint16_t)Val >> 8), uint8_t(Val) |
3014 | #define GIMT_Encode4(Val) uint8_t((uint32_t)Val >> 24), uint8_t((uint32_t)Val >> 16), uint8_t((uint32_t)Val >> 8), uint8_t(Val) |
3015 | #define GIMT_Encode8(Val) uint8_t((uint64_t)Val >> 56), uint8_t((uint64_t)Val >> 48), uint8_t((uint64_t)Val >> 40), uint8_t((uint64_t)Val >> 32), uint8_t((uint64_t)Val >> 24), uint8_t((uint64_t)Val >> 16), uint8_t((uint64_t)Val >> 8), uint8_t(Val) |
3016 | #endif |
3017 | const uint8_t *AMDGPUPreLegalizerCombinerImpl::getMatchTable() const { |
3018 | constexpr static uint8_t MatchTable0[] = { |
3019 | GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(19), GIMT_Encode2(249), /*)*//*default:*//*Label 92*/ GIMT_Encode4(6135), |
3020 | /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(930), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3021 | /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(942), |
3022 | /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(1462), |
3023 | /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(1557), |
3024 | /*TargetOpcode::G_SDIV*//*Label 4*/ GIMT_Encode4(1723), |
3025 | /*TargetOpcode::G_UDIV*//*Label 5*/ GIMT_Encode4(1785), |
3026 | /*TargetOpcode::G_SREM*//*Label 6*/ GIMT_Encode4(1858), |
3027 | /*TargetOpcode::G_UREM*//*Label 7*/ GIMT_Encode4(1892), GIMT_Encode4(0), GIMT_Encode4(0), |
3028 | /*TargetOpcode::G_AND*//*Label 8*/ GIMT_Encode4(1948), |
3029 | /*TargetOpcode::G_OR*//*Label 9*/ GIMT_Encode4(2229), |
3030 | /*TargetOpcode::G_XOR*//*Label 10*/ GIMT_Encode4(2474), GIMT_Encode4(0), |
3031 | /*TargetOpcode::G_PHI*//*Label 11*/ GIMT_Encode4(2575), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3032 | /*TargetOpcode::G_UNMERGE_VALUES*//*Label 12*/ GIMT_Encode4(2587), GIMT_Encode4(0), |
3033 | /*TargetOpcode::G_MERGE_VALUES*//*Label 13*/ GIMT_Encode4(2643), |
3034 | /*TargetOpcode::G_BUILD_VECTOR*//*Label 14*/ GIMT_Encode4(2655), |
3035 | /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 15*/ GIMT_Encode4(2678), |
3036 | /*TargetOpcode::G_CONCAT_VECTORS*//*Label 16*/ GIMT_Encode4(2690), |
3037 | /*TargetOpcode::G_PTRTOINT*//*Label 17*/ GIMT_Encode4(2702), |
3038 | /*TargetOpcode::G_INTTOPTR*//*Label 18*/ GIMT_Encode4(2724), |
3039 | /*TargetOpcode::G_BITCAST*//*Label 19*/ GIMT_Encode4(2736), |
3040 | /*TargetOpcode::G_FREEZE*//*Label 20*/ GIMT_Encode4(2758), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3041 | /*TargetOpcode::G_LOAD*//*Label 21*/ GIMT_Encode4(2822), |
3042 | /*TargetOpcode::G_SEXTLOAD*//*Label 22*/ GIMT_Encode4(2834), |
3043 | /*TargetOpcode::G_ZEXTLOAD*//*Label 23*/ GIMT_Encode4(2846), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3044 | /*TargetOpcode::G_STORE*//*Label 24*/ GIMT_Encode4(2858), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3045 | /*TargetOpcode::G_ANYEXT*//*Label 25*/ GIMT_Encode4(2870), |
3046 | /*TargetOpcode::G_TRUNC*//*Label 26*/ GIMT_Encode4(2904), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3047 | /*TargetOpcode::G_SEXT*//*Label 27*/ GIMT_Encode4(2971), |
3048 | /*TargetOpcode::G_SEXT_INREG*//*Label 28*/ GIMT_Encode4(3021), |
3049 | /*TargetOpcode::G_ZEXT*//*Label 29*/ GIMT_Encode4(3066), |
3050 | /*TargetOpcode::G_SHL*//*Label 30*/ GIMT_Encode4(3144), |
3051 | /*TargetOpcode::G_LSHR*//*Label 31*/ GIMT_Encode4(3302), |
3052 | /*TargetOpcode::G_ASHR*//*Label 32*/ GIMT_Encode4(3414), |
3053 | /*TargetOpcode::G_FSHL*//*Label 33*/ GIMT_Encode4(3537), |
3054 | /*TargetOpcode::G_FSHR*//*Label 34*/ GIMT_Encode4(3580), |
3055 | /*TargetOpcode::G_ROTR*//*Label 35*/ GIMT_Encode4(3623), |
3056 | /*TargetOpcode::G_ROTL*//*Label 36*/ GIMT_Encode4(3647), |
3057 | /*TargetOpcode::G_ICMP*//*Label 37*/ GIMT_Encode4(3671), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3058 | /*TargetOpcode::G_SELECT*//*Label 38*/ GIMT_Encode4(3705), |
3059 | /*TargetOpcode::G_UADDO*//*Label 39*/ GIMT_Encode4(3800), |
3060 | /*TargetOpcode::G_UADDE*//*Label 40*/ GIMT_Encode4(3823), GIMT_Encode4(0), |
3061 | /*TargetOpcode::G_USUBE*//*Label 41*/ GIMT_Encode4(3835), |
3062 | /*TargetOpcode::G_SADDO*//*Label 42*/ GIMT_Encode4(3847), |
3063 | /*TargetOpcode::G_SADDE*//*Label 43*/ GIMT_Encode4(3870), GIMT_Encode4(0), |
3064 | /*TargetOpcode::G_SSUBE*//*Label 44*/ GIMT_Encode4(3882), |
3065 | /*TargetOpcode::G_UMULO*//*Label 45*/ GIMT_Encode4(3894), |
3066 | /*TargetOpcode::G_SMULO*//*Label 46*/ GIMT_Encode4(3928), |
3067 | /*TargetOpcode::G_UMULH*//*Label 47*/ GIMT_Encode4(3962), |
3068 | /*TargetOpcode::G_SMULH*//*Label 48*/ GIMT_Encode4(3985), |
3069 | /*TargetOpcode::G_UADDSAT*//*Label 49*/ GIMT_Encode4(3997), |
3070 | /*TargetOpcode::G_SADDSAT*//*Label 50*/ GIMT_Encode4(4009), GIMT_Encode4(0), GIMT_Encode4(0), |
3071 | /*TargetOpcode::G_USHLSAT*//*Label 51*/ GIMT_Encode4(4021), |
3072 | /*TargetOpcode::G_SSHLSAT*//*Label 52*/ GIMT_Encode4(4044), |
3073 | /*TargetOpcode::G_SMULFIX*//*Label 53*/ GIMT_Encode4(4067), |
3074 | /*TargetOpcode::G_UMULFIX*//*Label 54*/ GIMT_Encode4(4079), |
3075 | /*TargetOpcode::G_SMULFIXSAT*//*Label 55*/ GIMT_Encode4(4091), |
3076 | /*TargetOpcode::G_UMULFIXSAT*//*Label 56*/ GIMT_Encode4(4103), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3077 | /*TargetOpcode::G_FADD*//*Label 57*/ GIMT_Encode4(4115), |
3078 | /*TargetOpcode::G_FSUB*//*Label 58*/ GIMT_Encode4(4227), |
3079 | /*TargetOpcode::G_FMUL*//*Label 59*/ GIMT_Encode4(4316), |
3080 | /*TargetOpcode::G_FMA*//*Label 60*/ GIMT_Encode4(4404), |
3081 | /*TargetOpcode::G_FMAD*//*Label 61*/ GIMT_Encode4(4427), |
3082 | /*TargetOpcode::G_FDIV*//*Label 62*/ GIMT_Encode4(4450), |
3083 | /*TargetOpcode::G_FREM*//*Label 63*/ GIMT_Encode4(4484), GIMT_Encode4(0), |
3084 | /*TargetOpcode::G_FPOWI*//*Label 64*/ GIMT_Encode4(4496), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3085 | /*TargetOpcode::G_FLOG2*//*Label 65*/ GIMT_Encode4(4518), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3086 | /*TargetOpcode::G_FNEG*//*Label 66*/ GIMT_Encode4(4540), GIMT_Encode4(0), |
3087 | /*TargetOpcode::G_FPTRUNC*//*Label 67*/ GIMT_Encode4(4602), |
3088 | /*TargetOpcode::G_FPTOSI*//*Label 68*/ GIMT_Encode4(4645), |
3089 | /*TargetOpcode::G_FPTOUI*//*Label 69*/ GIMT_Encode4(4657), |
3090 | /*TargetOpcode::G_SITOFP*//*Label 70*/ GIMT_Encode4(4669), |
3091 | /*TargetOpcode::G_UITOFP*//*Label 71*/ GIMT_Encode4(4696), |
3092 | /*TargetOpcode::G_FABS*//*Label 72*/ GIMT_Encode4(4723), GIMT_Encode4(0), GIMT_Encode4(0), |
3093 | /*TargetOpcode::G_FCANONICALIZE*//*Label 73*/ GIMT_Encode4(4802), |
3094 | /*TargetOpcode::G_FMINNUM*//*Label 74*/ GIMT_Encode4(4832), |
3095 | /*TargetOpcode::G_FMAXNUM*//*Label 75*/ GIMT_Encode4(4866), |
3096 | /*TargetOpcode::G_FMINNUM_IEEE*//*Label 76*/ GIMT_Encode4(4900), |
3097 | /*TargetOpcode::G_FMAXNUM_IEEE*//*Label 77*/ GIMT_Encode4(4912), |
3098 | /*TargetOpcode::G_FMINIMUM*//*Label 78*/ GIMT_Encode4(4924), |
3099 | /*TargetOpcode::G_FMAXIMUM*//*Label 79*/ GIMT_Encode4(4958), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3100 | /*TargetOpcode::G_PTR_ADD*//*Label 80*/ GIMT_Encode4(4992), GIMT_Encode4(0), |
3101 | /*TargetOpcode::G_SMIN*//*Label 81*/ GIMT_Encode4(5071), |
3102 | /*TargetOpcode::G_SMAX*//*Label 82*/ GIMT_Encode4(5094), |
3103 | /*TargetOpcode::G_UMIN*//*Label 83*/ GIMT_Encode4(5117), |
3104 | /*TargetOpcode::G_UMAX*//*Label 84*/ GIMT_Encode4(5140), |
3105 | /*TargetOpcode::G_ABS*//*Label 85*/ GIMT_Encode4(5163), GIMT_Encode4(0), GIMT_Encode4(0), |
3106 | /*TargetOpcode::G_BR*//*Label 86*/ GIMT_Encode4(5175), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3107 | /*TargetOpcode::G_INSERT_VECTOR_ELT*//*Label 87*/ GIMT_Encode4(5187), |
3108 | /*TargetOpcode::G_EXTRACT_VECTOR_ELT*//*Label 88*/ GIMT_Encode4(5317), |
3109 | /*TargetOpcode::G_SHUFFLE_VECTOR*//*Label 89*/ GIMT_Encode4(5990), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3110 | /*TargetOpcode::G_BITREVERSE*//*Label 90*/ GIMT_Encode4(6024), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
3111 | /*TargetOpcode::G_FSQRT*//*Label 91*/ GIMT_Encode4(6113), |
3112 | // Label 0: @930 |
3113 | GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(941), // Rule ID 8 // |
3114 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled), |
3115 | // MIs[0] d |
3116 | // No operand predicates |
3117 | // MIs[0] s |
3118 | // No operand predicates |
3119 | // Combiner Rule #8: copy_prop |
3120 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0), |
3121 | // Label 93: @941 |
3122 | GIM_Reject, |
3123 | // Label 1: @942 |
3124 | GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(953), // Rule ID 10 // |
3125 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled), |
3126 | // Combiner Rule #10: add_p2i_to_ptradd; wip_match_opcode 'G_ADD' |
3127 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2), |
3128 | // Label 94: @953 |
3129 | GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(964), // Rule ID 72 // |
3130 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled), |
3131 | // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_ADD' |
3132 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25), |
3133 | // Label 95: @964 |
3134 | GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(975), // Rule ID 119 // |
3135 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule88Enabled), |
3136 | // Combiner Rule #88: simplify_add_to_sub; wip_match_opcode 'G_ADD' |
3137 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner41), |
3138 | // Label 96: @975 |
3139 | GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(986), // Rule ID 212 // |
3140 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
3141 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_ADD' |
3142 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
3143 | // Label 97: @986 |
3144 | GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(997), // Rule ID 251 // |
3145 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3146 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_ADD' |
3147 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3148 | // Label 98: @997 |
3149 | GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(1008), // Rule ID 281 // |
3150 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
3151 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_ADD' |
3152 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
3153 | // Label 99: @1008 |
3154 | GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(1042), // Rule ID 0 // |
3155 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled), |
3156 | // MIs[0] root |
3157 | // No operand predicates |
3158 | // MIs[0] sub |
3159 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3160 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3161 | // MIs[1] Operand 1 |
3162 | GIM_CheckConstantInt8, /*MI*/1, /*Op*/1, 0, |
3163 | // MIs[1] A |
3164 | // No operand predicates |
3165 | // MIs[0] B |
3166 | // No operand predicates |
3167 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
3168 | // Combiner Rule #0: ZeroMinusAPlusB |
3169 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
3170 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
3171 | GIR_RootToRootCopy, /*OpIdx*/2, // B |
3172 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // A |
3173 | GIR_EraseRootFromParent_Done, |
3174 | // Label 100: @1042 |
3175 | GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(1076), // Rule ID 3 // |
3176 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled), |
3177 | // MIs[0] root |
3178 | // No operand predicates |
3179 | // MIs[0] sub |
3180 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3181 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3182 | // MIs[1] B |
3183 | // No operand predicates |
3184 | // MIs[1] A |
3185 | // No operand predicates |
3186 | // MIs[0] A |
3187 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2, |
3188 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3189 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
3190 | // Combiner Rule #3: BMinusAPlusA |
3191 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3192 | GIR_EraseRootFromParent_Done, |
3193 | // Label 101: @1076 |
3194 | GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(1110), // Rule ID 109 // |
3195 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule79Enabled), |
3196 | // MIs[0] dst |
3197 | // No operand predicates |
3198 | // MIs[0] __add_sub_reg_match_0.tmp |
3199 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3200 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3201 | // MIs[1] src |
3202 | // No operand predicates |
3203 | // MIs[1] __add_sub_reg_match_0.x |
3204 | // No operand predicates |
3205 | // MIs[0] __add_sub_reg_match_0.x |
3206 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2, |
3207 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3208 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
3209 | // Combiner Rule #79: add_sub_reg @ [__add_sub_reg_match_0[1]] |
3210 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3211 | GIR_EraseRootFromParent_Done, |
3212 | // Label 102: @1110 |
3213 | GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(1155), // Rule ID 5 // |
3214 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
3215 | // MIs[0] root |
3216 | // No operand predicates |
3217 | // MIs[0] sub1 |
3218 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3219 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3220 | // MIs[1] A |
3221 | // No operand predicates |
3222 | // MIs[1] B |
3223 | // No operand predicates |
3224 | // MIs[0] sub2 |
3225 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2] |
3226 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_SUB), |
3227 | // MIs[2] B |
3228 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/1, /*OtherOpIdx*/2, |
3229 | // MIs[2] C |
3230 | // No operand predicates |
3231 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3232 | // Combiner Rule #5: AMinusBPlusBMinusC |
3233 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
3234 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
3235 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // A |
3236 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // C |
3237 | GIR_EraseRootFromParent_Done, |
3238 | // Label 103: @1155 |
3239 | GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(1200), // Rule ID 4 // |
3240 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled), |
3241 | // MIs[0] root |
3242 | // No operand predicates |
3243 | // MIs[0] sub1 |
3244 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3245 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3246 | // MIs[1] A |
3247 | // No operand predicates |
3248 | // MIs[1] B |
3249 | // No operand predicates |
3250 | // MIs[0] sub2 |
3251 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2] |
3252 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_SUB), |
3253 | // MIs[2] C |
3254 | // No operand predicates |
3255 | // MIs[2] A |
3256 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/1, |
3257 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3258 | // Combiner Rule #4: AMinusBPlusCMinusA |
3259 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
3260 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
3261 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // C |
3262 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // B |
3263 | GIR_EraseRootFromParent_Done, |
3264 | // Label 104: @1200 |
3265 | GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(1235), // Rule ID 46 // |
3266 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled), |
3267 | GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap), |
3268 | // MIs[0] root |
3269 | // No operand predicates |
3270 | // MIs[0] left |
3271 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3272 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE), |
3273 | // MIs[1] imm1 |
3274 | // No operand predicates |
3275 | // MIs[0] right |
3276 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2] |
3277 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_VSCALE), |
3278 | // MIs[2] imm2 |
3279 | // No operand predicates |
3280 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3281 | // Combiner Rule #44: add_of_vscale |
3282 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9), |
3283 | // Label 105: @1235 |
3284 | GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(1269), // Rule ID 1 // |
3285 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled), |
3286 | // MIs[0] root |
3287 | // No operand predicates |
3288 | // MIs[0] A |
3289 | // No operand predicates |
3290 | // MIs[0] sub |
3291 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
3292 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3293 | // MIs[1] Operand 1 |
3294 | GIM_CheckConstantInt8, /*MI*/1, /*Op*/1, 0, |
3295 | // MIs[1] B |
3296 | // No operand predicates |
3297 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
3298 | // Combiner Rule #1: APlusZeroMinusB |
3299 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
3300 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
3301 | GIR_RootToRootCopy, /*OpIdx*/1, // A |
3302 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // B |
3303 | GIR_EraseRootFromParent_Done, |
3304 | // Label 106: @1269 |
3305 | GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(1303), // Rule ID 2 // |
3306 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled), |
3307 | // MIs[0] root |
3308 | // No operand predicates |
3309 | // MIs[0] A |
3310 | // No operand predicates |
3311 | // MIs[0] sub |
3312 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
3313 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3314 | // MIs[1] B |
3315 | // No operand predicates |
3316 | // MIs[1] A |
3317 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
3318 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3319 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
3320 | // Combiner Rule #2: APlusBMinusB |
3321 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3322 | GIR_EraseRootFromParent_Done, |
3323 | // Label 107: @1303 |
3324 | GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(1337), // Rule ID 108 // |
3325 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule79Enabled), |
3326 | // MIs[0] dst |
3327 | // No operand predicates |
3328 | // MIs[0] __add_sub_reg_match_0.x |
3329 | // No operand predicates |
3330 | // MIs[0] __add_sub_reg_match_0.tmp |
3331 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
3332 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3333 | // MIs[1] src |
3334 | // No operand predicates |
3335 | // MIs[1] __add_sub_reg_match_0.x |
3336 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
3337 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3338 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
3339 | // Combiner Rule #79: add_sub_reg @ [__add_sub_reg_match_0[0]] |
3340 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3341 | GIR_EraseRootFromParent_Done, |
3342 | // Label 108: @1337 |
3343 | GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(1382), // Rule ID 6 // |
3344 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled), |
3345 | // MIs[0] root |
3346 | // No operand predicates |
3347 | // MIs[0] A |
3348 | // No operand predicates |
3349 | // MIs[0] sub1 |
3350 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
3351 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3352 | // MIs[1] B |
3353 | // No operand predicates |
3354 | // MIs[1] add1 |
3355 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/2, // MIs[2] |
3356 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ADD), |
3357 | // MIs[2] A |
3358 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/0, /*OtherOpIdx*/1, |
3359 | // MIs[2] C |
3360 | // No operand predicates |
3361 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3362 | // Combiner Rule #6: APlusBMinusAplusC |
3363 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
3364 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
3365 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // B |
3366 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // C |
3367 | GIR_EraseRootFromParent_Done, |
3368 | // Label 109: @1382 |
3369 | GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(1427), // Rule ID 7 // |
3370 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
3371 | // MIs[0] root |
3372 | // No operand predicates |
3373 | // MIs[0] A |
3374 | // No operand predicates |
3375 | // MIs[0] sub1 |
3376 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
3377 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
3378 | // MIs[1] B |
3379 | // No operand predicates |
3380 | // MIs[1] add1 |
3381 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/2, // MIs[2] |
3382 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ADD), |
3383 | // MIs[2] C |
3384 | // No operand predicates |
3385 | // MIs[2] A |
3386 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
3387 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3388 | // Combiner Rule #7: APlusBMinusCPlusA |
3389 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
3390 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
3391 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // B |
3392 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // C |
3393 | GIR_EraseRootFromParent_Done, |
3394 | // Label 110: @1427 |
3395 | GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(1450), // Rule ID 86 // |
3396 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
3397 | // MIs[0] dst |
3398 | // No operand predicates |
3399 | // MIs[0] lhs |
3400 | // No operand predicates |
3401 | // MIs[0] Operand 2 |
3402 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3403 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3404 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[1]] |
3405 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3406 | GIR_EraseRootFromParent_Done, |
3407 | // Label 111: @1450 |
3408 | GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(1461), // Rule ID 127 // |
3409 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule92Enabled), |
3410 | // MIs[0] root |
3411 | // No operand predicates |
3412 | // MIs[0] src1 |
3413 | // No operand predicates |
3414 | // MIs[0] src2 |
3415 | // No operand predicates |
3416 | // Combiner Rule #92: reassoc_comm_binops |
3417 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner45), |
3418 | // Label 112: @1461 |
3419 | GIM_Reject, |
3420 | // Label 2: @1462 |
3421 | GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(1473), // Rule ID 75 // |
3422 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled), |
3423 | // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_SUB' |
3424 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25), |
3425 | // Label 113: @1473 |
3426 | GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(1484), // Rule ID 213 // |
3427 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
3428 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_SUB' |
3429 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
3430 | // Label 114: @1484 |
3431 | GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(1495), // Rule ID 252 // |
3432 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3433 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SUB' |
3434 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3435 | // Label 115: @1495 |
3436 | GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(1506), // Rule ID 277 // |
3437 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule173Enabled), |
3438 | // Combiner Rule #173: sub_add_reg; wip_match_opcode 'G_SUB' |
3439 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner115), |
3440 | // Label 116: @1506 |
3441 | GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(1533), // Rule ID 49 // |
3442 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule47Enabled), |
3443 | GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap), |
3444 | // MIs[0] root |
3445 | // No operand predicates |
3446 | // MIs[0] x |
3447 | // No operand predicates |
3448 | // MIs[0] right |
3449 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
3450 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE), |
3451 | // MIs[1] imm |
3452 | // No operand predicates |
3453 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
3454 | // Combiner Rule #47: sub_of_vscale |
3455 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12), |
3456 | // Label 117: @1533 |
3457 | GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(1556), // Rule ID 85 // |
3458 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
3459 | // MIs[0] dst |
3460 | // No operand predicates |
3461 | // MIs[0] lhs |
3462 | // No operand predicates |
3463 | // MIs[0] Operand 2 |
3464 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3465 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3466 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[0]] |
3467 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3468 | GIR_EraseRootFromParent_Done, |
3469 | // Label 118: @1556 |
3470 | GIM_Reject, |
3471 | // Label 3: @1557 |
3472 | GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(1568), // Rule ID 63 // |
3473 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled), |
3474 | // Combiner Rule #57: undef_to_int_zero; wip_match_opcode 'G_MUL' |
3475 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner21), |
3476 | // Label 119: @1568 |
3477 | GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(1579), // Rule ID 214 // |
3478 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
3479 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_MUL' |
3480 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
3481 | // Label 120: @1579 |
3482 | GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(1590), // Rule ID 282 // |
3483 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
3484 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_MUL' |
3485 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
3486 | // Label 121: @1590 |
3487 | GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(1630), // Rule ID 11 // |
3488 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled), |
3489 | // MIs[0] dst |
3490 | GIM_RecordRegType, /*MI*/0, /*Op*/0, /*TempTypeIdx*/uint8_t(-1), |
3491 | // MIs[0] x |
3492 | // No operand predicates |
3493 | // MIs[0] Operand 2 |
3494 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, uint8_t(-1), |
3495 | GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/uint8_t(-1), |
3496 | GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0), |
3497 | // Combiner Rule #11: mul_by_neg_one |
3498 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
3499 | GIR_RootToRootCopy, /*OpIdx*/0, // dst |
3500 | GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0, |
3501 | GIR_RootToRootCopy, /*OpIdx*/1, // x |
3502 | GIR_EraseRootFromParent_Done, |
3503 | // Label 122: @1630 |
3504 | GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(1665), // Rule ID 47 // |
3505 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule45Enabled), |
3506 | GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap), |
3507 | // MIs[0] root |
3508 | // No operand predicates |
3509 | // MIs[0] left |
3510 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3511 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE), |
3512 | // MIs[1] scale |
3513 | // No operand predicates |
3514 | // MIs[0] x |
3515 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2] |
3516 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
3517 | // MIs[2] imm1 |
3518 | // No operand predicates |
3519 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3520 | // Combiner Rule #45: mul_of_vscale |
3521 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10), |
3522 | // Label 123: @1665 |
3523 | GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(1688), // Rule ID 101 // |
3524 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule72Enabled), |
3525 | // MIs[0] dst |
3526 | // No operand predicates |
3527 | // MIs[0] lhs |
3528 | // No operand predicates |
3529 | // MIs[0] zero |
3530 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3531 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2, |
3532 | // Combiner Rule #72: binop_right_to_zero |
3533 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2, |
3534 | GIR_EraseRootFromParent_Done, |
3535 | // Label 124: @1688 |
3536 | GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(1711), // Rule ID 106 // |
3537 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule77Enabled), |
3538 | // MIs[0] dst |
3539 | // No operand predicates |
3540 | // MIs[0] x |
3541 | // No operand predicates |
3542 | // MIs[0] Operand 2 |
3543 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1, |
3544 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3545 | // Combiner Rule #77: right_identity_one_int |
3546 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3547 | GIR_EraseRootFromParent_Done, |
3548 | // Label 125: @1711 |
3549 | GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(1722), // Rule ID 9 // |
3550 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled), |
3551 | // MIs[0] d |
3552 | // No operand predicates |
3553 | // MIs[0] op1 |
3554 | // No operand predicates |
3555 | // MIs[0] op2 |
3556 | // No operand predicates |
3557 | // Combiner Rule #9: mul_to_shl |
3558 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1), |
3559 | // Label 126: @1722 |
3560 | GIM_Reject, |
3561 | // Label 4: @1723 |
3562 | GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(1734), // Rule ID 97 // |
3563 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled), |
3564 | // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_SDIV' |
3565 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32), |
3566 | // Label 127: @1734 |
3567 | GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(1745), // Rule ID 192 // |
3568 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled), |
3569 | // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_SDIV' |
3570 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86), |
3571 | // Label 128: @1745 |
3572 | GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(1756), // Rule ID 232 // |
3573 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule158Enabled), |
3574 | // Combiner Rule #158: sdiv_by_const; wip_match_opcode 'G_SDIV' |
3575 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner100), |
3576 | // Label 129: @1756 |
3577 | GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(1767), // Rule ID 257 // |
3578 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3579 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SDIV' |
3580 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3581 | // Label 130: @1767 |
3582 | GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(1784), // Rule ID 233 // |
3583 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule159Enabled), |
3584 | GIM_MIFlagsNot, /*MI*/0, GIMT_Encode4(MachineInstr::IsExact), |
3585 | // MIs[0] dst |
3586 | // No operand predicates |
3587 | // MIs[0] x |
3588 | // No operand predicates |
3589 | // MIs[0] y |
3590 | // No operand predicates |
3591 | // Combiner Rule #159: sdiv_by_pow2 |
3592 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner101), |
3593 | // Label 131: @1784 |
3594 | GIM_Reject, |
3595 | // Label 5: @1785 |
3596 | GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(1796), // Rule ID 66 // |
3597 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled), |
3598 | // Combiner Rule #59: binop_left_undef_to_zero; wip_match_opcode 'G_UDIV' |
3599 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23), |
3600 | // Label 132: @1796 |
3601 | GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(1807), // Rule ID 98 // |
3602 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled), |
3603 | // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_UDIV' |
3604 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32), |
3605 | // Label 133: @1807 |
3606 | GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(1818), // Rule ID 193 // |
3607 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled), |
3608 | // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_UDIV' |
3609 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86), |
3610 | // Label 134: @1818 |
3611 | GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(1829), // Rule ID 231 // |
3612 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule157Enabled), |
3613 | // Combiner Rule #157: udiv_by_const; wip_match_opcode 'G_UDIV' |
3614 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner99), |
3615 | // Label 135: @1829 |
3616 | GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(1840), // Rule ID 259 // |
3617 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3618 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UDIV' |
3619 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3620 | // Label 136: @1840 |
3621 | GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(1857), // Rule ID 234 // |
3622 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule160Enabled), |
3623 | GIM_MIFlagsNot, /*MI*/0, GIMT_Encode4(MachineInstr::IsExact), |
3624 | // MIs[0] dst |
3625 | // No operand predicates |
3626 | // MIs[0] x |
3627 | // No operand predicates |
3628 | // MIs[0] y |
3629 | // No operand predicates |
3630 | // Combiner Rule #160: udiv_by_pow2 |
3631 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner102), |
3632 | // Label 137: @1857 |
3633 | GIM_Reject, |
3634 | // Label 6: @1858 |
3635 | GIM_Try, /*On fail goto*//*Label 138*/ GIMT_Encode4(1869), // Rule ID 99 // |
3636 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled), |
3637 | // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_SREM' |
3638 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32), |
3639 | // Label 138: @1869 |
3640 | GIM_Try, /*On fail goto*//*Label 139*/ GIMT_Encode4(1880), // Rule ID 194 // |
3641 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled), |
3642 | // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_SREM' |
3643 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86), |
3644 | // Label 139: @1880 |
3645 | GIM_Try, /*On fail goto*//*Label 140*/ GIMT_Encode4(1891), // Rule ID 258 // |
3646 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3647 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SREM' |
3648 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3649 | // Label 140: @1891 |
3650 | GIM_Reject, |
3651 | // Label 7: @1892 |
3652 | GIM_Try, /*On fail goto*//*Label 141*/ GIMT_Encode4(1903), // Rule ID 67 // |
3653 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled), |
3654 | // Combiner Rule #59: binop_left_undef_to_zero; wip_match_opcode 'G_UREM' |
3655 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23), |
3656 | // Label 141: @1903 |
3657 | GIM_Try, /*On fail goto*//*Label 142*/ GIMT_Encode4(1914), // Rule ID 100 // |
3658 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled), |
3659 | // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_UREM' |
3660 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32), |
3661 | // Label 142: @1914 |
3662 | GIM_Try, /*On fail goto*//*Label 143*/ GIMT_Encode4(1925), // Rule ID 140 // |
3663 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule105Enabled), |
3664 | // Combiner Rule #105: urem_pow2_to_mask; wip_match_opcode 'G_UREM' |
3665 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner57), |
3666 | // Label 143: @1925 |
3667 | GIM_Try, /*On fail goto*//*Label 144*/ GIMT_Encode4(1936), // Rule ID 195 // |
3668 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled), |
3669 | // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_UREM' |
3670 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86), |
3671 | // Label 144: @1936 |
3672 | GIM_Try, /*On fail goto*//*Label 145*/ GIMT_Encode4(1947), // Rule ID 260 // |
3673 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3674 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UREM' |
3675 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3676 | // Label 145: @1947 |
3677 | GIM_Reject, |
3678 | // Label 8: @1948 |
3679 | GIM_Try, /*On fail goto*//*Label 146*/ GIMT_Encode4(1959), // Rule ID 58 // |
3680 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule54Enabled), |
3681 | // Combiner Rule #54: load_and_mask; wip_match_opcode 'G_AND' |
3682 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner18), |
3683 | // Label 146: @1959 |
3684 | GIM_Try, /*On fail goto*//*Label 147*/ GIMT_Encode4(1970), // Rule ID 62 // |
3685 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled), |
3686 | // Combiner Rule #57: undef_to_int_zero; wip_match_opcode 'G_AND' |
3687 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner21), |
3688 | // Label 147: @1970 |
3689 | GIM_Try, /*On fail goto*//*Label 148*/ GIMT_Encode4(1981), // Rule ID 120 // |
3690 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3691 | // Combiner Rule #89: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_AND' |
3692 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42), |
3693 | // Label 148: @1981 |
3694 | GIM_Try, /*On fail goto*//*Label 149*/ GIMT_Encode4(1992), // Rule ID 132 // |
3695 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule97Enabled), |
3696 | // Combiner Rule #97: narrow_binop_feeding_and; wip_match_opcode 'G_AND' |
3697 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner50), |
3698 | // Label 149: @1992 |
3699 | GIM_Try, /*On fail goto*//*Label 150*/ GIMT_Encode4(2003), // Rule ID 137 // |
3700 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule102Enabled), |
3701 | // Combiner Rule #102: redundant_and; wip_match_opcode 'G_AND' |
3702 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner54), |
3703 | // Label 150: @2003 |
3704 | GIM_Try, /*On fail goto*//*Label 151*/ GIMT_Encode4(2014), // Rule ID 165 // |
3705 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule128Enabled), |
3706 | // Combiner Rule #128: overlapping_and; wip_match_opcode 'G_AND' |
3707 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner75), |
3708 | // Label 151: @2014 |
3709 | GIM_Try, /*On fail goto*//*Label 152*/ GIMT_Encode4(2025), // Rule ID 215 // |
3710 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
3711 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_AND' |
3712 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
3713 | // Label 152: @2025 |
3714 | GIM_Try, /*On fail goto*//*Label 153*/ GIMT_Encode4(2036), // Rule ID 242 // |
3715 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule163Enabled), |
3716 | // Combiner Rule #163: and_or_disjoint_mask; wip_match_opcode 'G_AND' |
3717 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner105), |
3718 | // Label 153: @2036 |
3719 | GIM_Try, /*On fail goto*//*Label 154*/ GIMT_Encode4(2047), // Rule ID 254 // |
3720 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3721 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_AND' |
3722 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3723 | // Label 154: @2047 |
3724 | GIM_Try, /*On fail goto*//*Label 155*/ GIMT_Encode4(2058), // Rule ID 283 // |
3725 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
3726 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_AND' |
3727 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
3728 | // Label 155: @2058 |
3729 | GIM_Try, /*On fail goto*//*Label 156*/ GIMT_Encode4(2069), // Rule ID 310 // |
3730 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule179Enabled), |
3731 | // Combiner Rule #179: match_ands; wip_match_opcode 'G_AND' |
3732 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner121), |
3733 | // Label 156: @2069 |
3734 | GIM_Try, /*On fail goto*//*Label 157*/ GIMT_Encode4(2167), // Rule ID 313 // |
3735 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule182Enabled), |
3736 | // MIs[0] root |
3737 | // No operand predicates |
3738 | // MIs[0] d1 |
3739 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3740 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ICMP), |
3741 | // MIs[1] p |
3742 | // No operand predicates |
3743 | // MIs[1] s1 |
3744 | GIM_RecordRegType, /*MI*/1, /*Op*/2, /*TempTypeIdx*/uint8_t(-1), |
3745 | // MIs[1] Operand 3 |
3746 | GIM_CheckConstantInt8, /*MI*/1, /*Op*/3, 0, |
3747 | // MIs[0] d2 |
3748 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2] |
3749 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ICMP), |
3750 | // MIs[2] p |
3751 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/1, /*OtherOpIdx*/1, |
3752 | // MIs[2] s2 |
3753 | // No operand predicates |
3754 | // MIs[2] Operand 3 |
3755 | GIM_CheckConstantInt8, /*MI*/2, /*Op*/3, 0, |
3756 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner7), |
3757 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3758 | GIR_MakeTempReg, /*TempRegID*/1, /*TypeID*/uint8_t(-1), |
3759 | GIR_BuildConstant, /*TempRegID*/1, /*Val*/GIMT_Encode8(0), |
3760 | GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/uint8_t(-1), |
3761 | // Combiner Rule #182: double_icmp_zero_and_combine |
3762 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_OR), |
3763 | GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(RegState::Define), |
3764 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // s1 |
3765 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // s2 |
3766 | GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ICMP), |
3767 | GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // root |
3768 | GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/1, /*OpIdx*/1, // p |
3769 | GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0, |
3770 | GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/1, |
3771 | GIR_EraseRootFromParent_Done, |
3772 | // Label 157: @2167 |
3773 | GIM_Try, /*On fail goto*//*Label 158*/ GIMT_Encode4(2204), // Rule ID 207 // |
3774 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule149Enabled), |
3775 | // MIs[0] root |
3776 | // No operand predicates |
3777 | // MIs[0] shift |
3778 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3779 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_LSHR), |
3780 | // MIs[1] x |
3781 | // No operand predicates |
3782 | // MIs[1] lsb |
3783 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/2, // MIs[2] |
3784 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
3785 | // MIs[2] imm1 |
3786 | // No operand predicates |
3787 | // MIs[0] mask |
3788 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/3, /*MI*/0, /*OpIdx*/2, // MIs[3] |
3789 | GIM_CheckOpcode, /*MI*/3, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
3790 | // MIs[3] imm2 |
3791 | // No operand predicates |
3792 | GIM_CheckIsSafeToFold, /*NumInsns*/3, |
3793 | // Combiner Rule #149: bitfield_extract_from_and |
3794 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner92), |
3795 | // Label 158: @2204 |
3796 | GIM_Try, /*On fail goto*//*Label 159*/ GIMT_Encode4(2228), // Rule ID 95 // |
3797 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled), |
3798 | // MIs[0] dst |
3799 | // No operand predicates |
3800 | // MIs[0] src |
3801 | // No operand predicates |
3802 | // MIs[0] src |
3803 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
3804 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3805 | // Combiner Rule #70: binop_same_val @ [__binop_same_val_match_0[0]] |
3806 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3807 | GIR_EraseRootFromParent_Done, |
3808 | // Label 159: @2228 |
3809 | GIM_Reject, |
3810 | // Label 9: @2229 |
3811 | GIM_Try, /*On fail goto*//*Label 160*/ GIMT_Encode4(2240), // Rule ID 64 // |
3812 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule58Enabled), |
3813 | // Combiner Rule #58: undef_to_negative_one; wip_match_opcode 'G_OR' |
3814 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner22), |
3815 | // Label 160: @2240 |
3816 | GIM_Try, /*On fail goto*//*Label 161*/ GIMT_Encode4(2251), // Rule ID 121 // |
3817 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3818 | // Combiner Rule #89: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_OR' |
3819 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42), |
3820 | // Label 161: @2251 |
3821 | GIM_Try, /*On fail goto*//*Label 162*/ GIMT_Encode4(2262), // Rule ID 139 // |
3822 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule104Enabled), |
3823 | // Combiner Rule #104: redundant_or; wip_match_opcode 'G_OR' |
3824 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner56), |
3825 | // Label 162: @2262 |
3826 | GIM_Try, /*On fail goto*//*Label 163*/ GIMT_Encode4(2273), // Rule ID 191 // |
3827 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule138Enabled), |
3828 | // Combiner Rule #138: load_or_combine; wip_match_opcode 'G_OR' |
3829 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner85), |
3830 | // Label 163: @2273 |
3831 | GIM_Try, /*On fail goto*//*Label 164*/ GIMT_Encode4(2284), // Rule ID 196 // |
3832 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule140Enabled), |
3833 | // Combiner Rule #140: funnel_shift_from_or_shift; wip_match_opcode 'G_OR' |
3834 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner87), |
3835 | // Label 164: @2284 |
3836 | GIM_Try, /*On fail goto*//*Label 165*/ GIMT_Encode4(2295), // Rule ID 216 // |
3837 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
3838 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_OR' |
3839 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
3840 | // Label 165: @2295 |
3841 | GIM_Try, /*On fail goto*//*Label 166*/ GIMT_Encode4(2306), // Rule ID 255 // |
3842 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3843 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_OR' |
3844 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3845 | // Label 166: @2306 |
3846 | GIM_Try, /*On fail goto*//*Label 167*/ GIMT_Encode4(2317), // Rule ID 284 // |
3847 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
3848 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_OR' |
3849 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
3850 | // Label 167: @2317 |
3851 | GIM_Try, /*On fail goto*//*Label 168*/ GIMT_Encode4(2328), // Rule ID 311 // |
3852 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule180Enabled), |
3853 | // Combiner Rule #180: match_ors; wip_match_opcode 'G_OR' |
3854 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner122), |
3855 | // Label 168: @2328 |
3856 | GIM_Try, /*On fail goto*//*Label 169*/ GIMT_Encode4(2426), // Rule ID 314 // |
3857 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule183Enabled), |
3858 | // MIs[0] root |
3859 | // No operand predicates |
3860 | // MIs[0] d1 |
3861 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3862 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ICMP), |
3863 | // MIs[1] p |
3864 | // No operand predicates |
3865 | // MIs[1] s1 |
3866 | GIM_RecordRegType, /*MI*/1, /*Op*/2, /*TempTypeIdx*/uint8_t(-1), |
3867 | // MIs[1] Operand 3 |
3868 | GIM_CheckConstantInt8, /*MI*/1, /*Op*/3, 0, |
3869 | // MIs[0] d2 |
3870 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2] |
3871 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ICMP), |
3872 | // MIs[2] p |
3873 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/1, /*OtherOpIdx*/1, |
3874 | // MIs[2] s2 |
3875 | // No operand predicates |
3876 | // MIs[2] Operand 3 |
3877 | GIM_CheckConstantInt8, /*MI*/2, /*Op*/3, 0, |
3878 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner8), |
3879 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
3880 | GIR_MakeTempReg, /*TempRegID*/1, /*TypeID*/uint8_t(-1), |
3881 | GIR_BuildConstant, /*TempRegID*/1, /*Val*/GIMT_Encode8(0), |
3882 | GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/uint8_t(-1), |
3883 | // Combiner Rule #183: double_icmp_zero_or_combine |
3884 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_OR), |
3885 | GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(RegState::Define), |
3886 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // s1 |
3887 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // s2 |
3888 | GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ICMP), |
3889 | GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // root |
3890 | GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/1, /*OpIdx*/1, // p |
3891 | GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0, |
3892 | GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/1, |
3893 | GIR_EraseRootFromParent_Done, |
3894 | // Label 169: @2426 |
3895 | GIM_Try, /*On fail goto*//*Label 170*/ GIMT_Encode4(2450), // Rule ID 96 // |
3896 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled), |
3897 | // MIs[0] dst |
3898 | // No operand predicates |
3899 | // MIs[0] src |
3900 | // No operand predicates |
3901 | // MIs[0] src |
3902 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
3903 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3904 | // Combiner Rule #70: binop_same_val @ [__binop_same_val_match_0[1]] |
3905 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3906 | GIR_EraseRootFromParent_Done, |
3907 | // Label 170: @2450 |
3908 | GIM_Try, /*On fail goto*//*Label 171*/ GIMT_Encode4(2473), // Rule ID 87 // |
3909 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
3910 | // MIs[0] dst |
3911 | // No operand predicates |
3912 | // MIs[0] lhs |
3913 | // No operand predicates |
3914 | // MIs[0] Operand 2 |
3915 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3916 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3917 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[2]] |
3918 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3919 | GIR_EraseRootFromParent_Done, |
3920 | // Label 171: @2473 |
3921 | GIM_Reject, |
3922 | // Label 10: @2474 |
3923 | GIM_Try, /*On fail goto*//*Label 172*/ GIMT_Encode4(2485), // Rule ID 76 // |
3924 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled), |
3925 | // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_XOR' |
3926 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25), |
3927 | // Label 172: @2485 |
3928 | GIM_Try, /*On fail goto*//*Label 173*/ GIMT_Encode4(2496), // Rule ID 122 // |
3929 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3930 | // Combiner Rule #89: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_XOR' |
3931 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42), |
3932 | // Label 173: @2496 |
3933 | GIM_Try, /*On fail goto*//*Label 174*/ GIMT_Encode4(2507), // Rule ID 148 // |
3934 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled), |
3935 | // Combiner Rule #111: not_cmp_fold; wip_match_opcode 'G_XOR' |
3936 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner63), |
3937 | // Label 174: @2507 |
3938 | GIM_Try, /*On fail goto*//*Label 175*/ GIMT_Encode4(2518), // Rule ID 179 // |
3939 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule134Enabled), |
3940 | // Combiner Rule #134: xor_of_and_with_same_reg; wip_match_opcode 'G_XOR' |
3941 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner81), |
3942 | // Label 175: @2518 |
3943 | GIM_Try, /*On fail goto*//*Label 176*/ GIMT_Encode4(2529), // Rule ID 217 // |
3944 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
3945 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_XOR' |
3946 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
3947 | // Label 176: @2529 |
3948 | GIM_Try, /*On fail goto*//*Label 177*/ GIMT_Encode4(2540), // Rule ID 256 // |
3949 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
3950 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_XOR' |
3951 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
3952 | // Label 177: @2540 |
3953 | GIM_Try, /*On fail goto*//*Label 178*/ GIMT_Encode4(2551), // Rule ID 285 // |
3954 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
3955 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_XOR' |
3956 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
3957 | // Label 178: @2551 |
3958 | GIM_Try, /*On fail goto*//*Label 179*/ GIMT_Encode4(2574), // Rule ID 88 // |
3959 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
3960 | // MIs[0] dst |
3961 | // No operand predicates |
3962 | // MIs[0] lhs |
3963 | // No operand predicates |
3964 | // MIs[0] Operand 2 |
3965 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3966 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3967 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[3]] |
3968 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3969 | GIR_EraseRootFromParent_Done, |
3970 | // Label 179: @2574 |
3971 | GIM_Reject, |
3972 | // Label 11: @2575 |
3973 | GIM_Try, /*On fail goto*//*Label 180*/ GIMT_Encode4(2586), // Rule ID 118 // |
3974 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule87Enabled), |
3975 | // Combiner Rule #87: extend_through_phis; wip_match_opcode 'G_PHI' |
3976 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner40), |
3977 | // Label 180: @2586 |
3978 | GIM_Reject, |
3979 | // Label 12: @2587 |
3980 | GIM_Try, /*On fail goto*//*Label 181*/ GIMT_Encode4(2598), // Rule ID 81 // |
3981 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule66Enabled), |
3982 | // Combiner Rule #66: unmerge_undef; wip_match_opcode 'G_UNMERGE_VALUES' |
3983 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner29), |
3984 | // Label 181: @2598 |
3985 | GIM_Try, /*On fail goto*//*Label 182*/ GIMT_Encode4(2609), // Rule ID 150 // |
3986 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule113Enabled), |
3987 | // Combiner Rule #113: unmerge_merge; wip_match_opcode 'G_UNMERGE_VALUES' |
3988 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner65), |
3989 | // Label 182: @2609 |
3990 | GIM_Try, /*On fail goto*//*Label 183*/ GIMT_Encode4(2620), // Rule ID 151 // |
3991 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule114Enabled), |
3992 | // Combiner Rule #114: unmerge_cst; wip_match_opcode 'G_UNMERGE_VALUES' |
3993 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner66), |
3994 | // Label 183: @2620 |
3995 | GIM_Try, /*On fail goto*//*Label 184*/ GIMT_Encode4(2631), // Rule ID 152 // |
3996 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule115Enabled), |
3997 | // Combiner Rule #115: unmerge_dead_to_trunc; wip_match_opcode 'G_UNMERGE_VALUES' |
3998 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner67), |
3999 | // Label 184: @2631 |
4000 | GIM_Try, /*On fail goto*//*Label 185*/ GIMT_Encode4(2642), // Rule ID 153 // |
4001 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule116Enabled), |
4002 | // Combiner Rule #116: unmerge_zext_to_zext; wip_match_opcode 'G_UNMERGE_VALUES' |
4003 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner68), |
4004 | // Label 185: @2642 |
4005 | GIM_Reject, |
4006 | // Label 13: @2643 |
4007 | GIM_Try, /*On fail goto*//*Label 186*/ GIMT_Encode4(2654), // Rule ID 154 // |
4008 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule117Enabled), |
4009 | // Combiner Rule #117: merge_unmerge; wip_match_opcode 'G_MERGE_VALUES' |
4010 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner69), |
4011 | // Label 186: @2654 |
4012 | GIM_Reject, |
4013 | // Label 14: @2655 |
4014 | GIM_Try, /*On fail goto*//*Label 187*/ GIMT_Encode4(2666), // Rule ID 54 // |
4015 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule52Enabled), |
4016 | // Combiner Rule #52: extract_all_elts_from_build_vector; wip_match_opcode 'G_BUILD_VECTOR' |
4017 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner16), |
4018 | // Label 187: @2666 |
4019 | GIM_Try, /*On fail goto*//*Label 188*/ GIMT_Encode4(2677), // Rule ID 111 // |
4020 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule80Enabled), |
4021 | // Combiner Rule #80: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR' |
4022 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner36), |
4023 | // Label 188: @2677 |
4024 | GIM_Reject, |
4025 | // Label 15: @2678 |
4026 | GIM_Try, /*On fail goto*//*Label 189*/ GIMT_Encode4(2689), // Rule ID 110 // |
4027 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule80Enabled), |
4028 | // Combiner Rule #80: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC' |
4029 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner36), |
4030 | // Label 189: @2689 |
4031 | GIM_Reject, |
4032 | // Label 16: @2690 |
4033 | GIM_Try, /*On fail goto*//*Label 190*/ GIMT_Encode4(2701), // Rule ID 312 // |
4034 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule181Enabled), |
4035 | // Combiner Rule #181: combine_concat_vector; wip_match_opcode 'G_CONCAT_VECTORS' |
4036 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner123), |
4037 | // Label 190: @2701 |
4038 | GIM_Reject, |
4039 | // Label 17: @2702 |
4040 | GIM_Try, /*On fail goto*//*Label 191*/ GIMT_Encode4(2723), // Rule ID 103 // |
4041 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule74Enabled), |
4042 | // MIs[0] dst |
4043 | // No operand predicates |
4044 | // MIs[0] t |
4045 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4046 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR), |
4047 | // MIs[1] ptr |
4048 | // No operand predicates |
4049 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
4050 | // Combiner Rule #74: i2p_to_p2i |
4051 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner34), |
4052 | // Label 191: @2723 |
4053 | GIM_Reject, |
4054 | // Label 18: @2724 |
4055 | GIM_Try, /*On fail goto*//*Label 192*/ GIMT_Encode4(2735), // Rule ID 102 // |
4056 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled), |
4057 | // Combiner Rule #73: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR' |
4058 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner33), |
4059 | // Label 192: @2735 |
4060 | GIM_Reject, |
4061 | // Label 19: @2736 |
4062 | GIM_Try, /*On fail goto*//*Label 193*/ GIMT_Encode4(2757), // Rule ID 114 // |
4063 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule83Enabled), |
4064 | // MIs[0] dst |
4065 | // No operand predicates |
4066 | // MIs[0] src1 |
4067 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4068 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST), |
4069 | // MIs[1] src0 |
4070 | // No operand predicates |
4071 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
4072 | // Combiner Rule #83: bitcast_bitcast_fold |
4073 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner39), |
4074 | // Label 193: @2757 |
4075 | GIM_Reject, |
4076 | // Label 20: @2758 |
4077 | GIM_Try, /*On fail goto*//*Label 194*/ GIMT_Encode4(2787), // Rule ID 12 // |
4078 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled), |
4079 | // MIs[0] dst |
4080 | // No operand predicates |
4081 | // MIs[0] src |
4082 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4083 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FREEZE), |
4084 | // MIs[1] __idempotent_prop_match_0.x |
4085 | // No operand predicates |
4086 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4087 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
4088 | // Combiner Rule #12: idempotent_prop @ [__idempotent_prop_match_0[0]] |
4089 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4090 | GIR_EraseRootFromParent_Done, |
4091 | // Label 194: @2787 |
4092 | GIM_Try, /*On fail goto*//*Label 195*/ GIMT_Encode4(2810), // Rule ID 50 // |
4093 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule48Enabled), |
4094 | // MIs[0] root |
4095 | // No operand predicates |
4096 | // MIs[0] src |
4097 | // No operand predicates |
4098 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1), |
4099 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4100 | // Combiner Rule #48: freeze_of_non_undef_non_poison |
4101 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4102 | GIR_EraseRootFromParent_Done, |
4103 | // Label 195: @2810 |
4104 | GIM_Try, /*On fail goto*//*Label 196*/ GIMT_Encode4(2821), // Rule ID 51 // |
4105 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule49Enabled), |
4106 | // MIs[0] dst |
4107 | // No operand predicates |
4108 | // MIs[0] src |
4109 | // No operand predicates |
4110 | // Combiner Rule #49: push_freeze_to_prevent_poison_from_propagating |
4111 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
4112 | // Label 196: @2821 |
4113 | GIM_Reject, |
4114 | // Label 21: @2822 |
4115 | GIM_Try, /*On fail goto*//*Label 197*/ GIMT_Encode4(2833), // Rule ID 55 // |
4116 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled), |
4117 | // Combiner Rule #53: extending_loads; wip_match_opcode 'G_LOAD' |
4118 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17), |
4119 | // Label 197: @2833 |
4120 | GIM_Reject, |
4121 | // Label 22: @2834 |
4122 | GIM_Try, /*On fail goto*//*Label 198*/ GIMT_Encode4(2845), // Rule ID 56 // |
4123 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled), |
4124 | // Combiner Rule #53: extending_loads; wip_match_opcode 'G_SEXTLOAD' |
4125 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17), |
4126 | // Label 198: @2845 |
4127 | GIM_Reject, |
4128 | // Label 23: @2846 |
4129 | GIM_Try, /*On fail goto*//*Label 199*/ GIMT_Encode4(2857), // Rule ID 57 // |
4130 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled), |
4131 | // Combiner Rule #53: extending_loads; wip_match_opcode 'G_ZEXTLOAD' |
4132 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17), |
4133 | // Label 199: @2857 |
4134 | GIM_Reject, |
4135 | // Label 24: @2858 |
4136 | GIM_Try, /*On fail goto*//*Label 200*/ GIMT_Encode4(2869), // Rule ID 80 // |
4137 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled), |
4138 | // Combiner Rule #65: erase_undef_store; wip_match_opcode 'G_STORE' |
4139 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner28), |
4140 | // Label 200: @2869 |
4141 | GIM_Reject, |
4142 | // Label 25: @2870 |
4143 | GIM_Try, /*On fail goto*//*Label 201*/ GIMT_Encode4(2881), // Rule ID 104 // |
4144 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule75Enabled), |
4145 | // Combiner Rule #75: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT' |
4146 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner35), |
4147 | // Label 201: @2881 |
4148 | GIM_Try, /*On fail goto*//*Label 202*/ GIMT_Encode4(2892), // Rule ID 145 // |
4149 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled), |
4150 | // Combiner Rule #110: ext_ext_fold; wip_match_opcode 'G_ANYEXT' |
4151 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62), |
4152 | // Label 202: @2892 |
4153 | GIM_Try, /*On fail goto*//*Label 203*/ GIMT_Encode4(2903), // Rule ID 229 // |
4154 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule155Enabled), |
4155 | // Combiner Rule #155: constant_fold_cast_op; wip_match_opcode 'G_ANYEXT' |
4156 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner98), |
4157 | // Label 203: @2903 |
4158 | GIM_Reject, |
4159 | // Label 26: @2904 |
4160 | GIM_Try, /*On fail goto*//*Label 204*/ GIMT_Encode4(2915), // Rule ID 77 // |
4161 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled), |
4162 | // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_TRUNC' |
4163 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25), |
4164 | // Label 204: @2915 |
4165 | GIM_Try, /*On fail goto*//*Label 205*/ GIMT_Encode4(2926), // Rule ID 112 // |
4166 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule81Enabled), |
4167 | // Combiner Rule #81: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC' |
4168 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner37), |
4169 | // Label 205: @2926 |
4170 | GIM_Try, /*On fail goto*//*Label 206*/ GIMT_Encode4(2937), // Rule ID 113 // |
4171 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule82Enabled), |
4172 | // Combiner Rule #82: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC' |
4173 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner38), |
4174 | // Label 206: @2937 |
4175 | GIM_Try, /*On fail goto*//*Label 207*/ GIMT_Encode4(2948), // Rule ID 155 // |
4176 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule118Enabled), |
4177 | // Combiner Rule #118: trunc_ext_fold; wip_match_opcode 'G_TRUNC' |
4178 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70), |
4179 | // Label 207: @2948 |
4180 | GIM_Try, /*On fail goto*//*Label 208*/ GIMT_Encode4(2959), // Rule ID 156 // |
4181 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule119Enabled), |
4182 | // Combiner Rule #119: trunc_shift; wip_match_opcode 'G_TRUNC' |
4183 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71), |
4184 | // Label 208: @2959 |
4185 | GIM_Try, /*On fail goto*//*Label 209*/ GIMT_Encode4(2970), // Rule ID 321 // |
4186 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule189Enabled), |
4187 | // Combiner Rule #189: clamp_i64_to_i16; wip_match_opcode 'G_TRUNC' |
4188 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner129), |
4189 | // Label 209: @2970 |
4190 | GIM_Reject, |
4191 | // Label 27: @2971 |
4192 | GIM_Try, /*On fail goto*//*Label 210*/ GIMT_Encode4(2982), // Rule ID 146 // |
4193 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled), |
4194 | // Combiner Rule #110: ext_ext_fold; wip_match_opcode 'G_SEXT' |
4195 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62), |
4196 | // Label 210: @2982 |
4197 | GIM_Try, /*On fail goto*//*Label 211*/ GIMT_Encode4(2993), // Rule ID 228 // |
4198 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule155Enabled), |
4199 | // Combiner Rule #155: constant_fold_cast_op; wip_match_opcode 'G_SEXT' |
4200 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner98), |
4201 | // Label 211: @2993 |
4202 | GIM_Try, /*On fail goto*//*Label 212*/ GIMT_Encode4(3020), // Rule ID 317 // |
4203 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule185Enabled), |
4204 | // MIs[0] root |
4205 | // No operand predicates |
4206 | // MIs[0] src |
4207 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4208 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_TRUNC), |
4209 | GIM_MIFlags, /*MI*/1, GIMT_Encode4(MachineInstr::NoSWrap), |
4210 | // MIs[1] x |
4211 | // No operand predicates |
4212 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
4213 | // Combiner Rule #185: sext_trunc |
4214 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner125), |
4215 | // Label 212: @3020 |
4216 | GIM_Reject, |
4217 | // Label 28: @3021 |
4218 | GIM_Try, /*On fail goto*//*Label 213*/ GIMT_Encode4(3032), // Rule ID 130 // |
4219 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule95Enabled), |
4220 | // Combiner Rule #95: sext_inreg_of_load; wip_match_opcode 'G_SEXT_INREG' |
4221 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner48), |
4222 | // Label 213: @3032 |
4223 | GIM_Try, /*On fail goto*//*Label 214*/ GIMT_Encode4(3043), // Rule ID 138 // |
4224 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
4225 | // Combiner Rule #103: redundant_sext_inreg; wip_match_opcode 'G_SEXT_INREG' |
4226 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner55), |
4227 | // Label 214: @3043 |
4228 | GIM_Try, /*On fail goto*//*Label 215*/ GIMT_Encode4(3054), // Rule ID 206 // |
4229 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule148Enabled), |
4230 | // Combiner Rule #148: bitfield_extract_from_sext_inreg; wip_match_opcode 'G_SEXT_INREG' |
4231 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner91), |
4232 | // Label 215: @3054 |
4233 | GIM_Try, /*On fail goto*//*Label 216*/ GIMT_Encode4(3065), // Rule ID 144 // |
4234 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule109Enabled), |
4235 | // MIs[0] dst |
4236 | // No operand predicates |
4237 | // MIs[0] src |
4238 | // No operand predicates |
4239 | // MIs[0] imm |
4240 | // No operand predicates |
4241 | // Combiner Rule #109: sext_inreg_to_zext_inreg |
4242 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner61), |
4243 | // Label 216: @3065 |
4244 | GIM_Reject, |
4245 | // Label 29: @3066 |
4246 | GIM_Try, /*On fail goto*//*Label 217*/ GIMT_Encode4(3077), // Rule ID 141 // |
4247 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule106Enabled), |
4248 | // Combiner Rule #106: zext_trunc_fold; wip_match_opcode 'G_ZEXT' |
4249 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner58), |
4250 | // Label 217: @3077 |
4251 | GIM_Try, /*On fail goto*//*Label 218*/ GIMT_Encode4(3088), // Rule ID 147 // |
4252 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled), |
4253 | // Combiner Rule #110: ext_ext_fold; wip_match_opcode 'G_ZEXT' |
4254 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62), |
4255 | // Label 218: @3088 |
4256 | GIM_Try, /*On fail goto*//*Label 219*/ GIMT_Encode4(3099), // Rule ID 227 // |
4257 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule155Enabled), |
4258 | // Combiner Rule #155: constant_fold_cast_op; wip_match_opcode 'G_ZEXT' |
4259 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner98), |
4260 | // Label 219: @3099 |
4261 | GIM_Try, /*On fail goto*//*Label 220*/ GIMT_Encode4(3126), // Rule ID 318 // |
4262 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule186Enabled), |
4263 | // MIs[0] root |
4264 | // No operand predicates |
4265 | // MIs[0] src |
4266 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4267 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_TRUNC), |
4268 | GIM_MIFlags, /*MI*/1, GIMT_Encode4(MachineInstr::NoUWrap), |
4269 | // MIs[1] x |
4270 | // No operand predicates |
4271 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
4272 | // Combiner Rule #186: zext_trunc |
4273 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner126), |
4274 | // Label 220: @3126 |
4275 | GIM_Try, /*On fail goto*//*Label 221*/ GIMT_Encode4(3143), // Rule ID 319 // |
4276 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule187Enabled), |
4277 | GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NonNeg), |
4278 | // MIs[0] root |
4279 | // No operand predicates |
4280 | // MIs[0] x |
4281 | // No operand predicates |
4282 | // Combiner Rule #187: nneg_zext |
4283 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner127), |
4284 | // Label 221: @3143 |
4285 | GIM_Reject, |
4286 | // Label 30: @3144 |
4287 | GIM_Try, /*On fail goto*//*Label 222*/ GIMT_Encode4(3155), // Rule ID 65 // |
4288 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled), |
4289 | // Combiner Rule #59: binop_left_undef_to_zero; wip_match_opcode 'G_SHL' |
4290 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23), |
4291 | // Label 222: @3155 |
4292 | GIM_Try, /*On fail goto*//*Label 223*/ GIMT_Encode4(3166), // Rule ID 68 // |
4293 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled), |
4294 | // Combiner Rule #60: binop_right_undef_to_undef; wip_match_opcode 'G_SHL' |
4295 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24), |
4296 | // Label 223: @3166 |
4297 | GIM_Try, /*On fail goto*//*Label 224*/ GIMT_Encode4(3177), // Rule ID 123 // |
4298 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
4299 | // Combiner Rule #90: shifts_too_big; wip_match_opcode 'G_SHL' |
4300 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43), |
4301 | // Label 224: @3177 |
4302 | GIM_Try, /*On fail goto*//*Label 225*/ GIMT_Encode4(3188), // Rule ID 181 // |
4303 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled), |
4304 | // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_SHL' |
4305 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83), |
4306 | // Label 225: @3188 |
4307 | GIM_Try, /*On fail goto*//*Label 226*/ GIMT_Encode4(3199), // Rule ID 186 // |
4308 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled), |
4309 | // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_SHL' |
4310 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84), |
4311 | // Label 226: @3199 |
4312 | GIM_Try, /*On fail goto*//*Label 227*/ GIMT_Encode4(3210), // Rule ID 205 // |
4313 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule147Enabled), |
4314 | // Combiner Rule #147: commute_shift; wip_match_opcode 'G_SHL' |
4315 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner90), |
4316 | // Label 227: @3210 |
4317 | GIM_Try, /*On fail goto*//*Label 228*/ GIMT_Encode4(3221), // Rule ID 218 // |
4318 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
4319 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_SHL' |
4320 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
4321 | // Label 228: @3221 |
4322 | GIM_Try, /*On fail goto*//*Label 229*/ GIMT_Encode4(3232), // Rule ID 263 // |
4323 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
4324 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SHL' |
4325 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
4326 | // Label 229: @3232 |
4327 | GIM_Try, /*On fail goto*//*Label 230*/ GIMT_Encode4(3267), // Rule ID 48 // |
4328 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule46Enabled), |
4329 | GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap), |
4330 | // MIs[0] root |
4331 | // No operand predicates |
4332 | // MIs[0] left |
4333 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4334 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE), |
4335 | // MIs[1] imm |
4336 | // No operand predicates |
4337 | // MIs[0] x |
4338 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2] |
4339 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
4340 | // MIs[2] imm1 |
4341 | // No operand predicates |
4342 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
4343 | // Combiner Rule #46: shl_of_vscale |
4344 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11), |
4345 | // Label 230: @3267 |
4346 | GIM_Try, /*On fail goto*//*Label 231*/ GIMT_Encode4(3290), // Rule ID 89 // |
4347 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
4348 | // MIs[0] dst |
4349 | // No operand predicates |
4350 | // MIs[0] lhs |
4351 | // No operand predicates |
4352 | // MIs[0] Operand 2 |
4353 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
4354 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4355 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[4]] |
4356 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4357 | GIR_EraseRootFromParent_Done, |
4358 | // Label 231: @3290 |
4359 | GIM_Try, /*On fail goto*//*Label 232*/ GIMT_Encode4(3301), // Rule ID 131 // |
4360 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule96Enabled), |
4361 | // MIs[0] dst |
4362 | // No operand predicates |
4363 | // MIs[0] src0 |
4364 | // No operand predicates |
4365 | // MIs[0] src1 |
4366 | // No operand predicates |
4367 | // Combiner Rule #96: reduce_shl_of_extend |
4368 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner49), |
4369 | // Label 232: @3301 |
4370 | GIM_Reject, |
4371 | // Label 31: @3302 |
4372 | GIM_Try, /*On fail goto*//*Label 233*/ GIMT_Encode4(3313), // Rule ID 70 // |
4373 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled), |
4374 | // Combiner Rule #60: binop_right_undef_to_undef; wip_match_opcode 'G_LSHR' |
4375 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24), |
4376 | // Label 233: @3313 |
4377 | GIM_Try, /*On fail goto*//*Label 234*/ GIMT_Encode4(3324), // Rule ID 125 // |
4378 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
4379 | // Combiner Rule #90: shifts_too_big; wip_match_opcode 'G_LSHR' |
4380 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43), |
4381 | // Label 234: @3324 |
4382 | GIM_Try, /*On fail goto*//*Label 235*/ GIMT_Encode4(3335), // Rule ID 183 // |
4383 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled), |
4384 | // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_LSHR' |
4385 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83), |
4386 | // Label 235: @3335 |
4387 | GIM_Try, /*On fail goto*//*Label 236*/ GIMT_Encode4(3346), // Rule ID 188 // |
4388 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled), |
4389 | // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_LSHR' |
4390 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84), |
4391 | // Label 236: @3346 |
4392 | GIM_Try, /*On fail goto*//*Label 237*/ GIMT_Encode4(3357), // Rule ID 209 // |
4393 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule150Enabled), |
4394 | // Combiner Rule #150: bitfield_extract_from_shr; wip_match_opcode 'G_LSHR' |
4395 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner93), |
4396 | // Label 237: @3357 |
4397 | GIM_Try, /*On fail goto*//*Label 238*/ GIMT_Encode4(3368), // Rule ID 211 // |
4398 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule151Enabled), |
4399 | // Combiner Rule #151: bitfield_extract_from_shr_and; wip_match_opcode 'G_LSHR' |
4400 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner94), |
4401 | // Label 238: @3368 |
4402 | GIM_Try, /*On fail goto*//*Label 239*/ GIMT_Encode4(3379), // Rule ID 219 // |
4403 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
4404 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_LSHR' |
4405 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
4406 | // Label 239: @3379 |
4407 | GIM_Try, /*On fail goto*//*Label 240*/ GIMT_Encode4(3390), // Rule ID 261 // |
4408 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
4409 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_LSHR' |
4410 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
4411 | // Label 240: @3390 |
4412 | GIM_Try, /*On fail goto*//*Label 241*/ GIMT_Encode4(3413), // Rule ID 91 // |
4413 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
4414 | // MIs[0] dst |
4415 | // No operand predicates |
4416 | // MIs[0] lhs |
4417 | // No operand predicates |
4418 | // MIs[0] Operand 2 |
4419 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
4420 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4421 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[6]] |
4422 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4423 | GIR_EraseRootFromParent_Done, |
4424 | // Label 241: @3413 |
4425 | GIM_Reject, |
4426 | // Label 32: @3414 |
4427 | GIM_Try, /*On fail goto*//*Label 242*/ GIMT_Encode4(3425), // Rule ID 69 // |
4428 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled), |
4429 | // Combiner Rule #60: binop_right_undef_to_undef; wip_match_opcode 'G_ASHR' |
4430 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24), |
4431 | // Label 242: @3425 |
4432 | GIM_Try, /*On fail goto*//*Label 243*/ GIMT_Encode4(3436), // Rule ID 124 // |
4433 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
4434 | // Combiner Rule #90: shifts_too_big; wip_match_opcode 'G_ASHR' |
4435 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43), |
4436 | // Label 243: @3436 |
4437 | GIM_Try, /*On fail goto*//*Label 244*/ GIMT_Encode4(3447), // Rule ID 129 // |
4438 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule94Enabled), |
4439 | // Combiner Rule #94: shl_ashr_to_sext_inreg; wip_match_opcode 'G_ASHR' |
4440 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner47), |
4441 | // Label 244: @3447 |
4442 | GIM_Try, /*On fail goto*//*Label 245*/ GIMT_Encode4(3458), // Rule ID 182 // |
4443 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled), |
4444 | // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_ASHR' |
4445 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83), |
4446 | // Label 245: @3458 |
4447 | GIM_Try, /*On fail goto*//*Label 246*/ GIMT_Encode4(3469), // Rule ID 187 // |
4448 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled), |
4449 | // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_ASHR' |
4450 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84), |
4451 | // Label 246: @3469 |
4452 | GIM_Try, /*On fail goto*//*Label 247*/ GIMT_Encode4(3480), // Rule ID 208 // |
4453 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule150Enabled), |
4454 | // Combiner Rule #150: bitfield_extract_from_shr; wip_match_opcode 'G_ASHR' |
4455 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner93), |
4456 | // Label 247: @3480 |
4457 | GIM_Try, /*On fail goto*//*Label 248*/ GIMT_Encode4(3491), // Rule ID 210 // |
4458 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule151Enabled), |
4459 | // Combiner Rule #151: bitfield_extract_from_shr_and; wip_match_opcode 'G_ASHR' |
4460 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner94), |
4461 | // Label 248: @3491 |
4462 | GIM_Try, /*On fail goto*//*Label 249*/ GIMT_Encode4(3502), // Rule ID 220 // |
4463 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled), |
4464 | // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_ASHR' |
4465 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95), |
4466 | // Label 249: @3502 |
4467 | GIM_Try, /*On fail goto*//*Label 250*/ GIMT_Encode4(3513), // Rule ID 262 // |
4468 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
4469 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_ASHR' |
4470 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
4471 | // Label 250: @3513 |
4472 | GIM_Try, /*On fail goto*//*Label 251*/ GIMT_Encode4(3536), // Rule ID 90 // |
4473 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
4474 | // MIs[0] dst |
4475 | // No operand predicates |
4476 | // MIs[0] lhs |
4477 | // No operand predicates |
4478 | // MIs[0] Operand 2 |
4479 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
4480 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4481 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[5]] |
4482 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4483 | GIR_EraseRootFromParent_Done, |
4484 | // Label 251: @3536 |
4485 | GIM_Reject, |
4486 | // Label 33: @3537 |
4487 | GIM_Try, /*On fail goto*//*Label 252*/ GIMT_Encode4(3548), // Rule ID 197 // |
4488 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule141Enabled), |
4489 | // Combiner Rule #141: funnel_shift_to_rotate; wip_match_opcode 'G_FSHL' |
4490 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner88), |
4491 | // Label 252: @3548 |
4492 | GIM_Try, /*On fail goto*//*Label 253*/ GIMT_Encode4(3559), // Rule ID 201 // |
4493 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule144Enabled), |
4494 | // Combiner Rule #144: funnel_shift_overshift; wip_match_opcode 'G_FSHL' |
4495 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner89), |
4496 | // Label 253: @3559 |
4497 | GIM_Try, /*On fail goto*//*Label 254*/ GIMT_Encode4(3579), // Rule ID 200 // |
4498 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule143Enabled), |
4499 | // MIs[0] x |
4500 | // No operand predicates |
4501 | // MIs[0] y |
4502 | // No operand predicates |
4503 | // MIs[0] z |
4504 | // No operand predicates |
4505 | // MIs[0] Operand 3 |
4506 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/3, 0, |
4507 | // Combiner Rule #143: funnel_shift_left_zero |
4508 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY), |
4509 | GIR_RootToRootCopy, /*OpIdx*/0, // x |
4510 | GIR_RootToRootCopy, /*OpIdx*/1, // y |
4511 | GIR_EraseRootFromParent_Done, |
4512 | // Label 254: @3579 |
4513 | GIM_Reject, |
4514 | // Label 34: @3580 |
4515 | GIM_Try, /*On fail goto*//*Label 255*/ GIMT_Encode4(3591), // Rule ID 198 // |
4516 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule141Enabled), |
4517 | // Combiner Rule #141: funnel_shift_to_rotate; wip_match_opcode 'G_FSHR' |
4518 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner88), |
4519 | // Label 255: @3591 |
4520 | GIM_Try, /*On fail goto*//*Label 256*/ GIMT_Encode4(3602), // Rule ID 202 // |
4521 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule144Enabled), |
4522 | // Combiner Rule #144: funnel_shift_overshift; wip_match_opcode 'G_FSHR' |
4523 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner89), |
4524 | // Label 256: @3602 |
4525 | GIM_Try, /*On fail goto*//*Label 257*/ GIMT_Encode4(3622), // Rule ID 199 // |
4526 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule142Enabled), |
4527 | // MIs[0] x |
4528 | // No operand predicates |
4529 | // MIs[0] y |
4530 | // No operand predicates |
4531 | // MIs[0] z |
4532 | // No operand predicates |
4533 | // MIs[0] Operand 3 |
4534 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/3, 0, |
4535 | // Combiner Rule #142: funnel_shift_right_zero |
4536 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY), |
4537 | GIR_RootToRootCopy, /*OpIdx*/0, // x |
4538 | GIR_RootToRootCopy, /*OpIdx*/2, // z |
4539 | GIR_EraseRootFromParent_Done, |
4540 | // Label 257: @3622 |
4541 | GIM_Reject, |
4542 | // Label 35: @3623 |
4543 | GIM_Try, /*On fail goto*//*Label 258*/ GIMT_Encode4(3646), // Rule ID 94 // |
4544 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
4545 | // MIs[0] dst |
4546 | // No operand predicates |
4547 | // MIs[0] lhs |
4548 | // No operand predicates |
4549 | // MIs[0] Operand 2 |
4550 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
4551 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4552 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[9]] |
4553 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4554 | GIR_EraseRootFromParent_Done, |
4555 | // Label 258: @3646 |
4556 | GIM_Reject, |
4557 | // Label 36: @3647 |
4558 | GIM_Try, /*On fail goto*//*Label 259*/ GIMT_Encode4(3670), // Rule ID 93 // |
4559 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
4560 | // MIs[0] dst |
4561 | // No operand predicates |
4562 | // MIs[0] lhs |
4563 | // No operand predicates |
4564 | // MIs[0] Operand 2 |
4565 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
4566 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4567 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[8]] |
4568 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4569 | GIR_EraseRootFromParent_Done, |
4570 | // Label 259: @3670 |
4571 | GIM_Reject, |
4572 | // Label 37: @3671 |
4573 | GIM_Try, /*On fail goto*//*Label 260*/ GIMT_Encode4(3682), // Rule ID 142 // |
4574 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule107Enabled), |
4575 | // Combiner Rule #107: icmp_to_true_false_known_bits; wip_match_opcode 'G_ICMP' |
4576 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner59), |
4577 | // Label 260: @3682 |
4578 | GIM_Try, /*On fail goto*//*Label 261*/ GIMT_Encode4(3693), // Rule ID 143 // |
4579 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule108Enabled), |
4580 | // Combiner Rule #108: icmp_to_lhs_known_bits; wip_match_opcode 'G_ICMP' |
4581 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60), |
4582 | // Label 261: @3693 |
4583 | GIM_Try, /*On fail goto*//*Label 262*/ GIMT_Encode4(3704), // Rule ID 279 // |
4584 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule175Enabled), |
4585 | // Combiner Rule #175: redundant_binop_in_equality; wip_match_opcode 'G_ICMP' |
4586 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner117), |
4587 | // Label 262: @3704 |
4588 | GIM_Reject, |
4589 | // Label 38: @3705 |
4590 | GIM_Try, /*On fail goto*//*Label 263*/ GIMT_Encode4(3716), // Rule ID 84 // |
4591 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled), |
4592 | // Combiner Rule #68: select_same_val; wip_match_opcode 'G_SELECT' |
4593 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner31), |
4594 | // Label 263: @3716 |
4595 | GIM_Try, /*On fail goto*//*Label 264*/ GIMT_Encode4(3727), // Rule ID 134 // |
4596 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule99Enabled), |
4597 | // Combiner Rule #99: select_constant_cmp; wip_match_opcode 'G_SELECT' |
4598 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner51), |
4599 | // Label 264: @3727 |
4600 | GIM_Try, /*On fail goto*//*Label 265*/ GIMT_Encode4(3738), // Rule ID 136 // |
4601 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule101Enabled), |
4602 | // Combiner Rule #101: match_selects; wip_match_opcode 'G_SELECT' |
4603 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner53), |
4604 | // Label 265: @3738 |
4605 | GIM_Try, /*On fail goto*//*Label 266*/ GIMT_Encode4(3749), // Rule ID 278 // |
4606 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule174Enabled), |
4607 | // Combiner Rule #174: select_to_minmax; wip_match_opcode 'G_SELECT' |
4608 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner116), |
4609 | // Label 266: @3749 |
4610 | GIM_Try, /*On fail goto*//*Label 267*/ GIMT_Encode4(3770), // Rule ID 135 // |
4611 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled), |
4612 | // MIs[0] root |
4613 | // No operand predicates |
4614 | // MIs[0] tst |
4615 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4616 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ICMP), |
4617 | // MIs[1] tst1 |
4618 | // No operand predicates |
4619 | // MIs[1] a |
4620 | // No operand predicates |
4621 | // MIs[1] b |
4622 | // No operand predicates |
4623 | // MIs[0] x |
4624 | // No operand predicates |
4625 | // MIs[0] y |
4626 | // No operand predicates |
4627 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
4628 | // Combiner Rule #100: select_to_iminmax |
4629 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner52), |
4630 | // Label 267: @3770 |
4631 | GIM_Try, /*On fail goto*//*Label 268*/ GIMT_Encode4(3799), // Rule ID 133 // |
4632 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule98Enabled), |
4633 | // MIs[0] dst |
4634 | // No operand predicates |
4635 | // MIs[0] undef |
4636 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4637 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
4638 | // MIs[0] x |
4639 | // No operand predicates |
4640 | // MIs[0] y |
4641 | // No operand predicates |
4642 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3, |
4643 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
4644 | // Combiner Rule #98: select_undef_cmp |
4645 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3, |
4646 | GIR_EraseRootFromParent_Done, |
4647 | // Label 268: @3799 |
4648 | GIM_Reject, |
4649 | // Label 39: @3800 |
4650 | GIM_Try, /*On fail goto*//*Label 269*/ GIMT_Encode4(3811), // Rule ID 290 // |
4651 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4652 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDO' |
4653 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4654 | // Label 269: @3811 |
4655 | GIM_Try, /*On fail goto*//*Label 270*/ GIMT_Encode4(3822), // Rule ID 316 // |
4656 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule184Enabled), |
4657 | // Combiner Rule #184: match_addos; wip_match_opcode 'G_UADDO' |
4658 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner124), |
4659 | // Label 270: @3822 |
4660 | GIM_Reject, |
4661 | // Label 40: @3823 |
4662 | GIM_Try, /*On fail goto*//*Label 271*/ GIMT_Encode4(3834), // Rule ID 170 // |
4663 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled), |
4664 | // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_UADDE' |
4665 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78), |
4666 | // Label 271: @3834 |
4667 | GIM_Reject, |
4668 | // Label 41: @3835 |
4669 | GIM_Try, /*On fail goto*//*Label 272*/ GIMT_Encode4(3846), // Rule ID 172 // |
4670 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled), |
4671 | // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_USUBE' |
4672 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78), |
4673 | // Label 272: @3846 |
4674 | GIM_Reject, |
4675 | // Label 42: @3847 |
4676 | GIM_Try, /*On fail goto*//*Label 273*/ GIMT_Encode4(3858), // Rule ID 291 // |
4677 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4678 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDO' |
4679 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4680 | // Label 273: @3858 |
4681 | GIM_Try, /*On fail goto*//*Label 274*/ GIMT_Encode4(3869), // Rule ID 315 // |
4682 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule184Enabled), |
4683 | // Combiner Rule #184: match_addos; wip_match_opcode 'G_SADDO' |
4684 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner124), |
4685 | // Label 274: @3869 |
4686 | GIM_Reject, |
4687 | // Label 43: @3870 |
4688 | GIM_Try, /*On fail goto*//*Label 275*/ GIMT_Encode4(3881), // Rule ID 171 // |
4689 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled), |
4690 | // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_SADDE' |
4691 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78), |
4692 | // Label 275: @3881 |
4693 | GIM_Reject, |
4694 | // Label 44: @3882 |
4695 | GIM_Try, /*On fail goto*//*Label 276*/ GIMT_Encode4(3893), // Rule ID 173 // |
4696 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled), |
4697 | // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_SSUBE' |
4698 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78), |
4699 | // Label 276: @3893 |
4700 | GIM_Reject, |
4701 | // Label 45: @3894 |
4702 | GIM_Try, /*On fail goto*//*Label 277*/ GIMT_Encode4(3905), // Rule ID 166 // |
4703 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule129Enabled), |
4704 | // Combiner Rule #129: mulo_by_2; wip_match_opcode 'G_UMULO' |
4705 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner76), |
4706 | // Label 277: @3905 |
4707 | GIM_Try, /*On fail goto*//*Label 278*/ GIMT_Encode4(3916), // Rule ID 168 // |
4708 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule130Enabled), |
4709 | // Combiner Rule #130: mulo_by_0; wip_match_opcode 'G_UMULO' |
4710 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner77), |
4711 | // Label 278: @3916 |
4712 | GIM_Try, /*On fail goto*//*Label 279*/ GIMT_Encode4(3927), // Rule ID 292 // |
4713 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4714 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULO' |
4715 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4716 | // Label 279: @3927 |
4717 | GIM_Reject, |
4718 | // Label 46: @3928 |
4719 | GIM_Try, /*On fail goto*//*Label 280*/ GIMT_Encode4(3939), // Rule ID 167 // |
4720 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule129Enabled), |
4721 | // Combiner Rule #129: mulo_by_2; wip_match_opcode 'G_SMULO' |
4722 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner76), |
4723 | // Label 280: @3939 |
4724 | GIM_Try, /*On fail goto*//*Label 281*/ GIMT_Encode4(3950), // Rule ID 169 // |
4725 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule130Enabled), |
4726 | // Combiner Rule #130: mulo_by_0; wip_match_opcode 'G_SMULO' |
4727 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner77), |
4728 | // Label 281: @3950 |
4729 | GIM_Try, /*On fail goto*//*Label 282*/ GIMT_Encode4(3961), // Rule ID 293 // |
4730 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4731 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULO' |
4732 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4733 | // Label 282: @3961 |
4734 | GIM_Reject, |
4735 | // Label 47: @3962 |
4736 | GIM_Try, /*On fail goto*//*Label 283*/ GIMT_Encode4(3973), // Rule ID 235 // |
4737 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule161Enabled), |
4738 | // Combiner Rule #161: mulh_to_lshr; wip_match_opcode 'G_UMULH' |
4739 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner103), |
4740 | // Label 283: @3973 |
4741 | GIM_Try, /*On fail goto*//*Label 284*/ GIMT_Encode4(3984), // Rule ID 294 // |
4742 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4743 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULH' |
4744 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4745 | // Label 284: @3984 |
4746 | GIM_Reject, |
4747 | // Label 48: @3985 |
4748 | GIM_Try, /*On fail goto*//*Label 285*/ GIMT_Encode4(3996), // Rule ID 295 // |
4749 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4750 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULH' |
4751 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4752 | // Label 285: @3996 |
4753 | GIM_Reject, |
4754 | // Label 49: @3997 |
4755 | GIM_Try, /*On fail goto*//*Label 286*/ GIMT_Encode4(4008), // Rule ID 296 // |
4756 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4757 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDSAT' |
4758 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4759 | // Label 286: @4008 |
4760 | GIM_Reject, |
4761 | // Label 50: @4009 |
4762 | GIM_Try, /*On fail goto*//*Label 287*/ GIMT_Encode4(4020), // Rule ID 297 // |
4763 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4764 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDSAT' |
4765 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4766 | // Label 287: @4020 |
4767 | GIM_Reject, |
4768 | // Label 51: @4021 |
4769 | GIM_Try, /*On fail goto*//*Label 288*/ GIMT_Encode4(4032), // Rule ID 185 // |
4770 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled), |
4771 | // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_USHLSAT' |
4772 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83), |
4773 | // Label 288: @4032 |
4774 | GIM_Try, /*On fail goto*//*Label 289*/ GIMT_Encode4(4043), // Rule ID 189 // |
4775 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled), |
4776 | // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_USHLSAT' |
4777 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84), |
4778 | // Label 289: @4043 |
4779 | GIM_Reject, |
4780 | // Label 52: @4044 |
4781 | GIM_Try, /*On fail goto*//*Label 290*/ GIMT_Encode4(4055), // Rule ID 184 // |
4782 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled), |
4783 | // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_SSHLSAT' |
4784 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83), |
4785 | // Label 290: @4055 |
4786 | GIM_Try, /*On fail goto*//*Label 291*/ GIMT_Encode4(4066), // Rule ID 190 // |
4787 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled), |
4788 | // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_SSHLSAT' |
4789 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84), |
4790 | // Label 291: @4066 |
4791 | GIM_Reject, |
4792 | // Label 53: @4067 |
4793 | GIM_Try, /*On fail goto*//*Label 292*/ GIMT_Encode4(4078), // Rule ID 298 // |
4794 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4795 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIX' |
4796 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4797 | // Label 292: @4078 |
4798 | GIM_Reject, |
4799 | // Label 54: @4079 |
4800 | GIM_Try, /*On fail goto*//*Label 293*/ GIMT_Encode4(4090), // Rule ID 299 // |
4801 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4802 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIX' |
4803 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4804 | // Label 293: @4090 |
4805 | GIM_Reject, |
4806 | // Label 55: @4091 |
4807 | GIM_Try, /*On fail goto*//*Label 294*/ GIMT_Encode4(4102), // Rule ID 300 // |
4808 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4809 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIXSAT' |
4810 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4811 | // Label 294: @4102 |
4812 | GIM_Reject, |
4813 | // Label 56: @4103 |
4814 | GIM_Try, /*On fail goto*//*Label 295*/ GIMT_Encode4(4114), // Rule ID 301 // |
4815 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
4816 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIXSAT' |
4817 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
4818 | // Label 295: @4114 |
4819 | GIM_Reject, |
4820 | // Label 57: @4115 |
4821 | GIM_Try, /*On fail goto*//*Label 296*/ GIMT_Encode4(4126), // Rule ID 221 // |
4822 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled), |
4823 | // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FADD' |
4824 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96), |
4825 | // Label 296: @4126 |
4826 | GIM_Try, /*On fail goto*//*Label 297*/ GIMT_Encode4(4137), // Rule ID 236 // |
4827 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled), |
4828 | // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FADD' |
4829 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104), |
4830 | // Label 297: @4137 |
4831 | GIM_Try, /*On fail goto*//*Label 298*/ GIMT_Encode4(4148), // Rule ID 243 // |
4832 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule164Enabled), |
4833 | // Combiner Rule #164: combine_fadd_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
4834 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner106), |
4835 | // Label 298: @4148 |
4836 | GIM_Try, /*On fail goto*//*Label 299*/ GIMT_Encode4(4159), // Rule ID 244 // |
4837 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule165Enabled), |
4838 | // Combiner Rule #165: combine_fadd_fpext_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
4839 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner107), |
4840 | // Label 299: @4159 |
4841 | GIM_Try, /*On fail goto*//*Label 300*/ GIMT_Encode4(4170), // Rule ID 245 // |
4842 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule166Enabled), |
4843 | // Combiner Rule #166: combine_fadd_fma_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
4844 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner108), |
4845 | // Label 300: @4170 |
4846 | GIM_Try, /*On fail goto*//*Label 301*/ GIMT_Encode4(4181), // Rule ID 246 // |
4847 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule167Enabled), |
4848 | // Combiner Rule #167: combine_fadd_fpext_fma_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
4849 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner109), |
4850 | // Label 301: @4181 |
4851 | GIM_Try, /*On fail goto*//*Label 302*/ GIMT_Encode4(4192), // Rule ID 269 // |
4852 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
4853 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FADD' |
4854 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
4855 | // Label 302: @4192 |
4856 | GIM_Try, /*On fail goto*//*Label 303*/ GIMT_Encode4(4203), // Rule ID 302 // |
4857 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
4858 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FADD' |
4859 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
4860 | // Label 303: @4203 |
4861 | GIM_Try, /*On fail goto*//*Label 304*/ GIMT_Encode4(4226), // Rule ID 116 // |
4862 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule85Enabled), |
4863 | // MIs[0] dst |
4864 | // No operand predicates |
4865 | // MIs[0] x |
4866 | // No operand predicates |
4867 | // MIs[0] y |
4868 | // No operand predicates |
4869 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3), |
4870 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4871 | // Combiner Rule #85: right_identity_neg_zero_fp |
4872 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4873 | GIR_EraseRootFromParent_Done, |
4874 | // Label 304: @4226 |
4875 | GIM_Reject, |
4876 | // Label 58: @4227 |
4877 | GIM_Try, /*On fail goto*//*Label 305*/ GIMT_Encode4(4238), // Rule ID 222 // |
4878 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled), |
4879 | // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FSUB' |
4880 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96), |
4881 | // Label 305: @4238 |
4882 | GIM_Try, /*On fail goto*//*Label 306*/ GIMT_Encode4(4249), // Rule ID 237 // |
4883 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled), |
4884 | // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FSUB' |
4885 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104), |
4886 | // Label 306: @4249 |
4887 | GIM_Try, /*On fail goto*//*Label 307*/ GIMT_Encode4(4260), // Rule ID 247 // |
4888 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule168Enabled), |
4889 | // Combiner Rule #168: combine_fsub_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
4890 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner110), |
4891 | // Label 307: @4260 |
4892 | GIM_Try, /*On fail goto*//*Label 308*/ GIMT_Encode4(4271), // Rule ID 248 // |
4893 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule169Enabled), |
4894 | // Combiner Rule #169: combine_fsub_fneg_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
4895 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner111), |
4896 | // Label 308: @4271 |
4897 | GIM_Try, /*On fail goto*//*Label 309*/ GIMT_Encode4(4282), // Rule ID 249 // |
4898 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule170Enabled), |
4899 | // Combiner Rule #170: combine_fsub_fpext_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
4900 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner112), |
4901 | // Label 309: @4282 |
4902 | GIM_Try, /*On fail goto*//*Label 310*/ GIMT_Encode4(4293), // Rule ID 250 // |
4903 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule171Enabled), |
4904 | // Combiner Rule #171: combine_fsub_fpext_fneg_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
4905 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner113), |
4906 | // Label 310: @4293 |
4907 | GIM_Try, /*On fail goto*//*Label 311*/ GIMT_Encode4(4304), // Rule ID 270 // |
4908 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
4909 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FSUB' |
4910 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
4911 | // Label 311: @4304 |
4912 | GIM_Try, /*On fail goto*//*Label 312*/ GIMT_Encode4(4315), // Rule ID 280 // |
4913 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule176Enabled), |
4914 | // Combiner Rule #176: fsub_to_fneg; wip_match_opcode 'G_FSUB' |
4915 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner118), |
4916 | // Label 312: @4315 |
4917 | GIM_Reject, |
4918 | // Label 59: @4316 |
4919 | GIM_Try, /*On fail goto*//*Label 313*/ GIMT_Encode4(4327), // Rule ID 223 // |
4920 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled), |
4921 | // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FMUL' |
4922 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96), |
4923 | // Label 313: @4327 |
4924 | GIM_Try, /*On fail goto*//*Label 314*/ GIMT_Encode4(4338), // Rule ID 238 // |
4925 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled), |
4926 | // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FMUL' |
4927 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104), |
4928 | // Label 314: @4338 |
4929 | GIM_Try, /*On fail goto*//*Label 315*/ GIMT_Encode4(4349), // Rule ID 268 // |
4930 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
4931 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMUL' |
4932 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
4933 | // Label 315: @4349 |
4934 | GIM_Try, /*On fail goto*//*Label 316*/ GIMT_Encode4(4360), // Rule ID 303 // |
4935 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
4936 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMUL' |
4937 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
4938 | // Label 316: @4360 |
4939 | GIM_Try, /*On fail goto*//*Label 317*/ GIMT_Encode4(4383), // Rule ID 107 // |
4940 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule78Enabled), |
4941 | // MIs[0] dst |
4942 | // No operand predicates |
4943 | // MIs[0] x |
4944 | // No operand predicates |
4945 | // MIs[0] y |
4946 | // No operand predicates |
4947 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2), |
4948 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4949 | // Combiner Rule #78: right_identity_one_fp |
4950 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4951 | GIR_EraseRootFromParent_Done, |
4952 | // Label 317: @4383 |
4953 | GIM_Try, /*On fail goto*//*Label 318*/ GIMT_Encode4(4403), // Rule ID 117 // |
4954 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule86Enabled), |
4955 | // MIs[0] dst |
4956 | // No operand predicates |
4957 | // MIs[0] x |
4958 | // No operand predicates |
4959 | // MIs[0] y |
4960 | // No operand predicates |
4961 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner4), |
4962 | // Combiner Rule #86: right_identity_neg_one_fp |
4963 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG), |
4964 | GIR_RootToRootCopy, /*OpIdx*/0, // dst |
4965 | GIR_RootToRootCopy, /*OpIdx*/1, // x |
4966 | GIR_EraseRootFromParent_Done, |
4967 | // Label 318: @4403 |
4968 | GIM_Reject, |
4969 | // Label 60: @4404 |
4970 | GIM_Try, /*On fail goto*//*Label 319*/ GIMT_Encode4(4415), // Rule ID 226 // |
4971 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule154Enabled), |
4972 | // Combiner Rule #154: constant_fold_fma; wip_match_opcode 'G_FMA' |
4973 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner97), |
4974 | // Label 319: @4415 |
4975 | GIM_Try, /*On fail goto*//*Label 320*/ GIMT_Encode4(4426), // Rule ID 241 // |
4976 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled), |
4977 | // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FMA' |
4978 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104), |
4979 | // Label 320: @4426 |
4980 | GIM_Reject, |
4981 | // Label 61: @4427 |
4982 | GIM_Try, /*On fail goto*//*Label 321*/ GIMT_Encode4(4438), // Rule ID 225 // |
4983 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule154Enabled), |
4984 | // Combiner Rule #154: constant_fold_fma; wip_match_opcode 'G_FMAD' |
4985 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner97), |
4986 | // Label 321: @4438 |
4987 | GIM_Try, /*On fail goto*//*Label 322*/ GIMT_Encode4(4449), // Rule ID 240 // |
4988 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled), |
4989 | // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FMAD' |
4990 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104), |
4991 | // Label 322: @4449 |
4992 | GIM_Reject, |
4993 | // Label 62: @4450 |
4994 | GIM_Try, /*On fail goto*//*Label 323*/ GIMT_Encode4(4461), // Rule ID 224 // |
4995 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled), |
4996 | // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FDIV' |
4997 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96), |
4998 | // Label 323: @4461 |
4999 | GIM_Try, /*On fail goto*//*Label 324*/ GIMT_Encode4(4472), // Rule ID 239 // |
5000 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled), |
5001 | // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FDIV' |
5002 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104), |
5003 | // Label 324: @4472 |
5004 | GIM_Try, /*On fail goto*//*Label 325*/ GIMT_Encode4(4483), // Rule ID 271 // |
5005 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5006 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FDIV' |
5007 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5008 | // Label 325: @4483 |
5009 | GIM_Reject, |
5010 | // Label 63: @4484 |
5011 | GIM_Try, /*On fail goto*//*Label 326*/ GIMT_Encode4(4495), // Rule ID 272 // |
5012 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5013 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FREM' |
5014 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5015 | // Label 326: @4495 |
5016 | GIM_Reject, |
5017 | // Label 64: @4496 |
5018 | GIM_Try, /*On fail goto*//*Label 327*/ GIMT_Encode4(4517), // Rule ID 178 // |
5019 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule133Enabled), |
5020 | // MIs[0] dst |
5021 | // No operand predicates |
5022 | // MIs[0] float |
5023 | // No operand predicates |
5024 | // MIs[0] int |
5025 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
5026 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
5027 | // MIs[1] imm |
5028 | // No operand predicates |
5029 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5030 | // Combiner Rule #133: expand_const_fpowi |
5031 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner80), |
5032 | // Label 327: @4517 |
5033 | GIM_Reject, |
5034 | // Label 65: @4518 |
5035 | GIM_Try, /*On fail goto*//*Label 328*/ GIMT_Encode4(4539), // Rule ID 160 // |
5036 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule123Enabled), |
5037 | // MIs[0] dst |
5038 | // No operand predicates |
5039 | // MIs[0] src0 |
5040 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5041 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
5042 | // MIs[1] cst |
5043 | // No operand predicates |
5044 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5045 | // Combiner Rule #123: constant_fold_flog2 |
5046 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72), |
5047 | // Label 328: @4539 |
5048 | GIM_Reject, |
5049 | // Label 66: @4540 |
5050 | GIM_Try, /*On fail goto*//*Label 329*/ GIMT_Encode4(4551), // Rule ID 322 // |
5051 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule190Enabled), |
5052 | // Combiner Rule #190: foldable_fneg; wip_match_opcode 'G_FNEG' |
5053 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner130), |
5054 | // Label 329: @4551 |
5055 | GIM_Try, /*On fail goto*//*Label 330*/ GIMT_Encode4(4572), // Rule ID 157 // |
5056 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule120Enabled), |
5057 | // MIs[0] dst |
5058 | // No operand predicates |
5059 | // MIs[0] src0 |
5060 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5061 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
5062 | // MIs[1] cst |
5063 | // No operand predicates |
5064 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5065 | // Combiner Rule #120: constant_fold_fneg |
5066 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72), |
5067 | // Label 330: @4572 |
5068 | GIM_Try, /*On fail goto*//*Label 331*/ GIMT_Encode4(4601), // Rule ID 105 // |
5069 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule76Enabled), |
5070 | // MIs[0] dst |
5071 | // No operand predicates |
5072 | // MIs[0] t |
5073 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5074 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG), |
5075 | // MIs[1] src |
5076 | // No operand predicates |
5077 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
5078 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5079 | // Combiner Rule #76: fneg_fneg_fold |
5080 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
5081 | GIR_EraseRootFromParent_Done, |
5082 | // Label 331: @4601 |
5083 | GIM_Reject, |
5084 | // Label 67: @4602 |
5085 | GIM_Try, /*On fail goto*//*Label 332*/ GIMT_Encode4(4623), // Rule ID 161 // |
5086 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule124Enabled), |
5087 | // MIs[0] dst |
5088 | // No operand predicates |
5089 | // MIs[0] src0 |
5090 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5091 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
5092 | // MIs[1] cst |
5093 | // No operand predicates |
5094 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5095 | // Combiner Rule #124: constant_fold_fptrunc |
5096 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72), |
5097 | // Label 332: @4623 |
5098 | GIM_Try, /*On fail goto*//*Label 333*/ GIMT_Encode4(4644), // Rule ID 115 // |
5099 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule84Enabled), |
5100 | // MIs[0] dst |
5101 | // No operand predicates |
5102 | // MIs[0] src1 |
5103 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5104 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT), |
5105 | // MIs[1] src0 |
5106 | // No operand predicates |
5107 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5108 | // Combiner Rule #84: fptrunc_fpext_fold |
5109 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner39), |
5110 | // Label 333: @4644 |
5111 | GIM_Reject, |
5112 | // Label 68: @4645 |
5113 | GIM_Try, /*On fail goto*//*Label 334*/ GIMT_Encode4(4656), // Rule ID 73 // |
5114 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled), |
5115 | // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_FPTOSI' |
5116 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25), |
5117 | // Label 334: @4656 |
5118 | GIM_Reject, |
5119 | // Label 69: @4657 |
5120 | GIM_Try, /*On fail goto*//*Label 335*/ GIMT_Encode4(4668), // Rule ID 74 // |
5121 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled), |
5122 | // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_FPTOUI' |
5123 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25), |
5124 | // Label 335: @4668 |
5125 | GIM_Reject, |
5126 | // Label 70: @4669 |
5127 | GIM_Try, /*On fail goto*//*Label 336*/ GIMT_Encode4(4680), // Rule ID 61 // |
5128 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled), |
5129 | // Combiner Rule #56: undef_to_fp_zero; wip_match_opcode 'G_SITOFP' |
5130 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner20), |
5131 | // Label 336: @4680 |
5132 | GIM_Try, /*On fail goto*//*Label 337*/ GIMT_Encode4(4695), // Rule ID 162 // |
5133 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule125Enabled), |
5134 | // MIs[0] dst |
5135 | // No operand predicates |
5136 | // MIs[0] Operand 1 |
5137 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0, |
5138 | // Combiner Rule #125: itof_const_zero_fold_si |
5139 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner73), |
5140 | // Label 337: @4695 |
5141 | GIM_Reject, |
5142 | // Label 71: @4696 |
5143 | GIM_Try, /*On fail goto*//*Label 338*/ GIMT_Encode4(4707), // Rule ID 60 // |
5144 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled), |
5145 | // Combiner Rule #56: undef_to_fp_zero; wip_match_opcode 'G_UITOFP' |
5146 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner20), |
5147 | // Label 338: @4707 |
5148 | GIM_Try, /*On fail goto*//*Label 339*/ GIMT_Encode4(4722), // Rule ID 163 // |
5149 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule126Enabled), |
5150 | // MIs[0] dst |
5151 | // No operand predicates |
5152 | // MIs[0] Operand 1 |
5153 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0, |
5154 | // Combiner Rule #126: itof_const_zero_fold_ui |
5155 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner73), |
5156 | // Label 339: @4722 |
5157 | GIM_Reject, |
5158 | // Label 72: @4723 |
5159 | GIM_Try, /*On fail goto*//*Label 340*/ GIMT_Encode4(4752), // Rule ID 13 // |
5160 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled), |
5161 | // MIs[0] dst |
5162 | // No operand predicates |
5163 | // MIs[0] src |
5164 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5165 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FABS), |
5166 | // MIs[1] __idempotent_prop_match_0.x |
5167 | // No operand predicates |
5168 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5169 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5170 | // Combiner Rule #12: idempotent_prop @ [__idempotent_prop_match_0[1]] |
5171 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5172 | GIR_EraseRootFromParent_Done, |
5173 | // Label 340: @4752 |
5174 | GIM_Try, /*On fail goto*//*Label 341*/ GIMT_Encode4(4773), // Rule ID 158 // |
5175 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
5176 | // MIs[0] dst |
5177 | // No operand predicates |
5178 | // MIs[0] src0 |
5179 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5180 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
5181 | // MIs[1] cst |
5182 | // No operand predicates |
5183 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5184 | // Combiner Rule #121: constant_fold_fabs |
5185 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72), |
5186 | // Label 341: @4773 |
5187 | GIM_Try, /*On fail goto*//*Label 342*/ GIMT_Encode4(4801), // Rule ID 230 // |
5188 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule156Enabled), |
5189 | // MIs[0] dst |
5190 | // No operand predicates |
5191 | // MIs[0] tmp |
5192 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5193 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG), |
5194 | // MIs[1] x |
5195 | // No operand predicates |
5196 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5197 | // Combiner Rule #156: fabs_fneg_fold |
5198 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FABS), |
5199 | GIR_RootToRootCopy, /*OpIdx*/0, // dst |
5200 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // x |
5201 | GIR_EraseRootFromParent_Done, |
5202 | // Label 342: @4801 |
5203 | GIM_Reject, |
5204 | // Label 73: @4802 |
5205 | GIM_Try, /*On fail goto*//*Label 343*/ GIMT_Encode4(4831), // Rule ID 14 // |
5206 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled), |
5207 | // MIs[0] dst |
5208 | // No operand predicates |
5209 | // MIs[0] src |
5210 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5211 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCANONICALIZE), |
5212 | // MIs[1] __idempotent_prop_match_0.x |
5213 | // No operand predicates |
5214 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5215 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5216 | // Combiner Rule #12: idempotent_prop @ [__idempotent_prop_match_0[2]] |
5217 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5218 | GIR_EraseRootFromParent_Done, |
5219 | // Label 343: @4831 |
5220 | GIM_Reject, |
5221 | // Label 74: @4832 |
5222 | GIM_Try, /*On fail goto*//*Label 344*/ GIMT_Encode4(4843), // Rule ID 174 // |
5223 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled), |
5224 | // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMINNUM' |
5225 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79), |
5226 | // Label 344: @4843 |
5227 | GIM_Try, /*On fail goto*//*Label 345*/ GIMT_Encode4(4854), // Rule ID 273 // |
5228 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5229 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMINNUM' |
5230 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5231 | // Label 345: @4854 |
5232 | GIM_Try, /*On fail goto*//*Label 346*/ GIMT_Encode4(4865), // Rule ID 304 // |
5233 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
5234 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM' |
5235 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
5236 | // Label 346: @4865 |
5237 | GIM_Reject, |
5238 | // Label 75: @4866 |
5239 | GIM_Try, /*On fail goto*//*Label 347*/ GIMT_Encode4(4877), // Rule ID 175 // |
5240 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled), |
5241 | // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMAXNUM' |
5242 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79), |
5243 | // Label 347: @4877 |
5244 | GIM_Try, /*On fail goto*//*Label 348*/ GIMT_Encode4(4888), // Rule ID 274 // |
5245 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5246 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMAXNUM' |
5247 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5248 | // Label 348: @4888 |
5249 | GIM_Try, /*On fail goto*//*Label 349*/ GIMT_Encode4(4899), // Rule ID 305 // |
5250 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
5251 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM' |
5252 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
5253 | // Label 349: @4899 |
5254 | GIM_Reject, |
5255 | // Label 76: @4900 |
5256 | GIM_Try, /*On fail goto*//*Label 350*/ GIMT_Encode4(4911), // Rule ID 306 // |
5257 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
5258 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM_IEEE' |
5259 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
5260 | // Label 350: @4911 |
5261 | GIM_Reject, |
5262 | // Label 77: @4912 |
5263 | GIM_Try, /*On fail goto*//*Label 351*/ GIMT_Encode4(4923), // Rule ID 307 // |
5264 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
5265 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM_IEEE' |
5266 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
5267 | // Label 351: @4923 |
5268 | GIM_Reject, |
5269 | // Label 78: @4924 |
5270 | GIM_Try, /*On fail goto*//*Label 352*/ GIMT_Encode4(4935), // Rule ID 176 // |
5271 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled), |
5272 | // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMINIMUM' |
5273 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79), |
5274 | // Label 352: @4935 |
5275 | GIM_Try, /*On fail goto*//*Label 353*/ GIMT_Encode4(4946), // Rule ID 275 // |
5276 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5277 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMINIMUM' |
5278 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5279 | // Label 353: @4946 |
5280 | GIM_Try, /*On fail goto*//*Label 354*/ GIMT_Encode4(4957), // Rule ID 308 // |
5281 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
5282 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINIMUM' |
5283 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
5284 | // Label 354: @4957 |
5285 | GIM_Reject, |
5286 | // Label 79: @4958 |
5287 | GIM_Try, /*On fail goto*//*Label 355*/ GIMT_Encode4(4969), // Rule ID 177 // |
5288 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled), |
5289 | // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMAXIMUM' |
5290 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79), |
5291 | // Label 355: @4969 |
5292 | GIM_Try, /*On fail goto*//*Label 356*/ GIMT_Encode4(4980), // Rule ID 276 // |
5293 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5294 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMAXIMUM' |
5295 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5296 | // Label 356: @4980 |
5297 | GIM_Try, /*On fail goto*//*Label 357*/ GIMT_Encode4(4991), // Rule ID 309 // |
5298 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled), |
5299 | // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXIMUM' |
5300 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120), |
5301 | // Label 357: @4991 |
5302 | GIM_Reject, |
5303 | // Label 80: @4992 |
5304 | GIM_Try, /*On fail goto*//*Label 358*/ GIMT_Encode4(5003), // Rule ID 126 // |
5305 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule91Enabled), |
5306 | // Combiner Rule #91: reassoc_ptradd; wip_match_opcode 'G_PTR_ADD' |
5307 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner44), |
5308 | // Label 358: @5003 |
5309 | GIM_Try, /*On fail goto*//*Label 359*/ GIMT_Encode4(5014), // Rule ID 128 // |
5310 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule93Enabled), |
5311 | // Combiner Rule #93: ptr_add_immed_chain; wip_match_opcode 'G_PTR_ADD' |
5312 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner46), |
5313 | // Label 359: @5014 |
5314 | GIM_Try, /*On fail goto*//*Label 360*/ GIMT_Encode4(5025), // Rule ID 164 // |
5315 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule127Enabled), |
5316 | // Combiner Rule #127: const_ptradd_to_i2p; wip_match_opcode 'G_PTR_ADD' |
5317 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner74), |
5318 | // Label 360: @5025 |
5319 | GIM_Try, /*On fail goto*//*Label 361*/ GIMT_Encode4(5036), // Rule ID 180 // |
5320 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule135Enabled), |
5321 | // Combiner Rule #135: ptr_add_with_zero; wip_match_opcode 'G_PTR_ADD' |
5322 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner82), |
5323 | // Label 361: @5036 |
5324 | GIM_Try, /*On fail goto*//*Label 362*/ GIMT_Encode4(5047), // Rule ID 253 // |
5325 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5326 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_PTR_ADD' |
5327 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5328 | // Label 362: @5047 |
5329 | GIM_Try, /*On fail goto*//*Label 363*/ GIMT_Encode4(5070), // Rule ID 92 // |
5330 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
5331 | // MIs[0] dst |
5332 | // No operand predicates |
5333 | // MIs[0] lhs |
5334 | // No operand predicates |
5335 | // MIs[0] Operand 2 |
5336 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
5337 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5338 | // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[7]] |
5339 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5340 | GIR_EraseRootFromParent_Done, |
5341 | // Label 363: @5070 |
5342 | GIM_Reject, |
5343 | // Label 81: @5071 |
5344 | GIM_Try, /*On fail goto*//*Label 364*/ GIMT_Encode4(5082), // Rule ID 264 // |
5345 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5346 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SMIN' |
5347 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5348 | // Label 364: @5082 |
5349 | GIM_Try, /*On fail goto*//*Label 365*/ GIMT_Encode4(5093), // Rule ID 286 // |
5350 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
5351 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMIN' |
5352 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
5353 | // Label 365: @5093 |
5354 | GIM_Reject, |
5355 | // Label 82: @5094 |
5356 | GIM_Try, /*On fail goto*//*Label 366*/ GIMT_Encode4(5105), // Rule ID 265 // |
5357 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5358 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SMAX' |
5359 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5360 | // Label 366: @5105 |
5361 | GIM_Try, /*On fail goto*//*Label 367*/ GIMT_Encode4(5116), // Rule ID 287 // |
5362 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
5363 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMAX' |
5364 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
5365 | // Label 367: @5116 |
5366 | GIM_Reject, |
5367 | // Label 83: @5117 |
5368 | GIM_Try, /*On fail goto*//*Label 368*/ GIMT_Encode4(5128), // Rule ID 266 // |
5369 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5370 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UMIN' |
5371 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5372 | // Label 368: @5128 |
5373 | GIM_Try, /*On fail goto*//*Label 369*/ GIMT_Encode4(5139), // Rule ID 288 // |
5374 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
5375 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMIN' |
5376 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
5377 | // Label 369: @5139 |
5378 | GIM_Reject, |
5379 | // Label 84: @5140 |
5380 | GIM_Try, /*On fail goto*//*Label 370*/ GIMT_Encode4(5151), // Rule ID 267 // |
5381 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled), |
5382 | // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UMAX' |
5383 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114), |
5384 | // Label 370: @5151 |
5385 | GIM_Try, /*On fail goto*//*Label 371*/ GIMT_Encode4(5162), // Rule ID 289 // |
5386 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled), |
5387 | // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMAX' |
5388 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119), |
5389 | // Label 371: @5162 |
5390 | GIM_Reject, |
5391 | // Label 85: @5163 |
5392 | GIM_Try, /*On fail goto*//*Label 372*/ GIMT_Encode4(5174), // Rule ID 71 // |
5393 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled), |
5394 | // Combiner Rule #61: unary_undef_to_zero; wip_match_opcode 'G_ABS' |
5395 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23), |
5396 | // Label 372: @5174 |
5397 | GIM_Reject, |
5398 | // Label 86: @5175 |
5399 | GIM_Try, /*On fail goto*//*Label 373*/ GIMT_Encode4(5186), // Rule ID 149 // |
5400 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule112Enabled), |
5401 | // Combiner Rule #112: opt_brcond_by_inverting_cond; wip_match_opcode 'G_BR' |
5402 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner64), |
5403 | // Label 373: @5186 |
5404 | GIM_Reject, |
5405 | // Label 87: @5187 |
5406 | GIM_Try, /*On fail goto*//*Label 374*/ GIMT_Encode4(5198), // Rule ID 20 // |
5407 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled), |
5408 | // Combiner Rule #18: insert_vector_elt_oob; wip_match_opcode 'G_INSERT_VECTOR_ELT' |
5409 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4), |
5410 | // Label 374: @5198 |
5411 | GIM_Try, /*On fail goto*//*Label 375*/ GIMT_Encode4(5209), // Rule ID 52 // |
5412 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule50Enabled), |
5413 | // Combiner Rule #50: combine_insert_vec_elts_build_vector; wip_match_opcode 'G_INSERT_VECTOR_ELT' |
5414 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
5415 | // Label 375: @5209 |
5416 | GIM_Try, /*On fail goto*//*Label 376*/ GIMT_Encode4(5220), // Rule ID 82 // |
5417 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled), |
5418 | // Combiner Rule #67: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_INSERT_VECTOR_ELT' |
5419 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner30), |
5420 | // Label 376: @5220 |
5421 | GIM_Try, /*On fail goto*//*Label 377*/ GIMT_Encode4(5259), // Rule ID 45 // |
5422 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled), |
5423 | // MIs[0] root |
5424 | // No operand predicates |
5425 | // MIs[0] src |
5426 | // No operand predicates |
5427 | // MIs[0] elt |
5428 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
5429 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_EXTRACT_VECTOR_ELT), |
5430 | // MIs[1] src |
5431 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/1, /*OtherMI*/0, /*OtherOpIdx*/1, |
5432 | // MIs[1] idx |
5433 | // No operand predicates |
5434 | // MIs[0] idx |
5435 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/3, /*OtherMI*/1, /*OtherOpIdx*/2, |
5436 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5437 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5438 | // Combiner Rule #43: insert_vector_element_extract_vector_element |
5439 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5440 | GIR_EraseRootFromParent_Done, |
5441 | // Label 377: @5259 |
5442 | GIM_Try, /*On fail goto*//*Label 378*/ GIMT_Encode4(5292), // Rule ID 18 // |
5443 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled), |
5444 | // MIs[0] root |
5445 | // No operand predicates |
5446 | // MIs[0] src |
5447 | // No operand predicates |
5448 | // MIs[0] elt |
5449 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
5450 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
5451 | // MIs[0] idx |
5452 | // No operand predicates |
5453 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0), |
5454 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5455 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5456 | // Combiner Rule #16: insert_vector_element_elt_undef |
5457 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
5458 | GIR_EraseRootFromParent_Done, |
5459 | // Label 378: @5292 |
5460 | GIM_Try, /*On fail goto*//*Label 379*/ GIMT_Encode4(5316), // Rule ID 17 // |
5461 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled), |
5462 | // MIs[0] root |
5463 | // No operand predicates |
5464 | // MIs[0] src |
5465 | // No operand predicates |
5466 | // MIs[0] elt |
5467 | // No operand predicates |
5468 | // MIs[0] idx |
5469 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/3, // MIs[1] |
5470 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
5471 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5472 | // Combiner Rule #15: insert_vector_element_idx_undef |
5473 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
5474 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
5475 | GIR_EraseRootFromParent_Done, |
5476 | // Label 379: @5316 |
5477 | GIM_Reject, |
5478 | // Label 88: @5317 |
5479 | GIM_Try, /*On fail goto*//*Label 380*/ GIMT_Encode4(5328), // Rule ID 19 // |
5480 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
5481 | // Combiner Rule #17: match_extract_of_element; wip_match_opcode 'G_EXTRACT_VECTOR_ELT' |
5482 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3), |
5483 | // Label 380: @5328 |
5484 | GIM_Try, /*On fail goto*//*Label 381*/ GIMT_Encode4(5339), // Rule ID 53 // |
5485 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule51Enabled), |
5486 | // Combiner Rule #51: extract_vec_elt_build_vec; wip_match_opcode 'G_EXTRACT_VECTOR_ELT' |
5487 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner15), |
5488 | // Label 381: @5339 |
5489 | GIM_Try, /*On fail goto*//*Label 382*/ GIMT_Encode4(5350), // Rule ID 59 // |
5490 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule55Enabled), |
5491 | // Combiner Rule #55: combine_extracted_vector_load; wip_match_opcode 'G_EXTRACT_VECTOR_ELT' |
5492 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner19), |
5493 | // Label 382: @5350 |
5494 | GIM_Try, /*On fail goto*//*Label 383*/ GIMT_Encode4(5361), // Rule ID 83 // |
5495 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled), |
5496 | // Combiner Rule #67: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_EXTRACT_VECTOR_ELT' |
5497 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner30), |
5498 | // Label 383: @5361 |
5499 | GIM_Try, /*On fail goto*//*Label 384*/ GIMT_Encode4(5385), // Rule ID 36 // |
5500 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled), |
5501 | // MIs[0] root |
5502 | // No operand predicates |
5503 | // MIs[0] src |
5504 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5505 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5506 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/17, |
5507 | // MIs[1] x |
5508 | // No operand predicates |
5509 | // MIs[1] y |
5510 | // No operand predicates |
5511 | // MIs[1] z |
5512 | // No operand predicates |
5513 | // MIs[1] a |
5514 | // No operand predicates |
5515 | // MIs[1] b |
5516 | // No operand predicates |
5517 | // MIs[1] c |
5518 | // No operand predicates |
5519 | // MIs[1] d |
5520 | // No operand predicates |
5521 | // MIs[1] e |
5522 | // No operand predicates |
5523 | // MIs[1] f |
5524 | // No operand predicates |
5525 | // MIs[1] g |
5526 | // No operand predicates |
5527 | // MIs[1] h |
5528 | // No operand predicates |
5529 | // MIs[1] i |
5530 | // No operand predicates |
5531 | // MIs[1] j |
5532 | // No operand predicates |
5533 | // MIs[1] k |
5534 | // No operand predicates |
5535 | // MIs[1] l |
5536 | // No operand predicates |
5537 | // MIs[1] m |
5538 | // No operand predicates |
5539 | // MIs[0] idx |
5540 | // No operand predicates |
5541 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5542 | // Combiner Rule #34: extract_vector_element_build_vector16 |
5543 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5544 | // Label 384: @5385 |
5545 | GIM_Try, /*On fail goto*//*Label 385*/ GIMT_Encode4(5409), // Rule ID 35 // |
5546 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled), |
5547 | // MIs[0] root |
5548 | // No operand predicates |
5549 | // MIs[0] src |
5550 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5551 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5552 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/16, |
5553 | // MIs[1] x |
5554 | // No operand predicates |
5555 | // MIs[1] y |
5556 | // No operand predicates |
5557 | // MIs[1] z |
5558 | // No operand predicates |
5559 | // MIs[1] a |
5560 | // No operand predicates |
5561 | // MIs[1] b |
5562 | // No operand predicates |
5563 | // MIs[1] c |
5564 | // No operand predicates |
5565 | // MIs[1] d |
5566 | // No operand predicates |
5567 | // MIs[1] e |
5568 | // No operand predicates |
5569 | // MIs[1] f |
5570 | // No operand predicates |
5571 | // MIs[1] g |
5572 | // No operand predicates |
5573 | // MIs[1] h |
5574 | // No operand predicates |
5575 | // MIs[1] i |
5576 | // No operand predicates |
5577 | // MIs[1] j |
5578 | // No operand predicates |
5579 | // MIs[1] k |
5580 | // No operand predicates |
5581 | // MIs[1] l |
5582 | // No operand predicates |
5583 | // MIs[0] idx |
5584 | // No operand predicates |
5585 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5586 | // Combiner Rule #33: extract_vector_element_build_vector15 |
5587 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5588 | // Label 385: @5409 |
5589 | GIM_Try, /*On fail goto*//*Label 386*/ GIMT_Encode4(5433), // Rule ID 34 // |
5590 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled), |
5591 | // MIs[0] root |
5592 | // No operand predicates |
5593 | // MIs[0] src |
5594 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5595 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5596 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/15, |
5597 | // MIs[1] x |
5598 | // No operand predicates |
5599 | // MIs[1] y |
5600 | // No operand predicates |
5601 | // MIs[1] z |
5602 | // No operand predicates |
5603 | // MIs[1] a |
5604 | // No operand predicates |
5605 | // MIs[1] b |
5606 | // No operand predicates |
5607 | // MIs[1] c |
5608 | // No operand predicates |
5609 | // MIs[1] d |
5610 | // No operand predicates |
5611 | // MIs[1] e |
5612 | // No operand predicates |
5613 | // MIs[1] f |
5614 | // No operand predicates |
5615 | // MIs[1] g |
5616 | // No operand predicates |
5617 | // MIs[1] h |
5618 | // No operand predicates |
5619 | // MIs[1] i |
5620 | // No operand predicates |
5621 | // MIs[1] j |
5622 | // No operand predicates |
5623 | // MIs[1] k |
5624 | // No operand predicates |
5625 | // MIs[0] idx |
5626 | // No operand predicates |
5627 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5628 | // Combiner Rule #32: extract_vector_element_build_vector14 |
5629 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5630 | // Label 386: @5433 |
5631 | GIM_Try, /*On fail goto*//*Label 387*/ GIMT_Encode4(5457), // Rule ID 33 // |
5632 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled), |
5633 | // MIs[0] root |
5634 | // No operand predicates |
5635 | // MIs[0] src |
5636 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5637 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5638 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/14, |
5639 | // MIs[1] x |
5640 | // No operand predicates |
5641 | // MIs[1] y |
5642 | // No operand predicates |
5643 | // MIs[1] z |
5644 | // No operand predicates |
5645 | // MIs[1] a |
5646 | // No operand predicates |
5647 | // MIs[1] b |
5648 | // No operand predicates |
5649 | // MIs[1] c |
5650 | // No operand predicates |
5651 | // MIs[1] d |
5652 | // No operand predicates |
5653 | // MIs[1] e |
5654 | // No operand predicates |
5655 | // MIs[1] f |
5656 | // No operand predicates |
5657 | // MIs[1] g |
5658 | // No operand predicates |
5659 | // MIs[1] h |
5660 | // No operand predicates |
5661 | // MIs[1] i |
5662 | // No operand predicates |
5663 | // MIs[1] j |
5664 | // No operand predicates |
5665 | // MIs[0] idx |
5666 | // No operand predicates |
5667 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5668 | // Combiner Rule #31: extract_vector_element_build_vector13 |
5669 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5670 | // Label 387: @5457 |
5671 | GIM_Try, /*On fail goto*//*Label 388*/ GIMT_Encode4(5481), // Rule ID 32 // |
5672 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled), |
5673 | // MIs[0] root |
5674 | // No operand predicates |
5675 | // MIs[0] src |
5676 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5677 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5678 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/13, |
5679 | // MIs[1] x |
5680 | // No operand predicates |
5681 | // MIs[1] y |
5682 | // No operand predicates |
5683 | // MIs[1] z |
5684 | // No operand predicates |
5685 | // MIs[1] a |
5686 | // No operand predicates |
5687 | // MIs[1] b |
5688 | // No operand predicates |
5689 | // MIs[1] c |
5690 | // No operand predicates |
5691 | // MIs[1] d |
5692 | // No operand predicates |
5693 | // MIs[1] e |
5694 | // No operand predicates |
5695 | // MIs[1] f |
5696 | // No operand predicates |
5697 | // MIs[1] g |
5698 | // No operand predicates |
5699 | // MIs[1] h |
5700 | // No operand predicates |
5701 | // MIs[1] i |
5702 | // No operand predicates |
5703 | // MIs[0] idx |
5704 | // No operand predicates |
5705 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5706 | // Combiner Rule #30: extract_vector_element_build_vector12 |
5707 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5708 | // Label 388: @5481 |
5709 | GIM_Try, /*On fail goto*//*Label 389*/ GIMT_Encode4(5505), // Rule ID 31 // |
5710 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled), |
5711 | // MIs[0] root |
5712 | // No operand predicates |
5713 | // MIs[0] src |
5714 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5715 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5716 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/12, |
5717 | // MIs[1] x |
5718 | // No operand predicates |
5719 | // MIs[1] y |
5720 | // No operand predicates |
5721 | // MIs[1] z |
5722 | // No operand predicates |
5723 | // MIs[1] a |
5724 | // No operand predicates |
5725 | // MIs[1] b |
5726 | // No operand predicates |
5727 | // MIs[1] c |
5728 | // No operand predicates |
5729 | // MIs[1] d |
5730 | // No operand predicates |
5731 | // MIs[1] e |
5732 | // No operand predicates |
5733 | // MIs[1] f |
5734 | // No operand predicates |
5735 | // MIs[1] g |
5736 | // No operand predicates |
5737 | // MIs[1] h |
5738 | // No operand predicates |
5739 | // MIs[0] idx |
5740 | // No operand predicates |
5741 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5742 | // Combiner Rule #29: extract_vector_element_build_vector11 |
5743 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5744 | // Label 389: @5505 |
5745 | GIM_Try, /*On fail goto*//*Label 390*/ GIMT_Encode4(5529), // Rule ID 30 // |
5746 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled), |
5747 | // MIs[0] root |
5748 | // No operand predicates |
5749 | // MIs[0] src |
5750 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5751 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5752 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/11, |
5753 | // MIs[1] x |
5754 | // No operand predicates |
5755 | // MIs[1] y |
5756 | // No operand predicates |
5757 | // MIs[1] z |
5758 | // No operand predicates |
5759 | // MIs[1] a |
5760 | // No operand predicates |
5761 | // MIs[1] b |
5762 | // No operand predicates |
5763 | // MIs[1] c |
5764 | // No operand predicates |
5765 | // MIs[1] d |
5766 | // No operand predicates |
5767 | // MIs[1] e |
5768 | // No operand predicates |
5769 | // MIs[1] f |
5770 | // No operand predicates |
5771 | // MIs[1] g |
5772 | // No operand predicates |
5773 | // MIs[0] idx |
5774 | // No operand predicates |
5775 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5776 | // Combiner Rule #28: extract_vector_element_build_vector10 |
5777 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5778 | // Label 390: @5529 |
5779 | GIM_Try, /*On fail goto*//*Label 391*/ GIMT_Encode4(5553), // Rule ID 29 // |
5780 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled), |
5781 | // MIs[0] root |
5782 | // No operand predicates |
5783 | // MIs[0] src |
5784 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5785 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5786 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/10, |
5787 | // MIs[1] x |
5788 | // No operand predicates |
5789 | // MIs[1] y |
5790 | // No operand predicates |
5791 | // MIs[1] z |
5792 | // No operand predicates |
5793 | // MIs[1] a |
5794 | // No operand predicates |
5795 | // MIs[1] b |
5796 | // No operand predicates |
5797 | // MIs[1] c |
5798 | // No operand predicates |
5799 | // MIs[1] d |
5800 | // No operand predicates |
5801 | // MIs[1] e |
5802 | // No operand predicates |
5803 | // MIs[1] f |
5804 | // No operand predicates |
5805 | // MIs[0] idx |
5806 | // No operand predicates |
5807 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5808 | // Combiner Rule #27: extract_vector_element_build_vector9 |
5809 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5810 | // Label 391: @5553 |
5811 | GIM_Try, /*On fail goto*//*Label 392*/ GIMT_Encode4(5577), // Rule ID 28 // |
5812 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
5813 | // MIs[0] root |
5814 | // No operand predicates |
5815 | // MIs[0] src |
5816 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5817 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5818 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/9, |
5819 | // MIs[1] x |
5820 | // No operand predicates |
5821 | // MIs[1] y |
5822 | // No operand predicates |
5823 | // MIs[1] z |
5824 | // No operand predicates |
5825 | // MIs[1] a |
5826 | // No operand predicates |
5827 | // MIs[1] b |
5828 | // No operand predicates |
5829 | // MIs[1] c |
5830 | // No operand predicates |
5831 | // MIs[1] d |
5832 | // No operand predicates |
5833 | // MIs[1] e |
5834 | // No operand predicates |
5835 | // MIs[0] idx |
5836 | // No operand predicates |
5837 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5838 | // Combiner Rule #26: extract_vector_element_build_vector8 |
5839 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5840 | // Label 392: @5577 |
5841 | GIM_Try, /*On fail goto*//*Label 393*/ GIMT_Encode4(5601), // Rule ID 43 // |
5842 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule41Enabled), |
5843 | // MIs[0] root |
5844 | // No operand predicates |
5845 | // MIs[0] src |
5846 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5847 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC), |
5848 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/9, |
5849 | // MIs[1] x |
5850 | // No operand predicates |
5851 | // MIs[1] y |
5852 | // No operand predicates |
5853 | // MIs[1] z |
5854 | // No operand predicates |
5855 | // MIs[1] a |
5856 | // No operand predicates |
5857 | // MIs[1] b |
5858 | // No operand predicates |
5859 | // MIs[1] c |
5860 | // No operand predicates |
5861 | // MIs[1] d |
5862 | // No operand predicates |
5863 | // MIs[1] e |
5864 | // No operand predicates |
5865 | // MIs[0] idx |
5866 | // No operand predicates |
5867 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5868 | // Combiner Rule #41: extract_vector_element_build_vector_trunc8 |
5869 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
5870 | // Label 393: @5601 |
5871 | GIM_Try, /*On fail goto*//*Label 394*/ GIMT_Encode4(5625), // Rule ID 27 // |
5872 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
5873 | // MIs[0] root |
5874 | // No operand predicates |
5875 | // MIs[0] src |
5876 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5877 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5878 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/8, |
5879 | // MIs[1] x |
5880 | // No operand predicates |
5881 | // MIs[1] y |
5882 | // No operand predicates |
5883 | // MIs[1] z |
5884 | // No operand predicates |
5885 | // MIs[1] a |
5886 | // No operand predicates |
5887 | // MIs[1] b |
5888 | // No operand predicates |
5889 | // MIs[1] c |
5890 | // No operand predicates |
5891 | // MIs[1] d |
5892 | // No operand predicates |
5893 | // MIs[0] idx |
5894 | // No operand predicates |
5895 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5896 | // Combiner Rule #25: extract_vector_element_build_vector7 |
5897 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5898 | // Label 394: @5625 |
5899 | GIM_Try, /*On fail goto*//*Label 395*/ GIMT_Encode4(5649), // Rule ID 42 // |
5900 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule40Enabled), |
5901 | // MIs[0] root |
5902 | // No operand predicates |
5903 | // MIs[0] src |
5904 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5905 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC), |
5906 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/8, |
5907 | // MIs[1] x |
5908 | // No operand predicates |
5909 | // MIs[1] y |
5910 | // No operand predicates |
5911 | // MIs[1] z |
5912 | // No operand predicates |
5913 | // MIs[1] a |
5914 | // No operand predicates |
5915 | // MIs[1] b |
5916 | // No operand predicates |
5917 | // MIs[1] c |
5918 | // No operand predicates |
5919 | // MIs[1] d |
5920 | // No operand predicates |
5921 | // MIs[0] idx |
5922 | // No operand predicates |
5923 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5924 | // Combiner Rule #40: extract_vector_element_build_vector_trunc7 |
5925 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
5926 | // Label 395: @5649 |
5927 | GIM_Try, /*On fail goto*//*Label 396*/ GIMT_Encode4(5673), // Rule ID 41 // |
5928 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule39Enabled), |
5929 | // MIs[0] root |
5930 | // No operand predicates |
5931 | // MIs[0] src |
5932 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5933 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC), |
5934 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/7, |
5935 | // MIs[1] x |
5936 | // No operand predicates |
5937 | // MIs[1] y |
5938 | // No operand predicates |
5939 | // MIs[1] z |
5940 | // No operand predicates |
5941 | // MIs[1] a |
5942 | // No operand predicates |
5943 | // MIs[1] b |
5944 | // No operand predicates |
5945 | // MIs[1] c |
5946 | // No operand predicates |
5947 | // MIs[0] idx |
5948 | // No operand predicates |
5949 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5950 | // Combiner Rule #39: extract_vector_element_build_vector_trunc6 |
5951 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
5952 | // Label 396: @5673 |
5953 | GIM_Try, /*On fail goto*//*Label 397*/ GIMT_Encode4(5697), // Rule ID 26 // |
5954 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
5955 | // MIs[0] root |
5956 | // No operand predicates |
5957 | // MIs[0] src |
5958 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5959 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
5960 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/6, |
5961 | // MIs[1] x |
5962 | // No operand predicates |
5963 | // MIs[1] y |
5964 | // No operand predicates |
5965 | // MIs[1] z |
5966 | // No operand predicates |
5967 | // MIs[1] a |
5968 | // No operand predicates |
5969 | // MIs[1] b |
5970 | // No operand predicates |
5971 | // MIs[0] idx |
5972 | // No operand predicates |
5973 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5974 | // Combiner Rule #24: extract_vector_element_build_vector5 |
5975 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
5976 | // Label 397: @5697 |
5977 | GIM_Try, /*On fail goto*//*Label 398*/ GIMT_Encode4(5721), // Rule ID 40 // |
5978 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule38Enabled), |
5979 | // MIs[0] root |
5980 | // No operand predicates |
5981 | // MIs[0] src |
5982 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
5983 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC), |
5984 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/6, |
5985 | // MIs[1] x |
5986 | // No operand predicates |
5987 | // MIs[1] y |
5988 | // No operand predicates |
5989 | // MIs[1] z |
5990 | // No operand predicates |
5991 | // MIs[1] a |
5992 | // No operand predicates |
5993 | // MIs[1] b |
5994 | // No operand predicates |
5995 | // MIs[0] idx |
5996 | // No operand predicates |
5997 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
5998 | // Combiner Rule #38: extract_vector_element_build_vector_trunc5 |
5999 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
6000 | // Label 398: @5721 |
6001 | GIM_Try, /*On fail goto*//*Label 399*/ GIMT_Encode4(5745), // Rule ID 25 // |
6002 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled), |
6003 | // MIs[0] root |
6004 | // No operand predicates |
6005 | // MIs[0] src |
6006 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6007 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
6008 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/5, |
6009 | // MIs[1] x |
6010 | // No operand predicates |
6011 | // MIs[1] y |
6012 | // No operand predicates |
6013 | // MIs[1] z |
6014 | // No operand predicates |
6015 | // MIs[1] a |
6016 | // No operand predicates |
6017 | // MIs[0] idx |
6018 | // No operand predicates |
6019 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6020 | // Combiner Rule #23: extract_vector_element_build_vector4 |
6021 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
6022 | // Label 399: @5745 |
6023 | GIM_Try, /*On fail goto*//*Label 400*/ GIMT_Encode4(5769), // Rule ID 39 // |
6024 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled), |
6025 | // MIs[0] root |
6026 | // No operand predicates |
6027 | // MIs[0] src |
6028 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6029 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC), |
6030 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/5, |
6031 | // MIs[1] x |
6032 | // No operand predicates |
6033 | // MIs[1] y |
6034 | // No operand predicates |
6035 | // MIs[1] z |
6036 | // No operand predicates |
6037 | // MIs[1] a |
6038 | // No operand predicates |
6039 | // MIs[0] idx |
6040 | // No operand predicates |
6041 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6042 | // Combiner Rule #37: extract_vector_element_build_vector_trunc4 |
6043 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
6044 | // Label 400: @5769 |
6045 | GIM_Try, /*On fail goto*//*Label 401*/ GIMT_Encode4(5793), // Rule ID 24 // |
6046 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled), |
6047 | // MIs[0] root |
6048 | // No operand predicates |
6049 | // MIs[0] src |
6050 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6051 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
6052 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/4, |
6053 | // MIs[1] x |
6054 | // No operand predicates |
6055 | // MIs[1] y |
6056 | // No operand predicates |
6057 | // MIs[1] z |
6058 | // No operand predicates |
6059 | // MIs[0] idx |
6060 | // No operand predicates |
6061 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6062 | // Combiner Rule #22: extract_vector_element_build_vector3 |
6063 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
6064 | // Label 401: @5793 |
6065 | GIM_Try, /*On fail goto*//*Label 402*/ GIMT_Encode4(5817), // Rule ID 38 // |
6066 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled), |
6067 | // MIs[0] root |
6068 | // No operand predicates |
6069 | // MIs[0] src |
6070 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6071 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC), |
6072 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/4, |
6073 | // MIs[1] x |
6074 | // No operand predicates |
6075 | // MIs[1] y |
6076 | // No operand predicates |
6077 | // MIs[1] z |
6078 | // No operand predicates |
6079 | // MIs[0] idx |
6080 | // No operand predicates |
6081 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6082 | // Combiner Rule #36: extract_vector_element_build_vector_trunc3 |
6083 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
6084 | // Label 402: @5817 |
6085 | GIM_Try, /*On fail goto*//*Label 403*/ GIMT_Encode4(5851), // Rule ID 21 // |
6086 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled), |
6087 | // MIs[0] root |
6088 | // No operand predicates |
6089 | // MIs[0] src |
6090 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6091 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INSERT_VECTOR_ELT), |
6092 | // MIs[1] x |
6093 | // No operand predicates |
6094 | // MIs[1] value |
6095 | // No operand predicates |
6096 | // MIs[1] idx |
6097 | // No operand predicates |
6098 | // MIs[0] idx |
6099 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/3, |
6100 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/2, |
6101 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6102 | // Combiner Rule #19: extract_vector_element_not_const |
6103 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/2, |
6104 | GIR_EraseRootFromParent_Done, |
6105 | // Label 403: @5851 |
6106 | GIM_Try, /*On fail goto*//*Label 404*/ GIMT_Encode4(5872), // Rule ID 22 // |
6107 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled), |
6108 | // MIs[0] root |
6109 | // No operand predicates |
6110 | // MIs[0] src |
6111 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6112 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INSERT_VECTOR_ELT), |
6113 | // MIs[1] x |
6114 | // No operand predicates |
6115 | // MIs[1] value |
6116 | // No operand predicates |
6117 | // MIs[1] idx2 |
6118 | // No operand predicates |
6119 | // MIs[0] idx1 |
6120 | // No operand predicates |
6121 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6122 | // Combiner Rule #20: extract_vector_element_different_indices |
6123 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5), |
6124 | // Label 404: @5872 |
6125 | GIM_Try, /*On fail goto*//*Label 405*/ GIMT_Encode4(5893), // Rule ID 44 // |
6126 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule42Enabled), |
6127 | // MIs[0] root |
6128 | // No operand predicates |
6129 | // MIs[0] src |
6130 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6131 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SHUFFLE_VECTOR), |
6132 | // MIs[1] src1 |
6133 | // No operand predicates |
6134 | // MIs[1] src2 |
6135 | // No operand predicates |
6136 | // MIs[1] mask |
6137 | // No operand predicates |
6138 | // MIs[0] idx |
6139 | // No operand predicates |
6140 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6141 | // Combiner Rule #42: extract_vector_element_shuffle_vector |
6142 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8), |
6143 | // Label 405: @5893 |
6144 | GIM_Try, /*On fail goto*//*Label 406*/ GIMT_Encode4(5917), // Rule ID 23 // |
6145 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled), |
6146 | // MIs[0] root |
6147 | // No operand predicates |
6148 | // MIs[0] src |
6149 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6150 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR), |
6151 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/3, |
6152 | // MIs[1] x |
6153 | // No operand predicates |
6154 | // MIs[1] y |
6155 | // No operand predicates |
6156 | // MIs[0] idx |
6157 | // No operand predicates |
6158 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6159 | // Combiner Rule #21: extract_vector_element_build_vector2 |
6160 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
6161 | // Label 406: @5917 |
6162 | GIM_Try, /*On fail goto*//*Label 407*/ GIMT_Encode4(5941), // Rule ID 37 // |
6163 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled), |
6164 | // MIs[0] root |
6165 | // No operand predicates |
6166 | // MIs[0] src |
6167 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6168 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC), |
6169 | GIM_CheckNumOperands, /*MI*/1, /*Expected*/3, |
6170 | // MIs[1] x |
6171 | // No operand predicates |
6172 | // MIs[1] y |
6173 | // No operand predicates |
6174 | // MIs[0] idx |
6175 | // No operand predicates |
6176 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6177 | // Combiner Rule #35: extract_vector_element_build_vector_trunc2 |
6178 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
6179 | // Label 407: @5941 |
6180 | GIM_Try, /*On fail goto*//*Label 408*/ GIMT_Encode4(5965), // Rule ID 15 // |
6181 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled), |
6182 | // MIs[0] root |
6183 | // No operand predicates |
6184 | // MIs[0] vector |
6185 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6186 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
6187 | // MIs[0] idx |
6188 | // No operand predicates |
6189 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6190 | // Combiner Rule #13: match_extract_of_element_undef_vector |
6191 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
6192 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
6193 | GIR_EraseRootFromParent_Done, |
6194 | // Label 408: @5965 |
6195 | GIM_Try, /*On fail goto*//*Label 409*/ GIMT_Encode4(5989), // Rule ID 16 // |
6196 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled), |
6197 | // MIs[0] root |
6198 | // No operand predicates |
6199 | // MIs[0] vector |
6200 | // No operand predicates |
6201 | // MIs[0] idx |
6202 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
6203 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
6204 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6205 | // Combiner Rule #14: match_extract_of_element_undef_index |
6206 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
6207 | GIR_RootToRootCopy, /*OpIdx*/0, // root |
6208 | GIR_EraseRootFromParent_Done, |
6209 | // Label 409: @5989 |
6210 | GIM_Reject, |
6211 | // Label 89: @5990 |
6212 | GIM_Try, /*On fail goto*//*Label 410*/ GIMT_Encode4(6001), // Rule ID 78 // |
6213 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule63Enabled), |
6214 | // Combiner Rule #63: propagate_undef_all_ops; wip_match_opcode 'G_SHUFFLE_VECTOR' |
6215 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner26), |
6216 | // Label 410: @6001 |
6217 | GIM_Try, /*On fail goto*//*Label 411*/ GIMT_Encode4(6012), // Rule ID 79 // |
6218 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled), |
6219 | // Combiner Rule #64: propagate_undef_shuffle_mask; wip_match_opcode 'G_SHUFFLE_VECTOR' |
6220 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner27), |
6221 | // Label 411: @6012 |
6222 | GIM_Try, /*On fail goto*//*Label 412*/ GIMT_Encode4(6023), // Rule ID 320 // |
6223 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule188Enabled), |
6224 | // Combiner Rule #188: combine_shuffle_concat; wip_match_opcode 'G_SHUFFLE_VECTOR' |
6225 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner128), |
6226 | // Label 412: @6023 |
6227 | GIM_Reject, |
6228 | // Label 90: @6024 |
6229 | GIM_Try, /*On fail goto*//*Label 413*/ GIMT_Encode4(6068), // Rule ID 204 // |
6230 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule146Enabled), |
6231 | // MIs[0] d |
6232 | // No operand predicates |
6233 | // MIs[0] src |
6234 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6235 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_LSHR), |
6236 | // MIs[1] rev |
6237 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2] |
6238 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_BITREVERSE), |
6239 | // MIs[2] val |
6240 | // No operand predicates |
6241 | // MIs[1] amt |
6242 | // No operand predicates |
6243 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6), |
6244 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
6245 | // Combiner Rule #146: bitreverse_lshr |
6246 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SHL), |
6247 | GIR_RootToRootCopy, /*OpIdx*/0, // d |
6248 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // val |
6249 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // amt |
6250 | GIR_EraseRootFromParent_Done, |
6251 | // Label 413: @6068 |
6252 | GIM_Try, /*On fail goto*//*Label 414*/ GIMT_Encode4(6112), // Rule ID 203 // |
6253 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule145Enabled), |
6254 | // MIs[0] d |
6255 | // No operand predicates |
6256 | // MIs[0] src |
6257 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6258 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SHL), |
6259 | // MIs[1] rev |
6260 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2] |
6261 | GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_BITREVERSE), |
6262 | // MIs[2] val |
6263 | // No operand predicates |
6264 | // MIs[1] amt |
6265 | // No operand predicates |
6266 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner5), |
6267 | GIM_CheckIsSafeToFold, /*NumInsns*/2, |
6268 | // Combiner Rule #145: bitreverse_shl |
6269 | GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_LSHR), |
6270 | GIR_RootToRootCopy, /*OpIdx*/0, // d |
6271 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // val |
6272 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // amt |
6273 | GIR_EraseRootFromParent_Done, |
6274 | // Label 414: @6112 |
6275 | GIM_Reject, |
6276 | // Label 91: @6113 |
6277 | GIM_Try, /*On fail goto*//*Label 415*/ GIMT_Encode4(6134), // Rule ID 159 // |
6278 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule122Enabled), |
6279 | // MIs[0] dst |
6280 | // No operand predicates |
6281 | // MIs[0] src0 |
6282 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
6283 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
6284 | // MIs[1] cst |
6285 | // No operand predicates |
6286 | GIM_CheckIsSafeToFold, /*NumInsns*/1, |
6287 | // Combiner Rule #122: constant_fold_fsqrt |
6288 | GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72), |
6289 | // Label 415: @6134 |
6290 | GIM_Reject, |
6291 | // Label 92: @6135 |
6292 | GIM_Reject, |
6293 | }; // Size: 6136 bytes |
6294 | return MatchTable0; |
6295 | } |
6296 | #undef GIMT_Encode2 |
6297 | #undef GIMT_Encode4 |
6298 | #undef GIMT_Encode8 |
6299 | |
6300 | #endif // ifdef GET_GICOMBINER_IMPL |
6301 | |
6302 | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
6303 | AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)), |
6304 | AvailableFunctionFeatures() |
6305 | #endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
6306 | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
6307 | , State(0), |
6308 | ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers) |
6309 | #endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
6310 | |
6311 | |