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 : 147835783 : tree_maybe_bit_not (tree t, tree *res_ops)
11 : : {
12 : 147835783 : const tree type = TREE_TYPE (t);
13 : 147835783 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 147835783 : if (TREE_SIDE_EFFECTS (t)) return false;
15 : 141069481 : switch (TREE_CODE (t))
16 : : {
17 : 47757825 : case INTEGER_CST:
18 : 47757825 : {
19 : 47757825 : {
20 : 47757825 : tree captures[1] ATTRIBUTE_UNUSED = { t };
21 : 47757825 : {
22 : 47757825 : res_ops[0] = captures[0];
23 : 47757825 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 8, __FILE__, __LINE__, false);
24 : : return true;
25 : : }
26 : : }
27 : 93311656 : break;
28 : : }
29 : 93311656 : default:;
30 : : }
31 : 93311656 : {
32 : 93311656 : tree t_pops[1];
33 : 93311656 : if (tree_bit_not_with_nop (t, t_pops))
34 : : {
35 : 88187 : tree _p0 = t_pops[0];
36 : 88187 : {
37 : 88187 : tree captures[2] ATTRIBUTE_UNUSED = { t, _p0 };
38 : 88187 : {
39 : 88187 : res_ops[0] = captures[0];
40 : 88187 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 9, __FILE__, __LINE__, false);
41 : 88187 : return true;
42 : : }
43 : : }
44 : : }
45 : : }
46 : 93223469 : {
47 : 93223469 : tree t_pops[1];
48 : 93223469 : if (tree_maybe_cmp (t, t_pops))
49 : : {
50 : 416359 : tree _p0 = t_pops[0];
51 : 416359 : {
52 : 416359 : tree captures[2] ATTRIBUTE_UNUSED = { t, _p0 };
53 : 416359 : {
54 : 416359 : res_ops[0] = captures[0];
55 : 416359 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 10, __FILE__, __LINE__, false);
56 : 416359 : return true;
57 : : }
58 : : }
59 : : }
60 : : }
61 : 92807110 : {
62 : 92807110 : tree t_pops[2];
63 : 92807110 : if (tree_bit_xor_cst (t, t_pops))
64 : : {
65 : 1572 : tree _p0 = t_pops[0];
66 : 1572 : tree _p1 = t_pops[1];
67 : 1572 : {
68 : 1572 : tree captures[3] ATTRIBUTE_UNUSED = { t, _p0, _p1 };
69 : 1572 : {
70 : 1572 : res_ops[0] = captures[0];
71 : 1572 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 11, __FILE__, __LINE__, false);
72 : 1572 : return true;
73 : : }
74 : : }
75 : : }
76 : : }
77 : 92805538 : return false;
78 : : }
79 : :
80 : : bool
81 : 1464 : tree_min_value (tree t)
82 : : {
83 : 1464 : const tree type = TREE_TYPE (t);
84 : 1464 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
85 : 1464 : if (TREE_SIDE_EFFECTS (t)) return false;
86 : 1456 : if (uniform_integer_cst_p (t))
87 : : {
88 : 1208 : {
89 : 1208 : {
90 : 1208 : tree int_cst = uniform_integer_cst_p (t);
91 : 1208 : tree inner_type = TREE_TYPE (int_cst);
92 : 2416 : if ((INTEGRAL_TYPE_P (inner_type)
93 : 19 : || POINTER_TYPE_P (inner_type))
94 : 2433 : && wi::eq_p (wi::to_wide (int_cst), wi::min_value (inner_type))
95 : : )
96 : : {
97 : 114 : {
98 : 114 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 41, __FILE__, __LINE__, false);
99 : 114 : return true;
100 : : }
101 : : }
102 : : }
103 : : }
104 : : }
105 : : return false;
106 : : }
107 : :
108 : : bool
109 : 0 : tree_signed_integer_sat_val (tree t, tree *res_ops)
110 : : {
111 : 0 : const tree type = TREE_TYPE (t);
112 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
113 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
114 : 0 : switch (TREE_CODE (t))
115 : : {
116 : 0 : case BIT_XOR_EXPR:
117 : 0 : {
118 : 0 : tree _p0 = TREE_OPERAND (t, 0);
119 : 0 : tree _p1 = TREE_OPERAND (t, 1);
120 : 0 : switch (TREE_CODE (_p0))
121 : : {
122 : 0 : case NEGATE_EXPR:
123 : 0 : {
124 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
125 : 0 : switch (TREE_CODE (_q20))
126 : : {
127 : 0 : CASE_CONVERT:
128 : 0 : {
129 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
130 : 0 : switch (TREE_CODE (_q30))
131 : : {
132 : 0 : case LT_EXPR:
133 : 0 : {
134 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
135 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
136 : 0 : if (integer_zerop (_q41))
137 : : {
138 : 0 : if (tree_max_value (_p1))
139 : : {
140 : 0 : {
141 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
142 : 0 : if (INTEGRAL_TYPE_P (type) && !TYPE_UNSIGNED (type)
143 : : )
144 : : {
145 : 0 : {
146 : 0 : res_ops[0] = captures[0];
147 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 72, __FILE__, __LINE__, false);
148 : 0 : return true;
149 : : }
150 : : }
151 : : }
152 : : }
153 : : }
154 : : break;
155 : : }
156 : : default:;
157 : : }
158 : : break;
159 : : }
160 : : default:;
161 : : }
162 : : break;
163 : : }
164 : 0 : default:;
165 : : }
166 : 0 : {
167 : 0 : tree _p0_pops[1];
168 : 0 : if (tree_nop_convert (_p0, _p0_pops))
169 : : {
170 : 0 : tree _q20 = _p0_pops[0];
171 : 0 : switch (TREE_CODE (_q20))
172 : : {
173 : 0 : case NEGATE_EXPR:
174 : 0 : {
175 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
176 : 0 : {
177 : 0 : tree _q30_pops[1];
178 : 0 : if (tree_nop_convert (_q30, _q30_pops))
179 : : {
180 : 0 : tree _q40 = _q30_pops[0];
181 : 0 : switch (TREE_CODE (_q40))
182 : : {
183 : 0 : CASE_CONVERT:
184 : 0 : {
185 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
186 : 0 : switch (TREE_CODE (_q50))
187 : : {
188 : 0 : case LT_EXPR:
189 : 0 : {
190 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
191 : 0 : tree _q61 = TREE_OPERAND (_q50, 1);
192 : 0 : if (integer_zerop (_q61))
193 : : {
194 : 0 : if (tree_max_value (_p1))
195 : : {
196 : 0 : {
197 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q60 };
198 : 0 : if (INTEGRAL_TYPE_P (type) && !TYPE_UNSIGNED (type)
199 : : )
200 : : {
201 : 0 : {
202 : 0 : res_ops[0] = captures[0];
203 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 72, __FILE__, __LINE__, false);
204 : 0 : return true;
205 : : }
206 : : }
207 : : }
208 : : }
209 : : }
210 : : break;
211 : : }
212 : : default:;
213 : : }
214 : : break;
215 : : }
216 : : default:;
217 : : }
218 : : }
219 : : }
220 : 0 : break;
221 : : }
222 : : default:;
223 : : }
224 : : }
225 : : }
226 : 0 : if (tree_max_value (_p0))
227 : : {
228 : 0 : switch (TREE_CODE (_p1))
229 : : {
230 : 0 : case NEGATE_EXPR:
231 : 0 : {
232 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
233 : 0 : switch (TREE_CODE (_q30))
234 : : {
235 : 0 : CASE_CONVERT:
236 : 0 : {
237 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
238 : 0 : switch (TREE_CODE (_q40))
239 : : {
240 : 0 : case LT_EXPR:
241 : 0 : {
242 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
243 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
244 : 0 : if (integer_zerop (_q51))
245 : : {
246 : 0 : {
247 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q50 };
248 : 0 : if (INTEGRAL_TYPE_P (type) && !TYPE_UNSIGNED (type)
249 : : )
250 : : {
251 : 0 : {
252 : 0 : res_ops[0] = captures[0];
253 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 72, __FILE__, __LINE__, false);
254 : 0 : return true;
255 : : }
256 : : }
257 : : }
258 : : }
259 : : break;
260 : : }
261 : : default:;
262 : : }
263 : : break;
264 : : }
265 : : default:;
266 : : }
267 : : break;
268 : : }
269 : 0 : default:;
270 : : }
271 : 0 : {
272 : 0 : tree _p1_pops[1];
273 : 0 : if (tree_nop_convert (_p1, _p1_pops))
274 : : {
275 : 0 : tree _q30 = _p1_pops[0];
276 : 0 : switch (TREE_CODE (_q30))
277 : : {
278 : 0 : case NEGATE_EXPR:
279 : 0 : {
280 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
281 : 0 : {
282 : 0 : tree _q40_pops[1];
283 : 0 : if (tree_nop_convert (_q40, _q40_pops))
284 : : {
285 : 0 : tree _q50 = _q40_pops[0];
286 : 0 : switch (TREE_CODE (_q50))
287 : : {
288 : 0 : CASE_CONVERT:
289 : 0 : {
290 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
291 : 0 : switch (TREE_CODE (_q60))
292 : : {
293 : 0 : case LT_EXPR:
294 : 0 : {
295 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
296 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
297 : 0 : if (integer_zerop (_q71))
298 : : {
299 : 0 : {
300 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q70 };
301 : 0 : if (INTEGRAL_TYPE_P (type) && !TYPE_UNSIGNED (type)
302 : : )
303 : : {
304 : 0 : {
305 : 0 : res_ops[0] = captures[0];
306 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 72, __FILE__, __LINE__, false);
307 : 0 : return true;
308 : : }
309 : : }
310 : : }
311 : : }
312 : : break;
313 : : }
314 : : default:;
315 : : }
316 : : break;
317 : : }
318 : : default:;
319 : : }
320 : : }
321 : : }
322 : 0 : break;
323 : : }
324 : : default:;
325 : : }
326 : : }
327 : : }
328 : : }
329 : : break;
330 : : }
331 : : default:;
332 : : }
333 : : return false;
334 : : }
335 : :
336 : : bool
337 : 0 : tree_bitwise_induction_p (tree t, tree *res_ops)
338 : : {
339 : 0 : const tree type = TREE_TYPE (t);
340 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
341 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
342 : 0 : switch (TREE_CODE (t))
343 : : {
344 : 0 : case BIT_AND_EXPR:
345 : 0 : case BIT_IOR_EXPR:
346 : 0 : case BIT_XOR_EXPR:
347 : 0 : {
348 : 0 : tree _p0 = TREE_OPERAND (t, 0);
349 : 0 : tree _p1 = TREE_OPERAND (t, 1);
350 : 0 : {
351 : 0 : tree _p0_pops[1];
352 : 0 : if (tree_nop_convert (_p0, _p0_pops))
353 : : {
354 : 0 : tree _q20 = _p0_pops[0];
355 : 0 : switch (TREE_CODE (_q20))
356 : : {
357 : 0 : case BIT_NOT_EXPR:
358 : 0 : {
359 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
360 : 0 : switch (TREE_CODE (_q30))
361 : : {
362 : 0 : CASE_CONVERT:
363 : 0 : {
364 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
365 : 0 : switch (TREE_CODE (_q40))
366 : : {
367 : 0 : case LSHIFT_EXPR:
368 : 0 : {
369 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
370 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
371 : 0 : if (integer_onep (_q50))
372 : : {
373 : 0 : {
374 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q51, _p1, _q50 };
375 : 0 : {
376 : 0 : res_ops[0] = captures[0];
377 : 0 : res_ops[1] = captures[1];
378 : 0 : res_ops[2] = captures[2];
379 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
380 : 0 : return true;
381 : : }
382 : : }
383 : : }
384 : : break;
385 : : }
386 : : default:;
387 : : }
388 : : break;
389 : : }
390 : 0 : case LSHIFT_EXPR:
391 : 0 : {
392 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
393 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
394 : 0 : if (integer_onep (_q40))
395 : : {
396 : 0 : {
397 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _p1, _q40 };
398 : 0 : {
399 : 0 : res_ops[0] = captures[0];
400 : 0 : res_ops[1] = captures[1];
401 : 0 : res_ops[2] = captures[2];
402 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
403 : 0 : return true;
404 : : }
405 : : }
406 : : }
407 : : break;
408 : : }
409 : : default:;
410 : : }
411 : : break;
412 : : }
413 : 0 : CASE_CONVERT:
414 : 0 : {
415 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
416 : 0 : switch (TREE_CODE (_q30))
417 : : {
418 : 0 : case LSHIFT_EXPR:
419 : 0 : {
420 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
421 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
422 : 0 : if (integer_onep (_q40))
423 : : {
424 : 0 : {
425 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _p1, _q40 };
426 : 0 : {
427 : 0 : res_ops[0] = captures[0];
428 : 0 : res_ops[1] = captures[1];
429 : 0 : res_ops[2] = captures[2];
430 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
431 : 0 : return true;
432 : : }
433 : : }
434 : : }
435 : : break;
436 : : }
437 : : default:;
438 : : }
439 : : break;
440 : : }
441 : 0 : case LSHIFT_EXPR:
442 : 0 : {
443 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
444 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
445 : 0 : if (integer_onep (_q30))
446 : : {
447 : 0 : {
448 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q31, _p1, _q30 };
449 : 0 : {
450 : 0 : res_ops[0] = captures[0];
451 : 0 : res_ops[1] = captures[1];
452 : 0 : res_ops[2] = captures[2];
453 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
454 : 0 : return true;
455 : : }
456 : : }
457 : : }
458 : : break;
459 : : }
460 : : default:;
461 : : }
462 : : }
463 : : }
464 : 0 : {
465 : 0 : tree _p1_pops[1];
466 : 0 : if (tree_nop_convert (_p1, _p1_pops))
467 : : {
468 : 0 : tree _q30 = _p1_pops[0];
469 : 0 : switch (TREE_CODE (_q30))
470 : : {
471 : 0 : case BIT_NOT_EXPR:
472 : 0 : {
473 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
474 : 0 : switch (TREE_CODE (_q40))
475 : : {
476 : 0 : CASE_CONVERT:
477 : 0 : {
478 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
479 : 0 : switch (TREE_CODE (_q50))
480 : : {
481 : 0 : case LSHIFT_EXPR:
482 : 0 : {
483 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
484 : 0 : tree _q61 = TREE_OPERAND (_q50, 1);
485 : 0 : if (integer_onep (_q60))
486 : : {
487 : 0 : {
488 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q61, _p0, _q60 };
489 : 0 : {
490 : 0 : res_ops[0] = captures[0];
491 : 0 : res_ops[1] = captures[1];
492 : 0 : res_ops[2] = captures[2];
493 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
494 : 0 : return true;
495 : : }
496 : : }
497 : : }
498 : : break;
499 : : }
500 : : default:;
501 : : }
502 : : break;
503 : : }
504 : 0 : case LSHIFT_EXPR:
505 : 0 : {
506 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
507 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
508 : 0 : if (integer_onep (_q50))
509 : : {
510 : 0 : {
511 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q51, _p0, _q50 };
512 : 0 : {
513 : 0 : res_ops[0] = captures[0];
514 : 0 : res_ops[1] = captures[1];
515 : 0 : res_ops[2] = captures[2];
516 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
517 : 0 : return true;
518 : : }
519 : : }
520 : : }
521 : : break;
522 : : }
523 : : default:;
524 : : }
525 : : break;
526 : : }
527 : 0 : CASE_CONVERT:
528 : 0 : {
529 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
530 : 0 : switch (TREE_CODE (_q40))
531 : : {
532 : 0 : case LSHIFT_EXPR:
533 : 0 : {
534 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
535 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
536 : 0 : if (integer_onep (_q50))
537 : : {
538 : 0 : {
539 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q51, _p0, _q50 };
540 : 0 : {
541 : 0 : res_ops[0] = captures[0];
542 : 0 : res_ops[1] = captures[1];
543 : 0 : res_ops[2] = captures[2];
544 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
545 : 0 : return true;
546 : : }
547 : : }
548 : : }
549 : : break;
550 : : }
551 : : default:;
552 : : }
553 : : break;
554 : : }
555 : 0 : case LSHIFT_EXPR:
556 : 0 : {
557 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
558 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
559 : 0 : if (integer_onep (_q40))
560 : : {
561 : 0 : {
562 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q41, _p0, _q40 };
563 : 0 : {
564 : 0 : res_ops[0] = captures[0];
565 : 0 : res_ops[1] = captures[1];
566 : 0 : res_ops[2] = captures[2];
567 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
568 : 0 : return true;
569 : : }
570 : : }
571 : : }
572 : : break;
573 : : }
574 : : default:;
575 : : }
576 : : }
577 : : }
578 : 0 : switch (TREE_CODE (_p0))
579 : : {
580 : 0 : case BIT_NOT_EXPR:
581 : 0 : {
582 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
583 : 0 : switch (TREE_CODE (_q20))
584 : : {
585 : 0 : CASE_CONVERT:
586 : 0 : {
587 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
588 : 0 : switch (TREE_CODE (_q30))
589 : : {
590 : 0 : case LSHIFT_EXPR:
591 : 0 : {
592 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
593 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
594 : 0 : if (integer_onep (_q40))
595 : : {
596 : 0 : {
597 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q41, _p1, _q40 };
598 : 0 : {
599 : 0 : res_ops[0] = captures[0];
600 : 0 : res_ops[1] = captures[1];
601 : 0 : res_ops[2] = captures[2];
602 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
603 : 0 : return true;
604 : : }
605 : : }
606 : : }
607 : : break;
608 : : }
609 : : default:;
610 : : }
611 : : break;
612 : : }
613 : 0 : case LSHIFT_EXPR:
614 : 0 : {
615 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
616 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
617 : 0 : if (integer_onep (_q30))
618 : : {
619 : 0 : {
620 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _p1, _q30 };
621 : 0 : {
622 : 0 : res_ops[0] = captures[0];
623 : 0 : res_ops[1] = captures[1];
624 : 0 : res_ops[2] = captures[2];
625 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
626 : 0 : return true;
627 : : }
628 : : }
629 : : }
630 : : break;
631 : : }
632 : : default:;
633 : : }
634 : : break;
635 : : }
636 : 0 : default:;
637 : : }
638 : 0 : switch (TREE_CODE (_p1))
639 : : {
640 : 0 : case BIT_NOT_EXPR:
641 : 0 : {
642 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
643 : 0 : switch (TREE_CODE (_q30))
644 : : {
645 : 0 : CASE_CONVERT:
646 : 0 : {
647 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
648 : 0 : switch (TREE_CODE (_q40))
649 : : {
650 : 0 : case LSHIFT_EXPR:
651 : 0 : {
652 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
653 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
654 : 0 : if (integer_onep (_q50))
655 : : {
656 : 0 : {
657 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q51, _p0, _q50 };
658 : 0 : {
659 : 0 : res_ops[0] = captures[0];
660 : 0 : res_ops[1] = captures[1];
661 : 0 : res_ops[2] = captures[2];
662 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
663 : 0 : return true;
664 : : }
665 : : }
666 : : }
667 : : break;
668 : : }
669 : : default:;
670 : : }
671 : : break;
672 : : }
673 : 0 : case LSHIFT_EXPR:
674 : 0 : {
675 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
676 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
677 : 0 : if (integer_onep (_q40))
678 : : {
679 : 0 : {
680 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q41, _p0, _q40 };
681 : 0 : {
682 : 0 : res_ops[0] = captures[0];
683 : 0 : res_ops[1] = captures[1];
684 : 0 : res_ops[2] = captures[2];
685 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
686 : 0 : return true;
687 : : }
688 : : }
689 : : }
690 : : break;
691 : : }
692 : : default:;
693 : : }
694 : : break;
695 : : }
696 : 0 : default:;
697 : : }
698 : 0 : switch (TREE_CODE (_p0))
699 : : {
700 : 0 : CASE_CONVERT:
701 : 0 : {
702 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
703 : 0 : switch (TREE_CODE (_q20))
704 : : {
705 : 0 : case LSHIFT_EXPR:
706 : 0 : {
707 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
708 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
709 : 0 : if (integer_onep (_q30))
710 : : {
711 : 0 : {
712 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _p1, _q30 };
713 : 0 : {
714 : 0 : res_ops[0] = captures[0];
715 : 0 : res_ops[1] = captures[1];
716 : 0 : res_ops[2] = captures[2];
717 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
718 : 0 : return true;
719 : : }
720 : : }
721 : : }
722 : : break;
723 : : }
724 : : default:;
725 : : }
726 : : break;
727 : : }
728 : 0 : default:;
729 : : }
730 : 0 : switch (TREE_CODE (_p1))
731 : : {
732 : 0 : CASE_CONVERT:
733 : 0 : {
734 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
735 : 0 : switch (TREE_CODE (_q30))
736 : : {
737 : 0 : case LSHIFT_EXPR:
738 : 0 : {
739 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
740 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
741 : 0 : if (integer_onep (_q40))
742 : : {
743 : 0 : {
744 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q41, _p0, _q40 };
745 : 0 : {
746 : 0 : res_ops[0] = captures[0];
747 : 0 : res_ops[1] = captures[1];
748 : 0 : res_ops[2] = captures[2];
749 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
750 : 0 : return true;
751 : : }
752 : : }
753 : : }
754 : : break;
755 : : }
756 : : default:;
757 : : }
758 : : break;
759 : : }
760 : 0 : default:;
761 : : }
762 : 0 : switch (TREE_CODE (_p0))
763 : : {
764 : 0 : case LSHIFT_EXPR:
765 : 0 : {
766 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
767 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
768 : 0 : if (integer_onep (_q20))
769 : : {
770 : 0 : {
771 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _p1, _q20 };
772 : 0 : {
773 : 0 : res_ops[0] = captures[0];
774 : 0 : res_ops[1] = captures[1];
775 : 0 : res_ops[2] = captures[2];
776 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
777 : 0 : return true;
778 : : }
779 : : }
780 : : }
781 : : break;
782 : : }
783 : 0 : default:;
784 : : }
785 : 0 : switch (TREE_CODE (_p1))
786 : : {
787 : 0 : case LSHIFT_EXPR:
788 : 0 : {
789 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
790 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
791 : 0 : if (integer_onep (_q30))
792 : : {
793 : 0 : {
794 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q31, _p0, _q30 };
795 : 0 : {
796 : 0 : res_ops[0] = captures[0];
797 : 0 : res_ops[1] = captures[1];
798 : 0 : res_ops[2] = captures[2];
799 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
800 : 0 : return true;
801 : : }
802 : : }
803 : : }
804 : : break;
805 : : }
806 : : default:;
807 : : }
808 : : break;
809 : : }
810 : 0 : case BIT_NOT_EXPR:
811 : 0 : {
812 : 0 : tree _p0 = TREE_OPERAND (t, 0);
813 : 0 : switch (TREE_CODE (_p0))
814 : : {
815 : 0 : case BIT_XOR_EXPR:
816 : 0 : {
817 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
818 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
819 : 0 : switch (TREE_CODE (_q20))
820 : : {
821 : 0 : CASE_CONVERT:
822 : 0 : {
823 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
824 : 0 : switch (TREE_CODE (_q30))
825 : : {
826 : 0 : case LSHIFT_EXPR:
827 : 0 : {
828 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
829 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
830 : 0 : if (integer_onep (_q40))
831 : : {
832 : 0 : {
833 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q41, _q21, _q40 };
834 : 0 : {
835 : 0 : res_ops[0] = captures[0];
836 : 0 : res_ops[1] = captures[1];
837 : 0 : res_ops[2] = captures[2];
838 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 101, __FILE__, __LINE__, false);
839 : 0 : return true;
840 : : }
841 : : }
842 : : }
843 : : break;
844 : : }
845 : : default:;
846 : : }
847 : : break;
848 : : }
849 : 0 : case LSHIFT_EXPR:
850 : 0 : {
851 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
852 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
853 : 0 : if (integer_onep (_q30))
854 : : {
855 : 0 : {
856 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _q21, _q30 };
857 : 0 : {
858 : 0 : res_ops[0] = captures[0];
859 : 0 : res_ops[1] = captures[1];
860 : 0 : res_ops[2] = captures[2];
861 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 101, __FILE__, __LINE__, false);
862 : 0 : return true;
863 : : }
864 : : }
865 : : }
866 : : break;
867 : : }
868 : : default:;
869 : : }
870 : : break;
871 : : }
872 : 0 : default:;
873 : : }
874 : 0 : {
875 : 0 : tree _p0_pops[1];
876 : 0 : if (tree_nop_convert (_p0, _p0_pops))
877 : : {
878 : 0 : tree _q20 = _p0_pops[0];
879 : 0 : switch (TREE_CODE (_q20))
880 : : {
881 : 0 : case BIT_XOR_EXPR:
882 : 0 : {
883 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
884 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
885 : 0 : switch (TREE_CODE (_q30))
886 : : {
887 : 0 : CASE_CONVERT:
888 : 0 : {
889 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
890 : 0 : switch (TREE_CODE (_q40))
891 : : {
892 : 0 : case LSHIFT_EXPR:
893 : 0 : {
894 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
895 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
896 : 0 : if (integer_onep (_q50))
897 : : {
898 : 0 : {
899 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q51, _q31, _q50 };
900 : 0 : {
901 : 0 : res_ops[0] = captures[0];
902 : 0 : res_ops[1] = captures[1];
903 : 0 : res_ops[2] = captures[2];
904 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 101, __FILE__, __LINE__, false);
905 : 0 : return true;
906 : : }
907 : : }
908 : : }
909 : : break;
910 : : }
911 : : default:;
912 : : }
913 : : break;
914 : : }
915 : 0 : case LSHIFT_EXPR:
916 : 0 : {
917 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
918 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
919 : 0 : if (integer_onep (_q40))
920 : : {
921 : 0 : {
922 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _q31, _q40 };
923 : 0 : {
924 : 0 : res_ops[0] = captures[0];
925 : 0 : res_ops[1] = captures[1];
926 : 0 : res_ops[2] = captures[2];
927 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 101, __FILE__, __LINE__, false);
928 : 0 : return true;
929 : : }
930 : : }
931 : : }
932 : : break;
933 : : }
934 : : default:;
935 : : }
936 : : break;
937 : : }
938 : : default:;
939 : : }
940 : : }
941 : : }
942 : 0 : break;
943 : : }
944 : : default:;
945 : : }
946 : : return false;
947 : : }
948 : :
949 : : tree
950 : 3452773 : generic_simplify_27 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
951 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
952 : : {
953 : 3452773 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
954 : 3452773 : if (!TYPE_SATURATING (type)
955 : 3452773 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
956 : : )
957 : : {
958 : 3452773 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
959 : : )
960 : : {
961 : 6905546 : if (TREE_CODE (type) == INTEGER_TYPE
962 : 3452773 : && wi::neg_p (wi::to_wide (captures[3]))
963 : 10358319 : && wi::to_wide (captures[3]) != wi::min_value (TYPE_PRECISION (type), SIGNED)
964 : : )
965 : : {
966 : 842728 : {
967 : 842728 : wide_int c0 = wi::to_wide (captures[1]);
968 : 842728 : wide_int c2 = wi::to_wide (captures[3]);
969 : 842728 : wide_int c2_abs = wi::abs (c2);
970 : 842728 : if (wi::multiple_of_p (c2_abs, c0, TYPE_SIGN (type))
971 : : )
972 : : {
973 : 388772 : {
974 : 388772 : wide_int div_res = wi::sdiv_trunc (c2, c0);
975 : 388772 : tree div_cst = wide_int_to_tree (type, div_res);
976 : 388772 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail254;
977 : 388772 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail254;
978 : 388772 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail254;
979 : 388772 : {
980 : 388772 : tree res_op0;
981 : 388772 : {
982 : 388772 : tree _o1[2], _r1;
983 : 388772 : _o1[0] = captures[2];
984 : 388772 : _o1[1] = div_cst;
985 : 388772 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
986 : 388772 : res_op0 = _r1;
987 : : }
988 : 388772 : tree res_op1;
989 : 388772 : res_op1 = captures[1];
990 : 388772 : tree _r;
991 : 388772 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
992 : 388772 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 138, __FILE__, __LINE__, true);
993 : 388772 : return _r;
994 : : }
995 : 0 : next_after_fail254:;
996 : 388772 : }
997 : : }
998 : 842728 : }
999 : : }
1000 : : }
1001 : : }
1002 : : return NULL_TREE;
1003 : : }
1004 : :
1005 : : tree
1006 : 126 : generic_simplify_33 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1007 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1008 : : const combined_fn ARG_UNUSED (POPCOUNT))
1009 : : {
1010 : 126 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1011 : 252 : if (INTEGRAL_TYPE_P (type)
1012 : 630 : && (wi::bit_and (widest_int::from (tree_nonzero_bits (captures[1]), UNSIGNED),
1013 : 504 : widest_int::from (tree_nonzero_bits (captures[3]), UNSIGNED))
1014 : 378 : == 0)
1015 : : )
1016 : : {
1017 : 1 : {
1018 : 1 : tree utype = TREE_TYPE (captures[1]);
1019 : 1 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
1020 : 0 : utype = TREE_TYPE (captures[3]);
1021 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail260;
1022 : 1 : {
1023 : 1 : tree res_op0;
1024 : 1 : {
1025 : 1 : tree _o1[2], _r1;
1026 : 1 : {
1027 : 1 : tree _o2[1], _r2;
1028 : 1 : _o2[0] = captures[1];
1029 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1030 : : {
1031 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1032 : : }
1033 : : else
1034 : : _r2 = _o2[0];
1035 : 1 : _o1[0] = _r2;
1036 : : }
1037 : 1 : {
1038 : 1 : tree _o2[1], _r2;
1039 : 1 : _o2[0] = captures[3];
1040 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1041 : : {
1042 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1043 : : }
1044 : : else
1045 : : _r2 = _o2[0];
1046 : 1 : _o1[1] = _r2;
1047 : : }
1048 : 1 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1049 : 1 : res_op0 = _r1;
1050 : : }
1051 : 1 : tree _r;
1052 : 1 : _r = maybe_build_call_expr_loc (loc, POPCOUNT, type, 1, res_op0);
1053 : 1 : if (!_r)
1054 : 0 : goto next_after_fail260;
1055 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 144, __FILE__, __LINE__, true);
1056 : 1 : return _r;
1057 : : }
1058 : : next_after_fail260:;
1059 : : }
1060 : : }
1061 : : return NULL_TREE;
1062 : : }
1063 : :
1064 : : tree
1065 : 21 : generic_simplify_40 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1066 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1067 : : {
1068 : 21 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1069 : 21 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail267;
1070 : 21 : {
1071 : 21 : tree res_op0;
1072 : 21 : {
1073 : 21 : tree _o1[2], _r1;
1074 : 21 : _o1[0] = captures[1];
1075 : 21 : _o1[1] = unshare_expr (captures[2]);
1076 : 21 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1077 : 21 : res_op0 = _r1;
1078 : : }
1079 : 21 : tree res_op1;
1080 : 21 : res_op1 = captures[2];
1081 : 21 : tree _r;
1082 : 21 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
1083 : 21 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 151, __FILE__, __LINE__, true);
1084 : : return _r;
1085 : : }
1086 : 0 : next_after_fail267:;
1087 : 0 : return NULL_TREE;
1088 : : }
1089 : :
1090 : : tree
1091 : 5 : generic_simplify_44 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1092 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1093 : : {
1094 : 5 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1095 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail271;
1096 : 5 : {
1097 : 5 : tree res_op0;
1098 : 5 : res_op0 = captures[1];
1099 : 5 : tree res_op1;
1100 : 5 : {
1101 : 5 : tree _o1[1], _r1;
1102 : 5 : _o1[0] = captures[2];
1103 : 5 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1104 : 5 : res_op1 = _r1;
1105 : : }
1106 : 5 : tree _r;
1107 : 5 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
1108 : 5 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 155, __FILE__, __LINE__, true);
1109 : : return _r;
1110 : : }
1111 : 0 : next_after_fail271:;
1112 : 0 : return NULL_TREE;
1113 : : }
1114 : :
1115 : : tree
1116 : 1448 : generic_simplify_47 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1117 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1118 : : {
1119 : 1448 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1120 : 1448 : if (!TYPE_SATURATING (type)
1121 : : )
1122 : : {
1123 : 1448 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
1124 : 1448 : && !TYPE_OVERFLOW_SANITIZED (type)
1125 : : )
1126 : : {
1127 : 5 : {
1128 : 5 : tree t1 = type;
1129 : 5 : if (INTEGRAL_TYPE_P (type)
1130 : 5 : && TYPE_OVERFLOW_WRAPS (type) != TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
1131 : 0 : t1 = TYPE_OVERFLOW_WRAPS (type) ? type : TREE_TYPE (captures[1]);
1132 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail274;
1133 : 5 : {
1134 : 5 : tree res_op0;
1135 : 5 : {
1136 : 5 : tree _o1[2], _r1;
1137 : 5 : {
1138 : 5 : tree _o2[1], _r2;
1139 : 5 : _o2[0] = captures[0];
1140 : 5 : if (TREE_TYPE (_o2[0]) != t1)
1141 : : {
1142 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, t1, _o2[0]);
1143 : : }
1144 : : else
1145 : : _r2 = _o2[0];
1146 : 5 : _o1[0] = _r2;
1147 : : }
1148 : 5 : {
1149 : 5 : tree _o2[1], _r2;
1150 : 5 : _o2[0] = captures[1];
1151 : 5 : if (TREE_TYPE (_o2[0]) != t1)
1152 : : {
1153 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, t1, _o2[0]);
1154 : : }
1155 : : else
1156 : : _r2 = _o2[0];
1157 : 5 : _o1[1] = _r2;
1158 : : }
1159 : 5 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1160 : 5 : res_op0 = _r1;
1161 : : }
1162 : 5 : tree _r;
1163 : 5 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
1164 : 5 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 157, __FILE__, __LINE__, true);
1165 : 5 : return _r;
1166 : : }
1167 : 0 : next_after_fail274:;
1168 : : }
1169 : : }
1170 : : }
1171 : : return NULL_TREE;
1172 : : }
1173 : :
1174 : : tree
1175 : 664 : generic_simplify_53 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1176 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1177 : : {
1178 : 664 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1179 : 664 : if (!TYPE_SATURATING (type)
1180 : : )
1181 : : {
1182 : 664 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1183 : 1328 : && !FIXED_POINT_TYPE_P (type)
1184 : : )
1185 : : {
1186 : 664 : if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type)
1187 : : )
1188 : : {
1189 : 24 : if (!CONSTANT_CLASS_P (captures[2])
1190 : : )
1191 : : {
1192 : 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail282;
1193 : 24 : {
1194 : 24 : tree res_op0;
1195 : 24 : {
1196 : 24 : tree _o1[1], _r1;
1197 : 24 : _o1[0] = captures[2];
1198 : 24 : if (TREE_TYPE (_o1[0]) != type)
1199 : : {
1200 : 24 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
1201 : : }
1202 : : else
1203 : : _r1 = _o1[0];
1204 : 24 : res_op0 = _r1;
1205 : : }
1206 : 24 : tree res_op1;
1207 : 24 : {
1208 : 24 : tree _o1[2], _r1;
1209 : 24 : _o1[0] = captures[0];
1210 : 24 : {
1211 : 24 : tree _o2[1], _r2;
1212 : 24 : _o2[0] = captures[1];
1213 : 24 : if (TREE_TYPE (_o2[0]) != type)
1214 : : {
1215 : 24 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o2[0]);
1216 : : }
1217 : : else
1218 : : _r2 = _o2[0];
1219 : 24 : _o1[1] = _r2;
1220 : : }
1221 : 24 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1222 : 24 : if (EXPR_P (_r1))
1223 : 0 : goto next_after_fail282;
1224 : 24 : res_op1 = _r1;
1225 : : }
1226 : 24 : tree _r;
1227 : 24 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
1228 : 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 165, __FILE__, __LINE__, true);
1229 : 24 : return _r;
1230 : : }
1231 : : next_after_fail282:;
1232 : : }
1233 : : }
1234 : : else
1235 : : {
1236 : 1280 : if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1237 : 1280 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
1238 : : )
1239 : : {
1240 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail283;
1241 : 1 : {
1242 : 1 : tree res_op0;
1243 : 1 : {
1244 : 1 : tree _o1[2], _r1;
1245 : 1 : _o1[0] = captures[2];
1246 : 1 : {
1247 : 1 : tree _o2[2], _r2;
1248 : 1 : {
1249 : 1 : tree _o3[1], _r3;
1250 : 1 : _o3[0] = captures[0];
1251 : 1 : if (TREE_TYPE (_o3[0]) != TREE_TYPE (_o1[0]))
1252 : : {
1253 : 1 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (_o1[0]), _o3[0]);
1254 : : }
1255 : : else
1256 : : _r3 = _o3[0];
1257 : 1 : _o2[0] = _r3;
1258 : : }
1259 : 1 : _o2[1] = captures[1];
1260 : 1 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1261 : 1 : if (EXPR_P (_r2))
1262 : 0 : goto next_after_fail283;
1263 : 1 : _o1[1] = _r2;
1264 : : }
1265 : 1 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1266 : 1 : res_op0 = _r1;
1267 : : }
1268 : 1 : tree _r;
1269 : 1 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
1270 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 166, __FILE__, __LINE__, true);
1271 : 1 : return _r;
1272 : : }
1273 : : next_after_fail283:;
1274 : : }
1275 : : else
1276 : : {
1277 : 639 : if (types_match (type, captures[2]) && !TYPE_OVERFLOW_SANITIZED (type)
1278 : : )
1279 : : {
1280 : 630 : {
1281 : 630 : tree cst = const_binop (MINUS_EXPR, type, captures[0], captures[1]);
1282 : 630 : if (cst && !TREE_OVERFLOW (cst)
1283 : : )
1284 : : {
1285 : 630 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail284;
1286 : 630 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail284;
1287 : 630 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail284;
1288 : 630 : {
1289 : 630 : tree res_op0;
1290 : 630 : res_op0 = cst;
1291 : 630 : tree res_op1;
1292 : 630 : res_op1 = captures[2];
1293 : 630 : tree _r;
1294 : 630 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
1295 : 630 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 167, __FILE__, __LINE__, true);
1296 : 630 : return _r;
1297 : : }
1298 : : next_after_fail284:;
1299 : : }
1300 : : }
1301 : : }
1302 : : }
1303 : : }
1304 : : }
1305 : : }
1306 : : return NULL_TREE;
1307 : : }
1308 : :
1309 : : tree
1310 : 0 : generic_simplify_71 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1311 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1312 : : {
1313 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1314 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail304;
1315 : 0 : {
1316 : 0 : tree res_op0;
1317 : 0 : res_op0 = captures[0];
1318 : 0 : tree res_op1;
1319 : 0 : {
1320 : 0 : tree _o1[1], _r1;
1321 : 0 : _o1[0] = captures[2];
1322 : 0 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1323 : 0 : res_op1 = _r1;
1324 : : }
1325 : 0 : tree _r;
1326 : 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
1327 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 186, __FILE__, __LINE__, true);
1328 : : return _r;
1329 : : }
1330 : 0 : next_after_fail304:;
1331 : 0 : return NULL_TREE;
1332 : : }
1333 : :
1334 : : tree
1335 : 0 : generic_simplify_78 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1336 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1337 : : const enum tree_code ARG_UNUSED (op))
1338 : : {
1339 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1340 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail315;
1341 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail315;
1342 : 0 : {
1343 : 0 : tree _r;
1344 : 0 : _r = captures[0];
1345 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 193, __FILE__, __LINE__, true);
1346 : : return _r;
1347 : : }
1348 : : next_after_fail315:;
1349 : : return NULL_TREE;
1350 : : }
1351 : :
1352 : : tree
1353 : 0 : generic_simplify_83 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1354 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1355 : : {
1356 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1357 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail320;
1358 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail320;
1359 : 0 : {
1360 : 0 : tree res_op0;
1361 : 0 : res_op0 = captures[0];
1362 : 0 : tree res_op1;
1363 : 0 : res_op1 = captures[3];
1364 : 0 : tree _r;
1365 : 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
1366 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 196, __FILE__, __LINE__, true);
1367 : : return _r;
1368 : : }
1369 : : next_after_fail320:;
1370 : : return NULL_TREE;
1371 : : }
1372 : :
1373 : : tree
1374 : 390 : generic_simplify_94 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1375 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1376 : : const enum tree_code ARG_UNUSED (op),
1377 : : const enum tree_code ARG_UNUSED (rop))
1378 : : {
1379 : 390 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1380 : 390 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
1381 : 390 : && tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
1382 : : )
1383 : : {
1384 : 390 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail331;
1385 : 390 : {
1386 : 390 : tree res_op0;
1387 : 390 : {
1388 : 390 : tree _o1[1], _r1;
1389 : 390 : _o1[0] = captures[0];
1390 : 390 : if (TREE_TYPE (_o1[0]) != type)
1391 : : {
1392 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1393 : : }
1394 : : else
1395 : : _r1 = _o1[0];
1396 : 390 : res_op0 = _r1;
1397 : : }
1398 : 390 : tree res_op1;
1399 : 390 : {
1400 : 390 : tree _o1[2], _r1;
1401 : 390 : {
1402 : 390 : tree _o2[1], _r2;
1403 : 390 : _o2[0] = captures[1];
1404 : 390 : if (TREE_TYPE (_o2[0]) != type)
1405 : : {
1406 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
1407 : : }
1408 : : else
1409 : : _r2 = _o2[0];
1410 : 390 : _o1[0] = _r2;
1411 : : }
1412 : 390 : {
1413 : 390 : tree _o2[1], _r2;
1414 : 390 : _o2[0] = captures[2];
1415 : 390 : if (TREE_TYPE (_o2[0]) != type)
1416 : : {
1417 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
1418 : : }
1419 : : else
1420 : : _r2 = _o2[0];
1421 : 390 : _o1[1] = _r2;
1422 : : }
1423 : 390 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1424 : 390 : res_op1 = _r1;
1425 : : }
1426 : 390 : tree _r;
1427 : 390 : _r = fold_build2_loc (loc, rop, type, res_op0, res_op1);
1428 : 390 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 204, __FILE__, __LINE__, true);
1429 : 390 : return _r;
1430 : : }
1431 : 0 : next_after_fail331:;
1432 : : }
1433 : : return NULL_TREE;
1434 : : }
1435 : :
1436 : : tree
1437 : 2 : generic_simplify_105 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1438 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1439 : : const enum tree_code ARG_UNUSED (bitop),
1440 : : const enum tree_code ARG_UNUSED (rbitop))
1441 : : {
1442 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1443 : 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail346;
1444 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail346;
1445 : 2 : {
1446 : 2 : tree _r;
1447 : 2 : _r = captures[2];
1448 : 2 : if (TREE_SIDE_EFFECTS (captures[1]))
1449 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1450 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 211, __FILE__, __LINE__, true);
1451 : : return _r;
1452 : : }
1453 : : next_after_fail346:;
1454 : : return NULL_TREE;
1455 : : }
1456 : :
1457 : : tree
1458 : 0 : generic_simplify_109 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1459 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1460 : : const enum tree_code ARG_UNUSED (bitop),
1461 : : const enum tree_code ARG_UNUSED (rbitop))
1462 : : {
1463 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1464 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail350;
1465 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail350;
1466 : 0 : {
1467 : 0 : tree _r;
1468 : 0 : _r = captures[2];
1469 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1470 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1471 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 211, __FILE__, __LINE__, true);
1472 : : return _r;
1473 : : }
1474 : : next_after_fail350:;
1475 : : return NULL_TREE;
1476 : : }
1477 : :
1478 : : tree
1479 : 0 : generic_simplify_116 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1480 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1481 : : const enum tree_code ARG_UNUSED (op))
1482 : : {
1483 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1484 : 0 : if (INTEGRAL_TYPE_P (type)
1485 : 0 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[2])) == 0
1486 : : )
1487 : : {
1488 : 0 : {
1489 : 0 : tree t = type;
1490 : 0 : if (!TYPE_OVERFLOW_WRAPS (t))
1491 : 0 : t = unsigned_type_for (t);
1492 : 0 : wide_int c = wi::add (wi::to_wide (captures[3]), 1);
1493 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail358;
1494 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail358;
1495 : 0 : {
1496 : 0 : tree res_op0;
1497 : 0 : {
1498 : 0 : tree _o1[2], _r1;
1499 : 0 : {
1500 : 0 : tree _o2[1], _r2;
1501 : 0 : _o2[0] = captures[2];
1502 : 0 : if (TREE_TYPE (_o2[0]) != t)
1503 : : {
1504 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, t, _o2[0]);
1505 : : }
1506 : : else
1507 : : _r2 = _o2[0];
1508 : 0 : _o1[0] = _r2;
1509 : : }
1510 : 0 : _o1[1] = wide_int_to_tree (t, c);
1511 : 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, t, _o1[0], _o1[1]);
1512 : 0 : res_op0 = _r1;
1513 : : }
1514 : 0 : tree _r;
1515 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
1516 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 218, __FILE__, __LINE__, true);
1517 : 0 : return _r;
1518 : : }
1519 : 0 : next_after_fail358:;
1520 : 0 : }
1521 : : }
1522 : : return NULL_TREE;
1523 : : }
1524 : :
1525 : : tree
1526 : 0 : generic_simplify_126 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1527 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1528 : : const enum tree_code ARG_UNUSED (code2),
1529 : : const enum tree_code ARG_UNUSED (code1))
1530 : : {
1531 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1532 : 0 : if ((TREE_CODE (captures[2]) == INTEGER_CST
1533 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
1534 : 0 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1535 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
1536 : 0 : && bitwise_equal_p (captures[2], captures[5]))
1537 : : )
1538 : : {
1539 : 0 : {
1540 : 0 : bool one_before = false;
1541 : 0 : bool one_after = false;
1542 : 0 : int cmp = 0;
1543 : 0 : bool allbits = true;
1544 : 0 : if (TREE_CODE (captures[2]) == INTEGER_CST
1545 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
1546 : : {
1547 : 0 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
1548 : 0 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
1549 : 0 : auto t2 = wi::to_wide (captures[5]);
1550 : 0 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
1551 : 0 : if (cmp < 0
1552 : 0 : && t1 == t2 - 1)
1553 : : one_before = true;
1554 : 0 : if (cmp > 0
1555 : 0 : && t1 == t2 + 1)
1556 : : one_after = true;
1557 : : }
1558 : 0 : bool val;
1559 : 0 : switch (code2)
1560 : : {
1561 : 0 : case EQ_EXPR: val = (cmp == 0); break;
1562 : 0 : case NE_EXPR: val = (cmp != 0); break;
1563 : 0 : case LT_EXPR: val = (cmp < 0); break;
1564 : 0 : case GT_EXPR: val = (cmp > 0); break;
1565 : 0 : case LE_EXPR: val = (cmp <= 0); break;
1566 : 0 : case GE_EXPR: val = (cmp >= 0); break;
1567 : 0 : default: gcc_unreachable ();
1568 : : }
1569 : 0 : if (code1 == EQ_EXPR && val
1570 : : )
1571 : : {
1572 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail374;
1573 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail374;
1574 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail374;
1575 : 0 : {
1576 : 0 : tree _r;
1577 : 0 : _r = captures[3];
1578 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 234, __FILE__, __LINE__, true);
1579 : 0 : return _r;
1580 : : }
1581 : : next_after_fail374:;
1582 : : }
1583 : : else
1584 : : {
1585 : 0 : if (code1 == NE_EXPR && val && allbits
1586 : : )
1587 : : {
1588 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail375;
1589 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail375;
1590 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail375;
1591 : 0 : {
1592 : 0 : tree _r;
1593 : 0 : _r = constant_boolean_node (true, type);
1594 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1595 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1596 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 235, __FILE__, __LINE__, true);
1597 : 0 : return _r;
1598 : : }
1599 : : next_after_fail375:;
1600 : : }
1601 : : else
1602 : : {
1603 : 0 : if (code1 == NE_EXPR && !val && allbits
1604 : : )
1605 : : {
1606 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail376;
1607 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail376;
1608 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail376;
1609 : 0 : {
1610 : 0 : tree _r;
1611 : 0 : _r = captures[0];
1612 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 236, __FILE__, __LINE__, true);
1613 : 0 : return _r;
1614 : : }
1615 : : next_after_fail376:;
1616 : : }
1617 : : else
1618 : : {
1619 : 0 : if (code1 == EQ_EXPR
1620 : 0 : && code2 == GT_EXPR
1621 : 0 : && cmp == 0
1622 : 0 : && allbits
1623 : : )
1624 : : {
1625 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail377;
1626 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail377;
1627 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail377;
1628 : 0 : {
1629 : 0 : tree res_op0;
1630 : 0 : res_op0 = captures[4];
1631 : 0 : tree res_op1;
1632 : 0 : res_op1 = captures[5];
1633 : 0 : tree _r;
1634 : 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1635 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 237, __FILE__, __LINE__, true);
1636 : 0 : return _r;
1637 : : }
1638 : : next_after_fail377:;
1639 : : }
1640 : : else
1641 : : {
1642 : 0 : if (code1 == EQ_EXPR
1643 : 0 : && code2 == LT_EXPR
1644 : 0 : && cmp == 0
1645 : 0 : && allbits
1646 : : )
1647 : : {
1648 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail378;
1649 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail378;
1650 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail378;
1651 : 0 : {
1652 : 0 : tree res_op0;
1653 : 0 : res_op0 = captures[4];
1654 : 0 : tree res_op1;
1655 : 0 : res_op1 = captures[5];
1656 : 0 : tree _r;
1657 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1658 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 238, __FILE__, __LINE__, true);
1659 : 0 : return _r;
1660 : : }
1661 : : next_after_fail378:;
1662 : : }
1663 : : else
1664 : : {
1665 : 0 : if (code1 == EQ_EXPR
1666 : 0 : && code2 == GE_EXPR
1667 : : && one_before
1668 : 0 : && allbits
1669 : : )
1670 : : {
1671 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail379;
1672 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail379;
1673 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail379;
1674 : 0 : {
1675 : 0 : tree res_op0;
1676 : 0 : res_op0 = captures[4];
1677 : 0 : tree res_op1;
1678 : 0 : {
1679 : 0 : tree _o1[1], _r1;
1680 : 0 : _o1[0] = captures[2];
1681 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1682 : : {
1683 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1684 : : }
1685 : : else
1686 : : _r1 = _o1[0];
1687 : 0 : res_op1 = _r1;
1688 : : }
1689 : 0 : tree _r;
1690 : 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1691 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 239, __FILE__, __LINE__, true);
1692 : 0 : return _r;
1693 : : }
1694 : : next_after_fail379:;
1695 : : }
1696 : : else
1697 : : {
1698 : 0 : if (code1 == EQ_EXPR
1699 : 0 : && code2 == LE_EXPR
1700 : : && one_after
1701 : 0 : && allbits
1702 : : )
1703 : : {
1704 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail380;
1705 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail380;
1706 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail380;
1707 : 0 : {
1708 : 0 : tree res_op0;
1709 : 0 : res_op0 = captures[4];
1710 : 0 : tree res_op1;
1711 : 0 : {
1712 : 0 : tree _o1[1], _r1;
1713 : 0 : _o1[0] = captures[2];
1714 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1715 : : {
1716 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1717 : : }
1718 : : else
1719 : : _r1 = _o1[0];
1720 : 0 : res_op1 = _r1;
1721 : : }
1722 : 0 : tree _r;
1723 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1724 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 240, __FILE__, __LINE__, true);
1725 : 0 : return _r;
1726 : : }
1727 : : next_after_fail380:;
1728 : : }
1729 : : }
1730 : : }
1731 : : }
1732 : : }
1733 : : }
1734 : : }
1735 : : }
1736 : : }
1737 : : return NULL_TREE;
1738 : : }
1739 : :
1740 : : tree
1741 : 1 : generic_simplify_155 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1742 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1743 : : {
1744 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1745 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail435;
1746 : 1 : {
1747 : 1 : tree res_op0;
1748 : 1 : res_op0 = captures[1];
1749 : 1 : tree res_op1;
1750 : 1 : {
1751 : 1 : tree _o1[1], _r1;
1752 : 1 : _o1[0] = captures[2];
1753 : 1 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1754 : 1 : res_op1 = _r1;
1755 : : }
1756 : 1 : tree _r;
1757 : 1 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
1758 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 264, __FILE__, __LINE__, true);
1759 : : return _r;
1760 : : }
1761 : 0 : next_after_fail435:;
1762 : 0 : return NULL_TREE;
1763 : : }
1764 : :
1765 : : tree
1766 : 10 : generic_simplify_161 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1767 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1768 : : {
1769 : 10 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1770 : 10 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
1771 : 10 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
1772 : : )
1773 : : {
1774 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail441;
1775 : 10 : {
1776 : 10 : tree res_op0;
1777 : 10 : {
1778 : 10 : tree _o1[1], _r1;
1779 : 10 : _o1[0] = captures[0];
1780 : 10 : if (TREE_TYPE (_o1[0]) != type)
1781 : : {
1782 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1783 : : }
1784 : : else
1785 : : _r1 = _o1[0];
1786 : 10 : res_op0 = _r1;
1787 : : }
1788 : 10 : tree res_op1;
1789 : 10 : {
1790 : 10 : tree _o1[1], _r1;
1791 : 10 : _o1[0] = captures[1];
1792 : 10 : if (TREE_TYPE (_o1[0]) != type)
1793 : : {
1794 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1795 : : }
1796 : : else
1797 : : _r1 = _o1[0];
1798 : 10 : res_op1 = _r1;
1799 : : }
1800 : 10 : tree _r;
1801 : 10 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
1802 : 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 270, __FILE__, __LINE__, true);
1803 : 10 : return _r;
1804 : : }
1805 : 0 : next_after_fail441:;
1806 : : }
1807 : : return NULL_TREE;
1808 : : }
1809 : :
1810 : : tree
1811 : 11 : generic_simplify_171 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1812 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1813 : : const combined_fn ARG_UNUSED (PARITY))
1814 : : {
1815 : 11 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1816 : 11 : if (types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[3]))
1817 : : )
1818 : : {
1819 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail452;
1820 : 10 : {
1821 : 10 : tree res_op0;
1822 : 10 : {
1823 : 10 : tree _o1[2], _r1;
1824 : 10 : _o1[0] = captures[1];
1825 : 10 : _o1[1] = captures[3];
1826 : 10 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1827 : 10 : res_op0 = _r1;
1828 : : }
1829 : 10 : tree _r;
1830 : 10 : _r = maybe_build_call_expr_loc (loc, PARITY, type, 1, res_op0);
1831 : 10 : if (!_r)
1832 : 0 : goto next_after_fail452;
1833 : 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 280, __FILE__, __LINE__, true);
1834 : 10 : return _r;
1835 : : }
1836 : : next_after_fail452:;
1837 : : }
1838 : : else
1839 : : {
1840 : 2 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1841 : 2 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[3]))
1842 : : )
1843 : : {
1844 : 1 : {
1845 : 1 : tree utype = TREE_TYPE (captures[1]);
1846 : 1 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
1847 : 1 : utype = TREE_TYPE (captures[3]);
1848 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail453;
1849 : 1 : {
1850 : 1 : tree res_op0;
1851 : 1 : {
1852 : 1 : tree _o1[2], _r1;
1853 : 1 : {
1854 : 1 : tree _o2[1], _r2;
1855 : 1 : _o2[0] = captures[1];
1856 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1857 : : {
1858 : 1 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1859 : : }
1860 : : else
1861 : : _r2 = _o2[0];
1862 : 1 : _o1[0] = _r2;
1863 : : }
1864 : 1 : {
1865 : 1 : tree _o2[1], _r2;
1866 : 1 : _o2[0] = captures[3];
1867 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1868 : : {
1869 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1870 : : }
1871 : : else
1872 : : _r2 = _o2[0];
1873 : 1 : _o1[1] = _r2;
1874 : : }
1875 : 1 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1876 : 1 : res_op0 = _r1;
1877 : : }
1878 : 1 : tree _r;
1879 : 1 : _r = maybe_build_call_expr_loc (loc, PARITY, type, 1, res_op0);
1880 : 1 : if (!_r)
1881 : 1 : goto next_after_fail453;
1882 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 281, __FILE__, __LINE__, true);
1883 : 0 : return _r;
1884 : : }
1885 : : next_after_fail453:;
1886 : : }
1887 : : }
1888 : : }
1889 : : return NULL_TREE;
1890 : : }
1891 : :
1892 : : tree
1893 : 4079 : generic_simplify_189 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1894 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1895 : : const enum tree_code ARG_UNUSED (op))
1896 : : {
1897 : 4079 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1898 : 4079 : {
1899 : 4079 : poly_widest_int factor;
1900 : 4079 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
1901 : 4048 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[2]))
1902 : 8127 : && multiple_p (wi::to_poly_widest (captures[3]), wi::to_widest (captures[1]), &factor)
1903 : : )
1904 : : {
1905 : 3999 : {
1906 : 3999 : wi::overflow_type overflow;
1907 : 3999 : wide_int mul;
1908 : 3999 : if (types_match (type, TREE_TYPE (captures[2]))
1909 : 3953 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[2]))
1910 : 0 : && TREE_CODE (captures[2]) == INTEGER_CST
1911 : 0 : && TREE_CODE (captures[3]) == INTEGER_CST
1912 : 3999 : && (mul = wi::mul (wi::to_wide (captures[2]), wi::to_wide (captures[3]),
1913 : 0 : TYPE_SIGN (type), &overflow),
1914 : 0 : !overflow)
1915 : 3999 : && (TYPE_UNSIGNED (type)
1916 : 3999 : || known_eq (factor, 1)
1917 : 0 : || (get_range_pos_neg (captures[0])
1918 : 0 : | (((op == PLUS_EXPR) ^ (tree_int_cst_sgn (captures[2]) < 0))
1919 : 0 : ? 1 : 2)) != 3)
1920 : : )
1921 : : {
1922 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail473;
1923 : 0 : {
1924 : 0 : tree res_op0;
1925 : 0 : {
1926 : 0 : tree _o1[2], _r1;
1927 : 0 : _o1[0] = captures[0];
1928 : 0 : _o1[1] = wide_int_to_tree (type, factor);
1929 : 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1930 : 0 : res_op0 = _r1;
1931 : : }
1932 : 0 : tree res_op1;
1933 : 0 : res_op1 = wide_int_to_tree (type, mul);
1934 : 0 : tree _r;
1935 : 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1936 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1937 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1938 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1939 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1940 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
1941 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
1942 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 295, __FILE__, __LINE__, true);
1943 : 0 : return _r;
1944 : : }
1945 : 0 : next_after_fail473:;
1946 : : }
1947 : : else
1948 : : {
1949 : 3999 : {
1950 : 3999 : tree utype = unsigned_type_for (type);
1951 : 3999 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail474;
1952 : 3999 : {
1953 : 3999 : tree res_op0;
1954 : 3999 : {
1955 : 3999 : tree _o1[2], _r1;
1956 : 3999 : {
1957 : 3999 : tree _o2[2], _r2;
1958 : 3999 : {
1959 : 3999 : tree _o3[1], _r3;
1960 : 3999 : _o3[0] = captures[0];
1961 : 3999 : if (TREE_TYPE (_o3[0]) != utype)
1962 : : {
1963 : 3999 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
1964 : : }
1965 : : else
1966 : : _r3 = _o3[0];
1967 : 3999 : _o2[0] = _r3;
1968 : : }
1969 : 3999 : _o2[1] = wide_int_to_tree (utype, factor);
1970 : 3999 : _r2 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1971 : 3999 : _o1[0] = _r2;
1972 : : }
1973 : 3999 : {
1974 : 3999 : tree _o2[2], _r2;
1975 : 3999 : {
1976 : 3999 : tree _o3[1], _r3;
1977 : 3999 : _o3[0] = captures[3];
1978 : 3999 : if (TREE_TYPE (_o3[0]) != utype)
1979 : : {
1980 : 14 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
1981 : : }
1982 : : else
1983 : : _r3 = _o3[0];
1984 : 3999 : _o2[0] = _r3;
1985 : : }
1986 : 3999 : {
1987 : 3999 : tree _o3[1], _r3;
1988 : 3999 : _o3[0] = captures[2];
1989 : 3999 : if (TREE_TYPE (_o3[0]) != utype)
1990 : : {
1991 : 46 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
1992 : : }
1993 : : else
1994 : : _r3 = _o3[0];
1995 : 3999 : _o2[1] = _r3;
1996 : : }
1997 : 3999 : _r2 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1998 : 3999 : _o1[1] = _r2;
1999 : : }
2000 : 3999 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2001 : 3999 : res_op0 = _r1;
2002 : : }
2003 : 3999 : tree _r;
2004 : 3999 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2005 : 3999 : if (TREE_SIDE_EFFECTS (captures[1]))
2006 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2007 : 3999 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 296, __FILE__, __LINE__, true);
2008 : 3999 : return _r;
2009 : : }
2010 : 0 : next_after_fail474:;
2011 : : }
2012 : : }
2013 : 0 : }
2014 : : }
2015 : 4079 : }
2016 : 80 : return NULL_TREE;
2017 : : }
2018 : :
2019 : : tree
2020 : 0 : generic_simplify_219 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2021 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2022 : : const enum tree_code ARG_UNUSED (cmp1),
2023 : : const enum tree_code ARG_UNUSED (cmp2),
2024 : : const enum tree_code ARG_UNUSED (rcmp))
2025 : : {
2026 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2027 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
2028 : : )
2029 : : {
2030 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail520;
2031 : 0 : {
2032 : 0 : tree res_op0;
2033 : 0 : res_op0 = captures[0];
2034 : 0 : tree res_op1;
2035 : 0 : res_op1 = captures[1];
2036 : 0 : tree _r;
2037 : 0 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
2038 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 340, __FILE__, __LINE__, true);
2039 : 0 : return _r;
2040 : : }
2041 : 0 : next_after_fail520:;
2042 : : }
2043 : : return NULL_TREE;
2044 : : }
2045 : :
2046 : : tree
2047 : 0 : generic_simplify_226 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2048 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2049 : : const enum tree_code ARG_UNUSED (cmp),
2050 : : const enum tree_code ARG_UNUSED (icmp))
2051 : : {
2052 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2053 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2054 : : )
2055 : : {
2056 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail531;
2057 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail531;
2058 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail531;
2059 : 0 : {
2060 : 0 : tree res_op0;
2061 : 0 : res_op0 = captures[0];
2062 : 0 : tree res_op1;
2063 : 0 : res_op1 = wide_int_to_tree (TREE_TYPE (captures[0]),
2064 : 0 : wi::exact_log2 (wi::to_wide (captures[1])));
2065 : 0 : tree _r;
2066 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2067 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 351, __FILE__, __LINE__, true);
2068 : 0 : return _r;
2069 : : }
2070 : : next_after_fail531:;
2071 : : }
2072 : : return NULL_TREE;
2073 : : }
2074 : :
2075 : : tree
2076 : 207 : generic_simplify_228 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2077 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2078 : : const enum tree_code ARG_UNUSED (cmp))
2079 : : {
2080 : 207 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2081 : 207 : if (tree_fits_shwi_p (captures[3])
2082 : 207 : && tree_to_shwi (captures[3]) > 0
2083 : 400 : && tree_to_shwi (captures[3]) < TYPE_PRECISION (TREE_TYPE (captures[2]))
2084 : : )
2085 : : {
2086 : 193 : {
2087 : 193 : tree t0 = TREE_TYPE (captures[2]);
2088 : 193 : unsigned int prec = TYPE_PRECISION (t0);
2089 : 193 : wide_int c1 = wi::to_wide (captures[3]);
2090 : 193 : wide_int c2 = wi::to_wide (captures[4]);
2091 : 193 : wide_int c3 = wi::to_wide (captures[5]);
2092 : 193 : wide_int sb = wi::set_bit_in_zero (prec - 1, prec);
2093 : 193 : if ((c2 & c3) != c3
2094 : : )
2095 : : {
2096 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail534;
2097 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail534;
2098 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail534;
2099 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail534;
2100 : 0 : {
2101 : 0 : tree _r;
2102 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2103 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2104 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2105 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 354, __FILE__, __LINE__, true);
2106 : 0 : return _r;
2107 : : }
2108 : 0 : next_after_fail534:;
2109 : : }
2110 : : else
2111 : : {
2112 : 193 : if (TYPE_UNSIGNED (t0)
2113 : : )
2114 : : {
2115 : 100 : if ((c3 & wi::arshift (sb, c1 - 1)) != 0
2116 : : )
2117 : : {
2118 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail535;
2119 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail535;
2120 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail535;
2121 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail535;
2122 : 0 : {
2123 : 0 : tree _r;
2124 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2125 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2126 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2127 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 355, __FILE__, __LINE__, true);
2128 : 0 : return _r;
2129 : : }
2130 : 0 : next_after_fail535:;
2131 : : }
2132 : : else
2133 : : {
2134 : 100 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail536;
2135 : 100 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail536;
2136 : 100 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail536;
2137 : 100 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail536;
2138 : 100 : {
2139 : 100 : tree res_op0;
2140 : 100 : {
2141 : 100 : tree _o1[2], _r1;
2142 : 100 : _o1[0] = captures[2];
2143 : 100 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
2144 : 100 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2145 : 100 : res_op0 = _r1;
2146 : : }
2147 : 100 : tree res_op1;
2148 : 100 : res_op1 = wide_int_to_tree (t0, c3 << c1);
2149 : 100 : tree _r;
2150 : 100 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2151 : 100 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 356, __FILE__, __LINE__, true);
2152 : 100 : return _r;
2153 : : }
2154 : 0 : next_after_fail536:;
2155 : : }
2156 : : }
2157 : : else
2158 : : {
2159 : 93 : {
2160 : 93 : wide_int smask = wi::arshift (sb, c1);
2161 : 93 : if ((c2 & smask) == 0
2162 : : )
2163 : : {
2164 : 91 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail537;
2165 : 91 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail537;
2166 : 91 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail537;
2167 : 91 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail537;
2168 : 91 : {
2169 : 91 : tree res_op0;
2170 : 91 : {
2171 : 91 : tree _o1[2], _r1;
2172 : 91 : _o1[0] = captures[2];
2173 : 91 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
2174 : 91 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2175 : 91 : res_op0 = _r1;
2176 : : }
2177 : 91 : tree res_op1;
2178 : 91 : res_op1 = wide_int_to_tree (t0, c3 << c1);
2179 : 91 : tree _r;
2180 : 91 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2181 : 91 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 357, __FILE__, __LINE__, true);
2182 : 91 : return _r;
2183 : : }
2184 : 0 : next_after_fail537:;
2185 : : }
2186 : : else
2187 : : {
2188 : 2 : if ((c3 & smask) == 0
2189 : : )
2190 : : {
2191 : 2 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail538;
2192 : 2 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail538;
2193 : 2 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail538;
2194 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail538;
2195 : 2 : {
2196 : 2 : tree res_op0;
2197 : 2 : {
2198 : 2 : tree _o1[2], _r1;
2199 : 2 : _o1[0] = captures[2];
2200 : 2 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
2201 : 2 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2202 : 2 : res_op0 = _r1;
2203 : : }
2204 : 2 : tree res_op1;
2205 : 2 : res_op1 = wide_int_to_tree (t0, c3 << c1);
2206 : 2 : tree _r;
2207 : 2 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2208 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 358, __FILE__, __LINE__, true);
2209 : 2 : return _r;
2210 : : }
2211 : 0 : next_after_fail538:;
2212 : : }
2213 : : else
2214 : : {
2215 : 0 : if ((c2 & smask) != (c3 & smask)
2216 : : )
2217 : : {
2218 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail539;
2219 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail539;
2220 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail539;
2221 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail539;
2222 : 0 : {
2223 : 0 : tree _r;
2224 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2225 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2226 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2227 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 359, __FILE__, __LINE__, true);
2228 : 0 : return _r;
2229 : : }
2230 : 0 : next_after_fail539:;
2231 : : }
2232 : : else
2233 : : {
2234 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail540;
2235 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail540;
2236 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail540;
2237 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail540;
2238 : 0 : {
2239 : 0 : tree res_op0;
2240 : 0 : {
2241 : 0 : tree _o1[2], _r1;
2242 : 0 : _o1[0] = captures[2];
2243 : 0 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
2244 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2245 : 0 : res_op0 = _r1;
2246 : : }
2247 : 0 : tree res_op1;
2248 : 0 : res_op1 = wide_int_to_tree (t0, (c3 << c1) | sb);
2249 : 0 : tree _r;
2250 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2251 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 360, __FILE__, __LINE__, true);
2252 : 0 : return _r;
2253 : : }
2254 : 0 : next_after_fail540:;
2255 : : }
2256 : : }
2257 : : }
2258 : 93 : }
2259 : : }
2260 : : }
2261 : 193 : }
2262 : : }
2263 : : return NULL_TREE;
2264 : : }
2265 : :
2266 : : tree
2267 : 696 : generic_simplify_259 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2268 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2269 : : const enum tree_code ARG_UNUSED (cmp))
2270 : : {
2271 : 696 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2272 : 696 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
2273 : 1392 : && wi::bit_and_not (wi::to_wide (captures[2]), wi::to_wide (captures[3])) != 0
2274 : : )
2275 : : {
2276 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail631;
2277 : 0 : {
2278 : 0 : tree _r;
2279 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2280 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2281 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2282 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2283 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2284 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
2285 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
2286 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 442, __FILE__, __LINE__, true);
2287 : 0 : return _r;
2288 : : }
2289 : 0 : next_after_fail631:;
2290 : : }
2291 : : return NULL_TREE;
2292 : : }
2293 : :
2294 : : tree
2295 : 62 : generic_simplify_262 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2296 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2297 : : const enum tree_code ARG_UNUSED (cmp))
2298 : : {
2299 : 62 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2300 : 62 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail637;
2301 : 62 : {
2302 : 62 : tree res_op0;
2303 : 62 : res_op0 = captures[1];
2304 : 62 : tree res_op1;
2305 : 62 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
2306 : 62 : tree _r;
2307 : 62 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2308 : 62 : if (TREE_SIDE_EFFECTS (captures[0]))
2309 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2310 : 62 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 448, __FILE__, __LINE__, true);
2311 : : return _r;
2312 : : }
2313 : 0 : next_after_fail637:;
2314 : 0 : return NULL_TREE;
2315 : : }
2316 : :
2317 : : tree
2318 : 449 : generic_simplify_265 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2319 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2320 : : const enum tree_code ARG_UNUSED (cmp))
2321 : : {
2322 : 449 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2323 : 449 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail640;
2324 : 449 : {
2325 : 449 : tree res_op0;
2326 : 449 : {
2327 : 449 : tree _o1[2], _r1;
2328 : 449 : _o1[0] = captures[0];
2329 : 449 : {
2330 : 449 : tree _o2[1], _r2;
2331 : 449 : _o2[0] = captures[1];
2332 : 449 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
2333 : 449 : if (EXPR_P (_r2))
2334 : 441 : goto next_after_fail640;
2335 : 8 : _o1[1] = _r2;
2336 : : }
2337 : 8 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2338 : 8 : res_op0 = _r1;
2339 : : }
2340 : 8 : tree res_op1;
2341 : 8 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
2342 : 8 : tree _r;
2343 : 8 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2344 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 451, __FILE__, __LINE__, true);
2345 : : return _r;
2346 : : }
2347 : : next_after_fail640:;
2348 : : return NULL_TREE;
2349 : : }
2350 : :
2351 : : tree
2352 : 12854 : generic_simplify_268 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2353 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2354 : : const enum tree_code ARG_UNUSED (cmp))
2355 : : {
2356 : 12854 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2357 : 12854 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail643;
2358 : 12854 : {
2359 : 12854 : tree res_op0;
2360 : 12854 : {
2361 : 12854 : tree _o1[2], _r1;
2362 : 12854 : {
2363 : 12854 : tree _o2[2], _r2;
2364 : 12854 : _o2[0] = captures[1];
2365 : 12854 : _o2[1] = captures[4];
2366 : 12854 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2367 : 12854 : _o1[0] = _r2;
2368 : : }
2369 : 12854 : _o1[1] = captures[2];
2370 : 12854 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2371 : 12854 : res_op0 = _r1;
2372 : : }
2373 : 12854 : tree res_op1;
2374 : 12854 : res_op1 = build_zero_cst (TREE_TYPE (captures[2]));
2375 : 12854 : tree _r;
2376 : 12854 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2377 : 12854 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 454, __FILE__, __LINE__, true);
2378 : : return _r;
2379 : : }
2380 : 0 : next_after_fail643:;
2381 : 0 : return NULL_TREE;
2382 : : }
2383 : :
2384 : : tree
2385 : 18 : generic_simplify_274 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2386 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2387 : : const enum tree_code ARG_UNUSED (cmp),
2388 : : const enum tree_code ARG_UNUSED (ncmp))
2389 : : {
2390 : 18 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2391 : 36 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2392 : 18 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2393 : 36 : && types_match (captures[0], captures[2])
2394 : : )
2395 : : {
2396 : 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail649;
2397 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail649;
2398 : 2 : {
2399 : 2 : tree res_op0;
2400 : 2 : {
2401 : 2 : tree _o1[2], _r1;
2402 : 2 : _o1[0] = captures[0];
2403 : 2 : _o1[1] = captures[2];
2404 : 2 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2405 : 2 : res_op0 = _r1;
2406 : : }
2407 : 2 : tree res_op1;
2408 : 2 : res_op1 = captures[1];
2409 : 2 : tree _r;
2410 : 2 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
2411 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 458, __FILE__, __LINE__, true);
2412 : 2 : return _r;
2413 : : }
2414 : : next_after_fail649:;
2415 : : }
2416 : : return NULL_TREE;
2417 : : }
2418 : :
2419 : : tree
2420 : 4 : generic_simplify_279 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2421 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2422 : : const enum tree_code ARG_UNUSED (inner),
2423 : : const enum tree_code ARG_UNUSED (outer))
2424 : : {
2425 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2426 : 4 : {
2427 : 4 : bool cst1 = integer_onep (captures[1]);
2428 : 4 : bool cst0 = integer_zerop (captures[1]);
2429 : 4 : bool innereq = inner == EQ_EXPR;
2430 : 4 : bool outereq = outer == EQ_EXPR;
2431 : 8 : if (innereq ? cst0 : cst1
2432 : : )
2433 : : {
2434 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail668;
2435 : 0 : {
2436 : 0 : tree _r;
2437 : 0 : _r = constant_boolean_node (!outereq, type);
2438 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2439 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2440 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2441 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2442 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 469, __FILE__, __LINE__, true);
2443 : 0 : return _r;
2444 : : }
2445 : 0 : next_after_fail668:;
2446 : : }
2447 : : else
2448 : : {
2449 : 8 : if (innereq ? cst1 : cst0
2450 : : )
2451 : : {
2452 : 4 : {
2453 : 4 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
2454 : 4 : tree ucst1 = build_one_cst (utype);
2455 : 4 : if (!outereq
2456 : : )
2457 : : {
2458 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail669;
2459 : 4 : {
2460 : 4 : tree res_op0;
2461 : 4 : {
2462 : 4 : tree _o1[1], _r1;
2463 : 4 : _o1[0] = captures[0];
2464 : 4 : if (TREE_TYPE (_o1[0]) != utype)
2465 : : {
2466 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
2467 : : }
2468 : : else
2469 : : _r1 = _o1[0];
2470 : 4 : res_op0 = _r1;
2471 : : }
2472 : 4 : tree res_op1;
2473 : 4 : res_op1 = ucst1;
2474 : 4 : tree _r;
2475 : 4 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2476 : 4 : if (TREE_SIDE_EFFECTS (captures[1]))
2477 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2478 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 470, __FILE__, __LINE__, true);
2479 : 4 : return _r;
2480 : : }
2481 : 0 : next_after_fail669:;
2482 : : }
2483 : : else
2484 : : {
2485 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail670;
2486 : 0 : {
2487 : 0 : tree res_op0;
2488 : 0 : {
2489 : 0 : tree _o1[1], _r1;
2490 : 0 : _o1[0] = captures[0];
2491 : 0 : if (TREE_TYPE (_o1[0]) != utype)
2492 : : {
2493 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
2494 : : }
2495 : : else
2496 : : _r1 = _o1[0];
2497 : 0 : res_op0 = _r1;
2498 : : }
2499 : 0 : tree res_op1;
2500 : 0 : res_op1 = ucst1;
2501 : 0 : tree _r;
2502 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
2503 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2504 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2505 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 471, __FILE__, __LINE__, true);
2506 : 0 : return _r;
2507 : : }
2508 : 0 : next_after_fail670:;
2509 : : }
2510 : : }
2511 : : }
2512 : : else
2513 : : {
2514 : 0 : {
2515 : 0 : tree value = build_int_cst (TREE_TYPE (captures[0]), !innereq);
2516 : 0 : if (outereq
2517 : : )
2518 : : {
2519 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail671;
2520 : 0 : {
2521 : 0 : tree res_op0;
2522 : 0 : res_op0 = captures[0];
2523 : 0 : tree res_op1;
2524 : 0 : res_op1 = value;
2525 : 0 : tree _r;
2526 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
2527 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2528 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2529 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 472, __FILE__, __LINE__, true);
2530 : 0 : return _r;
2531 : : }
2532 : 0 : next_after_fail671:;
2533 : : }
2534 : : else
2535 : : {
2536 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail672;
2537 : 0 : {
2538 : 0 : tree res_op0;
2539 : 0 : res_op0 = captures[0];
2540 : 0 : tree res_op1;
2541 : 0 : res_op1 = value;
2542 : 0 : tree _r;
2543 : 0 : _r = fold_build2_loc (loc, NE_EXPR, type, res_op0, res_op1);
2544 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2545 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2546 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 473, __FILE__, __LINE__, true);
2547 : 0 : return _r;
2548 : : }
2549 : 0 : next_after_fail672:;
2550 : : }
2551 : : }
2552 : : }
2553 : : }
2554 : : }
2555 : : return NULL_TREE;
2556 : : }
2557 : :
2558 : : tree
2559 : 45 : generic_simplify_287 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2560 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2561 : : const enum tree_code ARG_UNUSED (cmp),
2562 : : const enum tree_code ARG_UNUSED (rep),
2563 : : const combined_fn ARG_UNUSED (popcount))
2564 : : {
2565 : 45 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2566 : 45 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail693;
2567 : 45 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail693;
2568 : 45 : {
2569 : 45 : tree res_op0;
2570 : 45 : res_op0 = captures[0];
2571 : 45 : tree res_op1;
2572 : 45 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
2573 : 45 : tree _r;
2574 : 45 : _r = fold_build2_loc (loc, rep, type, res_op0, res_op1);
2575 : 45 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 494, __FILE__, __LINE__, true);
2576 : : return _r;
2577 : : }
2578 : : next_after_fail693:;
2579 : : return NULL_TREE;
2580 : : }
2581 : :
2582 : : tree
2583 : 29584 : generic_simplify_291 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2584 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2585 : : const enum tree_code ARG_UNUSED (cmp),
2586 : : const enum tree_code ARG_UNUSED (icmp),
2587 : : const enum tree_code ARG_UNUSED (ncmp))
2588 : : {
2589 : 29584 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2590 : 29584 : if (types_match (type, TREE_TYPE (captures[0]))
2591 : : )
2592 : : {
2593 : 28845 : {
2594 : 28845 : enum tree_code ic = invert_tree_comparison
2595 : 28845 : (cmp, HONOR_NANS (captures[1]));
2596 : 28845 : if (ic == icmp
2597 : : )
2598 : : {
2599 : 22031 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail699;
2600 : 22031 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail699;
2601 : 22031 : {
2602 : 22031 : tree res_op0;
2603 : 22031 : res_op0 = captures[1];
2604 : 22031 : tree res_op1;
2605 : 22031 : res_op1 = captures[2];
2606 : 22031 : tree _r;
2607 : 22031 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2608 : 22031 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 500, __FILE__, __LINE__, true);
2609 : 22031 : return _r;
2610 : : }
2611 : : next_after_fail699:;
2612 : : }
2613 : : else
2614 : : {
2615 : 6814 : if (ic == ncmp
2616 : : )
2617 : : {
2618 : 5 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail700;
2619 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail700;
2620 : 5 : {
2621 : 5 : tree res_op0;
2622 : 5 : res_op0 = captures[1];
2623 : 5 : tree res_op1;
2624 : 5 : res_op1 = captures[2];
2625 : 5 : tree _r;
2626 : 5 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
2627 : 5 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 501, __FILE__, __LINE__, true);
2628 : 5 : return _r;
2629 : : }
2630 : : next_after_fail700:;
2631 : : }
2632 : : }
2633 : : }
2634 : : }
2635 : : return NULL_TREE;
2636 : : }
2637 : :
2638 : : tree
2639 : 2363 : generic_simplify_301 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2640 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2641 : : const enum tree_code ARG_UNUSED (div))
2642 : : {
2643 : 2363 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2644 : 2363 : if (!integer_zerop (captures[1])
2645 : : )
2646 : : {
2647 : 1737 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail712;
2648 : 1737 : {
2649 : 1737 : tree _r;
2650 : 1737 : _r = captures[0];
2651 : 1737 : if (TREE_SIDE_EFFECTS (captures[1]))
2652 : 59 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2653 : 1737 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 511, __FILE__, __LINE__, true);
2654 : 1737 : return _r;
2655 : : }
2656 : 0 : next_after_fail712:;
2657 : : }
2658 : : return NULL_TREE;
2659 : : }
2660 : :
2661 : : tree
2662 : 1 : generic_simplify_306 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2663 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2664 : : const enum tree_code ARG_UNUSED (div))
2665 : : {
2666 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2667 : 0 : if ((INTEGRAL_TYPE_P (type) || VECTOR_INTEGER_TYPE_P (type))
2668 : 1 : && TYPE_OVERFLOW_UNDEFINED (type)
2669 : 1 : && !integer_zerop (captures[0])
2670 : 2 : && (!flag_non_call_exceptions || tree_expr_nonzero_p (captures[0]))
2671 : : )
2672 : : {
2673 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail717;
2674 : 1 : {
2675 : 1 : tree _r;
2676 : 1 : _r = build_minus_one_cst (type);
2677 : 1 : if (TREE_SIDE_EFFECTS (captures[0]))
2678 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2679 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 516, __FILE__, __LINE__, true);
2680 : 1 : return _r;
2681 : : }
2682 : 0 : next_after_fail717:;
2683 : : }
2684 : : return NULL_TREE;
2685 : : }
2686 : :
2687 : : tree
2688 : 3 : generic_simplify_311 (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 (div))
2691 : : {
2692 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2693 : 3 : if (INTEGRAL_TYPE_P (type)
2694 : 3 : && wi::multiple_of_p (wi::to_widest (captures[1]), wi::to_widest (captures[2]), SIGNED)
2695 : : )
2696 : : {
2697 : 3 : if (TYPE_OVERFLOW_UNDEFINED (type) && !TYPE_OVERFLOW_SANITIZED (type)
2698 : : )
2699 : : {
2700 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail723;
2701 : 3 : {
2702 : 3 : tree res_op0;
2703 : 3 : res_op0 = captures[1];
2704 : 3 : tree res_op1;
2705 : 3 : res_op1 = captures[2];
2706 : 3 : tree _r;
2707 : 3 : _r = fold_build2_loc (loc, div, type, res_op0, res_op1);
2708 : 3 : if (TREE_SIDE_EFFECTS (captures[0]))
2709 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2710 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 522, __FILE__, __LINE__, true);
2711 : 3 : return _r;
2712 : : }
2713 : 0 : next_after_fail723:;
2714 : : }
2715 : : }
2716 : : return NULL_TREE;
2717 : : }
2718 : :
2719 : : tree
2720 : 2 : generic_simplify_320 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2721 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2722 : : {
2723 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2724 : 0 : if (FLOAT_TYPE_P (type)
2725 : 2 : && ! HONOR_NANS (type)
2726 : 2 : && ! HONOR_INFINITIES (type)
2727 : : )
2728 : : {
2729 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail732;
2730 : 0 : {
2731 : 0 : tree _r;
2732 : 0 : _r = build_minus_one_cst (type);
2733 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2734 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2735 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 531, __FILE__, __LINE__, true);
2736 : 0 : return _r;
2737 : : }
2738 : 0 : next_after_fail732:;
2739 : : }
2740 : : return NULL_TREE;
2741 : : }
2742 : :
2743 : : tree
2744 : 3 : generic_simplify_326 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2745 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2746 : : const combined_fn ARG_UNUSED (TANH),
2747 : : const combined_fn ARG_UNUSED (SINH),
2748 : : const combined_fn ARG_UNUSED (COSH))
2749 : : {
2750 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2751 : 3 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
2752 : : )
2753 : : {
2754 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail740;
2755 : 3 : {
2756 : 3 : tree res_op0;
2757 : 3 : res_op0 = build_one_cst (type);
2758 : 3 : tree res_op1;
2759 : 3 : {
2760 : 3 : tree _o1[1], _r1;
2761 : 3 : _o1[0] = captures[1];
2762 : 3 : _r1 = maybe_build_call_expr_loc (loc, COSH, TREE_TYPE (_o1[0]), 1, _o1[0]);
2763 : 3 : if (!_r1)
2764 : 0 : goto next_after_fail740;
2765 : 3 : res_op1 = _r1;
2766 : : }
2767 : 3 : tree _r;
2768 : 3 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
2769 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 539, __FILE__, __LINE__, true);
2770 : 3 : return _r;
2771 : : }
2772 : : next_after_fail740:;
2773 : : }
2774 : : return NULL_TREE;
2775 : : }
2776 : :
2777 : : tree
2778 : 18972 : generic_simplify_333 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2779 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2780 : : const enum tree_code ARG_UNUSED (cmp))
2781 : : {
2782 : 18972 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2783 : 37944 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2784 : 37883 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
2785 : : )
2786 : : {
2787 : 15617 : if (tree_expr_nonnegative_p (captures[1]) && tree_expr_nonzero_p (captures[1])
2788 : : )
2789 : : {
2790 : 11931 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail748;
2791 : 11931 : {
2792 : 11931 : tree res_op0;
2793 : 11931 : res_op0 = captures[0];
2794 : 11931 : tree res_op1;
2795 : 11931 : res_op1 = captures[2];
2796 : 11931 : tree _r;
2797 : 11931 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2798 : 11931 : if (TREE_SIDE_EFFECTS (captures[1]))
2799 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2800 : 11931 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 547, __FILE__, __LINE__, true);
2801 : 11931 : return _r;
2802 : : }
2803 : 0 : next_after_fail748:;
2804 : : }
2805 : : else
2806 : : {
2807 : 3686 : if (TREE_CODE (captures[1]) == INTEGER_CST
2808 : 3686 : && wi::neg_p (wi::to_wide (captures[1]), TYPE_SIGN (TREE_TYPE (captures[1])))
2809 : : )
2810 : : {
2811 : 1187 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail749;
2812 : 1187 : {
2813 : 1187 : tree res_op0;
2814 : 1187 : res_op0 = captures[2];
2815 : 1187 : tree res_op1;
2816 : 1187 : res_op1 = captures[0];
2817 : 1187 : tree _r;
2818 : 1187 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2819 : 1187 : if (TREE_SIDE_EFFECTS (captures[1]))
2820 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2821 : 1187 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 548, __FILE__, __LINE__, true);
2822 : 1187 : return _r;
2823 : : }
2824 : 0 : next_after_fail749:;
2825 : : }
2826 : : }
2827 : : }
2828 : : return NULL_TREE;
2829 : : }
2830 : :
2831 : : tree
2832 : 1037083 : generic_simplify_346 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2833 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2834 : : const enum tree_code ARG_UNUSED (cmp))
2835 : : {
2836 : 1037083 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2837 : 2074166 : if ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2838 : 376 : || POINTER_TYPE_P (TREE_TYPE (captures[2]))
2839 : 5 : || VECTOR_INTEGER_TYPE_P (TREE_TYPE (captures[2])))
2840 : 2074166 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
2841 : : )
2842 : : {
2843 : 837091 : {
2844 : 837091 : tree cst = uniform_integer_cst_p (captures[2]);
2845 : 837091 : tree arg1_type = TREE_TYPE (cst);
2846 : 837091 : unsigned int prec = TYPE_PRECISION (arg1_type);
2847 : 837091 : wide_int max = wi::max_value (arg1_type);
2848 : 837091 : wide_int signed_max = wi::max_value (prec, SIGNED);
2849 : 837091 : wide_int min = wi::min_value (arg1_type);
2850 : 837091 : if (wi::to_wide (cst) == max
2851 : : )
2852 : : {
2853 : 3448 : if (cmp == GT_EXPR
2854 : : )
2855 : : {
2856 : 3200 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail765;
2857 : 3200 : {
2858 : 3200 : tree _r;
2859 : 3200 : _r = constant_boolean_node (false, type);
2860 : 3200 : if (TREE_SIDE_EFFECTS (captures[1]))
2861 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2862 : 3200 : if (TREE_SIDE_EFFECTS (captures[2]))
2863 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2864 : 3200 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 564, __FILE__, __LINE__, true);
2865 : 3200 : return _r;
2866 : : }
2867 : 0 : next_after_fail765:;
2868 : : }
2869 : : else
2870 : : {
2871 : 248 : if (cmp == GE_EXPR
2872 : : )
2873 : : {
2874 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail766;
2875 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail766;
2876 : 0 : {
2877 : 0 : tree res_op0;
2878 : 0 : res_op0 = captures[0];
2879 : 0 : tree res_op1;
2880 : 0 : res_op1 = captures[2];
2881 : 0 : tree _r;
2882 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
2883 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 565, __FILE__, __LINE__, true);
2884 : 0 : return _r;
2885 : : }
2886 : 776293 : next_after_fail766:;
2887 : : }
2888 : : else
2889 : : {
2890 : 248 : if (cmp == LE_EXPR
2891 : : )
2892 : : {
2893 : 248 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail767;
2894 : 248 : {
2895 : 248 : tree _r;
2896 : 248 : _r = constant_boolean_node (true, type);
2897 : 248 : if (TREE_SIDE_EFFECTS (captures[1]))
2898 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2899 : 248 : if (TREE_SIDE_EFFECTS (captures[2]))
2900 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2901 : 248 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 566, __FILE__, __LINE__, true);
2902 : 248 : return _r;
2903 : : }
2904 : 0 : next_after_fail767:;
2905 : : }
2906 : : else
2907 : : {
2908 : 0 : if (cmp == LT_EXPR
2909 : : )
2910 : : {
2911 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail768;
2912 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail768;
2913 : 0 : {
2914 : 0 : tree res_op0;
2915 : 0 : res_op0 = captures[0];
2916 : 0 : tree res_op1;
2917 : 0 : res_op1 = captures[2];
2918 : 0 : tree _r;
2919 : 0 : _r = fold_build2_loc (loc, NE_EXPR, type, res_op0, res_op1);
2920 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 567, __FILE__, __LINE__, true);
2921 : 0 : return _r;
2922 : : }
2923 : 776293 : next_after_fail768:;
2924 : : }
2925 : : }
2926 : : }
2927 : : }
2928 : : }
2929 : : else
2930 : : {
2931 : 833643 : if (wi::to_wide (cst) == min
2932 : : )
2933 : : {
2934 : 51905 : if (cmp == LT_EXPR
2935 : : )
2936 : : {
2937 : 2238 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail769;
2938 : 2238 : {
2939 : 2238 : tree _r;
2940 : 2238 : _r = constant_boolean_node (false, type);
2941 : 2238 : if (TREE_SIDE_EFFECTS (captures[1]))
2942 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2943 : 2238 : if (TREE_SIDE_EFFECTS (captures[2]))
2944 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2945 : 2238 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 568, __FILE__, __LINE__, true);
2946 : 2238 : return _r;
2947 : : }
2948 : 0 : next_after_fail769:;
2949 : : }
2950 : : else
2951 : : {
2952 : 49667 : if (cmp == LE_EXPR
2953 : : )
2954 : : {
2955 : 12851 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail770;
2956 : 11775 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail770;
2957 : 11775 : {
2958 : 11775 : tree res_op0;
2959 : 11775 : res_op0 = captures[0];
2960 : 11775 : tree res_op1;
2961 : 11775 : res_op1 = captures[2];
2962 : 11775 : tree _r;
2963 : 11775 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
2964 : 11775 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 569, __FILE__, __LINE__, true);
2965 : 11775 : return _r;
2966 : : }
2967 : 776293 : next_after_fail770:;
2968 : : }
2969 : : else
2970 : : {
2971 : 36816 : if (cmp == GE_EXPR
2972 : : )
2973 : : {
2974 : 8676 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail771;
2975 : 8676 : {
2976 : 8676 : tree _r;
2977 : 8676 : _r = constant_boolean_node (true, type);
2978 : 8676 : if (TREE_SIDE_EFFECTS (captures[1]))
2979 : 15 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2980 : 8676 : if (TREE_SIDE_EFFECTS (captures[2]))
2981 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2982 : 8676 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 570, __FILE__, __LINE__, true);
2983 : 8676 : return _r;
2984 : : }
2985 : 0 : next_after_fail771:;
2986 : : }
2987 : : else
2988 : : {
2989 : 28140 : if (cmp == GT_EXPR
2990 : : )
2991 : : {
2992 : 28140 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail772;
2993 : 22760 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail772;
2994 : 22760 : {
2995 : 22760 : tree res_op0;
2996 : 22760 : res_op0 = captures[0];
2997 : 22760 : tree res_op1;
2998 : 22760 : res_op1 = captures[2];
2999 : 22760 : tree _r;
3000 : 22760 : _r = fold_build2_loc (loc, NE_EXPR, type, res_op0, res_op1);
3001 : 22760 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 571, __FILE__, __LINE__, true);
3002 : 22760 : return _r;
3003 : : }
3004 : 776293 : next_after_fail772:;
3005 : : }
3006 : : }
3007 : : }
3008 : : }
3009 : : }
3010 : : else
3011 : : {
3012 : 781738 : if (wi::to_wide (cst) == max - 1
3013 : : )
3014 : : {
3015 : 7022 : if (cmp == GT_EXPR
3016 : : )
3017 : : {
3018 : 1328 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail773;
3019 : 1328 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail773;
3020 : 1328 : {
3021 : 1328 : tree res_op0;
3022 : 1328 : res_op0 = captures[0];
3023 : 1328 : tree res_op1;
3024 : 1328 : res_op1 = build_uniform_cst (TREE_TYPE (captures[2]),
3025 : 1328 : wide_int_to_tree (TREE_TYPE (cst),
3026 : 1328 : wi::to_wide (cst)
3027 : 2656 : + 1));
3028 : 1328 : tree _r;
3029 : 1328 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
3030 : 1328 : if (TREE_SIDE_EFFECTS (captures[2]))
3031 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3032 : 1328 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 572, __FILE__, __LINE__, true);
3033 : 1328 : return _r;
3034 : : }
3035 : 776293 : next_after_fail773:;
3036 : : }
3037 : : else
3038 : : {
3039 : 5694 : if (cmp == LE_EXPR
3040 : : )
3041 : : {
3042 : 5694 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail774;
3043 : 5694 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail774;
3044 : 5694 : {
3045 : 5694 : tree res_op0;
3046 : 5694 : res_op0 = captures[0];
3047 : 5694 : tree res_op1;
3048 : 5694 : res_op1 = build_uniform_cst (TREE_TYPE (captures[2]),
3049 : 5694 : wide_int_to_tree (TREE_TYPE (cst),
3050 : 5694 : wi::to_wide (cst)
3051 : 11388 : + 1));
3052 : 5694 : tree _r;
3053 : 5694 : _r = fold_build2_loc (loc, NE_EXPR, type, res_op0, res_op1);
3054 : 5694 : if (TREE_SIDE_EFFECTS (captures[2]))
3055 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3056 : 5694 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 573, __FILE__, __LINE__, true);
3057 : 5694 : return _r;
3058 : : }
3059 : 776293 : next_after_fail774:;
3060 : : }
3061 : : }
3062 : : }
3063 : : else
3064 : : {
3065 : 774716 : if (wi::to_wide (cst) == min + 1
3066 : : )
3067 : : {
3068 : 45308 : if (cmp == GE_EXPR
3069 : : )
3070 : : {
3071 : 2278 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail775;
3072 : 2278 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail775;
3073 : 2278 : {
3074 : 2278 : tree res_op0;
3075 : 2278 : res_op0 = captures[0];
3076 : 2278 : tree res_op1;
3077 : 2278 : res_op1 = build_uniform_cst (TREE_TYPE (captures[2]),
3078 : 2278 : wide_int_to_tree (TREE_TYPE (cst),
3079 : 2278 : wi::to_wide (cst)
3080 : 4556 : - 1));
3081 : 2278 : tree _r;
3082 : 2278 : _r = fold_build2_loc (loc, NE_EXPR, type, res_op0, res_op1);
3083 : 2278 : if (TREE_SIDE_EFFECTS (captures[2]))
3084 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3085 : 2278 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 574, __FILE__, __LINE__, true);
3086 : 2278 : return _r;
3087 : : }
3088 : 776293 : next_after_fail775:;
3089 : : }
3090 : : else
3091 : : {
3092 : 43030 : if (cmp == LT_EXPR
3093 : : )
3094 : : {
3095 : 275 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail776;
3096 : 275 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail776;
3097 : 275 : {
3098 : 275 : tree res_op0;
3099 : 275 : res_op0 = captures[0];
3100 : 275 : tree res_op1;
3101 : 275 : res_op1 = build_uniform_cst (TREE_TYPE (captures[2]),
3102 : 275 : wide_int_to_tree (TREE_TYPE (cst),
3103 : 275 : wi::to_wide (cst)
3104 : 550 : - 1));
3105 : 275 : tree _r;
3106 : 275 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
3107 : 275 : if (TREE_SIDE_EFFECTS (captures[2]))
3108 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3109 : 275 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 575, __FILE__, __LINE__, true);
3110 : 275 : return _r;
3111 : : }
3112 : 776293 : next_after_fail776:;
3113 : : }
3114 : : }
3115 : : }
3116 : : else
3117 : : {
3118 : 729408 : if (wi::to_wide (cst) == signed_max
3119 : 2326 : && TYPE_UNSIGNED (arg1_type)
3120 : 2326 : && TYPE_MODE (arg1_type) != BLKmode
3121 : 729408 : && prec == GET_MODE_PRECISION (SCALAR_INT_TYPE_MODE (arg1_type))
3122 : 731734 : && INTEGRAL_TYPE_P (arg1_type)
3123 : : )
3124 : : {
3125 : 2326 : if (cmp == LE_EXPR || cmp == GT_EXPR
3126 : : )
3127 : : {
3128 : 2326 : {
3129 : 2326 : tree st = signed_type_for (TREE_TYPE (captures[2]));
3130 : 2326 : if (cst == captures[2] && cmp == LE_EXPR
3131 : : )
3132 : : {
3133 : 2283 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail777;
3134 : 2283 : {
3135 : 2283 : tree res_op0;
3136 : 2283 : {
3137 : 2283 : tree _o1[1], _r1;
3138 : 2283 : _o1[0] = captures[1];
3139 : 2283 : if (TREE_TYPE (_o1[0]) != st)
3140 : : {
3141 : 2279 : _r1 = fold_build1_loc (loc, NOP_EXPR, st, _o1[0]);
3142 : : }
3143 : : else
3144 : : _r1 = _o1[0];
3145 : 2283 : res_op0 = _r1;
3146 : : }
3147 : 2283 : tree res_op1;
3148 : 2283 : res_op1 = build_zero_cst (st);
3149 : 2283 : tree _r;
3150 : 2283 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
3151 : 2283 : if (TREE_SIDE_EFFECTS (captures[2]))
3152 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3153 : 2283 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 576, __FILE__, __LINE__, true);
3154 : 2283 : return _r;
3155 : : }
3156 : 0 : next_after_fail777:;
3157 : 0 : }
3158 : : else
3159 : : {
3160 : 43 : if (cst == captures[2] && cmp == GT_EXPR
3161 : : )
3162 : : {
3163 : 43 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail778;
3164 : 43 : {
3165 : 43 : tree res_op0;
3166 : 43 : {
3167 : 43 : tree _o1[1], _r1;
3168 : 43 : _o1[0] = captures[1];
3169 : 43 : if (TREE_TYPE (_o1[0]) != st)
3170 : : {
3171 : 43 : _r1 = fold_build1_loc (loc, NOP_EXPR, st, _o1[0]);
3172 : : }
3173 : : else
3174 : : _r1 = _o1[0];
3175 : 43 : res_op0 = _r1;
3176 : : }
3177 : 43 : tree res_op1;
3178 : 43 : res_op1 = build_zero_cst (st);
3179 : 43 : tree _r;
3180 : 43 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3181 : 43 : if (TREE_SIDE_EFFECTS (captures[2]))
3182 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3183 : 43 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 577, __FILE__, __LINE__, true);
3184 : 43 : return _r;
3185 : : }
3186 : 0 : next_after_fail778:;
3187 : 0 : }
3188 : : else
3189 : : {
3190 : 0 : if (cmp == LE_EXPR
3191 : : )
3192 : : {
3193 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail779;
3194 : 0 : {
3195 : 0 : tree res_op0;
3196 : 0 : {
3197 : 0 : tree _o1[1], _r1;
3198 : 0 : _o1[0] = captures[1];
3199 : 0 : if (TREE_TYPE (_o1[0]) != st)
3200 : : {
3201 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, st, _o1[0]);
3202 : : }
3203 : : else
3204 : : _r1 = _o1[0];
3205 : 0 : res_op0 = _r1;
3206 : : }
3207 : 0 : tree res_op1;
3208 : 0 : res_op1 = build_zero_cst (st);
3209 : 0 : tree _r;
3210 : 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
3211 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
3212 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3213 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 578, __FILE__, __LINE__, true);
3214 : 0 : return _r;
3215 : : }
3216 : 0 : next_after_fail779:;
3217 : : }
3218 : : else
3219 : : {
3220 : 0 : if (cmp == GT_EXPR
3221 : : )
3222 : : {
3223 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail780;
3224 : 0 : {
3225 : 0 : tree res_op0;
3226 : 0 : {
3227 : 0 : tree _o1[1], _r1;
3228 : 0 : _o1[0] = captures[1];
3229 : 0 : if (TREE_TYPE (_o1[0]) != st)
3230 : : {
3231 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, st, _o1[0]);
3232 : : }
3233 : : else
3234 : : _r1 = _o1[0];
3235 : 0 : res_op0 = _r1;
3236 : : }
3237 : 0 : tree res_op1;
3238 : 0 : res_op1 = build_zero_cst (st);
3239 : 0 : tree _r;
3240 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3241 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
3242 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3243 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 579, __FILE__, __LINE__, true);
3244 : 0 : return _r;
3245 : : }
3246 : 0 : next_after_fail780:;
3247 : : }
3248 : : }
3249 : : }
3250 : : }
3251 : : }
3252 : : }
3253 : : }
3254 : : }
3255 : : }
3256 : : }
3257 : : }
3258 : 837091 : }
3259 : : }
3260 : : return NULL_TREE;
3261 : : }
3262 : :
3263 : : tree
3264 : 0 : generic_simplify_397 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3265 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3266 : : const combined_fn ARG_UNUSED (copysigns),
3267 : : const combined_fn ARG_UNUSED (hypots))
3268 : : {
3269 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3270 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail877;
3271 : 0 : {
3272 : 0 : tree res_op0;
3273 : 0 : res_op0 = captures[0];
3274 : 0 : tree res_op1;
3275 : 0 : res_op1 = captures[2];
3276 : 0 : tree _r;
3277 : 0 : _r = maybe_build_call_expr_loc (loc, hypots, type, 2, res_op0, res_op1);
3278 : 0 : if (!_r)
3279 : 0 : goto next_after_fail877;
3280 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3281 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3282 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 641, __FILE__, __LINE__, true);
3283 : : return _r;
3284 : : }
3285 : : next_after_fail877:;
3286 : : return NULL_TREE;
3287 : : }
3288 : :
3289 : : tree
3290 : 8 : generic_simplify_402 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3291 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3292 : : {
3293 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3294 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3295 : 16 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
3296 : : )
3297 : : {
3298 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail882;
3299 : 0 : {
3300 : 0 : tree res_op0;
3301 : 0 : res_op0 = captures[0];
3302 : 0 : tree res_op1;
3303 : 0 : res_op1 = captures[1];
3304 : 0 : tree _r;
3305 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
3306 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 646, __FILE__, __LINE__, true);
3307 : 0 : return _r;
3308 : : }
3309 : 0 : next_after_fail882:;
3310 : : }
3311 : : return NULL_TREE;
3312 : : }
3313 : :
3314 : : tree
3315 : 0 : generic_simplify_408 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3316 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3317 : : {
3318 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3319 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail888;
3320 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail888;
3321 : 0 : {
3322 : 0 : tree res_op0;
3323 : 0 : res_op0 = captures[0];
3324 : 0 : tree res_op1;
3325 : 0 : {
3326 : 0 : tree _o1[1], _r1;
3327 : 0 : _o1[0] = captures[5];
3328 : 0 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3329 : 0 : res_op1 = _r1;
3330 : : }
3331 : 0 : tree _r;
3332 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
3333 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 651, __FILE__, __LINE__, true);
3334 : : return _r;
3335 : : }
3336 : : next_after_fail888:;
3337 : : return NULL_TREE;
3338 : : }
3339 : :
3340 : : tree
3341 : 2 : generic_simplify_416 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3342 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3343 : : {
3344 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3345 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail896;
3346 : 2 : {
3347 : 2 : tree res_op0;
3348 : 2 : {
3349 : 2 : tree _o1[2], _r1;
3350 : 2 : _o1[0] = captures[1];
3351 : 2 : _o1[1] = captures[2];
3352 : 2 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3353 : 2 : res_op0 = _r1;
3354 : : }
3355 : 2 : tree _r;
3356 : 2 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
3357 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 659, __FILE__, __LINE__, true);
3358 : : return _r;
3359 : : }
3360 : 0 : next_after_fail896:;
3361 : 0 : return NULL_TREE;
3362 : : }
3363 : :
3364 : : tree
3365 : 0 : generic_simplify_419 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3366 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3367 : : const enum tree_code ARG_UNUSED (cmp))
3368 : : {
3369 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3370 : 0 : if (!canonicalize_math_p ()
3371 : : )
3372 : : {
3373 : 0 : if (INTEGRAL_TYPE_P (type)
3374 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3375 : : )
3376 : : {
3377 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail899;
3378 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail899;
3379 : 0 : {
3380 : 0 : tree res_op0;
3381 : 0 : res_op0 = captures[0];
3382 : 0 : tree res_op1;
3383 : 0 : res_op1 = captures[3];
3384 : 0 : tree res_op2;
3385 : 0 : res_op2 = build_zero_cst (type);
3386 : 0 : tree _r;
3387 : 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
3388 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 662, __FILE__, __LINE__, true);
3389 : 0 : return _r;
3390 : : }
3391 : : next_after_fail899:;
3392 : : }
3393 : : }
3394 : : return NULL_TREE;
3395 : : }
3396 : :
3397 : : tree
3398 : 0 : generic_simplify_428 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3399 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3400 : : const enum tree_code ARG_UNUSED (code2),
3401 : : const enum tree_code ARG_UNUSED (code1))
3402 : : {
3403 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3404 : 0 : if ((TREE_CODE (captures[2]) == INTEGER_CST
3405 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
3406 : 0 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
3407 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
3408 : 0 : && bitwise_equal_p (captures[2], captures[5]))
3409 : : )
3410 : : {
3411 : 0 : {
3412 : 0 : bool one_before = false;
3413 : 0 : bool one_after = false;
3414 : 0 : int cmp = 0;
3415 : 0 : bool allbits = true;
3416 : 0 : if (TREE_CODE (captures[2]) == INTEGER_CST
3417 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
3418 : : {
3419 : 0 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
3420 : 0 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
3421 : 0 : auto t2 = wi::to_wide (captures[5]);
3422 : 0 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
3423 : 0 : if (cmp < 0
3424 : 0 : && t1 == t2 - 1)
3425 : : one_before = true;
3426 : 0 : if (cmp > 0
3427 : 0 : && t1 == t2 + 1)
3428 : : one_after = true;
3429 : : }
3430 : 0 : bool val;
3431 : 0 : switch (code2)
3432 : : {
3433 : 0 : case EQ_EXPR: val = (cmp == 0); break;
3434 : 0 : case NE_EXPR: val = (cmp != 0); break;
3435 : 0 : case LT_EXPR: val = (cmp < 0); break;
3436 : 0 : case GT_EXPR: val = (cmp > 0); break;
3437 : 0 : case LE_EXPR: val = (cmp <= 0); break;
3438 : 0 : case GE_EXPR: val = (cmp >= 0); break;
3439 : 0 : default: gcc_unreachable ();
3440 : : }
3441 : 0 : if (code1 == EQ_EXPR && val
3442 : : )
3443 : : {
3444 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail915;
3445 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail915;
3446 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail915;
3447 : 0 : {
3448 : 0 : tree _r;
3449 : 0 : _r = captures[0];
3450 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 674, __FILE__, __LINE__, true);
3451 : 0 : return _r;
3452 : : }
3453 : : next_after_fail915:;
3454 : : }
3455 : : else
3456 : : {
3457 : 0 : if (code1 == EQ_EXPR && !val
3458 : : )
3459 : : {
3460 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail916;
3461 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail916;
3462 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail916;
3463 : 0 : {
3464 : 0 : tree _r;
3465 : 0 : _r = constant_boolean_node (false, type);
3466 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3467 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3468 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 675, __FILE__, __LINE__, true);
3469 : 0 : return _r;
3470 : : }
3471 : : next_after_fail916:;
3472 : : }
3473 : : else
3474 : : {
3475 : 0 : if (code1 == NE_EXPR && !val && allbits
3476 : : )
3477 : : {
3478 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail917;
3479 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail917;
3480 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail917;
3481 : 0 : {
3482 : 0 : tree _r;
3483 : 0 : _r = captures[3];
3484 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 676, __FILE__, __LINE__, true);
3485 : 0 : return _r;
3486 : : }
3487 : : next_after_fail917:;
3488 : : }
3489 : : else
3490 : : {
3491 : 0 : if (code1 == NE_EXPR
3492 : 0 : && code2 == GE_EXPR
3493 : 0 : && cmp == 0
3494 : 0 : && allbits
3495 : : )
3496 : : {
3497 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail918;
3498 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail918;
3499 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail918;
3500 : 0 : {
3501 : 0 : tree res_op0;
3502 : 0 : res_op0 = captures[4];
3503 : 0 : tree res_op1;
3504 : 0 : {
3505 : 0 : tree _o1[1], _r1;
3506 : 0 : _o1[0] = captures[2];
3507 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3508 : : {
3509 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3510 : : }
3511 : : else
3512 : : _r1 = _o1[0];
3513 : 0 : res_op1 = _r1;
3514 : : }
3515 : 0 : tree _r;
3516 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3517 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 677, __FILE__, __LINE__, true);
3518 : 0 : return _r;
3519 : : }
3520 : : next_after_fail918:;
3521 : : }
3522 : : else
3523 : : {
3524 : 0 : if (code1 == NE_EXPR
3525 : 0 : && code2 == LE_EXPR
3526 : 0 : && cmp == 0
3527 : 0 : && allbits
3528 : : )
3529 : : {
3530 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail919;
3531 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail919;
3532 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail919;
3533 : 0 : {
3534 : 0 : tree res_op0;
3535 : 0 : res_op0 = captures[4];
3536 : 0 : tree res_op1;
3537 : 0 : {
3538 : 0 : tree _o1[1], _r1;
3539 : 0 : _o1[0] = captures[2];
3540 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3541 : : {
3542 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3543 : : }
3544 : : else
3545 : : _r1 = _o1[0];
3546 : 0 : res_op1 = _r1;
3547 : : }
3548 : 0 : tree _r;
3549 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3550 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 678, __FILE__, __LINE__, true);
3551 : 0 : return _r;
3552 : : }
3553 : : next_after_fail919:;
3554 : : }
3555 : : else
3556 : : {
3557 : 0 : if (code1 == NE_EXPR
3558 : 0 : && code2 == GT_EXPR
3559 : : && one_after
3560 : 0 : && allbits
3561 : : )
3562 : : {
3563 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail920;
3564 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail920;
3565 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail920;
3566 : 0 : {
3567 : 0 : tree res_op0;
3568 : 0 : res_op0 = captures[4];
3569 : 0 : tree res_op1;
3570 : 0 : {
3571 : 0 : tree _o1[1], _r1;
3572 : 0 : _o1[0] = captures[2];
3573 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3574 : : {
3575 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3576 : : }
3577 : : else
3578 : : _r1 = _o1[0];
3579 : 0 : res_op1 = _r1;
3580 : : }
3581 : 0 : tree _r;
3582 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3583 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 679, __FILE__, __LINE__, true);
3584 : 0 : return _r;
3585 : : }
3586 : : next_after_fail920:;
3587 : : }
3588 : : else
3589 : : {
3590 : 0 : if (code1 == NE_EXPR
3591 : 0 : && code2 == LT_EXPR
3592 : : && one_before
3593 : 0 : && allbits
3594 : : )
3595 : : {
3596 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail921;
3597 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail921;
3598 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail921;
3599 : 0 : {
3600 : 0 : tree res_op0;
3601 : 0 : res_op0 = captures[4];
3602 : 0 : tree res_op1;
3603 : 0 : {
3604 : 0 : tree _o1[1], _r1;
3605 : 0 : _o1[0] = captures[2];
3606 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3607 : : {
3608 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3609 : : }
3610 : : else
3611 : : _r1 = _o1[0];
3612 : 0 : res_op1 = _r1;
3613 : : }
3614 : 0 : tree _r;
3615 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3616 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 680, __FILE__, __LINE__, true);
3617 : 0 : return _r;
3618 : : }
3619 : : next_after_fail921:;
3620 : : }
3621 : : }
3622 : : }
3623 : : }
3624 : : }
3625 : : }
3626 : : }
3627 : : }
3628 : : }
3629 : : return NULL_TREE;
3630 : : }
3631 : :
3632 : : tree
3633 : 0 : generic_simplify_456 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3634 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3635 : : {
3636 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3637 : 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
3638 : : )
3639 : : {
3640 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail980;
3641 : 0 : {
3642 : 0 : tree res_op0;
3643 : 0 : {
3644 : 0 : tree _o1[2], _r1;
3645 : 0 : _o1[0] = captures[0];
3646 : 0 : _o1[1] = captures[1];
3647 : 0 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3648 : 0 : res_op0 = _r1;
3649 : : }
3650 : 0 : tree _r;
3651 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3652 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 704, __FILE__, __LINE__, true);
3653 : 0 : return _r;
3654 : : }
3655 : 0 : next_after_fail980:;
3656 : : }
3657 : : return NULL_TREE;
3658 : : }
3659 : :
3660 : : tree
3661 : 2 : generic_simplify_460 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3662 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3663 : : const enum tree_code ARG_UNUSED (rotate))
3664 : : {
3665 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3666 : 2 : if ((element_precision (TREE_TYPE (captures[2]))
3667 : 2 : <= element_precision (TREE_TYPE (captures[3]))
3668 : 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[3])))
3669 : 2 : && (element_precision (type) <= element_precision (TREE_TYPE (captures[2]))
3670 : 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[2])))
3671 : : )
3672 : : {
3673 : 2 : {
3674 : 2 : tree rotate_type = TREE_TYPE (captures[2]);
3675 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail984;
3676 : 2 : {
3677 : 2 : tree res_op0;
3678 : 2 : {
3679 : 2 : tree _o1[2], _r1;
3680 : 2 : {
3681 : 2 : tree _o2[1], _r2;
3682 : 2 : _o2[0] = captures[3];
3683 : 2 : if (TREE_TYPE (_o2[0]) != rotate_type)
3684 : : {
3685 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, rotate_type, _o2[0]);
3686 : : }
3687 : : else
3688 : : _r2 = _o2[0];
3689 : 2 : _o1[0] = _r2;
3690 : : }
3691 : 2 : _o1[1] = captures[4];
3692 : 2 : _r1 = fold_build2_loc (loc, rotate, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3693 : 2 : res_op0 = _r1;
3694 : : }
3695 : 2 : tree _r;
3696 : 2 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3697 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 705, __FILE__, __LINE__, true);
3698 : 2 : return _r;
3699 : : }
3700 : 0 : next_after_fail984:;
3701 : : }
3702 : : }
3703 : : return NULL_TREE;
3704 : : }
3705 : :
3706 : : tree
3707 : 8 : generic_simplify_470 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3708 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3709 : : const enum tree_code ARG_UNUSED (op))
3710 : : {
3711 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3712 : 8 : if (INTEGRAL_TYPE_P (type)
3713 : 8 : && TYPE_PRECISION (type) > 1
3714 : 16 : && (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])))
3715 : : )
3716 : : {
3717 : 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail996;
3718 : 8 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail996;
3719 : 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail996;
3720 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail996;
3721 : 8 : {
3722 : 8 : tree res_op0;
3723 : 8 : {
3724 : 8 : tree _o1[2], _r1;
3725 : 8 : {
3726 : 8 : tree _o2[1], _r2;
3727 : 8 : _o2[0] = captures[0];
3728 : 8 : if (TREE_TYPE (_o2[0]) != type)
3729 : : {
3730 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
3731 : : }
3732 : : else
3733 : : _r2 = _o2[0];
3734 : 8 : _o1[0] = _r2;
3735 : : }
3736 : 8 : _o1[1] = captures[1];
3737 : 8 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3738 : 8 : res_op0 = _r1;
3739 : : }
3740 : 8 : tree res_op1;
3741 : 8 : res_op1 = captures[2];
3742 : 8 : tree _r;
3743 : 8 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
3744 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 717, __FILE__, __LINE__, true);
3745 : 8 : return _r;
3746 : : }
3747 : : next_after_fail996:;
3748 : : }
3749 : : return NULL_TREE;
3750 : : }
3751 : :
3752 : : tree
3753 : 0 : generic_simplify_485 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3754 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3755 : : const enum tree_code ARG_UNUSED (op))
3756 : : {
3757 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3758 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1016;
3759 : 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1016;
3760 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1016;
3761 : 0 : {
3762 : 0 : tree _r;
3763 : 0 : _r = captures[2];
3764 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 737, __FILE__, __LINE__, true);
3765 : : return _r;
3766 : : }
3767 : : next_after_fail1016:;
3768 : : return NULL_TREE;
3769 : : }
3770 : :
3771 : : tree
3772 : 0 : generic_simplify_490 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3773 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3774 : : const enum tree_code ARG_UNUSED (cmp))
3775 : : {
3776 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3777 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1022;
3778 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1022;
3779 : 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1022;
3780 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1022;
3781 : 0 : {
3782 : 0 : tree _r;
3783 : 0 : _r = captures[0];
3784 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 743, __FILE__, __LINE__, true);
3785 : : return _r;
3786 : : }
3787 : : next_after_fail1022:;
3788 : : return NULL_TREE;
3789 : : }
3790 : :
3791 : : tree
3792 : 17 : generic_simplify_495 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3793 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3794 : : const enum tree_code ARG_UNUSED (cmp))
3795 : : {
3796 : 17 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3797 : 17 : if (INTEGRAL_TYPE_P (type)
3798 : 17 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3799 : 17 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3800 : 34 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == TYPE_PRECISION (type)
3801 : : )
3802 : : {
3803 : 17 : {
3804 : 17 : tree shifter = build_int_cst (integer_type_node, TYPE_PRECISION (type) - 1);
3805 : 17 : if (cmp == GE_EXPR
3806 : : )
3807 : : {
3808 : 9 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1028;
3809 : 9 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1028;
3810 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1028;
3811 : 9 : {
3812 : 9 : tree res_op0;
3813 : 9 : {
3814 : 9 : tree _o1[1], _r1;
3815 : 9 : {
3816 : 9 : tree _o2[2], _r2;
3817 : 9 : _o2[0] = captures[0];
3818 : 9 : _o2[1] = shifter;
3819 : 9 : _r2 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3820 : 9 : _o1[0] = _r2;
3821 : : }
3822 : 9 : if (TREE_TYPE (_o1[0]) != type)
3823 : : {
3824 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3825 : : }
3826 : : else
3827 : : _r1 = _o1[0];
3828 : 9 : res_op0 = _r1;
3829 : : }
3830 : 9 : tree res_op1;
3831 : 9 : res_op1 = captures[1];
3832 : 9 : tree _r;
3833 : 9 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
3834 : 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 748, __FILE__, __LINE__, true);
3835 : 9 : return _r;
3836 : : }
3837 : : next_after_fail1028:;
3838 : : }
3839 : : else
3840 : : {
3841 : 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1029;
3842 : 8 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1029;
3843 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1029;
3844 : 8 : {
3845 : 8 : tree res_op0;
3846 : 8 : {
3847 : 8 : tree _o1[2], _r1;
3848 : 8 : {
3849 : 8 : tree _o2[1], _r2;
3850 : 8 : {
3851 : 8 : tree _o3[2], _r3;
3852 : 8 : _o3[0] = captures[0];
3853 : 8 : _o3[1] = shifter;
3854 : 8 : _r3 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
3855 : 8 : _o2[0] = _r3;
3856 : : }
3857 : 8 : if (TREE_TYPE (_o2[0]) != type)
3858 : : {
3859 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
3860 : : }
3861 : : else
3862 : : _r2 = _o2[0];
3863 : 8 : _o1[0] = _r2;
3864 : : }
3865 : 8 : _o1[1] = captures[1];
3866 : 8 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3867 : 8 : res_op0 = _r1;
3868 : : }
3869 : 8 : tree _r;
3870 : 8 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
3871 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 749, __FILE__, __LINE__, true);
3872 : 8 : return _r;
3873 : : }
3874 : : next_after_fail1029:;
3875 : : }
3876 : : }
3877 : : }
3878 : : return NULL_TREE;
3879 : : }
3880 : :
3881 : : tree
3882 : 0 : generic_simplify_512 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3883 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3884 : : const combined_fn ARG_UNUSED (FMAX_ALL))
3885 : : {
3886 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3887 : 0 : if (flag_finite_math_only
3888 : : )
3889 : : {
3890 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1058;
3891 : 0 : {
3892 : 0 : tree res_op0;
3893 : 0 : res_op0 = captures[0];
3894 : 0 : tree res_op1;
3895 : 0 : res_op1 = captures[1];
3896 : 0 : tree _r;
3897 : 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
3898 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 765, __FILE__, __LINE__, true);
3899 : 0 : return _r;
3900 : : }
3901 : 0 : next_after_fail1058:;
3902 : : }
3903 : : return NULL_TREE;
3904 : : }
3905 : :
3906 : : tree
3907 : 12 : generic_simplify_522 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3908 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3909 : : const enum tree_code ARG_UNUSED (op))
3910 : : {
3911 : 12 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3912 : 12 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1071;
3913 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1071;
3914 : 12 : {
3915 : 12 : tree _r;
3916 : 12 : _r = captures[2];
3917 : 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 725, __FILE__, __LINE__, true);
3918 : : return _r;
3919 : : }
3920 : : next_after_fail1071:;
3921 : : return NULL_TREE;
3922 : : }
3923 : :
3924 : : tree
3925 : 0 : generic_simplify_528 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3926 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3927 : : const combined_fn ARG_UNUSED (cond_op))
3928 : : {
3929 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3930 : 0 : {
3931 : 0 : tree op_type = TREE_TYPE (captures[6]);
3932 : 0 : if (inverse_conditions_p (captures[0], captures[2])
3933 : 0 : && element_precision (type) == element_precision (op_type)
3934 : : )
3935 : : {
3936 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1077;
3937 : 0 : {
3938 : 0 : tree res_op0;
3939 : 0 : {
3940 : 0 : tree _o1[5], _r1;
3941 : 0 : _o1[0] = captures[2];
3942 : 0 : _o1[1] = captures[3];
3943 : 0 : _o1[2] = captures[4];
3944 : 0 : _o1[3] = captures[5];
3945 : 0 : {
3946 : 0 : tree _o2[1], _r2;
3947 : 0 : _o2[0] = captures[1];
3948 : 0 : if (TREE_TYPE (_o2[0]) != op_type)
3949 : : {
3950 : 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, op_type, _o2[0]);
3951 : : }
3952 : : else
3953 : : _r2 = _o2[0];
3954 : 0 : _o1[4] = _r2;
3955 : : }
3956 : 0 : _r1 = maybe_build_call_expr_loc (loc, cond_op, TREE_TYPE (_o1[1]), 5, _o1[0], _o1[1], _o1[2], _o1[3], _o1[4]);
3957 : 0 : if (!_r1)
3958 : 0 : goto next_after_fail1077;
3959 : 0 : res_op0 = _r1;
3960 : : }
3961 : 0 : tree _r;
3962 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
3963 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
3964 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
3965 : 0 : if (TREE_SIDE_EFFECTS (captures[6]))
3966 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[6]), _r);
3967 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 779, __FILE__, __LINE__, true);
3968 : 0 : return _r;
3969 : : }
3970 : : next_after_fail1077:;
3971 : : }
3972 : : }
3973 : : return NULL_TREE;
3974 : : }
3975 : :
3976 : : tree
3977 : 0 : generic_simplify_538 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3978 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3979 : : const combined_fn ARG_UNUSED (ovf))
3980 : : {
3981 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3982 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3983 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3984 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
3985 : 0 : && (!TYPE_UNSIGNED (TREE_TYPE (captures[0])) || TYPE_UNSIGNED (TREE_TYPE (captures[1])))
3986 : : )
3987 : : {
3988 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1087;
3989 : 0 : {
3990 : 0 : tree res_op0;
3991 : 0 : res_op0 = captures[1];
3992 : 0 : tree res_op1;
3993 : 0 : res_op1 = captures[2];
3994 : 0 : tree _r;
3995 : 0 : _r = maybe_build_call_expr_loc (loc, ovf, type, 2, res_op0, res_op1);
3996 : 0 : if (!_r)
3997 : 0 : goto next_after_fail1087;
3998 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 789, __FILE__, __LINE__, true);
3999 : 0 : return _r;
4000 : : }
4001 : : next_after_fail1087:;
4002 : : }
4003 : : return NULL_TREE;
4004 : : }
4005 : :
4006 : : tree
4007 : 0 : generic_simplify_548 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4008 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4009 : : const combined_fn ARG_UNUSED (froms),
4010 : : const combined_fn ARG_UNUSED (tos))
4011 : : {
4012 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4013 : 0 : if (optimize && canonicalize_math_p ()
4014 : 0 : && targetm.libc_has_function (function_c99_misc, NULL_TREE)
4015 : : )
4016 : : {
4017 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1097;
4018 : 0 : {
4019 : 0 : tree res_op0;
4020 : 0 : {
4021 : 0 : tree _o1[1], _r1;
4022 : 0 : _o1[0] = captures[0];
4023 : 0 : _r1 = maybe_build_call_expr_loc (loc, tos, TREE_TYPE (_o1[0]), 1, _o1[0]);
4024 : 0 : if (!_r1)
4025 : 0 : goto next_after_fail1097;
4026 : 0 : res_op0 = _r1;
4027 : : }
4028 : 0 : tree _r;
4029 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4030 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 799, __FILE__, __LINE__, true);
4031 : 0 : return _r;
4032 : : }
4033 : : next_after_fail1097:;
4034 : : }
4035 : : return NULL_TREE;
4036 : : }
4037 : :
4038 : : tree
4039 : 0 : generic_simplify_557 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4040 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4041 : : const combined_fn ARG_UNUSED (ifn),
4042 : : const combined_fn ARG_UNUSED (lfn),
4043 : : const combined_fn ARG_UNUSED (llfn))
4044 : : {
4045 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4046 : 0 : if (canonicalize_math_p ()
4047 : : )
4048 : : {
4049 : 0 : if (TYPE_PRECISION (integer_type_node)
4050 : 0 : == TYPE_PRECISION (long_integer_type_node)
4051 : : )
4052 : : {
4053 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1106;
4054 : 0 : {
4055 : 0 : tree res_op0;
4056 : 0 : res_op0 = captures[0];
4057 : 0 : tree _r;
4058 : 0 : _r = maybe_build_call_expr_loc (loc, lfn, type, 1, res_op0);
4059 : 0 : if (!_r)
4060 : 0 : goto next_after_fail1106;
4061 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 808, __FILE__, __LINE__, true);
4062 : 0 : return _r;
4063 : : }
4064 : : next_after_fail1106:;
4065 : : }
4066 : : }
4067 : : return NULL_TREE;
4068 : : }
4069 : :
4070 : : tree
4071 : 0 : generic_simplify_568 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4072 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
4073 : : {
4074 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4075 : 0 : if (canonicalize_math_after_vectorization_p ()
4076 : : )
4077 : : {
4078 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1117;
4079 : : {
4080 : : tree res_op0;
4081 : : res_op0 = captures[0];
4082 : : tree res_op1;
4083 : : res_op1 = captures[1];
4084 : : tree res_op2;
4085 : : res_op2 = captures[2];
4086 : : tree _r;
4087 : : _r = maybe_build_call_expr_loc (loc, CFN_FMS, type, 3, res_op0, res_op1, res_op2);
4088 : : if (!_r)
4089 : : goto next_after_fail1117;
4090 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 819, __FILE__, __LINE__, true);
4091 : : return _r;
4092 : : }
4093 : 0 : next_after_fail1117:;
4094 : : }
4095 : 0 : return NULL_TREE;
4096 : : }
4097 : :
4098 : : tree
4099 : 0 : generic_simplify_578 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4100 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4101 : : const enum tree_code ARG_UNUSED (rot),
4102 : : const combined_fn ARG_UNUSED (popcount))
4103 : : {
4104 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4105 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4106 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4107 : 0 : && (
4108 : :
4109 : 0 : || !TREE_SIDE_EFFECTS (captures[3]))
4110 : : )
4111 : : {
4112 : 0 : {
4113 : 0 : tree type0 = TREE_TYPE (captures[0]);
4114 : 0 : tree type1 = TREE_TYPE (captures[1]);
4115 : 0 : unsigned int prec0 = TYPE_PRECISION (type0);
4116 : 0 : unsigned int prec1 = TYPE_PRECISION (type1);
4117 : 0 : if (prec0 == prec1 || (prec0 > prec1 && TYPE_UNSIGNED (type1))
4118 : : )
4119 : : {
4120 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1127;
4121 : 0 : {
4122 : 0 : tree res_op0;
4123 : 0 : {
4124 : 0 : tree _o1[1], _r1;
4125 : 0 : _o1[0] = captures[2];
4126 : 0 : if (TREE_TYPE (_o1[0]) != type0)
4127 : : {
4128 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type0, _o1[0]);
4129 : : }
4130 : : else
4131 : : _r1 = _o1[0];
4132 : 0 : res_op0 = _r1;
4133 : : }
4134 : 0 : tree _r;
4135 : 0 : _r = maybe_build_call_expr_loc (loc, popcount, type, 1, res_op0);
4136 : 0 : if (!_r)
4137 : 0 : goto next_after_fail1127;
4138 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4139 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4140 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 824, __FILE__, __LINE__, true);
4141 : 0 : return _r;
4142 : : }
4143 : : next_after_fail1127:;
4144 : : }
4145 : : }
4146 : : }
4147 : : return NULL_TREE;
4148 : : }
4149 : :
4150 : : tree
4151 : 584481186 : generic_simplify_CONVERT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
4152 : : {
4153 : 584481186 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4154 : 584481186 : switch (TREE_CODE (_p0))
4155 : : {
4156 : 394392 : case NEGATE_EXPR:
4157 : 394392 : {
4158 : 394392 : tree _q20 = TREE_OPERAND (_p0, 0);
4159 : 394392 : switch (TREE_CODE (_q20))
4160 : : {
4161 : 57595 : CASE_CONVERT:
4162 : 57595 : {
4163 : 57595 : tree _q30 = TREE_OPERAND (_q20, 0);
4164 : 57595 : {
4165 : 57595 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
4166 : 57595 : if (INTEGRAL_TYPE_P (type)
4167 : 57294 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
4168 : 53785 : && (TYPE_PRECISION (type) > TYPE_PRECISION (TREE_TYPE (captures[2]))
4169 : 53073 : || TYPE_UNSIGNED (type))
4170 : 64423 : && TREE_CODE (type) != BOOLEAN_TYPE
4171 : : )
4172 : : {
4173 : 6828 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1144;
4174 : 6828 : {
4175 : 6828 : tree res_op0;
4176 : 6828 : {
4177 : 6828 : tree _o1[1], _r1;
4178 : 6828 : _o1[0] = captures[2];
4179 : 6828 : if (TREE_TYPE (_o1[0]) != type)
4180 : : {
4181 : 6778 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
4182 : : }
4183 : : else
4184 : : _r1 = _o1[0];
4185 : 6828 : res_op0 = _r1;
4186 : : }
4187 : 6828 : tree _r;
4188 : 6828 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
4189 : 6828 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 839, __FILE__, __LINE__, true);
4190 : 6828 : return _r;
4191 : : }
4192 : 0 : next_after_fail1144:;
4193 : : }
4194 : : }
4195 : 50767 : break;
4196 : : }
4197 : : default:;
4198 : : }
4199 : : break;
4200 : : }
4201 : 1153027 : case BIT_AND_EXPR:
4202 : 1153027 : {
4203 : 1153027 : tree _q20 = TREE_OPERAND (_p0, 0);
4204 : 1153027 : tree _q21 = TREE_OPERAND (_p0, 1);
4205 : 1153027 : {
4206 : 1153027 : tree _q20_pops[1];
4207 : 1153027 : if (tree_nop_convert (_q20, _q20_pops))
4208 : : {
4209 : 551855 : tree _q30 = _q20_pops[0];
4210 : 551855 : {
4211 : 551855 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21 };
4212 : 551855 : tree res = generic_simplify_381 (loc, type, _p0, captures, BIT_AND_EXPR);
4213 : 551855 : if (res) return res;
4214 : : }
4215 : : }
4216 : : }
4217 : 1153027 : {
4218 : 1153027 : tree _q21_pops[1];
4219 : 1153027 : if (tree_nop_convert (_q21, _q21_pops))
4220 : : {
4221 : 376995 : tree _q40 = _q21_pops[0];
4222 : 376995 : {
4223 : 376995 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q20 };
4224 : 376995 : tree res = generic_simplify_381 (loc, type, _p0, captures, BIT_AND_EXPR);
4225 : 376995 : if (res) return res;
4226 : : }
4227 : : }
4228 : : }
4229 : 1153027 : break;
4230 : : }
4231 : 1059228 : case BIT_IOR_EXPR:
4232 : 1059228 : {
4233 : 1059228 : tree _q20 = TREE_OPERAND (_p0, 0);
4234 : 1059228 : tree _q21 = TREE_OPERAND (_p0, 1);
4235 : 1059228 : {
4236 : 1059228 : tree _q20_pops[1];
4237 : 1059228 : if (tree_nop_convert (_q20, _q20_pops))
4238 : : {
4239 : 373243 : tree _q30 = _q20_pops[0];
4240 : 373243 : {
4241 : 373243 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21 };
4242 : 373243 : tree res = generic_simplify_381 (loc, type, _p0, captures, BIT_IOR_EXPR);
4243 : 373243 : if (res) return res;
4244 : : }
4245 : : }
4246 : : }
4247 : 1059228 : {
4248 : 1059228 : tree _q21_pops[1];
4249 : 1059228 : if (tree_nop_convert (_q21, _q21_pops))
4250 : : {
4251 : 959998 : tree _q40 = _q21_pops[0];
4252 : 959998 : {
4253 : 959998 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q20 };
4254 : 959998 : tree res = generic_simplify_381 (loc, type, _p0, captures, BIT_IOR_EXPR);
4255 : 959998 : if (res) return res;
4256 : : }
4257 : : }
4258 : : }
4259 : 1059228 : break;
4260 : : }
4261 : 416155 : case BIT_XOR_EXPR:
4262 : 416155 : {
4263 : 416155 : tree _q20 = TREE_OPERAND (_p0, 0);
4264 : 416155 : tree _q21 = TREE_OPERAND (_p0, 1);
4265 : 416155 : {
4266 : 416155 : tree _q20_pops[1];
4267 : 416155 : if (tree_nop_convert (_q20, _q20_pops))
4268 : : {
4269 : 340831 : tree _q30 = _q20_pops[0];
4270 : 340831 : {
4271 : 340831 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21 };
4272 : 340831 : tree res = generic_simplify_381 (loc, type, _p0, captures, BIT_XOR_EXPR);
4273 : 340831 : if (res) return res;
4274 : : }
4275 : : }
4276 : : }
4277 : 416155 : {
4278 : 416155 : tree _q21_pops[1];
4279 : 416155 : if (tree_nop_convert (_q21, _q21_pops))
4280 : : {
4281 : 376204 : tree _q40 = _q21_pops[0];
4282 : 376204 : {
4283 : 376204 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q20 };
4284 : 376204 : tree res = generic_simplify_381 (loc, type, _p0, captures, BIT_XOR_EXPR);
4285 : 376204 : if (res) return res;
4286 : : }
4287 : : }
4288 : : }
4289 : 416155 : break;
4290 : : }
4291 : 7826725 : case MULT_EXPR:
4292 : 7826725 : {
4293 : 7826725 : tree _q20 = TREE_OPERAND (_p0, 0);
4294 : 7826725 : tree _q21 = TREE_OPERAND (_p0, 1);
4295 : 7826725 : if (tree_zero_one_valued_p (_q20))
4296 : : {
4297 : 62521 : switch (TREE_CODE (_q21))
4298 : : {
4299 : 57058 : case INTEGER_CST:
4300 : 57058 : {
4301 : 57058 : {
4302 : 57058 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4303 : 57058 : if (INTEGRAL_TYPE_P (type)
4304 : 57058 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4305 : 57058 : && TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (captures[0]))
4306 : 57064 : && (TYPE_UNSIGNED (type) || TYPE_PRECISION (type) > 1)
4307 : : )
4308 : : {
4309 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1145;
4310 : 6 : {
4311 : 6 : tree res_op0;
4312 : 6 : {
4313 : 6 : tree _o1[1], _r1;
4314 : 6 : _o1[0] = captures[1];
4315 : 6 : if (TREE_TYPE (_o1[0]) != type)
4316 : : {
4317 : 6 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
4318 : : }
4319 : : else
4320 : : _r1 = _o1[0];
4321 : 6 : res_op0 = _r1;
4322 : : }
4323 : 6 : tree res_op1;
4324 : 6 : {
4325 : 6 : tree _o1[1], _r1;
4326 : 6 : _o1[0] = captures[2];
4327 : 6 : if (TREE_TYPE (_o1[0]) != type)
4328 : : {
4329 : 6 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
4330 : : }
4331 : : else
4332 : : _r1 = _o1[0];
4333 : 6 : res_op1 = _r1;
4334 : : }
4335 : 6 : tree _r;
4336 : 6 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
4337 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 840, __FILE__, __LINE__, true);
4338 : 6 : return _r;
4339 : : }
4340 : 0 : next_after_fail1145:;
4341 : : }
4342 : : }
4343 : 57052 : break;
4344 : : }
4345 : : default:;
4346 : : }
4347 : : }
4348 : : break;
4349 : : }
4350 : 1174080 : case POINTER_DIFF_EXPR:
4351 : 1174080 : {
4352 : 1174080 : tree _q20 = TREE_OPERAND (_p0, 0);
4353 : 1174080 : tree _q21 = TREE_OPERAND (_p0, 1);
4354 : 1174080 : switch (TREE_CODE (_q21))
4355 : : {
4356 : 200 : case INTEGER_CST:
4357 : 200 : {
4358 : 200 : {
4359 : 200 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4360 : 200 : if (POINTER_TYPE_P (type)
4361 : : )
4362 : : {
4363 : 18 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1146;
4364 : 18 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1146;
4365 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1146;
4366 : 18 : {
4367 : 18 : tree _r;
4368 : 18 : _r = build_fold_addr_expr_with_type
4369 : : (build2 (MEM_REF, char_type_node, captures[0],
4370 : : wide_int_to_tree (ptr_type_node, wi::neg (wi::to_wide (captures[1])))),
4371 : : type);
4372 : 18 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 841, __FILE__, __LINE__, true);
4373 : 18 : return _r;
4374 : : }
4375 : 182 : next_after_fail1146:;
4376 : : }
4377 : : }
4378 : 182 : break;
4379 : : }
4380 : : default:;
4381 : : }
4382 : : break;
4383 : : }
4384 : 186084 : case EQ_EXPR:
4385 : 186084 : {
4386 : 186084 : tree _q20 = TREE_OPERAND (_p0, 0);
4387 : 186084 : tree _q21 = TREE_OPERAND (_p0, 1);
4388 : 186084 : if (tree_zero_one_valued_p (_q20))
4389 : : {
4390 : 1394 : switch (TREE_CODE (_q21))
4391 : : {
4392 : 550 : case INTEGER_CST:
4393 : 550 : {
4394 : 550 : {
4395 : 550 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4396 : 550 : tree res = generic_simplify_382 (loc, type, _p0, captures, EQ_EXPR);
4397 : 550 : if (res) return res;
4398 : : }
4399 : 511 : break;
4400 : : }
4401 : : default:;
4402 : : }
4403 : : }
4404 : : break;
4405 : : }
4406 : 247046 : case NE_EXPR:
4407 : 247046 : {
4408 : 247046 : tree _q20 = TREE_OPERAND (_p0, 0);
4409 : 247046 : tree _q21 = TREE_OPERAND (_p0, 1);
4410 : 247046 : if (tree_zero_one_valued_p (_q20))
4411 : : {
4412 : 1798 : switch (TREE_CODE (_q21))
4413 : : {
4414 : 1476 : case INTEGER_CST:
4415 : 1476 : {
4416 : 1476 : {
4417 : 1476 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4418 : 1476 : tree res = generic_simplify_382 (loc, type, _p0, captures, NE_EXPR);
4419 : 1476 : if (res) return res;
4420 : : }
4421 : 1 : break;
4422 : : }
4423 : : default:;
4424 : : }
4425 : : }
4426 : : break;
4427 : : }
4428 : 1895 : case MIN_EXPR:
4429 : 1895 : {
4430 : 1895 : tree _q20 = TREE_OPERAND (_p0, 0);
4431 : 1895 : tree _q21 = TREE_OPERAND (_p0, 1);
4432 : 1895 : switch (TREE_CODE (_q20))
4433 : : {
4434 : 704 : CASE_CONVERT:
4435 : 704 : {
4436 : 704 : tree _q30 = TREE_OPERAND (_q20, 0);
4437 : 704 : switch (TREE_CODE (_q21))
4438 : : {
4439 : 659 : case INTEGER_CST:
4440 : 659 : {
4441 : 659 : {
4442 : 659 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q21 };
4443 : 659 : tree res = generic_simplify_383 (loc, type, _p0, captures, MIN_EXPR);
4444 : 659 : if (res) return res;
4445 : : }
4446 : 659 : break;
4447 : : }
4448 : : default:;
4449 : : }
4450 : : break;
4451 : : }
4452 : : default:;
4453 : : }
4454 : : break;
4455 : : }
4456 : 278307 : case MAX_EXPR:
4457 : 278307 : {
4458 : 278307 : tree _q20 = TREE_OPERAND (_p0, 0);
4459 : 278307 : tree _q21 = TREE_OPERAND (_p0, 1);
4460 : 278307 : switch (TREE_CODE (_q20))
4461 : : {
4462 : 6907 : CASE_CONVERT:
4463 : 6907 : {
4464 : 6907 : tree _q30 = TREE_OPERAND (_q20, 0);
4465 : 6907 : switch (TREE_CODE (_q21))
4466 : : {
4467 : 6871 : case INTEGER_CST:
4468 : 6871 : {
4469 : 6871 : {
4470 : 6871 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q21 };
4471 : 6871 : tree res = generic_simplify_383 (loc, type, _p0, captures, MAX_EXPR);
4472 : 6871 : if (res) return res;
4473 : : }
4474 : 6871 : break;
4475 : : }
4476 : : default:;
4477 : : }
4478 : : break;
4479 : : }
4480 : : default:;
4481 : : }
4482 : : break;
4483 : : }
4484 : 442043 : case LSHIFT_EXPR:
4485 : 442043 : {
4486 : 442043 : tree _q20 = TREE_OPERAND (_p0, 0);
4487 : 442043 : tree _q21 = TREE_OPERAND (_p0, 1);
4488 : 442043 : switch (TREE_CODE (_q21))
4489 : : {
4490 : 136527 : case INTEGER_CST:
4491 : 136527 : {
4492 : 136527 : {
4493 : 136527 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4494 : 136527 : if (INTEGRAL_TYPE_P (type)
4495 : 136500 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4496 : 136500 : && !integer_zerop (captures[2])
4497 : 272253 : && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
4498 : : )
4499 : : {
4500 : 134442 : if (TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (captures[0]))
4501 : 134442 : || wi::ltu_p (wi::to_wide (captures[2]), TYPE_PRECISION (type))
4502 : : )
4503 : : {
4504 : 134200 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1147;
4505 : 134200 : {
4506 : 134200 : tree res_op0;
4507 : 134200 : {
4508 : 134200 : tree _o1[1], _r1;
4509 : 134200 : _o1[0] = captures[1];
4510 : 134200 : if (TREE_TYPE (_o1[0]) != type)
4511 : : {
4512 : 125126 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
4513 : : }
4514 : : else
4515 : : _r1 = _o1[0];
4516 : 134200 : res_op0 = _r1;
4517 : : }
4518 : 134200 : tree res_op1;
4519 : 134200 : res_op1 = captures[2];
4520 : 134200 : tree _r;
4521 : 134200 : _r = fold_build2_loc (loc, LSHIFT_EXPR, type, res_op0, res_op1);
4522 : 134200 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
4523 : 134200 : return _r;
4524 : : }
4525 : 0 : next_after_fail1147:;
4526 : : }
4527 : : else
4528 : : {
4529 : 242 : if (wi::ltu_p (wi::to_wide (captures[2]), TYPE_PRECISION (TREE_TYPE (captures[0])))
4530 : : )
4531 : : {
4532 : 225 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1148;
4533 : 225 : {
4534 : 225 : tree _r;
4535 : 225 : _r = build_zero_cst (type);
4536 : 225 : if (TREE_SIDE_EFFECTS (captures[1]))
4537 : 14 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4538 : 225 : if (TREE_SIDE_EFFECTS (captures[2]))
4539 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
4540 : 225 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 843, __FILE__, __LINE__, true);
4541 : 225 : return _r;
4542 : : }
4543 : 0 : next_after_fail1148:;
4544 : : }
4545 : : }
4546 : : }
4547 : : }
4548 : 2102 : break;
4549 : : }
4550 : : default:;
4551 : : }
4552 : : break;
4553 : : }
4554 : 584338395 : default:;
4555 : : }
4556 : 584338395 : {
4557 : 584338395 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4558 : 1168676790 : if ((
4559 : :
4560 : : && useless_type_conversion_p (type, TREE_TYPE (captures[0])))
4561 : : || (
4562 : : 1
4563 : 584338395 : && type == TREE_TYPE (captures[0]))
4564 : : )
4565 : : {
4566 : 41069267 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1149;
4567 : 41069267 : {
4568 : 41069267 : tree _r;
4569 : 41069267 : _r = captures[0];
4570 : 41069267 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 844, __FILE__, __LINE__, true);
4571 : 41069267 : return _r;
4572 : : }
4573 : 0 : next_after_fail1149:;
4574 : : }
4575 : : }
4576 : 543269128 : switch (TREE_CODE (_p0))
4577 : : {
4578 : 67091067 : CASE_CONVERT:
4579 : 67091067 : {
4580 : 67091067 : tree _q20 = TREE_OPERAND (_p0, 0);
4581 : 67091067 : {
4582 : 67091067 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4583 : 67091067 : {
4584 : 67091067 : tree inside_type = TREE_TYPE (captures[1]);
4585 : 67091067 : tree inter_type = TREE_TYPE (captures[0]);
4586 : 67091067 : int inside_int = INTEGRAL_TYPE_P (inside_type);
4587 : 67091067 : int inside_ptr = POINTER_TYPE_P (inside_type);
4588 : 67091067 : int inside_float = FLOAT_TYPE_P (inside_type);
4589 : 67091067 : int inside_vec = VECTOR_TYPE_P (inside_type);
4590 : 67091067 : unsigned int inside_prec = element_precision (inside_type);
4591 : 67091067 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
4592 : 67091067 : int inter_int = INTEGRAL_TYPE_P (inter_type);
4593 : 67091067 : int inter_ptr = POINTER_TYPE_P (inter_type);
4594 : 67091067 : int inter_float = FLOAT_TYPE_P (inter_type);
4595 : 67091067 : int inter_vec = VECTOR_TYPE_P (inter_type);
4596 : 67091067 : unsigned int inter_prec = element_precision (inter_type);
4597 : 67091067 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
4598 : 67091067 : int final_int = INTEGRAL_TYPE_P (type);
4599 : 67091067 : int final_ptr = POINTER_TYPE_P (type);
4600 : 67091067 : int final_float = FLOAT_TYPE_P (type);
4601 : 67091067 : int final_vec = VECTOR_TYPE_P (type);
4602 : 67091067 : unsigned int final_prec = element_precision (type);
4603 : 67091067 : int final_unsignedp = TYPE_UNSIGNED (type);
4604 : 67091067 : if (((
4605 : :
4606 : : && useless_type_conversion_p (type, inside_type))
4607 : : || (
4608 : : 1
4609 : 67091067 : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
4610 : 19670868 : && (((inter_int || inter_ptr) && final_int)
4611 : 14590865 : || (inter_float && final_float))
4612 : 72256379 : && inter_prec >= final_prec
4613 : : )
4614 : : {
4615 : 4634585 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1150;
4616 : 4634585 : {
4617 : 4634585 : tree res_op0;
4618 : 4634585 : res_op0 = captures[1];
4619 : 4634585 : tree _r;
4620 : 4634585 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4621 : 4634585 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 845, __FILE__, __LINE__, true);
4622 : 4634585 : return _r;
4623 : : }
4624 : 0 : next_after_fail1150:;
4625 : : }
4626 : : else
4627 : : {
4628 : 62456482 : if (((inter_int && inside_int) || (inter_float && inside_float))
4629 : 10650063 : && (final_int || final_float)
4630 : 10522836 : && inter_prec >= inside_prec
4631 : 9282195 : && (inter_float || inter_unsignedp == inside_unsignedp)
4632 : : )
4633 : : {
4634 : 6360388 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1151;
4635 : 6360388 : {
4636 : 6360388 : tree res_op0;
4637 : 6360388 : res_op0 = captures[1];
4638 : 6360388 : tree _r;
4639 : 6360388 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4640 : 6360388 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 846, __FILE__, __LINE__, true);
4641 : 6360388 : return _r;
4642 : : }
4643 : 0 : next_after_fail1151:;
4644 : 0 : }
4645 : : else
4646 : : {
4647 : 56096094 : if (inside_int && inter_int && final_int
4648 : 4156211 : && ((inside_prec < inter_prec && inter_prec < final_prec
4649 : 224157 : && inside_unsignedp && !inter_unsignedp)
4650 : 3958641 : || final_prec == inter_prec
4651 : 2152287 : || (inside_prec < inter_prec && inter_prec > final_prec
4652 : 144779 : && !inside_unsignedp && inter_unsignedp))
4653 : : )
4654 : : {
4655 : 2067433 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1152;
4656 : 2067433 : {
4657 : 2067433 : tree res_op0;
4658 : 2067433 : res_op0 = captures[1];
4659 : 2067433 : tree _r;
4660 : 2067433 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4661 : 2067433 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 847, __FILE__, __LINE__, true);
4662 : 2067433 : return _r;
4663 : : }
4664 : 0 : next_after_fail1152:;
4665 : 0 : }
4666 : : else
4667 : : {
4668 : 54028661 : if (! inside_float && ! inter_float && ! final_float
4669 : : && ! inside_vec && ! inter_vec && ! final_vec
4670 : 54022420 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
4671 : 53258238 : && ! (inside_int && inter_int
4672 : 1451819 : && inter_unsignedp != inside_unsignedp
4673 : 1451819 : && inter_prec < final_prec)
4674 : 52081678 : && ((inter_unsignedp && inter_prec > inside_prec)
4675 : 52081678 : == (final_unsignedp && final_prec > inter_prec))
4676 : 52059593 : && ! (inside_ptr && inter_prec != final_prec)
4677 : 51600731 : && ! (final_ptr && inside_prec != inter_prec)
4678 : : )
4679 : : {
4680 : 51582257 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1153;
4681 : 51582257 : {
4682 : 51582257 : tree res_op0;
4683 : 51582257 : res_op0 = captures[1];
4684 : 51582257 : tree _r;
4685 : 51582257 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4686 : 51582257 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 848, __FILE__, __LINE__, true);
4687 : 51582257 : return _r;
4688 : : }
4689 : 0 : next_after_fail1153:;
4690 : 0 : }
4691 : : else
4692 : : {
4693 : 2446404 : if (inside_int && inter_int && final_int
4694 : 1967887 : && final_prec <= inside_prec
4695 : 705139 : && inter_prec >= inside_prec
4696 : : )
4697 : : {
4698 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1154;
4699 : 0 : {
4700 : 0 : tree res_op0;
4701 : 0 : res_op0 = captures[1];
4702 : 0 : tree _r;
4703 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4704 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 849, __FILE__, __LINE__, true);
4705 : 0 : return _r;
4706 : : }
4707 : 0 : next_after_fail1154:;
4708 : 0 : }
4709 : : else
4710 : : {
4711 : : if (0
4712 : : && final_int && inter_int && inside_int
4713 : : && final_prec >= inside_prec
4714 : : && inside_prec > inter_prec
4715 : : && inter_unsignedp
4716 : : )
4717 : : {
4718 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1155;
4719 : : {
4720 : : tree res_op0;
4721 : : {
4722 : : tree _o1[2], _r1;
4723 : : _o1[0] = captures[1];
4724 : : _o1[1] = wide_int_to_tree
4725 : : (inside_type,
4726 : : wi::mask (inter_prec, false,
4727 : : TYPE_PRECISION (inside_type)));
4728 : : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4729 : : res_op0 = _r1;
4730 : : }
4731 : : tree _r;
4732 : : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4733 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 850, __FILE__, __LINE__, true);
4734 : : return _r;
4735 : : }
4736 : : next_after_fail1155:;
4737 : : }
4738 : : else
4739 : : {
4740 : : if (0
4741 : : && inside_int && inter_float && final_int &&
4742 : : (unsigned) significand_size (TYPE_MODE (inter_type))
4743 : : >= inside_prec - !inside_unsignedp
4744 : : )
4745 : : {
4746 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1156;
4747 : : {
4748 : : tree res_op0;
4749 : : res_op0 = captures[1];
4750 : : tree _r;
4751 : : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4752 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 851, __FILE__, __LINE__, true);
4753 : : return _r;
4754 : : }
4755 : : next_after_fail1156:;
4756 : : }
4757 : : }
4758 : : }
4759 : : }
4760 : : }
4761 : : }
4762 : : }
4763 : : }
4764 : : }
4765 : 2446404 : break;
4766 : : }
4767 : 3066 : case FLOAT_EXPR:
4768 : 3066 : {
4769 : 3066 : tree _q20 = TREE_OPERAND (_p0, 0);
4770 : 3066 : {
4771 : 3066 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4772 : 3066 : {
4773 : 3066 : tree inside_type = TREE_TYPE (captures[1]);
4774 : 3066 : tree inter_type = TREE_TYPE (captures[0]);
4775 : 3066 : int inside_int = INTEGRAL_TYPE_P (inside_type);
4776 : 3066 : int inside_ptr = POINTER_TYPE_P (inside_type);
4777 : 3066 : int inside_float = FLOAT_TYPE_P (inside_type);
4778 : 3066 : int inside_vec = VECTOR_TYPE_P (inside_type);
4779 : 3066 : unsigned int inside_prec = element_precision (inside_type);
4780 : 3066 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
4781 : 3066 : int inter_int = INTEGRAL_TYPE_P (inter_type);
4782 : 3066 : int inter_ptr = POINTER_TYPE_P (inter_type);
4783 : 3066 : int inter_float = FLOAT_TYPE_P (inter_type);
4784 : 3066 : int inter_vec = VECTOR_TYPE_P (inter_type);
4785 : 3066 : unsigned int inter_prec = element_precision (inter_type);
4786 : 3066 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
4787 : 3066 : int final_int = INTEGRAL_TYPE_P (type);
4788 : 3066 : int final_ptr = POINTER_TYPE_P (type);
4789 : 3066 : int final_float = FLOAT_TYPE_P (type);
4790 : 3066 : int final_vec = VECTOR_TYPE_P (type);
4791 : 3066 : unsigned int final_prec = element_precision (type);
4792 : 3066 : int final_unsignedp = TYPE_UNSIGNED (type);
4793 : 3066 : if (((
4794 : :
4795 : : && useless_type_conversion_p (type, inside_type))
4796 : : || (
4797 : : 1
4798 : 3066 : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
4799 : 0 : && (((inter_int || inter_ptr) && final_int)
4800 : 0 : || (inter_float && final_float))
4801 : 3066 : && inter_prec >= final_prec
4802 : : )
4803 : : {
4804 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1157;
4805 : 0 : {
4806 : 0 : tree res_op0;
4807 : 0 : res_op0 = captures[1];
4808 : 0 : tree _r;
4809 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4810 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 845, __FILE__, __LINE__, true);
4811 : 0 : return _r;
4812 : : }
4813 : 0 : next_after_fail1157:;
4814 : : }
4815 : : else
4816 : : {
4817 : 3066 : if (((inter_int && inside_int) || (inter_float && inside_float))
4818 : 0 : && (final_int || final_float)
4819 : 0 : && inter_prec >= inside_prec
4820 : 0 : && (inter_float || inter_unsignedp == inside_unsignedp)
4821 : : )
4822 : : {
4823 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1158;
4824 : 0 : {
4825 : 0 : tree res_op0;
4826 : 0 : res_op0 = captures[1];
4827 : 0 : tree _r;
4828 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4829 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 846, __FILE__, __LINE__, true);
4830 : 0 : return _r;
4831 : : }
4832 : 0 : next_after_fail1158:;
4833 : 0 : }
4834 : : else
4835 : : {
4836 : 3066 : if (inside_int && inter_int && final_int
4837 : 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
4838 : 0 : && inside_unsignedp && !inter_unsignedp)
4839 : 0 : || final_prec == inter_prec
4840 : 0 : || (inside_prec < inter_prec && inter_prec > final_prec
4841 : 0 : && !inside_unsignedp && inter_unsignedp))
4842 : : )
4843 : : {
4844 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1159;
4845 : 0 : {
4846 : 0 : tree res_op0;
4847 : 0 : res_op0 = captures[1];
4848 : 0 : tree _r;
4849 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4850 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 847, __FILE__, __LINE__, true);
4851 : 0 : return _r;
4852 : : }
4853 : 0 : next_after_fail1159:;
4854 : 0 : }
4855 : : else
4856 : : {
4857 : 3066 : if (! inside_float && ! inter_float && ! final_float
4858 : : && ! inside_vec && ! inter_vec && ! final_vec
4859 : 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
4860 : 0 : && ! (inside_int && inter_int
4861 : 0 : && inter_unsignedp != inside_unsignedp
4862 : 0 : && inter_prec < final_prec)
4863 : 0 : && ((inter_unsignedp && inter_prec > inside_prec)
4864 : 0 : == (final_unsignedp && final_prec > inter_prec))
4865 : 0 : && ! (inside_ptr && inter_prec != final_prec)
4866 : 0 : && ! (final_ptr && inside_prec != inter_prec)
4867 : : )
4868 : : {
4869 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1160;
4870 : 0 : {
4871 : 0 : tree res_op0;
4872 : 0 : res_op0 = captures[1];
4873 : 0 : tree _r;
4874 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4875 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 848, __FILE__, __LINE__, true);
4876 : 0 : return _r;
4877 : : }
4878 : 0 : next_after_fail1160:;
4879 : 0 : }
4880 : : else
4881 : : {
4882 : 3066 : if (inside_int && inter_int && final_int
4883 : 0 : && final_prec <= inside_prec
4884 : 0 : && inter_prec >= inside_prec
4885 : : )
4886 : : {
4887 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1161;
4888 : 0 : {
4889 : 0 : tree res_op0;
4890 : 0 : res_op0 = captures[1];
4891 : 0 : tree _r;
4892 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4893 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 849, __FILE__, __LINE__, true);
4894 : 0 : return _r;
4895 : : }
4896 : 0 : next_after_fail1161:;
4897 : 0 : }
4898 : : else
4899 : : {
4900 : : if (0
4901 : : && final_int && inter_int && inside_int
4902 : : && final_prec >= inside_prec
4903 : : && inside_prec > inter_prec
4904 : : && inter_unsignedp
4905 : : )
4906 : : {
4907 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1162;
4908 : : {
4909 : : tree res_op0;
4910 : : {
4911 : : tree _o1[2], _r1;
4912 : : _o1[0] = captures[1];
4913 : : _o1[1] = wide_int_to_tree
4914 : : (inside_type,
4915 : : wi::mask (inter_prec, false,
4916 : : TYPE_PRECISION (inside_type)));
4917 : : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4918 : : res_op0 = _r1;
4919 : : }
4920 : : tree _r;
4921 : : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4922 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 850, __FILE__, __LINE__, true);
4923 : : return _r;
4924 : : }
4925 : : next_after_fail1162:;
4926 : : }
4927 : : else
4928 : : {
4929 : : if (0
4930 : : && inside_int && inter_float && final_int &&
4931 : : (unsigned) significand_size (TYPE_MODE (inter_type))
4932 : : >= inside_prec - !inside_unsignedp
4933 : : )
4934 : : {
4935 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1163;
4936 : : {
4937 : : tree res_op0;
4938 : : res_op0 = captures[1];
4939 : : tree _r;
4940 : : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4941 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 851, __FILE__, __LINE__, true);
4942 : : return _r;
4943 : : }
4944 : : next_after_fail1163:;
4945 : : }
4946 : : }
4947 : : }
4948 : : }
4949 : : }
4950 : : }
4951 : : }
4952 : : }
4953 : : }
4954 : 3066 : break;
4955 : : }
4956 : 812873 : case BIT_AND_EXPR:
4957 : 812873 : {
4958 : 812873 : tree _q20 = TREE_OPERAND (_p0, 0);
4959 : 812873 : tree _q21 = TREE_OPERAND (_p0, 1);
4960 : 812873 : switch (TREE_CODE (_q21))
4961 : : {
4962 : 312688 : case INTEGER_CST:
4963 : 312688 : {
4964 : 312688 : {
4965 : 312688 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4966 : 312688 : if (INTEGRAL_TYPE_P (type)
4967 : 312177 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4968 : 312177 : && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
4969 : 437875 : && operand_equal_p (captures[1], build_low_bits_mask (TREE_TYPE (captures[1]),
4970 : 125187 : TYPE_PRECISION (type)), 0)
4971 : : )
4972 : : {
4973 : 3325 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1164;
4974 : 3325 : {
4975 : 3325 : tree res_op0;
4976 : 3325 : res_op0 = captures[0];
4977 : 3325 : tree _r;
4978 : 3325 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4979 : 3325 : if (TREE_SIDE_EFFECTS (captures[1]))
4980 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4981 : 3325 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 852, __FILE__, __LINE__, true);
4982 : 3325 : return _r;
4983 : : }
4984 : 0 : next_after_fail1164:;
4985 : : }
4986 : : }
4987 : 309363 : break;
4988 : : }
4989 : : default:;
4990 : : }
4991 : : break;
4992 : : }
4993 : 5 : case VEC_COND_EXPR:
4994 : 5 : {
4995 : 5 : tree _q20 = TREE_OPERAND (_p0, 0);
4996 : 5 : tree _q21 = TREE_OPERAND (_p0, 1);
4997 : 5 : tree _q22 = TREE_OPERAND (_p0, 2);
4998 : 5 : {
4999 : 5 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
5000 : 5 : if (VECTOR_TYPE_P (type)
5001 : 5 : && types_match (TREE_TYPE (captures[1]), truth_type_for (type))
5002 : : )
5003 : : {
5004 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1165;
5005 : 0 : {
5006 : 0 : tree res_op0;
5007 : 0 : res_op0 = captures[1];
5008 : 0 : tree res_op1;
5009 : 0 : {
5010 : 0 : tree _o1[1], _r1;
5011 : 0 : _o1[0] = captures[2];
5012 : 0 : if (TREE_TYPE (_o1[0]) != type)
5013 : : {
5014 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5015 : 0 : if (EXPR_P (_r1))
5016 : 0 : goto next_after_fail1165;
5017 : : }
5018 : : else
5019 : : _r1 = _o1[0];
5020 : 0 : res_op1 = _r1;
5021 : : }
5022 : 0 : tree res_op2;
5023 : 0 : {
5024 : 0 : tree _o1[1], _r1;
5025 : 0 : _o1[0] = captures[3];
5026 : 0 : if (TREE_TYPE (_o1[0]) != type)
5027 : : {
5028 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5029 : 0 : if (EXPR_P (_r1))
5030 : 0 : goto next_after_fail1165;
5031 : : }
5032 : : else
5033 : : _r1 = _o1[0];
5034 : 0 : res_op2 = _r1;
5035 : : }
5036 : 0 : tree _r;
5037 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5038 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 853, __FILE__, __LINE__, true);
5039 : 0 : return _r;
5040 : : }
5041 : 5 : next_after_fail1165:;
5042 : : }
5043 : : }
5044 : 5 : break;
5045 : : }
5046 : 497587 : case COND_EXPR:
5047 : 497587 : {
5048 : 497587 : tree _q20 = TREE_OPERAND (_p0, 0);
5049 : 497587 : tree _q21 = TREE_OPERAND (_p0, 1);
5050 : 497587 : tree _q22 = TREE_OPERAND (_p0, 2);
5051 : 497587 : switch (TREE_CODE (_q21))
5052 : : {
5053 : 168484 : case INTEGER_CST:
5054 : 168484 : {
5055 : 168484 : switch (TREE_CODE (_q22))
5056 : : {
5057 : 99623 : case INTEGER_CST:
5058 : 99623 : {
5059 : 99623 : {
5060 : 99623 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
5061 : 99623 : if (INTEGRAL_TYPE_P (type)
5062 : 99623 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5063 : : )
5064 : : {
5065 : 99623 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1166;
5066 : 99623 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1166;
5067 : 99623 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1166;
5068 : 99623 : {
5069 : 99623 : tree res_op0;
5070 : 99623 : res_op0 = captures[1];
5071 : 99623 : tree res_op1;
5072 : 99623 : {
5073 : 99623 : tree _o1[1], _r1;
5074 : 99623 : _o1[0] = captures[2];
5075 : 99623 : if (TREE_TYPE (_o1[0]) != type)
5076 : : {
5077 : 99623 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5078 : : }
5079 : : else
5080 : : _r1 = _o1[0];
5081 : 99623 : res_op1 = _r1;
5082 : : }
5083 : 99623 : tree res_op2;
5084 : 99623 : {
5085 : 99623 : tree _o1[1], _r1;
5086 : 99623 : _o1[0] = captures[3];
5087 : 99623 : if (TREE_TYPE (_o1[0]) != type)
5088 : : {
5089 : 99623 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5090 : : }
5091 : : else
5092 : : _r1 = _o1[0];
5093 : 99623 : res_op2 = _r1;
5094 : : }
5095 : 99623 : tree _r;
5096 : 99623 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
5097 : 99623 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 854, __FILE__, __LINE__, true);
5098 : 99623 : return _r;
5099 : : }
5100 : 0 : next_after_fail1166:;
5101 : : }
5102 : : }
5103 : 0 : break;
5104 : : }
5105 : : default:;
5106 : : }
5107 : : break;
5108 : : }
5109 : : default:;
5110 : : }
5111 : : break;
5112 : : }
5113 : 11160507 : case PLUS_EXPR:
5114 : 11160507 : {
5115 : 11160507 : tree _q20 = TREE_OPERAND (_p0, 0);
5116 : 11160507 : tree _q21 = TREE_OPERAND (_p0, 1);
5117 : 11160507 : switch (TREE_CODE (_q20))
5118 : : {
5119 : 4321374 : CASE_CONVERT:
5120 : 4321374 : {
5121 : 4321374 : tree _q30 = TREE_OPERAND (_q20, 0);
5122 : 4321374 : switch (TREE_CODE (_q21))
5123 : : {
5124 : 342330 : CASE_CONVERT:
5125 : 342330 : {
5126 : 342330 : tree _q50 = TREE_OPERAND (_q21, 0);
5127 : 342330 : {
5128 : 342330 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50 };
5129 : 342330 : tree res = generic_simplify_384 (loc, type, _p0, captures, PLUS_EXPR);
5130 : 342330 : if (res) return res;
5131 : : }
5132 : 342287 : break;
5133 : : }
5134 : 4321331 : default:;
5135 : : }
5136 : 4321331 : {
5137 : 4321331 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q21 };
5138 : 4321331 : tree res = generic_simplify_385 (loc, type, _p0, captures, PLUS_EXPR);
5139 : 4321331 : if (res) return res;
5140 : : }
5141 : 4308392 : break;
5142 : : }
5143 : 11147525 : default:;
5144 : : }
5145 : 11147525 : switch (TREE_CODE (_q21))
5146 : : {
5147 : 1455145 : CASE_CONVERT:
5148 : 1455145 : {
5149 : 1455145 : tree _q40 = TREE_OPERAND (_q21, 0);
5150 : 1455145 : {
5151 : 1455145 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q40 };
5152 : 1455145 : tree res = generic_simplify_386 (loc, type, _p0, captures, PLUS_EXPR);
5153 : 1455145 : if (res) return res;
5154 : : }
5155 : 1455145 : break;
5156 : : }
5157 : 11147525 : default:;
5158 : : }
5159 : 11147525 : {
5160 : 11147525 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q21 };
5161 : 11147525 : tree res = generic_simplify_387 (loc, type, _p0, captures, PLUS_EXPR);
5162 : 11147525 : if (res) return res;
5163 : : }
5164 : 11147491 : break;
5165 : : }
5166 : 859894 : case MINUS_EXPR:
5167 : 859894 : {
5168 : 859894 : tree _q20 = TREE_OPERAND (_p0, 0);
5169 : 859894 : tree _q21 = TREE_OPERAND (_p0, 1);
5170 : 859894 : switch (TREE_CODE (_q20))
5171 : : {
5172 : 313097 : CASE_CONVERT:
5173 : 313097 : {
5174 : 313097 : tree _q30 = TREE_OPERAND (_q20, 0);
5175 : 313097 : switch (TREE_CODE (_q21))
5176 : : {
5177 : 158445 : CASE_CONVERT:
5178 : 158445 : {
5179 : 158445 : tree _q50 = TREE_OPERAND (_q21, 0);
5180 : 158445 : {
5181 : 158445 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50 };
5182 : 158445 : tree res = generic_simplify_384 (loc, type, _p0, captures, MINUS_EXPR);
5183 : 158445 : if (res) return res;
5184 : : }
5185 : 158423 : break;
5186 : : }
5187 : 313075 : default:;
5188 : : }
5189 : 313075 : {
5190 : 313075 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q21 };
5191 : 313075 : tree res = generic_simplify_385 (loc, type, _p0, captures, MINUS_EXPR);
5192 : 313075 : if (res) return res;
5193 : : }
5194 : 311962 : break;
5195 : : }
5196 : 858759 : default:;
5197 : : }
5198 : 858759 : switch (TREE_CODE (_q21))
5199 : : {
5200 : 218237 : CASE_CONVERT:
5201 : 218237 : {
5202 : 218237 : tree _q40 = TREE_OPERAND (_q21, 0);
5203 : 218237 : {
5204 : 218237 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q40 };
5205 : 218237 : tree res = generic_simplify_386 (loc, type, _p0, captures, MINUS_EXPR);
5206 : 218237 : if (res) return res;
5207 : : }
5208 : 218227 : break;
5209 : : }
5210 : 858749 : default:;
5211 : : }
5212 : 858749 : {
5213 : 858749 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q21 };
5214 : 858749 : tree res = generic_simplify_387 (loc, type, _p0, captures, MINUS_EXPR);
5215 : 858749 : if (res) return res;
5216 : : }
5217 : 858717 : break;
5218 : : }
5219 : 7627607 : case MULT_EXPR:
5220 : 7627607 : {
5221 : 7627607 : tree _q20 = TREE_OPERAND (_p0, 0);
5222 : 7627607 : tree _q21 = TREE_OPERAND (_p0, 1);
5223 : 7627607 : switch (TREE_CODE (_q20))
5224 : : {
5225 : 3405775 : CASE_CONVERT:
5226 : 3405775 : {
5227 : 3405775 : tree _q30 = TREE_OPERAND (_q20, 0);
5228 : 3405775 : switch (TREE_CODE (_q21))
5229 : : {
5230 : 294810 : CASE_CONVERT:
5231 : 294810 : {
5232 : 294810 : tree _q50 = TREE_OPERAND (_q21, 0);
5233 : 294810 : {
5234 : 294810 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50 };
5235 : 294810 : tree res = generic_simplify_384 (loc, type, _p0, captures, MULT_EXPR);
5236 : 294810 : if (res) return res;
5237 : : }
5238 : 294810 : break;
5239 : : }
5240 : 3405775 : default:;
5241 : : }
5242 : 3405775 : {
5243 : 3405775 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q21 };
5244 : 3405775 : tree res = generic_simplify_385 (loc, type, _p0, captures, MULT_EXPR);
5245 : 3405775 : if (res) return res;
5246 : : }
5247 : 3405655 : break;
5248 : : }
5249 : 7627487 : default:;
5250 : : }
5251 : 7627487 : switch (TREE_CODE (_q21))
5252 : : {
5253 : 649514 : CASE_CONVERT:
5254 : 649514 : {
5255 : 649514 : tree _q40 = TREE_OPERAND (_q21, 0);
5256 : 649514 : {
5257 : 649514 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q40 };
5258 : 649514 : tree res = generic_simplify_386 (loc, type, _p0, captures, MULT_EXPR);
5259 : 649514 : if (res) return res;
5260 : : }
5261 : 649514 : break;
5262 : : }
5263 : 7627487 : default:;
5264 : : }
5265 : 7627487 : {
5266 : 7627487 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q21 };
5267 : 7627487 : tree res = generic_simplify_387 (loc, type, _p0, captures, MULT_EXPR);
5268 : 7627487 : if (res) return res;
5269 : : }
5270 : 7627454 : break;
5271 : : }
5272 : 3071 : case RDIV_EXPR:
5273 : 3071 : {
5274 : 3071 : tree _q20 = TREE_OPERAND (_p0, 0);
5275 : 3071 : tree _q21 = TREE_OPERAND (_p0, 1);
5276 : 3071 : switch (TREE_CODE (_q20))
5277 : : {
5278 : 982 : CASE_CONVERT:
5279 : 982 : {
5280 : 982 : tree _q30 = TREE_OPERAND (_q20, 0);
5281 : 982 : switch (TREE_CODE (_q21))
5282 : : {
5283 : 669 : CASE_CONVERT:
5284 : 669 : {
5285 : 669 : tree _q50 = TREE_OPERAND (_q21, 0);
5286 : 669 : {
5287 : 669 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50 };
5288 : 669 : tree res = generic_simplify_384 (loc, type, _p0, captures, RDIV_EXPR);
5289 : 669 : if (res) return res;
5290 : : }
5291 : 668 : break;
5292 : : }
5293 : 981 : default:;
5294 : : }
5295 : 981 : {
5296 : 981 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q21 };
5297 : 981 : tree res = generic_simplify_385 (loc, type, _p0, captures, RDIV_EXPR);
5298 : 981 : if (res) return res;
5299 : : }
5300 : 979 : break;
5301 : : }
5302 : 3068 : default:;
5303 : : }
5304 : 3068 : switch (TREE_CODE (_q21))
5305 : : {
5306 : 1652 : CASE_CONVERT:
5307 : 1652 : {
5308 : 1652 : tree _q40 = TREE_OPERAND (_q21, 0);
5309 : 1652 : {
5310 : 1652 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q40 };
5311 : 1652 : tree res = generic_simplify_386 (loc, type, _p0, captures, RDIV_EXPR);
5312 : 1652 : if (res) return res;
5313 : : }
5314 : 1010 : break;
5315 : : }
5316 : 2426 : default:;
5317 : : }
5318 : 2426 : {
5319 : 2426 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q20, _q21, _q21 };
5320 : 2426 : tree res = generic_simplify_387 (loc, type, _p0, captures, RDIV_EXPR);
5321 : 2426 : if (res) return res;
5322 : : }
5323 : 2388 : break;
5324 : : }
5325 : 372052 : case NEGATE_EXPR:
5326 : 372052 : {
5327 : 372052 : tree _q20 = TREE_OPERAND (_p0, 0);
5328 : 372052 : {
5329 : 372052 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5330 : 372052 : tree res = generic_simplify_388 (loc, type, _p0, captures);
5331 : 372052 : if (res) return res;
5332 : : }
5333 : 372030 : break;
5334 : : }
5335 : : default:;
5336 : : }
5337 : : return NULL_TREE;
5338 : : }
5339 : :
5340 : : tree
5341 : 6253 : generic_simplify_CEIL_DIV_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
5342 : : {
5343 : 6253 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5344 : 6253 : if (integer_onep (_p1))
5345 : : {
5346 : 1761 : {
5347 : 1761 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5348 : 1761 : tree res = generic_simplify_176 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5349 : 1761 : if (res) return res;
5350 : : }
5351 : : }
5352 : 4492 : if (integer_zerop (_p0))
5353 : : {
5354 : 0 : {
5355 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5356 : 0 : tree res = generic_simplify_301 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5357 : 0 : if (res) return res;
5358 : : }
5359 : : }
5360 : 4492 : switch (TREE_CODE (_p1))
5361 : : {
5362 : 34 : case SSA_NAME:
5363 : 34 : {
5364 : 34 : {
5365 : 34 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5366 : 34 : tree res = generic_simplify_303 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5367 : 34 : if (res) return res;
5368 : : }
5369 : 34 : break;
5370 : : }
5371 : 4492 : default:;
5372 : : }
5373 : 4492 : if (integer_minus_onep (_p1))
5374 : : {
5375 : 0 : {
5376 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5377 : 0 : tree res = generic_simplify_302 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5378 : 0 : if (res) return res;
5379 : : }
5380 : : }
5381 : 4492 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
5382 : : {
5383 : 0 : {
5384 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5385 : 0 : tree res = generic_simplify_304 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5386 : 0 : if (res) return res;
5387 : : }
5388 : : }
5389 : 4492 : switch (TREE_CODE (_p1))
5390 : : {
5391 : 0 : case ABS_EXPR:
5392 : 0 : {
5393 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5394 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5395 : : {
5396 : 0 : {
5397 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5398 : 0 : tree res = generic_simplify_305 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5399 : 0 : if (res) return res;
5400 : : }
5401 : : }
5402 : : break;
5403 : : }
5404 : 4492 : default:;
5405 : : }
5406 : 4492 : switch (TREE_CODE (_p0))
5407 : : {
5408 : 0 : case ABS_EXPR:
5409 : 0 : {
5410 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5411 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5412 : : {
5413 : 0 : {
5414 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5415 : 0 : tree res = generic_simplify_305 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5416 : 0 : if (res) return res;
5417 : : }
5418 : : }
5419 : : break;
5420 : : }
5421 : 4492 : default:;
5422 : : }
5423 : 4492 : switch (TREE_CODE (_p1))
5424 : : {
5425 : 0 : case NEGATE_EXPR:
5426 : 0 : {
5427 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5428 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5429 : : {
5430 : 0 : {
5431 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5432 : 0 : tree res = generic_simplify_306 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5433 : 0 : if (res) return res;
5434 : : }
5435 : : }
5436 : : break;
5437 : : }
5438 : 4492 : default:;
5439 : : }
5440 : 4492 : switch (TREE_CODE (_p0))
5441 : : {
5442 : 0 : case NEGATE_EXPR:
5443 : 0 : {
5444 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5445 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5446 : : {
5447 : 0 : {
5448 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5449 : 0 : tree res = generic_simplify_306 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5450 : 0 : if (res) return res;
5451 : : }
5452 : : }
5453 : : break;
5454 : : }
5455 : 536 : CASE_CONVERT:
5456 : 536 : {
5457 : 536 : tree _q20 = TREE_OPERAND (_p0, 0);
5458 : 536 : switch (TREE_CODE (_q20))
5459 : : {
5460 : 0 : case BIT_AND_EXPR:
5461 : 0 : {
5462 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
5463 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
5464 : 0 : switch (TREE_CODE (_q31))
5465 : : {
5466 : 0 : case INTEGER_CST:
5467 : 0 : {
5468 : 0 : switch (TREE_CODE (_p1))
5469 : : {
5470 : 0 : case INTEGER_CST:
5471 : 0 : {
5472 : 0 : {
5473 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5474 : 0 : tree res = generic_simplify_308 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5475 : 0 : if (res) return res;
5476 : : }
5477 : 0 : break;
5478 : : }
5479 : : default:;
5480 : : }
5481 : : break;
5482 : : }
5483 : : default:;
5484 : : }
5485 : : break;
5486 : : }
5487 : : default:;
5488 : : }
5489 : : break;
5490 : : }
5491 : 0 : case BIT_AND_EXPR:
5492 : 0 : {
5493 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5494 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5495 : 0 : switch (TREE_CODE (_q21))
5496 : : {
5497 : 0 : case INTEGER_CST:
5498 : 0 : {
5499 : 0 : switch (TREE_CODE (_p1))
5500 : : {
5501 : 0 : case INTEGER_CST:
5502 : 0 : {
5503 : 0 : {
5504 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5505 : 0 : tree res = generic_simplify_308 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5506 : 0 : if (res) return res;
5507 : : }
5508 : 0 : break;
5509 : : }
5510 : : default:;
5511 : : }
5512 : : break;
5513 : : }
5514 : : default:;
5515 : : }
5516 : : break;
5517 : : }
5518 : 0 : case MULT_EXPR:
5519 : 0 : {
5520 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5521 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5522 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
5523 : : {
5524 : 0 : {
5525 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5526 : 0 : tree res = generic_simplify_310 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5527 : 0 : if (res) return res;
5528 : : }
5529 : : }
5530 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5531 : : {
5532 : 0 : {
5533 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
5534 : 0 : tree res = generic_simplify_310 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5535 : 0 : if (res) return res;
5536 : : }
5537 : : }
5538 : 0 : switch (TREE_CODE (_q21))
5539 : : {
5540 : 0 : case INTEGER_CST:
5541 : 0 : {
5542 : 0 : switch (TREE_CODE (_p1))
5543 : : {
5544 : 0 : case MULT_EXPR:
5545 : 0 : {
5546 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5547 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5548 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5549 : : {
5550 : 0 : switch (TREE_CODE (_q51))
5551 : : {
5552 : 0 : case INTEGER_CST:
5553 : 0 : {
5554 : 0 : {
5555 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5556 : 0 : tree res = generic_simplify_311 (loc, type, _p0, _p1, captures, CEIL_DIV_EXPR);
5557 : 0 : if (res) return res;
5558 : : }
5559 : 0 : break;
5560 : : }
5561 : : default:;
5562 : : }
5563 : : }
5564 : : break;
5565 : : }
5566 : : default:;
5567 : : }
5568 : : break;
5569 : : }
5570 : : default:;
5571 : : }
5572 : : break;
5573 : : }
5574 : 0 : case VEC_COND_EXPR:
5575 : 0 : {
5576 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5577 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5578 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
5579 : 0 : switch (TREE_CODE (_p1))
5580 : : {
5581 : 0 : case VEC_COND_EXPR:
5582 : 0 : {
5583 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5584 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
5585 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
5586 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5587 : : {
5588 : 0 : {
5589 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
5590 : 0 : if (VECTOR_TYPE_P (type)
5591 : 0 : && (TREE_CODE_CLASS (CEIL_DIV_EXPR) != tcc_comparison
5592 : : || types_match (type, TREE_TYPE (captures[2]))
5593 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
5594 : : || (optimize_vectors_before_lowering_p ()
5595 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
5596 : : )
5597 : : {
5598 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1606;
5599 : 0 : {
5600 : 0 : tree res_op0;
5601 : 0 : res_op0 = captures[1];
5602 : 0 : tree res_op1;
5603 : 0 : {
5604 : 0 : tree _o1[2], _r1;
5605 : 0 : _o1[0] = captures[2];
5606 : 0 : _o1[1] = captures[5];
5607 : 0 : _r1 = fold_build2_loc (loc, CEIL_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5608 : 0 : if (EXPR_P (_r1))
5609 : 0 : goto next_after_fail1606;
5610 : 0 : res_op1 = _r1;
5611 : : }
5612 : 0 : tree res_op2;
5613 : 0 : {
5614 : 0 : tree _o1[2], _r1;
5615 : 0 : _o1[0] = captures[3];
5616 : 0 : _o1[1] = captures[6];
5617 : 0 : _r1 = fold_build2_loc (loc, CEIL_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5618 : 0 : if (EXPR_P (_r1))
5619 : 0 : goto next_after_fail1606;
5620 : 0 : res_op2 = _r1;
5621 : : }
5622 : 0 : tree _r;
5623 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5624 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
5625 : 0 : return _r;
5626 : : }
5627 : 0 : next_after_fail1606:;
5628 : : }
5629 : : }
5630 : : }
5631 : : break;
5632 : : }
5633 : 0 : default:;
5634 : : }
5635 : 0 : {
5636 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
5637 : 0 : if (VECTOR_TYPE_P (type)
5638 : 0 : && (TREE_CODE_CLASS (CEIL_DIV_EXPR) != tcc_comparison
5639 : : || types_match (type, TREE_TYPE (captures[2]))
5640 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
5641 : : || (optimize_vectors_before_lowering_p ()
5642 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
5643 : : )
5644 : : {
5645 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1607;
5646 : 0 : {
5647 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1607;
5648 : 0 : tree res_op0;
5649 : 0 : res_op0 = captures[1];
5650 : 0 : tree res_op1;
5651 : 0 : {
5652 : 0 : tree _o1[2], _r1;
5653 : 0 : _o1[0] = captures[2];
5654 : 0 : _o1[1] = unshare_expr (captures[4]);
5655 : 0 : _r1 = fold_build2_loc (loc, CEIL_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5656 : 0 : if (EXPR_P (_r1))
5657 : 0 : goto next_after_fail1607;
5658 : 0 : res_op1 = _r1;
5659 : : }
5660 : 0 : tree res_op2;
5661 : 0 : {
5662 : 0 : tree _o1[2], _r1;
5663 : 0 : _o1[0] = captures[3];
5664 : 0 : _o1[1] = captures[4];
5665 : 0 : _r1 = fold_build2_loc (loc, CEIL_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5666 : 0 : if (EXPR_P (_r1))
5667 : 0 : goto next_after_fail1607;
5668 : 0 : res_op2 = _r1;
5669 : : }
5670 : 0 : tree _r;
5671 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5672 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
5673 : 0 : return _r;
5674 : : }
5675 : 0 : next_after_fail1607:;
5676 : : }
5677 : : }
5678 : 0 : break;
5679 : : }
5680 : 4492 : default:;
5681 : : }
5682 : 4492 : switch (TREE_CODE (_p1))
5683 : : {
5684 : 0 : case VEC_COND_EXPR:
5685 : 0 : {
5686 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5687 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
5688 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
5689 : 0 : {
5690 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
5691 : 0 : if (VECTOR_TYPE_P (type)
5692 : 0 : && (TREE_CODE_CLASS (CEIL_DIV_EXPR) != tcc_comparison
5693 : : || types_match (type, TREE_TYPE (captures[3]))
5694 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
5695 : : || (optimize_vectors_before_lowering_p ()
5696 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
5697 : : )
5698 : : {
5699 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1608;
5700 : 0 : {
5701 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1608;
5702 : 0 : tree res_op0;
5703 : 0 : res_op0 = captures[2];
5704 : 0 : tree res_op1;
5705 : 0 : {
5706 : 0 : tree _o1[2], _r1;
5707 : 0 : _o1[0] = unshare_expr (captures[0]);
5708 : 0 : _o1[1] = captures[3];
5709 : 0 : _r1 = fold_build2_loc (loc, CEIL_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5710 : 0 : if (EXPR_P (_r1))
5711 : 0 : goto next_after_fail1608;
5712 : 0 : res_op1 = _r1;
5713 : : }
5714 : 0 : tree res_op2;
5715 : 0 : {
5716 : 0 : tree _o1[2], _r1;
5717 : 0 : _o1[0] = captures[0];
5718 : 0 : _o1[1] = captures[4];
5719 : 0 : _r1 = fold_build2_loc (loc, CEIL_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5720 : 0 : if (EXPR_P (_r1))
5721 : 0 : goto next_after_fail1608;
5722 : 0 : res_op2 = _r1;
5723 : : }
5724 : 0 : tree _r;
5725 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5726 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
5727 : 0 : return _r;
5728 : : }
5729 : 0 : next_after_fail1608:;
5730 : : }
5731 : : }
5732 : 0 : break;
5733 : : }
5734 : : default:;
5735 : : }
5736 : : return NULL_TREE;
5737 : : }
5738 : :
5739 : : tree
5740 : 3385805 : generic_simplify_EXACT_DIV_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
5741 : : {
5742 : 3385805 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5743 : 3385805 : if (integer_onep (_p1))
5744 : : {
5745 : 2172732 : {
5746 : 2172732 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5747 : 2172732 : tree res = generic_simplify_176 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5748 : 2172732 : if (res) return res;
5749 : : }
5750 : : }
5751 : 1213073 : switch (TREE_CODE (_p0))
5752 : : {
5753 : 8737 : CASE_CONVERT:
5754 : 8737 : {
5755 : 8737 : tree _q20 = TREE_OPERAND (_p0, 0);
5756 : 8737 : switch (TREE_CODE (_p1))
5757 : : {
5758 : 0 : CASE_CONVERT:
5759 : 0 : {
5760 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
5761 : 0 : switch (TREE_CODE (_q40))
5762 : : {
5763 : 0 : case LSHIFT_EXPR:
5764 : 0 : {
5765 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5766 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
5767 : 0 : if (integer_onep (_q50))
5768 : : {
5769 : 0 : {
5770 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q50, _q51 };
5771 : 0 : tree res = generic_simplify_299 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5772 : 0 : if (res) return res;
5773 : : }
5774 : : }
5775 : : break;
5776 : : }
5777 : : default:;
5778 : : }
5779 : : break;
5780 : : }
5781 : 0 : case LSHIFT_EXPR:
5782 : 0 : {
5783 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
5784 : 0 : tree _q41 = TREE_OPERAND (_p1, 1);
5785 : 0 : if (integer_onep (_q40))
5786 : : {
5787 : 0 : {
5788 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q41 };
5789 : 0 : tree res = generic_simplify_299 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5790 : 0 : if (res) return res;
5791 : : }
5792 : : }
5793 : : break;
5794 : : }
5795 : : default:;
5796 : : }
5797 : : break;
5798 : : }
5799 : 1213073 : default:;
5800 : : }
5801 : 1213073 : switch (TREE_CODE (_p1))
5802 : : {
5803 : 2 : CASE_CONVERT:
5804 : 2 : {
5805 : 2 : tree _q30 = TREE_OPERAND (_p1, 0);
5806 : 2 : switch (TREE_CODE (_q30))
5807 : : {
5808 : 0 : case LSHIFT_EXPR:
5809 : 0 : {
5810 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
5811 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
5812 : 0 : if (integer_onep (_q40))
5813 : : {
5814 : 0 : {
5815 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q40, _q41 };
5816 : 0 : tree res = generic_simplify_300 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5817 : 0 : if (res) return res;
5818 : : }
5819 : : }
5820 : : break;
5821 : : }
5822 : : default:;
5823 : : }
5824 : : break;
5825 : : }
5826 : 0 : case LSHIFT_EXPR:
5827 : 0 : {
5828 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5829 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
5830 : 0 : if (integer_onep (_q30))
5831 : : {
5832 : 0 : {
5833 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q31 };
5834 : 0 : tree res = generic_simplify_300 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5835 : 0 : if (res) return res;
5836 : : }
5837 : : }
5838 : : break;
5839 : : }
5840 : 1213073 : default:;
5841 : : }
5842 : 1213073 : if (integer_zerop (_p0))
5843 : : {
5844 : 0 : {
5845 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5846 : 0 : tree res = generic_simplify_301 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5847 : 0 : if (res) return res;
5848 : : }
5849 : : }
5850 : 1213073 : switch (TREE_CODE (_p1))
5851 : : {
5852 : 0 : case SSA_NAME:
5853 : 0 : {
5854 : 0 : {
5855 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5856 : 0 : tree res = generic_simplify_303 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5857 : 0 : if (res) return res;
5858 : : }
5859 : 0 : break;
5860 : : }
5861 : 1213073 : default:;
5862 : : }
5863 : 1213073 : if (integer_minus_onep (_p1))
5864 : : {
5865 : 0 : {
5866 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5867 : 0 : tree res = generic_simplify_302 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5868 : 0 : if (res) return res;
5869 : : }
5870 : : }
5871 : 1213073 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
5872 : : {
5873 : 0 : {
5874 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5875 : 0 : tree res = generic_simplify_304 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5876 : 0 : if (res) return res;
5877 : : }
5878 : : }
5879 : 1213073 : switch (TREE_CODE (_p1))
5880 : : {
5881 : 0 : case ABS_EXPR:
5882 : 0 : {
5883 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5884 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5885 : : {
5886 : 0 : {
5887 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5888 : 0 : tree res = generic_simplify_305 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5889 : 0 : if (res) return res;
5890 : : }
5891 : : }
5892 : : break;
5893 : : }
5894 : 1213073 : default:;
5895 : : }
5896 : 1213073 : switch (TREE_CODE (_p0))
5897 : : {
5898 : 0 : case ABS_EXPR:
5899 : 0 : {
5900 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5901 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5902 : : {
5903 : 0 : {
5904 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5905 : 0 : tree res = generic_simplify_305 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5906 : 0 : if (res) return res;
5907 : : }
5908 : : }
5909 : : break;
5910 : : }
5911 : 1213073 : default:;
5912 : : }
5913 : 1213073 : switch (TREE_CODE (_p1))
5914 : : {
5915 : 0 : case NEGATE_EXPR:
5916 : 0 : {
5917 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5918 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5919 : : {
5920 : 0 : {
5921 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5922 : 0 : tree res = generic_simplify_306 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5923 : 0 : if (res) return res;
5924 : : }
5925 : : }
5926 : : break;
5927 : : }
5928 : 1213073 : default:;
5929 : : }
5930 : 1213073 : switch (TREE_CODE (_p0))
5931 : : {
5932 : 1410 : case NEGATE_EXPR:
5933 : 1410 : {
5934 : 1410 : tree _q20 = TREE_OPERAND (_p0, 0);
5935 : 1410 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5936 : : {
5937 : 0 : {
5938 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5939 : 0 : tree res = generic_simplify_306 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5940 : 0 : if (res) return res;
5941 : : }
5942 : : }
5943 : : break;
5944 : : }
5945 : 0 : case EXACT_DIV_EXPR:
5946 : 0 : {
5947 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5948 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5949 : 0 : switch (TREE_CODE (_q21))
5950 : : {
5951 : 0 : case INTEGER_CST:
5952 : 0 : {
5953 : 0 : switch (TREE_CODE (_p1))
5954 : : {
5955 : 0 : case INTEGER_CST:
5956 : 0 : {
5957 : 0 : {
5958 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
5959 : 0 : tree res = generic_simplify_307 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5960 : 0 : if (res) return res;
5961 : : }
5962 : 0 : break;
5963 : : }
5964 : : default:;
5965 : : }
5966 : : break;
5967 : : }
5968 : : default:;
5969 : : }
5970 : : break;
5971 : : }
5972 : 8737 : CASE_CONVERT:
5973 : 8737 : {
5974 : 8737 : tree _q20 = TREE_OPERAND (_p0, 0);
5975 : 8737 : switch (TREE_CODE (_q20))
5976 : : {
5977 : 0 : case BIT_AND_EXPR:
5978 : 0 : {
5979 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
5980 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
5981 : 0 : switch (TREE_CODE (_q31))
5982 : : {
5983 : 0 : case INTEGER_CST:
5984 : 0 : {
5985 : 0 : switch (TREE_CODE (_p1))
5986 : : {
5987 : 0 : case INTEGER_CST:
5988 : 0 : {
5989 : 0 : {
5990 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5991 : 0 : tree res = generic_simplify_308 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
5992 : 0 : if (res) return res;
5993 : : }
5994 : 0 : break;
5995 : : }
5996 : : default:;
5997 : : }
5998 : : break;
5999 : : }
6000 : : default:;
6001 : : }
6002 : : break;
6003 : : }
6004 : : default:;
6005 : : }
6006 : : break;
6007 : : }
6008 : 0 : case BIT_AND_EXPR:
6009 : 0 : {
6010 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
6011 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
6012 : 0 : switch (TREE_CODE (_q21))
6013 : : {
6014 : 0 : case INTEGER_CST:
6015 : 0 : {
6016 : 0 : switch (TREE_CODE (_p1))
6017 : : {
6018 : 0 : case INTEGER_CST:
6019 : 0 : {
6020 : 0 : {
6021 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6022 : 0 : tree res = generic_simplify_308 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
6023 : 0 : if (res) return res;
6024 : : }
6025 : 0 : break;
6026 : : }
6027 : : default:;
6028 : : }
6029 : : break;
6030 : : }
6031 : : default:;
6032 : : }
6033 : : break;
6034 : : }
6035 : 17911 : case MULT_EXPR:
6036 : 17911 : {
6037 : 17911 : tree _q20 = TREE_OPERAND (_p0, 0);
6038 : 17911 : tree _q21 = TREE_OPERAND (_p0, 1);
6039 : 17911 : if (integer_pow2p (_q21))
6040 : : {
6041 : 16794 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6042 : : {
6043 : 16692 : {
6044 : 16692 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6045 : 16692 : tree res = generic_simplify_309 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
6046 : 16692 : if (res) return res;
6047 : : }
6048 : : }
6049 : : }
6050 : 1226 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6051 : : {
6052 : 7 : {
6053 : 7 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6054 : 7 : tree res = generic_simplify_310 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
6055 : 7 : if (res) return res;
6056 : : }
6057 : : }
6058 : 1219 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6059 : : {
6060 : 0 : {
6061 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6062 : 0 : tree res = generic_simplify_310 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
6063 : 0 : if (res) return res;
6064 : : }
6065 : : }
6066 : 1219 : switch (TREE_CODE (_q21))
6067 : : {
6068 : 1219 : case INTEGER_CST:
6069 : 1219 : {
6070 : 1219 : switch (TREE_CODE (_p1))
6071 : : {
6072 : 0 : case MULT_EXPR:
6073 : 0 : {
6074 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6075 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6076 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6077 : : {
6078 : 0 : switch (TREE_CODE (_q51))
6079 : : {
6080 : 0 : case INTEGER_CST:
6081 : 0 : {
6082 : 0 : {
6083 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6084 : 0 : tree res = generic_simplify_311 (loc, type, _p0, _p1, captures, EXACT_DIV_EXPR);
6085 : 0 : if (res) return res;
6086 : : }
6087 : 0 : break;
6088 : : }
6089 : : default:;
6090 : : }
6091 : : }
6092 : : break;
6093 : : }
6094 : : default:;
6095 : : }
6096 : : break;
6097 : : }
6098 : : default:;
6099 : : }
6100 : : break;
6101 : : }
6102 : 0 : case VEC_COND_EXPR:
6103 : 0 : {
6104 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
6105 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
6106 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
6107 : 0 : switch (TREE_CODE (_p1))
6108 : : {
6109 : 0 : case VEC_COND_EXPR:
6110 : 0 : {
6111 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
6112 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
6113 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
6114 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
6115 : : {
6116 : 0 : {
6117 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
6118 : 0 : if (VECTOR_TYPE_P (type)
6119 : 0 : && (TREE_CODE_CLASS (EXACT_DIV_EXPR) != tcc_comparison
6120 : : || types_match (type, TREE_TYPE (captures[2]))
6121 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
6122 : : || (optimize_vectors_before_lowering_p ()
6123 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
6124 : : )
6125 : : {
6126 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1615;
6127 : 0 : {
6128 : 0 : tree res_op0;
6129 : 0 : res_op0 = captures[1];
6130 : 0 : tree res_op1;
6131 : 0 : {
6132 : 0 : tree _o1[2], _r1;
6133 : 0 : _o1[0] = captures[2];
6134 : 0 : _o1[1] = captures[5];
6135 : 0 : _r1 = fold_build2_loc (loc, EXACT_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6136 : 0 : if (EXPR_P (_r1))
6137 : 0 : goto next_after_fail1615;
6138 : 0 : res_op1 = _r1;
6139 : : }
6140 : 0 : tree res_op2;
6141 : 0 : {
6142 : 0 : tree _o1[2], _r1;
6143 : 0 : _o1[0] = captures[3];
6144 : 0 : _o1[1] = captures[6];
6145 : 0 : _r1 = fold_build2_loc (loc, EXACT_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6146 : 0 : if (EXPR_P (_r1))
6147 : 0 : goto next_after_fail1615;
6148 : 0 : res_op2 = _r1;
6149 : : }
6150 : 0 : tree _r;
6151 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
6152 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
6153 : 0 : return _r;
6154 : : }
6155 : 0 : next_after_fail1615:;
6156 : : }
6157 : : }
6158 : : }
6159 : : break;
6160 : : }
6161 : 0 : default:;
6162 : : }
6163 : 0 : {
6164 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
6165 : 0 : if (VECTOR_TYPE_P (type)
6166 : 0 : && (TREE_CODE_CLASS (EXACT_DIV_EXPR) != tcc_comparison
6167 : : || types_match (type, TREE_TYPE (captures[2]))
6168 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
6169 : : || (optimize_vectors_before_lowering_p ()
6170 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
6171 : : )
6172 : : {
6173 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1616;
6174 : 0 : {
6175 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1616;
6176 : 0 : tree res_op0;
6177 : 0 : res_op0 = captures[1];
6178 : 0 : tree res_op1;
6179 : 0 : {
6180 : 0 : tree _o1[2], _r1;
6181 : 0 : _o1[0] = captures[2];
6182 : 0 : _o1[1] = unshare_expr (captures[4]);
6183 : 0 : _r1 = fold_build2_loc (loc, EXACT_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6184 : 0 : if (EXPR_P (_r1))
6185 : 0 : goto next_after_fail1616;
6186 : 0 : res_op1 = _r1;
6187 : : }
6188 : 0 : tree res_op2;
6189 : 0 : {
6190 : 0 : tree _o1[2], _r1;
6191 : 0 : _o1[0] = captures[3];
6192 : 0 : _o1[1] = captures[4];
6193 : 0 : _r1 = fold_build2_loc (loc, EXACT_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6194 : 0 : if (EXPR_P (_r1))
6195 : 0 : goto next_after_fail1616;
6196 : 0 : res_op2 = _r1;
6197 : : }
6198 : 0 : tree _r;
6199 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
6200 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
6201 : 0 : return _r;
6202 : : }
6203 : 0 : next_after_fail1616:;
6204 : : }
6205 : : }
6206 : 0 : break;
6207 : : }
6208 : 1196381 : default:;
6209 : : }
6210 : 1196381 : switch (TREE_CODE (_p1))
6211 : : {
6212 : 0 : case VEC_COND_EXPR:
6213 : 0 : {
6214 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
6215 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
6216 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
6217 : 0 : {
6218 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
6219 : 0 : if (VECTOR_TYPE_P (type)
6220 : 0 : && (TREE_CODE_CLASS (EXACT_DIV_EXPR) != tcc_comparison
6221 : : || types_match (type, TREE_TYPE (captures[3]))
6222 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
6223 : : || (optimize_vectors_before_lowering_p ()
6224 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
6225 : : )
6226 : : {
6227 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1617;
6228 : 0 : {
6229 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1617;
6230 : 0 : tree res_op0;
6231 : 0 : res_op0 = captures[2];
6232 : 0 : tree res_op1;
6233 : 0 : {
6234 : 0 : tree _o1[2], _r1;
6235 : 0 : _o1[0] = unshare_expr (captures[0]);
6236 : 0 : _o1[1] = captures[3];
6237 : 0 : _r1 = fold_build2_loc (loc, EXACT_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6238 : 0 : if (EXPR_P (_r1))
6239 : 0 : goto next_after_fail1617;
6240 : 0 : res_op1 = _r1;
6241 : : }
6242 : 0 : tree res_op2;
6243 : 0 : {
6244 : 0 : tree _o1[2], _r1;
6245 : 0 : _o1[0] = captures[0];
6246 : 0 : _o1[1] = captures[4];
6247 : 0 : _r1 = fold_build2_loc (loc, EXACT_DIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6248 : 0 : if (EXPR_P (_r1))
6249 : 0 : goto next_after_fail1617;
6250 : 0 : res_op2 = _r1;
6251 : : }
6252 : 0 : tree _r;
6253 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
6254 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
6255 : 0 : return _r;
6256 : : }
6257 : 0 : next_after_fail1617:;
6258 : : }
6259 : : }
6260 : 0 : break;
6261 : : }
6262 : : default:;
6263 : : }
6264 : : return NULL_TREE;
6265 : : }
6266 : :
6267 : : tree
6268 : 8511179 : generic_simplify_LE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
6269 : : {
6270 : 8511179 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6271 : 8511179 : switch (TREE_CODE (_p0))
6272 : : {
6273 : 2331 : case RDIV_EXPR:
6274 : 2331 : {
6275 : 2331 : tree _q20 = TREE_OPERAND (_p0, 0);
6276 : 2331 : tree _q21 = TREE_OPERAND (_p0, 1);
6277 : 2331 : switch (TREE_CODE (_q20))
6278 : : {
6279 : 547 : case REAL_CST:
6280 : 547 : {
6281 : 547 : if (real_zerop (_p1))
6282 : : {
6283 : 2 : {
6284 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6285 : 2 : tree res = generic_simplify_331 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
6286 : 2 : if (res) return res;
6287 : : }
6288 : : }
6289 : : break;
6290 : : }
6291 : : default:;
6292 : : }
6293 : : break;
6294 : : }
6295 : 8511177 : default:;
6296 : : }
6297 : 8511177 : switch (TREE_CODE (_p1))
6298 : : {
6299 : 7 : case TRUNC_MOD_EXPR:
6300 : 7 : {
6301 : 7 : tree _q30 = TREE_OPERAND (_p1, 0);
6302 : 7 : tree _q31 = TREE_OPERAND (_p1, 1);
6303 : 7 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6304 : : {
6305 : 0 : {
6306 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
6307 : 0 : tree res = generic_simplify_332 (loc, type, _p0, _p1, captures, GE_EXPR);
6308 : 0 : if (res) return res;
6309 : : }
6310 : : }
6311 : : break;
6312 : : }
6313 : 8511177 : default:;
6314 : : }
6315 : 8511177 : switch (TREE_CODE (_p0))
6316 : : {
6317 : 60343 : case MULT_EXPR:
6318 : 60343 : {
6319 : 60343 : tree _q20 = TREE_OPERAND (_p0, 0);
6320 : 60343 : tree _q21 = TREE_OPERAND (_p0, 1);
6321 : 60343 : switch (TREE_CODE (_p1))
6322 : : {
6323 : 2674 : case MULT_EXPR:
6324 : 2674 : {
6325 : 2674 : tree _q50 = TREE_OPERAND (_p1, 0);
6326 : 2674 : tree _q51 = TREE_OPERAND (_p1, 1);
6327 : 2674 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6328 : : {
6329 : 1848 : {
6330 : 1848 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6331 : 1848 : tree res = generic_simplify_333 (loc, type, _p0, _p1, captures, LE_EXPR);
6332 : 1848 : if (res) return res;
6333 : : }
6334 : : }
6335 : 1697 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6336 : : {
6337 : 1 : {
6338 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6339 : 1 : tree res = generic_simplify_333 (loc, type, _p0, _p1, captures, LE_EXPR);
6340 : 1 : if (res) return res;
6341 : : }
6342 : : }
6343 : 1697 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6344 : : {
6345 : 6 : {
6346 : 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
6347 : 6 : tree res = generic_simplify_333 (loc, type, _p0, _p1, captures, LE_EXPR);
6348 : 6 : if (res) return res;
6349 : : }
6350 : : }
6351 : 1697 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6352 : : {
6353 : 309 : {
6354 : 309 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
6355 : 309 : tree res = generic_simplify_333 (loc, type, _p0, _p1, captures, LE_EXPR);
6356 : 309 : if (res) return res;
6357 : : }
6358 : : }
6359 : : break;
6360 : : }
6361 : : default:;
6362 : : }
6363 : : break;
6364 : : }
6365 : 1553762 : case PLUS_EXPR:
6366 : 1553762 : {
6367 : 1553762 : tree _q20 = TREE_OPERAND (_p0, 0);
6368 : 1553762 : tree _q21 = TREE_OPERAND (_p0, 1);
6369 : 1553762 : if (integer_minus_onep (_q21))
6370 : : {
6371 : 513954 : switch (TREE_CODE (_p1))
6372 : : {
6373 : 311926 : case INTEGER_CST:
6374 : 311926 : {
6375 : 311926 : {
6376 : 311926 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6377 : 311926 : tree res = generic_simplify_358 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR);
6378 : 311926 : if (res) return res;
6379 : : }
6380 : 311924 : break;
6381 : : }
6382 : : default:;
6383 : : }
6384 : : }
6385 : 1553760 : switch (TREE_CODE (_p1))
6386 : : {
6387 : 86196 : case PLUS_EXPR:
6388 : 86196 : {
6389 : 86196 : tree _q50 = TREE_OPERAND (_p1, 0);
6390 : 86196 : tree _q51 = TREE_OPERAND (_p1, 1);
6391 : 86196 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6392 : : {
6393 : 6184 : {
6394 : 6184 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6395 : 6184 : tree res = generic_simplify_334 (loc, type, _p0, _p1, captures, LE_EXPR);
6396 : 6184 : if (res) return res;
6397 : : }
6398 : : }
6399 : 82279 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6400 : : {
6401 : 16 : {
6402 : 16 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6403 : 16 : tree res = generic_simplify_334 (loc, type, _p0, _p1, captures, LE_EXPR);
6404 : 16 : if (res) return res;
6405 : : }
6406 : : }
6407 : 82279 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6408 : : {
6409 : 197 : {
6410 : 197 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
6411 : 197 : tree res = generic_simplify_334 (loc, type, _p0, _p1, captures, LE_EXPR);
6412 : 197 : if (res) return res;
6413 : : }
6414 : : }
6415 : 82271 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6416 : : {
6417 : 6516 : {
6418 : 6516 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
6419 : 6516 : tree res = generic_simplify_334 (loc, type, _p0, _p1, captures, LE_EXPR);
6420 : 6516 : if (res) return res;
6421 : : }
6422 : : }
6423 : : break;
6424 : : }
6425 : 1549251 : default:;
6426 : : }
6427 : 1549251 : switch (TREE_CODE (_q21))
6428 : : {
6429 : 1436581 : case INTEGER_CST:
6430 : 1436581 : {
6431 : 1436581 : switch (TREE_CODE (_p1))
6432 : : {
6433 : 79685 : case PLUS_EXPR:
6434 : 79685 : {
6435 : 79685 : tree _q50 = TREE_OPERAND (_p1, 0);
6436 : 79685 : tree _q51 = TREE_OPERAND (_p1, 1);
6437 : 79685 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6438 : : {
6439 : 2209 : {
6440 : 2209 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6441 : 2209 : tree res = generic_simplify_335 (loc, type, _p0, _p1, captures, LE_EXPR);
6442 : 2209 : if (res) return res;
6443 : : }
6444 : : }
6445 : : break;
6446 : : }
6447 : : default:;
6448 : : }
6449 : : break;
6450 : : }
6451 : 1549251 : default:;
6452 : : }
6453 : 1549251 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6454 : : {
6455 : 71868 : {
6456 : 71868 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
6457 : 71868 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, LE_EXPR);
6458 : 71868 : if (res) return res;
6459 : : }
6460 : : }
6461 : 1508012 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6462 : : {
6463 : 2945 : {
6464 : 2945 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
6465 : 2945 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, LE_EXPR);
6466 : 2945 : if (res) return res;
6467 : : }
6468 : : }
6469 : : break;
6470 : : }
6471 : 1449391 : CASE_CONVERT:
6472 : 1449391 : {
6473 : 1449391 : tree _q20 = TREE_OPERAND (_p0, 0);
6474 : 1449391 : switch (TREE_CODE (_q20))
6475 : : {
6476 : 0 : case EXACT_DIV_EXPR:
6477 : 0 : {
6478 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
6479 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
6480 : 0 : switch (TREE_CODE (_q31))
6481 : : {
6482 : 0 : case INTEGER_CST:
6483 : 0 : {
6484 : 0 : switch (TREE_CODE (_p1))
6485 : : {
6486 : 0 : CASE_CONVERT:
6487 : 0 : {
6488 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
6489 : 0 : switch (TREE_CODE (_q60))
6490 : : {
6491 : 0 : case EXACT_DIV_EXPR:
6492 : 0 : {
6493 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
6494 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
6495 : 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
6496 : : {
6497 : 0 : {
6498 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q70 };
6499 : 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, LE_EXPR);
6500 : 0 : if (res) return res;
6501 : : }
6502 : : }
6503 : : break;
6504 : : }
6505 : : default:;
6506 : : }
6507 : : break;
6508 : : }
6509 : : default:;
6510 : : }
6511 : : break;
6512 : : }
6513 : : default:;
6514 : : }
6515 : : break;
6516 : : }
6517 : : default:;
6518 : : }
6519 : : break;
6520 : : }
6521 : 436 : case EXACT_DIV_EXPR:
6522 : 436 : {
6523 : 436 : tree _q20 = TREE_OPERAND (_p0, 0);
6524 : 436 : tree _q21 = TREE_OPERAND (_p0, 1);
6525 : 436 : switch (TREE_CODE (_q21))
6526 : : {
6527 : 436 : case INTEGER_CST:
6528 : 436 : {
6529 : 436 : switch (TREE_CODE (_p1))
6530 : : {
6531 : 0 : case EXACT_DIV_EXPR:
6532 : 0 : {
6533 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6534 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6535 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6536 : : {
6537 : 0 : {
6538 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
6539 : 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, LE_EXPR);
6540 : 0 : if (res) return res;
6541 : : }
6542 : : }
6543 : : break;
6544 : : }
6545 : : default:;
6546 : : }
6547 : : break;
6548 : : }
6549 : : default:;
6550 : : }
6551 : : break;
6552 : : }
6553 : 10125 : case TRUNC_DIV_EXPR:
6554 : 10125 : {
6555 : 10125 : tree _q20 = TREE_OPERAND (_p0, 0);
6556 : 10125 : tree _q21 = TREE_OPERAND (_p0, 1);
6557 : 10125 : switch (TREE_CODE (_q21))
6558 : : {
6559 : 2340 : case INTEGER_CST:
6560 : 2340 : {
6561 : 2340 : switch (TREE_CODE (_p1))
6562 : : {
6563 : 1392 : case INTEGER_CST:
6564 : 1392 : {
6565 : 1392 : {
6566 : 1392 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
6567 : 1392 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, LE_EXPR);
6568 : 1392 : if (res) return res;
6569 : : }
6570 : 670 : break;
6571 : : }
6572 : : default:;
6573 : : }
6574 : : break;
6575 : : }
6576 : : default:;
6577 : : }
6578 : : break;
6579 : : }
6580 : 66260 : case MINUS_EXPR:
6581 : 66260 : {
6582 : 66260 : tree _q20 = TREE_OPERAND (_p0, 0);
6583 : 66260 : tree _q21 = TREE_OPERAND (_p0, 1);
6584 : 66260 : switch (TREE_CODE (_p1))
6585 : : {
6586 : 229 : case MINUS_EXPR:
6587 : 229 : {
6588 : 229 : tree _q50 = TREE_OPERAND (_p1, 0);
6589 : 229 : tree _q51 = TREE_OPERAND (_p1, 1);
6590 : 229 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6591 : : {
6592 : 56 : {
6593 : 56 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6594 : 56 : tree res = generic_simplify_337 (loc, type, _p0, _p1, captures, LE_EXPR);
6595 : 56 : if (res) return res;
6596 : : }
6597 : : }
6598 : 229 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6599 : : {
6600 : 26 : {
6601 : 26 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6602 : 26 : tree res = generic_simplify_338 (loc, type, _p0, _p1, captures, LE_EXPR);
6603 : 26 : if (res) return res;
6604 : : }
6605 : : }
6606 : : break;
6607 : : }
6608 : : default:;
6609 : : }
6610 : : break;
6611 : : }
6612 : 6454 : case POINTER_DIFF_EXPR:
6613 : 6454 : {
6614 : 6454 : tree _q20 = TREE_OPERAND (_p0, 0);
6615 : 6454 : tree _q21 = TREE_OPERAND (_p0, 1);
6616 : 6454 : switch (TREE_CODE (_p1))
6617 : : {
6618 : 8 : case POINTER_DIFF_EXPR:
6619 : 8 : {
6620 : 8 : tree _q50 = TREE_OPERAND (_p1, 0);
6621 : 8 : tree _q51 = TREE_OPERAND (_p1, 1);
6622 : 8 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6623 : : {
6624 : 0 : {
6625 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
6626 : 0 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, LE_EXPR);
6627 : 0 : if (res) return res;
6628 : : }
6629 : : }
6630 : 8 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6631 : : {
6632 : 0 : {
6633 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
6634 : 0 : tree res = generic_simplify_212 (loc, type, _p0, _p1, captures, LE_EXPR);
6635 : 0 : if (res) return res;
6636 : : }
6637 : : }
6638 : : break;
6639 : : }
6640 : : default:;
6641 : : }
6642 : : break;
6643 : : }
6644 : 8463423 : default:;
6645 : : }
6646 : 8463423 : switch (TREE_CODE (_p1))
6647 : : {
6648 : 121359 : case PLUS_EXPR:
6649 : 121359 : {
6650 : 121359 : tree _q30 = TREE_OPERAND (_p1, 0);
6651 : 121359 : tree _q31 = TREE_OPERAND (_p1, 1);
6652 : 121359 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6653 : : {
6654 : 0 : {
6655 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
6656 : 0 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, GE_EXPR);
6657 : 0 : if (res) return res;
6658 : : }
6659 : : }
6660 : 121359 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6661 : : {
6662 : 57 : {
6663 : 57 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q31, _p0 };
6664 : 57 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, GE_EXPR);
6665 : 57 : if (res) return res;
6666 : : }
6667 : : }
6668 : : break;
6669 : : }
6670 : 931 : case MINUS_EXPR:
6671 : 931 : {
6672 : 931 : tree _q30 = TREE_OPERAND (_p1, 0);
6673 : 931 : tree _q31 = TREE_OPERAND (_p1, 1);
6674 : 931 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6675 : : {
6676 : 0 : {
6677 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
6678 : 0 : tree res = generic_simplify_210 (loc, type, _p0, _p1, captures, LE_EXPR);
6679 : 0 : if (res) return res;
6680 : : }
6681 : : }
6682 : : break;
6683 : : }
6684 : 8463396 : default:;
6685 : : }
6686 : 8463396 : switch (TREE_CODE (_p0))
6687 : : {
6688 : 66260 : case MINUS_EXPR:
6689 : 66260 : {
6690 : 66260 : tree _q20 = TREE_OPERAND (_p0, 0);
6691 : 66260 : tree _q21 = TREE_OPERAND (_p0, 1);
6692 : 66260 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6693 : : {
6694 : 2495 : {
6695 : 2495 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
6696 : 2495 : tree res = generic_simplify_210 (loc, type, _p0, _p1, captures, GE_EXPR);
6697 : 2495 : if (res) return res;
6698 : : }
6699 : : }
6700 : : break;
6701 : : }
6702 : 5130 : case BIT_AND_EXPR:
6703 : 5130 : {
6704 : 5130 : tree _q20 = TREE_OPERAND (_p0, 0);
6705 : 5130 : tree _q21 = TREE_OPERAND (_p0, 1);
6706 : 5130 : if (tree_expr_nonnegative_p (_q20))
6707 : : {
6708 : 4339 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6709 : : {
6710 : 0 : {
6711 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6712 : 0 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, LE_EXPR, BIT_AND_EXPR);
6713 : 0 : if (res) return res;
6714 : : }
6715 : : }
6716 : : }
6717 : 5130 : if (tree_expr_nonnegative_p (_q21))
6718 : : {
6719 : 4746 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6720 : : {
6721 : 0 : {
6722 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6723 : 0 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, LE_EXPR, BIT_AND_EXPR);
6724 : 0 : if (res) return res;
6725 : : }
6726 : : }
6727 : : }
6728 : : break;
6729 : : }
6730 : 8463396 : default:;
6731 : : }
6732 : 8463396 : switch (TREE_CODE (_p1))
6733 : : {
6734 : 81 : case BIT_IOR_EXPR:
6735 : 81 : {
6736 : 81 : tree _q30 = TREE_OPERAND (_p1, 0);
6737 : 81 : tree _q31 = TREE_OPERAND (_p1, 1);
6738 : 81 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6739 : : {
6740 : 0 : if (tree_expr_nonnegative_p (_q30))
6741 : : {
6742 : 0 : {
6743 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6744 : 0 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, GE_EXPR, BIT_IOR_EXPR);
6745 : 0 : if (res) return res;
6746 : : }
6747 : : }
6748 : : }
6749 : 81 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6750 : : {
6751 : 0 : if (tree_expr_nonnegative_p (_q31))
6752 : : {
6753 : 0 : {
6754 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6755 : 0 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, GE_EXPR, BIT_IOR_EXPR);
6756 : 0 : if (res) return res;
6757 : : }
6758 : : }
6759 : : }
6760 : : break;
6761 : : }
6762 : 8463396 : default:;
6763 : : }
6764 : 8463396 : switch (TREE_CODE (_p0))
6765 : : {
6766 : 4046 : case MAX_EXPR:
6767 : 4046 : {
6768 : 4046 : tree _q20 = TREE_OPERAND (_p0, 0);
6769 : 4046 : tree _q21 = TREE_OPERAND (_p0, 1);
6770 : 4046 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6771 : : {
6772 : 0 : {
6773 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6774 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR, GE_EXPR);
6775 : 0 : if (res) return res;
6776 : : }
6777 : : }
6778 : 4046 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6779 : : {
6780 : 1 : {
6781 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6782 : 1 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR, GE_EXPR);
6783 : 1 : if (res) return res;
6784 : : }
6785 : : }
6786 : 4045 : switch (TREE_CODE (_q21))
6787 : : {
6788 : 3780 : case INTEGER_CST:
6789 : 3780 : {
6790 : 3780 : switch (TREE_CODE (_p1))
6791 : : {
6792 : 0 : case INTEGER_CST:
6793 : 0 : {
6794 : 0 : {
6795 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6796 : 0 : tree res = generic_simplify_340 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR, BIT_AND_EXPR);
6797 : 0 : if (res) return res;
6798 : : }
6799 : 0 : break;
6800 : : }
6801 : : default:;
6802 : : }
6803 : : break;
6804 : : }
6805 : : default:;
6806 : : }
6807 : : break;
6808 : : }
6809 : 8463395 : default:;
6810 : : }
6811 : 8463395 : switch (TREE_CODE (_p1))
6812 : : {
6813 : 303 : case MIN_EXPR:
6814 : 303 : {
6815 : 303 : tree _q30 = TREE_OPERAND (_p1, 0);
6816 : 303 : tree _q31 = TREE_OPERAND (_p1, 1);
6817 : 303 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6818 : : {
6819 : 0 : {
6820 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6821 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR, LE_EXPR);
6822 : 0 : if (res) return res;
6823 : : }
6824 : : }
6825 : 303 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6826 : : {
6827 : 0 : {
6828 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6829 : 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR, LE_EXPR);
6830 : 0 : if (res) return res;
6831 : : }
6832 : : }
6833 : : break;
6834 : : }
6835 : 17 : case MAX_EXPR:
6836 : 17 : {
6837 : 17 : tree _q30 = TREE_OPERAND (_p1, 0);
6838 : 17 : tree _q31 = TREE_OPERAND (_p1, 1);
6839 : 17 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6840 : : {
6841 : 0 : {
6842 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6843 : 0 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR);
6844 : 0 : if (res) return res;
6845 : : }
6846 : : }
6847 : 17 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6848 : : {
6849 : 0 : {
6850 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6851 : 0 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR);
6852 : 0 : if (res) return res;
6853 : : }
6854 : : }
6855 : : break;
6856 : : }
6857 : 8463395 : default:;
6858 : : }
6859 : 8463395 : switch (TREE_CODE (_p0))
6860 : : {
6861 : 10245 : case MIN_EXPR:
6862 : 10245 : {
6863 : 10245 : tree _q20 = TREE_OPERAND (_p0, 0);
6864 : 10245 : tree _q21 = TREE_OPERAND (_p0, 1);
6865 : 10245 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6866 : : {
6867 : 0 : {
6868 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6869 : 0 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR);
6870 : 0 : if (res) return res;
6871 : : }
6872 : : }
6873 : 10245 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6874 : : {
6875 : 0 : {
6876 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6877 : 0 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR);
6878 : 0 : if (res) return res;
6879 : : }
6880 : : }
6881 : 10245 : switch (TREE_CODE (_q21))
6882 : : {
6883 : 787 : case INTEGER_CST:
6884 : 787 : {
6885 : 787 : switch (TREE_CODE (_p1))
6886 : : {
6887 : 0 : case INTEGER_CST:
6888 : 0 : {
6889 : 0 : {
6890 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6891 : 0 : tree res = generic_simplify_340 (loc, type, _p0, _p1, captures, MIN_EXPR, LE_EXPR, BIT_IOR_EXPR);
6892 : 0 : if (res) return res;
6893 : : }
6894 : 0 : break;
6895 : : }
6896 : : default:;
6897 : : }
6898 : : break;
6899 : : }
6900 : : default:;
6901 : : }
6902 : : break;
6903 : : }
6904 : 9 : case VEC_COND_EXPR:
6905 : 9 : {
6906 : 9 : tree _q20 = TREE_OPERAND (_p0, 0);
6907 : 9 : tree _q21 = TREE_OPERAND (_p0, 1);
6908 : 9 : tree _q22 = TREE_OPERAND (_p0, 2);
6909 : 9 : switch (TREE_CODE (_p1))
6910 : : {
6911 : 2 : case VEC_COND_EXPR:
6912 : 2 : {
6913 : 2 : tree _q60 = TREE_OPERAND (_p1, 0);
6914 : 2 : tree _q61 = TREE_OPERAND (_p1, 1);
6915 : 2 : tree _q62 = TREE_OPERAND (_p1, 2);
6916 : 2 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
6917 : : {
6918 : 0 : {
6919 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
6920 : 0 : if (VECTOR_TYPE_P (type)
6921 : 0 : && (TREE_CODE_CLASS (LE_EXPR) != tcc_comparison
6922 : 0 : || types_match (type, TREE_TYPE (captures[2]))
6923 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
6924 : : || (optimize_vectors_before_lowering_p ()
6925 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
6926 : : )
6927 : : {
6928 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1663;
6929 : 0 : {
6930 : 0 : tree res_op0;
6931 : 0 : res_op0 = captures[1];
6932 : 0 : tree res_op1;
6933 : 0 : {
6934 : 0 : tree _o1[2], _r1;
6935 : 0 : _o1[0] = captures[2];
6936 : 0 : _o1[1] = captures[5];
6937 : 0 : _r1 = fold_build2_loc (loc, LE_EXPR, type, _o1[0], _o1[1]);
6938 : 0 : if (EXPR_P (_r1))
6939 : 0 : goto next_after_fail1663;
6940 : 0 : res_op1 = _r1;
6941 : : }
6942 : 0 : tree res_op2;
6943 : 0 : {
6944 : 0 : tree _o1[2], _r1;
6945 : 0 : _o1[0] = captures[3];
6946 : 0 : _o1[1] = captures[6];
6947 : 0 : _r1 = fold_build2_loc (loc, LE_EXPR, type, _o1[0], _o1[1]);
6948 : 0 : if (EXPR_P (_r1))
6949 : 0 : goto next_after_fail1663;
6950 : 0 : res_op2 = _r1;
6951 : : }
6952 : 0 : tree _r;
6953 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
6954 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
6955 : 0 : return _r;
6956 : : }
6957 : 0 : next_after_fail1663:;
6958 : : }
6959 : : }
6960 : : }
6961 : : break;
6962 : : }
6963 : 9 : default:;
6964 : : }
6965 : 9 : {
6966 : 9 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
6967 : 9 : if (VECTOR_TYPE_P (type)
6968 : 9 : && (TREE_CODE_CLASS (LE_EXPR) != tcc_comparison
6969 : 9 : || types_match (type, TREE_TYPE (captures[2]))
6970 : 9 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
6971 : : || (optimize_vectors_before_lowering_p ()
6972 : 1 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
6973 : : )
6974 : : {
6975 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1664;
6976 : 9 : {
6977 : 9 : if (! tree_invariant_p (captures[4])) goto next_after_fail1664;
6978 : 7 : tree res_op0;
6979 : 7 : res_op0 = captures[1];
6980 : 7 : tree res_op1;
6981 : 7 : {
6982 : 7 : tree _o1[2], _r1;
6983 : 7 : _o1[0] = captures[2];
6984 : 7 : _o1[1] = unshare_expr (captures[4]);
6985 : 7 : _r1 = fold_build2_loc (loc, LE_EXPR, type, _o1[0], _o1[1]);
6986 : 7 : if (EXPR_P (_r1))
6987 : 0 : goto next_after_fail1664;
6988 : 7 : res_op1 = _r1;
6989 : : }
6990 : 7 : tree res_op2;
6991 : 7 : {
6992 : 7 : tree _o1[2], _r1;
6993 : 7 : _o1[0] = captures[3];
6994 : 7 : _o1[1] = captures[4];
6995 : 7 : _r1 = fold_build2_loc (loc, LE_EXPR, type, _o1[0], _o1[1]);
6996 : 7 : if (EXPR_P (_r1))
6997 : 0 : goto next_after_fail1664;
6998 : 7 : res_op2 = _r1;
6999 : : }
7000 : 7 : tree _r;
7001 : 7 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7002 : 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
7003 : 7 : return _r;
7004 : : }
7005 : 2 : next_after_fail1664:;
7006 : : }
7007 : : }
7008 : 2 : break;
7009 : : }
7010 : 8463388 : default:;
7011 : : }
7012 : 8463388 : switch (TREE_CODE (_p1))
7013 : : {
7014 : 2 : case VEC_COND_EXPR:
7015 : 2 : {
7016 : 2 : tree _q30 = TREE_OPERAND (_p1, 0);
7017 : 2 : tree _q31 = TREE_OPERAND (_p1, 1);
7018 : 2 : tree _q32 = TREE_OPERAND (_p1, 2);
7019 : 2 : {
7020 : 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
7021 : 2 : if (VECTOR_TYPE_P (type)
7022 : 2 : && (TREE_CODE_CLASS (LE_EXPR) != tcc_comparison
7023 : 2 : || types_match (type, TREE_TYPE (captures[3]))
7024 : 2 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
7025 : : || (optimize_vectors_before_lowering_p ()
7026 : 1 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
7027 : : )
7028 : : {
7029 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1665;
7030 : 2 : {
7031 : 2 : if (! tree_invariant_p (captures[0])) goto next_after_fail1665;
7032 : 0 : tree res_op0;
7033 : 0 : res_op0 = captures[2];
7034 : 0 : tree res_op1;
7035 : 0 : {
7036 : 0 : tree _o1[2], _r1;
7037 : 0 : _o1[0] = unshare_expr (captures[0]);
7038 : 0 : _o1[1] = captures[3];
7039 : 0 : _r1 = fold_build2_loc (loc, LE_EXPR, type, _o1[0], _o1[1]);
7040 : 0 : if (EXPR_P (_r1))
7041 : 0 : goto next_after_fail1665;
7042 : 0 : res_op1 = _r1;
7043 : : }
7044 : 0 : tree res_op2;
7045 : 0 : {
7046 : 0 : tree _o1[2], _r1;
7047 : 0 : _o1[0] = captures[0];
7048 : 0 : _o1[1] = captures[4];
7049 : 0 : _r1 = fold_build2_loc (loc, LE_EXPR, type, _o1[0], _o1[1]);
7050 : 0 : if (EXPR_P (_r1))
7051 : 0 : goto next_after_fail1665;
7052 : 0 : res_op2 = _r1;
7053 : : }
7054 : 0 : tree _r;
7055 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7056 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
7057 : 0 : return _r;
7058 : : }
7059 : 2 : next_after_fail1665:;
7060 : : }
7061 : : }
7062 : 2 : break;
7063 : : }
7064 : 8463388 : default:;
7065 : : }
7066 : 8463388 : if (uniform_integer_cst_p (_p1))
7067 : : {
7068 : 6140203 : {
7069 : 6140203 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
7070 : 6140203 : tree res = generic_simplify_359 (loc, type, _p0, _p1, captures, LE_EXPR, LT_EXPR);
7071 : 6140203 : if (res) return res;
7072 : : }
7073 : : }
7074 : 8369781 : switch (TREE_CODE (_p0))
7075 : : {
7076 : 58959 : case MULT_EXPR:
7077 : 58959 : {
7078 : 58959 : tree _q20 = TREE_OPERAND (_p0, 0);
7079 : 58959 : tree _q21 = TREE_OPERAND (_p0, 1);
7080 : 58959 : switch (TREE_CODE (_q21))
7081 : : {
7082 : 52073 : case INTEGER_CST:
7083 : 52073 : {
7084 : 52073 : if (integer_zerop (_p1))
7085 : : {
7086 : 918 : {
7087 : 918 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
7088 : 918 : tree res = generic_simplify_240 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
7089 : 918 : if (res) return res;
7090 : : }
7091 : : }
7092 : : break;
7093 : : }
7094 : : default:;
7095 : : }
7096 : : break;
7097 : : }
7098 : 8369072 : default:;
7099 : : }
7100 : 8369072 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
7101 : : {
7102 : 2792 : {
7103 : 2792 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
7104 : 2792 : tree res = generic_simplify_242 (loc, type, _p0, _p1, captures, LE_EXPR);
7105 : 2792 : if (res) return res;
7106 : : }
7107 : : }
7108 : 8366323 : switch (TREE_CODE (_p0))
7109 : : {
7110 : 1838 : case BIT_NOT_EXPR:
7111 : 1838 : {
7112 : 1838 : tree _q20 = TREE_OPERAND (_p0, 0);
7113 : 1838 : switch (TREE_CODE (_p1))
7114 : : {
7115 : 0 : case BIT_NOT_EXPR:
7116 : 0 : {
7117 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
7118 : 0 : {
7119 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _p1, _q40 };
7120 : 0 : tree res = generic_simplify_246 (loc, type, _p0, _p1, captures, LE_EXPR);
7121 : 0 : if (res) return res;
7122 : : }
7123 : 0 : break;
7124 : : }
7125 : 1838 : default:;
7126 : : }
7127 : 1838 : {
7128 : 1838 : tree _p1_pops[1];
7129 : 1838 : if (tree_nop_convert (_p1, _p1_pops))
7130 : : {
7131 : 1 : tree _q40 = _p1_pops[0];
7132 : 1 : switch (TREE_CODE (_q40))
7133 : : {
7134 : 0 : case BIT_NOT_EXPR:
7135 : 0 : {
7136 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
7137 : 0 : {
7138 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q50 };
7139 : 0 : tree res = generic_simplify_246 (loc, type, _p0, _p1, captures, LE_EXPR);
7140 : 0 : if (res) return res;
7141 : : }
7142 : 0 : break;
7143 : : }
7144 : : default:;
7145 : : }
7146 : : }
7147 : : }
7148 : 1838 : if (CONSTANT_CLASS_P (_p1))
7149 : : {
7150 : 1836 : {
7151 : 1836 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7152 : 1836 : tree res = generic_simplify_245 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
7153 : 1836 : if (res) return res;
7154 : : }
7155 : : }
7156 : : break;
7157 : : }
7158 : 8364487 : default:;
7159 : : }
7160 : 8364487 : {
7161 : 8364487 : tree _p0_pops[1];
7162 : 8364487 : if (tree_nop_convert (_p0, _p0_pops))
7163 : : {
7164 : 752836 : tree _q20 = _p0_pops[0];
7165 : 752836 : switch (TREE_CODE (_q20))
7166 : : {
7167 : 0 : case BIT_NOT_EXPR:
7168 : 0 : {
7169 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
7170 : 0 : switch (TREE_CODE (_p1))
7171 : : {
7172 : 0 : case BIT_NOT_EXPR:
7173 : 0 : {
7174 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7175 : 0 : {
7176 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _p1, _q50 };
7177 : 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, LE_EXPR);
7178 : 0 : if (res) return res;
7179 : : }
7180 : 0 : break;
7181 : : }
7182 : 0 : default:;
7183 : : }
7184 : 0 : {
7185 : 0 : tree _p1_pops[1];
7186 : 0 : if (tree_nop_convert (_p1, _p1_pops))
7187 : : {
7188 : 0 : tree _q50 = _p1_pops[0];
7189 : 0 : switch (TREE_CODE (_q50))
7190 : : {
7191 : 0 : case BIT_NOT_EXPR:
7192 : 0 : {
7193 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
7194 : 0 : {
7195 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q60 };
7196 : 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, LE_EXPR);
7197 : 0 : if (res) return res;
7198 : : }
7199 : 0 : break;
7200 : : }
7201 : : default:;
7202 : : }
7203 : : }
7204 : : }
7205 : 0 : if (CONSTANT_CLASS_P (_p1))
7206 : : {
7207 : 0 : {
7208 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
7209 : 0 : tree res = generic_simplify_245 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
7210 : 0 : if (res) return res;
7211 : : }
7212 : : }
7213 : : break;
7214 : : }
7215 : : default:;
7216 : : }
7217 : : }
7218 : : }
7219 : 8364487 : switch (TREE_CODE (_p1))
7220 : : {
7221 : 138382 : case REAL_CST:
7222 : 138382 : {
7223 : 138382 : {
7224 : 138382 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
7225 : 138382 : tree res = generic_simplify_247 (loc, type, _p0, _p1, captures, LE_EXPR);
7226 : 138382 : if (res) return res;
7227 : : }
7228 : 138306 : break;
7229 : : }
7230 : 8364411 : default:;
7231 : : }
7232 : 8364411 : switch (TREE_CODE (_p0))
7233 : : {
7234 : 1506388 : case PLUS_EXPR:
7235 : 1506388 : {
7236 : 1506388 : tree _q20 = TREE_OPERAND (_p0, 0);
7237 : 1506388 : tree _q21 = TREE_OPERAND (_p0, 1);
7238 : 1506388 : switch (TREE_CODE (_q21))
7239 : : {
7240 : 80 : case REAL_CST:
7241 : 80 : {
7242 : 80 : switch (TREE_CODE (_p1))
7243 : : {
7244 : 75 : case REAL_CST:
7245 : 75 : {
7246 : 75 : {
7247 : 75 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7248 : 75 : tree res = generic_simplify_248 (loc, type, _p0, _p1, captures, PLUS_EXPR, LE_EXPR);
7249 : 75 : if (res) return res;
7250 : : }
7251 : 75 : break;
7252 : : }
7253 : : default:;
7254 : : }
7255 : : break;
7256 : : }
7257 : 1414486 : case INTEGER_CST:
7258 : 1414486 : {
7259 : 1414486 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7260 : : {
7261 : 1956 : {
7262 : 1956 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q20, _q21 };
7263 : 1956 : tree res = generic_simplify_343 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR);
7264 : 1956 : if (res) return res;
7265 : : }
7266 : : }
7267 : : break;
7268 : : }
7269 : : default:;
7270 : : }
7271 : : break;
7272 : : }
7273 : 61064 : case MINUS_EXPR:
7274 : 61064 : {
7275 : 61064 : tree _q20 = TREE_OPERAND (_p0, 0);
7276 : 61064 : tree _q21 = TREE_OPERAND (_p0, 1);
7277 : 61064 : switch (TREE_CODE (_q21))
7278 : : {
7279 : 1225 : case REAL_CST:
7280 : 1225 : {
7281 : 1225 : switch (TREE_CODE (_p1))
7282 : : {
7283 : 1202 : case REAL_CST:
7284 : 1202 : {
7285 : 1202 : {
7286 : 1202 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7287 : 1202 : tree res = generic_simplify_248 (loc, type, _p0, _p1, captures, MINUS_EXPR, LE_EXPR);
7288 : 1202 : if (res) return res;
7289 : : }
7290 : 1202 : break;
7291 : : }
7292 : : default:;
7293 : : }
7294 : : break;
7295 : : }
7296 : 61064 : default:;
7297 : : }
7298 : 61064 : switch (TREE_CODE (_q20))
7299 : : {
7300 : 2 : case REAL_CST:
7301 : 2 : {
7302 : 2 : switch (TREE_CODE (_p1))
7303 : : {
7304 : 0 : case REAL_CST:
7305 : 0 : {
7306 : 0 : {
7307 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7308 : 0 : tree res = generic_simplify_249 (loc, type, _p0, _p1, captures, LE_EXPR);
7309 : 0 : if (res) return res;
7310 : : }
7311 : 0 : break;
7312 : : }
7313 : : default:;
7314 : : }
7315 : : break;
7316 : : }
7317 : : default:;
7318 : : }
7319 : : break;
7320 : : }
7321 : 12239 : case FLOAT_EXPR:
7322 : 12239 : {
7323 : 12239 : tree _q20 = TREE_OPERAND (_p0, 0);
7324 : 12239 : switch (TREE_CODE (_p1))
7325 : : {
7326 : 0 : case FLOAT_EXPR:
7327 : 0 : {
7328 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
7329 : 0 : {
7330 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
7331 : 0 : tree res = generic_simplify_252 (loc, type, _p0, _p1, captures, LE_EXPR, LE_EXPR);
7332 : 0 : if (res) return res;
7333 : : }
7334 : 0 : break;
7335 : : }
7336 : 233 : case REAL_CST:
7337 : 233 : {
7338 : 233 : {
7339 : 233 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7340 : 233 : tree res = generic_simplify_253 (loc, type, _p0, _p1, captures, LE_EXPR, LE_EXPR);
7341 : 233 : if (res) return res;
7342 : : }
7343 : 156 : break;
7344 : : }
7345 : : default:;
7346 : : }
7347 : : break;
7348 : : }
7349 : 436 : case EXACT_DIV_EXPR:
7350 : 436 : {
7351 : 436 : tree _q20 = TREE_OPERAND (_p0, 0);
7352 : 436 : tree _q21 = TREE_OPERAND (_p0, 1);
7353 : 436 : switch (TREE_CODE (_q21))
7354 : : {
7355 : 436 : case INTEGER_CST:
7356 : 436 : {
7357 : 436 : switch (TREE_CODE (_p1))
7358 : : {
7359 : 360 : case INTEGER_CST:
7360 : 360 : {
7361 : 360 : {
7362 : 360 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7363 : 360 : tree res = generic_simplify_344 (loc, type, _p0, _p1, captures, LE_EXPR);
7364 : 360 : if (res) return res;
7365 : : }
7366 : 0 : break;
7367 : : }
7368 : : default:;
7369 : : }
7370 : : break;
7371 : : }
7372 : : default:;
7373 : : }
7374 : : break;
7375 : : }
7376 : 1447552 : CASE_CONVERT:
7377 : 1447552 : {
7378 : 1447552 : tree _q20 = TREE_OPERAND (_p0, 0);
7379 : 1447552 : switch (TREE_CODE (_q20))
7380 : : {
7381 : 0 : case EXACT_DIV_EXPR:
7382 : 0 : {
7383 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
7384 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
7385 : 0 : switch (TREE_CODE (_q31))
7386 : : {
7387 : 0 : case INTEGER_CST:
7388 : 0 : {
7389 : 0 : switch (TREE_CODE (_p1))
7390 : : {
7391 : 0 : case INTEGER_CST:
7392 : 0 : {
7393 : 0 : {
7394 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
7395 : 0 : tree res = generic_simplify_345 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
7396 : 0 : if (res) return res;
7397 : : }
7398 : 0 : break;
7399 : : }
7400 : : default:;
7401 : : }
7402 : : break;
7403 : : }
7404 : : default:;
7405 : : }
7406 : : break;
7407 : : }
7408 : 1447552 : default:;
7409 : : }
7410 : 1447552 : switch (TREE_CODE (_p1))
7411 : : {
7412 : 49661 : CASE_CONVERT:
7413 : 49661 : {
7414 : 49661 : tree _q40 = TREE_OPERAND (_p1, 0);
7415 : 49661 : {
7416 : 49661 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
7417 : 49661 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, LE_EXPR);
7418 : 49661 : if (res) return res;
7419 : : }
7420 : 22362 : break;
7421 : : }
7422 : 1420253 : default:;
7423 : : }
7424 : 1420253 : {
7425 : 1420253 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
7426 : 1420253 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, LE_EXPR);
7427 : 1420253 : if (res) return res;
7428 : : }
7429 : 906462 : switch (TREE_CODE (_q20))
7430 : : {
7431 : 521 : case ADDR_EXPR:
7432 : 521 : {
7433 : 521 : switch (TREE_CODE (_p1))
7434 : : {
7435 : 216 : CASE_CONVERT:
7436 : 216 : {
7437 : 216 : tree _q40 = TREE_OPERAND (_p1, 0);
7438 : 216 : switch (TREE_CODE (_q40))
7439 : : {
7440 : 216 : case ADDR_EXPR:
7441 : 216 : {
7442 : 216 : {
7443 : 216 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
7444 : 216 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, LE_EXPR);
7445 : 216 : if (res) return res;
7446 : : }
7447 : 161 : break;
7448 : : }
7449 : : default:;
7450 : : }
7451 : : break;
7452 : : }
7453 : 0 : case ADDR_EXPR:
7454 : 0 : {
7455 : 0 : {
7456 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7457 : 0 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, LE_EXPR);
7458 : 0 : if (res) return res;
7459 : : }
7460 : 0 : break;
7461 : : }
7462 : : default:;
7463 : : }
7464 : : break;
7465 : : }
7466 : 906407 : default:;
7467 : : }
7468 : 906407 : if (uniform_integer_cst_p (_p1))
7469 : : {
7470 : 439175 : {
7471 : 439175 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7472 : 439175 : tree res = generic_simplify_346 (loc, type, _p0, _p1, captures, LE_EXPR);
7473 : 439175 : if (res) return res;
7474 : : }
7475 : : }
7476 : : break;
7477 : : }
7478 : 5130 : case BIT_AND_EXPR:
7479 : 5130 : {
7480 : 5130 : tree _q20 = TREE_OPERAND (_p0, 0);
7481 : 5130 : tree _q21 = TREE_OPERAND (_p0, 1);
7482 : 5130 : switch (TREE_CODE (_q21))
7483 : : {
7484 : 4676 : case INTEGER_CST:
7485 : 4676 : {
7486 : 4676 : switch (TREE_CODE (_p1))
7487 : : {
7488 : 2623 : case INTEGER_CST:
7489 : 2623 : {
7490 : 2623 : {
7491 : 2623 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
7492 : 2623 : tree res = generic_simplify_360 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR);
7493 : 2623 : if (res) return res;
7494 : : }
7495 : 2576 : break;
7496 : : }
7497 : : default:;
7498 : : }
7499 : : break;
7500 : : }
7501 : : default:;
7502 : : }
7503 : : break;
7504 : : }
7505 : 788 : case NEGATE_EXPR:
7506 : 788 : {
7507 : 788 : tree _q20 = TREE_OPERAND (_p0, 0);
7508 : 788 : switch (TREE_CODE (_p1))
7509 : : {
7510 : 32 : case NEGATE_EXPR:
7511 : 32 : {
7512 : 32 : tree _q40 = TREE_OPERAND (_p1, 0);
7513 : 32 : {
7514 : 32 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7515 : 32 : tree res = generic_simplify_255 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
7516 : 32 : if (res) return res;
7517 : : }
7518 : 32 : break;
7519 : : }
7520 : 788 : default:;
7521 : : }
7522 : 788 : if (CONSTANT_CLASS_P (_p1))
7523 : : {
7524 : 419 : {
7525 : 419 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7526 : 419 : tree res = generic_simplify_256 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
7527 : 419 : if (res) return res;
7528 : : }
7529 : : }
7530 : : break;
7531 : : }
7532 : 1555 : case ADDR_EXPR:
7533 : 1555 : {
7534 : 1555 : switch (TREE_CODE (_p1))
7535 : : {
7536 : 35 : CASE_CONVERT:
7537 : 35 : {
7538 : 35 : tree _q30 = TREE_OPERAND (_p1, 0);
7539 : 35 : switch (TREE_CODE (_q30))
7540 : : {
7541 : 34 : case ADDR_EXPR:
7542 : 34 : {
7543 : 34 : {
7544 : 34 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
7545 : 34 : tree res = generic_simplify_276 (loc, type, _p0, _p1, captures, LE_EXPR);
7546 : 34 : if (res) return res;
7547 : : }
7548 : 0 : break;
7549 : : }
7550 : : default:;
7551 : : }
7552 : : break;
7553 : : }
7554 : 585 : case ADDR_EXPR:
7555 : 585 : {
7556 : 585 : {
7557 : 585 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
7558 : 585 : tree res = generic_simplify_276 (loc, type, _p0, _p1, captures, LE_EXPR);
7559 : 585 : if (res) return res;
7560 : : }
7561 : 320 : break;
7562 : : }
7563 : : default:;
7564 : : }
7565 : : break;
7566 : : }
7567 : 64523 : case CALL_EXPR:
7568 : 64523 : switch (get_call_combined_fn (_p0))
7569 : : {
7570 : 2 : case CFN_BUILT_IN_SQRTF:
7571 : 2 : if (call_expr_nargs (_p0) == 1)
7572 : : {
7573 : 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7574 : 2 : switch (TREE_CODE (_p1))
7575 : : {
7576 : 2 : case REAL_CST:
7577 : 2 : {
7578 : 2 : {
7579 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7580 : 2 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, LE_EXPR);
7581 : 2 : if (res) return res;
7582 : : }
7583 : 0 : break;
7584 : : }
7585 : 0 : case CALL_EXPR:
7586 : 0 : switch (get_call_combined_fn (_p1))
7587 : : {
7588 : 0 : case CFN_BUILT_IN_SQRTF:
7589 : 0 : if (call_expr_nargs (_p1) == 1)
7590 : : {
7591 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7592 : 0 : {
7593 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7594 : 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, LE_EXPR);
7595 : 0 : if (res) return res;
7596 : : }
7597 : : }
7598 : : break;
7599 : : default:;
7600 : : }
7601 : : break;
7602 : : default:;
7603 : : }
7604 : : }
7605 : : break;
7606 : 0 : case CFN_BUILT_IN_SQRTL:
7607 : 0 : if (call_expr_nargs (_p0) == 1)
7608 : : {
7609 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7610 : 0 : switch (TREE_CODE (_p1))
7611 : : {
7612 : 0 : case REAL_CST:
7613 : 0 : {
7614 : 0 : {
7615 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7616 : 0 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, LE_EXPR);
7617 : 0 : if (res) return res;
7618 : : }
7619 : 0 : break;
7620 : : }
7621 : 0 : case CALL_EXPR:
7622 : 0 : switch (get_call_combined_fn (_p1))
7623 : : {
7624 : 0 : case CFN_BUILT_IN_SQRTL:
7625 : 0 : if (call_expr_nargs (_p1) == 1)
7626 : : {
7627 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7628 : 0 : {
7629 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7630 : 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, LE_EXPR);
7631 : 0 : if (res) return res;
7632 : : }
7633 : : }
7634 : : break;
7635 : : default:;
7636 : : }
7637 : : break;
7638 : : default:;
7639 : : }
7640 : : }
7641 : : break;
7642 : 2 : case CFN_BUILT_IN_SQRT:
7643 : 2 : if (call_expr_nargs (_p0) == 1)
7644 : : {
7645 : 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7646 : 2 : switch (TREE_CODE (_p1))
7647 : : {
7648 : 2 : case REAL_CST:
7649 : 2 : {
7650 : 2 : {
7651 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7652 : 2 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, LE_EXPR);
7653 : 2 : if (res) return res;
7654 : : }
7655 : 2 : break;
7656 : : }
7657 : 0 : case CALL_EXPR:
7658 : 0 : switch (get_call_combined_fn (_p1))
7659 : : {
7660 : 0 : case CFN_BUILT_IN_SQRT:
7661 : 0 : if (call_expr_nargs (_p1) == 1)
7662 : : {
7663 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7664 : 0 : {
7665 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7666 : 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, LE_EXPR);
7667 : 0 : if (res) return res;
7668 : : }
7669 : : }
7670 : : break;
7671 : : default:;
7672 : : }
7673 : : break;
7674 : : default:;
7675 : : }
7676 : : }
7677 : : break;
7678 : 0 : case CFN_SQRT:
7679 : 0 : if (call_expr_nargs (_p0) == 1)
7680 : : {
7681 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7682 : 0 : switch (TREE_CODE (_p1))
7683 : : {
7684 : 0 : case REAL_CST:
7685 : 0 : {
7686 : 0 : {
7687 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7688 : 0 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, CFN_SQRT, LE_EXPR);
7689 : 0 : if (res) return res;
7690 : : }
7691 : 0 : break;
7692 : : }
7693 : 0 : case CALL_EXPR:
7694 : 0 : switch (get_call_combined_fn (_p1))
7695 : : {
7696 : 0 : case CFN_SQRT:
7697 : 0 : if (call_expr_nargs (_p1) == 1)
7698 : : {
7699 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7700 : 0 : {
7701 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7702 : 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, CFN_SQRT, LE_EXPR);
7703 : 0 : if (res) return res;
7704 : : }
7705 : : }
7706 : : break;
7707 : : default:;
7708 : : }
7709 : : break;
7710 : : default:;
7711 : : }
7712 : : }
7713 : : break;
7714 : : default:;
7715 : : }
7716 : : break;
7717 : 7800498 : default:;
7718 : : }
7719 : 7800498 : if (uniform_integer_cst_p (_p1))
7720 : : {
7721 : 5509932 : {
7722 : 5509932 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
7723 : 5509932 : tree res = generic_simplify_347 (loc, type, _p0, _p1, captures, LE_EXPR);
7724 : 5509932 : if (res) return res;
7725 : : }
7726 : : }
7727 : 7379479 : switch (TREE_CODE (_p0))
7728 : : {
7729 : 871385 : CASE_CONVERT:
7730 : 871385 : {
7731 : 871385 : tree _q20 = TREE_OPERAND (_p0, 0);
7732 : 871385 : switch (TREE_CODE (_q20))
7733 : : {
7734 : 88495 : case PLUS_EXPR:
7735 : 88495 : {
7736 : 88495 : tree _q30 = TREE_OPERAND (_q20, 0);
7737 : 88495 : tree _q31 = TREE_OPERAND (_q20, 1);
7738 : 88495 : switch (TREE_CODE (_q30))
7739 : : {
7740 : 81370 : CASE_CONVERT:
7741 : 81370 : {
7742 : 81370 : tree _q40 = TREE_OPERAND (_q30, 0);
7743 : 81370 : switch (TREE_CODE (_q31))
7744 : : {
7745 : 80653 : case INTEGER_CST:
7746 : 80653 : {
7747 : 80653 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
7748 : : {
7749 : 15 : {
7750 : 15 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q40, _q31 };
7751 : 15 : tree res = generic_simplify_348 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR);
7752 : 15 : if (res) return res;
7753 : : }
7754 : : }
7755 : : break;
7756 : : }
7757 : : default:;
7758 : : }
7759 : : break;
7760 : : }
7761 : : default:;
7762 : : }
7763 : : break;
7764 : : }
7765 : : default:;
7766 : : }
7767 : : break;
7768 : : }
7769 : 7379464 : default:;
7770 : : }
7771 : 7379464 : switch (TREE_CODE (_p1))
7772 : : {
7773 : 143074 : CASE_CONVERT:
7774 : 143074 : {
7775 : 143074 : tree _q30 = TREE_OPERAND (_p1, 0);
7776 : 143074 : switch (TREE_CODE (_q30))
7777 : : {
7778 : 1399 : case PLUS_EXPR:
7779 : 1399 : {
7780 : 1399 : tree _q40 = TREE_OPERAND (_q30, 0);
7781 : 1399 : tree _q41 = TREE_OPERAND (_q30, 1);
7782 : 1399 : switch (TREE_CODE (_q40))
7783 : : {
7784 : 218 : CASE_CONVERT:
7785 : 218 : {
7786 : 218 : tree _q50 = TREE_OPERAND (_q40, 0);
7787 : 218 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7788 : : {
7789 : 1 : switch (TREE_CODE (_q41))
7790 : : {
7791 : 1 : case INTEGER_CST:
7792 : 1 : {
7793 : 1 : {
7794 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0, _q41 };
7795 : 1 : tree res = generic_simplify_348 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
7796 : 1 : if (res) return res;
7797 : : }
7798 : 1 : break;
7799 : : }
7800 : : default:;
7801 : : }
7802 : : }
7803 : : break;
7804 : : }
7805 : : default:;
7806 : : }
7807 : : break;
7808 : : }
7809 : : default:;
7810 : : }
7811 : : break;
7812 : : }
7813 : 121016 : case PLUS_EXPR:
7814 : 121016 : {
7815 : 121016 : tree _q30 = TREE_OPERAND (_p1, 0);
7816 : 121016 : tree _q31 = TREE_OPERAND (_p1, 1);
7817 : 121016 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7818 : : {
7819 : 30 : switch (TREE_CODE (_q31))
7820 : : {
7821 : 30 : case INTEGER_CST:
7822 : 30 : {
7823 : 30 : {
7824 : 30 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0, _q31 };
7825 : 30 : tree res = generic_simplify_343 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
7826 : 30 : if (res) return res;
7827 : : }
7828 : 0 : break;
7829 : : }
7830 : : default:;
7831 : : }
7832 : : }
7833 : : break;
7834 : : }
7835 : 7379434 : default:;
7836 : : }
7837 : 7379434 : switch (TREE_CODE (_p0))
7838 : : {
7839 : 58989 : case MINUS_EXPR:
7840 : 58989 : {
7841 : 58989 : tree _q20 = TREE_OPERAND (_p0, 0);
7842 : 58989 : tree _q21 = TREE_OPERAND (_p0, 1);
7843 : 58989 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7844 : : {
7845 : 2495 : {
7846 : 2495 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7847 : 2495 : tree res = generic_simplify_349 (loc, type, _p0, _p1, captures, LE_EXPR);
7848 : 2495 : if (res) return res;
7849 : : }
7850 : : }
7851 : : break;
7852 : : }
7853 : 7379307 : default:;
7854 : : }
7855 : 7379307 : switch (TREE_CODE (_p1))
7856 : : {
7857 : 120986 : case PLUS_EXPR:
7858 : 120986 : {
7859 : 120986 : tree _q30 = TREE_OPERAND (_p1, 0);
7860 : 120986 : tree _q31 = TREE_OPERAND (_p1, 1);
7861 : 120986 : switch (TREE_CODE (_q30))
7862 : : {
7863 : 2 : case MINUS_EXPR:
7864 : 2 : {
7865 : 2 : tree _q40 = TREE_OPERAND (_q30, 0);
7866 : 2 : tree _q41 = TREE_OPERAND (_q30, 1);
7867 : 2 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7868 : : {
7869 : 0 : if (integer_minus_onep (_q31))
7870 : : {
7871 : 0 : {
7872 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7873 : 0 : tree res = generic_simplify_361 (loc, type, _p0, _p1, captures, GE_EXPR);
7874 : 0 : if (res) return res;
7875 : : }
7876 : : }
7877 : : }
7878 : : break;
7879 : : }
7880 : : default:;
7881 : : }
7882 : : break;
7883 : : }
7884 : 7379307 : default:;
7885 : : }
7886 : 7379307 : switch (TREE_CODE (_p0))
7887 : : {
7888 : 12 : case REALPART_EXPR:
7889 : 12 : {
7890 : 12 : tree _q20 = TREE_OPERAND (_p0, 0);
7891 : 12 : switch (TREE_CODE (_q20))
7892 : : {
7893 : 0 : case CALL_EXPR:
7894 : 0 : switch (get_call_combined_fn (_q20))
7895 : : {
7896 : 0 : case CFN_SUB_OVERFLOW:
7897 : 0 : if (call_expr_nargs (_q20) == 2)
7898 : : {
7899 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7900 : 0 : tree _q31 = CALL_EXPR_ARG (_q20, 1);
7901 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7902 : : {
7903 : 0 : {
7904 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
7905 : 0 : tree res = generic_simplify_362 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR);
7906 : 0 : if (res) return res;
7907 : : }
7908 : : }
7909 : : }
7910 : : break;
7911 : : default:;
7912 : : }
7913 : : break;
7914 : : default:;
7915 : : }
7916 : : break;
7917 : : }
7918 : 7379307 : default:;
7919 : : }
7920 : 7379307 : switch (TREE_CODE (_p1))
7921 : : {
7922 : 0 : case REALPART_EXPR:
7923 : 0 : {
7924 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
7925 : 0 : switch (TREE_CODE (_q30))
7926 : : {
7927 : 0 : case CALL_EXPR:
7928 : 0 : switch (get_call_combined_fn (_q30))
7929 : : {
7930 : 0 : case CFN_ADD_OVERFLOW:
7931 : 0 : if (call_expr_nargs (_q30) == 2)
7932 : : {
7933 : 0 : tree _q40 = CALL_EXPR_ARG (_q30, 0);
7934 : 0 : tree _q41 = CALL_EXPR_ARG (_q30, 1);
7935 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7936 : : {
7937 : 0 : {
7938 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q41 };
7939 : 0 : tree res = generic_simplify_363 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
7940 : 0 : if (res) return res;
7941 : : }
7942 : : }
7943 : 0 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
7944 : : {
7945 : 0 : {
7946 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q40 };
7947 : 0 : tree res = generic_simplify_363 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
7948 : 0 : if (res) return res;
7949 : : }
7950 : : }
7951 : : }
7952 : : break;
7953 : : default:;
7954 : : }
7955 : : break;
7956 : : default:;
7957 : : }
7958 : : break;
7959 : : }
7960 : 351 : case TRUNC_DIV_EXPR:
7961 : 351 : {
7962 : 351 : tree _q30 = TREE_OPERAND (_p1, 0);
7963 : 351 : tree _q31 = TREE_OPERAND (_p1, 1);
7964 : 351 : if (integer_all_onesp (_q30))
7965 : : {
7966 : 0 : {
7967 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q31, _p0 };
7968 : 0 : tree res = generic_simplify_364 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
7969 : 0 : if (res) return res;
7970 : : }
7971 : : }
7972 : : break;
7973 : : }
7974 : 7379307 : default:;
7975 : : }
7976 : 7379307 : switch (TREE_CODE (_p0))
7977 : : {
7978 : 55772 : case MULT_EXPR:
7979 : 55772 : {
7980 : 55772 : tree _q20 = TREE_OPERAND (_p0, 0);
7981 : 55772 : tree _q21 = TREE_OPERAND (_p0, 1);
7982 : 55772 : switch (TREE_CODE (_q21))
7983 : : {
7984 : 845 : case REAL_CST:
7985 : 845 : {
7986 : 845 : switch (TREE_CODE (_p1))
7987 : : {
7988 : 579 : case REAL_CST:
7989 : 579 : {
7990 : 579 : {
7991 : 579 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7992 : 579 : tree res = generic_simplify_354 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
7993 : 579 : if (res) return res;
7994 : : }
7995 : 577 : break;
7996 : : }
7997 : : default:;
7998 : : }
7999 : : break;
8000 : : }
8001 : : default:;
8002 : : }
8003 : : break;
8004 : : }
8005 : 28 : case REAL_CST:
8006 : 28 : {
8007 : 28 : switch (TREE_CODE (_p1))
8008 : : {
8009 : 0 : case CALL_EXPR:
8010 : 0 : switch (get_call_combined_fn (_p1))
8011 : : {
8012 : 0 : case CFN_BUILT_IN_EXP:
8013 : 0 : if (call_expr_nargs (_p1) == 1)
8014 : : {
8015 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8016 : 0 : {
8017 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8018 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, GE_EXPR);
8019 : 0 : if (res) return res;
8020 : : }
8021 : : }
8022 : : break;
8023 : 0 : case CFN_BUILT_IN_LOG:
8024 : 0 : if (call_expr_nargs (_p1) == 1)
8025 : : {
8026 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8027 : 0 : {
8028 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8029 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, GE_EXPR);
8030 : 0 : if (res) return res;
8031 : : }
8032 : : }
8033 : : break;
8034 : 0 : case CFN_BUILT_IN_EXP10F:
8035 : 0 : if (call_expr_nargs (_p1) == 1)
8036 : : {
8037 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8038 : 0 : {
8039 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8040 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, GE_EXPR);
8041 : 0 : if (res) return res;
8042 : : }
8043 : : }
8044 : : break;
8045 : 0 : case CFN_BUILT_IN_EXP10L:
8046 : 0 : if (call_expr_nargs (_p1) == 1)
8047 : : {
8048 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8049 : 0 : {
8050 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8051 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, GE_EXPR);
8052 : 0 : if (res) return res;
8053 : : }
8054 : : }
8055 : : break;
8056 : 0 : case CFN_BUILT_IN_EXP2:
8057 : 0 : if (call_expr_nargs (_p1) == 1)
8058 : : {
8059 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8060 : 0 : {
8061 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8062 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, GE_EXPR);
8063 : 0 : if (res) return res;
8064 : : }
8065 : : }
8066 : : break;
8067 : 0 : case CFN_BUILT_IN_EXPF:
8068 : 0 : if (call_expr_nargs (_p1) == 1)
8069 : : {
8070 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8071 : 0 : {
8072 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8073 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, GE_EXPR);
8074 : 0 : if (res) return res;
8075 : : }
8076 : : }
8077 : : break;
8078 : 0 : case CFN_BUILT_IN_EXPL:
8079 : 0 : if (call_expr_nargs (_p1) == 1)
8080 : : {
8081 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8082 : 0 : {
8083 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8084 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, GE_EXPR);
8085 : 0 : if (res) return res;
8086 : : }
8087 : : }
8088 : : break;
8089 : 0 : case CFN_BUILT_IN_LOG2:
8090 : 0 : if (call_expr_nargs (_p1) == 1)
8091 : : {
8092 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8093 : 0 : {
8094 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8095 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, GE_EXPR);
8096 : 0 : if (res) return res;
8097 : : }
8098 : : }
8099 : : break;
8100 : 0 : case CFN_BUILT_IN_LOGF:
8101 : 0 : if (call_expr_nargs (_p1) == 1)
8102 : : {
8103 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8104 : 0 : {
8105 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8106 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, GE_EXPR);
8107 : 0 : if (res) return res;
8108 : : }
8109 : : }
8110 : : break;
8111 : 0 : case CFN_BUILT_IN_LOGL:
8112 : 0 : if (call_expr_nargs (_p1) == 1)
8113 : : {
8114 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8115 : 0 : {
8116 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8117 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, GE_EXPR);
8118 : 0 : if (res) return res;
8119 : : }
8120 : : }
8121 : : break;
8122 : 0 : case CFN_BUILT_IN_LOG10F:
8123 : 0 : if (call_expr_nargs (_p1) == 1)
8124 : : {
8125 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8126 : 0 : {
8127 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8128 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, GE_EXPR);
8129 : 0 : if (res) return res;
8130 : : }
8131 : : }
8132 : : break;
8133 : 0 : case CFN_BUILT_IN_LOG10L:
8134 : 0 : if (call_expr_nargs (_p1) == 1)
8135 : : {
8136 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8137 : 0 : {
8138 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8139 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, GE_EXPR);
8140 : 0 : if (res) return res;
8141 : : }
8142 : : }
8143 : : break;
8144 : 0 : case CFN_EXP:
8145 : 0 : if (call_expr_nargs (_p1) == 1)
8146 : : {
8147 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8148 : 0 : {
8149 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8150 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, GE_EXPR);
8151 : 0 : if (res) return res;
8152 : : }
8153 : : }
8154 : : break;
8155 : 0 : case CFN_LOG:
8156 : 0 : if (call_expr_nargs (_p1) == 1)
8157 : : {
8158 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8159 : 0 : {
8160 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8161 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, GE_EXPR);
8162 : 0 : if (res) return res;
8163 : : }
8164 : : }
8165 : : break;
8166 : 0 : case CFN_EXP2:
8167 : 0 : if (call_expr_nargs (_p1) == 1)
8168 : : {
8169 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8170 : 0 : {
8171 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8172 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, GE_EXPR);
8173 : 0 : if (res) return res;
8174 : : }
8175 : : }
8176 : : break;
8177 : 0 : case CFN_LOG2:
8178 : 0 : if (call_expr_nargs (_p1) == 1)
8179 : : {
8180 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8181 : 0 : {
8182 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8183 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, GE_EXPR);
8184 : 0 : if (res) return res;
8185 : : }
8186 : : }
8187 : : break;
8188 : 0 : case CFN_EXP10:
8189 : 0 : if (call_expr_nargs (_p1) == 1)
8190 : : {
8191 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8192 : 0 : {
8193 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8194 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, GE_EXPR);
8195 : 0 : if (res) return res;
8196 : : }
8197 : : }
8198 : : break;
8199 : 0 : case CFN_LOG10:
8200 : 0 : if (call_expr_nargs (_p1) == 1)
8201 : : {
8202 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8203 : 0 : {
8204 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8205 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, GE_EXPR);
8206 : 0 : if (res) return res;
8207 : : }
8208 : : }
8209 : : break;
8210 : 0 : case CFN_BUILT_IN_EXP10:
8211 : 0 : if (call_expr_nargs (_p1) == 1)
8212 : : {
8213 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8214 : 0 : {
8215 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8216 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, GE_EXPR);
8217 : 0 : if (res) return res;
8218 : : }
8219 : : }
8220 : : break;
8221 : 0 : case CFN_BUILT_IN_EXP2F:
8222 : 0 : if (call_expr_nargs (_p1) == 1)
8223 : : {
8224 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8225 : 0 : {
8226 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8227 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, GE_EXPR);
8228 : 0 : if (res) return res;
8229 : : }
8230 : : }
8231 : : break;
8232 : 0 : case CFN_BUILT_IN_EXP2L:
8233 : 0 : if (call_expr_nargs (_p1) == 1)
8234 : : {
8235 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8236 : 0 : {
8237 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8238 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, GE_EXPR);
8239 : 0 : if (res) return res;
8240 : : }
8241 : : }
8242 : : break;
8243 : 0 : case CFN_BUILT_IN_LOG10:
8244 : 0 : if (call_expr_nargs (_p1) == 1)
8245 : : {
8246 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8247 : 0 : {
8248 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8249 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, GE_EXPR);
8250 : 0 : if (res) return res;
8251 : : }
8252 : : }
8253 : : break;
8254 : 0 : case CFN_BUILT_IN_LOG2F:
8255 : 0 : if (call_expr_nargs (_p1) == 1)
8256 : : {
8257 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8258 : 0 : {
8259 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8260 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, GE_EXPR);
8261 : 0 : if (res) return res;
8262 : : }
8263 : : }
8264 : : break;
8265 : 0 : case CFN_BUILT_IN_LOG2L:
8266 : 0 : if (call_expr_nargs (_p1) == 1)
8267 : : {
8268 : 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
8269 : 0 : {
8270 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8271 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, GE_EXPR);
8272 : 0 : if (res) return res;
8273 : : }
8274 : : }
8275 : : break;
8276 : : default:;
8277 : : }
8278 : : break;
8279 : : default:;
8280 : : }
8281 : : break;
8282 : : }
8283 : 1416465 : case PLUS_EXPR:
8284 : 1416465 : {
8285 : 1416465 : tree _q20 = TREE_OPERAND (_p0, 0);
8286 : 1416465 : tree _q21 = TREE_OPERAND (_p0, 1);
8287 : 1416465 : switch (TREE_CODE (_q21))
8288 : : {
8289 : 1327031 : case INTEGER_CST:
8290 : 1327031 : {
8291 : 1327031 : switch (TREE_CODE (_p1))
8292 : : {
8293 : 831366 : case INTEGER_CST:
8294 : 831366 : {
8295 : 831366 : {
8296 : 831366 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
8297 : 831366 : tree res = generic_simplify_355 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, LE_EXPR, GE_EXPR);
8298 : 831366 : if (res) return res;
8299 : : }
8300 : 656872 : break;
8301 : : }
8302 : : default:;
8303 : : }
8304 : : break;
8305 : : }
8306 : : default:;
8307 : : }
8308 : : break;
8309 : : }
8310 : 58862 : case MINUS_EXPR:
8311 : 58862 : {
8312 : 58862 : tree _q20 = TREE_OPERAND (_p0, 0);
8313 : 58862 : tree _q21 = TREE_OPERAND (_p0, 1);
8314 : 58862 : switch (TREE_CODE (_q21))
8315 : : {
8316 : 2205 : case INTEGER_CST:
8317 : 2205 : {
8318 : 2205 : switch (TREE_CODE (_p1))
8319 : : {
8320 : 2205 : case INTEGER_CST:
8321 : 2205 : {
8322 : 2205 : {
8323 : 2205 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
8324 : 2205 : tree res = generic_simplify_355 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, LE_EXPR, GE_EXPR);
8325 : 2205 : if (res) return res;
8326 : : }
8327 : 2204 : break;
8328 : : }
8329 : : default:;
8330 : : }
8331 : : break;
8332 : : }
8333 : 58861 : default:;
8334 : : }
8335 : 58861 : switch (TREE_CODE (_q20))
8336 : : {
8337 : 1566 : case INTEGER_CST:
8338 : 1566 : {
8339 : 1566 : switch (TREE_CODE (_p1))
8340 : : {
8341 : 1047 : case INTEGER_CST:
8342 : 1047 : {
8343 : 1047 : {
8344 : 1047 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8345 : 1047 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR);
8346 : 1047 : if (res) return res;
8347 : : }
8348 : 0 : break;
8349 : : }
8350 : : default:;
8351 : : }
8352 : : break;
8353 : : }
8354 : : default:;
8355 : : }
8356 : : break;
8357 : : }
8358 : 64160 : case CALL_EXPR:
8359 : 64160 : switch (get_call_combined_fn (_p0))
8360 : : {
8361 : 18 : case CFN_BUILT_IN_CTZ:
8362 : 18 : if (call_expr_nargs (_p0) == 1)
8363 : : {
8364 : 18 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8365 : 18 : switch (TREE_CODE (_p1))
8366 : : {
8367 : 18 : case INTEGER_CST:
8368 : 18 : {
8369 : 18 : {
8370 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8371 : 18 : tree res = generic_simplify_356 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, CFN_BUILT_IN_CTZ);
8372 : 18 : if (res) return res;
8373 : : }
8374 : 16 : break;
8375 : : }
8376 : : default:;
8377 : : }
8378 : : }
8379 : : break;
8380 : 0 : case CFN_BUILT_IN_EXP:
8381 : 0 : if (call_expr_nargs (_p0) == 1)
8382 : : {
8383 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8384 : 0 : switch (TREE_CODE (_p1))
8385 : : {
8386 : 0 : case REAL_CST:
8387 : 0 : {
8388 : 0 : {
8389 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8390 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, LE_EXPR);
8391 : 0 : if (res) return res;
8392 : : }
8393 : 0 : break;
8394 : : }
8395 : : default:;
8396 : : }
8397 : : }
8398 : : break;
8399 : 8 : case CFN_BUILT_IN_FFS:
8400 : 8 : if (call_expr_nargs (_p0) == 1)
8401 : : {
8402 : 8 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8403 : 8 : switch (TREE_CODE (_p1))
8404 : : {
8405 : 8 : case INTEGER_CST:
8406 : 8 : {
8407 : 8 : {
8408 : 8 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8409 : 8 : tree res = generic_simplify_367 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, NE_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_FFS);
8410 : 8 : if (res) return res;
8411 : : }
8412 : 2 : break;
8413 : : }
8414 : : default:;
8415 : : }
8416 : : }
8417 : : break;
8418 : 0 : case CFN_BUILT_IN_LOG:
8419 : 0 : if (call_expr_nargs (_p0) == 1)
8420 : : {
8421 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8422 : 0 : switch (TREE_CODE (_p1))
8423 : : {
8424 : 0 : case REAL_CST:
8425 : 0 : {
8426 : 0 : {
8427 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8428 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, LE_EXPR);
8429 : 0 : if (res) return res;
8430 : : }
8431 : 0 : break;
8432 : : }
8433 : : default:;
8434 : : }
8435 : : }
8436 : : break;
8437 : 0 : case CFN_BUILT_IN_FFSIMAX:
8438 : 0 : if (call_expr_nargs (_p0) == 1)
8439 : : {
8440 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8441 : 0 : switch (TREE_CODE (_p1))
8442 : : {
8443 : 0 : case INTEGER_CST:
8444 : 0 : {
8445 : 0 : {
8446 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8447 : 0 : tree res = generic_simplify_367 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, NE_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_FFSIMAX);
8448 : 0 : if (res) return res;
8449 : : }
8450 : 0 : break;
8451 : : }
8452 : : default:;
8453 : : }
8454 : : }
8455 : : break;
8456 : 0 : case CFN_BUILT_IN_EXP10F:
8457 : 0 : if (call_expr_nargs (_p0) == 1)
8458 : : {
8459 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8460 : 0 : switch (TREE_CODE (_p1))
8461 : : {
8462 : 0 : case REAL_CST:
8463 : 0 : {
8464 : 0 : {
8465 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8466 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, LE_EXPR);
8467 : 0 : if (res) return res;
8468 : : }
8469 : 0 : break;
8470 : : }
8471 : : default:;
8472 : : }
8473 : : }
8474 : : break;
8475 : 0 : case CFN_BUILT_IN_EXP10L:
8476 : 0 : if (call_expr_nargs (_p0) == 1)
8477 : : {
8478 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8479 : 0 : switch (TREE_CODE (_p1))
8480 : : {
8481 : 0 : case REAL_CST:
8482 : 0 : {
8483 : 0 : {
8484 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8485 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, LE_EXPR);
8486 : 0 : if (res) return res;
8487 : : }
8488 : 0 : break;
8489 : : }
8490 : : default:;
8491 : : }
8492 : : }
8493 : : break;
8494 : 37 : case CFN_BUILT_IN_POPCOUNT:
8495 : 37 : if (call_expr_nargs (_p0) == 1)
8496 : : {
8497 : 37 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8498 : 37 : if (integer_zerop (_p1))
8499 : : {
8500 : 1 : {
8501 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8502 : 1 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNT);
8503 : 1 : if (res) return res;
8504 : : }
8505 : : }
8506 : : }
8507 : : break;
8508 : 0 : case CFN_BUILT_IN_CTZL:
8509 : 0 : if (call_expr_nargs (_p0) == 1)
8510 : : {
8511 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8512 : 0 : switch (TREE_CODE (_p1))
8513 : : {
8514 : 0 : case INTEGER_CST:
8515 : 0 : {
8516 : 0 : {
8517 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8518 : 0 : tree res = generic_simplify_356 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, CFN_BUILT_IN_CTZL);
8519 : 0 : if (res) return res;
8520 : : }
8521 : 0 : break;
8522 : : }
8523 : : default:;
8524 : : }
8525 : : }
8526 : : break;
8527 : 0 : case CFN_BUILT_IN_EXP2:
8528 : 0 : if (call_expr_nargs (_p0) == 1)
8529 : : {
8530 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8531 : 0 : switch (TREE_CODE (_p1))
8532 : : {
8533 : 0 : case REAL_CST:
8534 : 0 : {
8535 : 0 : {
8536 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8537 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, LE_EXPR);
8538 : 0 : if (res) return res;
8539 : : }
8540 : 0 : break;
8541 : : }
8542 : : default:;
8543 : : }
8544 : : }
8545 : : break;
8546 : 0 : case CFN_BUILT_IN_EXPF:
8547 : 0 : if (call_expr_nargs (_p0) == 1)
8548 : : {
8549 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8550 : 0 : switch (TREE_CODE (_p1))
8551 : : {
8552 : 0 : case REAL_CST:
8553 : 0 : {
8554 : 0 : {
8555 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8556 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, LE_EXPR);
8557 : 0 : if (res) return res;
8558 : : }
8559 : 0 : break;
8560 : : }
8561 : : default:;
8562 : : }
8563 : : }
8564 : : break;
8565 : 0 : case CFN_BUILT_IN_EXPL:
8566 : 0 : if (call_expr_nargs (_p0) == 1)
8567 : : {
8568 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8569 : 0 : switch (TREE_CODE (_p1))
8570 : : {
8571 : 0 : case REAL_CST:
8572 : 0 : {
8573 : 0 : {
8574 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8575 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, LE_EXPR);
8576 : 0 : if (res) return res;
8577 : : }
8578 : 0 : break;
8579 : : }
8580 : : default:;
8581 : : }
8582 : : }
8583 : : break;
8584 : 3 : case CFN_BUILT_IN_FFSL:
8585 : 3 : if (call_expr_nargs (_p0) == 1)
8586 : : {
8587 : 3 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8588 : 3 : switch (TREE_CODE (_p1))
8589 : : {
8590 : 3 : case INTEGER_CST:
8591 : 3 : {
8592 : 3 : {
8593 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8594 : 3 : tree res = generic_simplify_367 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, NE_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_FFSL);
8595 : 3 : if (res) return res;
8596 : : }
8597 : 0 : break;
8598 : : }
8599 : : default:;
8600 : : }
8601 : : }
8602 : : break;
8603 : 0 : case CFN_BUILT_IN_LOG2:
8604 : 0 : if (call_expr_nargs (_p0) == 1)
8605 : : {
8606 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8607 : 0 : switch (TREE_CODE (_p1))
8608 : : {
8609 : 0 : case REAL_CST:
8610 : 0 : {
8611 : 0 : {
8612 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8613 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, LE_EXPR);
8614 : 0 : if (res) return res;
8615 : : }
8616 : 0 : break;
8617 : : }
8618 : : default:;
8619 : : }
8620 : : }
8621 : : break;
8622 : 0 : case CFN_BUILT_IN_LOGF:
8623 : 0 : if (call_expr_nargs (_p0) == 1)
8624 : : {
8625 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8626 : 0 : switch (TREE_CODE (_p1))
8627 : : {
8628 : 0 : case REAL_CST:
8629 : 0 : {
8630 : 0 : {
8631 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8632 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, LE_EXPR);
8633 : 0 : if (res) return res;
8634 : : }
8635 : 0 : break;
8636 : : }
8637 : : default:;
8638 : : }
8639 : : }
8640 : : break;
8641 : 0 : case CFN_BUILT_IN_LOGL:
8642 : 0 : if (call_expr_nargs (_p0) == 1)
8643 : : {
8644 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8645 : 0 : switch (TREE_CODE (_p1))
8646 : : {
8647 : 0 : case REAL_CST:
8648 : 0 : {
8649 : 0 : {
8650 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8651 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, LE_EXPR);
8652 : 0 : if (res) return res;
8653 : : }
8654 : 0 : break;
8655 : : }
8656 : : default:;
8657 : : }
8658 : : }
8659 : : break;
8660 : 1 : case CFN_BUILT_IN_POPCOUNTLL:
8661 : 1 : if (call_expr_nargs (_p0) == 1)
8662 : : {
8663 : 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8664 : 1 : if (integer_zerop (_p1))
8665 : : {
8666 : 1 : {
8667 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8668 : 1 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8669 : 1 : if (res) return res;
8670 : : }
8671 : : }
8672 : : }
8673 : : break;
8674 : 0 : case CFN_BUILT_IN_LOG10F:
8675 : 0 : if (call_expr_nargs (_p0) == 1)
8676 : : {
8677 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8678 : 0 : switch (TREE_CODE (_p1))
8679 : : {
8680 : 0 : case REAL_CST:
8681 : 0 : {
8682 : 0 : {
8683 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8684 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, LE_EXPR);
8685 : 0 : if (res) return res;
8686 : : }
8687 : 0 : break;
8688 : : }
8689 : : default:;
8690 : : }
8691 : : }
8692 : : break;
8693 : 0 : case CFN_BUILT_IN_LOG10L:
8694 : 0 : if (call_expr_nargs (_p0) == 1)
8695 : : {
8696 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8697 : 0 : switch (TREE_CODE (_p1))
8698 : : {
8699 : 0 : case REAL_CST:
8700 : 0 : {
8701 : 0 : {
8702 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8703 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, LE_EXPR);
8704 : 0 : if (res) return res;
8705 : : }
8706 : 0 : break;
8707 : : }
8708 : : default:;
8709 : : }
8710 : : }
8711 : : break;
8712 : 0 : case CFN_BUILT_IN_CTZIMAX:
8713 : 0 : if (call_expr_nargs (_p0) == 1)
8714 : : {
8715 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8716 : 0 : switch (TREE_CODE (_p1))
8717 : : {
8718 : 0 : case INTEGER_CST:
8719 : 0 : {
8720 : 0 : {
8721 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8722 : 0 : tree res = generic_simplify_356 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, CFN_BUILT_IN_CTZIMAX);
8723 : 0 : if (res) return res;
8724 : : }
8725 : 0 : break;
8726 : : }
8727 : : default:;
8728 : : }
8729 : : }
8730 : : break;
8731 : 0 : case CFN_POPCOUNT:
8732 : 0 : if (call_expr_nargs (_p0) == 1)
8733 : : {
8734 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8735 : 0 : if (integer_zerop (_p1))
8736 : : {
8737 : 0 : {
8738 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8739 : 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, CFN_POPCOUNT);
8740 : 0 : if (res) return res;
8741 : : }
8742 : : }
8743 : : }
8744 : : break;
8745 : 0 : case CFN_CTZ:
8746 : 0 : if (call_expr_nargs (_p0) == 2)
8747 : : {
8748 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8749 : 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
8750 : 0 : switch (TREE_CODE (_p1))
8751 : : {
8752 : 0 : case INTEGER_CST:
8753 : 0 : {
8754 : 0 : {
8755 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
8756 : 0 : tree res = generic_simplify_357 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR);
8757 : 0 : if (res) return res;
8758 : : }
8759 : 0 : break;
8760 : : }
8761 : : default:;
8762 : : }
8763 : : }
8764 : 0 : if (call_expr_nargs (_p0) == 1)
8765 : : {
8766 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8767 : 0 : switch (TREE_CODE (_p1))
8768 : : {
8769 : 0 : case INTEGER_CST:
8770 : 0 : {
8771 : 0 : {
8772 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8773 : 0 : tree res = generic_simplify_356 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, CFN_CTZ);
8774 : 0 : if (res) return res;
8775 : : }
8776 : 0 : break;
8777 : : }
8778 : : default:;
8779 : : }
8780 : : }
8781 : : break;
8782 : 0 : case CFN_EXP:
8783 : 0 : if (call_expr_nargs (_p0) == 1)
8784 : : {
8785 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8786 : 0 : switch (TREE_CODE (_p1))
8787 : : {
8788 : 0 : case REAL_CST:
8789 : 0 : {
8790 : 0 : {
8791 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8792 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, LE_EXPR);
8793 : 0 : if (res) return res;
8794 : : }
8795 : 0 : break;
8796 : : }
8797 : : default:;
8798 : : }
8799 : : }
8800 : : break;
8801 : 0 : case CFN_FFS:
8802 : 0 : if (call_expr_nargs (_p0) == 1)
8803 : : {
8804 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8805 : 0 : switch (TREE_CODE (_p1))
8806 : : {
8807 : 0 : case INTEGER_CST:
8808 : 0 : {
8809 : 0 : {
8810 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8811 : 0 : tree res = generic_simplify_367 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, NE_EXPR, BIT_IOR_EXPR, CFN_FFS);
8812 : 0 : if (res) return res;
8813 : : }
8814 : 0 : break;
8815 : : }
8816 : : default:;
8817 : : }
8818 : : }
8819 : : break;
8820 : 0 : case CFN_LOG:
8821 : 0 : if (call_expr_nargs (_p0) == 1)
8822 : : {
8823 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8824 : 0 : switch (TREE_CODE (_p1))
8825 : : {
8826 : 0 : case REAL_CST:
8827 : 0 : {
8828 : 0 : {
8829 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8830 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, LE_EXPR);
8831 : 0 : if (res) return res;
8832 : : }
8833 : 0 : break;
8834 : : }
8835 : : default:;
8836 : : }
8837 : : }
8838 : : break;
8839 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8840 : 0 : if (call_expr_nargs (_p0) == 1)
8841 : : {
8842 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8843 : 0 : if (integer_zerop (_p1))
8844 : : {
8845 : 0 : {
8846 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8847 : 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8848 : 0 : if (res) return res;
8849 : : }
8850 : : }
8851 : : }
8852 : : break;
8853 : 0 : case CFN_EXP2:
8854 : 0 : if (call_expr_nargs (_p0) == 1)
8855 : : {
8856 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8857 : 0 : switch (TREE_CODE (_p1))
8858 : : {
8859 : 0 : case REAL_CST:
8860 : 0 : {
8861 : 0 : {
8862 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8863 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, LE_EXPR);
8864 : 0 : if (res) return res;
8865 : : }
8866 : 0 : break;
8867 : : }
8868 : : default:;
8869 : : }
8870 : : }
8871 : : break;
8872 : 0 : case CFN_LOG2:
8873 : 0 : if (call_expr_nargs (_p0) == 1)
8874 : : {
8875 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8876 : 0 : switch (TREE_CODE (_p1))
8877 : : {
8878 : 0 : case REAL_CST:
8879 : 0 : {
8880 : 0 : {
8881 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8882 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, LE_EXPR);
8883 : 0 : if (res) return res;
8884 : : }
8885 : 0 : break;
8886 : : }
8887 : : default:;
8888 : : }
8889 : : }
8890 : : break;
8891 : 0 : case CFN_EXP10:
8892 : 0 : if (call_expr_nargs (_p0) == 1)
8893 : : {
8894 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8895 : 0 : switch (TREE_CODE (_p1))
8896 : : {
8897 : 0 : case REAL_CST:
8898 : 0 : {
8899 : 0 : {
8900 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8901 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, LE_EXPR);
8902 : 0 : if (res) return res;
8903 : : }
8904 : 0 : break;
8905 : : }
8906 : : default:;
8907 : : }
8908 : : }
8909 : : break;
8910 : 1 : case CFN_BUILT_IN_POPCOUNTL:
8911 : 1 : if (call_expr_nargs (_p0) == 1)
8912 : : {
8913 : 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8914 : 1 : if (integer_zerop (_p1))
8915 : : {
8916 : 1 : {
8917 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8918 : 1 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTL);
8919 : 1 : if (res) return res;
8920 : : }
8921 : : }
8922 : : }
8923 : : break;
8924 : 0 : case CFN_BUILT_IN_CTZLL:
8925 : 0 : if (call_expr_nargs (_p0) == 1)
8926 : : {
8927 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8928 : 0 : switch (TREE_CODE (_p1))
8929 : : {
8930 : 0 : case INTEGER_CST:
8931 : 0 : {
8932 : 0 : {
8933 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8934 : 0 : tree res = generic_simplify_356 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, CFN_BUILT_IN_CTZLL);
8935 : 0 : if (res) return res;
8936 : : }
8937 : 0 : break;
8938 : : }
8939 : : default:;
8940 : : }
8941 : : }
8942 : : break;
8943 : 0 : case CFN_LOG10:
8944 : 0 : if (call_expr_nargs (_p0) == 1)
8945 : : {
8946 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8947 : 0 : switch (TREE_CODE (_p1))
8948 : : {
8949 : 0 : case REAL_CST:
8950 : 0 : {
8951 : 0 : {
8952 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8953 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, LE_EXPR);
8954 : 0 : if (res) return res;
8955 : : }
8956 : 0 : break;
8957 : : }
8958 : : default:;
8959 : : }
8960 : : }
8961 : : break;
8962 : 0 : case CFN_BUILT_IN_EXP10:
8963 : 0 : if (call_expr_nargs (_p0) == 1)
8964 : : {
8965 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8966 : 0 : switch (TREE_CODE (_p1))
8967 : : {
8968 : 0 : case REAL_CST:
8969 : 0 : {
8970 : 0 : {
8971 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8972 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, LE_EXPR);
8973 : 0 : if (res) return res;
8974 : : }
8975 : 0 : break;
8976 : : }
8977 : : default:;
8978 : : }
8979 : : }
8980 : : break;
8981 : 0 : case CFN_BUILT_IN_EXP2F:
8982 : 0 : if (call_expr_nargs (_p0) == 1)
8983 : : {
8984 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8985 : 0 : switch (TREE_CODE (_p1))
8986 : : {
8987 : 0 : case REAL_CST:
8988 : 0 : {
8989 : 0 : {
8990 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8991 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, LE_EXPR);
8992 : 0 : if (res) return res;
8993 : : }
8994 : 0 : break;
8995 : : }
8996 : : default:;
8997 : : }
8998 : : }
8999 : : break;
9000 : 0 : case CFN_BUILT_IN_EXP2L:
9001 : 0 : if (call_expr_nargs (_p0) == 1)
9002 : : {
9003 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9004 : 0 : switch (TREE_CODE (_p1))
9005 : : {
9006 : 0 : case REAL_CST:
9007 : 0 : {
9008 : 0 : {
9009 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9010 : 0 : tree res = generic_simplify_366 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, LE_EXPR);
9011 : 0 : if (res) return res;
9012 : : }
9013 : 0 : break;
9014 : : }
9015 : : default:;
9016 : : }
9017 : : }
9018 : : break;
9019 : 3 : case CFN_BUILT_IN_FFSLL:
9020 : 3 : if (call_expr_nargs (_p0) == 1)
9021 : : {
9022 : 3 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9023 : 3 : switch (TREE_CODE (_p1))
9024 : : {
9025 : 3 : case INTEGER_CST:
9026 : 3 : {
9027 : 3 : {
9028 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9029 : 3 : tree res = generic_simplify_367 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, NE_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_FFSLL);
9030 : 3 : if (res) return res;
9031 : : }
9032 : 0 : break;
9033 : : }
9034 : : default:;
9035 : : }
9036 : : }
9037 : : break;
9038 : 0 : case CFN_BUILT_IN_LOG10:
9039 : 0 : if (call_expr_nargs (_p0) == 1)
9040 : : {
9041 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9042 : 0 : switch (TREE_CODE (_p1))
9043 : : {
9044 : 0 : case REAL_CST:
9045 : 0 : {
9046 : 0 : {
9047 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9048 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, LE_EXPR);
9049 : 0 : if (res) return res;
9050 : : }
9051 : 0 : break;
9052 : : }
9053 : : default:;
9054 : : }
9055 : : }
9056 : : break;
9057 : 0 : case CFN_BUILT_IN_LOG2F:
9058 : 0 : if (call_expr_nargs (_p0) == 1)
9059 : : {
9060 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9061 : 0 : switch (TREE_CODE (_p1))
9062 : : {
9063 : 0 : case REAL_CST:
9064 : 0 : {
9065 : 0 : {
9066 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9067 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, LE_EXPR);
9068 : 0 : if (res) return res;
9069 : : }
9070 : 0 : break;
9071 : : }
9072 : : default:;
9073 : : }
9074 : : }
9075 : : break;
9076 : 0 : case CFN_BUILT_IN_LOG2L:
9077 : 0 : if (call_expr_nargs (_p0) == 1)
9078 : : {
9079 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9080 : 0 : switch (TREE_CODE (_p1))
9081 : : {
9082 : 0 : case REAL_CST:
9083 : 0 : {
9084 : 0 : {
9085 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9086 : 0 : tree res = generic_simplify_365 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, LE_EXPR);
9087 : 0 : if (res) return res;
9088 : : }
9089 : 0 : break;
9090 : : }
9091 : : default:;
9092 : : }
9093 : : }
9094 : : break;
9095 : : default:;
9096 : : }
9097 : : break;
9098 : : default:;
9099 : : }
9100 : : return NULL_TREE;
9101 : : }
9102 : :
9103 : : tree
9104 : 3584 : generic_simplify_CEIL_MOD_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9105 : : {
9106 : 3584 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9107 : 3584 : if (integer_zerop (_p0))
9108 : : {
9109 : 0 : {
9110 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9111 : 0 : tree res = generic_simplify_313 (loc, type, _p0, _p1, captures, CEIL_MOD_EXPR);
9112 : 0 : if (res) return res;
9113 : : }
9114 : : }
9115 : 3584 : if (integer_onep (_p1))
9116 : : {
9117 : 0 : {
9118 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9119 : 0 : tree res = generic_simplify_314 (loc, type, _p0, _p1, captures, CEIL_MOD_EXPR);
9120 : 0 : if (res) return res;
9121 : : }
9122 : : }
9123 : 3584 : if (integer_minus_onep (_p1))
9124 : : {
9125 : 0 : {
9126 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9127 : 0 : tree res = generic_simplify_315 (loc, type, _p0, _p1, captures, CEIL_MOD_EXPR);
9128 : 0 : if (res) return res;
9129 : : }
9130 : : }
9131 : 3584 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9132 : : {
9133 : 0 : {
9134 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9135 : 0 : tree res = generic_simplify_316 (loc, type, _p0, _p1, captures, CEIL_MOD_EXPR);
9136 : 0 : if (res) return res;
9137 : : }
9138 : : }
9139 : 3584 : switch (TREE_CODE (_p0))
9140 : : {
9141 : 0 : case CEIL_MOD_EXPR:
9142 : 0 : {
9143 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9144 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9145 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9146 : : {
9147 : 0 : {
9148 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9149 : 0 : tree res = generic_simplify_317 (loc, type, _p0, _p1, captures, CEIL_MOD_EXPR);
9150 : 0 : if (res) return res;
9151 : : }
9152 : : }
9153 : : break;
9154 : : }
9155 : 0 : case MULT_EXPR:
9156 : 0 : {
9157 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9158 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9159 : 0 : switch (TREE_CODE (_q21))
9160 : : {
9161 : 0 : case INTEGER_CST:
9162 : 0 : {
9163 : 0 : switch (TREE_CODE (_p1))
9164 : : {
9165 : 0 : case INTEGER_CST:
9166 : 0 : {
9167 : 0 : {
9168 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9169 : 0 : tree res = generic_simplify_318 (loc, type, _p0, _p1, captures, CEIL_MOD_EXPR);
9170 : 0 : if (res) return res;
9171 : : }
9172 : 0 : break;
9173 : : }
9174 : : default:;
9175 : : }
9176 : : break;
9177 : : }
9178 : : default:;
9179 : : }
9180 : : break;
9181 : : }
9182 : 0 : case VEC_COND_EXPR:
9183 : 0 : {
9184 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9185 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9186 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9187 : 0 : switch (TREE_CODE (_p1))
9188 : : {
9189 : 0 : case VEC_COND_EXPR:
9190 : 0 : {
9191 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9192 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9193 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9194 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9195 : : {
9196 : 0 : {
9197 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
9198 : 0 : if (VECTOR_TYPE_P (type)
9199 : 0 : && (TREE_CODE_CLASS (CEIL_MOD_EXPR) != tcc_comparison
9200 : : || types_match (type, TREE_TYPE (captures[2]))
9201 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9202 : : || (optimize_vectors_before_lowering_p ()
9203 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9204 : : )
9205 : : {
9206 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1673;
9207 : 0 : {
9208 : 0 : tree res_op0;
9209 : 0 : res_op0 = captures[1];
9210 : 0 : tree res_op1;
9211 : 0 : {
9212 : 0 : tree _o1[2], _r1;
9213 : 0 : _o1[0] = captures[2];
9214 : 0 : _o1[1] = captures[5];
9215 : 0 : _r1 = fold_build2_loc (loc, CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9216 : 0 : if (EXPR_P (_r1))
9217 : 0 : goto next_after_fail1673;
9218 : 0 : res_op1 = _r1;
9219 : : }
9220 : 0 : tree res_op2;
9221 : 0 : {
9222 : 0 : tree _o1[2], _r1;
9223 : 0 : _o1[0] = captures[3];
9224 : 0 : _o1[1] = captures[6];
9225 : 0 : _r1 = fold_build2_loc (loc, CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9226 : 0 : if (EXPR_P (_r1))
9227 : 0 : goto next_after_fail1673;
9228 : 0 : res_op2 = _r1;
9229 : : }
9230 : 0 : tree _r;
9231 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9232 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
9233 : 0 : return _r;
9234 : : }
9235 : 0 : next_after_fail1673:;
9236 : : }
9237 : : }
9238 : : }
9239 : : break;
9240 : : }
9241 : 0 : default:;
9242 : : }
9243 : 0 : {
9244 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
9245 : 0 : if (VECTOR_TYPE_P (type)
9246 : 0 : && (TREE_CODE_CLASS (CEIL_MOD_EXPR) != tcc_comparison
9247 : : || types_match (type, TREE_TYPE (captures[2]))
9248 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9249 : : || (optimize_vectors_before_lowering_p ()
9250 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9251 : : )
9252 : : {
9253 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1674;
9254 : 0 : {
9255 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1674;
9256 : 0 : tree res_op0;
9257 : 0 : res_op0 = captures[1];
9258 : 0 : tree res_op1;
9259 : 0 : {
9260 : 0 : tree _o1[2], _r1;
9261 : 0 : _o1[0] = captures[2];
9262 : 0 : _o1[1] = unshare_expr (captures[4]);
9263 : 0 : _r1 = fold_build2_loc (loc, CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9264 : 0 : if (EXPR_P (_r1))
9265 : 0 : goto next_after_fail1674;
9266 : 0 : res_op1 = _r1;
9267 : : }
9268 : 0 : tree res_op2;
9269 : 0 : {
9270 : 0 : tree _o1[2], _r1;
9271 : 0 : _o1[0] = captures[3];
9272 : 0 : _o1[1] = captures[4];
9273 : 0 : _r1 = fold_build2_loc (loc, CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9274 : 0 : if (EXPR_P (_r1))
9275 : 0 : goto next_after_fail1674;
9276 : 0 : res_op2 = _r1;
9277 : : }
9278 : 0 : tree _r;
9279 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9280 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
9281 : 0 : return _r;
9282 : : }
9283 : 0 : next_after_fail1674:;
9284 : : }
9285 : : }
9286 : 0 : break;
9287 : : }
9288 : 3584 : default:;
9289 : : }
9290 : 3584 : switch (TREE_CODE (_p1))
9291 : : {
9292 : 0 : case VEC_COND_EXPR:
9293 : 0 : {
9294 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9295 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9296 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
9297 : 0 : {
9298 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
9299 : 0 : if (VECTOR_TYPE_P (type)
9300 : 0 : && (TREE_CODE_CLASS (CEIL_MOD_EXPR) != tcc_comparison
9301 : : || types_match (type, TREE_TYPE (captures[3]))
9302 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
9303 : : || (optimize_vectors_before_lowering_p ()
9304 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
9305 : : )
9306 : : {
9307 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1675;
9308 : 0 : {
9309 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1675;
9310 : 0 : tree res_op0;
9311 : 0 : res_op0 = captures[2];
9312 : 0 : tree res_op1;
9313 : 0 : {
9314 : 0 : tree _o1[2], _r1;
9315 : 0 : _o1[0] = unshare_expr (captures[0]);
9316 : 0 : _o1[1] = captures[3];
9317 : 0 : _r1 = fold_build2_loc (loc, CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9318 : 0 : if (EXPR_P (_r1))
9319 : 0 : goto next_after_fail1675;
9320 : 0 : res_op1 = _r1;
9321 : : }
9322 : 0 : tree res_op2;
9323 : 0 : {
9324 : 0 : tree _o1[2], _r1;
9325 : 0 : _o1[0] = captures[0];
9326 : 0 : _o1[1] = captures[4];
9327 : 0 : _r1 = fold_build2_loc (loc, CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9328 : 0 : if (EXPR_P (_r1))
9329 : 0 : goto next_after_fail1675;
9330 : 0 : res_op2 = _r1;
9331 : : }
9332 : 0 : tree _r;
9333 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9334 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
9335 : 0 : return _r;
9336 : : }
9337 : 0 : next_after_fail1675:;
9338 : : }
9339 : : }
9340 : 0 : break;
9341 : : }
9342 : : default:;
9343 : : }
9344 : : return NULL_TREE;
9345 : : }
9346 : :
9347 : : tree
9348 : 0 : generic_simplify_ROUND_MOD_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9349 : : {
9350 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9351 : 0 : if (integer_zerop (_p0))
9352 : : {
9353 : 0 : {
9354 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9355 : 0 : tree res = generic_simplify_313 (loc, type, _p0, _p1, captures, ROUND_MOD_EXPR);
9356 : 0 : if (res) return res;
9357 : : }
9358 : : }
9359 : 0 : if (integer_onep (_p1))
9360 : : {
9361 : 0 : {
9362 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9363 : 0 : tree res = generic_simplify_314 (loc, type, _p0, _p1, captures, ROUND_MOD_EXPR);
9364 : 0 : if (res) return res;
9365 : : }
9366 : : }
9367 : 0 : if (integer_minus_onep (_p1))
9368 : : {
9369 : 0 : {
9370 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9371 : 0 : tree res = generic_simplify_315 (loc, type, _p0, _p1, captures, ROUND_MOD_EXPR);
9372 : 0 : if (res) return res;
9373 : : }
9374 : : }
9375 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9376 : : {
9377 : 0 : {
9378 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9379 : 0 : tree res = generic_simplify_316 (loc, type, _p0, _p1, captures, ROUND_MOD_EXPR);
9380 : 0 : if (res) return res;
9381 : : }
9382 : : }
9383 : 0 : switch (TREE_CODE (_p0))
9384 : : {
9385 : 0 : case ROUND_MOD_EXPR:
9386 : 0 : {
9387 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9388 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9389 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9390 : : {
9391 : 0 : {
9392 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9393 : 0 : tree res = generic_simplify_317 (loc, type, _p0, _p1, captures, ROUND_MOD_EXPR);
9394 : 0 : if (res) return res;
9395 : : }
9396 : : }
9397 : : break;
9398 : : }
9399 : 0 : case MULT_EXPR:
9400 : 0 : {
9401 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9402 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9403 : 0 : switch (TREE_CODE (_q21))
9404 : : {
9405 : 0 : case INTEGER_CST:
9406 : 0 : {
9407 : 0 : switch (TREE_CODE (_p1))
9408 : : {
9409 : 0 : case INTEGER_CST:
9410 : 0 : {
9411 : 0 : {
9412 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9413 : 0 : tree res = generic_simplify_318 (loc, type, _p0, _p1, captures, ROUND_MOD_EXPR);
9414 : 0 : if (res) return res;
9415 : : }
9416 : 0 : break;
9417 : : }
9418 : : default:;
9419 : : }
9420 : : break;
9421 : : }
9422 : : default:;
9423 : : }
9424 : : break;
9425 : : }
9426 : 0 : case VEC_COND_EXPR:
9427 : 0 : {
9428 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9429 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9430 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9431 : 0 : switch (TREE_CODE (_p1))
9432 : : {
9433 : 0 : case VEC_COND_EXPR:
9434 : 0 : {
9435 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9436 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9437 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9438 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9439 : : {
9440 : 0 : {
9441 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
9442 : 0 : if (VECTOR_TYPE_P (type)
9443 : 0 : && (TREE_CODE_CLASS (ROUND_MOD_EXPR) != tcc_comparison
9444 : : || types_match (type, TREE_TYPE (captures[2]))
9445 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9446 : : || (optimize_vectors_before_lowering_p ()
9447 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9448 : : )
9449 : : {
9450 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1676;
9451 : 0 : {
9452 : 0 : tree res_op0;
9453 : 0 : res_op0 = captures[1];
9454 : 0 : tree res_op1;
9455 : 0 : {
9456 : 0 : tree _o1[2], _r1;
9457 : 0 : _o1[0] = captures[2];
9458 : 0 : _o1[1] = captures[5];
9459 : 0 : _r1 = fold_build2_loc (loc, ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9460 : 0 : if (EXPR_P (_r1))
9461 : 0 : goto next_after_fail1676;
9462 : 0 : res_op1 = _r1;
9463 : : }
9464 : 0 : tree res_op2;
9465 : 0 : {
9466 : 0 : tree _o1[2], _r1;
9467 : 0 : _o1[0] = captures[3];
9468 : 0 : _o1[1] = captures[6];
9469 : 0 : _r1 = fold_build2_loc (loc, ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9470 : 0 : if (EXPR_P (_r1))
9471 : 0 : goto next_after_fail1676;
9472 : 0 : res_op2 = _r1;
9473 : : }
9474 : 0 : tree _r;
9475 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9476 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
9477 : 0 : return _r;
9478 : : }
9479 : 0 : next_after_fail1676:;
9480 : : }
9481 : : }
9482 : : }
9483 : : break;
9484 : : }
9485 : 0 : default:;
9486 : : }
9487 : 0 : {
9488 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
9489 : 0 : if (VECTOR_TYPE_P (type)
9490 : 0 : && (TREE_CODE_CLASS (ROUND_MOD_EXPR) != tcc_comparison
9491 : : || types_match (type, TREE_TYPE (captures[2]))
9492 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9493 : : || (optimize_vectors_before_lowering_p ()
9494 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9495 : : )
9496 : : {
9497 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1677;
9498 : 0 : {
9499 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1677;
9500 : 0 : tree res_op0;
9501 : 0 : res_op0 = captures[1];
9502 : 0 : tree res_op1;
9503 : 0 : {
9504 : 0 : tree _o1[2], _r1;
9505 : 0 : _o1[0] = captures[2];
9506 : 0 : _o1[1] = unshare_expr (captures[4]);
9507 : 0 : _r1 = fold_build2_loc (loc, ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9508 : 0 : if (EXPR_P (_r1))
9509 : 0 : goto next_after_fail1677;
9510 : 0 : res_op1 = _r1;
9511 : : }
9512 : 0 : tree res_op2;
9513 : 0 : {
9514 : 0 : tree _o1[2], _r1;
9515 : 0 : _o1[0] = captures[3];
9516 : 0 : _o1[1] = captures[4];
9517 : 0 : _r1 = fold_build2_loc (loc, ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9518 : 0 : if (EXPR_P (_r1))
9519 : 0 : goto next_after_fail1677;
9520 : 0 : res_op2 = _r1;
9521 : : }
9522 : 0 : tree _r;
9523 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9524 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
9525 : 0 : return _r;
9526 : : }
9527 : 0 : next_after_fail1677:;
9528 : : }
9529 : : }
9530 : 0 : break;
9531 : : }
9532 : 0 : default:;
9533 : : }
9534 : 0 : switch (TREE_CODE (_p1))
9535 : : {
9536 : 0 : case VEC_COND_EXPR:
9537 : 0 : {
9538 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9539 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9540 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
9541 : 0 : {
9542 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
9543 : 0 : if (VECTOR_TYPE_P (type)
9544 : 0 : && (TREE_CODE_CLASS (ROUND_MOD_EXPR) != tcc_comparison
9545 : : || types_match (type, TREE_TYPE (captures[3]))
9546 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
9547 : : || (optimize_vectors_before_lowering_p ()
9548 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
9549 : : )
9550 : : {
9551 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1678;
9552 : 0 : {
9553 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1678;
9554 : 0 : tree res_op0;
9555 : 0 : res_op0 = captures[2];
9556 : 0 : tree res_op1;
9557 : 0 : {
9558 : 0 : tree _o1[2], _r1;
9559 : 0 : _o1[0] = unshare_expr (captures[0]);
9560 : 0 : _o1[1] = captures[3];
9561 : 0 : _r1 = fold_build2_loc (loc, ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9562 : 0 : if (EXPR_P (_r1))
9563 : 0 : goto next_after_fail1678;
9564 : 0 : res_op1 = _r1;
9565 : : }
9566 : 0 : tree res_op2;
9567 : 0 : {
9568 : 0 : tree _o1[2], _r1;
9569 : 0 : _o1[0] = captures[0];
9570 : 0 : _o1[1] = captures[4];
9571 : 0 : _r1 = fold_build2_loc (loc, ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9572 : 0 : if (EXPR_P (_r1))
9573 : 0 : goto next_after_fail1678;
9574 : 0 : res_op2 = _r1;
9575 : : }
9576 : 0 : tree _r;
9577 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9578 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
9579 : 0 : return _r;
9580 : : }
9581 : 0 : next_after_fail1678:;
9582 : : }
9583 : : }
9584 : 0 : break;
9585 : : }
9586 : : default:;
9587 : : }
9588 : : return NULL_TREE;
9589 : : }
9590 : :
9591 : : tree
9592 : 1781730 : generic_simplify_TRUNC_MOD_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9593 : : {
9594 : 1781730 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9595 : 1781730 : if (integer_zerop (_p0))
9596 : : {
9597 : 915 : {
9598 : 915 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9599 : 915 : tree res = generic_simplify_313 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9600 : 915 : if (res) return res;
9601 : : }
9602 : : }
9603 : 1780945 : if (integer_onep (_p1))
9604 : : {
9605 : 224871 : {
9606 : 224871 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9607 : 224871 : tree res = generic_simplify_314 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9608 : 224871 : if (res) return res;
9609 : : }
9610 : : }
9611 : 1556074 : if (integer_minus_onep (_p1))
9612 : : {
9613 : 313 : {
9614 : 313 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9615 : 313 : tree res = generic_simplify_315 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9616 : 313 : if (res) return res;
9617 : : }
9618 : : }
9619 : 1556054 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9620 : : {
9621 : 223 : {
9622 : 223 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9623 : 223 : tree res = generic_simplify_316 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9624 : 223 : if (res) return res;
9625 : : }
9626 : : }
9627 : 1555961 : switch (TREE_CODE (_p0))
9628 : : {
9629 : 107 : case TRUNC_MOD_EXPR:
9630 : 107 : {
9631 : 107 : tree _q20 = TREE_OPERAND (_p0, 0);
9632 : 107 : tree _q21 = TREE_OPERAND (_p0, 1);
9633 : 107 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9634 : : {
9635 : 52 : {
9636 : 52 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9637 : 52 : tree res = generic_simplify_317 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9638 : 52 : if (res) return res;
9639 : : }
9640 : : }
9641 : : break;
9642 : : }
9643 : 8839 : case MULT_EXPR:
9644 : 8839 : {
9645 : 8839 : tree _q20 = TREE_OPERAND (_p0, 0);
9646 : 8839 : tree _q21 = TREE_OPERAND (_p0, 1);
9647 : 8839 : switch (TREE_CODE (_q21))
9648 : : {
9649 : 8746 : case INTEGER_CST:
9650 : 8746 : {
9651 : 8746 : switch (TREE_CODE (_p1))
9652 : : {
9653 : 8724 : case INTEGER_CST:
9654 : 8724 : {
9655 : 8724 : {
9656 : 8724 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9657 : 8724 : tree res = generic_simplify_318 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9658 : 8724 : if (res) return res;
9659 : : }
9660 : 8724 : break;
9661 : : }
9662 : : default:;
9663 : : }
9664 : : break;
9665 : : }
9666 : : default:;
9667 : : }
9668 : : break;
9669 : : }
9670 : 1555909 : default:;
9671 : : }
9672 : 1555909 : switch (TREE_CODE (_p1))
9673 : : {
9674 : 1349050 : case INTEGER_CST:
9675 : 1349050 : {
9676 : 1349050 : {
9677 : 1349050 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9678 : 1349050 : if (TYPE_SIGN (type) == SIGNED
9679 : 185175 : && !TREE_OVERFLOW (captures[1])
9680 : 1349054 : && wi::neg_p (wi::to_wide (captures[1]))
9681 : 313 : && !TYPE_OVERFLOW_TRAPS (type)
9682 : 1349363 : && !sign_bit_p (captures[1], captures[1])
9683 : : )
9684 : : {
9685 : 309 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1679;
9686 : 309 : {
9687 : 309 : tree res_op0;
9688 : 309 : res_op0 = captures[0];
9689 : 309 : tree res_op1;
9690 : 309 : {
9691 : 309 : tree _o1[1], _r1;
9692 : 309 : _o1[0] = captures[1];
9693 : 309 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
9694 : 309 : res_op1 = _r1;
9695 : : }
9696 : 309 : tree _r;
9697 : 309 : _r = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, res_op0, res_op1);
9698 : 309 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
9699 : 309 : return _r;
9700 : : }
9701 : 0 : next_after_fail1679:;
9702 : : }
9703 : : }
9704 : 1348741 : break;
9705 : : }
9706 : 39229 : CASE_CONVERT:
9707 : 39229 : {
9708 : 39229 : tree _q30 = TREE_OPERAND (_p1, 0);
9709 : 39229 : switch (TREE_CODE (_q30))
9710 : : {
9711 : 0 : case NEGATE_EXPR:
9712 : 0 : {
9713 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9714 : 0 : {
9715 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
9716 : 0 : tree res = generic_simplify_368 (loc, type, _p0, _p1, captures);
9717 : 0 : if (res) return res;
9718 : : }
9719 : 0 : break;
9720 : : }
9721 : 39229 : default:;
9722 : : }
9723 : 39229 : {
9724 : 39229 : tree _q30_pops[1];
9725 : 39229 : if (tree_power_of_two_cand (_q30, _q30_pops))
9726 : : {
9727 : 7 : tree _q40 = _q30_pops[0];
9728 : 7 : {
9729 : 7 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q40 };
9730 : 7 : tree res = generic_simplify_319 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9731 : 7 : if (res) return res;
9732 : : }
9733 : : }
9734 : : }
9735 : 39222 : break;
9736 : : }
9737 : 94 : case NEGATE_EXPR:
9738 : 94 : {
9739 : 94 : tree _q30 = TREE_OPERAND (_p1, 0);
9740 : 94 : {
9741 : 94 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
9742 : 94 : tree res = generic_simplify_368 (loc, type, _p0, _p1, captures);
9743 : 94 : if (res) return res;
9744 : : }
9745 : 94 : break;
9746 : : }
9747 : 1555593 : default:;
9748 : : }
9749 : 1555593 : {
9750 : 1555593 : tree _p1_pops[1];
9751 : 1555593 : if (tree_power_of_two_cand (_p1, _p1_pops))
9752 : : {
9753 : 1348750 : tree _q30 = _p1_pops[0];
9754 : 1348750 : {
9755 : 1348750 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
9756 : 1348750 : tree res = generic_simplify_319 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9757 : 1348750 : if (res) return res;
9758 : : }
9759 : : }
9760 : : }
9761 : 606713 : switch (TREE_CODE (_p0))
9762 : : {
9763 : 0 : case VEC_COND_EXPR:
9764 : 0 : {
9765 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9766 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9767 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9768 : 0 : switch (TREE_CODE (_p1))
9769 : : {
9770 : 0 : case VEC_COND_EXPR:
9771 : 0 : {
9772 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9773 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9774 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9775 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9776 : : {
9777 : 0 : {
9778 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
9779 : 0 : if (VECTOR_TYPE_P (type)
9780 : 0 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
9781 : : || types_match (type, TREE_TYPE (captures[2]))
9782 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9783 : : || (optimize_vectors_before_lowering_p ()
9784 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9785 : : )
9786 : : {
9787 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1680;
9788 : 0 : {
9789 : 0 : tree res_op0;
9790 : 0 : res_op0 = captures[1];
9791 : 0 : tree res_op1;
9792 : 0 : {
9793 : 0 : tree _o1[2], _r1;
9794 : 0 : _o1[0] = captures[2];
9795 : 0 : _o1[1] = captures[5];
9796 : 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9797 : 0 : if (EXPR_P (_r1))
9798 : 0 : goto next_after_fail1680;
9799 : 0 : res_op1 = _r1;
9800 : : }
9801 : 0 : tree res_op2;
9802 : 0 : {
9803 : 0 : tree _o1[2], _r1;
9804 : 0 : _o1[0] = captures[3];
9805 : 0 : _o1[1] = captures[6];
9806 : 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9807 : 0 : if (EXPR_P (_r1))
9808 : 0 : goto next_after_fail1680;
9809 : 0 : res_op2 = _r1;
9810 : : }
9811 : 0 : tree _r;
9812 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9813 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
9814 : 0 : return _r;
9815 : : }
9816 : 0 : next_after_fail1680:;
9817 : : }
9818 : : }
9819 : : }
9820 : : break;
9821 : : }
9822 : 0 : default:;
9823 : : }
9824 : 0 : {
9825 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
9826 : 0 : if (VECTOR_TYPE_P (type)
9827 : 0 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
9828 : : || types_match (type, TREE_TYPE (captures[2]))
9829 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9830 : : || (optimize_vectors_before_lowering_p ()
9831 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9832 : : )
9833 : : {
9834 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1681;
9835 : 0 : {
9836 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1681;
9837 : 0 : tree res_op0;
9838 : 0 : res_op0 = captures[1];
9839 : 0 : tree res_op1;
9840 : 0 : {
9841 : 0 : tree _o1[2], _r1;
9842 : 0 : _o1[0] = captures[2];
9843 : 0 : _o1[1] = unshare_expr (captures[4]);
9844 : 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9845 : 0 : if (EXPR_P (_r1))
9846 : 0 : goto next_after_fail1681;
9847 : 0 : res_op1 = _r1;
9848 : : }
9849 : 0 : tree res_op2;
9850 : 0 : {
9851 : 0 : tree _o1[2], _r1;
9852 : 0 : _o1[0] = captures[3];
9853 : 0 : _o1[1] = captures[4];
9854 : 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9855 : 0 : if (EXPR_P (_r1))
9856 : 0 : goto next_after_fail1681;
9857 : 0 : res_op2 = _r1;
9858 : : }
9859 : 0 : tree _r;
9860 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9861 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
9862 : 0 : return _r;
9863 : : }
9864 : 0 : next_after_fail1681:;
9865 : : }
9866 : : }
9867 : 0 : break;
9868 : : }
9869 : 606713 : default:;
9870 : : }
9871 : 606713 : switch (TREE_CODE (_p1))
9872 : : {
9873 : 7 : case VEC_COND_EXPR:
9874 : 7 : {
9875 : 7 : tree _q30 = TREE_OPERAND (_p1, 0);
9876 : 7 : tree _q31 = TREE_OPERAND (_p1, 1);
9877 : 7 : tree _q32 = TREE_OPERAND (_p1, 2);
9878 : 7 : {
9879 : 7 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
9880 : 7 : if (VECTOR_TYPE_P (type)
9881 : 7 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
9882 : : || types_match (type, TREE_TYPE (captures[3]))
9883 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
9884 : : || (optimize_vectors_before_lowering_p ()
9885 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
9886 : : )
9887 : : {
9888 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1682;
9889 : 7 : {
9890 : 7 : if (! tree_invariant_p (captures[0])) goto next_after_fail1682;
9891 : 0 : tree res_op0;
9892 : 0 : res_op0 = captures[2];
9893 : 0 : tree res_op1;
9894 : 0 : {
9895 : 0 : tree _o1[2], _r1;
9896 : 0 : _o1[0] = unshare_expr (captures[0]);
9897 : 0 : _o1[1] = captures[3];
9898 : 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9899 : 0 : if (EXPR_P (_r1))
9900 : 0 : goto next_after_fail1682;
9901 : 0 : res_op1 = _r1;
9902 : : }
9903 : 0 : tree res_op2;
9904 : 0 : {
9905 : 0 : tree _o1[2], _r1;
9906 : 0 : _o1[0] = captures[0];
9907 : 0 : _o1[1] = captures[4];
9908 : 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9909 : 0 : if (EXPR_P (_r1))
9910 : 0 : goto next_after_fail1682;
9911 : 0 : res_op2 = _r1;
9912 : : }
9913 : 0 : tree _r;
9914 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9915 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
9916 : 0 : return _r;
9917 : : }
9918 : 7 : next_after_fail1682:;
9919 : : }
9920 : : }
9921 : 7 : break;
9922 : : }
9923 : : default:;
9924 : : }
9925 : : return NULL_TREE;
9926 : : }
9927 : :
9928 : : tree
9929 : 895655 : generic_simplify_RSHIFT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9930 : : {
9931 : 895655 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9932 : 895655 : switch (TREE_CODE (_p1))
9933 : : {
9934 : 174 : case TRUNC_MOD_EXPR:
9935 : 174 : {
9936 : 174 : tree _q30 = TREE_OPERAND (_p1, 0);
9937 : 174 : tree _q31 = TREE_OPERAND (_p1, 1);
9938 : 174 : {
9939 : 174 : tree _q31_pops[1];
9940 : 174 : if (tree_power_of_two_cand (_q31, _q31_pops))
9941 : : {
9942 : 166 : tree _q50 = _q31_pops[0];
9943 : 166 : {
9944 : 166 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9945 : 166 : tree res = generic_simplify_369 (loc, type, _p0, _p1, captures, RSHIFT_EXPR, TRUNC_MOD_EXPR);
9946 : 166 : if (res) return res;
9947 : : }
9948 : : }
9949 : : }
9950 : 13 : break;
9951 : : }
9952 : 0 : case FLOOR_MOD_EXPR:
9953 : 0 : {
9954 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9955 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9956 : 0 : {
9957 : 0 : tree _q31_pops[1];
9958 : 0 : if (tree_power_of_two_cand (_q31, _q31_pops))
9959 : : {
9960 : 0 : tree _q50 = _q31_pops[0];
9961 : 0 : {
9962 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9963 : 0 : tree res = generic_simplify_369 (loc, type, _p0, _p1, captures, RSHIFT_EXPR, FLOOR_MOD_EXPR);
9964 : 0 : if (res) return res;
9965 : : }
9966 : : }
9967 : : }
9968 : 0 : break;
9969 : : }
9970 : 895494 : default:;
9971 : : }
9972 : 895494 : if (uniform_integer_cst_p (_p1))
9973 : : {
9974 : 748488 : {
9975 : 748488 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9976 : 748488 : tree res = generic_simplify_370 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
9977 : 748488 : if (res) return res;
9978 : : }
9979 : : }
9980 : 894737 : switch (TREE_CODE (_p0))
9981 : : {
9982 : 59 : case NEGATE_EXPR:
9983 : 59 : {
9984 : 59 : tree _q20 = TREE_OPERAND (_p0, 0);
9985 : 59 : switch (TREE_CODE (_p1))
9986 : : {
9987 : 58 : case INTEGER_CST:
9988 : 58 : {
9989 : 58 : {
9990 : 58 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9991 : 58 : if (!TYPE_UNSIGNED (type)
9992 : 58 : && TYPE_OVERFLOW_UNDEFINED (type)
9993 : : )
9994 : : {
9995 : 32 : {
9996 : 32 : tree stype = TREE_TYPE (captures[2]);
9997 : 32 : tree bt = truth_type_for (type);
9998 : 32 : tree zeros = build_zero_cst (type);
9999 : 32 : tree INTEGER_CST = NULL_TREE;
10000 : 32 : if (INTEGRAL_TYPE_P (type)
10001 : : && canonicalize_math_after_vectorization_p ()
10002 : : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
10003 : : )
10004 : : {
10005 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1691;
10006 : : {
10007 : : tree res_op0;
10008 : : {
10009 : : tree _o1[1], _r1;
10010 : : {
10011 : : tree _o2[2], _r2;
10012 : : _o2[0] = captures[1];
10013 : : _o2[1] = zeros;
10014 : : _r2 = fold_build2_loc (loc, GT_EXPR, boolean_type_node, _o2[0], _o2[1]);
10015 : : _o1[0] = _r2;
10016 : : }
10017 : : if (TREE_TYPE (_o1[0]) != type)
10018 : : {
10019 : : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
10020 : : }
10021 : : else
10022 : : _r1 = _o1[0];
10023 : : res_op0 = _r1;
10024 : : }
10025 : : tree _r;
10026 : : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
10027 : : if (TREE_SIDE_EFFECTS (captures[2]))
10028 : : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10029 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1012, __FILE__, __LINE__, true);
10030 : : return _r;
10031 : : }
10032 : : next_after_fail1691:;
10033 : : }
10034 : : else
10035 : : {
10036 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
10037 : 0 : && TYPE_MODE (bt) == TYPE_MODE (type)
10038 : 0 : && expand_vec_cmp_expr_p (type, bt, GT_EXPR)
10039 : 0 : && (INTEGER_CST = uniform_integer_cst_p (captures[2])) != NULL
10040 : 32 : && wi::eq_p (wi::to_wide (INTEGER_CST), element_precision (type) - 1)
10041 : : )
10042 : : {
10043 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1692;
10044 : 0 : {
10045 : 0 : tree res_op0;
10046 : 0 : {
10047 : 0 : tree _o1[2], _r1;
10048 : 0 : _o1[0] = captures[1];
10049 : 0 : _o1[1] = zeros;
10050 : 0 : _r1 = fold_build2_loc (loc, GT_EXPR, bt, _o1[0], _o1[1]);
10051 : 0 : res_op0 = _r1;
10052 : : }
10053 : 0 : tree _r;
10054 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
10055 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10056 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10057 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1013, __FILE__, __LINE__, true);
10058 : 0 : return _r;
10059 : : }
10060 : 0 : next_after_fail1692:;
10061 : : }
10062 : : }
10063 : : }
10064 : : }
10065 : : }
10066 : 58 : break;
10067 : : }
10068 : 0 : case VECTOR_CST:
10069 : 0 : {
10070 : 0 : {
10071 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10072 : 0 : if (!TYPE_UNSIGNED (type)
10073 : 0 : && TYPE_OVERFLOW_UNDEFINED (type)
10074 : : )
10075 : : {
10076 : 0 : {
10077 : 0 : tree stype = TREE_TYPE (captures[2]);
10078 : 0 : tree bt = truth_type_for (type);
10079 : 0 : tree zeros = build_zero_cst (type);
10080 : 0 : tree VECTOR_CST = NULL_TREE;
10081 : 0 : if (INTEGRAL_TYPE_P (type)
10082 : : && canonicalize_math_after_vectorization_p ()
10083 : : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
10084 : : )
10085 : : {
10086 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1693;
10087 : : {
10088 : : tree res_op0;
10089 : : {
10090 : : tree _o1[1], _r1;
10091 : : {
10092 : : tree _o2[2], _r2;
10093 : : _o2[0] = captures[1];
10094 : : _o2[1] = zeros;
10095 : : _r2 = fold_build2_loc (loc, GT_EXPR, boolean_type_node, _o2[0], _o2[1]);
10096 : : _o1[0] = _r2;
10097 : : }
10098 : : if (TREE_TYPE (_o1[0]) != type)
10099 : : {
10100 : : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
10101 : : }
10102 : : else
10103 : : _r1 = _o1[0];
10104 : : res_op0 = _r1;
10105 : : }
10106 : : tree _r;
10107 : : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
10108 : : if (TREE_SIDE_EFFECTS (captures[2]))
10109 : : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10110 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1012, __FILE__, __LINE__, true);
10111 : : return _r;
10112 : : }
10113 : : next_after_fail1693:;
10114 : : }
10115 : : else
10116 : : {
10117 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
10118 : 0 : && TYPE_MODE (bt) == TYPE_MODE (type)
10119 : 0 : && expand_vec_cmp_expr_p (type, bt, GT_EXPR)
10120 : 0 : && (VECTOR_CST = uniform_integer_cst_p (captures[2])) != NULL
10121 : 0 : && wi::eq_p (wi::to_wide (VECTOR_CST), element_precision (type) - 1)
10122 : : )
10123 : : {
10124 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1694;
10125 : 0 : {
10126 : 0 : tree res_op0;
10127 : 0 : {
10128 : 0 : tree _o1[2], _r1;
10129 : 0 : _o1[0] = captures[1];
10130 : 0 : _o1[1] = zeros;
10131 : 0 : _r1 = fold_build2_loc (loc, GT_EXPR, bt, _o1[0], _o1[1]);
10132 : 0 : res_op0 = _r1;
10133 : : }
10134 : 0 : tree _r;
10135 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
10136 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10137 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10138 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1013, __FILE__, __LINE__, true);
10139 : 0 : return _r;
10140 : : }
10141 : 0 : next_after_fail1694:;
10142 : : }
10143 : : }
10144 : : }
10145 : : }
10146 : : }
10147 : 0 : break;
10148 : : }
10149 : : default:;
10150 : : }
10151 : : break;
10152 : : }
10153 : 325 : case LSHIFT_EXPR:
10154 : 325 : {
10155 : 325 : tree _q20 = TREE_OPERAND (_p0, 0);
10156 : 325 : tree _q21 = TREE_OPERAND (_p0, 1);
10157 : 325 : switch (TREE_CODE (_q21))
10158 : : {
10159 : 246 : case INTEGER_CST:
10160 : 246 : {
10161 : 246 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q21, 0))
10162 : : {
10163 : 67 : {
10164 : 67 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q21 };
10165 : 67 : tree res = generic_simplify_379 (loc, type, _p0, _p1, captures);
10166 : 67 : if (res) return res;
10167 : : }
10168 : : }
10169 : : break;
10170 : : }
10171 : : default:;
10172 : : }
10173 : : break;
10174 : : }
10175 : 894710 : default:;
10176 : : }
10177 : 894710 : {
10178 : 894710 : tree _p0_pops[1];
10179 : 894710 : if (tree_nop_convert (_p0, _p0_pops))
10180 : : {
10181 : 175099 : tree _q20 = _p0_pops[0];
10182 : 175099 : switch (TREE_CODE (_q20))
10183 : : {
10184 : 20 : case LSHIFT_EXPR:
10185 : 20 : {
10186 : 20 : tree _q30 = TREE_OPERAND (_q20, 0);
10187 : 20 : tree _q31 = TREE_OPERAND (_q20, 1);
10188 : 20 : switch (TREE_CODE (_q31))
10189 : : {
10190 : 0 : case INTEGER_CST:
10191 : 0 : {
10192 : 0 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
10193 : : {
10194 : 0 : {
10195 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p1, _q31 };
10196 : 0 : tree res = generic_simplify_379 (loc, type, _p0, _p1, captures);
10197 : 0 : if (res) return res;
10198 : : }
10199 : : }
10200 : : break;
10201 : : }
10202 : : default:;
10203 : : }
10204 : : break;
10205 : : }
10206 : : default:;
10207 : : }
10208 : : }
10209 : : }
10210 : 894710 : if (integer_all_onesp (_p0))
10211 : : {
10212 : 10910 : {
10213 : 10910 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10214 : 10910 : if (!TYPE_UNSIGNED (type)
10215 : : )
10216 : : {
10217 : 119 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1695;
10218 : 119 : {
10219 : 119 : tree _r;
10220 : 119 : _r = captures[0];
10221 : 119 : if (TREE_SIDE_EFFECTS (captures[1]))
10222 : 1 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10223 : 119 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1014, __FILE__, __LINE__, true);
10224 : 119 : return _r;
10225 : : }
10226 : 0 : next_after_fail1695:;
10227 : : }
10228 : : }
10229 : : }
10230 : 894591 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10231 : : {
10232 : 25 : {
10233 : 25 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10234 : 25 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1696;
10235 : 25 : {
10236 : 25 : tree _r;
10237 : 25 : _r = build_zero_cst (type);
10238 : 25 : if (TREE_SIDE_EFFECTS (captures[0]))
10239 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
10240 : 25 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1015, __FILE__, __LINE__, true);
10241 : 25 : return _r;
10242 : : }
10243 : 0 : next_after_fail1696:;
10244 : : }
10245 : : }
10246 : 894566 : if (integer_zerop (_p1))
10247 : : {
10248 : 1430 : {
10249 : 1430 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10250 : 1430 : tree res = generic_simplify_372 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
10251 : 1430 : if (res) return res;
10252 : : }
10253 : : }
10254 : 893136 : if (integer_zerop (_p0))
10255 : : {
10256 : 154 : {
10257 : 154 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10258 : 154 : tree res = generic_simplify_373 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
10259 : 154 : if (res) return res;
10260 : : }
10261 : : }
10262 : 892982 : switch (TREE_CODE (_p1))
10263 : : {
10264 : 0 : case VECTOR_CST:
10265 : 0 : {
10266 : 0 : {
10267 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10268 : 0 : tree res = generic_simplify_374 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
10269 : 0 : if (res) return res;
10270 : : }
10271 : 0 : break;
10272 : : }
10273 : 0 : case CONSTRUCTOR:
10274 : 0 : {
10275 : 0 : {
10276 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10277 : 0 : tree res = generic_simplify_375 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
10278 : 0 : if (res) return res;
10279 : : }
10280 : 0 : break;
10281 : : }
10282 : 892982 : default:;
10283 : : }
10284 : 892982 : switch (TREE_CODE (_p0))
10285 : : {
10286 : 120 : case RSHIFT_EXPR:
10287 : 120 : {
10288 : 120 : tree _q20 = TREE_OPERAND (_p0, 0);
10289 : 120 : tree _q21 = TREE_OPERAND (_p0, 1);
10290 : 120 : switch (TREE_CODE (_q21))
10291 : : {
10292 : 75 : case INTEGER_CST:
10293 : 75 : {
10294 : 75 : switch (TREE_CODE (_p1))
10295 : : {
10296 : 49 : case INTEGER_CST:
10297 : 49 : {
10298 : 49 : {
10299 : 49 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10300 : 49 : tree res = generic_simplify_376 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
10301 : 49 : if (res) return res;
10302 : : }
10303 : 0 : break;
10304 : : }
10305 : : default:;
10306 : : }
10307 : : break;
10308 : : }
10309 : : default:;
10310 : : }
10311 : : break;
10312 : : }
10313 : 199161 : CASE_CONVERT:
10314 : 199161 : {
10315 : 199161 : tree _q20 = TREE_OPERAND (_p0, 0);
10316 : 199161 : switch (TREE_CODE (_q20))
10317 : : {
10318 : 6 : case BIT_AND_EXPR:
10319 : 6 : {
10320 : 6 : tree _q30 = TREE_OPERAND (_q20, 0);
10321 : 6 : tree _q31 = TREE_OPERAND (_q20, 1);
10322 : 6 : switch (TREE_CODE (_q31))
10323 : : {
10324 : 0 : case INTEGER_CST:
10325 : 0 : {
10326 : 0 : switch (TREE_CODE (_p1))
10327 : : {
10328 : 0 : case INTEGER_CST:
10329 : 0 : {
10330 : 0 : {
10331 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
10332 : 0 : tree res = generic_simplify_377 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, RSHIFT_EXPR);
10333 : 0 : if (res) return res;
10334 : : }
10335 : 0 : break;
10336 : : }
10337 : : default:;
10338 : : }
10339 : : break;
10340 : : }
10341 : : default:;
10342 : : }
10343 : : break;
10344 : : }
10345 : 14 : case BIT_XOR_EXPR:
10346 : 14 : {
10347 : 14 : tree _q30 = TREE_OPERAND (_q20, 0);
10348 : 14 : tree _q31 = TREE_OPERAND (_q20, 1);
10349 : 14 : switch (TREE_CODE (_q31))
10350 : : {
10351 : 0 : case INTEGER_CST:
10352 : 0 : {
10353 : 0 : switch (TREE_CODE (_p1))
10354 : : {
10355 : 0 : case INTEGER_CST:
10356 : 0 : {
10357 : 0 : {
10358 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
10359 : 0 : tree res = generic_simplify_377 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, RSHIFT_EXPR);
10360 : 0 : if (res) return res;
10361 : : }
10362 : 0 : break;
10363 : : }
10364 : : default:;
10365 : : }
10366 : : break;
10367 : : }
10368 : : default:;
10369 : : }
10370 : : break;
10371 : : }
10372 : 27 : case BIT_IOR_EXPR:
10373 : 27 : {
10374 : 27 : tree _q30 = TREE_OPERAND (_q20, 0);
10375 : 27 : tree _q31 = TREE_OPERAND (_q20, 1);
10376 : 27 : switch (TREE_CODE (_q31))
10377 : : {
10378 : 8 : case INTEGER_CST:
10379 : 8 : {
10380 : 8 : switch (TREE_CODE (_p1))
10381 : : {
10382 : 8 : case INTEGER_CST:
10383 : 8 : {
10384 : 8 : {
10385 : 8 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
10386 : 8 : tree res = generic_simplify_377 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, RSHIFT_EXPR);
10387 : 8 : if (res) return res;
10388 : : }
10389 : 1 : break;
10390 : : }
10391 : : default:;
10392 : : }
10393 : : break;
10394 : : }
10395 : : default:;
10396 : : }
10397 : : break;
10398 : : }
10399 : 59 : case CALL_EXPR:
10400 : 59 : switch (get_call_combined_fn (_q20))
10401 : : {
10402 : 0 : case CFN_BUILT_IN_BSWAP128:
10403 : 0 : if (call_expr_nargs (_q20) == 1)
10404 : : {
10405 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
10406 : 0 : switch (TREE_CODE (_p1))
10407 : : {
10408 : 0 : case INTEGER_CST:
10409 : 0 : {
10410 : 0 : {
10411 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
10412 : 0 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP128);
10413 : 0 : if (res) return res;
10414 : : }
10415 : 0 : break;
10416 : : }
10417 : : default:;
10418 : : }
10419 : : }
10420 : : break;
10421 : 8 : case CFN_BUILT_IN_BSWAP16:
10422 : 8 : if (call_expr_nargs (_q20) == 1)
10423 : : {
10424 : 8 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
10425 : 8 : switch (TREE_CODE (_p1))
10426 : : {
10427 : 7 : case INTEGER_CST:
10428 : 7 : {
10429 : 7 : {
10430 : 7 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
10431 : 7 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP16);
10432 : 7 : if (res) return res;
10433 : : }
10434 : 2 : break;
10435 : : }
10436 : : default:;
10437 : : }
10438 : : }
10439 : : break;
10440 : 13 : case CFN_BUILT_IN_BSWAP32:
10441 : 13 : if (call_expr_nargs (_q20) == 1)
10442 : : {
10443 : 13 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
10444 : 13 : switch (TREE_CODE (_p1))
10445 : : {
10446 : 13 : case INTEGER_CST:
10447 : 13 : {
10448 : 13 : {
10449 : 13 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
10450 : 13 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP32);
10451 : 13 : if (res) return res;
10452 : : }
10453 : 9 : break;
10454 : : }
10455 : : default:;
10456 : : }
10457 : : }
10458 : : break;
10459 : 18 : case CFN_BUILT_IN_BSWAP64:
10460 : 18 : if (call_expr_nargs (_q20) == 1)
10461 : : {
10462 : 18 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
10463 : 18 : switch (TREE_CODE (_p1))
10464 : : {
10465 : 18 : case INTEGER_CST:
10466 : 18 : {
10467 : 18 : {
10468 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
10469 : 18 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP64);
10470 : 18 : if (res) return res;
10471 : : }
10472 : 12 : break;
10473 : : }
10474 : : default:;
10475 : : }
10476 : : }
10477 : : break;
10478 : : default:;
10479 : : }
10480 : : break;
10481 : : default:;
10482 : : }
10483 : : break;
10484 : : }
10485 : 13371 : case BIT_AND_EXPR:
10486 : 13371 : {
10487 : 13371 : tree _q20 = TREE_OPERAND (_p0, 0);
10488 : 13371 : tree _q21 = TREE_OPERAND (_p0, 1);
10489 : 13371 : switch (TREE_CODE (_q21))
10490 : : {
10491 : 13321 : case INTEGER_CST:
10492 : 13321 : {
10493 : 13321 : switch (TREE_CODE (_p1))
10494 : : {
10495 : 13298 : case INTEGER_CST:
10496 : 13298 : {
10497 : 13298 : {
10498 : 13298 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
10499 : 13298 : tree res = generic_simplify_378 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, RSHIFT_EXPR);
10500 : 13298 : if (res) return res;
10501 : : }
10502 : 0 : break;
10503 : : }
10504 : : default:;
10505 : : }
10506 : : break;
10507 : : }
10508 : : default:;
10509 : : }
10510 : : break;
10511 : : }
10512 : 228 : case BIT_XOR_EXPR:
10513 : 228 : {
10514 : 228 : tree _q20 = TREE_OPERAND (_p0, 0);
10515 : 228 : tree _q21 = TREE_OPERAND (_p0, 1);
10516 : 228 : switch (TREE_CODE (_q21))
10517 : : {
10518 : 90 : case INTEGER_CST:
10519 : 90 : {
10520 : 90 : switch (TREE_CODE (_p1))
10521 : : {
10522 : 90 : case INTEGER_CST:
10523 : 90 : {
10524 : 90 : {
10525 : 90 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
10526 : 90 : tree res = generic_simplify_378 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, RSHIFT_EXPR);
10527 : 90 : if (res) return res;
10528 : : }
10529 : 0 : break;
10530 : : }
10531 : : default:;
10532 : : }
10533 : : break;
10534 : : }
10535 : : default:;
10536 : : }
10537 : : break;
10538 : : }
10539 : 51 : case BIT_IOR_EXPR:
10540 : 51 : {
10541 : 51 : tree _q20 = TREE_OPERAND (_p0, 0);
10542 : 51 : tree _q21 = TREE_OPERAND (_p0, 1);
10543 : 51 : switch (TREE_CODE (_q21))
10544 : : {
10545 : 10 : case INTEGER_CST:
10546 : 10 : {
10547 : 10 : switch (TREE_CODE (_p1))
10548 : : {
10549 : 8 : case INTEGER_CST:
10550 : 8 : {
10551 : 8 : {
10552 : 8 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
10553 : 8 : tree res = generic_simplify_378 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, RSHIFT_EXPR);
10554 : 8 : if (res) return res;
10555 : : }
10556 : 0 : break;
10557 : : }
10558 : : default:;
10559 : : }
10560 : : break;
10561 : : }
10562 : : default:;
10563 : : }
10564 : : break;
10565 : : }
10566 : 0 : case VEC_COND_EXPR:
10567 : 0 : {
10568 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10569 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10570 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10571 : 0 : switch (TREE_CODE (_p1))
10572 : : {
10573 : 0 : case VEC_COND_EXPR:
10574 : 0 : {
10575 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10576 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10577 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10578 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10579 : : {
10580 : 0 : {
10581 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10582 : 0 : if (VECTOR_TYPE_P (type)
10583 : 0 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
10584 : : || types_match (type, TREE_TYPE (captures[2]))
10585 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10586 : : || (optimize_vectors_before_lowering_p ()
10587 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10588 : : )
10589 : : {
10590 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1697;
10591 : 0 : {
10592 : 0 : tree res_op0;
10593 : 0 : res_op0 = captures[1];
10594 : 0 : tree res_op1;
10595 : 0 : {
10596 : 0 : tree _o1[2], _r1;
10597 : 0 : _o1[0] = captures[2];
10598 : 0 : _o1[1] = captures[5];
10599 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10600 : 0 : if (EXPR_P (_r1))
10601 : 0 : goto next_after_fail1697;
10602 : 0 : res_op1 = _r1;
10603 : : }
10604 : 0 : tree res_op2;
10605 : 0 : {
10606 : 0 : tree _o1[2], _r1;
10607 : 0 : _o1[0] = captures[3];
10608 : 0 : _o1[1] = captures[6];
10609 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10610 : 0 : if (EXPR_P (_r1))
10611 : 0 : goto next_after_fail1697;
10612 : 0 : res_op2 = _r1;
10613 : : }
10614 : 0 : tree _r;
10615 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10616 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
10617 : 0 : return _r;
10618 : : }
10619 : 0 : next_after_fail1697:;
10620 : : }
10621 : : }
10622 : : }
10623 : : break;
10624 : : }
10625 : 0 : default:;
10626 : : }
10627 : 0 : {
10628 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10629 : 0 : if (VECTOR_TYPE_P (type)
10630 : 0 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
10631 : : || types_match (type, TREE_TYPE (captures[2]))
10632 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10633 : : || (optimize_vectors_before_lowering_p ()
10634 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10635 : : )
10636 : : {
10637 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1698;
10638 : 0 : {
10639 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1698;
10640 : 0 : tree res_op0;
10641 : 0 : res_op0 = captures[1];
10642 : 0 : tree res_op1;
10643 : 0 : {
10644 : 0 : tree _o1[2], _r1;
10645 : 0 : _o1[0] = captures[2];
10646 : 0 : _o1[1] = unshare_expr (captures[4]);
10647 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10648 : 0 : if (EXPR_P (_r1))
10649 : 0 : goto next_after_fail1698;
10650 : 0 : res_op1 = _r1;
10651 : : }
10652 : 0 : tree res_op2;
10653 : 0 : {
10654 : 0 : tree _o1[2], _r1;
10655 : 0 : _o1[0] = captures[3];
10656 : 0 : _o1[1] = captures[4];
10657 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10658 : 0 : if (EXPR_P (_r1))
10659 : 0 : goto next_after_fail1698;
10660 : 0 : res_op2 = _r1;
10661 : : }
10662 : 0 : tree _r;
10663 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10664 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
10665 : 0 : return _r;
10666 : : }
10667 : 0 : next_after_fail1698:;
10668 : : }
10669 : : }
10670 : 0 : break;
10671 : : }
10672 : 433 : case CALL_EXPR:
10673 : 433 : switch (get_call_combined_fn (_p0))
10674 : : {
10675 : 0 : case CFN_BUILT_IN_BSWAP128:
10676 : 0 : if (call_expr_nargs (_p0) == 1)
10677 : : {
10678 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10679 : 0 : switch (TREE_CODE (_p1))
10680 : : {
10681 : 0 : case INTEGER_CST:
10682 : 0 : {
10683 : 0 : {
10684 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10685 : 0 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP128);
10686 : 0 : if (res) return res;
10687 : : }
10688 : 0 : break;
10689 : : }
10690 : : default:;
10691 : : }
10692 : : }
10693 : : break;
10694 : 32 : case CFN_BUILT_IN_BSWAP16:
10695 : 32 : if (call_expr_nargs (_p0) == 1)
10696 : : {
10697 : 32 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10698 : 32 : switch (TREE_CODE (_p1))
10699 : : {
10700 : 32 : case INTEGER_CST:
10701 : 32 : {
10702 : 32 : {
10703 : 32 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10704 : 32 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP16);
10705 : 32 : if (res) return res;
10706 : : }
10707 : 9 : break;
10708 : : }
10709 : : default:;
10710 : : }
10711 : : }
10712 : : break;
10713 : 99 : case CFN_BUILT_IN_BSWAP32:
10714 : 99 : if (call_expr_nargs (_p0) == 1)
10715 : : {
10716 : 99 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10717 : 99 : switch (TREE_CODE (_p1))
10718 : : {
10719 : 98 : case INTEGER_CST:
10720 : 98 : {
10721 : 98 : {
10722 : 98 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10723 : 98 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP32);
10724 : 98 : if (res) return res;
10725 : : }
10726 : 59 : break;
10727 : : }
10728 : : default:;
10729 : : }
10730 : : }
10731 : : break;
10732 : 100 : case CFN_BUILT_IN_BSWAP64:
10733 : 100 : if (call_expr_nargs (_p0) == 1)
10734 : : {
10735 : 100 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10736 : 100 : switch (TREE_CODE (_p1))
10737 : : {
10738 : 99 : case INTEGER_CST:
10739 : 99 : {
10740 : 99 : {
10741 : 99 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10742 : 99 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP64);
10743 : 99 : if (res) return res;
10744 : : }
10745 : 73 : break;
10746 : : }
10747 : : default:;
10748 : : }
10749 : : }
10750 : : break;
10751 : : default:;
10752 : : }
10753 : : break;
10754 : 879427 : default:;
10755 : : }
10756 : 879427 : if (integer_onep (_p0))
10757 : : {
10758 : 531 : {
10759 : 531 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
10760 : 531 : if (INTEGRAL_TYPE_P (type)
10761 : : )
10762 : : {
10763 : 531 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1699;
10764 : 531 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1699;
10765 : 531 : {
10766 : 531 : tree res_op0;
10767 : 531 : {
10768 : 531 : tree _o1[2], _r1;
10769 : 531 : _o1[0] = captures[0];
10770 : 531 : _o1[1] = build_zero_cst (TREE_TYPE (captures[0]));
10771 : 531 : _r1 = fold_build2_loc (loc, EQ_EXPR, boolean_type_node, _o1[0], _o1[1]);
10772 : 531 : res_op0 = _r1;
10773 : : }
10774 : 531 : tree _r;
10775 : 531 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
10776 : 531 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1016, __FILE__, __LINE__, true);
10777 : 531 : return _r;
10778 : : }
10779 : : next_after_fail1699:;
10780 : : }
10781 : : }
10782 : : }
10783 : 878896 : switch (TREE_CODE (_p1))
10784 : : {
10785 : 11 : case VEC_COND_EXPR:
10786 : 11 : {
10787 : 11 : tree _q30 = TREE_OPERAND (_p1, 0);
10788 : 11 : tree _q31 = TREE_OPERAND (_p1, 1);
10789 : 11 : tree _q32 = TREE_OPERAND (_p1, 2);
10790 : 11 : {
10791 : 11 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10792 : 11 : if (VECTOR_TYPE_P (type)
10793 : 11 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
10794 : : || types_match (type, TREE_TYPE (captures[3]))
10795 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10796 : : || (optimize_vectors_before_lowering_p ()
10797 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10798 : : )
10799 : : {
10800 : 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1700;
10801 : 11 : {
10802 : 11 : if (! tree_invariant_p (captures[0])) goto next_after_fail1700;
10803 : 0 : tree res_op0;
10804 : 0 : res_op0 = captures[2];
10805 : 0 : tree res_op1;
10806 : 0 : {
10807 : 0 : tree _o1[2], _r1;
10808 : 0 : _o1[0] = unshare_expr (captures[0]);
10809 : 0 : _o1[1] = captures[3];
10810 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10811 : 0 : if (EXPR_P (_r1))
10812 : 0 : goto next_after_fail1700;
10813 : 0 : res_op1 = _r1;
10814 : : }
10815 : 0 : tree res_op2;
10816 : 0 : {
10817 : 0 : tree _o1[2], _r1;
10818 : 0 : _o1[0] = captures[0];
10819 : 0 : _o1[1] = captures[4];
10820 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10821 : 0 : if (EXPR_P (_r1))
10822 : 0 : goto next_after_fail1700;
10823 : 0 : res_op2 = _r1;
10824 : : }
10825 : 0 : tree _r;
10826 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10827 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
10828 : 0 : return _r;
10829 : : }
10830 : 11 : next_after_fail1700:;
10831 : : }
10832 : : }
10833 : 11 : break;
10834 : : }
10835 : 878896 : default:;
10836 : : }
10837 : 878896 : switch (TREE_CODE (_p0))
10838 : : {
10839 : 0 : case VEC_PERM_EXPR:
10840 : 0 : {
10841 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10842 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10843 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10844 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
10845 : : {
10846 : 0 : switch (TREE_CODE (_p1))
10847 : : {
10848 : 0 : case VEC_PERM_EXPR:
10849 : 0 : {
10850 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10851 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10852 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10853 : 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
10854 : : {
10855 : 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
10856 : : {
10857 : 0 : {
10858 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
10859 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
10860 : : )
10861 : : {
10862 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1701;
10863 : 0 : {
10864 : 0 : tree res_op0;
10865 : 0 : {
10866 : 0 : tree _o1[2], _r1;
10867 : 0 : _o1[0] = captures[0];
10868 : 0 : _o1[1] = captures[2];
10869 : 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10870 : 0 : captures[3] = _r1;
10871 : : }
10872 : 0 : res_op0 = unshare_expr (captures[3]);
10873 : 0 : tree res_op1;
10874 : 0 : res_op1 = captures[3];
10875 : 0 : tree res_op2;
10876 : 0 : res_op2 = captures[1];
10877 : 0 : tree _r;
10878 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
10879 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
10880 : 0 : return _r;
10881 : : }
10882 : 0 : next_after_fail1701:;
10883 : : }
10884 : : }
10885 : : }
10886 : : }
10887 : : break;
10888 : : }
10889 : : default:;
10890 : : }
10891 : : }
10892 : : break;
10893 : : }
10894 : : default:;
10895 : : }
10896 : : return NULL_TREE;
10897 : : }
10898 : :
10899 : : tree
10900 : 351968 : generic_simplify_MAX_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10901 : : {
10902 : 351968 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10903 : 351968 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10904 : : {
10905 : 0 : {
10906 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10907 : 0 : tree res = generic_simplify_496 (loc, type, _p0, _p1, captures, MAX_EXPR);
10908 : 0 : if (res) return res;
10909 : : }
10910 : : }
10911 : 351968 : switch (TREE_CODE (_p0))
10912 : : {
10913 : 97 : case MAX_EXPR:
10914 : 97 : {
10915 : 97 : tree _q20 = TREE_OPERAND (_p0, 0);
10916 : 97 : tree _q21 = TREE_OPERAND (_p0, 1);
10917 : 97 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10918 : : {
10919 : 0 : {
10920 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10921 : 0 : tree res = generic_simplify_497 (loc, type, _p0, _p1, captures, MAX_EXPR);
10922 : 0 : if (res) return res;
10923 : : }
10924 : : }
10925 : 97 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10926 : : {
10927 : 0 : {
10928 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10929 : 0 : tree res = generic_simplify_497 (loc, type, _p0, _p1, captures, MAX_EXPR);
10930 : 0 : if (res) return res;
10931 : : }
10932 : : }
10933 : : break;
10934 : : }
10935 : 351968 : default:;
10936 : : }
10937 : 351968 : switch (TREE_CODE (_p1))
10938 : : {
10939 : 0 : case MAX_EXPR:
10940 : 0 : {
10941 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10942 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10943 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10944 : : {
10945 : 0 : {
10946 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
10947 : 0 : tree res = generic_simplify_498 (loc, type, _p0, _p1, captures, MAX_EXPR);
10948 : 0 : if (res) return res;
10949 : : }
10950 : : }
10951 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10952 : : {
10953 : 0 : {
10954 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q30 };
10955 : 0 : tree res = generic_simplify_498 (loc, type, _p0, _p1, captures, MAX_EXPR);
10956 : 0 : if (res) return res;
10957 : : }
10958 : : }
10959 : : break;
10960 : : }
10961 : 351968 : default:;
10962 : : }
10963 : 351968 : switch (TREE_CODE (_p0))
10964 : : {
10965 : 2882 : case MIN_EXPR:
10966 : 2882 : {
10967 : 2882 : tree _q20 = TREE_OPERAND (_p0, 0);
10968 : 2882 : tree _q21 = TREE_OPERAND (_p0, 1);
10969 : 2882 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10970 : : {
10971 : 3 : {
10972 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10973 : 3 : tree res = generic_simplify_507 (loc, type, _p0, _p1, captures);
10974 : 3 : if (res) return res;
10975 : : }
10976 : : }
10977 : 2879 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10978 : : {
10979 : 1 : {
10980 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10981 : 1 : tree res = generic_simplify_507 (loc, type, _p0, _p1, captures);
10982 : 1 : if (res) return res;
10983 : : }
10984 : : }
10985 : : break;
10986 : : }
10987 : 351964 : default:;
10988 : : }
10989 : 351964 : switch (TREE_CODE (_p1))
10990 : : {
10991 : 0 : case MIN_EXPR:
10992 : 0 : {
10993 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10994 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10995 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10996 : : {
10997 : 0 : {
10998 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
10999 : 0 : tree res = generic_simplify_507 (loc, type, _p0, _p1, captures);
11000 : 0 : if (res) return res;
11001 : : }
11002 : : }
11003 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
11004 : : {
11005 : 0 : {
11006 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
11007 : 0 : tree res = generic_simplify_507 (loc, type, _p0, _p1, captures);
11008 : 0 : if (res) return res;
11009 : : }
11010 : : }
11011 : : break;
11012 : : }
11013 : 0 : case NEGATE_EXPR:
11014 : 0 : {
11015 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11016 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
11017 : : {
11018 : 0 : {
11019 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11020 : 0 : tree res = generic_simplify_508 (loc, type, _p0, _p1, captures);
11021 : 0 : if (res) return res;
11022 : : }
11023 : : }
11024 : : break;
11025 : : }
11026 : 351964 : default:;
11027 : : }
11028 : 351964 : switch (TREE_CODE (_p0))
11029 : : {
11030 : 74 : case NEGATE_EXPR:
11031 : 74 : {
11032 : 74 : tree _q20 = TREE_OPERAND (_p0, 0);
11033 : 74 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
11034 : : {
11035 : 2 : {
11036 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11037 : 2 : tree res = generic_simplify_508 (loc, type, _p0, _p1, captures);
11038 : 2 : if (res) return res;
11039 : : }
11040 : : }
11041 : : break;
11042 : : }
11043 : 351962 : default:;
11044 : : }
11045 : 351962 : {
11046 : 351962 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11047 : 351962 : if (INTEGRAL_TYPE_P (type)
11048 : 350040 : && TYPE_MAX_VALUE (type)
11049 : 702002 : && operand_equal_p (captures[1], TYPE_MAX_VALUE (type), OEP_ONLY_CONST)
11050 : : )
11051 : : {
11052 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1734;
11053 : 0 : {
11054 : 0 : tree _r;
11055 : 0 : _r = captures[1];
11056 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11057 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11058 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1031, __FILE__, __LINE__, true);
11059 : 0 : return _r;
11060 : : }
11061 : 0 : next_after_fail1734:;
11062 : : }
11063 : : else
11064 : : {
11065 : 351962 : if (INTEGRAL_TYPE_P (type)
11066 : 350040 : && TYPE_MIN_VALUE (type)
11067 : 702002 : && operand_equal_p (captures[1], TYPE_MIN_VALUE (type), OEP_ONLY_CONST)
11068 : : )
11069 : : {
11070 : 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1735;
11071 : 11 : {
11072 : 11 : tree _r;
11073 : 11 : _r = captures[0];
11074 : 11 : if (TREE_SIDE_EFFECTS (captures[1]))
11075 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11076 : 11 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1032, __FILE__, __LINE__, true);
11077 : 11 : return _r;
11078 : : }
11079 : 0 : next_after_fail1735:;
11080 : : }
11081 : : }
11082 : : }
11083 : 351951 : switch (TREE_CODE (_p1))
11084 : : {
11085 : 96 : case PLUS_EXPR:
11086 : 96 : {
11087 : 96 : tree _q30 = TREE_OPERAND (_p1, 0);
11088 : 96 : tree _q31 = TREE_OPERAND (_p1, 1);
11089 : 96 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
11090 : : {
11091 : 0 : switch (TREE_CODE (_q31))
11092 : : {
11093 : 0 : case INTEGER_CST:
11094 : 0 : {
11095 : 0 : {
11096 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
11097 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
11098 : : )
11099 : : {
11100 : 0 : if (tree_int_cst_sgn (captures[2]) > 0
11101 : : )
11102 : : {
11103 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1736;
11104 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1736;
11105 : 0 : {
11106 : 0 : tree _r;
11107 : 0 : _r = captures[1];
11108 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1033, __FILE__, __LINE__, true);
11109 : 0 : return _r;
11110 : : }
11111 : 0 : next_after_fail1736:;
11112 : : }
11113 : : else
11114 : : {
11115 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1737;
11116 : 0 : {
11117 : 0 : tree _r;
11118 : 0 : _r = captures[0];
11119 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11120 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11121 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1034, __FILE__, __LINE__, true);
11122 : 0 : return _r;
11123 : : }
11124 : 0 : next_after_fail1737:;
11125 : : }
11126 : : }
11127 : : }
11128 : 0 : break;
11129 : : }
11130 : : default:;
11131 : : }
11132 : : }
11133 : : break;
11134 : : }
11135 : 351951 : default:;
11136 : : }
11137 : 351951 : switch (TREE_CODE (_p0))
11138 : : {
11139 : 22005 : case PLUS_EXPR:
11140 : 22005 : {
11141 : 22005 : tree _q20 = TREE_OPERAND (_p0, 0);
11142 : 22005 : tree _q21 = TREE_OPERAND (_p0, 1);
11143 : 22005 : switch (TREE_CODE (_q21))
11144 : : {
11145 : 21967 : case INTEGER_CST:
11146 : 21967 : {
11147 : 21967 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
11148 : : {
11149 : 0 : {
11150 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
11151 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
11152 : : )
11153 : : {
11154 : 0 : if (tree_int_cst_sgn (captures[2]) > 0
11155 : : )
11156 : : {
11157 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1738;
11158 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1738;
11159 : 0 : {
11160 : 0 : tree _r;
11161 : 0 : _r = captures[1];
11162 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1033, __FILE__, __LINE__, true);
11163 : 0 : return _r;
11164 : : }
11165 : 0 : next_after_fail1738:;
11166 : : }
11167 : : else
11168 : : {
11169 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1739;
11170 : 0 : {
11171 : 0 : tree _r;
11172 : 0 : _r = captures[0];
11173 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11174 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11175 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1034, __FILE__, __LINE__, true);
11176 : 0 : return _r;
11177 : : }
11178 : 0 : next_after_fail1739:;
11179 : : }
11180 : : }
11181 : : }
11182 : : }
11183 : : break;
11184 : : }
11185 : : default:;
11186 : : }
11187 : : break;
11188 : : }
11189 : 2878 : case MIN_EXPR:
11190 : 2878 : {
11191 : 2878 : tree _q20 = TREE_OPERAND (_p0, 0);
11192 : 2878 : tree _q21 = TREE_OPERAND (_p0, 1);
11193 : 2878 : switch (TREE_CODE (_p1))
11194 : : {
11195 : 0 : case MAX_EXPR:
11196 : 0 : {
11197 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
11198 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
11199 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11200 : : {
11201 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11202 : : {
11203 : 0 : {
11204 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11205 : 0 : if (!HONOR_NANS (captures[0])
11206 : : )
11207 : : {
11208 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1740;
11209 : 0 : {
11210 : 0 : tree res_op0;
11211 : 0 : res_op0 = captures[0];
11212 : 0 : tree res_op1;
11213 : 0 : res_op1 = captures[1];
11214 : 0 : tree _r;
11215 : 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
11216 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 894, __FILE__, __LINE__, true);
11217 : 0 : return _r;
11218 : : }
11219 : 0 : next_after_fail1740:;
11220 : : }
11221 : : }
11222 : : }
11223 : : }
11224 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11225 : : {
11226 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11227 : : {
11228 : 0 : {
11229 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11230 : 0 : if (!HONOR_NANS (captures[0])
11231 : : )
11232 : : {
11233 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1741;
11234 : 0 : {
11235 : 0 : tree res_op0;
11236 : 0 : res_op0 = captures[0];
11237 : 0 : tree res_op1;
11238 : 0 : res_op1 = captures[1];
11239 : 0 : tree _r;
11240 : 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
11241 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 894, __FILE__, __LINE__, true);
11242 : 0 : return _r;
11243 : : }
11244 : 0 : next_after_fail1741:;
11245 : : }
11246 : : }
11247 : : }
11248 : : }
11249 : : break;
11250 : : }
11251 : : default:;
11252 : : }
11253 : : break;
11254 : : }
11255 : 97 : case MAX_EXPR:
11256 : 97 : {
11257 : 97 : tree _q20 = TREE_OPERAND (_p0, 0);
11258 : 97 : tree _q21 = TREE_OPERAND (_p0, 1);
11259 : 97 : switch (TREE_CODE (_p1))
11260 : : {
11261 : 0 : case MIN_EXPR:
11262 : 0 : {
11263 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
11264 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
11265 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11266 : : {
11267 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11268 : : {
11269 : 0 : {
11270 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11271 : 0 : if (!HONOR_NANS (captures[0])
11272 : : )
11273 : : {
11274 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1742;
11275 : 0 : {
11276 : 0 : tree res_op0;
11277 : 0 : res_op0 = captures[0];
11278 : 0 : tree res_op1;
11279 : 0 : res_op1 = captures[1];
11280 : 0 : tree _r;
11281 : 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
11282 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 894, __FILE__, __LINE__, true);
11283 : 0 : return _r;
11284 : : }
11285 : 0 : next_after_fail1742:;
11286 : : }
11287 : : }
11288 : : }
11289 : : }
11290 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11291 : : {
11292 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11293 : : {
11294 : 0 : {
11295 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11296 : 0 : if (!HONOR_NANS (captures[0])
11297 : : )
11298 : : {
11299 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1743;
11300 : 0 : {
11301 : 0 : tree res_op0;
11302 : 0 : res_op0 = captures[0];
11303 : 0 : tree res_op1;
11304 : 0 : res_op1 = captures[1];
11305 : 0 : tree _r;
11306 : 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
11307 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 894, __FILE__, __LINE__, true);
11308 : 0 : return _r;
11309 : : }
11310 : 0 : next_after_fail1743:;
11311 : : }
11312 : : }
11313 : : }
11314 : : }
11315 : : break;
11316 : : }
11317 : : default:;
11318 : : }
11319 : : break;
11320 : : }
11321 : 28823 : CASE_CONVERT:
11322 : 28823 : {
11323 : 28823 : tree _q20 = TREE_OPERAND (_p0, 0);
11324 : 28823 : switch (TREE_CODE (_q20))
11325 : : {
11326 : 0 : case ADDR_EXPR:
11327 : 0 : {
11328 : 0 : switch (TREE_CODE (_p1))
11329 : : {
11330 : 0 : CASE_CONVERT:
11331 : 0 : {
11332 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11333 : 0 : switch (TREE_CODE (_q40))
11334 : : {
11335 : 0 : case ADDR_EXPR:
11336 : 0 : {
11337 : 0 : {
11338 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11339 : 0 : tree res = generic_simplify_501 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11340 : 0 : if (res) return res;
11341 : : }
11342 : 0 : break;
11343 : : }
11344 : : default:;
11345 : : }
11346 : : break;
11347 : : }
11348 : 0 : case ADDR_EXPR:
11349 : 0 : {
11350 : 0 : {
11351 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
11352 : 0 : tree res = generic_simplify_502 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11353 : 0 : if (res) return res;
11354 : : }
11355 : 0 : break;
11356 : : }
11357 : : default:;
11358 : : }
11359 : : break;
11360 : : }
11361 : : default:;
11362 : : }
11363 : : break;
11364 : : }
11365 : 10 : case ADDR_EXPR:
11366 : 10 : {
11367 : 10 : switch (TREE_CODE (_p1))
11368 : : {
11369 : 0 : CASE_CONVERT:
11370 : 0 : {
11371 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11372 : 0 : switch (TREE_CODE (_q30))
11373 : : {
11374 : 0 : case ADDR_EXPR:
11375 : 0 : {
11376 : 0 : {
11377 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _q30 };
11378 : 0 : tree res = generic_simplify_503 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11379 : 0 : if (res) return res;
11380 : : }
11381 : 0 : break;
11382 : : }
11383 : : default:;
11384 : : }
11385 : : break;
11386 : : }
11387 : 10 : case ADDR_EXPR:
11388 : 10 : {
11389 : 10 : {
11390 : 10 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _p1 };
11391 : 10 : tree res = generic_simplify_504 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11392 : 10 : if (res) return res;
11393 : : }
11394 : 10 : break;
11395 : : }
11396 : : default:;
11397 : : }
11398 : : break;
11399 : : }
11400 : 72 : case NEGATE_EXPR:
11401 : 72 : {
11402 : 72 : tree _q20 = TREE_OPERAND (_p0, 0);
11403 : 72 : switch (TREE_CODE (_p1))
11404 : : {
11405 : 0 : case NEGATE_EXPR:
11406 : 0 : {
11407 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11408 : 0 : {
11409 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11410 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
11411 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
11412 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
11413 : : )
11414 : : {
11415 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1744;
11416 : 0 : {
11417 : 0 : tree res_op0;
11418 : 0 : {
11419 : 0 : tree _o1[2], _r1;
11420 : 0 : _o1[0] = captures[1];
11421 : 0 : _o1[1] = captures[3];
11422 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11423 : 0 : res_op0 = _r1;
11424 : : }
11425 : 0 : tree _r;
11426 : 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
11427 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1030, __FILE__, __LINE__, true);
11428 : 0 : return _r;
11429 : : }
11430 : 0 : next_after_fail1744:;
11431 : : }
11432 : : }
11433 : 0 : break;
11434 : : }
11435 : : default:;
11436 : : }
11437 : : break;
11438 : : }
11439 : 0 : case BIT_NOT_EXPR:
11440 : 0 : {
11441 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11442 : 0 : switch (TREE_CODE (_p1))
11443 : : {
11444 : 0 : case BIT_NOT_EXPR:
11445 : 0 : {
11446 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11447 : 0 : {
11448 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11449 : 0 : tree res = generic_simplify_505 (loc, type, _p0, _p1, captures, MAX_EXPR, MIN_EXPR);
11450 : 0 : if (res) return res;
11451 : : }
11452 : 0 : break;
11453 : : }
11454 : : default:;
11455 : : }
11456 : : break;
11457 : : }
11458 : 0 : case VEC_COND_EXPR:
11459 : 0 : {
11460 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11461 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11462 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11463 : 0 : switch (TREE_CODE (_p1))
11464 : : {
11465 : 0 : case VEC_COND_EXPR:
11466 : 0 : {
11467 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11468 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11469 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11470 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11471 : : {
11472 : 0 : {
11473 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11474 : 0 : if (VECTOR_TYPE_P (type)
11475 : 0 : && (TREE_CODE_CLASS (MAX_EXPR) != tcc_comparison
11476 : : || types_match (type, TREE_TYPE (captures[2]))
11477 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11478 : : || (optimize_vectors_before_lowering_p ()
11479 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11480 : : )
11481 : : {
11482 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1745;
11483 : 0 : {
11484 : 0 : tree res_op0;
11485 : 0 : res_op0 = captures[1];
11486 : 0 : tree res_op1;
11487 : 0 : {
11488 : 0 : tree _o1[2], _r1;
11489 : 0 : _o1[0] = captures[2];
11490 : 0 : _o1[1] = captures[5];
11491 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11492 : 0 : if (EXPR_P (_r1))
11493 : 0 : goto next_after_fail1745;
11494 : 0 : res_op1 = _r1;
11495 : : }
11496 : 0 : tree res_op2;
11497 : 0 : {
11498 : 0 : tree _o1[2], _r1;
11499 : 0 : _o1[0] = captures[3];
11500 : 0 : _o1[1] = captures[6];
11501 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11502 : 0 : if (EXPR_P (_r1))
11503 : 0 : goto next_after_fail1745;
11504 : 0 : res_op2 = _r1;
11505 : : }
11506 : 0 : tree _r;
11507 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11508 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
11509 : 0 : return _r;
11510 : : }
11511 : 0 : next_after_fail1745:;
11512 : : }
11513 : : }
11514 : : }
11515 : : break;
11516 : : }
11517 : 0 : default:;
11518 : : }
11519 : 0 : {
11520 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11521 : 0 : if (VECTOR_TYPE_P (type)
11522 : 0 : && (TREE_CODE_CLASS (MAX_EXPR) != tcc_comparison
11523 : : || types_match (type, TREE_TYPE (captures[2]))
11524 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11525 : : || (optimize_vectors_before_lowering_p ()
11526 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11527 : : )
11528 : : {
11529 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1746;
11530 : 0 : {
11531 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1746;
11532 : 0 : tree res_op0;
11533 : 0 : res_op0 = captures[1];
11534 : 0 : tree res_op1;
11535 : 0 : {
11536 : 0 : tree _o1[2], _r1;
11537 : 0 : _o1[0] = captures[2];
11538 : 0 : _o1[1] = unshare_expr (captures[4]);
11539 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11540 : 0 : if (EXPR_P (_r1))
11541 : 0 : goto next_after_fail1746;
11542 : 0 : res_op1 = _r1;
11543 : : }
11544 : 0 : tree res_op2;
11545 : 0 : {
11546 : 0 : tree _o1[2], _r1;
11547 : 0 : _o1[0] = captures[3];
11548 : 0 : _o1[1] = captures[4];
11549 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11550 : 0 : if (EXPR_P (_r1))
11551 : 0 : goto next_after_fail1746;
11552 : 0 : res_op2 = _r1;
11553 : : }
11554 : 0 : tree _r;
11555 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11556 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
11557 : 0 : return _r;
11558 : : }
11559 : 0 : next_after_fail1746:;
11560 : : }
11561 : : }
11562 : 0 : break;
11563 : : }
11564 : 351951 : default:;
11565 : : }
11566 : 351951 : switch (TREE_CODE (_p1))
11567 : : {
11568 : 0 : case VEC_COND_EXPR:
11569 : 0 : {
11570 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11571 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11572 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11573 : 0 : {
11574 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11575 : 0 : if (VECTOR_TYPE_P (type)
11576 : 0 : && (TREE_CODE_CLASS (MAX_EXPR) != tcc_comparison
11577 : : || types_match (type, TREE_TYPE (captures[3]))
11578 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11579 : : || (optimize_vectors_before_lowering_p ()
11580 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11581 : : )
11582 : : {
11583 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1747;
11584 : 0 : {
11585 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1747;
11586 : 0 : tree res_op0;
11587 : 0 : res_op0 = captures[2];
11588 : 0 : tree res_op1;
11589 : 0 : {
11590 : 0 : tree _o1[2], _r1;
11591 : 0 : _o1[0] = unshare_expr (captures[0]);
11592 : 0 : _o1[1] = captures[3];
11593 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11594 : 0 : if (EXPR_P (_r1))
11595 : 0 : goto next_after_fail1747;
11596 : 0 : res_op1 = _r1;
11597 : : }
11598 : 0 : tree res_op2;
11599 : 0 : {
11600 : 0 : tree _o1[2], _r1;
11601 : 0 : _o1[0] = captures[0];
11602 : 0 : _o1[1] = captures[4];
11603 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11604 : 0 : if (EXPR_P (_r1))
11605 : 0 : goto next_after_fail1747;
11606 : 0 : res_op2 = _r1;
11607 : : }
11608 : 0 : tree _r;
11609 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11610 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
11611 : 0 : return _r;
11612 : : }
11613 : 0 : next_after_fail1747:;
11614 : : }
11615 : : }
11616 : 0 : break;
11617 : : }
11618 : 351951 : default:;
11619 : : }
11620 : 351951 : if (tree_zero_one_valued_p (_p0))
11621 : : {
11622 : 12 : if (tree_zero_one_valued_p (_p1))
11623 : : {
11624 : 3 : {
11625 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11626 : 3 : tree res = generic_simplify_506 (loc, type, _p0, _p1, captures, MAX_EXPR, BIT_IOR_EXPR);
11627 : 3 : if (res) return res;
11628 : : }
11629 : : }
11630 : : }
11631 : : return NULL_TREE;
11632 : : }
11633 : :
11634 : : tree
11635 : 9397394 : generic_simplify_TRUTH_OR_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11636 : : {
11637 : 9397394 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11638 : 9397394 : switch (TREE_CODE (_p0))
11639 : : {
11640 : 1330705 : case LE_EXPR:
11641 : 1330705 : {
11642 : 1330705 : tree _q20 = TREE_OPERAND (_p0, 0);
11643 : 1330705 : tree _q21 = TREE_OPERAND (_p0, 1);
11644 : 1330705 : switch (TREE_CODE (_q20))
11645 : : {
11646 : 4295 : case POINTER_PLUS_EXPR:
11647 : 4295 : {
11648 : 4295 : tree _q30 = TREE_OPERAND (_q20, 0);
11649 : 4295 : tree _q31 = TREE_OPERAND (_q20, 1);
11650 : 4295 : switch (TREE_CODE (_q31))
11651 : : {
11652 : 4072 : case INTEGER_CST:
11653 : 4072 : {
11654 : 4072 : switch (TREE_CODE (_p1))
11655 : : {
11656 : 933 : case LE_EXPR:
11657 : 933 : {
11658 : 933 : tree _q70 = TREE_OPERAND (_p1, 0);
11659 : 933 : tree _q71 = TREE_OPERAND (_p1, 1);
11660 : 933 : switch (TREE_CODE (_q70))
11661 : : {
11662 : 546 : case POINTER_PLUS_EXPR:
11663 : 546 : {
11664 : 546 : tree _q80 = TREE_OPERAND (_q70, 0);
11665 : 546 : tree _q81 = TREE_OPERAND (_q70, 1);
11666 : 546 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
11667 : : {
11668 : 515 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
11669 : : {
11670 : 403 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
11671 : : {
11672 : 403 : {
11673 : 403 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q70 };
11674 : 403 : const enum tree_code cmp = LE_EXPR;
11675 : 403 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
11676 : 402 : && TYPE_OVERFLOW_WRAPS (sizetype)
11677 : 805 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
11678 : : )
11679 : : {
11680 : 402 : {
11681 : 402 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
11682 : 402 : offset_int rhs = off * 2;
11683 : 402 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
11684 : : )
11685 : : {
11686 : 402 : {
11687 : 402 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
11688 : 402 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
11689 : 402 : if (cmp == LT_EXPR
11690 : : )
11691 : : {
11692 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1795;
11693 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1795;
11694 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1795;
11695 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1795;
11696 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1795;
11697 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1795;
11698 : : {
11699 : : tree res_op0;
11700 : : {
11701 : : tree _o1[1], _r1;
11702 : : {
11703 : : tree _o2[2], _r2;
11704 : : _o2[0] = swap_p ? captures[6] : captures[1];
11705 : : _o2[1] = swap_p ? captures[2] : captures[4];
11706 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11707 : : _o1[0] = _r2;
11708 : : }
11709 : : if (TREE_TYPE (_o1[0]) != sizetype)
11710 : : {
11711 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11712 : : }
11713 : : else
11714 : : _r1 = _o1[0];
11715 : : res_op0 = _r1;
11716 : : }
11717 : : tree res_op1;
11718 : : res_op1 = rhs_tree;
11719 : : tree _r;
11720 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11721 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
11722 : 402 : return _r;
11723 : : }
11724 : : next_after_fail1795:;
11725 : : }
11726 : : else
11727 : : {
11728 : 402 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1796;
11729 : 402 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1796;
11730 : 402 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1796;
11731 : 402 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1796;
11732 : 402 : {
11733 : 402 : tree res_op0;
11734 : 402 : {
11735 : 402 : tree _o1[1], _r1;
11736 : 402 : {
11737 : 402 : tree _o2[2], _r2;
11738 : 402 : {
11739 : 402 : tree _o3[2], _r3;
11740 : 402 : _o3[0] = swap_p ? captures[4] : captures[2];
11741 : 402 : _o3[1] = wide_int_to_tree (sizetype, off);
11742 : 402 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
11743 : 402 : _o2[0] = _r3;
11744 : : }
11745 : 402 : _o2[1] = swap_p ? captures[2] : captures[4];
11746 : 402 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11747 : 402 : _o1[0] = _r2;
11748 : : }
11749 : 402 : if (TREE_TYPE (_o1[0]) != sizetype)
11750 : : {
11751 : 402 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11752 : : }
11753 : : else
11754 : : _r1 = _o1[0];
11755 : 402 : res_op0 = _r1;
11756 : : }
11757 : 402 : tree res_op1;
11758 : 402 : res_op1 = rhs_tree;
11759 : 402 : tree _r;
11760 : 402 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11761 : 402 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
11762 : 402 : return _r;
11763 : : }
11764 : 0 : next_after_fail1796:;
11765 : : }
11766 : : }
11767 : : }
11768 : : }
11769 : : }
11770 : : }
11771 : : }
11772 : : }
11773 : : }
11774 : : break;
11775 : : }
11776 : : default:;
11777 : : }
11778 : : break;
11779 : : }
11780 : 148 : case GE_EXPR:
11781 : 148 : {
11782 : 148 : tree _q70 = TREE_OPERAND (_p1, 0);
11783 : 148 : tree _q71 = TREE_OPERAND (_p1, 1);
11784 : 148 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
11785 : : {
11786 : 16 : switch (TREE_CODE (_q71))
11787 : : {
11788 : 16 : case POINTER_PLUS_EXPR:
11789 : 16 : {
11790 : 16 : tree _q90 = TREE_OPERAND (_q71, 0);
11791 : 16 : tree _q91 = TREE_OPERAND (_q71, 1);
11792 : 16 : if ((_q90 == _q21 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q21, 0) && types_match (_q90, _q21)))
11793 : : {
11794 : 14 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
11795 : : {
11796 : 9 : {
11797 : 9 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q71 };
11798 : 9 : const enum tree_code cmp = LE_EXPR;
11799 : 9 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
11800 : 9 : && TYPE_OVERFLOW_WRAPS (sizetype)
11801 : 18 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
11802 : : )
11803 : : {
11804 : 9 : {
11805 : 9 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
11806 : 9 : offset_int rhs = off * 2;
11807 : 9 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
11808 : : )
11809 : : {
11810 : 9 : {
11811 : 9 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
11812 : 9 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
11813 : 9 : if (cmp == LT_EXPR
11814 : : )
11815 : : {
11816 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1797;
11817 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1797;
11818 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1797;
11819 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1797;
11820 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1797;
11821 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1797;
11822 : : {
11823 : : tree res_op0;
11824 : : {
11825 : : tree _o1[1], _r1;
11826 : : {
11827 : : tree _o2[2], _r2;
11828 : : _o2[0] = swap_p ? captures[6] : captures[1];
11829 : : _o2[1] = swap_p ? captures[2] : captures[4];
11830 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11831 : : _o1[0] = _r2;
11832 : : }
11833 : : if (TREE_TYPE (_o1[0]) != sizetype)
11834 : : {
11835 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11836 : : }
11837 : : else
11838 : : _r1 = _o1[0];
11839 : : res_op0 = _r1;
11840 : : }
11841 : : tree res_op1;
11842 : : res_op1 = rhs_tree;
11843 : : tree _r;
11844 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11845 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
11846 : 9 : return _r;
11847 : : }
11848 : : next_after_fail1797:;
11849 : : }
11850 : : else
11851 : : {
11852 : 9 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1798;
11853 : 9 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1798;
11854 : 9 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1798;
11855 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1798;
11856 : 9 : {
11857 : 9 : tree res_op0;
11858 : 9 : {
11859 : 9 : tree _o1[1], _r1;
11860 : 9 : {
11861 : 9 : tree _o2[2], _r2;
11862 : 9 : {
11863 : 9 : tree _o3[2], _r3;
11864 : 9 : _o3[0] = swap_p ? captures[4] : captures[2];
11865 : 9 : _o3[1] = wide_int_to_tree (sizetype, off);
11866 : 9 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
11867 : 9 : _o2[0] = _r3;
11868 : : }
11869 : 9 : _o2[1] = swap_p ? captures[2] : captures[4];
11870 : 9 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11871 : 9 : _o1[0] = _r2;
11872 : : }
11873 : 9 : if (TREE_TYPE (_o1[0]) != sizetype)
11874 : : {
11875 : 9 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11876 : : }
11877 : : else
11878 : : _r1 = _o1[0];
11879 : 9 : res_op0 = _r1;
11880 : : }
11881 : 9 : tree res_op1;
11882 : 9 : res_op1 = rhs_tree;
11883 : 9 : tree _r;
11884 : 9 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11885 : 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
11886 : 9 : return _r;
11887 : : }
11888 : 0 : next_after_fail1798:;
11889 : : }
11890 : : }
11891 : : }
11892 : : }
11893 : : }
11894 : : }
11895 : : }
11896 : : }
11897 : : break;
11898 : : }
11899 : : default:;
11900 : : }
11901 : : }
11902 : : break;
11903 : : }
11904 : : default:;
11905 : : }
11906 : : break;
11907 : : }
11908 : : default:;
11909 : : }
11910 : : break;
11911 : : }
11912 : : default:;
11913 : : }
11914 : : break;
11915 : : }
11916 : 1076500 : case LT_EXPR:
11917 : 1076500 : {
11918 : 1076500 : tree _q20 = TREE_OPERAND (_p0, 0);
11919 : 1076500 : tree _q21 = TREE_OPERAND (_p0, 1);
11920 : 1076500 : switch (TREE_CODE (_q20))
11921 : : {
11922 : 1198 : case POINTER_PLUS_EXPR:
11923 : 1198 : {
11924 : 1198 : tree _q30 = TREE_OPERAND (_q20, 0);
11925 : 1198 : tree _q31 = TREE_OPERAND (_q20, 1);
11926 : 1198 : switch (TREE_CODE (_q31))
11927 : : {
11928 : 1011 : case INTEGER_CST:
11929 : 1011 : {
11930 : 1011 : switch (TREE_CODE (_p1))
11931 : : {
11932 : 11 : case LT_EXPR:
11933 : 11 : {
11934 : 11 : tree _q70 = TREE_OPERAND (_p1, 0);
11935 : 11 : tree _q71 = TREE_OPERAND (_p1, 1);
11936 : 11 : switch (TREE_CODE (_q70))
11937 : : {
11938 : 11 : case POINTER_PLUS_EXPR:
11939 : 11 : {
11940 : 11 : tree _q80 = TREE_OPERAND (_q70, 0);
11941 : 11 : tree _q81 = TREE_OPERAND (_q70, 1);
11942 : 11 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
11943 : : {
11944 : 1 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
11945 : : {
11946 : 1 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
11947 : : {
11948 : 1 : {
11949 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q70 };
11950 : 1 : const enum tree_code cmp = LT_EXPR;
11951 : 1 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
11952 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
11953 : 1 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
11954 : : )
11955 : : {
11956 : 0 : {
11957 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
11958 : 0 : offset_int rhs = off * 2;
11959 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
11960 : : )
11961 : : {
11962 : 0 : {
11963 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
11964 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
11965 : 0 : if (cmp == LT_EXPR
11966 : : )
11967 : : {
11968 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1799;
11969 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1799;
11970 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1799;
11971 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1799;
11972 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1799;
11973 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1799;
11974 : 0 : {
11975 : 0 : tree res_op0;
11976 : 0 : {
11977 : 0 : tree _o1[1], _r1;
11978 : 0 : {
11979 : 0 : tree _o2[2], _r2;
11980 : 0 : _o2[0] = swap_p ? captures[6] : captures[1];
11981 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
11982 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11983 : 0 : _o1[0] = _r2;
11984 : : }
11985 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
11986 : : {
11987 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11988 : : }
11989 : : else
11990 : : _r1 = _o1[0];
11991 : 0 : res_op0 = _r1;
11992 : : }
11993 : 0 : tree res_op1;
11994 : 0 : res_op1 = rhs_tree;
11995 : 0 : tree _r;
11996 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11997 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
11998 : 0 : return _r;
11999 : : }
12000 : 0 : next_after_fail1799:;
12001 : : }
12002 : : else
12003 : : {
12004 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1800;
12005 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1800;
12006 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1800;
12007 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1800;
12008 : : {
12009 : : tree res_op0;
12010 : : {
12011 : : tree _o1[1], _r1;
12012 : : {
12013 : : tree _o2[2], _r2;
12014 : : {
12015 : : tree _o3[2], _r3;
12016 : : _o3[0] = swap_p ? captures[4] : captures[2];
12017 : : _o3[1] = wide_int_to_tree (sizetype, off);
12018 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12019 : : _o2[0] = _r3;
12020 : : }
12021 : : _o2[1] = swap_p ? captures[2] : captures[4];
12022 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12023 : : _o1[0] = _r2;
12024 : : }
12025 : : if (TREE_TYPE (_o1[0]) != sizetype)
12026 : : {
12027 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12028 : : }
12029 : : else
12030 : : _r1 = _o1[0];
12031 : : res_op0 = _r1;
12032 : : }
12033 : : tree res_op1;
12034 : : res_op1 = rhs_tree;
12035 : : tree _r;
12036 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12037 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
12038 : : return _r;
12039 : : }
12040 : : next_after_fail1800:;
12041 : : }
12042 : : }
12043 : : }
12044 : : }
12045 : : }
12046 : : }
12047 : : }
12048 : : }
12049 : : }
12050 : : break;
12051 : : }
12052 : : default:;
12053 : : }
12054 : : break;
12055 : : }
12056 : 482 : case GT_EXPR:
12057 : 482 : {
12058 : 482 : tree _q70 = TREE_OPERAND (_p1, 0);
12059 : 482 : tree _q71 = TREE_OPERAND (_p1, 1);
12060 : 482 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
12061 : : {
12062 : 0 : switch (TREE_CODE (_q71))
12063 : : {
12064 : 0 : case POINTER_PLUS_EXPR:
12065 : 0 : {
12066 : 0 : tree _q90 = TREE_OPERAND (_q71, 0);
12067 : 0 : tree _q91 = TREE_OPERAND (_q71, 1);
12068 : 0 : if ((_q90 == _q21 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q21, 0) && types_match (_q90, _q21)))
12069 : : {
12070 : 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
12071 : : {
12072 : 0 : {
12073 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q71 };
12074 : 0 : const enum tree_code cmp = LT_EXPR;
12075 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12076 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12077 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12078 : : )
12079 : : {
12080 : 0 : {
12081 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12082 : 0 : offset_int rhs = off * 2;
12083 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12084 : : )
12085 : : {
12086 : 0 : {
12087 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12088 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12089 : 0 : if (cmp == LT_EXPR
12090 : : )
12091 : : {
12092 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1801;
12093 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1801;
12094 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1801;
12095 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1801;
12096 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1801;
12097 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1801;
12098 : 0 : {
12099 : 0 : tree res_op0;
12100 : 0 : {
12101 : 0 : tree _o1[1], _r1;
12102 : 0 : {
12103 : 0 : tree _o2[2], _r2;
12104 : 0 : _o2[0] = swap_p ? captures[6] : captures[1];
12105 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12106 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12107 : 0 : _o1[0] = _r2;
12108 : : }
12109 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12110 : : {
12111 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12112 : : }
12113 : : else
12114 : : _r1 = _o1[0];
12115 : 0 : res_op0 = _r1;
12116 : : }
12117 : 0 : tree res_op1;
12118 : 0 : res_op1 = rhs_tree;
12119 : 0 : tree _r;
12120 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12121 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
12122 : 0 : return _r;
12123 : : }
12124 : 0 : next_after_fail1801:;
12125 : : }
12126 : : else
12127 : : {
12128 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1802;
12129 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1802;
12130 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1802;
12131 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1802;
12132 : : {
12133 : : tree res_op0;
12134 : : {
12135 : : tree _o1[1], _r1;
12136 : : {
12137 : : tree _o2[2], _r2;
12138 : : {
12139 : : tree _o3[2], _r3;
12140 : : _o3[0] = swap_p ? captures[4] : captures[2];
12141 : : _o3[1] = wide_int_to_tree (sizetype, off);
12142 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12143 : : _o2[0] = _r3;
12144 : : }
12145 : : _o2[1] = swap_p ? captures[2] : captures[4];
12146 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12147 : : _o1[0] = _r2;
12148 : : }
12149 : : if (TREE_TYPE (_o1[0]) != sizetype)
12150 : : {
12151 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12152 : : }
12153 : : else
12154 : : _r1 = _o1[0];
12155 : : res_op0 = _r1;
12156 : : }
12157 : : tree res_op1;
12158 : : res_op1 = rhs_tree;
12159 : : tree _r;
12160 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12161 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
12162 : : return _r;
12163 : : }
12164 : : next_after_fail1802:;
12165 : : }
12166 : : }
12167 : : }
12168 : : }
12169 : : }
12170 : : }
12171 : : }
12172 : : }
12173 : : break;
12174 : : }
12175 : : default:;
12176 : : }
12177 : : }
12178 : : break;
12179 : : }
12180 : : default:;
12181 : : }
12182 : : break;
12183 : : }
12184 : : default:;
12185 : : }
12186 : : break;
12187 : : }
12188 : : default:;
12189 : : }
12190 : : break;
12191 : : }
12192 : 795437 : case GE_EXPR:
12193 : 795437 : {
12194 : 795437 : tree _q20 = TREE_OPERAND (_p0, 0);
12195 : 795437 : tree _q21 = TREE_OPERAND (_p0, 1);
12196 : 795437 : switch (TREE_CODE (_q21))
12197 : : {
12198 : 62 : case POINTER_PLUS_EXPR:
12199 : 62 : {
12200 : 62 : tree _q40 = TREE_OPERAND (_q21, 0);
12201 : 62 : tree _q41 = TREE_OPERAND (_q21, 1);
12202 : 62 : switch (TREE_CODE (_q41))
12203 : : {
12204 : 62 : case INTEGER_CST:
12205 : 62 : {
12206 : 62 : switch (TREE_CODE (_p1))
12207 : : {
12208 : 51 : case LE_EXPR:
12209 : 51 : {
12210 : 51 : tree _q70 = TREE_OPERAND (_p1, 0);
12211 : 51 : tree _q71 = TREE_OPERAND (_p1, 1);
12212 : 51 : switch (TREE_CODE (_q70))
12213 : : {
12214 : 41 : case POINTER_PLUS_EXPR:
12215 : 41 : {
12216 : 41 : tree _q80 = TREE_OPERAND (_q70, 0);
12217 : 41 : tree _q81 = TREE_OPERAND (_q70, 1);
12218 : 41 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
12219 : : {
12220 : 28 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
12221 : : {
12222 : 5 : if ((_q71 == _q40 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q40, 0) && types_match (_q71, _q40)))
12223 : : {
12224 : 5 : {
12225 : 5 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q70 };
12226 : 5 : const enum tree_code cmp = LE_EXPR;
12227 : 5 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12228 : 5 : && TYPE_OVERFLOW_WRAPS (sizetype)
12229 : 10 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12230 : : )
12231 : : {
12232 : 5 : {
12233 : 5 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12234 : 5 : offset_int rhs = off * 2;
12235 : 5 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12236 : : )
12237 : : {
12238 : 5 : {
12239 : 5 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12240 : 5 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12241 : 5 : if (cmp == LT_EXPR
12242 : : )
12243 : : {
12244 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1803;
12245 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1803;
12246 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1803;
12247 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1803;
12248 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1803;
12249 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1803;
12250 : : {
12251 : : tree res_op0;
12252 : : {
12253 : : tree _o1[1], _r1;
12254 : : {
12255 : : tree _o2[2], _r2;
12256 : : _o2[0] = swap_p ? captures[6] : captures[1];
12257 : : _o2[1] = swap_p ? captures[2] : captures[4];
12258 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12259 : : _o1[0] = _r2;
12260 : : }
12261 : : if (TREE_TYPE (_o1[0]) != sizetype)
12262 : : {
12263 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12264 : : }
12265 : : else
12266 : : _r1 = _o1[0];
12267 : : res_op0 = _r1;
12268 : : }
12269 : : tree res_op1;
12270 : : res_op1 = rhs_tree;
12271 : : tree _r;
12272 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12273 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
12274 : 5 : return _r;
12275 : : }
12276 : : next_after_fail1803:;
12277 : : }
12278 : : else
12279 : : {
12280 : 5 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1804;
12281 : 5 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1804;
12282 : 5 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1804;
12283 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1804;
12284 : 5 : {
12285 : 5 : tree res_op0;
12286 : 5 : {
12287 : 5 : tree _o1[1], _r1;
12288 : 5 : {
12289 : 5 : tree _o2[2], _r2;
12290 : 5 : {
12291 : 5 : tree _o3[2], _r3;
12292 : 5 : _o3[0] = swap_p ? captures[4] : captures[2];
12293 : 5 : _o3[1] = wide_int_to_tree (sizetype, off);
12294 : 5 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12295 : 5 : _o2[0] = _r3;
12296 : : }
12297 : 5 : _o2[1] = swap_p ? captures[2] : captures[4];
12298 : 5 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12299 : 5 : _o1[0] = _r2;
12300 : : }
12301 : 5 : if (TREE_TYPE (_o1[0]) != sizetype)
12302 : : {
12303 : 5 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12304 : : }
12305 : : else
12306 : : _r1 = _o1[0];
12307 : 5 : res_op0 = _r1;
12308 : : }
12309 : 5 : tree res_op1;
12310 : 5 : res_op1 = rhs_tree;
12311 : 5 : tree _r;
12312 : 5 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12313 : 5 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
12314 : 5 : return _r;
12315 : : }
12316 : 0 : next_after_fail1804:;
12317 : : }
12318 : : }
12319 : : }
12320 : : }
12321 : : }
12322 : : }
12323 : : }
12324 : : }
12325 : : }
12326 : : break;
12327 : : }
12328 : : default:;
12329 : : }
12330 : : break;
12331 : : }
12332 : 0 : case GE_EXPR:
12333 : 0 : {
12334 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
12335 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
12336 : 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
12337 : : {
12338 : 0 : switch (TREE_CODE (_q71))
12339 : : {
12340 : 0 : case POINTER_PLUS_EXPR:
12341 : 0 : {
12342 : 0 : tree _q90 = TREE_OPERAND (_q71, 0);
12343 : 0 : tree _q91 = TREE_OPERAND (_q71, 1);
12344 : 0 : if ((_q90 == _q20 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q20, 0) && types_match (_q90, _q20)))
12345 : : {
12346 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
12347 : : {
12348 : 0 : {
12349 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q71 };
12350 : 0 : const enum tree_code cmp = LE_EXPR;
12351 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12352 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12353 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12354 : : )
12355 : : {
12356 : 0 : {
12357 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12358 : 0 : offset_int rhs = off * 2;
12359 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12360 : : )
12361 : : {
12362 : 0 : {
12363 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12364 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12365 : 0 : if (cmp == LT_EXPR
12366 : : )
12367 : : {
12368 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1805;
12369 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1805;
12370 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1805;
12371 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1805;
12372 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1805;
12373 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1805;
12374 : : {
12375 : : tree res_op0;
12376 : : {
12377 : : tree _o1[1], _r1;
12378 : : {
12379 : : tree _o2[2], _r2;
12380 : : _o2[0] = swap_p ? captures[6] : captures[1];
12381 : : _o2[1] = swap_p ? captures[2] : captures[4];
12382 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12383 : : _o1[0] = _r2;
12384 : : }
12385 : : if (TREE_TYPE (_o1[0]) != sizetype)
12386 : : {
12387 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12388 : : }
12389 : : else
12390 : : _r1 = _o1[0];
12391 : : res_op0 = _r1;
12392 : : }
12393 : : tree res_op1;
12394 : : res_op1 = rhs_tree;
12395 : : tree _r;
12396 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12397 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
12398 : 0 : return _r;
12399 : : }
12400 : : next_after_fail1805:;
12401 : : }
12402 : : else
12403 : : {
12404 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1806;
12405 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1806;
12406 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1806;
12407 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1806;
12408 : 0 : {
12409 : 0 : tree res_op0;
12410 : 0 : {
12411 : 0 : tree _o1[1], _r1;
12412 : 0 : {
12413 : 0 : tree _o2[2], _r2;
12414 : 0 : {
12415 : 0 : tree _o3[2], _r3;
12416 : 0 : _o3[0] = swap_p ? captures[4] : captures[2];
12417 : 0 : _o3[1] = wide_int_to_tree (sizetype, off);
12418 : 0 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12419 : 0 : _o2[0] = _r3;
12420 : : }
12421 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12422 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12423 : 0 : _o1[0] = _r2;
12424 : : }
12425 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12426 : : {
12427 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12428 : : }
12429 : : else
12430 : : _r1 = _o1[0];
12431 : 0 : res_op0 = _r1;
12432 : : }
12433 : 0 : tree res_op1;
12434 : 0 : res_op1 = rhs_tree;
12435 : 0 : tree _r;
12436 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12437 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
12438 : 0 : return _r;
12439 : : }
12440 : 0 : next_after_fail1806:;
12441 : : }
12442 : : }
12443 : : }
12444 : : }
12445 : : }
12446 : : }
12447 : : }
12448 : : }
12449 : : break;
12450 : : }
12451 : : default:;
12452 : : }
12453 : : }
12454 : : break;
12455 : : }
12456 : : default:;
12457 : : }
12458 : : break;
12459 : : }
12460 : : default:;
12461 : : }
12462 : : break;
12463 : : }
12464 : : default:;
12465 : : }
12466 : : break;
12467 : : }
12468 : 1224031 : case GT_EXPR:
12469 : 1224031 : {
12470 : 1224031 : tree _q20 = TREE_OPERAND (_p0, 0);
12471 : 1224031 : tree _q21 = TREE_OPERAND (_p0, 1);
12472 : 1224031 : switch (TREE_CODE (_q21))
12473 : : {
12474 : 60 : case POINTER_PLUS_EXPR:
12475 : 60 : {
12476 : 60 : tree _q40 = TREE_OPERAND (_q21, 0);
12477 : 60 : tree _q41 = TREE_OPERAND (_q21, 1);
12478 : 60 : switch (TREE_CODE (_q41))
12479 : : {
12480 : 60 : case INTEGER_CST:
12481 : 60 : {
12482 : 60 : switch (TREE_CODE (_p1))
12483 : : {
12484 : 0 : case LT_EXPR:
12485 : 0 : {
12486 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
12487 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
12488 : 0 : switch (TREE_CODE (_q70))
12489 : : {
12490 : 0 : case POINTER_PLUS_EXPR:
12491 : 0 : {
12492 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
12493 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
12494 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
12495 : : {
12496 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
12497 : : {
12498 : 0 : if ((_q71 == _q40 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q40, 0) && types_match (_q71, _q40)))
12499 : : {
12500 : 0 : {
12501 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q70 };
12502 : 0 : const enum tree_code cmp = LT_EXPR;
12503 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12504 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12505 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12506 : : )
12507 : : {
12508 : 0 : {
12509 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12510 : 0 : offset_int rhs = off * 2;
12511 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12512 : : )
12513 : : {
12514 : 0 : {
12515 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12516 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12517 : 0 : if (cmp == LT_EXPR
12518 : : )
12519 : : {
12520 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1807;
12521 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1807;
12522 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1807;
12523 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1807;
12524 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1807;
12525 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1807;
12526 : 0 : {
12527 : 0 : tree res_op0;
12528 : 0 : {
12529 : 0 : tree _o1[1], _r1;
12530 : 0 : {
12531 : 0 : tree _o2[2], _r2;
12532 : 0 : _o2[0] = swap_p ? captures[6] : captures[1];
12533 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12534 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12535 : 0 : _o1[0] = _r2;
12536 : : }
12537 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12538 : : {
12539 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12540 : : }
12541 : : else
12542 : : _r1 = _o1[0];
12543 : 0 : res_op0 = _r1;
12544 : : }
12545 : 0 : tree res_op1;
12546 : 0 : res_op1 = rhs_tree;
12547 : 0 : tree _r;
12548 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12549 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
12550 : 0 : return _r;
12551 : : }
12552 : 0 : next_after_fail1807:;
12553 : : }
12554 : : else
12555 : : {
12556 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1808;
12557 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1808;
12558 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1808;
12559 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1808;
12560 : : {
12561 : : tree res_op0;
12562 : : {
12563 : : tree _o1[1], _r1;
12564 : : {
12565 : : tree _o2[2], _r2;
12566 : : {
12567 : : tree _o3[2], _r3;
12568 : : _o3[0] = swap_p ? captures[4] : captures[2];
12569 : : _o3[1] = wide_int_to_tree (sizetype, off);
12570 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12571 : : _o2[0] = _r3;
12572 : : }
12573 : : _o2[1] = swap_p ? captures[2] : captures[4];
12574 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12575 : : _o1[0] = _r2;
12576 : : }
12577 : : if (TREE_TYPE (_o1[0]) != sizetype)
12578 : : {
12579 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12580 : : }
12581 : : else
12582 : : _r1 = _o1[0];
12583 : : res_op0 = _r1;
12584 : : }
12585 : : tree res_op1;
12586 : : res_op1 = rhs_tree;
12587 : : tree _r;
12588 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12589 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
12590 : : return _r;
12591 : : }
12592 : : next_after_fail1808:;
12593 : : }
12594 : : }
12595 : : }
12596 : : }
12597 : : }
12598 : : }
12599 : : }
12600 : : }
12601 : : }
12602 : : break;
12603 : : }
12604 : : default:;
12605 : : }
12606 : : break;
12607 : : }
12608 : 20 : case GT_EXPR:
12609 : 20 : {
12610 : 20 : tree _q70 = TREE_OPERAND (_p1, 0);
12611 : 20 : tree _q71 = TREE_OPERAND (_p1, 1);
12612 : 20 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
12613 : : {
12614 : 0 : switch (TREE_CODE (_q71))
12615 : : {
12616 : 0 : case POINTER_PLUS_EXPR:
12617 : 0 : {
12618 : 0 : tree _q90 = TREE_OPERAND (_q71, 0);
12619 : 0 : tree _q91 = TREE_OPERAND (_q71, 1);
12620 : 0 : if ((_q90 == _q20 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q20, 0) && types_match (_q90, _q20)))
12621 : : {
12622 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
12623 : : {
12624 : 0 : {
12625 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q71 };
12626 : 0 : const enum tree_code cmp = LT_EXPR;
12627 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12628 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12629 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12630 : : )
12631 : : {
12632 : 0 : {
12633 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12634 : 0 : offset_int rhs = off * 2;
12635 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12636 : : )
12637 : : {
12638 : 0 : {
12639 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12640 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12641 : 0 : if (cmp == LT_EXPR
12642 : : )
12643 : : {
12644 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1809;
12645 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1809;
12646 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1809;
12647 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1809;
12648 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1809;
12649 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1809;
12650 : 0 : {
12651 : 0 : tree res_op0;
12652 : 0 : {
12653 : 0 : tree _o1[1], _r1;
12654 : 0 : {
12655 : 0 : tree _o2[2], _r2;
12656 : 0 : _o2[0] = swap_p ? captures[6] : captures[1];
12657 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12658 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12659 : 0 : _o1[0] = _r2;
12660 : : }
12661 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12662 : : {
12663 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12664 : : }
12665 : : else
12666 : : _r1 = _o1[0];
12667 : 0 : res_op0 = _r1;
12668 : : }
12669 : 0 : tree res_op1;
12670 : 0 : res_op1 = rhs_tree;
12671 : 0 : tree _r;
12672 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12673 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
12674 : 0 : return _r;
12675 : : }
12676 : 0 : next_after_fail1809:;
12677 : : }
12678 : : else
12679 : : {
12680 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1810;
12681 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1810;
12682 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1810;
12683 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1810;
12684 : : {
12685 : : tree res_op0;
12686 : : {
12687 : : tree _o1[1], _r1;
12688 : : {
12689 : : tree _o2[2], _r2;
12690 : : {
12691 : : tree _o3[2], _r3;
12692 : : _o3[0] = swap_p ? captures[4] : captures[2];
12693 : : _o3[1] = wide_int_to_tree (sizetype, off);
12694 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12695 : : _o2[0] = _r3;
12696 : : }
12697 : : _o2[1] = swap_p ? captures[2] : captures[4];
12698 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12699 : : _o1[0] = _r2;
12700 : : }
12701 : : if (TREE_TYPE (_o1[0]) != sizetype)
12702 : : {
12703 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12704 : : }
12705 : : else
12706 : : _r1 = _o1[0];
12707 : : res_op0 = _r1;
12708 : : }
12709 : : tree res_op1;
12710 : : res_op1 = rhs_tree;
12711 : : tree _r;
12712 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12713 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
12714 : : return _r;
12715 : : }
12716 : : next_after_fail1810:;
12717 : : }
12718 : : }
12719 : : }
12720 : : }
12721 : : }
12722 : : }
12723 : : }
12724 : : }
12725 : : break;
12726 : : }
12727 : : default:;
12728 : : }
12729 : : }
12730 : : break;
12731 : : }
12732 : : default:;
12733 : : }
12734 : : break;
12735 : : }
12736 : : default:;
12737 : : }
12738 : : break;
12739 : : }
12740 : : default:;
12741 : : }
12742 : : break;
12743 : : }
12744 : : default:;
12745 : : }
12746 : : return NULL_TREE;
12747 : : }
12748 : : #pragma GCC diagnostic pop
|