/src/build/lib/Target/AMDGPU/AMDGPUGenPreLegalizeGICombiner.inc
Line | Count | Source (jump to first uncovered line) |
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 | 0 | static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) { |
27 | 0 | uint64_t I; |
28 | | // getAtInteger(...) returns false on success |
29 | 0 | bool Parsed = !RuleIdentifier.getAsInteger(0, I); |
30 | 0 | if (Parsed) |
31 | 0 | return I; |
32 | | |
33 | 0 | #ifndef NDEBUG |
34 | 0 | switch (RuleIdentifier.size()) { |
35 | 0 | default: break; |
36 | 0 | case 9: // 4 strings to match. |
37 | 0 | switch (RuleIdentifier[0]) { |
38 | 0 | default: break; |
39 | 0 | case 'a': // 1 string to match. |
40 | 0 | if (memcmp(RuleIdentifier.data()+1, "ddo_by_0", 8) != 0) |
41 | 0 | break; |
42 | 0 | return 84; // "addo_by_0" |
43 | 0 | case 'c': // 1 string to match. |
44 | 0 | if (memcmp(RuleIdentifier.data()+1, "opy_prop", 8) != 0) |
45 | 0 | break; |
46 | 0 | return 0; // "copy_prop" |
47 | 0 | case 'm': // 2 strings to match. |
48 | 0 | if (memcmp(RuleIdentifier.data()+1, "ulo_by_", 7) != 0) |
49 | 0 | break; |
50 | 0 | switch (RuleIdentifier[8]) { |
51 | 0 | default: break; |
52 | 0 | case '0': // 1 string to match. |
53 | 0 | return 83; // "mulo_by_0" |
54 | 0 | case '2': // 1 string to match. |
55 | 0 | return 82; // "mulo_by_2" |
56 | 0 | } |
57 | 0 | break; |
58 | 0 | } |
59 | 0 | break; |
60 | 0 | case 10: // 3 strings to match. |
61 | 0 | switch (RuleIdentifier[0]) { |
62 | 0 | default: break; |
63 | 0 | case 'i': // 1 string to match. |
64 | 0 | if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i", 9) != 0) |
65 | 0 | break; |
66 | 0 | return 29; // "i2p_to_p2i" |
67 | 0 | case 'm': // 1 string to match. |
68 | 0 | if (memcmp(RuleIdentifier.data()+1, "ul_to_shl", 9) != 0) |
69 | 0 | break; |
70 | 0 | return 1; // "mul_to_shl" |
71 | 0 | case 'p': // 1 string to match. |
72 | 0 | if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p", 9) != 0) |
73 | 0 | break; |
74 | 0 | return 28; // "p2i_to_i2p" |
75 | 0 | } |
76 | 0 | break; |
77 | 0 | case 11: // 4 strings to match. |
78 | 0 | switch (RuleIdentifier[0]) { |
79 | 0 | default: break; |
80 | 0 | case 'a': // 1 string to match. |
81 | 0 | if (memcmp(RuleIdentifier.data()+1, "dd_sub_reg", 10) != 0) |
82 | 0 | break; |
83 | 0 | return 34; // "add_sub_reg" |
84 | 0 | case 's': // 1 string to match. |
85 | 0 | if (memcmp(RuleIdentifier.data()+1, "ub_add_reg", 10) != 0) |
86 | 0 | break; |
87 | 0 | return 122; // "sub_add_reg" |
88 | 0 | case 't': // 1 string to match. |
89 | 0 | if (memcmp(RuleIdentifier.data()+1, "runc_shift", 10) != 0) |
90 | 0 | break; |
91 | 0 | return 72; // "trunc_shift" |
92 | 0 | case 'u': // 1 string to match. |
93 | 0 | if (memcmp(RuleIdentifier.data()+1, "nmerge_cst", 10) != 0) |
94 | 0 | break; |
95 | 0 | return 67; // "unmerge_cst" |
96 | 0 | } |
97 | 0 | break; |
98 | 0 | case 12: // 6 strings to match. |
99 | 0 | switch (RuleIdentifier[0]) { |
100 | 0 | default: break; |
101 | 0 | case 'a': // 1 string to match. |
102 | 0 | if (memcmp(RuleIdentifier.data()+1, "dde_to_addo", 11) != 0) |
103 | 0 | break; |
104 | 0 | return 85; // "adde_to_addo" |
105 | 0 | case 'e': // 1 string to match. |
106 | 0 | if (memcmp(RuleIdentifier.data()+1, "xt_ext_fold", 11) != 0) |
107 | 0 | break; |
108 | 0 | return 63; // "ext_ext_fold" |
109 | 0 | case 'f': // 1 string to match. |
110 | 0 | if (memcmp(RuleIdentifier.data()+1, "sub_to_fneg", 11) != 0) |
111 | 0 | break; |
112 | 0 | return 125; // "fsub_to_fneg" |
113 | 0 | case 'm': // 1 string to match. |
114 | 0 | if (memcmp(RuleIdentifier.data()+1, "ulh_to_lshr", 11) != 0) |
115 | 0 | break; |
116 | 0 | return 110; // "mulh_to_lshr" |
117 | 0 | case 'n': // 1 string to match. |
118 | 0 | if (memcmp(RuleIdentifier.data()+1, "ot_cmp_fold", 11) != 0) |
119 | 0 | break; |
120 | 0 | return 64; // "not_cmp_fold" |
121 | 0 | case 'r': // 1 string to match. |
122 | 0 | if (memcmp(RuleIdentifier.data()+1, "edundant_or", 11) != 0) |
123 | 0 | break; |
124 | 0 | return 57; // "redundant_or" |
125 | 0 | } |
126 | 0 | break; |
127 | 0 | case 13: // 10 strings to match. |
128 | 0 | switch (RuleIdentifier[0]) { |
129 | 0 | default: break; |
130 | 0 | case 'c': // 1 string to match. |
131 | 0 | if (memcmp(RuleIdentifier.data()+1, "ommute_shift", 12) != 0) |
132 | 0 | break; |
133 | 0 | return 98; // "commute_shift" |
134 | 0 | case 'f': // 1 string to match. |
135 | 0 | if (memcmp(RuleIdentifier.data()+1, "oldable_fneg", 12) != 0) |
136 | 0 | break; |
137 | 0 | return 129; // "foldable_fneg" |
138 | 0 | case 'l': // 1 string to match. |
139 | 0 | if (memcmp(RuleIdentifier.data()+1, "oad_and_mask", 12) != 0) |
140 | 0 | break; |
141 | 0 | return 9; // "load_and_mask" |
142 | 0 | case 'm': // 2 strings to match. |
143 | 0 | switch (RuleIdentifier[1]) { |
144 | 0 | default: break; |
145 | 0 | case 'a': // 1 string to match. |
146 | 0 | if (memcmp(RuleIdentifier.data()+2, "tch_selects", 11) != 0) |
147 | 0 | break; |
148 | 0 | return 54; // "match_selects" |
149 | 0 | case 'e': // 1 string to match. |
150 | 0 | if (memcmp(RuleIdentifier.data()+2, "rge_unmerge", 11) != 0) |
151 | 0 | break; |
152 | 0 | return 70; // "merge_unmerge" |
153 | 0 | } |
154 | 0 | break; |
155 | 0 | case 'r': // 1 string to match. |
156 | 0 | if (memcmp(RuleIdentifier.data()+1, "edundant_and", 12) != 0) |
157 | 0 | break; |
158 | 0 | return 55; // "redundant_and" |
159 | 0 | case 's': // 1 string to match. |
160 | 0 | if (memcmp(RuleIdentifier.data()+1, "div_by_const", 12) != 0) |
161 | 0 | break; |
162 | 0 | return 109; // "sdiv_by_const" |
163 | 0 | case 'u': // 3 strings to match. |
164 | 0 | switch (RuleIdentifier[1]) { |
165 | 0 | default: break; |
166 | 0 | case 'd': // 1 string to match. |
167 | 0 | if (memcmp(RuleIdentifier.data()+2, "iv_by_const", 11) != 0) |
168 | 0 | break; |
169 | 0 | return 108; // "udiv_by_const" |
170 | 0 | case 'n': // 2 strings to match. |
171 | 0 | if (memcmp(RuleIdentifier.data()+2, "merge_", 6) != 0) |
172 | 0 | break; |
173 | 0 | switch (RuleIdentifier[8]) { |
174 | 0 | default: break; |
175 | 0 | case 'm': // 1 string to match. |
176 | 0 | if (memcmp(RuleIdentifier.data()+9, "erge", 4) != 0) |
177 | 0 | break; |
178 | 0 | return 66; // "unmerge_merge" |
179 | 0 | case 'u': // 1 string to match. |
180 | 0 | if (memcmp(RuleIdentifier.data()+9, "ndef", 4) != 0) |
181 | 0 | break; |
182 | 0 | return 21; // "unmerge_undef" |
183 | 0 | } |
184 | 0 | break; |
185 | 0 | } |
186 | 0 | break; |
187 | 0 | } |
188 | 0 | break; |
189 | 0 | case 14: // 7 strings to match. |
190 | 0 | switch (RuleIdentifier[0]) { |
191 | 0 | default: break; |
192 | 0 | case 'b': // 1 string to match. |
193 | 0 | if (memcmp(RuleIdentifier.data()+1, "inop_same_val", 13) != 0) |
194 | 0 | break; |
195 | 0 | return 25; // "binop_same_val" |
196 | 0 | case 'f': // 2 strings to match. |
197 | 0 | switch (RuleIdentifier[1]) { |
198 | 0 | default: break; |
199 | 0 | case 'a': // 1 string to match. |
200 | 0 | if (memcmp(RuleIdentifier.data()+2, "bs_fneg_fold", 12) != 0) |
201 | 0 | break; |
202 | 0 | return 107; // "fabs_fneg_fold" |
203 | 0 | case 'n': // 1 string to match. |
204 | 0 | if (memcmp(RuleIdentifier.data()+2, "eg_fneg_fold", 12) != 0) |
205 | 0 | break; |
206 | 0 | return 31; // "fneg_fneg_fold" |
207 | 0 | } |
208 | 0 | break; |
209 | 0 | case 'm': // 1 string to match. |
210 | 0 | if (memcmp(RuleIdentifier.data()+1, "ul_by_neg_one", 13) != 0) |
211 | 0 | break; |
212 | 0 | return 3; // "mul_by_neg_one" |
213 | 0 | case 'r': // 1 string to match. |
214 | 0 | if (memcmp(RuleIdentifier.data()+1, "eassoc_ptradd", 13) != 0) |
215 | 0 | break; |
216 | 0 | return 45; // "reassoc_ptradd" |
217 | 0 | case 's': // 1 string to match. |
218 | 0 | if (memcmp(RuleIdentifier.data()+1, "hifts_too_big", 13) != 0) |
219 | 0 | break; |
220 | 0 | return 44; // "shifts_too_big" |
221 | 0 | case 't': // 1 string to match. |
222 | 0 | if (memcmp(RuleIdentifier.data()+1, "runc_ext_fold", 13) != 0) |
223 | 0 | break; |
224 | 0 | return 71; // "trunc_ext_fold" |
225 | 0 | } |
226 | 0 | break; |
227 | 0 | case 15: // 6 strings to match. |
228 | 0 | switch (RuleIdentifier[0]) { |
229 | 0 | default: break; |
230 | 0 | case 'e': // 1 string to match. |
231 | 0 | if (memcmp(RuleIdentifier.data()+1, "xtending_loads", 14) != 0) |
232 | 0 | break; |
233 | 0 | return 8; // "extending_loads" |
234 | 0 | case 'i': // 1 string to match. |
235 | 0 | if (memcmp(RuleIdentifier.data()+1, "dempotent_prop", 14) != 0) |
236 | 0 | break; |
237 | 0 | return 4; // "idempotent_prop" |
238 | 0 | case 'l': // 1 string to match. |
239 | 0 | if (memcmp(RuleIdentifier.data()+1, "oad_or_combine", 14) != 0) |
240 | 0 | break; |
241 | 0 | return 91; // "load_or_combine" |
242 | 0 | case 'o': // 1 string to match. |
243 | 0 | if (memcmp(RuleIdentifier.data()+1, "verlapping_and", 14) != 0) |
244 | 0 | break; |
245 | 0 | return 81; // "overlapping_and" |
246 | 0 | case 's': // 1 string to match. |
247 | 0 | if (memcmp(RuleIdentifier.data()+1, "elect_same_val", 14) != 0) |
248 | 0 | break; |
249 | 0 | return 23; // "select_same_val" |
250 | 0 | case 'z': // 1 string to match. |
251 | 0 | if (memcmp(RuleIdentifier.data()+1, "ext_trunc_fold", 14) != 0) |
252 | 0 | break; |
253 | 0 | return 59; // "zext_trunc_fold" |
254 | 0 | } |
255 | 0 | break; |
256 | 0 | case 16: // 4 strings to match. |
257 | 0 | switch (RuleIdentifier[0]) { |
258 | 0 | default: break; |
259 | 0 | case 'c': // 1 string to match. |
260 | 0 | if (memcmp(RuleIdentifier.data()+1, "lamp_i64_to_i16", 15) != 0) |
261 | 0 | break; |
262 | 0 | return 128; // "clamp_i64_to_i16" |
263 | 0 | case 's': // 2 strings to match. |
264 | 0 | if (memcmp(RuleIdentifier.data()+1, "elect_", 6) != 0) |
265 | 0 | break; |
266 | 0 | switch (RuleIdentifier[7]) { |
267 | 0 | default: break; |
268 | 0 | case 't': // 1 string to match. |
269 | 0 | if (memcmp(RuleIdentifier.data()+8, "o_minmax", 8) != 0) |
270 | 0 | break; |
271 | 0 | return 123; // "select_to_minmax" |
272 | 0 | case 'u': // 1 string to match. |
273 | 0 | if (memcmp(RuleIdentifier.data()+8, "ndef_cmp", 8) != 0) |
274 | 0 | break; |
275 | 0 | return 52; // "select_undef_cmp" |
276 | 0 | } |
277 | 0 | break; |
278 | 0 | case 'u': // 1 string to match. |
279 | 0 | if (memcmp(RuleIdentifier.data()+1, "ndef_to_fp_zero", 15) != 0) |
280 | 0 | break; |
281 | 0 | return 11; // "undef_to_fp_zero" |
282 | 0 | } |
283 | 0 | break; |
284 | 0 | case 17: // 9 strings to match. |
285 | 0 | switch (RuleIdentifier[0]) { |
286 | 0 | default: break; |
287 | 0 | case 'a': // 2 strings to match. |
288 | 0 | switch (RuleIdentifier[1]) { |
289 | 0 | default: break; |
290 | 0 | case 'd': // 1 string to match. |
291 | 0 | if (memcmp(RuleIdentifier.data()+2, "d_p2i_to_ptradd", 15) != 0) |
292 | 0 | break; |
293 | 0 | return 2; // "add_p2i_to_ptradd" |
294 | 0 | case 'n': // 1 string to match. |
295 | 0 | if (memcmp(RuleIdentifier.data()+2, "yext_trunc_fold", 15) != 0) |
296 | 0 | break; |
297 | 0 | return 30; // "anyext_trunc_fold" |
298 | 0 | } |
299 | 0 | break; |
300 | 0 | case 'c': // 1 string to match. |
301 | 0 | if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fma", 16) != 0) |
302 | 0 | break; |
303 | 0 | return 105; // "constant_fold_fma" |
304 | 0 | case 'd': // 1 string to match. |
305 | 0 | if (memcmp(RuleIdentifier.data()+1, "iv_rem_to_divrem", 16) != 0) |
306 | 0 | break; |
307 | 0 | return 92; // "div_rem_to_divrem" |
308 | 0 | case 'e': // 1 string to match. |
309 | 0 | if (memcmp(RuleIdentifier.data()+1, "rase_undef_store", 16) != 0) |
310 | 0 | break; |
311 | 0 | return 20; // "erase_undef_store" |
312 | 0 | case 'p': // 1 string to match. |
313 | 0 | if (memcmp(RuleIdentifier.data()+1, "tr_add_with_zero", 16) != 0) |
314 | 0 | break; |
315 | 0 | return 88; // "ptr_add_with_zero" |
316 | 0 | case 's': // 1 string to match. |
317 | 0 | if (memcmp(RuleIdentifier.data()+1, "hift_immed_chain", 16) != 0) |
318 | 0 | break; |
319 | 0 | return 89; // "shift_immed_chain" |
320 | 0 | case 'u': // 2 strings to match. |
321 | 0 | switch (RuleIdentifier[1]) { |
322 | 0 | default: break; |
323 | 0 | case 'n': // 1 string to match. |
324 | 0 | if (memcmp(RuleIdentifier.data()+2, "def_to_int_zero", 15) != 0) |
325 | 0 | break; |
326 | 0 | return 12; // "undef_to_int_zero" |
327 | 0 | case 'r': // 1 string to match. |
328 | 0 | if (memcmp(RuleIdentifier.data()+2, "em_pow2_to_mask", 15) != 0) |
329 | 0 | break; |
330 | 0 | return 58; // "urem_pow2_to_mask" |
331 | 0 | } |
332 | 0 | break; |
333 | 0 | } |
334 | 0 | break; |
335 | 0 | case 18: // 6 strings to match. |
336 | 0 | switch (RuleIdentifier[0]) { |
337 | 0 | default: break; |
338 | 0 | case 'b': // 1 string to match. |
339 | 0 | if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero", 17) != 0) |
340 | 0 | break; |
341 | 0 | return 26; // "binop_left_to_zero" |
342 | 0 | case 'c': // 3 strings to match. |
343 | 0 | if (RuleIdentifier[1] != 'o') |
344 | 0 | break; |
345 | 0 | switch (RuleIdentifier[2]) { |
346 | 0 | default: break; |
347 | 0 | case 'm': // 1 string to match. |
348 | 0 | if (memcmp(RuleIdentifier.data()+3, "bine_minmax_nan", 15) != 0) |
349 | 0 | break; |
350 | 0 | return 86; // "combine_minmax_nan" |
351 | 0 | case 'n': // 2 strings to match. |
352 | 0 | if (memcmp(RuleIdentifier.data()+3, "stant_fold_f", 12) != 0) |
353 | 0 | break; |
354 | 0 | switch (RuleIdentifier[15]) { |
355 | 0 | default: break; |
356 | 0 | case 'a': // 1 string to match. |
357 | 0 | if (memcmp(RuleIdentifier.data()+16, "bs", 2) != 0) |
358 | 0 | break; |
359 | 0 | return 74; // "constant_fold_fabs" |
360 | 0 | case 'n': // 1 string to match. |
361 | 0 | if (memcmp(RuleIdentifier.data()+16, "eg", 2) != 0) |
362 | 0 | break; |
363 | 0 | return 73; // "constant_fold_fneg" |
364 | 0 | } |
365 | 0 | break; |
366 | 0 | } |
367 | 0 | break; |
368 | 0 | case 'f': // 1 string to match. |
369 | 0 | if (memcmp(RuleIdentifier.data()+1, "ptrunc_fpext_fold", 17) != 0) |
370 | 0 | break; |
371 | 0 | return 39; // "fptrunc_fpext_fold" |
372 | 0 | case 's': // 1 string to match. |
373 | 0 | if (memcmp(RuleIdentifier.data()+1, "ext_inreg_of_load", 17) != 0) |
374 | 0 | break; |
375 | 0 | return 49; // "sext_inreg_of_load" |
376 | 0 | } |
377 | 0 | break; |
378 | 0 | case 19: // 12 strings to match. |
379 | 0 | switch (RuleIdentifier[0]) { |
380 | 0 | default: break; |
381 | 0 | case 'b': // 1 string to match. |
382 | 0 | if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero", 18) != 0) |
383 | 0 | break; |
384 | 0 | return 27; // "binop_right_to_zero" |
385 | 0 | case 'c': // 4 strings to match. |
386 | 0 | if (memcmp(RuleIdentifier.data()+1, "onst", 4) != 0) |
387 | 0 | break; |
388 | 0 | switch (RuleIdentifier[5]) { |
389 | 0 | default: break; |
390 | 0 | case '_': // 1 string to match. |
391 | 0 | if (memcmp(RuleIdentifier.data()+6, "ptradd_to_i2p", 13) != 0) |
392 | 0 | break; |
393 | 0 | return 80; // "const_ptradd_to_i2p" |
394 | 0 | case 'a': // 3 strings to match. |
395 | 0 | if (memcmp(RuleIdentifier.data()+6, "nt_fold_", 8) != 0) |
396 | 0 | break; |
397 | 0 | switch (RuleIdentifier[14]) { |
398 | 0 | default: break; |
399 | 0 | case 'b': // 1 string to match. |
400 | 0 | if (memcmp(RuleIdentifier.data()+15, "inop", 4) != 0) |
401 | 0 | break; |
402 | 0 | return 103; // "constant_fold_binop" |
403 | 0 | case 'f': // 2 strings to match. |
404 | 0 | switch (RuleIdentifier[15]) { |
405 | 0 | default: break; |
406 | 0 | case 'l': // 1 string to match. |
407 | 0 | if (memcmp(RuleIdentifier.data()+16, "og2", 3) != 0) |
408 | 0 | break; |
409 | 0 | return 76; // "constant_fold_flog2" |
410 | 0 | case 's': // 1 string to match. |
411 | 0 | if (memcmp(RuleIdentifier.data()+16, "qrt", 3) != 0) |
412 | 0 | break; |
413 | 0 | return 75; // "constant_fold_fsqrt" |
414 | 0 | } |
415 | 0 | break; |
416 | 0 | } |
417 | 0 | break; |
418 | 0 | } |
419 | 0 | break; |
420 | 0 | case 'e': // 1 string to match. |
421 | 0 | if (memcmp(RuleIdentifier.data()+1, "xtend_through_phis", 18) != 0) |
422 | 0 | break; |
423 | 0 | return 41; // "extend_through_phis" |
424 | 0 | case 'p': // 1 string to match. |
425 | 0 | if (memcmp(RuleIdentifier.data()+1, "tr_add_immed_chain", 18) != 0) |
426 | 0 | break; |
427 | 0 | return 47; // "ptr_add_immed_chain" |
428 | 0 | case 'r': // 2 strings to match. |
429 | 0 | switch (RuleIdentifier[1]) { |
430 | 0 | default: break; |
431 | 0 | case 'e': // 1 string to match. |
432 | 0 | if (memcmp(RuleIdentifier.data()+2, "assoc_comm_binops", 17) != 0) |
433 | 0 | break; |
434 | 0 | return 46; // "reassoc_comm_binops" |
435 | 0 | case 'i': // 1 string to match. |
436 | 0 | if (memcmp(RuleIdentifier.data()+2, "ght_identity_zero", 17) != 0) |
437 | 0 | break; |
438 | 0 | return 24; // "right_identity_zero" |
439 | 0 | } |
440 | 0 | break; |
441 | 0 | case 's': // 2 strings to match. |
442 | 0 | switch (RuleIdentifier[1]) { |
443 | 0 | default: break; |
444 | 0 | case 'e': // 1 string to match. |
445 | 0 | if (memcmp(RuleIdentifier.data()+2, "lect_constant_cmp", 17) != 0) |
446 | 0 | break; |
447 | 0 | return 53; // "select_constant_cmp" |
448 | 0 | case 'i': // 1 string to match. |
449 | 0 | if (memcmp(RuleIdentifier.data()+2, "mplify_add_to_sub", 17) != 0) |
450 | 0 | break; |
451 | 0 | return 42; // "simplify_add_to_sub" |
452 | 0 | } |
453 | 0 | break; |
454 | 0 | case 'u': // 1 string to match. |
455 | 0 | if (memcmp(RuleIdentifier.data()+1, "nary_undef_to_zero", 18) != 0) |
456 | 0 | break; |
457 | 0 | return 16; // "unary_undef_to_zero" |
458 | 0 | } |
459 | 0 | break; |
460 | 0 | case 20: // 5 strings to match. |
461 | 0 | switch (RuleIdentifier[0]) { |
462 | 0 | default: break; |
463 | 0 | case 'a': // 1 string to match. |
464 | 0 | if (memcmp(RuleIdentifier.data()+1, "nd_or_disjoint_mask", 19) != 0) |
465 | 0 | break; |
466 | 0 | return 112; // "and_or_disjoint_mask" |
467 | 0 | case 'b': // 1 string to match. |
468 | 0 | if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_fold", 19) != 0) |
469 | 0 | break; |
470 | 0 | return 38; // "bitcast_bitcast_fold" |
471 | 0 | case 'r': // 2 strings to match. |
472 | 0 | if (memcmp(RuleIdentifier.data()+1, "edu", 3) != 0) |
473 | 0 | break; |
474 | 0 | switch (RuleIdentifier[4]) { |
475 | 0 | default: break; |
476 | 0 | case 'c': // 1 string to match. |
477 | 0 | if (memcmp(RuleIdentifier.data()+5, "e_shl_of_extend", 15) != 0) |
478 | 0 | break; |
479 | 0 | return 50; // "reduce_shl_of_extend" |
480 | 0 | case 'n': // 1 string to match. |
481 | 0 | if (memcmp(RuleIdentifier.data()+5, "dant_sext_inreg", 15) != 0) |
482 | 0 | break; |
483 | 0 | return 56; // "redundant_sext_inreg" |
484 | 0 | } |
485 | 0 | break; |
486 | 0 | case 'u': // 1 string to match. |
487 | 0 | if (memcmp(RuleIdentifier.data()+1, "nmerge_zext_to_zext", 19) != 0) |
488 | 0 | break; |
489 | 0 | return 69; // "unmerge_zext_to_zext" |
490 | 0 | } |
491 | 0 | break; |
492 | 0 | case 21: // 5 strings to match. |
493 | 0 | switch (RuleIdentifier[0]) { |
494 | 0 | default: break; |
495 | 0 | case 'c': // 2 strings to match. |
496 | 0 | if (memcmp(RuleIdentifier.data()+1, "onstant_fold_", 13) != 0) |
497 | 0 | break; |
498 | 0 | switch (RuleIdentifier[14]) { |
499 | 0 | default: break; |
500 | 0 | case 'c': // 1 string to match. |
501 | 0 | if (memcmp(RuleIdentifier.data()+15, "ast_op", 6) != 0) |
502 | 0 | break; |
503 | 0 | return 106; // "constant_fold_cast_op" |
504 | 0 | case 'f': // 1 string to match. |
505 | 0 | if (memcmp(RuleIdentifier.data()+15, "ptrunc", 6) != 0) |
506 | 0 | break; |
507 | 0 | return 77; // "constant_fold_fptrunc" |
508 | 0 | } |
509 | 0 | break; |
510 | 0 | case 'r': // 1 string to match. |
511 | 0 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_fp", 20) != 0) |
512 | 0 | break; |
513 | 0 | return 33; // "right_identity_one_fp" |
514 | 0 | case 'u': // 2 strings to match. |
515 | 0 | if (RuleIdentifier[1] != 'n') |
516 | 0 | break; |
517 | 0 | switch (RuleIdentifier[2]) { |
518 | 0 | default: break; |
519 | 0 | case 'd': // 1 string to match. |
520 | 0 | if (memcmp(RuleIdentifier.data()+3, "ef_to_negative_one", 18) != 0) |
521 | 0 | break; |
522 | 0 | return 13; // "undef_to_negative_one" |
523 | 0 | case 'm': // 1 string to match. |
524 | 0 | if (memcmp(RuleIdentifier.data()+3, "erge_dead_to_trunc", 18) != 0) |
525 | 0 | break; |
526 | 0 | return 68; // "unmerge_dead_to_trunc" |
527 | 0 | } |
528 | 0 | break; |
529 | 0 | } |
530 | 0 | break; |
531 | 0 | case 22: // 11 strings to match. |
532 | 0 | switch (RuleIdentifier[0]) { |
533 | 0 | default: break; |
534 | 0 | case 'c': // 1 string to match. |
535 | 0 | if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fp_binop", 21) != 0) |
536 | 0 | break; |
537 | 0 | return 104; // "constant_fold_fp_binop" |
538 | 0 | case 'f': // 4 strings to match. |
539 | 0 | switch (RuleIdentifier[1]) { |
540 | 0 | default: break; |
541 | 0 | case 'o': // 1 string to match. |
542 | 0 | if (memcmp(RuleIdentifier.data()+2, "ld_binop_into_select", 20) != 0) |
543 | 0 | break; |
544 | 0 | return 121; // "fold_binop_into_select" |
545 | 0 | case 'u': // 3 strings to match. |
546 | 0 | if (memcmp(RuleIdentifier.data()+2, "nnel_shift_", 11) != 0) |
547 | 0 | break; |
548 | 0 | switch (RuleIdentifier[13]) { |
549 | 0 | default: break; |
550 | 0 | case 'l': // 1 string to match. |
551 | 0 | if (memcmp(RuleIdentifier.data()+14, "eft_zero", 8) != 0) |
552 | 0 | break; |
553 | 0 | return 96; // "funnel_shift_left_zero" |
554 | 0 | case 'o': // 1 string to match. |
555 | 0 | if (memcmp(RuleIdentifier.data()+14, "vershift", 8) != 0) |
556 | 0 | break; |
557 | 0 | return 97; // "funnel_shift_overshift" |
558 | 0 | case 't': // 1 string to match. |
559 | 0 | if (memcmp(RuleIdentifier.data()+14, "o_rotate", 8) != 0) |
560 | 0 | break; |
561 | 0 | return 94; // "funnel_shift_to_rotate" |
562 | 0 | } |
563 | 0 | break; |
564 | 0 | } |
565 | 0 | break; |
566 | 0 | case 'i': // 1 string to match. |
567 | 0 | if (memcmp(RuleIdentifier.data()+1, "cmp_to_lhs_known_bits", 21) != 0) |
568 | 0 | break; |
569 | 0 | return 61; // "icmp_to_lhs_known_bits" |
570 | 0 | case 'p': // 1 string to match. |
571 | 0 | if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_any_op", 21) != 0) |
572 | 0 | break; |
573 | 0 | return 17; // "propagate_undef_any_op" |
574 | 0 | case 'r': // 2 strings to match. |
575 | 0 | switch (RuleIdentifier[1]) { |
576 | 0 | default: break; |
577 | 0 | case 'e': // 1 string to match. |
578 | 0 | if (memcmp(RuleIdentifier.data()+2, "dundant_neg_operands", 20) != 0) |
579 | 0 | break; |
580 | 0 | return 111; // "redundant_neg_operands" |
581 | 0 | case 'i': // 1 string to match. |
582 | 0 | if (memcmp(RuleIdentifier.data()+2, "ght_identity_one_int", 20) != 0) |
583 | 0 | break; |
584 | 0 | return 32; // "right_identity_one_int" |
585 | 0 | } |
586 | 0 | break; |
587 | 0 | case 's': // 1 string to match. |
588 | 0 | if (memcmp(RuleIdentifier.data()+1, "hl_ashr_to_sext_inreg", 21) != 0) |
589 | 0 | break; |
590 | 0 | return 48; // "shl_ashr_to_sext_inreg" |
591 | 0 | case 't': // 1 string to match. |
592 | 0 | if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold", 21) != 0) |
593 | 0 | break; |
594 | 0 | return 36; // "trunc_buildvector_fold" |
595 | 0 | } |
596 | 0 | break; |
597 | 0 | case 23: // 4 strings to match. |
598 | 0 | switch (RuleIdentifier[0]) { |
599 | 0 | default: break; |
600 | 0 | case 'f': // 1 string to match. |
601 | 0 | if (memcmp(RuleIdentifier.data()+1, "unnel_shift_right_zero", 22) != 0) |
602 | 0 | break; |
603 | 0 | return 95; // "funnel_shift_right_zero" |
604 | 0 | case 'i': // 2 strings to match. |
605 | 0 | if (memcmp(RuleIdentifier.data()+1, "tof_const_zero_fold_", 20) != 0) |
606 | 0 | break; |
607 | 0 | switch (RuleIdentifier[21]) { |
608 | 0 | default: break; |
609 | 0 | case 's': // 1 string to match. |
610 | 0 | if (RuleIdentifier[22] != 'i') |
611 | 0 | break; |
612 | 0 | return 78; // "itof_const_zero_fold_si" |
613 | 0 | case 'u': // 1 string to match. |
614 | 0 | if (RuleIdentifier[22] != 'i') |
615 | 0 | break; |
616 | 0 | return 79; // "itof_const_zero_fold_ui" |
617 | 0 | } |
618 | 0 | break; |
619 | 0 | case 'p': // 1 string to match. |
620 | 0 | if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_all_ops", 22) != 0) |
621 | 0 | break; |
622 | 0 | return 18; // "propagate_undef_all_ops" |
623 | 0 | } |
624 | 0 | break; |
625 | 0 | case 24: // 4 strings to match. |
626 | 0 | switch (RuleIdentifier[0]) { |
627 | 0 | default: break; |
628 | 0 | case 'b': // 1 string to match. |
629 | 0 | if (memcmp(RuleIdentifier.data()+1, "inop_left_undef_to_zero", 23) != 0) |
630 | 0 | break; |
631 | 0 | return 14; // "binop_left_undef_to_zero" |
632 | 0 | case 'n': // 1 string to match. |
633 | 0 | if (memcmp(RuleIdentifier.data()+1, "arrow_binop_feeding_and", 23) != 0) |
634 | 0 | break; |
635 | 0 | return 51; // "narrow_binop_feeding_and" |
636 | 0 | case 's': // 1 string to match. |
637 | 0 | if (memcmp(RuleIdentifier.data()+1, "ext_inreg_to_zext_inreg", 23) != 0) |
638 | 0 | break; |
639 | 0 | return 62; // "sext_inreg_to_zext_inreg" |
640 | 0 | case 'x': // 1 string to match. |
641 | 0 | if (memcmp(RuleIdentifier.data()+1, "or_of_and_with_same_reg", 23) != 0) |
642 | 0 | break; |
643 | 0 | return 87; // "xor_of_and_with_same_reg" |
644 | 0 | } |
645 | 0 | break; |
646 | 0 | case 25: // 4 strings to match. |
647 | 0 | switch (RuleIdentifier[0]) { |
648 | 0 | default: break; |
649 | 0 | case 'b': // 3 strings to match. |
650 | 0 | switch (RuleIdentifier[1]) { |
651 | 0 | default: break; |
652 | 0 | case 'i': // 2 strings to match. |
653 | 0 | if (memcmp(RuleIdentifier.data()+2, "tfield_extract_from_", 20) != 0) |
654 | 0 | break; |
655 | 0 | switch (RuleIdentifier[22]) { |
656 | 0 | default: break; |
657 | 0 | case 'a': // 1 string to match. |
658 | 0 | if (memcmp(RuleIdentifier.data()+23, "nd", 2) != 0) |
659 | 0 | break; |
660 | 0 | return 100; // "bitfield_extract_from_and" |
661 | 0 | case 's': // 1 string to match. |
662 | 0 | if (memcmp(RuleIdentifier.data()+23, "hr", 2) != 0) |
663 | 0 | break; |
664 | 0 | return 101; // "bitfield_extract_from_shr" |
665 | 0 | } |
666 | 0 | break; |
667 | 0 | case 'u': // 1 string to match. |
668 | 0 | if (memcmp(RuleIdentifier.data()+2, "ildvector_identity_fold", 23) != 0) |
669 | 0 | break; |
670 | 0 | return 35; // "buildvector_identity_fold" |
671 | 0 | } |
672 | 0 | break; |
673 | 0 | case 'e': // 1 string to match. |
674 | 0 | if (memcmp(RuleIdentifier.data()+1, "xtract_vec_elt_build_vec", 24) != 0) |
675 | 0 | break; |
676 | 0 | return 6; // "extract_vec_elt_build_vec" |
677 | 0 | } |
678 | 0 | break; |
679 | 0 | case 26: // 4 strings to match. |
680 | 0 | switch (RuleIdentifier[0]) { |
681 | 0 | default: break; |
682 | 0 | case 'b': // 1 string to match. |
683 | 0 | if (memcmp(RuleIdentifier.data()+1, "inop_right_undef_to_undef", 25) != 0) |
684 | 0 | break; |
685 | 0 | return 15; // "binop_right_undef_to_undef" |
686 | 0 | case 'c': // 1 string to match. |
687 | 0 | if (memcmp(RuleIdentifier.data()+1, "ommute_fp_constant_to_rhs", 25) != 0) |
688 | 0 | break; |
689 | 0 | return 127; // "commute_fp_constant_to_rhs" |
690 | 0 | case 'f': // 1 string to match. |
691 | 0 | if (memcmp(RuleIdentifier.data()+1, "unnel_shift_from_or_shift", 25) != 0) |
692 | 0 | break; |
693 | 0 | return 93; // "funnel_shift_from_or_shift" |
694 | 0 | case 'r': // 1 string to match. |
695 | 0 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp", 25) != 0) |
696 | 0 | break; |
697 | 0 | return 40; // "right_identity_neg_zero_fp" |
698 | 0 | } |
699 | 0 | break; |
700 | 0 | case 27: // 3 strings to match. |
701 | 0 | switch (RuleIdentifier[0]) { |
702 | 0 | default: break; |
703 | 0 | case 'c': // 1 string to match. |
704 | 0 | if (memcmp(RuleIdentifier.data()+1, "ommute_int_constant_to_rhs", 26) != 0) |
705 | 0 | break; |
706 | 0 | return 126; // "commute_int_constant_to_rhs" |
707 | 0 | case 'r': // 1 string to match. |
708 | 0 | if (memcmp(RuleIdentifier.data()+1, "edundant_binop_in_equality", 26) != 0) |
709 | 0 | break; |
710 | 0 | return 124; // "redundant_binop_in_equality" |
711 | 0 | case 't': // 1 string to match. |
712 | 0 | if (memcmp(RuleIdentifier.data()+1, "runc_lshr_buildvector_fold", 26) != 0) |
713 | 0 | break; |
714 | 0 | return 37; // "trunc_lshr_buildvector_fold" |
715 | 0 | } |
716 | 0 | break; |
717 | 0 | case 28: // 3 strings to match. |
718 | 0 | switch (RuleIdentifier[0]) { |
719 | 0 | default: break; |
720 | 0 | case 'o': // 1 string to match. |
721 | 0 | if (memcmp(RuleIdentifier.data()+1, "pt_brcond_by_inverting_cond", 27) != 0) |
722 | 0 | break; |
723 | 0 | return 65; // "opt_brcond_by_inverting_cond" |
724 | 0 | case 'p': // 1 string to match. |
725 | 0 | if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_shuffle_mask", 27) != 0) |
726 | 0 | break; |
727 | 0 | return 19; // "propagate_undef_shuffle_mask" |
728 | 0 | case 's': // 1 string to match. |
729 | 0 | if (memcmp(RuleIdentifier.data()+1, "hift_of_shifted_logic_chain", 27) != 0) |
730 | 0 | break; |
731 | 0 | return 90; // "shift_of_shifted_logic_chain" |
732 | 0 | } |
733 | 0 | break; |
734 | 0 | case 29: // 3 strings to match. |
735 | 0 | switch (RuleIdentifier[0]) { |
736 | 0 | default: break; |
737 | 0 | case 'b': // 1 string to match. |
738 | 0 | if (memcmp(RuleIdentifier.data()+1, "itfield_extract_from_shr_and", 28) != 0) |
739 | 0 | break; |
740 | 0 | return 102; // "bitfield_extract_from_shr_and" |
741 | 0 | case 'c': // 1 string to match. |
742 | 0 | if (memcmp(RuleIdentifier.data()+1, "ombine_extracted_vector_load", 28) != 0) |
743 | 0 | break; |
744 | 0 | return 10; // "combine_extracted_vector_load" |
745 | 0 | case 'i': // 1 string to match. |
746 | 0 | if (memcmp(RuleIdentifier.data()+1, "cmp_to_true_false_known_bits", 28) != 0) |
747 | 0 | break; |
748 | 0 | return 60; // "icmp_to_true_false_known_bits" |
749 | 0 | } |
750 | 0 | break; |
751 | 0 | case 32: // 3 strings to match. |
752 | 0 | switch (RuleIdentifier[0]) { |
753 | 0 | default: break; |
754 | 0 | case 'b': // 1 string to match. |
755 | 0 | if (memcmp(RuleIdentifier.data()+1, "itfield_extract_from_sext_inreg", 31) != 0) |
756 | 0 | break; |
757 | 0 | return 99; // "bitfield_extract_from_sext_inreg" |
758 | 0 | case 'c': // 2 strings to match. |
759 | 0 | if (memcmp(RuleIdentifier.data()+1, "ombine_f", 8) != 0) |
760 | 0 | break; |
761 | 0 | switch (RuleIdentifier[9]) { |
762 | 0 | default: break; |
763 | 0 | case 'a': // 1 string to match. |
764 | 0 | if (memcmp(RuleIdentifier.data()+10, "dd_fmul_to_fmad_or_fma", 22) != 0) |
765 | 0 | break; |
766 | 0 | return 113; // "combine_fadd_fmul_to_fmad_or_fma" |
767 | 0 | case 's': // 1 string to match. |
768 | 0 | if (memcmp(RuleIdentifier.data()+10, "ub_fmul_to_fmad_or_fma", 22) != 0) |
769 | 0 | break; |
770 | 0 | return 117; // "combine_fsub_fmul_to_fmad_or_fma" |
771 | 0 | } |
772 | 0 | break; |
773 | 0 | } |
774 | 0 | break; |
775 | 0 | case 34: // 1 string to match. |
776 | 0 | if (memcmp(RuleIdentifier.data()+0, "extract_all_elts_from_build_vector", 34) != 0) |
777 | 0 | break; |
778 | 0 | return 7; // "extract_all_elts_from_build_vector" |
779 | 0 | case 36: // 3 strings to match. |
780 | 0 | switch (RuleIdentifier[0]) { |
781 | 0 | default: break; |
782 | 0 | case 'c': // 2 strings to match. |
783 | 0 | if (memcmp(RuleIdentifier.data()+1, "ombine_", 7) != 0) |
784 | 0 | break; |
785 | 0 | switch (RuleIdentifier[8]) { |
786 | 0 | default: break; |
787 | 0 | case 'f': // 1 string to match. |
788 | 0 | if (memcmp(RuleIdentifier.data()+9, "add_fma_fmul_to_fmad_or_fma", 27) != 0) |
789 | 0 | break; |
790 | 0 | return 115; // "combine_fadd_fma_fmul_to_fmad_or_fma" |
791 | 0 | case 'i': // 1 string to match. |
792 | 0 | if (memcmp(RuleIdentifier.data()+9, "nsert_vec_elts_build_vector", 27) != 0) |
793 | 0 | break; |
794 | 0 | return 5; // "combine_insert_vec_elts_build_vector" |
795 | 0 | } |
796 | 0 | break; |
797 | 0 | case 'i': // 1 string to match. |
798 | 0 | if (memcmp(RuleIdentifier.data()+1, "nsert_extract_vec_elt_out_of_bounds", 35) != 0) |
799 | 0 | break; |
800 | 0 | return 22; // "insert_extract_vec_elt_out_of_bounds" |
801 | 0 | } |
802 | 0 | break; |
803 | 0 | case 37: // 2 strings to match. |
804 | 0 | switch (RuleIdentifier[0]) { |
805 | 0 | default: break; |
806 | 0 | case 'c': // 1 string to match. |
807 | 0 | if (memcmp(RuleIdentifier.data()+1, "ombine_fsub_fneg_fmul_to_fmad_or_fma", 36) != 0) |
808 | 0 | break; |
809 | 0 | return 118; // "combine_fsub_fneg_fmul_to_fmad_or_fma" |
810 | 0 | case 'h': // 1 string to match. |
811 | 0 | if (memcmp(RuleIdentifier.data()+1, "oist_logic_op_with_same_opcode_hands", 36) != 0) |
812 | 0 | break; |
813 | 0 | return 43; // "hoist_logic_op_with_same_opcode_hands" |
814 | 0 | } |
815 | 0 | break; |
816 | 0 | case 38: // 2 strings to match. |
817 | 0 | if (memcmp(RuleIdentifier.data()+0, "combine_f", 9) != 0) |
818 | 0 | break; |
819 | 0 | switch (RuleIdentifier[9]) { |
820 | 0 | default: break; |
821 | 0 | case 'a': // 1 string to match. |
822 | 0 | if (memcmp(RuleIdentifier.data()+10, "dd_fpext_fmul_to_fmad_or_fma", 28) != 0) |
823 | 0 | break; |
824 | 0 | return 114; // "combine_fadd_fpext_fmul_to_fmad_or_fma" |
825 | 0 | case 's': // 1 string to match. |
826 | 0 | if (memcmp(RuleIdentifier.data()+10, "ub_fpext_fmul_to_fmad_or_fma", 28) != 0) |
827 | 0 | break; |
828 | 0 | return 119; // "combine_fsub_fpext_fmul_to_fmad_or_fma" |
829 | 0 | } |
830 | 0 | break; |
831 | 0 | case 42: // 1 string to match. |
832 | 0 | if (memcmp(RuleIdentifier.data()+0, "combine_fadd_fpext_fma_fmul_to_fmad_or_fma", 42) != 0) |
833 | 0 | break; |
834 | 0 | return 116; // "combine_fadd_fpext_fma_fmul_to_fmad_or_fma" |
835 | 0 | case 43: // 1 string to match. |
836 | 0 | if (memcmp(RuleIdentifier.data()+0, "combine_fsub_fpext_fneg_fmul_to_fmad_or_fma", 43) != 0) |
837 | 0 | break; |
838 | 0 | return 120; // "combine_fsub_fpext_fneg_fmul_to_fmad_or_fma" |
839 | 0 | } |
840 | 0 | #endif // ifndef NDEBUG |
841 | | |
842 | 0 | return std::nullopt; |
843 | 0 | } |
844 | 0 | static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) { |
845 | 0 | std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-'); |
846 | 0 | if (!RangePair.second.empty()) { |
847 | 0 | const auto First = getRuleIdxForIdentifier(RangePair.first); |
848 | 0 | const auto Last = getRuleIdxForIdentifier(RangePair.second); |
849 | 0 | if (!First || !Last) |
850 | 0 | return std::nullopt; |
851 | 0 | if (First >= Last) |
852 | 0 | report_fatal_error("Beginning of range should be before end of range"); |
853 | 0 | return {{*First, *Last + 1}}; |
854 | 0 | } |
855 | 0 | if (RangePair.first == "*") { |
856 | 0 | return {{0, 130}}; |
857 | 0 | } |
858 | 0 | const auto I = getRuleIdxForIdentifier(RangePair.first); |
859 | 0 | if (!I) |
860 | 0 | return std::nullopt; |
861 | 0 | return {{*I, *I + 1}}; |
862 | 0 | } |
863 | | |
864 | 0 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) { |
865 | 0 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
866 | 0 | if (!MaybeRange) |
867 | 0 | return false; |
868 | 0 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
869 | 0 | DisabledRules.reset(I); |
870 | 0 | return true; |
871 | 0 | } |
872 | | |
873 | 0 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) { |
874 | 0 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
875 | 0 | if (!MaybeRange) |
876 | 0 | return false; |
877 | 0 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
878 | 0 | DisabledRules.set(I); |
879 | 0 | return true; |
880 | 0 | } |
881 | | |
882 | | static std::vector<std::string> AMDGPUPreLegalizerCombinerOption; |
883 | | static cl::list<std::string> AMDGPUPreLegalizerCombinerDisableOption( |
884 | | "amdgpuprelegalizercombiner-disable-rule", |
885 | | cl::desc("Disable one or more combiner rules temporarily in the AMDGPUPreLegalizerCombiner pass"), |
886 | | cl::CommaSeparated, |
887 | | cl::Hidden, |
888 | | cl::cat(GICombinerOptionCategory), |
889 | 0 | cl::callback([](const std::string &Str) { |
890 | 0 | AMDGPUPreLegalizerCombinerOption.push_back(Str); |
891 | 0 | })); |
892 | | static cl::list<std::string> AMDGPUPreLegalizerCombinerOnlyEnableOption( |
893 | | "amdgpuprelegalizercombiner-only-enable-rule", |
894 | | cl::desc("Disable all rules in the AMDGPUPreLegalizerCombiner pass then re-enable the specified ones"), |
895 | | cl::Hidden, |
896 | | cl::cat(GICombinerOptionCategory), |
897 | 0 | cl::callback([](const std::string &CommaSeparatedArg) { |
898 | 0 | StringRef Str = CommaSeparatedArg; |
899 | 0 | AMDGPUPreLegalizerCombinerOption.push_back("*"); |
900 | 0 | do { |
901 | 0 | auto X = Str.split(","); |
902 | 0 | AMDGPUPreLegalizerCombinerOption.push_back(("!" + X.first).str()); |
903 | 0 | Str = X.second; |
904 | 0 | } while (!Str.empty()); |
905 | 0 | })); |
906 | | |
907 | | |
908 | 0 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const { |
909 | 0 | return !DisabledRules.test(RuleID); |
910 | 0 | } |
911 | 0 | bool AMDGPUPreLegalizerCombinerImplRuleConfig::parseCommandLineOption() { |
912 | 0 | for (StringRef Identifier : AMDGPUPreLegalizerCombinerOption) { |
913 | 0 | bool Enabled = Identifier.consume_front("!"); |
914 | 0 | if (Enabled && !setRuleEnabled(Identifier)) |
915 | 0 | return false; |
916 | 0 | if (!Enabled && !setRuleDisabled(Identifier)) |
917 | 0 | return false; |
918 | 0 | } |
919 | 0 | return true; |
920 | 0 | } |
921 | | |
922 | | #endif // ifdef GET_GICOMBINER_TYPES |
923 | | |
924 | | #ifdef GET_GICOMBINER_TYPES |
925 | | const unsigned MAX_SUBTARGET_PREDICATES = 0; |
926 | | using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>; |
927 | | #endif // ifdef GET_GICOMBINER_TYPES |
928 | | |
929 | | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
930 | | PredicateBitset AvailableModuleFeatures; |
931 | | mutable PredicateBitset AvailableFunctionFeatures; |
932 | 0 | PredicateBitset getAvailableFeatures() const { |
933 | 0 | return AvailableModuleFeatures | AvailableFunctionFeatures; |
934 | 0 | } |
935 | | PredicateBitset |
936 | | computeAvailableModuleFeatures(const AMDGPUSubtarget *Subtarget) const; |
937 | | PredicateBitset |
938 | | computeAvailableFunctionFeatures(const AMDGPUSubtarget *Subtarget, |
939 | | const MachineFunction *MF) const; |
940 | | void setupGeneratedPerFunctionState(MachineFunction &MF) override; |
941 | | #endif // ifdef GET_GICOMBINER_CLASS_MEMBERS |
942 | | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
943 | | mutable MatcherState State; |
944 | | typedef ComplexRendererFns(AMDGPUPreLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const; |
945 | | typedef void(AMDGPUPreLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const; |
946 | | const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo; |
947 | | static AMDGPUPreLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[]; |
948 | | static AMDGPUPreLegalizerCombinerImpl::CustomRendererFn CustomRenderers[]; |
949 | | bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override; |
950 | | bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override; |
951 | | bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override; |
952 | | const uint8_t *getMatchTable() const override; |
953 | | bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override; |
954 | | bool testSimplePredicate(unsigned PredicateID) const override; |
955 | | void runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override; |
956 | | struct MatchInfosTy { |
957 | | std::pair<Register, bool> MDInfo1; |
958 | | ConstantFP* MDInfo23; |
959 | | InstructionStepsMatchInfo MDInfo9; |
960 | | MachineInstr* MDInfo7; |
961 | | SmallVector<Register, 4> MDInfo2; |
962 | | RegisterImmPair MDInfo13; |
963 | | Register MDInfo3; |
964 | | ClampI64ToI16MatchInfo MDInfo24; |
965 | | std::pair<Register, unsigned> MDInfo18; |
966 | | APInt MDInfo20; |
967 | | unsigned MDInfo0; |
968 | | SmallVector<std::pair<Register, MachineInstr*>> MDInfo4; |
969 | | std::tuple<Register, unsigned> MDInfo12; |
970 | | MachineInstr * MDInfo15; |
971 | | ShiftOfShiftedLogic MDInfo22; |
972 | | std::pair<MachineInstr*, LLT> MDInfo19; |
973 | | PreferredTuple MDInfo5; |
974 | | SmallVector<APInt, 8> MDInfo17; |
975 | | std::tuple<Register, Register> MDInfo8; |
976 | | std::tuple<Register, int64_t> MDInfo11; |
977 | | SmallVector<Register, 8> MDInfo16; |
978 | | std::function<void(MachineIRBuilder &)> MDInfo6; |
979 | | int64_t MDInfo14; |
980 | | std::pair<Register, Register> MDInfo21; |
981 | | PtrAddChain MDInfo10; |
982 | | }; |
983 | | mutable MatchInfosTy MatchInfos; |
984 | | |
985 | | #endif // ifdef GET_GICOMBINER_CLASS_MEMBERS |
986 | | |
987 | | #ifdef GET_GICOMBINER_IMPL |
988 | | // LLT Objects. |
989 | | enum { |
990 | | GILLT_s1, |
991 | | }; |
992 | | const static size_t NumTypeObjects = 1; |
993 | | const static LLT TypeObjects[] = { |
994 | | LLT::scalar(1), |
995 | | }; |
996 | | |
997 | | // Bits for subtarget features that participate in instruction matching. |
998 | | enum SubtargetFeatureBits : uint8_t { |
999 | | }; |
1000 | | |
1001 | | PredicateBitset AMDGPUPreLegalizerCombinerImpl:: |
1002 | 0 | computeAvailableModuleFeatures(const AMDGPUSubtarget *Subtarget) const { |
1003 | 0 | PredicateBitset Features; |
1004 | 0 | return Features; |
1005 | 0 | } |
1006 | | |
1007 | 0 | void AMDGPUPreLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) { |
1008 | 0 | AvailableFunctionFeatures = computeAvailableFunctionFeatures((const AMDGPUSubtarget *)&MF.getSubtarget(), &MF); |
1009 | 0 | } |
1010 | | PredicateBitset AMDGPUPreLegalizerCombinerImpl:: |
1011 | 0 | computeAvailableFunctionFeatures(const AMDGPUSubtarget *Subtarget, const MachineFunction *MF) const { |
1012 | 0 | PredicateBitset Features; |
1013 | 0 | return Features; |
1014 | 0 | } |
1015 | | |
1016 | | // Feature bitsets. |
1017 | | enum { |
1018 | | GIFBS_Invalid, |
1019 | | }; |
1020 | | constexpr static PredicateBitset FeatureBitsets[] { |
1021 | | {}, // GIFBS_Invalid |
1022 | | }; |
1023 | | |
1024 | | // ComplexPattern predicates. |
1025 | | enum { |
1026 | | GICP_Invalid, |
1027 | | }; |
1028 | | // See constructor for table contents |
1029 | | |
1030 | | AMDGPUPreLegalizerCombinerImpl::ComplexMatcherMemFn |
1031 | | AMDGPUPreLegalizerCombinerImpl::ComplexPredicateFns[] = { |
1032 | | nullptr, // GICP_Invalid |
1033 | | }; |
1034 | | |
1035 | | enum { |
1036 | | GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1, |
1037 | | GICXXPred_MI_Predicate_GICombiner1, |
1038 | | GICXXPred_MI_Predicate_GICombiner2, |
1039 | | GICXXPred_MI_Predicate_GICombiner3, |
1040 | | GICXXPred_MI_Predicate_GICombiner4, |
1041 | | GICXXPred_MI_Predicate_GICombiner5, |
1042 | | GICXXPred_MI_Predicate_GICombiner6, |
1043 | | GICXXPred_MI_Predicate_GICombiner7, |
1044 | | GICXXPred_MI_Predicate_GICombiner8, |
1045 | | GICXXPred_MI_Predicate_GICombiner9, |
1046 | | GICXXPred_MI_Predicate_GICombiner10, |
1047 | | GICXXPred_MI_Predicate_GICombiner11, |
1048 | | GICXXPred_MI_Predicate_GICombiner12, |
1049 | | GICXXPred_MI_Predicate_GICombiner13, |
1050 | | GICXXPred_MI_Predicate_GICombiner14, |
1051 | | GICXXPred_MI_Predicate_GICombiner15, |
1052 | | GICXXPred_MI_Predicate_GICombiner16, |
1053 | | GICXXPred_MI_Predicate_GICombiner17, |
1054 | | GICXXPred_MI_Predicate_GICombiner18, |
1055 | | GICXXPred_MI_Predicate_GICombiner19, |
1056 | | GICXXPred_MI_Predicate_GICombiner20, |
1057 | | GICXXPred_MI_Predicate_GICombiner21, |
1058 | | GICXXPred_MI_Predicate_GICombiner22, |
1059 | | GICXXPred_MI_Predicate_GICombiner23, |
1060 | | GICXXPred_MI_Predicate_GICombiner24, |
1061 | | GICXXPred_MI_Predicate_GICombiner25, |
1062 | | GICXXPred_MI_Predicate_GICombiner26, |
1063 | | GICXXPred_MI_Predicate_GICombiner27, |
1064 | | GICXXPred_MI_Predicate_GICombiner28, |
1065 | | GICXXPred_MI_Predicate_GICombiner29, |
1066 | | GICXXPred_MI_Predicate_GICombiner30, |
1067 | | GICXXPred_MI_Predicate_GICombiner31, |
1068 | | GICXXPred_MI_Predicate_GICombiner32, |
1069 | | GICXXPred_MI_Predicate_GICombiner33, |
1070 | | GICXXPred_MI_Predicate_GICombiner34, |
1071 | | GICXXPred_MI_Predicate_GICombiner35, |
1072 | | GICXXPred_MI_Predicate_GICombiner36, |
1073 | | GICXXPred_MI_Predicate_GICombiner37, |
1074 | | GICXXPred_MI_Predicate_GICombiner38, |
1075 | | GICXXPred_MI_Predicate_GICombiner39, |
1076 | | GICXXPred_MI_Predicate_GICombiner40, |
1077 | | GICXXPred_MI_Predicate_GICombiner41, |
1078 | | GICXXPred_MI_Predicate_GICombiner42, |
1079 | | GICXXPred_MI_Predicate_GICombiner43, |
1080 | | GICXXPred_MI_Predicate_GICombiner44, |
1081 | | GICXXPred_MI_Predicate_GICombiner45, |
1082 | | GICXXPred_MI_Predicate_GICombiner46, |
1083 | | GICXXPred_MI_Predicate_GICombiner47, |
1084 | | GICXXPred_MI_Predicate_GICombiner48, |
1085 | | GICXXPred_MI_Predicate_GICombiner49, |
1086 | | GICXXPred_MI_Predicate_GICombiner50, |
1087 | | GICXXPred_MI_Predicate_GICombiner51, |
1088 | | GICXXPred_MI_Predicate_GICombiner52, |
1089 | | GICXXPred_MI_Predicate_GICombiner53, |
1090 | | GICXXPred_MI_Predicate_GICombiner54, |
1091 | | GICXXPred_MI_Predicate_GICombiner55, |
1092 | | GICXXPred_MI_Predicate_GICombiner56, |
1093 | | GICXXPred_MI_Predicate_GICombiner57, |
1094 | | GICXXPred_MI_Predicate_GICombiner58, |
1095 | | GICXXPred_MI_Predicate_GICombiner59, |
1096 | | GICXXPred_MI_Predicate_GICombiner60, |
1097 | | GICXXPred_MI_Predicate_GICombiner61, |
1098 | | GICXXPred_MI_Predicate_GICombiner62, |
1099 | | GICXXPred_MI_Predicate_GICombiner63, |
1100 | | GICXXPred_MI_Predicate_GICombiner64, |
1101 | | GICXXPred_MI_Predicate_GICombiner65, |
1102 | | GICXXPred_MI_Predicate_GICombiner66, |
1103 | | GICXXPred_MI_Predicate_GICombiner67, |
1104 | | GICXXPred_MI_Predicate_GICombiner68, |
1105 | | GICXXPred_MI_Predicate_GICombiner69, |
1106 | | GICXXPred_MI_Predicate_GICombiner70, |
1107 | | GICXXPred_MI_Predicate_GICombiner71, |
1108 | | GICXXPred_MI_Predicate_GICombiner72, |
1109 | | GICXXPred_MI_Predicate_GICombiner73, |
1110 | | GICXXPred_MI_Predicate_GICombiner74, |
1111 | | GICXXPred_MI_Predicate_GICombiner75, |
1112 | | GICXXPred_MI_Predicate_GICombiner76, |
1113 | | GICXXPred_MI_Predicate_GICombiner77, |
1114 | | GICXXPred_MI_Predicate_GICombiner78, |
1115 | | GICXXPred_MI_Predicate_GICombiner79, |
1116 | | GICXXPred_MI_Predicate_GICombiner80, |
1117 | | GICXXPred_MI_Predicate_GICombiner81, |
1118 | | GICXXPred_MI_Predicate_GICombiner82, |
1119 | | GICXXPred_MI_Predicate_GICombiner83, |
1120 | | GICXXPred_MI_Predicate_GICombiner84, |
1121 | | GICXXPred_MI_Predicate_GICombiner85, |
1122 | | GICXXPred_MI_Predicate_GICombiner86, |
1123 | | GICXXPred_MI_Predicate_GICombiner87, |
1124 | | GICXXPred_MI_Predicate_GICombiner88, |
1125 | | GICXXPred_MI_Predicate_GICombiner89, |
1126 | | GICXXPred_MI_Predicate_GICombiner90, |
1127 | | GICXXPred_MI_Predicate_GICombiner91, |
1128 | | GICXXPred_MI_Predicate_GICombiner92, |
1129 | | GICXXPred_MI_Predicate_GICombiner93, |
1130 | | GICXXPred_MI_Predicate_GICombiner94, |
1131 | | GICXXPred_MI_Predicate_GICombiner95, |
1132 | | GICXXPred_MI_Predicate_GICombiner96, |
1133 | | GICXXPred_MI_Predicate_GICombiner97, |
1134 | | GICXXPred_MI_Predicate_GICombiner98, |
1135 | | GICXXPred_MI_Predicate_GICombiner99, |
1136 | | GICXXPred_MI_Predicate_GICombiner100, |
1137 | | GICXXPred_MI_Predicate_GICombiner101, |
1138 | | GICXXPred_MI_Predicate_GICombiner102, |
1139 | | GICXXPred_MI_Predicate_GICombiner103, |
1140 | | GICXXPred_MI_Predicate_GICombiner104, |
1141 | | GICXXPred_MI_Predicate_GICombiner105, |
1142 | | }; |
1143 | 0 | bool AMDGPUPreLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const { |
1144 | 0 | switch (PredicateID) { |
1145 | 0 | case GICXXPred_MI_Predicate_GICombiner0: { |
1146 | 0 | return Helper.matchCombineCopy(*State.MIs[0]); |
1147 | 0 | } |
1148 | 0 | case GICXXPred_MI_Predicate_GICombiner1: { |
1149 | 0 | return Helper.matchCombineMulToShl(*State.MIs[0], MatchInfos.MDInfo0); |
1150 | 0 | } |
1151 | 0 | case GICXXPred_MI_Predicate_GICombiner2: { |
1152 | 0 | return Helper.matchCombineAddP2IToPtrAdd(*State.MIs[0], MatchInfos.MDInfo1); |
1153 | 0 | } |
1154 | 0 | case GICXXPred_MI_Predicate_GICombiner3: { |
1155 | 0 | return Helper.matchCombineInsertVecElts(*State.MIs[0], MatchInfos.MDInfo2); |
1156 | 0 | } |
1157 | 0 | case GICXXPred_MI_Predicate_GICombiner4: { |
1158 | 0 | return Helper.matchExtractVecEltBuildVec(*State.MIs[0], MatchInfos.MDInfo3); |
1159 | 0 | } |
1160 | 0 | case GICXXPred_MI_Predicate_GICombiner5: { |
1161 | 0 | return Helper.matchExtractAllEltsFromBuildVector(*State.MIs[0], MatchInfos.MDInfo4); |
1162 | 0 | } |
1163 | 0 | case GICXXPred_MI_Predicate_GICombiner6: { |
1164 | 0 | return Helper.matchCombineExtendingLoads(*State.MIs[0], MatchInfos.MDInfo5); |
1165 | 0 | } |
1166 | 0 | case GICXXPred_MI_Predicate_GICombiner7: { |
1167 | 0 | return Helper.matchCombineLoadWithAndMask(*State.MIs[0], MatchInfos.MDInfo6); |
1168 | 0 | } |
1169 | 0 | case GICXXPred_MI_Predicate_GICombiner8: { |
1170 | 0 | return Helper.matchCombineExtractedVectorLoad(*State.MIs[0], MatchInfos.MDInfo6); |
1171 | 0 | } |
1172 | 0 | case GICXXPred_MI_Predicate_GICombiner9: { |
1173 | 0 | return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]); |
1174 | 0 | } |
1175 | 0 | case GICXXPred_MI_Predicate_GICombiner10: { |
1176 | 0 | return Helper.matchOperandIsUndef(*State.MIs[0], 1); |
1177 | 0 | } |
1178 | 0 | case GICXXPred_MI_Predicate_GICombiner11: { |
1179 | 0 | return Helper.matchOperandIsUndef(*State.MIs[0], 2); |
1180 | 0 | } |
1181 | 0 | case GICXXPred_MI_Predicate_GICombiner12: { |
1182 | 0 | return Helper.matchAllExplicitUsesAreUndef(*State.MIs[0]); |
1183 | 0 | } |
1184 | 0 | case GICXXPred_MI_Predicate_GICombiner13: { |
1185 | 0 | return Helper.matchUndefShuffleVectorMask(*State.MIs[0]); |
1186 | 0 | } |
1187 | 0 | case GICXXPred_MI_Predicate_GICombiner14: { |
1188 | 0 | return Helper.matchUndefStore(*State.MIs[0]); |
1189 | 0 | } |
1190 | 0 | case GICXXPred_MI_Predicate_GICombiner15: { |
1191 | 0 | return Helper.matchCombineUnmergeUndef(*State.MIs[0], MatchInfos.MDInfo6); |
1192 | 0 | } |
1193 | 0 | case GICXXPred_MI_Predicate_GICombiner16: { |
1194 | 0 | return Helper.matchInsertExtractVecEltOutOfBounds(*State.MIs[0]); |
1195 | 0 | } |
1196 | 0 | case GICXXPred_MI_Predicate_GICombiner17: { |
1197 | 0 | return Helper.matchSelectSameVal(*State.MIs[0]); |
1198 | 0 | } |
1199 | 0 | case GICXXPred_MI_Predicate_GICombiner18: { |
1200 | 0 | return Helper.matchOperandIsZero(*State.MIs[0], 1); |
1201 | 0 | } |
1202 | 0 | case GICXXPred_MI_Predicate_GICombiner19: { |
1203 | 0 | return Helper.matchCombineI2PToP2I(*State.MIs[0], MatchInfos.MDInfo3); |
1204 | 0 | } |
1205 | 0 | case GICXXPred_MI_Predicate_GICombiner20: { |
1206 | 0 | MatchInfos.MDInfo3 = State.MIs[1]->getOperand(1).getReg(); return true; |
1207 | 0 | llvm_unreachable("GICombiner20 should have returned"); |
1208 | 0 | } |
1209 | 0 | case GICXXPred_MI_Predicate_GICombiner21: { |
1210 | 0 | return Helper.matchCombineAnyExtTrunc(*State.MIs[0], MatchInfos.MDInfo3); |
1211 | 0 | } |
1212 | 0 | case GICXXPred_MI_Predicate_GICombiner22: { |
1213 | 0 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0); |
1214 | 0 | } |
1215 | 0 | case GICXXPred_MI_Predicate_GICombiner23: { |
1216 | 0 | return Helper.matchBuildVectorIdentityFold(*State.MIs[0], MatchInfos.MDInfo3); |
1217 | 0 | } |
1218 | 0 | case GICXXPred_MI_Predicate_GICombiner24: { |
1219 | 0 | return Helper.matchTruncBuildVectorFold(*State.MIs[0], MatchInfos.MDInfo3); |
1220 | 0 | } |
1221 | 0 | case GICXXPred_MI_Predicate_GICombiner25: { |
1222 | 0 | return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], MatchInfos.MDInfo3); |
1223 | 0 | } |
1224 | 0 | case GICXXPred_MI_Predicate_GICombiner26: { |
1225 | 0 | return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg()); |
1226 | 0 | } |
1227 | 0 | case GICXXPred_MI_Predicate_GICombiner27: { |
1228 | 0 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0); |
1229 | 0 | } |
1230 | 0 | case GICXXPred_MI_Predicate_GICombiner28: { |
1231 | 0 | return Helper.matchExtendThroughPhis(*State.MIs[0], MatchInfos.MDInfo7); |
1232 | 0 | } |
1233 | 0 | case GICXXPred_MI_Predicate_GICombiner29: { |
1234 | 0 | return Helper.matchSimplifyAddToSub(*State.MIs[0], MatchInfos.MDInfo8); |
1235 | 0 | } |
1236 | 0 | case GICXXPred_MI_Predicate_GICombiner30: { |
1237 | 0 | return Helper.matchHoistLogicOpWithSameOpcodeHands(*State.MIs[0], MatchInfos.MDInfo9); |
1238 | 0 | } |
1239 | 0 | case GICXXPred_MI_Predicate_GICombiner31: { |
1240 | 0 | return Helper.matchShiftsTooBig(*State.MIs[0]); |
1241 | 0 | } |
1242 | 0 | case GICXXPred_MI_Predicate_GICombiner32: { |
1243 | 0 | return Helper.matchReassocPtrAdd(*State.MIs[0], MatchInfos.MDInfo6); |
1244 | 0 | } |
1245 | 0 | case GICXXPred_MI_Predicate_GICombiner33: { |
1246 | 0 | return Helper.matchReassocCommBinOp(*State.MIs[0], MatchInfos.MDInfo6); |
1247 | 0 | } |
1248 | 0 | case GICXXPred_MI_Predicate_GICombiner34: { |
1249 | 0 | return Helper.matchPtrAddImmedChain(*State.MIs[0], MatchInfos.MDInfo10); |
1250 | 0 | } |
1251 | 0 | case GICXXPred_MI_Predicate_GICombiner35: { |
1252 | 0 | return Helper.matchAshrShlToSextInreg(*State.MIs[0], MatchInfos.MDInfo11); |
1253 | 0 | } |
1254 | 0 | case GICXXPred_MI_Predicate_GICombiner36: { |
1255 | 0 | return Helper.matchSextInRegOfLoad(*State.MIs[0], MatchInfos.MDInfo12); |
1256 | 0 | } |
1257 | 0 | case GICXXPred_MI_Predicate_GICombiner37: { |
1258 | 0 | return Helper.matchCombineShlOfExtend(*State.MIs[0], MatchInfos.MDInfo13); |
1259 | 0 | } |
1260 | 0 | case GICXXPred_MI_Predicate_GICombiner38: { |
1261 | 0 | return Helper.matchNarrowBinopFeedingAnd(*State.MIs[0], MatchInfos.MDInfo6); |
1262 | 0 | } |
1263 | 0 | case GICXXPred_MI_Predicate_GICombiner39: { |
1264 | 0 | return Helper.matchConstantSelectCmp(*State.MIs[0], MatchInfos.MDInfo0); |
1265 | 0 | } |
1266 | 0 | case GICXXPred_MI_Predicate_GICombiner40: { |
1267 | 0 | return Helper.matchSelect(*State.MIs[0], MatchInfos.MDInfo6); |
1268 | 0 | } |
1269 | 0 | case GICXXPred_MI_Predicate_GICombiner41: { |
1270 | 0 | return Helper.matchRedundantAnd(*State.MIs[0], MatchInfos.MDInfo3); |
1271 | 0 | } |
1272 | 0 | case GICXXPred_MI_Predicate_GICombiner42: { |
1273 | 0 | return Helper.matchRedundantSExtInReg(*State.MIs[0]); |
1274 | 0 | } |
1275 | 0 | case GICXXPred_MI_Predicate_GICombiner43: { |
1276 | 0 | return Helper.matchRedundantOr(*State.MIs[0], MatchInfos.MDInfo3); |
1277 | 0 | } |
1278 | 0 | case GICXXPred_MI_Predicate_GICombiner44: { |
1279 | 0 | return Helper.matchOperandIsKnownToBeAPowerOfTwo(*State.MIs[0], 2); |
1280 | 0 | } |
1281 | 0 | case GICXXPred_MI_Predicate_GICombiner45: { |
1282 | 0 | return Helper.matchCombineZextTrunc(*State.MIs[0], MatchInfos.MDInfo3); |
1283 | 0 | } |
1284 | 0 | case GICXXPred_MI_Predicate_GICombiner46: { |
1285 | 0 | return Helper.matchICmpToTrueFalseKnownBits(*State.MIs[0], MatchInfos.MDInfo14); |
1286 | 0 | } |
1287 | 0 | case GICXXPred_MI_Predicate_GICombiner47: { |
1288 | 0 | return Helper.matchICmpToLHSKnownBits(*State.MIs[0], MatchInfos.MDInfo6); |
1289 | 0 | } |
1290 | 0 | case GICXXPred_MI_Predicate_GICombiner48: { |
1291 | 0 | unsigned BitWidth = MRI.getType(State.MIs[0]->getOperand(1).getReg()).getScalarSizeInBits(); |
1292 | 0 | return Helper.getKnownBits()->maskedValueIsZero(State.MIs[0]->getOperand(1).getReg(), |
1293 | 0 | APInt::getOneBitSet(BitWidth, State.MIs[0]->getOperand(2).getImm() - 1)); |
1294 | 0 | llvm_unreachable("GICombiner48 should have returned"); |
1295 | 0 | } |
1296 | 0 | case GICXXPred_MI_Predicate_GICombiner49: { |
1297 | 0 | return Helper.matchCombineExtOfExt(*State.MIs[0], MatchInfos.MDInfo12); |
1298 | 0 | } |
1299 | 0 | case GICXXPred_MI_Predicate_GICombiner50: { |
1300 | 0 | return Helper.matchNotCmp(*State.MIs[0], MatchInfos.MDInfo2); |
1301 | 0 | } |
1302 | 0 | case GICXXPred_MI_Predicate_GICombiner51: { |
1303 | 0 | return Helper.matchOptBrCondByInvertingCond(*State.MIs[0], MatchInfos.MDInfo15); |
1304 | 0 | } |
1305 | 0 | case GICXXPred_MI_Predicate_GICombiner52: { |
1306 | 0 | return Helper.matchCombineUnmergeMergeToPlainValues(*State.MIs[0], MatchInfos.MDInfo16); |
1307 | 0 | } |
1308 | 0 | case GICXXPred_MI_Predicate_GICombiner53: { |
1309 | 0 | return Helper.matchCombineUnmergeConstant(*State.MIs[0], MatchInfos.MDInfo17); |
1310 | 0 | } |
1311 | 0 | case GICXXPred_MI_Predicate_GICombiner54: { |
1312 | 0 | return Helper.matchCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]); |
1313 | 0 | } |
1314 | 0 | case GICXXPred_MI_Predicate_GICombiner55: { |
1315 | 0 | return Helper.matchCombineUnmergeZExtToZExt(*State.MIs[0]); |
1316 | 0 | } |
1317 | 0 | case GICXXPred_MI_Predicate_GICombiner56: { |
1318 | 0 | return Helper.matchCombineMergeUnmerge(*State.MIs[0], MatchInfos.MDInfo3); |
1319 | 0 | } |
1320 | 0 | case GICXXPred_MI_Predicate_GICombiner57: { |
1321 | 0 | return Helper.matchCombineTruncOfExt(*State.MIs[0], MatchInfos.MDInfo18); |
1322 | 0 | } |
1323 | 0 | case GICXXPred_MI_Predicate_GICombiner58: { |
1324 | 0 | return Helper.matchCombineTruncOfShift(*State.MIs[0], MatchInfos.MDInfo19); |
1325 | 0 | } |
1326 | 0 | case GICXXPred_MI_Predicate_GICombiner59: { |
1327 | 0 | return Helper.matchCombineConstPtrAddToI2P(*State.MIs[0], MatchInfos.MDInfo20); |
1328 | 0 | } |
1329 | 0 | case GICXXPred_MI_Predicate_GICombiner60: { |
1330 | 0 | return Helper.matchOverlappingAnd(*State.MIs[0], MatchInfos.MDInfo6); |
1331 | 0 | } |
1332 | 0 | case GICXXPred_MI_Predicate_GICombiner61: { |
1333 | 0 | return Helper.matchMulOBy2(*State.MIs[0], MatchInfos.MDInfo6); |
1334 | 0 | } |
1335 | 0 | case GICXXPred_MI_Predicate_GICombiner62: { |
1336 | 0 | return Helper.matchMulOBy0(*State.MIs[0], MatchInfos.MDInfo6); |
1337 | 0 | } |
1338 | 0 | case GICXXPred_MI_Predicate_GICombiner63: { |
1339 | 0 | return Helper.matchAddOBy0(*State.MIs[0], MatchInfos.MDInfo6); |
1340 | 0 | } |
1341 | 0 | case GICXXPred_MI_Predicate_GICombiner64: { |
1342 | 0 | return Helper.matchAddEToAddO(*State.MIs[0], MatchInfos.MDInfo6); |
1343 | 0 | } |
1344 | 0 | case GICXXPred_MI_Predicate_GICombiner65: { |
1345 | 0 | return Helper.matchCombineFMinMaxNaN(*State.MIs[0], MatchInfos.MDInfo0); |
1346 | 0 | } |
1347 | 0 | case GICXXPred_MI_Predicate_GICombiner66: { |
1348 | 0 | return Helper.matchXorOfAndWithSameReg(*State.MIs[0], MatchInfos.MDInfo21); |
1349 | 0 | } |
1350 | 0 | case GICXXPred_MI_Predicate_GICombiner67: { |
1351 | 0 | return Helper.matchPtrAddZero(*State.MIs[0]); |
1352 | 0 | } |
1353 | 0 | case GICXXPred_MI_Predicate_GICombiner68: { |
1354 | 0 | return Helper.matchShiftImmedChain(*State.MIs[0], MatchInfos.MDInfo13); |
1355 | 0 | } |
1356 | 0 | case GICXXPred_MI_Predicate_GICombiner69: { |
1357 | 0 | return Helper.matchShiftOfShiftedLogic(*State.MIs[0], MatchInfos.MDInfo22); |
1358 | 0 | } |
1359 | 0 | case GICXXPred_MI_Predicate_GICombiner70: { |
1360 | 0 | return Helper.matchLoadOrCombine(*State.MIs[0], MatchInfos.MDInfo6); |
1361 | 0 | } |
1362 | 0 | case GICXXPred_MI_Predicate_GICombiner71: { |
1363 | 0 | return Helper.matchCombineDivRem(*State.MIs[0], MatchInfos.MDInfo15); |
1364 | 0 | } |
1365 | 0 | case GICXXPred_MI_Predicate_GICombiner72: { |
1366 | 0 | return Helper.matchOrShiftToFunnelShift(*State.MIs[0], MatchInfos.MDInfo6); |
1367 | 0 | } |
1368 | 0 | case GICXXPred_MI_Predicate_GICombiner73: { |
1369 | 0 | return Helper.matchFunnelShiftToRotate(*State.MIs[0]); |
1370 | 0 | } |
1371 | 0 | case GICXXPred_MI_Predicate_GICombiner74: { |
1372 | 0 | return Helper.matchConstantLargerBitWidth(*State.MIs[0], 3); |
1373 | 0 | } |
1374 | 0 | case GICXXPred_MI_Predicate_GICombiner75: { |
1375 | 0 | return Helper.matchCommuteShift(*State.MIs[0], MatchInfos.MDInfo6); |
1376 | 0 | } |
1377 | 0 | case GICXXPred_MI_Predicate_GICombiner76: { |
1378 | 0 | return Helper.matchBitfieldExtractFromSExtInReg(*State.MIs[0], MatchInfos.MDInfo6); |
1379 | 0 | } |
1380 | 0 | case GICXXPred_MI_Predicate_GICombiner77: { |
1381 | 0 | return Helper.matchBitfieldExtractFromAnd(*State.MIs[0], MatchInfos.MDInfo6); |
1382 | 0 | } |
1383 | 0 | case GICXXPred_MI_Predicate_GICombiner78: { |
1384 | 0 | return Helper.matchBitfieldExtractFromShr(*State.MIs[0], MatchInfos.MDInfo6); |
1385 | 0 | } |
1386 | 0 | case GICXXPred_MI_Predicate_GICombiner79: { |
1387 | 0 | return Helper.matchBitfieldExtractFromShrAnd(*State.MIs[0], MatchInfos.MDInfo6); |
1388 | 0 | } |
1389 | 0 | case GICXXPred_MI_Predicate_GICombiner80: { |
1390 | 0 | return Helper.matchConstantFoldBinOp(*State.MIs[0], MatchInfos.MDInfo20); |
1391 | 0 | } |
1392 | 0 | case GICXXPred_MI_Predicate_GICombiner81: { |
1393 | 0 | return Helper.matchConstantFoldFPBinOp(*State.MIs[0], MatchInfos.MDInfo23); |
1394 | 0 | } |
1395 | 0 | case GICXXPred_MI_Predicate_GICombiner82: { |
1396 | 0 | return Helper.matchConstantFoldFMA(*State.MIs[0], MatchInfos.MDInfo23); |
1397 | 0 | } |
1398 | 0 | case GICXXPred_MI_Predicate_GICombiner83: { |
1399 | 0 | return Helper.matchConstantFoldCastOp(*State.MIs[0], MatchInfos.MDInfo20); |
1400 | 0 | } |
1401 | 0 | case GICXXPred_MI_Predicate_GICombiner84: { |
1402 | 0 | return Helper.matchUDivByConst(*State.MIs[0]); |
1403 | 0 | } |
1404 | 0 | case GICXXPred_MI_Predicate_GICombiner85: { |
1405 | 0 | return Helper.matchSDivByConst(*State.MIs[0]); |
1406 | 0 | } |
1407 | 0 | case GICXXPred_MI_Predicate_GICombiner86: { |
1408 | 0 | return Helper.matchUMulHToLShr(*State.MIs[0]); |
1409 | 0 | } |
1410 | 0 | case GICXXPred_MI_Predicate_GICombiner87: { |
1411 | 0 | return Helper.matchRedundantNegOperands(*State.MIs[0], MatchInfos.MDInfo6); |
1412 | 0 | } |
1413 | 0 | case GICXXPred_MI_Predicate_GICombiner88: { |
1414 | 0 | return Helper.matchAndOrDisjointMask(*State.MIs[0], MatchInfos.MDInfo6); |
1415 | 0 | } |
1416 | 0 | case GICXXPred_MI_Predicate_GICombiner89: { |
1417 | 0 | return Helper.matchCombineFAddFMulToFMadOrFMA(*State.MIs[0], |
1418 | 0 | MatchInfos.MDInfo6); |
1419 | 0 | } |
1420 | 0 | case GICXXPred_MI_Predicate_GICombiner90: { |
1421 | 0 | return Helper.matchCombineFAddFpExtFMulToFMadOrFMA(*State.MIs[0], |
1422 | 0 | MatchInfos.MDInfo6); |
1423 | 0 | } |
1424 | 0 | case GICXXPred_MI_Predicate_GICombiner91: { |
1425 | 0 | return Helper.matchCombineFAddFMAFMulToFMadOrFMA(*State.MIs[0], |
1426 | 0 | MatchInfos.MDInfo6); |
1427 | 0 | } |
1428 | 0 | case GICXXPred_MI_Predicate_GICombiner92: { |
1429 | 0 | return Helper.matchCombineFAddFpExtFMulToFMadOrFMAAggressive( |
1430 | 0 | *State.MIs[0], MatchInfos.MDInfo6); |
1431 | 0 | } |
1432 | 0 | case GICXXPred_MI_Predicate_GICombiner93: { |
1433 | 0 | return Helper.matchCombineFSubFMulToFMadOrFMA(*State.MIs[0], |
1434 | 0 | MatchInfos.MDInfo6); |
1435 | 0 | } |
1436 | 0 | case GICXXPred_MI_Predicate_GICombiner94: { |
1437 | 0 | return Helper.matchCombineFSubFNegFMulToFMadOrFMA(*State.MIs[0], |
1438 | 0 | MatchInfos.MDInfo6); |
1439 | 0 | } |
1440 | 0 | case GICXXPred_MI_Predicate_GICombiner95: { |
1441 | 0 | return Helper.matchCombineFSubFpExtFMulToFMadOrFMA(*State.MIs[0], |
1442 | 0 | MatchInfos.MDInfo6); |
1443 | 0 | } |
1444 | 0 | case GICXXPred_MI_Predicate_GICombiner96: { |
1445 | 0 | return Helper.matchCombineFSubFpExtFNegFMulToFMadOrFMA( |
1446 | 0 | *State.MIs[0], MatchInfos.MDInfo6); |
1447 | 0 | } |
1448 | 0 | case GICXXPred_MI_Predicate_GICombiner97: { |
1449 | 0 | return Helper.matchFoldBinOpIntoSelect(*State.MIs[0], MatchInfos.MDInfo0); |
1450 | 0 | } |
1451 | 0 | case GICXXPred_MI_Predicate_GICombiner98: { |
1452 | 0 | return Helper.matchSubAddSameReg(*State.MIs[0], MatchInfos.MDInfo6); |
1453 | 0 | } |
1454 | 0 | case GICXXPred_MI_Predicate_GICombiner99: { |
1455 | 0 | return Helper.matchSimplifySelectToMinMax(*State.MIs[0], MatchInfos.MDInfo6); |
1456 | 0 | } |
1457 | 0 | case GICXXPred_MI_Predicate_GICombiner100: { |
1458 | 0 | return Helper.matchRedundantBinOpInEquality(*State.MIs[0], MatchInfos.MDInfo6); |
1459 | 0 | } |
1460 | 0 | case GICXXPred_MI_Predicate_GICombiner101: { |
1461 | 0 | return Helper.matchFsubToFneg(*State.MIs[0], MatchInfos.MDInfo3); |
1462 | 0 | } |
1463 | 0 | case GICXXPred_MI_Predicate_GICombiner102: { |
1464 | 0 | return Helper.matchCommuteConstantToRHS(*State.MIs[0]); |
1465 | 0 | } |
1466 | 0 | case GICXXPred_MI_Predicate_GICombiner103: { |
1467 | 0 | return Helper.matchCommuteFPConstantToRHS(*State.MIs[0]); |
1468 | 0 | } |
1469 | 0 | case GICXXPred_MI_Predicate_GICombiner104: { |
1470 | 0 | return matchClampI64ToI16(*State.MIs[0], MRI, MF, MatchInfos.MDInfo24); |
1471 | 0 | } |
1472 | 0 | case GICXXPred_MI_Predicate_GICombiner105: { |
1473 | 0 | return Helper.matchFoldableFneg(*State.MIs[0], MatchInfos.MDInfo15); |
1474 | 0 | } |
1475 | 0 | } |
1476 | 0 | llvm_unreachable("Unknown predicate"); |
1477 | 0 | return false; |
1478 | 0 | } |
1479 | 0 | bool AMDGPUPreLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const { |
1480 | 0 | llvm_unreachable("Unknown predicate"); |
1481 | 0 | return false; |
1482 | 0 | } |
1483 | 0 | bool AMDGPUPreLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const { |
1484 | 0 | llvm_unreachable("Unknown predicate"); |
1485 | 0 | return false; |
1486 | 0 | } |
1487 | 0 | bool AMDGPUPreLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const { |
1488 | 0 | llvm_unreachable("Unknown predicate"); |
1489 | 0 | return false; |
1490 | 0 | } |
1491 | | enum { |
1492 | | GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1, |
1493 | | GICXXPred_Simple_IsRule1Enabled, |
1494 | | GICXXPred_Simple_IsRule2Enabled, |
1495 | | GICXXPred_Simple_IsRule3Enabled, |
1496 | | GICXXPred_Simple_IsRule4Enabled, |
1497 | | GICXXPred_Simple_IsRule5Enabled, |
1498 | | GICXXPred_Simple_IsRule6Enabled, |
1499 | | GICXXPred_Simple_IsRule7Enabled, |
1500 | | GICXXPred_Simple_IsRule8Enabled, |
1501 | | GICXXPred_Simple_IsRule9Enabled, |
1502 | | GICXXPred_Simple_IsRule10Enabled, |
1503 | | GICXXPred_Simple_IsRule11Enabled, |
1504 | | GICXXPred_Simple_IsRule12Enabled, |
1505 | | GICXXPred_Simple_IsRule13Enabled, |
1506 | | GICXXPred_Simple_IsRule14Enabled, |
1507 | | GICXXPred_Simple_IsRule15Enabled, |
1508 | | GICXXPred_Simple_IsRule16Enabled, |
1509 | | GICXXPred_Simple_IsRule17Enabled, |
1510 | | GICXXPred_Simple_IsRule18Enabled, |
1511 | | GICXXPred_Simple_IsRule19Enabled, |
1512 | | GICXXPred_Simple_IsRule20Enabled, |
1513 | | GICXXPred_Simple_IsRule21Enabled, |
1514 | | GICXXPred_Simple_IsRule22Enabled, |
1515 | | GICXXPred_Simple_IsRule23Enabled, |
1516 | | GICXXPred_Simple_IsRule24Enabled, |
1517 | | GICXXPred_Simple_IsRule25Enabled, |
1518 | | GICXXPred_Simple_IsRule26Enabled, |
1519 | | GICXXPred_Simple_IsRule27Enabled, |
1520 | | GICXXPred_Simple_IsRule28Enabled, |
1521 | | GICXXPred_Simple_IsRule29Enabled, |
1522 | | GICXXPred_Simple_IsRule30Enabled, |
1523 | | GICXXPred_Simple_IsRule31Enabled, |
1524 | | GICXXPred_Simple_IsRule32Enabled, |
1525 | | GICXXPred_Simple_IsRule33Enabled, |
1526 | | GICXXPred_Simple_IsRule34Enabled, |
1527 | | GICXXPred_Simple_IsRule35Enabled, |
1528 | | GICXXPred_Simple_IsRule36Enabled, |
1529 | | GICXXPred_Simple_IsRule37Enabled, |
1530 | | GICXXPred_Simple_IsRule38Enabled, |
1531 | | GICXXPred_Simple_IsRule39Enabled, |
1532 | | GICXXPred_Simple_IsRule40Enabled, |
1533 | | GICXXPred_Simple_IsRule41Enabled, |
1534 | | GICXXPred_Simple_IsRule42Enabled, |
1535 | | GICXXPred_Simple_IsRule43Enabled, |
1536 | | GICXXPred_Simple_IsRule44Enabled, |
1537 | | GICXXPred_Simple_IsRule45Enabled, |
1538 | | GICXXPred_Simple_IsRule46Enabled, |
1539 | | GICXXPred_Simple_IsRule47Enabled, |
1540 | | GICXXPred_Simple_IsRule48Enabled, |
1541 | | GICXXPred_Simple_IsRule49Enabled, |
1542 | | GICXXPred_Simple_IsRule50Enabled, |
1543 | | GICXXPred_Simple_IsRule51Enabled, |
1544 | | GICXXPred_Simple_IsRule52Enabled, |
1545 | | GICXXPred_Simple_IsRule53Enabled, |
1546 | | GICXXPred_Simple_IsRule54Enabled, |
1547 | | GICXXPred_Simple_IsRule55Enabled, |
1548 | | GICXXPred_Simple_IsRule56Enabled, |
1549 | | GICXXPred_Simple_IsRule57Enabled, |
1550 | | GICXXPred_Simple_IsRule58Enabled, |
1551 | | GICXXPred_Simple_IsRule59Enabled, |
1552 | | GICXXPred_Simple_IsRule60Enabled, |
1553 | | GICXXPred_Simple_IsRule61Enabled, |
1554 | | GICXXPred_Simple_IsRule62Enabled, |
1555 | | GICXXPred_Simple_IsRule63Enabled, |
1556 | | GICXXPred_Simple_IsRule64Enabled, |
1557 | | GICXXPred_Simple_IsRule65Enabled, |
1558 | | GICXXPred_Simple_IsRule66Enabled, |
1559 | | GICXXPred_Simple_IsRule67Enabled, |
1560 | | GICXXPred_Simple_IsRule68Enabled, |
1561 | | GICXXPred_Simple_IsRule69Enabled, |
1562 | | GICXXPred_Simple_IsRule70Enabled, |
1563 | | GICXXPred_Simple_IsRule71Enabled, |
1564 | | GICXXPred_Simple_IsRule72Enabled, |
1565 | | GICXXPred_Simple_IsRule73Enabled, |
1566 | | GICXXPred_Simple_IsRule74Enabled, |
1567 | | GICXXPred_Simple_IsRule75Enabled, |
1568 | | GICXXPred_Simple_IsRule76Enabled, |
1569 | | GICXXPred_Simple_IsRule77Enabled, |
1570 | | GICXXPred_Simple_IsRule78Enabled, |
1571 | | GICXXPred_Simple_IsRule79Enabled, |
1572 | | GICXXPred_Simple_IsRule80Enabled, |
1573 | | GICXXPred_Simple_IsRule81Enabled, |
1574 | | GICXXPred_Simple_IsRule82Enabled, |
1575 | | GICXXPred_Simple_IsRule83Enabled, |
1576 | | GICXXPred_Simple_IsRule84Enabled, |
1577 | | GICXXPred_Simple_IsRule85Enabled, |
1578 | | GICXXPred_Simple_IsRule86Enabled, |
1579 | | GICXXPred_Simple_IsRule87Enabled, |
1580 | | GICXXPred_Simple_IsRule88Enabled, |
1581 | | GICXXPred_Simple_IsRule89Enabled, |
1582 | | GICXXPred_Simple_IsRule90Enabled, |
1583 | | GICXXPred_Simple_IsRule91Enabled, |
1584 | | GICXXPred_Simple_IsRule92Enabled, |
1585 | | GICXXPred_Simple_IsRule93Enabled, |
1586 | | GICXXPred_Simple_IsRule94Enabled, |
1587 | | GICXXPred_Simple_IsRule95Enabled, |
1588 | | GICXXPred_Simple_IsRule96Enabled, |
1589 | | GICXXPred_Simple_IsRule97Enabled, |
1590 | | GICXXPred_Simple_IsRule98Enabled, |
1591 | | GICXXPred_Simple_IsRule99Enabled, |
1592 | | GICXXPred_Simple_IsRule100Enabled, |
1593 | | GICXXPred_Simple_IsRule101Enabled, |
1594 | | GICXXPred_Simple_IsRule102Enabled, |
1595 | | GICXXPred_Simple_IsRule103Enabled, |
1596 | | GICXXPred_Simple_IsRule104Enabled, |
1597 | | GICXXPred_Simple_IsRule105Enabled, |
1598 | | GICXXPred_Simple_IsRule106Enabled, |
1599 | | GICXXPred_Simple_IsRule107Enabled, |
1600 | | GICXXPred_Simple_IsRule108Enabled, |
1601 | | GICXXPred_Simple_IsRule109Enabled, |
1602 | | GICXXPred_Simple_IsRule110Enabled, |
1603 | | GICXXPred_Simple_IsRule111Enabled, |
1604 | | GICXXPred_Simple_IsRule112Enabled, |
1605 | | GICXXPred_Simple_IsRule113Enabled, |
1606 | | GICXXPred_Simple_IsRule114Enabled, |
1607 | | GICXXPred_Simple_IsRule115Enabled, |
1608 | | GICXXPred_Simple_IsRule116Enabled, |
1609 | | GICXXPred_Simple_IsRule117Enabled, |
1610 | | GICXXPred_Simple_IsRule118Enabled, |
1611 | | GICXXPred_Simple_IsRule119Enabled, |
1612 | | GICXXPred_Simple_IsRule120Enabled, |
1613 | | GICXXPred_Simple_IsRule121Enabled, |
1614 | | GICXXPred_Simple_IsRule122Enabled, |
1615 | | GICXXPred_Simple_IsRule123Enabled, |
1616 | | GICXXPred_Simple_IsRule124Enabled, |
1617 | | GICXXPred_Simple_IsRule125Enabled, |
1618 | | GICXXPred_Simple_IsRule126Enabled, |
1619 | | GICXXPred_Simple_IsRule127Enabled, |
1620 | | GICXXPred_Simple_IsRule128Enabled, |
1621 | | GICXXPred_Simple_IsRule129Enabled, |
1622 | | }; |
1623 | | |
1624 | 0 | bool AMDGPUPreLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const { |
1625 | 0 | return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1); |
1626 | 0 | } |
1627 | | // Custom renderers. |
1628 | | enum { |
1629 | | GICR_Invalid, |
1630 | | }; |
1631 | | AMDGPUPreLegalizerCombinerImpl::CustomRendererFn |
1632 | | AMDGPUPreLegalizerCombinerImpl::CustomRenderers[] = { |
1633 | | nullptr, // GICR_Invalid |
1634 | | }; |
1635 | | |
1636 | 0 | bool AMDGPUPreLegalizerCombinerImpl::tryCombineAllImpl(MachineInstr &I) const { |
1637 | 0 | const TargetSubtargetInfo &ST = MF.getSubtarget(); |
1638 | 0 | const PredicateBitset AvailableFeatures = getAvailableFeatures(); |
1639 | 0 | B.setInstrAndDebugLoc(I); |
1640 | 0 | State.MIs.clear(); |
1641 | 0 | State.MIs.push_back(&I); |
1642 | 0 | MatchInfos = MatchInfosTy(); |
1643 | |
|
1644 | 0 | if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, /*CoverageInfo*/ nullptr)) { |
1645 | 0 | return true; |
1646 | 0 | } |
1647 | | |
1648 | 0 | return false; |
1649 | 0 | } |
1650 | | |
1651 | | enum { |
1652 | | GICXXCustomAction_CombineApplyGICombiner0 = GICXXCustomAction_Invalid + 1, |
1653 | | GICXXCustomAction_CombineApplyGICombiner1, |
1654 | | GICXXCustomAction_CombineApplyGICombiner2, |
1655 | | GICXXCustomAction_CombineApplyGICombiner3, |
1656 | | GICXXCustomAction_CombineApplyGICombiner4, |
1657 | | GICXXCustomAction_CombineApplyGICombiner5, |
1658 | | GICXXCustomAction_CombineApplyGICombiner6, |
1659 | | GICXXCustomAction_CombineApplyGICombiner7, |
1660 | | GICXXCustomAction_CombineApplyGICombiner8, |
1661 | | GICXXCustomAction_CombineApplyGICombiner9, |
1662 | | GICXXCustomAction_CombineApplyGICombiner10, |
1663 | | GICXXCustomAction_CombineApplyGICombiner11, |
1664 | | GICXXCustomAction_CombineApplyGICombiner12, |
1665 | | GICXXCustomAction_CombineApplyGICombiner13, |
1666 | | GICXXCustomAction_CombineApplyGICombiner14, |
1667 | | GICXXCustomAction_CombineApplyGICombiner15, |
1668 | | GICXXCustomAction_CombineApplyGICombiner16, |
1669 | | GICXXCustomAction_CombineApplyGICombiner17, |
1670 | | GICXXCustomAction_CombineApplyGICombiner18, |
1671 | | GICXXCustomAction_CombineApplyGICombiner19, |
1672 | | GICXXCustomAction_CombineApplyGICombiner20, |
1673 | | GICXXCustomAction_CombineApplyGICombiner21, |
1674 | | GICXXCustomAction_CombineApplyGICombiner22, |
1675 | | GICXXCustomAction_CombineApplyGICombiner23, |
1676 | | GICXXCustomAction_CombineApplyGICombiner24, |
1677 | | GICXXCustomAction_CombineApplyGICombiner25, |
1678 | | GICXXCustomAction_CombineApplyGICombiner26, |
1679 | | GICXXCustomAction_CombineApplyGICombiner27, |
1680 | | GICXXCustomAction_CombineApplyGICombiner28, |
1681 | | GICXXCustomAction_CombineApplyGICombiner29, |
1682 | | GICXXCustomAction_CombineApplyGICombiner30, |
1683 | | GICXXCustomAction_CombineApplyGICombiner31, |
1684 | | GICXXCustomAction_CombineApplyGICombiner32, |
1685 | | GICXXCustomAction_CombineApplyGICombiner33, |
1686 | | GICXXCustomAction_CombineApplyGICombiner34, |
1687 | | GICXXCustomAction_CombineApplyGICombiner35, |
1688 | | GICXXCustomAction_CombineApplyGICombiner36, |
1689 | | GICXXCustomAction_CombineApplyGICombiner37, |
1690 | | GICXXCustomAction_CombineApplyGICombiner38, |
1691 | | GICXXCustomAction_CombineApplyGICombiner39, |
1692 | | GICXXCustomAction_CombineApplyGICombiner40, |
1693 | | GICXXCustomAction_CombineApplyGICombiner41, |
1694 | | GICXXCustomAction_CombineApplyGICombiner42, |
1695 | | GICXXCustomAction_CombineApplyGICombiner43, |
1696 | | GICXXCustomAction_CombineApplyGICombiner44, |
1697 | | GICXXCustomAction_CombineApplyGICombiner45, |
1698 | | GICXXCustomAction_CombineApplyGICombiner46, |
1699 | | GICXXCustomAction_CombineApplyGICombiner47, |
1700 | | GICXXCustomAction_CombineApplyGICombiner48, |
1701 | | GICXXCustomAction_CombineApplyGICombiner49, |
1702 | | GICXXCustomAction_CombineApplyGICombiner50, |
1703 | | GICXXCustomAction_CombineApplyGICombiner51, |
1704 | | GICXXCustomAction_CombineApplyGICombiner52, |
1705 | | GICXXCustomAction_CombineApplyGICombiner53, |
1706 | | GICXXCustomAction_CombineApplyGICombiner54, |
1707 | | GICXXCustomAction_CombineApplyGICombiner55, |
1708 | | GICXXCustomAction_CombineApplyGICombiner56, |
1709 | | GICXXCustomAction_CombineApplyGICombiner57, |
1710 | | GICXXCustomAction_CombineApplyGICombiner58, |
1711 | | GICXXCustomAction_CombineApplyGICombiner59, |
1712 | | }; |
1713 | 0 | void AMDGPUPreLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const { |
1714 | 0 | switch(ApplyID) { |
1715 | 0 | case GICXXCustomAction_CombineApplyGICombiner0:{ |
1716 | 0 | Helper.applyCombineCopy(*State.MIs[0]); |
1717 | 0 | return; |
1718 | 0 | } |
1719 | 0 | case GICXXCustomAction_CombineApplyGICombiner1:{ |
1720 | 0 | Helper.applyCombineMulToShl(*State.MIs[0], MatchInfos.MDInfo0); |
1721 | 0 | return; |
1722 | 0 | } |
1723 | 0 | case GICXXCustomAction_CombineApplyGICombiner2:{ |
1724 | 0 | Helper.applyCombineAddP2IToPtrAdd(*State.MIs[0], MatchInfos.MDInfo1); |
1725 | 0 | return; |
1726 | 0 | } |
1727 | 0 | case GICXXCustomAction_CombineApplyGICombiner3:{ |
1728 | 0 | Helper.applyCombineInsertVecElts(*State.MIs[0], MatchInfos.MDInfo2); |
1729 | 0 | return; |
1730 | 0 | } |
1731 | 0 | case GICXXCustomAction_CombineApplyGICombiner4:{ |
1732 | 0 | Helper.applyExtractVecEltBuildVec(*State.MIs[0], MatchInfos.MDInfo3); |
1733 | 0 | return; |
1734 | 0 | } |
1735 | 0 | case GICXXCustomAction_CombineApplyGICombiner5:{ |
1736 | 0 | Helper.applyExtractAllEltsFromBuildVector(*State.MIs[0], MatchInfos.MDInfo4); |
1737 | 0 | return; |
1738 | 0 | } |
1739 | 0 | case GICXXCustomAction_CombineApplyGICombiner6:{ |
1740 | 0 | Helper.applyCombineExtendingLoads(*State.MIs[0], MatchInfos.MDInfo5); |
1741 | 0 | return; |
1742 | 0 | } |
1743 | 0 | case GICXXCustomAction_CombineApplyGICombiner7:{ |
1744 | 0 | Helper.applyBuildFn(*State.MIs[0], MatchInfos.MDInfo6); |
1745 | 0 | return; |
1746 | 0 | } |
1747 | 0 | case GICXXCustomAction_CombineApplyGICombiner8:{ |
1748 | 0 | Helper.replaceInstWithFConstant(*State.MIs[0], 0.0); |
1749 | 0 | return; |
1750 | 0 | } |
1751 | 0 | case GICXXCustomAction_CombineApplyGICombiner9:{ |
1752 | 0 | Helper.replaceInstWithConstant(*State.MIs[0], 0); |
1753 | 0 | return; |
1754 | 0 | } |
1755 | 0 | case GICXXCustomAction_CombineApplyGICombiner10:{ |
1756 | 0 | Helper.replaceInstWithConstant(*State.MIs[0], -1); |
1757 | 0 | return; |
1758 | 0 | } |
1759 | 0 | case GICXXCustomAction_CombineApplyGICombiner11:{ |
1760 | 0 | Helper.replaceInstWithUndef(*State.MIs[0]); |
1761 | 0 | return; |
1762 | 0 | } |
1763 | 0 | case GICXXCustomAction_CombineApplyGICombiner12:{ |
1764 | 0 | Helper.eraseInst(*State.MIs[0]); |
1765 | 0 | return; |
1766 | 0 | } |
1767 | 0 | case GICXXCustomAction_CombineApplyGICombiner13:{ |
1768 | 0 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 2); |
1769 | 0 | return; |
1770 | 0 | } |
1771 | 0 | case GICXXCustomAction_CombineApplyGICombiner14:{ |
1772 | 0 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 1); |
1773 | 0 | return; |
1774 | 0 | } |
1775 | 0 | case GICXXCustomAction_CombineApplyGICombiner15:{ |
1776 | 0 | Helper.applyCombineI2PToP2I(*State.MIs[0], MatchInfos.MDInfo3); |
1777 | 0 | return; |
1778 | 0 | } |
1779 | 0 | case GICXXCustomAction_CombineApplyGICombiner16:{ |
1780 | 0 | Helper.applyCombineP2IToI2P(*State.MIs[0], MatchInfos.MDInfo3); |
1781 | 0 | return; |
1782 | 0 | } |
1783 | 0 | case GICXXCustomAction_CombineApplyGICombiner17:{ |
1784 | 0 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], MatchInfos.MDInfo3); |
1785 | 0 | return; |
1786 | 0 | } |
1787 | 0 | case GICXXCustomAction_CombineApplyGICombiner18:{ |
1788 | 0 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], State.MIs[1]->getOperand(1).getReg()); |
1789 | 0 | return; |
1790 | 0 | } |
1791 | 0 | case GICXXCustomAction_CombineApplyGICombiner19:{ |
1792 | 0 | Helper.applyExtendThroughPhis(*State.MIs[0], MatchInfos.MDInfo7); |
1793 | 0 | return; |
1794 | 0 | } |
1795 | 0 | case GICXXCustomAction_CombineApplyGICombiner20:{ |
1796 | 0 | Helper.applySimplifyAddToSub(*State.MIs[0], MatchInfos.MDInfo8); |
1797 | 0 | return; |
1798 | 0 | } |
1799 | 0 | case GICXXCustomAction_CombineApplyGICombiner21:{ |
1800 | 0 | Helper.applyBuildInstructionSteps(*State.MIs[0], MatchInfos.MDInfo9); |
1801 | 0 | return; |
1802 | 0 | } |
1803 | 0 | case GICXXCustomAction_CombineApplyGICombiner22:{ |
1804 | 0 | Helper.applyBuildFnNoErase(*State.MIs[0], MatchInfos.MDInfo6); |
1805 | 0 | return; |
1806 | 0 | } |
1807 | 0 | case GICXXCustomAction_CombineApplyGICombiner23:{ |
1808 | 0 | Helper.applyPtrAddImmedChain(*State.MIs[0], MatchInfos.MDInfo10); |
1809 | 0 | return; |
1810 | 0 | } |
1811 | 0 | case GICXXCustomAction_CombineApplyGICombiner24:{ |
1812 | 0 | Helper.applyAshShlToSextInreg(*State.MIs[0], MatchInfos.MDInfo11); |
1813 | 0 | return; |
1814 | 0 | } |
1815 | 0 | case GICXXCustomAction_CombineApplyGICombiner25:{ |
1816 | 0 | Helper.applySextInRegOfLoad(*State.MIs[0], MatchInfos.MDInfo12); |
1817 | 0 | return; |
1818 | 0 | } |
1819 | 0 | case GICXXCustomAction_CombineApplyGICombiner26:{ |
1820 | 0 | Helper.applyCombineShlOfExtend(*State.MIs[0], MatchInfos.MDInfo13); |
1821 | 0 | return; |
1822 | 0 | } |
1823 | 0 | case GICXXCustomAction_CombineApplyGICombiner27:{ |
1824 | 0 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], MatchInfos.MDInfo0); |
1825 | 0 | return; |
1826 | 0 | } |
1827 | 0 | case GICXXCustomAction_CombineApplyGICombiner28:{ |
1828 | 0 | Helper.applySimplifyURemByPow2(*State.MIs[0]); |
1829 | 0 | return; |
1830 | 0 | } |
1831 | 0 | case GICXXCustomAction_CombineApplyGICombiner29:{ |
1832 | 0 | Helper.replaceInstWithConstant(*State.MIs[0], MatchInfos.MDInfo14); |
1833 | 0 | return; |
1834 | 0 | } |
1835 | 0 | case GICXXCustomAction_CombineApplyGICombiner30:{ |
1836 | 0 | Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]); |
1837 | 0 | Helper.getBuilder().buildZExtInReg(State.MIs[0]->getOperand(0), State.MIs[0]->getOperand(1), State.MIs[0]->getOperand(2).getImm()); |
1838 | 0 | State.MIs[0]->eraseFromParent(); |
1839 | 0 | return; |
1840 | 0 | } |
1841 | 0 | case GICXXCustomAction_CombineApplyGICombiner31:{ |
1842 | 0 | Helper.applyCombineExtOfExt(*State.MIs[0], MatchInfos.MDInfo12); |
1843 | 0 | return; |
1844 | 0 | } |
1845 | 0 | case GICXXCustomAction_CombineApplyGICombiner32:{ |
1846 | 0 | Helper.applyNotCmp(*State.MIs[0], MatchInfos.MDInfo2); |
1847 | 0 | return; |
1848 | 0 | } |
1849 | 0 | case GICXXCustomAction_CombineApplyGICombiner33:{ |
1850 | 0 | Helper.applyOptBrCondByInvertingCond(*State.MIs[0], MatchInfos.MDInfo15); |
1851 | 0 | return; |
1852 | 0 | } |
1853 | 0 | case GICXXCustomAction_CombineApplyGICombiner34:{ |
1854 | 0 | Helper.applyCombineUnmergeMergeToPlainValues(*State.MIs[0], MatchInfos.MDInfo16); |
1855 | 0 | return; |
1856 | 0 | } |
1857 | 0 | case GICXXCustomAction_CombineApplyGICombiner35:{ |
1858 | 0 | Helper.applyCombineUnmergeConstant(*State.MIs[0], MatchInfos.MDInfo17); |
1859 | 0 | return; |
1860 | 0 | } |
1861 | 0 | case GICXXCustomAction_CombineApplyGICombiner36:{ |
1862 | 0 | Helper.applyCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]); |
1863 | 0 | return; |
1864 | 0 | } |
1865 | 0 | case GICXXCustomAction_CombineApplyGICombiner37:{ |
1866 | 0 | Helper.applyCombineUnmergeZExtToZExt(*State.MIs[0]); |
1867 | 0 | return; |
1868 | 0 | } |
1869 | 0 | case GICXXCustomAction_CombineApplyGICombiner38:{ |
1870 | 0 | Helper.applyCombineTruncOfExt(*State.MIs[0], MatchInfos.MDInfo18); |
1871 | 0 | return; |
1872 | 0 | } |
1873 | 0 | case GICXXCustomAction_CombineApplyGICombiner39:{ |
1874 | 0 | Helper.applyCombineTruncOfShift(*State.MIs[0], MatchInfos.MDInfo19); |
1875 | 0 | return; |
1876 | 0 | } |
1877 | 0 | case GICXXCustomAction_CombineApplyGICombiner40:{ |
1878 | 0 | Helper.applyCombineConstantFoldFpUnary(*State.MIs[0], State.MIs[1]->getOperand(1).getFPImm()); |
1879 | 0 | return; |
1880 | 0 | } |
1881 | 0 | case GICXXCustomAction_CombineApplyGICombiner41:{ |
1882 | 0 | Helper.replaceInstWithFConstant(*State.MIs[0]->getOperand(0).getParent(), 0.0); |
1883 | 0 | return; |
1884 | 0 | } |
1885 | 0 | case GICXXCustomAction_CombineApplyGICombiner42:{ |
1886 | 0 | Helper.applyCombineConstPtrAddToI2P(*State.MIs[0], MatchInfos.MDInfo20); |
1887 | 0 | return; |
1888 | 0 | } |
1889 | 0 | case GICXXCustomAction_CombineApplyGICombiner43:{ |
1890 | 0 | Helper.applyXorOfAndWithSameReg(*State.MIs[0], MatchInfos.MDInfo21); |
1891 | 0 | return; |
1892 | 0 | } |
1893 | 0 | case GICXXCustomAction_CombineApplyGICombiner44:{ |
1894 | 0 | Helper.applyPtrAddZero(*State.MIs[0]); |
1895 | 0 | return; |
1896 | 0 | } |
1897 | 0 | case GICXXCustomAction_CombineApplyGICombiner45:{ |
1898 | 0 | Helper.applyShiftImmedChain(*State.MIs[0], MatchInfos.MDInfo13); |
1899 | 0 | return; |
1900 | 0 | } |
1901 | 0 | case GICXXCustomAction_CombineApplyGICombiner46:{ |
1902 | 0 | Helper.applyShiftOfShiftedLogic(*State.MIs[0], MatchInfos.MDInfo22); |
1903 | 0 | return; |
1904 | 0 | } |
1905 | 0 | case GICXXCustomAction_CombineApplyGICombiner47:{ |
1906 | 0 | Helper.applyCombineDivRem(*State.MIs[0], MatchInfos.MDInfo15); |
1907 | 0 | return; |
1908 | 0 | } |
1909 | 0 | case GICXXCustomAction_CombineApplyGICombiner48:{ |
1910 | 0 | Helper.applyFunnelShiftToRotate(*State.MIs[0]); |
1911 | 0 | return; |
1912 | 0 | } |
1913 | 0 | case GICXXCustomAction_CombineApplyGICombiner49:{ |
1914 | 0 | Helper.applyFunnelShiftConstantModulo(*State.MIs[0]); |
1915 | 0 | return; |
1916 | 0 | } |
1917 | 0 | case GICXXCustomAction_CombineApplyGICombiner50:{ |
1918 | 0 | Helper.replaceInstWithConstant(*State.MIs[0], MatchInfos.MDInfo20); |
1919 | 0 | return; |
1920 | 0 | } |
1921 | 0 | case GICXXCustomAction_CombineApplyGICombiner51:{ |
1922 | 0 | Helper.replaceInstWithFConstant(*State.MIs[0], MatchInfos.MDInfo23); |
1923 | 0 | return; |
1924 | 0 | } |
1925 | 0 | case GICXXCustomAction_CombineApplyGICombiner52:{ |
1926 | 0 | Helper.applyUDivByConst(*State.MIs[0]); |
1927 | 0 | return; |
1928 | 0 | } |
1929 | 0 | case GICXXCustomAction_CombineApplyGICombiner53:{ |
1930 | 0 | Helper.applySDivByConst(*State.MIs[0]); |
1931 | 0 | return; |
1932 | 0 | } |
1933 | 0 | case GICXXCustomAction_CombineApplyGICombiner54:{ |
1934 | 0 | Helper.applyUMulHToLShr(*State.MIs[0]); |
1935 | 0 | return; |
1936 | 0 | } |
1937 | 0 | case GICXXCustomAction_CombineApplyGICombiner55:{ |
1938 | 0 | Helper.applyFoldBinOpIntoSelect(*State.MIs[0], MatchInfos.MDInfo0); |
1939 | 0 | return; |
1940 | 0 | } |
1941 | 0 | case GICXXCustomAction_CombineApplyGICombiner56:{ |
1942 | 0 | Helper.applyFsubToFneg(*State.MIs[0], MatchInfos.MDInfo3); |
1943 | 0 | return; |
1944 | 0 | } |
1945 | 0 | case GICXXCustomAction_CombineApplyGICombiner57:{ |
1946 | 0 | Helper.applyCommuteBinOpOperands(*State.MIs[0]); |
1947 | 0 | return; |
1948 | 0 | } |
1949 | 0 | case GICXXCustomAction_CombineApplyGICombiner58:{ |
1950 | 0 | applyClampI64ToI16(*State.MIs[0], MatchInfos.MDInfo24); |
1951 | 0 | return; |
1952 | 0 | } |
1953 | 0 | case GICXXCustomAction_CombineApplyGICombiner59:{ |
1954 | 0 | Helper.applyFoldableFneg(*State.MIs[0], MatchInfos.MDInfo15); |
1955 | 0 | return; |
1956 | 0 | } |
1957 | 0 | } |
1958 | 0 | llvm_unreachable("Unknown Apply Action"); |
1959 | 0 | } |
1960 | | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
1961 | 0 | #define GIMT_Encode2(Val) uint8_t(Val), uint8_t((uint16_t)Val >> 8) |
1962 | 0 | #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) |
1963 | 0 | #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) |
1964 | | #else |
1965 | | #define GIMT_Encode2(Val) uint8_t((uint16_t)Val >> 8), uint8_t(Val) |
1966 | | #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) |
1967 | | #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) |
1968 | | #endif |
1969 | 0 | const uint8_t *AMDGPUPreLegalizerCombinerImpl::getMatchTable() const { |
1970 | 0 | constexpr static uint8_t MatchTable0[] = { |
1971 | 0 | GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(19), GIMT_Encode2(228), /*)*//*default:*//*Label 80*/ GIMT_Encode4(5157), |
1972 | 0 | /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(846), 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), |
1973 | 0 | /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(863), |
1974 | 0 | /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(1073), |
1975 | 0 | /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(1163), |
1976 | 0 | /*TargetOpcode::G_SDIV*//*Label 4*/ GIMT_Encode4(1325), |
1977 | 0 | /*TargetOpcode::G_UDIV*//*Label 5*/ GIMT_Encode4(1390), |
1978 | 0 | /*TargetOpcode::G_SREM*//*Label 6*/ GIMT_Encode4(1471), |
1979 | 0 | /*TargetOpcode::G_UREM*//*Label 7*/ GIMT_Encode4(1520), GIMT_Encode4(0), GIMT_Encode4(0), |
1980 | 0 | /*TargetOpcode::G_AND*//*Label 8*/ GIMT_Encode4(1601), |
1981 | 0 | /*TargetOpcode::G_OR*//*Label 9*/ GIMT_Encode4(1804), |
1982 | 0 | /*TargetOpcode::G_XOR*//*Label 10*/ GIMT_Encode4(1984), GIMT_Encode4(0), |
1983 | 0 | /*TargetOpcode::G_PHI*//*Label 11*/ GIMT_Encode4(2122), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
1984 | 0 | /*TargetOpcode::G_UNMERGE_VALUES*//*Label 12*/ GIMT_Encode4(2139), GIMT_Encode4(0), |
1985 | 0 | /*TargetOpcode::G_MERGE_VALUES*//*Label 13*/ GIMT_Encode4(2220), |
1986 | 0 | /*TargetOpcode::G_BUILD_VECTOR*//*Label 14*/ GIMT_Encode4(2237), |
1987 | 0 | /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 15*/ GIMT_Encode4(2270), GIMT_Encode4(0), |
1988 | 0 | /*TargetOpcode::G_PTRTOINT*//*Label 16*/ GIMT_Encode4(2287), |
1989 | 0 | /*TargetOpcode::G_INTTOPTR*//*Label 17*/ GIMT_Encode4(2314), |
1990 | 0 | /*TargetOpcode::G_BITCAST*//*Label 18*/ GIMT_Encode4(2331), |
1991 | 0 | /*TargetOpcode::G_FREEZE*//*Label 19*/ GIMT_Encode4(2358), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
1992 | 0 | /*TargetOpcode::G_LOAD*//*Label 20*/ GIMT_Encode4(2390), |
1993 | 0 | /*TargetOpcode::G_SEXTLOAD*//*Label 21*/ GIMT_Encode4(2407), |
1994 | 0 | /*TargetOpcode::G_ZEXTLOAD*//*Label 22*/ GIMT_Encode4(2424), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
1995 | 0 | /*TargetOpcode::G_STORE*//*Label 23*/ GIMT_Encode4(2441), 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), |
1996 | 0 | /*TargetOpcode::G_ANYEXT*//*Label 24*/ GIMT_Encode4(2458), |
1997 | 0 | /*TargetOpcode::G_TRUNC*//*Label 25*/ GIMT_Encode4(2507), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
1998 | 0 | /*TargetOpcode::G_SEXT*//*Label 26*/ GIMT_Encode4(2604), |
1999 | 0 | /*TargetOpcode::G_SEXT_INREG*//*Label 27*/ GIMT_Encode4(2637), |
2000 | 0 | /*TargetOpcode::G_ZEXT*//*Label 28*/ GIMT_Encode4(2702), |
2001 | 0 | /*TargetOpcode::G_SHL*//*Label 29*/ GIMT_Encode4(2751), |
2002 | 0 | /*TargetOpcode::G_LSHR*//*Label 30*/ GIMT_Encode4(2921), |
2003 | 0 | /*TargetOpcode::G_ASHR*//*Label 31*/ GIMT_Encode4(3075), |
2004 | 0 | /*TargetOpcode::G_FSHL*//*Label 32*/ GIMT_Encode4(3245), |
2005 | 0 | /*TargetOpcode::G_FSHR*//*Label 33*/ GIMT_Encode4(3305), |
2006 | 0 | /*TargetOpcode::G_ROTR*//*Label 34*/ GIMT_Encode4(3365), |
2007 | 0 | /*TargetOpcode::G_ROTL*//*Label 35*/ GIMT_Encode4(3391), |
2008 | 0 | /*TargetOpcode::G_ICMP*//*Label 36*/ GIMT_Encode4(3417), GIMT_Encode4(0), |
2009 | 0 | /*TargetOpcode::G_SELECT*//*Label 37*/ GIMT_Encode4(3466), |
2010 | 0 | /*TargetOpcode::G_UADDO*//*Label 38*/ GIMT_Encode4(3562), |
2011 | 0 | /*TargetOpcode::G_UADDE*//*Label 39*/ GIMT_Encode4(3579), GIMT_Encode4(0), |
2012 | 0 | /*TargetOpcode::G_USUBE*//*Label 40*/ GIMT_Encode4(3596), |
2013 | 0 | /*TargetOpcode::G_SADDO*//*Label 41*/ GIMT_Encode4(3613), |
2014 | 0 | /*TargetOpcode::G_SADDE*//*Label 42*/ GIMT_Encode4(3630), GIMT_Encode4(0), |
2015 | 0 | /*TargetOpcode::G_SSUBE*//*Label 43*/ GIMT_Encode4(3647), |
2016 | 0 | /*TargetOpcode::G_UMULO*//*Label 44*/ GIMT_Encode4(3664), |
2017 | 0 | /*TargetOpcode::G_SMULO*//*Label 45*/ GIMT_Encode4(3697), |
2018 | 0 | /*TargetOpcode::G_UMULH*//*Label 46*/ GIMT_Encode4(3730), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
2019 | 0 | /*TargetOpcode::G_USHLSAT*//*Label 47*/ GIMT_Encode4(3747), |
2020 | 0 | /*TargetOpcode::G_SSHLSAT*//*Label 48*/ GIMT_Encode4(3780), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
2021 | 0 | /*TargetOpcode::G_FADD*//*Label 49*/ GIMT_Encode4(3813), |
2022 | 0 | /*TargetOpcode::G_FSUB*//*Label 50*/ GIMT_Encode4(3967), |
2023 | 0 | /*TargetOpcode::G_FMUL*//*Label 51*/ GIMT_Encode4(4096), |
2024 | 0 | /*TargetOpcode::G_FMA*//*Label 52*/ GIMT_Encode4(4186), |
2025 | 0 | /*TargetOpcode::G_FMAD*//*Label 53*/ GIMT_Encode4(4219), |
2026 | 0 | /*TargetOpcode::G_FDIV*//*Label 54*/ GIMT_Encode4(4252), |
2027 | 0 | /*TargetOpcode::G_FREM*//*Label 55*/ GIMT_Encode4(4301), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
2028 | 0 | /*TargetOpcode::G_FLOG2*//*Label 56*/ GIMT_Encode4(4318), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
2029 | 0 | /*TargetOpcode::G_FNEG*//*Label 57*/ GIMT_Encode4(4341), GIMT_Encode4(0), |
2030 | 0 | /*TargetOpcode::G_FPTRUNC*//*Label 58*/ GIMT_Encode4(4411), |
2031 | 0 | /*TargetOpcode::G_FPTOSI*//*Label 59*/ GIMT_Encode4(4460), |
2032 | 0 | /*TargetOpcode::G_FPTOUI*//*Label 60*/ GIMT_Encode4(4477), |
2033 | 0 | /*TargetOpcode::G_SITOFP*//*Label 61*/ GIMT_Encode4(4494), |
2034 | 0 | /*TargetOpcode::G_UITOFP*//*Label 62*/ GIMT_Encode4(4527), |
2035 | 0 | /*TargetOpcode::G_FABS*//*Label 63*/ GIMT_Encode4(4560), GIMT_Encode4(0), GIMT_Encode4(0), |
2036 | 0 | /*TargetOpcode::G_FCANONICALIZE*//*Label 64*/ GIMT_Encode4(4647), |
2037 | 0 | /*TargetOpcode::G_FMINNUM*//*Label 65*/ GIMT_Encode4(4679), |
2038 | 0 | /*TargetOpcode::G_FMAXNUM*//*Label 66*/ GIMT_Encode4(4712), GIMT_Encode4(0), GIMT_Encode4(0), |
2039 | 0 | /*TargetOpcode::G_FMINIMUM*//*Label 67*/ GIMT_Encode4(4745), |
2040 | 0 | /*TargetOpcode::G_FMAXIMUM*//*Label 68*/ GIMT_Encode4(4778), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
2041 | 0 | /*TargetOpcode::G_PTR_ADD*//*Label 69*/ GIMT_Encode4(4811), GIMT_Encode4(0), |
2042 | 0 | /*TargetOpcode::G_SMIN*//*Label 70*/ GIMT_Encode4(4917), |
2043 | 0 | /*TargetOpcode::G_SMAX*//*Label 71*/ GIMT_Encode4(4934), |
2044 | 0 | /*TargetOpcode::G_UMIN*//*Label 72*/ GIMT_Encode4(4951), |
2045 | 0 | /*TargetOpcode::G_UMAX*//*Label 73*/ GIMT_Encode4(4968), |
2046 | 0 | /*TargetOpcode::G_ABS*//*Label 74*/ GIMT_Encode4(4985), GIMT_Encode4(0), GIMT_Encode4(0), |
2047 | 0 | /*TargetOpcode::G_BR*//*Label 75*/ GIMT_Encode4(5002), GIMT_Encode4(0), |
2048 | 0 | /*TargetOpcode::G_INSERT_VECTOR_ELT*//*Label 76*/ GIMT_Encode4(5019), |
2049 | 0 | /*TargetOpcode::G_EXTRACT_VECTOR_ELT*//*Label 77*/ GIMT_Encode4(5052), |
2050 | 0 | /*TargetOpcode::G_SHUFFLE_VECTOR*//*Label 78*/ GIMT_Encode4(5101), 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), |
2051 | 0 | /*TargetOpcode::G_FSQRT*//*Label 79*/ GIMT_Encode4(5134), |
2052 | | // Label 0: @846 |
2053 | 0 | GIM_Try, /*On fail goto*//*Label 81*/ GIMT_Encode4(862), // Rule ID 0 // |
2054 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled), |
2055 | | // MIs[0] d |
2056 | | // No operand predicates |
2057 | | // MIs[0] s |
2058 | | // No operand predicates |
2059 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0), |
2060 | | // Combiner Rule #0: copy_prop |
2061 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner0), |
2062 | 0 | GIR_Done, |
2063 | | // Label 81: @862 |
2064 | 0 | GIM_Reject, |
2065 | | // Label 1: @863 |
2066 | 0 | GIM_Try, /*On fail goto*//*Label 82*/ GIMT_Encode4(879), // Rule ID 2 // |
2067 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled), |
2068 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2), |
2069 | | // Combiner Rule #2: add_p2i_to_ptradd; wip_match_opcode 'G_ADD' |
2070 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner2), |
2071 | 0 | GIR_Done, |
2072 | | // Label 82: @879 |
2073 | 0 | GIM_Try, /*On fail goto*//*Label 83*/ GIMT_Encode4(895), // Rule ID 27 // |
2074 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
2075 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
2076 | | // Combiner Rule #17: propagate_undef_any_op; wip_match_opcode 'G_ADD' |
2077 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
2078 | 0 | GIR_Done, |
2079 | | // Label 83: @895 |
2080 | 0 | GIM_Try, /*On fail goto*//*Label 84*/ GIMT_Encode4(911), // Rule ID 73 // |
2081 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule42Enabled), |
2082 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner29), |
2083 | | // Combiner Rule #42: simplify_add_to_sub; wip_match_opcode 'G_ADD' |
2084 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner20), |
2085 | 0 | GIR_Done, |
2086 | | // Label 84: @911 |
2087 | 0 | GIM_Try, /*On fail goto*//*Label 85*/ GIMT_Encode4(927), // Rule ID 164 // |
2088 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
2089 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
2090 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_ADD' |
2091 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2092 | 0 | GIR_Done, |
2093 | | // Label 85: @927 |
2094 | 0 | GIM_Try, /*On fail goto*//*Label 86*/ GIMT_Encode4(943), // Rule ID 201 // |
2095 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2096 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2097 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_ADD' |
2098 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2099 | 0 | GIR_Done, |
2100 | | // Label 86: @943 |
2101 | 0 | GIM_Try, /*On fail goto*//*Label 87*/ GIMT_Encode4(959), // Rule ID 231 // |
2102 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule126Enabled), |
2103 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner102), |
2104 | | // Combiner Rule #126: commute_int_constant_to_rhs; wip_match_opcode 'G_ADD' |
2105 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner57), |
2106 | 0 | GIR_Done, |
2107 | | // Label 87: @959 |
2108 | 0 | GIM_Try, /*On fail goto*//*Label 88*/ GIMT_Encode4(995), // Rule ID 64 // |
2109 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled), |
2110 | | // MIs[0] dst |
2111 | | // No operand predicates |
2112 | | // MIs[0] __add_sub_reg_match_0.tmp |
2113 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
2114 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
2115 | | // MIs[1] src |
2116 | | // No operand predicates |
2117 | | // MIs[1] __add_sub_reg_match_0.x |
2118 | | // No operand predicates |
2119 | | // MIs[0] __add_sub_reg_match_0.x |
2120 | 0 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2, |
2121 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
2122 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
2123 | | // Combiner Rule #34: add_sub_reg @ [__add_sub_reg_match_0[1]] |
2124 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
2125 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2126 | 0 | GIR_Done, |
2127 | | // Label 88: @995 |
2128 | 0 | GIM_Try, /*On fail goto*//*Label 89*/ GIMT_Encode4(1031), // Rule ID 63 // |
2129 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled), |
2130 | | // MIs[0] dst |
2131 | | // No operand predicates |
2132 | | // MIs[0] __add_sub_reg_match_0.x |
2133 | | // No operand predicates |
2134 | | // MIs[0] __add_sub_reg_match_0.tmp |
2135 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
2136 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
2137 | | // MIs[1] src |
2138 | | // No operand predicates |
2139 | | // MIs[1] __add_sub_reg_match_0.x |
2140 | 0 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
2141 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
2142 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
2143 | | // Combiner Rule #34: add_sub_reg @ [__add_sub_reg_match_0[0]] |
2144 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
2145 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2146 | 0 | GIR_Done, |
2147 | | // Label 89: @1031 |
2148 | 0 | GIM_Try, /*On fail goto*//*Label 90*/ GIMT_Encode4(1056), // Rule ID 41 // |
2149 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
2150 | | // MIs[0] dst |
2151 | | // No operand predicates |
2152 | | // MIs[0] lhs |
2153 | | // No operand predicates |
2154 | | // MIs[0] Operand 2 |
2155 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
2156 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2157 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[1]] |
2158 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2159 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2160 | 0 | GIR_Done, |
2161 | | // Label 90: @1056 |
2162 | 0 | GIM_Try, /*On fail goto*//*Label 91*/ GIMT_Encode4(1072), // Rule ID 81 // |
2163 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule46Enabled), |
2164 | | // MIs[0] root |
2165 | | // No operand predicates |
2166 | | // MIs[0] src1 |
2167 | | // No operand predicates |
2168 | | // MIs[0] src2 |
2169 | | // No operand predicates |
2170 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner33), |
2171 | | // Combiner Rule #46: reassoc_comm_binops |
2172 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2173 | 0 | GIR_Done, |
2174 | | // Label 91: @1072 |
2175 | 0 | GIM_Reject, |
2176 | | // Label 2: @1073 |
2177 | 0 | GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(1089), // Rule ID 30 // |
2178 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
2179 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
2180 | | // Combiner Rule #17: propagate_undef_any_op; wip_match_opcode 'G_SUB' |
2181 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
2182 | 0 | GIR_Done, |
2183 | | // Label 92: @1089 |
2184 | 0 | GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(1105), // Rule ID 165 // |
2185 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
2186 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
2187 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_SUB' |
2188 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2189 | 0 | GIR_Done, |
2190 | | // Label 93: @1105 |
2191 | 0 | GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(1121), // Rule ID 202 // |
2192 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2193 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2194 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_SUB' |
2195 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2196 | 0 | GIR_Done, |
2197 | | // Label 94: @1121 |
2198 | 0 | GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(1137), // Rule ID 227 // |
2199 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule122Enabled), |
2200 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner98), |
2201 | | // Combiner Rule #122: sub_add_reg; wip_match_opcode 'G_SUB' |
2202 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2203 | 0 | GIR_Done, |
2204 | | // Label 95: @1137 |
2205 | 0 | GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(1162), // Rule ID 40 // |
2206 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
2207 | | // MIs[0] dst |
2208 | | // No operand predicates |
2209 | | // MIs[0] lhs |
2210 | | // No operand predicates |
2211 | | // MIs[0] Operand 2 |
2212 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
2213 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2214 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[0]] |
2215 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2216 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2217 | 0 | GIR_Done, |
2218 | | // Label 96: @1162 |
2219 | 0 | GIM_Reject, |
2220 | | // Label 3: @1163 |
2221 | 0 | GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(1179), // Rule ID 18 // |
2222 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled), |
2223 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
2224 | | // Combiner Rule #12: undef_to_int_zero; wip_match_opcode 'G_MUL' |
2225 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner9), |
2226 | 0 | GIR_Done, |
2227 | | // Label 97: @1179 |
2228 | 0 | GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(1195), // Rule ID 166 // |
2229 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
2230 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
2231 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_MUL' |
2232 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2233 | 0 | GIR_Done, |
2234 | | // Label 98: @1195 |
2235 | 0 | GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(1211), // Rule ID 232 // |
2236 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule126Enabled), |
2237 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner102), |
2238 | | // Combiner Rule #126: commute_int_constant_to_rhs; wip_match_opcode 'G_MUL' |
2239 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner57), |
2240 | 0 | GIR_Done, |
2241 | | // Label 99: @1211 |
2242 | 0 | GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(1258), // Rule ID 3 // |
2243 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled), |
2244 | | // MIs[0] dst |
2245 | 0 | GIM_RecordRegType, /*MI*/0, /*Op*/0, /*TempTypeIdx*/uint8_t(-1), |
2246 | | // MIs[0] x |
2247 | | // No operand predicates |
2248 | | // MIs[0] Operand 2 |
2249 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, uint8_t(-1), |
2250 | 0 | GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/uint8_t(-1), |
2251 | 0 | GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0), |
2252 | | // Combiner Rule #3: mul_by_neg_one |
2253 | 0 | GIR_BuildMI, /*InsnID*/0, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
2254 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/0, // dst |
2255 | 0 | GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0, |
2256 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/1, // x |
2257 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2258 | 0 | GIR_Done, |
2259 | | // Label 100: @1258 |
2260 | 0 | GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(1283), // Rule ID 56 // |
2261 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled), |
2262 | | // MIs[0] dst |
2263 | | // No operand predicates |
2264 | | // MIs[0] lhs |
2265 | | // No operand predicates |
2266 | | // MIs[0] zero |
2267 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
2268 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2, |
2269 | | // Combiner Rule #27: binop_right_to_zero |
2270 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2, |
2271 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2272 | 0 | GIR_Done, |
2273 | | // Label 101: @1283 |
2274 | 0 | GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(1308), // Rule ID 61 // |
2275 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled), |
2276 | | // MIs[0] dst |
2277 | | // No operand predicates |
2278 | | // MIs[0] x |
2279 | | // No operand predicates |
2280 | | // MIs[0] Operand 2 |
2281 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1, |
2282 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2283 | | // Combiner Rule #32: right_identity_one_int |
2284 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2285 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2286 | 0 | GIR_Done, |
2287 | | // Label 102: @1308 |
2288 | 0 | GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(1324), // Rule ID 1 // |
2289 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled), |
2290 | | // MIs[0] d |
2291 | | // No operand predicates |
2292 | | // MIs[0] op1 |
2293 | | // No operand predicates |
2294 | | // MIs[0] op2 |
2295 | | // No operand predicates |
2296 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1), |
2297 | | // Combiner Rule #1: mul_to_shl |
2298 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner1), |
2299 | 0 | GIR_Done, |
2300 | | // Label 103: @1324 |
2301 | 0 | GIM_Reject, |
2302 | | // Label 4: @1325 |
2303 | 0 | GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(1341), // Rule ID 52 // |
2304 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
2305 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner18), |
2306 | | // Combiner Rule #26: binop_left_to_zero; wip_match_opcode 'G_SDIV' |
2307 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner14), |
2308 | 0 | GIR_Done, |
2309 | | // Label 104: @1341 |
2310 | 0 | GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(1357), // Rule ID 146 // |
2311 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule92Enabled), |
2312 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner71), |
2313 | | // Combiner Rule #92: div_rem_to_divrem; wip_match_opcode 'G_SDIV' |
2314 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner47), |
2315 | 0 | GIR_Done, |
2316 | | // Label 105: @1357 |
2317 | 0 | GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(1373), // Rule ID 184 // |
2318 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule109Enabled), |
2319 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner85), |
2320 | | // Combiner Rule #109: sdiv_by_const; wip_match_opcode 'G_SDIV' |
2321 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner53), |
2322 | 0 | GIR_Done, |
2323 | | // Label 106: @1373 |
2324 | 0 | GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(1389), // Rule ID 207 // |
2325 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2326 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2327 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_SDIV' |
2328 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2329 | 0 | GIR_Done, |
2330 | | // Label 107: @1389 |
2331 | 0 | GIM_Reject, |
2332 | | // Label 5: @1390 |
2333 | 0 | GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(1406), // Rule ID 21 // |
2334 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled), |
2335 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner10), |
2336 | | // Combiner Rule #14: binop_left_undef_to_zero; wip_match_opcode 'G_UDIV' |
2337 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner9), |
2338 | 0 | GIR_Done, |
2339 | | // Label 108: @1406 |
2340 | 0 | GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(1422), // Rule ID 53 // |
2341 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
2342 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner18), |
2343 | | // Combiner Rule #26: binop_left_to_zero; wip_match_opcode 'G_UDIV' |
2344 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner14), |
2345 | 0 | GIR_Done, |
2346 | | // Label 109: @1422 |
2347 | 0 | GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(1438), // Rule ID 147 // |
2348 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule92Enabled), |
2349 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner71), |
2350 | | // Combiner Rule #92: div_rem_to_divrem; wip_match_opcode 'G_UDIV' |
2351 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner47), |
2352 | 0 | GIR_Done, |
2353 | | // Label 110: @1438 |
2354 | 0 | GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(1454), // Rule ID 183 // |
2355 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule108Enabled), |
2356 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner84), |
2357 | | // Combiner Rule #108: udiv_by_const; wip_match_opcode 'G_UDIV' |
2358 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner52), |
2359 | 0 | GIR_Done, |
2360 | | // Label 111: @1454 |
2361 | 0 | GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(1470), // Rule ID 209 // |
2362 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2363 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2364 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_UDIV' |
2365 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2366 | 0 | GIR_Done, |
2367 | | // Label 112: @1470 |
2368 | 0 | GIM_Reject, |
2369 | | // Label 6: @1471 |
2370 | 0 | GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(1487), // Rule ID 54 // |
2371 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
2372 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner18), |
2373 | | // Combiner Rule #26: binop_left_to_zero; wip_match_opcode 'G_SREM' |
2374 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner14), |
2375 | 0 | GIR_Done, |
2376 | | // Label 113: @1487 |
2377 | 0 | GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(1503), // Rule ID 148 // |
2378 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule92Enabled), |
2379 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner71), |
2380 | | // Combiner Rule #92: div_rem_to_divrem; wip_match_opcode 'G_SREM' |
2381 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner47), |
2382 | 0 | GIR_Done, |
2383 | | // Label 114: @1503 |
2384 | 0 | GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(1519), // Rule ID 208 // |
2385 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2386 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2387 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_SREM' |
2388 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2389 | 0 | GIR_Done, |
2390 | | // Label 115: @1519 |
2391 | 0 | GIM_Reject, |
2392 | | // Label 7: @1520 |
2393 | 0 | GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(1536), // Rule ID 22 // |
2394 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled), |
2395 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner10), |
2396 | | // Combiner Rule #14: binop_left_undef_to_zero; wip_match_opcode 'G_UREM' |
2397 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner9), |
2398 | 0 | GIR_Done, |
2399 | | // Label 116: @1536 |
2400 | 0 | GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(1552), // Rule ID 55 // |
2401 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
2402 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner18), |
2403 | | // Combiner Rule #26: binop_left_to_zero; wip_match_opcode 'G_UREM' |
2404 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner14), |
2405 | 0 | GIR_Done, |
2406 | | // Label 117: @1552 |
2407 | 0 | GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(1568), // Rule ID 93 // |
2408 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule58Enabled), |
2409 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner44), |
2410 | | // Combiner Rule #58: urem_pow2_to_mask; wip_match_opcode 'G_UREM' |
2411 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner28), |
2412 | 0 | GIR_Done, |
2413 | | // Label 118: @1568 |
2414 | 0 | GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(1584), // Rule ID 149 // |
2415 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule92Enabled), |
2416 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner71), |
2417 | | // Combiner Rule #92: div_rem_to_divrem; wip_match_opcode 'G_UREM' |
2418 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner47), |
2419 | 0 | GIR_Done, |
2420 | | // Label 119: @1584 |
2421 | 0 | GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(1600), // Rule ID 210 // |
2422 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2423 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2424 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_UREM' |
2425 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2426 | 0 | GIR_Done, |
2427 | | // Label 120: @1600 |
2428 | 0 | GIM_Reject, |
2429 | | // Label 8: @1601 |
2430 | 0 | GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(1617), // Rule ID 13 // |
2431 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled), |
2432 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner7), |
2433 | | // Combiner Rule #9: load_and_mask; wip_match_opcode 'G_AND' |
2434 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2435 | 0 | GIR_Done, |
2436 | | // Label 121: @1617 |
2437 | 0 | GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(1633), // Rule ID 17 // |
2438 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled), |
2439 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
2440 | | // Combiner Rule #12: undef_to_int_zero; wip_match_opcode 'G_AND' |
2441 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner9), |
2442 | 0 | GIR_Done, |
2443 | | // Label 122: @1633 |
2444 | 0 | GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(1649), // Rule ID 74 // |
2445 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled), |
2446 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner30), |
2447 | | // Combiner Rule #43: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_AND' |
2448 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner21), |
2449 | 0 | GIR_Done, |
2450 | | // Label 123: @1649 |
2451 | 0 | GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(1665), // Rule ID 86 // |
2452 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule51Enabled), |
2453 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner38), |
2454 | | // Combiner Rule #51: narrow_binop_feeding_and; wip_match_opcode 'G_AND' |
2455 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
2456 | 0 | GIR_Done, |
2457 | | // Label 124: @1665 |
2458 | 0 | GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(1681), // Rule ID 90 // |
2459 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule55Enabled), |
2460 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner41), |
2461 | | // Combiner Rule #55: redundant_and; wip_match_opcode 'G_AND' |
2462 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2463 | 0 | GIR_Done, |
2464 | | // Label 125: @1681 |
2465 | 0 | GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(1697), // Rule ID 118 // |
2466 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule81Enabled), |
2467 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner60), |
2468 | | // Combiner Rule #81: overlapping_and; wip_match_opcode 'G_AND' |
2469 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2470 | 0 | GIR_Done, |
2471 | | // Label 126: @1697 |
2472 | 0 | GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(1713), // Rule ID 159 // |
2473 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled), |
2474 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner77), |
2475 | | // Combiner Rule #100: bitfield_extract_from_and; wip_match_opcode 'G_AND' |
2476 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2477 | 0 | GIR_Done, |
2478 | | // Label 127: @1713 |
2479 | 0 | GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(1729), // Rule ID 167 // |
2480 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
2481 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
2482 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_AND' |
2483 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2484 | 0 | GIR_Done, |
2485 | | // Label 128: @1729 |
2486 | 0 | GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(1745), // Rule ID 192 // |
2487 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule112Enabled), |
2488 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner88), |
2489 | | // Combiner Rule #112: and_or_disjoint_mask; wip_match_opcode 'G_AND' |
2490 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
2491 | 0 | GIR_Done, |
2492 | | // Label 129: @1745 |
2493 | 0 | GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(1761), // Rule ID 204 // |
2494 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2495 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2496 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_AND' |
2497 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2498 | 0 | GIR_Done, |
2499 | | // Label 130: @1761 |
2500 | 0 | GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(1777), // Rule ID 233 // |
2501 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule126Enabled), |
2502 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner102), |
2503 | | // Combiner Rule #126: commute_int_constant_to_rhs; wip_match_opcode 'G_AND' |
2504 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner57), |
2505 | 0 | GIR_Done, |
2506 | | // Label 131: @1777 |
2507 | 0 | GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(1803), // Rule ID 50 // |
2508 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
2509 | | // MIs[0] dst |
2510 | | // No operand predicates |
2511 | | // MIs[0] src |
2512 | | // No operand predicates |
2513 | | // MIs[0] src |
2514 | 0 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
2515 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2516 | | // Combiner Rule #25: binop_same_val @ [__binop_same_val_match_0[0]] |
2517 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2518 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2519 | 0 | GIR_Done, |
2520 | | // Label 132: @1803 |
2521 | 0 | GIM_Reject, |
2522 | | // Label 9: @1804 |
2523 | 0 | GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(1820), // Rule ID 19 // |
2524 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled), |
2525 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
2526 | | // Combiner Rule #13: undef_to_negative_one; wip_match_opcode 'G_OR' |
2527 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner10), |
2528 | 0 | GIR_Done, |
2529 | | // Label 133: @1820 |
2530 | 0 | GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(1836), // Rule ID 75 // |
2531 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled), |
2532 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner30), |
2533 | | // Combiner Rule #43: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_OR' |
2534 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner21), |
2535 | 0 | GIR_Done, |
2536 | | // Label 134: @1836 |
2537 | 0 | GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(1852), // Rule ID 92 // |
2538 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled), |
2539 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner43), |
2540 | | // Combiner Rule #57: redundant_or; wip_match_opcode 'G_OR' |
2541 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2542 | 0 | GIR_Done, |
2543 | | // Label 135: @1852 |
2544 | 0 | GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(1868), // Rule ID 145 // |
2545 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule91Enabled), |
2546 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner70), |
2547 | | // Combiner Rule #91: load_or_combine; wip_match_opcode 'G_OR' |
2548 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2549 | 0 | GIR_Done, |
2550 | | // Label 136: @1868 |
2551 | 0 | GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(1884), // Rule ID 150 // |
2552 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule93Enabled), |
2553 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner72), |
2554 | | // Combiner Rule #93: funnel_shift_from_or_shift; wip_match_opcode 'G_OR' |
2555 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2556 | 0 | GIR_Done, |
2557 | | // Label 137: @1884 |
2558 | 0 | GIM_Try, /*On fail goto*//*Label 138*/ GIMT_Encode4(1900), // Rule ID 168 // |
2559 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
2560 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
2561 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_OR' |
2562 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2563 | 0 | GIR_Done, |
2564 | | // Label 138: @1900 |
2565 | 0 | GIM_Try, /*On fail goto*//*Label 139*/ GIMT_Encode4(1916), // Rule ID 205 // |
2566 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2567 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2568 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_OR' |
2569 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2570 | 0 | GIR_Done, |
2571 | | // Label 139: @1916 |
2572 | 0 | GIM_Try, /*On fail goto*//*Label 140*/ GIMT_Encode4(1932), // Rule ID 234 // |
2573 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule126Enabled), |
2574 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner102), |
2575 | | // Combiner Rule #126: commute_int_constant_to_rhs; wip_match_opcode 'G_OR' |
2576 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner57), |
2577 | 0 | GIR_Done, |
2578 | | // Label 140: @1932 |
2579 | 0 | GIM_Try, /*On fail goto*//*Label 141*/ GIMT_Encode4(1958), // Rule ID 51 // |
2580 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
2581 | | // MIs[0] dst |
2582 | | // No operand predicates |
2583 | | // MIs[0] src |
2584 | | // No operand predicates |
2585 | | // MIs[0] src |
2586 | 0 | GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
2587 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2588 | | // Combiner Rule #25: binop_same_val @ [__binop_same_val_match_0[1]] |
2589 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2590 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2591 | 0 | GIR_Done, |
2592 | | // Label 141: @1958 |
2593 | 0 | GIM_Try, /*On fail goto*//*Label 142*/ GIMT_Encode4(1983), // Rule ID 42 // |
2594 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
2595 | | // MIs[0] dst |
2596 | | // No operand predicates |
2597 | | // MIs[0] lhs |
2598 | | // No operand predicates |
2599 | | // MIs[0] Operand 2 |
2600 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
2601 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2602 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[2]] |
2603 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2604 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2605 | 0 | GIR_Done, |
2606 | | // Label 142: @1983 |
2607 | 0 | GIM_Reject, |
2608 | | // Label 10: @1984 |
2609 | 0 | GIM_Try, /*On fail goto*//*Label 143*/ GIMT_Encode4(2000), // Rule ID 31 // |
2610 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
2611 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
2612 | | // Combiner Rule #17: propagate_undef_any_op; wip_match_opcode 'G_XOR' |
2613 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
2614 | 0 | GIR_Done, |
2615 | | // Label 143: @2000 |
2616 | 0 | GIM_Try, /*On fail goto*//*Label 144*/ GIMT_Encode4(2016), // Rule ID 76 // |
2617 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled), |
2618 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner30), |
2619 | | // Combiner Rule #43: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_XOR' |
2620 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner21), |
2621 | 0 | GIR_Done, |
2622 | | // Label 144: @2016 |
2623 | 0 | GIM_Try, /*On fail goto*//*Label 145*/ GIMT_Encode4(2032), // Rule ID 101 // |
2624 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled), |
2625 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner50), |
2626 | | // Combiner Rule #64: not_cmp_fold; wip_match_opcode 'G_XOR' |
2627 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner32), |
2628 | 0 | GIR_Done, |
2629 | | // Label 145: @2032 |
2630 | 0 | GIM_Try, /*On fail goto*//*Label 146*/ GIMT_Encode4(2048), // Rule ID 133 // |
2631 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule87Enabled), |
2632 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner66), |
2633 | | // Combiner Rule #87: xor_of_and_with_same_reg; wip_match_opcode 'G_XOR' |
2634 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner43), |
2635 | 0 | GIR_Done, |
2636 | | // Label 146: @2048 |
2637 | 0 | GIM_Try, /*On fail goto*//*Label 147*/ GIMT_Encode4(2064), // Rule ID 169 // |
2638 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
2639 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
2640 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_XOR' |
2641 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2642 | 0 | GIR_Done, |
2643 | | // Label 147: @2064 |
2644 | 0 | GIM_Try, /*On fail goto*//*Label 148*/ GIMT_Encode4(2080), // Rule ID 206 // |
2645 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
2646 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
2647 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_XOR' |
2648 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
2649 | 0 | GIR_Done, |
2650 | | // Label 148: @2080 |
2651 | 0 | GIM_Try, /*On fail goto*//*Label 149*/ GIMT_Encode4(2096), // Rule ID 235 // |
2652 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule126Enabled), |
2653 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner102), |
2654 | | // Combiner Rule #126: commute_int_constant_to_rhs; wip_match_opcode 'G_XOR' |
2655 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner57), |
2656 | 0 | GIR_Done, |
2657 | | // Label 149: @2096 |
2658 | 0 | GIM_Try, /*On fail goto*//*Label 150*/ GIMT_Encode4(2121), // Rule ID 43 // |
2659 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
2660 | | // MIs[0] dst |
2661 | | // No operand predicates |
2662 | | // MIs[0] lhs |
2663 | | // No operand predicates |
2664 | | // MIs[0] Operand 2 |
2665 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
2666 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2667 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[3]] |
2668 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2669 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2670 | 0 | GIR_Done, |
2671 | | // Label 150: @2121 |
2672 | 0 | GIM_Reject, |
2673 | | // Label 11: @2122 |
2674 | 0 | GIM_Try, /*On fail goto*//*Label 151*/ GIMT_Encode4(2138), // Rule ID 72 // |
2675 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule41Enabled), |
2676 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner28), |
2677 | | // Combiner Rule #41: extend_through_phis; wip_match_opcode 'G_PHI' |
2678 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner19), |
2679 | 0 | GIR_Done, |
2680 | | // Label 151: @2138 |
2681 | 0 | GIM_Reject, |
2682 | | // Label 12: @2139 |
2683 | 0 | GIM_Try, /*On fail goto*//*Label 152*/ GIMT_Encode4(2155), // Rule ID 36 // |
2684 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled), |
2685 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner15), |
2686 | | // Combiner Rule #21: unmerge_undef; wip_match_opcode 'G_UNMERGE_VALUES' |
2687 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2688 | 0 | GIR_Done, |
2689 | | // Label 152: @2155 |
2690 | 0 | GIM_Try, /*On fail goto*//*Label 153*/ GIMT_Encode4(2171), // Rule ID 103 // |
2691 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule66Enabled), |
2692 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner52), |
2693 | | // Combiner Rule #66: unmerge_merge; wip_match_opcode 'G_UNMERGE_VALUES' |
2694 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner34), |
2695 | 0 | GIR_Done, |
2696 | | // Label 153: @2171 |
2697 | 0 | GIM_Try, /*On fail goto*//*Label 154*/ GIMT_Encode4(2187), // Rule ID 104 // |
2698 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled), |
2699 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner53), |
2700 | | // Combiner Rule #67: unmerge_cst; wip_match_opcode 'G_UNMERGE_VALUES' |
2701 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner35), |
2702 | 0 | GIR_Done, |
2703 | | // Label 154: @2187 |
2704 | 0 | GIM_Try, /*On fail goto*//*Label 155*/ GIMT_Encode4(2203), // Rule ID 105 // |
2705 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled), |
2706 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner54), |
2707 | | // Combiner Rule #68: unmerge_dead_to_trunc; wip_match_opcode 'G_UNMERGE_VALUES' |
2708 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner36), |
2709 | 0 | GIR_Done, |
2710 | | // Label 155: @2203 |
2711 | 0 | GIM_Try, /*On fail goto*//*Label 156*/ GIMT_Encode4(2219), // Rule ID 106 // |
2712 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled), |
2713 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner55), |
2714 | | // Combiner Rule #69: unmerge_zext_to_zext; wip_match_opcode 'G_UNMERGE_VALUES' |
2715 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner37), |
2716 | 0 | GIR_Done, |
2717 | | // Label 156: @2219 |
2718 | 0 | GIM_Reject, |
2719 | | // Label 13: @2220 |
2720 | 0 | GIM_Try, /*On fail goto*//*Label 157*/ GIMT_Encode4(2236), // Rule ID 107 // |
2721 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled), |
2722 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner56), |
2723 | | // Combiner Rule #70: merge_unmerge; wip_match_opcode 'G_MERGE_VALUES' |
2724 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2725 | 0 | GIR_Done, |
2726 | | // Label 157: @2236 |
2727 | 0 | GIM_Reject, |
2728 | | // Label 14: @2237 |
2729 | 0 | GIM_Try, /*On fail goto*//*Label 158*/ GIMT_Encode4(2253), // Rule ID 9 // |
2730 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
2731 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner5), |
2732 | | // Combiner Rule #7: extract_all_elts_from_build_vector; wip_match_opcode 'G_BUILD_VECTOR' |
2733 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner5), |
2734 | 0 | GIR_Done, |
2735 | | // Label 158: @2253 |
2736 | 0 | GIM_Try, /*On fail goto*//*Label 159*/ GIMT_Encode4(2269), // Rule ID 66 // |
2737 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled), |
2738 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner23), |
2739 | | // Combiner Rule #35: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR' |
2740 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2741 | 0 | GIR_Done, |
2742 | | // Label 159: @2269 |
2743 | 0 | GIM_Reject, |
2744 | | // Label 15: @2270 |
2745 | 0 | GIM_Try, /*On fail goto*//*Label 160*/ GIMT_Encode4(2286), // Rule ID 65 // |
2746 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled), |
2747 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner23), |
2748 | | // Combiner Rule #35: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC' |
2749 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2750 | 0 | GIR_Done, |
2751 | | // Label 160: @2286 |
2752 | 0 | GIM_Reject, |
2753 | | // Label 16: @2287 |
2754 | 0 | GIM_Try, /*On fail goto*//*Label 161*/ GIMT_Encode4(2313), // Rule ID 58 // |
2755 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled), |
2756 | | // MIs[0] dst |
2757 | | // No operand predicates |
2758 | | // MIs[0] t |
2759 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
2760 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR), |
2761 | | // MIs[1] ptr |
2762 | | // No operand predicates |
2763 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner20), |
2764 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
2765 | | // Combiner Rule #29: i2p_to_p2i |
2766 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner16), |
2767 | 0 | GIR_Done, |
2768 | | // Label 161: @2313 |
2769 | 0 | GIM_Reject, |
2770 | | // Label 17: @2314 |
2771 | 0 | GIM_Try, /*On fail goto*//*Label 162*/ GIMT_Encode4(2330), // Rule ID 57 // |
2772 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled), |
2773 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner19), |
2774 | | // Combiner Rule #28: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR' |
2775 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner15), |
2776 | 0 | GIR_Done, |
2777 | | // Label 162: @2330 |
2778 | 0 | GIM_Reject, |
2779 | | // Label 18: @2331 |
2780 | 0 | GIM_Try, /*On fail goto*//*Label 163*/ GIMT_Encode4(2357), // Rule ID 69 // |
2781 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule38Enabled), |
2782 | | // MIs[0] dst |
2783 | | // No operand predicates |
2784 | | // MIs[0] src1 |
2785 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
2786 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST), |
2787 | | // MIs[1] src0 |
2788 | | // No operand predicates |
2789 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner26), |
2790 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
2791 | | // Combiner Rule #38: bitcast_bitcast_fold |
2792 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner18), |
2793 | 0 | GIR_Done, |
2794 | | // Label 163: @2357 |
2795 | 0 | GIM_Reject, |
2796 | | // Label 19: @2358 |
2797 | 0 | GIM_Try, /*On fail goto*//*Label 164*/ GIMT_Encode4(2389), // Rule ID 4 // |
2798 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled), |
2799 | | // MIs[0] dst |
2800 | | // No operand predicates |
2801 | | // MIs[0] src |
2802 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
2803 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FREEZE), |
2804 | | // MIs[1] __idempotent_prop_match_0.x |
2805 | | // No operand predicates |
2806 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2807 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
2808 | | // Combiner Rule #4: idempotent_prop @ [__idempotent_prop_match_0[0]] |
2809 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
2810 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
2811 | 0 | GIR_Done, |
2812 | | // Label 164: @2389 |
2813 | 0 | GIM_Reject, |
2814 | | // Label 20: @2390 |
2815 | 0 | GIM_Try, /*On fail goto*//*Label 165*/ GIMT_Encode4(2406), // Rule ID 10 // |
2816 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled), |
2817 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6), |
2818 | | // Combiner Rule #8: extending_loads; wip_match_opcode 'G_LOAD' |
2819 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner6), |
2820 | 0 | GIR_Done, |
2821 | | // Label 165: @2406 |
2822 | 0 | GIM_Reject, |
2823 | | // Label 21: @2407 |
2824 | 0 | GIM_Try, /*On fail goto*//*Label 166*/ GIMT_Encode4(2423), // Rule ID 11 // |
2825 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled), |
2826 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6), |
2827 | | // Combiner Rule #8: extending_loads; wip_match_opcode 'G_SEXTLOAD' |
2828 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner6), |
2829 | 0 | GIR_Done, |
2830 | | // Label 166: @2423 |
2831 | 0 | GIM_Reject, |
2832 | | // Label 22: @2424 |
2833 | 0 | GIM_Try, /*On fail goto*//*Label 167*/ GIMT_Encode4(2440), // Rule ID 12 // |
2834 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled), |
2835 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6), |
2836 | | // Combiner Rule #8: extending_loads; wip_match_opcode 'G_ZEXTLOAD' |
2837 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner6), |
2838 | 0 | GIR_Done, |
2839 | | // Label 167: @2440 |
2840 | 0 | GIM_Reject, |
2841 | | // Label 23: @2441 |
2842 | 0 | GIM_Try, /*On fail goto*//*Label 168*/ GIMT_Encode4(2457), // Rule ID 35 // |
2843 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled), |
2844 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner14), |
2845 | | // Combiner Rule #20: erase_undef_store; wip_match_opcode 'G_STORE' |
2846 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner12), |
2847 | 0 | GIR_Done, |
2848 | | // Label 168: @2457 |
2849 | 0 | GIM_Reject, |
2850 | | // Label 24: @2458 |
2851 | 0 | GIM_Try, /*On fail goto*//*Label 169*/ GIMT_Encode4(2474), // Rule ID 59 // |
2852 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled), |
2853 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner21), |
2854 | | // Combiner Rule #30: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT' |
2855 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2856 | 0 | GIR_Done, |
2857 | | // Label 169: @2474 |
2858 | 0 | GIM_Try, /*On fail goto*//*Label 170*/ GIMT_Encode4(2490), // Rule ID 98 // |
2859 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule63Enabled), |
2860 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner49), |
2861 | | // Combiner Rule #63: ext_ext_fold; wip_match_opcode 'G_ANYEXT' |
2862 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner31), |
2863 | 0 | GIR_Done, |
2864 | | // Label 170: @2490 |
2865 | 0 | GIM_Try, /*On fail goto*//*Label 171*/ GIMT_Encode4(2506), // Rule ID 181 // |
2866 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule106Enabled), |
2867 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner83), |
2868 | | // Combiner Rule #106: constant_fold_cast_op; wip_match_opcode 'G_ANYEXT' |
2869 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2870 | 0 | GIR_Done, |
2871 | | // Label 171: @2506 |
2872 | 0 | GIM_Reject, |
2873 | | // Label 25: @2507 |
2874 | 0 | GIM_Try, /*On fail goto*//*Label 172*/ GIMT_Encode4(2523), // Rule ID 32 // |
2875 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
2876 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
2877 | | // Combiner Rule #17: propagate_undef_any_op; wip_match_opcode 'G_TRUNC' |
2878 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
2879 | 0 | GIR_Done, |
2880 | | // Label 172: @2523 |
2881 | 0 | GIM_Try, /*On fail goto*//*Label 173*/ GIMT_Encode4(2539), // Rule ID 67 // |
2882 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled), |
2883 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner24), |
2884 | | // Combiner Rule #36: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC' |
2885 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2886 | 0 | GIR_Done, |
2887 | | // Label 173: @2539 |
2888 | 0 | GIM_Try, /*On fail goto*//*Label 174*/ GIMT_Encode4(2555), // Rule ID 68 // |
2889 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled), |
2890 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner25), |
2891 | | // Combiner Rule #37: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC' |
2892 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2893 | 0 | GIR_Done, |
2894 | | // Label 174: @2555 |
2895 | 0 | GIM_Try, /*On fail goto*//*Label 175*/ GIMT_Encode4(2571), // Rule ID 108 // |
2896 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled), |
2897 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner57), |
2898 | | // Combiner Rule #71: trunc_ext_fold; wip_match_opcode 'G_TRUNC' |
2899 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner38), |
2900 | 0 | GIR_Done, |
2901 | | // Label 175: @2571 |
2902 | 0 | GIM_Try, /*On fail goto*//*Label 176*/ GIMT_Encode4(2587), // Rule ID 109 // |
2903 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule72Enabled), |
2904 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner58), |
2905 | | // Combiner Rule #72: trunc_shift; wip_match_opcode 'G_TRUNC' |
2906 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner39), |
2907 | 0 | GIR_Done, |
2908 | | // Label 176: @2587 |
2909 | 0 | GIM_Try, /*On fail goto*//*Label 177*/ GIMT_Encode4(2603), // Rule ID 238 // |
2910 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule128Enabled), |
2911 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner104), |
2912 | | // Combiner Rule #128: clamp_i64_to_i16; wip_match_opcode 'G_TRUNC' |
2913 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner58), |
2914 | 0 | GIR_Done, |
2915 | | // Label 177: @2603 |
2916 | 0 | GIM_Reject, |
2917 | | // Label 26: @2604 |
2918 | 0 | GIM_Try, /*On fail goto*//*Label 178*/ GIMT_Encode4(2620), // Rule ID 99 // |
2919 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule63Enabled), |
2920 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner49), |
2921 | | // Combiner Rule #63: ext_ext_fold; wip_match_opcode 'G_SEXT' |
2922 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner31), |
2923 | 0 | GIR_Done, |
2924 | | // Label 178: @2620 |
2925 | 0 | GIM_Try, /*On fail goto*//*Label 179*/ GIMT_Encode4(2636), // Rule ID 180 // |
2926 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule106Enabled), |
2927 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner83), |
2928 | | // Combiner Rule #106: constant_fold_cast_op; wip_match_opcode 'G_SEXT' |
2929 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2930 | 0 | GIR_Done, |
2931 | | // Label 179: @2636 |
2932 | 0 | GIM_Reject, |
2933 | | // Label 27: @2637 |
2934 | 0 | GIM_Try, /*On fail goto*//*Label 180*/ GIMT_Encode4(2653), // Rule ID 84 // |
2935 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule49Enabled), |
2936 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner36), |
2937 | | // Combiner Rule #49: sext_inreg_of_load; wip_match_opcode 'G_SEXT_INREG' |
2938 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner25), |
2939 | 0 | GIR_Done, |
2940 | | // Label 180: @2653 |
2941 | 0 | GIM_Try, /*On fail goto*//*Label 181*/ GIMT_Encode4(2669), // Rule ID 91 // |
2942 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled), |
2943 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner42), |
2944 | | // Combiner Rule #56: redundant_sext_inreg; wip_match_opcode 'G_SEXT_INREG' |
2945 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner14), |
2946 | 0 | GIR_Done, |
2947 | | // Label 181: @2669 |
2948 | 0 | GIM_Try, /*On fail goto*//*Label 182*/ GIMT_Encode4(2685), // Rule ID 158 // |
2949 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule99Enabled), |
2950 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner76), |
2951 | | // Combiner Rule #99: bitfield_extract_from_sext_inreg; wip_match_opcode 'G_SEXT_INREG' |
2952 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
2953 | 0 | GIR_Done, |
2954 | | // Label 182: @2685 |
2955 | 0 | GIM_Try, /*On fail goto*//*Label 183*/ GIMT_Encode4(2701), // Rule ID 97 // |
2956 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled), |
2957 | | // MIs[0] dst |
2958 | | // No operand predicates |
2959 | | // MIs[0] src |
2960 | | // No operand predicates |
2961 | | // MIs[0] imm |
2962 | | // No operand predicates |
2963 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner48), |
2964 | | // Combiner Rule #62: sext_inreg_to_zext_inreg |
2965 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner30), |
2966 | 0 | GIR_Done, |
2967 | | // Label 183: @2701 |
2968 | 0 | GIM_Reject, |
2969 | | // Label 28: @2702 |
2970 | 0 | GIM_Try, /*On fail goto*//*Label 184*/ GIMT_Encode4(2718), // Rule ID 94 // |
2971 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled), |
2972 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner45), |
2973 | | // Combiner Rule #59: zext_trunc_fold; wip_match_opcode 'G_ZEXT' |
2974 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner17), |
2975 | 0 | GIR_Done, |
2976 | | // Label 184: @2718 |
2977 | 0 | GIM_Try, /*On fail goto*//*Label 185*/ GIMT_Encode4(2734), // Rule ID 100 // |
2978 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule63Enabled), |
2979 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner49), |
2980 | | // Combiner Rule #63: ext_ext_fold; wip_match_opcode 'G_ZEXT' |
2981 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner31), |
2982 | 0 | GIR_Done, |
2983 | | // Label 185: @2734 |
2984 | 0 | GIM_Try, /*On fail goto*//*Label 186*/ GIMT_Encode4(2750), // Rule ID 179 // |
2985 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule106Enabled), |
2986 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner83), |
2987 | | // Combiner Rule #106: constant_fold_cast_op; wip_match_opcode 'G_ZEXT' |
2988 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
2989 | 0 | GIR_Done, |
2990 | | // Label 186: @2750 |
2991 | 0 | GIM_Reject, |
2992 | | // Label 29: @2751 |
2993 | 0 | GIM_Try, /*On fail goto*//*Label 187*/ GIMT_Encode4(2767), // Rule ID 20 // |
2994 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled), |
2995 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner10), |
2996 | | // Combiner Rule #14: binop_left_undef_to_zero; wip_match_opcode 'G_SHL' |
2997 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner9), |
2998 | 0 | GIR_Done, |
2999 | | // Label 187: @2767 |
3000 | 0 | GIM_Try, /*On fail goto*//*Label 188*/ GIMT_Encode4(2783), // Rule ID 23 // |
3001 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled), |
3002 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11), |
3003 | | // Combiner Rule #15: binop_right_undef_to_undef; wip_match_opcode 'G_SHL' |
3004 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3005 | 0 | GIR_Done, |
3006 | | // Label 188: @2783 |
3007 | 0 | GIM_Try, /*On fail goto*//*Label 189*/ GIMT_Encode4(2799), // Rule ID 77 // |
3008 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled), |
3009 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner31), |
3010 | | // Combiner Rule #44: shifts_too_big; wip_match_opcode 'G_SHL' |
3011 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3012 | 0 | GIR_Done, |
3013 | | // Label 189: @2799 |
3014 | 0 | GIM_Try, /*On fail goto*//*Label 190*/ GIMT_Encode4(2815), // Rule ID 135 // |
3015 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3016 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner68), |
3017 | | // Combiner Rule #89: shift_immed_chain; wip_match_opcode 'G_SHL' |
3018 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner45), |
3019 | 0 | GIR_Done, |
3020 | | // Label 190: @2815 |
3021 | 0 | GIM_Try, /*On fail goto*//*Label 191*/ GIMT_Encode4(2831), // Rule ID 140 // |
3022 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
3023 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner69), |
3024 | | // Combiner Rule #90: shift_of_shifted_logic_chain; wip_match_opcode 'G_SHL' |
3025 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner46), |
3026 | 0 | GIR_Done, |
3027 | | // Label 191: @2831 |
3028 | 0 | GIM_Try, /*On fail goto*//*Label 192*/ GIMT_Encode4(2847), // Rule ID 157 // |
3029 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule98Enabled), |
3030 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner75), |
3031 | | // Combiner Rule #98: commute_shift; wip_match_opcode 'G_SHL' |
3032 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3033 | 0 | GIR_Done, |
3034 | | // Label 192: @2847 |
3035 | 0 | GIM_Try, /*On fail goto*//*Label 193*/ GIMT_Encode4(2863), // Rule ID 170 // |
3036 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
3037 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
3038 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_SHL' |
3039 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
3040 | 0 | GIR_Done, |
3041 | | // Label 193: @2863 |
3042 | 0 | GIM_Try, /*On fail goto*//*Label 194*/ GIMT_Encode4(2879), // Rule ID 213 // |
3043 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3044 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3045 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_SHL' |
3046 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3047 | 0 | GIR_Done, |
3048 | | // Label 194: @2879 |
3049 | 0 | GIM_Try, /*On fail goto*//*Label 195*/ GIMT_Encode4(2904), // Rule ID 44 // |
3050 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
3051 | | // MIs[0] dst |
3052 | | // No operand predicates |
3053 | | // MIs[0] lhs |
3054 | | // No operand predicates |
3055 | | // MIs[0] Operand 2 |
3056 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3057 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3058 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[4]] |
3059 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3060 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3061 | 0 | GIR_Done, |
3062 | | // Label 195: @2904 |
3063 | 0 | GIM_Try, /*On fail goto*//*Label 196*/ GIMT_Encode4(2920), // Rule ID 85 // |
3064 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule50Enabled), |
3065 | | // MIs[0] dst |
3066 | | // No operand predicates |
3067 | | // MIs[0] src0 |
3068 | | // No operand predicates |
3069 | | // MIs[0] src1 |
3070 | | // No operand predicates |
3071 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner37), |
3072 | | // Combiner Rule #50: reduce_shl_of_extend |
3073 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner26), |
3074 | 0 | GIR_Done, |
3075 | | // Label 196: @2920 |
3076 | 0 | GIM_Reject, |
3077 | | // Label 30: @2921 |
3078 | 0 | GIM_Try, /*On fail goto*//*Label 197*/ GIMT_Encode4(2937), // Rule ID 25 // |
3079 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled), |
3080 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11), |
3081 | | // Combiner Rule #15: binop_right_undef_to_undef; wip_match_opcode 'G_LSHR' |
3082 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3083 | 0 | GIR_Done, |
3084 | | // Label 197: @2937 |
3085 | 0 | GIM_Try, /*On fail goto*//*Label 198*/ GIMT_Encode4(2953), // Rule ID 79 // |
3086 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled), |
3087 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner31), |
3088 | | // Combiner Rule #44: shifts_too_big; wip_match_opcode 'G_LSHR' |
3089 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3090 | 0 | GIR_Done, |
3091 | | // Label 198: @2953 |
3092 | 0 | GIM_Try, /*On fail goto*//*Label 199*/ GIMT_Encode4(2969), // Rule ID 137 // |
3093 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3094 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner68), |
3095 | | // Combiner Rule #89: shift_immed_chain; wip_match_opcode 'G_LSHR' |
3096 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner45), |
3097 | 0 | GIR_Done, |
3098 | | // Label 199: @2969 |
3099 | 0 | GIM_Try, /*On fail goto*//*Label 200*/ GIMT_Encode4(2985), // Rule ID 142 // |
3100 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
3101 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner69), |
3102 | | // Combiner Rule #90: shift_of_shifted_logic_chain; wip_match_opcode 'G_LSHR' |
3103 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner46), |
3104 | 0 | GIR_Done, |
3105 | | // Label 200: @2985 |
3106 | 0 | GIM_Try, /*On fail goto*//*Label 201*/ GIMT_Encode4(3001), // Rule ID 161 // |
3107 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule101Enabled), |
3108 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner78), |
3109 | | // Combiner Rule #101: bitfield_extract_from_shr; wip_match_opcode 'G_LSHR' |
3110 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3111 | 0 | GIR_Done, |
3112 | | // Label 201: @3001 |
3113 | 0 | GIM_Try, /*On fail goto*//*Label 202*/ GIMT_Encode4(3017), // Rule ID 163 // |
3114 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule102Enabled), |
3115 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner79), |
3116 | | // Combiner Rule #102: bitfield_extract_from_shr_and; wip_match_opcode 'G_LSHR' |
3117 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3118 | 0 | GIR_Done, |
3119 | | // Label 202: @3017 |
3120 | 0 | GIM_Try, /*On fail goto*//*Label 203*/ GIMT_Encode4(3033), // Rule ID 171 // |
3121 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
3122 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
3123 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_LSHR' |
3124 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
3125 | 0 | GIR_Done, |
3126 | | // Label 203: @3033 |
3127 | 0 | GIM_Try, /*On fail goto*//*Label 204*/ GIMT_Encode4(3049), // Rule ID 211 // |
3128 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3129 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3130 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_LSHR' |
3131 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3132 | 0 | GIR_Done, |
3133 | | // Label 204: @3049 |
3134 | 0 | GIM_Try, /*On fail goto*//*Label 205*/ GIMT_Encode4(3074), // Rule ID 46 // |
3135 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
3136 | | // MIs[0] dst |
3137 | | // No operand predicates |
3138 | | // MIs[0] lhs |
3139 | | // No operand predicates |
3140 | | // MIs[0] Operand 2 |
3141 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3142 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3143 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[6]] |
3144 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3145 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3146 | 0 | GIR_Done, |
3147 | | // Label 205: @3074 |
3148 | 0 | GIM_Reject, |
3149 | | // Label 31: @3075 |
3150 | 0 | GIM_Try, /*On fail goto*//*Label 206*/ GIMT_Encode4(3091), // Rule ID 24 // |
3151 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled), |
3152 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11), |
3153 | | // Combiner Rule #15: binop_right_undef_to_undef; wip_match_opcode 'G_ASHR' |
3154 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3155 | 0 | GIR_Done, |
3156 | | // Label 206: @3091 |
3157 | 0 | GIM_Try, /*On fail goto*//*Label 207*/ GIMT_Encode4(3107), // Rule ID 78 // |
3158 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled), |
3159 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner31), |
3160 | | // Combiner Rule #44: shifts_too_big; wip_match_opcode 'G_ASHR' |
3161 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3162 | 0 | GIR_Done, |
3163 | | // Label 207: @3107 |
3164 | 0 | GIM_Try, /*On fail goto*//*Label 208*/ GIMT_Encode4(3123), // Rule ID 83 // |
3165 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule48Enabled), |
3166 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner35), |
3167 | | // Combiner Rule #48: shl_ashr_to_sext_inreg; wip_match_opcode 'G_ASHR' |
3168 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner24), |
3169 | 0 | GIR_Done, |
3170 | | // Label 208: @3123 |
3171 | 0 | GIM_Try, /*On fail goto*//*Label 209*/ GIMT_Encode4(3139), // Rule ID 136 // |
3172 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3173 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner68), |
3174 | | // Combiner Rule #89: shift_immed_chain; wip_match_opcode 'G_ASHR' |
3175 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner45), |
3176 | 0 | GIR_Done, |
3177 | | // Label 209: @3139 |
3178 | 0 | GIM_Try, /*On fail goto*//*Label 210*/ GIMT_Encode4(3155), // Rule ID 141 // |
3179 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
3180 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner69), |
3181 | | // Combiner Rule #90: shift_of_shifted_logic_chain; wip_match_opcode 'G_ASHR' |
3182 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner46), |
3183 | 0 | GIR_Done, |
3184 | | // Label 210: @3155 |
3185 | 0 | GIM_Try, /*On fail goto*//*Label 211*/ GIMT_Encode4(3171), // Rule ID 160 // |
3186 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule101Enabled), |
3187 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner78), |
3188 | | // Combiner Rule #101: bitfield_extract_from_shr; wip_match_opcode 'G_ASHR' |
3189 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3190 | 0 | GIR_Done, |
3191 | | // Label 211: @3171 |
3192 | 0 | GIM_Try, /*On fail goto*//*Label 212*/ GIMT_Encode4(3187), // Rule ID 162 // |
3193 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule102Enabled), |
3194 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner79), |
3195 | | // Combiner Rule #102: bitfield_extract_from_shr_and; wip_match_opcode 'G_ASHR' |
3196 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3197 | 0 | GIR_Done, |
3198 | | // Label 212: @3187 |
3199 | 0 | GIM_Try, /*On fail goto*//*Label 213*/ GIMT_Encode4(3203), // Rule ID 172 // |
3200 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled), |
3201 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner80), |
3202 | | // Combiner Rule #103: constant_fold_binop; wip_match_opcode 'G_ASHR' |
3203 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner50), |
3204 | 0 | GIR_Done, |
3205 | | // Label 213: @3203 |
3206 | 0 | GIM_Try, /*On fail goto*//*Label 214*/ GIMT_Encode4(3219), // Rule ID 212 // |
3207 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3208 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3209 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_ASHR' |
3210 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3211 | 0 | GIR_Done, |
3212 | | // Label 214: @3219 |
3213 | 0 | GIM_Try, /*On fail goto*//*Label 215*/ GIMT_Encode4(3244), // Rule ID 45 // |
3214 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
3215 | | // MIs[0] dst |
3216 | | // No operand predicates |
3217 | | // MIs[0] lhs |
3218 | | // No operand predicates |
3219 | | // MIs[0] Operand 2 |
3220 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3221 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3222 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[5]] |
3223 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3224 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3225 | 0 | GIR_Done, |
3226 | | // Label 215: @3244 |
3227 | 0 | GIM_Reject, |
3228 | | // Label 32: @3245 |
3229 | 0 | GIM_Try, /*On fail goto*//*Label 216*/ GIMT_Encode4(3261), // Rule ID 151 // |
3230 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule94Enabled), |
3231 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner73), |
3232 | | // Combiner Rule #94: funnel_shift_to_rotate; wip_match_opcode 'G_FSHL' |
3233 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner48), |
3234 | 0 | GIR_Done, |
3235 | | // Label 216: @3261 |
3236 | 0 | GIM_Try, /*On fail goto*//*Label 217*/ GIMT_Encode4(3277), // Rule ID 155 // |
3237 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule97Enabled), |
3238 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner74), |
3239 | | // Combiner Rule #97: funnel_shift_overshift; wip_match_opcode 'G_FSHL' |
3240 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner49), |
3241 | 0 | GIR_Done, |
3242 | | // Label 217: @3277 |
3243 | 0 | GIM_Try, /*On fail goto*//*Label 218*/ GIMT_Encode4(3304), // Rule ID 154 // |
3244 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule96Enabled), |
3245 | | // MIs[0] x |
3246 | | // No operand predicates |
3247 | | // MIs[0] y |
3248 | | // No operand predicates |
3249 | | // MIs[0] z |
3250 | | // No operand predicates |
3251 | | // MIs[0] Operand 3 |
3252 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/3, 0, |
3253 | | // Combiner Rule #96: funnel_shift_left_zero |
3254 | 0 | GIR_BuildMI, /*InsnID*/0, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY), |
3255 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/0, // x |
3256 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/1, // y |
3257 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3258 | 0 | GIR_Done, |
3259 | | // Label 218: @3304 |
3260 | 0 | GIM_Reject, |
3261 | | // Label 33: @3305 |
3262 | 0 | GIM_Try, /*On fail goto*//*Label 219*/ GIMT_Encode4(3321), // Rule ID 152 // |
3263 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule94Enabled), |
3264 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner73), |
3265 | | // Combiner Rule #94: funnel_shift_to_rotate; wip_match_opcode 'G_FSHR' |
3266 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner48), |
3267 | 0 | GIR_Done, |
3268 | | // Label 219: @3321 |
3269 | 0 | GIM_Try, /*On fail goto*//*Label 220*/ GIMT_Encode4(3337), // Rule ID 156 // |
3270 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule97Enabled), |
3271 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner74), |
3272 | | // Combiner Rule #97: funnel_shift_overshift; wip_match_opcode 'G_FSHR' |
3273 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner49), |
3274 | 0 | GIR_Done, |
3275 | | // Label 220: @3337 |
3276 | 0 | GIM_Try, /*On fail goto*//*Label 221*/ GIMT_Encode4(3364), // Rule ID 153 // |
3277 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule95Enabled), |
3278 | | // MIs[0] x |
3279 | | // No operand predicates |
3280 | | // MIs[0] y |
3281 | | // No operand predicates |
3282 | | // MIs[0] z |
3283 | | // No operand predicates |
3284 | | // MIs[0] Operand 3 |
3285 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/3, 0, |
3286 | | // Combiner Rule #95: funnel_shift_right_zero |
3287 | 0 | GIR_BuildMI, /*InsnID*/0, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY), |
3288 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/0, // x |
3289 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/2, // z |
3290 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3291 | 0 | GIR_Done, |
3292 | | // Label 221: @3364 |
3293 | 0 | GIM_Reject, |
3294 | | // Label 34: @3365 |
3295 | 0 | GIM_Try, /*On fail goto*//*Label 222*/ GIMT_Encode4(3390), // Rule ID 49 // |
3296 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
3297 | | // MIs[0] dst |
3298 | | // No operand predicates |
3299 | | // MIs[0] lhs |
3300 | | // No operand predicates |
3301 | | // MIs[0] Operand 2 |
3302 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3303 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3304 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[9]] |
3305 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3306 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3307 | 0 | GIR_Done, |
3308 | | // Label 222: @3390 |
3309 | 0 | GIM_Reject, |
3310 | | // Label 35: @3391 |
3311 | 0 | GIM_Try, /*On fail goto*//*Label 223*/ GIMT_Encode4(3416), // Rule ID 48 // |
3312 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
3313 | | // MIs[0] dst |
3314 | | // No operand predicates |
3315 | | // MIs[0] lhs |
3316 | | // No operand predicates |
3317 | | // MIs[0] Operand 2 |
3318 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
3319 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3320 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[8]] |
3321 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3322 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3323 | 0 | GIR_Done, |
3324 | | // Label 223: @3416 |
3325 | 0 | GIM_Reject, |
3326 | | // Label 36: @3417 |
3327 | 0 | GIM_Try, /*On fail goto*//*Label 224*/ GIMT_Encode4(3433), // Rule ID 95 // |
3328 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled), |
3329 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner46), |
3330 | | // Combiner Rule #60: icmp_to_true_false_known_bits; wip_match_opcode 'G_ICMP' |
3331 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner29), |
3332 | 0 | GIR_Done, |
3333 | | // Label 224: @3433 |
3334 | 0 | GIM_Try, /*On fail goto*//*Label 225*/ GIMT_Encode4(3449), // Rule ID 96 // |
3335 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled), |
3336 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner47), |
3337 | | // Combiner Rule #61: icmp_to_lhs_known_bits; wip_match_opcode 'G_ICMP' |
3338 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3339 | 0 | GIR_Done, |
3340 | | // Label 225: @3449 |
3341 | 0 | GIM_Try, /*On fail goto*//*Label 226*/ GIMT_Encode4(3465), // Rule ID 229 // |
3342 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule124Enabled), |
3343 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner100), |
3344 | | // Combiner Rule #124: redundant_binop_in_equality; wip_match_opcode 'G_ICMP' |
3345 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3346 | 0 | GIR_Done, |
3347 | | // Label 226: @3465 |
3348 | 0 | GIM_Reject, |
3349 | | // Label 37: @3466 |
3350 | 0 | GIM_Try, /*On fail goto*//*Label 227*/ GIMT_Encode4(3482), // Rule ID 39 // |
3351 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled), |
3352 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner17), |
3353 | | // Combiner Rule #23: select_same_val; wip_match_opcode 'G_SELECT' |
3354 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner13), |
3355 | 0 | GIR_Done, |
3356 | | // Label 227: @3482 |
3357 | 0 | GIM_Try, /*On fail goto*//*Label 228*/ GIMT_Encode4(3498), // Rule ID 88 // |
3358 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled), |
3359 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner39), |
3360 | | // Combiner Rule #53: select_constant_cmp; wip_match_opcode 'G_SELECT' |
3361 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner27), |
3362 | 0 | GIR_Done, |
3363 | | // Label 228: @3498 |
3364 | 0 | GIM_Try, /*On fail goto*//*Label 229*/ GIMT_Encode4(3514), // Rule ID 89 // |
3365 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule54Enabled), |
3366 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner40), |
3367 | | // Combiner Rule #54: match_selects; wip_match_opcode 'G_SELECT' |
3368 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3369 | 0 | GIR_Done, |
3370 | | // Label 229: @3514 |
3371 | 0 | GIM_Try, /*On fail goto*//*Label 230*/ GIMT_Encode4(3530), // Rule ID 228 // |
3372 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule123Enabled), |
3373 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner99), |
3374 | | // Combiner Rule #123: select_to_minmax; wip_match_opcode 'G_SELECT' |
3375 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3376 | 0 | GIR_Done, |
3377 | | // Label 230: @3530 |
3378 | 0 | GIM_Try, /*On fail goto*//*Label 231*/ GIMT_Encode4(3561), // Rule ID 87 // |
3379 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule52Enabled), |
3380 | | // MIs[0] dst |
3381 | | // No operand predicates |
3382 | | // MIs[0] undef |
3383 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3384 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF), |
3385 | | // MIs[0] x |
3386 | | // No operand predicates |
3387 | | // MIs[0] y |
3388 | | // No operand predicates |
3389 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3, |
3390 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3391 | | // Combiner Rule #52: select_undef_cmp |
3392 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3, |
3393 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3394 | 0 | GIR_Done, |
3395 | | // Label 231: @3561 |
3396 | 0 | GIM_Reject, |
3397 | | // Label 38: @3562 |
3398 | 0 | GIM_Try, /*On fail goto*//*Label 232*/ GIMT_Encode4(3578), // Rule ID 123 // |
3399 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule84Enabled), |
3400 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner63), |
3401 | | // Combiner Rule #84: addo_by_0; wip_match_opcode 'G_UADDO' |
3402 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3403 | 0 | GIR_Done, |
3404 | | // Label 232: @3578 |
3405 | 0 | GIM_Reject, |
3406 | | // Label 39: @3579 |
3407 | 0 | GIM_Try, /*On fail goto*//*Label 233*/ GIMT_Encode4(3595), // Rule ID 125 // |
3408 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule85Enabled), |
3409 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner64), |
3410 | | // Combiner Rule #85: adde_to_addo; wip_match_opcode 'G_UADDE' |
3411 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3412 | 0 | GIR_Done, |
3413 | | // Label 233: @3595 |
3414 | 0 | GIM_Reject, |
3415 | | // Label 40: @3596 |
3416 | 0 | GIM_Try, /*On fail goto*//*Label 234*/ GIMT_Encode4(3612), // Rule ID 127 // |
3417 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule85Enabled), |
3418 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner64), |
3419 | | // Combiner Rule #85: adde_to_addo; wip_match_opcode 'G_USUBE' |
3420 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3421 | 0 | GIR_Done, |
3422 | | // Label 234: @3612 |
3423 | 0 | GIM_Reject, |
3424 | | // Label 41: @3613 |
3425 | 0 | GIM_Try, /*On fail goto*//*Label 235*/ GIMT_Encode4(3629), // Rule ID 124 // |
3426 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule84Enabled), |
3427 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner63), |
3428 | | // Combiner Rule #84: addo_by_0; wip_match_opcode 'G_SADDO' |
3429 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3430 | 0 | GIR_Done, |
3431 | | // Label 235: @3629 |
3432 | 0 | GIM_Reject, |
3433 | | // Label 42: @3630 |
3434 | 0 | GIM_Try, /*On fail goto*//*Label 236*/ GIMT_Encode4(3646), // Rule ID 126 // |
3435 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule85Enabled), |
3436 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner64), |
3437 | | // Combiner Rule #85: adde_to_addo; wip_match_opcode 'G_SADDE' |
3438 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3439 | 0 | GIR_Done, |
3440 | | // Label 236: @3646 |
3441 | 0 | GIM_Reject, |
3442 | | // Label 43: @3647 |
3443 | 0 | GIM_Try, /*On fail goto*//*Label 237*/ GIMT_Encode4(3663), // Rule ID 128 // |
3444 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule85Enabled), |
3445 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner64), |
3446 | | // Combiner Rule #85: adde_to_addo; wip_match_opcode 'G_SSUBE' |
3447 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3448 | 0 | GIR_Done, |
3449 | | // Label 237: @3663 |
3450 | 0 | GIM_Reject, |
3451 | | // Label 44: @3664 |
3452 | 0 | GIM_Try, /*On fail goto*//*Label 238*/ GIMT_Encode4(3680), // Rule ID 119 // |
3453 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule82Enabled), |
3454 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner61), |
3455 | | // Combiner Rule #82: mulo_by_2; wip_match_opcode 'G_UMULO' |
3456 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3457 | 0 | GIR_Done, |
3458 | | // Label 238: @3680 |
3459 | 0 | GIM_Try, /*On fail goto*//*Label 239*/ GIMT_Encode4(3696), // Rule ID 121 // |
3460 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule83Enabled), |
3461 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner62), |
3462 | | // Combiner Rule #83: mulo_by_0; wip_match_opcode 'G_UMULO' |
3463 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3464 | 0 | GIR_Done, |
3465 | | // Label 239: @3696 |
3466 | 0 | GIM_Reject, |
3467 | | // Label 45: @3697 |
3468 | 0 | GIM_Try, /*On fail goto*//*Label 240*/ GIMT_Encode4(3713), // Rule ID 120 // |
3469 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule82Enabled), |
3470 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner61), |
3471 | | // Combiner Rule #82: mulo_by_2; wip_match_opcode 'G_SMULO' |
3472 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3473 | 0 | GIR_Done, |
3474 | | // Label 240: @3713 |
3475 | 0 | GIM_Try, /*On fail goto*//*Label 241*/ GIMT_Encode4(3729), // Rule ID 122 // |
3476 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule83Enabled), |
3477 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner62), |
3478 | | // Combiner Rule #83: mulo_by_0; wip_match_opcode 'G_SMULO' |
3479 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3480 | 0 | GIR_Done, |
3481 | | // Label 241: @3729 |
3482 | 0 | GIM_Reject, |
3483 | | // Label 46: @3730 |
3484 | 0 | GIM_Try, /*On fail goto*//*Label 242*/ GIMT_Encode4(3746), // Rule ID 185 // |
3485 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled), |
3486 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner86), |
3487 | | // Combiner Rule #110: mulh_to_lshr; wip_match_opcode 'G_UMULH' |
3488 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner54), |
3489 | 0 | GIR_Done, |
3490 | | // Label 242: @3746 |
3491 | 0 | GIM_Reject, |
3492 | | // Label 47: @3747 |
3493 | 0 | GIM_Try, /*On fail goto*//*Label 243*/ GIMT_Encode4(3763), // Rule ID 139 // |
3494 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3495 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner68), |
3496 | | // Combiner Rule #89: shift_immed_chain; wip_match_opcode 'G_USHLSAT' |
3497 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner45), |
3498 | 0 | GIR_Done, |
3499 | | // Label 243: @3763 |
3500 | 0 | GIM_Try, /*On fail goto*//*Label 244*/ GIMT_Encode4(3779), // Rule ID 143 // |
3501 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
3502 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner69), |
3503 | | // Combiner Rule #90: shift_of_shifted_logic_chain; wip_match_opcode 'G_USHLSAT' |
3504 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner46), |
3505 | 0 | GIR_Done, |
3506 | | // Label 244: @3779 |
3507 | 0 | GIM_Reject, |
3508 | | // Label 48: @3780 |
3509 | 0 | GIM_Try, /*On fail goto*//*Label 245*/ GIMT_Encode4(3796), // Rule ID 138 // |
3510 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled), |
3511 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner68), |
3512 | | // Combiner Rule #89: shift_immed_chain; wip_match_opcode 'G_SSHLSAT' |
3513 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner45), |
3514 | 0 | GIR_Done, |
3515 | | // Label 245: @3796 |
3516 | 0 | GIM_Try, /*On fail goto*//*Label 246*/ GIMT_Encode4(3812), // Rule ID 144 // |
3517 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled), |
3518 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner69), |
3519 | | // Combiner Rule #90: shift_of_shifted_logic_chain; wip_match_opcode 'G_SSHLSAT' |
3520 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner46), |
3521 | 0 | GIR_Done, |
3522 | | // Label 246: @3812 |
3523 | 0 | GIM_Reject, |
3524 | | // Label 49: @3813 |
3525 | 0 | GIM_Try, /*On fail goto*//*Label 247*/ GIMT_Encode4(3829), // Rule ID 173 // |
3526 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule104Enabled), |
3527 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner81), |
3528 | | // Combiner Rule #104: constant_fold_fp_binop; wip_match_opcode 'G_FADD' |
3529 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner51), |
3530 | 0 | GIR_Done, |
3531 | | // Label 247: @3829 |
3532 | 0 | GIM_Try, /*On fail goto*//*Label 248*/ GIMT_Encode4(3845), // Rule ID 186 // |
3533 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled), |
3534 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner87), |
3535 | | // Combiner Rule #111: redundant_neg_operands; wip_match_opcode 'G_FADD' |
3536 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3537 | 0 | GIR_Done, |
3538 | | // Label 248: @3845 |
3539 | 0 | GIM_Try, /*On fail goto*//*Label 249*/ GIMT_Encode4(3861), // Rule ID 193 // |
3540 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule113Enabled), |
3541 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner89), |
3542 | | // Combiner Rule #113: combine_fadd_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
3543 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3544 | 0 | GIR_Done, |
3545 | | // Label 249: @3861 |
3546 | 0 | GIM_Try, /*On fail goto*//*Label 250*/ GIMT_Encode4(3877), // Rule ID 194 // |
3547 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule114Enabled), |
3548 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner90), |
3549 | | // Combiner Rule #114: combine_fadd_fpext_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
3550 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3551 | 0 | GIR_Done, |
3552 | | // Label 250: @3877 |
3553 | 0 | GIM_Try, /*On fail goto*//*Label 251*/ GIMT_Encode4(3893), // Rule ID 195 // |
3554 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule115Enabled), |
3555 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner91), |
3556 | | // Combiner Rule #115: combine_fadd_fma_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
3557 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3558 | 0 | GIR_Done, |
3559 | | // Label 251: @3893 |
3560 | 0 | GIM_Try, /*On fail goto*//*Label 252*/ GIMT_Encode4(3909), // Rule ID 196 // |
3561 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule116Enabled), |
3562 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner92), |
3563 | | // Combiner Rule #116: combine_fadd_fpext_fma_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD' |
3564 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3565 | 0 | GIR_Done, |
3566 | | // Label 252: @3909 |
3567 | 0 | GIM_Try, /*On fail goto*//*Label 253*/ GIMT_Encode4(3925), // Rule ID 219 // |
3568 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3569 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3570 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FADD' |
3571 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3572 | 0 | GIR_Done, |
3573 | | // Label 253: @3925 |
3574 | 0 | GIM_Try, /*On fail goto*//*Label 254*/ GIMT_Encode4(3941), // Rule ID 236 // |
3575 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule127Enabled), |
3576 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner103), |
3577 | | // Combiner Rule #127: commute_fp_constant_to_rhs; wip_match_opcode 'G_FADD' |
3578 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner57), |
3579 | 0 | GIR_Done, |
3580 | | // Label 254: @3941 |
3581 | 0 | GIM_Try, /*On fail goto*//*Label 255*/ GIMT_Encode4(3966), // Rule ID 71 // |
3582 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule40Enabled), |
3583 | | // MIs[0] dst |
3584 | | // No operand predicates |
3585 | | // MIs[0] x |
3586 | | // No operand predicates |
3587 | | // MIs[0] y |
3588 | | // No operand predicates |
3589 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner27), |
3590 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3591 | | // Combiner Rule #40: right_identity_neg_zero_fp |
3592 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3593 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3594 | 0 | GIR_Done, |
3595 | | // Label 255: @3966 |
3596 | 0 | GIM_Reject, |
3597 | | // Label 50: @3967 |
3598 | 0 | GIM_Try, /*On fail goto*//*Label 256*/ GIMT_Encode4(3983), // Rule ID 174 // |
3599 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule104Enabled), |
3600 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner81), |
3601 | | // Combiner Rule #104: constant_fold_fp_binop; wip_match_opcode 'G_FSUB' |
3602 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner51), |
3603 | 0 | GIR_Done, |
3604 | | // Label 256: @3983 |
3605 | 0 | GIM_Try, /*On fail goto*//*Label 257*/ GIMT_Encode4(3999), // Rule ID 187 // |
3606 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled), |
3607 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner87), |
3608 | | // Combiner Rule #111: redundant_neg_operands; wip_match_opcode 'G_FSUB' |
3609 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3610 | 0 | GIR_Done, |
3611 | | // Label 257: @3999 |
3612 | 0 | GIM_Try, /*On fail goto*//*Label 258*/ GIMT_Encode4(4015), // Rule ID 197 // |
3613 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule117Enabled), |
3614 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner93), |
3615 | | // Combiner Rule #117: combine_fsub_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
3616 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3617 | 0 | GIR_Done, |
3618 | | // Label 258: @4015 |
3619 | 0 | GIM_Try, /*On fail goto*//*Label 259*/ GIMT_Encode4(4031), // Rule ID 198 // |
3620 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule118Enabled), |
3621 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner94), |
3622 | | // Combiner Rule #118: combine_fsub_fneg_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
3623 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3624 | 0 | GIR_Done, |
3625 | | // Label 259: @4031 |
3626 | 0 | GIM_Try, /*On fail goto*//*Label 260*/ GIMT_Encode4(4047), // Rule ID 199 // |
3627 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule119Enabled), |
3628 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner95), |
3629 | | // Combiner Rule #119: combine_fsub_fpext_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
3630 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3631 | 0 | GIR_Done, |
3632 | | // Label 260: @4047 |
3633 | 0 | GIM_Try, /*On fail goto*//*Label 261*/ GIMT_Encode4(4063), // Rule ID 200 // |
3634 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule120Enabled), |
3635 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner96), |
3636 | | // Combiner Rule #120: combine_fsub_fpext_fneg_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB' |
3637 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
3638 | 0 | GIR_Done, |
3639 | | // Label 261: @4063 |
3640 | 0 | GIM_Try, /*On fail goto*//*Label 262*/ GIMT_Encode4(4079), // Rule ID 220 // |
3641 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3642 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3643 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FSUB' |
3644 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3645 | 0 | GIR_Done, |
3646 | | // Label 262: @4079 |
3647 | 0 | GIM_Try, /*On fail goto*//*Label 263*/ GIMT_Encode4(4095), // Rule ID 230 // |
3648 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule125Enabled), |
3649 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner101), |
3650 | | // Combiner Rule #125: fsub_to_fneg; wip_match_opcode 'G_FSUB' |
3651 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner56), |
3652 | 0 | GIR_Done, |
3653 | | // Label 263: @4095 |
3654 | 0 | GIM_Reject, |
3655 | | // Label 51: @4096 |
3656 | 0 | GIM_Try, /*On fail goto*//*Label 264*/ GIMT_Encode4(4112), // Rule ID 175 // |
3657 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule104Enabled), |
3658 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner81), |
3659 | | // Combiner Rule #104: constant_fold_fp_binop; wip_match_opcode 'G_FMUL' |
3660 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner51), |
3661 | 0 | GIR_Done, |
3662 | | // Label 264: @4112 |
3663 | 0 | GIM_Try, /*On fail goto*//*Label 265*/ GIMT_Encode4(4128), // Rule ID 188 // |
3664 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled), |
3665 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner87), |
3666 | | // Combiner Rule #111: redundant_neg_operands; wip_match_opcode 'G_FMUL' |
3667 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3668 | 0 | GIR_Done, |
3669 | | // Label 265: @4128 |
3670 | 0 | GIM_Try, /*On fail goto*//*Label 266*/ GIMT_Encode4(4144), // Rule ID 218 // |
3671 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3672 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3673 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FMUL' |
3674 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3675 | 0 | GIR_Done, |
3676 | | // Label 266: @4144 |
3677 | 0 | GIM_Try, /*On fail goto*//*Label 267*/ GIMT_Encode4(4160), // Rule ID 237 // |
3678 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule127Enabled), |
3679 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner103), |
3680 | | // Combiner Rule #127: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMUL' |
3681 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner57), |
3682 | 0 | GIR_Done, |
3683 | | // Label 267: @4160 |
3684 | 0 | GIM_Try, /*On fail goto*//*Label 268*/ GIMT_Encode4(4185), // Rule ID 62 // |
3685 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled), |
3686 | | // MIs[0] dst |
3687 | | // No operand predicates |
3688 | | // MIs[0] x |
3689 | | // No operand predicates |
3690 | | // MIs[0] y |
3691 | | // No operand predicates |
3692 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner22), |
3693 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3694 | | // Combiner Rule #33: right_identity_one_fp |
3695 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3696 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3697 | 0 | GIR_Done, |
3698 | | // Label 268: @4185 |
3699 | 0 | GIM_Reject, |
3700 | | // Label 52: @4186 |
3701 | 0 | GIM_Try, /*On fail goto*//*Label 269*/ GIMT_Encode4(4202), // Rule ID 178 // |
3702 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule105Enabled), |
3703 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner82), |
3704 | | // Combiner Rule #105: constant_fold_fma; wip_match_opcode 'G_FMA' |
3705 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner51), |
3706 | 0 | GIR_Done, |
3707 | | // Label 269: @4202 |
3708 | 0 | GIM_Try, /*On fail goto*//*Label 270*/ GIMT_Encode4(4218), // Rule ID 191 // |
3709 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled), |
3710 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner87), |
3711 | | // Combiner Rule #111: redundant_neg_operands; wip_match_opcode 'G_FMA' |
3712 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3713 | 0 | GIR_Done, |
3714 | | // Label 270: @4218 |
3715 | 0 | GIM_Reject, |
3716 | | // Label 53: @4219 |
3717 | 0 | GIM_Try, /*On fail goto*//*Label 271*/ GIMT_Encode4(4235), // Rule ID 177 // |
3718 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule105Enabled), |
3719 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner82), |
3720 | | // Combiner Rule #105: constant_fold_fma; wip_match_opcode 'G_FMAD' |
3721 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner51), |
3722 | 0 | GIR_Done, |
3723 | | // Label 271: @4235 |
3724 | 0 | GIM_Try, /*On fail goto*//*Label 272*/ GIMT_Encode4(4251), // Rule ID 190 // |
3725 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled), |
3726 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner87), |
3727 | | // Combiner Rule #111: redundant_neg_operands; wip_match_opcode 'G_FMAD' |
3728 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3729 | 0 | GIR_Done, |
3730 | | // Label 272: @4251 |
3731 | 0 | GIM_Reject, |
3732 | | // Label 54: @4252 |
3733 | 0 | GIM_Try, /*On fail goto*//*Label 273*/ GIMT_Encode4(4268), // Rule ID 176 // |
3734 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule104Enabled), |
3735 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner81), |
3736 | | // Combiner Rule #104: constant_fold_fp_binop; wip_match_opcode 'G_FDIV' |
3737 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner51), |
3738 | 0 | GIR_Done, |
3739 | | // Label 273: @4268 |
3740 | 0 | GIM_Try, /*On fail goto*//*Label 274*/ GIMT_Encode4(4284), // Rule ID 189 // |
3741 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled), |
3742 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner87), |
3743 | | // Combiner Rule #111: redundant_neg_operands; wip_match_opcode 'G_FDIV' |
3744 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
3745 | 0 | GIR_Done, |
3746 | | // Label 274: @4284 |
3747 | 0 | GIM_Try, /*On fail goto*//*Label 275*/ GIMT_Encode4(4300), // Rule ID 221 // |
3748 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3749 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3750 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FDIV' |
3751 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3752 | 0 | GIR_Done, |
3753 | | // Label 275: @4300 |
3754 | 0 | GIM_Reject, |
3755 | | // Label 55: @4301 |
3756 | 0 | GIM_Try, /*On fail goto*//*Label 276*/ GIMT_Encode4(4317), // Rule ID 222 // |
3757 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3758 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3759 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FREM' |
3760 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3761 | 0 | GIR_Done, |
3762 | | // Label 276: @4317 |
3763 | 0 | GIM_Reject, |
3764 | | // Label 56: @4318 |
3765 | 0 | GIM_Try, /*On fail goto*//*Label 277*/ GIMT_Encode4(4340), // Rule ID 113 // |
3766 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule76Enabled), |
3767 | | // MIs[0] dst |
3768 | | // No operand predicates |
3769 | | // MIs[0] src0 |
3770 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3771 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
3772 | | // MIs[1] cst |
3773 | | // No operand predicates |
3774 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3775 | | // Combiner Rule #76: constant_fold_flog2 |
3776 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner40), |
3777 | 0 | GIR_Done, |
3778 | | // Label 277: @4340 |
3779 | 0 | GIM_Reject, |
3780 | | // Label 57: @4341 |
3781 | 0 | GIM_Try, /*On fail goto*//*Label 278*/ GIMT_Encode4(4357), // Rule ID 239 // |
3782 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule129Enabled), |
3783 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner105), |
3784 | | // Combiner Rule #129: foldable_fneg; wip_match_opcode 'G_FNEG' |
3785 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner59), |
3786 | 0 | GIR_Done, |
3787 | | // Label 278: @4357 |
3788 | 0 | GIM_Try, /*On fail goto*//*Label 279*/ GIMT_Encode4(4379), // Rule ID 110 // |
3789 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled), |
3790 | | // MIs[0] dst |
3791 | | // No operand predicates |
3792 | | // MIs[0] src0 |
3793 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3794 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
3795 | | // MIs[1] cst |
3796 | | // No operand predicates |
3797 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3798 | | // Combiner Rule #73: constant_fold_fneg |
3799 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner40), |
3800 | 0 | GIR_Done, |
3801 | | // Label 279: @4379 |
3802 | 0 | GIM_Try, /*On fail goto*//*Label 280*/ GIMT_Encode4(4410), // Rule ID 60 // |
3803 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled), |
3804 | | // MIs[0] dst |
3805 | | // No operand predicates |
3806 | | // MIs[0] t |
3807 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3808 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG), |
3809 | | // MIs[1] src |
3810 | | // No operand predicates |
3811 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3812 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3813 | | // Combiner Rule #31: fneg_fneg_fold |
3814 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
3815 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3816 | 0 | GIR_Done, |
3817 | | // Label 280: @4410 |
3818 | 0 | GIM_Reject, |
3819 | | // Label 58: @4411 |
3820 | 0 | GIM_Try, /*On fail goto*//*Label 281*/ GIMT_Encode4(4433), // Rule ID 114 // |
3821 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule77Enabled), |
3822 | | // MIs[0] dst |
3823 | | // No operand predicates |
3824 | | // MIs[0] src0 |
3825 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3826 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
3827 | | // MIs[1] cst |
3828 | | // No operand predicates |
3829 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3830 | | // Combiner Rule #77: constant_fold_fptrunc |
3831 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner40), |
3832 | 0 | GIR_Done, |
3833 | | // Label 281: @4433 |
3834 | 0 | GIM_Try, /*On fail goto*//*Label 282*/ GIMT_Encode4(4459), // Rule ID 70 // |
3835 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule39Enabled), |
3836 | | // MIs[0] dst |
3837 | | // No operand predicates |
3838 | | // MIs[0] src1 |
3839 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3840 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT), |
3841 | | // MIs[1] src0 |
3842 | | // No operand predicates |
3843 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner26), |
3844 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3845 | | // Combiner Rule #39: fptrunc_fpext_fold |
3846 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner18), |
3847 | 0 | GIR_Done, |
3848 | | // Label 282: @4459 |
3849 | 0 | GIM_Reject, |
3850 | | // Label 59: @4460 |
3851 | 0 | GIM_Try, /*On fail goto*//*Label 283*/ GIMT_Encode4(4476), // Rule ID 28 // |
3852 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
3853 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
3854 | | // Combiner Rule #17: propagate_undef_any_op; wip_match_opcode 'G_FPTOSI' |
3855 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3856 | 0 | GIR_Done, |
3857 | | // Label 283: @4476 |
3858 | 0 | GIM_Reject, |
3859 | | // Label 60: @4477 |
3860 | 0 | GIM_Try, /*On fail goto*//*Label 284*/ GIMT_Encode4(4493), // Rule ID 29 // |
3861 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
3862 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
3863 | | // Combiner Rule #17: propagate_undef_any_op; wip_match_opcode 'G_FPTOUI' |
3864 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
3865 | 0 | GIR_Done, |
3866 | | // Label 284: @4493 |
3867 | 0 | GIM_Reject, |
3868 | | // Label 61: @4494 |
3869 | 0 | GIM_Try, /*On fail goto*//*Label 285*/ GIMT_Encode4(4510), // Rule ID 16 // |
3870 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled), |
3871 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
3872 | | // Combiner Rule #11: undef_to_fp_zero; wip_match_opcode 'G_SITOFP' |
3873 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner8), |
3874 | 0 | GIR_Done, |
3875 | | // Label 285: @4510 |
3876 | 0 | GIM_Try, /*On fail goto*//*Label 286*/ GIMT_Encode4(4526), // Rule ID 115 // |
3877 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule78Enabled), |
3878 | | // MIs[0] dst |
3879 | | // No operand predicates |
3880 | | // MIs[0] Operand 1 |
3881 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0, |
3882 | | // Combiner Rule #78: itof_const_zero_fold_si |
3883 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner41), |
3884 | 0 | GIR_Done, |
3885 | | // Label 286: @4526 |
3886 | 0 | GIM_Reject, |
3887 | | // Label 62: @4527 |
3888 | 0 | GIM_Try, /*On fail goto*//*Label 287*/ GIMT_Encode4(4543), // Rule ID 15 // |
3889 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled), |
3890 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9), |
3891 | | // Combiner Rule #11: undef_to_fp_zero; wip_match_opcode 'G_UITOFP' |
3892 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner8), |
3893 | 0 | GIR_Done, |
3894 | | // Label 287: @4543 |
3895 | 0 | GIM_Try, /*On fail goto*//*Label 288*/ GIMT_Encode4(4559), // Rule ID 116 // |
3896 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule79Enabled), |
3897 | | // MIs[0] dst |
3898 | | // No operand predicates |
3899 | | // MIs[0] Operand 1 |
3900 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0, |
3901 | | // Combiner Rule #79: itof_const_zero_fold_ui |
3902 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner41), |
3903 | 0 | GIR_Done, |
3904 | | // Label 288: @4559 |
3905 | 0 | GIM_Reject, |
3906 | | // Label 63: @4560 |
3907 | 0 | GIM_Try, /*On fail goto*//*Label 289*/ GIMT_Encode4(4591), // Rule ID 5 // |
3908 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled), |
3909 | | // MIs[0] dst |
3910 | | // No operand predicates |
3911 | | // MIs[0] src |
3912 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3913 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FABS), |
3914 | | // MIs[1] __idempotent_prop_match_0.x |
3915 | | // No operand predicates |
3916 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3917 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3918 | | // Combiner Rule #4: idempotent_prop @ [__idempotent_prop_match_0[1]] |
3919 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3920 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3921 | 0 | GIR_Done, |
3922 | | // Label 289: @4591 |
3923 | 0 | GIM_Try, /*On fail goto*//*Label 290*/ GIMT_Encode4(4613), // Rule ID 111 // |
3924 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule74Enabled), |
3925 | | // MIs[0] dst |
3926 | | // No operand predicates |
3927 | | // MIs[0] src0 |
3928 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3929 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
3930 | | // MIs[1] cst |
3931 | | // No operand predicates |
3932 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3933 | | // Combiner Rule #74: constant_fold_fabs |
3934 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner40), |
3935 | 0 | GIR_Done, |
3936 | | // Label 290: @4613 |
3937 | 0 | GIM_Try, /*On fail goto*//*Label 291*/ GIMT_Encode4(4646), // Rule ID 182 // |
3938 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule107Enabled), |
3939 | | // MIs[0] dst |
3940 | | // No operand predicates |
3941 | | // MIs[0] tmp |
3942 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3943 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG), |
3944 | | // MIs[1] x |
3945 | | // No operand predicates |
3946 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3947 | | // Combiner Rule #107: fabs_fneg_fold |
3948 | 0 | GIR_BuildMI, /*InsnID*/0, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FABS), |
3949 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/0, // dst |
3950 | 0 | GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // x |
3951 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3952 | 0 | GIR_Done, |
3953 | | // Label 291: @4646 |
3954 | 0 | GIM_Reject, |
3955 | | // Label 64: @4647 |
3956 | 0 | GIM_Try, /*On fail goto*//*Label 292*/ GIMT_Encode4(4678), // Rule ID 6 // |
3957 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled), |
3958 | | // MIs[0] dst |
3959 | | // No operand predicates |
3960 | | // MIs[0] src |
3961 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
3962 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCANONICALIZE), |
3963 | | // MIs[1] __idempotent_prop_match_0.x |
3964 | | // No operand predicates |
3965 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3966 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
3967 | | // Combiner Rule #4: idempotent_prop @ [__idempotent_prop_match_0[2]] |
3968 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
3969 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
3970 | 0 | GIR_Done, |
3971 | | // Label 292: @4678 |
3972 | 0 | GIM_Reject, |
3973 | | // Label 65: @4679 |
3974 | 0 | GIM_Try, /*On fail goto*//*Label 293*/ GIMT_Encode4(4695), // Rule ID 129 // |
3975 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule86Enabled), |
3976 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner65), |
3977 | | // Combiner Rule #86: combine_minmax_nan; wip_match_opcode 'G_FMINNUM' |
3978 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner27), |
3979 | 0 | GIR_Done, |
3980 | | // Label 293: @4695 |
3981 | 0 | GIM_Try, /*On fail goto*//*Label 294*/ GIMT_Encode4(4711), // Rule ID 223 // |
3982 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3983 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
3984 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FMINNUM' |
3985 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
3986 | 0 | GIR_Done, |
3987 | | // Label 294: @4711 |
3988 | 0 | GIM_Reject, |
3989 | | // Label 66: @4712 |
3990 | 0 | GIM_Try, /*On fail goto*//*Label 295*/ GIMT_Encode4(4728), // Rule ID 130 // |
3991 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule86Enabled), |
3992 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner65), |
3993 | | // Combiner Rule #86: combine_minmax_nan; wip_match_opcode 'G_FMAXNUM' |
3994 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner27), |
3995 | 0 | GIR_Done, |
3996 | | // Label 295: @4728 |
3997 | 0 | GIM_Try, /*On fail goto*//*Label 296*/ GIMT_Encode4(4744), // Rule ID 224 // |
3998 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
3999 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4000 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FMAXNUM' |
4001 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4002 | 0 | GIR_Done, |
4003 | | // Label 296: @4744 |
4004 | 0 | GIM_Reject, |
4005 | | // Label 67: @4745 |
4006 | 0 | GIM_Try, /*On fail goto*//*Label 297*/ GIMT_Encode4(4761), // Rule ID 131 // |
4007 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule86Enabled), |
4008 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner65), |
4009 | | // Combiner Rule #86: combine_minmax_nan; wip_match_opcode 'G_FMINIMUM' |
4010 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner27), |
4011 | 0 | GIR_Done, |
4012 | | // Label 297: @4761 |
4013 | 0 | GIM_Try, /*On fail goto*//*Label 298*/ GIMT_Encode4(4777), // Rule ID 225 // |
4014 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
4015 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4016 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FMINIMUM' |
4017 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4018 | 0 | GIR_Done, |
4019 | | // Label 298: @4777 |
4020 | 0 | GIM_Reject, |
4021 | | // Label 68: @4778 |
4022 | 0 | GIM_Try, /*On fail goto*//*Label 299*/ GIMT_Encode4(4794), // Rule ID 132 // |
4023 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule86Enabled), |
4024 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner65), |
4025 | | // Combiner Rule #86: combine_minmax_nan; wip_match_opcode 'G_FMAXIMUM' |
4026 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner27), |
4027 | 0 | GIR_Done, |
4028 | | // Label 299: @4794 |
4029 | 0 | GIM_Try, /*On fail goto*//*Label 300*/ GIMT_Encode4(4810), // Rule ID 226 // |
4030 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
4031 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4032 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_FMAXIMUM' |
4033 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4034 | 0 | GIR_Done, |
4035 | | // Label 300: @4810 |
4036 | 0 | GIM_Reject, |
4037 | | // Label 69: @4811 |
4038 | 0 | GIM_Try, /*On fail goto*//*Label 301*/ GIMT_Encode4(4827), // Rule ID 80 // |
4039 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule45Enabled), |
4040 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner32), |
4041 | | // Combiner Rule #45: reassoc_ptradd; wip_match_opcode 'G_PTR_ADD' |
4042 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner22), |
4043 | 0 | GIR_Done, |
4044 | | // Label 301: @4827 |
4045 | 0 | GIM_Try, /*On fail goto*//*Label 302*/ GIMT_Encode4(4843), // Rule ID 82 // |
4046 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule47Enabled), |
4047 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner34), |
4048 | | // Combiner Rule #47: ptr_add_immed_chain; wip_match_opcode 'G_PTR_ADD' |
4049 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner23), |
4050 | 0 | GIR_Done, |
4051 | | // Label 302: @4843 |
4052 | 0 | GIM_Try, /*On fail goto*//*Label 303*/ GIMT_Encode4(4859), // Rule ID 117 // |
4053 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule80Enabled), |
4054 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner59), |
4055 | | // Combiner Rule #80: const_ptradd_to_i2p; wip_match_opcode 'G_PTR_ADD' |
4056 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner42), |
4057 | 0 | GIR_Done, |
4058 | | // Label 303: @4859 |
4059 | 0 | GIM_Try, /*On fail goto*//*Label 304*/ GIMT_Encode4(4875), // Rule ID 134 // |
4060 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule88Enabled), |
4061 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner67), |
4062 | | // Combiner Rule #88: ptr_add_with_zero; wip_match_opcode 'G_PTR_ADD' |
4063 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner44), |
4064 | 0 | GIR_Done, |
4065 | | // Label 304: @4875 |
4066 | 0 | GIM_Try, /*On fail goto*//*Label 305*/ GIMT_Encode4(4891), // Rule ID 203 // |
4067 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
4068 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4069 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_PTR_ADD' |
4070 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4071 | 0 | GIR_Done, |
4072 | | // Label 305: @4891 |
4073 | 0 | GIM_Try, /*On fail goto*//*Label 306*/ GIMT_Encode4(4916), // Rule ID 47 // |
4074 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
4075 | | // MIs[0] dst |
4076 | | // No operand predicates |
4077 | | // MIs[0] lhs |
4078 | | // No operand predicates |
4079 | | // MIs[0] Operand 2 |
4080 | 0 | GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
4081 | 0 | GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4082 | | // Combiner Rule #24: right_identity_zero @ [__right_identity_zero_match_0[7]] |
4083 | 0 | GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
4084 | 0 | GIR_EraseFromParent, /*InsnID*/0, |
4085 | 0 | GIR_Done, |
4086 | | // Label 306: @4916 |
4087 | 0 | GIM_Reject, |
4088 | | // Label 70: @4917 |
4089 | 0 | GIM_Try, /*On fail goto*//*Label 307*/ GIMT_Encode4(4933), // Rule ID 214 // |
4090 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
4091 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4092 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_SMIN' |
4093 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4094 | 0 | GIR_Done, |
4095 | | // Label 307: @4933 |
4096 | 0 | GIM_Reject, |
4097 | | // Label 71: @4934 |
4098 | 0 | GIM_Try, /*On fail goto*//*Label 308*/ GIMT_Encode4(4950), // Rule ID 215 // |
4099 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
4100 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4101 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_SMAX' |
4102 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4103 | 0 | GIR_Done, |
4104 | | // Label 308: @4950 |
4105 | 0 | GIM_Reject, |
4106 | | // Label 72: @4951 |
4107 | 0 | GIM_Try, /*On fail goto*//*Label 309*/ GIMT_Encode4(4967), // Rule ID 216 // |
4108 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
4109 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4110 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_UMIN' |
4111 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4112 | 0 | GIR_Done, |
4113 | | // Label 309: @4967 |
4114 | 0 | GIM_Reject, |
4115 | | // Label 73: @4968 |
4116 | 0 | GIM_Try, /*On fail goto*//*Label 310*/ GIMT_Encode4(4984), // Rule ID 217 // |
4117 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled), |
4118 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner97), |
4119 | | // Combiner Rule #121: fold_binop_into_select; wip_match_opcode 'G_UMAX' |
4120 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner55), |
4121 | 0 | GIR_Done, |
4122 | | // Label 310: @4984 |
4123 | 0 | GIM_Reject, |
4124 | | // Label 74: @4985 |
4125 | 0 | GIM_Try, /*On fail goto*//*Label 311*/ GIMT_Encode4(5001), // Rule ID 26 // |
4126 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled), |
4127 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner10), |
4128 | | // Combiner Rule #16: unary_undef_to_zero; wip_match_opcode 'G_ABS' |
4129 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner9), |
4130 | 0 | GIR_Done, |
4131 | | // Label 311: @5001 |
4132 | 0 | GIM_Reject, |
4133 | | // Label 75: @5002 |
4134 | 0 | GIM_Try, /*On fail goto*//*Label 312*/ GIMT_Encode4(5018), // Rule ID 102 // |
4135 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled), |
4136 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner51), |
4137 | | // Combiner Rule #65: opt_brcond_by_inverting_cond; wip_match_opcode 'G_BR' |
4138 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner33), |
4139 | 0 | GIR_Done, |
4140 | | // Label 312: @5018 |
4141 | 0 | GIM_Reject, |
4142 | | // Label 76: @5019 |
4143 | 0 | GIM_Try, /*On fail goto*//*Label 313*/ GIMT_Encode4(5035), // Rule ID 7 // |
4144 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
4145 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3), |
4146 | | // Combiner Rule #5: combine_insert_vec_elts_build_vector; wip_match_opcode 'G_INSERT_VECTOR_ELT' |
4147 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner3), |
4148 | 0 | GIR_Done, |
4149 | | // Label 313: @5035 |
4150 | 0 | GIM_Try, /*On fail goto*//*Label 314*/ GIMT_Encode4(5051), // Rule ID 37 // |
4151 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled), |
4152 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner16), |
4153 | | // Combiner Rule #22: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_INSERT_VECTOR_ELT' |
4154 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
4155 | 0 | GIR_Done, |
4156 | | // Label 314: @5051 |
4157 | 0 | GIM_Reject, |
4158 | | // Label 77: @5052 |
4159 | 0 | GIM_Try, /*On fail goto*//*Label 315*/ GIMT_Encode4(5068), // Rule ID 8 // |
4160 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled), |
4161 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner4), |
4162 | | // Combiner Rule #6: extract_vec_elt_build_vec; wip_match_opcode 'G_EXTRACT_VECTOR_ELT' |
4163 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner4), |
4164 | 0 | GIR_Done, |
4165 | | // Label 315: @5068 |
4166 | 0 | GIM_Try, /*On fail goto*//*Label 316*/ GIMT_Encode4(5084), // Rule ID 14 // |
4167 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled), |
4168 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner8), |
4169 | | // Combiner Rule #10: combine_extracted_vector_load; wip_match_opcode 'G_EXTRACT_VECTOR_ELT' |
4170 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner7), |
4171 | 0 | GIR_Done, |
4172 | | // Label 316: @5084 |
4173 | 0 | GIM_Try, /*On fail goto*//*Label 317*/ GIMT_Encode4(5100), // Rule ID 38 // |
4174 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled), |
4175 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner16), |
4176 | | // Combiner Rule #22: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_EXTRACT_VECTOR_ELT' |
4177 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
4178 | 0 | GIR_Done, |
4179 | | // Label 317: @5100 |
4180 | 0 | GIM_Reject, |
4181 | | // Label 78: @5101 |
4182 | 0 | GIM_Try, /*On fail goto*//*Label 318*/ GIMT_Encode4(5117), // Rule ID 33 // |
4183 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled), |
4184 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12), |
4185 | | // Combiner Rule #18: propagate_undef_all_ops; wip_match_opcode 'G_SHUFFLE_VECTOR' |
4186 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
4187 | 0 | GIR_Done, |
4188 | | // Label 318: @5117 |
4189 | 0 | GIM_Try, /*On fail goto*//*Label 319*/ GIMT_Encode4(5133), // Rule ID 34 // |
4190 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled), |
4191 | 0 | GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner13), |
4192 | | // Combiner Rule #19: propagate_undef_shuffle_mask; wip_match_opcode 'G_SHUFFLE_VECTOR' |
4193 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner11), |
4194 | 0 | GIR_Done, |
4195 | | // Label 319: @5133 |
4196 | 0 | GIM_Reject, |
4197 | | // Label 79: @5134 |
4198 | 0 | GIM_Try, /*On fail goto*//*Label 320*/ GIMT_Encode4(5156), // Rule ID 112 // |
4199 | 0 | GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule75Enabled), |
4200 | | // MIs[0] dst |
4201 | | // No operand predicates |
4202 | | // MIs[0] src0 |
4203 | 0 | GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
4204 | 0 | GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT), |
4205 | | // MIs[1] cst |
4206 | | // No operand predicates |
4207 | 0 | GIM_CheckIsSafeToFold, /*InsnID*/1, |
4208 | | // Combiner Rule #75: constant_fold_fsqrt |
4209 | 0 | GIR_CustomAction, GIMT_Encode2(GICXXCustomAction_CombineApplyGICombiner40), |
4210 | 0 | GIR_Done, |
4211 | | // Label 320: @5156 |
4212 | 0 | GIM_Reject, |
4213 | | // Label 80: @5157 |
4214 | 0 | GIM_Reject, |
4215 | 0 | }; // Size: 5158 bytes |
4216 | 0 | return MatchTable0; |
4217 | 0 | } |
4218 | | #undef GIMT_Encode2 |
4219 | | #undef GIMT_Encode4 |
4220 | | #undef GIMT_Encode8 |
4221 | | |
4222 | | #endif // ifdef GET_GICOMBINER_IMPL |
4223 | | |
4224 | | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
4225 | | AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)), |
4226 | | AvailableFunctionFeatures() |
4227 | | #endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
4228 | | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
4229 | | , State(0), |
4230 | | ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers) |
4231 | | #endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
4232 | | |