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 : 96288995 : tree_bit_not_with_nop (tree t, tree *res_ops)
11 : : {
12 : 96288995 : const tree type = TREE_TYPE (t);
13 : 96288995 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 96288995 : if (TREE_SIDE_EFFECTS (t)) return false;
15 : 96288995 : switch (TREE_CODE (t))
16 : : {
17 : 107102 : case BIT_NOT_EXPR:
18 : 107102 : {
19 : 107102 : tree _p0 = TREE_OPERAND (t, 0);
20 : 107102 : {
21 : 107102 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
22 : 107102 : {
23 : 107102 : res_ops[0] = captures[0];
24 : 107102 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 2, __FILE__, __LINE__, false);
25 : : return true;
26 : : }
27 : : }
28 : 16174567 : break;
29 : : }
30 : 16174567 : CASE_CONVERT:
31 : 16174567 : {
32 : 16174567 : tree _p0 = TREE_OPERAND (t, 0);
33 : 16174567 : switch (TREE_CODE (_p0))
34 : : {
35 : 1094 : case BIT_NOT_EXPR:
36 : 1094 : {
37 : 1094 : tree _q20 = TREE_OPERAND (_p0, 0);
38 : 1094 : {
39 : 1094 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
40 : 1094 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
41 : : )
42 : : {
43 : 609 : {
44 : 609 : res_ops[0] = captures[0];
45 : 609 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 3, __FILE__, __LINE__, false);
46 : 609 : return true;
47 : : }
48 : : }
49 : : }
50 : : break;
51 : : }
52 : : default:;
53 : : }
54 : : break;
55 : : }
56 : : default:;
57 : : }
58 : : return false;
59 : : }
60 : :
61 : : bool
62 : 79805643 : tree_with_known_nonzero_bits_1 (tree t)
63 : : {
64 : 79805643 : const tree type = TREE_TYPE (t);
65 : 79805643 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
66 : 79805643 : if (TREE_SIDE_EFFECTS (t)) return false;
67 : 79805643 : switch (TREE_CODE (t))
68 : : {
69 : 20873636 : case INTEGER_CST:
70 : 20873636 : {
71 : 20873636 : {
72 : 20873636 : tree captures[1] ATTRIBUTE_UNUSED = { t };
73 : 20873636 : {
74 : 20873636 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 37, __FILE__, __LINE__, false);
75 : 20873636 : return true;
76 : : }
77 : : }
78 : 27778726 : break;
79 : : }
80 : 27778726 : case SSA_NAME:
81 : 27778726 : {
82 : 27778726 : {
83 : 27778726 : tree captures[1] ATTRIBUTE_UNUSED = { t };
84 : 27778726 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
85 : : )
86 : : {
87 : 19745786 : {
88 : 19745786 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 38, __FILE__, __LINE__, false);
89 : 19745786 : return true;
90 : : }
91 : : }
92 : : }
93 : : break;
94 : : }
95 : : default:;
96 : : }
97 : : return false;
98 : : }
99 : :
100 : : bool
101 : 0 : tree_usadd_overflow_mask (tree t, tree *res_ops)
102 : : {
103 : 0 : const tree type = TREE_TYPE (t);
104 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
105 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
106 : 0 : switch (TREE_CODE (t))
107 : : {
108 : 0 : case NEGATE_EXPR:
109 : 0 : {
110 : 0 : tree _p0 = TREE_OPERAND (t, 0);
111 : 0 : switch (TREE_CODE (_p0))
112 : : {
113 : 0 : CASE_CONVERT:
114 : 0 : {
115 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
116 : 0 : switch (TREE_CODE (_q20))
117 : : {
118 : 0 : case GT_EXPR:
119 : 0 : {
120 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
121 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
122 : 0 : switch (TREE_CODE (_q31))
123 : : {
124 : 0 : case PLUS_EXPR:
125 : 0 : {
126 : 0 : tree _q50 = TREE_OPERAND (_q31, 0);
127 : 0 : tree _q51 = TREE_OPERAND (_q31, 1);
128 : 0 : if ((_q50 == _q30 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q30, 0) && types_match (_q50, _q30)))
129 : : {
130 : 0 : {
131 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q51 };
132 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
133 : : )
134 : : {
135 : 0 : if (types_match (type, captures[0], captures[1])
136 : : )
137 : : {
138 : 0 : {
139 : 0 : res_ops[0] = captures[0];
140 : 0 : res_ops[1] = captures[1];
141 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 43, __FILE__, __LINE__, false);
142 : 0 : return true;
143 : : }
144 : : }
145 : : }
146 : : }
147 : : }
148 : 0 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q30, 0) && types_match (_q51, _q30)))
149 : : {
150 : 0 : {
151 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q50 };
152 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
153 : : )
154 : : {
155 : 0 : if (types_match (type, captures[0], captures[1])
156 : : )
157 : : {
158 : 0 : {
159 : 0 : res_ops[0] = captures[0];
160 : 0 : res_ops[1] = captures[1];
161 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 43, __FILE__, __LINE__, false);
162 : 0 : return true;
163 : : }
164 : : }
165 : : }
166 : : }
167 : : }
168 : : break;
169 : : }
170 : : default:;
171 : : }
172 : : break;
173 : : }
174 : 0 : case LT_EXPR:
175 : 0 : {
176 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
177 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
178 : 0 : switch (TREE_CODE (_q30))
179 : : {
180 : 0 : case PLUS_EXPR:
181 : 0 : {
182 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
183 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
184 : 0 : if ((_q31 == _q40 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q40, 0) && types_match (_q31, _q40)))
185 : : {
186 : 0 : {
187 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q41 };
188 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
189 : : )
190 : : {
191 : 0 : if (types_match (type, captures[0], captures[1])
192 : : )
193 : : {
194 : 0 : {
195 : 0 : res_ops[0] = captures[0];
196 : 0 : res_ops[1] = captures[1];
197 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 44, __FILE__, __LINE__, false);
198 : 0 : return true;
199 : : }
200 : : }
201 : : }
202 : : }
203 : : }
204 : 0 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q41, 0) && types_match (_q31, _q41)))
205 : : {
206 : 0 : {
207 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q41, _q40 };
208 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
209 : : )
210 : : {
211 : 0 : if (types_match (type, captures[0], captures[1])
212 : : )
213 : : {
214 : 0 : {
215 : 0 : res_ops[0] = captures[0];
216 : 0 : res_ops[1] = captures[1];
217 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 44, __FILE__, __LINE__, false);
218 : 0 : return true;
219 : : }
220 : : }
221 : : }
222 : : }
223 : : }
224 : : break;
225 : : }
226 : : default:;
227 : : }
228 : : break;
229 : : }
230 : : default:;
231 : : }
232 : : break;
233 : : }
234 : : default:;
235 : : }
236 : : break;
237 : : }
238 : : default:;
239 : : }
240 : : return false;
241 : : }
242 : :
243 : : bool
244 : 0 : tree_usmul_widen_mult (tree t, tree *res_ops)
245 : : {
246 : 0 : const tree type = TREE_TYPE (t);
247 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
248 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
249 : 0 : switch (TREE_CODE (t))
250 : : {
251 : 0 : case MULT_EXPR:
252 : 0 : {
253 : 0 : tree _p0 = TREE_OPERAND (t, 0);
254 : 0 : tree _p1 = TREE_OPERAND (t, 1);
255 : 0 : switch (TREE_CODE (_p0))
256 : : {
257 : 0 : CASE_CONVERT:
258 : 0 : {
259 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
260 : 0 : switch (TREE_CODE (_p1))
261 : : {
262 : 0 : CASE_CONVERT:
263 : 0 : {
264 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
265 : 0 : {
266 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _p0 };
267 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
268 : : )
269 : : {
270 : 0 : if (types_match (captures[0], captures[1]) && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
271 : : )
272 : : {
273 : 0 : {
274 : 0 : unsigned prec = TYPE_PRECISION (TREE_TYPE (captures[0]));
275 : 0 : unsigned cvt2_prec = TYPE_PRECISION (TREE_TYPE (captures[2]));
276 : 0 : bool widen_cvt_p = cvt2_prec > prec;
277 : 0 : if (widen_cvt_p
278 : : )
279 : : {
280 : 0 : {
281 : 0 : res_ops[0] = captures[0];
282 : 0 : res_ops[1] = captures[1];
283 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 88, __FILE__, __LINE__, false);
284 : 0 : return true;
285 : : }
286 : : }
287 : : }
288 : : }
289 : : }
290 : : }
291 : 0 : {
292 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q20, _p1 };
293 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
294 : : )
295 : : {
296 : 0 : if (types_match (captures[0], captures[1]) && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
297 : : )
298 : : {
299 : 0 : {
300 : 0 : unsigned prec = TYPE_PRECISION (TREE_TYPE (captures[0]));
301 : 0 : unsigned cvt2_prec = TYPE_PRECISION (TREE_TYPE (captures[2]));
302 : 0 : bool widen_cvt_p = cvt2_prec > prec;
303 : 0 : if (widen_cvt_p
304 : : )
305 : : {
306 : 0 : {
307 : 0 : res_ops[0] = captures[0];
308 : 0 : res_ops[1] = captures[1];
309 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 88, __FILE__, __LINE__, false);
310 : 0 : return true;
311 : : }
312 : : }
313 : : }
314 : : }
315 : : }
316 : : }
317 : : break;
318 : : }
319 : : default:;
320 : : }
321 : : break;
322 : : }
323 : : default:;
324 : : }
325 : : break;
326 : : }
327 : 0 : case WIDEN_MULT_EXPR:
328 : 0 : {
329 : 0 : tree _p0 = TREE_OPERAND (t, 0);
330 : 0 : tree _p1 = TREE_OPERAND (t, 1);
331 : 0 : switch (TREE_CODE (_p0))
332 : : {
333 : 0 : CASE_CONVERT:
334 : 0 : {
335 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
336 : 0 : switch (TREE_CODE (_p1))
337 : : {
338 : 0 : CASE_CONVERT:
339 : 0 : {
340 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
341 : 0 : {
342 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _p0 };
343 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
344 : : )
345 : : {
346 : 0 : if (types_match (captures[0], captures[1]) && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
347 : : )
348 : : {
349 : 0 : {
350 : 0 : unsigned prec = TYPE_PRECISION (TREE_TYPE (captures[0]));
351 : 0 : unsigned cvt2_prec = TYPE_PRECISION (TREE_TYPE (captures[2]));
352 : 0 : bool widen_cvt_p = cvt2_prec > prec;
353 : 0 : if (widen_cvt_p
354 : : )
355 : : {
356 : 0 : {
357 : 0 : res_ops[0] = captures[0];
358 : 0 : res_ops[1] = captures[1];
359 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 88, __FILE__, __LINE__, false);
360 : 0 : return true;
361 : : }
362 : : }
363 : : }
364 : : }
365 : : }
366 : : }
367 : 0 : {
368 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q20, _p1 };
369 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
370 : : )
371 : : {
372 : 0 : if (types_match (captures[0], captures[1]) && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
373 : : )
374 : : {
375 : 0 : {
376 : 0 : unsigned prec = TYPE_PRECISION (TREE_TYPE (captures[0]));
377 : 0 : unsigned cvt2_prec = TYPE_PRECISION (TREE_TYPE (captures[2]));
378 : 0 : bool widen_cvt_p = cvt2_prec > prec;
379 : 0 : if (widen_cvt_p
380 : : )
381 : : {
382 : 0 : {
383 : 0 : res_ops[0] = captures[0];
384 : 0 : res_ops[1] = captures[1];
385 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 88, __FILE__, __LINE__, false);
386 : 0 : return true;
387 : : }
388 : : }
389 : : }
390 : : }
391 : : }
392 : : }
393 : : break;
394 : : }
395 : : default:;
396 : : }
397 : : break;
398 : : }
399 : 0 : default:;
400 : : }
401 : 0 : {
402 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
403 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
404 : : )
405 : : {
406 : 0 : if (types_match (captures[0], captures[1])
407 : : )
408 : : {
409 : 0 : {
410 : 0 : res_ops[0] = captures[0];
411 : 0 : res_ops[1] = captures[1];
412 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 89, __FILE__, __LINE__, false);
413 : 0 : return true;
414 : : }
415 : : }
416 : : }
417 : : }
418 : 0 : {
419 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
420 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
421 : : )
422 : : {
423 : 0 : if (types_match (captures[0], captures[1])
424 : : )
425 : : {
426 : 0 : {
427 : 0 : res_ops[0] = captures[0];
428 : 0 : res_ops[1] = captures[1];
429 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 89, __FILE__, __LINE__, false);
430 : 0 : return true;
431 : : }
432 : : }
433 : : }
434 : : }
435 : : break;
436 : : }
437 : : default:;
438 : : }
439 : : return false;
440 : : }
441 : :
442 : : bool
443 : 0 : tree_cond_expr_convert_p (tree t, tree *res_ops)
444 : : {
445 : 0 : const tree type = TREE_TYPE (t);
446 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
447 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
448 : 0 : switch (TREE_CODE (t))
449 : : {
450 : 0 : case COND_EXPR:
451 : 0 : {
452 : 0 : tree _p0 = TREE_OPERAND (t, 0);
453 : 0 : tree _p1 = TREE_OPERAND (t, 1);
454 : 0 : tree _p2 = TREE_OPERAND (t, 2);
455 : 0 : switch (TREE_CODE (_p0))
456 : : {
457 : 0 : case LT_EXPR:
458 : 0 : case LE_EXPR:
459 : 0 : case EQ_EXPR:
460 : 0 : case NE_EXPR:
461 : 0 : case GE_EXPR:
462 : 0 : case GT_EXPR:
463 : 0 : {
464 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
465 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
466 : 0 : switch (TREE_CODE (_p1))
467 : : {
468 : 0 : CASE_CONVERT:
469 : 0 : {
470 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
471 : 0 : switch (TREE_CODE (_p2))
472 : : {
473 : 0 : CASE_CONVERT:
474 : 0 : {
475 : 0 : tree _q70 = TREE_OPERAND (_p2, 0);
476 : 0 : {
477 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
478 : 0 : if ((INTEGRAL_TYPE_P (type)
479 : 0 : || (!flag_trapping_math && SCALAR_FLOAT_TYPE_P (type)))
480 : 0 : && ((INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
481 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2])))
482 : 0 : || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
483 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))))
484 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
485 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
486 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
487 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
488 : 0 : TYPE_SIZE (TREE_TYPE (captures[2])))
489 : 0 : && (known_gt (tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (captures[0]))),
490 : : tree_to_poly_uint64 (TYPE_SIZE (type)))
491 : 0 : || (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
492 : 0 : == TYPE_UNSIGNED (TREE_TYPE (captures[2]))))
493 : : && single_use (captures[5])
494 : 0 : && single_use (captures[6])
495 : : )
496 : : {
497 : 0 : {
498 : 0 : res_ops[0] = captures[0];
499 : 0 : res_ops[1] = captures[1];
500 : 0 : res_ops[2] = captures[2];
501 : 0 : res_ops[3] = captures[3];
502 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 103, __FILE__, __LINE__, false);
503 : 0 : return true;
504 : : }
505 : : }
506 : : }
507 : 0 : break;
508 : : }
509 : 0 : case REAL_CST:
510 : 0 : {
511 : 0 : {
512 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _q50, _p2, _p0, _q21, _p1 };
513 : 0 : if (!flag_trapping_math
514 : 0 : && SCALAR_FLOAT_TYPE_P (type)
515 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
516 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
517 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
518 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
519 : : && single_use (captures[5])
520 : 0 : && (flag_unsafe_math_optimizations
521 : 0 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[1])),
522 : 0 : &TREE_REAL_CST (captures[2])))
523 : : )
524 : : {
525 : 0 : {
526 : 0 : res_ops[0] = captures[0];
527 : 0 : res_ops[1] = captures[1];
528 : 0 : res_ops[2] = captures[2];
529 : 0 : res_ops[3] = captures[3];
530 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 104, __FILE__, __LINE__, false);
531 : 0 : return true;
532 : : }
533 : : }
534 : : }
535 : 0 : break;
536 : : }
537 : : default:;
538 : : }
539 : : break;
540 : : }
541 : 0 : case FLOAT_EXPR:
542 : 0 : {
543 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
544 : 0 : switch (TREE_CODE (_p2))
545 : : {
546 : 0 : case FLOAT_EXPR:
547 : 0 : {
548 : 0 : tree _q70 = TREE_OPERAND (_p2, 0);
549 : 0 : {
550 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
551 : 0 : if (SCALAR_FLOAT_TYPE_P (type) && !flag_trapping_math
552 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
553 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
554 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
555 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
556 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
557 : : && single_use (captures[5])
558 : 0 : && single_use (captures[6])
559 : : )
560 : : {
561 : 0 : {
562 : 0 : res_ops[0] = captures[0];
563 : 0 : res_ops[1] = captures[1];
564 : 0 : res_ops[2] = captures[2];
565 : 0 : res_ops[3] = captures[3];
566 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 105, __FILE__, __LINE__, false);
567 : 0 : return true;
568 : : }
569 : : }
570 : : }
571 : 0 : break;
572 : : }
573 : : default:;
574 : : }
575 : : break;
576 : : }
577 : 0 : case FIX_TRUNC_EXPR:
578 : 0 : {
579 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
580 : 0 : switch (TREE_CODE (_p2))
581 : : {
582 : 0 : case FIX_TRUNC_EXPR:
583 : 0 : {
584 : 0 : tree _q70 = TREE_OPERAND (_p2, 0);
585 : 0 : {
586 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
587 : 0 : if (INTEGRAL_TYPE_P (type) && !flag_trapping_math
588 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
589 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
590 : 0 : && !operand_equal_p (TYPE_SIZE (type),
591 : 0 : TYPE_SIZE (TREE_TYPE (captures[0])))
592 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
593 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
594 : : && single_use (captures[5])
595 : 0 : && single_use (captures[6])
596 : : )
597 : : {
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 : res_ops[3] = captures[3];
603 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 106, __FILE__, __LINE__, false);
604 : 0 : return true;
605 : : }
606 : : }
607 : : }
608 : 0 : break;
609 : : }
610 : : default:;
611 : : }
612 : : break;
613 : : }
614 : 0 : case REAL_CST:
615 : 0 : {
616 : 0 : switch (TREE_CODE (_p2))
617 : : {
618 : 0 : CASE_CONVERT:
619 : 0 : {
620 : 0 : tree _q60 = TREE_OPERAND (_p2, 0);
621 : 0 : {
622 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _p1, _q60, _p0, _q21, _p2 };
623 : 0 : if (!flag_trapping_math
624 : 0 : && SCALAR_FLOAT_TYPE_P (type)
625 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[2]))
626 : 0 : && !operand_equal_p (TYPE_SIZE (type),
627 : 0 : TYPE_SIZE (TREE_TYPE (captures[0])))
628 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
629 : 0 : TYPE_SIZE (TREE_TYPE (captures[2])))
630 : : && single_use (captures[5])
631 : 0 : && (flag_unsafe_math_optimizations
632 : 0 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[2])),
633 : 0 : &TREE_REAL_CST (captures[1])))
634 : : )
635 : : {
636 : 0 : {
637 : 0 : res_ops[0] = captures[0];
638 : 0 : res_ops[1] = captures[1];
639 : 0 : res_ops[2] = captures[2];
640 : 0 : res_ops[3] = captures[3];
641 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 107, __FILE__, __LINE__, false);
642 : 0 : return true;
643 : : }
644 : : }
645 : : }
646 : 0 : break;
647 : : }
648 : : default:;
649 : : }
650 : : break;
651 : : }
652 : : default:;
653 : : }
654 : : break;
655 : : }
656 : : default:;
657 : : }
658 : : break;
659 : : }
660 : : default:;
661 : : }
662 : : return false;
663 : : }
664 : :
665 : : tree
666 : 316 : generic_simplify_4 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
667 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
668 : : const enum tree_code ARG_UNUSED (outer_op),
669 : : const enum tree_code ARG_UNUSED (inner_op))
670 : : {
671 : 316 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
672 : 316 : if (real_zerop (captures[2])
673 : 34 : && real_zerop (captures[3])
674 : 350 : && !HONOR_SIGN_DEPENDENT_ROUNDING (type)
675 : : )
676 : : {
677 : 10 : {
678 : 10 : bool inner_plus = ((inner_op == PLUS_EXPR)
679 : 10 : ^ REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[2])));
680 : 10 : bool outer_plus
681 : 10 : = ((outer_op == PLUS_EXPR)
682 : 10 : ^ REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[3])));
683 : 10 : if (outer_plus && !inner_plus
684 : : )
685 : : {
686 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail250;
687 : 2 : {
688 : 2 : tree res_op0;
689 : 2 : res_op0 = captures[1];
690 : 2 : tree res_op1;
691 : 2 : res_op1 = captures[3];
692 : 2 : tree _r;
693 : 2 : _r = fold_build2_loc (loc, outer_op, type, res_op0, res_op1);
694 : 2 : if (TREE_SIDE_EFFECTS (captures[2]))
695 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
696 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 113, __FILE__, __LINE__, true);
697 : 2 : return _r;
698 : : }
699 : 0 : next_after_fail250:;
700 : : }
701 : : else
702 : : {
703 : 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail251;
704 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail251;
705 : 8 : {
706 : 8 : tree _r;
707 : 8 : _r = captures[0];
708 : 8 : if (TREE_SIDE_EFFECTS (captures[3]))
709 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
710 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 114, __FILE__, __LINE__, true);
711 : 8 : return _r;
712 : : }
713 : : next_after_fail251:;
714 : : }
715 : : }
716 : : }
717 : : return NULL_TREE;
718 : : }
719 : :
720 : : tree
721 : 71184 : generic_simplify_7 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
722 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
723 : : const enum tree_code ARG_UNUSED (op))
724 : : {
725 : 71184 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
726 : 71184 : {
727 : 71184 : bool wascmp0, wascmp1;
728 : 71184 : if (bitwise_inverted_equal_p (captures[1], captures[3], wascmp0)
729 : 1178 : && bitwise_inverted_equal_p (captures[0], captures[2], wascmp1)
730 : 71188 : && ((!wascmp0 && !wascmp1)
731 : 0 : || element_precision (type) == 1)
732 : : )
733 : : {
734 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail254;
735 : 4 : {
736 : 4 : tree res_op0;
737 : 4 : res_op0 = captures[0];
738 : 4 : tree res_op1;
739 : 4 : res_op1 = captures[3];
740 : 4 : tree _r;
741 : 4 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
742 : 4 : if (TREE_SIDE_EFFECTS (captures[1]))
743 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
744 : 4 : if (TREE_SIDE_EFFECTS (captures[2]))
745 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
746 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 117, __FILE__, __LINE__, true);
747 : 4 : return _r;
748 : : }
749 : 0 : next_after_fail254:;
750 : : }
751 : : }
752 : 71180 : return NULL_TREE;
753 : : }
754 : :
755 : : tree
756 : 0 : generic_simplify_9 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
757 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
758 : : const enum tree_code ARG_UNUSED (op))
759 : : {
760 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
761 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail256;
762 : 0 : {
763 : 0 : tree res_op0;
764 : 0 : res_op0 = captures[0];
765 : 0 : tree res_op1;
766 : 0 : res_op1 = captures[1];
767 : 0 : tree _r;
768 : 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
769 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 119, __FILE__, __LINE__, true);
770 : : return _r;
771 : : }
772 : 0 : next_after_fail256:;
773 : 0 : return NULL_TREE;
774 : : }
775 : :
776 : : tree
777 : 2 : generic_simplify_12 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
778 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
779 : : {
780 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
781 : 2 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
782 : 2 : && !TYPE_SATURATING (type) && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
783 : 2 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[0]))
784 : 4 : && !TYPE_SATURATING (TREE_TYPE (captures[0]))
785 : : )
786 : : {
787 : 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail259;
788 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail259;
789 : 2 : {
790 : 2 : tree res_op0;
791 : 2 : {
792 : 2 : tree _o1[1], _r1;
793 : 2 : {
794 : 2 : tree _o2[2], _r2;
795 : 2 : _o2[0] = captures[1];
796 : 2 : _o2[1] = captures[2];
797 : 2 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
798 : 2 : _o1[0] = _r2;
799 : : }
800 : 2 : if (TREE_TYPE (_o1[0]) != type)
801 : : {
802 : 1 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
803 : : }
804 : : else
805 : : _r1 = _o1[0];
806 : 2 : res_op0 = _r1;
807 : : }
808 : 2 : tree _r;
809 : 2 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
810 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 122, __FILE__, __LINE__, true);
811 : 2 : return _r;
812 : : }
813 : : next_after_fail259:;
814 : : }
815 : : return NULL_TREE;
816 : : }
817 : :
818 : : tree
819 : 0 : generic_simplify_15 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
820 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
821 : : const enum tree_code ARG_UNUSED (op),
822 : : const enum tree_code ARG_UNUSED (cmp),
823 : : const enum tree_code ARG_UNUSED (icmp))
824 : : {
825 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
826 : 0 : if (INTEGRAL_TYPE_P (type)
827 : 0 : && invert_tree_comparison (cmp, HONOR_NANS (captures[1])) == icmp
828 : 0 : && canonicalize_math_after_vectorization_p ()
829 : : )
830 : : {
831 : : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail262;
832 : : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail262;
833 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail262;
834 : : {
835 : : tree res_op0;
836 : : res_op0 = captures[0];
837 : : tree res_op1;
838 : : res_op1 = captures[3];
839 : : tree res_op2;
840 : : res_op2 = captures[5];
841 : : tree _r;
842 : : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
843 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 125, __FILE__, __LINE__, true);
844 : : return _r;
845 : : }
846 : 0 : next_after_fail262:;
847 : : }
848 : 0 : return NULL_TREE;
849 : : }
850 : :
851 : : tree
852 : 240046 : generic_simplify_18 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
853 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
854 : : const enum tree_code ARG_UNUSED (outer_op))
855 : : {
856 : 240046 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
857 : 240046 : if (!TYPE_SATURATING (type)
858 : : )
859 : : {
860 : 240046 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
861 : 480085 : && !FIXED_POINT_TYPE_P (type)
862 : : )
863 : : {
864 : 240039 : if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type)
865 : : )
866 : : {
867 : 227051 : if (!CONSTANT_CLASS_P (captures[1])
868 : : )
869 : : {
870 : 227051 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail271;
871 : 227051 : {
872 : 227051 : tree res_op0;
873 : 227051 : {
874 : 227051 : tree _o1[2], _r1;
875 : 227051 : {
876 : 227051 : tree _o2[1], _r2;
877 : 227051 : _o2[0] = captures[0];
878 : 227051 : if (TREE_TYPE (_o2[0]) != type)
879 : : {
880 : 3421 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o2[0]);
881 : : }
882 : : else
883 : : _r2 = _o2[0];
884 : 227051 : _o1[0] = _r2;
885 : : }
886 : 227051 : _o1[1] = captures[2];
887 : 227051 : _r1 = fold_build2_loc (loc, outer_op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
888 : 227051 : if (EXPR_P (_r1))
889 : 0 : goto next_after_fail271;
890 : 227051 : res_op0 = _r1;
891 : : }
892 : 227051 : tree res_op1;
893 : 227051 : {
894 : 227051 : tree _o1[1], _r1;
895 : 227051 : _o1[0] = captures[1];
896 : 227051 : if (TREE_TYPE (_o1[0]) != type)
897 : : {
898 : 3440 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
899 : : }
900 : : else
901 : : _r1 = _o1[0];
902 : 227051 : res_op1 = _r1;
903 : : }
904 : 227051 : tree _r;
905 : 227051 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
906 : 227051 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 134, __FILE__, __LINE__, true);
907 : 227051 : return _r;
908 : : }
909 : : next_after_fail271:;
910 : : }
911 : : }
912 : : else
913 : : {
914 : 25976 : if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
915 : 25976 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
916 : : )
917 : : {
918 : 2323 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail272;
919 : 2323 : {
920 : 2323 : tree res_op0;
921 : 2323 : {
922 : 2323 : tree _o1[2], _r1;
923 : 2323 : {
924 : 2323 : tree _o2[2], _r2;
925 : 2323 : _o2[0] = captures[0];
926 : 2323 : {
927 : 2323 : tree _o3[1], _r3;
928 : 2323 : _o3[0] = captures[2];
929 : 2323 : if (TREE_TYPE (_o3[0]) != TREE_TYPE (_o2[0]))
930 : : {
931 : 2323 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
932 : : }
933 : : else
934 : : _r3 = _o3[0];
935 : 2323 : _o2[1] = _r3;
936 : : }
937 : 2323 : _r2 = fold_build2_loc (loc, outer_op, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
938 : 2323 : if (EXPR_P (_r2))
939 : 0 : goto next_after_fail272;
940 : 2323 : _o1[0] = _r2;
941 : : }
942 : 2323 : _o1[1] = captures[1];
943 : 2323 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
944 : 2323 : res_op0 = _r1;
945 : : }
946 : 2323 : tree _r;
947 : 2323 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
948 : 2323 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 135, __FILE__, __LINE__, true);
949 : 2323 : return _r;
950 : : }
951 : : next_after_fail272:;
952 : : }
953 : : else
954 : : {
955 : 10665 : if (types_match (type, captures[1]) && !TYPE_OVERFLOW_SANITIZED (type)
956 : : )
957 : : {
958 : 10637 : {
959 : 10637 : tree cst = const_binop (outer_op, type, captures[0], captures[2]);
960 : 10637 : if (cst && !TREE_OVERFLOW (cst)
961 : : )
962 : : {
963 : 10630 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail273;
964 : 10630 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail273;
965 : 10630 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail273;
966 : 10630 : {
967 : 10630 : tree res_op0;
968 : 10630 : res_op0 = cst;
969 : 10630 : tree res_op1;
970 : 10630 : res_op1 = captures[1];
971 : 10630 : tree _r;
972 : 10630 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
973 : 10630 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 136, __FILE__, __LINE__, true);
974 : 10630 : return _r;
975 : : }
976 : : next_after_fail273:;
977 : : }
978 : : }
979 : : }
980 : : }
981 : : }
982 : : }
983 : : }
984 : : return NULL_TREE;
985 : : }
986 : :
987 : : tree
988 : 124558 : generic_simplify_24 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
989 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
990 : : {
991 : 124558 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
992 : 124558 : if (!TYPE_SATURATING (type)
993 : : )
994 : : {
995 : 124558 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
996 : 249116 : && !FIXED_POINT_TYPE_P (type)
997 : : )
998 : : {
999 : 124558 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1000 : : )
1001 : : {
1002 : 123718 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail279;
1003 : 123718 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail279;
1004 : 123718 : {
1005 : 123718 : tree res_op0;
1006 : 123718 : {
1007 : 123718 : tree _o1[1], _r1;
1008 : 123718 : _o1[0] = captures[0];
1009 : 123718 : if (TREE_TYPE (_o1[0]) != type)
1010 : : {
1011 : 120999 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1012 : : }
1013 : : else
1014 : : _r1 = _o1[0];
1015 : 123718 : res_op0 = _r1;
1016 : : }
1017 : 123718 : tree _r;
1018 : 123718 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
1019 : 123718 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 142, __FILE__, __LINE__, true);
1020 : 123718 : return _r;
1021 : : }
1022 : : next_after_fail279:;
1023 : : }
1024 : : }
1025 : : }
1026 : : return NULL_TREE;
1027 : : }
1028 : :
1029 : : tree
1030 : 371922 : generic_simplify_27 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1031 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1032 : : const enum tree_code ARG_UNUSED (plusminus))
1033 : : {
1034 : 371922 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1035 : 371922 : if (!TYPE_SATURATING (type)
1036 : 371922 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
1037 : : )
1038 : : {
1039 : 371382 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
1040 : : )
1041 : : {
1042 : 55 : if ((!ANY_INTEGRAL_TYPE_P (type)
1043 : 371341 : || TYPE_OVERFLOW_WRAPS (type)
1044 : 87400 : || (INTEGRAL_TYPE_P (type)
1045 : 87386 : && ((tree_expr_nonzero_p (captures[1])
1046 : 60089 : && (plusminus == MINUS_EXPR
1047 : 59948 : || expr_not_equal_to (captures[1],
1048 : 431330 : wi::minus_one (TYPE_PRECISION (type)))))
1049 : 27297 : || expr_not_equal_to (captures[2],
1050 : : (plusminus == PLUS_EXPR
1051 : 398679 : ? wi::max_value (TYPE_PRECISION (type), SIGNED)
1052 : 1552 : : wi::min_value (TYPE_PRECISION (type), SIGNED))))))
1053 : 371382 : && single_use (captures[0])
1054 : : )
1055 : : {
1056 : 370006 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail283;
1057 : 370006 : {
1058 : 370006 : tree res_op0;
1059 : 370006 : {
1060 : 370006 : tree _o1[2], _r1;
1061 : 370006 : _o1[0] = captures[2];
1062 : 370006 : _o1[1] = build_one_cst (type);
1063 : 370006 : _r1 = fold_build2_loc (loc, plusminus, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1064 : 370006 : res_op0 = _r1;
1065 : : }
1066 : 370006 : tree res_op1;
1067 : 370006 : res_op1 = captures[1];
1068 : 370006 : tree _r;
1069 : 370006 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1070 : 370006 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 146, __FILE__, __LINE__, true);
1071 : 370006 : return _r;
1072 : : }
1073 : 0 : next_after_fail283:;
1074 : : }
1075 : : }
1076 : : }
1077 : : return NULL_TREE;
1078 : : }
1079 : :
1080 : : tree
1081 : 0 : generic_simplify_31 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1082 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1083 : : {
1084 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1085 : 0 : if (VECTOR_TYPE_P (type)
1086 : 0 : && known_eq (TYPE_VECTOR_SUBPARTS (type),
1087 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (captures[3])))
1088 : 0 : && (TYPE_MODE (TREE_TYPE (type))
1089 : 0 : == TYPE_MODE (TREE_TYPE (TREE_TYPE (captures[3]))))
1090 : : )
1091 : : {
1092 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail287;
1093 : 0 : {
1094 : 0 : tree res_op0;
1095 : 0 : res_op0 = captures[0];
1096 : 0 : tree res_op1;
1097 : 0 : {
1098 : 0 : tree _o1[1], _r1;
1099 : 0 : {
1100 : 0 : tree _o2[3], _r2;
1101 : 0 : _o2[0] = captures[2];
1102 : 0 : {
1103 : 0 : tree _o3[1], _r3;
1104 : 0 : _o3[0] = captures[3];
1105 : 0 : _r3 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
1106 : 0 : _o2[1] = _r3;
1107 : : }
1108 : 0 : _o2[2] = captures[4];
1109 : 0 : _r2 = fold_build3_loc (loc, VEC_COND_EXPR, TREE_TYPE (_o2[1]), _o2[0], _o2[1], _o2[2]);
1110 : 0 : _o1[0] = _r2;
1111 : : }
1112 : 0 : if (TREE_TYPE (_o1[0]) != type)
1113 : : {
1114 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
1115 : : }
1116 : : else
1117 : : _r1 = _o1[0];
1118 : 0 : res_op1 = _r1;
1119 : : }
1120 : 0 : tree _r;
1121 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
1122 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 150, __FILE__, __LINE__, true);
1123 : 0 : return _r;
1124 : : }
1125 : 0 : next_after_fail287:;
1126 : : }
1127 : : return NULL_TREE;
1128 : : }
1129 : :
1130 : : tree
1131 : 126 : generic_simplify_35 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1132 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1133 : : const combined_fn ARG_UNUSED (POPCOUNT))
1134 : : {
1135 : 126 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1136 : 252 : if (INTEGRAL_TYPE_P (type)
1137 : 630 : && (wi::bit_and (widest_int::from (tree_nonzero_bits (captures[1]), UNSIGNED),
1138 : 504 : widest_int::from (tree_nonzero_bits (captures[3]), UNSIGNED))
1139 : 378 : == 0)
1140 : : )
1141 : : {
1142 : 1 : {
1143 : 1 : tree utype = TREE_TYPE (captures[1]);
1144 : 1 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
1145 : 0 : utype = TREE_TYPE (captures[3]);
1146 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail292;
1147 : 1 : {
1148 : 1 : tree res_op0;
1149 : 1 : {
1150 : 1 : tree _o1[2], _r1;
1151 : 1 : {
1152 : 1 : tree _o2[1], _r2;
1153 : 1 : _o2[0] = captures[1];
1154 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1155 : : {
1156 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1157 : : }
1158 : : else
1159 : : _r2 = _o2[0];
1160 : 1 : _o1[0] = _r2;
1161 : : }
1162 : 1 : {
1163 : 1 : tree _o2[1], _r2;
1164 : 1 : _o2[0] = captures[3];
1165 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1166 : : {
1167 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1168 : : }
1169 : : else
1170 : : _r2 = _o2[0];
1171 : 1 : _o1[1] = _r2;
1172 : : }
1173 : 1 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1174 : 1 : res_op0 = _r1;
1175 : : }
1176 : 1 : tree _r;
1177 : 1 : _r = maybe_build_call_expr_loc (loc, POPCOUNT, type, 1, res_op0);
1178 : 1 : if (!_r)
1179 : 0 : goto next_after_fail292;
1180 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 155, __FILE__, __LINE__, true);
1181 : 1 : return _r;
1182 : : }
1183 : : next_after_fail292:;
1184 : : }
1185 : : }
1186 : : return NULL_TREE;
1187 : : }
1188 : :
1189 : : tree
1190 : 1 : generic_simplify_45 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1191 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1192 : : {
1193 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1194 : 1 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
1195 : 1 : && !TYPE_SATURATING (type) && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
1196 : 1 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[0]))
1197 : 2 : && !TYPE_SATURATING (TREE_TYPE (captures[0]))
1198 : : )
1199 : : {
1200 : 1 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail302;
1201 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail302;
1202 : 1 : {
1203 : 1 : tree res_op0;
1204 : 1 : {
1205 : 1 : tree _o1[1], _r1;
1206 : 1 : {
1207 : 1 : tree _o2[2], _r2;
1208 : 1 : _o2[0] = captures[1];
1209 : 1 : _o2[1] = captures[2];
1210 : 1 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1211 : 1 : _o1[0] = _r2;
1212 : : }
1213 : 1 : if (TREE_TYPE (_o1[0]) != type)
1214 : : {
1215 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1216 : : }
1217 : : else
1218 : : _r1 = _o1[0];
1219 : 1 : res_op0 = _r1;
1220 : : }
1221 : 1 : tree _r;
1222 : 1 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1223 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 165, __FILE__, __LINE__, true);
1224 : 1 : return _r;
1225 : : }
1226 : : next_after_fail302:;
1227 : : }
1228 : : return NULL_TREE;
1229 : : }
1230 : :
1231 : : tree
1232 : 0 : generic_simplify_54 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1233 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1234 : : {
1235 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1236 : 0 : if (!TYPE_SATURATING (type)
1237 : : )
1238 : : {
1239 : 0 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1240 : 0 : && !FIXED_POINT_TYPE_P (type)
1241 : : )
1242 : : {
1243 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail313;
1244 : 0 : {
1245 : 0 : tree res_op0;
1246 : 0 : res_op0 = captures[1];
1247 : 0 : tree res_op1;
1248 : 0 : res_op1 = captures[2];
1249 : 0 : tree _r;
1250 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
1251 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
1252 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1253 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 175, __FILE__, __LINE__, true);
1254 : 0 : return _r;
1255 : : }
1256 : 0 : next_after_fail313:;
1257 : : }
1258 : : }
1259 : : return NULL_TREE;
1260 : : }
1261 : :
1262 : : tree
1263 : 0 : generic_simplify_61 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1264 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1265 : : {
1266 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1267 : 0 : if (VECTOR_TYPE_P (type)
1268 : 0 : && known_eq (TYPE_VECTOR_SUBPARTS (type),
1269 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (captures[3])))
1270 : 0 : && (TYPE_MODE (TREE_TYPE (type))
1271 : 0 : == TYPE_MODE (TREE_TYPE (TREE_TYPE (captures[3]))))
1272 : : )
1273 : : {
1274 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail324;
1275 : 0 : {
1276 : 0 : tree res_op0;
1277 : 0 : res_op0 = captures[0];
1278 : 0 : tree res_op1;
1279 : 0 : {
1280 : 0 : tree _o1[1], _r1;
1281 : 0 : {
1282 : 0 : tree _o2[3], _r2;
1283 : 0 : _o2[0] = captures[2];
1284 : 0 : {
1285 : 0 : tree _o3[1], _r3;
1286 : 0 : _o3[0] = captures[3];
1287 : 0 : _r3 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
1288 : 0 : _o2[1] = _r3;
1289 : : }
1290 : 0 : _o2[2] = captures[4];
1291 : 0 : _r2 = fold_build3_loc (loc, VEC_COND_EXPR, TREE_TYPE (_o2[1]), _o2[0], _o2[1], _o2[2]);
1292 : 0 : _o1[0] = _r2;
1293 : : }
1294 : 0 : if (TREE_TYPE (_o1[0]) != type)
1295 : : {
1296 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
1297 : : }
1298 : : else
1299 : : _r1 = _o1[0];
1300 : 0 : res_op1 = _r1;
1301 : : }
1302 : 0 : tree _r;
1303 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
1304 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 186, __FILE__, __LINE__, true);
1305 : 0 : return _r;
1306 : : }
1307 : 0 : next_after_fail324:;
1308 : : }
1309 : : return NULL_TREE;
1310 : : }
1311 : :
1312 : : tree
1313 : 0 : generic_simplify_70 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1314 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1315 : : {
1316 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1317 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail333;
1318 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail333;
1319 : 0 : {
1320 : 0 : tree _r;
1321 : 0 : _r = captures[2];
1322 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 195, __FILE__, __LINE__, true);
1323 : : return _r;
1324 : : }
1325 : : next_after_fail333:;
1326 : : return NULL_TREE;
1327 : : }
1328 : :
1329 : : tree
1330 : 29 : generic_simplify_75 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1331 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1332 : : const enum tree_code ARG_UNUSED (bit_op))
1333 : : {
1334 : 29 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1335 : 29 : if (bit_op == BIT_AND_EXPR
1336 : : )
1337 : : {
1338 : 9 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail338;
1339 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail338;
1340 : 9 : {
1341 : 9 : tree _r;
1342 : 9 : _r = build_zero_cst (type);
1343 : 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 199, __FILE__, __LINE__, true);
1344 : 9 : return _r;
1345 : : }
1346 : : next_after_fail338:;
1347 : : }
1348 : : else
1349 : : {
1350 : 20 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail339;
1351 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail339;
1352 : 20 : {
1353 : 20 : tree _r;
1354 : 20 : _r = build_minus_one_cst (type);
1355 : 20 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 200, __FILE__, __LINE__, true);
1356 : 20 : return _r;
1357 : : }
1358 : : next_after_fail339:;
1359 : : }
1360 : : return NULL_TREE;
1361 : : }
1362 : :
1363 : : tree
1364 : 2 : generic_simplify_84 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1365 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1366 : : {
1367 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1368 : 2 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail351;
1369 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail351;
1370 : 2 : {
1371 : 2 : tree res_op0;
1372 : 2 : res_op0 = captures[0];
1373 : 2 : tree res_op1;
1374 : 2 : res_op1 = captures[3];
1375 : 2 : tree _r;
1376 : 2 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
1377 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 207, __FILE__, __LINE__, true);
1378 : : return _r;
1379 : : }
1380 : : next_after_fail351:;
1381 : : return NULL_TREE;
1382 : : }
1383 : :
1384 : : tree
1385 : 1 : generic_simplify_93 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1386 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1387 : : {
1388 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1389 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail360;
1390 : 1 : {
1391 : 1 : tree res_op0;
1392 : 1 : {
1393 : 1 : tree _o1[2], _r1;
1394 : 1 : _o1[0] = captures[1];
1395 : 1 : _o1[1] = captures[2];
1396 : 1 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1397 : 1 : res_op0 = _r1;
1398 : : }
1399 : 1 : tree _r;
1400 : 1 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1401 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 213, __FILE__, __LINE__, true);
1402 : : return _r;
1403 : : }
1404 : 0 : next_after_fail360:;
1405 : 0 : return NULL_TREE;
1406 : : }
1407 : :
1408 : : tree
1409 : 0 : generic_simplify_101 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1410 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1411 : : const enum tree_code ARG_UNUSED (op))
1412 : : {
1413 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1414 : 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
1415 : 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
1416 : : )
1417 : : {
1418 : 0 : if (single_use (captures[4]) && single_use (captures[5])
1419 : : )
1420 : : {
1421 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail370;
1422 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail370;
1423 : 0 : {
1424 : 0 : tree res_op0;
1425 : 0 : res_op0 = captures[0];
1426 : 0 : tree res_op1;
1427 : 0 : {
1428 : 0 : tree _o1[1], _r1;
1429 : 0 : _o1[0] = captures[6];
1430 : 0 : if (TREE_TYPE (_o1[0]) != type)
1431 : : {
1432 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1433 : : }
1434 : : else
1435 : : _r1 = _o1[0];
1436 : 0 : res_op1 = _r1;
1437 : : }
1438 : 0 : tree _r;
1439 : 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1440 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 217, __FILE__, __LINE__, true);
1441 : 0 : return _r;
1442 : : }
1443 : : next_after_fail370:;
1444 : : }
1445 : : else
1446 : : {
1447 : : if (single_use (captures[0]) && single_use (captures[1])
1448 : : )
1449 : : {
1450 : : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail371;
1451 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail371;
1452 : : {
1453 : : tree res_op0;
1454 : : {
1455 : : tree _o1[1], _r1;
1456 : : _o1[0] = captures[3];
1457 : : if (TREE_TYPE (_o1[0]) != type)
1458 : : {
1459 : : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1460 : : }
1461 : : else
1462 : : _r1 = _o1[0];
1463 : : res_op0 = _r1;
1464 : : }
1465 : : tree res_op1;
1466 : : res_op1 = captures[4];
1467 : : tree _r;
1468 : : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1469 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 218, __FILE__, __LINE__, true);
1470 : : return _r;
1471 : : }
1472 : : next_after_fail371:;
1473 : : }
1474 : : }
1475 : : }
1476 : : return NULL_TREE;
1477 : : }
1478 : :
1479 : : tree
1480 : 2 : generic_simplify_113 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1481 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1482 : : const enum tree_code ARG_UNUSED (bitop),
1483 : : const enum tree_code ARG_UNUSED (rbitop))
1484 : : {
1485 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1486 : 2 : if (bitop == BIT_AND_EXPR
1487 : : )
1488 : : {
1489 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail384;
1490 : 1 : {
1491 : 1 : tree _r;
1492 : 1 : _r = build_zero_cst (type);
1493 : 1 : if (TREE_SIDE_EFFECTS (captures[0]))
1494 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1495 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
1496 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1497 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 225, __FILE__, __LINE__, true);
1498 : 1 : return _r;
1499 : : }
1500 : 0 : next_after_fail384:;
1501 : : }
1502 : : else
1503 : : {
1504 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail385;
1505 : 1 : {
1506 : 1 : tree _r;
1507 : 1 : _r = build_minus_one_cst (type);
1508 : 1 : if (TREE_SIDE_EFFECTS (captures[0]))
1509 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1510 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
1511 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1512 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 226, __FILE__, __LINE__, true);
1513 : 1 : return _r;
1514 : : }
1515 : 0 : next_after_fail385:;
1516 : : }
1517 : : return NULL_TREE;
1518 : : }
1519 : :
1520 : : tree
1521 : 7 : generic_simplify_120 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1522 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1523 : : const enum tree_code ARG_UNUSED (op))
1524 : : {
1525 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1526 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail394;
1527 : 7 : {
1528 : 7 : tree _r;
1529 : 7 : _r = constant_boolean_node (true, type);
1530 : 7 : if (TREE_SIDE_EFFECTS (captures[0]))
1531 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1532 : 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 233, __FILE__, __LINE__, true);
1533 : : return _r;
1534 : : }
1535 : 0 : next_after_fail394:;
1536 : 0 : return NULL_TREE;
1537 : : }
1538 : :
1539 : : tree
1540 : 3 : generic_simplify_128 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1541 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1542 : : const enum tree_code ARG_UNUSED (code2),
1543 : : const enum tree_code ARG_UNUSED (code1))
1544 : : {
1545 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1546 : 3 : if ((TREE_CODE (captures[2]) == INTEGER_CST
1547 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
1548 : 3 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1549 : 3 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1550 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
1551 : 3 : && bitwise_equal_p (captures[2], captures[5]))
1552 : : )
1553 : : {
1554 : 3 : {
1555 : 3 : bool one_before = false;
1556 : 3 : bool one_after = false;
1557 : 3 : int cmp = 0;
1558 : 3 : bool allbits = true;
1559 : 3 : if (TREE_CODE (captures[2]) == INTEGER_CST
1560 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
1561 : : {
1562 : 0 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
1563 : 0 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
1564 : 0 : auto t2 = wi::to_wide (captures[5]);
1565 : 0 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
1566 : 0 : if (cmp < 0
1567 : 0 : && t1 == t2 - 1)
1568 : : one_before = true;
1569 : 0 : if (cmp > 0
1570 : 0 : && t1 == t2 + 1)
1571 : : one_after = true;
1572 : : }
1573 : 3 : bool val;
1574 : 3 : switch (code2)
1575 : : {
1576 : 0 : case EQ_EXPR: val = (cmp == 0); break;
1577 : 0 : case NE_EXPR: val = (cmp != 0); break;
1578 : 0 : case LT_EXPR: val = (cmp < 0); break;
1579 : 3 : case GT_EXPR: val = (cmp > 0); break;
1580 : 0 : case LE_EXPR: val = (cmp <= 0); break;
1581 : 0 : case GE_EXPR: val = (cmp >= 0); break;
1582 : 0 : default: gcc_unreachable ();
1583 : : }
1584 : 3 : if (code1 == EQ_EXPR && val
1585 : : )
1586 : : {
1587 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail406;
1588 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail406;
1589 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail406;
1590 : 0 : {
1591 : 0 : tree _r;
1592 : 0 : _r = captures[3];
1593 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 245, __FILE__, __LINE__, true);
1594 : 0 : return _r;
1595 : : }
1596 : : next_after_fail406:;
1597 : : }
1598 : : else
1599 : : {
1600 : 3 : if (code1 == NE_EXPR && val && allbits
1601 : : )
1602 : : {
1603 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail407;
1604 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail407;
1605 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail407;
1606 : 0 : {
1607 : 0 : tree _r;
1608 : 0 : _r = constant_boolean_node (true, type);
1609 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1610 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1611 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 246, __FILE__, __LINE__, true);
1612 : 0 : return _r;
1613 : : }
1614 : : next_after_fail407:;
1615 : : }
1616 : : else
1617 : : {
1618 : 3 : if (code1 == NE_EXPR && !val && allbits
1619 : : )
1620 : : {
1621 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail408;
1622 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail408;
1623 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail408;
1624 : 0 : {
1625 : 0 : tree _r;
1626 : 0 : _r = captures[0];
1627 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 247, __FILE__, __LINE__, true);
1628 : 0 : return _r;
1629 : : }
1630 : : next_after_fail408:;
1631 : : }
1632 : : else
1633 : : {
1634 : 3 : if (code1 == EQ_EXPR
1635 : 3 : && code2 == GT_EXPR
1636 : 3 : && cmp == 0
1637 : 3 : && allbits
1638 : 6 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1639 : 3 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
1640 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1641 : : )
1642 : : {
1643 : 3 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail409;
1644 : 3 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail409;
1645 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail409;
1646 : 3 : {
1647 : 3 : tree res_op0;
1648 : 3 : res_op0 = captures[4];
1649 : 3 : tree res_op1;
1650 : 3 : res_op1 = captures[5];
1651 : 3 : tree _r;
1652 : 3 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1653 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 248, __FILE__, __LINE__, true);
1654 : 3 : return _r;
1655 : : }
1656 : : next_after_fail409:;
1657 : : }
1658 : : else
1659 : : {
1660 : 0 : if (code1 == EQ_EXPR
1661 : 0 : && code2 == LT_EXPR
1662 : 0 : && cmp == 0
1663 : 0 : && allbits
1664 : 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1665 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
1666 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1667 : : )
1668 : : {
1669 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail410;
1670 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail410;
1671 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail410;
1672 : 0 : {
1673 : 0 : tree res_op0;
1674 : 0 : res_op0 = captures[4];
1675 : 0 : tree res_op1;
1676 : 0 : res_op1 = captures[5];
1677 : 0 : tree _r;
1678 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1679 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 249, __FILE__, __LINE__, true);
1680 : 0 : return _r;
1681 : : }
1682 : : next_after_fail410:;
1683 : : }
1684 : : else
1685 : : {
1686 : 0 : if (code1 == EQ_EXPR
1687 : 0 : && code2 == GE_EXPR
1688 : : && one_before
1689 : 0 : && allbits
1690 : 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1691 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
1692 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1693 : : )
1694 : : {
1695 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail411;
1696 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail411;
1697 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail411;
1698 : 0 : {
1699 : 0 : tree res_op0;
1700 : 0 : res_op0 = captures[4];
1701 : 0 : tree res_op1;
1702 : 0 : {
1703 : 0 : tree _o1[1], _r1;
1704 : 0 : _o1[0] = captures[2];
1705 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1706 : : {
1707 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1708 : : }
1709 : : else
1710 : : _r1 = _o1[0];
1711 : 0 : res_op1 = _r1;
1712 : : }
1713 : 0 : tree _r;
1714 : 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1715 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 250, __FILE__, __LINE__, true);
1716 : 0 : return _r;
1717 : : }
1718 : : next_after_fail411:;
1719 : : }
1720 : : else
1721 : : {
1722 : 0 : if (code1 == EQ_EXPR
1723 : 0 : && code2 == LE_EXPR
1724 : : && one_after
1725 : 0 : && allbits
1726 : 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
1727 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
1728 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
1729 : : )
1730 : : {
1731 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail412;
1732 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail412;
1733 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail412;
1734 : 0 : {
1735 : 0 : tree res_op0;
1736 : 0 : res_op0 = captures[4];
1737 : 0 : tree res_op1;
1738 : 0 : {
1739 : 0 : tree _o1[1], _r1;
1740 : 0 : _o1[0] = captures[2];
1741 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1742 : : {
1743 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1744 : : }
1745 : : else
1746 : : _r1 = _o1[0];
1747 : 0 : res_op1 = _r1;
1748 : : }
1749 : 0 : tree _r;
1750 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1751 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 251, __FILE__, __LINE__, true);
1752 : 0 : return _r;
1753 : : }
1754 : : next_after_fail412:;
1755 : : }
1756 : : }
1757 : : }
1758 : : }
1759 : : }
1760 : : }
1761 : : }
1762 : : }
1763 : : }
1764 : : return NULL_TREE;
1765 : : }
1766 : :
1767 : : tree
1768 : 8 : generic_simplify_161 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1769 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1770 : : {
1771 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1772 : 8 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1773 : : )
1774 : : {
1775 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail471;
1776 : 8 : {
1777 : 8 : tree res_op0;
1778 : 8 : {
1779 : 8 : tree _o1[2], _r1;
1780 : 8 : _o1[0] = captures[1];
1781 : 8 : {
1782 : 8 : tree _o2[1], _r2;
1783 : 8 : _o2[0] = captures[0];
1784 : 8 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
1785 : 8 : _o1[1] = _r2;
1786 : : }
1787 : 8 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1788 : 8 : res_op0 = _r1;
1789 : : }
1790 : 8 : tree _r;
1791 : 8 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
1792 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 279, __FILE__, __LINE__, true);
1793 : 8 : return _r;
1794 : : }
1795 : 0 : next_after_fail471:;
1796 : : }
1797 : : return NULL_TREE;
1798 : : }
1799 : :
1800 : : tree
1801 : 24 : generic_simplify_168 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1802 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1803 : : {
1804 : 24 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1805 : 24 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
1806 : : )
1807 : : {
1808 : 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail478;
1809 : 24 : {
1810 : 24 : tree res_op0;
1811 : 24 : {
1812 : 24 : tree _o1[2], _r1;
1813 : 24 : {
1814 : 24 : tree _o2[1], _r2;
1815 : 24 : _o2[0] = captures[2];
1816 : 24 : if (TREE_TYPE (_o2[0]) != type)
1817 : : {
1818 : 24 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o2[0]);
1819 : : }
1820 : : else
1821 : : _r2 = _o2[0];
1822 : 24 : _o1[0] = _r2;
1823 : : }
1824 : 24 : _o1[1] = captures[3];
1825 : 24 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1826 : 24 : res_op0 = _r1;
1827 : : }
1828 : 24 : tree _r;
1829 : 24 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1830 : 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 283, __FILE__, __LINE__, true);
1831 : 24 : return _r;
1832 : : }
1833 : 0 : next_after_fail478:;
1834 : : }
1835 : : return NULL_TREE;
1836 : : }
1837 : :
1838 : : tree
1839 : 0 : generic_simplify_176 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1840 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1841 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
1842 : : {
1843 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1844 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
1845 : : )
1846 : : {
1847 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail488;
1848 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail488;
1849 : 0 : {
1850 : 0 : tree res_op0;
1851 : 0 : {
1852 : 0 : tree _o1[1], _r1;
1853 : 0 : _o1[0] = captures[0];
1854 : 0 : _r1 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1855 : 0 : res_op0 = _r1;
1856 : : }
1857 : 0 : tree _r;
1858 : 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
1859 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 294, __FILE__, __LINE__, true);
1860 : 0 : return _r;
1861 : : }
1862 : : next_after_fail488:;
1863 : : }
1864 : : return NULL_TREE;
1865 : : }
1866 : :
1867 : : tree
1868 : 95007 : generic_simplify_185 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1869 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1870 : : {
1871 : 95007 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1872 : 95007 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1873 : 95007 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
1874 : : )
1875 : : {
1876 : 31566 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail499;
1877 : 31566 : {
1878 : 31566 : tree res_op0;
1879 : 31566 : {
1880 : 31566 : tree _o1[1], _r1;
1881 : 31566 : _o1[0] = captures[0];
1882 : 31566 : if (TREE_TYPE (_o1[0]) != type)
1883 : : {
1884 : 8796 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1885 : : }
1886 : : else
1887 : : _r1 = _o1[0];
1888 : 31566 : res_op0 = _r1;
1889 : : }
1890 : 31566 : tree res_op1;
1891 : 31566 : {
1892 : 31566 : tree _o1[1], _r1;
1893 : 31566 : {
1894 : 31566 : tree _o2[1], _r2;
1895 : 31566 : _o2[0] = captures[1];
1896 : 31566 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
1897 : 31566 : _o1[0] = _r2;
1898 : : }
1899 : 31566 : if (TREE_TYPE (_o1[0]) != type)
1900 : : {
1901 : 7 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1902 : : }
1903 : : else
1904 : : _r1 = _o1[0];
1905 : 31566 : res_op1 = _r1;
1906 : : }
1907 : 31566 : tree _r;
1908 : 31566 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1909 : 31566 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 301, __FILE__, __LINE__, true);
1910 : 31566 : return _r;
1911 : : }
1912 : 0 : next_after_fail499:;
1913 : : }
1914 : : return NULL_TREE;
1915 : : }
1916 : :
1917 : : tree
1918 : 12 : generic_simplify_197 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1919 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1920 : : const combined_fn ARG_UNUSED (TAN),
1921 : : const combined_fn ARG_UNUSED (COS),
1922 : : const combined_fn ARG_UNUSED (SIN))
1923 : : {
1924 : 12 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1925 : 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
1926 : : )
1927 : : {
1928 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail512;
1929 : 12 : {
1930 : 12 : tree res_op0;
1931 : 12 : res_op0 = captures[1];
1932 : 12 : tree _r;
1933 : 12 : _r = maybe_build_call_expr_loc (loc, SIN, type, 1, res_op0);
1934 : 12 : if (!_r)
1935 : 0 : goto next_after_fail512;
1936 : 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 313, __FILE__, __LINE__, true);
1937 : 12 : return _r;
1938 : : }
1939 : : next_after_fail512:;
1940 : : }
1941 : : return NULL_TREE;
1942 : : }
1943 : :
1944 : : tree
1945 : 32 : generic_simplify_202 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1946 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1947 : : {
1948 : 32 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1949 : 59 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1950 : 59 : && tree_expr_nonzero_p (captures[0])
1951 : : )
1952 : : {
1953 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail517;
1954 : 6 : {
1955 : 6 : tree _r;
1956 : 6 : _r = build_zero_cst (type);
1957 : 6 : if (TREE_SIDE_EFFECTS (captures[0]))
1958 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1959 : 6 : if (TREE_SIDE_EFFECTS (captures[1]))
1960 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1961 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 318, __FILE__, __LINE__, true);
1962 : 6 : return _r;
1963 : : }
1964 : 0 : next_after_fail517:;
1965 : : }
1966 : : return NULL_TREE;
1967 : : }
1968 : :
1969 : : tree
1970 : 153726 : generic_simplify_210 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1971 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1972 : : const enum tree_code ARG_UNUSED (op))
1973 : : {
1974 : 153726 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1975 : 307452 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1976 : 305914 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
1977 : 139560 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
1978 : : && (CONSTANT_CLASS_P (captures[2]) || (single_use (captures[1]) && single_use (captures[0])))
1979 : 152953 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
1980 : 459636 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
1981 : : )
1982 : : {
1983 : 152945 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail528;
1984 : 152945 : {
1985 : 152945 : tree res_op0;
1986 : 152945 : res_op0 = captures[2];
1987 : 152945 : tree res_op1;
1988 : 152945 : res_op1 = build_zero_cst (TREE_TYPE (captures[2]));
1989 : 152945 : tree _r;
1990 : 152945 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1991 : 152945 : if (TREE_SIDE_EFFECTS (captures[3]))
1992 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
1993 : 152945 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 319, __FILE__, __LINE__, true);
1994 : 152945 : return _r;
1995 : : }
1996 : 0 : next_after_fail528:;
1997 : : }
1998 : : return NULL_TREE;
1999 : : }
2000 : :
2001 : : tree
2002 : 3 : generic_simplify_217 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2003 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2004 : : const enum tree_code ARG_UNUSED (op))
2005 : : {
2006 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2007 : 3 : if (tree_nop_conversion_p (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
2008 : 3 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[2]))
2009 : 3 : && (CONSTANT_CLASS_P (captures[3]) || (single_use (captures[1]) && single_use (captures[0])))
2010 : : )
2011 : : {
2012 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail548;
2013 : 3 : {
2014 : 3 : tree res_op0;
2015 : 3 : res_op0 = captures[3];
2016 : 3 : tree res_op1;
2017 : 3 : res_op1 = build_zero_cst (TREE_TYPE (captures[3]));
2018 : 3 : tree _r;
2019 : 3 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2020 : 3 : if (TREE_SIDE_EFFECTS (captures[2]))
2021 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2022 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 344, __FILE__, __LINE__, true);
2023 : 3 : return _r;
2024 : : }
2025 : 0 : next_after_fail548:;
2026 : : }
2027 : : return NULL_TREE;
2028 : : }
2029 : :
2030 : : tree
2031 : 1063 : generic_simplify_224 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2032 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2033 : : const enum tree_code ARG_UNUSED (minmax),
2034 : : const enum tree_code ARG_UNUSED (cmp),
2035 : : const enum tree_code ARG_UNUSED (out))
2036 : : {
2037 : 1063 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2038 : 2126 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2039 : 1208 : && (!VECTOR_TYPE_P (TREE_TYPE (captures[0]))
2040 : 1 : || (VECTOR_TYPE_P (type)
2041 : 0 : && (!expand_vec_cmp_expr_p (TREE_TYPE (captures[0]), type, cmp)
2042 : 0 : || expand_vec_cmp_expr_p (TREE_TYPE (captures[0]), type, out))))
2043 : : )
2044 : : {
2045 : 144 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail555;
2046 : 144 : {
2047 : 144 : tree res_op0;
2048 : 144 : res_op0 = captures[0];
2049 : 144 : tree res_op1;
2050 : 144 : res_op1 = captures[1];
2051 : 144 : tree _r;
2052 : 144 : _r = fold_build2_loc (loc, out, type, res_op0, res_op1);
2053 : 144 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 354, __FILE__, __LINE__, true);
2054 : 144 : return _r;
2055 : : }
2056 : 0 : next_after_fail555:;
2057 : : }
2058 : : return NULL_TREE;
2059 : : }
2060 : :
2061 : : tree
2062 : 2 : generic_simplify_231 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2063 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2064 : : const enum tree_code ARG_UNUSED (cmp),
2065 : : const enum tree_code ARG_UNUSED (icmp))
2066 : : {
2067 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2068 : 2 : if (tree_int_cst_sgn (captures[0]) > 0
2069 : : )
2070 : : {
2071 : 2 : {
2072 : 2 : int c1 = wi::clz (wi::to_wide (captures[0]));
2073 : 2 : int c2 = wi::clz (wi::to_wide (captures[2]));
2074 : 2 : if (c1 > c2
2075 : : )
2076 : : {
2077 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail566;
2078 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail566;
2079 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail566;
2080 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail566;
2081 : 0 : {
2082 : 0 : tree _r;
2083 : 0 : _r = constant_boolean_node (cmp == NE_EXPR ? false : true, type);
2084 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2085 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2086 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 365, __FILE__, __LINE__, true);
2087 : 0 : return _r;
2088 : : }
2089 : : next_after_fail566:;
2090 : : }
2091 : : else
2092 : : {
2093 : 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail567;
2094 : 2 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail567;
2095 : 2 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail567;
2096 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail567;
2097 : 2 : {
2098 : 2 : tree res_op0;
2099 : 2 : res_op0 = captures[1];
2100 : 2 : tree res_op1;
2101 : 2 : res_op1 = build_int_cst (TREE_TYPE (captures[1]), c2 - c1);
2102 : 2 : tree _r;
2103 : 2 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2104 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 366, __FILE__, __LINE__, true);
2105 : 2 : return _r;
2106 : : }
2107 : : next_after_fail567:;
2108 : : }
2109 : : }
2110 : : }
2111 : : return NULL_TREE;
2112 : : }
2113 : :
2114 : : tree
2115 : 25727 : generic_simplify_241 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2116 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2117 : : const enum tree_code ARG_UNUSED (cmp),
2118 : : const enum tree_code ARG_UNUSED (icmp),
2119 : : const enum tree_code ARG_UNUSED (ncmp))
2120 : : {
2121 : 25727 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2122 : 25727 : if (types_match (type, TREE_TYPE (captures[0]))
2123 : : )
2124 : : {
2125 : 25067 : {
2126 : 25067 : enum tree_code ic = invert_tree_comparison
2127 : 25067 : (cmp, HONOR_NANS (captures[1]));
2128 : 25067 : if (ic == icmp
2129 : : )
2130 : : {
2131 : 24828 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail584;
2132 : 24828 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail584;
2133 : 24828 : {
2134 : 24828 : tree res_op0;
2135 : 24828 : res_op0 = captures[1];
2136 : 24828 : tree res_op1;
2137 : 24828 : res_op1 = captures[2];
2138 : 24828 : tree _r;
2139 : 24828 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2140 : 24828 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 383, __FILE__, __LINE__, true);
2141 : 24828 : return _r;
2142 : : }
2143 : : next_after_fail584:;
2144 : : }
2145 : : else
2146 : : {
2147 : 239 : if (ic == ncmp
2148 : : )
2149 : : {
2150 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail585;
2151 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail585;
2152 : 0 : {
2153 : 0 : tree res_op0;
2154 : 0 : res_op0 = captures[1];
2155 : 0 : tree res_op1;
2156 : 0 : res_op1 = captures[2];
2157 : 0 : tree _r;
2158 : 0 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
2159 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 384, __FILE__, __LINE__, true);
2160 : 0 : return _r;
2161 : : }
2162 : : next_after_fail585:;
2163 : : }
2164 : : }
2165 : : }
2166 : : }
2167 : : return NULL_TREE;
2168 : : }
2169 : :
2170 : : tree
2171 : 30 : generic_simplify_250 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2172 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2173 : : const enum tree_code ARG_UNUSED (cmp))
2174 : : {
2175 : 30 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2176 : 30 : if (single_use (captures[1]) && single_use (captures[3])
2177 : : )
2178 : : {
2179 : 30 : {
2180 : 30 : tree otype = TREE_TYPE (captures[0]);
2181 : 30 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail599;
2182 : 30 : {
2183 : 30 : tree res_op0;
2184 : 30 : {
2185 : 30 : tree _o1[1], _r1;
2186 : 30 : _o1[0] = captures[4];
2187 : 30 : if (TREE_TYPE (_o1[0]) != otype)
2188 : : {
2189 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, otype, _o1[0]);
2190 : : }
2191 : : else
2192 : : _r1 = _o1[0];
2193 : 30 : res_op0 = _r1;
2194 : : }
2195 : 30 : tree res_op1;
2196 : 30 : {
2197 : 30 : tree _o1[1], _r1;
2198 : 30 : _o1[0] = captures[2];
2199 : 30 : if (TREE_TYPE (_o1[0]) != otype)
2200 : : {
2201 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, otype, _o1[0]);
2202 : : }
2203 : : else
2204 : : _r1 = _o1[0];
2205 : 30 : res_op1 = _r1;
2206 : : }
2207 : 30 : tree _r;
2208 : 30 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2209 : 30 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 395, __FILE__, __LINE__, true);
2210 : 30 : return _r;
2211 : : }
2212 : 0 : next_after_fail599:;
2213 : : }
2214 : : }
2215 : 0 : return NULL_TREE;
2216 : : }
2217 : :
2218 : : tree
2219 : 1255 : generic_simplify_256 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2220 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2221 : : const enum tree_code ARG_UNUSED (cmp),
2222 : : const enum tree_code ARG_UNUSED (icmp))
2223 : : {
2224 : 1255 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2225 : 1255 : if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
2226 : 1255 : && ! DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
2227 : : )
2228 : : {
2229 : 1255 : {
2230 : 1255 : format_helper fmt (REAL_MODE_FORMAT (TYPE_MODE (TREE_TYPE (captures[0]))));
2231 : 1255 : tree type1 = TREE_TYPE (captures[1]);
2232 : 1255 : bool type1_signed_p = TYPE_SIGN (type1) == SIGNED;
2233 : 1255 : tree type2 = TREE_TYPE (captures[2]);
2234 : 1255 : bool type2_signed_p = TYPE_SIGN (type2) == SIGNED;
2235 : 1255 : if (fmt.can_represent_integral_type_p (type1)
2236 : 1255 : && fmt.can_represent_integral_type_p (type2)
2237 : : )
2238 : : {
2239 : 229 : if (cmp == ORDERED_EXPR || cmp == UNORDERED_EXPR
2240 : : )
2241 : : {
2242 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail637;
2243 : 0 : {
2244 : 0 : tree _r;
2245 : 0 : _r = constant_boolean_node (cmp == ORDERED_EXPR, type);
2246 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2247 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2248 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2249 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2250 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 434, __FILE__, __LINE__, true);
2251 : 183 : return _r;
2252 : : }
2253 : 0 : next_after_fail637:;
2254 : : }
2255 : : else
2256 : : {
2257 : 229 : if (TYPE_PRECISION (type1) > TYPE_PRECISION (type2)
2258 : 229 : && type1_signed_p >= type2_signed_p
2259 : : )
2260 : : {
2261 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail638;
2262 : 0 : {
2263 : 0 : tree res_op0;
2264 : 0 : res_op0 = captures[1];
2265 : 0 : tree res_op1;
2266 : 0 : {
2267 : 0 : tree _o1[1], _r1;
2268 : 0 : _o1[0] = captures[2];
2269 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2270 : : {
2271 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2272 : : }
2273 : : else
2274 : : _r1 = _o1[0];
2275 : 0 : res_op1 = _r1;
2276 : : }
2277 : 0 : tree _r;
2278 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2279 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 435, __FILE__, __LINE__, true);
2280 : 0 : return _r;
2281 : : }
2282 : 0 : next_after_fail638:;
2283 : : }
2284 : : else
2285 : : {
2286 : 229 : if (TYPE_PRECISION (type1) < TYPE_PRECISION (type2)
2287 : 229 : && type1_signed_p <= type2_signed_p
2288 : : )
2289 : : {
2290 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail639;
2291 : 7 : {
2292 : 7 : tree res_op0;
2293 : 7 : {
2294 : 7 : tree _o1[1], _r1;
2295 : 7 : _o1[0] = captures[1];
2296 : 7 : if (TREE_TYPE (_o1[0]) != type2)
2297 : : {
2298 : 7 : _r1 = fold_build1_loc (loc, NOP_EXPR, type2, _o1[0]);
2299 : : }
2300 : : else
2301 : : _r1 = _o1[0];
2302 : 7 : res_op0 = _r1;
2303 : : }
2304 : 7 : tree res_op1;
2305 : 7 : res_op1 = captures[2];
2306 : 7 : tree _r;
2307 : 7 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2308 : 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 436, __FILE__, __LINE__, true);
2309 : 7 : return _r;
2310 : : }
2311 : 0 : next_after_fail639:;
2312 : : }
2313 : : else
2314 : : {
2315 : 222 : if (TYPE_PRECISION (type1) == TYPE_PRECISION (type2)
2316 : 222 : && type1_signed_p == type2_signed_p
2317 : : )
2318 : : {
2319 : 176 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail640;
2320 : 176 : {
2321 : 176 : tree res_op0;
2322 : 176 : res_op0 = captures[1];
2323 : 176 : tree res_op1;
2324 : 176 : {
2325 : 176 : tree _o1[1], _r1;
2326 : 176 : _o1[0] = captures[2];
2327 : 176 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2328 : : {
2329 : 1 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2330 : : }
2331 : : else
2332 : : _r1 = _o1[0];
2333 : 176 : res_op1 = _r1;
2334 : : }
2335 : 176 : tree _r;
2336 : 176 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2337 : 176 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 437, __FILE__, __LINE__, true);
2338 : 176 : return _r;
2339 : : }
2340 : 0 : next_after_fail640:;
2341 : : }
2342 : : }
2343 : : }
2344 : : }
2345 : : }
2346 : : }
2347 : : }
2348 : : return NULL_TREE;
2349 : : }
2350 : :
2351 : : tree
2352 : 0 : 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 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2357 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2358 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2359 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2360 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (TREE_TYPE (captures[2]))
2361 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
2362 : 0 : && !wi::neg_p (wi::to_wide (captures[3]))
2363 : : )
2364 : : {
2365 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail673;
2366 : 0 : {
2367 : 0 : tree res_op0;
2368 : 0 : {
2369 : 0 : tree _o1[2], _r1;
2370 : 0 : _o1[0] = captures[2];
2371 : 0 : {
2372 : 0 : tree _o2[1], _r2;
2373 : 0 : {
2374 : 0 : tree _o3[1], _r3;
2375 : 0 : _o3[0] = captures[3];
2376 : 0 : _r3 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
2377 : 0 : _o2[0] = _r3;
2378 : : }
2379 : 0 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o1[0]))
2380 : : {
2381 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
2382 : : }
2383 : : else
2384 : : _r2 = _o2[0];
2385 : 0 : _o1[1] = _r2;
2386 : : }
2387 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2388 : 0 : res_op0 = _r1;
2389 : : }
2390 : 0 : tree res_op1;
2391 : 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[2]));
2392 : 0 : tree _r;
2393 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2394 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 463, __FILE__, __LINE__, true);
2395 : 0 : return _r;
2396 : : }
2397 : 0 : next_after_fail673:;
2398 : : }
2399 : : return NULL_TREE;
2400 : : }
2401 : :
2402 : : tree
2403 : 13275 : generic_simplify_272 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2404 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2405 : : const enum tree_code ARG_UNUSED (cmp))
2406 : : {
2407 : 13275 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2408 : 13275 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail677;
2409 : 13275 : {
2410 : 13275 : tree res_op0;
2411 : 13275 : {
2412 : 13275 : tree _o1[2], _r1;
2413 : 13275 : {
2414 : 13275 : tree _o2[2], _r2;
2415 : 13275 : _o2[0] = captures[1];
2416 : 13275 : _o2[1] = captures[4];
2417 : 13275 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2418 : 13275 : _o1[0] = _r2;
2419 : : }
2420 : 13275 : _o1[1] = captures[2];
2421 : 13275 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2422 : 13275 : res_op0 = _r1;
2423 : : }
2424 : 13275 : tree res_op1;
2425 : 13275 : res_op1 = build_zero_cst (TREE_TYPE (captures[2]));
2426 : 13275 : tree _r;
2427 : 13275 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2428 : 13275 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 467, __FILE__, __LINE__, true);
2429 : : return _r;
2430 : : }
2431 : 0 : next_after_fail677:;
2432 : 0 : return NULL_TREE;
2433 : : }
2434 : :
2435 : : tree
2436 : 18 : generic_simplify_278 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2437 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2438 : : const enum tree_code ARG_UNUSED (cmp),
2439 : : const enum tree_code ARG_UNUSED (ncmp))
2440 : : {
2441 : 18 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2442 : 36 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2443 : 18 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2444 : 36 : && types_match (captures[0], captures[2])
2445 : : )
2446 : : {
2447 : 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail683;
2448 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail683;
2449 : 2 : {
2450 : 2 : tree res_op0;
2451 : 2 : {
2452 : 2 : tree _o1[2], _r1;
2453 : 2 : _o1[0] = captures[0];
2454 : 2 : _o1[1] = captures[2];
2455 : 2 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2456 : 2 : res_op0 = _r1;
2457 : : }
2458 : 2 : tree res_op1;
2459 : 2 : res_op1 = captures[1];
2460 : 2 : tree _r;
2461 : 2 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
2462 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 471, __FILE__, __LINE__, true);
2463 : 2 : return _r;
2464 : : }
2465 : : next_after_fail683:;
2466 : : }
2467 : : return NULL_TREE;
2468 : : }
2469 : :
2470 : : tree
2471 : 0 : generic_simplify_283 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2472 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2473 : : const enum tree_code ARG_UNUSED (inner),
2474 : : const enum tree_code ARG_UNUSED (outer))
2475 : : {
2476 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2477 : 0 : {
2478 : 0 : bool cst1 = integer_onep (captures[1]);
2479 : 0 : bool cst0 = integer_zerop (captures[1]);
2480 : 0 : bool innereq = inner == EQ_EXPR;
2481 : 0 : bool outereq = outer == EQ_EXPR;
2482 : 0 : if (innereq ? cst0 : cst1
2483 : : )
2484 : : {
2485 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail702;
2486 : 0 : {
2487 : 0 : tree _r;
2488 : 0 : _r = constant_boolean_node (!outereq, type);
2489 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2490 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2491 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2492 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2493 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 482, __FILE__, __LINE__, true);
2494 : 0 : return _r;
2495 : : }
2496 : 0 : next_after_fail702:;
2497 : : }
2498 : : else
2499 : : {
2500 : 0 : if (innereq ? cst1 : cst0
2501 : : )
2502 : : {
2503 : 0 : {
2504 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
2505 : 0 : tree ucst1 = build_one_cst (utype);
2506 : 0 : if (!outereq
2507 : : )
2508 : : {
2509 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail703;
2510 : 0 : {
2511 : 0 : tree res_op0;
2512 : 0 : {
2513 : 0 : tree _o1[1], _r1;
2514 : 0 : _o1[0] = captures[0];
2515 : 0 : if (TREE_TYPE (_o1[0]) != utype)
2516 : : {
2517 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
2518 : : }
2519 : : else
2520 : : _r1 = _o1[0];
2521 : 0 : res_op0 = _r1;
2522 : : }
2523 : 0 : tree res_op1;
2524 : 0 : res_op1 = ucst1;
2525 : 0 : tree _r;
2526 : 0 : _r = fold_build2_loc (loc, GT_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", 483, __FILE__, __LINE__, true);
2530 : 0 : return _r;
2531 : : }
2532 : 0 : next_after_fail703:;
2533 : : }
2534 : : else
2535 : : {
2536 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail704;
2537 : 0 : {
2538 : 0 : tree res_op0;
2539 : 0 : {
2540 : 0 : tree _o1[1], _r1;
2541 : 0 : _o1[0] = captures[0];
2542 : 0 : if (TREE_TYPE (_o1[0]) != utype)
2543 : : {
2544 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
2545 : : }
2546 : : else
2547 : : _r1 = _o1[0];
2548 : 0 : res_op0 = _r1;
2549 : : }
2550 : 0 : tree res_op1;
2551 : 0 : res_op1 = ucst1;
2552 : 0 : tree _r;
2553 : 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
2554 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2555 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2556 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 484, __FILE__, __LINE__, true);
2557 : 0 : return _r;
2558 : : }
2559 : 0 : next_after_fail704:;
2560 : : }
2561 : : }
2562 : : }
2563 : : else
2564 : : {
2565 : 0 : {
2566 : 0 : tree value = build_int_cst (TREE_TYPE (captures[0]), !innereq);
2567 : 0 : if (outereq
2568 : : )
2569 : : {
2570 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail705;
2571 : 0 : {
2572 : 0 : tree res_op0;
2573 : 0 : res_op0 = captures[0];
2574 : 0 : tree res_op1;
2575 : 0 : res_op1 = value;
2576 : 0 : tree _r;
2577 : 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
2578 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2579 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2580 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 485, __FILE__, __LINE__, true);
2581 : 0 : return _r;
2582 : : }
2583 : 0 : next_after_fail705:;
2584 : : }
2585 : : else
2586 : : {
2587 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail706;
2588 : 0 : {
2589 : 0 : tree res_op0;
2590 : 0 : res_op0 = captures[0];
2591 : 0 : tree res_op1;
2592 : 0 : res_op1 = value;
2593 : 0 : tree _r;
2594 : 0 : _r = fold_build2_loc (loc, NE_EXPR, type, res_op0, res_op1);
2595 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2596 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2597 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 486, __FILE__, __LINE__, true);
2598 : 0 : return _r;
2599 : : }
2600 : 0 : next_after_fail706:;
2601 : : }
2602 : : }
2603 : : }
2604 : : }
2605 : : }
2606 : : return NULL_TREE;
2607 : : }
2608 : :
2609 : : tree
2610 : 45 : generic_simplify_291 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2611 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2612 : : const enum tree_code ARG_UNUSED (cmp),
2613 : : const enum tree_code ARG_UNUSED (rep),
2614 : : const combined_fn ARG_UNUSED (popcount))
2615 : : {
2616 : 45 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2617 : 45 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail727;
2618 : 45 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail727;
2619 : 45 : {
2620 : 45 : tree res_op0;
2621 : 45 : res_op0 = captures[0];
2622 : 45 : tree res_op1;
2623 : 45 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
2624 : 45 : tree _r;
2625 : 45 : _r = fold_build2_loc (loc, rep, type, res_op0, res_op1);
2626 : 45 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 507, __FILE__, __LINE__, true);
2627 : : return _r;
2628 : : }
2629 : : next_after_fail727:;
2630 : : return NULL_TREE;
2631 : : }
2632 : :
2633 : : tree
2634 : 32 : generic_simplify_294 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2635 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2636 : : {
2637 : 32 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2638 : 59 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2639 : 59 : && tree_expr_nonzero_p (captures[0])
2640 : : )
2641 : : {
2642 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail732;
2643 : 6 : {
2644 : 6 : tree _r;
2645 : 6 : _r = build_one_cst (type);
2646 : 6 : if (TREE_SIDE_EFFECTS (captures[0]))
2647 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2648 : 6 : if (TREE_SIDE_EFFECTS (captures[1]))
2649 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2650 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 512, __FILE__, __LINE__, true);
2651 : 6 : return _r;
2652 : : }
2653 : 0 : next_after_fail732:;
2654 : : }
2655 : : return NULL_TREE;
2656 : : }
2657 : :
2658 : : tree
2659 : 0 : generic_simplify_300 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2660 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2661 : : const combined_fn ARG_UNUSED (copysigns))
2662 : : {
2663 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2664 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail739;
2665 : 0 : {
2666 : 0 : tree res_op0;
2667 : 0 : res_op0 = captures[0];
2668 : 0 : tree res_op1;
2669 : 0 : res_op1 = captures[2];
2670 : 0 : tree _r;
2671 : 0 : _r = maybe_build_call_expr_loc (loc, copysigns, type, 2, res_op0, res_op1);
2672 : 0 : if (!_r)
2673 : 0 : goto next_after_fail739;
2674 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2675 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2676 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 519, __FILE__, __LINE__, true);
2677 : : return _r;
2678 : : }
2679 : : next_after_fail739:;
2680 : : return NULL_TREE;
2681 : : }
2682 : :
2683 : : tree
2684 : 2363 : generic_simplify_306 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2685 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2686 : : const enum tree_code ARG_UNUSED (div))
2687 : : {
2688 : 2363 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2689 : 2363 : if (!integer_zerop (captures[1])
2690 : : )
2691 : : {
2692 : 1737 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail747;
2693 : 1737 : {
2694 : 1737 : tree _r;
2695 : 1737 : _r = captures[0];
2696 : 1737 : if (TREE_SIDE_EFFECTS (captures[1]))
2697 : 59 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2698 : 1737 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 525, __FILE__, __LINE__, true);
2699 : 1737 : return _r;
2700 : : }
2701 : 0 : next_after_fail747:;
2702 : : }
2703 : : return NULL_TREE;
2704 : : }
2705 : :
2706 : : tree
2707 : 1 : generic_simplify_311 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2708 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2709 : : const enum tree_code ARG_UNUSED (div))
2710 : : {
2711 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2712 : 0 : if ((INTEGRAL_TYPE_P (type) || VECTOR_INTEGER_TYPE_P (type))
2713 : 1 : && TYPE_OVERFLOW_UNDEFINED (type)
2714 : 1 : && !integer_zerop (captures[0])
2715 : 2 : && (!flag_non_call_exceptions || tree_expr_nonzero_p (captures[0]))
2716 : : )
2717 : : {
2718 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail752;
2719 : 1 : {
2720 : 1 : tree _r;
2721 : 1 : _r = build_minus_one_cst (type);
2722 : 1 : if (TREE_SIDE_EFFECTS (captures[0]))
2723 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2724 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 530, __FILE__, __LINE__, true);
2725 : 1 : return _r;
2726 : : }
2727 : 0 : next_after_fail752:;
2728 : : }
2729 : : return NULL_TREE;
2730 : : }
2731 : :
2732 : : tree
2733 : 3 : generic_simplify_316 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2734 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2735 : : const enum tree_code ARG_UNUSED (div))
2736 : : {
2737 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2738 : 3 : if (INTEGRAL_TYPE_P (type)
2739 : 3 : && wi::multiple_of_p (wi::to_widest (captures[1]), wi::to_widest (captures[2]), SIGNED)
2740 : : )
2741 : : {
2742 : 3 : if (TYPE_OVERFLOW_UNDEFINED (type) && !TYPE_OVERFLOW_SANITIZED (type)
2743 : : )
2744 : : {
2745 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail758;
2746 : 3 : {
2747 : 3 : tree res_op0;
2748 : 3 : res_op0 = captures[1];
2749 : 3 : tree res_op1;
2750 : 3 : res_op1 = captures[2];
2751 : 3 : tree _r;
2752 : 3 : _r = fold_build2_loc (loc, div, type, res_op0, res_op1);
2753 : 3 : if (TREE_SIDE_EFFECTS (captures[0]))
2754 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2755 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 536, __FILE__, __LINE__, true);
2756 : 3 : return _r;
2757 : : }
2758 : 0 : next_after_fail758:;
2759 : : }
2760 : : }
2761 : : return NULL_TREE;
2762 : : }
2763 : :
2764 : : tree
2765 : 1388821 : generic_simplify_324 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2766 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2767 : : const enum tree_code ARG_UNUSED (mod))
2768 : : {
2769 : 1388821 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2770 : 1575256 : if ((TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (captures[0]))
2771 : 1204960 : && INTEGRAL_TYPE_P (type)
2772 : 1204960 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2773 : 1204960 : && (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[1]))
2774 : 3 : || TYPE_UNSIGNED (TREE_TYPE (captures[1]))
2775 : 1 : || !TYPE_UNSIGNED (type))
2776 : 2593781 : && integer_pow2p (captures[2]) && tree_int_cst_sgn (captures[2]) > 0
2777 : : )
2778 : : {
2779 : 980678 : {
2780 : 980678 : tree utype = TREE_TYPE (captures[1]);
2781 : 980678 : if (!TYPE_OVERFLOW_WRAPS (utype))
2782 : 303 : utype = unsigned_type_for (utype);
2783 : 980678 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail766;
2784 : 980678 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail766;
2785 : 980678 : {
2786 : 980678 : tree res_op0;
2787 : 980678 : res_op0 = captures[0];
2788 : 980678 : tree res_op1;
2789 : 980678 : {
2790 : 980678 : tree _o1[1], _r1;
2791 : 980678 : {
2792 : 980678 : tree _o2[2], _r2;
2793 : 980678 : {
2794 : 980678 : tree _o3[1], _r3;
2795 : 980678 : _o3[0] = captures[1];
2796 : 980678 : if (TREE_TYPE (_o3[0]) != utype)
2797 : : {
2798 : 303 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
2799 : : }
2800 : : else
2801 : : _r3 = _o3[0];
2802 : 980678 : _o2[0] = _r3;
2803 : : }
2804 : 980678 : _o2[1] = build_one_cst (utype);
2805 : 980678 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2806 : 980678 : _o1[0] = _r2;
2807 : : }
2808 : 980678 : if (TREE_TYPE (_o1[0]) != type)
2809 : : {
2810 : 911 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2811 : : }
2812 : : else
2813 : : _r1 = _o1[0];
2814 : 980678 : res_op1 = _r1;
2815 : : }
2816 : 980678 : tree _r;
2817 : 980678 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2818 : 980678 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 544, __FILE__, __LINE__, true);
2819 : 980678 : return _r;
2820 : : }
2821 : : next_after_fail766:;
2822 : : }
2823 : : }
2824 : : return NULL_TREE;
2825 : : }
2826 : :
2827 : : tree
2828 : 6972 : generic_simplify_338 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2829 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
2830 : : const enum tree_code ARG_UNUSED (cmp),
2831 : : const enum tree_code ARG_UNUSED (op))
2832 : : {
2833 : 6972 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2834 : 6972 : {
2835 : 6972 : tree from_type = TREE_TYPE (captures[0]), to_type = TREE_TYPE (captures[1]);
2836 : 6972 : if (types_match (from_type, to_type)
2837 : 6972 : || (TYPE_UNSIGNED (from_type)
2838 : 37 : && !TYPE_UNSIGNED (to_type)
2839 : 37 : && TYPE_PRECISION (from_type) == TYPE_PRECISION (to_type)
2840 : 37 : && integer_zerop (captures[1])
2841 : 31 : && (cmp == LT_EXPR || cmp == GE_EXPR))
2842 : : )
2843 : : {
2844 : 6942 : {
2845 : 6942 : wi::overflow_type overflow = wi::OVF_NONE;
2846 : 6942 : enum tree_code code, cmp_code = cmp;
2847 : 6942 : wide_int real_c1;
2848 : 6942 : wide_int c1 = wi::to_wide (captures[1]);
2849 : 6942 : wide_int c2 = wi::to_wide (captures[2]);
2850 : 6942 : wide_int c3 = wi::to_wide (captures[3]);
2851 : 6942 : signop sgn = TYPE_SIGN (from_type);
2852 : 6942 : if (!types_match (from_type, to_type))
2853 : : {
2854 : 7 : if (cmp_code == LT_EXPR)
2855 : : cmp_code = GT_EXPR;
2856 : 0 : if (cmp_code == GE_EXPR)
2857 : 0 : cmp_code = LE_EXPR;
2858 : 7 : c1 = wi::max_value (to_type);
2859 : : }
2860 : 6942 : if (op == PLUS_EXPR)
2861 : 6942 : real_c1 = wi::sub (c3, c2, sgn, &overflow);
2862 : : else
2863 : 0 : real_c1 = wi::add (c3, c2, sgn, &overflow);
2864 : 6942 : code = cmp_code;
2865 : 6942 : if (!overflow || !TYPE_OVERFLOW_UNDEFINED (from_type))
2866 : : {
2867 : 13884 : if (!wi::cmp (wi::sub (real_c1, 1, sgn, &overflow), c1, sgn)
2868 : 6942 : && !overflow)
2869 : : {
2870 : 604 : if (cmp_code == LE_EXPR)
2871 : : code = LT_EXPR;
2872 : 604 : if (cmp_code == GT_EXPR)
2873 : 6942 : code = GE_EXPR;
2874 : : }
2875 : 13884 : if (!wi::cmp (wi::add (real_c1, 1, sgn, &overflow), c1, sgn)
2876 : 6942 : && !overflow)
2877 : : {
2878 : 5909 : if (cmp_code == LT_EXPR)
2879 : : code = LE_EXPR;
2880 : 5909 : if (cmp_code == GE_EXPR)
2881 : : code = GT_EXPR;
2882 : : }
2883 : 1050 : if (code != cmp_code || !wi::cmp (real_c1, c1, sgn))
2884 : : {
2885 : 6719 : if (cmp_code == LT_EXPR || cmp_code == LE_EXPR)
2886 : : code = MIN_EXPR;
2887 : 6719 : if (cmp_code == GT_EXPR || cmp_code == GE_EXPR)
2888 : : code = MAX_EXPR;
2889 : : }
2890 : : }
2891 : 223 : if (code == MAX_EXPR
2892 : : )
2893 : : {
2894 : 6719 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail784;
2895 : 6719 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail784;
2896 : 6719 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail784;
2897 : 6719 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail784;
2898 : 6719 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail784;
2899 : 6719 : {
2900 : 6719 : tree res_op0;
2901 : 6719 : {
2902 : 6719 : tree _o1[2], _r1;
2903 : 6719 : _o1[0] = captures[0];
2904 : 6719 : _o1[1] = wide_int_to_tree (from_type, real_c1);
2905 : 6719 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2906 : 6719 : res_op0 = _r1;
2907 : : }
2908 : 6719 : tree res_op1;
2909 : 6719 : res_op1 = wide_int_to_tree (from_type, c2);
2910 : 6719 : tree _r;
2911 : 6719 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2912 : 6719 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 562, __FILE__, __LINE__, true);
2913 : 6719 : return _r;
2914 : : }
2915 : 223 : next_after_fail784:;
2916 : : }
2917 : : else
2918 : : {
2919 : 223 : if (code == MIN_EXPR
2920 : : )
2921 : : {
2922 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail785;
2923 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail785;
2924 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail785;
2925 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail785;
2926 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail785;
2927 : 0 : {
2928 : 0 : tree res_op0;
2929 : 0 : {
2930 : 0 : tree _o1[2], _r1;
2931 : 0 : _o1[0] = captures[0];
2932 : 0 : _o1[1] = wide_int_to_tree (from_type, real_c1);
2933 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2934 : 0 : res_op0 = _r1;
2935 : : }
2936 : 0 : tree res_op1;
2937 : 0 : res_op1 = wide_int_to_tree (from_type, c2);
2938 : 0 : tree _r;
2939 : 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2940 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 563, __FILE__, __LINE__, true);
2941 : 0 : return _r;
2942 : : }
2943 : 223 : next_after_fail785:;
2944 : : }
2945 : : }
2946 : 6942 : }
2947 : : }
2948 : : }
2949 : : return NULL_TREE;
2950 : : }
2951 : :
2952 : : tree
2953 : 396 : generic_simplify_366 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2954 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2955 : : const enum tree_code ARG_UNUSED (op),
2956 : : const enum tree_code ARG_UNUSED (neg_op))
2957 : : {
2958 : 396 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2959 : 396 : if (flag_unsafe_math_optimizations
2960 : : )
2961 : : {
2962 : 4 : if (!HONOR_SIGNED_ZEROS (captures[1]) && !HONOR_INFINITIES (captures[1])
2963 : : )
2964 : : {
2965 : 4 : if (real_less (&dconst0, TREE_REAL_CST_PTR (captures[0]))
2966 : : )
2967 : : {
2968 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail819;
2969 : 2 : {
2970 : 2 : tree res_op0;
2971 : 2 : res_op0 = captures[1];
2972 : 2 : tree res_op1;
2973 : 2 : res_op1 = captures[2];
2974 : 2 : tree _r;
2975 : 2 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2976 : 2 : if (TREE_SIDE_EFFECTS (captures[0]))
2977 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2978 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 595, __FILE__, __LINE__, true);
2979 : 2 : return _r;
2980 : : }
2981 : 0 : next_after_fail819:;
2982 : : }
2983 : : else
2984 : : {
2985 : 2 : if (real_less (TREE_REAL_CST_PTR (captures[0]), &dconst0)
2986 : : )
2987 : : {
2988 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail820;
2989 : 2 : {
2990 : 2 : tree res_op0;
2991 : 2 : res_op0 = captures[1];
2992 : 2 : tree res_op1;
2993 : 2 : res_op1 = captures[2];
2994 : 2 : tree _r;
2995 : 2 : _r = fold_build2_loc (loc, neg_op, type, res_op0, res_op1);
2996 : 2 : if (TREE_SIDE_EFFECTS (captures[0]))
2997 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2998 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 596, __FILE__, __LINE__, true);
2999 : 2 : return _r;
3000 : : }
3001 : 0 : next_after_fail820:;
3002 : : }
3003 : : }
3004 : : }
3005 : : }
3006 : : return NULL_TREE;
3007 : : }
3008 : :
3009 : : tree
3010 : 64 : generic_simplify_377 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3011 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3012 : : const enum tree_code ARG_UNUSED (minmax),
3013 : : const enum tree_code ARG_UNUSED (cmp),
3014 : : const enum tree_code ARG_UNUSED (comb))
3015 : : {
3016 : 64 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3017 : 64 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail833;
3018 : 64 : {
3019 : 64 : if (! tree_invariant_p (captures[2])) goto next_after_fail833;
3020 : 64 : tree res_op0;
3021 : 64 : {
3022 : 64 : tree _o1[2], _r1;
3023 : 64 : _o1[0] = captures[0];
3024 : 64 : _o1[1] = unshare_expr (captures[2]);
3025 : 64 : _r1 = fold_build2_loc (loc, cmp, type, _o1[0], _o1[1]);
3026 : 64 : res_op0 = _r1;
3027 : : }
3028 : 64 : tree res_op1;
3029 : 64 : {
3030 : 64 : tree _o1[2], _r1;
3031 : 64 : _o1[0] = captures[1];
3032 : 64 : _o1[1] = captures[2];
3033 : 64 : _r1 = fold_build2_loc (loc, cmp, type, _o1[0], _o1[1]);
3034 : 64 : res_op1 = _r1;
3035 : : }
3036 : 64 : tree _r;
3037 : 64 : _r = fold_build2_loc (loc, comb, type, res_op0, res_op1);
3038 : 64 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 609, __FILE__, __LINE__, true);
3039 : : return _r;
3040 : : }
3041 : : next_after_fail833:;
3042 : : return NULL_TREE;
3043 : : }
3044 : :
3045 : : tree
3046 : 231 : generic_simplify_385 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3047 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3048 : : const enum tree_code ARG_UNUSED (cmp),
3049 : : const enum tree_code ARG_UNUSED (out))
3050 : : {
3051 : 231 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3052 : 231 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
3053 : 231 : && types_match (TREE_TYPE (captures[3]), TREE_TYPE (captures[0]))
3054 : 128 : && tree_nop_conversion_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[3]))
3055 : 231 : && wi::to_wide (captures[4]) != 0
3056 : 0 : && single_use (captures[1])
3057 : : )
3058 : : {
3059 : 128 : {
3060 : 128 : unsigned int prec = TYPE_PRECISION (TREE_TYPE (captures[3]));
3061 : 128 : signop sign = TYPE_SIGN (TREE_TYPE (captures[3]));
3062 : 128 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail873;
3063 : 128 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail873;
3064 : 128 : {
3065 : 128 : tree res_op0;
3066 : 128 : res_op0 = captures[3];
3067 : 128 : tree res_op1;
3068 : 128 : res_op1 = wide_int_to_tree (TREE_TYPE (captures[3]),
3069 : 128 : wi::max_value (prec, sign)
3070 : 384 : - wi::to_wide (captures[4]));
3071 : 128 : tree _r;
3072 : 128 : _r = fold_build2_loc (loc, out, type, res_op0, res_op1);
3073 : 128 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 612, __FILE__, __LINE__, true);
3074 : 128 : return _r;
3075 : : }
3076 : : next_after_fail873:;
3077 : : }
3078 : : }
3079 : : return NULL_TREE;
3080 : : }
3081 : :
3082 : : tree
3083 : 50 : generic_simplify_393 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3084 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3085 : : const enum tree_code ARG_UNUSED (op),
3086 : : const enum tree_code ARG_UNUSED (cmp),
3087 : : const combined_fn ARG_UNUSED (ctz))
3088 : : {
3089 : 50 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3090 : 50 : {
3091 : 50 : bool ok = true;
3092 : 50 : HOST_WIDE_INT val = 0;
3093 : 50 : if (sanitize_flags_p (SANITIZE_BUILTIN)
3094 : 50 : && (!cfun
3095 : 32 : || (cfun->curr_properties & PROP_ssa) == 0))
3096 : : ok = false;
3097 : 18 : else if (!tree_fits_shwi_p (captures[2]))
3098 : : ok = false;
3099 : : else
3100 : : {
3101 : 18 : val = tree_to_shwi (captures[2]);
3102 : 18 : if (op == GT_EXPR || op == LE_EXPR)
3103 : : {
3104 : 10 : if (val == HOST_WIDE_INT_MAX)
3105 : : ok = false;
3106 : : else
3107 : 10 : val++;
3108 : : }
3109 : : }
3110 : 50 : tree type0 = TREE_TYPE (captures[1]);
3111 : 50 : int prec = TYPE_PRECISION (type0);
3112 : 68 : if (ok && prec <= MAX_FIXED_MODE_SIZE
3113 : : )
3114 : : {
3115 : 18 : if (val <= 0
3116 : : )
3117 : : {
3118 : 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail884;
3119 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail884;
3120 : 8 : {
3121 : 8 : tree _r;
3122 : 8 : _r = constant_boolean_node (cmp == EQ_EXPR ? true : false, type);
3123 : 8 : if (TREE_SIDE_EFFECTS (captures[1]))
3124 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3125 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 643, __FILE__, __LINE__, true);
3126 : 8 : return _r;
3127 : : }
3128 : : next_after_fail884:;
3129 : : }
3130 : : else
3131 : : {
3132 : 10 : if (val >= prec
3133 : : )
3134 : : {
3135 : 5 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail885;
3136 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail885;
3137 : 5 : {
3138 : 5 : tree _r;
3139 : 5 : _r = constant_boolean_node (cmp == EQ_EXPR ? false : true, type);
3140 : 5 : if (TREE_SIDE_EFFECTS (captures[1]))
3141 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3142 : 5 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 644, __FILE__, __LINE__, true);
3143 : 5 : return _r;
3144 : : }
3145 : : next_after_fail885:;
3146 : : }
3147 : : else
3148 : : {
3149 : 5 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail886;
3150 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail886;
3151 : 5 : {
3152 : 5 : tree res_op0;
3153 : 5 : {
3154 : 5 : tree _o1[2], _r1;
3155 : 5 : _o1[0] = captures[1];
3156 : 5 : _o1[1] = wide_int_to_tree (type0,
3157 : 5 : wi::mask (val, false, prec));
3158 : 5 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3159 : 5 : res_op0 = _r1;
3160 : : }
3161 : 5 : tree res_op1;
3162 : 5 : res_op1 = build_zero_cst (type0);
3163 : 5 : tree _r;
3164 : 5 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
3165 : 5 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 645, __FILE__, __LINE__, true);
3166 : 5 : return _r;
3167 : : }
3168 : : next_after_fail886:;
3169 : : }
3170 : : }
3171 : : }
3172 : : }
3173 : : return NULL_TREE;
3174 : : }
3175 : :
3176 : : tree
3177 : 1 : generic_simplify_403 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3178 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3179 : : const combined_fn ARG_UNUSED (logs),
3180 : : const combined_fn ARG_UNUSED (exps),
3181 : : const enum tree_code ARG_UNUSED (cmp))
3182 : : {
3183 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3184 : 1 : if (flag_unsafe_math_optimizations
3185 : : )
3186 : : {
3187 : 1 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
3188 : 1 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
3189 : 1 : && ! flag_trapping_math
3190 : 2 : && ! flag_errno_math
3191 : : )
3192 : : {
3193 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail898;
3194 : 1 : {
3195 : 1 : tree res_op0;
3196 : 1 : res_op0 = captures[1];
3197 : 1 : tree res_op1;
3198 : 1 : {
3199 : 1 : tree _o1[1], _r1;
3200 : 1 : _o1[0] = captures[2];
3201 : 1 : _r1 = maybe_build_call_expr_loc (loc, logs, TREE_TYPE (_o1[0]), 1, _o1[0]);
3202 : 1 : if (!_r1)
3203 : 0 : goto next_after_fail898;
3204 : 1 : if (EXPR_P (_r1))
3205 : 1 : goto next_after_fail898;
3206 : 0 : res_op1 = _r1;
3207 : : }
3208 : 0 : tree _r;
3209 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
3210 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 653, __FILE__, __LINE__, true);
3211 : 0 : return _r;
3212 : : }
3213 : : next_after_fail898:;
3214 : : }
3215 : : }
3216 : : return NULL_TREE;
3217 : : }
3218 : :
3219 : : tree
3220 : 364 : generic_simplify_410 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3221 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3222 : : const enum tree_code ARG_UNUSED (shiftrotate))
3223 : : {
3224 : 364 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3225 : 364 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail909;
3226 : 364 : {
3227 : 364 : tree _r;
3228 : 364 : _r = captures[0];
3229 : 364 : if (TREE_SIDE_EFFECTS (captures[1]))
3230 : 44 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3231 : 364 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 664, __FILE__, __LINE__, true);
3232 : : return _r;
3233 : : }
3234 : 0 : next_after_fail909:;
3235 : 0 : return NULL_TREE;
3236 : : }
3237 : :
3238 : : tree
3239 : 19 : generic_simplify_414 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3240 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3241 : : const enum tree_code ARG_UNUSED (bit_op),
3242 : : const enum tree_code ARG_UNUSED (shift))
3243 : : {
3244 : 19 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3245 : 19 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
3246 : : )
3247 : : {
3248 : 16 : {
3249 : 16 : tree mask = int_const_binop (shift, fold_convert (type, captures[3]), captures[4]);
3250 : 16 : if (mask
3251 : : )
3252 : : {
3253 : 16 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail916;
3254 : 16 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail916;
3255 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail916;
3256 : 16 : {
3257 : 16 : tree res_op0;
3258 : 16 : {
3259 : 16 : tree _o1[2], _r1;
3260 : 16 : {
3261 : 16 : tree _o2[1], _r2;
3262 : 16 : _o2[0] = captures[2];
3263 : 16 : if (TREE_TYPE (_o2[0]) != type)
3264 : : {
3265 : 16 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
3266 : : }
3267 : : else
3268 : : _r2 = _o2[0];
3269 : 16 : _o1[0] = _r2;
3270 : : }
3271 : 16 : _o1[1] = captures[4];
3272 : 16 : _r1 = fold_build2_loc (loc, shift, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3273 : 16 : res_op0 = _r1;
3274 : : }
3275 : 16 : tree res_op1;
3276 : 16 : res_op1 = mask;
3277 : 16 : tree _r;
3278 : 16 : _r = fold_build2_loc (loc, bit_op, type, res_op0, res_op1);
3279 : 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 670, __FILE__, __LINE__, true);
3280 : 16 : return _r;
3281 : : }
3282 : : next_after_fail916:;
3283 : : }
3284 : : }
3285 : : }
3286 : : return NULL_TREE;
3287 : : }
3288 : :
3289 : : tree
3290 : 2140 : generic_simplify_419 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3291 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3292 : : const enum tree_code ARG_UNUSED (eqne))
3293 : : {
3294 : 2140 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3295 : 2140 : if ((integer_zerop (captures[1]) || integer_onep (captures[1]))
3296 : : )
3297 : : {
3298 : 2138 : if ((eqne == EQ_EXPR) ^ integer_zerop (captures[1])
3299 : : )
3300 : : {
3301 : 1523 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail925;
3302 : 1523 : {
3303 : 1523 : tree res_op0;
3304 : 1523 : res_op0 = captures[0];
3305 : 1523 : tree _r;
3306 : 1523 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3307 : 1523 : if (TREE_SIDE_EFFECTS (captures[1]))
3308 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3309 : 1523 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 678, __FILE__, __LINE__, true);
3310 : 1523 : return _r;
3311 : : }
3312 : 0 : next_after_fail925:;
3313 : : }
3314 : : else
3315 : : {
3316 : 615 : if (types_match (type, TREE_TYPE (captures[0]))
3317 : : )
3318 : : {
3319 : 41 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail926;
3320 : 41 : {
3321 : 41 : tree res_op0;
3322 : 41 : res_op0 = captures[0];
3323 : 41 : tree res_op1;
3324 : 41 : res_op1 = build_one_cst (type);
3325 : 41 : tree _r;
3326 : 41 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
3327 : 41 : if (TREE_SIDE_EFFECTS (captures[1]))
3328 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3329 : 41 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 679, __FILE__, __LINE__, true);
3330 : 41 : return _r;
3331 : : }
3332 : 0 : next_after_fail926:;
3333 : : }
3334 : : }
3335 : : }
3336 : : return NULL_TREE;
3337 : : }
3338 : :
3339 : : tree
3340 : 4181330 : generic_simplify_425 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3341 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3342 : : {
3343 : 4181330 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3344 : 4181330 : if (INTEGRAL_TYPE_P (type)
3345 : 1906661 : && TYPE_PRECISION (type) == 1
3346 : 4196308 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
3347 : : )
3348 : : {
3349 : 14978 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail944;
3350 : 14978 : {
3351 : 14978 : tree res_op0;
3352 : 14978 : res_op0 = captures[0];
3353 : 14978 : tree _r;
3354 : 14978 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3355 : 14978 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 685, __FILE__, __LINE__, true);
3356 : 14978 : return _r;
3357 : : }
3358 : 0 : next_after_fail944:;
3359 : : }
3360 : : return NULL_TREE;
3361 : : }
3362 : :
3363 : : tree
3364 : 0 : generic_simplify_427 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3365 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3366 : : const combined_fn ARG_UNUSED (coss),
3367 : : const combined_fn ARG_UNUSED (atans),
3368 : : const combined_fn ARG_UNUSED (sqrts),
3369 : : const combined_fn ARG_UNUSED (copysigns))
3370 : : {
3371 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3372 : 0 : {
3373 : 0 : REAL_VALUE_TYPE r_cst;
3374 : 0 : build_sinatan_real (&r_cst, type);
3375 : 0 : tree t_cst = build_real (type, r_cst);
3376 : 0 : tree t_one = build_one_cst (type);
3377 : 0 : tree t_zero = build_zero_cst (type);
3378 : 0 : if (SCALAR_FLOAT_TYPE_P (type)
3379 : : )
3380 : : {
3381 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail946;
3382 : 0 : {
3383 : 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail946;
3384 : 0 : tree res_op0;
3385 : 0 : {
3386 : 0 : tree _o1[2], _r1;
3387 : 0 : {
3388 : 0 : tree _o2[1], _r2;
3389 : 0 : _o2[0] = unshare_expr (captures[1]);
3390 : 0 : _r2 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
3391 : 0 : _o1[0] = _r2;
3392 : : }
3393 : 0 : _o1[1] = t_cst;
3394 : 0 : _r1 = fold_build2_loc (loc, LT_EXPR, boolean_type_node, _o1[0], _o1[1]);
3395 : 0 : res_op0 = _r1;
3396 : : }
3397 : 0 : tree res_op1;
3398 : 0 : {
3399 : 0 : tree _o1[2], _r1;
3400 : 0 : _o1[0] = t_one;
3401 : 0 : {
3402 : 0 : tree _o2[1], _r2;
3403 : 0 : {
3404 : 0 : tree _o3[2], _r3;
3405 : 0 : {
3406 : 0 : tree _o4[2], _r4;
3407 : 0 : _o4[0] = unshare_expr (captures[1]);
3408 : 0 : _o4[1] = unshare_expr (captures[1]);
3409 : 0 : _r4 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o4[0]), _o4[0], _o4[1]);
3410 : 0 : _o3[0] = _r4;
3411 : : }
3412 : 0 : _o3[1] = t_one;
3413 : 0 : _r3 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
3414 : 0 : _o2[0] = _r3;
3415 : : }
3416 : 0 : _r2 = maybe_build_call_expr_loc (loc, sqrts, TREE_TYPE (_o2[0]), 1, _o2[0]);
3417 : 0 : if (!_r2)
3418 : 0 : goto next_after_fail946;
3419 : 0 : _o1[1] = _r2;
3420 : : }
3421 : 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3422 : 0 : res_op1 = _r1;
3423 : : }
3424 : 0 : tree res_op2;
3425 : 0 : {
3426 : 0 : tree _o1[2], _r1;
3427 : 0 : _o1[0] = t_zero;
3428 : 0 : _o1[1] = captures[1];
3429 : 0 : _r1 = maybe_build_call_expr_loc (loc, copysigns, TREE_TYPE (_o1[0]), 2, _o1[0], _o1[1]);
3430 : 0 : if (!_r1)
3431 : 0 : goto next_after_fail946;
3432 : 0 : res_op2 = _r1;
3433 : : }
3434 : 0 : tree _r;
3435 : 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
3436 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 687, __FILE__, __LINE__, true);
3437 : 0 : return _r;
3438 : : }
3439 : 0 : next_after_fail946:;
3440 : : }
3441 : : }
3442 : 0 : return NULL_TREE;
3443 : : }
3444 : :
3445 : : tree
3446 : 0 : generic_simplify_432 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3447 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3448 : : const combined_fn ARG_UNUSED (POW))
3449 : : {
3450 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3451 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail951;
3452 : 0 : {
3453 : 0 : tree _r;
3454 : 0 : _r = captures[0];
3455 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3456 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3457 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 692, __FILE__, __LINE__, true);
3458 : : return _r;
3459 : : }
3460 : 0 : next_after_fail951:;
3461 : 0 : return NULL_TREE;
3462 : : }
3463 : :
3464 : : tree
3465 : 0 : generic_simplify_436 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3466 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3467 : : const combined_fn ARG_UNUSED (HYPOT))
3468 : : {
3469 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3470 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail955;
3471 : 0 : {
3472 : 0 : tree res_op0;
3473 : 0 : res_op0 = captures[0];
3474 : 0 : tree _r;
3475 : 0 : _r = fold_build1_loc (loc, ABS_EXPR, type, res_op0);
3476 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3477 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3478 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 696, __FILE__, __LINE__, true);
3479 : : return _r;
3480 : : }
3481 : 0 : next_after_fail955:;
3482 : 0 : return NULL_TREE;
3483 : : }
3484 : :
3485 : : tree
3486 : 8 : generic_simplify_439 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3487 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3488 : : {
3489 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3490 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3491 : 16 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
3492 : : )
3493 : : {
3494 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail958;
3495 : 0 : {
3496 : 0 : tree res_op0;
3497 : 0 : res_op0 = captures[0];
3498 : 0 : tree res_op1;
3499 : 0 : res_op1 = captures[1];
3500 : 0 : tree _r;
3501 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
3502 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 699, __FILE__, __LINE__, true);
3503 : 0 : return _r;
3504 : : }
3505 : 0 : next_after_fail958:;
3506 : : }
3507 : : return NULL_TREE;
3508 : : }
3509 : :
3510 : : tree
3511 : 0 : generic_simplify_445 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3512 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3513 : : {
3514 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3515 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail964;
3516 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail964;
3517 : 0 : {
3518 : 0 : tree res_op0;
3519 : 0 : res_op0 = captures[0];
3520 : 0 : tree res_op1;
3521 : 0 : {
3522 : 0 : tree _o1[1], _r1;
3523 : 0 : _o1[0] = captures[5];
3524 : 0 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3525 : 0 : res_op1 = _r1;
3526 : : }
3527 : 0 : tree _r;
3528 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
3529 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 704, __FILE__, __LINE__, true);
3530 : : return _r;
3531 : : }
3532 : : next_after_fail964:;
3533 : : return NULL_TREE;
3534 : : }
3535 : :
3536 : : tree
3537 : 2 : generic_simplify_453 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3538 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3539 : : {
3540 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3541 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail972;
3542 : 2 : {
3543 : 2 : tree res_op0;
3544 : 2 : {
3545 : 2 : tree _o1[2], _r1;
3546 : 2 : _o1[0] = captures[1];
3547 : 2 : _o1[1] = captures[2];
3548 : 2 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3549 : 2 : res_op0 = _r1;
3550 : : }
3551 : 2 : tree _r;
3552 : 2 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
3553 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 712, __FILE__, __LINE__, true);
3554 : : return _r;
3555 : : }
3556 : 0 : next_after_fail972:;
3557 : 0 : return NULL_TREE;
3558 : : }
3559 : :
3560 : : tree
3561 : 0 : generic_simplify_456 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3562 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3563 : : const enum tree_code ARG_UNUSED (cmp))
3564 : : {
3565 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3566 : 0 : if (!canonicalize_math_p ()
3567 : : )
3568 : : {
3569 : 0 : if (INTEGRAL_TYPE_P (type)
3570 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3571 : : )
3572 : : {
3573 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail975;
3574 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail975;
3575 : 0 : {
3576 : 0 : tree res_op0;
3577 : 0 : res_op0 = captures[0];
3578 : 0 : tree res_op1;
3579 : 0 : res_op1 = captures[3];
3580 : 0 : tree res_op2;
3581 : 0 : res_op2 = build_zero_cst (type);
3582 : 0 : tree _r;
3583 : 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
3584 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 715, __FILE__, __LINE__, true);
3585 : 0 : return _r;
3586 : : }
3587 : : next_after_fail975:;
3588 : : }
3589 : : }
3590 : : return NULL_TREE;
3591 : : }
3592 : :
3593 : : tree
3594 : 0 : generic_simplify_465 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3595 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3596 : : const enum tree_code ARG_UNUSED (code2),
3597 : : const enum tree_code ARG_UNUSED (code1))
3598 : : {
3599 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3600 : 0 : if ((TREE_CODE (captures[2]) == INTEGER_CST
3601 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
3602 : 0 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
3603 : 0 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2]))
3604 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, code2))
3605 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
3606 : 0 : && bitwise_equal_p (captures[2], captures[5]))
3607 : : )
3608 : : {
3609 : 0 : {
3610 : 0 : bool one_before = false;
3611 : 0 : bool one_after = false;
3612 : 0 : int cmp = 0;
3613 : 0 : bool allbits = true;
3614 : 0 : if (TREE_CODE (captures[2]) == INTEGER_CST
3615 : 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
3616 : : {
3617 : 0 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
3618 : 0 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
3619 : 0 : auto t2 = wi::to_wide (captures[5]);
3620 : 0 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
3621 : 0 : if (cmp < 0
3622 : 0 : && t1 == t2 - 1)
3623 : : one_before = true;
3624 : 0 : if (cmp > 0
3625 : 0 : && t1 == t2 + 1)
3626 : : one_after = true;
3627 : : }
3628 : 0 : bool val;
3629 : 0 : switch (code2)
3630 : : {
3631 : 0 : case EQ_EXPR: val = (cmp == 0); break;
3632 : 0 : case NE_EXPR: val = (cmp != 0); break;
3633 : 0 : case LT_EXPR: val = (cmp < 0); break;
3634 : 0 : case GT_EXPR: val = (cmp > 0); break;
3635 : 0 : case LE_EXPR: val = (cmp <= 0); break;
3636 : 0 : case GE_EXPR: val = (cmp >= 0); break;
3637 : 0 : default: gcc_unreachable ();
3638 : : }
3639 : 0 : if (code1 == EQ_EXPR && val
3640 : : )
3641 : : {
3642 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail991;
3643 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail991;
3644 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail991;
3645 : 0 : {
3646 : 0 : tree _r;
3647 : 0 : _r = captures[0];
3648 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 727, __FILE__, __LINE__, true);
3649 : 0 : return _r;
3650 : : }
3651 : : next_after_fail991:;
3652 : : }
3653 : : else
3654 : : {
3655 : 0 : if (code1 == EQ_EXPR && !val
3656 : : )
3657 : : {
3658 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail992;
3659 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail992;
3660 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail992;
3661 : 0 : {
3662 : 0 : tree _r;
3663 : 0 : _r = constant_boolean_node (false, type);
3664 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3665 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3666 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 728, __FILE__, __LINE__, true);
3667 : 0 : return _r;
3668 : : }
3669 : : next_after_fail992:;
3670 : : }
3671 : : else
3672 : : {
3673 : 0 : if (code1 == NE_EXPR && !val && allbits
3674 : : )
3675 : : {
3676 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail993;
3677 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail993;
3678 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail993;
3679 : 0 : {
3680 : 0 : tree _r;
3681 : 0 : _r = captures[3];
3682 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 729, __FILE__, __LINE__, true);
3683 : 0 : return _r;
3684 : : }
3685 : : next_after_fail993:;
3686 : : }
3687 : : else
3688 : : {
3689 : 0 : if ((code1 == NE_EXPR
3690 : 0 : && code2 == GE_EXPR
3691 : 0 : && cmp == 0
3692 : 0 : && allbits)
3693 : 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3694 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
3695 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3696 : : )
3697 : : {
3698 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail994;
3699 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail994;
3700 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail994;
3701 : 0 : {
3702 : 0 : tree res_op0;
3703 : 0 : res_op0 = captures[4];
3704 : 0 : tree res_op1;
3705 : 0 : {
3706 : 0 : tree _o1[1], _r1;
3707 : 0 : _o1[0] = captures[2];
3708 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3709 : : {
3710 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3711 : : }
3712 : : else
3713 : : _r1 = _o1[0];
3714 : 0 : res_op1 = _r1;
3715 : : }
3716 : 0 : tree _r;
3717 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3718 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 730, __FILE__, __LINE__, true);
3719 : 0 : return _r;
3720 : : }
3721 : : next_after_fail994:;
3722 : : }
3723 : : else
3724 : : {
3725 : 0 : if ((code1 == NE_EXPR
3726 : 0 : && code2 == LE_EXPR
3727 : 0 : && cmp == 0
3728 : 0 : && allbits)
3729 : 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3730 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
3731 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3732 : : )
3733 : : {
3734 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail995;
3735 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail995;
3736 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail995;
3737 : 0 : {
3738 : 0 : tree res_op0;
3739 : 0 : res_op0 = captures[4];
3740 : 0 : tree res_op1;
3741 : 0 : {
3742 : 0 : tree _o1[1], _r1;
3743 : 0 : _o1[0] = captures[2];
3744 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3745 : : {
3746 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3747 : : }
3748 : : else
3749 : : _r1 = _o1[0];
3750 : 0 : res_op1 = _r1;
3751 : : }
3752 : 0 : tree _r;
3753 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3754 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 731, __FILE__, __LINE__, true);
3755 : 0 : return _r;
3756 : : }
3757 : : next_after_fail995:;
3758 : : }
3759 : : else
3760 : : {
3761 : 0 : if ((code1 == NE_EXPR
3762 : 0 : && code2 == GT_EXPR
3763 : : && one_after
3764 : 0 : && allbits)
3765 : 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3766 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
3767 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3768 : : )
3769 : : {
3770 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail996;
3771 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail996;
3772 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail996;
3773 : 0 : {
3774 : 0 : tree res_op0;
3775 : 0 : res_op0 = captures[4];
3776 : 0 : tree res_op1;
3777 : 0 : {
3778 : 0 : tree _o1[1], _r1;
3779 : 0 : _o1[0] = captures[2];
3780 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3781 : : {
3782 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3783 : : }
3784 : : else
3785 : : _r1 = _o1[0];
3786 : 0 : res_op1 = _r1;
3787 : : }
3788 : 0 : tree _r;
3789 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3790 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 732, __FILE__, __LINE__, true);
3791 : 0 : return _r;
3792 : : }
3793 : : next_after_fail996:;
3794 : : }
3795 : : else
3796 : : {
3797 : 0 : if ((code1 == NE_EXPR
3798 : 0 : && code2 == LT_EXPR
3799 : : && one_before
3800 : 0 : && allbits)
3801 : 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3802 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
3803 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3804 : : )
3805 : : {
3806 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail997;
3807 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail997;
3808 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail997;
3809 : 0 : {
3810 : 0 : tree res_op0;
3811 : 0 : res_op0 = captures[4];
3812 : 0 : tree res_op1;
3813 : 0 : {
3814 : 0 : tree _o1[1], _r1;
3815 : 0 : _o1[0] = captures[2];
3816 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3817 : : {
3818 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3819 : : }
3820 : : else
3821 : : _r1 = _o1[0];
3822 : 0 : res_op1 = _r1;
3823 : : }
3824 : 0 : tree _r;
3825 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3826 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 733, __FILE__, __LINE__, true);
3827 : 0 : return _r;
3828 : : }
3829 : : next_after_fail997:;
3830 : : }
3831 : : }
3832 : : }
3833 : : }
3834 : : }
3835 : : }
3836 : : }
3837 : : }
3838 : : }
3839 : : return NULL_TREE;
3840 : : }
3841 : :
3842 : : tree
3843 : 145 : generic_simplify_491 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3844 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3845 : : {
3846 : 145 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3847 : 145 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
3848 : 145 : || !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3849 : : )
3850 : : {
3851 : 145 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1054;
3852 : 145 : {
3853 : 145 : tree res_op0;
3854 : 145 : {
3855 : 145 : tree _o1[2], _r1;
3856 : 145 : _o1[0] = captures[0];
3857 : 145 : _o1[1] = build_each_one_cst (TREE_TYPE (captures[0]));
3858 : 145 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3859 : 145 : res_op0 = _r1;
3860 : : }
3861 : 145 : tree _r;
3862 : 145 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3863 : 145 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 755, __FILE__, __LINE__, true);
3864 : 145 : return _r;
3865 : : }
3866 : 0 : next_after_fail1054:;
3867 : : }
3868 : : return NULL_TREE;
3869 : : }
3870 : :
3871 : : tree
3872 : 4 : generic_simplify_494 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3873 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3874 : : {
3875 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3876 : 4 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[2]))
3877 : 7 : && (element_precision (TREE_TYPE (captures[2]))
3878 : 3 : <= element_precision (TREE_TYPE (captures[3]))
3879 : 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[3])))
3880 : : )
3881 : : {
3882 : 3 : {
3883 : 3 : tree shift_type = TREE_TYPE (captures[2]);
3884 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1057;
3885 : 3 : {
3886 : 3 : tree res_op0;
3887 : 3 : {
3888 : 3 : tree _o1[2], _r1;
3889 : 3 : {
3890 : 3 : tree _o2[1], _r2;
3891 : 3 : _o2[0] = captures[3];
3892 : 3 : if (TREE_TYPE (_o2[0]) != shift_type)
3893 : : {
3894 : 1 : _r2 = fold_build1_loc (loc, NOP_EXPR, shift_type, _o2[0]);
3895 : : }
3896 : : else
3897 : : _r2 = _o2[0];
3898 : 3 : _o1[0] = _r2;
3899 : : }
3900 : 3 : _o1[1] = captures[4];
3901 : 3 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3902 : 3 : res_op0 = _r1;
3903 : : }
3904 : 3 : tree _r;
3905 : 3 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3906 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 754, __FILE__, __LINE__, true);
3907 : 3 : return _r;
3908 : : }
3909 : 0 : next_after_fail1057:;
3910 : : }
3911 : : }
3912 : : return NULL_TREE;
3913 : : }
3914 : :
3915 : : tree
3916 : 3980 : generic_simplify_502 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3917 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3918 : : {
3919 : 3980 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3920 : 3980 : if (!TYPE_SATURATING (type)
3921 : : )
3922 : : {
3923 : 3945 : if (!TYPE_OVERFLOW_SANITIZED (type)
3924 : 7912 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
3925 : : )
3926 : : {
3927 : 3967 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1066;
3928 : 3967 : {
3929 : 3967 : tree res_op0;
3930 : 3967 : {
3931 : 3967 : tree _o1[1], _r1;
3932 : 3967 : _o1[0] = captures[0];
3933 : 3967 : if (TREE_TYPE (_o1[0]) != type)
3934 : : {
3935 : 3 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
3936 : : }
3937 : : else
3938 : : _r1 = _o1[0];
3939 : 3967 : res_op0 = _r1;
3940 : : }
3941 : 3967 : tree _r;
3942 : 3967 : _r = non_lvalue_loc (loc, res_op0);
3943 : 3967 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 765, __FILE__, __LINE__, true);
3944 : 3967 : return _r;
3945 : : }
3946 : 0 : next_after_fail1066:;
3947 : : }
3948 : : }
3949 : : return NULL_TREE;
3950 : : }
3951 : :
3952 : : tree
3953 : 0 : generic_simplify_513 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3954 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3955 : : const enum tree_code ARG_UNUSED (minmax),
3956 : : const enum tree_code ARG_UNUSED (cmp))
3957 : : {
3958 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3959 : 0 : {
3960 : 0 : poly_int64 off0, off1;
3961 : 0 : tree base0, base1;
3962 : 0 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[3], base0, base1,
3963 : : off0, off1,
3964 : : 1
3965 : : );
3966 : 0 : if (equal == 1
3967 : : )
3968 : : {
3969 : 0 : if (minmax == MIN_EXPR
3970 : : )
3971 : : {
3972 : 0 : if (known_le (off0, off1)
3973 : : )
3974 : : {
3975 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1084;
3976 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1084;
3977 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1084;
3978 : 0 : {
3979 : 0 : tree _r;
3980 : 0 : _r = captures[0];
3981 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 774, __FILE__, __LINE__, true);
3982 : 0 : return _r;
3983 : : }
3984 : 0 : next_after_fail1084:;
3985 : : }
3986 : : else
3987 : : {
3988 : 0 : if (known_gt (off0, off1)
3989 : : )
3990 : : {
3991 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1085;
3992 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1085;
3993 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1085;
3994 : 0 : {
3995 : 0 : tree _r;
3996 : 0 : _r = captures[2];
3997 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 775, __FILE__, __LINE__, true);
3998 : 0 : return _r;
3999 : : }
4000 : 0 : next_after_fail1085:;
4001 : : }
4002 : : }
4003 : : }
4004 : : else
4005 : : {
4006 : 0 : if (known_ge (off0, off1)
4007 : : )
4008 : : {
4009 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1086;
4010 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1086;
4011 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1086;
4012 : 0 : {
4013 : 0 : tree _r;
4014 : 0 : _r = captures[0];
4015 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 776, __FILE__, __LINE__, true);
4016 : 0 : return _r;
4017 : : }
4018 : 0 : next_after_fail1086:;
4019 : : }
4020 : : else
4021 : : {
4022 : 0 : if (known_lt (off0, off1)
4023 : : )
4024 : : {
4025 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1087;
4026 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1087;
4027 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1087;
4028 : 0 : {
4029 : 0 : tree _r;
4030 : 0 : _r = captures[2];
4031 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 777, __FILE__, __LINE__, true);
4032 : 0 : return _r;
4033 : : }
4034 : 0 : next_after_fail1087:;
4035 : : }
4036 : : }
4037 : : }
4038 : : }
4039 : : }
4040 : 0 : return NULL_TREE;
4041 : : }
4042 : :
4043 : : tree
4044 : 6 : generic_simplify_531 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4045 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
4046 : : {
4047 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4048 : 6 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1111;
4049 : 6 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1111;
4050 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1111;
4051 : 6 : {
4052 : 6 : tree _r;
4053 : 6 : _r = captures[2];
4054 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 576, __FILE__, __LINE__, true);
4055 : : return _r;
4056 : : }
4057 : : next_after_fail1111:;
4058 : : return NULL_TREE;
4059 : : }
4060 : :
4061 : : tree
4062 : 0 : generic_simplify_538 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4063 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
4064 : : const combined_fn ARG_UNUSED (cond_op))
4065 : : {
4066 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4067 : 0 : {
4068 : 0 : tree op_type = TREE_TYPE (captures[6]);
4069 : 0 : if (inverse_conditions_p (captures[0], captures[2])
4070 : 0 : && element_precision (type) == element_precision (op_type)
4071 : : )
4072 : : {
4073 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1118;
4074 : 0 : {
4075 : 0 : tree res_op0;
4076 : 0 : {
4077 : 0 : tree _o1[5], _r1;
4078 : 0 : _o1[0] = captures[2];
4079 : 0 : _o1[1] = captures[3];
4080 : 0 : _o1[2] = captures[4];
4081 : 0 : _o1[3] = captures[5];
4082 : 0 : {
4083 : 0 : tree _o2[1], _r2;
4084 : 0 : _o2[0] = captures[1];
4085 : 0 : if (TREE_TYPE (_o2[0]) != op_type)
4086 : : {
4087 : 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, op_type, _o2[0]);
4088 : : }
4089 : : else
4090 : : _r2 = _o2[0];
4091 : 0 : _o1[4] = _r2;
4092 : : }
4093 : 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]);
4094 : 0 : if (!_r1)
4095 : 0 : goto next_after_fail1118;
4096 : 0 : res_op0 = _r1;
4097 : : }
4098 : 0 : tree _r;
4099 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
4100 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
4101 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4102 : 0 : if (TREE_SIDE_EFFECTS (captures[6]))
4103 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[6]), _r);
4104 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 799, __FILE__, __LINE__, true);
4105 : 0 : return _r;
4106 : : }
4107 : : next_after_fail1118:;
4108 : : }
4109 : : }
4110 : : return NULL_TREE;
4111 : : }
4112 : :
4113 : : tree
4114 : 0 : generic_simplify_549 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4115 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
4116 : : const combined_fn ARG_UNUSED (ovf))
4117 : : {
4118 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4119 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
4120 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4121 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[1])) > TYPE_PRECISION (TREE_TYPE (captures[2]))
4122 : 0 : && (!TYPE_UNSIGNED (TREE_TYPE (captures[1])) || TYPE_UNSIGNED (TREE_TYPE (captures[2])))
4123 : : )
4124 : : {
4125 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1129;
4126 : 0 : {
4127 : 0 : tree res_op0;
4128 : 0 : res_op0 = captures[0];
4129 : 0 : tree res_op1;
4130 : 0 : res_op1 = captures[2];
4131 : 0 : tree _r;
4132 : 0 : _r = maybe_build_call_expr_loc (loc, ovf, type, 2, res_op0, res_op1);
4133 : 0 : if (!_r)
4134 : 0 : goto next_after_fail1129;
4135 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 810, __FILE__, __LINE__, true);
4136 : 0 : return _r;
4137 : : }
4138 : : next_after_fail1129:;
4139 : : }
4140 : : return NULL_TREE;
4141 : : }
4142 : :
4143 : : tree
4144 : 0 : generic_simplify_559 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4145 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4146 : : const combined_fn ARG_UNUSED (froms),
4147 : : const combined_fn ARG_UNUSED (tos))
4148 : : {
4149 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4150 : 0 : if (optimize && canonicalize_math_p ()
4151 : : )
4152 : : {
4153 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1139;
4154 : 0 : {
4155 : 0 : tree res_op0;
4156 : 0 : {
4157 : 0 : tree _o1[1], _r1;
4158 : 0 : _o1[0] = captures[0];
4159 : 0 : _r1 = maybe_build_call_expr_loc (loc, tos, TREE_TYPE (_o1[0]), 1, _o1[0]);
4160 : 0 : if (!_r1)
4161 : 0 : goto next_after_fail1139;
4162 : 0 : res_op0 = _r1;
4163 : : }
4164 : 0 : tree _r;
4165 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4166 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 820, __FILE__, __LINE__, true);
4167 : 0 : return _r;
4168 : : }
4169 : : next_after_fail1139:;
4170 : : }
4171 : : return NULL_TREE;
4172 : : }
4173 : :
4174 : : tree
4175 : 0 : generic_simplify_569 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4176 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4177 : : const combined_fn ARG_UNUSED (rints))
4178 : : {
4179 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4180 : 0 : if (canonicalize_math_p ()
4181 : : )
4182 : : {
4183 : 0 : if (!flag_errno_math
4184 : : )
4185 : : {
4186 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1149;
4187 : 0 : {
4188 : 0 : tree res_op0;
4189 : 0 : res_op0 = captures[0];
4190 : 0 : tree _r;
4191 : 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
4192 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 830, __FILE__, __LINE__, true);
4193 : 0 : return _r;
4194 : : }
4195 : 0 : next_after_fail1149:;
4196 : : }
4197 : : }
4198 : : return NULL_TREE;
4199 : : }
4200 : :
4201 : : tree
4202 : 0 : generic_simplify_576 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4203 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
4204 : : {
4205 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4206 : 0 : if (canonicalize_math_after_vectorization_p ()
4207 : : )
4208 : : {
4209 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1156;
4210 : : {
4211 : : tree res_op0;
4212 : : res_op0 = captures[0];
4213 : : tree res_op1;
4214 : : res_op1 = captures[1];
4215 : : tree res_op2;
4216 : : res_op2 = captures[2];
4217 : : tree _r;
4218 : : _r = maybe_build_call_expr_loc (loc, CFN_FNMA, type, 3, res_op0, res_op1, res_op2);
4219 : : if (!_r)
4220 : : goto next_after_fail1156;
4221 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 837, __FILE__, __LINE__, true);
4222 : : return _r;
4223 : : }
4224 : 0 : next_after_fail1156:;
4225 : : }
4226 : 0 : return NULL_TREE;
4227 : : }
4228 : :
4229 : : tree
4230 : 0 : generic_simplify_586 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4231 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4232 : : const enum tree_code ARG_UNUSED (rot),
4233 : : const combined_fn ARG_UNUSED (popcount))
4234 : : {
4235 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4236 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4237 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4238 : 0 : && (
4239 : :
4240 : 0 : || !TREE_SIDE_EFFECTS (captures[3]))
4241 : : )
4242 : : {
4243 : 0 : {
4244 : 0 : tree type0 = TREE_TYPE (captures[0]);
4245 : 0 : tree type1 = TREE_TYPE (captures[1]);
4246 : 0 : unsigned int prec0 = TYPE_PRECISION (type0);
4247 : 0 : unsigned int prec1 = TYPE_PRECISION (type1);
4248 : 0 : if (prec0 == prec1 || (prec0 > prec1 && TYPE_UNSIGNED (type1))
4249 : : )
4250 : : {
4251 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1166;
4252 : 0 : {
4253 : 0 : tree res_op0;
4254 : 0 : {
4255 : 0 : tree _o1[1], _r1;
4256 : 0 : _o1[0] = captures[2];
4257 : 0 : if (TREE_TYPE (_o1[0]) != type0)
4258 : : {
4259 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type0, _o1[0]);
4260 : : }
4261 : : else
4262 : : _r1 = _o1[0];
4263 : 0 : res_op0 = _r1;
4264 : : }
4265 : 0 : tree _r;
4266 : 0 : _r = maybe_build_call_expr_loc (loc, popcount, type, 1, res_op0);
4267 : 0 : if (!_r)
4268 : 0 : goto next_after_fail1166;
4269 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4270 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4271 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 844, __FILE__, __LINE__, true);
4272 : 0 : return _r;
4273 : : }
4274 : : next_after_fail1166:;
4275 : : }
4276 : : }
4277 : : }
4278 : : return NULL_TREE;
4279 : : }
4280 : :
4281 : : tree
4282 : 0 : generic_simplify_597 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4283 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
4284 : : const enum tree_code ARG_UNUSED (plusminus),
4285 : : const enum tree_code ARG_UNUSED (minusplus))
4286 : : {
4287 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4288 : 0 : if (!VECTOR_INTEGER_TYPE_P (type)
4289 : : && !FLOAT_WORDS_BIG_ENDIAN
4290 : 0 : && (operand_equal_p (captures[0], captures[2], 0)
4291 : 0 : ? operand_equal_p (captures[1], captures[3], 0)
4292 : 0 : : operand_equal_p (captures[0], captures[3], 0) && operand_equal_p (captures[1], captures[2], 0))
4293 : : )
4294 : : {
4295 : 0 : {
4296 : 0 : vec_perm_builder builder;
4297 : 0 : if (tree_to_vec_perm_builder (&builder, captures[4])
4298 : : )
4299 : : {
4300 : 0 : {
4301 : 0 : poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (type);
4302 : 0 : vec_perm_indices sel (builder, 2, nelts);
4303 : 0 : machine_mode vec_mode = TYPE_MODE (type);
4304 : 0 : machine_mode wide_mode;
4305 : 0 : scalar_mode wide_elt_mode;
4306 : 0 : poly_uint64 wide_nunits;
4307 : 0 : scalar_mode inner_mode = GET_MODE_INNER (vec_mode);
4308 : 0 : if (VECTOR_MODE_P (vec_mode)
4309 : 0 : && sel.series_p (0, 2, 0, 2)
4310 : 0 : && sel.series_p (1, 2, nelts + 1, 2)
4311 : 0 : && GET_MODE_2XWIDER_MODE (inner_mode).exists (&wide_elt_mode)
4312 : 0 : && multiple_p (GET_MODE_NUNITS (vec_mode), 2, &wide_nunits)
4313 : 0 : && related_vector_mode (vec_mode, wide_elt_mode,
4314 : 0 : wide_nunits).exists (&wide_mode)
4315 : : )
4316 : : {
4317 : 0 : {
4318 : 0 : tree stype
4319 : 0 : = lang_hooks.types.type_for_mode (GET_MODE_INNER (wide_mode),
4320 : 0 : TYPE_UNSIGNED (type));
4321 : 0 : tree ntype = build_vector_type_for_mode (stype, wide_mode);
4322 : 0 : const struct real_format *fmt_old = FLOAT_MODE_FORMAT (vec_mode);
4323 : 0 : const struct real_format *fmt_new = FLOAT_MODE_FORMAT (wide_mode);
4324 : 0 : if (TYPE_MODE (stype) != BLKmode
4325 : 0 : && VECTOR_TYPE_P (ntype)
4326 : 0 : && fmt_old != NULL
4327 : 0 : && fmt_new != NULL
4328 : : )
4329 : : {
4330 : 0 : {
4331 : 0 : if (known_eq (GET_MODE_NUNITS (wide_mode), 1)
4332 : 0 : && !target_supports_op_p (ntype, NEGATE_EXPR, optab_vector))
4333 : : ntype = stype;
4334 : 0 : if (fmt_new->signbit_rw
4335 : 0 : == fmt_old->signbit_rw + GET_MODE_UNIT_BITSIZE (vec_mode)
4336 : 0 : && fmt_new->signbit_rw == fmt_new->signbit_ro
4337 : 0 : && targetm.can_change_mode_class (TYPE_MODE (ntype),
4338 : 0 : TYPE_MODE (type), ALL_REGS)
4339 : 0 : && ((optimize_vectors_before_lowering_p ()
4340 : 0 : && VECTOR_TYPE_P (ntype))
4341 : 0 : || target_supports_op_p (ntype, NEGATE_EXPR, optab_vector))
4342 : : )
4343 : : {
4344 : 0 : if (plusminus == PLUS_EXPR
4345 : : )
4346 : : {
4347 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1178;
4348 : 0 : {
4349 : 0 : tree res_op0;
4350 : 0 : {
4351 : 0 : tree _o1[1], _r1;
4352 : 0 : {
4353 : 0 : tree _o2[1], _r2;
4354 : 0 : {
4355 : 0 : tree _o3[1], _r3;
4356 : 0 : _o3[0] = captures[3];
4357 : 0 : if (TREE_TYPE (_o3[0]) != ntype)
4358 : : {
4359 : 0 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, ntype, _o3[0]);
4360 : : }
4361 : : else
4362 : : _r3 = _o3[0];
4363 : 0 : _o2[0] = _r3;
4364 : : }
4365 : 0 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
4366 : 0 : _o1[0] = _r2;
4367 : : }
4368 : 0 : if (TREE_TYPE (_o1[0]) != type)
4369 : : {
4370 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
4371 : : }
4372 : : else
4373 : : _r1 = _o1[0];
4374 : 0 : res_op0 = _r1;
4375 : : }
4376 : 0 : tree res_op1;
4377 : 0 : res_op1 = captures[2];
4378 : 0 : tree _r;
4379 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
4380 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
4381 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4382 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
4383 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4384 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
4385 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
4386 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 852, __FILE__, __LINE__, true);
4387 : 0 : return _r;
4388 : : }
4389 : 0 : next_after_fail1178:;
4390 : : }
4391 : : else
4392 : : {
4393 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1179;
4394 : 0 : {
4395 : 0 : tree res_op0;
4396 : 0 : res_op0 = captures[0];
4397 : 0 : tree res_op1;
4398 : 0 : {
4399 : 0 : tree _o1[1], _r1;
4400 : 0 : {
4401 : 0 : tree _o2[1], _r2;
4402 : 0 : {
4403 : 0 : tree _o3[1], _r3;
4404 : 0 : _o3[0] = captures[1];
4405 : 0 : if (TREE_TYPE (_o3[0]) != ntype)
4406 : : {
4407 : 0 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, ntype, _o3[0]);
4408 : : }
4409 : : else
4410 : : _r3 = _o3[0];
4411 : 0 : _o2[0] = _r3;
4412 : : }
4413 : 0 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
4414 : 0 : _o1[0] = _r2;
4415 : : }
4416 : 0 : if (TREE_TYPE (_o1[0]) != type)
4417 : : {
4418 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
4419 : : }
4420 : : else
4421 : : _r1 = _o1[0];
4422 : 0 : res_op1 = _r1;
4423 : : }
4424 : 0 : tree _r;
4425 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
4426 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
4427 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
4428 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4429 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4430 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
4431 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
4432 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 853, __FILE__, __LINE__, true);
4433 : 0 : return _r;
4434 : : }
4435 : 0 : next_after_fail1179:;
4436 : : }
4437 : : }
4438 : : }
4439 : : }
4440 : : }
4441 : : }
4442 : 0 : }
4443 : : }
4444 : 0 : }
4445 : : }
4446 : : return NULL_TREE;
4447 : : }
4448 : :
4449 : : tree
4450 : 1330 : generic_simplify_CONJ_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
4451 : : {
4452 : 1330 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4453 : 1330 : switch (TREE_CODE (_p0))
4454 : : {
4455 : 0 : CASE_CONVERT:
4456 : 0 : {
4457 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4458 : 0 : switch (TREE_CODE (_q20))
4459 : : {
4460 : 0 : case CONJ_EXPR:
4461 : 0 : {
4462 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4463 : 0 : {
4464 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4465 : 0 : tree res = generic_simplify_526 (loc, type, _p0, captures);
4466 : 0 : if (res) return res;
4467 : : }
4468 : 0 : break;
4469 : : }
4470 : 0 : case COMPLEX_EXPR:
4471 : 0 : {
4472 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4473 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
4474 : 0 : {
4475 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
4476 : 0 : {
4477 : 0 : tree itype = TREE_TYPE (type);
4478 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1298;
4479 : 0 : {
4480 : 0 : tree res_op0;
4481 : 0 : {
4482 : 0 : tree _o1[1], _r1;
4483 : 0 : _o1[0] = captures[2];
4484 : 0 : if (TREE_TYPE (_o1[0]) != itype)
4485 : : {
4486 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, itype, _o1[0]);
4487 : : }
4488 : : else
4489 : : _r1 = _o1[0];
4490 : 0 : res_op0 = _r1;
4491 : : }
4492 : 0 : tree res_op1;
4493 : 0 : {
4494 : 0 : tree _o1[1], _r1;
4495 : 0 : {
4496 : 0 : tree _o2[1], _r2;
4497 : 0 : _o2[0] = captures[3];
4498 : 0 : if (TREE_TYPE (_o2[0]) != itype)
4499 : : {
4500 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, itype, _o2[0]);
4501 : : }
4502 : : else
4503 : : _r2 = _o2[0];
4504 : 0 : _o1[0] = _r2;
4505 : : }
4506 : 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4507 : 0 : res_op1 = _r1;
4508 : : }
4509 : 0 : tree _r;
4510 : 0 : _r = fold_build2_loc (loc, COMPLEX_EXPR, type, res_op0, res_op1);
4511 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 911, __FILE__, __LINE__, true);
4512 : 0 : return _r;
4513 : : }
4514 : 0 : next_after_fail1298:;
4515 : : }
4516 : : }
4517 : 0 : break;
4518 : : }
4519 : : default:;
4520 : : }
4521 : : break;
4522 : : }
4523 : 1 : case CONJ_EXPR:
4524 : 1 : {
4525 : 1 : tree _q20 = TREE_OPERAND (_p0, 0);
4526 : 1 : {
4527 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4528 : 1 : tree res = generic_simplify_526 (loc, type, _p0, captures);
4529 : 1 : if (res) return res;
4530 : : }
4531 : 0 : break;
4532 : : }
4533 : 12 : case COMPLEX_EXPR:
4534 : 12 : {
4535 : 12 : tree _q20 = TREE_OPERAND (_p0, 0);
4536 : 12 : tree _q21 = TREE_OPERAND (_p0, 1);
4537 : 12 : {
4538 : 12 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
4539 : 12 : {
4540 : 12 : tree itype = TREE_TYPE (type);
4541 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1299;
4542 : 12 : {
4543 : 12 : tree res_op0;
4544 : 12 : {
4545 : 12 : tree _o1[1], _r1;
4546 : 12 : _o1[0] = captures[2];
4547 : 12 : if (TREE_TYPE (_o1[0]) != itype)
4548 : : {
4549 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, itype, _o1[0]);
4550 : : }
4551 : : else
4552 : : _r1 = _o1[0];
4553 : 12 : res_op0 = _r1;
4554 : : }
4555 : 12 : tree res_op1;
4556 : 12 : {
4557 : 12 : tree _o1[1], _r1;
4558 : 12 : {
4559 : 12 : tree _o2[1], _r2;
4560 : 12 : _o2[0] = captures[3];
4561 : 12 : if (TREE_TYPE (_o2[0]) != itype)
4562 : : {
4563 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, itype, _o2[0]);
4564 : : }
4565 : : else
4566 : : _r2 = _o2[0];
4567 : 12 : _o1[0] = _r2;
4568 : : }
4569 : 12 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4570 : 12 : res_op1 = _r1;
4571 : : }
4572 : 12 : tree _r;
4573 : 12 : _r = fold_build2_loc (loc, COMPLEX_EXPR, type, res_op0, res_op1);
4574 : 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 911, __FILE__, __LINE__, true);
4575 : 12 : return _r;
4576 : : }
4577 : 0 : next_after_fail1299:;
4578 : : }
4579 : : }
4580 : 0 : break;
4581 : : }
4582 : : default:;
4583 : : }
4584 : : return NULL_TREE;
4585 : : }
4586 : :
4587 : : tree
4588 : 32277695 : generic_simplify_MINUS_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
4589 : : {
4590 : 32277695 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4591 : 32277695 : if (integer_zerop (_p1))
4592 : : {
4593 : 2081241 : {
4594 : 2081241 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4595 : 2081241 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1329;
4596 : 2081241 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1329;
4597 : 2081241 : {
4598 : 2081241 : tree res_op0;
4599 : 2081241 : res_op0 = captures[0];
4600 : 2081241 : tree _r;
4601 : 2081241 : _r = non_lvalue_loc (loc, res_op0);
4602 : 2081241 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 912, __FILE__, __LINE__, true);
4603 : 2081241 : return _r;
4604 : : }
4605 : : next_after_fail1329:;
4606 : : }
4607 : : }
4608 : 30196454 : if (real_zerop (_p1))
4609 : : {
4610 : 1140 : {
4611 : 1140 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4612 : 1140 : if (fold_real_zero_addition_p (type, captures[0], captures[1], 1)
4613 : : )
4614 : : {
4615 : 752 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1330;
4616 : 752 : {
4617 : 752 : tree res_op0;
4618 : 752 : res_op0 = captures[0];
4619 : 752 : tree _r;
4620 : 752 : _r = non_lvalue_loc (loc, res_op0);
4621 : 752 : if (TREE_SIDE_EFFECTS (captures[1]))
4622 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4623 : 752 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 932, __FILE__, __LINE__, true);
4624 : 752 : return _r;
4625 : : }
4626 : 0 : next_after_fail1330:;
4627 : : }
4628 : : }
4629 : : }
4630 : 30195702 : switch (TREE_CODE (_p0))
4631 : : {
4632 : 2223665 : case PLUS_EXPR:
4633 : 2223665 : {
4634 : 2223665 : tree _q20 = TREE_OPERAND (_p0, 0);
4635 : 2223665 : tree _q21 = TREE_OPERAND (_p0, 1);
4636 : 2223665 : switch (TREE_CODE (_q21))
4637 : : {
4638 : 160619 : case REAL_CST:
4639 : 160619 : {
4640 : 160619 : switch (TREE_CODE (_p1))
4641 : : {
4642 : 11 : case REAL_CST:
4643 : 11 : {
4644 : 11 : {
4645 : 11 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4646 : 11 : tree res = generic_simplify_4 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR);
4647 : 11 : if (res) return res;
4648 : : }
4649 : 8 : break;
4650 : : }
4651 : : default:;
4652 : : }
4653 : : break;
4654 : : }
4655 : : default:;
4656 : : }
4657 : : break;
4658 : : }
4659 : 1154944 : case MINUS_EXPR:
4660 : 1154944 : {
4661 : 1154944 : tree _q20 = TREE_OPERAND (_p0, 0);
4662 : 1154944 : tree _q21 = TREE_OPERAND (_p0, 1);
4663 : 1154944 : switch (TREE_CODE (_q21))
4664 : : {
4665 : 100914 : case REAL_CST:
4666 : 100914 : {
4667 : 100914 : switch (TREE_CODE (_p1))
4668 : : {
4669 : 40 : case REAL_CST:
4670 : 40 : {
4671 : 40 : {
4672 : 40 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4673 : 40 : tree res = generic_simplify_4 (loc, type, _p0, _p1, captures, MINUS_EXPR, MINUS_EXPR);
4674 : 40 : if (res) return res;
4675 : : }
4676 : 38 : break;
4677 : : }
4678 : : default:;
4679 : : }
4680 : : break;
4681 : : }
4682 : : default:;
4683 : : }
4684 : : break;
4685 : : }
4686 : 30195697 : default:;
4687 : : }
4688 : 30195697 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
4689 : : {
4690 : 176982 : {
4691 : 176982 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4692 : 176231 : if (!FLOAT_TYPE_P (type)
4693 : 176983 : || (!tree_expr_maybe_nan_p (captures[0])
4694 : 107 : && !tree_expr_maybe_infinite_p (captures[0])
4695 : 15 : && (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
4696 : 1 : || !HONOR_SIGNED_ZEROS (type)))
4697 : : )
4698 : : {
4699 : 176244 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1331;
4700 : 176244 : {
4701 : 176244 : tree _r;
4702 : 176244 : _r = build_zero_cst (type);
4703 : 176244 : if (TREE_SIDE_EFFECTS (captures[0]))
4704 : 36 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4705 : 176244 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 933, __FILE__, __LINE__, true);
4706 : 176244 : return _r;
4707 : : }
4708 : 0 : next_after_fail1331:;
4709 : : }
4710 : : }
4711 : : }
4712 : 30019453 : switch (TREE_CODE (_p0))
4713 : : {
4714 : 8122875 : CASE_CONVERT:
4715 : 8122875 : {
4716 : 8122875 : tree _q20 = TREE_OPERAND (_p0, 0);
4717 : 8122875 : switch (TREE_CODE (_p1))
4718 : : {
4719 : 3993405 : CASE_CONVERT:
4720 : 3993405 : {
4721 : 3993405 : tree _q40 = TREE_OPERAND (_p1, 0);
4722 : 3993405 : switch (TREE_CODE (_q40))
4723 : : {
4724 : 103275 : case MULT_EXPR:
4725 : 103275 : {
4726 : 103275 : tree _q50 = TREE_OPERAND (_q40, 0);
4727 : 103275 : tree _q51 = TREE_OPERAND (_q40, 1);
4728 : 103275 : switch (TREE_CODE (_q50))
4729 : : {
4730 : 21 : case TRUNC_DIV_EXPR:
4731 : 21 : {
4732 : 21 : tree _q60 = TREE_OPERAND (_q50, 0);
4733 : 21 : tree _q61 = TREE_OPERAND (_q50, 1);
4734 : 21 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
4735 : : {
4736 : 21 : if ((_q51 == _q61 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q61, 0))
4737 : : {
4738 : 21 : {
4739 : 21 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q61 };
4740 : 21 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4741 : 21 : if (res) return res;
4742 : : }
4743 : : }
4744 : : }
4745 : : break;
4746 : : }
4747 : 103254 : default:;
4748 : : }
4749 : 103254 : switch (TREE_CODE (_q51))
4750 : : {
4751 : 0 : case TRUNC_DIV_EXPR:
4752 : 0 : {
4753 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4754 : 0 : tree _q71 = TREE_OPERAND (_q51, 1);
4755 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q20, 0))
4756 : : {
4757 : 0 : if ((_q71 == _q50 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q50, 0))
4758 : : {
4759 : 0 : {
4760 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q70, _q71, _q20, _q50 };
4761 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4762 : 0 : if (res) return res;
4763 : : }
4764 : : }
4765 : : }
4766 : : break;
4767 : : }
4768 : : default:;
4769 : : }
4770 : : break;
4771 : : }
4772 : : default:;
4773 : : }
4774 : : break;
4775 : : }
4776 : 152378 : case MULT_EXPR:
4777 : 152378 : {
4778 : 152378 : tree _q40 = TREE_OPERAND (_p1, 0);
4779 : 152378 : tree _q41 = TREE_OPERAND (_p1, 1);
4780 : 152378 : switch (TREE_CODE (_q40))
4781 : : {
4782 : 1848 : case TRUNC_DIV_EXPR:
4783 : 1848 : {
4784 : 1848 : tree _q50 = TREE_OPERAND (_q40, 0);
4785 : 1848 : tree _q51 = TREE_OPERAND (_q40, 1);
4786 : 1848 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
4787 : : {
4788 : 14 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
4789 : : {
4790 : 14 : {
4791 : 14 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _q20, _q51 };
4792 : 14 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4793 : 14 : if (res) return res;
4794 : : }
4795 : : }
4796 : : }
4797 : : break;
4798 : : }
4799 : 152364 : default:;
4800 : : }
4801 : 152364 : switch (TREE_CODE (_q41))
4802 : : {
4803 : 0 : case TRUNC_DIV_EXPR:
4804 : 0 : {
4805 : 0 : tree _q60 = TREE_OPERAND (_q41, 0);
4806 : 0 : tree _q61 = TREE_OPERAND (_q41, 1);
4807 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
4808 : : {
4809 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
4810 : : {
4811 : 0 : {
4812 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q40 };
4813 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4814 : 0 : if (res) return res;
4815 : : }
4816 : : }
4817 : : }
4818 : : break;
4819 : : }
4820 : : default:;
4821 : : }
4822 : : break;
4823 : : }
4824 : : default:;
4825 : : }
4826 : : break;
4827 : : }
4828 : 30019418 : default:;
4829 : : }
4830 : 30019418 : switch (TREE_CODE (_p1))
4831 : : {
4832 : 7173019 : CASE_CONVERT:
4833 : 7173019 : {
4834 : 7173019 : tree _q30 = TREE_OPERAND (_p1, 0);
4835 : 7173019 : switch (TREE_CODE (_q30))
4836 : : {
4837 : 138605 : case MULT_EXPR:
4838 : 138605 : {
4839 : 138605 : tree _q40 = TREE_OPERAND (_q30, 0);
4840 : 138605 : tree _q41 = TREE_OPERAND (_q30, 1);
4841 : 138605 : switch (TREE_CODE (_q40))
4842 : : {
4843 : 12 : case TRUNC_DIV_EXPR:
4844 : 12 : {
4845 : 12 : tree _q50 = TREE_OPERAND (_q40, 0);
4846 : 12 : tree _q51 = TREE_OPERAND (_q40, 1);
4847 : 12 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
4848 : : {
4849 : 2 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
4850 : : {
4851 : 2 : {
4852 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q51 };
4853 : 2 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4854 : 2 : if (res) return res;
4855 : : }
4856 : : }
4857 : : }
4858 : : break;
4859 : : }
4860 : 138603 : default:;
4861 : : }
4862 : 138603 : switch (TREE_CODE (_q41))
4863 : : {
4864 : 0 : case TRUNC_DIV_EXPR:
4865 : 0 : {
4866 : 0 : tree _q60 = TREE_OPERAND (_q41, 0);
4867 : 0 : tree _q61 = TREE_OPERAND (_q41, 1);
4868 : 0 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _p0, 0))
4869 : : {
4870 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
4871 : : {
4872 : 0 : {
4873 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _p0, _q40 };
4874 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4875 : 0 : if (res) return res;
4876 : : }
4877 : : }
4878 : : }
4879 : : break;
4880 : : }
4881 : : default:;
4882 : : }
4883 : : break;
4884 : : }
4885 : : default:;
4886 : : }
4887 : : break;
4888 : : }
4889 : 2118274 : case MULT_EXPR:
4890 : 2118274 : {
4891 : 2118274 : tree _q30 = TREE_OPERAND (_p1, 0);
4892 : 2118274 : tree _q31 = TREE_OPERAND (_p1, 1);
4893 : 2118274 : switch (TREE_CODE (_q30))
4894 : : {
4895 : 2233 : case TRUNC_DIV_EXPR:
4896 : 2233 : {
4897 : 2233 : tree _q40 = TREE_OPERAND (_q30, 0);
4898 : 2233 : tree _q41 = TREE_OPERAND (_q30, 1);
4899 : 2233 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
4900 : : {
4901 : 47 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _q41, 0))
4902 : : {
4903 : 47 : {
4904 : 47 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _p0, _q41 };
4905 : 47 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4906 : 47 : if (res) return res;
4907 : : }
4908 : : }
4909 : : }
4910 : : break;
4911 : : }
4912 : 2118227 : default:;
4913 : : }
4914 : 2118227 : switch (TREE_CODE (_q31))
4915 : : {
4916 : 0 : case TRUNC_DIV_EXPR:
4917 : 0 : {
4918 : 0 : tree _q50 = TREE_OPERAND (_q31, 0);
4919 : 0 : tree _q51 = TREE_OPERAND (_q31, 1);
4920 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
4921 : : {
4922 : 0 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q30, 0))
4923 : : {
4924 : 0 : {
4925 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q30 };
4926 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4927 : 0 : if (res) return res;
4928 : : }
4929 : : }
4930 : : }
4931 : : break;
4932 : : }
4933 : : default:;
4934 : : }
4935 : : break;
4936 : : }
4937 : 30019369 : default:;
4938 : : }
4939 : 30019369 : switch (TREE_CODE (_p0))
4940 : : {
4941 : 1892256 : case MULT_EXPR:
4942 : 1892256 : {
4943 : 1892256 : tree _q20 = TREE_OPERAND (_p0, 0);
4944 : 1892256 : tree _q21 = TREE_OPERAND (_p0, 1);
4945 : 1892256 : switch (TREE_CODE (_q21))
4946 : : {
4947 : 599 : case PLUS_EXPR:
4948 : 599 : {
4949 : 599 : tree _q40 = TREE_OPERAND (_q21, 0);
4950 : 599 : tree _q41 = TREE_OPERAND (_q21, 1);
4951 : 599 : switch (TREE_CODE (_q40))
4952 : : {
4953 : 0 : case TRUNC_DIV_EXPR:
4954 : 0 : {
4955 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
4956 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
4957 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4958 : : {
4959 : 0 : if (integer_onep (_q41))
4960 : : {
4961 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
4962 : : {
4963 : 0 : {
4964 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q40, _q50 };
4965 : 0 : tree res = generic_simplify_41 (loc, type, _p0, _p1, captures);
4966 : 0 : if (res) return res;
4967 : : }
4968 : : }
4969 : : }
4970 : : }
4971 : : break;
4972 : : }
4973 : : default:;
4974 : : }
4975 : : break;
4976 : : }
4977 : 1892256 : default:;
4978 : : }
4979 : 1892256 : switch (TREE_CODE (_q20))
4980 : : {
4981 : 103466 : case PLUS_EXPR:
4982 : 103466 : {
4983 : 103466 : tree _q30 = TREE_OPERAND (_q20, 0);
4984 : 103466 : tree _q31 = TREE_OPERAND (_q20, 1);
4985 : 103466 : switch (TREE_CODE (_q30))
4986 : : {
4987 : 1 : case TRUNC_DIV_EXPR:
4988 : 1 : {
4989 : 1 : tree _q40 = TREE_OPERAND (_q30, 0);
4990 : 1 : tree _q41 = TREE_OPERAND (_q30, 1);
4991 : 1 : if (integer_onep (_q31))
4992 : : {
4993 : 1 : if ((_q21 == _q41 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q41, 0) && types_match (_q21, _q41)))
4994 : : {
4995 : 1 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
4996 : : {
4997 : 1 : {
4998 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q20, _q30, _q40 };
4999 : 1 : tree res = generic_simplify_41 (loc, type, _p0, _p1, captures);
5000 : 1 : if (res) return res;
5001 : : }
5002 : : }
5003 : : }
5004 : : }
5005 : : break;
5006 : : }
5007 : : default:;
5008 : : }
5009 : : break;
5010 : : }
5011 : : default:;
5012 : : }
5013 : : break;
5014 : : }
5015 : 1262 : case LSHIFT_EXPR:
5016 : 1262 : {
5017 : 1262 : tree _q20 = TREE_OPERAND (_p0, 0);
5018 : 1262 : tree _q21 = TREE_OPERAND (_p0, 1);
5019 : 1262 : switch (TREE_CODE (_p1))
5020 : : {
5021 : 0 : case LSHIFT_EXPR:
5022 : 0 : {
5023 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5024 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5025 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5026 : : {
5027 : 0 : {
5028 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
5029 : 0 : tree res = generic_simplify_6 (loc, type, _p0, _p1, captures, MINUS_EXPR);
5030 : 0 : if (res) return res;
5031 : : }
5032 : : }
5033 : : break;
5034 : : }
5035 : : default:;
5036 : : }
5037 : : break;
5038 : : }
5039 : 1181 : case BIT_AND_EXPR:
5040 : 1181 : {
5041 : 1181 : tree _q20 = TREE_OPERAND (_p0, 0);
5042 : 1181 : tree _q21 = TREE_OPERAND (_p0, 1);
5043 : 1181 : switch (TREE_CODE (_q21))
5044 : : {
5045 : 0 : case BIT_NOT_EXPR:
5046 : 0 : {
5047 : 0 : tree _q40 = TREE_OPERAND (_q21, 0);
5048 : 0 : switch (TREE_CODE (_p1))
5049 : : {
5050 : 0 : case BIT_AND_EXPR:
5051 : 0 : {
5052 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5053 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
5054 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5055 : : {
5056 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q40, 0) && types_match (_q61, _q40)))
5057 : : {
5058 : 0 : {
5059 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
5060 : 0 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
5061 : 0 : if (res) return res;
5062 : : }
5063 : : }
5064 : : }
5065 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
5066 : : {
5067 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
5068 : : {
5069 : 0 : {
5070 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
5071 : 0 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
5072 : 0 : if (res) return res;
5073 : : }
5074 : : }
5075 : : }
5076 : : break;
5077 : : }
5078 : : default:;
5079 : : }
5080 : : break;
5081 : : }
5082 : 1181 : default:;
5083 : : }
5084 : 1181 : switch (TREE_CODE (_q20))
5085 : : {
5086 : 27 : case BIT_NOT_EXPR:
5087 : 27 : {
5088 : 27 : tree _q30 = TREE_OPERAND (_q20, 0);
5089 : 27 : switch (TREE_CODE (_p1))
5090 : : {
5091 : 21 : case BIT_AND_EXPR:
5092 : 21 : {
5093 : 21 : tree _q60 = TREE_OPERAND (_p1, 0);
5094 : 21 : tree _q61 = TREE_OPERAND (_p1, 1);
5095 : 21 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
5096 : : {
5097 : 0 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
5098 : : {
5099 : 0 : {
5100 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
5101 : 0 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
5102 : 0 : if (res) return res;
5103 : : }
5104 : : }
5105 : : }
5106 : 21 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
5107 : : {
5108 : 21 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
5109 : : {
5110 : 21 : {
5111 : 21 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
5112 : 21 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
5113 : 21 : if (res) return res;
5114 : : }
5115 : : }
5116 : : }
5117 : : break;
5118 : : }
5119 : : default:;
5120 : : }
5121 : : break;
5122 : : }
5123 : 1160 : default:;
5124 : : }
5125 : 1160 : switch (TREE_CODE (_q21))
5126 : : {
5127 : 1120 : case INTEGER_CST:
5128 : 1120 : {
5129 : 1120 : switch (TREE_CODE (_p1))
5130 : : {
5131 : 22 : case BIT_AND_EXPR:
5132 : 22 : {
5133 : 22 : tree _q50 = TREE_OPERAND (_p1, 0);
5134 : 22 : tree _q51 = TREE_OPERAND (_p1, 1);
5135 : 22 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5136 : : {
5137 : 0 : switch (TREE_CODE (_q51))
5138 : : {
5139 : 0 : case INTEGER_CST:
5140 : 0 : {
5141 : 0 : {
5142 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
5143 : 0 : if (~wi::to_wide (captures[2]) == wi::to_wide (captures[4])
5144 : : )
5145 : : {
5146 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1332;
5147 : 0 : {
5148 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1332;
5149 : 0 : tree res_op0;
5150 : 0 : {
5151 : 0 : tree _o1[2], _r1;
5152 : 0 : _o1[0] = captures[1];
5153 : 0 : _o1[1] = unshare_expr (captures[4]);
5154 : 0 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5155 : 0 : res_op0 = _r1;
5156 : : }
5157 : 0 : tree res_op1;
5158 : 0 : res_op1 = captures[4];
5159 : 0 : tree _r;
5160 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5161 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
5162 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
5163 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 934, __FILE__, __LINE__, true);
5164 : 0 : return _r;
5165 : : }
5166 : 0 : next_after_fail1332:;
5167 : : }
5168 : : }
5169 : 0 : break;
5170 : : }
5171 : : default:;
5172 : : }
5173 : : }
5174 : : break;
5175 : : }
5176 : : default:;
5177 : : }
5178 : : break;
5179 : : }
5180 : 1160 : default:;
5181 : : }
5182 : 1160 : switch (TREE_CODE (_p1))
5183 : : {
5184 : 25 : case BIT_AND_EXPR:
5185 : 25 : {
5186 : 25 : tree _q50 = TREE_OPERAND (_p1, 0);
5187 : 25 : tree _q51 = TREE_OPERAND (_p1, 1);
5188 : 25 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5189 : : {
5190 : 0 : switch (TREE_CODE (_q51))
5191 : : {
5192 : 0 : case BIT_NOT_EXPR:
5193 : 0 : {
5194 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
5195 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
5196 : : {
5197 : 0 : {
5198 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
5199 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5200 : 0 : if (res) return res;
5201 : : }
5202 : : }
5203 : : break;
5204 : : }
5205 : : default:;
5206 : : }
5207 : : }
5208 : 25 : switch (TREE_CODE (_q50))
5209 : : {
5210 : 0 : case BIT_NOT_EXPR:
5211 : 0 : {
5212 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
5213 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
5214 : : {
5215 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5216 : : {
5217 : 0 : {
5218 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
5219 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5220 : 0 : if (res) return res;
5221 : : }
5222 : : }
5223 : : }
5224 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5225 : : {
5226 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5227 : : {
5228 : 0 : {
5229 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
5230 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5231 : 0 : if (res) return res;
5232 : : }
5233 : : }
5234 : : }
5235 : : break;
5236 : : }
5237 : 25 : default:;
5238 : : }
5239 : 25 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5240 : : {
5241 : 0 : switch (TREE_CODE (_q51))
5242 : : {
5243 : 0 : case BIT_NOT_EXPR:
5244 : 0 : {
5245 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
5246 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5247 : : {
5248 : 0 : {
5249 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
5250 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5251 : 0 : if (res) return res;
5252 : : }
5253 : : }
5254 : : break;
5255 : : }
5256 : : default:;
5257 : : }
5258 : : }
5259 : : break;
5260 : : }
5261 : 2 : case PLUS_EXPR:
5262 : 2 : {
5263 : 2 : tree _q50 = TREE_OPERAND (_p1, 0);
5264 : 2 : tree _q51 = TREE_OPERAND (_p1, 1);
5265 : 2 : switch (TREE_CODE (_q50))
5266 : : {
5267 : 2 : case BIT_IOR_EXPR:
5268 : 2 : {
5269 : 2 : tree _q60 = TREE_OPERAND (_q50, 0);
5270 : 2 : tree _q61 = TREE_OPERAND (_q50, 1);
5271 : 2 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5272 : : {
5273 : 2 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
5274 : : {
5275 : 2 : if (integer_onep (_q51))
5276 : : {
5277 : 2 : {
5278 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5279 : 2 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5280 : 2 : if (res) return res;
5281 : : }
5282 : : }
5283 : : }
5284 : : }
5285 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
5286 : : {
5287 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
5288 : : {
5289 : 0 : if (integer_onep (_q51))
5290 : : {
5291 : 0 : {
5292 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5293 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5294 : 0 : if (res) return res;
5295 : : }
5296 : : }
5297 : : }
5298 : : }
5299 : : break;
5300 : : }
5301 : 0 : default:;
5302 : : }
5303 : 0 : {
5304 : 0 : tree _q50_pops[1];
5305 : 0 : if (tree_nop_convert (_q50, _q50_pops))
5306 : : {
5307 : 0 : tree _q60 = _q50_pops[0];
5308 : 0 : switch (TREE_CODE (_q60))
5309 : : {
5310 : 0 : case BIT_IOR_EXPR:
5311 : 0 : {
5312 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5313 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5314 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5315 : : {
5316 : 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
5317 : : {
5318 : 0 : if (integer_onep (_q51))
5319 : : {
5320 : 0 : {
5321 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5322 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5323 : 0 : if (res) return res;
5324 : : }
5325 : : }
5326 : : }
5327 : : }
5328 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
5329 : : {
5330 : 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
5331 : : {
5332 : 0 : if (integer_onep (_q51))
5333 : : {
5334 : 0 : {
5335 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5336 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5337 : 0 : if (res) return res;
5338 : : }
5339 : : }
5340 : : }
5341 : : }
5342 : : break;
5343 : : }
5344 : : default:;
5345 : : }
5346 : : }
5347 : : }
5348 : 0 : break;
5349 : : }
5350 : 1158 : default:;
5351 : : }
5352 : 1158 : {
5353 : 1158 : tree _p1_pops[1];
5354 : 1158 : if (tree_nop_convert (_p1, _p1_pops))
5355 : : {
5356 : 7 : tree _q50 = _p1_pops[0];
5357 : 7 : switch (TREE_CODE (_q50))
5358 : : {
5359 : 0 : case PLUS_EXPR:
5360 : 0 : {
5361 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
5362 : 0 : tree _q61 = TREE_OPERAND (_q50, 1);
5363 : 0 : switch (TREE_CODE (_q60))
5364 : : {
5365 : 0 : case BIT_IOR_EXPR:
5366 : 0 : {
5367 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5368 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5369 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5370 : : {
5371 : 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
5372 : : {
5373 : 0 : if (integer_onep (_q61))
5374 : : {
5375 : 0 : {
5376 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5377 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5378 : 0 : if (res) return res;
5379 : : }
5380 : : }
5381 : : }
5382 : : }
5383 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
5384 : : {
5385 : 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
5386 : : {
5387 : 0 : if (integer_onep (_q61))
5388 : : {
5389 : 0 : {
5390 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5391 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5392 : 0 : if (res) return res;
5393 : : }
5394 : : }
5395 : : }
5396 : : }
5397 : : break;
5398 : : }
5399 : 0 : default:;
5400 : : }
5401 : 0 : {
5402 : 0 : tree _q60_pops[1];
5403 : 0 : if (tree_nop_convert (_q60, _q60_pops))
5404 : : {
5405 : 0 : tree _q70 = _q60_pops[0];
5406 : 0 : switch (TREE_CODE (_q70))
5407 : : {
5408 : 0 : case BIT_IOR_EXPR:
5409 : 0 : {
5410 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5411 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5412 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
5413 : : {
5414 : 0 : if ((_q81 == _q21 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q21, 0) && types_match (_q81, _q21)))
5415 : : {
5416 : 0 : if (integer_onep (_q61))
5417 : : {
5418 : 0 : {
5419 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5420 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5421 : 0 : if (res) return res;
5422 : : }
5423 : : }
5424 : : }
5425 : : }
5426 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
5427 : : {
5428 : 0 : if ((_q81 == _q20 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q20, 0) && types_match (_q81, _q20)))
5429 : : {
5430 : 0 : if (integer_onep (_q61))
5431 : : {
5432 : 0 : {
5433 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5434 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5435 : 0 : if (res) return res;
5436 : : }
5437 : : }
5438 : : }
5439 : : }
5440 : : break;
5441 : : }
5442 : : default:;
5443 : : }
5444 : : }
5445 : : }
5446 : 0 : break;
5447 : : }
5448 : : default:;
5449 : : }
5450 : : }
5451 : : }
5452 : 1158 : break;
5453 : : }
5454 : 2849 : case BIT_NOT_EXPR:
5455 : 2849 : {
5456 : 2849 : tree _q20 = TREE_OPERAND (_p0, 0);
5457 : 2849 : switch (TREE_CODE (_p1))
5458 : : {
5459 : 22 : case BIT_NOT_EXPR:
5460 : 22 : {
5461 : 22 : tree _q40 = TREE_OPERAND (_p1, 0);
5462 : 22 : {
5463 : 22 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
5464 : 22 : if (!TYPE_OVERFLOW_SANITIZED (type)
5465 : : )
5466 : : {
5467 : 9 : {
5468 : 9 : tree utype = unsigned_type_for (type);
5469 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1333;
5470 : 9 : {
5471 : 9 : tree res_op0;
5472 : 9 : {
5473 : 9 : tree _o1[2], _r1;
5474 : 9 : {
5475 : 9 : tree _o2[1], _r2;
5476 : 9 : _o2[0] = captures[1];
5477 : 9 : if (TREE_TYPE (_o2[0]) != utype)
5478 : : {
5479 : 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
5480 : : }
5481 : : else
5482 : : _r2 = _o2[0];
5483 : 9 : _o1[0] = _r2;
5484 : : }
5485 : 9 : {
5486 : 9 : tree _o2[1], _r2;
5487 : 9 : _o2[0] = captures[0];
5488 : 9 : if (TREE_TYPE (_o2[0]) != utype)
5489 : : {
5490 : 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
5491 : : }
5492 : : else
5493 : : _r2 = _o2[0];
5494 : 9 : _o1[1] = _r2;
5495 : : }
5496 : 9 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5497 : 9 : res_op0 = _r1;
5498 : : }
5499 : 9 : tree _r;
5500 : 9 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
5501 : 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 935, __FILE__, __LINE__, true);
5502 : 9 : return _r;
5503 : : }
5504 : 0 : next_after_fail1333:;
5505 : : }
5506 : : }
5507 : : }
5508 : 13 : break;
5509 : : }
5510 : : default:;
5511 : : }
5512 : : break;
5513 : : }
5514 : 2221969 : case PLUS_EXPR:
5515 : 2221969 : {
5516 : 2221969 : tree _q20 = TREE_OPERAND (_p0, 0);
5517 : 2221969 : tree _q21 = TREE_OPERAND (_p0, 1);
5518 : 2221969 : switch (TREE_CODE (_p1))
5519 : : {
5520 : 14 : case BIT_IOR_EXPR:
5521 : 14 : {
5522 : 14 : tree _q50 = TREE_OPERAND (_p1, 0);
5523 : 14 : tree _q51 = TREE_OPERAND (_p1, 1);
5524 : 14 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5525 : : {
5526 : 13 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5527 : : {
5528 : 13 : {
5529 : 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5530 : 13 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
5531 : 13 : && !TYPE_SATURATING (type)
5532 : : )
5533 : : {
5534 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1334;
5535 : 0 : {
5536 : 0 : tree res_op0;
5537 : 0 : res_op0 = captures[0];
5538 : 0 : tree res_op1;
5539 : 0 : res_op1 = captures[1];
5540 : 0 : tree _r;
5541 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
5542 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 936, __FILE__, __LINE__, true);
5543 : 0 : return _r;
5544 : : }
5545 : 0 : next_after_fail1334:;
5546 : : }
5547 : : }
5548 : : }
5549 : : }
5550 : : break;
5551 : : }
5552 : 86 : case BIT_AND_EXPR:
5553 : 86 : {
5554 : 86 : tree _q50 = TREE_OPERAND (_p1, 0);
5555 : 86 : tree _q51 = TREE_OPERAND (_p1, 1);
5556 : 86 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5557 : : {
5558 : 25 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5559 : : {
5560 : 13 : {
5561 : 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5562 : 13 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
5563 : 13 : && !TYPE_SATURATING (type)
5564 : : )
5565 : : {
5566 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1335;
5567 : 0 : {
5568 : 0 : tree res_op0;
5569 : 0 : res_op0 = captures[0];
5570 : 0 : tree res_op1;
5571 : 0 : res_op1 = captures[1];
5572 : 0 : tree _r;
5573 : 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
5574 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 937, __FILE__, __LINE__, true);
5575 : 0 : return _r;
5576 : : }
5577 : 0 : next_after_fail1335:;
5578 : : }
5579 : : }
5580 : : }
5581 : : }
5582 : : break;
5583 : : }
5584 : 2221969 : default:;
5585 : : }
5586 : 2221969 : switch (TREE_CODE (_q20))
5587 : : {
5588 : 593 : case BIT_AND_EXPR:
5589 : 593 : {
5590 : 593 : tree _q30 = TREE_OPERAND (_q20, 0);
5591 : 593 : tree _q31 = TREE_OPERAND (_q20, 1);
5592 : 593 : if (integer_all_onesp (_q21))
5593 : : {
5594 : 1 : switch (TREE_CODE (_p1))
5595 : : {
5596 : 1 : case BIT_IOR_EXPR:
5597 : 1 : {
5598 : 1 : tree _q70 = TREE_OPERAND (_p1, 0);
5599 : 1 : tree _q71 = TREE_OPERAND (_p1, 1);
5600 : 1 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
5601 : : {
5602 : 1 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
5603 : : {
5604 : 1 : {
5605 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
5606 : 1 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5607 : 1 : if (res) return res;
5608 : : }
5609 : : }
5610 : : }
5611 : 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
5612 : : {
5613 : 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
5614 : : {
5615 : 0 : {
5616 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
5617 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5618 : 0 : if (res) return res;
5619 : : }
5620 : : }
5621 : : }
5622 : : break;
5623 : : }
5624 : 0 : default:;
5625 : : }
5626 : 0 : {
5627 : 0 : tree _p1_pops[1];
5628 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5629 : : {
5630 : 0 : tree _q70 = _p1_pops[0];
5631 : 0 : switch (TREE_CODE (_q70))
5632 : : {
5633 : 0 : case BIT_IOR_EXPR:
5634 : 0 : {
5635 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5636 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5637 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
5638 : : {
5639 : 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
5640 : : {
5641 : 0 : {
5642 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
5643 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5644 : 0 : if (res) return res;
5645 : : }
5646 : : }
5647 : : }
5648 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
5649 : : {
5650 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
5651 : : {
5652 : 0 : {
5653 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
5654 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5655 : 0 : if (res) return res;
5656 : : }
5657 : : }
5658 : : }
5659 : : break;
5660 : : }
5661 : : default:;
5662 : : }
5663 : : }
5664 : : }
5665 : : }
5666 : : break;
5667 : : }
5668 : 2221968 : default:;
5669 : : }
5670 : 2221968 : {
5671 : 2221968 : tree _q20_pops[1];
5672 : 2221968 : if (tree_nop_convert (_q20, _q20_pops))
5673 : : {
5674 : 548745 : tree _q30 = _q20_pops[0];
5675 : 548745 : switch (TREE_CODE (_q30))
5676 : : {
5677 : 0 : case BIT_AND_EXPR:
5678 : 0 : {
5679 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
5680 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
5681 : 0 : if (integer_all_onesp (_q21))
5682 : : {
5683 : 0 : switch (TREE_CODE (_p1))
5684 : : {
5685 : 0 : case BIT_IOR_EXPR:
5686 : 0 : {
5687 : 0 : tree _q80 = TREE_OPERAND (_p1, 0);
5688 : 0 : tree _q81 = TREE_OPERAND (_p1, 1);
5689 : 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
5690 : : {
5691 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
5692 : : {
5693 : 0 : {
5694 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
5695 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5696 : 0 : if (res) return res;
5697 : : }
5698 : : }
5699 : : }
5700 : 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
5701 : : {
5702 : 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
5703 : : {
5704 : 0 : {
5705 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
5706 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5707 : 0 : if (res) return res;
5708 : : }
5709 : : }
5710 : : }
5711 : : break;
5712 : : }
5713 : 0 : default:;
5714 : : }
5715 : 0 : {
5716 : 0 : tree _p1_pops[1];
5717 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5718 : : {
5719 : 0 : tree _q80 = _p1_pops[0];
5720 : 0 : switch (TREE_CODE (_q80))
5721 : : {
5722 : 0 : case BIT_IOR_EXPR:
5723 : 0 : {
5724 : 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5725 : 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5726 : 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
5727 : : {
5728 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
5729 : : {
5730 : 0 : {
5731 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
5732 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5733 : 0 : if (res) return res;
5734 : : }
5735 : : }
5736 : : }
5737 : 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
5738 : : {
5739 : 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
5740 : : {
5741 : 0 : {
5742 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
5743 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5744 : 0 : if (res) return res;
5745 : : }
5746 : : }
5747 : : }
5748 : : break;
5749 : : }
5750 : : default:;
5751 : : }
5752 : : }
5753 : : }
5754 : : }
5755 : : break;
5756 : : }
5757 : : default:;
5758 : : }
5759 : : }
5760 : : }
5761 : 2221968 : break;
5762 : : }
5763 : 77 : case BIT_IOR_EXPR:
5764 : 77 : {
5765 : 77 : tree _q20 = TREE_OPERAND (_p0, 0);
5766 : 77 : tree _q21 = TREE_OPERAND (_p0, 1);
5767 : 77 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
5768 : : {
5769 : 5 : {
5770 : 5 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
5771 : 5 : tree res = generic_simplify_46 (loc, type, _p0, _p1, captures);
5772 : 5 : if (res) return res;
5773 : : }
5774 : : }
5775 : 72 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5776 : : {
5777 : 0 : {
5778 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
5779 : 0 : tree res = generic_simplify_46 (loc, type, _p0, _p1, captures);
5780 : 0 : if (res) return res;
5781 : : }
5782 : : }
5783 : 72 : switch (TREE_CODE (_p1))
5784 : : {
5785 : 0 : case BIT_XOR_EXPR:
5786 : 0 : {
5787 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5788 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5789 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5790 : : {
5791 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5792 : : {
5793 : 0 : {
5794 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5795 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1336;
5796 : 0 : {
5797 : 0 : tree res_op0;
5798 : 0 : res_op0 = captures[0];
5799 : 0 : tree res_op1;
5800 : 0 : res_op1 = captures[1];
5801 : 0 : tree _r;
5802 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
5803 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
5804 : 0 : return _r;
5805 : : }
5806 : 0 : next_after_fail1336:;
5807 : : }
5808 : : }
5809 : : }
5810 : : break;
5811 : : }
5812 : 0 : case BIT_AND_EXPR:
5813 : 0 : {
5814 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5815 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5816 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5817 : : {
5818 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5819 : : {
5820 : 0 : {
5821 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5822 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1337;
5823 : 0 : {
5824 : 0 : tree res_op0;
5825 : 0 : res_op0 = captures[0];
5826 : 0 : tree res_op1;
5827 : 0 : res_op1 = captures[1];
5828 : 0 : tree _r;
5829 : 0 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
5830 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 939, __FILE__, __LINE__, true);
5831 : 0 : return _r;
5832 : : }
5833 : 0 : next_after_fail1337:;
5834 : : }
5835 : : }
5836 : : }
5837 : : break;
5838 : : }
5839 : : default:;
5840 : : }
5841 : : break;
5842 : : }
5843 : 30019330 : default:;
5844 : : }
5845 : 30019330 : {
5846 : 30019330 : tree _p0_pops[1];
5847 : 30019330 : if (tree_nop_convert (_p0, _p0_pops))
5848 : : {
5849 : 7183833 : tree _q20 = _p0_pops[0];
5850 : 7183833 : switch (TREE_CODE (_q20))
5851 : : {
5852 : 975657 : case PLUS_EXPR:
5853 : 975657 : {
5854 : 975657 : tree _q30 = TREE_OPERAND (_q20, 0);
5855 : 975657 : tree _q31 = TREE_OPERAND (_q20, 1);
5856 : 975657 : switch (TREE_CODE (_q30))
5857 : : {
5858 : 344 : case BIT_AND_EXPR:
5859 : 344 : {
5860 : 344 : tree _q40 = TREE_OPERAND (_q30, 0);
5861 : 344 : tree _q41 = TREE_OPERAND (_q30, 1);
5862 : 344 : if (integer_all_onesp (_q31))
5863 : : {
5864 : 0 : switch (TREE_CODE (_p1))
5865 : : {
5866 : 0 : case BIT_IOR_EXPR:
5867 : 0 : {
5868 : 0 : tree _q80 = TREE_OPERAND (_p1, 0);
5869 : 0 : tree _q81 = TREE_OPERAND (_p1, 1);
5870 : 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
5871 : : {
5872 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
5873 : : {
5874 : 0 : {
5875 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
5876 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5877 : 0 : if (res) return res;
5878 : : }
5879 : : }
5880 : : }
5881 : 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
5882 : : {
5883 : 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
5884 : : {
5885 : 0 : {
5886 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
5887 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5888 : 0 : if (res) return res;
5889 : : }
5890 : : }
5891 : : }
5892 : : break;
5893 : : }
5894 : 0 : default:;
5895 : : }
5896 : 0 : {
5897 : 0 : tree _p1_pops[1];
5898 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5899 : : {
5900 : 0 : tree _q80 = _p1_pops[0];
5901 : 0 : switch (TREE_CODE (_q80))
5902 : : {
5903 : 0 : case BIT_IOR_EXPR:
5904 : 0 : {
5905 : 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5906 : 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5907 : 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
5908 : : {
5909 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
5910 : : {
5911 : 0 : {
5912 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
5913 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5914 : 0 : if (res) return res;
5915 : : }
5916 : : }
5917 : : }
5918 : 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
5919 : : {
5920 : 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
5921 : : {
5922 : 0 : {
5923 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
5924 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5925 : 0 : if (res) return res;
5926 : : }
5927 : : }
5928 : : }
5929 : : break;
5930 : : }
5931 : : default:;
5932 : : }
5933 : : }
5934 : : }
5935 : : }
5936 : : break;
5937 : : }
5938 : 975657 : default:;
5939 : : }
5940 : 975657 : {
5941 : 975657 : tree _q30_pops[1];
5942 : 975657 : if (tree_nop_convert (_q30, _q30_pops))
5943 : : {
5944 : 48193 : tree _q40 = _q30_pops[0];
5945 : 48193 : switch (TREE_CODE (_q40))
5946 : : {
5947 : 0 : case BIT_AND_EXPR:
5948 : 0 : {
5949 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5950 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
5951 : 0 : if (integer_all_onesp (_q31))
5952 : : {
5953 : 0 : switch (TREE_CODE (_p1))
5954 : : {
5955 : 0 : case BIT_IOR_EXPR:
5956 : 0 : {
5957 : 0 : tree _q90 = TREE_OPERAND (_p1, 0);
5958 : 0 : tree _q91 = TREE_OPERAND (_p1, 1);
5959 : 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
5960 : : {
5961 : 0 : if ((_q91 == _q51 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q51, 0) && types_match (_q91, _q51)))
5962 : : {
5963 : 0 : {
5964 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5965 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5966 : 0 : if (res) return res;
5967 : : }
5968 : : }
5969 : : }
5970 : 0 : if ((_q90 == _q51 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q51, 0) && types_match (_q90, _q51)))
5971 : : {
5972 : 0 : if ((_q91 == _q50 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q50, 0) && types_match (_q91, _q50)))
5973 : : {
5974 : 0 : {
5975 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
5976 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5977 : 0 : if (res) return res;
5978 : : }
5979 : : }
5980 : : }
5981 : : break;
5982 : : }
5983 : 0 : default:;
5984 : : }
5985 : 0 : {
5986 : 0 : tree _p1_pops[1];
5987 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5988 : : {
5989 : 0 : tree _q90 = _p1_pops[0];
5990 : 0 : switch (TREE_CODE (_q90))
5991 : : {
5992 : 0 : case BIT_IOR_EXPR:
5993 : 0 : {
5994 : 0 : tree _q100 = TREE_OPERAND (_q90, 0);
5995 : 0 : tree _q101 = TREE_OPERAND (_q90, 1);
5996 : 0 : if ((_q100 == _q50 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q50, 0) && types_match (_q100, _q50)))
5997 : : {
5998 : 0 : if ((_q101 == _q51 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q51, 0) && types_match (_q101, _q51)))
5999 : : {
6000 : 0 : {
6001 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
6002 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
6003 : 0 : if (res) return res;
6004 : : }
6005 : : }
6006 : : }
6007 : 0 : if ((_q100 == _q51 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q51, 0) && types_match (_q100, _q51)))
6008 : : {
6009 : 0 : if ((_q101 == _q50 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q50, 0) && types_match (_q101, _q50)))
6010 : : {
6011 : 0 : {
6012 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
6013 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
6014 : 0 : if (res) return res;
6015 : : }
6016 : : }
6017 : : }
6018 : : break;
6019 : : }
6020 : : default:;
6021 : : }
6022 : : }
6023 : : }
6024 : : }
6025 : : break;
6026 : : }
6027 : : default:;
6028 : : }
6029 : : }
6030 : : }
6031 : 975657 : break;
6032 : : }
6033 : 14 : case BIT_AND_EXPR:
6034 : 14 : {
6035 : 14 : tree _q30 = TREE_OPERAND (_q20, 0);
6036 : 14 : tree _q31 = TREE_OPERAND (_q20, 1);
6037 : 14 : switch (TREE_CODE (_p1))
6038 : : {
6039 : 0 : case PLUS_EXPR:
6040 : 0 : {
6041 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
6042 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
6043 : 0 : switch (TREE_CODE (_q60))
6044 : : {
6045 : 0 : case BIT_IOR_EXPR:
6046 : 0 : {
6047 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
6048 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
6049 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
6050 : : {
6051 : 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
6052 : : {
6053 : 0 : if (integer_onep (_q61))
6054 : : {
6055 : 0 : {
6056 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6057 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6058 : 0 : if (res) return res;
6059 : : }
6060 : : }
6061 : : }
6062 : : }
6063 : 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
6064 : : {
6065 : 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
6066 : : {
6067 : 0 : if (integer_onep (_q61))
6068 : : {
6069 : 0 : {
6070 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6071 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6072 : 0 : if (res) return res;
6073 : : }
6074 : : }
6075 : : }
6076 : : }
6077 : : break;
6078 : : }
6079 : 0 : default:;
6080 : : }
6081 : 0 : {
6082 : 0 : tree _q60_pops[1];
6083 : 0 : if (tree_nop_convert (_q60, _q60_pops))
6084 : : {
6085 : 0 : tree _q70 = _q60_pops[0];
6086 : 0 : switch (TREE_CODE (_q70))
6087 : : {
6088 : 0 : case BIT_IOR_EXPR:
6089 : 0 : {
6090 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
6091 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
6092 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
6093 : : {
6094 : 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
6095 : : {
6096 : 0 : if (integer_onep (_q61))
6097 : : {
6098 : 0 : {
6099 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6100 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6101 : 0 : if (res) return res;
6102 : : }
6103 : : }
6104 : : }
6105 : : }
6106 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
6107 : : {
6108 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
6109 : : {
6110 : 0 : if (integer_onep (_q61))
6111 : : {
6112 : 0 : {
6113 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6114 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6115 : 0 : if (res) return res;
6116 : : }
6117 : : }
6118 : : }
6119 : : }
6120 : : break;
6121 : : }
6122 : : default:;
6123 : : }
6124 : : }
6125 : : }
6126 : 0 : break;
6127 : : }
6128 : 14 : default:;
6129 : : }
6130 : 14 : {
6131 : 14 : tree _p1_pops[1];
6132 : 14 : if (tree_nop_convert (_p1, _p1_pops))
6133 : : {
6134 : 14 : tree _q60 = _p1_pops[0];
6135 : 14 : switch (TREE_CODE (_q60))
6136 : : {
6137 : 0 : case PLUS_EXPR:
6138 : 0 : {
6139 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
6140 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
6141 : 0 : switch (TREE_CODE (_q70))
6142 : : {
6143 : 0 : case BIT_IOR_EXPR:
6144 : 0 : {
6145 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
6146 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
6147 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
6148 : : {
6149 : 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
6150 : : {
6151 : 0 : if (integer_onep (_q71))
6152 : : {
6153 : 0 : {
6154 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6155 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6156 : 0 : if (res) return res;
6157 : : }
6158 : : }
6159 : : }
6160 : : }
6161 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
6162 : : {
6163 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
6164 : : {
6165 : 0 : if (integer_onep (_q71))
6166 : : {
6167 : 0 : {
6168 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6169 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6170 : 0 : if (res) return res;
6171 : : }
6172 : : }
6173 : : }
6174 : : }
6175 : : break;
6176 : : }
6177 : 0 : default:;
6178 : : }
6179 : 0 : {
6180 : 0 : tree _q70_pops[1];
6181 : 0 : if (tree_nop_convert (_q70, _q70_pops))
6182 : : {
6183 : 0 : tree _q80 = _q70_pops[0];
6184 : 0 : switch (TREE_CODE (_q80))
6185 : : {
6186 : 0 : case BIT_IOR_EXPR:
6187 : 0 : {
6188 : 0 : tree _q90 = TREE_OPERAND (_q80, 0);
6189 : 0 : tree _q91 = TREE_OPERAND (_q80, 1);
6190 : 0 : if ((_q90 == _q30 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q30, 0) && types_match (_q90, _q30)))
6191 : : {
6192 : 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
6193 : : {
6194 : 0 : if (integer_onep (_q71))
6195 : : {
6196 : 0 : {
6197 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6198 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6199 : 0 : if (res) return res;
6200 : : }
6201 : : }
6202 : : }
6203 : : }
6204 : 0 : if ((_q90 == _q31 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q31, 0) && types_match (_q90, _q31)))
6205 : : {
6206 : 0 : if ((_q91 == _q30 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q30, 0) && types_match (_q91, _q30)))
6207 : : {
6208 : 0 : if (integer_onep (_q71))
6209 : : {
6210 : 0 : {
6211 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6212 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6213 : 0 : if (res) return res;
6214 : : }
6215 : : }
6216 : : }
6217 : : }
6218 : : break;
6219 : : }
6220 : : default:;
6221 : : }
6222 : : }
6223 : : }
6224 : 0 : break;
6225 : : }
6226 : : default:;
6227 : : }
6228 : : }
6229 : : }
6230 : 14 : break;
6231 : : }
6232 : : default:;
6233 : : }
6234 : : }
6235 : : }
6236 : 30019330 : if (tree_negate_expr_p (_p1))
6237 : : {
6238 : 7363907 : {
6239 : 7363907 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6240 : 7363907 : if (!FIXED_POINT_TYPE_P (type)
6241 : : )
6242 : : {
6243 : 7363907 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1338;
6244 : 7363907 : {
6245 : 7363907 : tree res_op0;
6246 : 7363907 : res_op0 = captures[0];
6247 : 7363907 : tree res_op1;
6248 : 7363907 : {
6249 : 7363907 : tree _o1[1], _r1;
6250 : 7363907 : _o1[0] = captures[1];
6251 : 7363907 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
6252 : 7363907 : res_op1 = _r1;
6253 : : }
6254 : 7363907 : tree _r;
6255 : 7363907 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
6256 : 7363907 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
6257 : 7363907 : return _r;
6258 : : }
6259 : 0 : next_after_fail1338:;
6260 : : }
6261 : : }
6262 : : }
6263 : 22655423 : switch (TREE_CODE (_p0))
6264 : : {
6265 : 4782287 : CASE_CONVERT:
6266 : 4782287 : {
6267 : 4782287 : tree _q20 = TREE_OPERAND (_p0, 0);
6268 : 4782287 : switch (TREE_CODE (_p1))
6269 : : {
6270 : 3993384 : CASE_CONVERT:
6271 : 3993384 : {
6272 : 3993384 : tree _q40 = TREE_OPERAND (_p1, 0);
6273 : 3993384 : switch (TREE_CODE (_q40))
6274 : : {
6275 : 15 : case BIT_AND_EXPR:
6276 : 15 : {
6277 : 15 : tree _q50 = TREE_OPERAND (_q40, 0);
6278 : 15 : tree _q51 = TREE_OPERAND (_q40, 1);
6279 : 15 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
6280 : : {
6281 : 0 : {
6282 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q50, _p1, _q40, _q51, _q20 };
6283 : 0 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6284 : 0 : if (res) return res;
6285 : : }
6286 : : }
6287 : 15 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
6288 : : {
6289 : 1 : {
6290 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _q51, _p1, _q40, _q50, _q20 };
6291 : 1 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6292 : 1 : if (res) return res;
6293 : : }
6294 : : }
6295 : : break;
6296 : : }
6297 : : default:;
6298 : : }
6299 : : break;
6300 : : }
6301 : 4883 : case BIT_AND_EXPR:
6302 : 4883 : {
6303 : 4883 : tree _q40 = TREE_OPERAND (_p1, 0);
6304 : 4883 : tree _q41 = TREE_OPERAND (_p1, 1);
6305 : 4883 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _q20, 0))
6306 : : {
6307 : 0 : {
6308 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _p1, _q41, _q20 };
6309 : 0 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6310 : 0 : if (res) return res;
6311 : : }
6312 : : }
6313 : 4883 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q20, 0))
6314 : : {
6315 : 21 : {
6316 : 21 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _p1, _q40, _q20 };
6317 : 21 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6318 : 21 : if (res) return res;
6319 : : }
6320 : : }
6321 : : break;
6322 : : }
6323 : 4782265 : default:;
6324 : : }
6325 : 4782265 : switch (TREE_CODE (_q20))
6326 : : {
6327 : 122011 : case ADDR_EXPR:
6328 : 122011 : {
6329 : 122011 : switch (TREE_CODE (_p1))
6330 : : {
6331 : 115032 : CASE_CONVERT:
6332 : 115032 : {
6333 : 115032 : tree _q40 = TREE_OPERAND (_p1, 0);
6334 : 115032 : switch (TREE_CODE (_q40))
6335 : : {
6336 : 31131 : case POINTER_PLUS_EXPR:
6337 : 31131 : {
6338 : 31131 : tree _q50 = TREE_OPERAND (_q40, 0);
6339 : 31131 : tree _q51 = TREE_OPERAND (_q40, 1);
6340 : 31131 : {
6341 : 31131 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
6342 : 31131 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6343 : : )
6344 : : {
6345 : 31131 : {
6346 : 31131 : poly_int64 diff;
6347 : 31131 : if (ptr_difference_const (captures[0], captures[1], &diff)
6348 : : )
6349 : : {
6350 : 13750 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1339;
6351 : 13750 : {
6352 : 13750 : tree res_op0;
6353 : 13750 : res_op0 = build_int_cst_type (type, diff);
6354 : 13750 : tree res_op1;
6355 : 13750 : {
6356 : 13750 : tree _o1[1], _r1;
6357 : 13750 : _o1[0] = captures[2];
6358 : 13750 : if (TREE_TYPE (_o1[0]) != type)
6359 : : {
6360 : 13750 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
6361 : : }
6362 : : else
6363 : : _r1 = _o1[0];
6364 : 13750 : res_op1 = _r1;
6365 : : }
6366 : 13750 : tree _r;
6367 : 13750 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6368 : 13750 : if (TREE_SIDE_EFFECTS (captures[0]))
6369 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6370 : 13750 : if (TREE_SIDE_EFFECTS (captures[1]))
6371 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6372 : 13750 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
6373 : 13750 : return _r;
6374 : : }
6375 : 0 : next_after_fail1339:;
6376 : : }
6377 : : }
6378 : : }
6379 : : }
6380 : 17381 : break;
6381 : : }
6382 : 101282 : default:;
6383 : : }
6384 : 101282 : {
6385 : 101282 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6386 : 101282 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6387 : : )
6388 : : {
6389 : 101282 : {
6390 : 101282 : poly_int64 diff;
6391 : 101282 : if (ptr_difference_const (captures[0], captures[1], &diff)
6392 : : )
6393 : : {
6394 : 60080 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1340;
6395 : 60080 : {
6396 : 60080 : tree _r;
6397 : 60080 : _r = build_int_cst_type (type, diff);
6398 : 60080 : if (TREE_SIDE_EFFECTS (captures[0]))
6399 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6400 : 60080 : if (TREE_SIDE_EFFECTS (captures[1]))
6401 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6402 : 60080 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 942, __FILE__, __LINE__, true);
6403 : 60080 : return _r;
6404 : : }
6405 : 0 : next_after_fail1340:;
6406 : : }
6407 : : }
6408 : : }
6409 : : }
6410 : 41202 : break;
6411 : : }
6412 : : default:;
6413 : : }
6414 : : break;
6415 : : }
6416 : 86005 : case POINTER_PLUS_EXPR:
6417 : 86005 : {
6418 : 86005 : tree _q30 = TREE_OPERAND (_q20, 0);
6419 : 86005 : tree _q31 = TREE_OPERAND (_q20, 1);
6420 : 86005 : switch (TREE_CODE (_p1))
6421 : : {
6422 : 84879 : CASE_CONVERT:
6423 : 84879 : {
6424 : 84879 : tree _q60 = TREE_OPERAND (_p1, 0);
6425 : 84879 : switch (TREE_CODE (_q60))
6426 : : {
6427 : 3674 : case ADDR_EXPR:
6428 : 3674 : {
6429 : 3674 : {
6430 : 3674 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6431 : 3674 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6432 : : )
6433 : : {
6434 : 3674 : {
6435 : 3674 : poly_int64 diff;
6436 : 3674 : if (ptr_difference_const (captures[0], captures[2], &diff)
6437 : : )
6438 : : {
6439 : 920 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1341;
6440 : 920 : {
6441 : 920 : tree res_op0;
6442 : 920 : {
6443 : 920 : tree _o1[1], _r1;
6444 : 920 : _o1[0] = captures[1];
6445 : 920 : if (TREE_TYPE (_o1[0]) != type)
6446 : : {
6447 : 647 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
6448 : : }
6449 : : else
6450 : : _r1 = _o1[0];
6451 : 920 : res_op0 = _r1;
6452 : : }
6453 : 920 : tree res_op1;
6454 : 920 : res_op1 = build_int_cst_type (type, diff);
6455 : 920 : tree _r;
6456 : 920 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
6457 : 920 : if (TREE_SIDE_EFFECTS (captures[0]))
6458 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6459 : 920 : if (TREE_SIDE_EFFECTS (captures[2]))
6460 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6461 : 920 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
6462 : 920 : return _r;
6463 : : }
6464 : 0 : next_after_fail1341:;
6465 : : }
6466 : : }
6467 : : }
6468 : : }
6469 : 2754 : break;
6470 : : }
6471 : : default:;
6472 : : }
6473 : : break;
6474 : : }
6475 : : default:;
6476 : : }
6477 : : break;
6478 : : }
6479 : 4707515 : default:;
6480 : : }
6481 : 4707515 : switch (TREE_CODE (_p1))
6482 : : {
6483 : 3918633 : CASE_CONVERT:
6484 : 3918633 : {
6485 : 3918633 : tree _q40 = TREE_OPERAND (_p1, 0);
6486 : 3918633 : switch (TREE_CODE (_q40))
6487 : : {
6488 : 72571 : case ADDR_EXPR:
6489 : 72571 : {
6490 : 72571 : {
6491 : 72571 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6492 : 72571 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6493 : : )
6494 : : {
6495 : 72550 : {
6496 : 72550 : poly_int64 diff;
6497 : 72550 : if (ptr_difference_const (captures[0], captures[1], &diff)
6498 : : )
6499 : : {
6500 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1342;
6501 : 0 : {
6502 : 0 : tree _r;
6503 : 0 : _r = build_int_cst_type (type, diff);
6504 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
6505 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6506 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
6507 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6508 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
6509 : 0 : return _r;
6510 : : }
6511 : 0 : next_after_fail1342:;
6512 : : }
6513 : : }
6514 : : }
6515 : : }
6516 : 72571 : break;
6517 : : }
6518 : : default:;
6519 : : }
6520 : : break;
6521 : : }
6522 : : default:;
6523 : : }
6524 : : break;
6525 : : }
6526 : 22580651 : default:;
6527 : : }
6528 : 22580651 : if (integer_onep (_p0))
6529 : : {
6530 : 105333 : switch (TREE_CODE (_p1))
6531 : : {
6532 : 28252 : case SSA_NAME:
6533 : 28252 : {
6534 : 28252 : {
6535 : 28252 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6536 : 28252 : if (INTEGRAL_TYPE_P (type)
6537 : 28252 : && ssa_name_has_boolean_range (captures[1])
6538 : : )
6539 : : {
6540 : 182 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1343;
6541 : 182 : {
6542 : 182 : tree res_op0;
6543 : 182 : res_op0 = captures[1];
6544 : 182 : tree res_op1;
6545 : 182 : res_op1 = captures[0];
6546 : 182 : tree _r;
6547 : 182 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
6548 : 182 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 945, __FILE__, __LINE__, true);
6549 : 182 : return _r;
6550 : : }
6551 : 0 : next_after_fail1343:;
6552 : : }
6553 : : }
6554 : 28070 : break;
6555 : : }
6556 : : default:;
6557 : : }
6558 : : }
6559 : 22580469 : switch (TREE_CODE (_p1))
6560 : : {
6561 : 7098266 : CASE_CONVERT:
6562 : 7098266 : {
6563 : 7098266 : tree _q30 = TREE_OPERAND (_p1, 0);
6564 : 7098266 : switch (TREE_CODE (_q30))
6565 : : {
6566 : 14 : case BIT_AND_EXPR:
6567 : 14 : {
6568 : 14 : tree _q40 = TREE_OPERAND (_q30, 0);
6569 : 14 : tree _q41 = TREE_OPERAND (_q30, 1);
6570 : 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
6571 : : {
6572 : 0 : {
6573 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _q30, _q41, _p0 };
6574 : 0 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6575 : 0 : if (res) return res;
6576 : : }
6577 : : }
6578 : 14 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
6579 : : {
6580 : 0 : {
6581 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _q30, _q40, _p0 };
6582 : 0 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6583 : 0 : if (res) return res;
6584 : : }
6585 : : }
6586 : : break;
6587 : : }
6588 : : default:;
6589 : : }
6590 : : break;
6591 : : }
6592 : 6927 : case BIT_AND_EXPR:
6593 : 6927 : {
6594 : 6927 : tree _q30 = TREE_OPERAND (_p1, 0);
6595 : 6927 : tree _q31 = TREE_OPERAND (_p1, 1);
6596 : 6927 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || operand_equal_p (_q30, _p0, 0))
6597 : : {
6598 : 217 : {
6599 : 217 : tree captures[5] ATTRIBUTE_UNUSED = { _q30, _p1, _p1, _q31, _p0 };
6600 : 217 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6601 : 217 : if (res) return res;
6602 : : }
6603 : : }
6604 : 6710 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _p0, 0))
6605 : : {
6606 : 38 : {
6607 : 38 : tree captures[5] ATTRIBUTE_UNUSED = { _q31, _p1, _p1, _q30, _p0 };
6608 : 38 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6609 : 38 : if (res) return res;
6610 : : }
6611 : : }
6612 : : break;
6613 : : }
6614 : 22580214 : default:;
6615 : : }
6616 : 22580214 : switch (TREE_CODE (_p0))
6617 : : {
6618 : 1681385 : case PLUS_EXPR:
6619 : 1681385 : {
6620 : 1681385 : tree _q20 = TREE_OPERAND (_p0, 0);
6621 : 1681385 : tree _q21 = TREE_OPERAND (_p0, 1);
6622 : 1681385 : switch (TREE_CODE (_p1))
6623 : : {
6624 : 466650 : case PLUS_EXPR:
6625 : 466650 : {
6626 : 466650 : tree _q50 = TREE_OPERAND (_p1, 0);
6627 : 466650 : tree _q51 = TREE_OPERAND (_p1, 1);
6628 : 466650 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6629 : : {
6630 : 161910 : {
6631 : 161910 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6632 : 323820 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6633 : 323820 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6634 : 39642 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6635 : : )
6636 : : {
6637 : 161904 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1344;
6638 : 161904 : {
6639 : 161904 : tree res_op0;
6640 : 161904 : res_op0 = captures[0];
6641 : 161904 : tree res_op1;
6642 : 161904 : res_op1 = captures[2];
6643 : 161904 : tree _r;
6644 : 161904 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6645 : 161904 : if (TREE_SIDE_EFFECTS (captures[1]))
6646 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6647 : 161904 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 946, __FILE__, __LINE__, true);
6648 : 161904 : return _r;
6649 : : }
6650 : 0 : next_after_fail1344:;
6651 : : }
6652 : : }
6653 : : }
6654 : 304746 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6655 : : {
6656 : 409 : {
6657 : 409 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6658 : 818 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6659 : 818 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6660 : 296 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6661 : : )
6662 : : {
6663 : 409 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1345;
6664 : 409 : {
6665 : 409 : tree res_op0;
6666 : 409 : res_op0 = captures[0];
6667 : 409 : tree res_op1;
6668 : 409 : res_op1 = captures[2];
6669 : 409 : tree _r;
6670 : 409 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6671 : 409 : if (TREE_SIDE_EFFECTS (captures[1]))
6672 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6673 : 409 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 946, __FILE__, __LINE__, true);
6674 : 409 : return _r;
6675 : : }
6676 : 0 : next_after_fail1345:;
6677 : : }
6678 : : }
6679 : : }
6680 : 304337 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6681 : : {
6682 : 219 : {
6683 : 219 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
6684 : 438 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6685 : 438 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6686 : 130 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6687 : : )
6688 : : {
6689 : 219 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1346;
6690 : 219 : {
6691 : 219 : tree res_op0;
6692 : 219 : res_op0 = captures[0];
6693 : 219 : tree res_op1;
6694 : 219 : res_op1 = captures[2];
6695 : 219 : tree _r;
6696 : 219 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6697 : 219 : if (TREE_SIDE_EFFECTS (captures[1]))
6698 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6699 : 219 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 946, __FILE__, __LINE__, true);
6700 : 219 : return _r;
6701 : : }
6702 : 0 : next_after_fail1346:;
6703 : : }
6704 : : }
6705 : : }
6706 : 304118 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6707 : : {
6708 : 177451 : {
6709 : 177451 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
6710 : 354902 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6711 : 354902 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6712 : 137053 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6713 : : )
6714 : : {
6715 : 177451 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1347;
6716 : 177451 : {
6717 : 177451 : tree res_op0;
6718 : 177451 : res_op0 = captures[0];
6719 : 177451 : tree res_op1;
6720 : 177451 : res_op1 = captures[2];
6721 : 177451 : tree _r;
6722 : 177451 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6723 : 177451 : if (TREE_SIDE_EFFECTS (captures[1]))
6724 : 2 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6725 : 177451 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 946, __FILE__, __LINE__, true);
6726 : 177451 : return _r;
6727 : : }
6728 : 0 : next_after_fail1347:;
6729 : : }
6730 : : }
6731 : : }
6732 : : break;
6733 : : }
6734 : : default:;
6735 : : }
6736 : : break;
6737 : : }
6738 : 904090 : case MINUS_EXPR:
6739 : 904090 : {
6740 : 904090 : tree _q20 = TREE_OPERAND (_p0, 0);
6741 : 904090 : tree _q21 = TREE_OPERAND (_p0, 1);
6742 : 904090 : switch (TREE_CODE (_p1))
6743 : : {
6744 : 3919 : case MINUS_EXPR:
6745 : 3919 : {
6746 : 3919 : tree _q50 = TREE_OPERAND (_p1, 0);
6747 : 3919 : tree _q51 = TREE_OPERAND (_p1, 1);
6748 : 3919 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6749 : : {
6750 : 3877 : {
6751 : 3877 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6752 : 7754 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6753 : 7754 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6754 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6755 : : )
6756 : : {
6757 : 3877 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1348;
6758 : 3877 : {
6759 : 3877 : tree res_op0;
6760 : 3877 : res_op0 = captures[0];
6761 : 3877 : tree res_op1;
6762 : 3877 : res_op1 = captures[2];
6763 : 3877 : tree _r;
6764 : 3877 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6765 : 3877 : if (TREE_SIDE_EFFECTS (captures[1]))
6766 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6767 : 3877 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 947, __FILE__, __LINE__, true);
6768 : 3877 : return _r;
6769 : : }
6770 : 0 : next_after_fail1348:;
6771 : : }
6772 : : }
6773 : : }
6774 : 42 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6775 : : {
6776 : 0 : {
6777 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6778 : 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
6779 : 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
6780 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
6781 : : )
6782 : : {
6783 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1349;
6784 : 0 : {
6785 : 0 : tree res_op0;
6786 : 0 : res_op0 = captures[2];
6787 : 0 : tree res_op1;
6788 : 0 : res_op1 = captures[1];
6789 : 0 : tree _r;
6790 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6791 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
6792 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6793 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 948, __FILE__, __LINE__, true);
6794 : 0 : return _r;
6795 : : }
6796 : 0 : next_after_fail1349:;
6797 : : }
6798 : : }
6799 : : }
6800 : : break;
6801 : : }
6802 : : default:;
6803 : : }
6804 : : break;
6805 : : }
6806 : 59 : case POINTER_DIFF_EXPR:
6807 : 59 : {
6808 : 59 : tree _q20 = TREE_OPERAND (_p0, 0);
6809 : 59 : tree _q21 = TREE_OPERAND (_p0, 1);
6810 : 59 : switch (TREE_CODE (_p1))
6811 : : {
6812 : 0 : case POINTER_DIFF_EXPR:
6813 : 0 : {
6814 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6815 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6816 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6817 : : {
6818 : 0 : {
6819 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
6820 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6821 : 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
6822 : : )
6823 : : {
6824 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1350;
6825 : 0 : {
6826 : 0 : tree res_op0;
6827 : 0 : res_op0 = captures[1];
6828 : 0 : tree res_op1;
6829 : 0 : res_op1 = captures[3];
6830 : 0 : tree _r;
6831 : 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
6832 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
6833 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6834 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 949, __FILE__, __LINE__, true);
6835 : 0 : return _r;
6836 : : }
6837 : 0 : next_after_fail1350:;
6838 : : }
6839 : : }
6840 : : }
6841 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6842 : : {
6843 : 0 : {
6844 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
6845 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6846 : 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
6847 : : )
6848 : : {
6849 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1351;
6850 : 0 : {
6851 : 0 : tree res_op0;
6852 : 0 : res_op0 = captures[3];
6853 : 0 : tree res_op1;
6854 : 0 : res_op1 = captures[2];
6855 : 0 : tree _r;
6856 : 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
6857 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
6858 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6859 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 950, __FILE__, __LINE__, true);
6860 : 0 : return _r;
6861 : : }
6862 : 0 : next_after_fail1351:;
6863 : : }
6864 : : }
6865 : : }
6866 : : break;
6867 : : }
6868 : : default:;
6869 : : }
6870 : : break;
6871 : : }
6872 : 22236354 : default:;
6873 : : }
6874 : 22236354 : switch (TREE_CODE (_p1))
6875 : : {
6876 : 7098266 : CASE_CONVERT:
6877 : 7098266 : {
6878 : 7098266 : tree _q30 = TREE_OPERAND (_p1, 0);
6879 : 7098266 : switch (TREE_CODE (_q30))
6880 : : {
6881 : 1467 : case NEGATE_EXPR:
6882 : 1467 : {
6883 : 1467 : tree _q40 = TREE_OPERAND (_q30, 0);
6884 : 1467 : {
6885 : 1467 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6886 : 1467 : tree res = generic_simplify_49 (loc, type, _p0, _p1, captures);
6887 : 1467 : if (res) return res;
6888 : : }
6889 : 1467 : break;
6890 : : }
6891 : : default:;
6892 : : }
6893 : : break;
6894 : : }
6895 : 45 : case NEGATE_EXPR:
6896 : 45 : {
6897 : 45 : tree _q30 = TREE_OPERAND (_p1, 0);
6898 : 45 : {
6899 : 45 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6900 : 45 : tree res = generic_simplify_49 (loc, type, _p0, _p1, captures);
6901 : 45 : if (res) return res;
6902 : : }
6903 : 40 : break;
6904 : : }
6905 : 22236349 : default:;
6906 : : }
6907 : 22236349 : switch (TREE_CODE (_p0))
6908 : : {
6909 : 1341402 : case PLUS_EXPR:
6910 : 1341402 : {
6911 : 1341402 : tree _q20 = TREE_OPERAND (_p0, 0);
6912 : 1341402 : tree _q21 = TREE_OPERAND (_p0, 1);
6913 : 1341402 : {
6914 : 1341402 : tree _q20_pops[1];
6915 : 1341402 : if (tree_nop_convert (_q20, _q20_pops))
6916 : : {
6917 : 326023 : tree _q30 = _q20_pops[0];
6918 : 326023 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6919 : : {
6920 : 355 : {
6921 : 355 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6922 : 355 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6923 : 355 : if (res) return res;
6924 : : }
6925 : : }
6926 : : }
6927 : : }
6928 : 1341047 : {
6929 : 1341047 : tree _q21_pops[1];
6930 : 1341047 : if (tree_nop_convert (_q21, _q21_pops))
6931 : : {
6932 : 430486 : tree _q40 = _q21_pops[0];
6933 : 430486 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6934 : : {
6935 : 87 : {
6936 : 87 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6937 : 87 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6938 : 87 : if (res) return res;
6939 : : }
6940 : : }
6941 : : }
6942 : : }
6943 : 1340960 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6944 : : {
6945 : 53572 : {
6946 : 53572 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6947 : 53572 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6948 : 53572 : if (res) return res;
6949 : : }
6950 : : }
6951 : 1287388 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6952 : : {
6953 : 1723 : {
6954 : 1723 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6955 : 1723 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6956 : 1723 : if (res) return res;
6957 : : }
6958 : : }
6959 : : break;
6960 : : }
6961 : 900213 : case MINUS_EXPR:
6962 : 900213 : {
6963 : 900213 : tree _q20 = TREE_OPERAND (_p0, 0);
6964 : 900213 : tree _q21 = TREE_OPERAND (_p0, 1);
6965 : 900213 : {
6966 : 900213 : tree _q20_pops[1];
6967 : 900213 : if (tree_nop_convert (_q20, _q20_pops))
6968 : : {
6969 : 65885 : tree _q30 = _q20_pops[0];
6970 : 65885 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6971 : : {
6972 : 0 : {
6973 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6974 : 0 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
6975 : 0 : if (res) return res;
6976 : : }
6977 : : }
6978 : : }
6979 : : }
6980 : 900213 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6981 : : {
6982 : 186 : {
6983 : 186 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6984 : 186 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
6985 : 186 : if (res) return res;
6986 : : }
6987 : : }
6988 : : break;
6989 : : }
6990 : 22180437 : default:;
6991 : : }
6992 : 22180437 : {
6993 : 22180437 : tree _p0_pops[1];
6994 : 22180437 : if (tree_nop_convert (_p0, _p0_pops))
6995 : : {
6996 : 4304083 : tree _q20 = _p0_pops[0];
6997 : 4304083 : switch (TREE_CODE (_q20))
6998 : : {
6999 : 333866 : case PLUS_EXPR:
7000 : 333866 : {
7001 : 333866 : tree _q30 = TREE_OPERAND (_q20, 0);
7002 : 333866 : tree _q31 = TREE_OPERAND (_q20, 1);
7003 : 333866 : {
7004 : 333866 : tree _q30_pops[1];
7005 : 333866 : if (tree_nop_convert (_q30, _q30_pops))
7006 : : {
7007 : 31008 : tree _q40 = _q30_pops[0];
7008 : 31008 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
7009 : : {
7010 : 604 : {
7011 : 604 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
7012 : 604 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
7013 : 604 : if (res) return res;
7014 : : }
7015 : : }
7016 : : }
7017 : : }
7018 : 333262 : {
7019 : 333262 : tree _q31_pops[1];
7020 : 333262 : if (tree_nop_convert (_q31, _q31_pops))
7021 : : {
7022 : 2139 : tree _q50 = _q31_pops[0];
7023 : 2139 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
7024 : : {
7025 : 52 : {
7026 : 52 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
7027 : 52 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
7028 : 52 : if (res) return res;
7029 : : }
7030 : : }
7031 : : }
7032 : : }
7033 : 333210 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7034 : : {
7035 : 16 : {
7036 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
7037 : 16 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
7038 : 16 : if (res) return res;
7039 : : }
7040 : : }
7041 : 333194 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
7042 : : {
7043 : 0 : {
7044 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
7045 : 0 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
7046 : 0 : if (res) return res;
7047 : : }
7048 : : }
7049 : : break;
7050 : : }
7051 : 869 : case MINUS_EXPR:
7052 : 869 : {
7053 : 869 : tree _q30 = TREE_OPERAND (_q20, 0);
7054 : 869 : tree _q31 = TREE_OPERAND (_q20, 1);
7055 : 869 : {
7056 : 869 : tree _q30_pops[1];
7057 : 869 : if (tree_nop_convert (_q30, _q30_pops))
7058 : : {
7059 : 394 : tree _q40 = _q30_pops[0];
7060 : 394 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
7061 : : {
7062 : 0 : {
7063 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
7064 : 0 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
7065 : 0 : if (res) return res;
7066 : : }
7067 : : }
7068 : : }
7069 : : }
7070 : 869 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7071 : : {
7072 : 0 : {
7073 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
7074 : 0 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
7075 : 0 : if (res) return res;
7076 : : }
7077 : : }
7078 : : break;
7079 : : }
7080 : : default:;
7081 : : }
7082 : : }
7083 : : }
7084 : 22179765 : switch (TREE_CODE (_p1))
7085 : : {
7086 : 1282236 : case PLUS_EXPR:
7087 : 1282236 : {
7088 : 1282236 : tree _q30 = TREE_OPERAND (_p1, 0);
7089 : 1282236 : tree _q31 = TREE_OPERAND (_p1, 1);
7090 : 1282236 : {
7091 : 1282236 : tree _q30_pops[1];
7092 : 1282236 : if (tree_nop_convert (_q30, _q30_pops))
7093 : : {
7094 : 337320 : tree _q40 = _q30_pops[0];
7095 : 337320 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7096 : : {
7097 : 71 : {
7098 : 71 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7099 : 71 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7100 : 71 : if (res) return res;
7101 : : }
7102 : : }
7103 : : }
7104 : : }
7105 : 1282165 : {
7106 : 1282165 : tree _q31_pops[1];
7107 : 1282165 : if (tree_nop_convert (_q31, _q31_pops))
7108 : : {
7109 : 58954 : tree _q50 = _q31_pops[0];
7110 : 58954 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7111 : : {
7112 : 0 : {
7113 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
7114 : 0 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7115 : 0 : if (res) return res;
7116 : : }
7117 : : }
7118 : : }
7119 : : }
7120 : 1282165 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7121 : : {
7122 : 38635 : {
7123 : 38635 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7124 : 38635 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7125 : 38635 : if (res) return res;
7126 : : }
7127 : : }
7128 : 1243530 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
7129 : : {
7130 : 2702 : {
7131 : 2702 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
7132 : 2702 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7133 : 2702 : if (res) return res;
7134 : : }
7135 : : }
7136 : : break;
7137 : : }
7138 : 69335 : case MINUS_EXPR:
7139 : 69335 : {
7140 : 69335 : tree _q30 = TREE_OPERAND (_p1, 0);
7141 : 69335 : tree _q31 = TREE_OPERAND (_p1, 1);
7142 : 69335 : {
7143 : 69335 : tree _q30_pops[1];
7144 : 69335 : if (tree_nop_convert (_q30, _q30_pops))
7145 : : {
7146 : 61 : tree _q40 = _q30_pops[0];
7147 : 61 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7148 : : {
7149 : 0 : {
7150 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7151 : 0 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7152 : 0 : if (res) return res;
7153 : : }
7154 : : }
7155 : : }
7156 : : }
7157 : 69335 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7158 : : {
7159 : 134 : {
7160 : 134 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7161 : 134 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7162 : 134 : if (res) return res;
7163 : : }
7164 : : }
7165 : : break;
7166 : : }
7167 : 22138223 : default:;
7168 : : }
7169 : 22138223 : {
7170 : 22138223 : tree _p1_pops[1];
7171 : 22138223 : if (tree_nop_convert (_p1, _p1_pops))
7172 : : {
7173 : 6434056 : tree _q30 = _p1_pops[0];
7174 : 6434056 : switch (TREE_CODE (_q30))
7175 : : {
7176 : 675472 : case PLUS_EXPR:
7177 : 675472 : {
7178 : 675472 : tree _q40 = TREE_OPERAND (_q30, 0);
7179 : 675472 : tree _q41 = TREE_OPERAND (_q30, 1);
7180 : 675472 : {
7181 : 675472 : tree _q40_pops[1];
7182 : 675472 : if (tree_nop_convert (_q40, _q40_pops))
7183 : : {
7184 : 85350 : tree _q50 = _q40_pops[0];
7185 : 85350 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7186 : : {
7187 : 149 : {
7188 : 149 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7189 : 149 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7190 : 149 : if (res) return res;
7191 : : }
7192 : : }
7193 : : }
7194 : : }
7195 : 675323 : {
7196 : 675323 : tree _q41_pops[1];
7197 : 675323 : if (tree_nop_convert (_q41, _q41_pops))
7198 : : {
7199 : 17502 : tree _q60 = _q41_pops[0];
7200 : 17502 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
7201 : : {
7202 : 0 : {
7203 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
7204 : 0 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7205 : 0 : if (res) return res;
7206 : : }
7207 : : }
7208 : : }
7209 : : }
7210 : 675323 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7211 : : {
7212 : 7 : {
7213 : 7 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7214 : 7 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7215 : 7 : if (res) return res;
7216 : : }
7217 : : }
7218 : 675316 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
7219 : : {
7220 : 0 : {
7221 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
7222 : 0 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7223 : 0 : if (res) return res;
7224 : : }
7225 : : }
7226 : : break;
7227 : : }
7228 : 7402 : case MINUS_EXPR:
7229 : 7402 : {
7230 : 7402 : tree _q40 = TREE_OPERAND (_q30, 0);
7231 : 7402 : tree _q41 = TREE_OPERAND (_q30, 1);
7232 : 7402 : {
7233 : 7402 : tree _q40_pops[1];
7234 : 7402 : if (tree_nop_convert (_q40, _q40_pops))
7235 : : {
7236 : 6696 : tree _q50 = _q40_pops[0];
7237 : 6696 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7238 : : {
7239 : 0 : {
7240 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7241 : 0 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7242 : 0 : if (res) return res;
7243 : : }
7244 : : }
7245 : : }
7246 : : }
7247 : 7402 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7248 : : {
7249 : 2 : {
7250 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7251 : 2 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7252 : 2 : if (res) return res;
7253 : : }
7254 : : }
7255 : : break;
7256 : : }
7257 : : default:;
7258 : : }
7259 : : }
7260 : : }
7261 : 22138065 : switch (TREE_CODE (_p0))
7262 : : {
7263 : 1285676 : case PLUS_EXPR:
7264 : 1285676 : {
7265 : 1285676 : tree _q20 = TREE_OPERAND (_p0, 0);
7266 : 1285676 : tree _q21 = TREE_OPERAND (_p0, 1);
7267 : 1285676 : switch (TREE_CODE (_p1))
7268 : : {
7269 : 0 : case MINUS_EXPR:
7270 : 0 : {
7271 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7272 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7273 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7274 : : {
7275 : 0 : {
7276 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
7277 : 0 : tree res = generic_simplify_54 (loc, type, _p0, _p1, captures);
7278 : 0 : if (res) return res;
7279 : : }
7280 : : }
7281 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7282 : : {
7283 : 0 : {
7284 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
7285 : 0 : tree res = generic_simplify_54 (loc, type, _p0, _p1, captures);
7286 : 0 : if (res) return res;
7287 : : }
7288 : : }
7289 : : break;
7290 : : }
7291 : 1285676 : default:;
7292 : : }
7293 : 1285676 : if (CONSTANT_CLASS_P (_q21))
7294 : : {
7295 : 568225 : if (CONSTANT_CLASS_P (_p1))
7296 : : {
7297 : 13 : {
7298 : 13 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7299 : 13 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
7300 : 13 : if (res) return res;
7301 : : }
7302 : : }
7303 : : }
7304 : : break;
7305 : : }
7306 : 900027 : case MINUS_EXPR:
7307 : 900027 : {
7308 : 900027 : tree _q20 = TREE_OPERAND (_p0, 0);
7309 : 900027 : tree _q21 = TREE_OPERAND (_p0, 1);
7310 : 900027 : if (CONSTANT_CLASS_P (_q21))
7311 : : {
7312 : 100886 : if (CONSTANT_CLASS_P (_p1))
7313 : : {
7314 : 12 : {
7315 : 12 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7316 : 12 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
7317 : 12 : if (res) return res;
7318 : : }
7319 : : }
7320 : : }
7321 : 900027 : if (CONSTANT_CLASS_P (_q20))
7322 : : {
7323 : 2890 : if (CONSTANT_CLASS_P (_p1))
7324 : : {
7325 : 1 : {
7326 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7327 : 1 : tree res = generic_simplify_18 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7328 : 1 : if (res) return res;
7329 : : }
7330 : : }
7331 : : }
7332 : : break;
7333 : : }
7334 : 4692397 : CASE_CONVERT:
7335 : 4692397 : {
7336 : 4692397 : tree _q20 = TREE_OPERAND (_p0, 0);
7337 : 4692397 : switch (TREE_CODE (_p1))
7338 : : {
7339 : 3918617 : CASE_CONVERT:
7340 : 3918617 : {
7341 : 3918617 : tree _q40 = TREE_OPERAND (_p1, 0);
7342 : 3918617 : {
7343 : 3918617 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7344 : 3918617 : tree res = generic_simplify_22 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7345 : 3918617 : if (res) return res;
7346 : : }
7347 : 3904707 : break;
7348 : : }
7349 : 4678487 : default:;
7350 : : }
7351 : 4678487 : switch (TREE_CODE (_q20))
7352 : : {
7353 : 223 : case NEGATE_EXPR:
7354 : 223 : {
7355 : 223 : tree _q30 = TREE_OPERAND (_q20, 0);
7356 : 223 : if (integer_each_onep (_p1))
7357 : : {
7358 : 0 : {
7359 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
7360 : 0 : tree res = generic_simplify_56 (loc, type, _p0, _p1, captures);
7361 : 0 : if (res) return res;
7362 : : }
7363 : : }
7364 : : break;
7365 : : }
7366 : 383336 : case PLUS_EXPR:
7367 : 383336 : {
7368 : 383336 : tree _q30 = TREE_OPERAND (_q20, 0);
7369 : 383336 : tree _q31 = TREE_OPERAND (_q20, 1);
7370 : 383336 : switch (TREE_CODE (_p1))
7371 : : {
7372 : 367161 : CASE_CONVERT:
7373 : 367161 : {
7374 : 367161 : tree _q60 = TREE_OPERAND (_p1, 0);
7375 : 367161 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
7376 : : {
7377 : 5505 : {
7378 : 5505 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7379 : 5505 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7380 : 5505 : if (res) return res;
7381 : : }
7382 : : }
7383 : 361770 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
7384 : : {
7385 : 32 : {
7386 : 32 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
7387 : 32 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7388 : 32 : if (res) return res;
7389 : : }
7390 : : }
7391 : : break;
7392 : : }
7393 : 377913 : default:;
7394 : : }
7395 : 377913 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q30, 0))
7396 : : {
7397 : 3867 : {
7398 : 3867 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7399 : 3867 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7400 : 3867 : if (res) return res;
7401 : : }
7402 : : }
7403 : 374046 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
7404 : : {
7405 : 960 : {
7406 : 960 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
7407 : 960 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7408 : 960 : if (res) return res;
7409 : : }
7410 : : }
7411 : : break;
7412 : : }
7413 : 85085 : case POINTER_PLUS_EXPR:
7414 : 85085 : {
7415 : 85085 : tree _q30 = TREE_OPERAND (_q20, 0);
7416 : 85085 : tree _q31 = TREE_OPERAND (_q20, 1);
7417 : 85085 : switch (TREE_CODE (_p1))
7418 : : {
7419 : 83959 : CASE_CONVERT:
7420 : 83959 : {
7421 : 83959 : tree _q60 = TREE_OPERAND (_p1, 0);
7422 : 83959 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
7423 : : {
7424 : 9926 : {
7425 : 9926 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7426 : 9926 : if (!TYPE_SATURATING (type)
7427 : : )
7428 : : {
7429 : 9926 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7430 : 19852 : && !FIXED_POINT_TYPE_P (type)
7431 : : )
7432 : : {
7433 : 9926 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7434 : 9926 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7435 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7436 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
7437 : : )
7438 : : {
7439 : 9926 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1352;
7440 : 9926 : {
7441 : 9926 : tree res_op0;
7442 : 9926 : res_op0 = captures[1];
7443 : 9926 : tree _r;
7444 : 9926 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7445 : 9926 : if (TREE_SIDE_EFFECTS (captures[2]))
7446 : 11 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7447 : 9926 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 951, __FILE__, __LINE__, true);
7448 : 9926 : return _r;
7449 : : }
7450 : 0 : next_after_fail1352:;
7451 : : }
7452 : : }
7453 : : }
7454 : : }
7455 : : }
7456 : : break;
7457 : : }
7458 : : default:;
7459 : : }
7460 : : break;
7461 : : }
7462 : 4658311 : default:;
7463 : : }
7464 : 4658311 : switch (TREE_CODE (_p1))
7465 : : {
7466 : 3884659 : CASE_CONVERT:
7467 : 3884659 : {
7468 : 3884659 : tree _q40 = TREE_OPERAND (_p1, 0);
7469 : 3884659 : switch (TREE_CODE (_q40))
7470 : : {
7471 : 497412 : case PLUS_EXPR:
7472 : 497412 : {
7473 : 497412 : tree _q50 = TREE_OPERAND (_q40, 0);
7474 : 497412 : tree _q51 = TREE_OPERAND (_q40, 1);
7475 : 497412 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
7476 : : {
7477 : 1948 : {
7478 : 1948 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
7479 : 1948 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7480 : 1948 : if (res) return res;
7481 : : }
7482 : : }
7483 : 495536 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
7484 : : {
7485 : 18 : {
7486 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q51, _q50, _q20 };
7487 : 18 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7488 : 18 : if (res) return res;
7489 : : }
7490 : : }
7491 : : break;
7492 : : }
7493 : : default:;
7494 : : }
7495 : : break;
7496 : : }
7497 : : default:;
7498 : : }
7499 : : break;
7500 : : }
7501 : 148339 : case NEGATE_EXPR:
7502 : 148339 : {
7503 : 148339 : tree _q20 = TREE_OPERAND (_p0, 0);
7504 : 148339 : if (integer_each_onep (_p1))
7505 : : {
7506 : 41 : {
7507 : 41 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
7508 : 41 : tree res = generic_simplify_56 (loc, type, _p0, _p1, captures);
7509 : 41 : if (res) return res;
7510 : : }
7511 : : }
7512 : : break;
7513 : : }
7514 : 22102044 : default:;
7515 : : }
7516 : 22102044 : {
7517 : 22102044 : tree _p0_pops[1];
7518 : 22102044 : if (tree_nop_convert (_p0, _p0_pops))
7519 : : {
7520 : 4258275 : tree _q20 = _p0_pops[0];
7521 : 4258275 : switch (TREE_CODE (_q20))
7522 : : {
7523 : 315390 : case PLUS_EXPR:
7524 : 315390 : {
7525 : 315390 : tree _q30 = TREE_OPERAND (_q20, 0);
7526 : 315390 : tree _q31 = TREE_OPERAND (_q20, 1);
7527 : 315390 : if (CONSTANT_CLASS_P (_q31))
7528 : : {
7529 : 308859 : if (CONSTANT_CLASS_P (_p1))
7530 : : {
7531 : 0 : {
7532 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
7533 : 0 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
7534 : 0 : if (res) return res;
7535 : : }
7536 : : }
7537 : : }
7538 : : break;
7539 : : }
7540 : 869 : case MINUS_EXPR:
7541 : 869 : {
7542 : 869 : tree _q30 = TREE_OPERAND (_q20, 0);
7543 : 869 : tree _q31 = TREE_OPERAND (_q20, 1);
7544 : 869 : if (CONSTANT_CLASS_P (_q31))
7545 : : {
7546 : 0 : if (CONSTANT_CLASS_P (_p1))
7547 : : {
7548 : 0 : {
7549 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
7550 : 0 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
7551 : 0 : if (res) return res;
7552 : : }
7553 : : }
7554 : : }
7555 : 869 : if (CONSTANT_CLASS_P (_q30))
7556 : : {
7557 : 18 : if (CONSTANT_CLASS_P (_p1))
7558 : : {
7559 : 0 : {
7560 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
7561 : 0 : tree res = generic_simplify_18 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7562 : 0 : if (res) return res;
7563 : : }
7564 : : }
7565 : : }
7566 : : break;
7567 : : }
7568 : : default:;
7569 : : }
7570 : : }
7571 : : }
7572 : 22102044 : if (CONSTANT_CLASS_P (_p0))
7573 : : {
7574 : 5614106 : switch (TREE_CODE (_p1))
7575 : : {
7576 : 823 : case MINUS_EXPR:
7577 : 823 : {
7578 : 823 : tree _q30 = TREE_OPERAND (_p1, 0);
7579 : 823 : tree _q31 = TREE_OPERAND (_p1, 1);
7580 : 823 : if (CONSTANT_CLASS_P (_q30))
7581 : : {
7582 : 639 : {
7583 : 639 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
7584 : 639 : tree res = generic_simplify_55 (loc, type, _p0, _p1, captures);
7585 : 639 : if (res) return res;
7586 : : }
7587 : : }
7588 : : break;
7589 : : }
7590 : 5613476 : default:;
7591 : : }
7592 : 5613476 : {
7593 : 5613476 : tree _p1_pops[1];
7594 : 5613476 : if (tree_nop_convert (_p1, _p1_pops))
7595 : : {
7596 : 1796559 : tree _q30 = _p1_pops[0];
7597 : 1796559 : switch (TREE_CODE (_q30))
7598 : : {
7599 : 7191 : case MINUS_EXPR:
7600 : 7191 : {
7601 : 7191 : tree _q40 = TREE_OPERAND (_q30, 0);
7602 : 7191 : tree _q41 = TREE_OPERAND (_q30, 1);
7603 : 7191 : if (CONSTANT_CLASS_P (_q40))
7604 : : {
7605 : 29 : {
7606 : 29 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
7607 : 29 : tree res = generic_simplify_55 (loc, type, _p0, _p1, captures);
7608 : 29 : if (res) return res;
7609 : : }
7610 : : }
7611 : : break;
7612 : : }
7613 : : default:;
7614 : : }
7615 : : }
7616 : : }
7617 : : }
7618 : 22101385 : if (integer_all_onesp (_p0))
7619 : : {
7620 : 1307191 : {
7621 : 1307191 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
7622 : 1307191 : if (!TYPE_SATURATING (type)
7623 : : )
7624 : : {
7625 : 1307191 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7626 : 2614382 : && !FIXED_POINT_TYPE_P (type)
7627 : : )
7628 : : {
7629 : 1307191 : if (TREE_CODE (type) != COMPLEX_TYPE
7630 : : )
7631 : : {
7632 : 1307189 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1353;
7633 : 1307189 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1353;
7634 : 1307189 : {
7635 : 1307189 : tree res_op0;
7636 : 1307189 : res_op0 = captures[0];
7637 : 1307189 : tree _r;
7638 : 1307189 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
7639 : 1307189 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 952, __FILE__, __LINE__, true);
7640 : 1307189 : return _r;
7641 : : }
7642 : : next_after_fail1353:;
7643 : : }
7644 : : }
7645 : : }
7646 : : }
7647 : : }
7648 : 20794196 : switch (TREE_CODE (_p1))
7649 : : {
7650 : 6728546 : CASE_CONVERT:
7651 : 6728546 : {
7652 : 6728546 : tree _q30 = TREE_OPERAND (_p1, 0);
7653 : 6728546 : switch (TREE_CODE (_q30))
7654 : : {
7655 : 685100 : case PLUS_EXPR:
7656 : 685100 : {
7657 : 685100 : tree _q40 = TREE_OPERAND (_q30, 0);
7658 : 685100 : tree _q41 = TREE_OPERAND (_q30, 1);
7659 : 685100 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
7660 : : {
7661 : 0 : {
7662 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _p0 };
7663 : 0 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7664 : 0 : if (res) return res;
7665 : : }
7666 : : }
7667 : 685100 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
7668 : : {
7669 : 7995 : {
7670 : 7995 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _p0 };
7671 : 7995 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7672 : 7995 : if (res) return res;
7673 : : }
7674 : : }
7675 : : break;
7676 : : }
7677 : : default:;
7678 : : }
7679 : : break;
7680 : : }
7681 : 20786398 : default:;
7682 : : }
7683 : 20786398 : switch (TREE_CODE (_p0))
7684 : : {
7685 : 4656417 : CASE_CONVERT:
7686 : 4656417 : {
7687 : 4656417 : tree _q20 = TREE_OPERAND (_p0, 0);
7688 : 4656417 : switch (TREE_CODE (_p1))
7689 : : {
7690 : 3882765 : CASE_CONVERT:
7691 : 3882765 : {
7692 : 3882765 : tree _q40 = TREE_OPERAND (_p1, 0);
7693 : 3882765 : switch (TREE_CODE (_q40))
7694 : : {
7695 : 363272 : case POINTER_PLUS_EXPR:
7696 : 363272 : {
7697 : 363272 : tree _q50 = TREE_OPERAND (_q40, 0);
7698 : 363272 : tree _q51 = TREE_OPERAND (_q40, 1);
7699 : 363272 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
7700 : : {
7701 : 1892 : {
7702 : 1892 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
7703 : 1892 : if (!TYPE_SATURATING (type)
7704 : : )
7705 : : {
7706 : 1892 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7707 : 3784 : && !FIXED_POINT_TYPE_P (type)
7708 : : )
7709 : : {
7710 : 1892 : if (INTEGRAL_TYPE_P (type)
7711 : 1892 : && TYPE_OVERFLOW_UNDEFINED (type)
7712 : 0 : && TREE_CODE (captures[1]) != INTEGER_CST
7713 : 1892 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7714 : : )
7715 : : {
7716 : 0 : {
7717 : 0 : tree utype = unsigned_type_for (type);
7718 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1354;
7719 : 0 : {
7720 : 0 : tree res_op0;
7721 : 0 : {
7722 : 0 : tree _o1[1], _r1;
7723 : 0 : {
7724 : 0 : tree _o2[1], _r2;
7725 : 0 : _o2[0] = captures[1];
7726 : 0 : if (TREE_TYPE (_o2[0]) != utype)
7727 : : {
7728 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7729 : : }
7730 : : else
7731 : : _r2 = _o2[0];
7732 : 0 : _o1[0] = _r2;
7733 : : }
7734 : 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
7735 : 0 : res_op0 = _r1;
7736 : : }
7737 : 0 : tree _r;
7738 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7739 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
7740 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7741 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 953, __FILE__, __LINE__, true);
7742 : 0 : return _r;
7743 : : }
7744 : 0 : next_after_fail1354:;
7745 : : }
7746 : : }
7747 : : else
7748 : : {
7749 : 1892 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7750 : 1892 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7751 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7752 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
7753 : : )
7754 : : {
7755 : 1892 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1355;
7756 : 1892 : {
7757 : 1892 : tree res_op0;
7758 : 1892 : {
7759 : 1892 : tree _o1[1], _r1;
7760 : 1892 : _o1[0] = captures[1];
7761 : 1892 : if (TREE_TYPE (_o1[0]) != type)
7762 : : {
7763 : 1888 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7764 : : }
7765 : : else
7766 : : _r1 = _o1[0];
7767 : 1892 : res_op0 = _r1;
7768 : : }
7769 : 1892 : tree _r;
7770 : 1892 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
7771 : 1892 : if (TREE_SIDE_EFFECTS (captures[2]))
7772 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7773 : 1892 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 954, __FILE__, __LINE__, true);
7774 : 1892 : return _r;
7775 : : }
7776 : 0 : next_after_fail1355:;
7777 : : }
7778 : : }
7779 : : }
7780 : : }
7781 : : }
7782 : : }
7783 : : break;
7784 : : }
7785 : : default:;
7786 : : }
7787 : : break;
7788 : : }
7789 : 4654525 : default:;
7790 : : }
7791 : 4654525 : switch (TREE_CODE (_q20))
7792 : : {
7793 : 373086 : case PLUS_EXPR:
7794 : 373086 : {
7795 : 373086 : tree _q30 = TREE_OPERAND (_q20, 0);
7796 : 373086 : tree _q31 = TREE_OPERAND (_q20, 1);
7797 : 373086 : switch (TREE_CODE (_p1))
7798 : : {
7799 : 357039 : CASE_CONVERT:
7800 : 357039 : {
7801 : 357039 : tree _q60 = TREE_OPERAND (_p1, 0);
7802 : 357039 : switch (TREE_CODE (_q60))
7803 : : {
7804 : 192364 : case PLUS_EXPR:
7805 : 192364 : {
7806 : 192364 : tree _q70 = TREE_OPERAND (_q60, 0);
7807 : 192364 : tree _q71 = TREE_OPERAND (_q60, 1);
7808 : 192364 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
7809 : : {
7810 : 5490 : {
7811 : 5490 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
7812 : 5490 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7813 : 5490 : if (res) return res;
7814 : : }
7815 : : }
7816 : 186874 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q30, 0))
7817 : : {
7818 : 70 : {
7819 : 70 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q70, _q30 };
7820 : 70 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7821 : 70 : if (res) return res;
7822 : : }
7823 : : }
7824 : 186804 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q31, 0))
7825 : : {
7826 : 90 : {
7827 : 90 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q71, _q31 };
7828 : 90 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7829 : 90 : if (res) return res;
7830 : : }
7831 : : }
7832 : 186714 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q31, 0))
7833 : : {
7834 : 138008 : {
7835 : 138008 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q70, _q31 };
7836 : 138008 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7837 : 138008 : if (res) return res;
7838 : : }
7839 : : }
7840 : : break;
7841 : : }
7842 : : default:;
7843 : : }
7844 : : break;
7845 : : }
7846 : : default:;
7847 : : }
7848 : : break;
7849 : : }
7850 : 75159 : case POINTER_PLUS_EXPR:
7851 : 75159 : {
7852 : 75159 : tree _q30 = TREE_OPERAND (_q20, 0);
7853 : 75159 : tree _q31 = TREE_OPERAND (_q20, 1);
7854 : 75159 : switch (TREE_CODE (_p1))
7855 : : {
7856 : 74033 : CASE_CONVERT:
7857 : 74033 : {
7858 : 74033 : tree _q60 = TREE_OPERAND (_p1, 0);
7859 : 74033 : switch (TREE_CODE (_q60))
7860 : : {
7861 : 38912 : case POINTER_PLUS_EXPR:
7862 : 38912 : {
7863 : 38912 : tree _q70 = TREE_OPERAND (_q60, 0);
7864 : 38912 : tree _q71 = TREE_OPERAND (_q60, 1);
7865 : 38912 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
7866 : : {
7867 : 6623 : {
7868 : 6623 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
7869 : 6623 : if (!TYPE_SATURATING (type)
7870 : : )
7871 : : {
7872 : 6623 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7873 : 13246 : && !FIXED_POINT_TYPE_P (type)
7874 : : )
7875 : : {
7876 : 6623 : if (INTEGRAL_TYPE_P (type)
7877 : 6623 : && TYPE_OVERFLOW_UNDEFINED (type)
7878 : 6623 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7879 : : )
7880 : : {
7881 : 0 : {
7882 : 0 : tree utype = unsigned_type_for (type);
7883 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1356;
7884 : 0 : {
7885 : 0 : tree res_op0;
7886 : 0 : {
7887 : 0 : tree _o1[2], _r1;
7888 : 0 : {
7889 : 0 : tree _o2[1], _r2;
7890 : 0 : _o2[0] = captures[1];
7891 : 0 : if (TREE_TYPE (_o2[0]) != utype)
7892 : : {
7893 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7894 : : }
7895 : : else
7896 : : _r2 = _o2[0];
7897 : 0 : _o1[0] = _r2;
7898 : : }
7899 : 0 : {
7900 : 0 : tree _o2[1], _r2;
7901 : 0 : _o2[0] = captures[2];
7902 : 0 : if (TREE_TYPE (_o2[0]) != utype)
7903 : : {
7904 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7905 : : }
7906 : : else
7907 : : _r2 = _o2[0];
7908 : 0 : _o1[1] = _r2;
7909 : : }
7910 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7911 : 0 : res_op0 = _r1;
7912 : : }
7913 : 0 : tree _r;
7914 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7915 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
7916 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
7917 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 955, __FILE__, __LINE__, true);
7918 : 0 : return _r;
7919 : : }
7920 : 0 : next_after_fail1356:;
7921 : : }
7922 : : }
7923 : : else
7924 : : {
7925 : 6623 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7926 : 6623 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7927 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7928 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0
7929 : 0 : && TREE_CODE (captures[2]) == INTEGER_CST
7930 : 0 : && tree_int_cst_sign_bit (captures[2]) == 0)
7931 : : )
7932 : : {
7933 : 6623 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1357;
7934 : 6623 : {
7935 : 6623 : tree res_op0;
7936 : 6623 : {
7937 : 6623 : tree _o1[1], _r1;
7938 : 6623 : _o1[0] = captures[1];
7939 : 6623 : if (TREE_TYPE (_o1[0]) != type)
7940 : : {
7941 : 6553 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7942 : : }
7943 : : else
7944 : : _r1 = _o1[0];
7945 : 6623 : res_op0 = _r1;
7946 : : }
7947 : 6623 : tree res_op1;
7948 : 6623 : {
7949 : 6623 : tree _o1[1], _r1;
7950 : 6623 : _o1[0] = captures[2];
7951 : 6623 : if (TREE_TYPE (_o1[0]) != type)
7952 : : {
7953 : 6570 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7954 : : }
7955 : : else
7956 : : _r1 = _o1[0];
7957 : 6623 : res_op1 = _r1;
7958 : : }
7959 : 6623 : tree _r;
7960 : 6623 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
7961 : 6623 : if (TREE_SIDE_EFFECTS (captures[3]))
7962 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
7963 : 6623 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 956, __FILE__, __LINE__, true);
7964 : 6623 : return _r;
7965 : : }
7966 : 0 : next_after_fail1357:;
7967 : : }
7968 : : }
7969 : : }
7970 : : }
7971 : : }
7972 : : }
7973 : : break;
7974 : : }
7975 : : default:;
7976 : : }
7977 : : break;
7978 : : }
7979 : : default:;
7980 : : }
7981 : : break;
7982 : : }
7983 : : default:;
7984 : : }
7985 : : break;
7986 : : }
7987 : 1517828 : case MULT_EXPR:
7988 : 1517828 : {
7989 : 1517828 : tree _q20 = TREE_OPERAND (_p0, 0);
7990 : 1517828 : tree _q21 = TREE_OPERAND (_p0, 1);
7991 : 1517828 : switch (TREE_CODE (_p1))
7992 : : {
7993 : 721686 : case MULT_EXPR:
7994 : 721686 : {
7995 : 721686 : tree _q50 = TREE_OPERAND (_p1, 0);
7996 : 721686 : tree _q51 = TREE_OPERAND (_p1, 1);
7997 : 721686 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7998 : : {
7999 : 3947 : {
8000 : 3947 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
8001 : 3947 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8002 : 3947 : if (res) return res;
8003 : : }
8004 : : }
8005 : 720479 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
8006 : : {
8007 : 14153 : {
8008 : 14153 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
8009 : 14153 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8010 : 14153 : if (res) return res;
8011 : : }
8012 : : }
8013 : 706326 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
8014 : : {
8015 : 34400 : {
8016 : 34400 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
8017 : 34400 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8018 : 34400 : if (res) return res;
8019 : : }
8020 : : }
8021 : 672006 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8022 : : {
8023 : 207767 : {
8024 : 207767 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
8025 : 207767 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8026 : 207767 : if (res) return res;
8027 : : }
8028 : : }
8029 : : break;
8030 : : }
8031 : : default:;
8032 : : }
8033 : : break;
8034 : : }
8035 : 20398820 : default:;
8036 : : }
8037 : 20398820 : switch (TREE_CODE (_p1))
8038 : : {
8039 : 1843900 : case MULT_EXPR:
8040 : 1843900 : {
8041 : 1843900 : tree _q30 = TREE_OPERAND (_p1, 0);
8042 : 1843900 : tree _q31 = TREE_OPERAND (_p1, 1);
8043 : 1843900 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
8044 : : {
8045 : 3692 : {
8046 : 3692 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
8047 : 3692 : tree res = generic_simplify_26 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8048 : 3692 : if (res) return res;
8049 : : }
8050 : : }
8051 : 1840282 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8052 : : {
8053 : 1316 : {
8054 : 1316 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
8055 : 1316 : tree res = generic_simplify_26 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8056 : 1316 : if (res) return res;
8057 : : }
8058 : : }
8059 : : break;
8060 : : }
8061 : 20393985 : default:;
8062 : : }
8063 : 20393985 : switch (TREE_CODE (_p0))
8064 : : {
8065 : 1265758 : case MULT_EXPR:
8066 : 1265758 : {
8067 : 1265758 : tree _q20 = TREE_OPERAND (_p0, 0);
8068 : 1265758 : tree _q21 = TREE_OPERAND (_p0, 1);
8069 : 1265758 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8070 : : {
8071 : 35237 : {
8072 : 35237 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8073 : 35237 : tree res = generic_simplify_27 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8074 : 35237 : if (res) return res;
8075 : : }
8076 : : }
8077 : 1230607 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8078 : : {
8079 : 644 : {
8080 : 644 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
8081 : 644 : tree res = generic_simplify_27 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8082 : 644 : if (res) return res;
8083 : : }
8084 : : }
8085 : : break;
8086 : : }
8087 : 20358735 : default:;
8088 : : }
8089 : 20358735 : switch (TREE_CODE (_p1))
8090 : : {
8091 : 1839065 : case MULT_EXPR:
8092 : 1839065 : {
8093 : 1839065 : tree _q30 = TREE_OPERAND (_p1, 0);
8094 : 1839065 : tree _q31 = TREE_OPERAND (_p1, 1);
8095 : 1839065 : switch (TREE_CODE (_q30))
8096 : : {
8097 : 81598 : case MINUS_EXPR:
8098 : 81598 : {
8099 : 81598 : tree _q40 = TREE_OPERAND (_q30, 0);
8100 : 81598 : tree _q41 = TREE_OPERAND (_q30, 1);
8101 : 81598 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
8102 : : {
8103 : 19 : if (tree_zero_one_valued_p (_q31))
8104 : : {
8105 : 0 : {
8106 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
8107 : 0 : tree res = generic_simplify_60 (loc, type, _p0, _p1, captures);
8108 : 0 : if (res) return res;
8109 : : }
8110 : : }
8111 : : }
8112 : : break;
8113 : : }
8114 : 1839065 : default:;
8115 : : }
8116 : 1839065 : if (tree_zero_one_valued_p (_q30))
8117 : : {
8118 : 1156 : switch (TREE_CODE (_q31))
8119 : : {
8120 : 9 : case MINUS_EXPR:
8121 : 9 : {
8122 : 9 : tree _q50 = TREE_OPERAND (_q31, 0);
8123 : 9 : tree _q51 = TREE_OPERAND (_q31, 1);
8124 : 9 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
8125 : : {
8126 : 9 : {
8127 : 9 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q51, _q30 };
8128 : 9 : tree res = generic_simplify_60 (loc, type, _p0, _p1, captures);
8129 : 9 : if (res) return res;
8130 : : }
8131 : : }
8132 : : break;
8133 : : }
8134 : : default:;
8135 : : }
8136 : : }
8137 : : break;
8138 : : }
8139 : 20358733 : default:;
8140 : : }
8141 : 20358733 : switch (TREE_CODE (_p0))
8142 : : {
8143 : 0 : case VEC_COND_EXPR:
8144 : 0 : {
8145 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8146 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8147 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8148 : 0 : switch (TREE_CODE (_p1))
8149 : : {
8150 : 0 : case VEC_COND_EXPR:
8151 : 0 : {
8152 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
8153 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
8154 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
8155 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
8156 : : {
8157 : 0 : {
8158 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
8159 : 0 : if (VECTOR_TYPE_P (type)
8160 : 0 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
8161 : : || types_match (type, TREE_TYPE (captures[2]))
8162 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8163 : : || (optimize_vectors_before_lowering_p ()
8164 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8165 : : )
8166 : : {
8167 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1358;
8168 : 0 : {
8169 : 0 : tree res_op0;
8170 : 0 : res_op0 = captures[1];
8171 : 0 : tree res_op1;
8172 : 0 : {
8173 : 0 : tree _o1[2], _r1;
8174 : 0 : _o1[0] = captures[2];
8175 : 0 : _o1[1] = captures[5];
8176 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8177 : 0 : if (EXPR_P (_r1))
8178 : 0 : goto next_after_fail1358;
8179 : 0 : res_op1 = _r1;
8180 : : }
8181 : 0 : tree res_op2;
8182 : 0 : {
8183 : 0 : tree _o1[2], _r1;
8184 : 0 : _o1[0] = captures[3];
8185 : 0 : _o1[1] = captures[6];
8186 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8187 : 0 : if (EXPR_P (_r1))
8188 : 0 : goto next_after_fail1358;
8189 : 0 : res_op2 = _r1;
8190 : : }
8191 : 0 : tree _r;
8192 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8193 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
8194 : 0 : return _r;
8195 : : }
8196 : 0 : next_after_fail1358:;
8197 : : }
8198 : : }
8199 : : }
8200 : : break;
8201 : : }
8202 : 0 : default:;
8203 : : }
8204 : 0 : {
8205 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
8206 : 0 : if (VECTOR_TYPE_P (type)
8207 : 0 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
8208 : : || types_match (type, TREE_TYPE (captures[2]))
8209 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8210 : : || (optimize_vectors_before_lowering_p ()
8211 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8212 : : )
8213 : : {
8214 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1359;
8215 : 0 : {
8216 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1359;
8217 : 0 : tree res_op0;
8218 : 0 : res_op0 = captures[1];
8219 : 0 : tree res_op1;
8220 : 0 : {
8221 : 0 : tree _o1[2], _r1;
8222 : 0 : _o1[0] = captures[2];
8223 : 0 : _o1[1] = unshare_expr (captures[4]);
8224 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8225 : 0 : if (EXPR_P (_r1))
8226 : 0 : goto next_after_fail1359;
8227 : 0 : res_op1 = _r1;
8228 : : }
8229 : 0 : tree res_op2;
8230 : 0 : {
8231 : 0 : tree _o1[2], _r1;
8232 : 0 : _o1[0] = captures[3];
8233 : 0 : _o1[1] = captures[4];
8234 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8235 : 0 : if (EXPR_P (_r1))
8236 : 0 : goto next_after_fail1359;
8237 : 0 : res_op2 = _r1;
8238 : : }
8239 : 0 : tree _r;
8240 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8241 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
8242 : 0 : return _r;
8243 : : }
8244 : 0 : next_after_fail1359:;
8245 : : }
8246 : : }
8247 : 0 : break;
8248 : : }
8249 : 20358733 : default:;
8250 : : }
8251 : 20358733 : if (integer_zerop (_p0))
8252 : : {
8253 : 291227 : {
8254 : 291227 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
8255 : 291227 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1360;
8256 : 291227 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1360;
8257 : 291227 : {
8258 : 291227 : tree res_op0;
8259 : 291227 : res_op0 = captures[0];
8260 : 291227 : tree _r;
8261 : 291227 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
8262 : 291227 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 957, __FILE__, __LINE__, true);
8263 : 291227 : return _r;
8264 : : }
8265 : : next_after_fail1360:;
8266 : : }
8267 : : }
8268 : 20067506 : if (real_zerop (_p0))
8269 : : {
8270 : 137 : {
8271 : 137 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8272 : 137 : if (fold_real_zero_addition_p (type, captures[1], captures[0], 0)
8273 : : )
8274 : : {
8275 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1361;
8276 : 56 : {
8277 : 56 : tree res_op0;
8278 : 56 : res_op0 = captures[1];
8279 : 56 : tree _r;
8280 : 56 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
8281 : 56 : if (TREE_SIDE_EFFECTS (captures[0]))
8282 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
8283 : 56 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 958, __FILE__, __LINE__, true);
8284 : 56 : return _r;
8285 : : }
8286 : 0 : next_after_fail1361:;
8287 : : }
8288 : : }
8289 : : }
8290 : 20067450 : switch (TREE_CODE (_p1))
8291 : : {
8292 : 4 : case VEC_COND_EXPR:
8293 : 4 : {
8294 : 4 : tree _q30 = TREE_OPERAND (_p1, 0);
8295 : 4 : tree _q31 = TREE_OPERAND (_p1, 1);
8296 : 4 : tree _q32 = TREE_OPERAND (_p1, 2);
8297 : 4 : {
8298 : 4 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
8299 : 4 : if (VECTOR_TYPE_P (type)
8300 : 4 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
8301 : : || types_match (type, TREE_TYPE (captures[3]))
8302 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
8303 : : || (optimize_vectors_before_lowering_p ()
8304 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
8305 : : )
8306 : : {
8307 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1362;
8308 : 4 : {
8309 : 4 : if (! tree_invariant_p (captures[0])) goto next_after_fail1362;
8310 : 0 : tree res_op0;
8311 : 0 : res_op0 = captures[2];
8312 : 0 : tree res_op1;
8313 : 0 : {
8314 : 0 : tree _o1[2], _r1;
8315 : 0 : _o1[0] = unshare_expr (captures[0]);
8316 : 0 : _o1[1] = captures[3];
8317 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8318 : 0 : if (EXPR_P (_r1))
8319 : 0 : goto next_after_fail1362;
8320 : 0 : res_op1 = _r1;
8321 : : }
8322 : 0 : tree res_op2;
8323 : 0 : {
8324 : 0 : tree _o1[2], _r1;
8325 : 0 : _o1[0] = captures[0];
8326 : 0 : _o1[1] = captures[4];
8327 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8328 : 0 : if (EXPR_P (_r1))
8329 : 0 : goto next_after_fail1362;
8330 : 0 : res_op2 = _r1;
8331 : : }
8332 : 0 : tree _r;
8333 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8334 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
8335 : 0 : return _r;
8336 : : }
8337 : 4 : next_after_fail1362:;
8338 : : }
8339 : : }
8340 : 4 : if (integer_each_onep (_q31))
8341 : : {
8342 : 0 : if (integer_zerop (_q32))
8343 : : {
8344 : 0 : {
8345 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
8346 : 0 : tree res = generic_simplify_61 (loc, type, _p0, _p1, captures);
8347 : 0 : if (res) return res;
8348 : : }
8349 : : }
8350 : : }
8351 : : break;
8352 : : }
8353 : 111498 : case VIEW_CONVERT_EXPR:
8354 : 111498 : {
8355 : 111498 : tree _q30 = TREE_OPERAND (_p1, 0);
8356 : 111498 : switch (TREE_CODE (_q30))
8357 : : {
8358 : 0 : case VEC_COND_EXPR:
8359 : 0 : {
8360 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
8361 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
8362 : 0 : tree _q42 = TREE_OPERAND (_q30, 2);
8363 : 0 : if (integer_each_onep (_q41))
8364 : : {
8365 : 0 : if (integer_zerop (_q42))
8366 : : {
8367 : 0 : {
8368 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42 };
8369 : 0 : tree res = generic_simplify_61 (loc, type, _p0, _p1, captures);
8370 : 0 : if (res) return res;
8371 : : }
8372 : : }
8373 : : }
8374 : : break;
8375 : : }
8376 : : default:;
8377 : : }
8378 : : break;
8379 : : }
8380 : 20067450 : default:;
8381 : : }
8382 : 20067450 : switch (TREE_CODE (_p0))
8383 : : {
8384 : 121149 : case RDIV_EXPR:
8385 : 121149 : {
8386 : 121149 : tree _q20 = TREE_OPERAND (_p0, 0);
8387 : 121149 : tree _q21 = TREE_OPERAND (_p0, 1);
8388 : 121149 : switch (TREE_CODE (_p1))
8389 : : {
8390 : 20271 : case RDIV_EXPR:
8391 : 20271 : {
8392 : 20271 : tree _q50 = TREE_OPERAND (_p1, 0);
8393 : 20271 : tree _q51 = TREE_OPERAND (_p1, 1);
8394 : 20271 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8395 : : {
8396 : 20251 : {
8397 : 20251 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
8398 : 20251 : tree res = generic_simplify_33 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8399 : 20251 : if (res) return res;
8400 : : }
8401 : : }
8402 : : break;
8403 : : }
8404 : : default:;
8405 : : }
8406 : : break;
8407 : : }
8408 : 1285676 : case PLUS_EXPR:
8409 : 1285676 : {
8410 : 1285676 : tree _q20 = TREE_OPERAND (_p0, 0);
8411 : 1285676 : tree _q21 = TREE_OPERAND (_p0, 1);
8412 : 1285676 : switch (TREE_CODE (_q20))
8413 : : {
8414 : 45673 : case CALL_EXPR:
8415 : 45673 : switch (get_call_combined_fn (_q20))
8416 : : {
8417 : 4 : case CFN_BUILT_IN_POPCOUNT:
8418 : 4 : if (call_expr_nargs (_q20) == 1)
8419 : : {
8420 : 4 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8421 : 4 : switch (TREE_CODE (_q21))
8422 : : {
8423 : 4 : case CALL_EXPR:
8424 : 4 : switch (get_call_combined_fn (_q21))
8425 : : {
8426 : 4 : case CFN_BUILT_IN_POPCOUNT:
8427 : 4 : if (call_expr_nargs (_q21) == 1)
8428 : : {
8429 : 4 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8430 : 4 : switch (TREE_CODE (_p1))
8431 : : {
8432 : 4 : case CALL_EXPR:
8433 : 4 : switch (get_call_combined_fn (_p1))
8434 : : {
8435 : 4 : case CFN_BUILT_IN_POPCOUNT:
8436 : 4 : if (call_expr_nargs (_p1) == 1)
8437 : : {
8438 : 4 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8439 : 4 : switch (TREE_CODE (_q70))
8440 : : {
8441 : 2 : case BIT_AND_EXPR:
8442 : 2 : {
8443 : 2 : tree _q80 = TREE_OPERAND (_q70, 0);
8444 : 2 : tree _q81 = TREE_OPERAND (_q70, 1);
8445 : 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8446 : : {
8447 : 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8448 : : {
8449 : 1 : {
8450 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8451 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
8452 : 1 : if (res) return res;
8453 : : }
8454 : : }
8455 : : }
8456 : 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8457 : : {
8458 : 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8459 : : {
8460 : 1 : {
8461 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8462 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
8463 : 1 : if (res) return res;
8464 : : }
8465 : : }
8466 : : }
8467 : : break;
8468 : : }
8469 : 2 : case BIT_IOR_EXPR:
8470 : 2 : {
8471 : 2 : tree _q80 = TREE_OPERAND (_q70, 0);
8472 : 2 : tree _q81 = TREE_OPERAND (_q70, 1);
8473 : 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8474 : : {
8475 : 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8476 : : {
8477 : 1 : {
8478 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8479 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
8480 : 1 : if (res) return res;
8481 : : }
8482 : : }
8483 : : }
8484 : 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8485 : : {
8486 : 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8487 : : {
8488 : 1 : {
8489 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8490 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
8491 : 1 : if (res) return res;
8492 : : }
8493 : : }
8494 : : }
8495 : : break;
8496 : : }
8497 : : default:;
8498 : : }
8499 : : }
8500 : : break;
8501 : : default:;
8502 : : }
8503 : : break;
8504 : : default:;
8505 : : }
8506 : : }
8507 : : break;
8508 : : default:;
8509 : : }
8510 : : break;
8511 : : default:;
8512 : : }
8513 : : }
8514 : : break;
8515 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
8516 : 0 : if (call_expr_nargs (_q20) == 1)
8517 : : {
8518 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8519 : 0 : switch (TREE_CODE (_q21))
8520 : : {
8521 : 0 : case CALL_EXPR:
8522 : 0 : switch (get_call_combined_fn (_q21))
8523 : : {
8524 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
8525 : 0 : if (call_expr_nargs (_q21) == 1)
8526 : : {
8527 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8528 : 0 : switch (TREE_CODE (_p1))
8529 : : {
8530 : 0 : case CALL_EXPR:
8531 : 0 : switch (get_call_combined_fn (_p1))
8532 : : {
8533 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
8534 : 0 : if (call_expr_nargs (_p1) == 1)
8535 : : {
8536 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8537 : 0 : switch (TREE_CODE (_q70))
8538 : : {
8539 : 0 : case BIT_AND_EXPR:
8540 : 0 : {
8541 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8542 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8543 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8544 : : {
8545 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8546 : : {
8547 : 0 : {
8548 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8549 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8550 : 0 : if (res) return res;
8551 : : }
8552 : : }
8553 : : }
8554 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8555 : : {
8556 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8557 : : {
8558 : 0 : {
8559 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8560 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8561 : 0 : if (res) return res;
8562 : : }
8563 : : }
8564 : : }
8565 : : break;
8566 : : }
8567 : 0 : case BIT_IOR_EXPR:
8568 : 0 : {
8569 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8570 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8571 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8572 : : {
8573 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8574 : : {
8575 : 0 : {
8576 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8577 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8578 : 0 : if (res) return res;
8579 : : }
8580 : : }
8581 : : }
8582 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8583 : : {
8584 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8585 : : {
8586 : 0 : {
8587 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8588 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8589 : 0 : if (res) return res;
8590 : : }
8591 : : }
8592 : : }
8593 : : break;
8594 : : }
8595 : : default:;
8596 : : }
8597 : : }
8598 : : break;
8599 : : default:;
8600 : : }
8601 : : break;
8602 : : default:;
8603 : : }
8604 : : }
8605 : : break;
8606 : : default:;
8607 : : }
8608 : : break;
8609 : : default:;
8610 : : }
8611 : : }
8612 : : break;
8613 : 0 : case CFN_POPCOUNT:
8614 : 0 : if (call_expr_nargs (_q20) == 1)
8615 : : {
8616 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8617 : 0 : switch (TREE_CODE (_q21))
8618 : : {
8619 : 0 : case CALL_EXPR:
8620 : 0 : switch (get_call_combined_fn (_q21))
8621 : : {
8622 : 0 : case CFN_POPCOUNT:
8623 : 0 : if (call_expr_nargs (_q21) == 1)
8624 : : {
8625 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8626 : 0 : switch (TREE_CODE (_p1))
8627 : : {
8628 : 0 : case CALL_EXPR:
8629 : 0 : switch (get_call_combined_fn (_p1))
8630 : : {
8631 : 0 : case CFN_POPCOUNT:
8632 : 0 : if (call_expr_nargs (_p1) == 1)
8633 : : {
8634 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8635 : 0 : switch (TREE_CODE (_q70))
8636 : : {
8637 : 0 : case BIT_AND_EXPR:
8638 : 0 : {
8639 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8640 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8641 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8642 : : {
8643 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8644 : : {
8645 : 0 : {
8646 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8647 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
8648 : 0 : if (res) return res;
8649 : : }
8650 : : }
8651 : : }
8652 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8653 : : {
8654 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8655 : : {
8656 : 0 : {
8657 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8658 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
8659 : 0 : if (res) return res;
8660 : : }
8661 : : }
8662 : : }
8663 : : break;
8664 : : }
8665 : 0 : case BIT_IOR_EXPR:
8666 : 0 : {
8667 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8668 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8669 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8670 : : {
8671 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8672 : : {
8673 : 0 : {
8674 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8675 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
8676 : 0 : if (res) return res;
8677 : : }
8678 : : }
8679 : : }
8680 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8681 : : {
8682 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8683 : : {
8684 : 0 : {
8685 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8686 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
8687 : 0 : if (res) return res;
8688 : : }
8689 : : }
8690 : : }
8691 : : break;
8692 : : }
8693 : : default:;
8694 : : }
8695 : : }
8696 : : break;
8697 : : default:;
8698 : : }
8699 : : break;
8700 : : default:;
8701 : : }
8702 : : }
8703 : : break;
8704 : : default:;
8705 : : }
8706 : : break;
8707 : : default:;
8708 : : }
8709 : : }
8710 : : break;
8711 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8712 : 0 : if (call_expr_nargs (_q20) == 1)
8713 : : {
8714 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8715 : 0 : switch (TREE_CODE (_q21))
8716 : : {
8717 : 0 : case CALL_EXPR:
8718 : 0 : switch (get_call_combined_fn (_q21))
8719 : : {
8720 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8721 : 0 : if (call_expr_nargs (_q21) == 1)
8722 : : {
8723 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8724 : 0 : switch (TREE_CODE (_p1))
8725 : : {
8726 : 0 : case CALL_EXPR:
8727 : 0 : switch (get_call_combined_fn (_p1))
8728 : : {
8729 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8730 : 0 : if (call_expr_nargs (_p1) == 1)
8731 : : {
8732 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8733 : 0 : switch (TREE_CODE (_q70))
8734 : : {
8735 : 0 : case BIT_AND_EXPR:
8736 : 0 : {
8737 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8738 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8739 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8740 : : {
8741 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8742 : : {
8743 : 0 : {
8744 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8745 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8746 : 0 : if (res) return res;
8747 : : }
8748 : : }
8749 : : }
8750 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8751 : : {
8752 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8753 : : {
8754 : 0 : {
8755 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8756 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8757 : 0 : if (res) return res;
8758 : : }
8759 : : }
8760 : : }
8761 : : break;
8762 : : }
8763 : 0 : case BIT_IOR_EXPR:
8764 : 0 : {
8765 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8766 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8767 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8768 : : {
8769 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8770 : : {
8771 : 0 : {
8772 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8773 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8774 : 0 : if (res) return res;
8775 : : }
8776 : : }
8777 : : }
8778 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8779 : : {
8780 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8781 : : {
8782 : 0 : {
8783 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8784 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8785 : 0 : if (res) return res;
8786 : : }
8787 : : }
8788 : : }
8789 : : break;
8790 : : }
8791 : : default:;
8792 : : }
8793 : : }
8794 : : break;
8795 : : default:;
8796 : : }
8797 : : break;
8798 : : default:;
8799 : : }
8800 : : }
8801 : : break;
8802 : : default:;
8803 : : }
8804 : : break;
8805 : : default:;
8806 : : }
8807 : : }
8808 : : break;
8809 : 0 : case CFN_BUILT_IN_POPCOUNTL:
8810 : 0 : if (call_expr_nargs (_q20) == 1)
8811 : : {
8812 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8813 : 0 : switch (TREE_CODE (_q21))
8814 : : {
8815 : 0 : case CALL_EXPR:
8816 : 0 : switch (get_call_combined_fn (_q21))
8817 : : {
8818 : 0 : case CFN_BUILT_IN_POPCOUNTL:
8819 : 0 : if (call_expr_nargs (_q21) == 1)
8820 : : {
8821 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8822 : 0 : switch (TREE_CODE (_p1))
8823 : : {
8824 : 0 : case CALL_EXPR:
8825 : 0 : switch (get_call_combined_fn (_p1))
8826 : : {
8827 : 0 : case CFN_BUILT_IN_POPCOUNTL:
8828 : 0 : if (call_expr_nargs (_p1) == 1)
8829 : : {
8830 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8831 : 0 : switch (TREE_CODE (_q70))
8832 : : {
8833 : 0 : case BIT_AND_EXPR:
8834 : 0 : {
8835 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8836 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8837 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8838 : : {
8839 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8840 : : {
8841 : 0 : {
8842 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8843 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
8844 : 0 : if (res) return res;
8845 : : }
8846 : : }
8847 : : }
8848 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8849 : : {
8850 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8851 : : {
8852 : 0 : {
8853 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8854 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
8855 : 0 : if (res) return res;
8856 : : }
8857 : : }
8858 : : }
8859 : : break;
8860 : : }
8861 : 0 : case BIT_IOR_EXPR:
8862 : 0 : {
8863 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8864 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8865 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8866 : : {
8867 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8868 : : {
8869 : 0 : {
8870 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8871 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8872 : 0 : if (res) return res;
8873 : : }
8874 : : }
8875 : : }
8876 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8877 : : {
8878 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8879 : : {
8880 : 0 : {
8881 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8882 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8883 : 0 : if (res) return res;
8884 : : }
8885 : : }
8886 : : }
8887 : : break;
8888 : : }
8889 : : default:;
8890 : : }
8891 : : }
8892 : : break;
8893 : : default:;
8894 : : }
8895 : : break;
8896 : : default:;
8897 : : }
8898 : : }
8899 : : break;
8900 : : default:;
8901 : : }
8902 : : break;
8903 : : default:;
8904 : : }
8905 : : }
8906 : : break;
8907 : : default:;
8908 : : }
8909 : : break;
8910 : : default:;
8911 : : }
8912 : : break;
8913 : : }
8914 : 0 : case VEC_PERM_EXPR:
8915 : 0 : {
8916 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8917 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8918 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8919 : 0 : switch (TREE_CODE (_q20))
8920 : : {
8921 : 0 : case MULT_EXPR:
8922 : 0 : {
8923 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
8924 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
8925 : 0 : if (tree_vec_same_elem_p (_q31))
8926 : : {
8927 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8928 : : {
8929 : 0 : {
8930 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q22, _p1 };
8931 : 0 : tree res = generic_simplify_64 (loc, type, _p0, _p1, captures);
8932 : 0 : if (res) return res;
8933 : : }
8934 : : }
8935 : : }
8936 : 0 : if (tree_vec_same_elem_p (_q30))
8937 : : {
8938 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8939 : : {
8940 : 0 : {
8941 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30, _q22, _p1 };
8942 : 0 : tree res = generic_simplify_64 (loc, type, _p0, _p1, captures);
8943 : 0 : if (res) return res;
8944 : : }
8945 : : }
8946 : : }
8947 : : break;
8948 : : }
8949 : : default:;
8950 : : }
8951 : : break;
8952 : : }
8953 : 624692 : case CALL_EXPR:
8954 : 624692 : switch (get_call_combined_fn (_p0))
8955 : : {
8956 : 18 : case CFN_BUILT_IN_LOG:
8957 : 18 : if (call_expr_nargs (_p0) == 1)
8958 : : {
8959 : 18 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8960 : 18 : switch (TREE_CODE (_p1))
8961 : : {
8962 : 0 : case CALL_EXPR:
8963 : 0 : switch (get_call_combined_fn (_p1))
8964 : : {
8965 : 0 : case CFN_BUILT_IN_LOG:
8966 : 0 : if (call_expr_nargs (_p1) == 1)
8967 : : {
8968 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8969 : 0 : {
8970 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8971 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG);
8972 : 0 : if (res) return res;
8973 : : }
8974 : : }
8975 : : break;
8976 : : default:;
8977 : : }
8978 : : break;
8979 : : default:;
8980 : : }
8981 : : }
8982 : : break;
8983 : 2 : case CFN_BUILT_IN_LOG2:
8984 : 2 : if (call_expr_nargs (_p0) == 1)
8985 : : {
8986 : 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8987 : 2 : switch (TREE_CODE (_p1))
8988 : : {
8989 : 0 : case CALL_EXPR:
8990 : 0 : switch (get_call_combined_fn (_p1))
8991 : : {
8992 : 0 : case CFN_BUILT_IN_LOG2:
8993 : 0 : if (call_expr_nargs (_p1) == 1)
8994 : : {
8995 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8996 : 0 : {
8997 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8998 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2);
8999 : 0 : if (res) return res;
9000 : : }
9001 : : }
9002 : : break;
9003 : : default:;
9004 : : }
9005 : : break;
9006 : : default:;
9007 : : }
9008 : : }
9009 : : break;
9010 : 0 : case CFN_BUILT_IN_LOGF:
9011 : 0 : if (call_expr_nargs (_p0) == 1)
9012 : : {
9013 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9014 : 0 : switch (TREE_CODE (_p1))
9015 : : {
9016 : 0 : case CALL_EXPR:
9017 : 0 : switch (get_call_combined_fn (_p1))
9018 : : {
9019 : 0 : case CFN_BUILT_IN_LOGF:
9020 : 0 : if (call_expr_nargs (_p1) == 1)
9021 : : {
9022 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9023 : 0 : {
9024 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9025 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF);
9026 : 0 : if (res) return res;
9027 : : }
9028 : : }
9029 : : break;
9030 : : default:;
9031 : : }
9032 : : break;
9033 : : default:;
9034 : : }
9035 : : }
9036 : : break;
9037 : 0 : case CFN_BUILT_IN_LOGL:
9038 : 0 : if (call_expr_nargs (_p0) == 1)
9039 : : {
9040 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9041 : 0 : switch (TREE_CODE (_p1))
9042 : : {
9043 : 0 : case CALL_EXPR:
9044 : 0 : switch (get_call_combined_fn (_p1))
9045 : : {
9046 : 0 : case CFN_BUILT_IN_LOGL:
9047 : 0 : if (call_expr_nargs (_p1) == 1)
9048 : : {
9049 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9050 : 0 : {
9051 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9052 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL);
9053 : 0 : if (res) return res;
9054 : : }
9055 : : }
9056 : : break;
9057 : : default:;
9058 : : }
9059 : : break;
9060 : : default:;
9061 : : }
9062 : : }
9063 : : break;
9064 : 0 : case CFN_BUILT_IN_LOG10F:
9065 : 0 : if (call_expr_nargs (_p0) == 1)
9066 : : {
9067 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9068 : 0 : switch (TREE_CODE (_p1))
9069 : : {
9070 : 0 : case CALL_EXPR:
9071 : 0 : switch (get_call_combined_fn (_p1))
9072 : : {
9073 : 0 : case CFN_BUILT_IN_LOG10F:
9074 : 0 : if (call_expr_nargs (_p1) == 1)
9075 : : {
9076 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9077 : 0 : {
9078 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9079 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F);
9080 : 0 : if (res) return res;
9081 : : }
9082 : : }
9083 : : break;
9084 : : default:;
9085 : : }
9086 : : break;
9087 : : default:;
9088 : : }
9089 : : }
9090 : : break;
9091 : 0 : case CFN_BUILT_IN_LOG10L:
9092 : 0 : if (call_expr_nargs (_p0) == 1)
9093 : : {
9094 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9095 : 0 : switch (TREE_CODE (_p1))
9096 : : {
9097 : 0 : case CALL_EXPR:
9098 : 0 : switch (get_call_combined_fn (_p1))
9099 : : {
9100 : 0 : case CFN_BUILT_IN_LOG10L:
9101 : 0 : if (call_expr_nargs (_p1) == 1)
9102 : : {
9103 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9104 : 0 : {
9105 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9106 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L);
9107 : 0 : if (res) return res;
9108 : : }
9109 : : }
9110 : : break;
9111 : : default:;
9112 : : }
9113 : : break;
9114 : : default:;
9115 : : }
9116 : : }
9117 : : break;
9118 : 0 : case CFN_LOG:
9119 : 0 : if (call_expr_nargs (_p0) == 1)
9120 : : {
9121 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9122 : 0 : switch (TREE_CODE (_p1))
9123 : : {
9124 : 0 : case CALL_EXPR:
9125 : 0 : switch (get_call_combined_fn (_p1))
9126 : : {
9127 : 0 : case CFN_LOG:
9128 : 0 : if (call_expr_nargs (_p1) == 1)
9129 : : {
9130 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9131 : 0 : {
9132 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9133 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_LOG);
9134 : 0 : if (res) return res;
9135 : : }
9136 : : }
9137 : : break;
9138 : : default:;
9139 : : }
9140 : : break;
9141 : : default:;
9142 : : }
9143 : : }
9144 : : break;
9145 : 0 : case CFN_LOG2:
9146 : 0 : if (call_expr_nargs (_p0) == 1)
9147 : : {
9148 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9149 : 0 : switch (TREE_CODE (_p1))
9150 : : {
9151 : 0 : case CALL_EXPR:
9152 : 0 : switch (get_call_combined_fn (_p1))
9153 : : {
9154 : 0 : case CFN_LOG2:
9155 : 0 : if (call_expr_nargs (_p1) == 1)
9156 : : {
9157 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9158 : 0 : {
9159 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9160 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_LOG2);
9161 : 0 : if (res) return res;
9162 : : }
9163 : : }
9164 : : break;
9165 : : default:;
9166 : : }
9167 : : break;
9168 : : default:;
9169 : : }
9170 : : }
9171 : : break;
9172 : 0 : case CFN_LOG10:
9173 : 0 : if (call_expr_nargs (_p0) == 1)
9174 : : {
9175 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9176 : 0 : switch (TREE_CODE (_p1))
9177 : : {
9178 : 0 : case CALL_EXPR:
9179 : 0 : switch (get_call_combined_fn (_p1))
9180 : : {
9181 : 0 : case CFN_LOG10:
9182 : 0 : if (call_expr_nargs (_p1) == 1)
9183 : : {
9184 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9185 : 0 : {
9186 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9187 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_LOG10);
9188 : 0 : if (res) return res;
9189 : : }
9190 : : }
9191 : : break;
9192 : : default:;
9193 : : }
9194 : : break;
9195 : : default:;
9196 : : }
9197 : : }
9198 : : break;
9199 : 6 : case CFN_BUILT_IN_LOG10:
9200 : 6 : if (call_expr_nargs (_p0) == 1)
9201 : : {
9202 : 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9203 : 6 : switch (TREE_CODE (_p1))
9204 : : {
9205 : 2 : case CALL_EXPR:
9206 : 2 : switch (get_call_combined_fn (_p1))
9207 : : {
9208 : 2 : case CFN_BUILT_IN_LOG10:
9209 : 2 : if (call_expr_nargs (_p1) == 1)
9210 : : {
9211 : 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9212 : 2 : {
9213 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9214 : 2 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10);
9215 : 2 : if (res) return res;
9216 : : }
9217 : : }
9218 : : break;
9219 : : default:;
9220 : : }
9221 : : break;
9222 : : default:;
9223 : : }
9224 : : }
9225 : : break;
9226 : 0 : case CFN_BUILT_IN_LOG2F:
9227 : 0 : if (call_expr_nargs (_p0) == 1)
9228 : : {
9229 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9230 : 0 : switch (TREE_CODE (_p1))
9231 : : {
9232 : 0 : case CALL_EXPR:
9233 : 0 : switch (get_call_combined_fn (_p1))
9234 : : {
9235 : 0 : case CFN_BUILT_IN_LOG2F:
9236 : 0 : if (call_expr_nargs (_p1) == 1)
9237 : : {
9238 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9239 : 0 : {
9240 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9241 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F);
9242 : 0 : if (res) return res;
9243 : : }
9244 : : }
9245 : : break;
9246 : : default:;
9247 : : }
9248 : : break;
9249 : : default:;
9250 : : }
9251 : : }
9252 : : break;
9253 : 0 : case CFN_BUILT_IN_LOG2L:
9254 : 0 : if (call_expr_nargs (_p0) == 1)
9255 : : {
9256 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9257 : 0 : switch (TREE_CODE (_p1))
9258 : : {
9259 : 0 : case CALL_EXPR:
9260 : 0 : switch (get_call_combined_fn (_p1))
9261 : : {
9262 : 0 : case CFN_BUILT_IN_LOG2L:
9263 : 0 : if (call_expr_nargs (_p1) == 1)
9264 : : {
9265 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9266 : 0 : {
9267 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9268 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L);
9269 : 0 : if (res) return res;
9270 : : }
9271 : : }
9272 : : break;
9273 : : default:;
9274 : : }
9275 : : break;
9276 : : default:;
9277 : : }
9278 : : }
9279 : : break;
9280 : : default:;
9281 : : }
9282 : : break;
9283 : 20067433 : default:;
9284 : : }
9285 : 20067433 : switch (TREE_CODE (_p1))
9286 : : {
9287 : 6654 : case BIT_AND_EXPR:
9288 : 6654 : {
9289 : 6654 : tree _q30 = TREE_OPERAND (_p1, 0);
9290 : 6654 : tree _q31 = TREE_OPERAND (_p1, 1);
9291 : 6654 : switch (TREE_CODE (_q30))
9292 : : {
9293 : 80 : case MAX_EXPR:
9294 : 80 : {
9295 : 80 : tree _q40 = TREE_OPERAND (_q30, 0);
9296 : 80 : tree _q41 = TREE_OPERAND (_q30, 1);
9297 : 80 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
9298 : : {
9299 : 80 : switch (TREE_CODE (_q41))
9300 : : {
9301 : 80 : case INTEGER_CST:
9302 : 80 : {
9303 : 80 : switch (TREE_CODE (_q31))
9304 : : {
9305 : 72 : case INTEGER_CST:
9306 : 72 : {
9307 : 72 : {
9308 : 72 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
9309 : 72 : {
9310 : 72 : auto i = wi::neg (wi::to_wide (captures[2]));
9311 : 72 : if (wi::popcount (i) == 1
9312 : 200 : && (wi::to_wide (captures[1])) == (i - 1)
9313 : : )
9314 : : {
9315 : 40 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
9316 : : )
9317 : : {
9318 : 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1363;
9319 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1363;
9320 : 8 : {
9321 : 8 : tree res_op0;
9322 : 8 : res_op0 = captures[0];
9323 : 8 : tree res_op1;
9324 : 8 : res_op1 = captures[1];
9325 : 8 : tree _r;
9326 : 8 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
9327 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 959, __FILE__, __LINE__, true);
9328 : 8 : return _r;
9329 : : }
9330 : 64 : next_after_fail1363:;
9331 : : }
9332 : : else
9333 : : {
9334 : 32 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1364;
9335 : 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1364;
9336 : 32 : {
9337 : 32 : if (! tree_invariant_p (captures[0])) goto next_after_fail1364;
9338 : 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail1364;
9339 : 0 : tree res_op0;
9340 : 0 : {
9341 : 0 : tree _o1[2], _r1;
9342 : 0 : _o1[0] = unshare_expr (captures[0]);
9343 : 0 : _o1[1] = unshare_expr (captures[1]);
9344 : 0 : _r1 = fold_build2_loc (loc, LE_EXPR, boolean_type_node, _o1[0], _o1[1]);
9345 : 0 : res_op0 = _r1;
9346 : : }
9347 : 0 : tree res_op1;
9348 : 0 : res_op1 = unshare_expr (captures[0]);
9349 : 0 : tree res_op2;
9350 : 0 : {
9351 : 0 : tree _o1[2], _r1;
9352 : 0 : _o1[0] = captures[0];
9353 : 0 : _o1[1] = captures[1];
9354 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9355 : 0 : res_op2 = _r1;
9356 : : }
9357 : 0 : tree _r;
9358 : 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
9359 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 960, __FILE__, __LINE__, true);
9360 : 0 : return _r;
9361 : : }
9362 : 64 : next_after_fail1364:;
9363 : : }
9364 : : }
9365 : 8 : }
9366 : : }
9367 : 64 : break;
9368 : : }
9369 : : default:;
9370 : : }
9371 : : break;
9372 : : }
9373 : : default:;
9374 : : }
9375 : : }
9376 : : break;
9377 : : }
9378 : : default:;
9379 : : }
9380 : : break;
9381 : : }
9382 : 20067425 : default:;
9383 : : }
9384 : 20067425 : switch (TREE_CODE (_p0))
9385 : : {
9386 : 0 : case VEC_PERM_EXPR:
9387 : 0 : {
9388 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9389 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9390 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9391 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
9392 : : {
9393 : 0 : switch (TREE_CODE (_p1))
9394 : : {
9395 : 0 : case VEC_PERM_EXPR:
9396 : 0 : {
9397 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9398 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9399 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9400 : 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
9401 : : {
9402 : 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
9403 : : {
9404 : 0 : {
9405 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
9406 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
9407 : : )
9408 : : {
9409 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1365;
9410 : 0 : {
9411 : 0 : tree res_op0;
9412 : 0 : {
9413 : 0 : tree _o1[2], _r1;
9414 : 0 : _o1[0] = captures[0];
9415 : 0 : _o1[1] = captures[2];
9416 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9417 : 0 : captures[3] = _r1;
9418 : : }
9419 : 0 : res_op0 = unshare_expr (captures[3]);
9420 : 0 : tree res_op1;
9421 : 0 : res_op1 = captures[3];
9422 : 0 : tree res_op2;
9423 : 0 : res_op2 = captures[1];
9424 : 0 : tree _r;
9425 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
9426 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 922, __FILE__, __LINE__, true);
9427 : 0 : return _r;
9428 : : }
9429 : 0 : next_after_fail1365:;
9430 : : }
9431 : : }
9432 : : }
9433 : : }
9434 : : break;
9435 : : }
9436 : 0 : default:;
9437 : : }
9438 : 0 : switch (TREE_CODE (_q22))
9439 : : {
9440 : 0 : case VECTOR_CST:
9441 : 0 : {
9442 : 0 : switch (TREE_CODE (_p1))
9443 : : {
9444 : 0 : case VEC_PERM_EXPR:
9445 : 0 : {
9446 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9447 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9448 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9449 : 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
9450 : : {
9451 : 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
9452 : : {
9453 : 0 : switch (TREE_CODE (_q62))
9454 : : {
9455 : 0 : case VECTOR_CST:
9456 : 0 : {
9457 : 0 : {
9458 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
9459 : 0 : tree res = generic_simplify_39 (loc, type, _p0, _p1, captures, MINUS_EXPR);
9460 : 0 : if (res) return res;
9461 : : }
9462 : 0 : break;
9463 : : }
9464 : : default:;
9465 : : }
9466 : : }
9467 : : }
9468 : : break;
9469 : : }
9470 : : default:;
9471 : : }
9472 : : break;
9473 : : }
9474 : : default:;
9475 : : }
9476 : : }
9477 : : break;
9478 : : }
9479 : : default:;
9480 : : }
9481 : : return NULL_TREE;
9482 : : }
9483 : :
9484 : : tree
9485 : 1229767 : generic_simplify_LSHIFT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9486 : : {
9487 : 1229767 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9488 : 1229767 : switch (TREE_CODE (_p1))
9489 : : {
9490 : 305 : case TRUNC_MOD_EXPR:
9491 : 305 : {
9492 : 305 : tree _q30 = TREE_OPERAND (_p1, 0);
9493 : 305 : tree _q31 = TREE_OPERAND (_p1, 1);
9494 : 305 : {
9495 : 305 : tree _q31_pops[1];
9496 : 305 : if (tree_power_of_two_cand (_q31, _q31_pops))
9497 : : {
9498 : 299 : tree _q50 = _q31_pops[0];
9499 : 299 : {
9500 : 299 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9501 : 299 : tree res = generic_simplify_406 (loc, type, _p0, _p1, captures, LSHIFT_EXPR, TRUNC_MOD_EXPR);
9502 : 299 : if (res) return res;
9503 : : }
9504 : : }
9505 : : }
9506 : 75 : break;
9507 : : }
9508 : 0 : case FLOOR_MOD_EXPR:
9509 : 0 : {
9510 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9511 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9512 : 0 : {
9513 : 0 : tree _q31_pops[1];
9514 : 0 : if (tree_power_of_two_cand (_q31, _q31_pops))
9515 : : {
9516 : 0 : tree _q50 = _q31_pops[0];
9517 : 0 : {
9518 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9519 : 0 : tree res = generic_simplify_406 (loc, type, _p0, _p1, captures, LSHIFT_EXPR, FLOOR_MOD_EXPR);
9520 : 0 : if (res) return res;
9521 : : }
9522 : : }
9523 : : }
9524 : 0 : break;
9525 : : }
9526 : 1229537 : default:;
9527 : : }
9528 : 1229537 : if (uniform_integer_cst_p (_p1))
9529 : : {
9530 : 825205 : {
9531 : 825205 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9532 : 825205 : tree res = generic_simplify_407 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9533 : 825205 : if (res) return res;
9534 : : }
9535 : : }
9536 : 1229072 : switch (TREE_CODE (_p0))
9537 : : {
9538 : 674568 : CASE_CONVERT:
9539 : 674568 : {
9540 : 674568 : tree _q20 = TREE_OPERAND (_p0, 0);
9541 : 674568 : switch (TREE_CODE (_q20))
9542 : : {
9543 : 4 : case LT_EXPR:
9544 : 4 : {
9545 : 4 : tree _q30 = TREE_OPERAND (_q20, 0);
9546 : 4 : tree _q31 = TREE_OPERAND (_q20, 1);
9547 : 4 : if (integer_zerop (_q31))
9548 : : {
9549 : 4 : switch (TREE_CODE (_p1))
9550 : : {
9551 : 4 : case INTEGER_CST:
9552 : 4 : {
9553 : 4 : {
9554 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
9555 : 4 : if (TYPE_SIGN (TREE_TYPE (captures[0])) == SIGNED
9556 : 4 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (TREE_TYPE (captures[0])) - 1)
9557 : : )
9558 : : {
9559 : 0 : {
9560 : 0 : wide_int wone = wi::one (TYPE_PRECISION (type));
9561 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1793;
9562 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1793;
9563 : 0 : {
9564 : 0 : tree res_op0;
9565 : 0 : {
9566 : 0 : tree _o1[1], _r1;
9567 : 0 : _o1[0] = captures[0];
9568 : 0 : if (TREE_TYPE (_o1[0]) != type)
9569 : : {
9570 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
9571 : : }
9572 : : else
9573 : : _r1 = _o1[0];
9574 : 0 : res_op0 = _r1;
9575 : : }
9576 : 0 : tree res_op1;
9577 : 0 : res_op1 = wide_int_to_tree (type,
9578 : 0 : wi::lshift (wone, wi::to_wide (captures[2])));
9579 : 0 : tree _r;
9580 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
9581 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
9582 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
9583 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1030, __FILE__, __LINE__, true);
9584 : 0 : return _r;
9585 : : }
9586 : 0 : next_after_fail1793:;
9587 : 0 : }
9588 : : }
9589 : : }
9590 : 4 : break;
9591 : : }
9592 : : default:;
9593 : : }
9594 : : }
9595 : : break;
9596 : : }
9597 : 123 : CASE_CONVERT:
9598 : 123 : {
9599 : 123 : tree _q30 = TREE_OPERAND (_q20, 0);
9600 : 123 : switch (TREE_CODE (_q30))
9601 : : {
9602 : 0 : case RSHIFT_EXPR:
9603 : 0 : {
9604 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9605 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
9606 : 0 : switch (TREE_CODE (_q41))
9607 : : {
9608 : 0 : case INTEGER_CST:
9609 : 0 : {
9610 : 0 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q41, 0) && types_match (_p1, _q41)))
9611 : : {
9612 : 0 : {
9613 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
9614 : 0 : if (wi::ltu_p (wi::to_wide (captures[2]), element_precision (type))
9615 : 0 : && INTEGRAL_TYPE_P (type)
9616 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
9617 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
9618 : 0 : && TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (captures[1]))
9619 : 0 : && (TYPE_PRECISION (TREE_TYPE (captures[0])) >= TYPE_PRECISION (type)
9620 : 0 : || wi::geu_p (wi::to_wide (captures[2]),
9621 : 0 : TYPE_PRECISION (type)
9622 : 0 : - TYPE_PRECISION (TREE_TYPE (captures[0]))))
9623 : : )
9624 : : {
9625 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1794;
9626 : 0 : {
9627 : 0 : tree res_op0;
9628 : 0 : {
9629 : 0 : tree _o1[1], _r1;
9630 : 0 : _o1[0] = captures[1];
9631 : 0 : if (TREE_TYPE (_o1[0]) != type)
9632 : : {
9633 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
9634 : : }
9635 : : else
9636 : : _r1 = _o1[0];
9637 : 0 : res_op0 = _r1;
9638 : : }
9639 : 0 : tree res_op1;
9640 : 0 : {
9641 : 0 : tree _o1[2], _r1;
9642 : 0 : _o1[0] = build_minus_one_cst (type);
9643 : 0 : _o1[1] = captures[2];
9644 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9645 : 0 : res_op1 = _r1;
9646 : : }
9647 : 0 : tree _r;
9648 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
9649 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1031, __FILE__, __LINE__, true);
9650 : 0 : return _r;
9651 : : }
9652 : 0 : next_after_fail1794:;
9653 : : }
9654 : : }
9655 : : }
9656 : : break;
9657 : : }
9658 : : default:;
9659 : : }
9660 : : break;
9661 : : }
9662 : : default:;
9663 : : }
9664 : : break;
9665 : : }
9666 : : default:;
9667 : : }
9668 : : break;
9669 : : }
9670 : 20496 : case RSHIFT_EXPR:
9671 : 20496 : {
9672 : 20496 : tree _q20 = TREE_OPERAND (_p0, 0);
9673 : 20496 : tree _q21 = TREE_OPERAND (_p0, 1);
9674 : 20496 : switch (TREE_CODE (_q21))
9675 : : {
9676 : 48 : case INTEGER_CST:
9677 : 48 : {
9678 : 48 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9679 : : {
9680 : 3 : {
9681 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9682 : 3 : tree res = generic_simplify_408 (loc, type, _p0, _p1, captures);
9683 : 3 : if (res) return res;
9684 : : }
9685 : : }
9686 : : break;
9687 : : }
9688 : : default:;
9689 : : }
9690 : : break;
9691 : : }
9692 : 1229069 : default:;
9693 : : }
9694 : 1229069 : {
9695 : 1229069 : tree _p0_pops[1];
9696 : 1229069 : if (tree_nop_convert (_p0, _p0_pops))
9697 : : {
9698 : 645771 : tree _q20 = _p0_pops[0];
9699 : 645771 : switch (TREE_CODE (_q20))
9700 : : {
9701 : 73 : case RSHIFT_EXPR:
9702 : 73 : {
9703 : 73 : tree _q30 = TREE_OPERAND (_q20, 0);
9704 : 73 : tree _q31 = TREE_OPERAND (_q20, 1);
9705 : 73 : switch (TREE_CODE (_q31))
9706 : : {
9707 : 67 : case INTEGER_CST:
9708 : 67 : {
9709 : 67 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
9710 : : {
9711 : 8 : {
9712 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
9713 : 8 : tree res = generic_simplify_408 (loc, type, _p0, _p1, captures);
9714 : 8 : if (res) return res;
9715 : : }
9716 : : }
9717 : : break;
9718 : : }
9719 : : default:;
9720 : : }
9721 : : break;
9722 : : }
9723 : : default:;
9724 : : }
9725 : : }
9726 : : }
9727 : 1229061 : if (integer_onep (_p0))
9728 : : {
9729 : 338526 : switch (TREE_CODE (_p1))
9730 : : {
9731 : 51233 : case MINUS_EXPR:
9732 : 51233 : {
9733 : 51233 : tree _q30 = TREE_OPERAND (_p1, 0);
9734 : 51233 : tree _q31 = TREE_OPERAND (_p1, 1);
9735 : 51233 : switch (TREE_CODE (_q30))
9736 : : {
9737 : 51230 : case INTEGER_CST:
9738 : 51230 : {
9739 : 51230 : {
9740 : 51230 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
9741 : 51230 : if (INTEGRAL_TYPE_P (type)
9742 : 51230 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
9743 : 51230 : && single_use (captures[1])
9744 : : )
9745 : : {
9746 : 30381 : if (TYPE_UNSIGNED (type)
9747 : : )
9748 : : {
9749 : 30375 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1795;
9750 : 30375 : {
9751 : 30375 : tree res_op0;
9752 : 30375 : {
9753 : 30375 : tree _o1[2], _r1;
9754 : 30375 : _o1[0] = captures[0];
9755 : 30375 : _o1[1] = captures[2];
9756 : 30375 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9757 : 30375 : res_op0 = _r1;
9758 : : }
9759 : 30375 : tree res_op1;
9760 : 30375 : res_op1 = captures[3];
9761 : 30375 : tree _r;
9762 : 30375 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
9763 : 30375 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1032, __FILE__, __LINE__, true);
9764 : 30375 : return _r;
9765 : : }
9766 : 0 : next_after_fail1795:;
9767 : : }
9768 : : else
9769 : : {
9770 : 6 : {
9771 : 6 : tree utype = unsigned_type_for (type);
9772 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1796;
9773 : 6 : {
9774 : 6 : tree res_op0;
9775 : 6 : {
9776 : 6 : tree _o1[2], _r1;
9777 : 6 : {
9778 : 6 : tree _o2[2], _r2;
9779 : 6 : {
9780 : 6 : tree _o3[1], _r3;
9781 : 6 : _o3[0] = captures[0];
9782 : 6 : if (TREE_TYPE (_o3[0]) != utype)
9783 : : {
9784 : 6 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
9785 : : }
9786 : : else
9787 : : _r3 = _o3[0];
9788 : 6 : _o2[0] = _r3;
9789 : : }
9790 : 6 : _o2[1] = captures[2];
9791 : 6 : _r2 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
9792 : 6 : _o1[0] = _r2;
9793 : : }
9794 : 6 : _o1[1] = captures[3];
9795 : 6 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9796 : 6 : res_op0 = _r1;
9797 : : }
9798 : 6 : tree _r;
9799 : 6 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
9800 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1033, __FILE__, __LINE__, true);
9801 : 6 : return _r;
9802 : : }
9803 : 0 : next_after_fail1796:;
9804 : : }
9805 : : }
9806 : : }
9807 : : }
9808 : 20849 : break;
9809 : : }
9810 : : default:;
9811 : : }
9812 : : break;
9813 : : }
9814 : : default:;
9815 : : }
9816 : : }
9817 : 1198680 : if (integer_zerop (_p1))
9818 : : {
9819 : 1050 : {
9820 : 1050 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9821 : 1050 : tree res = generic_simplify_409 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9822 : 1050 : if (res) return res;
9823 : : }
9824 : : }
9825 : 1197630 : if (integer_zerop (_p0))
9826 : : {
9827 : 210 : {
9828 : 210 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9829 : 210 : tree res = generic_simplify_410 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9830 : 210 : if (res) return res;
9831 : : }
9832 : : }
9833 : 1197420 : switch (TREE_CODE (_p1))
9834 : : {
9835 : 0 : case VECTOR_CST:
9836 : 0 : {
9837 : 0 : {
9838 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9839 : 0 : tree res = generic_simplify_411 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9840 : 0 : if (res) return res;
9841 : : }
9842 : 0 : break;
9843 : : }
9844 : 0 : case CONSTRUCTOR:
9845 : 0 : {
9846 : 0 : {
9847 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9848 : 0 : tree res = generic_simplify_412 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9849 : 0 : if (res) return res;
9850 : : }
9851 : 0 : break;
9852 : : }
9853 : 1197420 : default:;
9854 : : }
9855 : 1197420 : switch (TREE_CODE (_p0))
9856 : : {
9857 : 280 : case LSHIFT_EXPR:
9858 : 280 : {
9859 : 280 : tree _q20 = TREE_OPERAND (_p0, 0);
9860 : 280 : tree _q21 = TREE_OPERAND (_p0, 1);
9861 : 280 : switch (TREE_CODE (_q21))
9862 : : {
9863 : 39 : case INTEGER_CST:
9864 : 39 : {
9865 : 39 : switch (TREE_CODE (_p1))
9866 : : {
9867 : 39 : case INTEGER_CST:
9868 : 39 : {
9869 : 39 : {
9870 : 39 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9871 : 39 : tree res = generic_simplify_413 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9872 : 39 : if (res) return res;
9873 : : }
9874 : 0 : break;
9875 : : }
9876 : : default:;
9877 : : }
9878 : : break;
9879 : : }
9880 : : default:;
9881 : : }
9882 : : break;
9883 : : }
9884 : 674413 : CASE_CONVERT:
9885 : 674413 : {
9886 : 674413 : tree _q20 = TREE_OPERAND (_p0, 0);
9887 : 674413 : switch (TREE_CODE (_q20))
9888 : : {
9889 : 0 : case BIT_AND_EXPR:
9890 : 0 : {
9891 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
9892 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
9893 : 0 : switch (TREE_CODE (_q31))
9894 : : {
9895 : 0 : case INTEGER_CST:
9896 : 0 : {
9897 : 0 : switch (TREE_CODE (_p1))
9898 : : {
9899 : 0 : case INTEGER_CST:
9900 : 0 : {
9901 : 0 : {
9902 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9903 : 0 : tree res = generic_simplify_414 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, LSHIFT_EXPR);
9904 : 0 : if (res) return res;
9905 : : }
9906 : 0 : break;
9907 : : }
9908 : : default:;
9909 : : }
9910 : : break;
9911 : : }
9912 : : default:;
9913 : : }
9914 : : break;
9915 : : }
9916 : 11 : case BIT_XOR_EXPR:
9917 : 11 : {
9918 : 11 : tree _q30 = TREE_OPERAND (_q20, 0);
9919 : 11 : tree _q31 = TREE_OPERAND (_q20, 1);
9920 : 11 : switch (TREE_CODE (_q31))
9921 : : {
9922 : 0 : case INTEGER_CST:
9923 : 0 : {
9924 : 0 : switch (TREE_CODE (_p1))
9925 : : {
9926 : 0 : case INTEGER_CST:
9927 : 0 : {
9928 : 0 : {
9929 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9930 : 0 : tree res = generic_simplify_414 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, LSHIFT_EXPR);
9931 : 0 : if (res) return res;
9932 : : }
9933 : 0 : break;
9934 : : }
9935 : : default:;
9936 : : }
9937 : : break;
9938 : : }
9939 : : default:;
9940 : : }
9941 : : break;
9942 : : }
9943 : 18 : case BIT_IOR_EXPR:
9944 : 18 : {
9945 : 18 : tree _q30 = TREE_OPERAND (_q20, 0);
9946 : 18 : tree _q31 = TREE_OPERAND (_q20, 1);
9947 : 18 : switch (TREE_CODE (_q31))
9948 : : {
9949 : 11 : case INTEGER_CST:
9950 : 11 : {
9951 : 11 : switch (TREE_CODE (_p1))
9952 : : {
9953 : 11 : case INTEGER_CST:
9954 : 11 : {
9955 : 11 : {
9956 : 11 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9957 : 11 : tree res = generic_simplify_414 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, LSHIFT_EXPR);
9958 : 11 : if (res) return res;
9959 : : }
9960 : 2 : break;
9961 : : }
9962 : : default:;
9963 : : }
9964 : : break;
9965 : : }
9966 : : default:;
9967 : : }
9968 : : break;
9969 : : }
9970 : : default:;
9971 : : }
9972 : : break;
9973 : : }
9974 : 15324 : case BIT_AND_EXPR:
9975 : 15324 : {
9976 : 15324 : tree _q20 = TREE_OPERAND (_p0, 0);
9977 : 15324 : tree _q21 = TREE_OPERAND (_p0, 1);
9978 : 15324 : switch (TREE_CODE (_q21))
9979 : : {
9980 : 15229 : case INTEGER_CST:
9981 : 15229 : {
9982 : 15229 : switch (TREE_CODE (_p1))
9983 : : {
9984 : 15090 : case INTEGER_CST:
9985 : 15090 : {
9986 : 15090 : {
9987 : 15090 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9988 : 15090 : tree res = generic_simplify_415 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, LSHIFT_EXPR);
9989 : 15090 : if (res) return res;
9990 : : }
9991 : 7 : break;
9992 : : }
9993 : : default:;
9994 : : }
9995 : : break;
9996 : : }
9997 : : default:;
9998 : : }
9999 : : break;
10000 : : }
10001 : 69 : case BIT_XOR_EXPR:
10002 : 69 : {
10003 : 69 : tree _q20 = TREE_OPERAND (_p0, 0);
10004 : 69 : tree _q21 = TREE_OPERAND (_p0, 1);
10005 : 69 : switch (TREE_CODE (_q21))
10006 : : {
10007 : 0 : case INTEGER_CST:
10008 : 0 : {
10009 : 0 : switch (TREE_CODE (_p1))
10010 : : {
10011 : 0 : case INTEGER_CST:
10012 : 0 : {
10013 : 0 : {
10014 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
10015 : 0 : tree res = generic_simplify_415 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, LSHIFT_EXPR);
10016 : 0 : if (res) return res;
10017 : : }
10018 : 0 : break;
10019 : : }
10020 : : default:;
10021 : : }
10022 : : break;
10023 : : }
10024 : : default:;
10025 : : }
10026 : : break;
10027 : : }
10028 : 78 : case BIT_IOR_EXPR:
10029 : 78 : {
10030 : 78 : tree _q20 = TREE_OPERAND (_p0, 0);
10031 : 78 : tree _q21 = TREE_OPERAND (_p0, 1);
10032 : 78 : switch (TREE_CODE (_q21))
10033 : : {
10034 : 2 : case INTEGER_CST:
10035 : 2 : {
10036 : 2 : switch (TREE_CODE (_p1))
10037 : : {
10038 : 2 : case INTEGER_CST:
10039 : 2 : {
10040 : 2 : {
10041 : 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
10042 : 2 : tree res = generic_simplify_415 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, LSHIFT_EXPR);
10043 : 2 : if (res) return res;
10044 : : }
10045 : 0 : break;
10046 : : }
10047 : : default:;
10048 : : }
10049 : : break;
10050 : : }
10051 : : default:;
10052 : : }
10053 : : break;
10054 : : }
10055 : 1 : case VEC_COND_EXPR:
10056 : 1 : {
10057 : 1 : tree _q20 = TREE_OPERAND (_p0, 0);
10058 : 1 : tree _q21 = TREE_OPERAND (_p0, 1);
10059 : 1 : tree _q22 = TREE_OPERAND (_p0, 2);
10060 : 1 : switch (TREE_CODE (_p1))
10061 : : {
10062 : 0 : case VEC_COND_EXPR:
10063 : 0 : {
10064 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10065 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10066 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10067 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10068 : : {
10069 : 0 : {
10070 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10071 : 0 : if (VECTOR_TYPE_P (type)
10072 : 0 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
10073 : : || types_match (type, TREE_TYPE (captures[2]))
10074 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10075 : : || (optimize_vectors_before_lowering_p ()
10076 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10077 : : )
10078 : : {
10079 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1797;
10080 : 0 : {
10081 : 0 : tree res_op0;
10082 : 0 : res_op0 = captures[1];
10083 : 0 : tree res_op1;
10084 : 0 : {
10085 : 0 : tree _o1[2], _r1;
10086 : 0 : _o1[0] = captures[2];
10087 : 0 : _o1[1] = captures[5];
10088 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10089 : 0 : if (EXPR_P (_r1))
10090 : 0 : goto next_after_fail1797;
10091 : 0 : res_op1 = _r1;
10092 : : }
10093 : 0 : tree res_op2;
10094 : 0 : {
10095 : 0 : tree _o1[2], _r1;
10096 : 0 : _o1[0] = captures[3];
10097 : 0 : _o1[1] = captures[6];
10098 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10099 : 0 : if (EXPR_P (_r1))
10100 : 0 : goto next_after_fail1797;
10101 : 0 : res_op2 = _r1;
10102 : : }
10103 : 0 : tree _r;
10104 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10105 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
10106 : 0 : return _r;
10107 : : }
10108 : 0 : next_after_fail1797:;
10109 : : }
10110 : : }
10111 : : }
10112 : : break;
10113 : : }
10114 : 1 : default:;
10115 : : }
10116 : 1 : {
10117 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10118 : 1 : if (VECTOR_TYPE_P (type)
10119 : 1 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
10120 : : || types_match (type, TREE_TYPE (captures[2]))
10121 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10122 : : || (optimize_vectors_before_lowering_p ()
10123 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10124 : : )
10125 : : {
10126 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1798;
10127 : 1 : {
10128 : 1 : if (! tree_invariant_p (captures[4])) goto next_after_fail1798;
10129 : 0 : tree res_op0;
10130 : 0 : res_op0 = captures[1];
10131 : 0 : tree res_op1;
10132 : 0 : {
10133 : 0 : tree _o1[2], _r1;
10134 : 0 : _o1[0] = captures[2];
10135 : 0 : _o1[1] = unshare_expr (captures[4]);
10136 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10137 : 0 : if (EXPR_P (_r1))
10138 : 0 : goto next_after_fail1798;
10139 : 0 : res_op1 = _r1;
10140 : : }
10141 : 0 : tree res_op2;
10142 : 0 : {
10143 : 0 : tree _o1[2], _r1;
10144 : 0 : _o1[0] = captures[3];
10145 : 0 : _o1[1] = captures[4];
10146 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10147 : 0 : if (EXPR_P (_r1))
10148 : 0 : goto next_after_fail1798;
10149 : 0 : res_op2 = _r1;
10150 : : }
10151 : 0 : tree _r;
10152 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10153 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
10154 : 0 : return _r;
10155 : : }
10156 : 1 : next_after_fail1798:;
10157 : : }
10158 : : }
10159 : 1 : break;
10160 : : }
10161 : 1182287 : default:;
10162 : : }
10163 : 1182287 : switch (TREE_CODE (_p1))
10164 : : {
10165 : 3 : case VEC_COND_EXPR:
10166 : 3 : {
10167 : 3 : tree _q30 = TREE_OPERAND (_p1, 0);
10168 : 3 : tree _q31 = TREE_OPERAND (_p1, 1);
10169 : 3 : tree _q32 = TREE_OPERAND (_p1, 2);
10170 : 3 : {
10171 : 3 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10172 : 3 : if (VECTOR_TYPE_P (type)
10173 : 3 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
10174 : : || types_match (type, TREE_TYPE (captures[3]))
10175 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10176 : : || (optimize_vectors_before_lowering_p ()
10177 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10178 : : )
10179 : : {
10180 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1799;
10181 : 3 : {
10182 : 3 : if (! tree_invariant_p (captures[0])) goto next_after_fail1799;
10183 : 1 : tree res_op0;
10184 : 1 : res_op0 = captures[2];
10185 : 1 : tree res_op1;
10186 : 1 : {
10187 : 1 : tree _o1[2], _r1;
10188 : 1 : _o1[0] = unshare_expr (captures[0]);
10189 : 1 : _o1[1] = captures[3];
10190 : 1 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10191 : 1 : if (EXPR_P (_r1))
10192 : 0 : goto next_after_fail1799;
10193 : 1 : res_op1 = _r1;
10194 : : }
10195 : 1 : tree res_op2;
10196 : 1 : {
10197 : 1 : tree _o1[2], _r1;
10198 : 1 : _o1[0] = captures[0];
10199 : 1 : _o1[1] = captures[4];
10200 : 1 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10201 : 1 : if (EXPR_P (_r1))
10202 : 0 : goto next_after_fail1799;
10203 : 1 : res_op2 = _r1;
10204 : : }
10205 : 1 : tree _r;
10206 : 1 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10207 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
10208 : 1 : return _r;
10209 : : }
10210 : 2 : next_after_fail1799:;
10211 : : }
10212 : : }
10213 : 2 : break;
10214 : : }
10215 : 1182286 : default:;
10216 : : }
10217 : 1182286 : switch (TREE_CODE (_p0))
10218 : : {
10219 : 0 : case VEC_PERM_EXPR:
10220 : 0 : {
10221 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10222 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10223 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10224 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
10225 : : {
10226 : 0 : switch (TREE_CODE (_p1))
10227 : : {
10228 : 0 : case VEC_PERM_EXPR:
10229 : 0 : {
10230 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10231 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10232 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10233 : 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
10234 : : {
10235 : 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
10236 : : {
10237 : 0 : {
10238 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
10239 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
10240 : : )
10241 : : {
10242 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1800;
10243 : 0 : {
10244 : 0 : tree res_op0;
10245 : 0 : {
10246 : 0 : tree _o1[2], _r1;
10247 : 0 : _o1[0] = captures[0];
10248 : 0 : _o1[1] = captures[2];
10249 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10250 : 0 : captures[3] = _r1;
10251 : : }
10252 : 0 : res_op0 = unshare_expr (captures[3]);
10253 : 0 : tree res_op1;
10254 : 0 : res_op1 = captures[3];
10255 : 0 : tree res_op2;
10256 : 0 : res_op2 = captures[1];
10257 : 0 : tree _r;
10258 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
10259 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 922, __FILE__, __LINE__, true);
10260 : 0 : return _r;
10261 : : }
10262 : 0 : next_after_fail1800:;
10263 : : }
10264 : : }
10265 : : }
10266 : : }
10267 : : break;
10268 : : }
10269 : : default:;
10270 : : }
10271 : : }
10272 : : break;
10273 : : }
10274 : : default:;
10275 : : }
10276 : : return NULL_TREE;
10277 : : }
10278 : :
10279 : : tree
10280 : 84551 : generic_simplify_MIN_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10281 : : {
10282 : 84551 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10283 : 84551 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10284 : : {
10285 : 0 : {
10286 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10287 : 0 : tree res = generic_simplify_506 (loc, type, _p0, _p1, captures, MIN_EXPR);
10288 : 0 : if (res) return res;
10289 : : }
10290 : : }
10291 : 84551 : switch (TREE_CODE (_p0))
10292 : : {
10293 : 4 : case MIN_EXPR:
10294 : 4 : {
10295 : 4 : tree _q20 = TREE_OPERAND (_p0, 0);
10296 : 4 : tree _q21 = TREE_OPERAND (_p0, 1);
10297 : 4 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10298 : : {
10299 : 0 : {
10300 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10301 : 0 : tree res = generic_simplify_507 (loc, type, _p0, _p1, captures, MIN_EXPR);
10302 : 0 : if (res) return res;
10303 : : }
10304 : : }
10305 : 4 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10306 : : {
10307 : 0 : {
10308 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10309 : 0 : tree res = generic_simplify_507 (loc, type, _p0, _p1, captures, MIN_EXPR);
10310 : 0 : if (res) return res;
10311 : : }
10312 : : }
10313 : : break;
10314 : : }
10315 : 84551 : default:;
10316 : : }
10317 : 84551 : switch (TREE_CODE (_p1))
10318 : : {
10319 : 0 : case MIN_EXPR:
10320 : 0 : {
10321 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10322 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10323 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10324 : : {
10325 : 0 : {
10326 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
10327 : 0 : tree res = generic_simplify_508 (loc, type, _p0, _p1, captures, MIN_EXPR);
10328 : 0 : if (res) return res;
10329 : : }
10330 : : }
10331 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10332 : : {
10333 : 0 : {
10334 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q30 };
10335 : 0 : tree res = generic_simplify_508 (loc, type, _p0, _p1, captures, MIN_EXPR);
10336 : 0 : if (res) return res;
10337 : : }
10338 : : }
10339 : : break;
10340 : : }
10341 : 84551 : default:;
10342 : : }
10343 : 84551 : switch (TREE_CODE (_p0))
10344 : : {
10345 : 4 : case MAX_EXPR:
10346 : 4 : {
10347 : 4 : tree _q20 = TREE_OPERAND (_p0, 0);
10348 : 4 : tree _q21 = TREE_OPERAND (_p0, 1);
10349 : 4 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10350 : : {
10351 : 3 : {
10352 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10353 : 3 : tree res = generic_simplify_509 (loc, type, _p0, _p1, captures);
10354 : 3 : if (res) return res;
10355 : : }
10356 : : }
10357 : 1 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10358 : : {
10359 : 1 : {
10360 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10361 : 1 : tree res = generic_simplify_509 (loc, type, _p0, _p1, captures);
10362 : 1 : if (res) return res;
10363 : : }
10364 : : }
10365 : : break;
10366 : : }
10367 : 84547 : default:;
10368 : : }
10369 : 84547 : switch (TREE_CODE (_p1))
10370 : : {
10371 : 0 : case MAX_EXPR:
10372 : 0 : {
10373 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10374 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10375 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10376 : : {
10377 : 0 : {
10378 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
10379 : 0 : tree res = generic_simplify_509 (loc, type, _p0, _p1, captures);
10380 : 0 : if (res) return res;
10381 : : }
10382 : : }
10383 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10384 : : {
10385 : 0 : {
10386 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
10387 : 0 : tree res = generic_simplify_509 (loc, type, _p0, _p1, captures);
10388 : 0 : if (res) return res;
10389 : : }
10390 : : }
10391 : : break;
10392 : : }
10393 : 0 : case NEGATE_EXPR:
10394 : 0 : {
10395 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10396 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10397 : : {
10398 : 0 : {
10399 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10400 : 0 : tree res = generic_simplify_510 (loc, type, _p0, _p1, captures);
10401 : 0 : if (res) return res;
10402 : : }
10403 : : }
10404 : : break;
10405 : : }
10406 : 84547 : default:;
10407 : : }
10408 : 84547 : switch (TREE_CODE (_p0))
10409 : : {
10410 : 2 : case NEGATE_EXPR:
10411 : 2 : {
10412 : 2 : tree _q20 = TREE_OPERAND (_p0, 0);
10413 : 2 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10414 : : {
10415 : 2 : {
10416 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10417 : 2 : tree res = generic_simplify_510 (loc, type, _p0, _p1, captures);
10418 : 2 : if (res) return res;
10419 : : }
10420 : : }
10421 : : break;
10422 : : }
10423 : 84545 : default:;
10424 : : }
10425 : 84545 : {
10426 : 84545 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10427 : 84545 : if (INTEGRAL_TYPE_P (type)
10428 : 82759 : && TYPE_MIN_VALUE (type)
10429 : 167304 : && operand_equal_p (captures[1], TYPE_MIN_VALUE (type), OEP_ONLY_CONST)
10430 : : )
10431 : : {
10432 : 540 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1864;
10433 : 540 : {
10434 : 540 : tree _r;
10435 : 540 : _r = captures[1];
10436 : 540 : if (TREE_SIDE_EFFECTS (captures[0]))
10437 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
10438 : 540 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1048, __FILE__, __LINE__, true);
10439 : 540 : return _r;
10440 : : }
10441 : 0 : next_after_fail1864:;
10442 : : }
10443 : : else
10444 : : {
10445 : 84005 : if (INTEGRAL_TYPE_P (type)
10446 : 82219 : && TYPE_MAX_VALUE (type)
10447 : 166224 : && operand_equal_p (captures[1], TYPE_MAX_VALUE (type), OEP_ONLY_CONST)
10448 : : )
10449 : : {
10450 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1865;
10451 : 1 : {
10452 : 1 : tree _r;
10453 : 1 : _r = captures[0];
10454 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
10455 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10456 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1049, __FILE__, __LINE__, true);
10457 : 1 : return _r;
10458 : : }
10459 : 0 : next_after_fail1865:;
10460 : : }
10461 : : }
10462 : : }
10463 : 84004 : switch (TREE_CODE (_p1))
10464 : : {
10465 : 22 : case PLUS_EXPR:
10466 : 22 : {
10467 : 22 : tree _q30 = TREE_OPERAND (_p1, 0);
10468 : 22 : tree _q31 = TREE_OPERAND (_p1, 1);
10469 : 22 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10470 : : {
10471 : 0 : switch (TREE_CODE (_q31))
10472 : : {
10473 : 0 : case INTEGER_CST:
10474 : 0 : {
10475 : 0 : {
10476 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
10477 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10478 : : )
10479 : : {
10480 : 0 : if (tree_int_cst_sgn (captures[2]) > 0
10481 : : )
10482 : : {
10483 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1866;
10484 : 0 : {
10485 : 0 : tree _r;
10486 : 0 : _r = captures[0];
10487 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10488 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10489 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1050, __FILE__, __LINE__, true);
10490 : 0 : return _r;
10491 : : }
10492 : 0 : next_after_fail1866:;
10493 : : }
10494 : : else
10495 : : {
10496 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1867;
10497 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1867;
10498 : 0 : {
10499 : 0 : tree _r;
10500 : 0 : _r = captures[1];
10501 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1051, __FILE__, __LINE__, true);
10502 : 0 : return _r;
10503 : : }
10504 : 0 : next_after_fail1867:;
10505 : : }
10506 : : }
10507 : : }
10508 : 0 : break;
10509 : : }
10510 : : default:;
10511 : : }
10512 : : }
10513 : : break;
10514 : : }
10515 : 84004 : default:;
10516 : : }
10517 : 84004 : switch (TREE_CODE (_p0))
10518 : : {
10519 : 5574 : case PLUS_EXPR:
10520 : 5574 : {
10521 : 5574 : tree _q20 = TREE_OPERAND (_p0, 0);
10522 : 5574 : tree _q21 = TREE_OPERAND (_p0, 1);
10523 : 5574 : switch (TREE_CODE (_q21))
10524 : : {
10525 : 5445 : case INTEGER_CST:
10526 : 5445 : {
10527 : 5445 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10528 : : {
10529 : 0 : {
10530 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
10531 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10532 : : )
10533 : : {
10534 : 0 : if (tree_int_cst_sgn (captures[2]) > 0
10535 : : )
10536 : : {
10537 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1868;
10538 : 0 : {
10539 : 0 : tree _r;
10540 : 0 : _r = captures[0];
10541 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10542 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10543 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1050, __FILE__, __LINE__, true);
10544 : 0 : return _r;
10545 : : }
10546 : 0 : next_after_fail1868:;
10547 : : }
10548 : : else
10549 : : {
10550 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1869;
10551 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1869;
10552 : 0 : {
10553 : 0 : tree _r;
10554 : 0 : _r = captures[1];
10555 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1051, __FILE__, __LINE__, true);
10556 : 0 : return _r;
10557 : : }
10558 : 0 : next_after_fail1869:;
10559 : : }
10560 : : }
10561 : : }
10562 : : }
10563 : : break;
10564 : : }
10565 : : default:;
10566 : : }
10567 : : break;
10568 : : }
10569 : 4 : case MIN_EXPR:
10570 : 4 : {
10571 : 4 : tree _q20 = TREE_OPERAND (_p0, 0);
10572 : 4 : tree _q21 = TREE_OPERAND (_p0, 1);
10573 : 4 : switch (TREE_CODE (_p1))
10574 : : {
10575 : 0 : case MAX_EXPR:
10576 : 0 : {
10577 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10578 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10579 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10580 : : {
10581 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10582 : : {
10583 : 0 : {
10584 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10585 : 0 : if (!HONOR_NANS (captures[0])
10586 : : )
10587 : : {
10588 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1870;
10589 : 0 : {
10590 : 0 : tree res_op0;
10591 : 0 : res_op0 = captures[0];
10592 : 0 : tree res_op1;
10593 : 0 : res_op1 = captures[1];
10594 : 0 : tree _r;
10595 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10596 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 915, __FILE__, __LINE__, true);
10597 : 0 : return _r;
10598 : : }
10599 : 0 : next_after_fail1870:;
10600 : : }
10601 : : }
10602 : : }
10603 : : }
10604 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10605 : : {
10606 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10607 : : {
10608 : 0 : {
10609 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10610 : 0 : if (!HONOR_NANS (captures[0])
10611 : : )
10612 : : {
10613 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1871;
10614 : 0 : {
10615 : 0 : tree res_op0;
10616 : 0 : res_op0 = captures[0];
10617 : 0 : tree res_op1;
10618 : 0 : res_op1 = captures[1];
10619 : 0 : tree _r;
10620 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10621 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 915, __FILE__, __LINE__, true);
10622 : 0 : return _r;
10623 : : }
10624 : 0 : next_after_fail1871:;
10625 : : }
10626 : : }
10627 : : }
10628 : : }
10629 : : break;
10630 : : }
10631 : : default:;
10632 : : }
10633 : : break;
10634 : : }
10635 : 0 : case MAX_EXPR:
10636 : 0 : {
10637 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10638 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10639 : 0 : switch (TREE_CODE (_p1))
10640 : : {
10641 : 0 : case MIN_EXPR:
10642 : 0 : {
10643 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10644 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10645 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10646 : : {
10647 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10648 : : {
10649 : 0 : {
10650 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10651 : 0 : if (!HONOR_NANS (captures[0])
10652 : : )
10653 : : {
10654 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1872;
10655 : 0 : {
10656 : 0 : tree res_op0;
10657 : 0 : res_op0 = captures[0];
10658 : 0 : tree res_op1;
10659 : 0 : res_op1 = captures[1];
10660 : 0 : tree _r;
10661 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10662 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 915, __FILE__, __LINE__, true);
10663 : 0 : return _r;
10664 : : }
10665 : 0 : next_after_fail1872:;
10666 : : }
10667 : : }
10668 : : }
10669 : : }
10670 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10671 : : {
10672 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10673 : : {
10674 : 0 : {
10675 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10676 : 0 : if (!HONOR_NANS (captures[0])
10677 : : )
10678 : : {
10679 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1873;
10680 : 0 : {
10681 : 0 : tree res_op0;
10682 : 0 : res_op0 = captures[0];
10683 : 0 : tree res_op1;
10684 : 0 : res_op1 = captures[1];
10685 : 0 : tree _r;
10686 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10687 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 915, __FILE__, __LINE__, true);
10688 : 0 : return _r;
10689 : : }
10690 : 0 : next_after_fail1873:;
10691 : : }
10692 : : }
10693 : : }
10694 : : }
10695 : : break;
10696 : : }
10697 : : default:;
10698 : : }
10699 : : break;
10700 : : }
10701 : 499 : CASE_CONVERT:
10702 : 499 : {
10703 : 499 : tree _q20 = TREE_OPERAND (_p0, 0);
10704 : 499 : switch (TREE_CODE (_q20))
10705 : : {
10706 : 2 : case ADDR_EXPR:
10707 : 2 : {
10708 : 2 : switch (TREE_CODE (_p1))
10709 : : {
10710 : 2 : CASE_CONVERT:
10711 : 2 : {
10712 : 2 : tree _q40 = TREE_OPERAND (_p1, 0);
10713 : 2 : switch (TREE_CODE (_q40))
10714 : : {
10715 : 2 : case ADDR_EXPR:
10716 : 2 : {
10717 : 2 : {
10718 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10719 : 2 : tree res = generic_simplify_511 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10720 : 2 : if (res) return res;
10721 : : }
10722 : 2 : break;
10723 : : }
10724 : : default:;
10725 : : }
10726 : : break;
10727 : : }
10728 : 0 : case ADDR_EXPR:
10729 : 0 : {
10730 : 0 : {
10731 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
10732 : 0 : tree res = generic_simplify_512 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10733 : 0 : if (res) return res;
10734 : : }
10735 : 0 : break;
10736 : : }
10737 : : default:;
10738 : : }
10739 : : break;
10740 : : }
10741 : : default:;
10742 : : }
10743 : : break;
10744 : : }
10745 : 10 : case ADDR_EXPR:
10746 : 10 : {
10747 : 10 : switch (TREE_CODE (_p1))
10748 : : {
10749 : 0 : CASE_CONVERT:
10750 : 0 : {
10751 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10752 : 0 : switch (TREE_CODE (_q30))
10753 : : {
10754 : 0 : case ADDR_EXPR:
10755 : 0 : {
10756 : 0 : {
10757 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _q30 };
10758 : 0 : tree res = generic_simplify_513 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10759 : 0 : if (res) return res;
10760 : : }
10761 : 0 : break;
10762 : : }
10763 : : default:;
10764 : : }
10765 : : break;
10766 : : }
10767 : 10 : case ADDR_EXPR:
10768 : 10 : {
10769 : 10 : {
10770 : 10 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _p1 };
10771 : 10 : tree res = generic_simplify_514 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10772 : 10 : if (res) return res;
10773 : : }
10774 : 10 : break;
10775 : : }
10776 : : default:;
10777 : : }
10778 : : break;
10779 : : }
10780 : 0 : case NEGATE_EXPR:
10781 : 0 : {
10782 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10783 : 0 : switch (TREE_CODE (_p1))
10784 : : {
10785 : 0 : case NEGATE_EXPR:
10786 : 0 : {
10787 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10788 : 0 : {
10789 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10790 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
10791 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
10792 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
10793 : : )
10794 : : {
10795 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1874;
10796 : 0 : {
10797 : 0 : tree res_op0;
10798 : 0 : {
10799 : 0 : tree _o1[2], _r1;
10800 : 0 : _o1[0] = captures[1];
10801 : 0 : _o1[1] = captures[3];
10802 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10803 : 0 : res_op0 = _r1;
10804 : : }
10805 : 0 : tree _r;
10806 : 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
10807 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1052, __FILE__, __LINE__, true);
10808 : 0 : return _r;
10809 : : }
10810 : 0 : next_after_fail1874:;
10811 : : }
10812 : : }
10813 : 0 : break;
10814 : : }
10815 : : default:;
10816 : : }
10817 : : break;
10818 : : }
10819 : 0 : case BIT_NOT_EXPR:
10820 : 0 : {
10821 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10822 : 0 : switch (TREE_CODE (_p1))
10823 : : {
10824 : 0 : case BIT_NOT_EXPR:
10825 : 0 : {
10826 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10827 : 0 : {
10828 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10829 : 0 : tree res = generic_simplify_515 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10830 : 0 : if (res) return res;
10831 : : }
10832 : 0 : break;
10833 : : }
10834 : : default:;
10835 : : }
10836 : : break;
10837 : : }
10838 : 0 : case VEC_COND_EXPR:
10839 : 0 : {
10840 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10841 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10842 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10843 : 0 : switch (TREE_CODE (_p1))
10844 : : {
10845 : 0 : case VEC_COND_EXPR:
10846 : 0 : {
10847 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10848 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10849 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10850 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10851 : : {
10852 : 0 : {
10853 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10854 : 0 : if (VECTOR_TYPE_P (type)
10855 : 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10856 : : || types_match (type, TREE_TYPE (captures[2]))
10857 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10858 : : || (optimize_vectors_before_lowering_p ()
10859 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10860 : : )
10861 : : {
10862 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1875;
10863 : 0 : {
10864 : 0 : tree res_op0;
10865 : 0 : res_op0 = captures[1];
10866 : 0 : tree res_op1;
10867 : 0 : {
10868 : 0 : tree _o1[2], _r1;
10869 : 0 : _o1[0] = captures[2];
10870 : 0 : _o1[1] = captures[5];
10871 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10872 : 0 : if (EXPR_P (_r1))
10873 : 0 : goto next_after_fail1875;
10874 : 0 : res_op1 = _r1;
10875 : : }
10876 : 0 : tree res_op2;
10877 : 0 : {
10878 : 0 : tree _o1[2], _r1;
10879 : 0 : _o1[0] = captures[3];
10880 : 0 : _o1[1] = captures[6];
10881 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10882 : 0 : if (EXPR_P (_r1))
10883 : 0 : goto next_after_fail1875;
10884 : 0 : res_op2 = _r1;
10885 : : }
10886 : 0 : tree _r;
10887 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10888 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
10889 : 0 : return _r;
10890 : : }
10891 : 0 : next_after_fail1875:;
10892 : : }
10893 : : }
10894 : : }
10895 : : break;
10896 : : }
10897 : 0 : default:;
10898 : : }
10899 : 0 : {
10900 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10901 : 0 : if (VECTOR_TYPE_P (type)
10902 : 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10903 : : || types_match (type, TREE_TYPE (captures[2]))
10904 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10905 : : || (optimize_vectors_before_lowering_p ()
10906 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10907 : : )
10908 : : {
10909 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1876;
10910 : 0 : {
10911 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1876;
10912 : 0 : tree res_op0;
10913 : 0 : res_op0 = captures[1];
10914 : 0 : tree res_op1;
10915 : 0 : {
10916 : 0 : tree _o1[2], _r1;
10917 : 0 : _o1[0] = captures[2];
10918 : 0 : _o1[1] = unshare_expr (captures[4]);
10919 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10920 : 0 : if (EXPR_P (_r1))
10921 : 0 : goto next_after_fail1876;
10922 : 0 : res_op1 = _r1;
10923 : : }
10924 : 0 : tree res_op2;
10925 : 0 : {
10926 : 0 : tree _o1[2], _r1;
10927 : 0 : _o1[0] = captures[3];
10928 : 0 : _o1[1] = captures[4];
10929 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10930 : 0 : if (EXPR_P (_r1))
10931 : 0 : goto next_after_fail1876;
10932 : 0 : res_op2 = _r1;
10933 : : }
10934 : 0 : tree _r;
10935 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10936 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
10937 : 0 : return _r;
10938 : : }
10939 : 0 : next_after_fail1876:;
10940 : : }
10941 : : }
10942 : 0 : break;
10943 : : }
10944 : 84004 : default:;
10945 : : }
10946 : 84004 : switch (TREE_CODE (_p1))
10947 : : {
10948 : 0 : case VEC_COND_EXPR:
10949 : 0 : {
10950 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10951 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10952 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
10953 : 0 : {
10954 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10955 : 0 : if (VECTOR_TYPE_P (type)
10956 : 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10957 : : || types_match (type, TREE_TYPE (captures[3]))
10958 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10959 : : || (optimize_vectors_before_lowering_p ()
10960 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10961 : : )
10962 : : {
10963 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1877;
10964 : 0 : {
10965 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1877;
10966 : 0 : tree res_op0;
10967 : 0 : res_op0 = captures[2];
10968 : 0 : tree res_op1;
10969 : 0 : {
10970 : 0 : tree _o1[2], _r1;
10971 : 0 : _o1[0] = unshare_expr (captures[0]);
10972 : 0 : _o1[1] = captures[3];
10973 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10974 : 0 : if (EXPR_P (_r1))
10975 : 0 : goto next_after_fail1877;
10976 : 0 : res_op1 = _r1;
10977 : : }
10978 : 0 : tree res_op2;
10979 : 0 : {
10980 : 0 : tree _o1[2], _r1;
10981 : 0 : _o1[0] = captures[0];
10982 : 0 : _o1[1] = captures[4];
10983 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10984 : 0 : if (EXPR_P (_r1))
10985 : 0 : goto next_after_fail1877;
10986 : 0 : res_op2 = _r1;
10987 : : }
10988 : 0 : tree _r;
10989 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10990 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
10991 : 0 : return _r;
10992 : : }
10993 : 0 : next_after_fail1877:;
10994 : : }
10995 : : }
10996 : 0 : break;
10997 : : }
10998 : 84004 : default:;
10999 : : }
11000 : 84004 : if (tree_zero_one_valued_p (_p0))
11001 : : {
11002 : 5 : if (tree_zero_one_valued_p (_p1))
11003 : : {
11004 : 2 : {
11005 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11006 : 2 : tree res = generic_simplify_516 (loc, type, _p0, _p1, captures, MIN_EXPR, BIT_AND_EXPR);
11007 : 2 : if (res) return res;
11008 : : }
11009 : : }
11010 : : }
11011 : : return NULL_TREE;
11012 : : }
11013 : :
11014 : : tree
11015 : 2687 : generic_simplify_RROTATE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11016 : : {
11017 : 2687 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11018 : 2687 : if (integer_all_onesp (_p0))
11019 : : {
11020 : 0 : {
11021 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11022 : 0 : tree res = generic_simplify_523 (loc, type, _p0, _p1, captures, RROTATE_EXPR);
11023 : 0 : if (res) return res;
11024 : : }
11025 : : }
11026 : 2687 : if (integer_zerop (_p1))
11027 : : {
11028 : 1 : {
11029 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11030 : 1 : tree res = generic_simplify_409 (loc, type, _p0, _p1, captures, RROTATE_EXPR);
11031 : 1 : if (res) return res;
11032 : : }
11033 : : }
11034 : 2686 : if (integer_zerop (_p0))
11035 : : {
11036 : 0 : {
11037 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11038 : 0 : tree res = generic_simplify_410 (loc, type, _p0, _p1, captures, RROTATE_EXPR);
11039 : 0 : if (res) return res;
11040 : : }
11041 : : }
11042 : 2686 : switch (TREE_CODE (_p1))
11043 : : {
11044 : 0 : case VECTOR_CST:
11045 : 0 : {
11046 : 0 : {
11047 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11048 : 0 : tree res = generic_simplify_411 (loc, type, _p0, _p1, captures, RROTATE_EXPR);
11049 : 0 : if (res) return res;
11050 : : }
11051 : 0 : break;
11052 : : }
11053 : 0 : case CONSTRUCTOR:
11054 : 0 : {
11055 : 0 : {
11056 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11057 : 0 : tree res = generic_simplify_412 (loc, type, _p0, _p1, captures, RROTATE_EXPR);
11058 : 0 : if (res) return res;
11059 : : }
11060 : 0 : break;
11061 : : }
11062 : 0 : case MINUS_EXPR:
11063 : 0 : {
11064 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11065 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11066 : 0 : switch (TREE_CODE (_q30))
11067 : : {
11068 : 0 : case INTEGER_CST:
11069 : 0 : {
11070 : 0 : {
11071 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
11072 : 0 : tree res = generic_simplify_524 (loc, type, _p0, _p1, captures, RROTATE_EXPR, LROTATE_EXPR);
11073 : 0 : if (res) return res;
11074 : : }
11075 : 0 : break;
11076 : : }
11077 : : default:;
11078 : : }
11079 : : break;
11080 : : }
11081 : 2686 : default:;
11082 : : }
11083 : 2686 : switch (TREE_CODE (_p0))
11084 : : {
11085 : 0 : case RROTATE_EXPR:
11086 : 0 : {
11087 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11088 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11089 : 0 : switch (TREE_CODE (_q21))
11090 : : {
11091 : 0 : case INTEGER_CST:
11092 : 0 : {
11093 : 0 : switch (TREE_CODE (_p1))
11094 : : {
11095 : 0 : case INTEGER_CST:
11096 : 0 : {
11097 : 0 : {
11098 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
11099 : 0 : tree res = generic_simplify_413 (loc, type, _p0, _p1, captures, RROTATE_EXPR);
11100 : 0 : if (res) return res;
11101 : : }
11102 : 0 : break;
11103 : : }
11104 : : default:;
11105 : : }
11106 : : break;
11107 : : }
11108 : : default:;
11109 : : }
11110 : : break;
11111 : : }
11112 : : default:;
11113 : : }
11114 : : return NULL_TREE;
11115 : : }
11116 : :
11117 : : tree
11118 : 873179 : generic_simplify_UNORDERED_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11119 : : {
11120 : 873179 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11121 : 873179 : switch (TREE_CODE (_p0))
11122 : : {
11123 : 0 : case VEC_COND_EXPR:
11124 : 0 : {
11125 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11126 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11127 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11128 : 0 : switch (TREE_CODE (_p1))
11129 : : {
11130 : 0 : case VEC_COND_EXPR:
11131 : 0 : {
11132 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11133 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11134 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11135 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11136 : : {
11137 : 0 : {
11138 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11139 : 0 : if (VECTOR_TYPE_P (type)
11140 : 0 : && (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
11141 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11142 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11143 : : || (optimize_vectors_before_lowering_p ()
11144 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11145 : : )
11146 : : {
11147 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1894;
11148 : 0 : {
11149 : 0 : tree res_op0;
11150 : 0 : res_op0 = captures[1];
11151 : 0 : tree res_op1;
11152 : 0 : {
11153 : 0 : tree _o1[2], _r1;
11154 : 0 : _o1[0] = captures[2];
11155 : 0 : _o1[1] = captures[5];
11156 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11157 : 0 : if (EXPR_P (_r1))
11158 : 0 : goto next_after_fail1894;
11159 : 0 : res_op1 = _r1;
11160 : : }
11161 : 0 : tree res_op2;
11162 : 0 : {
11163 : 0 : tree _o1[2], _r1;
11164 : 0 : _o1[0] = captures[3];
11165 : 0 : _o1[1] = captures[6];
11166 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11167 : 0 : if (EXPR_P (_r1))
11168 : 0 : goto next_after_fail1894;
11169 : 0 : res_op2 = _r1;
11170 : : }
11171 : 0 : tree _r;
11172 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11173 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
11174 : 0 : return _r;
11175 : : }
11176 : 0 : next_after_fail1894:;
11177 : : }
11178 : : }
11179 : : }
11180 : : break;
11181 : : }
11182 : 0 : default:;
11183 : : }
11184 : 0 : {
11185 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11186 : 0 : if (VECTOR_TYPE_P (type)
11187 : 0 : && (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
11188 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11189 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11190 : : || (optimize_vectors_before_lowering_p ()
11191 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11192 : : )
11193 : : {
11194 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1895;
11195 : 0 : {
11196 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1895;
11197 : 0 : tree res_op0;
11198 : 0 : res_op0 = captures[1];
11199 : 0 : tree res_op1;
11200 : 0 : {
11201 : 0 : tree _o1[2], _r1;
11202 : 0 : _o1[0] = captures[2];
11203 : 0 : _o1[1] = unshare_expr (captures[4]);
11204 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11205 : 0 : if (EXPR_P (_r1))
11206 : 0 : goto next_after_fail1895;
11207 : 0 : res_op1 = _r1;
11208 : : }
11209 : 0 : tree res_op2;
11210 : 0 : {
11211 : 0 : tree _o1[2], _r1;
11212 : 0 : _o1[0] = captures[3];
11213 : 0 : _o1[1] = captures[4];
11214 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11215 : 0 : if (EXPR_P (_r1))
11216 : 0 : goto next_after_fail1895;
11217 : 0 : res_op2 = _r1;
11218 : : }
11219 : 0 : tree _r;
11220 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11221 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
11222 : 0 : return _r;
11223 : : }
11224 : 0 : next_after_fail1895:;
11225 : : }
11226 : : }
11227 : 0 : break;
11228 : : }
11229 : 873179 : default:;
11230 : : }
11231 : 873179 : switch (TREE_CODE (_p1))
11232 : : {
11233 : 0 : case VEC_COND_EXPR:
11234 : 0 : {
11235 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11236 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11237 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11238 : 0 : {
11239 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11240 : 0 : if (VECTOR_TYPE_P (type)
11241 : 0 : && (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
11242 : 0 : || types_match (type, TREE_TYPE (captures[3]))
11243 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11244 : : || (optimize_vectors_before_lowering_p ()
11245 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11246 : : )
11247 : : {
11248 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1896;
11249 : 0 : {
11250 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1896;
11251 : 0 : tree res_op0;
11252 : 0 : res_op0 = captures[2];
11253 : 0 : tree res_op1;
11254 : 0 : {
11255 : 0 : tree _o1[2], _r1;
11256 : 0 : _o1[0] = unshare_expr (captures[0]);
11257 : 0 : _o1[1] = captures[3];
11258 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11259 : 0 : if (EXPR_P (_r1))
11260 : 0 : goto next_after_fail1896;
11261 : 0 : res_op1 = _r1;
11262 : : }
11263 : 0 : tree res_op2;
11264 : 0 : {
11265 : 0 : tree _o1[2], _r1;
11266 : 0 : _o1[0] = captures[0];
11267 : 0 : _o1[1] = captures[4];
11268 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11269 : 0 : if (EXPR_P (_r1))
11270 : 0 : goto next_after_fail1896;
11271 : 0 : res_op2 = _r1;
11272 : : }
11273 : 0 : tree _r;
11274 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11275 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
11276 : 0 : return _r;
11277 : : }
11278 : 0 : next_after_fail1896:;
11279 : : }
11280 : : }
11281 : 0 : break;
11282 : : }
11283 : 873179 : default:;
11284 : : }
11285 : 873179 : switch (TREE_CODE (_p0))
11286 : : {
11287 : 0 : case FLOAT_EXPR:
11288 : 0 : {
11289 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11290 : 0 : switch (TREE_CODE (_p1))
11291 : : {
11292 : 0 : case FLOAT_EXPR:
11293 : 0 : {
11294 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11295 : 0 : {
11296 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
11297 : 0 : tree res = generic_simplify_256 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, UNORDERED_EXPR);
11298 : 0 : if (res) return res;
11299 : : }
11300 : 0 : break;
11301 : : }
11302 : : default:;
11303 : : }
11304 : : break;
11305 : : }
11306 : 18 : case NEGATE_EXPR:
11307 : 18 : {
11308 : 18 : tree _q20 = TREE_OPERAND (_p0, 0);
11309 : 18 : switch (TREE_CODE (_p1))
11310 : : {
11311 : 18 : case NEGATE_EXPR:
11312 : 18 : {
11313 : 18 : tree _q40 = TREE_OPERAND (_p1, 0);
11314 : 18 : {
11315 : 18 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11316 : 18 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, UNORDERED_EXPR);
11317 : 18 : if (res) return res;
11318 : : }
11319 : 0 : break;
11320 : : }
11321 : 0 : default:;
11322 : : }
11323 : 0 : if (CONSTANT_CLASS_P (_p1))
11324 : : {
11325 : 0 : {
11326 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11327 : 0 : tree res = generic_simplify_260 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, UNORDERED_EXPR);
11328 : 0 : if (res) return res;
11329 : : }
11330 : : }
11331 : : break;
11332 : : }
11333 : 873161 : default:;
11334 : : }
11335 : 873161 : switch (TREE_CODE (_p1))
11336 : : {
11337 : 519 : case REAL_CST:
11338 : 519 : {
11339 : 519 : {
11340 : 519 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11341 : 519 : tree res = generic_simplify_545 (loc, type, _p0, _p1, captures, UNORDERED_EXPR);
11342 : 519 : if (res) return res;
11343 : : }
11344 : 519 : break;
11345 : : }
11346 : 873161 : default:;
11347 : : }
11348 : 873161 : {
11349 : 873161 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11350 : 873161 : if (tree_expr_nan_p (captures[0]) || tree_expr_nan_p (captures[1])
11351 : : )
11352 : : {
11353 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1897;
11354 : 0 : {
11355 : 0 : tree _r;
11356 : 0 : _r = constant_boolean_node (true, type);
11357 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11358 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11359 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11360 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11361 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1059, __FILE__, __LINE__, true);
11362 : 0 : return _r;
11363 : : }
11364 : 0 : next_after_fail1897:;
11365 : : }
11366 : : else
11367 : : {
11368 : 873161 : if (!tree_expr_maybe_nan_p (captures[0]) && !tree_expr_maybe_nan_p (captures[1])
11369 : : )
11370 : : {
11371 : 35 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1898;
11372 : 35 : {
11373 : 35 : tree _r;
11374 : 35 : _r = constant_boolean_node (false, type);
11375 : 35 : if (TREE_SIDE_EFFECTS (captures[0]))
11376 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11377 : 35 : if (TREE_SIDE_EFFECTS (captures[1]))
11378 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11379 : 35 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1060, __FILE__, __LINE__, true);
11380 : 35 : return _r;
11381 : : }
11382 : 0 : next_after_fail1898:;
11383 : : }
11384 : : }
11385 : : }
11386 : 873126 : return NULL_TREE;
11387 : : }
11388 : :
11389 : : tree
11390 : 994699 : generic_simplify_UNLE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11391 : : {
11392 : 994699 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11393 : 994699 : switch (TREE_CODE (_p0))
11394 : : {
11395 : 0 : case VEC_COND_EXPR:
11396 : 0 : {
11397 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11398 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11399 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11400 : 0 : switch (TREE_CODE (_p1))
11401 : : {
11402 : 0 : case VEC_COND_EXPR:
11403 : 0 : {
11404 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11405 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11406 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11407 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11408 : : {
11409 : 0 : {
11410 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11411 : 0 : if (VECTOR_TYPE_P (type)
11412 : 0 : && (TREE_CODE_CLASS (UNLE_EXPR) != tcc_comparison
11413 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11414 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11415 : : || (optimize_vectors_before_lowering_p ()
11416 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11417 : : )
11418 : : {
11419 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1907;
11420 : 0 : {
11421 : 0 : tree res_op0;
11422 : 0 : res_op0 = captures[1];
11423 : 0 : tree res_op1;
11424 : 0 : {
11425 : 0 : tree _o1[2], _r1;
11426 : 0 : _o1[0] = captures[2];
11427 : 0 : _o1[1] = captures[5];
11428 : 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11429 : 0 : if (EXPR_P (_r1))
11430 : 0 : goto next_after_fail1907;
11431 : 0 : res_op1 = _r1;
11432 : : }
11433 : 0 : tree res_op2;
11434 : 0 : {
11435 : 0 : tree _o1[2], _r1;
11436 : 0 : _o1[0] = captures[3];
11437 : 0 : _o1[1] = captures[6];
11438 : 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11439 : 0 : if (EXPR_P (_r1))
11440 : 0 : goto next_after_fail1907;
11441 : 0 : res_op2 = _r1;
11442 : : }
11443 : 0 : tree _r;
11444 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11445 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
11446 : 0 : return _r;
11447 : : }
11448 : 0 : next_after_fail1907:;
11449 : : }
11450 : : }
11451 : : }
11452 : : break;
11453 : : }
11454 : 0 : default:;
11455 : : }
11456 : 0 : {
11457 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11458 : 0 : if (VECTOR_TYPE_P (type)
11459 : 0 : && (TREE_CODE_CLASS (UNLE_EXPR) != tcc_comparison
11460 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11461 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11462 : : || (optimize_vectors_before_lowering_p ()
11463 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11464 : : )
11465 : : {
11466 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1908;
11467 : 0 : {
11468 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1908;
11469 : 0 : tree res_op0;
11470 : 0 : res_op0 = captures[1];
11471 : 0 : tree res_op1;
11472 : 0 : {
11473 : 0 : tree _o1[2], _r1;
11474 : 0 : _o1[0] = captures[2];
11475 : 0 : _o1[1] = unshare_expr (captures[4]);
11476 : 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11477 : 0 : if (EXPR_P (_r1))
11478 : 0 : goto next_after_fail1908;
11479 : 0 : res_op1 = _r1;
11480 : : }
11481 : 0 : tree res_op2;
11482 : 0 : {
11483 : 0 : tree _o1[2], _r1;
11484 : 0 : _o1[0] = captures[3];
11485 : 0 : _o1[1] = captures[4];
11486 : 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11487 : 0 : if (EXPR_P (_r1))
11488 : 0 : goto next_after_fail1908;
11489 : 0 : res_op2 = _r1;
11490 : : }
11491 : 0 : tree _r;
11492 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11493 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
11494 : 0 : return _r;
11495 : : }
11496 : 0 : next_after_fail1908:;
11497 : : }
11498 : : }
11499 : 0 : break;
11500 : : }
11501 : 994699 : default:;
11502 : : }
11503 : 994699 : switch (TREE_CODE (_p1))
11504 : : {
11505 : 0 : case VEC_COND_EXPR:
11506 : 0 : {
11507 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11508 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11509 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11510 : 0 : {
11511 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11512 : 0 : if (VECTOR_TYPE_P (type)
11513 : 0 : && (TREE_CODE_CLASS (UNLE_EXPR) != tcc_comparison
11514 : 0 : || types_match (type, TREE_TYPE (captures[3]))
11515 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11516 : : || (optimize_vectors_before_lowering_p ()
11517 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11518 : : )
11519 : : {
11520 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1909;
11521 : 0 : {
11522 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1909;
11523 : 0 : tree res_op0;
11524 : 0 : res_op0 = captures[2];
11525 : 0 : tree res_op1;
11526 : 0 : {
11527 : 0 : tree _o1[2], _r1;
11528 : 0 : _o1[0] = unshare_expr (captures[0]);
11529 : 0 : _o1[1] = captures[3];
11530 : 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11531 : 0 : if (EXPR_P (_r1))
11532 : 0 : goto next_after_fail1909;
11533 : 0 : res_op1 = _r1;
11534 : : }
11535 : 0 : tree res_op2;
11536 : 0 : {
11537 : 0 : tree _o1[2], _r1;
11538 : 0 : _o1[0] = captures[0];
11539 : 0 : _o1[1] = captures[4];
11540 : 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11541 : 0 : if (EXPR_P (_r1))
11542 : 0 : goto next_after_fail1909;
11543 : 0 : res_op2 = _r1;
11544 : : }
11545 : 0 : tree _r;
11546 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11547 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
11548 : 0 : return _r;
11549 : : }
11550 : 0 : next_after_fail1909:;
11551 : : }
11552 : : }
11553 : 0 : break;
11554 : : }
11555 : 994699 : default:;
11556 : : }
11557 : 994699 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11558 : : {
11559 : 30 : {
11560 : 30 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11561 : 30 : tree res = generic_simplify_547 (loc, type, _p0, _p1, captures, UNLE_EXPR);
11562 : 30 : if (res) return res;
11563 : : }
11564 : : }
11565 : 994669 : switch (TREE_CODE (_p0))
11566 : : {
11567 : 96 : case FLOAT_EXPR:
11568 : 96 : {
11569 : 96 : tree _q20 = TREE_OPERAND (_p0, 0);
11570 : 96 : switch (TREE_CODE (_p1))
11571 : : {
11572 : 0 : case FLOAT_EXPR:
11573 : 0 : {
11574 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11575 : 0 : {
11576 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
11577 : 0 : tree res = generic_simplify_256 (loc, type, _p0, _p1, captures, UNLE_EXPR, LE_EXPR);
11578 : 0 : if (res) return res;
11579 : : }
11580 : 0 : break;
11581 : : }
11582 : : default:;
11583 : : }
11584 : : break;
11585 : : }
11586 : 112 : case NEGATE_EXPR:
11587 : 112 : {
11588 : 112 : tree _q20 = TREE_OPERAND (_p0, 0);
11589 : 112 : switch (TREE_CODE (_p1))
11590 : : {
11591 : 0 : case NEGATE_EXPR:
11592 : 0 : {
11593 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11594 : 0 : {
11595 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11596 : 0 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, UNLE_EXPR, UNGE_EXPR);
11597 : 0 : if (res) return res;
11598 : : }
11599 : 0 : break;
11600 : : }
11601 : 112 : default:;
11602 : : }
11603 : 112 : if (CONSTANT_CLASS_P (_p1))
11604 : : {
11605 : 112 : {
11606 : 112 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11607 : 112 : tree res = generic_simplify_260 (loc, type, _p0, _p1, captures, UNLE_EXPR, UNGE_EXPR);
11608 : 112 : if (res) return res;
11609 : : }
11610 : : }
11611 : : break;
11612 : : }
11613 : 994557 : default:;
11614 : : }
11615 : 994557 : switch (TREE_CODE (_p1))
11616 : : {
11617 : 573569 : case REAL_CST:
11618 : 573569 : {
11619 : 573569 : {
11620 : 573569 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11621 : 573569 : tree res = generic_simplify_545 (loc, type, _p0, _p1, captures, UNLE_EXPR);
11622 : 573569 : if (res) return res;
11623 : : }
11624 : 573567 : break;
11625 : : }
11626 : : default:;
11627 : : }
11628 : : return NULL_TREE;
11629 : : }
11630 : :
11631 : : tree
11632 : 3151827 : generic_simplify_TRUTH_ORIF_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11633 : : {
11634 : 3151827 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11635 : 3151827 : switch (TREE_CODE (_p0))
11636 : : {
11637 : 311228 : case LE_EXPR:
11638 : 311228 : {
11639 : 311228 : tree _q20 = TREE_OPERAND (_p0, 0);
11640 : 311228 : tree _q21 = TREE_OPERAND (_p0, 1);
11641 : 311228 : switch (TREE_CODE (_q20))
11642 : : {
11643 : 91 : case POINTER_PLUS_EXPR:
11644 : 91 : {
11645 : 91 : tree _q30 = TREE_OPERAND (_q20, 0);
11646 : 91 : tree _q31 = TREE_OPERAND (_q20, 1);
11647 : 91 : switch (TREE_CODE (_q31))
11648 : : {
11649 : 3 : case INTEGER_CST:
11650 : 3 : {
11651 : 3 : switch (TREE_CODE (_p1))
11652 : : {
11653 : 2 : case LE_EXPR:
11654 : 2 : {
11655 : 2 : tree _q70 = TREE_OPERAND (_p1, 0);
11656 : 2 : tree _q71 = TREE_OPERAND (_p1, 1);
11657 : 2 : switch (TREE_CODE (_q70))
11658 : : {
11659 : 2 : case POINTER_PLUS_EXPR:
11660 : 2 : {
11661 : 2 : tree _q80 = TREE_OPERAND (_q70, 0);
11662 : 2 : tree _q81 = TREE_OPERAND (_q70, 1);
11663 : 2 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
11664 : : {
11665 : 2 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
11666 : : {
11667 : 2 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
11668 : : {
11669 : 2 : {
11670 : 2 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q70 };
11671 : 2 : const enum tree_code cmp = LE_EXPR;
11672 : 2 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
11673 : 1 : && TYPE_OVERFLOW_WRAPS (sizetype)
11674 : 3 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
11675 : : )
11676 : : {
11677 : 1 : {
11678 : 1 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
11679 : 1 : offset_int rhs = off * 2;
11680 : 1 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
11681 : : )
11682 : : {
11683 : 1 : {
11684 : 1 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
11685 : 1 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
11686 : 1 : if (cmp == LT_EXPR
11687 : : )
11688 : : {
11689 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1923;
11690 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1923;
11691 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1923;
11692 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1923;
11693 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1923;
11694 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1923;
11695 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1923;
11696 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1923;
11697 : : {
11698 : : tree res_op0;
11699 : : {
11700 : : tree _o1[1], _r1;
11701 : : {
11702 : : tree _o2[2], _r2;
11703 : : _o2[0] = swap_p ? captures[6] : captures[1];
11704 : : _o2[1] = swap_p ? captures[2] : captures[4];
11705 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11706 : : _o1[0] = _r2;
11707 : : }
11708 : : if (TREE_TYPE (_o1[0]) != sizetype)
11709 : : {
11710 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11711 : : }
11712 : : else
11713 : : _r1 = _o1[0];
11714 : : res_op0 = _r1;
11715 : : }
11716 : : tree res_op1;
11717 : : res_op1 = rhs_tree;
11718 : : tree _r;
11719 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11720 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
11721 : 1 : return _r;
11722 : : }
11723 : : next_after_fail1923:;
11724 : : }
11725 : : else
11726 : : {
11727 : 1 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1924;
11728 : 1 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1924;
11729 : 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1924;
11730 : 1 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1924;
11731 : 1 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1924;
11732 : 1 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1924;
11733 : 1 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1924;
11734 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1924;
11735 : 1 : {
11736 : 1 : tree res_op0;
11737 : 1 : {
11738 : 1 : tree _o1[1], _r1;
11739 : 1 : {
11740 : 1 : tree _o2[2], _r2;
11741 : 1 : {
11742 : 1 : tree _o3[2], _r3;
11743 : 1 : _o3[0] = swap_p ? captures[4] : captures[2];
11744 : 1 : _o3[1] = wide_int_to_tree (sizetype, off);
11745 : 1 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
11746 : 1 : _o2[0] = _r3;
11747 : : }
11748 : 1 : _o2[1] = swap_p ? captures[2] : captures[4];
11749 : 1 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11750 : 1 : _o1[0] = _r2;
11751 : : }
11752 : 1 : if (TREE_TYPE (_o1[0]) != sizetype)
11753 : : {
11754 : 1 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11755 : : }
11756 : : else
11757 : : _r1 = _o1[0];
11758 : 1 : res_op0 = _r1;
11759 : : }
11760 : 1 : tree res_op1;
11761 : 1 : res_op1 = rhs_tree;
11762 : 1 : tree _r;
11763 : 1 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11764 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
11765 : 1 : return _r;
11766 : : }
11767 : 0 : next_after_fail1924:;
11768 : : }
11769 : : }
11770 : : }
11771 : : }
11772 : : }
11773 : : }
11774 : : }
11775 : : }
11776 : : }
11777 : : break;
11778 : : }
11779 : : default:;
11780 : : }
11781 : : break;
11782 : : }
11783 : 0 : case GE_EXPR:
11784 : 0 : {
11785 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
11786 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
11787 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
11788 : : {
11789 : 0 : switch (TREE_CODE (_q71))
11790 : : {
11791 : 0 : case POINTER_PLUS_EXPR:
11792 : 0 : {
11793 : 0 : tree _q90 = TREE_OPERAND (_q71, 0);
11794 : 0 : tree _q91 = TREE_OPERAND (_q71, 1);
11795 : 0 : if ((_q90 == _q21 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q21, 0) && types_match (_q90, _q21)))
11796 : : {
11797 : 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
11798 : : {
11799 : 0 : {
11800 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q71 };
11801 : 0 : const enum tree_code cmp = LE_EXPR;
11802 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
11803 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
11804 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
11805 : : )
11806 : : {
11807 : 0 : {
11808 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
11809 : 0 : offset_int rhs = off * 2;
11810 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
11811 : : )
11812 : : {
11813 : 0 : {
11814 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
11815 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
11816 : 0 : if (cmp == LT_EXPR
11817 : : )
11818 : : {
11819 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1925;
11820 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1925;
11821 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1925;
11822 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1925;
11823 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1925;
11824 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1925;
11825 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1925;
11826 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1925;
11827 : : {
11828 : : tree res_op0;
11829 : : {
11830 : : tree _o1[1], _r1;
11831 : : {
11832 : : tree _o2[2], _r2;
11833 : : _o2[0] = swap_p ? captures[6] : captures[1];
11834 : : _o2[1] = swap_p ? captures[2] : captures[4];
11835 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11836 : : _o1[0] = _r2;
11837 : : }
11838 : : if (TREE_TYPE (_o1[0]) != sizetype)
11839 : : {
11840 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11841 : : }
11842 : : else
11843 : : _r1 = _o1[0];
11844 : : res_op0 = _r1;
11845 : : }
11846 : : tree res_op1;
11847 : : res_op1 = rhs_tree;
11848 : : tree _r;
11849 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11850 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
11851 : 0 : return _r;
11852 : : }
11853 : : next_after_fail1925:;
11854 : : }
11855 : : else
11856 : : {
11857 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1926;
11858 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1926;
11859 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1926;
11860 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1926;
11861 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1926;
11862 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1926;
11863 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1926;
11864 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1926;
11865 : 0 : {
11866 : 0 : tree res_op0;
11867 : 0 : {
11868 : 0 : tree _o1[1], _r1;
11869 : 0 : {
11870 : 0 : tree _o2[2], _r2;
11871 : 0 : {
11872 : 0 : tree _o3[2], _r3;
11873 : 0 : _o3[0] = swap_p ? captures[4] : captures[2];
11874 : 0 : _o3[1] = wide_int_to_tree (sizetype, off);
11875 : 0 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
11876 : 0 : _o2[0] = _r3;
11877 : : }
11878 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
11879 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11880 : 0 : _o1[0] = _r2;
11881 : : }
11882 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
11883 : : {
11884 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11885 : : }
11886 : : else
11887 : : _r1 = _o1[0];
11888 : 0 : res_op0 = _r1;
11889 : : }
11890 : 0 : tree res_op1;
11891 : 0 : res_op1 = rhs_tree;
11892 : 0 : tree _r;
11893 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
11894 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
11895 : 0 : return _r;
11896 : : }
11897 : 0 : next_after_fail1926:;
11898 : : }
11899 : : }
11900 : : }
11901 : : }
11902 : : }
11903 : : }
11904 : : }
11905 : : }
11906 : : break;
11907 : : }
11908 : : default:;
11909 : : }
11910 : : }
11911 : : break;
11912 : : }
11913 : : default:;
11914 : : }
11915 : : break;
11916 : : }
11917 : : default:;
11918 : : }
11919 : : break;
11920 : : }
11921 : : default:;
11922 : : }
11923 : : break;
11924 : : }
11925 : 756943 : case LT_EXPR:
11926 : 756943 : {
11927 : 756943 : tree _q20 = TREE_OPERAND (_p0, 0);
11928 : 756943 : tree _q21 = TREE_OPERAND (_p0, 1);
11929 : 756943 : switch (TREE_CODE (_q20))
11930 : : {
11931 : 13 : case POINTER_PLUS_EXPR:
11932 : 13 : {
11933 : 13 : tree _q30 = TREE_OPERAND (_q20, 0);
11934 : 13 : tree _q31 = TREE_OPERAND (_q20, 1);
11935 : 13 : switch (TREE_CODE (_q31))
11936 : : {
11937 : 7 : case INTEGER_CST:
11938 : 7 : {
11939 : 7 : switch (TREE_CODE (_p1))
11940 : : {
11941 : 2 : case LT_EXPR:
11942 : 2 : {
11943 : 2 : tree _q70 = TREE_OPERAND (_p1, 0);
11944 : 2 : tree _q71 = TREE_OPERAND (_p1, 1);
11945 : 2 : switch (TREE_CODE (_q70))
11946 : : {
11947 : 2 : case POINTER_PLUS_EXPR:
11948 : 2 : {
11949 : 2 : tree _q80 = TREE_OPERAND (_q70, 0);
11950 : 2 : tree _q81 = TREE_OPERAND (_q70, 1);
11951 : 2 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
11952 : : {
11953 : 2 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
11954 : : {
11955 : 2 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
11956 : : {
11957 : 2 : {
11958 : 2 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q70 };
11959 : 2 : const enum tree_code cmp = LT_EXPR;
11960 : 2 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
11961 : 1 : && TYPE_OVERFLOW_WRAPS (sizetype)
11962 : 3 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
11963 : : )
11964 : : {
11965 : 1 : {
11966 : 1 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
11967 : 1 : offset_int rhs = off * 2;
11968 : 1 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
11969 : : )
11970 : : {
11971 : 1 : {
11972 : 1 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
11973 : 1 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
11974 : 1 : if (cmp == LT_EXPR
11975 : : )
11976 : : {
11977 : 1 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1927;
11978 : 1 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1927;
11979 : 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1927;
11980 : 1 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1927;
11981 : 1 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1927;
11982 : 1 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1927;
11983 : 1 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1927;
11984 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1927;
11985 : 1 : {
11986 : 1 : tree res_op0;
11987 : 1 : {
11988 : 1 : tree _o1[1], _r1;
11989 : 1 : {
11990 : 1 : tree _o2[2], _r2;
11991 : 1 : _o2[0] = swap_p ? captures[6] : captures[1];
11992 : 1 : _o2[1] = swap_p ? captures[2] : captures[4];
11993 : 1 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
11994 : 1 : _o1[0] = _r2;
11995 : : }
11996 : 1 : if (TREE_TYPE (_o1[0]) != sizetype)
11997 : : {
11998 : 1 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
11999 : : }
12000 : : else
12001 : : _r1 = _o1[0];
12002 : 1 : res_op0 = _r1;
12003 : : }
12004 : 1 : tree res_op1;
12005 : 1 : res_op1 = rhs_tree;
12006 : 1 : tree _r;
12007 : 1 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12008 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
12009 : 1 : return _r;
12010 : : }
12011 : 0 : next_after_fail1927:;
12012 : : }
12013 : : else
12014 : : {
12015 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1928;
12016 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1928;
12017 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1928;
12018 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1928;
12019 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1928;
12020 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1928;
12021 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1928;
12022 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1928;
12023 : : {
12024 : : tree res_op0;
12025 : : {
12026 : : tree _o1[1], _r1;
12027 : : {
12028 : : tree _o2[2], _r2;
12029 : : {
12030 : : tree _o3[2], _r3;
12031 : : _o3[0] = swap_p ? captures[4] : captures[2];
12032 : : _o3[1] = wide_int_to_tree (sizetype, off);
12033 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12034 : : _o2[0] = _r3;
12035 : : }
12036 : : _o2[1] = swap_p ? captures[2] : captures[4];
12037 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12038 : : _o1[0] = _r2;
12039 : : }
12040 : : if (TREE_TYPE (_o1[0]) != sizetype)
12041 : : {
12042 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12043 : : }
12044 : : else
12045 : : _r1 = _o1[0];
12046 : : res_op0 = _r1;
12047 : : }
12048 : : tree res_op1;
12049 : : res_op1 = rhs_tree;
12050 : : tree _r;
12051 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12052 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
12053 : : return _r;
12054 : : }
12055 : : next_after_fail1928:;
12056 : : }
12057 : : }
12058 : : }
12059 : : }
12060 : : }
12061 : : }
12062 : : }
12063 : : }
12064 : : }
12065 : : break;
12066 : : }
12067 : : default:;
12068 : : }
12069 : : break;
12070 : : }
12071 : 0 : case GT_EXPR:
12072 : 0 : {
12073 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
12074 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
12075 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
12076 : : {
12077 : 0 : switch (TREE_CODE (_q71))
12078 : : {
12079 : 0 : case POINTER_PLUS_EXPR:
12080 : 0 : {
12081 : 0 : tree _q90 = TREE_OPERAND (_q71, 0);
12082 : 0 : tree _q91 = TREE_OPERAND (_q71, 1);
12083 : 0 : if ((_q90 == _q21 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q21, 0) && types_match (_q90, _q21)))
12084 : : {
12085 : 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
12086 : : {
12087 : 0 : {
12088 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1, _q71 };
12089 : 0 : const enum tree_code cmp = LT_EXPR;
12090 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12091 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12092 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12093 : : )
12094 : : {
12095 : 0 : {
12096 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12097 : 0 : offset_int rhs = off * 2;
12098 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12099 : : )
12100 : : {
12101 : 0 : {
12102 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12103 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12104 : 0 : if (cmp == LT_EXPR
12105 : : )
12106 : : {
12107 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1929;
12108 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1929;
12109 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1929;
12110 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1929;
12111 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1929;
12112 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1929;
12113 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1929;
12114 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1929;
12115 : 0 : {
12116 : 0 : tree res_op0;
12117 : 0 : {
12118 : 0 : tree _o1[1], _r1;
12119 : 0 : {
12120 : 0 : tree _o2[2], _r2;
12121 : 0 : _o2[0] = swap_p ? captures[6] : captures[1];
12122 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12123 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12124 : 0 : _o1[0] = _r2;
12125 : : }
12126 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12127 : : {
12128 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12129 : : }
12130 : : else
12131 : : _r1 = _o1[0];
12132 : 0 : res_op0 = _r1;
12133 : : }
12134 : 0 : tree res_op1;
12135 : 0 : res_op1 = rhs_tree;
12136 : 0 : tree _r;
12137 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12138 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
12139 : 0 : return _r;
12140 : : }
12141 : 0 : next_after_fail1929:;
12142 : : }
12143 : : else
12144 : : {
12145 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1930;
12146 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1930;
12147 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1930;
12148 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1930;
12149 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1930;
12150 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1930;
12151 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1930;
12152 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1930;
12153 : : {
12154 : : tree res_op0;
12155 : : {
12156 : : tree _o1[1], _r1;
12157 : : {
12158 : : tree _o2[2], _r2;
12159 : : {
12160 : : tree _o3[2], _r3;
12161 : : _o3[0] = swap_p ? captures[4] : captures[2];
12162 : : _o3[1] = wide_int_to_tree (sizetype, off);
12163 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12164 : : _o2[0] = _r3;
12165 : : }
12166 : : _o2[1] = swap_p ? captures[2] : captures[4];
12167 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12168 : : _o1[0] = _r2;
12169 : : }
12170 : : if (TREE_TYPE (_o1[0]) != sizetype)
12171 : : {
12172 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12173 : : }
12174 : : else
12175 : : _r1 = _o1[0];
12176 : : res_op0 = _r1;
12177 : : }
12178 : : tree res_op1;
12179 : : res_op1 = rhs_tree;
12180 : : tree _r;
12181 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12182 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
12183 : : return _r;
12184 : : }
12185 : : next_after_fail1930:;
12186 : : }
12187 : : }
12188 : : }
12189 : : }
12190 : : }
12191 : : }
12192 : : }
12193 : : }
12194 : : break;
12195 : : }
12196 : : default:;
12197 : : }
12198 : : }
12199 : : break;
12200 : : }
12201 : : default:;
12202 : : }
12203 : : break;
12204 : : }
12205 : : default:;
12206 : : }
12207 : : break;
12208 : : }
12209 : : default:;
12210 : : }
12211 : : break;
12212 : : }
12213 : 30544 : case GE_EXPR:
12214 : 30544 : {
12215 : 30544 : tree _q20 = TREE_OPERAND (_p0, 0);
12216 : 30544 : tree _q21 = TREE_OPERAND (_p0, 1);
12217 : 30544 : switch (TREE_CODE (_q21))
12218 : : {
12219 : 0 : case POINTER_PLUS_EXPR:
12220 : 0 : {
12221 : 0 : tree _q40 = TREE_OPERAND (_q21, 0);
12222 : 0 : tree _q41 = TREE_OPERAND (_q21, 1);
12223 : 0 : switch (TREE_CODE (_q41))
12224 : : {
12225 : 0 : case INTEGER_CST:
12226 : 0 : {
12227 : 0 : switch (TREE_CODE (_p1))
12228 : : {
12229 : 0 : case LE_EXPR:
12230 : 0 : {
12231 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
12232 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
12233 : 0 : switch (TREE_CODE (_q70))
12234 : : {
12235 : 0 : case POINTER_PLUS_EXPR:
12236 : 0 : {
12237 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
12238 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
12239 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
12240 : : {
12241 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
12242 : : {
12243 : 0 : if ((_q71 == _q40 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q40, 0) && types_match (_q71, _q40)))
12244 : : {
12245 : 0 : {
12246 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q70 };
12247 : 0 : const enum tree_code cmp = LE_EXPR;
12248 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12249 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12250 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12251 : : )
12252 : : {
12253 : 0 : {
12254 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12255 : 0 : offset_int rhs = off * 2;
12256 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12257 : : )
12258 : : {
12259 : 0 : {
12260 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12261 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12262 : 0 : if (cmp == LT_EXPR
12263 : : )
12264 : : {
12265 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1931;
12266 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1931;
12267 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1931;
12268 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1931;
12269 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1931;
12270 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1931;
12271 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1931;
12272 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1931;
12273 : : {
12274 : : tree res_op0;
12275 : : {
12276 : : tree _o1[1], _r1;
12277 : : {
12278 : : tree _o2[2], _r2;
12279 : : _o2[0] = swap_p ? captures[6] : captures[1];
12280 : : _o2[1] = swap_p ? captures[2] : captures[4];
12281 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12282 : : _o1[0] = _r2;
12283 : : }
12284 : : if (TREE_TYPE (_o1[0]) != sizetype)
12285 : : {
12286 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12287 : : }
12288 : : else
12289 : : _r1 = _o1[0];
12290 : : res_op0 = _r1;
12291 : : }
12292 : : tree res_op1;
12293 : : res_op1 = rhs_tree;
12294 : : tree _r;
12295 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12296 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
12297 : 0 : return _r;
12298 : : }
12299 : : next_after_fail1931:;
12300 : : }
12301 : : else
12302 : : {
12303 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1932;
12304 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1932;
12305 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1932;
12306 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1932;
12307 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1932;
12308 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1932;
12309 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1932;
12310 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1932;
12311 : 0 : {
12312 : 0 : tree res_op0;
12313 : 0 : {
12314 : 0 : tree _o1[1], _r1;
12315 : 0 : {
12316 : 0 : tree _o2[2], _r2;
12317 : 0 : {
12318 : 0 : tree _o3[2], _r3;
12319 : 0 : _o3[0] = swap_p ? captures[4] : captures[2];
12320 : 0 : _o3[1] = wide_int_to_tree (sizetype, off);
12321 : 0 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12322 : 0 : _o2[0] = _r3;
12323 : : }
12324 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12325 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12326 : 0 : _o1[0] = _r2;
12327 : : }
12328 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12329 : : {
12330 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12331 : : }
12332 : : else
12333 : : _r1 = _o1[0];
12334 : 0 : res_op0 = _r1;
12335 : : }
12336 : 0 : tree res_op1;
12337 : 0 : res_op1 = rhs_tree;
12338 : 0 : tree _r;
12339 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12340 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
12341 : 0 : return _r;
12342 : : }
12343 : 0 : next_after_fail1932:;
12344 : : }
12345 : : }
12346 : : }
12347 : : }
12348 : : }
12349 : : }
12350 : : }
12351 : : }
12352 : : }
12353 : : break;
12354 : : }
12355 : : default:;
12356 : : }
12357 : : break;
12358 : : }
12359 : 0 : case GE_EXPR:
12360 : 0 : {
12361 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
12362 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
12363 : 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
12364 : : {
12365 : 0 : switch (TREE_CODE (_q71))
12366 : : {
12367 : 0 : case POINTER_PLUS_EXPR:
12368 : 0 : {
12369 : 0 : tree _q90 = TREE_OPERAND (_q71, 0);
12370 : 0 : tree _q91 = TREE_OPERAND (_q71, 1);
12371 : 0 : if ((_q90 == _q20 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q20, 0) && types_match (_q90, _q20)))
12372 : : {
12373 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
12374 : : {
12375 : 0 : {
12376 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q71 };
12377 : 0 : const enum tree_code cmp = LE_EXPR;
12378 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12379 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12380 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12381 : : )
12382 : : {
12383 : 0 : {
12384 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12385 : 0 : offset_int rhs = off * 2;
12386 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12387 : : )
12388 : : {
12389 : 0 : {
12390 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12391 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12392 : 0 : if (cmp == LT_EXPR
12393 : : )
12394 : : {
12395 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1933;
12396 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1933;
12397 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1933;
12398 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1933;
12399 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1933;
12400 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1933;
12401 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1933;
12402 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1933;
12403 : : {
12404 : : tree res_op0;
12405 : : {
12406 : : tree _o1[1], _r1;
12407 : : {
12408 : : tree _o2[2], _r2;
12409 : : _o2[0] = swap_p ? captures[6] : captures[1];
12410 : : _o2[1] = swap_p ? captures[2] : captures[4];
12411 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12412 : : _o1[0] = _r2;
12413 : : }
12414 : : if (TREE_TYPE (_o1[0]) != sizetype)
12415 : : {
12416 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12417 : : }
12418 : : else
12419 : : _r1 = _o1[0];
12420 : : res_op0 = _r1;
12421 : : }
12422 : : tree res_op1;
12423 : : res_op1 = rhs_tree;
12424 : : tree _r;
12425 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12426 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
12427 : 0 : return _r;
12428 : : }
12429 : : next_after_fail1933:;
12430 : : }
12431 : : else
12432 : : {
12433 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1934;
12434 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1934;
12435 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1934;
12436 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1934;
12437 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1934;
12438 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1934;
12439 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1934;
12440 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1934;
12441 : 0 : {
12442 : 0 : tree res_op0;
12443 : 0 : {
12444 : 0 : tree _o1[1], _r1;
12445 : 0 : {
12446 : 0 : tree _o2[2], _r2;
12447 : 0 : {
12448 : 0 : tree _o3[2], _r3;
12449 : 0 : _o3[0] = swap_p ? captures[4] : captures[2];
12450 : 0 : _o3[1] = wide_int_to_tree (sizetype, off);
12451 : 0 : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12452 : 0 : _o2[0] = _r3;
12453 : : }
12454 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12455 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12456 : 0 : _o1[0] = _r2;
12457 : : }
12458 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12459 : : {
12460 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12461 : : }
12462 : : else
12463 : : _r1 = _o1[0];
12464 : 0 : res_op0 = _r1;
12465 : : }
12466 : 0 : tree res_op1;
12467 : 0 : res_op1 = rhs_tree;
12468 : 0 : tree _r;
12469 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12470 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
12471 : 0 : return _r;
12472 : : }
12473 : 0 : next_after_fail1934:;
12474 : : }
12475 : : }
12476 : : }
12477 : : }
12478 : : }
12479 : : }
12480 : : }
12481 : : }
12482 : : break;
12483 : : }
12484 : : default:;
12485 : : }
12486 : : }
12487 : : break;
12488 : : }
12489 : : default:;
12490 : : }
12491 : : break;
12492 : : }
12493 : : default:;
12494 : : }
12495 : : break;
12496 : : }
12497 : : default:;
12498 : : }
12499 : : break;
12500 : : }
12501 : 72763 : case GT_EXPR:
12502 : 72763 : {
12503 : 72763 : tree _q20 = TREE_OPERAND (_p0, 0);
12504 : 72763 : tree _q21 = TREE_OPERAND (_p0, 1);
12505 : 72763 : switch (TREE_CODE (_q21))
12506 : : {
12507 : 0 : case POINTER_PLUS_EXPR:
12508 : 0 : {
12509 : 0 : tree _q40 = TREE_OPERAND (_q21, 0);
12510 : 0 : tree _q41 = TREE_OPERAND (_q21, 1);
12511 : 0 : switch (TREE_CODE (_q41))
12512 : : {
12513 : 0 : case INTEGER_CST:
12514 : 0 : {
12515 : 0 : switch (TREE_CODE (_p1))
12516 : : {
12517 : 0 : case LT_EXPR:
12518 : 0 : {
12519 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
12520 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
12521 : 0 : switch (TREE_CODE (_q70))
12522 : : {
12523 : 0 : case POINTER_PLUS_EXPR:
12524 : 0 : {
12525 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
12526 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
12527 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
12528 : : {
12529 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
12530 : : {
12531 : 0 : if ((_q71 == _q40 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q40, 0) && types_match (_q71, _q40)))
12532 : : {
12533 : 0 : {
12534 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q70 };
12535 : 0 : const enum tree_code cmp = LT_EXPR;
12536 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12537 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12538 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12539 : : )
12540 : : {
12541 : 0 : {
12542 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12543 : 0 : offset_int rhs = off * 2;
12544 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12545 : : )
12546 : : {
12547 : 0 : {
12548 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12549 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12550 : 0 : if (cmp == LT_EXPR
12551 : : )
12552 : : {
12553 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1935;
12554 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1935;
12555 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1935;
12556 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1935;
12557 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1935;
12558 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1935;
12559 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1935;
12560 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1935;
12561 : 0 : {
12562 : 0 : tree res_op0;
12563 : 0 : {
12564 : 0 : tree _o1[1], _r1;
12565 : 0 : {
12566 : 0 : tree _o2[2], _r2;
12567 : 0 : _o2[0] = swap_p ? captures[6] : captures[1];
12568 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12569 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12570 : 0 : _o1[0] = _r2;
12571 : : }
12572 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12573 : : {
12574 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12575 : : }
12576 : : else
12577 : : _r1 = _o1[0];
12578 : 0 : res_op0 = _r1;
12579 : : }
12580 : 0 : tree res_op1;
12581 : 0 : res_op1 = rhs_tree;
12582 : 0 : tree _r;
12583 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12584 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
12585 : 0 : return _r;
12586 : : }
12587 : 0 : next_after_fail1935:;
12588 : : }
12589 : : else
12590 : : {
12591 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1936;
12592 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1936;
12593 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1936;
12594 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1936;
12595 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1936;
12596 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1936;
12597 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1936;
12598 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1936;
12599 : : {
12600 : : tree res_op0;
12601 : : {
12602 : : tree _o1[1], _r1;
12603 : : {
12604 : : tree _o2[2], _r2;
12605 : : {
12606 : : tree _o3[2], _r3;
12607 : : _o3[0] = swap_p ? captures[4] : captures[2];
12608 : : _o3[1] = wide_int_to_tree (sizetype, off);
12609 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12610 : : _o2[0] = _r3;
12611 : : }
12612 : : _o2[1] = swap_p ? captures[2] : captures[4];
12613 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12614 : : _o1[0] = _r2;
12615 : : }
12616 : : if (TREE_TYPE (_o1[0]) != sizetype)
12617 : : {
12618 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12619 : : }
12620 : : else
12621 : : _r1 = _o1[0];
12622 : : res_op0 = _r1;
12623 : : }
12624 : : tree res_op1;
12625 : : res_op1 = rhs_tree;
12626 : : tree _r;
12627 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12628 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
12629 : : return _r;
12630 : : }
12631 : : next_after_fail1936:;
12632 : : }
12633 : : }
12634 : : }
12635 : : }
12636 : : }
12637 : : }
12638 : : }
12639 : : }
12640 : : }
12641 : : break;
12642 : : }
12643 : : default:;
12644 : : }
12645 : : break;
12646 : : }
12647 : 0 : case GT_EXPR:
12648 : 0 : {
12649 : 0 : tree _q70 = TREE_OPERAND (_p1, 0);
12650 : 0 : tree _q71 = TREE_OPERAND (_p1, 1);
12651 : 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
12652 : : {
12653 : 0 : switch (TREE_CODE (_q71))
12654 : : {
12655 : 0 : case POINTER_PLUS_EXPR:
12656 : 0 : {
12657 : 0 : tree _q90 = TREE_OPERAND (_q71, 0);
12658 : 0 : tree _q91 = TREE_OPERAND (_q71, 1);
12659 : 0 : if ((_q90 == _q20 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q20, 0) && types_match (_q90, _q20)))
12660 : : {
12661 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
12662 : : {
12663 : 0 : {
12664 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q41, _q20, _p1, _q71 };
12665 : 0 : const enum tree_code cmp = LT_EXPR;
12666 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
12667 : 0 : && TYPE_OVERFLOW_WRAPS (sizetype)
12668 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[2])) == TYPE_PRECISION (sizetype)
12669 : : )
12670 : : {
12671 : 0 : {
12672 : 0 : offset_int off = wi::to_offset (captures[3]) - (cmp == LE_EXPR ? 1 : 0);
12673 : 0 : offset_int rhs = off * 2;
12674 : 0 : if (wi::min_precision (rhs, UNSIGNED) <= TYPE_PRECISION (sizetype)
12675 : : )
12676 : : {
12677 : 0 : {
12678 : 0 : bool swap_p = tree_swap_operands_p (captures[2], captures[4]);
12679 : 0 : tree rhs_tree = wide_int_to_tree (sizetype, rhs);
12680 : 0 : if (cmp == LT_EXPR
12681 : : )
12682 : : {
12683 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1937;
12684 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1937;
12685 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1937;
12686 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1937;
12687 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1937;
12688 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1937;
12689 : 0 : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1937;
12690 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1937;
12691 : 0 : {
12692 : 0 : tree res_op0;
12693 : 0 : {
12694 : 0 : tree _o1[1], _r1;
12695 : 0 : {
12696 : 0 : tree _o2[2], _r2;
12697 : 0 : _o2[0] = swap_p ? captures[6] : captures[1];
12698 : 0 : _o2[1] = swap_p ? captures[2] : captures[4];
12699 : 0 : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12700 : 0 : _o1[0] = _r2;
12701 : : }
12702 : 0 : if (TREE_TYPE (_o1[0]) != sizetype)
12703 : : {
12704 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12705 : : }
12706 : : else
12707 : : _r1 = _o1[0];
12708 : 0 : res_op0 = _r1;
12709 : : }
12710 : 0 : tree res_op1;
12711 : 0 : res_op1 = rhs_tree;
12712 : 0 : tree _r;
12713 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12714 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
12715 : 0 : return _r;
12716 : : }
12717 : 0 : next_after_fail1937:;
12718 : : }
12719 : : else
12720 : : {
12721 : : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1938;
12722 : : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1938;
12723 : : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1938;
12724 : : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1938;
12725 : : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1938;
12726 : : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1938;
12727 : : if (TREE_SIDE_EFFECTS (captures[6])) goto next_after_fail1938;
12728 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1938;
12729 : : {
12730 : : tree res_op0;
12731 : : {
12732 : : tree _o1[1], _r1;
12733 : : {
12734 : : tree _o2[2], _r2;
12735 : : {
12736 : : tree _o3[2], _r3;
12737 : : _o3[0] = swap_p ? captures[4] : captures[2];
12738 : : _o3[1] = wide_int_to_tree (sizetype, off);
12739 : : _r3 = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
12740 : : _o2[0] = _r3;
12741 : : }
12742 : : _o2[1] = swap_p ? captures[2] : captures[4];
12743 : : _r2 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ssizetype, _o2[0], _o2[1]);
12744 : : _o1[0] = _r2;
12745 : : }
12746 : : if (TREE_TYPE (_o1[0]) != sizetype)
12747 : : {
12748 : : _r1 = fold_build1_loc (loc, NOP_EXPR, sizetype, _o1[0]);
12749 : : }
12750 : : else
12751 : : _r1 = _o1[0];
12752 : : res_op0 = _r1;
12753 : : }
12754 : : tree res_op1;
12755 : : res_op1 = rhs_tree;
12756 : : tree _r;
12757 : : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
12758 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
12759 : : return _r;
12760 : : }
12761 : : next_after_fail1938:;
12762 : : }
12763 : : }
12764 : : }
12765 : : }
12766 : : }
12767 : : }
12768 : : }
12769 : : }
12770 : : break;
12771 : : }
12772 : : default:;
12773 : : }
12774 : : }
12775 : : break;
12776 : : }
12777 : : default:;
12778 : : }
12779 : : break;
12780 : : }
12781 : : default:;
12782 : : }
12783 : : break;
12784 : : }
12785 : : default:;
12786 : : }
12787 : : break;
12788 : : }
12789 : : default:;
12790 : : }
12791 : : return NULL_TREE;
12792 : : }
12793 : : #pragma GCC diagnostic pop
|