Branch data Line data Source code
1 : : /* Generated automatically by the program `genmatch' from
2 : : a IL pattern matching and simplification description. */
3 : : #pragma GCC diagnostic push
4 : : #pragma GCC diagnostic ignored "-Wunused-variable"
5 : : #pragma GCC diagnostic ignored "-Wunused-function"
6 : :
7 : : #include "generic-match-auto.h"
8 : :
9 : : bool
10 : 151889333 : tree_truth_valued_p (tree t)
11 : : {
12 : 151889333 : const tree type = TREE_TYPE (t);
13 : 151889333 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 151889333 : if (TREE_SIDE_EFFECTS (t)) return false;
15 : 147142171 : {
16 : 147142171 : tree captures[1] ATTRIBUTE_UNUSED = { t };
17 : 147142171 : if (INTEGRAL_TYPE_P (type) && TYPE_PRECISION (type) == 1
18 : : )
19 : : {
20 : 5478478 : {
21 : 5478478 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 20, __FILE__, __LINE__, false);
22 : 5478478 : return true;
23 : : }
24 : : }
25 : : }
26 : 141663693 : switch (TREE_CODE (t))
27 : : {
28 : 834 : case LT_EXPR:
29 : 834 : {
30 : 834 : tree _p0 = TREE_OPERAND (t, 0);
31 : 834 : tree _p1 = TREE_OPERAND (t, 1);
32 : 834 : {
33 : 834 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
34 : 834 : {
35 : 834 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
36 : 834 : return true;
37 : : }
38 : : }
39 : 707 : break;
40 : : }
41 : 707 : case LE_EXPR:
42 : 707 : {
43 : 707 : tree _p0 = TREE_OPERAND (t, 0);
44 : 707 : tree _p1 = TREE_OPERAND (t, 1);
45 : 707 : {
46 : 707 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
47 : 707 : {
48 : 707 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
49 : 707 : return true;
50 : : }
51 : : }
52 : 11715 : break;
53 : : }
54 : 11715 : case EQ_EXPR:
55 : 11715 : {
56 : 11715 : tree _p0 = TREE_OPERAND (t, 0);
57 : 11715 : tree _p1 = TREE_OPERAND (t, 1);
58 : 11715 : {
59 : 11715 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
60 : 11715 : {
61 : 11715 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
62 : 11715 : return true;
63 : : }
64 : : }
65 : 4250 : break;
66 : : }
67 : 4250 : case NE_EXPR:
68 : 4250 : {
69 : 4250 : tree _p0 = TREE_OPERAND (t, 0);
70 : 4250 : tree _p1 = TREE_OPERAND (t, 1);
71 : 4250 : {
72 : 4250 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
73 : 4250 : {
74 : 4250 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
75 : 4250 : return true;
76 : : }
77 : : }
78 : 358 : break;
79 : : }
80 : 358 : case GE_EXPR:
81 : 358 : {
82 : 358 : tree _p0 = TREE_OPERAND (t, 0);
83 : 358 : tree _p1 = TREE_OPERAND (t, 1);
84 : 358 : {
85 : 358 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
86 : 358 : {
87 : 358 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
88 : 358 : return true;
89 : : }
90 : : }
91 : 99344 : break;
92 : : }
93 : 99344 : case GT_EXPR:
94 : 99344 : {
95 : 99344 : tree _p0 = TREE_OPERAND (t, 0);
96 : 99344 : tree _p1 = TREE_OPERAND (t, 1);
97 : 99344 : {
98 : 99344 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
99 : 99344 : {
100 : 99344 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
101 : 99344 : return true;
102 : : }
103 : : }
104 : 148699 : break;
105 : : }
106 : 148699 : case UNORDERED_EXPR:
107 : 148699 : {
108 : 148699 : tree _p0 = TREE_OPERAND (t, 0);
109 : 148699 : tree _p1 = TREE_OPERAND (t, 1);
110 : 148699 : {
111 : 148699 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
112 : 148699 : {
113 : 148699 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
114 : 148699 : return true;
115 : : }
116 : : }
117 : 16 : break;
118 : : }
119 : 16 : case ORDERED_EXPR:
120 : 16 : {
121 : 16 : tree _p0 = TREE_OPERAND (t, 0);
122 : 16 : tree _p1 = TREE_OPERAND (t, 1);
123 : 16 : {
124 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
125 : 16 : {
126 : 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
127 : 16 : return true;
128 : : }
129 : : }
130 : 79 : break;
131 : : }
132 : 79 : case UNLT_EXPR:
133 : 79 : {
134 : 79 : tree _p0 = TREE_OPERAND (t, 0);
135 : 79 : tree _p1 = TREE_OPERAND (t, 1);
136 : 79 : {
137 : 79 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
138 : 79 : {
139 : 79 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
140 : 79 : return true;
141 : : }
142 : : }
143 : 1164 : break;
144 : : }
145 : 1164 : case UNLE_EXPR:
146 : 1164 : {
147 : 1164 : tree _p0 = TREE_OPERAND (t, 0);
148 : 1164 : tree _p1 = TREE_OPERAND (t, 1);
149 : 1164 : {
150 : 1164 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
151 : 1164 : {
152 : 1164 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
153 : 1164 : return true;
154 : : }
155 : : }
156 : 79 : break;
157 : : }
158 : 79 : case UNGT_EXPR:
159 : 79 : {
160 : 79 : tree _p0 = TREE_OPERAND (t, 0);
161 : 79 : tree _p1 = TREE_OPERAND (t, 1);
162 : 79 : {
163 : 79 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
164 : 79 : {
165 : 79 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
166 : 79 : return true;
167 : : }
168 : : }
169 : 79 : break;
170 : : }
171 : 79 : case UNGE_EXPR:
172 : 79 : {
173 : 79 : tree _p0 = TREE_OPERAND (t, 0);
174 : 79 : tree _p1 = TREE_OPERAND (t, 1);
175 : 79 : {
176 : 79 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
177 : 79 : {
178 : 79 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
179 : 79 : return true;
180 : : }
181 : : }
182 : 95 : break;
183 : : }
184 : 95 : case UNEQ_EXPR:
185 : 95 : {
186 : 95 : tree _p0 = TREE_OPERAND (t, 0);
187 : 95 : tree _p1 = TREE_OPERAND (t, 1);
188 : 95 : {
189 : 95 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
190 : 95 : {
191 : 95 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
192 : 95 : return true;
193 : : }
194 : : }
195 : 27 : break;
196 : : }
197 : 27 : case LTGT_EXPR:
198 : 27 : {
199 : 27 : tree _p0 = TREE_OPERAND (t, 0);
200 : 27 : tree _p1 = TREE_OPERAND (t, 1);
201 : 27 : {
202 : 27 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
203 : 27 : {
204 : 27 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
205 : 27 : return true;
206 : : }
207 : : }
208 : 102 : break;
209 : : }
210 : 102 : case TRUTH_AND_EXPR:
211 : 102 : {
212 : 102 : tree _p0 = TREE_OPERAND (t, 0);
213 : 102 : tree _p1 = TREE_OPERAND (t, 1);
214 : 102 : {
215 : 102 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
216 : 102 : {
217 : 102 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
218 : 102 : return true;
219 : : }
220 : : }
221 : 516 : break;
222 : : }
223 : 516 : case TRUTH_ANDIF_EXPR:
224 : 516 : {
225 : 516 : tree _p0 = TREE_OPERAND (t, 0);
226 : 516 : tree _p1 = TREE_OPERAND (t, 1);
227 : 516 : {
228 : 516 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
229 : 516 : {
230 : 516 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
231 : 516 : return true;
232 : : }
233 : : }
234 : 43 : break;
235 : : }
236 : 43 : case TRUTH_OR_EXPR:
237 : 43 : {
238 : 43 : tree _p0 = TREE_OPERAND (t, 0);
239 : 43 : tree _p1 = TREE_OPERAND (t, 1);
240 : 43 : {
241 : 43 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
242 : 43 : {
243 : 43 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
244 : 43 : return true;
245 : : }
246 : : }
247 : 1405 : break;
248 : : }
249 : 1405 : case TRUTH_ORIF_EXPR:
250 : 1405 : {
251 : 1405 : tree _p0 = TREE_OPERAND (t, 0);
252 : 1405 : tree _p1 = TREE_OPERAND (t, 1);
253 : 1405 : {
254 : 1405 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
255 : 1405 : {
256 : 1405 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
257 : 1405 : return true;
258 : : }
259 : : }
260 : 0 : break;
261 : : }
262 : 0 : case TRUTH_XOR_EXPR:
263 : 0 : {
264 : 0 : tree _p0 = TREE_OPERAND (t, 0);
265 : 0 : tree _p1 = TREE_OPERAND (t, 1);
266 : 0 : {
267 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
268 : 0 : {
269 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
270 : 0 : return true;
271 : : }
272 : : }
273 : 583617 : break;
274 : : }
275 : 583617 : case TRUTH_NOT_EXPR:
276 : 583617 : {
277 : 583617 : tree _p0 = TREE_OPERAND (t, 0);
278 : 583617 : {
279 : 583617 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
280 : 583617 : {
281 : 583617 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 22, __FILE__, __LINE__, false);
282 : 583617 : return true;
283 : : }
284 : : }
285 : : break;
286 : : }
287 : : default:;
288 : : }
289 : : return false;
290 : : }
291 : :
292 : : bool
293 : 697556 : tree_vec_same_elem_p (tree t)
294 : : {
295 : 697556 : const tree type = TREE_TYPE (t);
296 : 697556 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
297 : 697556 : if (TREE_SIDE_EFFECTS (t)) return false;
298 : 697556 : switch (TREE_CODE (t))
299 : : {
300 : 0 : case VEC_DUPLICATE_EXPR:
301 : 0 : {
302 : 0 : tree _p0 = TREE_OPERAND (t, 0);
303 : 0 : {
304 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
305 : 0 : {
306 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 91, __FILE__, __LINE__, false);
307 : 0 : return true;
308 : : }
309 : : }
310 : : break;
311 : : }
312 : : case CONSTRUCTOR:
313 : : {
314 : : {
315 : : tree captures[1] ATTRIBUTE_UNUSED = { t };
316 : : if (TREE_CODE (captures[0]) == SSA_NAME
317 : : && uniform_vector_p (gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])))
318 : : )
319 : : {
320 : : {
321 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 92, __FILE__, __LINE__, false);
322 : : return true;
323 : : }
324 : : }
325 : : }
326 : : break;
327 : : }
328 : 697556 : default:;
329 : : }
330 : 697556 : {
331 : 697556 : tree captures[1] ATTRIBUTE_UNUSED = { t };
332 : 697556 : if (uniform_vector_p (captures[0])
333 : : )
334 : : {
335 : 13823 : {
336 : 13823 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 93, __FILE__, __LINE__, false);
337 : 13823 : return true;
338 : : }
339 : : }
340 : : }
341 : : return false;
342 : : }
343 : :
344 : : bool
345 : 0 : tree_bitwise_induction_p (tree t, tree *res_ops)
346 : : {
347 : 0 : const tree type = TREE_TYPE (t);
348 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
349 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
350 : 0 : switch (TREE_CODE (t))
351 : : {
352 : 0 : case BIT_AND_EXPR:
353 : 0 : case BIT_IOR_EXPR:
354 : 0 : case BIT_XOR_EXPR:
355 : 0 : {
356 : 0 : tree _p0 = TREE_OPERAND (t, 0);
357 : 0 : tree _p1 = TREE_OPERAND (t, 1);
358 : 0 : {
359 : 0 : tree _p0_pops[1];
360 : 0 : if (tree_nop_convert (_p0, _p0_pops))
361 : : {
362 : 0 : tree _q20 = _p0_pops[0];
363 : 0 : switch (TREE_CODE (_q20))
364 : : {
365 : 0 : case BIT_NOT_EXPR:
366 : 0 : {
367 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
368 : 0 : switch (TREE_CODE (_q30))
369 : : {
370 : 0 : CASE_CONVERT:
371 : 0 : {
372 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
373 : 0 : switch (TREE_CODE (_q40))
374 : : {
375 : 0 : case LSHIFT_EXPR:
376 : 0 : {
377 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
378 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
379 : 0 : if (integer_onep (_q50))
380 : : {
381 : 0 : {
382 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q51, _p1, _q50 };
383 : 0 : {
384 : 0 : res_ops[0] = captures[0];
385 : 0 : res_ops[1] = captures[1];
386 : 0 : res_ops[2] = captures[2];
387 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
388 : 0 : return true;
389 : : }
390 : : }
391 : : }
392 : : break;
393 : : }
394 : : default:;
395 : : }
396 : : break;
397 : : }
398 : 0 : case LSHIFT_EXPR:
399 : 0 : {
400 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
401 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
402 : 0 : if (integer_onep (_q40))
403 : : {
404 : 0 : {
405 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _p1, _q40 };
406 : 0 : {
407 : 0 : res_ops[0] = captures[0];
408 : 0 : res_ops[1] = captures[1];
409 : 0 : res_ops[2] = captures[2];
410 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
411 : 0 : return true;
412 : : }
413 : : }
414 : : }
415 : : break;
416 : : }
417 : : default:;
418 : : }
419 : : break;
420 : : }
421 : 0 : CASE_CONVERT:
422 : 0 : {
423 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
424 : 0 : switch (TREE_CODE (_q30))
425 : : {
426 : 0 : case LSHIFT_EXPR:
427 : 0 : {
428 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
429 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
430 : 0 : if (integer_onep (_q40))
431 : : {
432 : 0 : {
433 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _p1, _q40 };
434 : 0 : {
435 : 0 : res_ops[0] = captures[0];
436 : 0 : res_ops[1] = captures[1];
437 : 0 : res_ops[2] = captures[2];
438 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
439 : 0 : return true;
440 : : }
441 : : }
442 : : }
443 : : break;
444 : : }
445 : : default:;
446 : : }
447 : : break;
448 : : }
449 : 0 : case LSHIFT_EXPR:
450 : 0 : {
451 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
452 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
453 : 0 : if (integer_onep (_q30))
454 : : {
455 : 0 : {
456 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q31, _p1, _q30 };
457 : 0 : {
458 : 0 : res_ops[0] = captures[0];
459 : 0 : res_ops[1] = captures[1];
460 : 0 : res_ops[2] = captures[2];
461 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
462 : 0 : return true;
463 : : }
464 : : }
465 : : }
466 : : break;
467 : : }
468 : : default:;
469 : : }
470 : : }
471 : : }
472 : 0 : {
473 : 0 : tree _p1_pops[1];
474 : 0 : if (tree_nop_convert (_p1, _p1_pops))
475 : : {
476 : 0 : tree _q30 = _p1_pops[0];
477 : 0 : switch (TREE_CODE (_q30))
478 : : {
479 : 0 : case BIT_NOT_EXPR:
480 : 0 : {
481 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
482 : 0 : switch (TREE_CODE (_q40))
483 : : {
484 : 0 : CASE_CONVERT:
485 : 0 : {
486 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
487 : 0 : switch (TREE_CODE (_q50))
488 : : {
489 : 0 : case LSHIFT_EXPR:
490 : 0 : {
491 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
492 : 0 : tree _q61 = TREE_OPERAND (_q50, 1);
493 : 0 : if (integer_onep (_q60))
494 : : {
495 : 0 : {
496 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q61, _p0, _q60 };
497 : 0 : {
498 : 0 : res_ops[0] = captures[0];
499 : 0 : res_ops[1] = captures[1];
500 : 0 : res_ops[2] = captures[2];
501 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
502 : 0 : return true;
503 : : }
504 : : }
505 : : }
506 : : break;
507 : : }
508 : : default:;
509 : : }
510 : : break;
511 : : }
512 : 0 : case LSHIFT_EXPR:
513 : 0 : {
514 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
515 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
516 : 0 : if (integer_onep (_q50))
517 : : {
518 : 0 : {
519 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q51, _p0, _q50 };
520 : 0 : {
521 : 0 : res_ops[0] = captures[0];
522 : 0 : res_ops[1] = captures[1];
523 : 0 : res_ops[2] = captures[2];
524 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
525 : 0 : return true;
526 : : }
527 : : }
528 : : }
529 : : break;
530 : : }
531 : : default:;
532 : : }
533 : : break;
534 : : }
535 : 0 : CASE_CONVERT:
536 : 0 : {
537 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
538 : 0 : switch (TREE_CODE (_q40))
539 : : {
540 : 0 : case LSHIFT_EXPR:
541 : 0 : {
542 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
543 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
544 : 0 : if (integer_onep (_q50))
545 : : {
546 : 0 : {
547 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q51, _p0, _q50 };
548 : 0 : {
549 : 0 : res_ops[0] = captures[0];
550 : 0 : res_ops[1] = captures[1];
551 : 0 : res_ops[2] = captures[2];
552 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
553 : 0 : return true;
554 : : }
555 : : }
556 : : }
557 : : break;
558 : : }
559 : : default:;
560 : : }
561 : : break;
562 : : }
563 : 0 : case LSHIFT_EXPR:
564 : 0 : {
565 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
566 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
567 : 0 : if (integer_onep (_q40))
568 : : {
569 : 0 : {
570 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q41, _p0, _q40 };
571 : 0 : {
572 : 0 : res_ops[0] = captures[0];
573 : 0 : res_ops[1] = captures[1];
574 : 0 : res_ops[2] = captures[2];
575 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
576 : 0 : return true;
577 : : }
578 : : }
579 : : }
580 : : break;
581 : : }
582 : : default:;
583 : : }
584 : : }
585 : : }
586 : 0 : switch (TREE_CODE (_p0))
587 : : {
588 : 0 : case BIT_NOT_EXPR:
589 : 0 : {
590 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
591 : 0 : switch (TREE_CODE (_q20))
592 : : {
593 : 0 : CASE_CONVERT:
594 : 0 : {
595 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
596 : 0 : switch (TREE_CODE (_q30))
597 : : {
598 : 0 : case LSHIFT_EXPR:
599 : 0 : {
600 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
601 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
602 : 0 : if (integer_onep (_q40))
603 : : {
604 : 0 : {
605 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q41, _p1, _q40 };
606 : 0 : {
607 : 0 : res_ops[0] = captures[0];
608 : 0 : res_ops[1] = captures[1];
609 : 0 : res_ops[2] = captures[2];
610 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
611 : 0 : return true;
612 : : }
613 : : }
614 : : }
615 : : break;
616 : : }
617 : : default:;
618 : : }
619 : : break;
620 : : }
621 : 0 : case LSHIFT_EXPR:
622 : 0 : {
623 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
624 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
625 : 0 : if (integer_onep (_q30))
626 : : {
627 : 0 : {
628 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _p1, _q30 };
629 : 0 : {
630 : 0 : res_ops[0] = captures[0];
631 : 0 : res_ops[1] = captures[1];
632 : 0 : res_ops[2] = captures[2];
633 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
634 : 0 : return true;
635 : : }
636 : : }
637 : : }
638 : : break;
639 : : }
640 : : default:;
641 : : }
642 : : break;
643 : : }
644 : 0 : default:;
645 : : }
646 : 0 : switch (TREE_CODE (_p1))
647 : : {
648 : 0 : case BIT_NOT_EXPR:
649 : 0 : {
650 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
651 : 0 : switch (TREE_CODE (_q30))
652 : : {
653 : 0 : CASE_CONVERT:
654 : 0 : {
655 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
656 : 0 : switch (TREE_CODE (_q40))
657 : : {
658 : 0 : case LSHIFT_EXPR:
659 : 0 : {
660 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
661 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
662 : 0 : if (integer_onep (_q50))
663 : : {
664 : 0 : {
665 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q51, _p0, _q50 };
666 : 0 : {
667 : 0 : res_ops[0] = captures[0];
668 : 0 : res_ops[1] = captures[1];
669 : 0 : res_ops[2] = captures[2];
670 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
671 : 0 : return true;
672 : : }
673 : : }
674 : : }
675 : : break;
676 : : }
677 : : default:;
678 : : }
679 : : break;
680 : : }
681 : 0 : case LSHIFT_EXPR:
682 : 0 : {
683 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
684 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
685 : 0 : if (integer_onep (_q40))
686 : : {
687 : 0 : {
688 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q41, _p0, _q40 };
689 : 0 : {
690 : 0 : res_ops[0] = captures[0];
691 : 0 : res_ops[1] = captures[1];
692 : 0 : res_ops[2] = captures[2];
693 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
694 : 0 : return true;
695 : : }
696 : : }
697 : : }
698 : : break;
699 : : }
700 : : default:;
701 : : }
702 : : break;
703 : : }
704 : 0 : default:;
705 : : }
706 : 0 : switch (TREE_CODE (_p0))
707 : : {
708 : 0 : CASE_CONVERT:
709 : 0 : {
710 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
711 : 0 : switch (TREE_CODE (_q20))
712 : : {
713 : 0 : case LSHIFT_EXPR:
714 : 0 : {
715 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
716 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
717 : 0 : if (integer_onep (_q30))
718 : : {
719 : 0 : {
720 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _p1, _q30 };
721 : 0 : {
722 : 0 : res_ops[0] = captures[0];
723 : 0 : res_ops[1] = captures[1];
724 : 0 : res_ops[2] = captures[2];
725 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
726 : 0 : return true;
727 : : }
728 : : }
729 : : }
730 : : break;
731 : : }
732 : : default:;
733 : : }
734 : : break;
735 : : }
736 : 0 : default:;
737 : : }
738 : 0 : switch (TREE_CODE (_p1))
739 : : {
740 : 0 : CASE_CONVERT:
741 : 0 : {
742 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
743 : 0 : switch (TREE_CODE (_q30))
744 : : {
745 : 0 : case LSHIFT_EXPR:
746 : 0 : {
747 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
748 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
749 : 0 : if (integer_onep (_q40))
750 : : {
751 : 0 : {
752 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q41, _p0, _q40 };
753 : 0 : {
754 : 0 : res_ops[0] = captures[0];
755 : 0 : res_ops[1] = captures[1];
756 : 0 : res_ops[2] = captures[2];
757 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
758 : 0 : return true;
759 : : }
760 : : }
761 : : }
762 : : break;
763 : : }
764 : : default:;
765 : : }
766 : : break;
767 : : }
768 : 0 : default:;
769 : : }
770 : 0 : switch (TREE_CODE (_p0))
771 : : {
772 : 0 : case LSHIFT_EXPR:
773 : 0 : {
774 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
775 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
776 : 0 : if (integer_onep (_q20))
777 : : {
778 : 0 : {
779 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _p1, _q20 };
780 : 0 : {
781 : 0 : res_ops[0] = captures[0];
782 : 0 : res_ops[1] = captures[1];
783 : 0 : res_ops[2] = captures[2];
784 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
785 : 0 : return true;
786 : : }
787 : : }
788 : : }
789 : : break;
790 : : }
791 : 0 : default:;
792 : : }
793 : 0 : switch (TREE_CODE (_p1))
794 : : {
795 : 0 : case LSHIFT_EXPR:
796 : 0 : {
797 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
798 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
799 : 0 : if (integer_onep (_q30))
800 : : {
801 : 0 : {
802 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q31, _p0, _q30 };
803 : 0 : {
804 : 0 : res_ops[0] = captures[0];
805 : 0 : res_ops[1] = captures[1];
806 : 0 : res_ops[2] = captures[2];
807 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
808 : 0 : return true;
809 : : }
810 : : }
811 : : }
812 : : break;
813 : : }
814 : : default:;
815 : : }
816 : : break;
817 : : }
818 : 0 : case BIT_NOT_EXPR:
819 : 0 : {
820 : 0 : tree _p0 = TREE_OPERAND (t, 0);
821 : 0 : switch (TREE_CODE (_p0))
822 : : {
823 : 0 : case BIT_XOR_EXPR:
824 : 0 : {
825 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
826 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
827 : 0 : switch (TREE_CODE (_q20))
828 : : {
829 : 0 : CASE_CONVERT:
830 : 0 : {
831 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
832 : 0 : switch (TREE_CODE (_q30))
833 : : {
834 : 0 : case LSHIFT_EXPR:
835 : 0 : {
836 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
837 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
838 : 0 : if (integer_onep (_q40))
839 : : {
840 : 0 : {
841 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q41, _q21, _q40 };
842 : 0 : {
843 : 0 : res_ops[0] = captures[0];
844 : 0 : res_ops[1] = captures[1];
845 : 0 : res_ops[2] = captures[2];
846 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 103, __FILE__, __LINE__, false);
847 : 0 : return true;
848 : : }
849 : : }
850 : : }
851 : : break;
852 : : }
853 : : default:;
854 : : }
855 : : break;
856 : : }
857 : 0 : case LSHIFT_EXPR:
858 : 0 : {
859 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
860 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
861 : 0 : if (integer_onep (_q30))
862 : : {
863 : 0 : {
864 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _q21, _q30 };
865 : 0 : {
866 : 0 : res_ops[0] = captures[0];
867 : 0 : res_ops[1] = captures[1];
868 : 0 : res_ops[2] = captures[2];
869 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 103, __FILE__, __LINE__, false);
870 : 0 : return true;
871 : : }
872 : : }
873 : : }
874 : : break;
875 : : }
876 : : default:;
877 : : }
878 : : break;
879 : : }
880 : 0 : default:;
881 : : }
882 : 0 : {
883 : 0 : tree _p0_pops[1];
884 : 0 : if (tree_nop_convert (_p0, _p0_pops))
885 : : {
886 : 0 : tree _q20 = _p0_pops[0];
887 : 0 : switch (TREE_CODE (_q20))
888 : : {
889 : 0 : case BIT_XOR_EXPR:
890 : 0 : {
891 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
892 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
893 : 0 : switch (TREE_CODE (_q30))
894 : : {
895 : 0 : CASE_CONVERT:
896 : 0 : {
897 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
898 : 0 : switch (TREE_CODE (_q40))
899 : : {
900 : 0 : case LSHIFT_EXPR:
901 : 0 : {
902 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
903 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
904 : 0 : if (integer_onep (_q50))
905 : : {
906 : 0 : {
907 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q51, _q31, _q50 };
908 : 0 : {
909 : 0 : res_ops[0] = captures[0];
910 : 0 : res_ops[1] = captures[1];
911 : 0 : res_ops[2] = captures[2];
912 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 103, __FILE__, __LINE__, false);
913 : 0 : return true;
914 : : }
915 : : }
916 : : }
917 : : break;
918 : : }
919 : : default:;
920 : : }
921 : : break;
922 : : }
923 : 0 : case LSHIFT_EXPR:
924 : 0 : {
925 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
926 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
927 : 0 : if (integer_onep (_q40))
928 : : {
929 : 0 : {
930 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _q31, _q40 };
931 : 0 : {
932 : 0 : res_ops[0] = captures[0];
933 : 0 : res_ops[1] = captures[1];
934 : 0 : res_ops[2] = captures[2];
935 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 103, __FILE__, __LINE__, false);
936 : 0 : return true;
937 : : }
938 : : }
939 : : }
940 : : break;
941 : : }
942 : : default:;
943 : : }
944 : : break;
945 : : }
946 : : default:;
947 : : }
948 : : }
949 : : }
950 : 0 : break;
951 : : }
952 : : default:;
953 : : }
954 : : return false;
955 : : }
956 : :
957 : : tree
958 : 3505955 : generic_simplify_27 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
959 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
960 : : {
961 : 3505955 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
962 : 3505955 : if (!TYPE_SATURATING (type)
963 : 3505955 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
964 : : )
965 : : {
966 : 3505955 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
967 : : )
968 : : {
969 : 7011910 : if (TREE_CODE (type) == INTEGER_TYPE
970 : 3505955 : && wi::neg_p (wi::to_wide (captures[3]))
971 : 10517865 : && wi::to_wide (captures[3]) != wi::min_value (TYPE_PRECISION (type), SIGNED)
972 : : )
973 : : {
974 : 845862 : {
975 : 845862 : wide_int c0 = wi::to_wide (captures[1]);
976 : 845862 : wide_int c2 = wi::to_wide (captures[3]);
977 : 845862 : wide_int c2_abs = wi::abs (c2);
978 : 845862 : if (wi::multiple_of_p (c2_abs, c0, TYPE_SIGN (type))
979 : : )
980 : : {
981 : 389387 : {
982 : 389387 : wide_int div_res = wi::sdiv_trunc (c2, c0);
983 : 389387 : tree div_cst = wide_int_to_tree (type, div_res);
984 : 389387 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail264;
985 : 389387 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail264;
986 : 389387 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail264;
987 : 389387 : {
988 : 389387 : tree res_op0;
989 : 389387 : {
990 : 389387 : tree _o1[2], _r1;
991 : 389387 : _o1[0] = captures[2];
992 : 389387 : _o1[1] = div_cst;
993 : 389387 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
994 : 389387 : res_op0 = _r1;
995 : : }
996 : 389387 : tree res_op1;
997 : 389387 : res_op1 = captures[1];
998 : 389387 : tree _r;
999 : 389387 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1000 : 389387 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 140, __FILE__, __LINE__, true);
1001 : 389387 : return _r;
1002 : : }
1003 : 0 : next_after_fail264:;
1004 : 389387 : }
1005 : : }
1006 : 845862 : }
1007 : : }
1008 : : }
1009 : : }
1010 : : return NULL_TREE;
1011 : : }
1012 : :
1013 : : tree
1014 : 126 : generic_simplify_33 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1015 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1016 : : const combined_fn ARG_UNUSED (POPCOUNT))
1017 : : {
1018 : 126 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1019 : 252 : if (INTEGRAL_TYPE_P (type)
1020 : 630 : && (wi::bit_and (widest_int::from (tree_nonzero_bits (captures[1]), UNSIGNED),
1021 : 504 : widest_int::from (tree_nonzero_bits (captures[3]), UNSIGNED))
1022 : 378 : == 0)
1023 : : )
1024 : : {
1025 : 1 : {
1026 : 1 : tree utype = TREE_TYPE (captures[1]);
1027 : 1 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
1028 : 0 : utype = TREE_TYPE (captures[3]);
1029 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail270;
1030 : 1 : {
1031 : 1 : tree res_op0;
1032 : 1 : {
1033 : 1 : tree _o1[2], _r1;
1034 : 1 : {
1035 : 1 : tree _o2[1], _r2;
1036 : 1 : _o2[0] = captures[1];
1037 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1038 : : {
1039 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1040 : : }
1041 : : else
1042 : : _r2 = _o2[0];
1043 : 1 : _o1[0] = _r2;
1044 : : }
1045 : 1 : {
1046 : 1 : tree _o2[1], _r2;
1047 : 1 : _o2[0] = captures[3];
1048 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1049 : : {
1050 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1051 : : }
1052 : : else
1053 : : _r2 = _o2[0];
1054 : 1 : _o1[1] = _r2;
1055 : : }
1056 : 1 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1057 : 1 : res_op0 = _r1;
1058 : : }
1059 : 1 : tree _r;
1060 : 1 : _r = maybe_build_call_expr_loc (loc, POPCOUNT, type, 1, res_op0);
1061 : 1 : if (!_r)
1062 : 0 : goto next_after_fail270;
1063 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 146, __FILE__, __LINE__, true);
1064 : 1 : return _r;
1065 : : }
1066 : : next_after_fail270:;
1067 : : }
1068 : : }
1069 : : return NULL_TREE;
1070 : : }
1071 : :
1072 : : tree
1073 : 1 : generic_simplify_39 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1074 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1075 : : {
1076 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1077 : 1 : if (INTEGRAL_TYPE_P (type)
1078 : : )
1079 : : {
1080 : 1 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail276;
1081 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail276;
1082 : 1 : {
1083 : 1 : tree res_op0;
1084 : 1 : res_op0 = unshare_expr (captures[1]);
1085 : 1 : tree res_op1;
1086 : 1 : {
1087 : 1 : tree _o1[2], _r1;
1088 : 1 : _o1[0] = captures[4];
1089 : 1 : _o1[1] = captures[1];
1090 : 1 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1091 : 1 : res_op1 = _r1;
1092 : : }
1093 : 1 : tree _r;
1094 : 1 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
1095 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 152, __FILE__, __LINE__, true);
1096 : 1 : return _r;
1097 : : }
1098 : : next_after_fail276:;
1099 : : }
1100 : : return NULL_TREE;
1101 : : }
1102 : :
1103 : : tree
1104 : 1 : generic_simplify_43 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1105 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1106 : : {
1107 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1108 : 1 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
1109 : 1 : && !TYPE_SATURATING (type) && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
1110 : 1 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[0]))
1111 : 2 : && !TYPE_SATURATING (TREE_TYPE (captures[0]))
1112 : : )
1113 : : {
1114 : 1 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail280;
1115 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail280;
1116 : 1 : {
1117 : 1 : tree res_op0;
1118 : 1 : {
1119 : 1 : tree _o1[1], _r1;
1120 : 1 : {
1121 : 1 : tree _o2[2], _r2;
1122 : 1 : _o2[0] = captures[1];
1123 : 1 : _o2[1] = captures[2];
1124 : 1 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1125 : 1 : _o1[0] = _r2;
1126 : : }
1127 : 1 : if (TREE_TYPE (_o1[0]) != type)
1128 : : {
1129 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1130 : : }
1131 : : else
1132 : : _r1 = _o1[0];
1133 : 1 : res_op0 = _r1;
1134 : : }
1135 : 1 : tree _r;
1136 : 1 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1137 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 156, __FILE__, __LINE__, true);
1138 : 1 : return _r;
1139 : : }
1140 : : next_after_fail280:;
1141 : : }
1142 : : return NULL_TREE;
1143 : : }
1144 : :
1145 : : tree
1146 : 173 : generic_simplify_49 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1147 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1148 : : {
1149 : 173 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1150 : 173 : if (!TYPE_SATURATING (type)
1151 : : )
1152 : : {
1153 : 173 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1154 : 346 : && !FIXED_POINT_TYPE_P (type)
1155 : : )
1156 : : {
1157 : 0 : if (!ANY_INTEGRAL_TYPE_P (type)
1158 : 173 : || TYPE_OVERFLOW_WRAPS (type)
1159 : : )
1160 : : {
1161 : 97 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail286;
1162 : 97 : {
1163 : 97 : tree res_op0;
1164 : 97 : {
1165 : 97 : tree _o1[1], _r1;
1166 : 97 : _o1[0] = captures[1];
1167 : 97 : if (TREE_TYPE (_o1[0]) != type)
1168 : : {
1169 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
1170 : : }
1171 : : else
1172 : : _r1 = _o1[0];
1173 : 97 : res_op0 = _r1;
1174 : : }
1175 : 97 : tree _r;
1176 : 97 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
1177 : 97 : if (TREE_SIDE_EFFECTS (captures[0]))
1178 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1179 : 97 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 161, __FILE__, __LINE__, true);
1180 : 97 : return _r;
1181 : : }
1182 : 0 : next_after_fail286:;
1183 : : }
1184 : : else
1185 : : {
1186 : 76 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail287;
1187 : 76 : {
1188 : 76 : tree res_op0;
1189 : 76 : {
1190 : 76 : tree _o1[1], _r1;
1191 : 76 : _o1[0] = captures[1];
1192 : 76 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1193 : 76 : res_op0 = _r1;
1194 : : }
1195 : 76 : tree _r;
1196 : 76 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
1197 : 76 : if (TREE_SIDE_EFFECTS (captures[0]))
1198 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1199 : 76 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 162, __FILE__, __LINE__, true);
1200 : 76 : return _r;
1201 : : }
1202 : 0 : next_after_fail287:;
1203 : : }
1204 : : }
1205 : : }
1206 : : return NULL_TREE;
1207 : : }
1208 : :
1209 : : tree
1210 : 9 : generic_simplify_58 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1211 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1212 : : {
1213 : 9 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1214 : 9 : if (INTEGRAL_TYPE_P (type)
1215 : 9 : && (
1216 : :
1217 : 9 : || !TREE_SIDE_EFFECTS (captures[1]))
1218 : : )
1219 : : {
1220 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail301;
1221 : 2 : {
1222 : 2 : tree res_op0;
1223 : 2 : {
1224 : 2 : tree _o1[1], _r1;
1225 : 2 : _o1[0] = captures[2];
1226 : 2 : if (TREE_TYPE (_o1[0]) != boolean_type_node)
1227 : : {
1228 : 2 : _r1 = fold_build1_loc (loc, NOP_EXPR, boolean_type_node, _o1[0]);
1229 : : }
1230 : : else
1231 : : _r1 = _o1[0];
1232 : 2 : res_op0 = _r1;
1233 : : }
1234 : 2 : tree res_op1;
1235 : 2 : res_op1 = captures[1];
1236 : 2 : tree res_op2;
1237 : 2 : res_op2 = captures[0];
1238 : 2 : tree _r;
1239 : 2 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
1240 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 176, __FILE__, __LINE__, true);
1241 : 2 : return _r;
1242 : : }
1243 : 0 : next_after_fail301:;
1244 : : }
1245 : : return NULL_TREE;
1246 : : }
1247 : :
1248 : : tree
1249 : 0 : generic_simplify_62 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1250 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1251 : : {
1252 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1253 : 0 : if (TREE_CODE (captures[1]) == SSA_NAME && num_imm_uses (captures[1]) == 2
1254 : : )
1255 : : {
1256 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail305;
1257 : 0 : {
1258 : 0 : if (! tree_invariant_p (captures[2])) goto next_after_fail305;
1259 : 0 : tree res_op0;
1260 : 0 : {
1261 : 0 : tree _o1[2], _r1;
1262 : 0 : {
1263 : 0 : tree _o2[3], _r2;
1264 : 0 : _o2[0] = unshare_expr (captures[2]);
1265 : 0 : _o2[1] = captures[2];
1266 : 0 : _o2[2] = captures[4];
1267 : 0 : _r2 = fold_build3_loc (loc, VEC_PERM_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1], _o2[2]);
1268 : 0 : _o1[0] = _r2;
1269 : : }
1270 : 0 : _o1[1] = captures[3];
1271 : 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1272 : 0 : res_op0 = _r1;
1273 : : }
1274 : 0 : tree res_op1;
1275 : 0 : res_op1 = captures[5];
1276 : 0 : tree _r;
1277 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
1278 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 180, __FILE__, __LINE__, true);
1279 : 0 : return _r;
1280 : : }
1281 : : next_after_fail305:;
1282 : : }
1283 : : return NULL_TREE;
1284 : : }
1285 : :
1286 : : tree
1287 : 16 : generic_simplify_67 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1288 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1289 : : {
1290 : 16 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1291 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail310;
1292 : 16 : {
1293 : 16 : tree res_op0;
1294 : 16 : res_op0 = captures[0];
1295 : 16 : tree res_op1;
1296 : 16 : res_op1 = captures[1];
1297 : 16 : tree _r;
1298 : 16 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
1299 : 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 185, __FILE__, __LINE__, true);
1300 : : return _r;
1301 : : }
1302 : 0 : next_after_fail310:;
1303 : 0 : return NULL_TREE;
1304 : : }
1305 : :
1306 : : tree
1307 : 29 : generic_simplify_73 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1308 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1309 : : const enum tree_code ARG_UNUSED (bit_op))
1310 : : {
1311 : 29 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1312 : 29 : if (bit_op == BIT_AND_EXPR
1313 : : )
1314 : : {
1315 : 9 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail316;
1316 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail316;
1317 : 9 : {
1318 : 9 : tree _r;
1319 : 9 : _r = build_zero_cst (type);
1320 : 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 190, __FILE__, __LINE__, true);
1321 : 9 : return _r;
1322 : : }
1323 : : next_after_fail316:;
1324 : : }
1325 : : else
1326 : : {
1327 : 20 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail317;
1328 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail317;
1329 : 20 : {
1330 : 20 : tree _r;
1331 : 20 : _r = build_minus_one_cst (type);
1332 : 20 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 191, __FILE__, __LINE__, true);
1333 : 20 : return _r;
1334 : : }
1335 : : next_after_fail317:;
1336 : : }
1337 : : return NULL_TREE;
1338 : : }
1339 : :
1340 : : tree
1341 : 0 : generic_simplify_83 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1342 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1343 : : {
1344 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1345 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail330;
1346 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail330;
1347 : 0 : {
1348 : 0 : tree res_op0;
1349 : 0 : res_op0 = captures[0];
1350 : 0 : tree res_op1;
1351 : 0 : res_op1 = captures[3];
1352 : 0 : tree _r;
1353 : 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
1354 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 198, __FILE__, __LINE__, true);
1355 : : return _r;
1356 : : }
1357 : : next_after_fail330:;
1358 : : return NULL_TREE;
1359 : : }
1360 : :
1361 : : tree
1362 : 0 : generic_simplify_93 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1363 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1364 : : {
1365 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1366 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail340;
1367 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail340;
1368 : 0 : {
1369 : 0 : tree _r;
1370 : 0 : _r = captures[0];
1371 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 202, __FILE__, __LINE__, true);
1372 : : return _r;
1373 : : }
1374 : : next_after_fail340:;
1375 : : return NULL_TREE;
1376 : : }
1377 : :
1378 : : tree
1379 : 0 : generic_simplify_98 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1380 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1381 : : const enum tree_code ARG_UNUSED (op))
1382 : : {
1383 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1384 : 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
1385 : 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
1386 : : )
1387 : : {
1388 : 0 : if (single_use (captures[4]) && single_use (captures[5])
1389 : : )
1390 : : {
1391 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail346;
1392 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail346;
1393 : 0 : {
1394 : 0 : tree res_op0;
1395 : 0 : res_op0 = captures[0];
1396 : 0 : tree res_op1;
1397 : 0 : {
1398 : 0 : tree _o1[1], _r1;
1399 : 0 : _o1[0] = captures[6];
1400 : 0 : if (TREE_TYPE (_o1[0]) != type)
1401 : : {
1402 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1403 : : }
1404 : : else
1405 : : _r1 = _o1[0];
1406 : 0 : res_op1 = _r1;
1407 : : }
1408 : 0 : tree _r;
1409 : 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1410 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 208, __FILE__, __LINE__, true);
1411 : 0 : return _r;
1412 : : }
1413 : : next_after_fail346:;
1414 : : }
1415 : : else
1416 : : {
1417 : : if (single_use (captures[0]) && single_use (captures[1])
1418 : : )
1419 : : {
1420 : : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail347;
1421 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail347;
1422 : : {
1423 : : tree res_op0;
1424 : : {
1425 : : tree _o1[1], _r1;
1426 : : _o1[0] = captures[3];
1427 : : if (TREE_TYPE (_o1[0]) != type)
1428 : : {
1429 : : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1430 : : }
1431 : : else
1432 : : _r1 = _o1[0];
1433 : : res_op0 = _r1;
1434 : : }
1435 : : tree res_op1;
1436 : : res_op1 = captures[4];
1437 : : tree _r;
1438 : : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1439 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 209, __FILE__, __LINE__, true);
1440 : : return _r;
1441 : : }
1442 : : next_after_fail347:;
1443 : : }
1444 : : }
1445 : : }
1446 : : return NULL_TREE;
1447 : : }
1448 : :
1449 : : tree
1450 : 0 : generic_simplify_110 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1451 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1452 : : const enum tree_code ARG_UNUSED (bitop),
1453 : : const enum tree_code ARG_UNUSED (rbitop))
1454 : : {
1455 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1456 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail361;
1457 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail361;
1458 : 0 : {
1459 : 0 : tree res_op0;
1460 : 0 : res_op0 = captures[0];
1461 : 0 : tree res_op1;
1462 : 0 : res_op1 = captures[2];
1463 : 0 : tree _r;
1464 : 0 : _r = fold_build2_loc (loc, bitop, type, res_op0, res_op1);
1465 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 214, __FILE__, __LINE__, true);
1466 : : return _r;
1467 : : }
1468 : : next_after_fail361:;
1469 : : return NULL_TREE;
1470 : : }
1471 : :
1472 : : tree
1473 : 659 : generic_simplify_117 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1474 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1475 : : const enum tree_code ARG_UNUSED (bitop))
1476 : : {
1477 : 659 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1478 : 659 : if (!CONSTANT_CLASS_P (captures[0])
1479 : : )
1480 : : {
1481 : 659 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail369;
1482 : 659 : {
1483 : 659 : tree res_op0;
1484 : 659 : res_op0 = captures[0];
1485 : 659 : tree res_op1;
1486 : 659 : {
1487 : 659 : tree _o1[2], _r1;
1488 : 659 : _o1[0] = captures[1];
1489 : 659 : _o1[1] = captures[2];
1490 : 659 : _r1 = fold_build2_loc (loc, bitop, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1491 : 659 : if (EXPR_P (_r1))
1492 : 0 : goto next_after_fail369;
1493 : 659 : res_op1 = _r1;
1494 : : }
1495 : 659 : tree _r;
1496 : 659 : _r = fold_build2_loc (loc, bitop, type, res_op0, res_op1);
1497 : 659 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 221, __FILE__, __LINE__, true);
1498 : 659 : return _r;
1499 : : }
1500 : : next_after_fail369:;
1501 : : }
1502 : : else
1503 : : {
1504 : 0 : {
1505 : 0 : tree cst1 = const_binop (bitop, type, captures[0], captures[2]);
1506 : 0 : if (cst1
1507 : : )
1508 : : {
1509 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail370;
1510 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail370;
1511 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail370;
1512 : 0 : {
1513 : 0 : tree res_op0;
1514 : 0 : res_op0 = captures[1];
1515 : 0 : tree res_op1;
1516 : 0 : res_op1 = cst1;
1517 : 0 : tree _r;
1518 : 0 : _r = fold_build2_loc (loc, bitop, type, res_op0, res_op1);
1519 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 222, __FILE__, __LINE__, true);
1520 : 0 : return _r;
1521 : : }
1522 : : next_after_fail370:;
1523 : : }
1524 : : else
1525 : : {
1526 : 0 : {
1527 : 0 : tree cst2 = const_binop (bitop, type, captures[1], captures[2]);
1528 : 0 : if (cst2
1529 : : )
1530 : : {
1531 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail371;
1532 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail371;
1533 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail371;
1534 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail371;
1535 : 0 : {
1536 : 0 : tree res_op0;
1537 : 0 : res_op0 = captures[0];
1538 : 0 : tree res_op1;
1539 : 0 : res_op1 = cst2;
1540 : 0 : tree _r;
1541 : 0 : _r = fold_build2_loc (loc, bitop, type, res_op0, res_op1);
1542 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 223, __FILE__, __LINE__, true);
1543 : 0 : return _r;
1544 : : }
1545 : : next_after_fail371:;
1546 : : }
1547 : : }
1548 : : }
1549 : : }
1550 : : }
1551 : : return NULL_TREE;
1552 : : }
1553 : :
1554 : : tree
1555 : 0 : generic_simplify_132 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1556 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1557 : : {
1558 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1559 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail408;
1560 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail408;
1561 : 0 : {
1562 : 0 : tree _r;
1563 : 0 : _r = constant_boolean_node (true, type);
1564 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1565 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1566 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 252, __FILE__, __LINE__, true);
1567 : : return _r;
1568 : : }
1569 : : next_after_fail408:;
1570 : : return NULL_TREE;
1571 : : }
1572 : :
1573 : : tree
1574 : 121 : generic_simplify_136 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1575 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1576 : : const enum tree_code ARG_UNUSED (code2),
1577 : : const enum tree_code ARG_UNUSED (code1))
1578 : : {
1579 : 121 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1580 : 121 : if ((TREE_CODE (captures[2]) == INTEGER_CST
1581 : 97 : && TREE_CODE (captures[5]) == INTEGER_CST)
1582 : 121 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1583 : 1 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1584 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
1585 : 24 : && bitwise_equal_p (captures[2], captures[5]))
1586 : : )
1587 : : {
1588 : 97 : {
1589 : 97 : bool one_before = false;
1590 : 97 : bool one_after = false;
1591 : 97 : int cmp = 0;
1592 : 97 : bool allbits = true;
1593 : 97 : if (TREE_CODE (captures[2]) == INTEGER_CST
1594 : 97 : && TREE_CODE (captures[5]) == INTEGER_CST)
1595 : : {
1596 : 97 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
1597 : 97 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
1598 : 97 : auto t2 = wi::to_wide (captures[5]);
1599 : 97 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
1600 : 97 : if (cmp < 0
1601 : 97 : && t1 == t2 - 1)
1602 : : one_before = true;
1603 : 97 : if (cmp > 0
1604 : 97 : && t1 == t2 + 1)
1605 : : one_after = true;
1606 : : }
1607 : 97 : bool val;
1608 : 97 : switch (code2)
1609 : : {
1610 : 88 : case EQ_EXPR: val = (cmp == 0); break;
1611 : 0 : case NE_EXPR: val = (cmp != 0); break;
1612 : 0 : case LT_EXPR: val = (cmp < 0); break;
1613 : 9 : case GT_EXPR: val = (cmp > 0); break;
1614 : 0 : case LE_EXPR: val = (cmp <= 0); break;
1615 : 0 : case GE_EXPR: val = (cmp >= 0); break;
1616 : 0 : default: gcc_unreachable ();
1617 : : }
1618 : 97 : if (code1 == EQ_EXPR && val
1619 : : )
1620 : : {
1621 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail419;
1622 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail419;
1623 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail419;
1624 : 0 : {
1625 : 0 : tree _r;
1626 : 0 : _r = captures[3];
1627 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 236, __FILE__, __LINE__, true);
1628 : 0 : return _r;
1629 : : }
1630 : : next_after_fail419:;
1631 : : }
1632 : : else
1633 : : {
1634 : 97 : if (code1 == NE_EXPR && val && allbits
1635 : : )
1636 : : {
1637 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail420;
1638 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail420;
1639 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail420;
1640 : 0 : {
1641 : 0 : tree _r;
1642 : 0 : _r = constant_boolean_node (true, type);
1643 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
1644 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
1645 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 237, __FILE__, __LINE__, true);
1646 : 0 : return _r;
1647 : : }
1648 : : next_after_fail420:;
1649 : : }
1650 : : else
1651 : : {
1652 : 97 : if (code1 == NE_EXPR && !val && allbits
1653 : : )
1654 : : {
1655 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail421;
1656 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail421;
1657 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail421;
1658 : 0 : {
1659 : 0 : tree _r;
1660 : 0 : _r = captures[0];
1661 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
1662 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
1663 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 238, __FILE__, __LINE__, true);
1664 : 0 : return _r;
1665 : : }
1666 : : next_after_fail421:;
1667 : : }
1668 : : else
1669 : : {
1670 : 97 : if (code1 == EQ_EXPR
1671 : 97 : && code2 == GT_EXPR
1672 : 9 : && cmp == 0
1673 : 9 : && allbits
1674 : 97 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1675 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
1676 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1677 : : )
1678 : : {
1679 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail422;
1680 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail422;
1681 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail422;
1682 : 0 : {
1683 : 0 : tree res_op0;
1684 : 0 : res_op0 = captures[4];
1685 : 0 : tree res_op1;
1686 : 0 : res_op1 = captures[5];
1687 : 0 : tree _r;
1688 : 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1689 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 239, __FILE__, __LINE__, true);
1690 : 0 : return _r;
1691 : : }
1692 : : next_after_fail422:;
1693 : : }
1694 : : else
1695 : : {
1696 : 97 : if (code1 == EQ_EXPR
1697 : 97 : && code2 == LT_EXPR
1698 : 0 : && cmp == 0
1699 : 0 : && allbits
1700 : 97 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1701 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
1702 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1703 : : )
1704 : : {
1705 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail423;
1706 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail423;
1707 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail423;
1708 : 0 : {
1709 : 0 : tree res_op0;
1710 : 0 : res_op0 = captures[4];
1711 : 0 : tree res_op1;
1712 : 0 : res_op1 = captures[5];
1713 : 0 : tree _r;
1714 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1715 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 240, __FILE__, __LINE__, true);
1716 : 0 : return _r;
1717 : : }
1718 : : next_after_fail423:;
1719 : : }
1720 : : else
1721 : : {
1722 : 97 : if (code1 == EQ_EXPR
1723 : 97 : && code2 == GE_EXPR
1724 : : && one_before
1725 : 0 : && allbits
1726 : 97 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1727 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
1728 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1729 : : )
1730 : : {
1731 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail424;
1732 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail424;
1733 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail424;
1734 : 0 : {
1735 : 0 : tree res_op0;
1736 : 0 : res_op0 = captures[4];
1737 : 0 : tree res_op1;
1738 : 0 : {
1739 : 0 : tree _o1[1], _r1;
1740 : 0 : _o1[0] = captures[2];
1741 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1742 : : {
1743 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1744 : : }
1745 : : else
1746 : : _r1 = _o1[0];
1747 : 0 : res_op1 = _r1;
1748 : : }
1749 : 0 : tree _r;
1750 : 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1751 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 241, __FILE__, __LINE__, true);
1752 : 0 : return _r;
1753 : : }
1754 : : next_after_fail424:;
1755 : : }
1756 : : else
1757 : : {
1758 : 97 : if (code1 == EQ_EXPR
1759 : 97 : && code2 == LE_EXPR
1760 : : && one_after
1761 : 0 : && allbits
1762 : 97 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1763 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
1764 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1765 : : )
1766 : : {
1767 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail425;
1768 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail425;
1769 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail425;
1770 : 0 : {
1771 : 0 : tree res_op0;
1772 : 0 : res_op0 = captures[4];
1773 : 0 : tree res_op1;
1774 : 0 : {
1775 : 0 : tree _o1[1], _r1;
1776 : 0 : _o1[0] = captures[2];
1777 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1778 : : {
1779 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1780 : : }
1781 : : else
1782 : : _r1 = _o1[0];
1783 : 0 : res_op1 = _r1;
1784 : : }
1785 : 0 : tree _r;
1786 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1787 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 242, __FILE__, __LINE__, true);
1788 : 0 : return _r;
1789 : : }
1790 : : next_after_fail425:;
1791 : : }
1792 : : }
1793 : : }
1794 : : }
1795 : : }
1796 : : }
1797 : : }
1798 : : }
1799 : : }
1800 : : return NULL_TREE;
1801 : : }
1802 : :
1803 : : tree
1804 : 4 : generic_simplify_173 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1805 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1806 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
1807 : : {
1808 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1809 : 4 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
1810 : : )
1811 : : {
1812 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail465;
1813 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail465;
1814 : 0 : {
1815 : 0 : tree res_op0;
1816 : 0 : res_op0 = captures[0];
1817 : 0 : tree _r;
1818 : 0 : _r = fold_build1_loc (loc, ABS_EXPR, type, res_op0);
1819 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 284, __FILE__, __LINE__, true);
1820 : 0 : return _r;
1821 : : }
1822 : : next_after_fail465:;
1823 : : }
1824 : : return NULL_TREE;
1825 : : }
1826 : :
1827 : : tree
1828 : 0 : generic_simplify_180 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1829 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1830 : : {
1831 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1832 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail472;
1833 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail472;
1834 : 0 : {
1835 : 0 : tree _r;
1836 : 0 : _r = build_zero_cst (type);
1837 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 289, __FILE__, __LINE__, true);
1838 : : return _r;
1839 : : }
1840 : : next_after_fail472:;
1841 : : return NULL_TREE;
1842 : : }
1843 : :
1844 : : tree
1845 : 11 : generic_simplify_186 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1846 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1847 : : {
1848 : 11 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1849 : 11 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1850 : 11 : && wi::ltu_p (wi::to_widest (captures[1]), TYPE_PRECISION (type))
1851 : : )
1852 : : {
1853 : 11 : {
1854 : 11 : unsigned int shift = tree_to_uhwi (captures[1]);
1855 : 11 : unsigned int prec = TYPE_PRECISION (type);
1856 : 11 : if ((prec <= TYPE_PRECISION (TREE_TYPE (captures[2])) + shift
1857 : 0 : || tree_int_cst_sgn (captures[2]) >= 0)
1858 : 22 : && wi::to_wide (captures[3]) == wi::set_bit_in_zero (shift, prec)
1859 : : )
1860 : : {
1861 : 3 : {
1862 : 3 : auto mask = wide_int::from (wi::to_wide (captures[2]), prec, UNSIGNED);
1863 : 3 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail480;
1864 : 3 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail480;
1865 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail480;
1866 : 3 : {
1867 : 3 : tree res_op0;
1868 : 3 : {
1869 : 3 : tree _o1[1], _r1;
1870 : 3 : _o1[0] = captures[0];
1871 : 3 : if (TREE_TYPE (_o1[0]) != type)
1872 : : {
1873 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1874 : : }
1875 : : else
1876 : : _r1 = _o1[0];
1877 : 3 : res_op0 = _r1;
1878 : : }
1879 : 3 : tree res_op1;
1880 : 3 : res_op1 = wide_int_to_tree (type, mask << shift);
1881 : 3 : tree _r;
1882 : 3 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
1883 : 3 : if (TREE_SIDE_EFFECTS (captures[3]))
1884 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
1885 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 294, __FILE__, __LINE__, true);
1886 : 3 : return _r;
1887 : : }
1888 : 0 : next_after_fail480:;
1889 : 3 : }
1890 : : }
1891 : : }
1892 : : }
1893 : : return NULL_TREE;
1894 : : }
1895 : :
1896 : : tree
1897 : 0 : generic_simplify_200 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1898 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1899 : : const enum tree_code ARG_UNUSED (op))
1900 : : {
1901 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1902 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail495;
1903 : 0 : {
1904 : 0 : tree _r;
1905 : 0 : _r = constant_boolean_node (op == NE_EXPR ? true : false, type);
1906 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
1907 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1908 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 309, __FILE__, __LINE__, true);
1909 : : return _r;
1910 : : }
1911 : 0 : next_after_fail495:;
1912 : 0 : return NULL_TREE;
1913 : : }
1914 : :
1915 : : tree
1916 : 1709803 : generic_simplify_207 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1917 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1918 : : const enum tree_code ARG_UNUSED (cmp))
1919 : : {
1920 : 1709803 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1921 : 3419606 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1922 : 1709803 : && integer_nonzerop (captures[2])
1923 : 1708021 : && !TREE_OVERFLOW (captures[2])
1924 : 3417824 : && !TREE_OVERFLOW (captures[3])
1925 : : )
1926 : : {
1927 : 1708021 : {
1928 : 1708021 : tree lo, hi; bool neg_overflow;
1929 : 1708021 : enum tree_code code = fold_div_compare (cmp, captures[2], captures[3], &lo, &hi,
1930 : : &neg_overflow);
1931 : 1708021 : if (code == LT_EXPR || code == GE_EXPR
1932 : : )
1933 : : {
1934 : 41525 : if (TREE_OVERFLOW (lo)
1935 : : )
1936 : : {
1937 : 7547 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail505;
1938 : 7547 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail505;
1939 : 7547 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail505;
1940 : 7547 : {
1941 : 7547 : tree _r;
1942 : 7547 : _r = build_int_cst (type, (code == LT_EXPR) ^ neg_overflow);
1943 : 7547 : if (TREE_SIDE_EFFECTS (captures[1]))
1944 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1945 : 7547 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 318, __FILE__, __LINE__, true);
1946 : 1708019 : return _r;
1947 : : }
1948 : 2 : next_after_fail505:;
1949 : : }
1950 : : else
1951 : : {
1952 : 33978 : if (code == LT_EXPR
1953 : : )
1954 : : {
1955 : 719 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail506;
1956 : 719 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail506;
1957 : 719 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail506;
1958 : 719 : {
1959 : 719 : tree res_op0;
1960 : 719 : res_op0 = captures[1];
1961 : 719 : tree res_op1;
1962 : 719 : res_op1 = lo;
1963 : 719 : tree _r;
1964 : 719 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
1965 : 719 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 319, __FILE__, __LINE__, true);
1966 : 719 : return _r;
1967 : : }
1968 : 2 : next_after_fail506:;
1969 : : }
1970 : : else
1971 : : {
1972 : 33259 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail507;
1973 : 33259 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail507;
1974 : 33259 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail507;
1975 : 33259 : {
1976 : 33259 : tree res_op0;
1977 : 33259 : res_op0 = captures[1];
1978 : 33259 : tree res_op1;
1979 : 33259 : res_op1 = lo;
1980 : 33259 : tree _r;
1981 : 33259 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1982 : 33259 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 320, __FILE__, __LINE__, true);
1983 : 33259 : return _r;
1984 : : }
1985 : 2 : next_after_fail507:;
1986 : : }
1987 : : }
1988 : : }
1989 : : else
1990 : : {
1991 : 1666496 : if (code == LE_EXPR || code == GT_EXPR
1992 : : )
1993 : : {
1994 : 1663419 : if (TREE_OVERFLOW (hi)
1995 : : )
1996 : : {
1997 : 525544 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail508;
1998 : 525544 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail508;
1999 : 525544 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail508;
2000 : 525544 : {
2001 : 525544 : tree _r;
2002 : 525544 : _r = build_int_cst (type, (code == LE_EXPR) ^ neg_overflow);
2003 : 525544 : if (TREE_SIDE_EFFECTS (captures[1]))
2004 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2005 : 525544 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 321, __FILE__, __LINE__, true);
2006 : 525544 : return _r;
2007 : : }
2008 : 2 : next_after_fail508:;
2009 : : }
2010 : : else
2011 : : {
2012 : 1137875 : if (code == LE_EXPR
2013 : : )
2014 : : {
2015 : 696 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail509;
2016 : 696 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail509;
2017 : 696 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail509;
2018 : 696 : {
2019 : 696 : tree res_op0;
2020 : 696 : res_op0 = captures[1];
2021 : 696 : tree res_op1;
2022 : 696 : res_op1 = hi;
2023 : 696 : tree _r;
2024 : 696 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
2025 : 696 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 322, __FILE__, __LINE__, true);
2026 : 696 : return _r;
2027 : : }
2028 : 2 : next_after_fail509:;
2029 : : }
2030 : : else
2031 : : {
2032 : 1137179 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail510;
2033 : 1137179 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail510;
2034 : 1137179 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail510;
2035 : 1137179 : {
2036 : 1137179 : tree res_op0;
2037 : 1137179 : res_op0 = captures[1];
2038 : 1137179 : tree res_op1;
2039 : 1137179 : res_op1 = hi;
2040 : 1137179 : tree _r;
2041 : 1137179 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2042 : 1137179 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 323, __FILE__, __LINE__, true);
2043 : 1137179 : return _r;
2044 : : }
2045 : 2 : next_after_fail510:;
2046 : : }
2047 : : }
2048 : : }
2049 : : else
2050 : : {
2051 : 3077 : if (!lo && !hi
2052 : : )
2053 : : {
2054 : 40 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail511;
2055 : 40 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail511;
2056 : 40 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail511;
2057 : 40 : {
2058 : 40 : tree _r;
2059 : 40 : _r = build_int_cst (type, code == NE_EXPR);
2060 : 40 : if (TREE_SIDE_EFFECTS (captures[1]))
2061 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2062 : 40 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 324, __FILE__, __LINE__, true);
2063 : 40 : return _r;
2064 : : }
2065 : 2 : next_after_fail511:;
2066 : : }
2067 : : else
2068 : : {
2069 : 3037 : if (code == EQ_EXPR && !hi
2070 : : )
2071 : : {
2072 : 12 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail512;
2073 : 12 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail512;
2074 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail512;
2075 : 12 : {
2076 : 12 : tree res_op0;
2077 : 12 : res_op0 = captures[1];
2078 : 12 : tree res_op1;
2079 : 12 : res_op1 = lo;
2080 : 12 : tree _r;
2081 : 12 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
2082 : 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 325, __FILE__, __LINE__, true);
2083 : 12 : return _r;
2084 : : }
2085 : 2 : next_after_fail512:;
2086 : : }
2087 : : else
2088 : : {
2089 : 922 : if (code == EQ_EXPR && !lo
2090 : : )
2091 : : {
2092 : 11 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail513;
2093 : 11 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail513;
2094 : 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail513;
2095 : 11 : {
2096 : 11 : tree res_op0;
2097 : 11 : res_op0 = captures[1];
2098 : 11 : tree res_op1;
2099 : 11 : res_op1 = hi;
2100 : 11 : tree _r;
2101 : 11 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
2102 : 11 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 326, __FILE__, __LINE__, true);
2103 : 11 : return _r;
2104 : : }
2105 : 2 : next_after_fail513:;
2106 : : }
2107 : : else
2108 : : {
2109 : 3014 : if (code == NE_EXPR && !hi
2110 : : )
2111 : : {
2112 : 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail514;
2113 : 4 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail514;
2114 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail514;
2115 : 4 : {
2116 : 4 : tree res_op0;
2117 : 4 : res_op0 = captures[1];
2118 : 4 : tree res_op1;
2119 : 4 : res_op1 = lo;
2120 : 4 : tree _r;
2121 : 4 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
2122 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 327, __FILE__, __LINE__, true);
2123 : 4 : return _r;
2124 : : }
2125 : 2 : next_after_fail514:;
2126 : : }
2127 : : else
2128 : : {
2129 : 2099 : if (code == NE_EXPR && !lo
2130 : : )
2131 : : {
2132 : 18 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail515;
2133 : 18 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail515;
2134 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail515;
2135 : 18 : {
2136 : 18 : tree res_op0;
2137 : 18 : res_op0 = captures[1];
2138 : 18 : tree res_op1;
2139 : 18 : res_op1 = hi;
2140 : 18 : tree _r;
2141 : 18 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2142 : 18 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 328, __FILE__, __LINE__, true);
2143 : 18 : return _r;
2144 : : }
2145 : 2 : next_after_fail515:;
2146 : : }
2147 : : else
2148 : : {
2149 : 2992 : if (1
2150 : : )
2151 : : {
2152 : 2992 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail516;
2153 : 2990 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail516;
2154 : 2990 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail516;
2155 : 2990 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail516;
2156 : 2990 : {
2157 : 2990 : tree _r;
2158 : 2990 : _r = build_range_check (UNKNOWN_LOCATION, type, captures[1], code == EQ_EXPR,
2159 : : lo, hi);
2160 : 2990 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 329, __FILE__, __LINE__, true);
2161 : 2990 : return _r;
2162 : : }
2163 : 2 : next_after_fail516:;
2164 : : }
2165 : : else
2166 : : {
2167 : : {
2168 : : tree etype = range_check_type (TREE_TYPE (captures[1]));
2169 : : if (etype)
2170 : : {
2171 : : hi = fold_convert (etype, hi);
2172 : : lo = fold_convert (etype, lo);
2173 : : hi = const_binop (MINUS_EXPR, etype, hi, lo);
2174 : : }
2175 : : if (etype && hi && !TREE_OVERFLOW (hi)
2176 : : )
2177 : : {
2178 : : if (code == EQ_EXPR
2179 : : )
2180 : : {
2181 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail517;
2182 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail517;
2183 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail517;
2184 : : {
2185 : : tree res_op0;
2186 : : {
2187 : : tree _o1[2], _r1;
2188 : : {
2189 : : tree _o2[1], _r2;
2190 : : _o2[0] = captures[1];
2191 : : if (TREE_TYPE (_o2[0]) != etype)
2192 : : {
2193 : : _r2 = fold_build1_loc (loc, NOP_EXPR, etype, _o2[0]);
2194 : : }
2195 : : else
2196 : : _r2 = _o2[0];
2197 : : _o1[0] = _r2;
2198 : : }
2199 : : _o1[1] = lo;
2200 : : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2201 : : res_op0 = _r1;
2202 : : }
2203 : : tree res_op1;
2204 : : res_op1 = hi;
2205 : : tree _r;
2206 : : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
2207 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 330, __FILE__, __LINE__, true);
2208 : : return _r;
2209 : : }
2210 : : next_after_fail517:;
2211 : : }
2212 : : else
2213 : : {
2214 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail518;
2215 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail518;
2216 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail518;
2217 : : {
2218 : : tree res_op0;
2219 : : {
2220 : : tree _o1[2], _r1;
2221 : : {
2222 : : tree _o2[1], _r2;
2223 : : _o2[0] = captures[1];
2224 : : if (TREE_TYPE (_o2[0]) != etype)
2225 : : {
2226 : : _r2 = fold_build1_loc (loc, NOP_EXPR, etype, _o2[0]);
2227 : : }
2228 : : else
2229 : : _r2 = _o2[0];
2230 : : _o1[0] = _r2;
2231 : : }
2232 : : _o1[1] = lo;
2233 : : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2234 : : res_op0 = _r1;
2235 : : }
2236 : : tree res_op1;
2237 : : res_op1 = hi;
2238 : : tree _r;
2239 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2240 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 331, __FILE__, __LINE__, true);
2241 : : return _r;
2242 : : }
2243 : : next_after_fail518:;
2244 : : }
2245 : : }
2246 : : }
2247 : : }
2248 : : }
2249 : : }
2250 : : }
2251 : : }
2252 : : }
2253 : : }
2254 : : }
2255 : : }
2256 : : }
2257 : : return NULL_TREE;
2258 : : }
2259 : :
2260 : : tree
2261 : 987550 : generic_simplify_260 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2262 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2263 : : const enum tree_code ARG_UNUSED (cmp))
2264 : : {
2265 : 987550 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2266 : 987550 : {
2267 : 987550 : poly_int64 off; tree base;
2268 : 987550 : tree addr = (TREE_CODE (captures[1]) == SSA_NAME
2269 : 987550 : ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[1])) : captures[1]);
2270 : 987550 : if (SSA_NAME_IS_DEFAULT_DEF (captures[0])
2271 : 46099 : && TREE_CODE (SSA_NAME_VAR (captures[0])) == PARM_DECL
2272 : 45908 : && (base = get_base_address (TREE_OPERAND (addr, 0)))
2273 : 45908 : && TREE_CODE (base) == VAR_DECL
2274 : 990746 : && auto_var_in_fn_p (base, current_function_decl)
2275 : : )
2276 : : {
2277 : 0 : if (cmp == NE_EXPR
2278 : : )
2279 : : {
2280 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail642;
2281 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail642;
2282 : 0 : {
2283 : 0 : tree _r;
2284 : 0 : _r = constant_boolean_node (true, type);
2285 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2286 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2287 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 445, __FILE__, __LINE__, true);
2288 : 2 : return _r;
2289 : : }
2290 : 987548 : next_after_fail642:;
2291 : : }
2292 : : else
2293 : : {
2294 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail643;
2295 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail643;
2296 : 0 : {
2297 : 0 : tree _r;
2298 : 0 : _r = constant_boolean_node (false, type);
2299 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2300 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2301 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 446, __FILE__, __LINE__, true);
2302 : 0 : return _r;
2303 : : }
2304 : 987548 : next_after_fail643:;
2305 : : }
2306 : : }
2307 : : else
2308 : : {
2309 : 987550 : if ((base = get_addr_base_and_unit_offset (TREE_OPERAND (addr, 0), &off))
2310 : 985443 : && TREE_CODE (base) == MEM_REF
2311 : 1112214 : && TREE_OPERAND (base, 0) == captures[0]
2312 : : )
2313 : : {
2314 : 2 : {
2315 : 2 : off += mem_ref_offset (base).force_shwi ();
2316 : 2 : if (known_ne (off, 0)
2317 : : )
2318 : : {
2319 : 2 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail644;
2320 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail644;
2321 : 2 : {
2322 : 2 : tree _r;
2323 : 2 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2324 : 2 : if (TREE_SIDE_EFFECTS (captures[0]))
2325 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2326 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 447, __FILE__, __LINE__, true);
2327 : 2 : return _r;
2328 : : }
2329 : 987548 : next_after_fail644:;
2330 : : }
2331 : : else
2332 : : {
2333 : 0 : if (known_eq (off, 0)
2334 : : )
2335 : : {
2336 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail645;
2337 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail645;
2338 : 0 : {
2339 : 0 : tree _r;
2340 : 0 : _r = constant_boolean_node (cmp == EQ_EXPR, type);
2341 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2342 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2343 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 448, __FILE__, __LINE__, true);
2344 : 0 : return _r;
2345 : : }
2346 : 987548 : next_after_fail645:;
2347 : : }
2348 : : }
2349 : : }
2350 : : }
2351 : : }
2352 : : }
2353 : 987548 : return NULL_TREE;
2354 : : }
2355 : :
2356 : : tree
2357 : 99222 : generic_simplify_270 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2358 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2359 : : const enum tree_code ARG_UNUSED (cmp),
2360 : : const enum tree_code ARG_UNUSED (ncmp))
2361 : : {
2362 : 99222 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2363 : 197878 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2364 : 49834 : && type_has_mode_precision_p (TREE_TYPE (captures[1]))
2365 : 49776 : && element_precision (captures[0]) >= element_precision (captures[1])
2366 : 198444 : && wi::only_sign_bit_p (wi::to_wide (captures[2]), element_precision (captures[1]))
2367 : : )
2368 : : {
2369 : 9351 : {
2370 : 9351 : tree stype = signed_type_for (TREE_TYPE (captures[1]));
2371 : 9351 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail655;
2372 : 9351 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail655;
2373 : 9351 : {
2374 : 9351 : tree res_op0;
2375 : 9351 : {
2376 : 9351 : tree _o1[1], _r1;
2377 : 9351 : _o1[0] = captures[1];
2378 : 9351 : if (TREE_TYPE (_o1[0]) != stype)
2379 : : {
2380 : 8687 : _r1 = fold_build1_loc (loc, NOP_EXPR, stype, _o1[0]);
2381 : : }
2382 : : else
2383 : : _r1 = _o1[0];
2384 : 9351 : res_op0 = _r1;
2385 : : }
2386 : 9351 : tree res_op1;
2387 : 9351 : res_op1 = build_zero_cst (stype);
2388 : 9351 : tree _r;
2389 : 9351 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
2390 : 9351 : if (TREE_SIDE_EFFECTS (captures[2]))
2391 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2392 : 9351 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 458, __FILE__, __LINE__, true);
2393 : 9351 : return _r;
2394 : : }
2395 : : next_after_fail655:;
2396 : : }
2397 : : }
2398 : : return NULL_TREE;
2399 : : }
2400 : :
2401 : : tree
2402 : 112503 : generic_simplify_276 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2403 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2404 : : const enum tree_code ARG_UNUSED (cmp))
2405 : : {
2406 : 112503 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2407 : 112503 : {
2408 : 112503 : poly_int64 off0, off1;
2409 : 112503 : tree base0, base1;
2410 : 112503 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[2], base0, base1,
2411 : : off0, off1,
2412 : : 1
2413 : : );
2414 : 112503 : if (equal == 1
2415 : : )
2416 : : {
2417 : 103047 : if (cmp == EQ_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
2418 : : )
2419 : : {
2420 : 7122 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail668;
2421 : 7122 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail668;
2422 : 7122 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail668;
2423 : 7122 : {
2424 : 7122 : tree _r;
2425 : 7122 : _r = constant_boolean_node (known_eq (off0, off1), type);
2426 : 7122 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 461, __FILE__, __LINE__, true);
2427 : 103979 : return _r;
2428 : : }
2429 : 8524 : next_after_fail668:;
2430 : : }
2431 : : else
2432 : : {
2433 : 56765 : if (cmp == NE_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
2434 : : )
2435 : : {
2436 : 56765 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail669;
2437 : 56765 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail669;
2438 : 56765 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail669;
2439 : 56765 : {
2440 : 56765 : tree _r;
2441 : 56765 : _r = constant_boolean_node (known_ne (off0, off1), type);
2442 : 56765 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 462, __FILE__, __LINE__, true);
2443 : 56765 : return _r;
2444 : : }
2445 : 8524 : next_after_fail669:;
2446 : : }
2447 : : else
2448 : : {
2449 : 28288 : if (cmp == LT_EXPR && (known_lt (off0, off1) || known_ge (off0, off1))
2450 : : )
2451 : : {
2452 : 28288 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail670;
2453 : 28288 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail670;
2454 : 28288 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail670;
2455 : 28288 : {
2456 : 28288 : tree _r;
2457 : 28288 : _r = constant_boolean_node (known_lt (off0, off1), type);
2458 : 28288 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 463, __FILE__, __LINE__, true);
2459 : 28288 : return _r;
2460 : : }
2461 : 8524 : next_after_fail670:;
2462 : : }
2463 : : else
2464 : : {
2465 : 206 : if (cmp == LE_EXPR && (known_le (off0, off1) || known_gt (off0, off1))
2466 : : )
2467 : : {
2468 : 206 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail671;
2469 : 206 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail671;
2470 : 206 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail671;
2471 : 206 : {
2472 : 206 : tree _r;
2473 : 206 : _r = constant_boolean_node (known_le (off0, off1), type);
2474 : 206 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 464, __FILE__, __LINE__, true);
2475 : 206 : return _r;
2476 : : }
2477 : 8524 : next_after_fail671:;
2478 : : }
2479 : : else
2480 : : {
2481 : 7051 : if (cmp == GE_EXPR && (known_ge (off0, off1) || known_lt (off0, off1))
2482 : : )
2483 : : {
2484 : 7051 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail672;
2485 : 7051 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail672;
2486 : 7051 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail672;
2487 : 7051 : {
2488 : 7051 : tree _r;
2489 : 7051 : _r = constant_boolean_node (known_ge (off0, off1), type);
2490 : 7051 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 465, __FILE__, __LINE__, true);
2491 : 7051 : return _r;
2492 : : }
2493 : 8524 : next_after_fail672:;
2494 : : }
2495 : : else
2496 : : {
2497 : 3615 : if (cmp == GT_EXPR && (known_gt (off0, off1) || known_le (off0, off1))
2498 : : )
2499 : : {
2500 : 3615 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail673;
2501 : 3615 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail673;
2502 : 3615 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail673;
2503 : 3615 : {
2504 : 3615 : tree _r;
2505 : 3615 : _r = constant_boolean_node (known_gt (off0, off1), type);
2506 : 3615 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 466, __FILE__, __LINE__, true);
2507 : 3615 : return _r;
2508 : : }
2509 : 8524 : next_after_fail673:;
2510 : : }
2511 : : }
2512 : : }
2513 : : }
2514 : : }
2515 : : }
2516 : : }
2517 : : else
2518 : : {
2519 : 9456 : if (equal == 0
2520 : : )
2521 : : {
2522 : 932 : if (cmp == EQ_EXPR
2523 : : )
2524 : : {
2525 : 658 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail674;
2526 : 658 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail674;
2527 : 658 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail674;
2528 : 658 : {
2529 : 658 : tree _r;
2530 : 658 : _r = constant_boolean_node (false, type);
2531 : 658 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 467, __FILE__, __LINE__, true);
2532 : 658 : return _r;
2533 : : }
2534 : 8524 : next_after_fail674:;
2535 : : }
2536 : : else
2537 : : {
2538 : 274 : if (cmp == NE_EXPR
2539 : : )
2540 : : {
2541 : 274 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail675;
2542 : 274 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail675;
2543 : 274 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail675;
2544 : 274 : {
2545 : 274 : tree _r;
2546 : 274 : _r = constant_boolean_node (true, type);
2547 : 274 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 468, __FILE__, __LINE__, true);
2548 : 274 : return _r;
2549 : : }
2550 : 8524 : next_after_fail675:;
2551 : : }
2552 : : }
2553 : : }
2554 : : }
2555 : : }
2556 : 8524 : return NULL_TREE;
2557 : : }
2558 : :
2559 : : tree
2560 : 0 : generic_simplify_289 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2561 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2562 : : const enum tree_code ARG_UNUSED (cmp))
2563 : : {
2564 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2565 : 0 : if (VECTOR_MODE_P (TYPE_MODE (TREE_TYPE (captures[0])))
2566 : 0 : && can_compare_p (cmp == EQ_EXPR ? EQ : NE, TYPE_MODE (TREE_TYPE (captures[0])),
2567 : : ccp_jump)
2568 : : )
2569 : : {
2570 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail707;
2571 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail707;
2572 : 0 : {
2573 : 0 : tree res_op0;
2574 : 0 : res_op0 = captures[0];
2575 : 0 : tree res_op1;
2576 : 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
2577 : 0 : tree _r;
2578 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2579 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 500, __FILE__, __LINE__, true);
2580 : 0 : return _r;
2581 : : }
2582 : : next_after_fail707:;
2583 : : }
2584 : : return NULL_TREE;
2585 : : }
2586 : :
2587 : : tree
2588 : 0 : generic_simplify_293 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2589 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2590 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
2591 : : {
2592 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2593 : 0 : if (REAL_VALUE_NEGATIVE (TREE_REAL_CST (captures[0]))
2594 : : )
2595 : : {
2596 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail712;
2597 : 0 : {
2598 : 0 : tree res_op0;
2599 : 0 : {
2600 : 0 : tree _o1[1], _r1;
2601 : 0 : _o1[0] = captures[0];
2602 : 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2603 : 0 : res_op0 = _r1;
2604 : : }
2605 : 0 : tree res_op1;
2606 : 0 : res_op1 = captures[1];
2607 : 0 : tree _r;
2608 : 0 : _r = maybe_build_call_expr_loc (loc, COPYSIGN_ALL, type, 2, res_op0, res_op1);
2609 : 0 : if (!_r)
2610 : 0 : goto next_after_fail712;
2611 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 505, __FILE__, __LINE__, true);
2612 : 0 : return _r;
2613 : : }
2614 : : next_after_fail712:;
2615 : : }
2616 : : return NULL_TREE;
2617 : : }
2618 : :
2619 : : tree
2620 : 7 : generic_simplify_299 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2621 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2622 : : const enum tree_code ARG_UNUSED (div))
2623 : : {
2624 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2625 : 14 : if ((TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (captures[0]))
2626 : 0 : && (!VECTOR_TYPE_P (type)
2627 : 0 : || target_supports_op_p (type, RSHIFT_EXPR, optab_vector)
2628 : 0 : || target_supports_op_p (type, RSHIFT_EXPR, optab_scalar))
2629 : 7 : && (useless_type_conversion_p (type, TREE_TYPE (captures[2]))
2630 : 0 : || (element_precision (type) >= element_precision (TREE_TYPE (captures[2]))
2631 : 0 : && (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
2632 : 0 : || (element_precision (type)
2633 : 0 : == element_precision (TREE_TYPE (captures[2])))
2634 : 0 : || (INTEGRAL_TYPE_P (type)
2635 : 0 : && (tree_nonzero_bits (captures[0])
2636 : 7 : & wi::mask (element_precision (TREE_TYPE (captures[2])) - 1,
2637 : : true,
2638 : 7 : element_precision (type))) == 0))))
2639 : : )
2640 : : {
2641 : 0 : if (!VECTOR_TYPE_P (type)
2642 : 0 : && useless_type_conversion_p (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
2643 : 0 : && element_precision (TREE_TYPE (captures[1])) < element_precision (type)
2644 : : )
2645 : : {
2646 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail718;
2647 : 0 : {
2648 : 0 : tree res_op0;
2649 : 0 : {
2650 : 0 : tree _o1[2], _r1;
2651 : 0 : _o1[0] = captures[1];
2652 : 0 : _o1[1] = captures[3];
2653 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2654 : 0 : res_op0 = _r1;
2655 : : }
2656 : 0 : tree _r;
2657 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2658 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2659 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2660 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 511, __FILE__, __LINE__, true);
2661 : 0 : return _r;
2662 : : }
2663 : 0 : next_after_fail718:;
2664 : : }
2665 : : else
2666 : : {
2667 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail719;
2668 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail719;
2669 : 0 : {
2670 : 0 : tree res_op0;
2671 : 0 : res_op0 = captures[0];
2672 : 0 : tree res_op1;
2673 : 0 : res_op1 = captures[3];
2674 : 0 : tree _r;
2675 : 0 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
2676 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2677 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2678 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 512, __FILE__, __LINE__, true);
2679 : 0 : return _r;
2680 : : }
2681 : : next_after_fail719:;
2682 : : }
2683 : : }
2684 : : return NULL_TREE;
2685 : : }
2686 : :
2687 : : tree
2688 : 313 : generic_simplify_315 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2689 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2690 : : const enum tree_code ARG_UNUSED (mod))
2691 : : {
2692 : 313 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2693 : 313 : if (!TYPE_UNSIGNED (type)
2694 : : )
2695 : : {
2696 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail737;
2697 : 20 : {
2698 : 20 : tree _r;
2699 : 20 : _r = build_zero_cst (type);
2700 : 20 : if (TREE_SIDE_EFFECTS (captures[0]))
2701 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2702 : 20 : if (TREE_SIDE_EFFECTS (captures[1]))
2703 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2704 : 20 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 528, __FILE__, __LINE__, true);
2705 : 20 : return _r;
2706 : : }
2707 : 0 : next_after_fail737:;
2708 : : }
2709 : : return NULL_TREE;
2710 : : }
2711 : :
2712 : : tree
2713 : 5 : generic_simplify_325 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2714 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2715 : : const combined_fn ARG_UNUSED (SINH),
2716 : : const combined_fn ARG_UNUSED (COSH),
2717 : : const combined_fn ARG_UNUSED (TANH))
2718 : : {
2719 : 5 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2720 : 5 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
2721 : : )
2722 : : {
2723 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail749;
2724 : 3 : {
2725 : 3 : tree res_op0;
2726 : 3 : res_op0 = captures[1];
2727 : 3 : tree _r;
2728 : 3 : _r = maybe_build_call_expr_loc (loc, TANH, type, 1, res_op0);
2729 : 3 : if (!_r)
2730 : 0 : goto next_after_fail749;
2731 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 540, __FILE__, __LINE__, true);
2732 : 3 : return _r;
2733 : : }
2734 : : next_after_fail749:;
2735 : : }
2736 : : return NULL_TREE;
2737 : : }
2738 : :
2739 : : tree
2740 : 396 : generic_simplify_331 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2741 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2742 : : const enum tree_code ARG_UNUSED (op),
2743 : : const enum tree_code ARG_UNUSED (neg_op))
2744 : : {
2745 : 396 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2746 : 396 : if (flag_unsafe_math_optimizations
2747 : : )
2748 : : {
2749 : 4 : if (!HONOR_SIGNED_ZEROS (captures[1]) && !HONOR_INFINITIES (captures[1])
2750 : : )
2751 : : {
2752 : 4 : if (real_less (&dconst0, TREE_REAL_CST_PTR (captures[0]))
2753 : : )
2754 : : {
2755 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail755;
2756 : 2 : {
2757 : 2 : tree res_op0;
2758 : 2 : res_op0 = captures[1];
2759 : 2 : tree res_op1;
2760 : 2 : res_op1 = captures[2];
2761 : 2 : tree _r;
2762 : 2 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2763 : 2 : if (TREE_SIDE_EFFECTS (captures[0]))
2764 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2765 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 546, __FILE__, __LINE__, true);
2766 : 2 : return _r;
2767 : : }
2768 : 0 : next_after_fail755:;
2769 : : }
2770 : : else
2771 : : {
2772 : 2 : if (real_less (TREE_REAL_CST_PTR (captures[0]), &dconst0)
2773 : : )
2774 : : {
2775 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail756;
2776 : 2 : {
2777 : 2 : tree res_op0;
2778 : 2 : res_op0 = captures[1];
2779 : 2 : tree res_op1;
2780 : 2 : res_op1 = captures[2];
2781 : 2 : tree _r;
2782 : 2 : _r = fold_build2_loc (loc, neg_op, type, res_op0, res_op1);
2783 : 2 : if (TREE_SIDE_EFFECTS (captures[0]))
2784 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2785 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 547, __FILE__, __LINE__, true);
2786 : 2 : return _r;
2787 : : }
2788 : 0 : next_after_fail756:;
2789 : : }
2790 : : }
2791 : : }
2792 : : }
2793 : : return NULL_TREE;
2794 : : }
2795 : :
2796 : : tree
2797 : 8241970 : generic_simplify_342 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2798 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2799 : : const enum tree_code ARG_UNUSED (cmp),
2800 : : const enum tree_code ARG_UNUSED (acmp))
2801 : : {
2802 : 8241970 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2803 : 8241970 : {
2804 : 8241970 : tree cst = uniform_integer_cst_p (captures[1]);
2805 : 8241970 : if (tree_int_cst_sgn (cst) == 1
2806 : : )
2807 : : {
2808 : 3593605 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail769;
2809 : 3593605 : {
2810 : 3593605 : tree res_op0;
2811 : 3593605 : res_op0 = captures[0];
2812 : 3593605 : tree res_op1;
2813 : 3593605 : res_op1 = build_uniform_cst (TREE_TYPE (captures[1]),
2814 : 3593605 : wide_int_to_tree (TREE_TYPE (cst),
2815 : 3593605 : wi::to_wide (cst) - 1));
2816 : 3593605 : tree _r;
2817 : 3593605 : _r = fold_build2_loc (loc, acmp, type, res_op0, res_op1);
2818 : 3593605 : if (TREE_SIDE_EFFECTS (captures[1]))
2819 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2820 : 3593605 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 560, __FILE__, __LINE__, true);
2821 : 3593605 : return _r;
2822 : : }
2823 : 0 : next_after_fail769:;
2824 : : }
2825 : : }
2826 : : return NULL_TREE;
2827 : : }
2828 : :
2829 : : tree
2830 : 0 : generic_simplify_351 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2831 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2832 : : const enum tree_code ARG_UNUSED (cmp),
2833 : : const enum tree_code ARG_UNUSED (out))
2834 : : {
2835 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2836 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
2837 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
2838 : : )
2839 : : {
2840 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail810;
2841 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail810;
2842 : 0 : {
2843 : 0 : tree res_op0;
2844 : 0 : {
2845 : 0 : tree _o1[1], _r1;
2846 : 0 : _o1[0] = captures[0];
2847 : 0 : _r1 = fold_build1_loc (loc, IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
2848 : 0 : res_op0 = _r1;
2849 : : }
2850 : 0 : tree res_op1;
2851 : 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
2852 : 0 : tree _r;
2853 : 0 : _r = fold_build2_loc (loc, out, type, res_op0, res_op1);
2854 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 584, __FILE__, __LINE__, true);
2855 : 0 : return _r;
2856 : : }
2857 : : next_after_fail810:;
2858 : : }
2859 : : return NULL_TREE;
2860 : : }
2861 : :
2862 : : tree
2863 : 0 : generic_simplify_357 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2864 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2865 : : const enum tree_code ARG_UNUSED (op),
2866 : : const enum tree_code ARG_UNUSED (cmp))
2867 : : {
2868 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2869 : 0 : {
2870 : 0 : bool ok = true;
2871 : 0 : HOST_WIDE_INT val = 0;
2872 : 0 : if (!tree_fits_shwi_p (captures[3]))
2873 : : ok = false;
2874 : : else
2875 : : {
2876 : 0 : val = tree_to_shwi (captures[3]);
2877 : 0 : if (op == GT_EXPR || op == LE_EXPR)
2878 : : {
2879 : 0 : if (val == HOST_WIDE_INT_MAX)
2880 : : ok = false;
2881 : : else
2882 : 0 : val++;
2883 : : }
2884 : : }
2885 : 0 : HOST_WIDE_INT zero_val = tree_to_shwi (captures[2]);
2886 : 0 : tree type0 = TREE_TYPE (captures[1]);
2887 : 0 : int prec = TYPE_PRECISION (type0);
2888 : 0 : if (prec > MAX_FIXED_MODE_SIZE)
2889 : 0 : ok = false;
2890 : 0 : if (val <= 0
2891 : : )
2892 : : {
2893 : 0 : if (ok && zero_val >= val
2894 : : )
2895 : : {
2896 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail821;
2897 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail821;
2898 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail821;
2899 : 0 : {
2900 : 0 : tree _r;
2901 : 0 : _r = constant_boolean_node (cmp == EQ_EXPR ? true : false, type);
2902 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2903 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2904 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 595, __FILE__, __LINE__, true);
2905 : 0 : return _r;
2906 : : }
2907 : : next_after_fail821:;
2908 : : }
2909 : : }
2910 : : else
2911 : : {
2912 : 0 : if (val >= prec
2913 : : )
2914 : : {
2915 : 0 : if (ok && zero_val < val
2916 : : )
2917 : : {
2918 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail822;
2919 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail822;
2920 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail822;
2921 : 0 : {
2922 : 0 : tree _r;
2923 : 0 : _r = constant_boolean_node (cmp == EQ_EXPR ? false : true, type);
2924 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2925 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2926 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 596, __FILE__, __LINE__, true);
2927 : 0 : return _r;
2928 : : }
2929 : : next_after_fail822:;
2930 : : }
2931 : : }
2932 : : else
2933 : : {
2934 : 0 : if (ok && (zero_val < 0 || zero_val >= prec)
2935 : : )
2936 : : {
2937 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail823;
2938 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail823;
2939 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail823;
2940 : 0 : {
2941 : 0 : tree res_op0;
2942 : 0 : {
2943 : 0 : tree _o1[2], _r1;
2944 : 0 : _o1[0] = captures[1];
2945 : 0 : _o1[1] = wide_int_to_tree (type0,
2946 : 0 : wi::mask (val, false, prec));
2947 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2948 : 0 : res_op0 = _r1;
2949 : : }
2950 : 0 : tree res_op1;
2951 : 0 : res_op1 = build_zero_cst (type0);
2952 : 0 : tree _r;
2953 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2954 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 597, __FILE__, __LINE__, true);
2955 : 0 : return _r;
2956 : : }
2957 : : next_after_fail823:;
2958 : : }
2959 : : }
2960 : : }
2961 : : }
2962 : : return NULL_TREE;
2963 : : }
2964 : :
2965 : : tree
2966 : 94 : generic_simplify_368 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2967 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2968 : : {
2969 : 94 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2970 : 188 : if (INTEGRAL_TYPE_P (type)
2971 : 93 : && !TYPE_UNSIGNED (type)
2972 : 93 : && !TYPE_OVERFLOW_TRAPS (type)
2973 : 93 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
2974 : 281 : && (expr_not_equal_to (captures[0], wi::to_wide (TYPE_MIN_VALUE (type)))
2975 : 187 : || expr_not_equal_to (captures[1], wi::minus_one (TYPE_PRECISION
2976 : : (TREE_TYPE (captures[1])))))
2977 : : )
2978 : : {
2979 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail838;
2980 : 0 : {
2981 : 0 : tree res_op0;
2982 : 0 : res_op0 = captures[0];
2983 : 0 : tree res_op1;
2984 : 0 : {
2985 : 0 : tree _o1[1], _r1;
2986 : 0 : _o1[0] = captures[1];
2987 : 0 : if (TREE_TYPE (_o1[0]) != type)
2988 : : {
2989 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2990 : : }
2991 : : else
2992 : : _r1 = _o1[0];
2993 : 0 : res_op1 = _r1;
2994 : : }
2995 : 0 : tree _r;
2996 : 0 : _r = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, res_op0, res_op1);
2997 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 608, __FILE__, __LINE__, true);
2998 : 0 : return _r;
2999 : : }
3000 : 0 : next_after_fail838:;
3001 : : }
3002 : : return NULL_TREE;
3003 : : }
3004 : :
3005 : : tree
3006 : 0 : generic_simplify_374 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3007 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3008 : : const enum tree_code ARG_UNUSED (shiftrotate))
3009 : : {
3010 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3011 : 0 : {
3012 : 0 : tree tem = uniform_vector_p (captures[1]);
3013 : 0 : if (tem
3014 : : )
3015 : : {
3016 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail844;
3017 : 0 : {
3018 : 0 : tree res_op0;
3019 : 0 : res_op0 = captures[0];
3020 : 0 : tree res_op1;
3021 : 0 : res_op1 = tem;
3022 : 0 : tree _r;
3023 : 0 : _r = fold_build2_loc (loc, shiftrotate, type, res_op0, res_op1);
3024 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3025 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3026 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 614, __FILE__, __LINE__, true);
3027 : 0 : return _r;
3028 : : }
3029 : 0 : next_after_fail844:;
3030 : : }
3031 : : }
3032 : : return NULL_TREE;
3033 : : }
3034 : :
3035 : : tree
3036 : 267 : generic_simplify_380 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3037 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3038 : : const combined_fn ARG_UNUSED (bswap))
3039 : : {
3040 : 267 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3041 : 267 : if (BITS_PER_UNIT == 8
3042 : : && CHAR_TYPE_SIZE == 8
3043 : 267 : && tree_fits_uhwi_p (captures[2])
3044 : : )
3045 : : {
3046 : 267 : {
3047 : 267 : unsigned HOST_WIDE_INT prec = TYPE_PRECISION (TREE_TYPE (captures[0]));
3048 : 267 : unsigned HOST_WIDE_INT bits = tree_to_uhwi (captures[2]);
3049 : 267 : tree st = TYPE_PRECISION (type) > prec ? TREE_TYPE (captures[0]) : type;
3050 : 267 : if (TYPE_PRECISION (type) > prec
3051 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3052 : 0 : && TYPE_UNSIGNED (type)
3053 : 267 : && bits < prec && bits + 8 >= prec
3054 : : )
3055 : : {
3056 : 0 : {
3057 : 0 : tree nst = build_int_cst (integer_type_node, prec - 8);
3058 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail854;
3059 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail854;
3060 : 0 : {
3061 : 0 : tree res_op0;
3062 : 0 : {
3063 : 0 : tree _o1[1], _r1;
3064 : 0 : {
3065 : 0 : tree _o2[2], _r2;
3066 : 0 : {
3067 : 0 : tree _o3[1], _r3;
3068 : 0 : _o3[0] = captures[1];
3069 : 0 : if (TREE_TYPE (_o3[0]) != st)
3070 : : {
3071 : 0 : _r3 = fold_build1_loc (loc, NOP_EXPR, st, _o3[0]);
3072 : : }
3073 : : else
3074 : : _r3 = _o3[0];
3075 : 0 : _o2[0] = _r3;
3076 : : }
3077 : 0 : _o2[1] = nst;
3078 : 0 : _r2 = fold_build2_loc (loc, LSHIFT_EXPR, st, _o2[0], _o2[1]);
3079 : 0 : _o1[0] = _r2;
3080 : : }
3081 : 0 : if (TREE_TYPE (_o1[0]) != type)
3082 : : {
3083 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3084 : : }
3085 : : else
3086 : : _r1 = _o1[0];
3087 : 0 : res_op0 = _r1;
3088 : : }
3089 : 0 : tree res_op1;
3090 : 0 : res_op1 = captures[2];
3091 : 0 : tree _r;
3092 : 0 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
3093 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 622, __FILE__, __LINE__, true);
3094 : 0 : return _r;
3095 : : }
3096 : : next_after_fail854:;
3097 : : }
3098 : : }
3099 : : else
3100 : : {
3101 : 267 : if (bits + 8 == prec
3102 : : )
3103 : : {
3104 : 46 : if (TYPE_UNSIGNED (st)
3105 : : )
3106 : : {
3107 : 36 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail855;
3108 : 36 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail855;
3109 : 36 : {
3110 : 36 : tree res_op0;
3111 : 36 : {
3112 : 36 : tree _o1[1], _r1;
3113 : 36 : _o1[0] = captures[1];
3114 : 36 : if (TREE_TYPE (_o1[0]) != unsigned_char_type_node)
3115 : : {
3116 : 36 : _r1 = fold_build1_loc (loc, NOP_EXPR, unsigned_char_type_node, _o1[0]);
3117 : : }
3118 : : else
3119 : : _r1 = _o1[0];
3120 : 36 : res_op0 = _r1;
3121 : : }
3122 : 36 : tree _r;
3123 : 36 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3124 : 36 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 623, __FILE__, __LINE__, true);
3125 : 36 : return _r;
3126 : : }
3127 : : next_after_fail855:;
3128 : : }
3129 : : else
3130 : : {
3131 : 10 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail856;
3132 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail856;
3133 : 10 : {
3134 : 10 : tree res_op0;
3135 : 10 : {
3136 : 10 : tree _o1[1], _r1;
3137 : 10 : _o1[0] = captures[1];
3138 : 10 : if (TREE_TYPE (_o1[0]) != signed_char_type_node)
3139 : : {
3140 : 10 : _r1 = fold_build1_loc (loc, NOP_EXPR, signed_char_type_node, _o1[0]);
3141 : : }
3142 : : else
3143 : : _r1 = _o1[0];
3144 : 10 : res_op0 = _r1;
3145 : : }
3146 : 10 : tree _r;
3147 : 10 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3148 : 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 624, __FILE__, __LINE__, true);
3149 : 10 : return _r;
3150 : : }
3151 : : next_after_fail856:;
3152 : : }
3153 : : }
3154 : : else
3155 : : {
3156 : 221 : if (bits < prec && bits + 8 > prec
3157 : : )
3158 : : {
3159 : 57 : {
3160 : 57 : tree nst = build_int_cst (integer_type_node, bits & 7);
3161 : 57 : tree bt = TYPE_UNSIGNED (st) ? unsigned_char_type_node
3162 : 57 : : signed_char_type_node;
3163 : 57 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail857;
3164 : 57 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail857;
3165 : 57 : {
3166 : 57 : tree res_op0;
3167 : 57 : {
3168 : 57 : tree _o1[2], _r1;
3169 : 57 : {
3170 : 57 : tree _o2[1], _r2;
3171 : 57 : _o2[0] = captures[1];
3172 : 57 : if (TREE_TYPE (_o2[0]) != bt)
3173 : : {
3174 : 57 : _r2 = fold_build1_loc (loc, NOP_EXPR, bt, _o2[0]);
3175 : : }
3176 : : else
3177 : : _r2 = _o2[0];
3178 : 57 : _o1[0] = _r2;
3179 : : }
3180 : 57 : _o1[1] = nst;
3181 : 57 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, bt, _o1[0], _o1[1]);
3182 : 57 : res_op0 = _r1;
3183 : : }
3184 : 57 : tree _r;
3185 : 57 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3186 : 57 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 625, __FILE__, __LINE__, true);
3187 : 57 : return _r;
3188 : : }
3189 : : next_after_fail857:;
3190 : : }
3191 : : }
3192 : : }
3193 : : }
3194 : : }
3195 : : }
3196 : : return NULL_TREE;
3197 : : }
3198 : :
3199 : : tree
3200 : 0 : generic_simplify_392 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3201 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3202 : : const combined_fn ARG_UNUSED (copysigns),
3203 : : const combined_fn ARG_UNUSED (pows))
3204 : : {
3205 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3206 : 0 : {
3207 : 0 : HOST_WIDE_INT n;
3208 : 0 : if (real_isinteger (&TREE_REAL_CST (captures[2]), &n) && (n & 1) == 0
3209 : : )
3210 : : {
3211 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail882;
3212 : 0 : {
3213 : 0 : tree res_op0;
3214 : 0 : res_op0 = captures[0];
3215 : 0 : tree res_op1;
3216 : 0 : res_op1 = captures[2];
3217 : 0 : tree _r;
3218 : 0 : _r = maybe_build_call_expr_loc (loc, pows, type, 2, res_op0, res_op1);
3219 : 0 : if (!_r)
3220 : 0 : goto next_after_fail882;
3221 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3222 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3223 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 638, __FILE__, __LINE__, true);
3224 : 0 : return _r;
3225 : : }
3226 : 0 : next_after_fail882:;
3227 : : }
3228 : : }
3229 : 0 : return NULL_TREE;
3230 : : }
3231 : :
3232 : : tree
3233 : 0 : generic_simplify_394 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3234 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3235 : : const combined_fn ARG_UNUSED (pow))
3236 : : {
3237 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3238 : 0 : if (flag_unsafe_math_optimizations
3239 : : )
3240 : : {
3241 : 0 : if (! HONOR_INFINITIES (type)
3242 : 0 : && ! flag_trapping_math
3243 : 0 : && ! flag_errno_math
3244 : : )
3245 : : {
3246 : 0 : if (! HONOR_NANS (type) && ! HONOR_SIGNED_ZEROS (type)
3247 : : )
3248 : : {
3249 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail884;
3250 : 0 : {
3251 : 0 : tree _r;
3252 : 0 : _r = captures[0];
3253 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3254 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3255 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 640, __FILE__, __LINE__, true);
3256 : 0 : return _r;
3257 : : }
3258 : 0 : next_after_fail884:;
3259 : : }
3260 : : }
3261 : : }
3262 : : return NULL_TREE;
3263 : : }
3264 : :
3265 : : tree
3266 : 4883681 : generic_simplify_401 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3267 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3268 : : {
3269 : 4883681 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3270 : 4883681 : {
3271 : 4883681 : bool wascmp;
3272 : 4883681 : if (types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
3273 : 4883681 : && bitwise_inverted_equal_p (captures[0], captures[1], wascmp)
3274 : : )
3275 : : {
3276 : 113 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail891;
3277 : 113 : {
3278 : 113 : tree _r;
3279 : 113 : _r = wascmp ? constant_boolean_node (false, type) : build_zero_cst (type);
3280 : 113 : if (TREE_SIDE_EFFECTS (captures[0]))
3281 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
3282 : 113 : if (TREE_SIDE_EFFECTS (captures[1]))
3283 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3284 : 113 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 647, __FILE__, __LINE__, true);
3285 : 113 : return _r;
3286 : : }
3287 : 0 : next_after_fail891:;
3288 : : }
3289 : : }
3290 : 4883568 : return NULL_TREE;
3291 : : }
3292 : :
3293 : : tree
3294 : 41675 : generic_simplify_406 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3295 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3296 : : {
3297 : 41675 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3298 : 41675 : {
3299 : 41675 : bool wascmp;
3300 : 41675 : if (bitwise_inverted_equal_p (captures[0], captures[1], wascmp)
3301 : 41675 : && (!wascmp || element_precision (type) == 1)
3302 : : )
3303 : : {
3304 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail896;
3305 : 1 : {
3306 : 1 : tree res_op0;
3307 : 1 : res_op0 = captures[0];
3308 : 1 : tree res_op1;
3309 : 1 : res_op1 = captures[2];
3310 : 1 : tree _r;
3311 : 1 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
3312 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
3313 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3314 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 652, __FILE__, __LINE__, true);
3315 : 1 : return _r;
3316 : : }
3317 : 0 : next_after_fail896:;
3318 : : }
3319 : : }
3320 : 41674 : return NULL_TREE;
3321 : : }
3322 : :
3323 : : tree
3324 : 63 : generic_simplify_413 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3325 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3326 : : {
3327 : 63 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3328 : 63 : if (INTEGRAL_TYPE_P (type)
3329 : 63 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3330 : 63 : && TREE_CODE (TREE_TYPE (captures[0])) != BOOLEAN_TYPE
3331 : 126 : && (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3332 : 17 : || TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0])))
3333 : : )
3334 : : {
3335 : 63 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail903;
3336 : 63 : {
3337 : 63 : tree res_op0;
3338 : 63 : {
3339 : 63 : tree _o1[1], _r1;
3340 : 63 : _o1[0] = captures[0];
3341 : 63 : if (TREE_TYPE (_o1[0]) != type)
3342 : : {
3343 : 20 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3344 : : }
3345 : : else
3346 : : _r1 = _o1[0];
3347 : 63 : res_op0 = _r1;
3348 : : }
3349 : 63 : tree res_op1;
3350 : 63 : res_op1 = captures[1];
3351 : 63 : tree _r;
3352 : 63 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
3353 : 63 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 658, __FILE__, __LINE__, true);
3354 : 63 : return _r;
3355 : : }
3356 : 0 : next_after_fail903:;
3357 : : }
3358 : : return NULL_TREE;
3359 : : }
3360 : :
3361 : : tree
3362 : 0 : generic_simplify_420 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3363 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3364 : : const enum tree_code ARG_UNUSED (cmp))
3365 : : {
3366 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3367 : 0 : if (!canonicalize_math_p ()
3368 : : )
3369 : : {
3370 : 0 : if (INTEGRAL_TYPE_P (type)
3371 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3372 : : )
3373 : : {
3374 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail910;
3375 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail910;
3376 : 0 : {
3377 : 0 : tree res_op0;
3378 : 0 : res_op0 = captures[0];
3379 : 0 : tree res_op1;
3380 : 0 : res_op1 = captures[3];
3381 : 0 : tree res_op2;
3382 : 0 : res_op2 = build_zero_cst (type);
3383 : 0 : tree _r;
3384 : 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
3385 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 664, __FILE__, __LINE__, true);
3386 : 0 : return _r;
3387 : : }
3388 : : next_after_fail910:;
3389 : : }
3390 : : }
3391 : : return NULL_TREE;
3392 : : }
3393 : :
3394 : : tree
3395 : 43 : generic_simplify_429 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3396 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3397 : : const enum tree_code ARG_UNUSED (code2),
3398 : : const enum tree_code ARG_UNUSED (code1))
3399 : : {
3400 : 43 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3401 : 43 : if ((TREE_CODE (captures[2]) == INTEGER_CST
3402 : 2 : && TREE_CODE (captures[5]) == INTEGER_CST)
3403 : 43 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
3404 : 0 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2]))
3405 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, code2))
3406 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
3407 : 41 : && bitwise_equal_p (captures[2], captures[5]))
3408 : : )
3409 : : {
3410 : 2 : {
3411 : 2 : bool one_before = false;
3412 : 2 : bool one_after = false;
3413 : 2 : int cmp = 0;
3414 : 2 : bool allbits = true;
3415 : 2 : if (TREE_CODE (captures[2]) == INTEGER_CST
3416 : 2 : && TREE_CODE (captures[5]) == INTEGER_CST)
3417 : : {
3418 : 2 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
3419 : 2 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
3420 : 2 : auto t2 = wi::to_wide (captures[5]);
3421 : 2 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
3422 : 2 : if (cmp < 0
3423 : 2 : && t1 == t2 - 1)
3424 : : one_before = true;
3425 : 2 : if (cmp > 0
3426 : 2 : && t1 == t2 + 1)
3427 : : one_after = true;
3428 : : }
3429 : 2 : bool val;
3430 : 2 : switch (code2)
3431 : : {
3432 : 0 : case EQ_EXPR: val = (cmp == 0); break;
3433 : 2 : case NE_EXPR: val = (cmp != 0); break;
3434 : 0 : case LT_EXPR: val = (cmp < 0); break;
3435 : 0 : case GT_EXPR: val = (cmp > 0); break;
3436 : 0 : case LE_EXPR: val = (cmp <= 0); break;
3437 : 0 : case GE_EXPR: val = (cmp >= 0); break;
3438 : 0 : default: gcc_unreachable ();
3439 : : }
3440 : 2 : if (code1 == EQ_EXPR && val
3441 : : )
3442 : : {
3443 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail932;
3444 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail932;
3445 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail932;
3446 : 0 : {
3447 : 0 : tree _r;
3448 : 0 : _r = captures[0];
3449 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
3450 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
3451 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 676, __FILE__, __LINE__, true);
3452 : 0 : return _r;
3453 : : }
3454 : : next_after_fail932:;
3455 : : }
3456 : : else
3457 : : {
3458 : 2 : if (code1 == EQ_EXPR && !val
3459 : : )
3460 : : {
3461 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail933;
3462 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail933;
3463 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail933;
3464 : 0 : {
3465 : 0 : tree _r;
3466 : 0 : _r = constant_boolean_node (false, type);
3467 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
3468 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
3469 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 677, __FILE__, __LINE__, true);
3470 : 0 : return _r;
3471 : : }
3472 : : next_after_fail933:;
3473 : : }
3474 : : else
3475 : : {
3476 : 2 : if (code1 == NE_EXPR && !val && allbits
3477 : : )
3478 : : {
3479 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail934;
3480 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail934;
3481 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail934;
3482 : 0 : {
3483 : 0 : tree _r;
3484 : 0 : _r = captures[3];
3485 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 678, __FILE__, __LINE__, true);
3486 : 0 : return _r;
3487 : : }
3488 : : next_after_fail934:;
3489 : : }
3490 : : else
3491 : : {
3492 : 2 : if ((code1 == NE_EXPR
3493 : 2 : && code2 == GE_EXPR
3494 : 0 : && cmp == 0
3495 : 0 : && allbits)
3496 : 2 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3497 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
3498 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3499 : : )
3500 : : {
3501 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail935;
3502 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail935;
3503 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail935;
3504 : 0 : {
3505 : 0 : tree res_op0;
3506 : 0 : res_op0 = captures[4];
3507 : 0 : tree res_op1;
3508 : 0 : {
3509 : 0 : tree _o1[1], _r1;
3510 : 0 : _o1[0] = captures[2];
3511 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3512 : : {
3513 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3514 : : }
3515 : : else
3516 : : _r1 = _o1[0];
3517 : 0 : res_op1 = _r1;
3518 : : }
3519 : 0 : tree _r;
3520 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3521 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 679, __FILE__, __LINE__, true);
3522 : 0 : return _r;
3523 : : }
3524 : : next_after_fail935:;
3525 : : }
3526 : : else
3527 : : {
3528 : 2 : if ((code1 == NE_EXPR
3529 : 2 : && code2 == LE_EXPR
3530 : 0 : && cmp == 0
3531 : 0 : && allbits)
3532 : 2 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3533 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
3534 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3535 : : )
3536 : : {
3537 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail936;
3538 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail936;
3539 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail936;
3540 : 0 : {
3541 : 0 : tree res_op0;
3542 : 0 : res_op0 = captures[4];
3543 : 0 : tree res_op1;
3544 : 0 : {
3545 : 0 : tree _o1[1], _r1;
3546 : 0 : _o1[0] = captures[2];
3547 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3548 : : {
3549 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3550 : : }
3551 : : else
3552 : : _r1 = _o1[0];
3553 : 0 : res_op1 = _r1;
3554 : : }
3555 : 0 : tree _r;
3556 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3557 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 680, __FILE__, __LINE__, true);
3558 : 0 : return _r;
3559 : : }
3560 : : next_after_fail936:;
3561 : : }
3562 : : else
3563 : : {
3564 : 2 : if ((code1 == NE_EXPR
3565 : 2 : && code2 == GT_EXPR
3566 : : && one_after
3567 : 0 : && allbits)
3568 : 2 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3569 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
3570 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3571 : : )
3572 : : {
3573 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail937;
3574 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail937;
3575 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail937;
3576 : 0 : {
3577 : 0 : tree res_op0;
3578 : 0 : res_op0 = captures[4];
3579 : 0 : tree res_op1;
3580 : 0 : {
3581 : 0 : tree _o1[1], _r1;
3582 : 0 : _o1[0] = captures[2];
3583 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3584 : : {
3585 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3586 : : }
3587 : : else
3588 : : _r1 = _o1[0];
3589 : 0 : res_op1 = _r1;
3590 : : }
3591 : 0 : tree _r;
3592 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3593 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 681, __FILE__, __LINE__, true);
3594 : 0 : return _r;
3595 : : }
3596 : : next_after_fail937:;
3597 : : }
3598 : : else
3599 : : {
3600 : 2 : if ((code1 == NE_EXPR
3601 : 2 : && code2 == LT_EXPR
3602 : : && one_before
3603 : 0 : && allbits)
3604 : 2 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3605 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
3606 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3607 : : )
3608 : : {
3609 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail938;
3610 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail938;
3611 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail938;
3612 : 0 : {
3613 : 0 : tree res_op0;
3614 : 0 : res_op0 = captures[4];
3615 : 0 : tree res_op1;
3616 : 0 : {
3617 : 0 : tree _o1[1], _r1;
3618 : 0 : _o1[0] = captures[2];
3619 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3620 : : {
3621 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3622 : : }
3623 : : else
3624 : : _r1 = _o1[0];
3625 : 0 : res_op1 = _r1;
3626 : : }
3627 : 0 : tree _r;
3628 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3629 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 682, __FILE__, __LINE__, true);
3630 : 0 : return _r;
3631 : : }
3632 : : next_after_fail938:;
3633 : : }
3634 : : }
3635 : : }
3636 : : }
3637 : : }
3638 : : }
3639 : : }
3640 : : }
3641 : : }
3642 : : return NULL_TREE;
3643 : : }
3644 : :
3645 : : tree
3646 : 29 : generic_simplify_455 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3647 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3648 : : {
3649 : 29 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3650 : 29 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
3651 : : )
3652 : : {
3653 : 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail989;
3654 : 29 : {
3655 : 29 : tree res_op0;
3656 : 29 : {
3657 : 29 : tree _o1[2], _r1;
3658 : 29 : _o1[0] = captures[0];
3659 : 29 : {
3660 : 29 : tree _o2[1], _r2;
3661 : 29 : _o2[0] = captures[1];
3662 : 29 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
3663 : 29 : _o1[1] = _r2;
3664 : : }
3665 : 29 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3666 : 29 : res_op0 = _r1;
3667 : : }
3668 : 29 : tree _r;
3669 : 29 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3670 : 29 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 705, __FILE__, __LINE__, true);
3671 : 29 : return _r;
3672 : : }
3673 : 0 : next_after_fail989:;
3674 : : }
3675 : : return NULL_TREE;
3676 : : }
3677 : :
3678 : : tree
3679 : 2 : generic_simplify_460 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3680 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3681 : : const enum tree_code ARG_UNUSED (rotate))
3682 : : {
3683 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3684 : 2 : if ((element_precision (TREE_TYPE (captures[2]))
3685 : 2 : <= element_precision (TREE_TYPE (captures[3]))
3686 : 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[3])))
3687 : 2 : && (element_precision (type) <= element_precision (TREE_TYPE (captures[2]))
3688 : 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[2])))
3689 : : )
3690 : : {
3691 : 2 : {
3692 : 2 : tree rotate_type = TREE_TYPE (captures[2]);
3693 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail994;
3694 : 2 : {
3695 : 2 : tree res_op0;
3696 : 2 : {
3697 : 2 : tree _o1[2], _r1;
3698 : 2 : {
3699 : 2 : tree _o2[1], _r2;
3700 : 2 : _o2[0] = captures[3];
3701 : 2 : if (TREE_TYPE (_o2[0]) != rotate_type)
3702 : : {
3703 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, rotate_type, _o2[0]);
3704 : : }
3705 : : else
3706 : : _r2 = _o2[0];
3707 : 2 : _o1[0] = _r2;
3708 : : }
3709 : 2 : _o1[1] = captures[4];
3710 : 2 : _r1 = fold_build2_loc (loc, rotate, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3711 : 2 : res_op0 = _r1;
3712 : : }
3713 : 2 : tree _r;
3714 : 2 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3715 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 707, __FILE__, __LINE__, true);
3716 : 2 : return _r;
3717 : : }
3718 : 0 : next_after_fail994:;
3719 : : }
3720 : : }
3721 : : return NULL_TREE;
3722 : : }
3723 : :
3724 : : tree
3725 : 8 : generic_simplify_470 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3726 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3727 : : const enum tree_code ARG_UNUSED (op))
3728 : : {
3729 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3730 : 8 : if (INTEGRAL_TYPE_P (type)
3731 : 8 : && TYPE_PRECISION (type) > 1
3732 : 16 : && (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])))
3733 : : )
3734 : : {
3735 : 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1006;
3736 : 8 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1006;
3737 : 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1006;
3738 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1006;
3739 : 8 : {
3740 : 8 : tree res_op0;
3741 : 8 : {
3742 : 8 : tree _o1[2], _r1;
3743 : 8 : {
3744 : 8 : tree _o2[1], _r2;
3745 : 8 : _o2[0] = captures[0];
3746 : 8 : if (TREE_TYPE (_o2[0]) != type)
3747 : : {
3748 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
3749 : : }
3750 : : else
3751 : : _r2 = _o2[0];
3752 : 8 : _o1[0] = _r2;
3753 : : }
3754 : 8 : _o1[1] = captures[1];
3755 : 8 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3756 : 8 : res_op0 = _r1;
3757 : : }
3758 : 8 : tree res_op1;
3759 : 8 : res_op1 = captures[2];
3760 : 8 : tree _r;
3761 : 8 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
3762 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 719, __FILE__, __LINE__, true);
3763 : 8 : return _r;
3764 : : }
3765 : : next_after_fail1006:;
3766 : : }
3767 : : return NULL_TREE;
3768 : : }
3769 : :
3770 : : tree
3771 : 0 : generic_simplify_482 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3772 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3773 : : const enum tree_code ARG_UNUSED (op))
3774 : : {
3775 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3776 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1023;
3777 : 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1023;
3778 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1023;
3779 : 0 : {
3780 : 0 : tree _r;
3781 : 0 : _r = captures[2];
3782 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 736, __FILE__, __LINE__, true);
3783 : : return _r;
3784 : : }
3785 : : next_after_fail1023:;
3786 : : return NULL_TREE;
3787 : : }
3788 : :
3789 : : tree
3790 : 0 : generic_simplify_486 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3791 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3792 : : const enum tree_code ARG_UNUSED (op))
3793 : : {
3794 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3795 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1027;
3796 : 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1027;
3797 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1027;
3798 : 0 : {
3799 : 0 : tree _r;
3800 : 0 : _r = captures[2];
3801 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 740, __FILE__, __LINE__, true);
3802 : : return _r;
3803 : : }
3804 : : next_after_fail1027:;
3805 : : return NULL_TREE;
3806 : : }
3807 : :
3808 : : tree
3809 : 9 : generic_simplify_491 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3810 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3811 : : const combined_fn ARG_UNUSED (func))
3812 : : {
3813 : 9 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3814 : 9 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1033;
3815 : 9 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1033;
3816 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1033;
3817 : 9 : {
3818 : 9 : tree _r;
3819 : 9 : _r = captures[2];
3820 : 9 : if (TREE_SIDE_EFFECTS (captures[1]))
3821 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3822 : 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 746, __FILE__, __LINE__, true);
3823 : : return _r;
3824 : : }
3825 : : next_after_fail1033:;
3826 : : return NULL_TREE;
3827 : : }
3828 : :
3829 : : tree
3830 : 0 : generic_simplify_497 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3831 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3832 : : const enum tree_code ARG_UNUSED (minmax))
3833 : : {
3834 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3835 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1041;
3836 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1041;
3837 : 0 : {
3838 : 0 : tree _r;
3839 : 0 : _r = captures[0];
3840 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 753, __FILE__, __LINE__, true);
3841 : : return _r;
3842 : : }
3843 : : next_after_fail1041:;
3844 : : return NULL_TREE;
3845 : : }
3846 : :
3847 : : tree
3848 : 0 : generic_simplify_502 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3849 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3850 : : const enum tree_code ARG_UNUSED (minmax),
3851 : : const enum tree_code ARG_UNUSED (cmp))
3852 : : {
3853 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3854 : 0 : {
3855 : 0 : poly_int64 off0, off1;
3856 : 0 : tree base0, base1;
3857 : 0 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[3], base0, base1,
3858 : : off0, off1,
3859 : : 1
3860 : : );
3861 : 0 : if (equal == 1
3862 : : )
3863 : : {
3864 : 0 : if (minmax == MIN_EXPR
3865 : : )
3866 : : {
3867 : 0 : if (known_le (off0, off1)
3868 : : )
3869 : : {
3870 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1049;
3871 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1049;
3872 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1049;
3873 : 0 : {
3874 : 0 : tree _r;
3875 : 0 : _r = captures[0];
3876 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 756, __FILE__, __LINE__, true);
3877 : 0 : return _r;
3878 : : }
3879 : 0 : next_after_fail1049:;
3880 : : }
3881 : : else
3882 : : {
3883 : 0 : if (known_gt (off0, off1)
3884 : : )
3885 : : {
3886 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1050;
3887 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1050;
3888 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1050;
3889 : 0 : {
3890 : 0 : tree _r;
3891 : 0 : _r = captures[2];
3892 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 757, __FILE__, __LINE__, true);
3893 : 0 : return _r;
3894 : : }
3895 : 0 : next_after_fail1050:;
3896 : : }
3897 : : }
3898 : : }
3899 : : else
3900 : : {
3901 : 0 : if (known_ge (off0, off1)
3902 : : )
3903 : : {
3904 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1051;
3905 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1051;
3906 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1051;
3907 : 0 : {
3908 : 0 : tree _r;
3909 : 0 : _r = captures[0];
3910 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 758, __FILE__, __LINE__, true);
3911 : 0 : return _r;
3912 : : }
3913 : 0 : next_after_fail1051:;
3914 : : }
3915 : : else
3916 : : {
3917 : 0 : if (known_lt (off0, off1)
3918 : : )
3919 : : {
3920 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1052;
3921 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1052;
3922 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1052;
3923 : 0 : {
3924 : 0 : tree _r;
3925 : 0 : _r = captures[2];
3926 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 759, __FILE__, __LINE__, true);
3927 : 0 : return _r;
3928 : : }
3929 : 0 : next_after_fail1052:;
3930 : : }
3931 : : }
3932 : : }
3933 : : }
3934 : : }
3935 : 0 : return NULL_TREE;
3936 : : }
3937 : :
3938 : : tree
3939 : 1 : generic_simplify_516 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3940 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3941 : : {
3942 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3943 : 1 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), type)
3944 : : )
3945 : : {
3946 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1075;
3947 : 1 : {
3948 : 1 : tree res_op0;
3949 : 1 : {
3950 : 1 : tree _o1[1], _r1;
3951 : 1 : _o1[0] = captures[0];
3952 : 1 : if (TREE_TYPE (_o1[0]) != type)
3953 : : {
3954 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3955 : : }
3956 : : else
3957 : : _r1 = _o1[0];
3958 : 1 : res_op0 = _r1;
3959 : : }
3960 : 1 : tree _r;
3961 : 1 : _r = non_lvalue_loc (loc, res_op0);
3962 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 774, __FILE__, __LINE__, true);
3963 : 1 : return _r;
3964 : : }
3965 : 0 : next_after_fail1075:;
3966 : : }
3967 : : return NULL_TREE;
3968 : : }
3969 : :
3970 : : tree
3971 : 0 : generic_simplify_525 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3972 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3973 : : const combined_fn ARG_UNUSED (cond_op))
3974 : : {
3975 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3976 : 0 : {
3977 : 0 : tree op_type = TREE_TYPE (captures[3]);
3978 : 0 : if (element_precision (type) == element_precision (op_type)
3979 : : )
3980 : : {
3981 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1084;
3982 : 0 : {
3983 : 0 : tree res_op0;
3984 : 0 : {
3985 : 0 : tree _o1[4], _r1;
3986 : 0 : _o1[0] = captures[0];
3987 : 0 : _o1[1] = captures[1];
3988 : 0 : _o1[2] = captures[2];
3989 : 0 : {
3990 : 0 : tree _o2[1], _r2;
3991 : 0 : _o2[0] = captures[4];
3992 : 0 : if (TREE_TYPE (_o2[0]) != op_type)
3993 : : {
3994 : 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, op_type, _o2[0]);
3995 : : }
3996 : : else
3997 : : _r2 = _o2[0];
3998 : 0 : _o1[3] = _r2;
3999 : : }
4000 : 0 : _r1 = maybe_build_call_expr_loc (loc, cond_op, TREE_TYPE (_o1[1]), 4, _o1[0], _o1[1], _o1[2], _o1[3]);
4001 : 0 : if (!_r1)
4002 : 0 : goto next_after_fail1084;
4003 : 0 : res_op0 = _r1;
4004 : : }
4005 : 0 : tree _r;
4006 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
4007 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4008 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4009 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 778, __FILE__, __LINE__, true);
4010 : 0 : return _r;
4011 : : }
4012 : : next_after_fail1084:;
4013 : : }
4014 : : }
4015 : : return NULL_TREE;
4016 : : }
4017 : :
4018 : : tree
4019 : 0 : generic_simplify_533 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4020 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
4021 : : const combined_fn ARG_UNUSED (cond_op))
4022 : : {
4023 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4024 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1092;
4025 : 0 : {
4026 : 0 : tree res_op0;
4027 : 0 : {
4028 : 0 : tree _o1[2], _r1;
4029 : 0 : _o1[0] = captures[2];
4030 : 0 : _o1[1] = captures[0];
4031 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4032 : 0 : res_op0 = _r1;
4033 : : }
4034 : 0 : tree res_op1;
4035 : 0 : res_op1 = captures[3];
4036 : 0 : tree res_op2;
4037 : 0 : res_op2 = captures[4];
4038 : 0 : tree res_op3;
4039 : 0 : res_op3 = captures[5];
4040 : 0 : tree _r;
4041 : 0 : _r = maybe_build_call_expr_loc (loc, cond_op, type, 4, res_op0, res_op1, res_op2, res_op3);
4042 : 0 : if (!_r)
4043 : 0 : goto next_after_fail1092;
4044 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 786, __FILE__, __LINE__, true);
4045 : : return _r;
4046 : : }
4047 : : next_after_fail1092:;
4048 : : return NULL_TREE;
4049 : : }
4050 : :
4051 : : tree
4052 : 0 : generic_simplify_541 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4053 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4054 : : const combined_fn ARG_UNUSED (logs))
4055 : : {
4056 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4057 : 0 : if (flag_unsafe_math_optimizations
4058 : : )
4059 : : {
4060 : 0 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
4061 : 0 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
4062 : 0 : && ! flag_trapping_math
4063 : 0 : && ! flag_errno_math
4064 : : )
4065 : : {
4066 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1100;
4067 : 0 : {
4068 : 0 : tree res_op0;
4069 : 0 : {
4070 : 0 : tree _o1[1], _r1;
4071 : 0 : _o1[0] = captures[1];
4072 : 0 : _r1 = maybe_build_call_expr_loc (loc, logs, TREE_TYPE (_o1[0]), 1, _o1[0]);
4073 : 0 : if (!_r1)
4074 : 0 : goto next_after_fail1100;
4075 : 0 : if (EXPR_P (_r1))
4076 : 0 : goto next_after_fail1100;
4077 : 0 : res_op0 = _r1;
4078 : : }
4079 : 0 : tree res_op1;
4080 : 0 : {
4081 : 0 : tree _o1[1], _r1;
4082 : 0 : _o1[0] = captures[2];
4083 : 0 : _r1 = maybe_build_call_expr_loc (loc, logs, TREE_TYPE (_o1[0]), 1, _o1[0]);
4084 : 0 : if (!_r1)
4085 : 0 : goto next_after_fail1100;
4086 : 0 : res_op1 = _r1;
4087 : : }
4088 : 0 : tree _r;
4089 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
4090 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 794, __FILE__, __LINE__, true);
4091 : 0 : return _r;
4092 : : }
4093 : : next_after_fail1100:;
4094 : : }
4095 : : }
4096 : : return NULL_TREE;
4097 : : }
4098 : :
4099 : : tree
4100 : 0 : generic_simplify_554 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4101 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4102 : : const combined_fn ARG_UNUSED (froms),
4103 : : const combined_fn ARG_UNUSED (tos))
4104 : : {
4105 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4106 : 0 : if (optimize && canonicalize_math_p ()
4107 : : )
4108 : : {
4109 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1113;
4110 : 0 : {
4111 : 0 : tree res_op0;
4112 : 0 : res_op0 = captures[0];
4113 : 0 : tree _r;
4114 : 0 : _r = maybe_build_call_expr_loc (loc, tos, type, 1, res_op0);
4115 : 0 : if (!_r)
4116 : 0 : goto next_after_fail1113;
4117 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 807, __FILE__, __LINE__, true);
4118 : 0 : return _r;
4119 : : }
4120 : : next_after_fail1113:;
4121 : : }
4122 : : return NULL_TREE;
4123 : : }
4124 : :
4125 : : tree
4126 : 0 : generic_simplify_562 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4127 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
4128 : : const combined_fn ARG_UNUSED (fmas))
4129 : : {
4130 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4131 : 0 : if (canonicalize_math_after_vectorization_p ()
4132 : : )
4133 : : {
4134 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1121;
4135 : : {
4136 : : tree res_op0;
4137 : : res_op0 = captures[0];
4138 : : tree res_op1;
4139 : : res_op1 = captures[1];
4140 : : tree res_op2;
4141 : : res_op2 = captures[2];
4142 : : tree _r;
4143 : : _r = maybe_build_call_expr_loc (loc, CFN_FNMA, type, 3, res_op0, res_op1, res_op2);
4144 : : if (!_r)
4145 : : goto next_after_fail1121;
4146 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 815, __FILE__, __LINE__, true);
4147 : : return _r;
4148 : : }
4149 : 0 : next_after_fail1121:;
4150 : : }
4151 : 0 : return NULL_TREE;
4152 : : }
4153 : :
4154 : : tree
4155 : 0 : generic_simplify_572 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4156 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4157 : : const combined_fn ARG_UNUSED (ctz))
4158 : : {
4159 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4160 : 0 : {
4161 : 0 : tree t = TREE_TYPE (captures[0]);
4162 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1131;
4163 : 0 : {
4164 : 0 : tree res_op0;
4165 : 0 : {
4166 : 0 : tree _o1[1], _r1;
4167 : 0 : _o1[0] = captures[1];
4168 : 0 : if (TREE_TYPE (_o1[0]) != t)
4169 : : {
4170 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, t, _o1[0]);
4171 : : }
4172 : : else
4173 : : _r1 = _o1[0];
4174 : 0 : res_op0 = _r1;
4175 : : }
4176 : 0 : tree _r;
4177 : 0 : _r = maybe_build_call_expr_loc (loc, ctz, type, 1, res_op0);
4178 : 0 : if (!_r)
4179 : 0 : goto next_after_fail1131;
4180 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 824, __FILE__, __LINE__, true);
4181 : : return _r;
4182 : : }
4183 : : next_after_fail1131:;
4184 : : }
4185 : : return NULL_TREE;
4186 : : }
4187 : :
4188 : : tree
4189 : 0 : generic_simplify_582 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4190 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4191 : : const enum tree_code ARG_UNUSED (rot),
4192 : : const combined_fn ARG_UNUSED (parity))
4193 : : {
4194 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4195 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4196 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4197 : 0 : && (
4198 : :
4199 : 0 : || !TREE_SIDE_EFFECTS (captures[3]))
4200 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[0]))
4201 : 0 : >= TYPE_PRECISION (TREE_TYPE (captures[1]))
4202 : : )
4203 : : {
4204 : 0 : {
4205 : 0 : tree type0 = TREE_TYPE (captures[0]);
4206 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1142;
4207 : 0 : {
4208 : 0 : tree res_op0;
4209 : 0 : {
4210 : 0 : tree _o1[1], _r1;
4211 : 0 : _o1[0] = captures[2];
4212 : 0 : if (TREE_TYPE (_o1[0]) != type0)
4213 : : {
4214 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type0, _o1[0]);
4215 : : }
4216 : : else
4217 : : _r1 = _o1[0];
4218 : 0 : res_op0 = _r1;
4219 : : }
4220 : 0 : tree _r;
4221 : 0 : _r = maybe_build_call_expr_loc (loc, parity, type, 1, res_op0);
4222 : 0 : if (!_r)
4223 : 0 : goto next_after_fail1142;
4224 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4225 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4226 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 831, __FILE__, __LINE__, true);
4227 : 0 : return _r;
4228 : : }
4229 : : next_after_fail1142:;
4230 : : }
4231 : : }
4232 : : return NULL_TREE;
4233 : : }
4234 : :
4235 : : tree
4236 : 3718187 : generic_simplify_NEGATE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
4237 : : {
4238 : 3718187 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4239 : 3718187 : switch (TREE_CODE (_p0))
4240 : : {
4241 : 39218 : case PLUS_EXPR:
4242 : 39218 : {
4243 : 39218 : tree _q20 = TREE_OPERAND (_p0, 0);
4244 : 39218 : tree _q21 = TREE_OPERAND (_p0, 1);
4245 : 39218 : if (tree_negate_expr_p (_q21))
4246 : : {
4247 : 38162 : {
4248 : 38162 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4249 : 38162 : tree res = generic_simplify_462 (loc, type, _p0, captures);
4250 : 38162 : if (res) return res;
4251 : : }
4252 : : }
4253 : 1056 : if (tree_negate_expr_p (_q20))
4254 : : {
4255 : 9 : {
4256 : 9 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
4257 : 9 : tree res = generic_simplify_462 (loc, type, _p0, captures);
4258 : 9 : if (res) return res;
4259 : : }
4260 : : }
4261 : : break;
4262 : : }
4263 : 108417 : case MINUS_EXPR:
4264 : 108417 : {
4265 : 108417 : tree _q20 = TREE_OPERAND (_p0, 0);
4266 : 108417 : tree _q21 = TREE_OPERAND (_p0, 1);
4267 : 108417 : {
4268 : 108417 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4269 : 108417 : if ((ANY_INTEGRAL_TYPE_P (type) && !TYPE_OVERFLOW_SANITIZED (type))
4270 : 188206 : || (FLOAT_TYPE_P (type)
4271 : 79789 : && !HONOR_SIGN_DEPENDENT_ROUNDING (type)
4272 : 79789 : && !HONOR_SIGNED_ZEROS (type))
4273 : : )
4274 : : {
4275 : 28685 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1189;
4276 : 28685 : {
4277 : 28685 : tree res_op0;
4278 : 28685 : res_op0 = captures[1];
4279 : 28685 : tree res_op1;
4280 : 28685 : res_op1 = captures[0];
4281 : 28685 : tree _r;
4282 : 28685 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
4283 : 28685 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 867, __FILE__, __LINE__, true);
4284 : 28685 : return _r;
4285 : : }
4286 : 0 : next_after_fail1189:;
4287 : : }
4288 : : }
4289 : 79732 : break;
4290 : : }
4291 : 16 : case POINTER_DIFF_EXPR:
4292 : 16 : {
4293 : 16 : tree _q20 = TREE_OPERAND (_p0, 0);
4294 : 16 : tree _q21 = TREE_OPERAND (_p0, 1);
4295 : 16 : {
4296 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4297 : 16 : if (TYPE_OVERFLOW_UNDEFINED (type)
4298 : : )
4299 : : {
4300 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1190;
4301 : 16 : {
4302 : 16 : tree res_op0;
4303 : 16 : res_op0 = captures[1];
4304 : 16 : tree res_op1;
4305 : 16 : res_op1 = captures[0];
4306 : 16 : tree _r;
4307 : 16 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
4308 : 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 868, __FILE__, __LINE__, true);
4309 : 16 : return _r;
4310 : : }
4311 : 0 : next_after_fail1190:;
4312 : : }
4313 : : }
4314 : 0 : break;
4315 : : }
4316 : 4459 : case MULT_EXPR:
4317 : 4459 : {
4318 : 4459 : tree _q20 = TREE_OPERAND (_p0, 0);
4319 : 4459 : tree _q21 = TREE_OPERAND (_p0, 1);
4320 : 4459 : if (tree_negate_expr_p (_q21))
4321 : : {
4322 : 1763 : {
4323 : 1763 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4324 : 1763 : tree res = generic_simplify_463 (loc, type, _p0, captures);
4325 : 1763 : if (res) return res;
4326 : : }
4327 : : }
4328 : 3141 : if (tree_negate_expr_p (_q20))
4329 : : {
4330 : 27 : {
4331 : 27 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
4332 : 27 : tree res = generic_simplify_463 (loc, type, _p0, captures);
4333 : 27 : if (res) return res;
4334 : : }
4335 : : }
4336 : : break;
4337 : : }
4338 : 188 : case RDIV_EXPR:
4339 : 188 : {
4340 : 188 : tree _q20 = TREE_OPERAND (_p0, 0);
4341 : 188 : tree _q21 = TREE_OPERAND (_p0, 1);
4342 : 188 : if (tree_negate_expr_p (_q21))
4343 : : {
4344 : 60 : {
4345 : 60 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4346 : 60 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
4347 : 60 : && single_use (captures[0])
4348 : : )
4349 : : {
4350 : 60 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1191;
4351 : 60 : {
4352 : 60 : tree res_op0;
4353 : 60 : res_op0 = captures[1];
4354 : 60 : tree res_op1;
4355 : 60 : {
4356 : 60 : tree _o1[1], _r1;
4357 : 60 : _o1[0] = captures[2];
4358 : 60 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4359 : 60 : res_op1 = _r1;
4360 : : }
4361 : 60 : tree _r;
4362 : 60 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
4363 : 60 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 869, __FILE__, __LINE__, true);
4364 : 60 : return _r;
4365 : : }
4366 : 0 : next_after_fail1191:;
4367 : : }
4368 : : }
4369 : : }
4370 : 128 : if (tree_negate_expr_p (_q20))
4371 : : {
4372 : 0 : {
4373 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4374 : 0 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
4375 : 0 : && single_use (captures[0])
4376 : : )
4377 : : {
4378 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1192;
4379 : 0 : {
4380 : 0 : tree res_op0;
4381 : 0 : {
4382 : 0 : tree _o1[1], _r1;
4383 : 0 : _o1[0] = captures[1];
4384 : 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4385 : 0 : res_op0 = _r1;
4386 : : }
4387 : 0 : tree res_op1;
4388 : 0 : res_op1 = captures[2];
4389 : 0 : tree _r;
4390 : 0 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
4391 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 870, __FILE__, __LINE__, true);
4392 : 0 : return _r;
4393 : : }
4394 : 0 : next_after_fail1192:;
4395 : : }
4396 : : }
4397 : : }
4398 : : break;
4399 : : }
4400 : 745906 : CASE_CONVERT:
4401 : 745906 : {
4402 : 745906 : tree _q20 = TREE_OPERAND (_p0, 0);
4403 : 745906 : switch (TREE_CODE (_q20))
4404 : : {
4405 : 58 : case RSHIFT_EXPR:
4406 : 58 : {
4407 : 58 : tree _q30 = TREE_OPERAND (_q20, 0);
4408 : 58 : tree _q31 = TREE_OPERAND (_q20, 1);
4409 : 58 : switch (TREE_CODE (_q31))
4410 : : {
4411 : 43 : case INTEGER_CST:
4412 : 43 : {
4413 : 43 : {
4414 : 43 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
4415 : 43 : tree res = generic_simplify_464 (loc, type, _p0, captures);
4416 : 43 : if (res) return res;
4417 : : }
4418 : 36 : break;
4419 : : }
4420 : : default:;
4421 : : }
4422 : : break;
4423 : : }
4424 : 138 : case NEGATE_EXPR:
4425 : 138 : {
4426 : 138 : tree _q30 = TREE_OPERAND (_q20, 0);
4427 : 138 : {
4428 : 138 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4429 : 138 : if (!TYPE_SATURATING (type)
4430 : : )
4431 : : {
4432 : 138 : if (INTEGRAL_TYPE_P (type)
4433 : 138 : && (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
4434 : 17 : || (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
4435 : 32 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))))
4436 : 137 : && !TYPE_OVERFLOW_SANITIZED (type)
4437 : 291 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
4438 : : )
4439 : : {
4440 : 137 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1193;
4441 : 137 : {
4442 : 137 : tree res_op0;
4443 : 137 : res_op0 = captures[0];
4444 : 137 : tree _r;
4445 : 137 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4446 : 137 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 871, __FILE__, __LINE__, true);
4447 : 137 : return _r;
4448 : : }
4449 : 0 : next_after_fail1193:;
4450 : : }
4451 : : }
4452 : : }
4453 : : break;
4454 : : }
4455 : 745762 : default:;
4456 : : }
4457 : 745762 : {
4458 : 745762 : tree _q20_pops[1];
4459 : 745762 : if (tree_logical_inverted_value (_q20, _q20_pops))
4460 : : {
4461 : 1 : tree _q30 = _q20_pops[0];
4462 : 1 : {
4463 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
4464 : 1 : if (INTEGRAL_TYPE_P (type)
4465 : 1 : && TREE_CODE (type) != BOOLEAN_TYPE
4466 : 1 : && TYPE_PRECISION (type) > 1
4467 : 1 : && TREE_CODE (captures[2]) == SSA_NAME
4468 : 1 : && ssa_name_has_boolean_range (captures[2])
4469 : : )
4470 : : {
4471 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1194;
4472 : 0 : {
4473 : 0 : tree res_op0;
4474 : 0 : {
4475 : 0 : tree _o1[1], _r1;
4476 : 0 : _o1[0] = captures[2];
4477 : 0 : if (TREE_TYPE (_o1[0]) != type)
4478 : : {
4479 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
4480 : : }
4481 : : else
4482 : : _r1 = _o1[0];
4483 : 0 : res_op0 = _r1;
4484 : : }
4485 : 0 : tree res_op1;
4486 : 0 : res_op1 = build_all_ones_cst (type);
4487 : 0 : tree _r;
4488 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
4489 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 872, __FILE__, __LINE__, true);
4490 : 0 : return _r;
4491 : : }
4492 : 0 : next_after_fail1194:;
4493 : : }
4494 : : }
4495 : : }
4496 : : }
4497 : 745762 : if (tree_negate_expr_p (_q20))
4498 : : {
4499 : 1363 : {
4500 : 1363 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4501 : 1363 : if (!TYPE_SATURATING (type)
4502 : : )
4503 : : {
4504 : 1363 : if (SCALAR_FLOAT_TYPE_P (type)
4505 : 1363 : && ((DECIMAL_FLOAT_TYPE_P (type)
4506 : 0 : == DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
4507 : 0 : && TYPE_PRECISION (type) >= TYPE_PRECISION (TREE_TYPE (captures[0])))
4508 : 0 : || !HONOR_SIGN_DEPENDENT_ROUNDING (type))
4509 : : )
4510 : : {
4511 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1195;
4512 : 0 : {
4513 : 0 : tree res_op0;
4514 : 0 : {
4515 : 0 : tree _o1[1], _r1;
4516 : 0 : _o1[0] = captures[0];
4517 : 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4518 : 0 : res_op0 = _r1;
4519 : : }
4520 : 0 : tree _r;
4521 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4522 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 873, __FILE__, __LINE__, true);
4523 : 0 : return _r;
4524 : : }
4525 : 0 : next_after_fail1195:;
4526 : : }
4527 : : }
4528 : : }
4529 : : }
4530 : : break;
4531 : : }
4532 : 353 : case RSHIFT_EXPR:
4533 : 353 : {
4534 : 353 : tree _q20 = TREE_OPERAND (_p0, 0);
4535 : 353 : tree _q21 = TREE_OPERAND (_p0, 1);
4536 : 353 : switch (TREE_CODE (_q21))
4537 : : {
4538 : 335 : case INTEGER_CST:
4539 : 335 : {
4540 : 335 : {
4541 : 335 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4542 : 335 : tree res = generic_simplify_464 (loc, type, _p0, captures);
4543 : 335 : if (res) return res;
4544 : : }
4545 : 298 : break;
4546 : : }
4547 : : default:;
4548 : : }
4549 : : break;
4550 : : }
4551 : 147 : case BIT_NOT_EXPR:
4552 : 147 : {
4553 : 147 : tree _q20 = TREE_OPERAND (_p0, 0);
4554 : 147 : {
4555 : 147 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4556 : 147 : tree res = generic_simplify_465 (loc, type, _p0, captures);
4557 : 147 : if (res) return res;
4558 : : }
4559 : 0 : break;
4560 : : }
4561 : 3806 : case NEGATE_EXPR:
4562 : 3806 : {
4563 : 3806 : tree _q20 = TREE_OPERAND (_p0, 0);
4564 : 3806 : {
4565 : 3806 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4566 : 3806 : tree res = generic_simplify_466 (loc, type, _p0, captures);
4567 : 3806 : if (res) return res;
4568 : : }
4569 : 13 : break;
4570 : : }
4571 : 72 : case VEC_COND_EXPR:
4572 : 72 : {
4573 : 72 : tree _q20 = TREE_OPERAND (_p0, 0);
4574 : 72 : tree _q21 = TREE_OPERAND (_p0, 1);
4575 : 72 : tree _q22 = TREE_OPERAND (_p0, 2);
4576 : 72 : {
4577 : 72 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4578 : 72 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1196;
4579 : 72 : {
4580 : 72 : tree res_op0;
4581 : 72 : res_op0 = captures[1];
4582 : 72 : tree res_op1;
4583 : 72 : {
4584 : 72 : tree _o1[1], _r1;
4585 : 72 : _o1[0] = captures[2];
4586 : 72 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4587 : 72 : if (EXPR_P (_r1))
4588 : 0 : goto next_after_fail1196;
4589 : 72 : res_op1 = _r1;
4590 : : }
4591 : 72 : tree res_op2;
4592 : 72 : {
4593 : 72 : tree _o1[1], _r1;
4594 : 72 : _o1[0] = captures[3];
4595 : 72 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4596 : 72 : if (EXPR_P (_r1))
4597 : 0 : goto next_after_fail1196;
4598 : 72 : res_op2 = _r1;
4599 : : }
4600 : 72 : tree _r;
4601 : 72 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
4602 : 72 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 839, __FILE__, __LINE__, true);
4603 : 72 : return _r;
4604 : : }
4605 : 0 : next_after_fail1196:;
4606 : : }
4607 : 0 : break;
4608 : : }
4609 : 282082 : case CALL_EXPR:
4610 : 282082 : switch (get_call_combined_fn (_p0))
4611 : : {
4612 : 12 : case CFN_BUILT_IN_FMA:
4613 : 12 : if (call_expr_nargs (_p0) == 3)
4614 : : {
4615 : 12 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
4616 : 12 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
4617 : 12 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
4618 : 12 : {
4619 : 12 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4620 : 12 : tree res = generic_simplify_467 (loc, type, _p0, captures, CFN_BUILT_IN_FMA);
4621 : 12 : if (res) return res;
4622 : : }
4623 : : }
4624 : : break;
4625 : 4 : case CFN_BUILT_IN_FMAF:
4626 : 4 : if (call_expr_nargs (_p0) == 3)
4627 : : {
4628 : 4 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
4629 : 4 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
4630 : 4 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
4631 : 4 : {
4632 : 4 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4633 : 4 : tree res = generic_simplify_467 (loc, type, _p0, captures, CFN_BUILT_IN_FMAF);
4634 : 4 : if (res) return res;
4635 : : }
4636 : : }
4637 : : break;
4638 : 0 : case CFN_BUILT_IN_FMAL:
4639 : 0 : if (call_expr_nargs (_p0) == 3)
4640 : : {
4641 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
4642 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
4643 : 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
4644 : 0 : {
4645 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4646 : 0 : tree res = generic_simplify_467 (loc, type, _p0, captures, CFN_BUILT_IN_FMAL);
4647 : 0 : if (res) return res;
4648 : : }
4649 : : }
4650 : : break;
4651 : 0 : case CFN_FMA:
4652 : 0 : if (call_expr_nargs (_p0) == 3)
4653 : : {
4654 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
4655 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
4656 : 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
4657 : 0 : {
4658 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4659 : 0 : tree res = generic_simplify_467 (loc, type, _p0, captures, CFN_FMA);
4660 : 0 : if (res) return res;
4661 : : }
4662 : : }
4663 : : break;
4664 : 0 : case CFN_FMS:
4665 : 0 : if (call_expr_nargs (_p0) == 3)
4666 : : {
4667 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
4668 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
4669 : 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
4670 : 0 : {
4671 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4672 : 0 : if (canonicalize_math_after_vectorization_p ()
4673 : : )
4674 : : {
4675 : : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
4676 : : )
4677 : : {
4678 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1197;
4679 : : {
4680 : : tree res_op0;
4681 : : res_op0 = captures[1];
4682 : : tree res_op1;
4683 : : res_op1 = captures[2];
4684 : : tree res_op2;
4685 : : res_op2 = captures[3];
4686 : : tree _r;
4687 : : _r = maybe_build_call_expr_loc (loc, CFN_FNMA, type, 3, res_op0, res_op1, res_op2);
4688 : : if (!_r)
4689 : : goto next_after_fail1197;
4690 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 874, __FILE__, __LINE__, true);
4691 : : return _r;
4692 : : }
4693 : 0 : next_after_fail1197:;
4694 : : }
4695 : : }
4696 : : }
4697 : : }
4698 : : break;
4699 : 0 : case CFN_FNMA:
4700 : 0 : if (call_expr_nargs (_p0) == 3)
4701 : : {
4702 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
4703 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
4704 : 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
4705 : 0 : {
4706 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4707 : 0 : if (canonicalize_math_after_vectorization_p ()
4708 : : )
4709 : : {
4710 : : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
4711 : : )
4712 : : {
4713 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1198;
4714 : : {
4715 : : tree res_op0;
4716 : : res_op0 = captures[1];
4717 : : tree res_op1;
4718 : : res_op1 = captures[2];
4719 : : tree res_op2;
4720 : : res_op2 = captures[3];
4721 : : tree _r;
4722 : : _r = maybe_build_call_expr_loc (loc, CFN_FMS, type, 3, res_op0, res_op1, res_op2);
4723 : : if (!_r)
4724 : : goto next_after_fail1198;
4725 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 875, __FILE__, __LINE__, true);
4726 : : return _r;
4727 : : }
4728 : 0 : next_after_fail1198:;
4729 : : }
4730 : : }
4731 : : }
4732 : : }
4733 : : break;
4734 : 0 : case CFN_FNMS:
4735 : 0 : if (call_expr_nargs (_p0) == 3)
4736 : : {
4737 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
4738 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
4739 : 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
4740 : 0 : {
4741 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4742 : 0 : if (canonicalize_math_after_vectorization_p ()
4743 : : )
4744 : : {
4745 : : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
4746 : : )
4747 : : {
4748 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1199;
4749 : : {
4750 : : tree res_op0;
4751 : : res_op0 = captures[1];
4752 : : tree res_op1;
4753 : : res_op1 = captures[2];
4754 : : tree res_op2;
4755 : : res_op2 = captures[3];
4756 : : tree _r;
4757 : : _r = maybe_build_call_expr_loc (loc, CFN_FMA, type, 3, res_op0, res_op1, res_op2);
4758 : : if (!_r)
4759 : : goto next_after_fail1199;
4760 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 876, __FILE__, __LINE__, true);
4761 : : return _r;
4762 : : }
4763 : 0 : next_after_fail1199:;
4764 : : }
4765 : : }
4766 : : }
4767 : : }
4768 : : break;
4769 : : default:;
4770 : : }
4771 : : break;
4772 : 3645717 : default:;
4773 : : }
4774 : 3645717 : {
4775 : 3645717 : tree _p0_pops[1];
4776 : 3645717 : if (tree_nop_convert (_p0, _p0_pops))
4777 : : {
4778 : 1025108 : tree _q20 = _p0_pops[0];
4779 : 1025108 : switch (TREE_CODE (_q20))
4780 : : {
4781 : 0 : case BIT_NOT_EXPR:
4782 : 0 : {
4783 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4784 : 0 : {
4785 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4786 : 0 : tree res = generic_simplify_465 (loc, type, _p0, captures);
4787 : 0 : if (res) return res;
4788 : : }
4789 : 0 : break;
4790 : : }
4791 : 0 : case NEGATE_EXPR:
4792 : 0 : {
4793 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4794 : 0 : {
4795 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4796 : 0 : tree res = generic_simplify_466 (loc, type, _p0, captures);
4797 : 0 : if (res) return res;
4798 : : }
4799 : 0 : break;
4800 : : }
4801 : : default:;
4802 : : }
4803 : : }
4804 : : }
4805 : 3645717 : {
4806 : 3645717 : tree _p0_pops[1];
4807 : 3645717 : if (tree_logical_inverted_value (_p0, _p0_pops))
4808 : : {
4809 : 70 : tree _q20 = _p0_pops[0];
4810 : 70 : {
4811 : 70 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
4812 : 70 : if (INTEGRAL_TYPE_P (type)
4813 : 70 : && TREE_CODE (type) != BOOLEAN_TYPE
4814 : 70 : && TYPE_PRECISION (type) > 1
4815 : 70 : && TREE_CODE (captures[2]) == SSA_NAME
4816 : 70 : && ssa_name_has_boolean_range (captures[2])
4817 : : )
4818 : : {
4819 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1200;
4820 : 0 : {
4821 : 0 : tree res_op0;
4822 : 0 : {
4823 : 0 : tree _o1[1], _r1;
4824 : 0 : _o1[0] = captures[2];
4825 : 0 : if (TREE_TYPE (_o1[0]) != type)
4826 : : {
4827 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
4828 : : }
4829 : : else
4830 : : _r1 = _o1[0];
4831 : 0 : res_op0 = _r1;
4832 : : }
4833 : 0 : tree res_op1;
4834 : 0 : res_op1 = build_all_ones_cst (type);
4835 : 0 : tree _r;
4836 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
4837 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 872, __FILE__, __LINE__, true);
4838 : 0 : return _r;
4839 : : }
4840 : 0 : next_after_fail1200:;
4841 : : }
4842 : : }
4843 : : }
4844 : : }
4845 : 3645717 : {
4846 : 3645717 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4847 : 3645717 : tree res = generic_simplify_388 (loc, type, _p0, captures);
4848 : 3645717 : if (res) return res;
4849 : : }
4850 : 3631200 : return NULL_TREE;
4851 : : }
4852 : :
4853 : : tree
4854 : 25027077 : generic_simplify_EQ_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
4855 : : {
4856 : 25027077 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4857 : 25027077 : switch (TREE_CODE (_p1))
4858 : : {
4859 : 39 : case NEGATE_EXPR:
4860 : 39 : {
4861 : 39 : tree _q30 = TREE_OPERAND (_p1, 0);
4862 : 39 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
4863 : : {
4864 : 0 : {
4865 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4866 : 0 : tree res = generic_simplify_198 (loc, type, _p0, _p1, captures, EQ_EXPR);
4867 : 0 : if (res) return res;
4868 : : }
4869 : : }
4870 : : break;
4871 : : }
4872 : 25027077 : default:;
4873 : : }
4874 : 25027077 : switch (TREE_CODE (_p0))
4875 : : {
4876 : 905 : case NEGATE_EXPR:
4877 : 905 : {
4878 : 905 : tree _q20 = TREE_OPERAND (_p0, 0);
4879 : 905 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4880 : : {
4881 : 83 : {
4882 : 83 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4883 : 83 : tree res = generic_simplify_198 (loc, type, _p0, _p1, captures, EQ_EXPR);
4884 : 83 : if (res) return res;
4885 : : }
4886 : : }
4887 : : break;
4888 : : }
4889 : 0 : case CEIL_MOD_EXPR:
4890 : 0 : {
4891 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4892 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4893 : 0 : if (integer_pow2p (_q21))
4894 : : {
4895 : 0 : if (integer_zerop (_p1))
4896 : : {
4897 : 0 : {
4898 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4899 : 0 : tree res = generic_simplify_199 (loc, type, _p0, _p1, captures, EQ_EXPR, CEIL_MOD_EXPR);
4900 : 0 : if (res) return res;
4901 : : }
4902 : : }
4903 : : }
4904 : : break;
4905 : : }
4906 : 876 : case FLOOR_MOD_EXPR:
4907 : 876 : {
4908 : 876 : tree _q20 = TREE_OPERAND (_p0, 0);
4909 : 876 : tree _q21 = TREE_OPERAND (_p0, 1);
4910 : 876 : if (integer_pow2p (_q21))
4911 : : {
4912 : 26 : if (integer_zerop (_p1))
4913 : : {
4914 : 26 : {
4915 : 26 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4916 : 26 : tree res = generic_simplify_199 (loc, type, _p0, _p1, captures, EQ_EXPR, FLOOR_MOD_EXPR);
4917 : 26 : if (res) return res;
4918 : : }
4919 : : }
4920 : : }
4921 : : break;
4922 : : }
4923 : 0 : case ROUND_MOD_EXPR:
4924 : 0 : {
4925 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4926 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4927 : 0 : if (integer_pow2p (_q21))
4928 : : {
4929 : 0 : if (integer_zerop (_p1))
4930 : : {
4931 : 0 : {
4932 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4933 : 0 : tree res = generic_simplify_199 (loc, type, _p0, _p1, captures, EQ_EXPR, ROUND_MOD_EXPR);
4934 : 0 : if (res) return res;
4935 : : }
4936 : : }
4937 : : }
4938 : : break;
4939 : : }
4940 : 65351 : case TRUNC_MOD_EXPR:
4941 : 65351 : {
4942 : 65351 : tree _q20 = TREE_OPERAND (_p0, 0);
4943 : 65351 : tree _q21 = TREE_OPERAND (_p0, 1);
4944 : 65351 : if (integer_pow2p (_q21))
4945 : : {
4946 : 41049 : if (integer_zerop (_p1))
4947 : : {
4948 : 608 : {
4949 : 608 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4950 : 608 : tree res = generic_simplify_199 (loc, type, _p0, _p1, captures, EQ_EXPR, TRUNC_MOD_EXPR);
4951 : 608 : if (res) return res;
4952 : : }
4953 : : }
4954 : : }
4955 : : break;
4956 : : }
4957 : 1437 : case LSHIFT_EXPR:
4958 : 1437 : {
4959 : 1437 : tree _q20 = TREE_OPERAND (_p0, 0);
4960 : 1437 : tree _q21 = TREE_OPERAND (_p0, 1);
4961 : 1437 : if (tree_zero_one_valued_p (_q20))
4962 : : {
4963 : 267 : switch (TREE_CODE (_q21))
4964 : : {
4965 : 10 : case INTEGER_CST:
4966 : 10 : {
4967 : 10 : if (integer_zerop (_p1))
4968 : : {
4969 : 2 : {
4970 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4971 : 2 : if (tree_fits_shwi_p (captures[1])
4972 : 2 : && tree_to_shwi (captures[1]) > 0
4973 : 4 : && tree_to_shwi (captures[1]) < TYPE_PRECISION (TREE_TYPE (captures[0]))
4974 : : )
4975 : : {
4976 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1593;
4977 : 2 : {
4978 : 2 : tree res_op0;
4979 : 2 : res_op0 = captures[0];
4980 : 2 : tree res_op1;
4981 : 2 : res_op1 = captures[2];
4982 : 2 : tree _r;
4983 : 2 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
4984 : 2 : if (TREE_SIDE_EFFECTS (captures[1]))
4985 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4986 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 987, __FILE__, __LINE__, true);
4987 : 2 : return _r;
4988 : : }
4989 : 0 : next_after_fail1593:;
4990 : : }
4991 : : }
4992 : : }
4993 : : break;
4994 : : }
4995 : : default:;
4996 : : }
4997 : : }
4998 : : break;
4999 : : }
5000 : 892079 : case BIT_AND_EXPR:
5001 : 892079 : {
5002 : 892079 : tree _q20 = TREE_OPERAND (_p0, 0);
5003 : 892079 : tree _q21 = TREE_OPERAND (_p0, 1);
5004 : 892079 : if (tree_truth_valued_p (_q20))
5005 : : {
5006 : 19 : if (tree_truth_valued_p (_q21))
5007 : : {
5008 : 18 : switch (TREE_CODE (_p1))
5009 : : {
5010 : 0 : case BIT_XOR_EXPR:
5011 : 0 : {
5012 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5013 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5014 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5015 : : {
5016 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5017 : : {
5018 : 0 : {
5019 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5020 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1594;
5021 : 0 : {
5022 : 0 : tree res_op0;
5023 : 0 : {
5024 : 0 : tree _o1[2], _r1;
5025 : 0 : _o1[0] = captures[0];
5026 : 0 : _o1[1] = captures[1];
5027 : 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5028 : 0 : res_op0 = _r1;
5029 : : }
5030 : 0 : tree _r;
5031 : 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
5032 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 950, __FILE__, __LINE__, true);
5033 : 0 : return _r;
5034 : : }
5035 : 0 : next_after_fail1594:;
5036 : : }
5037 : : }
5038 : : }
5039 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5040 : : {
5041 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5042 : : {
5043 : 0 : {
5044 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
5045 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1595;
5046 : 0 : {
5047 : 0 : tree res_op0;
5048 : 0 : {
5049 : 0 : tree _o1[2], _r1;
5050 : 0 : _o1[0] = captures[0];
5051 : 0 : _o1[1] = captures[1];
5052 : 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5053 : 0 : res_op0 = _r1;
5054 : : }
5055 : 0 : tree _r;
5056 : 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
5057 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 950, __FILE__, __LINE__, true);
5058 : 0 : return _r;
5059 : : }
5060 : 0 : next_after_fail1595:;
5061 : : }
5062 : : }
5063 : : }
5064 : : break;
5065 : : }
5066 : : default:;
5067 : : }
5068 : : }
5069 : : }
5070 : : break;
5071 : : }
5072 : 596 : case BIT_XOR_EXPR:
5073 : 596 : {
5074 : 596 : tree _q20 = TREE_OPERAND (_p0, 0);
5075 : 596 : tree _q21 = TREE_OPERAND (_p0, 1);
5076 : 596 : switch (TREE_CODE (_p1))
5077 : : {
5078 : 0 : case BIT_AND_EXPR:
5079 : 0 : {
5080 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5081 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5082 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5083 : : {
5084 : 0 : if (tree_truth_valued_p (_q50))
5085 : : {
5086 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5087 : : {
5088 : 0 : if (tree_truth_valued_p (_q51))
5089 : : {
5090 : 0 : {
5091 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5092 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1596;
5093 : 0 : {
5094 : 0 : tree res_op0;
5095 : 0 : {
5096 : 0 : tree _o1[2], _r1;
5097 : 0 : _o1[0] = captures[0];
5098 : 0 : _o1[1] = captures[1];
5099 : 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5100 : 0 : res_op0 = _r1;
5101 : : }
5102 : 0 : tree _r;
5103 : 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
5104 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 950, __FILE__, __LINE__, true);
5105 : 0 : return _r;
5106 : : }
5107 : 0 : next_after_fail1596:;
5108 : : }
5109 : : }
5110 : : }
5111 : : }
5112 : : }
5113 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5114 : : {
5115 : 0 : if (tree_truth_valued_p (_q50))
5116 : : {
5117 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5118 : : {
5119 : 0 : if (tree_truth_valued_p (_q51))
5120 : : {
5121 : 0 : {
5122 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5123 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1597;
5124 : 0 : {
5125 : 0 : tree res_op0;
5126 : 0 : {
5127 : 0 : tree _o1[2], _r1;
5128 : 0 : _o1[0] = captures[0];
5129 : 0 : _o1[1] = captures[1];
5130 : 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5131 : 0 : res_op0 = _r1;
5132 : : }
5133 : 0 : tree _r;
5134 : 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
5135 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 950, __FILE__, __LINE__, true);
5136 : 0 : return _r;
5137 : : }
5138 : 0 : next_after_fail1597:;
5139 : : }
5140 : : }
5141 : : }
5142 : : }
5143 : : }
5144 : : break;
5145 : : }
5146 : : default:;
5147 : : }
5148 : : break;
5149 : : }
5150 : 405 : case BIT_NOT_EXPR:
5151 : 405 : {
5152 : 405 : tree _q20 = TREE_OPERAND (_p0, 0);
5153 : 405 : if (tree_truth_valued_p (_q20))
5154 : : {
5155 : 0 : if (tree_truth_valued_p (_p1))
5156 : : {
5157 : 0 : {
5158 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
5159 : 0 : tree res = generic_simplify_201 (loc, type, _p0, _p1, captures);
5160 : 0 : if (res) return res;
5161 : : }
5162 : : }
5163 : : }
5164 : : break;
5165 : : }
5166 : 63450 : case MULT_EXPR:
5167 : 63450 : {
5168 : 63450 : tree _q20 = TREE_OPERAND (_p0, 0);
5169 : 63450 : tree _q21 = TREE_OPERAND (_p0, 1);
5170 : 63450 : switch (TREE_CODE (_p1))
5171 : : {
5172 : 646 : case MULT_EXPR:
5173 : 646 : {
5174 : 646 : tree _q50 = TREE_OPERAND (_p1, 0);
5175 : 646 : tree _q51 = TREE_OPERAND (_p1, 1);
5176 : 646 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5177 : : {
5178 : 469 : {
5179 : 469 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5180 : 469 : tree res = generic_simplify_202 (loc, type, _p0, _p1, captures, EQ_EXPR);
5181 : 469 : if (res) return res;
5182 : : }
5183 : : }
5184 : 638 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5185 : : {
5186 : 0 : {
5187 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5188 : 0 : tree res = generic_simplify_202 (loc, type, _p0, _p1, captures, EQ_EXPR);
5189 : 0 : if (res) return res;
5190 : : }
5191 : : }
5192 : 638 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5193 : : {
5194 : 0 : {
5195 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
5196 : 0 : tree res = generic_simplify_202 (loc, type, _p0, _p1, captures, EQ_EXPR);
5197 : 0 : if (res) return res;
5198 : : }
5199 : : }
5200 : 638 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5201 : : {
5202 : 15 : {
5203 : 15 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
5204 : 15 : tree res = generic_simplify_202 (loc, type, _p0, _p1, captures, EQ_EXPR);
5205 : 15 : if (res) return res;
5206 : : }
5207 : : }
5208 : : break;
5209 : : }
5210 : 63442 : default:;
5211 : : }
5212 : 63442 : switch (TREE_CODE (_q21))
5213 : : {
5214 : 56193 : case INTEGER_CST:
5215 : 56193 : {
5216 : 56193 : switch (TREE_CODE (_p1))
5217 : : {
5218 : 602 : case MULT_EXPR:
5219 : 602 : {
5220 : 602 : tree _q50 = TREE_OPERAND (_p1, 0);
5221 : 602 : tree _q51 = TREE_OPERAND (_p1, 1);
5222 : 602 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5223 : : {
5224 : 432 : {
5225 : 432 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5226 : 432 : tree res = generic_simplify_203 (loc, type, _p0, _p1, captures, EQ_EXPR);
5227 : 432 : if (res) return res;
5228 : : }
5229 : : }
5230 : : break;
5231 : : }
5232 : : default:;
5233 : : }
5234 : : break;
5235 : : }
5236 : : default:;
5237 : : }
5238 : : break;
5239 : : }
5240 : 4340919 : CASE_CONVERT:
5241 : 4340919 : {
5242 : 4340919 : tree _q20 = TREE_OPERAND (_p0, 0);
5243 : 4340919 : switch (TREE_CODE (_q20))
5244 : : {
5245 : 80 : case EXACT_DIV_EXPR:
5246 : 80 : {
5247 : 80 : tree _q30 = TREE_OPERAND (_q20, 0);
5248 : 80 : tree _q31 = TREE_OPERAND (_q20, 1);
5249 : 80 : switch (TREE_CODE (_q31))
5250 : : {
5251 : 80 : case INTEGER_CST:
5252 : 80 : {
5253 : 80 : switch (TREE_CODE (_p1))
5254 : : {
5255 : 0 : CASE_CONVERT:
5256 : 0 : {
5257 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5258 : 0 : switch (TREE_CODE (_q60))
5259 : : {
5260 : 0 : case EXACT_DIV_EXPR:
5261 : 0 : {
5262 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5263 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5264 : 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
5265 : : {
5266 : 0 : {
5267 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q70 };
5268 : 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
5269 : 0 : if (res) return res;
5270 : : }
5271 : : }
5272 : : break;
5273 : : }
5274 : : default:;
5275 : : }
5276 : : break;
5277 : : }
5278 : : default:;
5279 : : }
5280 : : break;
5281 : : }
5282 : : default:;
5283 : : }
5284 : : break;
5285 : : }
5286 : 4340919 : default:;
5287 : : }
5288 : 4340919 : switch (TREE_CODE (_p1))
5289 : : {
5290 : 28442 : case PLUS_EXPR:
5291 : 28442 : {
5292 : 28442 : tree _q40 = TREE_OPERAND (_p1, 0);
5293 : 28442 : tree _q41 = TREE_OPERAND (_p1, 1);
5294 : 28442 : switch (TREE_CODE (_q41))
5295 : : {
5296 : 26 : CASE_CONVERT:
5297 : 26 : {
5298 : 26 : tree _q60 = TREE_OPERAND (_q41, 0);
5299 : 26 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5300 : : {
5301 : 0 : {
5302 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q40, _q20 };
5303 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5304 : 0 : if (res) return res;
5305 : : }
5306 : : }
5307 : : break;
5308 : : }
5309 : 28442 : default:;
5310 : : }
5311 : 28442 : switch (TREE_CODE (_q40))
5312 : : {
5313 : 4003 : CASE_CONVERT:
5314 : 4003 : {
5315 : 4003 : tree _q50 = TREE_OPERAND (_q40, 0);
5316 : 4003 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5317 : : {
5318 : 0 : {
5319 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q41, _q20 };
5320 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5321 : 0 : if (res) return res;
5322 : : }
5323 : : }
5324 : : break;
5325 : : }
5326 : 28442 : default:;
5327 : : }
5328 : 28442 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
5329 : : {
5330 : 0 : {
5331 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q40, _q20 };
5332 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5333 : 0 : if (res) return res;
5334 : : }
5335 : : }
5336 : 28442 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
5337 : : {
5338 : 0 : {
5339 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q41, _q20 };
5340 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5341 : 0 : if (res) return res;
5342 : : }
5343 : : }
5344 : : break;
5345 : : }
5346 : 4340919 : default:;
5347 : : }
5348 : 4340919 : {
5349 : 4340919 : tree _p1_pops[1];
5350 : 4340919 : if (tree_nop_convert (_p1, _p1_pops))
5351 : : {
5352 : 710674 : tree _q40 = _p1_pops[0];
5353 : 710674 : switch (TREE_CODE (_q40))
5354 : : {
5355 : 471 : case PLUS_EXPR:
5356 : 471 : {
5357 : 471 : tree _q50 = TREE_OPERAND (_q40, 0);
5358 : 471 : tree _q51 = TREE_OPERAND (_q40, 1);
5359 : 471 : switch (TREE_CODE (_q51))
5360 : : {
5361 : 0 : CASE_CONVERT:
5362 : 0 : {
5363 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
5364 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5365 : : {
5366 : 0 : {
5367 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q50, _q20 };
5368 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5369 : 0 : if (res) return res;
5370 : : }
5371 : : }
5372 : : break;
5373 : : }
5374 : 471 : default:;
5375 : : }
5376 : 471 : switch (TREE_CODE (_q50))
5377 : : {
5378 : 402 : CASE_CONVERT:
5379 : 402 : {
5380 : 402 : tree _q60 = TREE_OPERAND (_q50, 0);
5381 : 402 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5382 : : {
5383 : 0 : {
5384 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q51, _q20 };
5385 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5386 : 0 : if (res) return res;
5387 : : }
5388 : : }
5389 : : break;
5390 : : }
5391 : 471 : default:;
5392 : : }
5393 : 471 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5394 : : {
5395 : 0 : {
5396 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q50, _q20 };
5397 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5398 : 0 : if (res) return res;
5399 : : }
5400 : : }
5401 : 471 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5402 : : {
5403 : 0 : {
5404 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q51, _q20 };
5405 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5406 : 0 : if (res) return res;
5407 : : }
5408 : : }
5409 : : break;
5410 : : }
5411 : : default:;
5412 : : }
5413 : : }
5414 : : }
5415 : 4340919 : break;
5416 : : }
5417 : 8561 : case EXACT_DIV_EXPR:
5418 : 8561 : {
5419 : 8561 : tree _q20 = TREE_OPERAND (_p0, 0);
5420 : 8561 : tree _q21 = TREE_OPERAND (_p0, 1);
5421 : 8561 : switch (TREE_CODE (_q21))
5422 : : {
5423 : 8561 : case INTEGER_CST:
5424 : 8561 : {
5425 : 8561 : switch (TREE_CODE (_p1))
5426 : : {
5427 : 0 : case EXACT_DIV_EXPR:
5428 : 0 : {
5429 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5430 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5431 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5432 : : {
5433 : 0 : {
5434 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
5435 : 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
5436 : 0 : if (res) return res;
5437 : : }
5438 : : }
5439 : : break;
5440 : : }
5441 : : default:;
5442 : : }
5443 : : break;
5444 : : }
5445 : : default:;
5446 : : }
5447 : : break;
5448 : : }
5449 : 5377 : case TRUNC_DIV_EXPR:
5450 : 5377 : {
5451 : 5377 : tree _q20 = TREE_OPERAND (_p0, 0);
5452 : 5377 : tree _q21 = TREE_OPERAND (_p0, 1);
5453 : 5377 : switch (TREE_CODE (_q21))
5454 : : {
5455 : 3889 : case INTEGER_CST:
5456 : 3889 : {
5457 : 3889 : switch (TREE_CODE (_p1))
5458 : : {
5459 : 973 : case INTEGER_CST:
5460 : 973 : {
5461 : 973 : {
5462 : 973 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
5463 : 973 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5464 : 973 : if (res) return res;
5465 : : }
5466 : 19 : break;
5467 : : }
5468 : : default:;
5469 : : }
5470 : : break;
5471 : : }
5472 : : default:;
5473 : : }
5474 : : break;
5475 : : }
5476 : 706911 : case PLUS_EXPR:
5477 : 706911 : {
5478 : 706911 : tree _q20 = TREE_OPERAND (_p0, 0);
5479 : 706911 : tree _q21 = TREE_OPERAND (_p0, 1);
5480 : 706911 : switch (TREE_CODE (_p1))
5481 : : {
5482 : 47693 : case PLUS_EXPR:
5483 : 47693 : {
5484 : 47693 : tree _q50 = TREE_OPERAND (_p1, 0);
5485 : 47693 : tree _q51 = TREE_OPERAND (_p1, 1);
5486 : 47693 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5487 : : {
5488 : 349 : {
5489 : 349 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5490 : 698 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5491 : 636 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5492 : 253 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5493 : : )
5494 : : {
5495 : 287 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1598;
5496 : 287 : {
5497 : 287 : tree res_op0;
5498 : 287 : res_op0 = captures[0];
5499 : 287 : tree res_op1;
5500 : 287 : res_op1 = captures[2];
5501 : 287 : tree _r;
5502 : 287 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5503 : 287 : if (TREE_SIDE_EFFECTS (captures[1]))
5504 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5505 : 287 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
5506 : 287 : return _r;
5507 : : }
5508 : 0 : next_after_fail1598:;
5509 : : }
5510 : : }
5511 : : }
5512 : 47406 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5513 : : {
5514 : 0 : {
5515 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5516 : 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5517 : 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5518 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5519 : : )
5520 : : {
5521 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1599;
5522 : 0 : {
5523 : 0 : tree res_op0;
5524 : 0 : res_op0 = captures[0];
5525 : 0 : tree res_op1;
5526 : 0 : res_op1 = captures[2];
5527 : 0 : tree _r;
5528 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5529 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5530 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5531 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
5532 : 0 : return _r;
5533 : : }
5534 : 0 : next_after_fail1599:;
5535 : : }
5536 : : }
5537 : : }
5538 : 47406 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5539 : : {
5540 : 0 : {
5541 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
5542 : 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5543 : 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5544 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5545 : : )
5546 : : {
5547 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1600;
5548 : 0 : {
5549 : 0 : tree res_op0;
5550 : 0 : res_op0 = captures[0];
5551 : 0 : tree res_op1;
5552 : 0 : res_op1 = captures[2];
5553 : 0 : tree _r;
5554 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5555 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5556 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5557 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
5558 : 0 : return _r;
5559 : : }
5560 : 0 : next_after_fail1600:;
5561 : : }
5562 : : }
5563 : : }
5564 : 47406 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5565 : : {
5566 : 35 : {
5567 : 35 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
5568 : 70 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5569 : 35 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5570 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5571 : : )
5572 : : {
5573 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1601;
5574 : 0 : {
5575 : 0 : tree res_op0;
5576 : 0 : res_op0 = captures[0];
5577 : 0 : tree res_op1;
5578 : 0 : res_op1 = captures[2];
5579 : 0 : tree _r;
5580 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5581 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5582 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5583 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
5584 : 0 : return _r;
5585 : : }
5586 : 0 : next_after_fail1601:;
5587 : : }
5588 : : }
5589 : : }
5590 : : break;
5591 : : }
5592 : 706624 : default:;
5593 : : }
5594 : 706624 : switch (TREE_CODE (_q21))
5595 : : {
5596 : 2505 : CASE_CONVERT:
5597 : 2505 : {
5598 : 2505 : tree _q40 = TREE_OPERAND (_q21, 0);
5599 : 2505 : switch (TREE_CODE (_p1))
5600 : : {
5601 : 158 : CASE_CONVERT:
5602 : 158 : {
5603 : 158 : tree _q60 = TREE_OPERAND (_p1, 0);
5604 : 158 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
5605 : : {
5606 : 0 : {
5607 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40 };
5608 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5609 : 0 : if (res) return res;
5610 : : }
5611 : : }
5612 : : break;
5613 : : }
5614 : : default:;
5615 : : }
5616 : : break;
5617 : : }
5618 : 706624 : default:;
5619 : : }
5620 : 706624 : switch (TREE_CODE (_q20))
5621 : : {
5622 : 47459 : CASE_CONVERT:
5623 : 47459 : {
5624 : 47459 : tree _q30 = TREE_OPERAND (_q20, 0);
5625 : 47459 : switch (TREE_CODE (_p1))
5626 : : {
5627 : 21053 : CASE_CONVERT:
5628 : 21053 : {
5629 : 21053 : tree _q60 = TREE_OPERAND (_p1, 0);
5630 : 21053 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
5631 : : {
5632 : 1 : {
5633 : 1 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q30 };
5634 : 1 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5635 : 1 : if (res) return res;
5636 : : }
5637 : : }
5638 : : break;
5639 : : }
5640 : 47458 : default:;
5641 : : }
5642 : 47458 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
5643 : : {
5644 : 0 : {
5645 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q30 };
5646 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5647 : 0 : if (res) return res;
5648 : : }
5649 : : }
5650 : : break;
5651 : : }
5652 : 706623 : default:;
5653 : : }
5654 : 706623 : switch (TREE_CODE (_q21))
5655 : : {
5656 : 2505 : CASE_CONVERT:
5657 : 2505 : {
5658 : 2505 : tree _q40 = TREE_OPERAND (_q21, 0);
5659 : 2505 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
5660 : : {
5661 : 0 : {
5662 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40 };
5663 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5664 : 0 : if (res) return res;
5665 : : }
5666 : : }
5667 : : break;
5668 : : }
5669 : 706623 : default:;
5670 : : }
5671 : 706623 : switch (TREE_CODE (_p1))
5672 : : {
5673 : 39964 : CASE_CONVERT:
5674 : 39964 : {
5675 : 39964 : tree _q50 = TREE_OPERAND (_p1, 0);
5676 : 39964 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5677 : : {
5678 : 0 : {
5679 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5680 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5681 : 0 : if (res) return res;
5682 : : }
5683 : : }
5684 : 39964 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5685 : : {
5686 : 0 : {
5687 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q20 };
5688 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5689 : 0 : if (res) return res;
5690 : : }
5691 : : }
5692 : : break;
5693 : : }
5694 : 706623 : default:;
5695 : : }
5696 : 706623 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
5697 : : {
5698 : 18934 : {
5699 : 18934 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5700 : 18934 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5701 : 18934 : if (res) return res;
5702 : : }
5703 : : }
5704 : 687749 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5705 : : {
5706 : 65 : {
5707 : 65 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q20 };
5708 : 65 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
5709 : 65 : if (res) return res;
5710 : : }
5711 : : }
5712 : : break;
5713 : : }
5714 : 72960 : case POINTER_PLUS_EXPR:
5715 : 72960 : {
5716 : 72960 : tree _q20 = TREE_OPERAND (_p0, 0);
5717 : 72960 : tree _q21 = TREE_OPERAND (_p0, 1);
5718 : 72960 : switch (TREE_CODE (_p1))
5719 : : {
5720 : 2377 : case POINTER_PLUS_EXPR:
5721 : 2377 : {
5722 : 2377 : tree _q50 = TREE_OPERAND (_p1, 0);
5723 : 2377 : tree _q51 = TREE_OPERAND (_p1, 1);
5724 : 2377 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5725 : : {
5726 : 26 : {
5727 : 26 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5728 : 26 : tree res = generic_simplify_208 (loc, type, _p0, _p1, captures, EQ_EXPR);
5729 : 26 : if (res) return res;
5730 : : }
5731 : : }
5732 : : break;
5733 : : }
5734 : 72934 : default:;
5735 : : }
5736 : 72934 : switch (TREE_CODE (_q20))
5737 : : {
5738 : 1468 : CASE_CONVERT:
5739 : 1468 : {
5740 : 1468 : tree _q30 = TREE_OPERAND (_q20, 0);
5741 : 1468 : switch (TREE_CODE (_p1))
5742 : : {
5743 : 96 : CASE_CONVERT:
5744 : 96 : {
5745 : 96 : tree _q60 = TREE_OPERAND (_p1, 0);
5746 : 96 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
5747 : : {
5748 : 60 : {
5749 : 60 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q21 };
5750 : 60 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
5751 : 60 : if (res) return res;
5752 : : }
5753 : : }
5754 : : break;
5755 : : }
5756 : 1408 : default:;
5757 : : }
5758 : 1408 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
5759 : : {
5760 : 0 : {
5761 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q21 };
5762 : 0 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
5763 : 0 : if (res) return res;
5764 : : }
5765 : : }
5766 : : break;
5767 : : }
5768 : 72874 : default:;
5769 : : }
5770 : 72874 : switch (TREE_CODE (_p1))
5771 : : {
5772 : 399 : CASE_CONVERT:
5773 : 399 : {
5774 : 399 : tree _q50 = TREE_OPERAND (_p1, 0);
5775 : 399 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5776 : : {
5777 : 0 : {
5778 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5779 : 0 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
5780 : 0 : if (res) return res;
5781 : : }
5782 : : }
5783 : : break;
5784 : : }
5785 : 72874 : default:;
5786 : : }
5787 : 72874 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5788 : : {
5789 : 1184 : {
5790 : 1184 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5791 : 1184 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
5792 : 1184 : if (res) return res;
5793 : : }
5794 : : }
5795 : : break;
5796 : : }
5797 : 118386 : case MINUS_EXPR:
5798 : 118386 : {
5799 : 118386 : tree _q20 = TREE_OPERAND (_p0, 0);
5800 : 118386 : tree _q21 = TREE_OPERAND (_p0, 1);
5801 : 118386 : switch (TREE_CODE (_p1))
5802 : : {
5803 : 190 : case MINUS_EXPR:
5804 : 190 : {
5805 : 190 : tree _q50 = TREE_OPERAND (_p1, 0);
5806 : 190 : tree _q51 = TREE_OPERAND (_p1, 1);
5807 : 190 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5808 : : {
5809 : 18 : {
5810 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5811 : 36 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5812 : 18 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5813 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5814 : : )
5815 : : {
5816 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1602;
5817 : 0 : {
5818 : 0 : tree res_op0;
5819 : 0 : res_op0 = captures[0];
5820 : 0 : tree res_op1;
5821 : 0 : res_op1 = captures[2];
5822 : 0 : tree _r;
5823 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5824 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5825 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5826 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
5827 : 0 : return _r;
5828 : : }
5829 : 0 : next_after_fail1602:;
5830 : : }
5831 : : }
5832 : : }
5833 : 190 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5834 : : {
5835 : 18 : {
5836 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5837 : 36 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5838 : 18 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
5839 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
5840 : : )
5841 : : {
5842 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1603;
5843 : 0 : {
5844 : 0 : tree res_op0;
5845 : 0 : res_op0 = captures[2];
5846 : 0 : tree res_op1;
5847 : 0 : res_op1 = captures[1];
5848 : 0 : tree _r;
5849 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5850 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
5851 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5852 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 929, __FILE__, __LINE__, true);
5853 : 0 : return _r;
5854 : : }
5855 : 0 : next_after_fail1603:;
5856 : : }
5857 : : }
5858 : : }
5859 : : break;
5860 : : }
5861 : 118386 : default:;
5862 : : }
5863 : 118386 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5864 : : {
5865 : 74 : {
5866 : 74 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
5867 : 74 : tree res = generic_simplify_210 (loc, type, _p0, _p1, captures, EQ_EXPR);
5868 : 74 : if (res) return res;
5869 : : }
5870 : : }
5871 : : break;
5872 : : }
5873 : 35146 : case POINTER_DIFF_EXPR:
5874 : 35146 : {
5875 : 35146 : tree _q20 = TREE_OPERAND (_p0, 0);
5876 : 35146 : tree _q21 = TREE_OPERAND (_p0, 1);
5877 : 35146 : switch (TREE_CODE (_p1))
5878 : : {
5879 : 949 : case POINTER_DIFF_EXPR:
5880 : 949 : {
5881 : 949 : tree _q50 = TREE_OPERAND (_p1, 0);
5882 : 949 : tree _q51 = TREE_OPERAND (_p1, 1);
5883 : 949 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5884 : : {
5885 : 0 : {
5886 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
5887 : 0 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, EQ_EXPR);
5888 : 0 : if (res) return res;
5889 : : }
5890 : : }
5891 : 949 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5892 : : {
5893 : 0 : {
5894 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
5895 : 0 : tree res = generic_simplify_212 (loc, type, _p0, _p1, captures, EQ_EXPR);
5896 : 0 : if (res) return res;
5897 : : }
5898 : : }
5899 : : break;
5900 : : }
5901 : : default:;
5902 : : }
5903 : : break;
5904 : : }
5905 : 25004913 : default:;
5906 : : }
5907 : 25004913 : {
5908 : 25004913 : tree _p0_pops[1];
5909 : 25004913 : if (tree_logical_inverted_value (_p0, _p0_pops))
5910 : : {
5911 : 4978 : tree _q20 = _p0_pops[0];
5912 : 4978 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5913 : : {
5914 : 9 : if (tree_truth_valued_p (_p1))
5915 : : {
5916 : 0 : {
5917 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5918 : 0 : tree res = generic_simplify_200 (loc, type, _p0, _p1, captures, EQ_EXPR);
5919 : 0 : if (res) return res;
5920 : : }
5921 : : }
5922 : : }
5923 : : }
5924 : : }
5925 : 25004913 : {
5926 : 25004913 : tree _p0_pops[1];
5927 : 25004913 : if (tree_nop_convert (_p0, _p0_pops))
5928 : : {
5929 : 2633718 : tree _q20 = _p0_pops[0];
5930 : 2633718 : switch (TREE_CODE (_q20))
5931 : : {
5932 : 2449 : case PLUS_EXPR:
5933 : 2449 : {
5934 : 2449 : tree _q30 = TREE_OPERAND (_q20, 0);
5935 : 2449 : tree _q31 = TREE_OPERAND (_q20, 1);
5936 : 2449 : switch (TREE_CODE (_q31))
5937 : : {
5938 : 0 : CASE_CONVERT:
5939 : 0 : {
5940 : 0 : tree _q50 = TREE_OPERAND (_q31, 0);
5941 : 0 : switch (TREE_CODE (_p1))
5942 : : {
5943 : 0 : CASE_CONVERT:
5944 : 0 : {
5945 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
5946 : 0 : if ((_q70 == _q50 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q50, 0) && types_match (_q70, _q50)))
5947 : : {
5948 : 0 : {
5949 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50 };
5950 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5951 : 0 : if (res) return res;
5952 : : }
5953 : : }
5954 : : break;
5955 : : }
5956 : : default:;
5957 : : }
5958 : : break;
5959 : : }
5960 : 2449 : default:;
5961 : : }
5962 : 2449 : switch (TREE_CODE (_q30))
5963 : : {
5964 : 1313 : CASE_CONVERT:
5965 : 1313 : {
5966 : 1313 : tree _q40 = TREE_OPERAND (_q30, 0);
5967 : 1313 : switch (TREE_CODE (_p1))
5968 : : {
5969 : 36 : CASE_CONVERT:
5970 : 36 : {
5971 : 36 : tree _q70 = TREE_OPERAND (_p1, 0);
5972 : 36 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
5973 : : {
5974 : 0 : {
5975 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q40 };
5976 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5977 : 0 : if (res) return res;
5978 : : }
5979 : : }
5980 : : break;
5981 : : }
5982 : 1313 : default:;
5983 : : }
5984 : 1313 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
5985 : : {
5986 : 0 : {
5987 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q40 };
5988 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5989 : 0 : if (res) return res;
5990 : : }
5991 : : }
5992 : : break;
5993 : : }
5994 : 2449 : default:;
5995 : : }
5996 : 2449 : switch (TREE_CODE (_q31))
5997 : : {
5998 : 0 : CASE_CONVERT:
5999 : 0 : {
6000 : 0 : tree _q50 = TREE_OPERAND (_q31, 0);
6001 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
6002 : : {
6003 : 0 : {
6004 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50 };
6005 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6006 : 0 : if (res) return res;
6007 : : }
6008 : : }
6009 : : break;
6010 : : }
6011 : 2449 : default:;
6012 : : }
6013 : 2449 : switch (TREE_CODE (_p1))
6014 : : {
6015 : 105 : CASE_CONVERT:
6016 : 105 : {
6017 : 105 : tree _q60 = TREE_OPERAND (_p1, 0);
6018 : 105 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
6019 : : {
6020 : 0 : {
6021 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6022 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6023 : 0 : if (res) return res;
6024 : : }
6025 : : }
6026 : 105 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
6027 : : {
6028 : 0 : {
6029 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30 };
6030 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6031 : 0 : if (res) return res;
6032 : : }
6033 : : }
6034 : : break;
6035 : : }
6036 : 2449 : default:;
6037 : : }
6038 : 2449 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
6039 : : {
6040 : 0 : {
6041 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6042 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6043 : 0 : if (res) return res;
6044 : : }
6045 : : }
6046 : 2449 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6047 : : {
6048 : 0 : {
6049 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30 };
6050 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6051 : 0 : if (res) return res;
6052 : : }
6053 : : }
6054 : : break;
6055 : : }
6056 : 97 : case POINTER_PLUS_EXPR:
6057 : 97 : {
6058 : 97 : tree _q30 = TREE_OPERAND (_q20, 0);
6059 : 97 : tree _q31 = TREE_OPERAND (_q20, 1);
6060 : 97 : switch (TREE_CODE (_q30))
6061 : : {
6062 : 21 : CASE_CONVERT:
6063 : 21 : {
6064 : 21 : tree _q40 = TREE_OPERAND (_q30, 0);
6065 : 21 : switch (TREE_CODE (_p1))
6066 : : {
6067 : 0 : CASE_CONVERT:
6068 : 0 : {
6069 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
6070 : 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
6071 : : {
6072 : 0 : {
6073 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q31 };
6074 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6075 : 0 : if (res) return res;
6076 : : }
6077 : : }
6078 : : break;
6079 : : }
6080 : 21 : default:;
6081 : : }
6082 : 21 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6083 : : {
6084 : 0 : {
6085 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q31 };
6086 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6087 : 0 : if (res) return res;
6088 : : }
6089 : : }
6090 : : break;
6091 : : }
6092 : 97 : default:;
6093 : : }
6094 : 97 : switch (TREE_CODE (_p1))
6095 : : {
6096 : 27 : CASE_CONVERT:
6097 : 27 : {
6098 : 27 : tree _q60 = TREE_OPERAND (_p1, 0);
6099 : 27 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
6100 : : {
6101 : 0 : {
6102 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6103 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6104 : 0 : if (res) return res;
6105 : : }
6106 : : }
6107 : : break;
6108 : : }
6109 : 97 : default:;
6110 : : }
6111 : 97 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6112 : : {
6113 : 0 : {
6114 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6115 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6116 : 0 : if (res) return res;
6117 : : }
6118 : : }
6119 : : break;
6120 : : }
6121 : : default:;
6122 : : }
6123 : : }
6124 : : }
6125 : 25004913 : if (tree_truth_valued_p (_p0))
6126 : : {
6127 : 476713 : switch (TREE_CODE (_p1))
6128 : : {
6129 : 24 : case BIT_NOT_EXPR:
6130 : 24 : {
6131 : 24 : tree _q30 = TREE_OPERAND (_p1, 0);
6132 : 24 : if (tree_truth_valued_p (_q30))
6133 : : {
6134 : 4 : {
6135 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
6136 : 4 : tree res = generic_simplify_201 (loc, type, _p0, _p1, captures);
6137 : 4 : if (res) return res;
6138 : : }
6139 : : }
6140 : : break;
6141 : : }
6142 : 476713 : default:;
6143 : : }
6144 : 476713 : {
6145 : 476713 : tree _p1_pops[1];
6146 : 476713 : if (tree_logical_inverted_value (_p1, _p1_pops))
6147 : : {
6148 : 85 : tree _q30 = _p1_pops[0];
6149 : 85 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6150 : : {
6151 : 0 : {
6152 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6153 : 0 : tree res = generic_simplify_200 (loc, type, _p0, _p1, captures, EQ_EXPR);
6154 : 0 : if (res) return res;
6155 : : }
6156 : : }
6157 : : }
6158 : : }
6159 : : }
6160 : 25004913 : switch (TREE_CODE (_p1))
6161 : : {
6162 : 80483 : case PLUS_EXPR:
6163 : 80483 : {
6164 : 80483 : tree _q30 = TREE_OPERAND (_p1, 0);
6165 : 80483 : tree _q31 = TREE_OPERAND (_p1, 1);
6166 : 80483 : switch (TREE_CODE (_q31))
6167 : : {
6168 : 26 : CASE_CONVERT:
6169 : 26 : {
6170 : 26 : tree _q50 = TREE_OPERAND (_q31, 0);
6171 : 26 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6172 : : {
6173 : 0 : {
6174 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0 };
6175 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
6176 : 0 : if (res) return res;
6177 : : }
6178 : : }
6179 : : break;
6180 : : }
6181 : 80483 : default:;
6182 : : }
6183 : 80483 : switch (TREE_CODE (_q30))
6184 : : {
6185 : 20138 : CASE_CONVERT:
6186 : 20138 : {
6187 : 20138 : tree _q40 = TREE_OPERAND (_q30, 0);
6188 : 20138 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6189 : : {
6190 : 0 : {
6191 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q31, _p0 };
6192 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
6193 : 0 : if (res) return res;
6194 : : }
6195 : : }
6196 : : break;
6197 : : }
6198 : 80483 : default:;
6199 : : }
6200 : 80483 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6201 : : {
6202 : 0 : {
6203 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0 };
6204 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
6205 : 0 : if (res) return res;
6206 : : }
6207 : : }
6208 : 80483 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6209 : : {
6210 : 0 : {
6211 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q31, _p0 };
6212 : 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
6213 : 0 : if (res) return res;
6214 : : }
6215 : : }
6216 : : break;
6217 : : }
6218 : 25004913 : default:;
6219 : : }
6220 : 25004913 : {
6221 : 25004913 : tree _p1_pops[1];
6222 : 25004913 : if (tree_nop_convert (_p1, _p1_pops))
6223 : : {
6224 : 937177 : tree _q30 = _p1_pops[0];
6225 : 937177 : switch (TREE_CODE (_q30))
6226 : : {
6227 : 1612 : case PLUS_EXPR:
6228 : 1612 : {
6229 : 1612 : tree _q40 = TREE_OPERAND (_q30, 0);
6230 : 1612 : tree _q41 = TREE_OPERAND (_q30, 1);
6231 : 1612 : switch (TREE_CODE (_q41))
6232 : : {
6233 : 2 : CASE_CONVERT:
6234 : 2 : {
6235 : 2 : tree _q60 = TREE_OPERAND (_q41, 0);
6236 : 2 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
6237 : : {
6238 : 0 : {
6239 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0 };
6240 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6241 : 0 : if (res) return res;
6242 : : }
6243 : : }
6244 : : break;
6245 : : }
6246 : 1612 : default:;
6247 : : }
6248 : 1612 : switch (TREE_CODE (_q40))
6249 : : {
6250 : 1518 : CASE_CONVERT:
6251 : 1518 : {
6252 : 1518 : tree _q50 = TREE_OPERAND (_q40, 0);
6253 : 1518 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6254 : : {
6255 : 0 : {
6256 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q41, _p0 };
6257 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6258 : 0 : if (res) return res;
6259 : : }
6260 : : }
6261 : : break;
6262 : : }
6263 : 1612 : default:;
6264 : : }
6265 : 1612 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
6266 : : {
6267 : 0 : {
6268 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0 };
6269 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6270 : 0 : if (res) return res;
6271 : : }
6272 : : }
6273 : 1612 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6274 : : {
6275 : 0 : {
6276 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q41, _p0 };
6277 : 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
6278 : 0 : if (res) return res;
6279 : : }
6280 : : }
6281 : : break;
6282 : : }
6283 : : default:;
6284 : : }
6285 : : }
6286 : : }
6287 : 25004913 : switch (TREE_CODE (_p0))
6288 : : {
6289 : 4340919 : CASE_CONVERT:
6290 : 4340919 : {
6291 : 4340919 : tree _q20 = TREE_OPERAND (_p0, 0);
6292 : 4340919 : switch (TREE_CODE (_p1))
6293 : : {
6294 : 162 : case POINTER_PLUS_EXPR:
6295 : 162 : {
6296 : 162 : tree _q40 = TREE_OPERAND (_p1, 0);
6297 : 162 : tree _q41 = TREE_OPERAND (_p1, 1);
6298 : 162 : switch (TREE_CODE (_q40))
6299 : : {
6300 : 101 : CASE_CONVERT:
6301 : 101 : {
6302 : 101 : tree _q50 = TREE_OPERAND (_q40, 0);
6303 : 101 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6304 : : {
6305 : 6 : {
6306 : 6 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q20, _q41 };
6307 : 6 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
6308 : 6 : if (res) return res;
6309 : : }
6310 : : }
6311 : : break;
6312 : : }
6313 : 156 : default:;
6314 : : }
6315 : 156 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
6316 : : {
6317 : 0 : {
6318 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q20, _q41 };
6319 : 0 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
6320 : 0 : if (res) return res;
6321 : : }
6322 : : }
6323 : : break;
6324 : : }
6325 : 4340913 : default:;
6326 : : }
6327 : 4340913 : {
6328 : 4340913 : tree _p1_pops[1];
6329 : 4340913 : if (tree_nop_convert (_p1, _p1_pops))
6330 : : {
6331 : 710674 : tree _q40 = _p1_pops[0];
6332 : 710674 : switch (TREE_CODE (_q40))
6333 : : {
6334 : 6 : case POINTER_PLUS_EXPR:
6335 : 6 : {
6336 : 6 : tree _q50 = TREE_OPERAND (_q40, 0);
6337 : 6 : tree _q51 = TREE_OPERAND (_q40, 1);
6338 : 6 : switch (TREE_CODE (_q50))
6339 : : {
6340 : 0 : CASE_CONVERT:
6341 : 0 : {
6342 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
6343 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
6344 : : {
6345 : 0 : {
6346 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q20, _q51 };
6347 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6348 : 0 : if (res) return res;
6349 : : }
6350 : : }
6351 : : break;
6352 : : }
6353 : 6 : default:;
6354 : : }
6355 : 6 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6356 : : {
6357 : 0 : {
6358 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q20, _q51 };
6359 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6360 : 0 : if (res) return res;
6361 : : }
6362 : : }
6363 : : break;
6364 : : }
6365 : : default:;
6366 : : }
6367 : : }
6368 : : }
6369 : 4340913 : break;
6370 : : }
6371 : 25004907 : default:;
6372 : : }
6373 : 25004907 : switch (TREE_CODE (_p1))
6374 : : {
6375 : 6559 : case POINTER_PLUS_EXPR:
6376 : 6559 : {
6377 : 6559 : tree _q30 = TREE_OPERAND (_p1, 0);
6378 : 6559 : tree _q31 = TREE_OPERAND (_p1, 1);
6379 : 6559 : switch (TREE_CODE (_q30))
6380 : : {
6381 : 3912 : CASE_CONVERT:
6382 : 3912 : {
6383 : 3912 : tree _q40 = TREE_OPERAND (_q30, 0);
6384 : 3912 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6385 : : {
6386 : 0 : {
6387 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _p0, _q31 };
6388 : 0 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
6389 : 0 : if (res) return res;
6390 : : }
6391 : : }
6392 : : break;
6393 : : }
6394 : 6559 : default:;
6395 : : }
6396 : 6559 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6397 : : {
6398 : 0 : {
6399 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _p0, _q31 };
6400 : 0 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures, EQ_EXPR);
6401 : 0 : if (res) return res;
6402 : : }
6403 : : }
6404 : : break;
6405 : : }
6406 : 25004907 : default:;
6407 : : }
6408 : 25004907 : {
6409 : 25004907 : tree _p1_pops[1];
6410 : 25004907 : if (tree_nop_convert (_p1, _p1_pops))
6411 : : {
6412 : 937177 : tree _q30 = _p1_pops[0];
6413 : 937177 : switch (TREE_CODE (_q30))
6414 : : {
6415 : 18 : case POINTER_PLUS_EXPR:
6416 : 18 : {
6417 : 18 : tree _q40 = TREE_OPERAND (_q30, 0);
6418 : 18 : tree _q41 = TREE_OPERAND (_q30, 1);
6419 : 18 : switch (TREE_CODE (_q40))
6420 : : {
6421 : 0 : CASE_CONVERT:
6422 : 0 : {
6423 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
6424 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6425 : : {
6426 : 0 : {
6427 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _p0, _q41 };
6428 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6429 : 0 : if (res) return res;
6430 : : }
6431 : : }
6432 : : break;
6433 : : }
6434 : 18 : default:;
6435 : : }
6436 : 18 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6437 : : {
6438 : 0 : {
6439 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _p0, _q41 };
6440 : 0 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
6441 : 0 : if (res) return res;
6442 : : }
6443 : : }
6444 : : break;
6445 : : }
6446 : : default:;
6447 : : }
6448 : : }
6449 : : }
6450 : 25004907 : switch (TREE_CODE (_p0))
6451 : : {
6452 : 71690 : case POINTER_PLUS_EXPR:
6453 : 71690 : {
6454 : 71690 : tree _q20 = TREE_OPERAND (_p0, 0);
6455 : 71690 : tree _q21 = TREE_OPERAND (_p0, 1);
6456 : 71690 : switch (TREE_CODE (_p1))
6457 : : {
6458 : 11964 : case ADDR_EXPR:
6459 : 11964 : {
6460 : 11964 : {
6461 : 11964 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6462 : 11964 : tree res = generic_simplify_214 (loc, type, _p0, _p1, captures, EQ_EXPR);
6463 : 11964 : if (res) return res;
6464 : : }
6465 : 11963 : break;
6466 : : }
6467 : 71689 : default:;
6468 : : }
6469 : 71689 : switch (TREE_CODE (_q20))
6470 : : {
6471 : 1113 : case ADDR_EXPR:
6472 : 1113 : {
6473 : 1113 : switch (TREE_CODE (_p1))
6474 : : {
6475 : 6 : case POINTER_PLUS_EXPR:
6476 : 6 : {
6477 : 6 : tree _q50 = TREE_OPERAND (_p1, 0);
6478 : 6 : tree _q51 = TREE_OPERAND (_p1, 1);
6479 : 6 : switch (TREE_CODE (_q50))
6480 : : {
6481 : 0 : case ADDR_EXPR:
6482 : 0 : {
6483 : 0 : {
6484 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51 };
6485 : 0 : tree res = generic_simplify_215 (loc, type, _p0, _p1, captures, EQ_EXPR);
6486 : 0 : if (res) return res;
6487 : : }
6488 : 0 : break;
6489 : : }
6490 : : default:;
6491 : : }
6492 : : break;
6493 : : }
6494 : : default:;
6495 : : }
6496 : : break;
6497 : : }
6498 : : default:;
6499 : : }
6500 : : break;
6501 : : }
6502 : 80797 : case ADDR_EXPR:
6503 : 80797 : {
6504 : 80797 : switch (TREE_CODE (_p1))
6505 : : {
6506 : 0 : case POINTER_PLUS_EXPR:
6507 : 0 : {
6508 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
6509 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
6510 : 0 : {
6511 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p0 };
6512 : 0 : tree res = generic_simplify_214 (loc, type, _p0, _p1, captures, EQ_EXPR);
6513 : 0 : if (res) return res;
6514 : : }
6515 : 0 : break;
6516 : : }
6517 : : default:;
6518 : : }
6519 : : break;
6520 : : }
6521 : 25004906 : default:;
6522 : : }
6523 : 25004906 : switch (TREE_CODE (_p1))
6524 : : {
6525 : 2769 : case MINUS_EXPR:
6526 : 2769 : {
6527 : 2769 : tree _q30 = TREE_OPERAND (_p1, 0);
6528 : 2769 : tree _q31 = TREE_OPERAND (_p1, 1);
6529 : 2769 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6530 : : {
6531 : 0 : {
6532 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
6533 : 0 : tree res = generic_simplify_210 (loc, type, _p0, _p1, captures, EQ_EXPR);
6534 : 0 : if (res) return res;
6535 : : }
6536 : : }
6537 : : break;
6538 : : }
6539 : 25004906 : default:;
6540 : : }
6541 : 25004906 : switch (TREE_CODE (_p0))
6542 : : {
6543 : 4423 : case TRUNC_DIV_EXPR:
6544 : 4423 : {
6545 : 4423 : tree _q20 = TREE_OPERAND (_p0, 0);
6546 : 4423 : tree _q21 = TREE_OPERAND (_p0, 1);
6547 : 4423 : if (integer_zerop (_p1))
6548 : : {
6549 : 319 : {
6550 : 319 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6551 : 319 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
6552 : 319 : if (res) return res;
6553 : : }
6554 : : }
6555 : : break;
6556 : : }
6557 : 4340913 : CASE_CONVERT:
6558 : 4340913 : {
6559 : 4340913 : tree _q20 = TREE_OPERAND (_p0, 0);
6560 : 4340913 : switch (TREE_CODE (_p1))
6561 : : {
6562 : 1000086 : CASE_CONVERT:
6563 : 1000086 : {
6564 : 1000086 : tree _q40 = TREE_OPERAND (_p1, 0);
6565 : 1000086 : switch (TREE_CODE (_q40))
6566 : : {
6567 : 0 : case MINUS_EXPR:
6568 : 0 : {
6569 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
6570 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
6571 : 0 : switch (TREE_CODE (_q50))
6572 : : {
6573 : 0 : case INTEGER_CST:
6574 : 0 : {
6575 : 0 : switch (TREE_CODE (_q51))
6576 : : {
6577 : 0 : CASE_CONVERT:
6578 : 0 : {
6579 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
6580 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
6581 : : {
6582 : 0 : {
6583 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
6584 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6585 : 0 : if (res) return res;
6586 : : }
6587 : : }
6588 : : break;
6589 : : }
6590 : : default:;
6591 : : }
6592 : : break;
6593 : : }
6594 : : default:;
6595 : : }
6596 : : break;
6597 : : }
6598 : : default:;
6599 : : }
6600 : : break;
6601 : : }
6602 : 4340913 : default:;
6603 : : }
6604 : 4340913 : switch (TREE_CODE (_q20))
6605 : : {
6606 : 246 : case MINUS_EXPR:
6607 : 246 : {
6608 : 246 : tree _q30 = TREE_OPERAND (_q20, 0);
6609 : 246 : tree _q31 = TREE_OPERAND (_q20, 1);
6610 : 246 : switch (TREE_CODE (_q30))
6611 : : {
6612 : 56 : case INTEGER_CST:
6613 : 56 : {
6614 : 56 : switch (TREE_CODE (_q31))
6615 : : {
6616 : 0 : CASE_CONVERT:
6617 : 0 : {
6618 : 0 : tree _q50 = TREE_OPERAND (_q31, 0);
6619 : 0 : switch (TREE_CODE (_p1))
6620 : : {
6621 : 0 : CASE_CONVERT:
6622 : 0 : {
6623 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
6624 : 0 : if ((_q70 == _q50 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q50, 0) && types_match (_q70, _q50)))
6625 : : {
6626 : 0 : {
6627 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
6628 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6629 : 0 : if (res) return res;
6630 : : }
6631 : : }
6632 : : break;
6633 : : }
6634 : 0 : default:;
6635 : : }
6636 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
6637 : : {
6638 : 0 : {
6639 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
6640 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6641 : 0 : if (res) return res;
6642 : : }
6643 : : }
6644 : : break;
6645 : : }
6646 : 56 : default:;
6647 : : }
6648 : 56 : switch (TREE_CODE (_p1))
6649 : : {
6650 : 0 : CASE_CONVERT:
6651 : 0 : {
6652 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
6653 : 0 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
6654 : : {
6655 : 0 : {
6656 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
6657 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6658 : 0 : if (res) return res;
6659 : : }
6660 : : }
6661 : : break;
6662 : : }
6663 : 56 : default:;
6664 : : }
6665 : 56 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
6666 : : {
6667 : 0 : {
6668 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
6669 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6670 : 0 : if (res) return res;
6671 : : }
6672 : : }
6673 : : break;
6674 : : }
6675 : : default:;
6676 : : }
6677 : : break;
6678 : : }
6679 : 4340913 : default:;
6680 : : }
6681 : 4340913 : switch (TREE_CODE (_p1))
6682 : : {
6683 : 1000086 : CASE_CONVERT:
6684 : 1000086 : {
6685 : 1000086 : tree _q40 = TREE_OPERAND (_p1, 0);
6686 : 1000086 : switch (TREE_CODE (_q40))
6687 : : {
6688 : 0 : case MINUS_EXPR:
6689 : 0 : {
6690 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
6691 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
6692 : 0 : switch (TREE_CODE (_q50))
6693 : : {
6694 : 0 : case INTEGER_CST:
6695 : 0 : {
6696 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6697 : : {
6698 : 0 : {
6699 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
6700 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6701 : 0 : if (res) return res;
6702 : : }
6703 : : }
6704 : : break;
6705 : : }
6706 : : default:;
6707 : : }
6708 : : break;
6709 : : }
6710 : : default:;
6711 : : }
6712 : : break;
6713 : : }
6714 : 257 : case MINUS_EXPR:
6715 : 257 : {
6716 : 257 : tree _q40 = TREE_OPERAND (_p1, 0);
6717 : 257 : tree _q41 = TREE_OPERAND (_p1, 1);
6718 : 257 : switch (TREE_CODE (_q40))
6719 : : {
6720 : 55 : case INTEGER_CST:
6721 : 55 : {
6722 : 55 : switch (TREE_CODE (_q41))
6723 : : {
6724 : 12 : CASE_CONVERT:
6725 : 12 : {
6726 : 12 : tree _q60 = TREE_OPERAND (_q41, 0);
6727 : 12 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
6728 : : {
6729 : 0 : {
6730 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6731 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6732 : 0 : if (res) return res;
6733 : : }
6734 : : }
6735 : : break;
6736 : : }
6737 : 55 : default:;
6738 : : }
6739 : 55 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
6740 : : {
6741 : 0 : {
6742 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6743 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6744 : 0 : if (res) return res;
6745 : : }
6746 : : }
6747 : : break;
6748 : : }
6749 : : default:;
6750 : : }
6751 : : break;
6752 : : }
6753 : : default:;
6754 : : }
6755 : : break;
6756 : : }
6757 : 118312 : case MINUS_EXPR:
6758 : 118312 : {
6759 : 118312 : tree _q20 = TREE_OPERAND (_p0, 0);
6760 : 118312 : tree _q21 = TREE_OPERAND (_p0, 1);
6761 : 118312 : switch (TREE_CODE (_q20))
6762 : : {
6763 : 35793 : case INTEGER_CST:
6764 : 35793 : {
6765 : 35793 : switch (TREE_CODE (_q21))
6766 : : {
6767 : 16732 : CASE_CONVERT:
6768 : 16732 : {
6769 : 16732 : tree _q40 = TREE_OPERAND (_q21, 0);
6770 : 16732 : switch (TREE_CODE (_p1))
6771 : : {
6772 : 0 : CASE_CONVERT:
6773 : 0 : {
6774 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
6775 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
6776 : : {
6777 : 0 : {
6778 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6779 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6780 : 0 : if (res) return res;
6781 : : }
6782 : : }
6783 : : break;
6784 : : }
6785 : 16732 : default:;
6786 : : }
6787 : 16732 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6788 : : {
6789 : 0 : {
6790 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6791 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6792 : 0 : if (res) return res;
6793 : : }
6794 : : }
6795 : : break;
6796 : : }
6797 : 35793 : default:;
6798 : : }
6799 : 35793 : switch (TREE_CODE (_p1))
6800 : : {
6801 : 2 : CASE_CONVERT:
6802 : 2 : {
6803 : 2 : tree _q50 = TREE_OPERAND (_p1, 0);
6804 : 2 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6805 : : {
6806 : 0 : {
6807 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6808 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6809 : 0 : if (res) return res;
6810 : : }
6811 : : }
6812 : : break;
6813 : : }
6814 : 35793 : default:;
6815 : : }
6816 : 35793 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6817 : : {
6818 : 2 : {
6819 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6820 : 2 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6821 : 2 : if (res) return res;
6822 : : }
6823 : : }
6824 : : break;
6825 : : }
6826 : : default:;
6827 : : }
6828 : : break;
6829 : : }
6830 : 25004670 : default:;
6831 : : }
6832 : 25004670 : switch (TREE_CODE (_p1))
6833 : : {
6834 : 1322974 : CASE_CONVERT:
6835 : 1322974 : {
6836 : 1322974 : tree _q30 = TREE_OPERAND (_p1, 0);
6837 : 1322974 : switch (TREE_CODE (_q30))
6838 : : {
6839 : 12 : case MINUS_EXPR:
6840 : 12 : {
6841 : 12 : tree _q40 = TREE_OPERAND (_q30, 0);
6842 : 12 : tree _q41 = TREE_OPERAND (_q30, 1);
6843 : 12 : switch (TREE_CODE (_q40))
6844 : : {
6845 : 12 : case INTEGER_CST:
6846 : 12 : {
6847 : 12 : switch (TREE_CODE (_q41))
6848 : : {
6849 : 12 : CASE_CONVERT:
6850 : 12 : {
6851 : 12 : tree _q60 = TREE_OPERAND (_q41, 0);
6852 : 12 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
6853 : : {
6854 : 0 : {
6855 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6856 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6857 : 0 : if (res) return res;
6858 : : }
6859 : : }
6860 : : break;
6861 : : }
6862 : 12 : default:;
6863 : : }
6864 : 12 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
6865 : : {
6866 : 0 : {
6867 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6868 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6869 : 0 : if (res) return res;
6870 : : }
6871 : : }
6872 : : break;
6873 : : }
6874 : : default:;
6875 : : }
6876 : : break;
6877 : : }
6878 : : default:;
6879 : : }
6880 : : break;
6881 : : }
6882 : 2769 : case MINUS_EXPR:
6883 : 2769 : {
6884 : 2769 : tree _q30 = TREE_OPERAND (_p1, 0);
6885 : 2769 : tree _q31 = TREE_OPERAND (_p1, 1);
6886 : 2769 : switch (TREE_CODE (_q30))
6887 : : {
6888 : 147 : case INTEGER_CST:
6889 : 147 : {
6890 : 147 : switch (TREE_CODE (_q31))
6891 : : {
6892 : 16 : CASE_CONVERT:
6893 : 16 : {
6894 : 16 : tree _q50 = TREE_OPERAND (_q31, 0);
6895 : 16 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6896 : : {
6897 : 0 : {
6898 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6899 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6900 : 0 : if (res) return res;
6901 : : }
6902 : : }
6903 : : break;
6904 : : }
6905 : 147 : default:;
6906 : : }
6907 : 147 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6908 : : {
6909 : 0 : {
6910 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6911 : 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
6912 : 0 : if (res) return res;
6913 : : }
6914 : : }
6915 : : break;
6916 : : }
6917 : : default:;
6918 : : }
6919 : : break;
6920 : : }
6921 : 25004670 : default:;
6922 : : }
6923 : 25004670 : switch (TREE_CODE (_p0))
6924 : : {
6925 : 1193 : case LT_EXPR:
6926 : 1193 : {
6927 : 1193 : tree _q20 = TREE_OPERAND (_p0, 0);
6928 : 1193 : tree _q21 = TREE_OPERAND (_p0, 1);
6929 : 1193 : switch (TREE_CODE (_p1))
6930 : : {
6931 : 22 : case GT_EXPR:
6932 : 22 : {
6933 : 22 : tree _q50 = TREE_OPERAND (_p1, 0);
6934 : 22 : tree _q51 = TREE_OPERAND (_p1, 1);
6935 : 22 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6936 : : {
6937 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6938 : : {
6939 : 0 : {
6940 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6941 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
6942 : 0 : if (res) return res;
6943 : : }
6944 : : }
6945 : : }
6946 : : break;
6947 : : }
6948 : 0 : case EQ_EXPR:
6949 : 0 : {
6950 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6951 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6952 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6953 : : {
6954 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6955 : : {
6956 : 0 : {
6957 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6958 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
6959 : 0 : if (res) return res;
6960 : : }
6961 : : }
6962 : : }
6963 : : break;
6964 : : }
6965 : 3 : case NE_EXPR:
6966 : 3 : {
6967 : 3 : tree _q50 = TREE_OPERAND (_p1, 0);
6968 : 3 : tree _q51 = TREE_OPERAND (_p1, 1);
6969 : 3 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6970 : : {
6971 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6972 : : {
6973 : 0 : {
6974 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6975 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
6976 : 0 : if (res) return res;
6977 : : }
6978 : : }
6979 : : }
6980 : : break;
6981 : : }
6982 : : default:;
6983 : : }
6984 : : break;
6985 : : }
6986 : 1604 : case LE_EXPR:
6987 : 1604 : {
6988 : 1604 : tree _q20 = TREE_OPERAND (_p0, 0);
6989 : 1604 : tree _q21 = TREE_OPERAND (_p0, 1);
6990 : 1604 : switch (TREE_CODE (_p1))
6991 : : {
6992 : 14 : case GE_EXPR:
6993 : 14 : {
6994 : 14 : tree _q50 = TREE_OPERAND (_p1, 0);
6995 : 14 : tree _q51 = TREE_OPERAND (_p1, 1);
6996 : 14 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6997 : : {
6998 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6999 : : {
7000 : 0 : {
7001 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7002 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
7003 : 0 : if (res) return res;
7004 : : }
7005 : : }
7006 : : }
7007 : : break;
7008 : : }
7009 : 0 : case EQ_EXPR:
7010 : 0 : {
7011 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7012 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7013 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7014 : : {
7015 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7016 : : {
7017 : 0 : {
7018 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7019 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
7020 : 0 : if (res) return res;
7021 : : }
7022 : : }
7023 : : }
7024 : : break;
7025 : : }
7026 : 8 : case NE_EXPR:
7027 : 8 : {
7028 : 8 : tree _q50 = TREE_OPERAND (_p1, 0);
7029 : 8 : tree _q51 = TREE_OPERAND (_p1, 1);
7030 : 8 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7031 : : {
7032 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7033 : : {
7034 : 0 : {
7035 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7036 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
7037 : 0 : if (res) return res;
7038 : : }
7039 : : }
7040 : : }
7041 : : break;
7042 : : }
7043 : : default:;
7044 : : }
7045 : : break;
7046 : : }
7047 : 30073 : case GT_EXPR:
7048 : 30073 : {
7049 : 30073 : tree _q20 = TREE_OPERAND (_p0, 0);
7050 : 30073 : tree _q21 = TREE_OPERAND (_p0, 1);
7051 : 30073 : switch (TREE_CODE (_p1))
7052 : : {
7053 : 28262 : case GT_EXPR:
7054 : 28262 : {
7055 : 28262 : tree _q50 = TREE_OPERAND (_p1, 0);
7056 : 28262 : tree _q51 = TREE_OPERAND (_p1, 1);
7057 : 28262 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7058 : : {
7059 : 12 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7060 : : {
7061 : 0 : {
7062 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7063 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
7064 : 0 : if (res) return res;
7065 : : }
7066 : 0 : {
7067 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7068 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
7069 : 0 : if (res) return res;
7070 : : }
7071 : : }
7072 : : }
7073 : : break;
7074 : : }
7075 : 59 : case EQ_EXPR:
7076 : 59 : {
7077 : 59 : tree _q50 = TREE_OPERAND (_p1, 0);
7078 : 59 : tree _q51 = TREE_OPERAND (_p1, 1);
7079 : 59 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7080 : : {
7081 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7082 : : {
7083 : 0 : {
7084 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7085 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
7086 : 0 : if (res) return res;
7087 : : }
7088 : : }
7089 : : }
7090 : : break;
7091 : : }
7092 : 37 : case NE_EXPR:
7093 : 37 : {
7094 : 37 : tree _q50 = TREE_OPERAND (_p1, 0);
7095 : 37 : tree _q51 = TREE_OPERAND (_p1, 1);
7096 : 37 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7097 : : {
7098 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7099 : : {
7100 : 0 : {
7101 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7102 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
7103 : 0 : if (res) return res;
7104 : : }
7105 : : }
7106 : : }
7107 : : break;
7108 : : }
7109 : 55 : case LT_EXPR:
7110 : 55 : {
7111 : 55 : tree _q50 = TREE_OPERAND (_p1, 0);
7112 : 55 : tree _q51 = TREE_OPERAND (_p1, 1);
7113 : 55 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7114 : : {
7115 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7116 : : {
7117 : 0 : {
7118 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7119 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
7120 : 0 : if (res) return res;
7121 : : }
7122 : : }
7123 : : }
7124 : : break;
7125 : : }
7126 : : default:;
7127 : : }
7128 : : break;
7129 : : }
7130 : 6504 : case GE_EXPR:
7131 : 6504 : {
7132 : 6504 : tree _q20 = TREE_OPERAND (_p0, 0);
7133 : 6504 : tree _q21 = TREE_OPERAND (_p0, 1);
7134 : 6504 : switch (TREE_CODE (_p1))
7135 : : {
7136 : 34 : case GE_EXPR:
7137 : 34 : {
7138 : 34 : tree _q50 = TREE_OPERAND (_p1, 0);
7139 : 34 : tree _q51 = TREE_OPERAND (_p1, 1);
7140 : 34 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7141 : : {
7142 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7143 : : {
7144 : 0 : {
7145 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7146 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
7147 : 0 : if (res) return res;
7148 : : }
7149 : 0 : {
7150 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7151 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
7152 : 0 : if (res) return res;
7153 : : }
7154 : : }
7155 : : }
7156 : : break;
7157 : : }
7158 : 84 : case EQ_EXPR:
7159 : 84 : {
7160 : 84 : tree _q50 = TREE_OPERAND (_p1, 0);
7161 : 84 : tree _q51 = TREE_OPERAND (_p1, 1);
7162 : 84 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7163 : : {
7164 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7165 : : {
7166 : 0 : {
7167 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7168 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
7169 : 0 : if (res) return res;
7170 : : }
7171 : : }
7172 : : }
7173 : : break;
7174 : : }
7175 : 56 : case NE_EXPR:
7176 : 56 : {
7177 : 56 : tree _q50 = TREE_OPERAND (_p1, 0);
7178 : 56 : tree _q51 = TREE_OPERAND (_p1, 1);
7179 : 56 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7180 : : {
7181 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7182 : : {
7183 : 0 : {
7184 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7185 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
7186 : 0 : if (res) return res;
7187 : : }
7188 : : }
7189 : : }
7190 : : break;
7191 : : }
7192 : 10 : case LE_EXPR:
7193 : 10 : {
7194 : 10 : tree _q50 = TREE_OPERAND (_p1, 0);
7195 : 10 : tree _q51 = TREE_OPERAND (_p1, 1);
7196 : 10 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7197 : : {
7198 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7199 : : {
7200 : 0 : {
7201 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7202 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
7203 : 0 : if (res) return res;
7204 : : }
7205 : : }
7206 : : }
7207 : : break;
7208 : : }
7209 : : default:;
7210 : : }
7211 : : break;
7212 : : }
7213 : 30824 : case EQ_EXPR:
7214 : 30824 : {
7215 : 30824 : tree _q20 = TREE_OPERAND (_p0, 0);
7216 : 30824 : tree _q21 = TREE_OPERAND (_p0, 1);
7217 : 30824 : switch (TREE_CODE (_p1))
7218 : : {
7219 : 4 : case LT_EXPR:
7220 : 4 : {
7221 : 4 : tree _q50 = TREE_OPERAND (_p1, 0);
7222 : 4 : tree _q51 = TREE_OPERAND (_p1, 1);
7223 : 4 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7224 : : {
7225 : 4 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7226 : : {
7227 : 0 : {
7228 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7229 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
7230 : 0 : if (res) return res;
7231 : : }
7232 : : }
7233 : : }
7234 : : break;
7235 : : }
7236 : 4 : case LE_EXPR:
7237 : 4 : {
7238 : 4 : tree _q50 = TREE_OPERAND (_p1, 0);
7239 : 4 : tree _q51 = TREE_OPERAND (_p1, 1);
7240 : 4 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7241 : : {
7242 : 4 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7243 : : {
7244 : 0 : {
7245 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7246 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
7247 : 0 : if (res) return res;
7248 : : }
7249 : : }
7250 : : }
7251 : : break;
7252 : : }
7253 : 73 : case GT_EXPR:
7254 : 73 : {
7255 : 73 : tree _q50 = TREE_OPERAND (_p1, 0);
7256 : 73 : tree _q51 = TREE_OPERAND (_p1, 1);
7257 : 73 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7258 : : {
7259 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7260 : : {
7261 : 0 : {
7262 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7263 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
7264 : 0 : if (res) return res;
7265 : : }
7266 : : }
7267 : : }
7268 : : break;
7269 : : }
7270 : 118 : case GE_EXPR:
7271 : 118 : {
7272 : 118 : tree _q50 = TREE_OPERAND (_p1, 0);
7273 : 118 : tree _q51 = TREE_OPERAND (_p1, 1);
7274 : 118 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7275 : : {
7276 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7277 : : {
7278 : 0 : {
7279 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7280 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
7281 : 0 : if (res) return res;
7282 : : }
7283 : : }
7284 : : }
7285 : : break;
7286 : : }
7287 : : default:;
7288 : : }
7289 : : break;
7290 : : }
7291 : 11188 : case NE_EXPR:
7292 : 11188 : {
7293 : 11188 : tree _q20 = TREE_OPERAND (_p0, 0);
7294 : 11188 : tree _q21 = TREE_OPERAND (_p0, 1);
7295 : 11188 : switch (TREE_CODE (_p1))
7296 : : {
7297 : 3 : case LT_EXPR:
7298 : 3 : {
7299 : 3 : tree _q50 = TREE_OPERAND (_p1, 0);
7300 : 3 : tree _q51 = TREE_OPERAND (_p1, 1);
7301 : 3 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7302 : : {
7303 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7304 : : {
7305 : 0 : {
7306 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7307 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
7308 : 0 : if (res) return res;
7309 : : }
7310 : : }
7311 : : }
7312 : : break;
7313 : : }
7314 : 0 : case LE_EXPR:
7315 : 0 : {
7316 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7317 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7318 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7319 : : {
7320 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7321 : : {
7322 : 0 : {
7323 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7324 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
7325 : 0 : if (res) return res;
7326 : : }
7327 : : }
7328 : : }
7329 : : break;
7330 : : }
7331 : 21 : case GT_EXPR:
7332 : 21 : {
7333 : 21 : tree _q50 = TREE_OPERAND (_p1, 0);
7334 : 21 : tree _q51 = TREE_OPERAND (_p1, 1);
7335 : 21 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7336 : : {
7337 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7338 : : {
7339 : 0 : {
7340 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7341 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
7342 : 0 : if (res) return res;
7343 : : }
7344 : : }
7345 : : }
7346 : : break;
7347 : : }
7348 : 2 : case GE_EXPR:
7349 : 2 : {
7350 : 2 : tree _q50 = TREE_OPERAND (_p1, 0);
7351 : 2 : tree _q51 = TREE_OPERAND (_p1, 1);
7352 : 2 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7353 : : {
7354 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7355 : : {
7356 : 0 : {
7357 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7358 : 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
7359 : 0 : if (res) return res;
7360 : : }
7361 : : }
7362 : : }
7363 : : break;
7364 : : }
7365 : : default:;
7366 : : }
7367 : : break;
7368 : : }
7369 : 13498 : case MIN_EXPR:
7370 : 13498 : {
7371 : 13498 : tree _q20 = TREE_OPERAND (_p0, 0);
7372 : 13498 : tree _q21 = TREE_OPERAND (_p0, 1);
7373 : 13498 : switch (TREE_CODE (_p1))
7374 : : {
7375 : 0 : case MAX_EXPR:
7376 : 0 : {
7377 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7378 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7379 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7380 : : {
7381 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7382 : : {
7383 : 0 : {
7384 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7385 : 0 : if (!HONOR_NANS (captures[0])
7386 : : )
7387 : : {
7388 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1604;
7389 : 0 : {
7390 : 0 : tree res_op0;
7391 : 0 : res_op0 = captures[0];
7392 : 0 : tree res_op1;
7393 : 0 : res_op1 = captures[1];
7394 : 0 : tree _r;
7395 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
7396 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
7397 : 0 : return _r;
7398 : : }
7399 : 0 : next_after_fail1604:;
7400 : : }
7401 : : }
7402 : : }
7403 : : }
7404 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7405 : : {
7406 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7407 : : {
7408 : 0 : {
7409 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7410 : 0 : if (!HONOR_NANS (captures[0])
7411 : : )
7412 : : {
7413 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1605;
7414 : 0 : {
7415 : 0 : tree res_op0;
7416 : 0 : res_op0 = captures[0];
7417 : 0 : tree res_op1;
7418 : 0 : res_op1 = captures[1];
7419 : 0 : tree _r;
7420 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
7421 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
7422 : 0 : return _r;
7423 : : }
7424 : 0 : next_after_fail1605:;
7425 : : }
7426 : : }
7427 : : }
7428 : : }
7429 : : break;
7430 : : }
7431 : 13498 : default:;
7432 : : }
7433 : 13498 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7434 : : {
7435 : 0 : {
7436 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7437 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
7438 : 0 : if (res) return res;
7439 : : }
7440 : : }
7441 : 13498 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
7442 : : {
7443 : 0 : {
7444 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7445 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
7446 : 0 : if (res) return res;
7447 : : }
7448 : : }
7449 : : break;
7450 : : }
7451 : 620 : case MAX_EXPR:
7452 : 620 : {
7453 : 620 : tree _q20 = TREE_OPERAND (_p0, 0);
7454 : 620 : tree _q21 = TREE_OPERAND (_p0, 1);
7455 : 620 : switch (TREE_CODE (_p1))
7456 : : {
7457 : 0 : case MIN_EXPR:
7458 : 0 : {
7459 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7460 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7461 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7462 : : {
7463 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7464 : : {
7465 : 0 : {
7466 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7467 : 0 : if (!HONOR_NANS (captures[0])
7468 : : )
7469 : : {
7470 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1606;
7471 : 0 : {
7472 : 0 : tree res_op0;
7473 : 0 : res_op0 = captures[0];
7474 : 0 : tree res_op1;
7475 : 0 : res_op1 = captures[1];
7476 : 0 : tree _r;
7477 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
7478 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
7479 : 0 : return _r;
7480 : : }
7481 : 0 : next_after_fail1606:;
7482 : : }
7483 : : }
7484 : : }
7485 : : }
7486 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7487 : : {
7488 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7489 : : {
7490 : 0 : {
7491 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7492 : 0 : if (!HONOR_NANS (captures[0])
7493 : : )
7494 : : {
7495 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1607;
7496 : 0 : {
7497 : 0 : tree res_op0;
7498 : 0 : res_op0 = captures[0];
7499 : 0 : tree res_op1;
7500 : 0 : res_op1 = captures[1];
7501 : 0 : tree _r;
7502 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
7503 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
7504 : 0 : return _r;
7505 : : }
7506 : 0 : next_after_fail1607:;
7507 : : }
7508 : : }
7509 : : }
7510 : : }
7511 : : break;
7512 : : }
7513 : 620 : default:;
7514 : : }
7515 : 620 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7516 : : {
7517 : 0 : {
7518 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7519 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
7520 : 0 : if (res) return res;
7521 : : }
7522 : : }
7523 : 620 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
7524 : : {
7525 : 40 : {
7526 : 40 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
7527 : 40 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
7528 : 40 : if (res) return res;
7529 : : }
7530 : : }
7531 : : break;
7532 : : }
7533 : 25004631 : default:;
7534 : : }
7535 : 25004631 : if (tree_with_possible_nonzero_bits (_p0))
7536 : : {
7537 : 9507481 : if (tree_with_known_nonzero_bits (_p1))
7538 : : {
7539 : 8206514 : {
7540 : 8206514 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
7541 : 8206514 : tree res = generic_simplify_218 (loc, type, _p0, _p1, captures, EQ_EXPR);
7542 : 8206514 : if (res) return res;
7543 : : }
7544 : : }
7545 : : }
7546 : 24990703 : if (tree_with_known_nonzero_bits (_p0))
7547 : : {
7548 : 6247828 : if (tree_with_possible_nonzero_bits (_p1))
7549 : : {
7550 : 6213398 : {
7551 : 6213398 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
7552 : 6213398 : tree res = generic_simplify_218 (loc, type, _p0, _p1, captures, EQ_EXPR);
7553 : 6213398 : if (res) return res;
7554 : : }
7555 : : }
7556 : : }
7557 : 24990387 : switch (TREE_CODE (_p1))
7558 : : {
7559 : 191 : case MIN_EXPR:
7560 : 191 : {
7561 : 191 : tree _q30 = TREE_OPERAND (_p1, 0);
7562 : 191 : tree _q31 = TREE_OPERAND (_p1, 1);
7563 : 191 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7564 : : {
7565 : 0 : {
7566 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7567 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
7568 : 0 : if (res) return res;
7569 : : }
7570 : : }
7571 : 191 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
7572 : : {
7573 : 0 : {
7574 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
7575 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
7576 : 0 : if (res) return res;
7577 : : }
7578 : : }
7579 : : break;
7580 : : }
7581 : 40 : case MAX_EXPR:
7582 : 40 : {
7583 : 40 : tree _q30 = TREE_OPERAND (_p1, 0);
7584 : 40 : tree _q31 = TREE_OPERAND (_p1, 1);
7585 : 40 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7586 : : {
7587 : 0 : {
7588 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7589 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
7590 : 0 : if (res) return res;
7591 : : }
7592 : : }
7593 : 40 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
7594 : : {
7595 : 0 : {
7596 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
7597 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
7598 : 0 : if (res) return res;
7599 : : }
7600 : : }
7601 : : break;
7602 : : }
7603 : 24990387 : default:;
7604 : : }
7605 : 24990387 : switch (TREE_CODE (_p0))
7606 : : {
7607 : 13498 : case MIN_EXPR:
7608 : 13498 : {
7609 : 13498 : tree _q20 = TREE_OPERAND (_p0, 0);
7610 : 13498 : tree _q21 = TREE_OPERAND (_p0, 1);
7611 : 13498 : switch (TREE_CODE (_q21))
7612 : : {
7613 : 84 : case INTEGER_CST:
7614 : 84 : {
7615 : 84 : switch (TREE_CODE (_p1))
7616 : : {
7617 : 0 : case INTEGER_CST:
7618 : 0 : {
7619 : 0 : {
7620 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7621 : 0 : tree res = generic_simplify_221 (loc, type, _p0, _p1, captures, EQ_EXPR);
7622 : 0 : if (res) return res;
7623 : : }
7624 : 0 : break;
7625 : : }
7626 : : default:;
7627 : : }
7628 : : break;
7629 : : }
7630 : : default:;
7631 : : }
7632 : : break;
7633 : : }
7634 : 581 : case MAX_EXPR:
7635 : 581 : {
7636 : 581 : tree _q20 = TREE_OPERAND (_p0, 0);
7637 : 581 : tree _q21 = TREE_OPERAND (_p0, 1);
7638 : 581 : switch (TREE_CODE (_q21))
7639 : : {
7640 : 381 : case INTEGER_CST:
7641 : 381 : {
7642 : 381 : switch (TREE_CODE (_p1))
7643 : : {
7644 : 42 : case INTEGER_CST:
7645 : 42 : {
7646 : 42 : {
7647 : 42 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7648 : 42 : tree res = generic_simplify_222 (loc, type, _p0, _p1, captures, EQ_EXPR);
7649 : 42 : if (res) return res;
7650 : : }
7651 : 0 : break;
7652 : : }
7653 : : default:;
7654 : : }
7655 : : break;
7656 : : }
7657 : 539 : default:;
7658 : : }
7659 : 539 : if (integer_zerop (_p1))
7660 : : {
7661 : 11 : {
7662 : 11 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7663 : 11 : tree res = generic_simplify_223 (loc, type, _p0, _p1, captures, EQ_EXPR);
7664 : 11 : if (res) return res;
7665 : : }
7666 : : }
7667 : : break;
7668 : : }
7669 : 891800 : case BIT_AND_EXPR:
7670 : 891800 : {
7671 : 891800 : tree _q20 = TREE_OPERAND (_p0, 0);
7672 : 891800 : tree _q21 = TREE_OPERAND (_p0, 1);
7673 : 891800 : switch (TREE_CODE (_q20))
7674 : : {
7675 : 883 : case LSHIFT_EXPR:
7676 : 883 : {
7677 : 883 : tree _q30 = TREE_OPERAND (_q20, 0);
7678 : 883 : tree _q31 = TREE_OPERAND (_q20, 1);
7679 : 883 : if (integer_pow2p (_q30))
7680 : : {
7681 : 875 : if (integer_pow2p (_q21))
7682 : : {
7683 : 1 : if (integer_zerop (_p1))
7684 : : {
7685 : 1 : {
7686 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q21 };
7687 : 1 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7688 : 1 : if (res) return res;
7689 : : }
7690 : : }
7691 : : }
7692 : : }
7693 : 882 : switch (TREE_CODE (_q31))
7694 : : {
7695 : 0 : case INTEGER_CST:
7696 : 0 : {
7697 : 0 : switch (TREE_CODE (_q21))
7698 : : {
7699 : 0 : case INTEGER_CST:
7700 : 0 : {
7701 : 0 : switch (TREE_CODE (_p1))
7702 : : {
7703 : 0 : case INTEGER_CST:
7704 : 0 : {
7705 : 0 : {
7706 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1 };
7707 : 0 : tree res = generic_simplify_225 (loc, type, _p0, _p1, captures, EQ_EXPR);
7708 : 0 : if (res) return res;
7709 : : }
7710 : 0 : break;
7711 : : }
7712 : : default:;
7713 : : }
7714 : : break;
7715 : : }
7716 : : default:;
7717 : : }
7718 : : break;
7719 : : }
7720 : 882 : default:;
7721 : : }
7722 : 882 : if (integer_onep (_q30))
7723 : : {
7724 : 874 : if (integer_pow2p (_q21))
7725 : : {
7726 : 0 : if (integer_zerop (_p1))
7727 : : {
7728 : 0 : {
7729 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q21 };
7730 : 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7731 : 0 : if (res) return res;
7732 : : }
7733 : : }
7734 : : }
7735 : : }
7736 : : break;
7737 : : }
7738 : 1730 : case RSHIFT_EXPR:
7739 : 1730 : {
7740 : 1730 : tree _q30 = TREE_OPERAND (_q20, 0);
7741 : 1730 : tree _q31 = TREE_OPERAND (_q20, 1);
7742 : 1730 : if (integer_pow2p (_q30))
7743 : : {
7744 : 1 : if (integer_pow2p (_q21))
7745 : : {
7746 : 1 : if (integer_zerop (_p1))
7747 : : {
7748 : 1 : {
7749 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q21 };
7750 : 1 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7751 : 1 : if (res) return res;
7752 : : }
7753 : : }
7754 : : }
7755 : : }
7756 : 1729 : switch (TREE_CODE (_q31))
7757 : : {
7758 : 17 : case INTEGER_CST:
7759 : 17 : {
7760 : 17 : switch (TREE_CODE (_q21))
7761 : : {
7762 : 17 : case INTEGER_CST:
7763 : 17 : {
7764 : 17 : switch (TREE_CODE (_p1))
7765 : : {
7766 : 17 : case INTEGER_CST:
7767 : 17 : {
7768 : 17 : {
7769 : 17 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1 };
7770 : 17 : tree res = generic_simplify_228 (loc, type, _p0, _p1, captures, EQ_EXPR);
7771 : 17 : if (res) return res;
7772 : : }
7773 : 0 : break;
7774 : : }
7775 : : default:;
7776 : : }
7777 : : break;
7778 : : }
7779 : : default:;
7780 : : }
7781 : : break;
7782 : : }
7783 : : default:;
7784 : : }
7785 : : break;
7786 : : }
7787 : 891781 : default:;
7788 : : }
7789 : 891781 : {
7790 : 891781 : tree _q20_pops[1];
7791 : 891781 : if (tree_nop_convert (_q20, _q20_pops))
7792 : : {
7793 : 26430 : tree _q30 = _q20_pops[0];
7794 : 26430 : switch (TREE_CODE (_q30))
7795 : : {
7796 : 0 : case LSHIFT_EXPR:
7797 : 0 : {
7798 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7799 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7800 : 0 : if (integer_onep (_q40))
7801 : : {
7802 : 0 : if (integer_pow2p (_q21))
7803 : : {
7804 : 0 : if (integer_zerop (_p1))
7805 : : {
7806 : 0 : {
7807 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q41, _q21 };
7808 : 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7809 : 0 : if (res) return res;
7810 : : }
7811 : : }
7812 : : }
7813 : : }
7814 : : break;
7815 : : }
7816 : : default:;
7817 : : }
7818 : : }
7819 : : }
7820 : 891781 : break;
7821 : : }
7822 : 1435 : case LSHIFT_EXPR:
7823 : 1435 : {
7824 : 1435 : tree _q20 = TREE_OPERAND (_p0, 0);
7825 : 1435 : tree _q21 = TREE_OPERAND (_p0, 1);
7826 : 1435 : switch (TREE_CODE (_q20))
7827 : : {
7828 : 325 : case INTEGER_CST:
7829 : 325 : {
7830 : 325 : switch (TREE_CODE (_p1))
7831 : : {
7832 : 20 : case INTEGER_CST:
7833 : 20 : {
7834 : 20 : {
7835 : 20 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7836 : 20 : tree res = generic_simplify_229 (loc, type, _p0, _p1, captures, EQ_EXPR);
7837 : 20 : if (res) return res;
7838 : : }
7839 : 3 : break;
7840 : : }
7841 : : default:;
7842 : : }
7843 : : break;
7844 : : }
7845 : : default:;
7846 : : }
7847 : : break;
7848 : : }
7849 : 0 : case LROTATE_EXPR:
7850 : 0 : {
7851 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
7852 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
7853 : 0 : switch (TREE_CODE (_p1))
7854 : : {
7855 : 0 : case LROTATE_EXPR:
7856 : 0 : {
7857 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7858 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7859 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7860 : : {
7861 : 0 : {
7862 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7863 : 0 : tree res = generic_simplify_230 (loc, type, _p0, _p1, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR);
7864 : 0 : if (res) return res;
7865 : : }
7866 : : }
7867 : : break;
7868 : : }
7869 : 0 : default:;
7870 : : }
7871 : 0 : switch (TREE_CODE (_q21))
7872 : : {
7873 : 0 : case INTEGER_CST:
7874 : 0 : {
7875 : 0 : switch (TREE_CODE (_p1))
7876 : : {
7877 : 0 : case INTEGER_CST:
7878 : 0 : {
7879 : 0 : {
7880 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7881 : 0 : tree res = generic_simplify_231 (loc, type, _p0, _p1, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR);
7882 : 0 : if (res) return res;
7883 : : }
7884 : 0 : break;
7885 : : }
7886 : : default:;
7887 : : }
7888 : : break;
7889 : : }
7890 : 0 : default:;
7891 : : }
7892 : 0 : switch (TREE_CODE (_p1))
7893 : : {
7894 : 0 : case INTEGER_CST:
7895 : 0 : {
7896 : 0 : {
7897 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7898 : 0 : tree res = generic_simplify_232 (loc, type, _p0, _p1, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR);
7899 : 0 : if (res) return res;
7900 : : }
7901 : 0 : break;
7902 : : }
7903 : : default:;
7904 : : }
7905 : : break;
7906 : : }
7907 : 6 : case RROTATE_EXPR:
7908 : 6 : {
7909 : 6 : tree _q20 = TREE_OPERAND (_p0, 0);
7910 : 6 : tree _q21 = TREE_OPERAND (_p0, 1);
7911 : 6 : switch (TREE_CODE (_p1))
7912 : : {
7913 : 0 : case RROTATE_EXPR:
7914 : 0 : {
7915 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7916 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7917 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7918 : : {
7919 : 0 : {
7920 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7921 : 0 : tree res = generic_simplify_230 (loc, type, _p0, _p1, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR);
7922 : 0 : if (res) return res;
7923 : : }
7924 : : }
7925 : : break;
7926 : : }
7927 : 6 : default:;
7928 : : }
7929 : 6 : switch (TREE_CODE (_q21))
7930 : : {
7931 : 6 : case INTEGER_CST:
7932 : 6 : {
7933 : 6 : switch (TREE_CODE (_p1))
7934 : : {
7935 : 0 : case INTEGER_CST:
7936 : 0 : {
7937 : 0 : {
7938 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7939 : 0 : tree res = generic_simplify_231 (loc, type, _p0, _p1, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR);
7940 : 0 : if (res) return res;
7941 : : }
7942 : 0 : break;
7943 : : }
7944 : : default:;
7945 : : }
7946 : : break;
7947 : : }
7948 : 6 : default:;
7949 : : }
7950 : 6 : switch (TREE_CODE (_p1))
7951 : : {
7952 : 0 : case INTEGER_CST:
7953 : 0 : {
7954 : 0 : {
7955 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7956 : 0 : tree res = generic_simplify_232 (loc, type, _p0, _p1, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR);
7957 : 0 : if (res) return res;
7958 : : }
7959 : 0 : break;
7960 : : }
7961 : : default:;
7962 : : }
7963 : : break;
7964 : : }
7965 : 63442 : case MULT_EXPR:
7966 : 63442 : {
7967 : 63442 : tree _q20 = TREE_OPERAND (_p0, 0);
7968 : 63442 : tree _q21 = TREE_OPERAND (_p0, 1);
7969 : 63442 : switch (TREE_CODE (_q20))
7970 : : {
7971 : 66 : case TRUNC_DIV_EXPR:
7972 : 66 : {
7973 : 66 : tree _q30 = TREE_OPERAND (_q20, 0);
7974 : 66 : tree _q31 = TREE_OPERAND (_q20, 1);
7975 : 66 : if ((_q21 == _q31 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q31, 0) && types_match (_q21, _q31)))
7976 : : {
7977 : 47 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7978 : : {
7979 : 47 : {
7980 : 47 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
7981 : 47 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures);
7982 : 47 : if (res) return res;
7983 : : }
7984 : : }
7985 : : }
7986 : : break;
7987 : : }
7988 : 63395 : default:;
7989 : : }
7990 : 63395 : switch (TREE_CODE (_q21))
7991 : : {
7992 : 0 : case TRUNC_DIV_EXPR:
7993 : 0 : {
7994 : 0 : tree _q40 = TREE_OPERAND (_q21, 0);
7995 : 0 : tree _q41 = TREE_OPERAND (_q21, 1);
7996 : 0 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
7997 : : {
7998 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
7999 : : {
8000 : 0 : {
8001 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q40, _q20 };
8002 : 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures);
8003 : 0 : if (res) return res;
8004 : : }
8005 : : }
8006 : : }
8007 : : break;
8008 : : }
8009 : : default:;
8010 : : }
8011 : : break;
8012 : : }
8013 : 24990262 : default:;
8014 : : }
8015 : 24990262 : switch (TREE_CODE (_p1))
8016 : : {
8017 : 13083 : case MULT_EXPR:
8018 : 13083 : {
8019 : 13083 : tree _q30 = TREE_OPERAND (_p1, 0);
8020 : 13083 : tree _q31 = TREE_OPERAND (_p1, 1);
8021 : 13083 : switch (TREE_CODE (_q30))
8022 : : {
8023 : 0 : case TRUNC_DIV_EXPR:
8024 : 0 : {
8025 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
8026 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
8027 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
8028 : : {
8029 : 0 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q41, 0) && types_match (_q31, _q41)))
8030 : : {
8031 : 0 : {
8032 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q41 };
8033 : 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures);
8034 : 0 : if (res) return res;
8035 : : }
8036 : : }
8037 : : }
8038 : : break;
8039 : : }
8040 : 13083 : default:;
8041 : : }
8042 : 13083 : switch (TREE_CODE (_q31))
8043 : : {
8044 : 0 : case TRUNC_DIV_EXPR:
8045 : 0 : {
8046 : 0 : tree _q50 = TREE_OPERAND (_q31, 0);
8047 : 0 : tree _q51 = TREE_OPERAND (_q31, 1);
8048 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
8049 : : {
8050 : 0 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q30, 0) && types_match (_q51, _q30)))
8051 : : {
8052 : 0 : {
8053 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _p0, _q30 };
8054 : 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures);
8055 : 0 : if (res) return res;
8056 : : }
8057 : : }
8058 : : }
8059 : : break;
8060 : : }
8061 : : default:;
8062 : : }
8063 : : break;
8064 : : }
8065 : 24990262 : default:;
8066 : : }
8067 : 24990262 : switch (TREE_CODE (_p0))
8068 : : {
8069 : 130 : case VEC_COND_EXPR:
8070 : 130 : {
8071 : 130 : tree _q20 = TREE_OPERAND (_p0, 0);
8072 : 130 : tree _q21 = TREE_OPERAND (_p0, 1);
8073 : 130 : tree _q22 = TREE_OPERAND (_p0, 2);
8074 : 130 : switch (TREE_CODE (_p1))
8075 : : {
8076 : 27 : case VEC_COND_EXPR:
8077 : 27 : {
8078 : 27 : tree _q60 = TREE_OPERAND (_p1, 0);
8079 : 27 : tree _q61 = TREE_OPERAND (_p1, 1);
8080 : 27 : tree _q62 = TREE_OPERAND (_p1, 2);
8081 : 27 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
8082 : : {
8083 : 0 : {
8084 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
8085 : 0 : if (VECTOR_TYPE_P (type)
8086 : 0 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
8087 : 0 : || types_match (type, TREE_TYPE (captures[2]))
8088 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8089 : : || (optimize_vectors_before_lowering_p ()
8090 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8091 : : )
8092 : : {
8093 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1608;
8094 : 0 : {
8095 : 0 : tree res_op0;
8096 : 0 : res_op0 = captures[1];
8097 : 0 : tree res_op1;
8098 : 0 : {
8099 : 0 : tree _o1[2], _r1;
8100 : 0 : _o1[0] = captures[2];
8101 : 0 : _o1[1] = captures[5];
8102 : 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
8103 : 0 : if (EXPR_P (_r1))
8104 : 0 : goto next_after_fail1608;
8105 : 0 : res_op1 = _r1;
8106 : : }
8107 : 0 : tree res_op2;
8108 : 0 : {
8109 : 0 : tree _o1[2], _r1;
8110 : 0 : _o1[0] = captures[3];
8111 : 0 : _o1[1] = captures[6];
8112 : 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
8113 : 0 : if (EXPR_P (_r1))
8114 : 0 : goto next_after_fail1608;
8115 : 0 : res_op2 = _r1;
8116 : : }
8117 : 0 : tree _r;
8118 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8119 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
8120 : 0 : return _r;
8121 : : }
8122 : 0 : next_after_fail1608:;
8123 : : }
8124 : : }
8125 : : }
8126 : : break;
8127 : : }
8128 : 130 : default:;
8129 : : }
8130 : 130 : {
8131 : 130 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
8132 : 130 : if (VECTOR_TYPE_P (type)
8133 : 130 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
8134 : 130 : || types_match (type, TREE_TYPE (captures[2]))
8135 : 130 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8136 : : || (optimize_vectors_before_lowering_p ()
8137 : 79 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8138 : : )
8139 : : {
8140 : 130 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1609;
8141 : 130 : {
8142 : 130 : if (! tree_invariant_p (captures[4])) goto next_after_fail1609;
8143 : 22 : tree res_op0;
8144 : 22 : res_op0 = captures[1];
8145 : 22 : tree res_op1;
8146 : 22 : {
8147 : 22 : tree _o1[2], _r1;
8148 : 22 : _o1[0] = captures[2];
8149 : 22 : _o1[1] = unshare_expr (captures[4]);
8150 : 22 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
8151 : 22 : if (EXPR_P (_r1))
8152 : 0 : goto next_after_fail1609;
8153 : 22 : res_op1 = _r1;
8154 : : }
8155 : 22 : tree res_op2;
8156 : 22 : {
8157 : 22 : tree _o1[2], _r1;
8158 : 22 : _o1[0] = captures[3];
8159 : 22 : _o1[1] = captures[4];
8160 : 22 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
8161 : 22 : if (EXPR_P (_r1))
8162 : 1 : goto next_after_fail1609;
8163 : 21 : res_op2 = _r1;
8164 : : }
8165 : 21 : tree _r;
8166 : 21 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8167 : 21 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
8168 : 21 : return _r;
8169 : : }
8170 : 109 : next_after_fail1609:;
8171 : : }
8172 : : }
8173 : 109 : break;
8174 : : }
8175 : 1751943 : case CALL_EXPR:
8176 : 1751943 : switch (get_call_combined_fn (_p0))
8177 : : {
8178 : 0 : case CFN_BUILT_IN_BSWAP128:
8179 : 0 : if (call_expr_nargs (_p0) == 1)
8180 : : {
8181 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8182 : 0 : switch (TREE_CODE (_p1))
8183 : : {
8184 : 0 : case INTEGER_CST:
8185 : 0 : {
8186 : 0 : {
8187 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8188 : 0 : tree res = generic_simplify_235 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP128);
8189 : 0 : if (res) return res;
8190 : : }
8191 : 0 : break;
8192 : : }
8193 : 0 : case CALL_EXPR:
8194 : 0 : switch (get_call_combined_fn (_p1))
8195 : : {
8196 : 0 : case CFN_BUILT_IN_BSWAP128:
8197 : 0 : if (call_expr_nargs (_p1) == 1)
8198 : : {
8199 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8200 : 0 : {
8201 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
8202 : 0 : tree res = generic_simplify_234 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP128);
8203 : 0 : if (res) return res;
8204 : : }
8205 : : }
8206 : : break;
8207 : : default:;
8208 : : }
8209 : : break;
8210 : : default:;
8211 : : }
8212 : : }
8213 : : break;
8214 : 2 : case CFN_BUILT_IN_BSWAP16:
8215 : 2 : if (call_expr_nargs (_p0) == 1)
8216 : : {
8217 : 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8218 : 2 : switch (TREE_CODE (_p1))
8219 : : {
8220 : 1 : case INTEGER_CST:
8221 : 1 : {
8222 : 1 : {
8223 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8224 : 1 : tree res = generic_simplify_235 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP16);
8225 : 1 : if (res) return res;
8226 : : }
8227 : 1 : break;
8228 : : }
8229 : 1 : case CALL_EXPR:
8230 : 1 : switch (get_call_combined_fn (_p1))
8231 : : {
8232 : 1 : case CFN_BUILT_IN_BSWAP16:
8233 : 1 : if (call_expr_nargs (_p1) == 1)
8234 : : {
8235 : 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8236 : 1 : {
8237 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
8238 : 1 : tree res = generic_simplify_234 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP16);
8239 : 1 : if (res) return res;
8240 : : }
8241 : : }
8242 : : break;
8243 : : default:;
8244 : : }
8245 : : break;
8246 : : default:;
8247 : : }
8248 : : }
8249 : : break;
8250 : 6 : case CFN_BUILT_IN_BSWAP32:
8251 : 6 : if (call_expr_nargs (_p0) == 1)
8252 : : {
8253 : 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8254 : 6 : switch (TREE_CODE (_p1))
8255 : : {
8256 : 3 : case INTEGER_CST:
8257 : 3 : {
8258 : 3 : {
8259 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8260 : 3 : tree res = generic_simplify_235 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP32);
8261 : 3 : if (res) return res;
8262 : : }
8263 : 3 : break;
8264 : : }
8265 : 3 : case CALL_EXPR:
8266 : 3 : switch (get_call_combined_fn (_p1))
8267 : : {
8268 : 3 : case CFN_BUILT_IN_BSWAP32:
8269 : 3 : if (call_expr_nargs (_p1) == 1)
8270 : : {
8271 : 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8272 : 3 : {
8273 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
8274 : 3 : tree res = generic_simplify_234 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP32);
8275 : 3 : if (res) return res;
8276 : : }
8277 : : }
8278 : : break;
8279 : : default:;
8280 : : }
8281 : : break;
8282 : : default:;
8283 : : }
8284 : : }
8285 : : break;
8286 : 6 : case CFN_BUILT_IN_BSWAP64:
8287 : 6 : if (call_expr_nargs (_p0) == 1)
8288 : : {
8289 : 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8290 : 6 : switch (TREE_CODE (_p1))
8291 : : {
8292 : 3 : case INTEGER_CST:
8293 : 3 : {
8294 : 3 : {
8295 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8296 : 3 : tree res = generic_simplify_235 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP64);
8297 : 3 : if (res) return res;
8298 : : }
8299 : 3 : break;
8300 : : }
8301 : 3 : case CALL_EXPR:
8302 : 3 : switch (get_call_combined_fn (_p1))
8303 : : {
8304 : 3 : case CFN_BUILT_IN_BSWAP64:
8305 : 3 : if (call_expr_nargs (_p1) == 1)
8306 : : {
8307 : 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8308 : 3 : {
8309 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
8310 : 3 : tree res = generic_simplify_234 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP64);
8311 : 3 : if (res) return res;
8312 : : }
8313 : : }
8314 : : break;
8315 : : default:;
8316 : : }
8317 : : break;
8318 : : default:;
8319 : : }
8320 : : }
8321 : : break;
8322 : : default:;
8323 : : }
8324 : : break;
8325 : 24990234 : default:;
8326 : : }
8327 : 24990234 : switch (TREE_CODE (_p1))
8328 : : {
8329 : 29 : case VEC_COND_EXPR:
8330 : 29 : {
8331 : 29 : tree _q30 = TREE_OPERAND (_p1, 0);
8332 : 29 : tree _q31 = TREE_OPERAND (_p1, 1);
8333 : 29 : tree _q32 = TREE_OPERAND (_p1, 2);
8334 : 29 : {
8335 : 29 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
8336 : 29 : if (VECTOR_TYPE_P (type)
8337 : 29 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
8338 : 29 : || types_match (type, TREE_TYPE (captures[3]))
8339 : 29 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
8340 : : || (optimize_vectors_before_lowering_p ()
8341 : 21 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
8342 : : )
8343 : : {
8344 : 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1610;
8345 : 29 : {
8346 : 29 : if (! tree_invariant_p (captures[0])) goto next_after_fail1610;
8347 : 0 : tree res_op0;
8348 : 0 : res_op0 = captures[2];
8349 : 0 : tree res_op1;
8350 : 0 : {
8351 : 0 : tree _o1[2], _r1;
8352 : 0 : _o1[0] = unshare_expr (captures[0]);
8353 : 0 : _o1[1] = captures[3];
8354 : 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
8355 : 0 : if (EXPR_P (_r1))
8356 : 0 : goto next_after_fail1610;
8357 : 0 : res_op1 = _r1;
8358 : : }
8359 : 0 : tree res_op2;
8360 : 0 : {
8361 : 0 : tree _o1[2], _r1;
8362 : 0 : _o1[0] = captures[0];
8363 : 0 : _o1[1] = captures[4];
8364 : 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
8365 : 0 : if (EXPR_P (_r1))
8366 : 0 : goto next_after_fail1610;
8367 : 0 : res_op2 = _r1;
8368 : : }
8369 : 0 : tree _r;
8370 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8371 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 902, __FILE__, __LINE__, true);
8372 : 0 : return _r;
8373 : : }
8374 : 29 : next_after_fail1610:;
8375 : : }
8376 : : }
8377 : 29 : break;
8378 : : }
8379 : 24990234 : default:;
8380 : : }
8381 : 24990234 : switch (TREE_CODE (_p0))
8382 : : {
8383 : 40424 : case COND_EXPR:
8384 : 40424 : {
8385 : 40424 : tree _q20 = TREE_OPERAND (_p0, 0);
8386 : 40424 : tree _q21 = TREE_OPERAND (_p0, 1);
8387 : 40424 : tree _q22 = TREE_OPERAND (_p0, 2);
8388 : 40424 : switch (TREE_CODE (_p1))
8389 : : {
8390 : 37 : case COND_EXPR:
8391 : 37 : {
8392 : 37 : tree _q60 = TREE_OPERAND (_p1, 0);
8393 : 37 : tree _q61 = TREE_OPERAND (_p1, 1);
8394 : 37 : tree _q62 = TREE_OPERAND (_p1, 2);
8395 : 37 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
8396 : : {
8397 : 3 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
8398 : : {
8399 : 3 : {
8400 : 3 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
8401 : 3 : const enum tree_code eqne = EQ_EXPR;
8402 : 3 : if (!HONOR_NANS (captures[1])
8403 : 3 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
8404 : 6 : && types_match (type, TREE_TYPE (captures[0]))
8405 : : )
8406 : : {
8407 : 3 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1611;
8408 : 3 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1611;
8409 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1611;
8410 : 3 : {
8411 : 3 : tree res_op0;
8412 : 3 : {
8413 : 3 : tree _o1[2], _r1;
8414 : 3 : {
8415 : 3 : tree _o2[2], _r2;
8416 : 3 : _o2[0] = captures[0];
8417 : 3 : _o2[1] = captures[3];
8418 : 3 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
8419 : 3 : _o1[0] = _r2;
8420 : : }
8421 : 3 : {
8422 : 3 : tree _o2[2], _r2;
8423 : 3 : _o2[0] = captures[1];
8424 : 3 : _o2[1] = captures[2];
8425 : 3 : _r2 = fold_build2_loc (loc, NE_EXPR, type, _o2[0], _o2[1]);
8426 : 3 : _o1[1] = _r2;
8427 : : }
8428 : 3 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8429 : 3 : res_op0 = _r1;
8430 : : }
8431 : 3 : tree res_op1;
8432 : 3 : res_op1 = constant_boolean_node (eqne == NE_EXPR, type);
8433 : 3 : tree res_op2;
8434 : 3 : res_op2 = constant_boolean_node (eqne != NE_EXPR, type);
8435 : 3 : tree _r;
8436 : 3 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
8437 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 988, __FILE__, __LINE__, true);
8438 : 3 : return _r;
8439 : : }
8440 : 0 : next_after_fail1611:;
8441 : : }
8442 : : }
8443 : : }
8444 : : }
8445 : 34 : if ((_q61 == _q22 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q22, 0) && types_match (_q61, _q22)))
8446 : : {
8447 : 7 : if ((_q62 == _q21 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q21, 0) && types_match (_q62, _q21)))
8448 : : {
8449 : 7 : {
8450 : 7 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
8451 : 7 : const enum tree_code eqne = EQ_EXPR;
8452 : 7 : if (!HONOR_NANS (captures[1])
8453 : 0 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
8454 : 7 : && types_match (type, TREE_TYPE (captures[0]))
8455 : : )
8456 : : {
8457 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1612;
8458 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1612;
8459 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1612;
8460 : 0 : {
8461 : 0 : tree res_op0;
8462 : 0 : {
8463 : 0 : tree _o1[2], _r1;
8464 : 0 : {
8465 : 0 : tree _o2[2], _r2;
8466 : 0 : _o2[0] = captures[0];
8467 : 0 : _o2[1] = captures[3];
8468 : 0 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
8469 : 0 : _o1[0] = _r2;
8470 : : }
8471 : 0 : {
8472 : 0 : tree _o2[2], _r2;
8473 : 0 : _o2[0] = captures[1];
8474 : 0 : _o2[1] = captures[2];
8475 : 0 : _r2 = fold_build2_loc (loc, EQ_EXPR, type, _o2[0], _o2[1]);
8476 : 0 : _o1[1] = _r2;
8477 : : }
8478 : 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8479 : 0 : res_op0 = _r1;
8480 : : }
8481 : 0 : tree res_op1;
8482 : 0 : res_op1 = constant_boolean_node (eqne != NE_EXPR, type);
8483 : 0 : tree res_op2;
8484 : 0 : res_op2 = constant_boolean_node (eqne == NE_EXPR, type);
8485 : 0 : tree _r;
8486 : 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
8487 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 989, __FILE__, __LINE__, true);
8488 : 0 : return _r;
8489 : : }
8490 : 7 : next_after_fail1612:;
8491 : : }
8492 : : }
8493 : : }
8494 : : }
8495 : : break;
8496 : : }
8497 : : default:;
8498 : : }
8499 : : break;
8500 : : }
8501 : 109 : case VEC_COND_EXPR:
8502 : 109 : {
8503 : 109 : tree _q20 = TREE_OPERAND (_p0, 0);
8504 : 109 : tree _q21 = TREE_OPERAND (_p0, 1);
8505 : 109 : tree _q22 = TREE_OPERAND (_p0, 2);
8506 : 109 : switch (TREE_CODE (_p1))
8507 : : {
8508 : 27 : case VEC_COND_EXPR:
8509 : 27 : {
8510 : 27 : tree _q60 = TREE_OPERAND (_p1, 0);
8511 : 27 : tree _q61 = TREE_OPERAND (_p1, 1);
8512 : 27 : tree _q62 = TREE_OPERAND (_p1, 2);
8513 : 27 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
8514 : : {
8515 : 6 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
8516 : : {
8517 : 6 : {
8518 : 6 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
8519 : 6 : const enum tree_code eqne = EQ_EXPR;
8520 : 6 : if (!HONOR_NANS (captures[1])
8521 : 6 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
8522 : 12 : && types_match (type, TREE_TYPE (captures[0]))
8523 : : )
8524 : : {
8525 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1613;
8526 : 6 : {
8527 : 6 : tree res_op0;
8528 : 6 : {
8529 : 6 : tree _o1[2], _r1;
8530 : 6 : {
8531 : 6 : tree _o2[2], _r2;
8532 : 6 : _o2[0] = captures[0];
8533 : 6 : _o2[1] = captures[3];
8534 : 6 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
8535 : 6 : _o1[0] = _r2;
8536 : : }
8537 : 6 : {
8538 : 6 : tree _o2[2], _r2;
8539 : 6 : _o2[0] = captures[1];
8540 : 6 : _o2[1] = captures[2];
8541 : 6 : _r2 = fold_build2_loc (loc, NE_EXPR, type, _o2[0], _o2[1]);
8542 : 6 : _o1[1] = _r2;
8543 : : }
8544 : 6 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8545 : 6 : res_op0 = _r1;
8546 : : }
8547 : 6 : tree res_op1;
8548 : 6 : res_op1 = constant_boolean_node (eqne == NE_EXPR, type);
8549 : 6 : tree res_op2;
8550 : 6 : res_op2 = constant_boolean_node (eqne != NE_EXPR, type);
8551 : 6 : tree _r;
8552 : 6 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8553 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 988, __FILE__, __LINE__, true);
8554 : 6 : return _r;
8555 : : }
8556 : 0 : next_after_fail1613:;
8557 : : }
8558 : : }
8559 : : }
8560 : : }
8561 : 21 : if ((_q61 == _q22 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q22, 0) && types_match (_q61, _q22)))
8562 : : {
8563 : 21 : if ((_q62 == _q21 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q21, 0) && types_match (_q62, _q21)))
8564 : : {
8565 : 21 : {
8566 : 21 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
8567 : 21 : const enum tree_code eqne = EQ_EXPR;
8568 : 21 : if (!HONOR_NANS (captures[1])
8569 : 0 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
8570 : 21 : && types_match (type, TREE_TYPE (captures[0]))
8571 : : )
8572 : : {
8573 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1614;
8574 : 0 : {
8575 : 0 : tree res_op0;
8576 : 0 : {
8577 : 0 : tree _o1[2], _r1;
8578 : 0 : {
8579 : 0 : tree _o2[2], _r2;
8580 : 0 : _o2[0] = captures[0];
8581 : 0 : _o2[1] = captures[3];
8582 : 0 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
8583 : 0 : _o1[0] = _r2;
8584 : : }
8585 : 0 : {
8586 : 0 : tree _o2[2], _r2;
8587 : 0 : _o2[0] = captures[1];
8588 : 0 : _o2[1] = captures[2];
8589 : 0 : _r2 = fold_build2_loc (loc, EQ_EXPR, type, _o2[0], _o2[1]);
8590 : 0 : _o1[1] = _r2;
8591 : : }
8592 : 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8593 : 0 : res_op0 = _r1;
8594 : : }
8595 : 0 : tree res_op1;
8596 : 0 : res_op1 = constant_boolean_node (eqne != NE_EXPR, type);
8597 : 0 : tree res_op2;
8598 : 0 : res_op2 = constant_boolean_node (eqne == NE_EXPR, type);
8599 : 0 : tree _r;
8600 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8601 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 989, __FILE__, __LINE__, true);
8602 : 0 : return _r;
8603 : : }
8604 : 0 : next_after_fail1614:;
8605 : : }
8606 : : }
8607 : : }
8608 : : }
8609 : : break;
8610 : : }
8611 : : default:;
8612 : : }
8613 : : break;
8614 : : }
8615 : 1193 : case LT_EXPR:
8616 : 1193 : {
8617 : 1193 : tree _q20 = TREE_OPERAND (_p0, 0);
8618 : 1193 : tree _q21 = TREE_OPERAND (_p0, 1);
8619 : 1193 : if (integer_truep (_p1))
8620 : : {
8621 : 5 : {
8622 : 5 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8623 : 5 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, LT_EXPR, GE_EXPR, UNGE_EXPR);
8624 : 5 : if (res) return res;
8625 : : }
8626 : : }
8627 : 1193 : if (integer_zerop (_p1))
8628 : : {
8629 : 424 : {
8630 : 424 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8631 : 424 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, LT_EXPR, GE_EXPR, UNGE_EXPR);
8632 : 424 : if (res) return res;
8633 : : }
8634 : : }
8635 : : break;
8636 : : }
8637 : 1604 : case LE_EXPR:
8638 : 1604 : {
8639 : 1604 : tree _q20 = TREE_OPERAND (_p0, 0);
8640 : 1604 : tree _q21 = TREE_OPERAND (_p0, 1);
8641 : 1604 : if (integer_truep (_p1))
8642 : : {
8643 : 0 : {
8644 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8645 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR, UNGT_EXPR);
8646 : 0 : if (res) return res;
8647 : : }
8648 : : }
8649 : 1604 : if (integer_zerop (_p1))
8650 : : {
8651 : 686 : {
8652 : 686 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8653 : 686 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR, UNGT_EXPR);
8654 : 686 : if (res) return res;
8655 : : }
8656 : : }
8657 : : break;
8658 : : }
8659 : 30824 : case EQ_EXPR:
8660 : 30824 : {
8661 : 30824 : tree _q20 = TREE_OPERAND (_p0, 0);
8662 : 30824 : tree _q21 = TREE_OPERAND (_p0, 1);
8663 : 30824 : if (integer_truep (_p1))
8664 : : {
8665 : 46 : {
8666 : 46 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8667 : 46 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR, NE_EXPR);
8668 : 46 : if (res) return res;
8669 : : }
8670 : : }
8671 : 30819 : if (integer_zerop (_p1))
8672 : : {
8673 : 6927 : {
8674 : 6927 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8675 : 6927 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR, NE_EXPR);
8676 : 6927 : if (res) return res;
8677 : : }
8678 : : }
8679 : : break;
8680 : : }
8681 : 11188 : case NE_EXPR:
8682 : 11188 : {
8683 : 11188 : tree _q20 = TREE_OPERAND (_p0, 0);
8684 : 11188 : tree _q21 = TREE_OPERAND (_p0, 1);
8685 : 11188 : if (integer_truep (_p1))
8686 : : {
8687 : 126 : {
8688 : 126 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8689 : 126 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR, EQ_EXPR);
8690 : 126 : if (res) return res;
8691 : : }
8692 : : }
8693 : 11068 : if (integer_zerop (_p1))
8694 : : {
8695 : 9625 : {
8696 : 9625 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8697 : 9625 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR, EQ_EXPR);
8698 : 9625 : if (res) return res;
8699 : : }
8700 : : }
8701 : : break;
8702 : : }
8703 : 6504 : case GE_EXPR:
8704 : 6504 : {
8705 : 6504 : tree _q20 = TREE_OPERAND (_p0, 0);
8706 : 6504 : tree _q21 = TREE_OPERAND (_p0, 1);
8707 : 6504 : if (integer_truep (_p1))
8708 : : {
8709 : 0 : {
8710 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8711 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, GE_EXPR, LT_EXPR, UNLT_EXPR);
8712 : 0 : if (res) return res;
8713 : : }
8714 : : }
8715 : 6504 : if (integer_zerop (_p1))
8716 : : {
8717 : 5345 : {
8718 : 5345 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8719 : 5345 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, GE_EXPR, LT_EXPR, UNLT_EXPR);
8720 : 5345 : if (res) return res;
8721 : : }
8722 : : }
8723 : : break;
8724 : : }
8725 : 30073 : case GT_EXPR:
8726 : 30073 : {
8727 : 30073 : tree _q20 = TREE_OPERAND (_p0, 0);
8728 : 30073 : tree _q21 = TREE_OPERAND (_p0, 1);
8729 : 30073 : if (integer_truep (_p1))
8730 : : {
8731 : 0 : {
8732 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8733 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, GT_EXPR, LE_EXPR, UNLE_EXPR);
8734 : 0 : if (res) return res;
8735 : : }
8736 : : }
8737 : 30073 : if (integer_zerop (_p1))
8738 : : {
8739 : 446 : {
8740 : 446 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8741 : 446 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, GT_EXPR, LE_EXPR, UNLE_EXPR);
8742 : 446 : if (res) return res;
8743 : : }
8744 : : }
8745 : : break;
8746 : : }
8747 : 1023 : case UNORDERED_EXPR:
8748 : 1023 : {
8749 : 1023 : tree _q20 = TREE_OPERAND (_p0, 0);
8750 : 1023 : tree _q21 = TREE_OPERAND (_p0, 1);
8751 : 1023 : if (integer_truep (_p1))
8752 : : {
8753 : 0 : {
8754 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8755 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR);
8756 : 0 : if (res) return res;
8757 : : }
8758 : : }
8759 : 1023 : if (integer_zerop (_p1))
8760 : : {
8761 : 1017 : {
8762 : 1017 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8763 : 1017 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR);
8764 : 1017 : if (res) return res;
8765 : : }
8766 : : }
8767 : : break;
8768 : : }
8769 : 0 : case ORDERED_EXPR:
8770 : 0 : {
8771 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8772 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8773 : 0 : if (integer_truep (_p1))
8774 : : {
8775 : 0 : {
8776 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8777 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR);
8778 : 0 : if (res) return res;
8779 : : }
8780 : : }
8781 : 0 : if (integer_zerop (_p1))
8782 : : {
8783 : 0 : {
8784 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8785 : 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR);
8786 : 0 : if (res) return res;
8787 : : }
8788 : : }
8789 : : break;
8790 : : }
8791 : 0 : case UNLT_EXPR:
8792 : 0 : {
8793 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8794 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8795 : 0 : if (integer_truep (_p1))
8796 : : {
8797 : 0 : {
8798 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8799 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, UNLT_EXPR, GE_EXPR, GE_EXPR);
8800 : 0 : if (res) return res;
8801 : : }
8802 : : }
8803 : 0 : if (integer_zerop (_p1))
8804 : : {
8805 : 0 : {
8806 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8807 : 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, UNLT_EXPR, GE_EXPR, GE_EXPR);
8808 : 0 : if (res) return res;
8809 : : }
8810 : : }
8811 : : break;
8812 : : }
8813 : 0 : case UNLE_EXPR:
8814 : 0 : {
8815 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8816 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8817 : 0 : if (integer_truep (_p1))
8818 : : {
8819 : 0 : {
8820 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8821 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, UNLE_EXPR, GT_EXPR, GT_EXPR);
8822 : 0 : if (res) return res;
8823 : : }
8824 : : }
8825 : 0 : if (integer_zerop (_p1))
8826 : : {
8827 : 0 : {
8828 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8829 : 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, UNLE_EXPR, GT_EXPR, GT_EXPR);
8830 : 0 : if (res) return res;
8831 : : }
8832 : : }
8833 : : break;
8834 : : }
8835 : 0 : case UNGT_EXPR:
8836 : 0 : {
8837 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8838 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8839 : 0 : if (integer_truep (_p1))
8840 : : {
8841 : 0 : {
8842 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8843 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, UNGT_EXPR, LE_EXPR, LE_EXPR);
8844 : 0 : if (res) return res;
8845 : : }
8846 : : }
8847 : 0 : if (integer_zerop (_p1))
8848 : : {
8849 : 0 : {
8850 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8851 : 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, UNGT_EXPR, LE_EXPR, LE_EXPR);
8852 : 0 : if (res) return res;
8853 : : }
8854 : : }
8855 : : break;
8856 : : }
8857 : 0 : case UNGE_EXPR:
8858 : 0 : {
8859 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8860 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8861 : 0 : if (integer_truep (_p1))
8862 : : {
8863 : 0 : {
8864 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8865 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, UNGE_EXPR, LT_EXPR, LT_EXPR);
8866 : 0 : if (res) return res;
8867 : : }
8868 : : }
8869 : 0 : if (integer_zerop (_p1))
8870 : : {
8871 : 0 : {
8872 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8873 : 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, UNGE_EXPR, LT_EXPR, LT_EXPR);
8874 : 0 : if (res) return res;
8875 : : }
8876 : : }
8877 : : break;
8878 : : }
8879 : 0 : case UNEQ_EXPR:
8880 : 0 : {
8881 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8882 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8883 : 0 : if (integer_truep (_p1))
8884 : : {
8885 : 0 : {
8886 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8887 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR);
8888 : 0 : if (res) return res;
8889 : : }
8890 : : }
8891 : 0 : if (integer_zerop (_p1))
8892 : : {
8893 : 0 : {
8894 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8895 : 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR);
8896 : 0 : if (res) return res;
8897 : : }
8898 : : }
8899 : : break;
8900 : : }
8901 : 0 : case LTGT_EXPR:
8902 : 0 : {
8903 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8904 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8905 : 0 : if (integer_truep (_p1))
8906 : : {
8907 : 0 : {
8908 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8909 : 0 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR);
8910 : 0 : if (res) return res;
8911 : : }
8912 : : }
8913 : 0 : if (integer_zerop (_p1))
8914 : : {
8915 : 0 : {
8916 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8917 : 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR);
8918 : 0 : if (res) return res;
8919 : : }
8920 : : }
8921 : : break;
8922 : : }
8923 : 118311 : case MINUS_EXPR:
8924 : 118311 : {
8925 : 118311 : tree _q20 = TREE_OPERAND (_p0, 0);
8926 : 118311 : tree _q21 = TREE_OPERAND (_p0, 1);
8927 : 118311 : if (integer_zerop (_p1))
8928 : : {
8929 : 36582 : {
8930 : 36582 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8931 : 36582 : tree res = generic_simplify_238 (loc, type, _p0, _p1, captures, EQ_EXPR);
8932 : 36582 : if (res) return res;
8933 : : }
8934 : : }
8935 : : break;
8936 : : }
8937 : 35146 : case POINTER_DIFF_EXPR:
8938 : 35146 : {
8939 : 35146 : tree _q20 = TREE_OPERAND (_p0, 0);
8940 : 35146 : tree _q21 = TREE_OPERAND (_p0, 1);
8941 : 35146 : if (integer_zerop (_p1))
8942 : : {
8943 : 1313 : {
8944 : 1313 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8945 : 1313 : tree res = generic_simplify_239 (loc, type, _p0, _p1, captures, EQ_EXPR);
8946 : 1313 : if (res) return res;
8947 : : }
8948 : : }
8949 : : break;
8950 : : }
8951 : 63395 : case MULT_EXPR:
8952 : 63395 : {
8953 : 63395 : tree _q20 = TREE_OPERAND (_p0, 0);
8954 : 63395 : tree _q21 = TREE_OPERAND (_p0, 1);
8955 : 63395 : switch (TREE_CODE (_q21))
8956 : : {
8957 : 56193 : case INTEGER_CST:
8958 : 56193 : {
8959 : 56193 : switch (TREE_CODE (_p1))
8960 : : {
8961 : 11224 : case INTEGER_CST:
8962 : 11224 : {
8963 : 11224 : {
8964 : 11224 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8965 : 11224 : tree res = generic_simplify_241 (loc, type, _p0, _p1, captures, EQ_EXPR);
8966 : 11224 : if (res) return res;
8967 : : }
8968 : 10176 : break;
8969 : : }
8970 : 55145 : default:;
8971 : : }
8972 : 55145 : if (integer_zerop (_p1))
8973 : : {
8974 : 4877 : {
8975 : 4877 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
8976 : 4877 : tree res = generic_simplify_240 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8977 : 4877 : if (res) return res;
8978 : : }
8979 : : }
8980 : : break;
8981 : : }
8982 : : default:;
8983 : : }
8984 : : break;
8985 : : }
8986 : 24927541 : default:;
8987 : : }
8988 : 24927541 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
8989 : : {
8990 : 63257 : {
8991 : 63257 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8992 : 63257 : tree res = generic_simplify_242 (loc, type, _p0, _p1, captures, EQ_EXPR);
8993 : 63257 : if (res) return res;
8994 : : }
8995 : : }
8996 : 24866779 : switch (TREE_CODE (_p0))
8997 : : {
8998 : 4308824 : CASE_CONVERT:
8999 : 4308824 : {
9000 : 4308824 : tree _q20 = TREE_OPERAND (_p0, 0);
9001 : 4308824 : switch (TREE_CODE (_p1))
9002 : : {
9003 : 968079 : CASE_CONVERT:
9004 : 968079 : {
9005 : 968079 : tree _q40 = TREE_OPERAND (_p1, 0);
9006 : 968079 : {
9007 : 968079 : tree _q40_pops[1];
9008 : 968079 : if (tree_maybe_bit_not (_q40, _q40_pops))
9009 : : {
9010 : 0 : tree _q50 = _q40_pops[0];
9011 : 0 : {
9012 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
9013 : 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, EQ_EXPR);
9014 : 0 : if (res) return res;
9015 : : }
9016 : : }
9017 : : }
9018 : 968079 : break;
9019 : : }
9020 : 4308824 : default:;
9021 : : }
9022 : 4308824 : {
9023 : 4308824 : tree _q20_pops[1];
9024 : 4308824 : if (tree_maybe_bit_not (_q20, _q20_pops))
9025 : : {
9026 : 232 : tree _q30 = _q20_pops[0];
9027 : 232 : switch (TREE_CODE (_p1))
9028 : : {
9029 : 74 : CASE_CONVERT:
9030 : 74 : {
9031 : 74 : tree _q50 = TREE_OPERAND (_p1, 0);
9032 : 74 : {
9033 : 74 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
9034 : 74 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, EQ_EXPR);
9035 : 74 : if (res) return res;
9036 : : }
9037 : 74 : break;
9038 : : }
9039 : : default:;
9040 : : }
9041 : : }
9042 : : }
9043 : 4308824 : break;
9044 : : }
9045 : 24866779 : default:;
9046 : : }
9047 : 24866779 : {
9048 : 24866779 : tree _p1_pops[1];
9049 : 24866779 : if (tree_maybe_bit_not (_p1, _p1_pops))
9050 : : {
9051 : 18186953 : tree _q30 = _p1_pops[0];
9052 : 18186953 : {
9053 : 18186953 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
9054 : 18186953 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, EQ_EXPR);
9055 : 18186953 : if (res) return res;
9056 : : }
9057 : : }
9058 : : }
9059 : 24866777 : switch (TREE_CODE (_p0))
9060 : : {
9061 : 405 : case BIT_NOT_EXPR:
9062 : 405 : {
9063 : 405 : tree _q20 = TREE_OPERAND (_p0, 0);
9064 : 405 : switch (TREE_CODE (_p1))
9065 : : {
9066 : 1 : case BIT_NOT_EXPR:
9067 : 1 : {
9068 : 1 : tree _q40 = TREE_OPERAND (_p1, 0);
9069 : 1 : {
9070 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _p1, _q40 };
9071 : 1 : tree res = generic_simplify_246 (loc, type, _p0, _p1, captures, EQ_EXPR);
9072 : 1 : if (res) return res;
9073 : : }
9074 : 0 : break;
9075 : : }
9076 : 404 : default:;
9077 : : }
9078 : 404 : {
9079 : 404 : tree _p1_pops[1];
9080 : 404 : if (tree_nop_convert (_p1, _p1_pops))
9081 : : {
9082 : 6 : tree _q40 = _p1_pops[0];
9083 : 6 : switch (TREE_CODE (_q40))
9084 : : {
9085 : 0 : case BIT_NOT_EXPR:
9086 : 0 : {
9087 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
9088 : 0 : {
9089 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q50 };
9090 : 0 : tree res = generic_simplify_246 (loc, type, _p0, _p1, captures, EQ_EXPR);
9091 : 0 : if (res) return res;
9092 : : }
9093 : 0 : break;
9094 : : }
9095 : : default:;
9096 : : }
9097 : : }
9098 : : }
9099 : 404 : if (CONSTANT_CLASS_P (_p1))
9100 : : {
9101 : 188 : {
9102 : 188 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9103 : 188 : tree res = generic_simplify_245 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9104 : 188 : if (res) return res;
9105 : : }
9106 : : }
9107 : : break;
9108 : : }
9109 : 24866588 : default:;
9110 : : }
9111 : 24866588 : {
9112 : 24866588 : tree _p0_pops[1];
9113 : 24866588 : if (tree_maybe_bit_not (_p0, _p0_pops))
9114 : : {
9115 : 58534 : tree _q20 = _p0_pops[0];
9116 : 58534 : {
9117 : 58534 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _q20 };
9118 : 58534 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, EQ_EXPR);
9119 : 58534 : if (res) return res;
9120 : : }
9121 : : }
9122 : : }
9123 : 24866587 : {
9124 : 24866587 : tree _p0_pops[1];
9125 : 24866587 : if (tree_nop_convert (_p0, _p0_pops))
9126 : : {
9127 : 2601638 : tree _q20 = _p0_pops[0];
9128 : 2601638 : switch (TREE_CODE (_q20))
9129 : : {
9130 : 41 : case BIT_NOT_EXPR:
9131 : 41 : {
9132 : 41 : tree _q30 = TREE_OPERAND (_q20, 0);
9133 : 41 : switch (TREE_CODE (_p1))
9134 : : {
9135 : 0 : case BIT_NOT_EXPR:
9136 : 0 : {
9137 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
9138 : 0 : {
9139 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _p1, _q50 };
9140 : 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, EQ_EXPR);
9141 : 0 : if (res) return res;
9142 : : }
9143 : 0 : break;
9144 : : }
9145 : 41 : default:;
9146 : : }
9147 : 41 : {
9148 : 41 : tree _p1_pops[1];
9149 : 41 : if (tree_nop_convert (_p1, _p1_pops))
9150 : : {
9151 : 0 : tree _q50 = _p1_pops[0];
9152 : 0 : switch (TREE_CODE (_q50))
9153 : : {
9154 : 0 : case BIT_NOT_EXPR:
9155 : 0 : {
9156 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
9157 : 0 : {
9158 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q60 };
9159 : 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, EQ_EXPR);
9160 : 0 : if (res) return res;
9161 : : }
9162 : 0 : break;
9163 : : }
9164 : : default:;
9165 : : }
9166 : : }
9167 : : }
9168 : 41 : if (CONSTANT_CLASS_P (_p1))
9169 : : {
9170 : 41 : {
9171 : 41 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
9172 : 41 : tree res = generic_simplify_245 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9173 : 41 : if (res) return res;
9174 : : }
9175 : : }
9176 : : break;
9177 : : }
9178 : : default:;
9179 : : }
9180 : : }
9181 : : }
9182 : 24866546 : switch (TREE_CODE (_p1))
9183 : : {
9184 : 977097 : case REAL_CST:
9185 : 977097 : {
9186 : 977097 : {
9187 : 977097 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9188 : 977097 : tree res = generic_simplify_247 (loc, type, _p0, _p1, captures, EQ_EXPR);
9189 : 977097 : if (res) return res;
9190 : : }
9191 : 977001 : break;
9192 : : }
9193 : 24866450 : default:;
9194 : : }
9195 : 24866450 : switch (TREE_CODE (_p0))
9196 : : {
9197 : 687692 : case PLUS_EXPR:
9198 : 687692 : {
9199 : 687692 : tree _q20 = TREE_OPERAND (_p0, 0);
9200 : 687692 : tree _q21 = TREE_OPERAND (_p0, 1);
9201 : 687692 : switch (TREE_CODE (_q21))
9202 : : {
9203 : 583 : case REAL_CST:
9204 : 583 : {
9205 : 583 : switch (TREE_CODE (_p1))
9206 : : {
9207 : 407 : case REAL_CST:
9208 : 407 : {
9209 : 407 : {
9210 : 407 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9211 : 407 : tree res = generic_simplify_248 (loc, type, _p0, _p1, captures, PLUS_EXPR, EQ_EXPR);
9212 : 407 : if (res) return res;
9213 : : }
9214 : 407 : break;
9215 : : }
9216 : : default:;
9217 : : }
9218 : : break;
9219 : : }
9220 : : default:;
9221 : : }
9222 : : break;
9223 : : }
9224 : 81729 : case MINUS_EXPR:
9225 : 81729 : {
9226 : 81729 : tree _q20 = TREE_OPERAND (_p0, 0);
9227 : 81729 : tree _q21 = TREE_OPERAND (_p0, 1);
9228 : 81729 : switch (TREE_CODE (_q21))
9229 : : {
9230 : 60 : case REAL_CST:
9231 : 60 : {
9232 : 60 : switch (TREE_CODE (_p1))
9233 : : {
9234 : 60 : case REAL_CST:
9235 : 60 : {
9236 : 60 : {
9237 : 60 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9238 : 60 : tree res = generic_simplify_248 (loc, type, _p0, _p1, captures, MINUS_EXPR, EQ_EXPR);
9239 : 60 : if (res) return res;
9240 : : }
9241 : 60 : break;
9242 : : }
9243 : : default:;
9244 : : }
9245 : : break;
9246 : : }
9247 : 81729 : default:;
9248 : : }
9249 : 81729 : switch (TREE_CODE (_q20))
9250 : : {
9251 : 275 : case REAL_CST:
9252 : 275 : {
9253 : 275 : switch (TREE_CODE (_p1))
9254 : : {
9255 : 245 : case REAL_CST:
9256 : 245 : {
9257 : 245 : {
9258 : 245 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9259 : 245 : tree res = generic_simplify_249 (loc, type, _p0, _p1, captures, EQ_EXPR);
9260 : 245 : if (res) return res;
9261 : : }
9262 : 244 : break;
9263 : : }
9264 : : default:;
9265 : : }
9266 : : break;
9267 : : }
9268 : : default:;
9269 : : }
9270 : : break;
9271 : : }
9272 : 2649 : case FLOAT_EXPR:
9273 : 2649 : {
9274 : 2649 : tree _q20 = TREE_OPERAND (_p0, 0);
9275 : 2649 : switch (TREE_CODE (_p1))
9276 : : {
9277 : 1 : case FLOAT_EXPR:
9278 : 1 : {
9279 : 1 : tree _q40 = TREE_OPERAND (_p1, 0);
9280 : 1 : {
9281 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
9282 : 1 : tree res = generic_simplify_252 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9283 : 1 : if (res) return res;
9284 : : }
9285 : 0 : break;
9286 : : }
9287 : 180 : case REAL_CST:
9288 : 180 : {
9289 : 180 : {
9290 : 180 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9291 : 180 : tree res = generic_simplify_253 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9292 : 180 : if (res) return res;
9293 : : }
9294 : 149 : break;
9295 : : }
9296 : : default:;
9297 : : }
9298 : : break;
9299 : : }
9300 : 8561 : case EXACT_DIV_EXPR:
9301 : 8561 : {
9302 : 8561 : tree _q20 = TREE_OPERAND (_p0, 0);
9303 : 8561 : tree _q21 = TREE_OPERAND (_p0, 1);
9304 : 8561 : switch (TREE_CODE (_p1))
9305 : : {
9306 : 33 : case INTEGER_CST:
9307 : 33 : {
9308 : 33 : {
9309 : 33 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9310 : 33 : tree res = generic_simplify_254 (loc, type, _p0, _p1, captures, EQ_EXPR);
9311 : 33 : if (res) return res;
9312 : : }
9313 : 0 : break;
9314 : : }
9315 : : default:;
9316 : : }
9317 : : break;
9318 : : }
9319 : 902 : case NEGATE_EXPR:
9320 : 902 : {
9321 : 902 : tree _q20 = TREE_OPERAND (_p0, 0);
9322 : 902 : switch (TREE_CODE (_p1))
9323 : : {
9324 : 1 : case NEGATE_EXPR:
9325 : 1 : {
9326 : 1 : tree _q40 = TREE_OPERAND (_p1, 0);
9327 : 1 : {
9328 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9329 : 1 : tree res = generic_simplify_255 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9330 : 1 : if (res) return res;
9331 : : }
9332 : 0 : break;
9333 : : }
9334 : 901 : default:;
9335 : : }
9336 : 901 : if (CONSTANT_CLASS_P (_p1))
9337 : : {
9338 : 205 : {
9339 : 205 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9340 : 205 : tree res = generic_simplify_256 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9341 : 205 : if (res) return res;
9342 : : }
9343 : : }
9344 : : break;
9345 : : }
9346 : 1196 : case ABS_EXPR:
9347 : 1196 : {
9348 : 1196 : tree _q20 = TREE_OPERAND (_p0, 0);
9349 : 1196 : if (zerop (_p1))
9350 : : {
9351 : 72 : {
9352 : 72 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9353 : 72 : const enum tree_code eqne = EQ_EXPR;
9354 : 72 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1615;
9355 : 72 : {
9356 : 72 : tree res_op0;
9357 : 72 : res_op0 = captures[0];
9358 : 72 : tree res_op1;
9359 : 72 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
9360 : 72 : tree _r;
9361 : 72 : _r = fold_build2_loc (loc, eqne, type, res_op0, res_op1);
9362 : 72 : if (TREE_SIDE_EFFECTS (captures[1]))
9363 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
9364 : 72 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 990, __FILE__, __LINE__, true);
9365 : 72 : return _r;
9366 : : }
9367 : 0 : next_after_fail1615:;
9368 : : }
9369 : : }
9370 : : break;
9371 : : }
9372 : 1 : case ABSU_EXPR:
9373 : 1 : {
9374 : 1 : tree _q20 = TREE_OPERAND (_p0, 0);
9375 : 1 : if (zerop (_p1))
9376 : : {
9377 : 0 : {
9378 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9379 : 0 : const enum tree_code eqne = EQ_EXPR;
9380 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1616;
9381 : 0 : {
9382 : 0 : tree res_op0;
9383 : 0 : res_op0 = captures[0];
9384 : 0 : tree res_op1;
9385 : 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
9386 : 0 : tree _r;
9387 : 0 : _r = fold_build2_loc (loc, eqne, type, res_op0, res_op1);
9388 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
9389 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
9390 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 990, __FILE__, __LINE__, true);
9391 : 0 : return _r;
9392 : : }
9393 : 0 : next_after_fail1616:;
9394 : : }
9395 : : }
9396 : : break;
9397 : : }
9398 : 4308745 : CASE_CONVERT:
9399 : 4308745 : {
9400 : 4308745 : tree _q20 = TREE_OPERAND (_p0, 0);
9401 : 4308745 : switch (TREE_CODE (_p1))
9402 : : {
9403 : 968079 : CASE_CONVERT:
9404 : 968079 : {
9405 : 968079 : tree _q40 = TREE_OPERAND (_p1, 0);
9406 : 968079 : {
9407 : 968079 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9408 : 968079 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, EQ_EXPR);
9409 : 968079 : if (res) return res;
9410 : : }
9411 : 468754 : break;
9412 : : }
9413 : 3809420 : default:;
9414 : : }
9415 : 3809420 : {
9416 : 3809420 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
9417 : 3809420 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, EQ_EXPR);
9418 : 3809420 : if (res) return res;
9419 : : }
9420 : 1865134 : switch (TREE_CODE (_q20))
9421 : : {
9422 : 3 : case BIT_IOR_EXPR:
9423 : 3 : {
9424 : 3 : tree _q30 = TREE_OPERAND (_q20, 0);
9425 : 3 : tree _q31 = TREE_OPERAND (_q20, 1);
9426 : 3 : switch (TREE_CODE (_q31))
9427 : : {
9428 : 0 : case INTEGER_CST:
9429 : 0 : {
9430 : 0 : switch (TREE_CODE (_p1))
9431 : : {
9432 : 0 : case INTEGER_CST:
9433 : 0 : {
9434 : 0 : {
9435 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _p1 };
9436 : 0 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, EQ_EXPR);
9437 : 0 : if (res) return res;
9438 : : }
9439 : 0 : break;
9440 : : }
9441 : : default:;
9442 : : }
9443 : : break;
9444 : : }
9445 : : default:;
9446 : : }
9447 : : break;
9448 : : }
9449 : : default:;
9450 : : }
9451 : : break;
9452 : : }
9453 : 8692359 : case SSA_NAME:
9454 : 8692359 : {
9455 : 8692359 : switch (TREE_CODE (_p1))
9456 : : {
9457 : 664462 : case ADDR_EXPR:
9458 : 664462 : {
9459 : 664462 : {
9460 : 664462 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9461 : 664462 : tree res = generic_simplify_260 (loc, type, _p0, _p1, captures, EQ_EXPR);
9462 : 664462 : if (res) return res;
9463 : : }
9464 : 664462 : break;
9465 : : }
9466 : : default:;
9467 : : }
9468 : : break;
9469 : : }
9470 : 33286 : case BIT_IOR_EXPR:
9471 : 33286 : {
9472 : 33286 : tree _q20 = TREE_OPERAND (_p0, 0);
9473 : 33286 : tree _q21 = TREE_OPERAND (_p0, 1);
9474 : 33286 : switch (TREE_CODE (_q21))
9475 : : {
9476 : 1662 : case INTEGER_CST:
9477 : 1662 : {
9478 : 1662 : switch (TREE_CODE (_p1))
9479 : : {
9480 : 464 : case INTEGER_CST:
9481 : 464 : {
9482 : 464 : {
9483 : 464 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
9484 : 464 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, EQ_EXPR);
9485 : 464 : if (res) return res;
9486 : : }
9487 : 464 : break;
9488 : : }
9489 : : default:;
9490 : : }
9491 : : break;
9492 : : }
9493 : : default:;
9494 : : }
9495 : : break;
9496 : : }
9497 : 589 : case BIT_XOR_EXPR:
9498 : 589 : {
9499 : 589 : tree _q20 = TREE_OPERAND (_p0, 0);
9500 : 589 : tree _q21 = TREE_OPERAND (_p0, 1);
9501 : 589 : if (integer_zerop (_p1))
9502 : : {
9503 : 162 : {
9504 : 162 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9505 : 162 : tree res = generic_simplify_261 (loc, type, _p0, _p1, captures, EQ_EXPR);
9506 : 162 : if (res) return res;
9507 : : }
9508 : : }
9509 : 427 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9510 : : {
9511 : 29 : {
9512 : 29 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9513 : 29 : tree res = generic_simplify_262 (loc, type, _p0, _p1, captures, EQ_EXPR);
9514 : 29 : if (res) return res;
9515 : : }
9516 : : }
9517 : 398 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9518 : : {
9519 : 30 : {
9520 : 30 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
9521 : 30 : tree res = generic_simplify_262 (loc, type, _p0, _p1, captures, EQ_EXPR);
9522 : 30 : if (res) return res;
9523 : : }
9524 : : }
9525 : : break;
9526 : : }
9527 : 1751933 : case CALL_EXPR:
9528 : 1751933 : switch (get_call_combined_fn (_p0))
9529 : : {
9530 : 3 : case CFN_BUILT_IN_SQRTF:
9531 : 3 : if (call_expr_nargs (_p0) == 1)
9532 : : {
9533 : 3 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9534 : 3 : switch (TREE_CODE (_p1))
9535 : : {
9536 : 0 : case REAL_CST:
9537 : 0 : {
9538 : 0 : {
9539 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9540 : 0 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, EQ_EXPR);
9541 : 0 : if (res) return res;
9542 : : }
9543 : 0 : break;
9544 : : }
9545 : 3 : case CALL_EXPR:
9546 : 3 : switch (get_call_combined_fn (_p1))
9547 : : {
9548 : 3 : case CFN_BUILT_IN_SQRTF:
9549 : 3 : if (call_expr_nargs (_p1) == 1)
9550 : : {
9551 : 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9552 : 3 : {
9553 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9554 : 3 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, EQ_EXPR);
9555 : 3 : if (res) return res;
9556 : : }
9557 : : }
9558 : : break;
9559 : : default:;
9560 : : }
9561 : : break;
9562 : : default:;
9563 : : }
9564 : : }
9565 : : break;
9566 : 3 : case CFN_BUILT_IN_SQRTL:
9567 : 3 : if (call_expr_nargs (_p0) == 1)
9568 : : {
9569 : 3 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9570 : 3 : switch (TREE_CODE (_p1))
9571 : : {
9572 : 0 : case REAL_CST:
9573 : 0 : {
9574 : 0 : {
9575 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9576 : 0 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, EQ_EXPR);
9577 : 0 : if (res) return res;
9578 : : }
9579 : 0 : break;
9580 : : }
9581 : 3 : case CALL_EXPR:
9582 : 3 : switch (get_call_combined_fn (_p1))
9583 : : {
9584 : 3 : case CFN_BUILT_IN_SQRTL:
9585 : 3 : if (call_expr_nargs (_p1) == 1)
9586 : : {
9587 : 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9588 : 3 : {
9589 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9590 : 3 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, EQ_EXPR);
9591 : 3 : if (res) return res;
9592 : : }
9593 : : }
9594 : : break;
9595 : : default:;
9596 : : }
9597 : : break;
9598 : : default:;
9599 : : }
9600 : : }
9601 : : break;
9602 : 0 : case CFN_BUILT_IN_SQRT:
9603 : 0 : if (call_expr_nargs (_p0) == 1)
9604 : : {
9605 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9606 : 0 : switch (TREE_CODE (_p1))
9607 : : {
9608 : 0 : case REAL_CST:
9609 : 0 : {
9610 : 0 : {
9611 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9612 : 0 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, EQ_EXPR);
9613 : 0 : if (res) return res;
9614 : : }
9615 : 0 : break;
9616 : : }
9617 : 0 : case CALL_EXPR:
9618 : 0 : switch (get_call_combined_fn (_p1))
9619 : : {
9620 : 0 : case CFN_BUILT_IN_SQRT:
9621 : 0 : if (call_expr_nargs (_p1) == 1)
9622 : : {
9623 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9624 : 0 : {
9625 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9626 : 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, EQ_EXPR);
9627 : 0 : if (res) return res;
9628 : : }
9629 : : }
9630 : : break;
9631 : : default:;
9632 : : }
9633 : : break;
9634 : : default:;
9635 : : }
9636 : : }
9637 : : break;
9638 : 0 : case CFN_SQRT:
9639 : 0 : if (call_expr_nargs (_p0) == 1)
9640 : : {
9641 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9642 : 0 : switch (TREE_CODE (_p1))
9643 : : {
9644 : 0 : case REAL_CST:
9645 : 0 : {
9646 : 0 : {
9647 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9648 : 0 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_SQRT, EQ_EXPR);
9649 : 0 : if (res) return res;
9650 : : }
9651 : 0 : break;
9652 : : }
9653 : 0 : case CALL_EXPR:
9654 : 0 : switch (get_call_combined_fn (_p1))
9655 : : {
9656 : 0 : case CFN_SQRT:
9657 : 0 : if (call_expr_nargs (_p1) == 1)
9658 : : {
9659 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9660 : 0 : {
9661 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9662 : 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_SQRT, EQ_EXPR);
9663 : 0 : if (res) return res;
9664 : : }
9665 : : }
9666 : : break;
9667 : : default:;
9668 : : }
9669 : : break;
9670 : : default:;
9671 : : }
9672 : : }
9673 : : break;
9674 : : default:;
9675 : : }
9676 : : break;
9677 : 22422284 : default:;
9678 : : }
9679 : 22422284 : switch (TREE_CODE (_p1))
9680 : : {
9681 : 22 : case BIT_XOR_EXPR:
9682 : 22 : {
9683 : 22 : tree _q30 = TREE_OPERAND (_p1, 0);
9684 : 22 : tree _q31 = TREE_OPERAND (_p1, 1);
9685 : 22 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9686 : : {
9687 : 0 : {
9688 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
9689 : 0 : tree res = generic_simplify_262 (loc, type, _p0, _p1, captures, EQ_EXPR);
9690 : 0 : if (res) return res;
9691 : : }
9692 : : }
9693 : 22 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9694 : : {
9695 : 0 : {
9696 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
9697 : 0 : tree res = generic_simplify_262 (loc, type, _p0, _p1, captures, EQ_EXPR);
9698 : 0 : if (res) return res;
9699 : : }
9700 : : }
9701 : : break;
9702 : : }
9703 : 22422284 : default:;
9704 : : }
9705 : 22422284 : switch (TREE_CODE (_p0))
9706 : : {
9707 : 891781 : case BIT_AND_EXPR:
9708 : 891781 : {
9709 : 891781 : tree _q20 = TREE_OPERAND (_p0, 0);
9710 : 891781 : tree _q21 = TREE_OPERAND (_p0, 1);
9711 : 891781 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9712 : : {
9713 : 15020 : {
9714 : 15020 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9715 : 15020 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, EQ_EXPR);
9716 : 15020 : if (res) return res;
9717 : : }
9718 : : }
9719 : 876956 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9720 : : {
9721 : 147420 : {
9722 : 147420 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
9723 : 147420 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, EQ_EXPR);
9724 : 147420 : if (res) return res;
9725 : : }
9726 : : }
9727 : : break;
9728 : : }
9729 : 22407459 : default:;
9730 : : }
9731 : 22407459 : switch (TREE_CODE (_p1))
9732 : : {
9733 : 7852 : case BIT_AND_EXPR:
9734 : 7852 : {
9735 : 7852 : tree _q30 = TREE_OPERAND (_p1, 0);
9736 : 7852 : tree _q31 = TREE_OPERAND (_p1, 1);
9737 : 7852 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9738 : : {
9739 : 0 : {
9740 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
9741 : 0 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, EQ_EXPR);
9742 : 0 : if (res) return res;
9743 : : }
9744 : : }
9745 : 7852 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9746 : : {
9747 : 48 : {
9748 : 48 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
9749 : 48 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, EQ_EXPR);
9750 : 48 : if (res) return res;
9751 : : }
9752 : : }
9753 : : break;
9754 : : }
9755 : 22407459 : default:;
9756 : : }
9757 : 22407459 : switch (TREE_CODE (_p0))
9758 : : {
9759 : 1865134 : CASE_CONVERT:
9760 : 1865134 : {
9761 : 1865134 : tree _q20 = TREE_OPERAND (_p0, 0);
9762 : 1865134 : switch (TREE_CODE (_q20))
9763 : : {
9764 : 2 : case BIT_AND_EXPR:
9765 : 2 : {
9766 : 2 : tree _q30 = TREE_OPERAND (_q20, 0);
9767 : 2 : tree _q31 = TREE_OPERAND (_q20, 1);
9768 : 2 : switch (TREE_CODE (_q30))
9769 : : {
9770 : 0 : CASE_CONVERT:
9771 : 0 : {
9772 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9773 : 0 : switch (TREE_CODE (_q31))
9774 : : {
9775 : 0 : case INTEGER_CST:
9776 : 0 : {
9777 : 0 : switch (TREE_CODE (_p1))
9778 : : {
9779 : 0 : CASE_CONVERT:
9780 : 0 : {
9781 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
9782 : 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
9783 : : {
9784 : 0 : {
9785 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q31 };
9786 : 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, EQ_EXPR);
9787 : 0 : if (res) return res;
9788 : : }
9789 : : }
9790 : : break;
9791 : : }
9792 : : default:;
9793 : : }
9794 : : break;
9795 : : }
9796 : : default:;
9797 : : }
9798 : : break;
9799 : : }
9800 : : default:;
9801 : : }
9802 : : break;
9803 : : }
9804 : 1865134 : default:;
9805 : : }
9806 : 1865134 : switch (TREE_CODE (_p1))
9807 : : {
9808 : 468754 : CASE_CONVERT:
9809 : 468754 : {
9810 : 468754 : tree _q40 = TREE_OPERAND (_p1, 0);
9811 : 468754 : switch (TREE_CODE (_q40))
9812 : : {
9813 : 7 : case BIT_AND_EXPR:
9814 : 7 : {
9815 : 7 : tree _q50 = TREE_OPERAND (_q40, 0);
9816 : 7 : tree _q51 = TREE_OPERAND (_q40, 1);
9817 : 7 : switch (TREE_CODE (_q50))
9818 : : {
9819 : 7 : CASE_CONVERT:
9820 : 7 : {
9821 : 7 : tree _q60 = TREE_OPERAND (_q50, 0);
9822 : 7 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9823 : : {
9824 : 0 : switch (TREE_CODE (_q51))
9825 : : {
9826 : 0 : case INTEGER_CST:
9827 : 0 : {
9828 : 0 : {
9829 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q50, _q20, _q51 };
9830 : 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, EQ_EXPR);
9831 : 0 : if (res) return res;
9832 : : }
9833 : 0 : break;
9834 : : }
9835 : : default:;
9836 : : }
9837 : : }
9838 : : break;
9839 : : }
9840 : : default:;
9841 : : }
9842 : : break;
9843 : : }
9844 : : default:;
9845 : : }
9846 : : break;
9847 : : }
9848 : : default:;
9849 : : }
9850 : : break;
9851 : : }
9852 : 33286 : case BIT_IOR_EXPR:
9853 : 33286 : {
9854 : 33286 : tree _q20 = TREE_OPERAND (_p0, 0);
9855 : 33286 : tree _q21 = TREE_OPERAND (_p0, 1);
9856 : 33286 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9857 : : {
9858 : 24 : {
9859 : 24 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9860 : 24 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, EQ_EXPR);
9861 : 24 : if (res) return res;
9862 : : }
9863 : : }
9864 : 33286 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9865 : : {
9866 : 46 : {
9867 : 46 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
9868 : 46 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, EQ_EXPR);
9869 : 46 : if (res) return res;
9870 : : }
9871 : : }
9872 : : break;
9873 : : }
9874 : 22407459 : default:;
9875 : : }
9876 : 22407459 : switch (TREE_CODE (_p1))
9877 : : {
9878 : 679 : case BIT_IOR_EXPR:
9879 : 679 : {
9880 : 679 : tree _q30 = TREE_OPERAND (_p1, 0);
9881 : 679 : tree _q31 = TREE_OPERAND (_p1, 1);
9882 : 679 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9883 : : {
9884 : 0 : {
9885 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
9886 : 0 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, EQ_EXPR);
9887 : 0 : if (res) return res;
9888 : : }
9889 : : }
9890 : 679 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9891 : : {
9892 : 0 : {
9893 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
9894 : 0 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, EQ_EXPR);
9895 : 0 : if (res) return res;
9896 : : }
9897 : : }
9898 : : break;
9899 : : }
9900 : 22407459 : default:;
9901 : : }
9902 : 22407459 : switch (TREE_CODE (_p0))
9903 : : {
9904 : 1865134 : CASE_CONVERT:
9905 : 1865134 : {
9906 : 1865134 : tree _q20 = TREE_OPERAND (_p0, 0);
9907 : 1865134 : switch (TREE_CODE (_q20))
9908 : : {
9909 : 9 : case BIT_XOR_EXPR:
9910 : 9 : {
9911 : 9 : tree _q30 = TREE_OPERAND (_q20, 0);
9912 : 9 : tree _q31 = TREE_OPERAND (_q20, 1);
9913 : 9 : switch (TREE_CODE (_q31))
9914 : : {
9915 : 7 : case INTEGER_CST:
9916 : 7 : {
9917 : 7 : switch (TREE_CODE (_p1))
9918 : : {
9919 : 0 : case INTEGER_CST:
9920 : 0 : {
9921 : 0 : {
9922 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _p1 };
9923 : 0 : tree res = generic_simplify_266 (loc, type, _p0, _p1, captures, EQ_EXPR);
9924 : 0 : if (res) return res;
9925 : : }
9926 : 0 : break;
9927 : : }
9928 : : default:;
9929 : : }
9930 : : break;
9931 : : }
9932 : : default:;
9933 : : }
9934 : : break;
9935 : : }
9936 : : default:;
9937 : : }
9938 : : break;
9939 : : }
9940 : 368 : case BIT_XOR_EXPR:
9941 : 368 : {
9942 : 368 : tree _q20 = TREE_OPERAND (_p0, 0);
9943 : 368 : tree _q21 = TREE_OPERAND (_p0, 1);
9944 : 368 : switch (TREE_CODE (_q21))
9945 : : {
9946 : 105 : case INTEGER_CST:
9947 : 105 : {
9948 : 105 : switch (TREE_CODE (_p1))
9949 : : {
9950 : 16 : case INTEGER_CST:
9951 : 16 : {
9952 : 16 : {
9953 : 16 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
9954 : 16 : tree res = generic_simplify_266 (loc, type, _p0, _p1, captures, EQ_EXPR);
9955 : 16 : if (res) return res;
9956 : : }
9957 : 0 : break;
9958 : : }
9959 : : default:;
9960 : : }
9961 : : break;
9962 : : }
9963 : : default:;
9964 : : }
9965 : : break;
9966 : : }
9967 : 22407443 : default:;
9968 : : }
9969 : 22407443 : {
9970 : 22407443 : tree _p0_pops[1];
9971 : 22407443 : if (tree_nop_convert (_p0, _p0_pops))
9972 : : {
9973 : 1547833 : tree _q20 = _p0_pops[0];
9974 : 1547833 : if (integer_zerop (_p1))
9975 : : {
9976 : 512298 : {
9977 : 512298 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9978 : 512298 : tree res = generic_simplify_267 (loc, type, _p0, _p1, captures, EQ_EXPR);
9979 : 512298 : if (res) return res;
9980 : : }
9981 : : }
9982 : : }
9983 : : }
9984 : 22022044 : if (integer_zerop (_p1))
9985 : : {
9986 : 9128159 : {
9987 : 9128159 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9988 : 9128159 : tree res = generic_simplify_267 (loc, type, _p0, _p1, captures, EQ_EXPR);
9989 : 9128159 : if (res) return res;
9990 : : }
9991 : : }
9992 : 21951997 : switch (TREE_CODE (_p0))
9993 : : {
9994 : 876956 : case BIT_AND_EXPR:
9995 : 876956 : {
9996 : 876956 : tree _q20 = TREE_OPERAND (_p0, 0);
9997 : 876956 : tree _q21 = TREE_OPERAND (_p0, 1);
9998 : 876956 : switch (TREE_CODE (_p1))
9999 : : {
10000 : 7549 : case BIT_AND_EXPR:
10001 : 7549 : {
10002 : 7549 : tree _q50 = TREE_OPERAND (_p1, 0);
10003 : 7549 : tree _q51 = TREE_OPERAND (_p1, 1);
10004 : 7549 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10005 : : {
10006 : 7024 : {
10007 : 7024 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
10008 : 7024 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, EQ_EXPR);
10009 : 7024 : if (res) return res;
10010 : : }
10011 : : }
10012 : 525 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10013 : : {
10014 : 28 : {
10015 : 28 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
10016 : 28 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, EQ_EXPR);
10017 : 28 : if (res) return res;
10018 : : }
10019 : : }
10020 : 497 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10021 : : {
10022 : 28 : {
10023 : 28 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
10024 : 28 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, EQ_EXPR);
10025 : 28 : if (res) return res;
10026 : : }
10027 : : }
10028 : 469 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10029 : : {
10030 : 28 : {
10031 : 28 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
10032 : 28 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, EQ_EXPR);
10033 : 28 : if (res) return res;
10034 : : }
10035 : : }
10036 : : break;
10037 : : }
10038 : 869848 : default:;
10039 : : }
10040 : 869848 : if (integer_pow2p (_q21))
10041 : : {
10042 : 296404 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10043 : : {
10044 : 113907 : {
10045 : 113907 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10046 : 113907 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
10047 : 113907 : if (res) return res;
10048 : : }
10049 : : }
10050 : : }
10051 : 755959 : switch (TREE_CODE (_q20))
10052 : : {
10053 : 58355 : CASE_CONVERT:
10054 : 58355 : {
10055 : 58355 : tree _q30 = TREE_OPERAND (_q20, 0);
10056 : 58355 : if (integer_pow2p (_q21))
10057 : : {
10058 : 20049 : if (integer_zerop (_p1))
10059 : : {
10060 : 20047 : {
10061 : 20047 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q21 };
10062 : 20047 : tree res = generic_simplify_270 (loc, type, _p0, _p1, captures, EQ_EXPR, GE_EXPR);
10063 : 20047 : if (res) return res;
10064 : : }
10065 : : }
10066 : : }
10067 : : break;
10068 : : }
10069 : 754986 : default:;
10070 : : }
10071 : 754986 : if (integer_pow2p (_q21))
10072 : : {
10073 : 181542 : if (integer_zerop (_p1))
10074 : : {
10075 : 181413 : {
10076 : 181413 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q20, _q21 };
10077 : 181413 : tree res = generic_simplify_271 (loc, type, _p0, _p1, captures, EQ_EXPR, GE_EXPR);
10078 : 181413 : if (res) return res;
10079 : : }
10080 : : }
10081 : : }
10082 : : break;
10083 : : }
10084 : 1251 : case GE_EXPR:
10085 : 1251 : {
10086 : 1251 : tree _q20 = TREE_OPERAND (_p0, 0);
10087 : 1251 : tree _q21 = TREE_OPERAND (_p0, 1);
10088 : 1251 : if (integer_zerop (_q21))
10089 : : {
10090 : 108 : switch (TREE_CODE (_p1))
10091 : : {
10092 : 5 : case GE_EXPR:
10093 : 5 : {
10094 : 5 : tree _q50 = TREE_OPERAND (_p1, 0);
10095 : 5 : tree _q51 = TREE_OPERAND (_p1, 1);
10096 : 5 : if (integer_zerop (_q51))
10097 : : {
10098 : 5 : {
10099 : 5 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
10100 : 5 : tree res = generic_simplify_272 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR, GE_EXPR);
10101 : 5 : if (res) return res;
10102 : : }
10103 : : }
10104 : : break;
10105 : : }
10106 : 1 : case LT_EXPR:
10107 : 1 : {
10108 : 1 : tree _q50 = TREE_OPERAND (_p1, 0);
10109 : 1 : tree _q51 = TREE_OPERAND (_p1, 1);
10110 : 1 : if (integer_zerop (_q51))
10111 : : {
10112 : 1 : {
10113 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
10114 : 1 : tree res = generic_simplify_273 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
10115 : 1 : if (res) return res;
10116 : : }
10117 : : }
10118 : : break;
10119 : : }
10120 : : default:;
10121 : : }
10122 : : }
10123 : : break;
10124 : : }
10125 : 889 : case LT_EXPR:
10126 : 889 : {
10127 : 889 : tree _q20 = TREE_OPERAND (_p0, 0);
10128 : 889 : tree _q21 = TREE_OPERAND (_p0, 1);
10129 : 889 : if (integer_zerop (_q21))
10130 : : {
10131 : 153 : switch (TREE_CODE (_p1))
10132 : : {
10133 : 11 : case LT_EXPR:
10134 : 11 : {
10135 : 11 : tree _q50 = TREE_OPERAND (_p1, 0);
10136 : 11 : tree _q51 = TREE_OPERAND (_p1, 1);
10137 : 11 : if (integer_zerop (_q51))
10138 : : {
10139 : 9 : {
10140 : 9 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
10141 : 9 : tree res = generic_simplify_272 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GE_EXPR);
10142 : 9 : if (res) return res;
10143 : : }
10144 : : }
10145 : : break;
10146 : : }
10147 : 1 : case GE_EXPR:
10148 : 1 : {
10149 : 1 : tree _q50 = TREE_OPERAND (_p1, 0);
10150 : 1 : tree _q51 = TREE_OPERAND (_p1, 1);
10151 : 1 : if (integer_zerop (_q51))
10152 : : {
10153 : 1 : {
10154 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
10155 : 1 : tree res = generic_simplify_274 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
10156 : 1 : if (res) return res;
10157 : : }
10158 : : }
10159 : : break;
10160 : : }
10161 : : default:;
10162 : : }
10163 : : }
10164 : : break;
10165 : : }
10166 : 1479696 : CASE_CONVERT:
10167 : 1479696 : {
10168 : 1479696 : tree _q20 = TREE_OPERAND (_p0, 0);
10169 : 1479696 : switch (TREE_CODE (_q20))
10170 : : {
10171 : 141965 : case ADDR_EXPR:
10172 : 141965 : {
10173 : 141965 : switch (TREE_CODE (_p1))
10174 : : {
10175 : 114318 : CASE_CONVERT:
10176 : 114318 : {
10177 : 114318 : tree _q40 = TREE_OPERAND (_p1, 0);
10178 : 114318 : switch (TREE_CODE (_q40))
10179 : : {
10180 : 114318 : case ADDR_EXPR:
10181 : 114318 : {
10182 : 114318 : {
10183 : 114318 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
10184 : 114318 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, EQ_EXPR);
10185 : 114318 : if (res) return res;
10186 : : }
10187 : 30 : break;
10188 : : }
10189 : : default:;
10190 : : }
10191 : : break;
10192 : : }
10193 : 20884 : case ADDR_EXPR:
10194 : 20884 : {
10195 : 20884 : {
10196 : 20884 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10197 : 20884 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, EQ_EXPR);
10198 : 20884 : if (res) return res;
10199 : : }
10200 : 8247 : break;
10201 : : }
10202 : : default:;
10203 : : }
10204 : : break;
10205 : : }
10206 : : default:;
10207 : : }
10208 : : break;
10209 : : }
10210 : 15699 : case ADDR_EXPR:
10211 : 15699 : {
10212 : 15699 : switch (TREE_CODE (_p1))
10213 : : {
10214 : 80 : CASE_CONVERT:
10215 : 80 : {
10216 : 80 : tree _q30 = TREE_OPERAND (_p1, 0);
10217 : 80 : switch (TREE_CODE (_q30))
10218 : : {
10219 : 80 : case ADDR_EXPR:
10220 : 80 : {
10221 : 80 : {
10222 : 80 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
10223 : 80 : tree res = generic_simplify_276 (loc, type, _p0, _p1, captures, EQ_EXPR);
10224 : 80 : if (res) return res;
10225 : : }
10226 : 0 : break;
10227 : : }
10228 : : default:;
10229 : : }
10230 : : break;
10231 : : }
10232 : 13212 : case ADDR_EXPR:
10233 : 13212 : {
10234 : 13212 : {
10235 : 13212 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
10236 : 13212 : tree res = generic_simplify_276 (loc, type, _p0, _p1, captures, EQ_EXPR);
10237 : 13212 : if (res) return res;
10238 : : }
10239 : 5512 : break;
10240 : : }
10241 : : default:;
10242 : : }
10243 : : break;
10244 : : }
10245 : 21695006 : default:;
10246 : : }
10247 : 21695006 : {
10248 : 21695006 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10249 : 21695006 : tree res = generic_simplify_277 (loc, type, _p0, _p1, captures, EQ_EXPR);
10250 : 21695006 : if (res) return res;
10251 : : }
10252 : 21693187 : switch (TREE_CODE (_p0))
10253 : : {
10254 : 1352771 : CASE_CONVERT:
10255 : 1352771 : {
10256 : 1352771 : tree _q20 = TREE_OPERAND (_p0, 0);
10257 : 1352771 : switch (TREE_CODE (_p1))
10258 : : {
10259 : 225532 : case INTEGER_CST:
10260 : 225532 : {
10261 : 225532 : {
10262 : 225532 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
10263 : 225532 : tree res = generic_simplify_278 (loc, type, _p0, _p1, captures, EQ_EXPR);
10264 : 225532 : if (res) return res;
10265 : : }
10266 : 224036 : break;
10267 : : }
10268 : 1351275 : default:;
10269 : : }
10270 : 1351275 : switch (TREE_CODE (_q20))
10271 : : {
10272 : 0 : case NE_EXPR:
10273 : 0 : {
10274 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
10275 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
10276 : 0 : switch (TREE_CODE (_q31))
10277 : : {
10278 : 0 : case INTEGER_CST:
10279 : 0 : {
10280 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
10281 : : {
10282 : 0 : {
10283 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
10284 : 0 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR);
10285 : 0 : if (res) return res;
10286 : : }
10287 : : }
10288 : : break;
10289 : : }
10290 : : default:;
10291 : : }
10292 : : break;
10293 : : }
10294 : 0 : case EQ_EXPR:
10295 : 0 : {
10296 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
10297 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
10298 : 0 : switch (TREE_CODE (_q31))
10299 : : {
10300 : 0 : case INTEGER_CST:
10301 : 0 : {
10302 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
10303 : : {
10304 : 0 : {
10305 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
10306 : 0 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
10307 : 0 : if (res) return res;
10308 : : }
10309 : : }
10310 : : break;
10311 : : }
10312 : : default:;
10313 : : }
10314 : : break;
10315 : : }
10316 : : default:;
10317 : : }
10318 : : break;
10319 : : }
10320 : 21691691 : default:;
10321 : : }
10322 : 21691691 : switch (TREE_CODE (_p1))
10323 : : {
10324 : 662447 : CASE_CONVERT:
10325 : 662447 : {
10326 : 662447 : tree _q30 = TREE_OPERAND (_p1, 0);
10327 : 662447 : switch (TREE_CODE (_q30))
10328 : : {
10329 : 0 : case NE_EXPR:
10330 : 0 : {
10331 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
10332 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
10333 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
10334 : : {
10335 : 0 : switch (TREE_CODE (_q41))
10336 : : {
10337 : 0 : case INTEGER_CST:
10338 : 0 : {
10339 : 0 : {
10340 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
10341 : 0 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR);
10342 : 0 : if (res) return res;
10343 : : }
10344 : 0 : break;
10345 : : }
10346 : : default:;
10347 : : }
10348 : : }
10349 : : break;
10350 : : }
10351 : 0 : case EQ_EXPR:
10352 : 0 : {
10353 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
10354 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
10355 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
10356 : : {
10357 : 0 : switch (TREE_CODE (_q41))
10358 : : {
10359 : 0 : case INTEGER_CST:
10360 : 0 : {
10361 : 0 : {
10362 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
10363 : 0 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
10364 : 0 : if (res) return res;
10365 : : }
10366 : 0 : break;
10367 : : }
10368 : : default:;
10369 : : }
10370 : : }
10371 : : break;
10372 : : }
10373 : : default:;
10374 : : }
10375 : : break;
10376 : : }
10377 : 21691691 : default:;
10378 : : }
10379 : 21691691 : if (integer_onep (_p1))
10380 : : {
10381 : 1670810 : {
10382 : 1670810 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10383 : 1670810 : if (TREE_CODE (TREE_TYPE (captures[0])) == BOOLEAN_TYPE
10384 : 1670810 : && types_match (type, TREE_TYPE (captures[0]))
10385 : : )
10386 : : {
10387 : 84553 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1617;
10388 : 84553 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1617;
10389 : 84553 : {
10390 : 84553 : tree res_op0;
10391 : 84553 : res_op0 = captures[0];
10392 : 84553 : tree _r;
10393 : 84553 : _r = non_lvalue_loc (loc, res_op0);
10394 : 84553 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 991, __FILE__, __LINE__, true);
10395 : 84553 : return _r;
10396 : : }
10397 : : next_after_fail1617:;
10398 : : }
10399 : : }
10400 : : }
10401 : 21607138 : switch (TREE_CODE (_p0))
10402 : : {
10403 : 754686 : case BIT_AND_EXPR:
10404 : 754686 : {
10405 : 754686 : tree _q20 = TREE_OPERAND (_p0, 0);
10406 : 754686 : tree _q21 = TREE_OPERAND (_p0, 1);
10407 : 754686 : switch (TREE_CODE (_q21))
10408 : : {
10409 : 408 : case VECTOR_CST:
10410 : 408 : {
10411 : 408 : if (integer_zerop (_p1))
10412 : : {
10413 : 406 : {
10414 : 406 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10415 : 406 : const enum tree_code cmp = EQ_EXPR;
10416 : 406 : const enum tree_code icmp = LE_EXPR;
10417 : 406 : {
10418 : 406 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
10419 : 406 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
10420 : : )
10421 : : {
10422 : 2 : {
10423 : 2 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
10424 : 2 : ? optab_vector : optab_default;
10425 : 2 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
10426 : 2 : if (target_supports_op_p (utype, icmp, optab)
10427 : 2 : || (optimize_vectors_before_lowering_p ()
10428 : 2 : && (!target_supports_op_p (type, cmp, optab)
10429 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
10430 : : )
10431 : : {
10432 : 2 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
10433 : : )
10434 : : {
10435 : 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1618;
10436 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1618;
10437 : 2 : {
10438 : 2 : tree res_op0;
10439 : 2 : res_op0 = captures[1];
10440 : 2 : tree res_op1;
10441 : 2 : res_op1 = csts;
10442 : 2 : tree _r;
10443 : 2 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10444 : 2 : if (TREE_SIDE_EFFECTS (captures[2]))
10445 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10446 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 992, __FILE__, __LINE__, true);
10447 : 2 : return _r;
10448 : : }
10449 : 404 : next_after_fail1618:;
10450 : : }
10451 : : else
10452 : : {
10453 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1619;
10454 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1619;
10455 : 0 : {
10456 : 0 : tree res_op0;
10457 : 0 : {
10458 : 0 : tree _o1[1], _r1;
10459 : 0 : _o1[0] = captures[1];
10460 : 0 : if (TREE_TYPE (_o1[0]) != utype)
10461 : : {
10462 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
10463 : : }
10464 : : else
10465 : : _r1 = _o1[0];
10466 : 0 : res_op0 = _r1;
10467 : : }
10468 : 0 : tree res_op1;
10469 : 0 : res_op1 = csts;
10470 : 0 : tree _r;
10471 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10472 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10473 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10474 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 993, __FILE__, __LINE__, true);
10475 : 0 : return _r;
10476 : : }
10477 : 404 : next_after_fail1619:;
10478 : : }
10479 : : }
10480 : : }
10481 : : }
10482 : : }
10483 : : }
10484 : : }
10485 : : break;
10486 : : }
10487 : 706913 : case INTEGER_CST:
10488 : 706913 : {
10489 : 706913 : if (integer_zerop (_p1))
10490 : : {
10491 : 565634 : {
10492 : 565634 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10493 : 565634 : const enum tree_code cmp = EQ_EXPR;
10494 : 565634 : const enum tree_code icmp = LE_EXPR;
10495 : 565634 : {
10496 : 565634 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
10497 : 565634 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
10498 : : )
10499 : : {
10500 : 15821 : {
10501 : 15821 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
10502 : 15821 : ? optab_vector : optab_default;
10503 : 15821 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
10504 : 15821 : if (target_supports_op_p (utype, icmp, optab)
10505 : 15821 : || (optimize_vectors_before_lowering_p ()
10506 : 15703 : && (!target_supports_op_p (type, cmp, optab)
10507 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
10508 : : )
10509 : : {
10510 : 15703 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
10511 : : )
10512 : : {
10513 : 586 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1620;
10514 : 586 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1620;
10515 : 586 : {
10516 : 586 : tree res_op0;
10517 : 586 : res_op0 = captures[1];
10518 : 586 : tree res_op1;
10519 : 586 : res_op1 = csts;
10520 : 586 : tree _r;
10521 : 586 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10522 : 586 : if (TREE_SIDE_EFFECTS (captures[2]))
10523 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10524 : 586 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 992, __FILE__, __LINE__, true);
10525 : 586 : return _r;
10526 : : }
10527 : 549931 : next_after_fail1620:;
10528 : : }
10529 : : else
10530 : : {
10531 : 15117 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1621;
10532 : 15117 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1621;
10533 : 15117 : {
10534 : 15117 : tree res_op0;
10535 : 15117 : {
10536 : 15117 : tree _o1[1], _r1;
10537 : 15117 : _o1[0] = captures[1];
10538 : 15117 : if (TREE_TYPE (_o1[0]) != utype)
10539 : : {
10540 : 15117 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
10541 : : }
10542 : : else
10543 : : _r1 = _o1[0];
10544 : 15117 : res_op0 = _r1;
10545 : : }
10546 : 15117 : tree res_op1;
10547 : 15117 : res_op1 = csts;
10548 : 15117 : tree _r;
10549 : 15117 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10550 : 15117 : if (TREE_SIDE_EFFECTS (captures[2]))
10551 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10552 : 15117 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 993, __FILE__, __LINE__, true);
10553 : 15117 : return _r;
10554 : : }
10555 : 549931 : next_after_fail1621:;
10556 : : }
10557 : : }
10558 : : }
10559 : : }
10560 : : }
10561 : : }
10562 : : }
10563 : : break;
10564 : : }
10565 : 738981 : default:;
10566 : : }
10567 : 738981 : switch (TREE_CODE (_q20))
10568 : : {
10569 : 0 : case VECTOR_CST:
10570 : 0 : {
10571 : 0 : if (integer_zerop (_p1))
10572 : : {
10573 : 0 : {
10574 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10575 : 0 : const enum tree_code cmp = EQ_EXPR;
10576 : 0 : const enum tree_code icmp = LE_EXPR;
10577 : 0 : {
10578 : 0 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
10579 : 0 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
10580 : : )
10581 : : {
10582 : 0 : {
10583 : 0 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
10584 : 0 : ? optab_vector : optab_default;
10585 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
10586 : 0 : if (target_supports_op_p (utype, icmp, optab)
10587 : 0 : || (optimize_vectors_before_lowering_p ()
10588 : 0 : && (!target_supports_op_p (type, cmp, optab)
10589 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
10590 : : )
10591 : : {
10592 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
10593 : : )
10594 : : {
10595 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1622;
10596 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1622;
10597 : 0 : {
10598 : 0 : tree res_op0;
10599 : 0 : res_op0 = captures[1];
10600 : 0 : tree res_op1;
10601 : 0 : res_op1 = csts;
10602 : 0 : tree _r;
10603 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10604 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10605 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10606 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 992, __FILE__, __LINE__, true);
10607 : 0 : return _r;
10608 : : }
10609 : 0 : next_after_fail1622:;
10610 : : }
10611 : : else
10612 : : {
10613 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1623;
10614 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1623;
10615 : 0 : {
10616 : 0 : tree res_op0;
10617 : 0 : {
10618 : 0 : tree _o1[1], _r1;
10619 : 0 : _o1[0] = captures[1];
10620 : 0 : if (TREE_TYPE (_o1[0]) != utype)
10621 : : {
10622 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
10623 : : }
10624 : : else
10625 : : _r1 = _o1[0];
10626 : 0 : res_op0 = _r1;
10627 : : }
10628 : 0 : tree res_op1;
10629 : 0 : res_op1 = csts;
10630 : 0 : tree _r;
10631 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10632 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10633 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10634 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 993, __FILE__, __LINE__, true);
10635 : 0 : return _r;
10636 : : }
10637 : 0 : next_after_fail1623:;
10638 : : }
10639 : : }
10640 : : }
10641 : : }
10642 : : }
10643 : : }
10644 : : }
10645 : : break;
10646 : : }
10647 : 0 : case INTEGER_CST:
10648 : 0 : {
10649 : 0 : if (integer_zerop (_p1))
10650 : : {
10651 : 0 : {
10652 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10653 : 0 : const enum tree_code cmp = EQ_EXPR;
10654 : 0 : const enum tree_code icmp = LE_EXPR;
10655 : 0 : {
10656 : 0 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
10657 : 0 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
10658 : : )
10659 : : {
10660 : 0 : {
10661 : 0 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
10662 : 0 : ? optab_vector : optab_default;
10663 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
10664 : 0 : if (target_supports_op_p (utype, icmp, optab)
10665 : 0 : || (optimize_vectors_before_lowering_p ()
10666 : 0 : && (!target_supports_op_p (type, cmp, optab)
10667 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
10668 : : )
10669 : : {
10670 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
10671 : : )
10672 : : {
10673 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1624;
10674 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1624;
10675 : 0 : {
10676 : 0 : tree res_op0;
10677 : 0 : res_op0 = captures[1];
10678 : 0 : tree res_op1;
10679 : 0 : res_op1 = csts;
10680 : 0 : tree _r;
10681 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10682 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10683 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10684 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 992, __FILE__, __LINE__, true);
10685 : 0 : return _r;
10686 : : }
10687 : 0 : next_after_fail1624:;
10688 : : }
10689 : : else
10690 : : {
10691 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1625;
10692 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1625;
10693 : 0 : {
10694 : 0 : tree res_op0;
10695 : 0 : {
10696 : 0 : tree _o1[1], _r1;
10697 : 0 : _o1[0] = captures[1];
10698 : 0 : if (TREE_TYPE (_o1[0]) != utype)
10699 : : {
10700 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
10701 : : }
10702 : : else
10703 : : _r1 = _o1[0];
10704 : 0 : res_op0 = _r1;
10705 : : }
10706 : 0 : tree res_op1;
10707 : 0 : res_op1 = csts;
10708 : 0 : tree _r;
10709 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10710 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10711 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10712 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 993, __FILE__, __LINE__, true);
10713 : 0 : return _r;
10714 : : }
10715 : 0 : next_after_fail1625:;
10716 : : }
10717 : : }
10718 : : }
10719 : : }
10720 : : }
10721 : : }
10722 : : }
10723 : : break;
10724 : : }
10725 : : default:;
10726 : : }
10727 : : break;
10728 : : }
10729 : 16736 : case RSHIFT_EXPR:
10730 : 16736 : {
10731 : 16736 : tree _q20 = TREE_OPERAND (_p0, 0);
10732 : 16736 : tree _q21 = TREE_OPERAND (_p0, 1);
10733 : 16736 : switch (TREE_CODE (_q20))
10734 : : {
10735 : 1 : case MULT_EXPR:
10736 : 1 : {
10737 : 1 : tree _q30 = TREE_OPERAND (_q20, 0);
10738 : 1 : tree _q31 = TREE_OPERAND (_q20, 1);
10739 : 1 : switch (TREE_CODE (_q30))
10740 : : {
10741 : 1 : CASE_CONVERT:
10742 : 1 : {
10743 : 1 : tree _q40 = TREE_OPERAND (_q30, 0);
10744 : 1 : switch (TREE_CODE (_q31))
10745 : : {
10746 : 1 : CASE_CONVERT:
10747 : 1 : {
10748 : 1 : tree _q60 = TREE_OPERAND (_q31, 0);
10749 : 1 : switch (TREE_CODE (_q21))
10750 : : {
10751 : 1 : case INTEGER_CST:
10752 : 1 : {
10753 : 1 : if (integer_zerop (_p1))
10754 : : {
10755 : 1 : {
10756 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q60, _q21 };
10757 : 1 : tree res = generic_simplify_280 (loc, type, _p0, _p1, captures, EQ_EXPR);
10758 : 1 : if (res) return res;
10759 : : }
10760 : : }
10761 : : break;
10762 : : }
10763 : : default:;
10764 : : }
10765 : : break;
10766 : : }
10767 : : default:;
10768 : : }
10769 : : break;
10770 : : }
10771 : : default:;
10772 : : }
10773 : : break;
10774 : : }
10775 : : default:;
10776 : : }
10777 : : break;
10778 : : }
10779 : 687680 : case PLUS_EXPR:
10780 : 687680 : {
10781 : 687680 : tree _q20 = TREE_OPERAND (_p0, 0);
10782 : 687680 : tree _q21 = TREE_OPERAND (_p0, 1);
10783 : 687680 : switch (TREE_CODE (_q21))
10784 : : {
10785 : 642006 : case INTEGER_CST:
10786 : 642006 : {
10787 : 642006 : switch (TREE_CODE (_p1))
10788 : : {
10789 : 347777 : case INTEGER_CST:
10790 : 347777 : {
10791 : 347777 : {
10792 : 347777 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10793 : 347777 : tree res = generic_simplify_281 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, EQ_EXPR);
10794 : 347777 : if (res) return res;
10795 : : }
10796 : 14 : break;
10797 : : }
10798 : : default:;
10799 : : }
10800 : : break;
10801 : : }
10802 : : default:;
10803 : : }
10804 : : break;
10805 : : }
10806 : 81728 : case MINUS_EXPR:
10807 : 81728 : {
10808 : 81728 : tree _q20 = TREE_OPERAND (_p0, 0);
10809 : 81728 : tree _q21 = TREE_OPERAND (_p0, 1);
10810 : 81728 : switch (TREE_CODE (_q21))
10811 : : {
10812 : 16 : case INTEGER_CST:
10813 : 16 : {
10814 : 16 : switch (TREE_CODE (_p1))
10815 : : {
10816 : 16 : case INTEGER_CST:
10817 : 16 : {
10818 : 16 : {
10819 : 16 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10820 : 16 : tree res = generic_simplify_281 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, EQ_EXPR);
10821 : 16 : if (res) return res;
10822 : : }
10823 : 16 : break;
10824 : : }
10825 : : default:;
10826 : : }
10827 : : break;
10828 : : }
10829 : 81728 : default:;
10830 : : }
10831 : 81728 : switch (TREE_CODE (_q20))
10832 : : {
10833 : 33329 : case INTEGER_CST:
10834 : 33329 : {
10835 : 33329 : switch (TREE_CODE (_p1))
10836 : : {
10837 : 32410 : case INTEGER_CST:
10838 : 32410 : {
10839 : 32410 : {
10840 : 32410 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10841 : 32410 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
10842 : 32410 : if (res) return res;
10843 : : }
10844 : 0 : break;
10845 : : }
10846 : : default:;
10847 : : }
10848 : : break;
10849 : : }
10850 : : default:;
10851 : : }
10852 : : break;
10853 : : }
10854 : 1747710 : case CALL_EXPR:
10855 : 1747710 : switch (get_call_combined_fn (_p0))
10856 : : {
10857 : 19 : case CFN_BUILT_IN_CLZ:
10858 : 19 : if (call_expr_nargs (_p0) == 1)
10859 : : {
10860 : 19 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10861 : 19 : switch (TREE_CODE (_p1))
10862 : : {
10863 : 19 : case INTEGER_CST:
10864 : 19 : {
10865 : 19 : {
10866 : 19 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10867 : 19 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZ);
10868 : 19 : if (res) return res;
10869 : : }
10870 : 16 : break;
10871 : : }
10872 : : default:;
10873 : : }
10874 : : }
10875 : : break;
10876 : 17 : case CFN_BUILT_IN_CTZ:
10877 : 17 : if (call_expr_nargs (_p0) == 1)
10878 : : {
10879 : 17 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10880 : 17 : switch (TREE_CODE (_p1))
10881 : : {
10882 : 17 : case INTEGER_CST:
10883 : 17 : {
10884 : 17 : {
10885 : 17 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10886 : 17 : tree res = generic_simplify_285 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZ);
10887 : 17 : if (res) return res;
10888 : : }
10889 : 16 : break;
10890 : : }
10891 : : default:;
10892 : : }
10893 : : }
10894 : : break;
10895 : 4 : case CFN_BUILT_IN_FFS:
10896 : 4 : if (call_expr_nargs (_p0) == 1)
10897 : : {
10898 : 4 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10899 : 4 : switch (TREE_CODE (_p1))
10900 : : {
10901 : 4 : case INTEGER_CST:
10902 : 4 : {
10903 : 4 : {
10904 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10905 : 4 : tree res = generic_simplify_288 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFS);
10906 : 4 : if (res) return res;
10907 : : }
10908 : 0 : break;
10909 : : }
10910 : : default:;
10911 : : }
10912 : : }
10913 : : break;
10914 : 0 : case CFN_REDUC_IOR:
10915 : 0 : if (call_expr_nargs (_p0) == 1)
10916 : : {
10917 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10918 : 0 : if (integer_zerop (_p1))
10919 : : {
10920 : 0 : {
10921 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10922 : 0 : tree res = generic_simplify_289 (loc, type, _p0, _p1, captures, EQ_EXPR);
10923 : 0 : if (res) return res;
10924 : : }
10925 : : }
10926 : : }
10927 : : break;
10928 : 0 : case CFN_BUILT_IN_FFSIMAX:
10929 : 0 : if (call_expr_nargs (_p0) == 1)
10930 : : {
10931 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10932 : 0 : switch (TREE_CODE (_p1))
10933 : : {
10934 : 0 : case INTEGER_CST:
10935 : 0 : {
10936 : 0 : {
10937 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10938 : 0 : tree res = generic_simplify_288 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFSIMAX);
10939 : 0 : if (res) return res;
10940 : : }
10941 : 0 : break;
10942 : : }
10943 : : default:;
10944 : : }
10945 : : }
10946 : : break;
10947 : 15 : case CFN_BUILT_IN_POPCOUNT:
10948 : 15 : if (call_expr_nargs (_p0) == 1)
10949 : : {
10950 : 15 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10951 : 15 : if (integer_zerop (_p1))
10952 : : {
10953 : 1 : {
10954 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10955 : 1 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNT);
10956 : 1 : if (res) return res;
10957 : : }
10958 : : }
10959 : : }
10960 : : break;
10961 : 0 : case CFN_BUILT_IN_CLZL:
10962 : 0 : if (call_expr_nargs (_p0) == 1)
10963 : : {
10964 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10965 : 0 : switch (TREE_CODE (_p1))
10966 : : {
10967 : 0 : case INTEGER_CST:
10968 : 0 : {
10969 : 0 : {
10970 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10971 : 0 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZL);
10972 : 0 : if (res) return res;
10973 : : }
10974 : 0 : break;
10975 : : }
10976 : : default:;
10977 : : }
10978 : : }
10979 : : break;
10980 : 16 : case CFN_BUILT_IN_CTZL:
10981 : 16 : if (call_expr_nargs (_p0) == 1)
10982 : : {
10983 : 16 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10984 : 16 : switch (TREE_CODE (_p1))
10985 : : {
10986 : 16 : case INTEGER_CST:
10987 : 16 : {
10988 : 16 : {
10989 : 16 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10990 : 16 : tree res = generic_simplify_285 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZL);
10991 : 16 : if (res) return res;
10992 : : }
10993 : 16 : break;
10994 : : }
10995 : : default:;
10996 : : }
10997 : : }
10998 : : break;
10999 : 1 : case CFN_BUILT_IN_FFSL:
11000 : 1 : if (call_expr_nargs (_p0) == 1)
11001 : : {
11002 : 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11003 : 1 : switch (TREE_CODE (_p1))
11004 : : {
11005 : 1 : case INTEGER_CST:
11006 : 1 : {
11007 : 1 : {
11008 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11009 : 1 : tree res = generic_simplify_288 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFSL);
11010 : 1 : if (res) return res;
11011 : : }
11012 : 0 : break;
11013 : : }
11014 : : default:;
11015 : : }
11016 : : }
11017 : : break;
11018 : 7 : case CFN_BUILT_IN_POPCOUNTLL:
11019 : 7 : if (call_expr_nargs (_p0) == 1)
11020 : : {
11021 : 7 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11022 : 7 : if (integer_zerop (_p1))
11023 : : {
11024 : 1 : {
11025 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11026 : 1 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTLL);
11027 : 1 : if (res) return res;
11028 : : }
11029 : : }
11030 : : }
11031 : : break;
11032 : 0 : case CFN_BUILT_IN_CTZIMAX:
11033 : 0 : if (call_expr_nargs (_p0) == 1)
11034 : : {
11035 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11036 : 0 : switch (TREE_CODE (_p1))
11037 : : {
11038 : 0 : case INTEGER_CST:
11039 : 0 : {
11040 : 0 : {
11041 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11042 : 0 : tree res = generic_simplify_285 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZIMAX);
11043 : 0 : if (res) return res;
11044 : : }
11045 : 0 : break;
11046 : : }
11047 : : default:;
11048 : : }
11049 : : }
11050 : : break;
11051 : 0 : case CFN_POPCOUNT:
11052 : 0 : if (call_expr_nargs (_p0) == 1)
11053 : : {
11054 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11055 : 0 : if (integer_zerop (_p1))
11056 : : {
11057 : 0 : {
11058 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11059 : 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_POPCOUNT);
11060 : 0 : if (res) return res;
11061 : : }
11062 : : }
11063 : : }
11064 : : break;
11065 : 0 : case CFN_CLZ:
11066 : 0 : if (call_expr_nargs (_p0) == 1)
11067 : : {
11068 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11069 : 0 : switch (TREE_CODE (_p1))
11070 : : {
11071 : 0 : case INTEGER_CST:
11072 : 0 : {
11073 : 0 : {
11074 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11075 : 0 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_CLZ);
11076 : 0 : if (res) return res;
11077 : : }
11078 : 0 : break;
11079 : : }
11080 : : default:;
11081 : : }
11082 : : }
11083 : 0 : if (call_expr_nargs (_p0) == 2)
11084 : : {
11085 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11086 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
11087 : 0 : switch (TREE_CODE (_p1))
11088 : : {
11089 : 0 : case INTEGER_CST:
11090 : 0 : {
11091 : 0 : {
11092 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
11093 : 0 : tree res = generic_simplify_284 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
11094 : 0 : if (res) return res;
11095 : : }
11096 : 0 : break;
11097 : : }
11098 : : default:;
11099 : : }
11100 : : }
11101 : : break;
11102 : 0 : case CFN_CTZ:
11103 : 0 : if (call_expr_nargs (_p0) == 1)
11104 : : {
11105 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11106 : 0 : switch (TREE_CODE (_p1))
11107 : : {
11108 : 0 : case INTEGER_CST:
11109 : 0 : {
11110 : 0 : {
11111 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11112 : 0 : tree res = generic_simplify_285 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_CTZ);
11113 : 0 : if (res) return res;
11114 : : }
11115 : 0 : break;
11116 : : }
11117 : : default:;
11118 : : }
11119 : : }
11120 : 0 : if (call_expr_nargs (_p0) == 2)
11121 : : {
11122 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11123 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
11124 : 0 : switch (TREE_CODE (_p1))
11125 : : {
11126 : 0 : case INTEGER_CST:
11127 : 0 : {
11128 : 0 : {
11129 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
11130 : 0 : tree res = generic_simplify_286 (loc, type, _p0, _p1, captures, EQ_EXPR);
11131 : 0 : if (res) return res;
11132 : : }
11133 : 0 : break;
11134 : : }
11135 : : default:;
11136 : : }
11137 : : }
11138 : : break;
11139 : 0 : case CFN_FFS:
11140 : 0 : if (call_expr_nargs (_p0) == 1)
11141 : : {
11142 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11143 : 0 : switch (TREE_CODE (_p1))
11144 : : {
11145 : 0 : case INTEGER_CST:
11146 : 0 : {
11147 : 0 : {
11148 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11149 : 0 : tree res = generic_simplify_288 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_FFS);
11150 : 0 : if (res) return res;
11151 : : }
11152 : 0 : break;
11153 : : }
11154 : : default:;
11155 : : }
11156 : : }
11157 : : break;
11158 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
11159 : 0 : if (call_expr_nargs (_p0) == 1)
11160 : : {
11161 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11162 : 0 : if (integer_zerop (_p1))
11163 : : {
11164 : 0 : {
11165 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11166 : 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
11167 : 0 : if (res) return res;
11168 : : }
11169 : : }
11170 : : }
11171 : : break;
11172 : 0 : case CFN_BUILT_IN_CLZIMAX:
11173 : 0 : if (call_expr_nargs (_p0) == 1)
11174 : : {
11175 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11176 : 0 : switch (TREE_CODE (_p1))
11177 : : {
11178 : 0 : case INTEGER_CST:
11179 : 0 : {
11180 : 0 : {
11181 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11182 : 0 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZIMAX);
11183 : 0 : if (res) return res;
11184 : : }
11185 : 0 : break;
11186 : : }
11187 : : default:;
11188 : : }
11189 : : }
11190 : : break;
11191 : 7 : case CFN_BUILT_IN_POPCOUNTL:
11192 : 7 : if (call_expr_nargs (_p0) == 1)
11193 : : {
11194 : 7 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11195 : 7 : if (integer_zerop (_p1))
11196 : : {
11197 : 1 : {
11198 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11199 : 1 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTL);
11200 : 1 : if (res) return res;
11201 : : }
11202 : : }
11203 : : }
11204 : : break;
11205 : 16 : case CFN_BUILT_IN_CLZLL:
11206 : 16 : if (call_expr_nargs (_p0) == 1)
11207 : : {
11208 : 16 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11209 : 16 : switch (TREE_CODE (_p1))
11210 : : {
11211 : 16 : case INTEGER_CST:
11212 : 16 : {
11213 : 16 : {
11214 : 16 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11215 : 16 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZLL);
11216 : 16 : if (res) return res;
11217 : : }
11218 : 16 : break;
11219 : : }
11220 : : default:;
11221 : : }
11222 : : }
11223 : : break;
11224 : 0 : case CFN_BUILT_IN_CTZLL:
11225 : 0 : if (call_expr_nargs (_p0) == 1)
11226 : : {
11227 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11228 : 0 : switch (TREE_CODE (_p1))
11229 : : {
11230 : 0 : case INTEGER_CST:
11231 : 0 : {
11232 : 0 : {
11233 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11234 : 0 : tree res = generic_simplify_285 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZLL);
11235 : 0 : if (res) return res;
11236 : : }
11237 : 0 : break;
11238 : : }
11239 : : default:;
11240 : : }
11241 : : }
11242 : : break;
11243 : 0 : case CFN_BUILT_IN_FFSLL:
11244 : 0 : if (call_expr_nargs (_p0) == 1)
11245 : : {
11246 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11247 : 0 : switch (TREE_CODE (_p1))
11248 : : {
11249 : 0 : case INTEGER_CST:
11250 : 0 : {
11251 : 0 : {
11252 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11253 : 0 : tree res = generic_simplify_288 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFSLL);
11254 : 0 : if (res) return res;
11255 : : }
11256 : 0 : break;
11257 : : }
11258 : : default:;
11259 : : }
11260 : : }
11261 : : break;
11262 : : default:;
11263 : : }
11264 : : break;
11265 : : default:;
11266 : : }
11267 : : return NULL_TREE;
11268 : : }
11269 : :
11270 : : tree
11271 : 822249 : generic_simplify_COMPLEX_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11272 : : {
11273 : 822249 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11274 : 822249 : switch (TREE_CODE (_p0))
11275 : : {
11276 : 32 : case REALPART_EXPR:
11277 : 32 : {
11278 : 32 : tree _q20 = TREE_OPERAND (_p0, 0);
11279 : 32 : switch (TREE_CODE (_p1))
11280 : : {
11281 : 22 : case IMAGPART_EXPR:
11282 : 22 : {
11283 : 22 : tree _q40 = TREE_OPERAND (_p1, 0);
11284 : 22 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
11285 : : {
11286 : 22 : {
11287 : 22 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11288 : 22 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1861;
11289 : 22 : {
11290 : 22 : tree _r;
11291 : 22 : _r = captures[0];
11292 : 22 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1039, __FILE__, __LINE__, true);
11293 : 22 : return _r;
11294 : : }
11295 : 0 : next_after_fail1861:;
11296 : : }
11297 : : }
11298 : : break;
11299 : : }
11300 : : default:;
11301 : : }
11302 : : break;
11303 : : }
11304 : : default:;
11305 : : }
11306 : : return NULL_TREE;
11307 : : }
11308 : :
11309 : : tree
11310 : 822204 : generic_simplify_UNLT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11311 : : {
11312 : 822204 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11313 : 822204 : switch (TREE_CODE (_p0))
11314 : : {
11315 : 0 : case VEC_COND_EXPR:
11316 : 0 : {
11317 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11318 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11319 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11320 : 0 : switch (TREE_CODE (_p1))
11321 : : {
11322 : 0 : case VEC_COND_EXPR:
11323 : 0 : {
11324 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11325 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11326 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11327 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11328 : : {
11329 : 0 : {
11330 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11331 : 0 : if (VECTOR_TYPE_P (type)
11332 : 0 : && (TREE_CODE_CLASS (UNLT_EXPR) != tcc_comparison
11333 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11334 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11335 : : || (optimize_vectors_before_lowering_p ()
11336 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11337 : : )
11338 : : {
11339 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1872;
11340 : 0 : {
11341 : 0 : tree res_op0;
11342 : 0 : res_op0 = captures[1];
11343 : 0 : tree res_op1;
11344 : 0 : {
11345 : 0 : tree _o1[2], _r1;
11346 : 0 : _o1[0] = captures[2];
11347 : 0 : _o1[1] = captures[5];
11348 : 0 : _r1 = fold_build2_loc (loc, UNLT_EXPR, type, _o1[0], _o1[1]);
11349 : 0 : if (EXPR_P (_r1))
11350 : 0 : goto next_after_fail1872;
11351 : 0 : res_op1 = _r1;
11352 : : }
11353 : 0 : tree res_op2;
11354 : 0 : {
11355 : 0 : tree _o1[2], _r1;
11356 : 0 : _o1[0] = captures[3];
11357 : 0 : _o1[1] = captures[6];
11358 : 0 : _r1 = fold_build2_loc (loc, UNLT_EXPR, type, _o1[0], _o1[1]);
11359 : 0 : if (EXPR_P (_r1))
11360 : 0 : goto next_after_fail1872;
11361 : 0 : res_op2 = _r1;
11362 : : }
11363 : 0 : tree _r;
11364 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11365 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
11366 : 0 : return _r;
11367 : : }
11368 : 0 : next_after_fail1872:;
11369 : : }
11370 : : }
11371 : : }
11372 : : break;
11373 : : }
11374 : 0 : default:;
11375 : : }
11376 : 0 : {
11377 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11378 : 0 : if (VECTOR_TYPE_P (type)
11379 : 0 : && (TREE_CODE_CLASS (UNLT_EXPR) != tcc_comparison
11380 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11381 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11382 : : || (optimize_vectors_before_lowering_p ()
11383 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11384 : : )
11385 : : {
11386 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1873;
11387 : 0 : {
11388 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1873;
11389 : 0 : tree res_op0;
11390 : 0 : res_op0 = captures[1];
11391 : 0 : tree res_op1;
11392 : 0 : {
11393 : 0 : tree _o1[2], _r1;
11394 : 0 : _o1[0] = captures[2];
11395 : 0 : _o1[1] = unshare_expr (captures[4]);
11396 : 0 : _r1 = fold_build2_loc (loc, UNLT_EXPR, type, _o1[0], _o1[1]);
11397 : 0 : if (EXPR_P (_r1))
11398 : 0 : goto next_after_fail1873;
11399 : 0 : res_op1 = _r1;
11400 : : }
11401 : 0 : tree res_op2;
11402 : 0 : {
11403 : 0 : tree _o1[2], _r1;
11404 : 0 : _o1[0] = captures[3];
11405 : 0 : _o1[1] = captures[4];
11406 : 0 : _r1 = fold_build2_loc (loc, UNLT_EXPR, type, _o1[0], _o1[1]);
11407 : 0 : if (EXPR_P (_r1))
11408 : 0 : goto next_after_fail1873;
11409 : 0 : res_op2 = _r1;
11410 : : }
11411 : 0 : tree _r;
11412 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11413 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
11414 : 0 : return _r;
11415 : : }
11416 : 0 : next_after_fail1873:;
11417 : : }
11418 : : }
11419 : 0 : break;
11420 : : }
11421 : 822204 : default:;
11422 : : }
11423 : 822204 : switch (TREE_CODE (_p1))
11424 : : {
11425 : 0 : case VEC_COND_EXPR:
11426 : 0 : {
11427 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11428 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11429 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11430 : 0 : {
11431 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11432 : 0 : if (VECTOR_TYPE_P (type)
11433 : 0 : && (TREE_CODE_CLASS (UNLT_EXPR) != tcc_comparison
11434 : 0 : || types_match (type, TREE_TYPE (captures[3]))
11435 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11436 : : || (optimize_vectors_before_lowering_p ()
11437 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11438 : : )
11439 : : {
11440 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1874;
11441 : 0 : {
11442 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1874;
11443 : 0 : tree res_op0;
11444 : 0 : res_op0 = captures[2];
11445 : 0 : tree res_op1;
11446 : 0 : {
11447 : 0 : tree _o1[2], _r1;
11448 : 0 : _o1[0] = unshare_expr (captures[0]);
11449 : 0 : _o1[1] = captures[3];
11450 : 0 : _r1 = fold_build2_loc (loc, UNLT_EXPR, type, _o1[0], _o1[1]);
11451 : 0 : if (EXPR_P (_r1))
11452 : 0 : goto next_after_fail1874;
11453 : 0 : res_op1 = _r1;
11454 : : }
11455 : 0 : tree res_op2;
11456 : 0 : {
11457 : 0 : tree _o1[2], _r1;
11458 : 0 : _o1[0] = captures[0];
11459 : 0 : _o1[1] = captures[4];
11460 : 0 : _r1 = fold_build2_loc (loc, UNLT_EXPR, type, _o1[0], _o1[1]);
11461 : 0 : if (EXPR_P (_r1))
11462 : 0 : goto next_after_fail1874;
11463 : 0 : res_op2 = _r1;
11464 : : }
11465 : 0 : tree _r;
11466 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11467 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 902, __FILE__, __LINE__, true);
11468 : 0 : return _r;
11469 : : }
11470 : 0 : next_after_fail1874:;
11471 : : }
11472 : : }
11473 : 0 : break;
11474 : : }
11475 : 822204 : default:;
11476 : : }
11477 : 822204 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11478 : : {
11479 : 0 : {
11480 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11481 : 0 : tree res = generic_simplify_536 (loc, type, _p0, _p1, captures, UNLT_EXPR);
11482 : 0 : if (res) return res;
11483 : : }
11484 : : }
11485 : 822204 : switch (TREE_CODE (_p0))
11486 : : {
11487 : 283 : case FLOAT_EXPR:
11488 : 283 : {
11489 : 283 : tree _q20 = TREE_OPERAND (_p0, 0);
11490 : 283 : switch (TREE_CODE (_p1))
11491 : : {
11492 : 0 : case FLOAT_EXPR:
11493 : 0 : {
11494 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11495 : 0 : {
11496 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
11497 : 0 : tree res = generic_simplify_252 (loc, type, _p0, _p1, captures, UNLT_EXPR, LT_EXPR);
11498 : 0 : if (res) return res;
11499 : : }
11500 : 0 : break;
11501 : : }
11502 : : default:;
11503 : : }
11504 : : break;
11505 : : }
11506 : 0 : case NEGATE_EXPR:
11507 : 0 : {
11508 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11509 : 0 : switch (TREE_CODE (_p1))
11510 : : {
11511 : 0 : case NEGATE_EXPR:
11512 : 0 : {
11513 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11514 : 0 : {
11515 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11516 : 0 : tree res = generic_simplify_255 (loc, type, _p0, _p1, captures, UNLT_EXPR, UNGT_EXPR);
11517 : 0 : if (res) return res;
11518 : : }
11519 : 0 : break;
11520 : : }
11521 : 0 : default:;
11522 : : }
11523 : 0 : if (CONSTANT_CLASS_P (_p1))
11524 : : {
11525 : 0 : {
11526 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11527 : 0 : tree res = generic_simplify_256 (loc, type, _p0, _p1, captures, UNLT_EXPR, UNGT_EXPR);
11528 : 0 : if (res) return res;
11529 : : }
11530 : : }
11531 : : break;
11532 : : }
11533 : 822204 : default:;
11534 : : }
11535 : 822204 : switch (TREE_CODE (_p1))
11536 : : {
11537 : 412503 : case REAL_CST:
11538 : 412503 : {
11539 : 412503 : {
11540 : 412503 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11541 : 412503 : tree res = generic_simplify_535 (loc, type, _p0, _p1, captures, UNLT_EXPR);
11542 : 412503 : if (res) return res;
11543 : : }
11544 : 412501 : break;
11545 : : }
11546 : : default:;
11547 : : }
11548 : : return NULL_TREE;
11549 : : }
11550 : :
11551 : : tree
11552 : 1767684 : generic_simplify_UNGT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11553 : : {
11554 : 1767684 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11555 : 1767684 : switch (TREE_CODE (_p0))
11556 : : {
11557 : 0 : case VEC_COND_EXPR:
11558 : 0 : {
11559 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11560 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11561 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11562 : 0 : switch (TREE_CODE (_p1))
11563 : : {
11564 : 0 : case VEC_COND_EXPR:
11565 : 0 : {
11566 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11567 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11568 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11569 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11570 : : {
11571 : 0 : {
11572 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11573 : 0 : if (VECTOR_TYPE_P (type)
11574 : 0 : && (TREE_CODE_CLASS (UNGT_EXPR) != tcc_comparison
11575 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11576 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11577 : : || (optimize_vectors_before_lowering_p ()
11578 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11579 : : )
11580 : : {
11581 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1878;
11582 : 0 : {
11583 : 0 : tree res_op0;
11584 : 0 : res_op0 = captures[1];
11585 : 0 : tree res_op1;
11586 : 0 : {
11587 : 0 : tree _o1[2], _r1;
11588 : 0 : _o1[0] = captures[2];
11589 : 0 : _o1[1] = captures[5];
11590 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11591 : 0 : if (EXPR_P (_r1))
11592 : 0 : goto next_after_fail1878;
11593 : 0 : res_op1 = _r1;
11594 : : }
11595 : 0 : tree res_op2;
11596 : 0 : {
11597 : 0 : tree _o1[2], _r1;
11598 : 0 : _o1[0] = captures[3];
11599 : 0 : _o1[1] = captures[6];
11600 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11601 : 0 : if (EXPR_P (_r1))
11602 : 0 : goto next_after_fail1878;
11603 : 0 : res_op2 = _r1;
11604 : : }
11605 : 0 : tree _r;
11606 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11607 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
11608 : 0 : return _r;
11609 : : }
11610 : 0 : next_after_fail1878:;
11611 : : }
11612 : : }
11613 : : }
11614 : : break;
11615 : : }
11616 : 0 : default:;
11617 : : }
11618 : 0 : {
11619 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11620 : 0 : if (VECTOR_TYPE_P (type)
11621 : 0 : && (TREE_CODE_CLASS (UNGT_EXPR) != tcc_comparison
11622 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11623 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11624 : : || (optimize_vectors_before_lowering_p ()
11625 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11626 : : )
11627 : : {
11628 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1879;
11629 : 0 : {
11630 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1879;
11631 : 0 : tree res_op0;
11632 : 0 : res_op0 = captures[1];
11633 : 0 : tree res_op1;
11634 : 0 : {
11635 : 0 : tree _o1[2], _r1;
11636 : 0 : _o1[0] = captures[2];
11637 : 0 : _o1[1] = unshare_expr (captures[4]);
11638 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11639 : 0 : if (EXPR_P (_r1))
11640 : 0 : goto next_after_fail1879;
11641 : 0 : res_op1 = _r1;
11642 : : }
11643 : 0 : tree res_op2;
11644 : 0 : {
11645 : 0 : tree _o1[2], _r1;
11646 : 0 : _o1[0] = captures[3];
11647 : 0 : _o1[1] = captures[4];
11648 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11649 : 0 : if (EXPR_P (_r1))
11650 : 0 : goto next_after_fail1879;
11651 : 0 : res_op2 = _r1;
11652 : : }
11653 : 0 : tree _r;
11654 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11655 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
11656 : 0 : return _r;
11657 : : }
11658 : 0 : next_after_fail1879:;
11659 : : }
11660 : : }
11661 : 0 : break;
11662 : : }
11663 : 1767684 : default:;
11664 : : }
11665 : 1767684 : switch (TREE_CODE (_p1))
11666 : : {
11667 : 0 : case VEC_COND_EXPR:
11668 : 0 : {
11669 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11670 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11671 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11672 : 0 : {
11673 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11674 : 0 : if (VECTOR_TYPE_P (type)
11675 : 0 : && (TREE_CODE_CLASS (UNGT_EXPR) != tcc_comparison
11676 : 0 : || types_match (type, TREE_TYPE (captures[3]))
11677 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11678 : : || (optimize_vectors_before_lowering_p ()
11679 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11680 : : )
11681 : : {
11682 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1880;
11683 : 0 : {
11684 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1880;
11685 : 0 : tree res_op0;
11686 : 0 : res_op0 = captures[2];
11687 : 0 : tree res_op1;
11688 : 0 : {
11689 : 0 : tree _o1[2], _r1;
11690 : 0 : _o1[0] = unshare_expr (captures[0]);
11691 : 0 : _o1[1] = captures[3];
11692 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11693 : 0 : if (EXPR_P (_r1))
11694 : 0 : goto next_after_fail1880;
11695 : 0 : res_op1 = _r1;
11696 : : }
11697 : 0 : tree res_op2;
11698 : 0 : {
11699 : 0 : tree _o1[2], _r1;
11700 : 0 : _o1[0] = captures[0];
11701 : 0 : _o1[1] = captures[4];
11702 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11703 : 0 : if (EXPR_P (_r1))
11704 : 0 : goto next_after_fail1880;
11705 : 0 : res_op2 = _r1;
11706 : : }
11707 : 0 : tree _r;
11708 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11709 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 902, __FILE__, __LINE__, true);
11710 : 0 : return _r;
11711 : : }
11712 : 0 : next_after_fail1880:;
11713 : : }
11714 : : }
11715 : 0 : break;
11716 : : }
11717 : 1767684 : default:;
11718 : : }
11719 : 1767684 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11720 : : {
11721 : 0 : {
11722 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11723 : 0 : tree res = generic_simplify_536 (loc, type, _p0, _p1, captures, UNGT_EXPR);
11724 : 0 : if (res) return res;
11725 : : }
11726 : : }
11727 : 1767684 : switch (TREE_CODE (_p0))
11728 : : {
11729 : 338 : case FLOAT_EXPR:
11730 : 338 : {
11731 : 338 : tree _q20 = TREE_OPERAND (_p0, 0);
11732 : 338 : switch (TREE_CODE (_p1))
11733 : : {
11734 : 0 : case FLOAT_EXPR:
11735 : 0 : {
11736 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11737 : 0 : {
11738 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
11739 : 0 : tree res = generic_simplify_252 (loc, type, _p0, _p1, captures, UNGT_EXPR, GT_EXPR);
11740 : 0 : if (res) return res;
11741 : : }
11742 : 0 : break;
11743 : : }
11744 : : default:;
11745 : : }
11746 : : break;
11747 : : }
11748 : 0 : case NEGATE_EXPR:
11749 : 0 : {
11750 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11751 : 0 : switch (TREE_CODE (_p1))
11752 : : {
11753 : 0 : case NEGATE_EXPR:
11754 : 0 : {
11755 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11756 : 0 : {
11757 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11758 : 0 : tree res = generic_simplify_255 (loc, type, _p0, _p1, captures, UNGT_EXPR, UNLT_EXPR);
11759 : 0 : if (res) return res;
11760 : : }
11761 : 0 : break;
11762 : : }
11763 : 0 : default:;
11764 : : }
11765 : 0 : if (CONSTANT_CLASS_P (_p1))
11766 : : {
11767 : 0 : {
11768 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11769 : 0 : tree res = generic_simplify_256 (loc, type, _p0, _p1, captures, UNGT_EXPR, UNLT_EXPR);
11770 : 0 : if (res) return res;
11771 : : }
11772 : : }
11773 : : break;
11774 : : }
11775 : 1767684 : default:;
11776 : : }
11777 : 1767684 : switch (TREE_CODE (_p1))
11778 : : {
11779 : 1358040 : case REAL_CST:
11780 : 1358040 : {
11781 : 1358040 : {
11782 : 1358040 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11783 : 1358040 : tree res = generic_simplify_535 (loc, type, _p0, _p1, captures, UNGT_EXPR);
11784 : 1358040 : if (res) return res;
11785 : : }
11786 : 1358038 : break;
11787 : : }
11788 : : default:;
11789 : : }
11790 : : return NULL_TREE;
11791 : : }
11792 : :
11793 : : tree
11794 : 555884103 : generic_simplify (location_t loc, enum tree_code code, const tree type ATTRIBUTE_UNUSED, tree _p0, tree _p1)
11795 : : {
11796 : 555884103 : switch (code)
11797 : : {
11798 : 93728364 : case PLUS_EXPR:
11799 : 93728364 : return generic_simplify_PLUS_EXPR (loc, code, type, _p0, _p1);
11800 : 34370613 : case POINTER_PLUS_EXPR:
11801 : 34370613 : return generic_simplify_POINTER_PLUS_EXPR (loc, code, type, _p0, _p1);
11802 : 31307880 : case MINUS_EXPR:
11803 : 31307880 : return generic_simplify_MINUS_EXPR (loc, code, type, _p0, _p1);
11804 : 1794834 : case BIT_IOR_EXPR:
11805 : 1794834 : return generic_simplify_BIT_IOR_EXPR (loc, code, type, _p0, _p1);
11806 : 693781 : case BIT_XOR_EXPR:
11807 : 693781 : return generic_simplify_BIT_XOR_EXPR (loc, code, type, _p0, _p1);
11808 : 2679126 : case POINTER_DIFF_EXPR:
11809 : 2679126 : return generic_simplify_POINTER_DIFF_EXPR (loc, code, type, _p0, _p1);
11810 : 68651942 : case MULT_EXPR:
11811 : 68651942 : return generic_simplify_MULT_EXPR (loc, code, type, _p0, _p1);
11812 : 25027077 : case EQ_EXPR:
11813 : 25027077 : return generic_simplify_EQ_EXPR (loc, code, type, _p0, _p1);
11814 : 32935349 : case NE_EXPR:
11815 : 32935349 : return generic_simplify_NE_EXPR (loc, code, type, _p0, _p1);
11816 : 2134593 : case TRUNC_DIV_EXPR:
11817 : 2134593 : return generic_simplify_TRUNC_DIV_EXPR (loc, code, type, _p0, _p1);
11818 : 6167 : case CEIL_DIV_EXPR:
11819 : 6167 : return generic_simplify_CEIL_DIV_EXPR (loc, code, type, _p0, _p1);
11820 : 2182686 : case FLOOR_DIV_EXPR:
11821 : 2182686 : return generic_simplify_FLOOR_DIV_EXPR (loc, code, type, _p0, _p1);
11822 : 0 : case ROUND_DIV_EXPR:
11823 : 0 : return generic_simplify_ROUND_DIV_EXPR (loc, code, type, _p0, _p1);
11824 : 3404784 : case EXACT_DIV_EXPR:
11825 : 3404784 : return generic_simplify_EXACT_DIV_EXPR (loc, code, type, _p0, _p1);
11826 : 892826 : case FLOOR_MOD_EXPR:
11827 : 892826 : return generic_simplify_FLOOR_MOD_EXPR (loc, code, type, _p0, _p1);
11828 : 6650260 : case RDIV_EXPR:
11829 : 6650260 : return generic_simplify_RDIV_EXPR (loc, code, type, _p0, _p1);
11830 : 16318023 : case LT_EXPR:
11831 : 16318023 : return generic_simplify_LT_EXPR (loc, code, type, _p0, _p1);
11832 : 8553623 : case LE_EXPR:
11833 : 8553623 : return generic_simplify_LE_EXPR (loc, code, type, _p0, _p1);
11834 : 18914704 : case GT_EXPR:
11835 : 18914704 : return generic_simplify_GT_EXPR (loc, code, type, _p0, _p1);
11836 : 5990269 : case GE_EXPR:
11837 : 5990269 : return generic_simplify_GE_EXPR (loc, code, type, _p0, _p1);
11838 : 3512 : case CEIL_MOD_EXPR:
11839 : 3512 : return generic_simplify_CEIL_MOD_EXPR (loc, code, type, _p0, _p1);
11840 : 0 : case ROUND_MOD_EXPR:
11841 : 0 : return generic_simplify_ROUND_MOD_EXPR (loc, code, type, _p0, _p1);
11842 : 1789456 : case TRUNC_MOD_EXPR:
11843 : 1789456 : return generic_simplify_TRUNC_MOD_EXPR (loc, code, type, _p0, _p1);
11844 : 1194997 : case LSHIFT_EXPR:
11845 : 1194997 : return generic_simplify_LSHIFT_EXPR (loc, code, type, _p0, _p1);
11846 : 881219 : case RSHIFT_EXPR:
11847 : 881219 : return generic_simplify_RSHIFT_EXPR (loc, code, type, _p0, _p1);
11848 : 6686683 : case BIT_AND_EXPR:
11849 : 6686683 : return generic_simplify_BIT_AND_EXPR (loc, code, type, _p0, _p1);
11850 : 82825 : case MIN_EXPR:
11851 : 82825 : return generic_simplify_MIN_EXPR (loc, code, type, _p0, _p1);
11852 : 355289 : case MAX_EXPR:
11853 : 355289 : return generic_simplify_MAX_EXPR (loc, code, type, _p0, _p1);
11854 : 1593 : case LROTATE_EXPR:
11855 : 1593 : return generic_simplify_LROTATE_EXPR (loc, code, type, _p0, _p1);
11856 : 2494 : case RROTATE_EXPR:
11857 : 2494 : return generic_simplify_RROTATE_EXPR (loc, code, type, _p0, _p1);
11858 : 822249 : case COMPLEX_EXPR:
11859 : 822249 : return generic_simplify_COMPLEX_EXPR (loc, code, type, _p0, _p1);
11860 : 856628 : case UNORDERED_EXPR:
11861 : 856628 : return generic_simplify_UNORDERED_EXPR (loc, code, type, _p0, _p1);
11862 : 219675 : case ORDERED_EXPR:
11863 : 219675 : return generic_simplify_ORDERED_EXPR (loc, code, type, _p0, _p1);
11864 : 822204 : case UNLT_EXPR:
11865 : 822204 : return generic_simplify_UNLT_EXPR (loc, code, type, _p0, _p1);
11866 : 977299 : case UNLE_EXPR:
11867 : 977299 : return generic_simplify_UNLE_EXPR (loc, code, type, _p0, _p1);
11868 : 1767684 : case UNGT_EXPR:
11869 : 1767684 : return generic_simplify_UNGT_EXPR (loc, code, type, _p0, _p1);
11870 : 467131 : case UNGE_EXPR:
11871 : 467131 : return generic_simplify_UNGE_EXPR (loc, code, type, _p0, _p1);
11872 : 409540 : case UNEQ_EXPR:
11873 : 409540 : return generic_simplify_UNEQ_EXPR (loc, code, type, _p0, _p1);
11874 : 85 : case LTGT_EXPR:
11875 : 85 : return generic_simplify_LTGT_EXPR (loc, code, type, _p0, _p1);
11876 : 3080848 : case TRUTH_ORIF_EXPR:
11877 : 3080848 : return generic_simplify_TRUTH_ORIF_EXPR (loc, code, type, _p0, _p1);
11878 : 9482116 : case TRUTH_OR_EXPR:
11879 : 9482116 : return generic_simplify_TRUTH_OR_EXPR (loc, code, type, _p0, _p1);
11880 : : default:;
11881 : : }
11882 : : return NULL_TREE;
11883 : : }
11884 : :
11885 : : tree
11886 : 13691 : generic_simplify_BIT_INSERT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
11887 : : {
11888 : 13691 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11889 : 13691 : switch (TREE_CODE (_p1))
11890 : : {
11891 : 0 : case BIT_FIELD_REF:
11892 : 0 : {
11893 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11894 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11895 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11896 : 0 : {
11897 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
11898 : 0 : if (VECTOR_TYPE_P (type)
11899 : 0 : && (VECTOR_MODE_P (TYPE_MODE (type))
11900 : : || optimize_vectors_before_lowering_p ())
11901 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
11902 : 0 : TYPE_SIZE (TREE_TYPE (captures[2])), 0)
11903 : 0 : && types_match (TREE_TYPE (TREE_TYPE (captures[0])), TREE_TYPE (captures[1]))
11904 : 0 : && TYPE_VECTOR_SUBPARTS (type).is_constant ()
11905 : 0 : && multiple_p (wi::to_poly_offset (captures[4]),
11906 : 0 : wi::to_poly_offset (TYPE_SIZE (TREE_TYPE (type))))
11907 : : )
11908 : : {
11909 : 0 : {
11910 : 0 : unsigned HOST_WIDE_INT elsz
11911 : 0 : = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))));
11912 : 0 : poly_uint64 relt = exact_div (tree_to_poly_uint64 (captures[4]), elsz);
11913 : 0 : poly_uint64 ielt = exact_div (tree_to_poly_uint64 (captures[5]), elsz);
11914 : 0 : unsigned nunits = TYPE_VECTOR_SUBPARTS (type).to_constant ();
11915 : 0 : vec_perm_builder builder;
11916 : 0 : builder.new_vector (nunits, nunits, 1);
11917 : 0 : for (unsigned i = 0; i < nunits; ++i)
11918 : 0 : builder.quick_push (known_eq (ielt, i) ? nunits + relt : i);
11919 : 0 : vec_perm_indices sel (builder, 2, nunits);
11920 : 0 : if (!VECTOR_MODE_P (TYPE_MODE (type))
11921 : 0 : || can_vec_perm_const_p (TYPE_MODE (type),
11922 : 0 : TYPE_MODE (type), sel, false)
11923 : : )
11924 : : {
11925 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail2071;
11926 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail2071;
11927 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2071;
11928 : 0 : {
11929 : 0 : tree res_op0;
11930 : 0 : res_op0 = captures[0];
11931 : 0 : tree res_op1;
11932 : 0 : {
11933 : 0 : tree _o1[1], _r1;
11934 : 0 : _o1[0] = captures[2];
11935 : 0 : if (TREE_TYPE (_o1[0]) != type)
11936 : : {
11937 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
11938 : : }
11939 : : else
11940 : : _r1 = _o1[0];
11941 : 0 : res_op1 = _r1;
11942 : : }
11943 : 0 : tree res_op2;
11944 : 0 : res_op2 = vec_perm_indices_to_tree (build_vector_type (ssizetype, nunits),
11945 : : sel);
11946 : 0 : tree _r;
11947 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11948 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
11949 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
11950 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1102, __FILE__, __LINE__, true);
11951 : 0 : return _r;
11952 : : }
11953 : 0 : next_after_fail2071:;
11954 : : }
11955 : 0 : }
11956 : : }
11957 : : }
11958 : 0 : break;
11959 : : }
11960 : : default:;
11961 : : }
11962 : : return NULL_TREE;
11963 : : }
11964 : :
11965 : : tree
11966 : 708403 : generic_simplify_VEC_PERM_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
11967 : : {
11968 : 708403 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11969 : 708403 : switch (TREE_CODE (_p0))
11970 : : {
11971 : 0 : case PLUS_EXPR:
11972 : 0 : {
11973 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11974 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11975 : 0 : switch (TREE_CODE (_p1))
11976 : : {
11977 : 0 : case MINUS_EXPR:
11978 : 0 : {
11979 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
11980 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
11981 : 0 : switch (TREE_CODE (_p2))
11982 : : {
11983 : 0 : case VECTOR_CST:
11984 : 0 : {
11985 : 0 : {
11986 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51, _p2 };
11987 : 0 : tree res = generic_simplify_587 (loc, type, _p0, _p1, _p2, captures, PLUS_EXPR, MINUS_EXPR);
11988 : 0 : if (res) return res;
11989 : : }
11990 : 0 : break;
11991 : : }
11992 : : default:;
11993 : : }
11994 : : break;
11995 : : }
11996 : : default:;
11997 : : }
11998 : : break;
11999 : : }
12000 : 0 : case MINUS_EXPR:
12001 : 0 : {
12002 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12003 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
12004 : 0 : switch (TREE_CODE (_p1))
12005 : : {
12006 : 0 : case PLUS_EXPR:
12007 : 0 : {
12008 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
12009 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
12010 : 0 : switch (TREE_CODE (_p2))
12011 : : {
12012 : 0 : case VECTOR_CST:
12013 : 0 : {
12014 : 0 : {
12015 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51, _p2 };
12016 : 0 : tree res = generic_simplify_587 (loc, type, _p0, _p1, _p2, captures, MINUS_EXPR, PLUS_EXPR);
12017 : 0 : if (res) return res;
12018 : : }
12019 : 0 : break;
12020 : : }
12021 : : default:;
12022 : : }
12023 : : break;
12024 : : }
12025 : : default:;
12026 : : }
12027 : : break;
12028 : : }
12029 : 708403 : default:;
12030 : : }
12031 : 708403 : switch (TREE_CODE (_p2))
12032 : : {
12033 : 697174 : case VECTOR_CST:
12034 : 697174 : {
12035 : 697174 : {
12036 : 697174 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
12037 : 697174 : {
12038 : 697174 : tree op0 = captures[0], op1 = captures[1], op2 = captures[2];
12039 : 697174 : machine_mode result_mode = TYPE_MODE (type);
12040 : 697174 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (op0));
12041 : 697174 : vec_perm_builder builder;
12042 : 697174 : if (tree_to_vec_perm_builder (&builder, op2)
12043 : : )
12044 : : {
12045 : 697162 : {
12046 : 697162 : poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (type);
12047 : 697162 : bool single_arg = (op0 == op1);
12048 : 1215668 : vec_perm_indices sel (builder, single_arg ? 1 : 2, nelts);
12049 : 697162 : if (sel.series_p (0, 1, 0, 1)
12050 : : )
12051 : : {
12052 : 1344 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2072;
12053 : 1344 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2072;
12054 : 1344 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2072;
12055 : 1344 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2072;
12056 : 1344 : {
12057 : 1344 : tree _r;
12058 : 1344 : _r = op0;
12059 : 1344 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1103, __FILE__, __LINE__, true);
12060 : 1344 : return _r;
12061 : : }
12062 : 686315 : next_after_fail2072:;
12063 : : }
12064 : : else
12065 : : {
12066 : 695818 : if (sel.series_p (0, 1, nelts, 1)
12067 : : )
12068 : : {
12069 : 13 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2073;
12070 : 13 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2073;
12071 : 13 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2073;
12072 : 13 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2073;
12073 : 13 : {
12074 : 13 : tree _r;
12075 : 13 : _r = op1;
12076 : 13 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1104, __FILE__, __LINE__, true);
12077 : 13 : return _r;
12078 : : }
12079 : 686315 : next_after_fail2073:;
12080 : : }
12081 : : else
12082 : : {
12083 : 695805 : {
12084 : 695805 : if (!single_arg)
12085 : : {
12086 : 517825 : if (sel.all_from_input_p (0))
12087 : : op1 = op0;
12088 : 517811 : else if (sel.all_from_input_p (1))
12089 : : {
12090 : 31 : op0 = op1;
12091 : 31 : sel.rotate_inputs (1);
12092 : : }
12093 : 517780 : else if (known_ge (poly_uint64 (sel[0]), nelts))
12094 : : {
12095 : 140 : std::swap (op0, op1);
12096 : 140 : sel.rotate_inputs (1);
12097 : : }
12098 : : }
12099 : 695805 : gassign *def;
12100 : 695805 : tree cop0 = op0, cop1 = op1;
12101 : 695805 : if (TREE_CODE (op0) == SSA_NAME
12102 : 671702 : && (def = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (op0)))
12103 : 1334254 : && gimple_assign_rhs_code (def) == CONSTRUCTOR)
12104 : 4387 : cop0 = gimple_assign_rhs1 (def);
12105 : 695805 : if (TREE_CODE (op1) == SSA_NAME
12106 : 667936 : && (def = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (op1)))
12107 : 1331368 : && gimple_assign_rhs_code (def) == CONSTRUCTOR)
12108 : 9059 : cop1 = gimple_assign_rhs1 (def);
12109 : 695805 : tree t;
12110 : 695805 : if ((TREE_CODE (cop0) == VECTOR_CST
12111 : 674450 : || TREE_CODE (cop0) == CONSTRUCTOR)
12112 : 25930 : && (TREE_CODE (cop1) == VECTOR_CST
12113 : 15387 : || TREE_CODE (cop1) == CONSTRUCTOR)
12114 : 709538 : && (t = fold_vec_perm (type, cop0, cop1, sel))
12115 : : )
12116 : : {
12117 : 7135 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2074;
12118 : 7135 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2074;
12119 : 7135 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2074;
12120 : 7135 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2074;
12121 : 7135 : {
12122 : 7135 : tree _r;
12123 : 7135 : _r = t;
12124 : 7135 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1105, __FILE__, __LINE__, true);
12125 : 7135 : return _r;
12126 : : }
12127 : 686315 : next_after_fail2074:;
12128 : : }
12129 : : else
12130 : : {
12131 : 688670 : {
12132 : 688670 : bool changed = (op0 == op1 && !single_arg);
12133 : 688670 : tree ins = NULL_TREE;
12134 : 688670 : unsigned at = 0;
12135 : 688670 : if (op_mode != BLKmode
12136 : 681525 : && (TREE_CODE (cop0) == VECTOR_CST
12137 : 666251 : || TREE_CODE (cop0) == CONSTRUCTOR
12138 : 663456 : || TREE_CODE (cop1) == VECTOR_CST
12139 : 648828 : || TREE_CODE (cop1) == CONSTRUCTOR))
12140 : : {
12141 : 38277 : bool insert_first_p = sel.series_p (1, 1, nelts + 1, 1);
12142 : 38277 : if (insert_first_p)
12143 : : {
12144 : 646 : at = 0;
12145 : 646 : if ((ins = fold_read_from_vector (cop0, sel[0])))
12146 : 104 : op0 = op1;
12147 : : }
12148 : 646 : if (!insert_first_p || (!ins && maybe_eq (nelts, 2u)))
12149 : : {
12150 : 38056 : unsigned int encoded_nelts = sel.encoding ().encoded_nelts ();
12151 : 74196 : for (at = 0; at < encoded_nelts; ++at)
12152 : 74136 : if (maybe_ne (sel[at], at))
12153 : : break;
12154 : 38056 : if (at < encoded_nelts
12155 : 38056 : && (known_eq (at + 1, nelts)
12156 : 37116 : || sel.series_p (at + 1, 1, at + 1, 1)))
12157 : : {
12158 : 1529 : if (known_lt (poly_uint64 (sel[at]), nelts))
12159 : 0 : ins = fold_read_from_vector (cop0, sel[at]);
12160 : : else
12161 : 1529 : ins = fold_read_from_vector (cop1, sel[at] - nelts);
12162 : : }
12163 : : }
12164 : : }
12165 : 688670 : if (!ins && sel.encoding () != builder)
12166 : : {
12167 : 1113 : tree oldop2 = op2;
12168 : 1113 : if (sel.ninputs () == 2
12169 : 1113 : || can_vec_perm_const_p (result_mode, op_mode, sel, false))
12170 : 676 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel);
12171 : : else
12172 : : {
12173 : 437 : vec_perm_indices sel2 (builder, 2, nelts);
12174 : 437 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false))
12175 : 164 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel2);
12176 : : else
12177 : 273 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel);
12178 : 437 : }
12179 : 1113 : if (!operand_equal_p (op2, oldop2, 0))
12180 : 949 : changed = true;
12181 : : }
12182 : 688670 : if (ins
12183 : : )
12184 : : {
12185 : 1405 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2075;
12186 : 1405 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2075;
12187 : 1405 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2075;
12188 : 1405 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2075;
12189 : 1405 : {
12190 : 1405 : tree res_op0;
12191 : 1405 : res_op0 = op0;
12192 : 1405 : tree res_op1;
12193 : 1405 : res_op1 = ins;
12194 : 1405 : tree res_op2;
12195 : 1405 : res_op2 = bitsize_int (at * vector_element_bits (type));
12196 : 1405 : tree _r;
12197 : 1405 : _r = fold_build3_loc (loc, BIT_INSERT_EXPR, type, res_op0, res_op1, res_op2);
12198 : 1405 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1106, __FILE__, __LINE__, true);
12199 : 10847 : return _r;
12200 : : }
12201 : : next_after_fail2075:;
12202 : : }
12203 : : else
12204 : : {
12205 : 687265 : if (changed
12206 : : )
12207 : : {
12208 : 950 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2076;
12209 : 950 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2076;
12210 : 950 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2076;
12211 : 950 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2076;
12212 : 950 : {
12213 : 950 : tree res_op0;
12214 : 950 : res_op0 = op0;
12215 : 950 : tree res_op1;
12216 : 950 : res_op1 = op1;
12217 : 950 : tree res_op2;
12218 : 950 : res_op2 = op2;
12219 : 950 : tree _r;
12220 : 950 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
12221 : 950 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1107, __FILE__, __LINE__, true);
12222 : 950 : return _r;
12223 : : }
12224 : : next_after_fail2076:;
12225 : : }
12226 : : }
12227 : : }
12228 : : }
12229 : : }
12230 : : }
12231 : : }
12232 : 697162 : }
12233 : : }
12234 : 10847 : }
12235 : : }
12236 : 686327 : break;
12237 : : }
12238 : 697556 : default:;
12239 : : }
12240 : 697556 : switch (TREE_CODE (_p0))
12241 : : {
12242 : 0 : case VIEW_CONVERT_EXPR:
12243 : 0 : {
12244 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12245 : 0 : switch (TREE_CODE (_q20))
12246 : : {
12247 : 0 : case VEC_PERM_EXPR:
12248 : 0 : {
12249 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
12250 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
12251 : 0 : tree _q32 = TREE_OPERAND (_q20, 2);
12252 : 0 : switch (TREE_CODE (_q32))
12253 : : {
12254 : 0 : case VECTOR_CST:
12255 : 0 : {
12256 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
12257 : : {
12258 : 0 : switch (TREE_CODE (_p2))
12259 : : {
12260 : 0 : case VECTOR_CST:
12261 : 0 : {
12262 : 0 : {
12263 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q32, _p2 };
12264 : 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
12265 : : )
12266 : : {
12267 : 0 : {
12268 : 0 : machine_mode result_mode = TYPE_MODE (type);
12269 : 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
12270 : 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
12271 : 0 : vec_perm_builder builder0;
12272 : 0 : vec_perm_builder builder1;
12273 : 0 : vec_perm_builder builder2 (nelts, nelts, 1);
12274 : 0 : if (tree_to_vec_perm_builder (&builder0, captures[4])
12275 : 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
12276 : 0 : && TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))
12277 : 0 : == TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[1])))
12278 : : )
12279 : : {
12280 : 0 : {
12281 : 0 : vec_perm_indices sel0 (builder0, 2, nelts);
12282 : 0 : vec_perm_indices sel1 (builder1, 2, nelts);
12283 : 0 : for (int i = 0; i < nelts; i++)
12284 : 0 : builder2.quick_push (sel0[sel1[i].to_constant ()]);
12285 : 0 : vec_perm_indices sel2 (builder2, 2, nelts);
12286 : 0 : tree op0 = NULL_TREE;
12287 : 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
12288 : 0 : || (single_use (captures[0])
12289 : 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
12290 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
12291 : : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
12292 : 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
12293 : 0 : if (op0
12294 : : )
12295 : : {
12296 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2077;
12297 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2077;
12298 : 0 : {
12299 : 0 : tree res_op0;
12300 : 0 : {
12301 : 0 : tree _o1[3], _r1;
12302 : 0 : _o1[0] = captures[2];
12303 : 0 : _o1[1] = captures[3];
12304 : 0 : _o1[2] = op0;
12305 : 0 : _r1 = fold_build3_loc (loc, VEC_PERM_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1], _o1[2]);
12306 : 0 : res_op0 = _r1;
12307 : : }
12308 : 0 : tree _r;
12309 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12310 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
12311 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
12312 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12313 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12314 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1108, __FILE__, __LINE__, true);
12315 : 0 : return _r;
12316 : : }
12317 : 0 : next_after_fail2077:;
12318 : : }
12319 : 0 : }
12320 : : }
12321 : 0 : }
12322 : : }
12323 : : }
12324 : 0 : break;
12325 : : }
12326 : : default:;
12327 : : }
12328 : : }
12329 : : break;
12330 : : }
12331 : : default:;
12332 : : }
12333 : : break;
12334 : : }
12335 : : default:;
12336 : : }
12337 : : break;
12338 : : }
12339 : 0 : case VEC_PERM_EXPR:
12340 : 0 : {
12341 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12342 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
12343 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
12344 : 0 : switch (TREE_CODE (_q22))
12345 : : {
12346 : 0 : case VECTOR_CST:
12347 : 0 : {
12348 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
12349 : : {
12350 : 0 : switch (TREE_CODE (_p2))
12351 : : {
12352 : 0 : case VECTOR_CST:
12353 : 0 : {
12354 : 0 : {
12355 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _q22, _p2 };
12356 : 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
12357 : : )
12358 : : {
12359 : 0 : {
12360 : 0 : machine_mode result_mode = TYPE_MODE (type);
12361 : 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
12362 : 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
12363 : 0 : vec_perm_builder builder0;
12364 : 0 : vec_perm_builder builder1;
12365 : 0 : vec_perm_builder builder2 (nelts, nelts, 1);
12366 : 0 : if (tree_to_vec_perm_builder (&builder0, captures[4])
12367 : 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
12368 : 0 : && TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))
12369 : 0 : == TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[1])))
12370 : : )
12371 : : {
12372 : 0 : {
12373 : 0 : vec_perm_indices sel0 (builder0, 2, nelts);
12374 : 0 : vec_perm_indices sel1 (builder1, 2, nelts);
12375 : 0 : for (int i = 0; i < nelts; i++)
12376 : 0 : builder2.quick_push (sel0[sel1[i].to_constant ()]);
12377 : 0 : vec_perm_indices sel2 (builder2, 2, nelts);
12378 : 0 : tree op0 = NULL_TREE;
12379 : 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
12380 : 0 : || (single_use (captures[0])
12381 : 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
12382 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
12383 : : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
12384 : 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
12385 : 0 : if (op0
12386 : : )
12387 : : {
12388 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2078;
12389 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2078;
12390 : 0 : {
12391 : 0 : tree res_op0;
12392 : 0 : {
12393 : 0 : tree _o1[3], _r1;
12394 : 0 : _o1[0] = captures[2];
12395 : 0 : _o1[1] = captures[3];
12396 : 0 : _o1[2] = op0;
12397 : 0 : _r1 = fold_build3_loc (loc, VEC_PERM_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1], _o1[2]);
12398 : 0 : res_op0 = _r1;
12399 : : }
12400 : 0 : tree _r;
12401 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12402 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
12403 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
12404 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12405 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12406 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1108, __FILE__, __LINE__, true);
12407 : 0 : return _r;
12408 : : }
12409 : 0 : next_after_fail2078:;
12410 : : }
12411 : 0 : }
12412 : : }
12413 : 0 : }
12414 : : }
12415 : : }
12416 : 0 : break;
12417 : : }
12418 : : default:;
12419 : : }
12420 : : }
12421 : : break;
12422 : : }
12423 : : default:;
12424 : : }
12425 : : break;
12426 : : }
12427 : 697556 : default:;
12428 : : }
12429 : 697556 : if (tree_vec_same_elem_p (_p0))
12430 : : {
12431 : 13823 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
12432 : : {
12433 : 0 : {
12434 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p2 };
12435 : 0 : if (types_match (type, TREE_TYPE (captures[0]))
12436 : : )
12437 : : {
12438 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2079;
12439 : 0 : {
12440 : 0 : tree _r;
12441 : 0 : _r = captures[0];
12442 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12443 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12444 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1109, __FILE__, __LINE__, true);
12445 : 0 : return _r;
12446 : : }
12447 : 0 : next_after_fail2079:;
12448 : : }
12449 : : else
12450 : : {
12451 : 0 : {
12452 : 0 : tree elem = uniform_vector_p (captures[0]);
12453 : 0 : if (elem
12454 : : )
12455 : : {
12456 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2080;
12457 : 0 : {
12458 : 0 : tree _r;
12459 : 0 : _r = build_vector_from_val (type, elem);
12460 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
12461 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
12462 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12463 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12464 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1110, __FILE__, __LINE__, true);
12465 : 0 : return _r;
12466 : : }
12467 : 0 : next_after_fail2080:;
12468 : : }
12469 : : }
12470 : : }
12471 : : }
12472 : : }
12473 : : }
12474 : 697556 : switch (TREE_CODE (_p1))
12475 : : {
12476 : 0 : case VEC_PERM_EXPR:
12477 : 0 : {
12478 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
12479 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
12480 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
12481 : 0 : switch (TREE_CODE (_q32))
12482 : : {
12483 : 0 : case VECTOR_CST:
12484 : 0 : {
12485 : 0 : switch (TREE_CODE (_p2))
12486 : : {
12487 : 0 : case VECTOR_CST:
12488 : 0 : {
12489 : 0 : {
12490 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
12491 : 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
12492 : : )
12493 : : {
12494 : 0 : {
12495 : 0 : machine_mode result_mode = TYPE_MODE (type);
12496 : 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
12497 : 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
12498 : 0 : vec_perm_builder builder0;
12499 : 0 : vec_perm_builder builder1;
12500 : 0 : vec_perm_builder builder2 (nelts, nelts, 2);
12501 : 0 : if (tree_to_vec_perm_builder (&builder0, captures[4])
12502 : 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
12503 : : )
12504 : : {
12505 : 0 : {
12506 : 0 : vec_perm_indices sel0 (builder0, 2, nelts);
12507 : 0 : vec_perm_indices sel1 (builder1, 2, nelts);
12508 : 0 : bool use_1 = false, use_2 = false;
12509 : 0 : for (int i = 0; i < nelts; i++)
12510 : : {
12511 : 0 : if (known_lt ((poly_uint64)sel1[i], sel1.nelts_per_input ()))
12512 : 0 : builder2.quick_push (sel1[i]);
12513 : : else
12514 : : {
12515 : 0 : poly_uint64 j = sel0[(sel1[i] - sel1.nelts_per_input ())
12516 : 0 : .to_constant ()];
12517 : 0 : if (known_lt (j, sel0.nelts_per_input ()))
12518 : : use_1 = true;
12519 : : else
12520 : : {
12521 : 0 : use_2 = true;
12522 : 0 : j -= sel0.nelts_per_input ();
12523 : : }
12524 : 0 : builder2.quick_push (j + sel1.nelts_per_input ());
12525 : : }
12526 : : }
12527 : 0 : if (use_1 ^ use_2
12528 : : )
12529 : : {
12530 : 0 : {
12531 : 0 : vec_perm_indices sel2 (builder2, 2, nelts);
12532 : 0 : tree op0 = NULL_TREE;
12533 : 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
12534 : 0 : || (single_use (captures[1])
12535 : 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
12536 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
12537 : : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
12538 : 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
12539 : 0 : if (op0
12540 : : )
12541 : : {
12542 : 0 : if (use_1
12543 : : )
12544 : : {
12545 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2081;
12546 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2081;
12547 : 0 : {
12548 : 0 : tree res_op0;
12549 : 0 : res_op0 = captures[0];
12550 : 0 : tree res_op1;
12551 : 0 : res_op1 = captures[2];
12552 : 0 : tree res_op2;
12553 : 0 : res_op2 = op0;
12554 : 0 : tree _r;
12555 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
12556 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
12557 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
12558 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
12559 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
12560 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12561 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12562 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1111, __FILE__, __LINE__, true);
12563 : 0 : return _r;
12564 : : }
12565 : 0 : next_after_fail2081:;
12566 : : }
12567 : : else
12568 : : {
12569 : 0 : if (use_2
12570 : : )
12571 : : {
12572 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2082;
12573 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2082;
12574 : 0 : {
12575 : 0 : tree res_op0;
12576 : 0 : res_op0 = captures[0];
12577 : 0 : tree res_op1;
12578 : 0 : res_op1 = captures[3];
12579 : 0 : tree res_op2;
12580 : 0 : res_op2 = op0;
12581 : 0 : tree _r;
12582 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
12583 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12584 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12585 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
12586 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
12587 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12588 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12589 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1112, __FILE__, __LINE__, true);
12590 : 0 : return _r;
12591 : : }
12592 : 0 : next_after_fail2082:;
12593 : : }
12594 : : }
12595 : : }
12596 : 0 : }
12597 : : }
12598 : 0 : }
12599 : : }
12600 : 0 : }
12601 : : }
12602 : : }
12603 : 0 : break;
12604 : : }
12605 : : default:;
12606 : : }
12607 : : break;
12608 : : }
12609 : : default:;
12610 : : }
12611 : : break;
12612 : : }
12613 : 697556 : default:;
12614 : : }
12615 : 697556 : switch (TREE_CODE (_p0))
12616 : : {
12617 : 0 : case VEC_PERM_EXPR:
12618 : 0 : {
12619 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12620 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
12621 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
12622 : 0 : switch (TREE_CODE (_q22))
12623 : : {
12624 : 0 : case VECTOR_CST:
12625 : 0 : {
12626 : 0 : switch (TREE_CODE (_p2))
12627 : : {
12628 : 0 : case VECTOR_CST:
12629 : 0 : {
12630 : 0 : {
12631 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _p2 };
12632 : 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
12633 : : )
12634 : : {
12635 : 0 : {
12636 : 0 : machine_mode result_mode = TYPE_MODE (type);
12637 : 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[1]));
12638 : 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
12639 : 0 : vec_perm_builder builder0;
12640 : 0 : vec_perm_builder builder1;
12641 : 0 : vec_perm_builder builder2 (nelts, nelts, 2);
12642 : 0 : if (tree_to_vec_perm_builder (&builder0, captures[3])
12643 : 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
12644 : : )
12645 : : {
12646 : 0 : {
12647 : 0 : vec_perm_indices sel0 (builder0, 2, nelts);
12648 : 0 : vec_perm_indices sel1 (builder1, 2, nelts);
12649 : 0 : bool use_1 = false, use_2 = false;
12650 : 0 : for (int i = 0; i < nelts; i++)
12651 : : {
12652 : 0 : if (known_ge ((poly_uint64)sel1[i], sel1.nelts_per_input ()))
12653 : 0 : builder2.quick_push (sel1[i]);
12654 : : else
12655 : : {
12656 : 0 : poly_uint64 j = sel0[sel1[i].to_constant ()];
12657 : 0 : if (known_lt (j, sel0.nelts_per_input ()))
12658 : : use_1 = true;
12659 : : else
12660 : : {
12661 : 0 : use_2 = true;
12662 : 0 : j -= sel0.nelts_per_input ();
12663 : : }
12664 : 0 : builder2.quick_push (j);
12665 : : }
12666 : : }
12667 : 0 : if (use_1 ^ use_2
12668 : : )
12669 : : {
12670 : 0 : {
12671 : 0 : vec_perm_indices sel2 (builder2, 2, nelts);
12672 : 0 : tree op0 = NULL_TREE;
12673 : 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
12674 : 0 : || (single_use (captures[0])
12675 : 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
12676 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
12677 : : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
12678 : 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
12679 : 0 : if (op0
12680 : : )
12681 : : {
12682 : 0 : if (use_1
12683 : : )
12684 : : {
12685 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2083;
12686 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2083;
12687 : 0 : {
12688 : 0 : tree res_op0;
12689 : 0 : res_op0 = captures[1];
12690 : 0 : tree res_op1;
12691 : 0 : res_op1 = captures[4];
12692 : 0 : tree res_op2;
12693 : 0 : res_op2 = op0;
12694 : 0 : tree _r;
12695 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
12696 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12697 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12698 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
12699 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
12700 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12701 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12702 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1113, __FILE__, __LINE__, true);
12703 : 0 : return _r;
12704 : : }
12705 : 0 : next_after_fail2083:;
12706 : : }
12707 : : else
12708 : : {
12709 : 0 : if (use_2
12710 : : )
12711 : : {
12712 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2084;
12713 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2084;
12714 : 0 : {
12715 : 0 : tree res_op0;
12716 : 0 : res_op0 = captures[2];
12717 : 0 : tree res_op1;
12718 : 0 : res_op1 = captures[4];
12719 : 0 : tree res_op2;
12720 : 0 : res_op2 = op0;
12721 : 0 : tree _r;
12722 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
12723 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12724 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12725 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
12726 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
12727 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12728 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12729 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1114, __FILE__, __LINE__, true);
12730 : 0 : return _r;
12731 : : }
12732 : 0 : next_after_fail2084:;
12733 : : }
12734 : : }
12735 : : }
12736 : 0 : }
12737 : : }
12738 : 0 : }
12739 : : }
12740 : 0 : }
12741 : : }
12742 : : }
12743 : 0 : break;
12744 : : }
12745 : : default:;
12746 : : }
12747 : : break;
12748 : : }
12749 : : default:;
12750 : : }
12751 : : break;
12752 : : }
12753 : : default:;
12754 : : }
12755 : : return NULL_TREE;
12756 : : }
12757 : : #pragma GCC diagnostic pop
|