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 176715391 : tree_truth_valued_p (tree t)
11 : {
12 176715391 : const tree type = TREE_TYPE (t);
13 176715391 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 176715391 : if (TREE_SIDE_EFFECTS (t)) return false;
15 171396132 : {
16 171396132 : tree captures[1] ATTRIBUTE_UNUSED = { t };
17 171396132 : if (INTEGRAL_TYPE_P (type) && TYPE_PRECISION (type) == 1
18 : )
19 : {
20 5944888 : {
21 5944888 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 20, __FILE__, __LINE__, false);
22 : return true;
23 : }
24 : }
25 : }
26 165451244 : switch (TREE_CODE (t))
27 : {
28 817 : case LT_EXPR:
29 817 : {
30 817 : tree _p0 = TREE_OPERAND (t, 0);
31 817 : tree _p1 = TREE_OPERAND (t, 1);
32 817 : {
33 817 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
34 817 : {
35 817 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
36 : return true;
37 : }
38 : }
39 722 : break;
40 : }
41 722 : case LE_EXPR:
42 722 : {
43 722 : tree _p0 = TREE_OPERAND (t, 0);
44 722 : tree _p1 = TREE_OPERAND (t, 1);
45 722 : {
46 722 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
47 722 : {
48 722 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
49 : return true;
50 : }
51 : }
52 12330 : break;
53 : }
54 12330 : case EQ_EXPR:
55 12330 : {
56 12330 : tree _p0 = TREE_OPERAND (t, 0);
57 12330 : tree _p1 = TREE_OPERAND (t, 1);
58 12330 : {
59 12330 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
60 12330 : {
61 12330 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
62 : return true;
63 : }
64 : }
65 4516 : break;
66 : }
67 4516 : case NE_EXPR:
68 4516 : {
69 4516 : tree _p0 = TREE_OPERAND (t, 0);
70 4516 : tree _p1 = TREE_OPERAND (t, 1);
71 4516 : {
72 4516 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
73 4516 : {
74 4516 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
75 : return true;
76 : }
77 : }
78 392 : break;
79 : }
80 392 : case GE_EXPR:
81 392 : {
82 392 : tree _p0 = TREE_OPERAND (t, 0);
83 392 : tree _p1 = TREE_OPERAND (t, 1);
84 392 : {
85 392 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
86 392 : {
87 392 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
88 : return true;
89 : }
90 : }
91 238656 : break;
92 : }
93 238656 : case GT_EXPR:
94 238656 : {
95 238656 : tree _p0 = TREE_OPERAND (t, 0);
96 238656 : tree _p1 = TREE_OPERAND (t, 1);
97 238656 : {
98 238656 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
99 238656 : {
100 238656 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
101 : return true;
102 : }
103 : }
104 136987 : break;
105 : }
106 136987 : case UNORDERED_EXPR:
107 136987 : {
108 136987 : tree _p0 = TREE_OPERAND (t, 0);
109 136987 : tree _p1 = TREE_OPERAND (t, 1);
110 136987 : {
111 136987 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
112 136987 : {
113 136987 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
114 : return true;
115 : }
116 : }
117 16 : break;
118 : }
119 16 : case ORDERED_EXPR:
120 16 : {
121 16 : tree _p0 = TREE_OPERAND (t, 0);
122 16 : tree _p1 = TREE_OPERAND (t, 1);
123 16 : {
124 16 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
125 16 : {
126 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
127 : return true;
128 : }
129 : }
130 70 : break;
131 : }
132 70 : case UNLT_EXPR:
133 70 : {
134 70 : tree _p0 = TREE_OPERAND (t, 0);
135 70 : tree _p1 = TREE_OPERAND (t, 1);
136 70 : {
137 70 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
138 70 : {
139 70 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
140 : return true;
141 : }
142 : }
143 1157 : break;
144 : }
145 1157 : case UNLE_EXPR:
146 1157 : {
147 1157 : tree _p0 = TREE_OPERAND (t, 0);
148 1157 : tree _p1 = TREE_OPERAND (t, 1);
149 1157 : {
150 1157 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
151 1157 : {
152 1157 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
153 : return true;
154 : }
155 : }
156 70 : break;
157 : }
158 70 : case UNGT_EXPR:
159 70 : {
160 70 : tree _p0 = TREE_OPERAND (t, 0);
161 70 : tree _p1 = TREE_OPERAND (t, 1);
162 70 : {
163 70 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
164 70 : {
165 70 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
166 : return true;
167 : }
168 : }
169 70 : break;
170 : }
171 70 : case UNGE_EXPR:
172 70 : {
173 70 : tree _p0 = TREE_OPERAND (t, 0);
174 70 : tree _p1 = TREE_OPERAND (t, 1);
175 70 : {
176 70 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
177 70 : {
178 70 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
179 : return true;
180 : }
181 : }
182 84 : break;
183 : }
184 84 : case UNEQ_EXPR:
185 84 : {
186 84 : tree _p0 = TREE_OPERAND (t, 0);
187 84 : tree _p1 = TREE_OPERAND (t, 1);
188 84 : {
189 84 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
190 84 : {
191 84 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
192 : return true;
193 : }
194 : }
195 24 : break;
196 : }
197 24 : case LTGT_EXPR:
198 24 : {
199 24 : tree _p0 = TREE_OPERAND (t, 0);
200 24 : tree _p1 = TREE_OPERAND (t, 1);
201 24 : {
202 24 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
203 24 : {
204 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
205 : return true;
206 : }
207 : }
208 106 : break;
209 : }
210 106 : case TRUTH_AND_EXPR:
211 106 : {
212 106 : tree _p0 = TREE_OPERAND (t, 0);
213 106 : tree _p1 = TREE_OPERAND (t, 1);
214 106 : {
215 106 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
216 106 : {
217 106 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
218 : return true;
219 : }
220 : }
221 512 : break;
222 : }
223 512 : case TRUTH_ANDIF_EXPR:
224 512 : {
225 512 : tree _p0 = TREE_OPERAND (t, 0);
226 512 : tree _p1 = TREE_OPERAND (t, 1);
227 512 : {
228 512 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
229 512 : {
230 512 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
231 : return true;
232 : }
233 : }
234 53 : break;
235 : }
236 53 : case TRUTH_OR_EXPR:
237 53 : {
238 53 : tree _p0 = TREE_OPERAND (t, 0);
239 53 : tree _p1 = TREE_OPERAND (t, 1);
240 53 : {
241 53 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
242 53 : {
243 53 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
244 : return true;
245 : }
246 : }
247 1449 : break;
248 : }
249 1449 : case TRUTH_ORIF_EXPR:
250 1449 : {
251 1449 : tree _p0 = TREE_OPERAND (t, 0);
252 1449 : tree _p1 = TREE_OPERAND (t, 1);
253 1449 : {
254 1449 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
255 1449 : {
256 1449 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
257 : return true;
258 : }
259 : }
260 0 : break;
261 : }
262 0 : case TRUTH_XOR_EXPR:
263 0 : {
264 0 : tree _p0 = TREE_OPERAND (t, 0);
265 0 : tree _p1 = TREE_OPERAND (t, 1);
266 0 : {
267 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
268 0 : {
269 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
270 : return true;
271 : }
272 : }
273 616034 : break;
274 : }
275 616034 : case TRUTH_NOT_EXPR:
276 616034 : {
277 616034 : tree _p0 = TREE_OPERAND (t, 0);
278 616034 : {
279 616034 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
280 616034 : {
281 616034 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 22, __FILE__, __LINE__, false);
282 : return true;
283 : }
284 : }
285 : break;
286 : }
287 : default:;
288 : }
289 : return false;
290 : }
291 :
292 : tree
293 18 : generic_simplify_42 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
294 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
295 : const enum tree_code ARG_UNUSED (op))
296 : {
297 18 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
298 36 : if (INTEGRAL_TYPE_P (type)
299 54 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[2])) == 0
300 : )
301 : {
302 0 : {
303 0 : tree t = type;
304 0 : if (!TYPE_OVERFLOW_WRAPS (t))
305 0 : t = unsigned_type_for (t);
306 0 : wide_int c = wi::add (wi::to_wide (captures[3]), 1);
307 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail119;
308 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail119;
309 0 : {
310 0 : tree res_op0;
311 0 : {
312 0 : tree _o1[2], _r1;
313 0 : {
314 0 : tree _o2[1], _r2;
315 0 : _o2[0] = captures[2];
316 0 : if (TREE_TYPE (_o2[0]) != t)
317 : {
318 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, t, _o2[0]);
319 : }
320 : else
321 : _r2 = _o2[0];
322 0 : _o1[0] = _r2;
323 : }
324 0 : _o1[1] = wide_int_to_tree (t, c);
325 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, t, _o1[0], _o1[1]);
326 0 : res_op0 = _r1;
327 : }
328 0 : tree _r;
329 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
330 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 87, __FILE__, __LINE__, true);
331 0 : return _r;
332 : }
333 0 : next_after_fail119:;
334 0 : }
335 : }
336 : return NULL_TREE;
337 : }
338 :
339 : tree
340 0 : generic_simplify_50 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
341 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
342 : const combined_fn ARG_UNUSED (reduc),
343 : const enum tree_code ARG_UNUSED (op))
344 : {
345 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
346 0 : if (types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[3]))
347 0 : && target_supports_op_p (TREE_TYPE (captures[1]), op, optab_vector)
348 : )
349 : {
350 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail129;
351 0 : {
352 0 : tree res_op0;
353 0 : {
354 0 : tree _o1[2], _r1;
355 0 : _o1[0] = captures[1];
356 0 : _o1[1] = captures[3];
357 0 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
358 0 : res_op0 = _r1;
359 : }
360 0 : tree _r;
361 0 : _r = maybe_build_call_expr_loc (loc, reduc, type, 1, res_op0);
362 0 : if (!_r)
363 0 : goto next_after_fail129;
364 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 99, __FILE__, __LINE__, true);
365 : return _r;
366 : }
367 0 : next_after_fail129:;
368 : }
369 : return NULL_TREE;
370 : }
371 :
372 : tree
373 45 : generic_simplify_57 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
374 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
375 : {
376 45 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
377 45 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail137;
378 45 : {
379 45 : if (! tree_invariant_p (captures[2])) goto next_after_fail137;
380 45 : tree res_op0;
381 45 : {
382 45 : tree _o1[2], _r1;
383 45 : _o1[0] = captures[0];
384 45 : _o1[1] = unshare_expr (captures[2]);
385 45 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
386 45 : res_op0 = _r1;
387 : }
388 45 : tree res_op1;
389 45 : {
390 45 : tree _o1[1], _r1;
391 45 : _o1[0] = captures[2];
392 45 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
393 45 : res_op1 = _r1;
394 : }
395 45 : tree _r;
396 45 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
397 45 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 106, __FILE__, __LINE__, true);
398 : return _r;
399 : }
400 45 : next_after_fail137:;
401 : return NULL_TREE;
402 : }
403 :
404 : tree
405 3035363 : generic_simplify_66 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
406 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
407 : const enum tree_code ARG_UNUSED (inner_op),
408 : const enum tree_code ARG_UNUSED (neg_inner_op),
409 : const enum tree_code ARG_UNUSED (outer_op))
410 : {
411 3035363 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
412 3035363 : if (!TYPE_SATURATING (type)
413 : )
414 : {
415 3035363 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
416 6070481 : && !FIXED_POINT_TYPE_P (type)
417 : )
418 : {
419 3035118 : if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type)
420 : )
421 : {
422 2054289 : if (!CONSTANT_CLASS_P (captures[0])
423 : )
424 : {
425 2054282 : if (outer_op == PLUS_EXPR
426 : )
427 : {
428 2054282 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail146;
429 2054282 : {
430 2054282 : tree res_op0;
431 2054282 : {
432 2054282 : tree _o1[1], _r1;
433 2054282 : _o1[0] = captures[0];
434 2054282 : if (TREE_TYPE (_o1[0]) != type)
435 : {
436 866082 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
437 : }
438 : else
439 : _r1 = _o1[0];
440 2054282 : res_op0 = _r1;
441 : }
442 2054282 : tree res_op1;
443 2054282 : {
444 2054282 : tree _o1[2], _r1;
445 2054282 : _o1[0] = captures[2];
446 2054282 : {
447 2054282 : tree _o2[1], _r2;
448 2054282 : _o2[0] = captures[1];
449 2054282 : if (TREE_TYPE (_o2[0]) != type)
450 : {
451 857578 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o2[0]);
452 : }
453 : else
454 : _r2 = _o2[0];
455 2054282 : _o1[1] = _r2;
456 : }
457 2054282 : _r1 = fold_build2_loc (loc, inner_op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
458 2054282 : if (EXPR_P (_r1))
459 0 : goto next_after_fail146;
460 2054282 : res_op1 = _r1;
461 : }
462 2054282 : tree _r;
463 2054282 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
464 2054282 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 114, __FILE__, __LINE__, true);
465 : return _r;
466 : }
467 3035363 : next_after_fail146:;
468 : }
469 : else
470 : {
471 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail147;
472 0 : {
473 0 : tree res_op0;
474 0 : {
475 0 : tree _o1[1], _r1;
476 0 : _o1[0] = captures[0];
477 0 : if (TREE_TYPE (_o1[0]) != type)
478 : {
479 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
480 : }
481 : else
482 : _r1 = _o1[0];
483 0 : res_op0 = _r1;
484 : }
485 0 : tree res_op1;
486 0 : {
487 0 : tree _o1[2], _r1;
488 0 : _o1[0] = captures[2];
489 0 : {
490 0 : tree _o2[1], _r2;
491 0 : _o2[0] = captures[1];
492 0 : if (TREE_TYPE (_o2[0]) != type)
493 : {
494 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o2[0]);
495 : }
496 : else
497 : _r2 = _o2[0];
498 0 : _o1[1] = _r2;
499 : }
500 0 : _r1 = fold_build2_loc (loc, neg_inner_op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
501 0 : if (EXPR_P (_r1))
502 0 : goto next_after_fail147;
503 0 : res_op1 = _r1;
504 : }
505 0 : tree _r;
506 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
507 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 115, __FILE__, __LINE__, true);
508 : return _r;
509 : }
510 3035363 : next_after_fail147:;
511 : }
512 : }
513 : }
514 : else
515 : {
516 1961658 : if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
517 1961658 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0]))
518 : )
519 : {
520 180215 : if (outer_op == PLUS_EXPR
521 : )
522 : {
523 180188 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail148;
524 180188 : {
525 180188 : tree res_op0;
526 180188 : {
527 180188 : tree _o1[2], _r1;
528 180188 : _o1[0] = captures[0];
529 180188 : {
530 180188 : tree _o2[2], _r2;
531 180188 : {
532 180188 : tree _o3[1], _r3;
533 180188 : _o3[0] = captures[2];
534 180188 : if (TREE_TYPE (_o3[0]) != TREE_TYPE (_o1[0]))
535 : {
536 180188 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (_o1[0]), _o3[0]);
537 : }
538 : else
539 : _r3 = _o3[0];
540 180188 : _o2[0] = _r3;
541 : }
542 180188 : _o2[1] = captures[1];
543 180188 : _r2 = fold_build2_loc (loc, inner_op, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
544 180188 : if (EXPR_P (_r2))
545 0 : goto next_after_fail148;
546 180188 : _o1[1] = _r2;
547 : }
548 180188 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
549 180188 : res_op0 = _r1;
550 : }
551 180188 : tree _r;
552 180188 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
553 180188 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 116, __FILE__, __LINE__, true);
554 : return _r;
555 : }
556 3035363 : next_after_fail148:;
557 : }
558 : else
559 : {
560 27 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail149;
561 27 : {
562 27 : tree res_op0;
563 27 : {
564 27 : tree _o1[2], _r1;
565 27 : _o1[0] = captures[0];
566 27 : {
567 27 : tree _o2[2], _r2;
568 27 : {
569 27 : tree _o3[1], _r3;
570 27 : _o3[0] = captures[2];
571 27 : if (TREE_TYPE (_o3[0]) != TREE_TYPE (_o1[0]))
572 : {
573 27 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (_o1[0]), _o3[0]);
574 : }
575 : else
576 : _r3 = _o3[0];
577 27 : _o2[0] = _r3;
578 : }
579 27 : _o2[1] = captures[1];
580 27 : _r2 = fold_build2_loc (loc, neg_inner_op, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
581 27 : if (EXPR_P (_r2))
582 0 : goto next_after_fail149;
583 27 : _o1[1] = _r2;
584 : }
585 27 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
586 27 : res_op0 = _r1;
587 : }
588 27 : tree _r;
589 27 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
590 27 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 117, __FILE__, __LINE__, true);
591 : return _r;
592 : }
593 3035363 : next_after_fail149:;
594 : }
595 : }
596 : else
597 : {
598 800614 : if (types_match (type, captures[0]) && !TYPE_OVERFLOW_SANITIZED (type)
599 : )
600 : {
601 799371 : {
602 799371 : tree cst = const_binop (outer_op == inner_op
603 : ? PLUS_EXPR : MINUS_EXPR,
604 : type, captures[1], captures[2]);
605 799371 : if (cst
606 : )
607 : {
608 799371 : if (INTEGRAL_TYPE_P (type) && !TREE_OVERFLOW (cst)
609 : )
610 : {
611 799357 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail150;
612 799357 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail150;
613 799357 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail150;
614 799357 : {
615 799357 : tree res_op0;
616 799357 : res_op0 = captures[0];
617 799357 : tree res_op1;
618 799357 : res_op1 = cst;
619 799357 : tree _r;
620 799357 : _r = fold_build2_loc (loc, inner_op, type, res_op0, res_op1);
621 799357 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 118, __FILE__, __LINE__, true);
622 : return _r;
623 : }
624 3035363 : next_after_fail150:;
625 : }
626 : else
627 : {
628 28 : if (INTEGRAL_TYPE_P (type)
629 14 : && wi::to_wide (cst) == wi::min_value (type)
630 : )
631 : {
632 7 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail151;
633 7 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail151;
634 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail151;
635 7 : {
636 7 : tree res_op0;
637 7 : res_op0 = captures[0];
638 7 : tree res_op1;
639 7 : res_op1 = wide_int_to_tree (type, wi::to_wide (cst));
640 7 : tree _r;
641 7 : _r = fold_build2_loc (loc, neg_inner_op, type, res_op0, res_op1);
642 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 119, __FILE__, __LINE__, true);
643 : return _r;
644 : }
645 3035363 : next_after_fail151:;
646 : }
647 : else
648 : {
649 7 : {
650 7 : tree utype = unsigned_type_for (type);
651 7 : if (utype
652 : )
653 : {
654 7 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail152;
655 7 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail152;
656 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail152;
657 7 : {
658 7 : tree res_op0;
659 7 : {
660 7 : tree _o1[2], _r1;
661 7 : {
662 7 : tree _o2[1], _r2;
663 7 : _o2[0] = captures[0];
664 7 : if (TREE_TYPE (_o2[0]) != utype)
665 : {
666 7 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o2[0]);
667 : }
668 : else
669 : _r2 = _o2[0];
670 7 : _o1[0] = _r2;
671 : }
672 7 : {
673 7 : tree _o2[1], _r2;
674 7 : _o2[0] = TREE_OVERFLOW (cst)
675 7 : ? drop_tree_overflow (cst) : cst;
676 7 : if (TREE_TYPE (_o2[0]) != utype)
677 : {
678 7 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o2[0]);
679 : }
680 : else
681 : _r2 = _o2[0];
682 7 : _o1[1] = _r2;
683 : }
684 7 : _r1 = fold_build2_loc (loc, inner_op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
685 7 : res_op0 = _r1;
686 : }
687 7 : tree _r;
688 7 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
689 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 120, __FILE__, __LINE__, true);
690 : return _r;
691 : }
692 3035363 : next_after_fail152:;
693 : }
694 : }
695 : }
696 : }
697 : }
698 : }
699 : }
700 : }
701 : }
702 : }
703 : }
704 : return NULL_TREE;
705 : }
706 :
707 : tree
708 2 : generic_simplify_124 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
709 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
710 : const enum tree_code ARG_UNUSED (bitop),
711 : const enum tree_code ARG_UNUSED (cmp),
712 : const enum tree_code ARG_UNUSED (rcmp))
713 : {
714 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
715 4 : if (integer_pow2p (captures[3]) && integer_pow2p (captures[6])
716 4 : && wi::to_wide (captures[3]) != wi::to_wide (captures[6])
717 : )
718 : {
719 2 : {
720 2 : tree m = wide_int_to_tree (TREE_TYPE (captures[2]),
721 2 : wi::to_wide (captures[3]) | wi::to_wide (captures[6]));
722 2 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail224;
723 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail224;
724 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail224;
725 2 : {
726 2 : tree res_op0;
727 2 : {
728 2 : tree _o1[2], _r1;
729 2 : _o1[0] = captures[2];
730 2 : _o1[1] = m;
731 2 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
732 2 : res_op0 = _r1;
733 : }
734 2 : tree res_op1;
735 2 : res_op1 = m;
736 2 : tree _r;
737 2 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
738 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 189, __FILE__, __LINE__, true);
739 : return _r;
740 : }
741 2 : next_after_fail224:;
742 : }
743 : }
744 : return NULL_TREE;
745 : }
746 :
747 : tree
748 0 : generic_simplify_134 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
749 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
750 : {
751 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
752 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail234;
753 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail234;
754 0 : {
755 0 : tree res_op0;
756 0 : res_op0 = captures[0];
757 0 : tree res_op1;
758 0 : res_op1 = captures[3];
759 0 : tree _r;
760 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
761 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 197, __FILE__, __LINE__, true);
762 : return _r;
763 : }
764 0 : next_after_fail234:;
765 : return NULL_TREE;
766 : }
767 :
768 : tree
769 1 : generic_simplify_142 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
770 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
771 : {
772 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
773 1 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail242;
774 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail242;
775 1 : {
776 1 : tree _r;
777 1 : _r = captures[0];
778 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 202, __FILE__, __LINE__, true);
779 : return _r;
780 : }
781 1 : next_after_fail242:;
782 : return NULL_TREE;
783 : }
784 :
785 : tree
786 0 : generic_simplify_151 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
787 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
788 : const enum tree_code ARG_UNUSED (op))
789 : {
790 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
791 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
792 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
793 : )
794 : {
795 0 : if (single_use (captures[4]) && single_use (captures[5])
796 : )
797 : {
798 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail254;
799 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail254;
800 0 : {
801 0 : tree res_op0;
802 0 : res_op0 = captures[0];
803 0 : tree res_op1;
804 0 : {
805 0 : tree _o1[1], _r1;
806 0 : _o1[0] = captures[6];
807 0 : if (TREE_TYPE (_o1[0]) != type)
808 : {
809 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
810 : }
811 : else
812 : _r1 = _o1[0];
813 0 : res_op1 = _r1;
814 : }
815 0 : tree _r;
816 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
817 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 206, __FILE__, __LINE__, true);
818 : return _r;
819 : }
820 0 : next_after_fail254:;
821 : }
822 : else
823 : {
824 : if (single_use (captures[0]) && single_use (captures[1])
825 : )
826 : {
827 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail255;
828 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail255;
829 : {
830 : tree res_op0;
831 : {
832 : tree _o1[1], _r1;
833 : _o1[0] = captures[3];
834 : if (TREE_TYPE (_o1[0]) != type)
835 : {
836 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
837 : }
838 : else
839 : _r1 = _o1[0];
840 : res_op0 = _r1;
841 : }
842 : tree res_op1;
843 : res_op1 = captures[4];
844 : tree _r;
845 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
846 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 207, __FILE__, __LINE__, true);
847 : return _r;
848 : }
849 0 : next_after_fail255:;
850 : }
851 : }
852 : }
853 : return NULL_TREE;
854 : }
855 :
856 : tree
857 4 : generic_simplify_166 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
858 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
859 : {
860 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
861 4 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail274;
862 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail274;
863 4 : {
864 4 : tree _r;
865 4 : _r = captures[2];
866 4 : if (TREE_SIDE_EFFECTS (captures[1]))
867 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
868 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 221, __FILE__, __LINE__, true);
869 : return _r;
870 : }
871 4 : next_after_fail274:;
872 : return NULL_TREE;
873 : }
874 :
875 : tree
876 36 : generic_simplify_170 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
877 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
878 : const enum tree_code ARG_UNUSED (rcmp),
879 : const enum tree_code ARG_UNUSED (cmp2),
880 : const enum tree_code ARG_UNUSED (cmp1),
881 : const enum tree_code ARG_UNUSED (bitop))
882 : {
883 36 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
884 36 : {
885 36 : tree_code rescode;
886 36 : tree res;
887 36 : bool honor_nans = HONOR_NANS (captures[0]);
888 36 : rescode = combine_comparisons (bitop, cmp1, cmp2,
889 : type, honor_nans, &res);
890 36 : if (rescode == INTEGER_CST
891 : )
892 : {
893 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail290;
894 0 : {
895 0 : tree _r;
896 0 : _r = res;
897 0 : if (TREE_SIDE_EFFECTS (captures[0]))
898 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
899 0 : if (TREE_SIDE_EFFECTS (captures[1]))
900 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
901 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 230, __FILE__, __LINE__, true);
902 18 : return _r;
903 : }
904 0 : next_after_fail290:;
905 : }
906 : else
907 : {
908 36 : if (rescode == rcmp
909 : )
910 : {
911 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail291;
912 18 : {
913 18 : tree res_op0;
914 18 : res_op0 = captures[0];
915 18 : tree res_op1;
916 18 : res_op1 = captures[1];
917 18 : tree _r;
918 18 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
919 18 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 231, __FILE__, __LINE__, true);
920 : return _r;
921 : }
922 0 : next_after_fail291:;
923 : }
924 : }
925 : }
926 18 : return NULL_TREE;
927 : }
928 :
929 : tree
930 4 : generic_simplify_182 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
931 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
932 : {
933 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
934 4 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail322;
935 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail322;
936 4 : {
937 4 : tree _r;
938 4 : _r = constant_boolean_node (true, type);
939 4 : if (TREE_SIDE_EFFECTS (captures[1]))
940 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
941 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 241, __FILE__, __LINE__, true);
942 : return _r;
943 : }
944 4 : next_after_fail322:;
945 : return NULL_TREE;
946 : }
947 :
948 : tree
949 2 : generic_simplify_185 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
950 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
951 : {
952 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
953 4 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
954 4 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
955 : )
956 : {
957 2 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail326;
958 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail326;
959 2 : {
960 2 : tree res_op0;
961 2 : res_op0 = captures[3];
962 2 : tree res_op1;
963 2 : {
964 2 : tree _o1[2], _r1;
965 2 : _o1[0] = captures[1];
966 2 : _o1[1] = build_int_cst (TREE_TYPE (captures[1]), 1);
967 2 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
968 2 : res_op1 = _r1;
969 : }
970 2 : tree _r;
971 2 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
972 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 222, __FILE__, __LINE__, true);
973 : return _r;
974 : }
975 2 : next_after_fail326:;
976 : }
977 : return NULL_TREE;
978 : }
979 :
980 : tree
981 0 : generic_simplify_192 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
982 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
983 : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
984 : {
985 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
986 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
987 : )
988 : {
989 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail333;
990 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail333;
991 0 : {
992 0 : tree res_op0;
993 0 : res_op0 = captures[0];
994 0 : tree _r;
995 0 : _r = fold_build1_loc (loc, ABS_EXPR, type, res_op0);
996 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 250, __FILE__, __LINE__, true);
997 : return _r;
998 : }
999 0 : next_after_fail333:;
1000 : }
1001 : return NULL_TREE;
1002 : }
1003 :
1004 : tree
1005 0 : generic_simplify_195 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1006 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1007 : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
1008 : {
1009 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1010 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
1011 : )
1012 : {
1013 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail336;
1014 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail336;
1015 0 : {
1016 0 : tree res_op0;
1017 0 : {
1018 0 : tree _o1[1], _r1;
1019 0 : _o1[0] = captures[0];
1020 0 : _r1 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1021 0 : res_op0 = _r1;
1022 : }
1023 0 : tree _r;
1024 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
1025 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 251, __FILE__, __LINE__, true);
1026 : return _r;
1027 : }
1028 0 : next_after_fail336:;
1029 : }
1030 : return NULL_TREE;
1031 : }
1032 :
1033 : tree
1034 31403 : generic_simplify_202 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1035 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1036 : {
1037 31403 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1038 31403 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1039 31403 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
1040 : )
1041 : {
1042 28654 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail345;
1043 28654 : {
1044 28654 : tree res_op0;
1045 28654 : {
1046 28654 : tree _o1[1], _r1;
1047 28654 : _o1[0] = captures[0];
1048 28654 : if (TREE_TYPE (_o1[0]) != type)
1049 : {
1050 2806 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1051 : }
1052 : else
1053 : _r1 = _o1[0];
1054 28654 : res_op0 = _r1;
1055 : }
1056 28654 : tree res_op1;
1057 28654 : {
1058 28654 : tree _o1[1], _r1;
1059 28654 : {
1060 28654 : tree _o2[1], _r2;
1061 28654 : _o2[0] = captures[1];
1062 28654 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
1063 28654 : _o1[0] = _r2;
1064 : }
1065 28654 : if (TREE_TYPE (_o1[0]) != type)
1066 : {
1067 7 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1068 : }
1069 : else
1070 : _r1 = _o1[0];
1071 28654 : res_op1 = _r1;
1072 : }
1073 28654 : tree _r;
1074 28654 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1075 28654 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 258, __FILE__, __LINE__, true);
1076 : return _r;
1077 : }
1078 0 : next_after_fail345:;
1079 : }
1080 : return NULL_TREE;
1081 : }
1082 :
1083 : tree
1084 179292 : generic_simplify_208 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1085 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1086 : {
1087 179292 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1088 179292 : {
1089 179292 : poly_widest_int factor;
1090 179292 : if (multiple_p (wi::to_poly_widest (captures[2]), wi::to_widest (captures[1]), &factor)
1091 : )
1092 : {
1093 55725 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail351;
1094 55725 : {
1095 55725 : tree res_op0;
1096 55725 : {
1097 55725 : tree _o1[1], _r1;
1098 55725 : _o1[0] = captures[0];
1099 55725 : if (TREE_TYPE (_o1[0]) != type)
1100 : {
1101 10192 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1102 : }
1103 : else
1104 : _r1 = _o1[0];
1105 55725 : res_op0 = _r1;
1106 : }
1107 55725 : tree res_op1;
1108 55725 : res_op1 = wide_int_to_tree (type, factor);
1109 55725 : tree _r;
1110 55725 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1111 55725 : if (TREE_SIDE_EFFECTS (captures[1]))
1112 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1113 55725 : if (TREE_SIDE_EFFECTS (captures[2]))
1114 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1115 55725 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 263, __FILE__, __LINE__, true);
1116 55725 : return _r;
1117 : }
1118 0 : next_after_fail351:;
1119 : }
1120 179292 : }
1121 123567 : return NULL_TREE;
1122 : }
1123 :
1124 : tree
1125 2 : generic_simplify_217 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1126 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1127 : const combined_fn ARG_UNUSED (POW))
1128 : {
1129 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1130 2 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
1131 : )
1132 : {
1133 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail361;
1134 2 : {
1135 2 : tree res_op0;
1136 2 : {
1137 2 : tree _o1[2], _r1;
1138 2 : _o1[0] = captures[1];
1139 2 : _o1[1] = captures[4];
1140 2 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1141 2 : res_op0 = _r1;
1142 : }
1143 2 : tree res_op1;
1144 2 : res_op1 = captures[2];
1145 2 : tree _r;
1146 2 : _r = maybe_build_call_expr_loc (loc, POW, type, 2, res_op0, res_op1);
1147 2 : if (!_r)
1148 0 : goto next_after_fail361;
1149 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 273, __FILE__, __LINE__, true);
1150 : return _r;
1151 : }
1152 2 : next_after_fail361:;
1153 : }
1154 : return NULL_TREE;
1155 : }
1156 :
1157 : tree
1158 0 : generic_simplify_226 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1159 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1160 : const enum tree_code ARG_UNUSED (neeq))
1161 : {
1162 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1163 0 : if (TREE_CODE (TREE_TYPE (captures[0])) == BOOLEAN_TYPE
1164 0 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
1165 0 : && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1166 : )
1167 : {
1168 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail374;
1169 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail374;
1170 0 : {
1171 0 : tree res_op0;
1172 0 : res_op0 = captures[1];
1173 0 : tree res_op1;
1174 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
1175 0 : tree _r;
1176 0 : _r = fold_build2_loc (loc, neeq, type, res_op0, res_op1);
1177 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 285, __FILE__, __LINE__, true);
1178 : return _r;
1179 : }
1180 0 : next_after_fail374:;
1181 : }
1182 : return NULL_TREE;
1183 : }
1184 :
1185 : tree
1186 1668870 : generic_simplify_231 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1187 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1188 : const enum tree_code ARG_UNUSED (cmp))
1189 : {
1190 1668870 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1191 3337740 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1192 1668870 : && integer_nonzerop (captures[2])
1193 1667003 : && !TREE_OVERFLOW (captures[2])
1194 3335873 : && !TREE_OVERFLOW (captures[3])
1195 : )
1196 : {
1197 1667003 : {
1198 1667003 : tree lo, hi; bool neg_overflow;
1199 1667003 : enum tree_code code = fold_div_compare (cmp, captures[2], captures[3], &lo, &hi,
1200 : &neg_overflow);
1201 1667003 : if (code == LT_EXPR || code == GE_EXPR
1202 : )
1203 : {
1204 41816 : if (TREE_OVERFLOW (lo)
1205 : )
1206 : {
1207 5436 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail379;
1208 5436 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail379;
1209 5436 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail379;
1210 5436 : {
1211 5436 : tree _r;
1212 5436 : _r = build_int_cst (type, (code == LT_EXPR) ^ neg_overflow);
1213 5436 : if (TREE_SIDE_EFFECTS (captures[1]))
1214 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1215 5436 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 290, __FILE__, __LINE__, true);
1216 1667000 : return _r;
1217 : }
1218 3 : next_after_fail379:;
1219 : }
1220 : else
1221 : {
1222 36380 : if (code == LT_EXPR
1223 : )
1224 : {
1225 719 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail380;
1226 719 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail380;
1227 719 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail380;
1228 719 : {
1229 719 : tree res_op0;
1230 719 : res_op0 = captures[1];
1231 719 : tree res_op1;
1232 719 : res_op1 = lo;
1233 719 : tree _r;
1234 719 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
1235 719 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 291, __FILE__, __LINE__, true);
1236 : return _r;
1237 : }
1238 3 : next_after_fail380:;
1239 : }
1240 : else
1241 : {
1242 35661 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail381;
1243 35661 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail381;
1244 35661 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail381;
1245 35661 : {
1246 35661 : tree res_op0;
1247 35661 : res_op0 = captures[1];
1248 35661 : tree res_op1;
1249 35661 : res_op1 = lo;
1250 35661 : tree _r;
1251 35661 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1252 35661 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 292, __FILE__, __LINE__, true);
1253 : return _r;
1254 : }
1255 3 : next_after_fail381:;
1256 : }
1257 : }
1258 : }
1259 : else
1260 : {
1261 1625187 : if (code == LE_EXPR || code == GT_EXPR
1262 : )
1263 : {
1264 1622134 : if (TREE_OVERFLOW (hi)
1265 : )
1266 : {
1267 535370 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail382;
1268 535370 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail382;
1269 535370 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail382;
1270 535370 : {
1271 535370 : tree _r;
1272 535370 : _r = build_int_cst (type, (code == LE_EXPR) ^ neg_overflow);
1273 535370 : if (TREE_SIDE_EFFECTS (captures[1]))
1274 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1275 535370 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 293, __FILE__, __LINE__, true);
1276 : return _r;
1277 : }
1278 3 : next_after_fail382:;
1279 : }
1280 : else
1281 : {
1282 1086764 : if (code == LE_EXPR
1283 : )
1284 : {
1285 644 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail383;
1286 644 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail383;
1287 644 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail383;
1288 644 : {
1289 644 : tree res_op0;
1290 644 : res_op0 = captures[1];
1291 644 : tree res_op1;
1292 644 : res_op1 = hi;
1293 644 : tree _r;
1294 644 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1295 644 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 294, __FILE__, __LINE__, true);
1296 : return _r;
1297 : }
1298 3 : next_after_fail383:;
1299 : }
1300 : else
1301 : {
1302 1086120 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail384;
1303 1086120 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail384;
1304 1086120 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail384;
1305 1086120 : {
1306 1086120 : tree res_op0;
1307 1086120 : res_op0 = captures[1];
1308 1086120 : tree res_op1;
1309 1086120 : res_op1 = hi;
1310 1086120 : tree _r;
1311 1086120 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
1312 1086120 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 295, __FILE__, __LINE__, true);
1313 : return _r;
1314 : }
1315 3 : next_after_fail384:;
1316 : }
1317 : }
1318 : }
1319 : else
1320 : {
1321 3053 : if (!lo && !hi
1322 : )
1323 : {
1324 40 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail385;
1325 40 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail385;
1326 40 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail385;
1327 40 : {
1328 40 : tree _r;
1329 40 : _r = build_int_cst (type, code == NE_EXPR);
1330 40 : if (TREE_SIDE_EFFECTS (captures[1]))
1331 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1332 40 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 296, __FILE__, __LINE__, true);
1333 : return _r;
1334 : }
1335 3 : next_after_fail385:;
1336 : }
1337 : else
1338 : {
1339 3013 : if (code == EQ_EXPR && !hi
1340 : )
1341 : {
1342 15 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail386;
1343 15 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail386;
1344 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail386;
1345 15 : {
1346 15 : tree res_op0;
1347 15 : res_op0 = captures[1];
1348 15 : tree res_op1;
1349 15 : res_op1 = lo;
1350 15 : tree _r;
1351 15 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
1352 15 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 297, __FILE__, __LINE__, true);
1353 : return _r;
1354 : }
1355 3 : next_after_fail386:;
1356 : }
1357 : else
1358 : {
1359 911 : if (code == EQ_EXPR && !lo
1360 : )
1361 : {
1362 12 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail387;
1363 12 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail387;
1364 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail387;
1365 12 : {
1366 12 : tree res_op0;
1367 12 : res_op0 = captures[1];
1368 12 : tree res_op1;
1369 12 : res_op1 = hi;
1370 12 : tree _r;
1371 12 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1372 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 298, __FILE__, __LINE__, true);
1373 : return _r;
1374 : }
1375 3 : next_after_fail387:;
1376 : }
1377 : else
1378 : {
1379 2986 : if (code == NE_EXPR && !hi
1380 : )
1381 : {
1382 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail388;
1383 4 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail388;
1384 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail388;
1385 4 : {
1386 4 : tree res_op0;
1387 4 : res_op0 = captures[1];
1388 4 : tree res_op1;
1389 4 : res_op1 = lo;
1390 4 : tree _r;
1391 4 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
1392 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 299, __FILE__, __LINE__, true);
1393 : return _r;
1394 : }
1395 3 : next_after_fail388:;
1396 : }
1397 : else
1398 : {
1399 2083 : if (code == NE_EXPR && !lo
1400 : )
1401 : {
1402 20 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail389;
1403 20 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail389;
1404 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail389;
1405 20 : {
1406 20 : tree res_op0;
1407 20 : res_op0 = captures[1];
1408 20 : tree res_op1;
1409 20 : res_op1 = hi;
1410 20 : tree _r;
1411 20 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
1412 20 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 300, __FILE__, __LINE__, true);
1413 : return _r;
1414 : }
1415 3 : next_after_fail389:;
1416 : }
1417 : else
1418 : {
1419 2962 : if (1
1420 : )
1421 : {
1422 2962 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail390;
1423 2959 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail390;
1424 2959 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail390;
1425 2959 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail390;
1426 2959 : {
1427 2959 : tree _r;
1428 2959 : _r = build_range_check (UNKNOWN_LOCATION, type, captures[1], code == EQ_EXPR,
1429 : lo, hi);
1430 2959 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 301, __FILE__, __LINE__, true);
1431 : return _r;
1432 : }
1433 3 : next_after_fail390:;
1434 : }
1435 : else
1436 : {
1437 : {
1438 : tree etype = range_check_type (TREE_TYPE (captures[1]));
1439 : if (etype)
1440 : {
1441 : hi = fold_convert (etype, hi);
1442 : lo = fold_convert (etype, lo);
1443 : hi = const_binop (MINUS_EXPR, etype, hi, lo);
1444 : }
1445 : if (etype && hi && !TREE_OVERFLOW (hi)
1446 : )
1447 : {
1448 : if (code == EQ_EXPR
1449 : )
1450 : {
1451 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail391;
1452 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail391;
1453 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail391;
1454 : {
1455 : tree res_op0;
1456 : {
1457 : tree _o1[2], _r1;
1458 : {
1459 : tree _o2[1], _r2;
1460 : _o2[0] = captures[1];
1461 : if (TREE_TYPE (_o2[0]) != etype)
1462 : {
1463 : _r2 = fold_build1_loc (loc, NOP_EXPR, etype, _o2[0]);
1464 : }
1465 : else
1466 : _r2 = _o2[0];
1467 : _o1[0] = _r2;
1468 : }
1469 : _o1[1] = lo;
1470 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1471 : res_op0 = _r1;
1472 : }
1473 : tree res_op1;
1474 : res_op1 = hi;
1475 : tree _r;
1476 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1477 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 302, __FILE__, __LINE__, true);
1478 : return _r;
1479 : }
1480 : next_after_fail391:;
1481 : }
1482 : else
1483 : {
1484 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail392;
1485 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail392;
1486 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail392;
1487 : {
1488 : tree res_op0;
1489 : {
1490 : tree _o1[2], _r1;
1491 : {
1492 : tree _o2[1], _r2;
1493 : _o2[0] = captures[1];
1494 : if (TREE_TYPE (_o2[0]) != etype)
1495 : {
1496 : _r2 = fold_build1_loc (loc, NOP_EXPR, etype, _o2[0]);
1497 : }
1498 : else
1499 : _r2 = _o2[0];
1500 : _o1[0] = _r2;
1501 : }
1502 : _o1[1] = lo;
1503 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1504 : res_op0 = _r1;
1505 : }
1506 : tree res_op1;
1507 : res_op1 = hi;
1508 : tree _r;
1509 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
1510 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 303, __FILE__, __LINE__, true);
1511 : return _r;
1512 : }
1513 : next_after_fail392:;
1514 : }
1515 : }
1516 : }
1517 : }
1518 : }
1519 : }
1520 : }
1521 : }
1522 : }
1523 : }
1524 : }
1525 : }
1526 : }
1527 : return NULL_TREE;
1528 : }
1529 :
1530 : tree
1531 151677 : generic_simplify_290 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1532 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1533 : const enum tree_code ARG_UNUSED (cmp))
1534 : {
1535 151677 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1536 151677 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail528;
1537 151677 : {
1538 151677 : tree res_op0;
1539 151677 : {
1540 151677 : tree _o1[2], _r1;
1541 151677 : _o1[0] = captures[0];
1542 151677 : {
1543 151677 : tree _o2[1], _r2;
1544 151677 : _o2[0] = captures[1];
1545 151677 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
1546 151677 : if (EXPR_P (_r2))
1547 151648 : goto next_after_fail528;
1548 29 : _o1[1] = _r2;
1549 : }
1550 29 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1551 29 : res_op0 = _r1;
1552 : }
1553 29 : tree res_op1;
1554 29 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
1555 29 : tree _r;
1556 29 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1557 29 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 428, __FILE__, __LINE__, true);
1558 : return _r;
1559 : }
1560 151677 : next_after_fail528:;
1561 : return NULL_TREE;
1562 : }
1563 :
1564 : tree
1565 30414775 : generic_simplify_294 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1566 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1567 : const enum tree_code ARG_UNUSED (cmp))
1568 : {
1569 30414775 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1570 30414775 : if (tree_expr_nonzero_p (captures[0])
1571 : )
1572 : {
1573 1047020 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail532;
1574 1047020 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail532;
1575 1047020 : {
1576 1047020 : tree _r;
1577 1047020 : _r = constant_boolean_node (cmp == NE_EXPR, type);
1578 1047020 : if (TREE_SIDE_EFFECTS (captures[0]))
1579 6712 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1580 1047020 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 432, __FILE__, __LINE__, true);
1581 : return _r;
1582 : }
1583 30414775 : next_after_fail532:;
1584 : }
1585 : return NULL_TREE;
1586 : }
1587 :
1588 : tree
1589 234 : generic_simplify_297 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1590 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1591 : const enum tree_code ARG_UNUSED (cmp))
1592 : {
1593 234 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1594 234 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail535;
1595 234 : {
1596 234 : tree res_op0;
1597 234 : {
1598 234 : tree _o1[2], _r1;
1599 234 : {
1600 234 : tree _o2[2], _r2;
1601 234 : _o2[0] = captures[1];
1602 234 : _o2[1] = captures[4];
1603 234 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1604 234 : _o1[0] = _r2;
1605 : }
1606 234 : {
1607 234 : tree _o2[1], _r2;
1608 234 : _o2[0] = captures[2];
1609 234 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
1610 234 : if (EXPR_P (_r2))
1611 10 : goto next_after_fail535;
1612 224 : _o1[1] = _r2;
1613 : }
1614 224 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1615 224 : res_op0 = _r1;
1616 : }
1617 224 : tree res_op1;
1618 224 : res_op1 = build_zero_cst (TREE_TYPE (captures[2]));
1619 224 : tree _r;
1620 224 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1621 224 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 435, __FILE__, __LINE__, true);
1622 : return _r;
1623 : }
1624 234 : next_after_fail535:;
1625 : return NULL_TREE;
1626 : }
1627 :
1628 : tree
1629 0 : generic_simplify_304 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1630 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1631 : const enum tree_code ARG_UNUSED (cmp))
1632 : {
1633 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1634 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail542;
1635 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail542;
1636 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail542;
1637 0 : {
1638 0 : tree res_op0;
1639 0 : res_op0 = captures[0];
1640 0 : tree res_op1;
1641 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
1642 0 : tree _r;
1643 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1644 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 440, __FILE__, __LINE__, true);
1645 : return _r;
1646 : }
1647 0 : next_after_fail542:;
1648 : return NULL_TREE;
1649 : }
1650 :
1651 : tree
1652 1110904 : generic_simplify_308 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1653 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1654 : const enum tree_code ARG_UNUSED (cmp))
1655 : {
1656 1110904 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1657 1691204 : if (((POINTER_TYPE_P (TREE_TYPE (captures[0]))
1658 532585 : && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[0])))
1659 493949 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1660 9801 : && !(
1661 : 1
1662 9681 : && TREE_CODE (TREE_TYPE (captures[0])) == REFERENCE_TYPE
1663 120 : && (flag_sanitize & (SANITIZE_NULL | SANITIZE_ALIGNMENT))))
1664 1101235 : || (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1665 578190 : && POINTER_TYPE_P (TREE_TYPE (captures[1]))
1666 2393 : && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[1])))))
1667 1122458 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == TYPE_PRECISION (TREE_TYPE (captures[1]))
1668 : )
1669 : {
1670 10396 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail560;
1671 10396 : {
1672 10396 : tree res_op0;
1673 10396 : res_op0 = captures[0];
1674 10396 : tree res_op1;
1675 10396 : {
1676 10396 : tree _o1[1], _r1;
1677 10396 : _o1[0] = captures[1];
1678 10396 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1679 : {
1680 10396 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1681 : }
1682 : else
1683 : _r1 = _o1[0];
1684 10396 : res_op1 = _r1;
1685 : }
1686 10396 : tree _r;
1687 10396 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1688 10396 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 450, __FILE__, __LINE__, true);
1689 : return _r;
1690 : }
1691 0 : next_after_fail560:;
1692 : }
1693 : return NULL_TREE;
1694 : }
1695 :
1696 : tree
1697 618187 : generic_simplify_312 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1698 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1699 : const enum tree_code ARG_UNUSED (cmp),
1700 : const enum tree_code ARG_UNUSED (rcmp))
1701 : {
1702 618187 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1703 1236374 : if (!TREE_OVERFLOW (captures[0]) && !TREE_OVERFLOW (captures[2])
1704 1236374 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
1705 : )
1706 : {
1707 2967 : {
1708 2967 : tree res = int_const_binop (MINUS_EXPR, captures[0], captures[2]);
1709 2967 : if (TREE_OVERFLOW (res)
1710 : )
1711 : {
1712 48 : if (cmp == NE_EXPR
1713 : )
1714 : {
1715 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail569;
1716 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail569;
1717 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail569;
1718 0 : {
1719 0 : tree _r;
1720 0 : _r = constant_boolean_node (true, type);
1721 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1722 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1723 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 459, __FILE__, __LINE__, true);
1724 : return _r;
1725 : }
1726 618187 : next_after_fail569:;
1727 : }
1728 : else
1729 : {
1730 48 : if (cmp == EQ_EXPR
1731 : )
1732 : {
1733 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail570;
1734 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail570;
1735 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail570;
1736 0 : {
1737 0 : tree _r;
1738 0 : _r = constant_boolean_node (false, type);
1739 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1740 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1741 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 460, __FILE__, __LINE__, true);
1742 : return _r;
1743 : }
1744 618187 : next_after_fail570:;
1745 : }
1746 : else
1747 : {
1748 48 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail571;
1749 48 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail571;
1750 48 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail571;
1751 48 : {
1752 48 : tree _r;
1753 48 : bool less = cmp == LE_EXPR || cmp == LT_EXPR;
1754 48 : bool ovf_high = wi::lt_p (wi::to_wide (captures[0]), 0,
1755 48 : TYPE_SIGN (TREE_TYPE (captures[0]))); _r =
1756 48 : constant_boolean_node (less == ovf_high, type);
1757 48 : if (TREE_SIDE_EFFECTS (captures[1]))
1758 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1759 48 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 461, __FILE__, __LINE__, true);
1760 : return _r;
1761 : }
1762 618187 : next_after_fail571:;
1763 : }
1764 : }
1765 : }
1766 : else
1767 : {
1768 2919 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail572;
1769 2919 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail572;
1770 2919 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail572;
1771 2919 : {
1772 2919 : tree res_op0;
1773 2919 : res_op0 = captures[1];
1774 2919 : tree res_op1;
1775 2919 : res_op1 = res;
1776 2919 : tree _r;
1777 2919 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
1778 2919 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 462, __FILE__, __LINE__, true);
1779 : return _r;
1780 : }
1781 618187 : next_after_fail572:;
1782 : }
1783 : }
1784 : }
1785 : else
1786 : {
1787 615220 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
1788 : )
1789 : {
1790 615126 : if (cmp == EQ_EXPR || cmp == NE_EXPR
1791 : )
1792 : {
1793 38297 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail573;
1794 38297 : {
1795 38297 : tree res_op0;
1796 38297 : res_op0 = captures[1];
1797 38297 : tree res_op1;
1798 38297 : {
1799 38297 : tree _o1[2], _r1;
1800 38297 : _o1[0] = captures[0];
1801 38297 : _o1[1] = captures[2];
1802 38297 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1803 38297 : res_op1 = _r1;
1804 : }
1805 38297 : tree _r;
1806 38297 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1807 38297 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 463, __FILE__, __LINE__, true);
1808 : return _r;
1809 : }
1810 0 : next_after_fail573:;
1811 : }
1812 : else
1813 : {
1814 576829 : if (cmp == LE_EXPR || cmp == GT_EXPR
1815 : )
1816 : {
1817 576829 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail574;
1818 576829 : {
1819 576829 : if (! tree_invariant_p (captures[2])) goto next_after_fail574;
1820 576829 : tree res_op0;
1821 576829 : {
1822 576829 : tree _o1[2], _r1;
1823 576829 : _o1[0] = captures[1];
1824 576829 : {
1825 576829 : tree _o2[2], _r2;
1826 576829 : _o2[0] = unshare_expr (captures[2]);
1827 576829 : _o2[1] = captures[0];
1828 576829 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1829 576829 : _o1[1] = _r2;
1830 : }
1831 576829 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1832 576829 : res_op0 = _r1;
1833 : }
1834 576829 : tree res_op1;
1835 576829 : res_op1 = captures[2];
1836 576829 : tree _r;
1837 576829 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1838 576829 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 464, __FILE__, __LINE__, true);
1839 : return _r;
1840 : }
1841 618187 : next_after_fail574:;
1842 : }
1843 : else
1844 : {
1845 0 : if (cmp == LT_EXPR || cmp == GE_EXPR
1846 : )
1847 : {
1848 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail575;
1849 0 : {
1850 0 : if (! tree_invariant_p (captures[2])) goto next_after_fail575;
1851 0 : tree res_op0;
1852 0 : {
1853 0 : tree _o1[2], _r1;
1854 0 : _o1[0] = captures[1];
1855 0 : {
1856 0 : tree _o2[2], _r2;
1857 0 : _o2[0] = unshare_expr (captures[2]);
1858 0 : {
1859 0 : tree _o3[2], _r3;
1860 0 : _o3[0] = captures[0];
1861 0 : _o3[1] = build_one_cst (TREE_TYPE (captures[1]));
1862 0 : _r3 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
1863 0 : _o2[1] = _r3;
1864 : }
1865 0 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1866 0 : _o1[1] = _r2;
1867 : }
1868 0 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1869 0 : res_op0 = _r1;
1870 : }
1871 0 : tree res_op1;
1872 0 : res_op1 = captures[2];
1873 0 : tree _r;
1874 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1875 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 465, __FILE__, __LINE__, true);
1876 : return _r;
1877 : }
1878 618187 : next_after_fail575:;
1879 : }
1880 : }
1881 : }
1882 : }
1883 : else
1884 : {
1885 94 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[1]))
1886 94 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
1887 : )
1888 : {
1889 94 : if (cmp == EQ_EXPR || cmp == NE_EXPR
1890 : )
1891 : {
1892 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail576;
1893 0 : {
1894 0 : tree res_op0;
1895 0 : res_op0 = captures[1];
1896 0 : tree res_op1;
1897 0 : {
1898 0 : tree _o1[2], _r1;
1899 0 : _o1[0] = captures[0];
1900 0 : _o1[1] = captures[2];
1901 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1902 0 : res_op1 = _r1;
1903 : }
1904 0 : tree _r;
1905 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1906 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 466, __FILE__, __LINE__, true);
1907 : return _r;
1908 : }
1909 0 : next_after_fail576:;
1910 : }
1911 : else
1912 : {
1913 94 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail577;
1914 94 : {
1915 94 : tree res_op0;
1916 94 : {
1917 94 : tree _o1[2], _r1;
1918 94 : _o1[0] = captures[1];
1919 94 : {
1920 94 : tree _o2[2], _r2;
1921 94 : _o2[0] = captures[0];
1922 94 : _o2[1] = build_one_cst (TREE_TYPE (captures[1]));
1923 94 : _r2 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1924 94 : _o1[1] = _r2;
1925 : }
1926 94 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1927 94 : res_op0 = _r1;
1928 : }
1929 94 : tree res_op1;
1930 94 : {
1931 94 : tree _o1[1], _r1;
1932 94 : _o1[0] = captures[2];
1933 94 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1934 94 : res_op1 = _r1;
1935 : }
1936 94 : tree _r;
1937 94 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
1938 94 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 467, __FILE__, __LINE__, true);
1939 : return _r;
1940 : }
1941 0 : next_after_fail577:;
1942 : }
1943 : }
1944 : }
1945 : }
1946 : return NULL_TREE;
1947 : }
1948 :
1949 : tree
1950 6 : generic_simplify_354 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1951 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1952 : const combined_fn ARG_UNUSED (SIN),
1953 : const combined_fn ARG_UNUSED (COS),
1954 : const combined_fn ARG_UNUSED (TAN))
1955 : {
1956 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1957 6 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
1958 : )
1959 : {
1960 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail631;
1961 6 : {
1962 6 : tree res_op0;
1963 6 : res_op0 = captures[1];
1964 6 : tree _r;
1965 6 : _r = maybe_build_call_expr_loc (loc, TAN, type, 1, res_op0);
1966 6 : if (!_r)
1967 0 : goto next_after_fail631;
1968 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 519, __FILE__, __LINE__, true);
1969 : return _r;
1970 : }
1971 6 : next_after_fail631:;
1972 : }
1973 : return NULL_TREE;
1974 : }
1975 :
1976 : tree
1977 0 : generic_simplify_362 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1978 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1979 : const enum tree_code ARG_UNUSED (op),
1980 : const combined_fn ARG_UNUSED (bt),
1981 : const combined_fn ARG_UNUSED (bf),
1982 : const combined_fn ARG_UNUSED (floor),
1983 : const combined_fn ARG_UNUSED (ceil))
1984 : {
1985 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1986 0 : if (!HONOR_SIGNED_ZEROS (type) && !HONOR_SIGN_DEPENDENT_ROUNDING (type)
1987 : )
1988 : {
1989 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail639;
1990 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail639;
1991 0 : {
1992 0 : tree res_op0;
1993 0 : {
1994 0 : tree _o1[2], _r1;
1995 0 : _o1[0] = captures[1];
1996 0 : _o1[1] = build_real (type, dconsthalf);
1997 0 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1998 0 : res_op0 = _r1;
1999 : }
2000 0 : tree _r;
2001 0 : _r = maybe_build_call_expr_loc (loc, floor, type, 1, res_op0);
2002 0 : if (!_r)
2003 0 : goto next_after_fail639;
2004 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 527, __FILE__, __LINE__, true);
2005 : return _r;
2006 : }
2007 0 : next_after_fail639:;
2008 : }
2009 : return NULL_TREE;
2010 : }
2011 :
2012 : tree
2013 4 : generic_simplify_371 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2014 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
2015 : const enum tree_code ARG_UNUSED (op))
2016 : {
2017 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2018 4 : if (INTEGRAL_TYPE_P (type)
2019 4 : && TYPE_PRECISION (type) > 1
2020 4 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2021 8 : && expr_no_side_effects_p (captures[2])
2022 : )
2023 : {
2024 4 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail654;
2025 4 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail654;
2026 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail654;
2027 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail654;
2028 4 : {
2029 4 : tree res_op0;
2030 4 : {
2031 4 : tree _o1[2], _r1;
2032 4 : {
2033 4 : tree _o2[1], _r2;
2034 4 : _o2[0] = captures[0];
2035 4 : if (TREE_TYPE (_o2[0]) != type)
2036 : {
2037 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
2038 : }
2039 : else
2040 : _r2 = _o2[0];
2041 4 : _o1[0] = _r2;
2042 : }
2043 4 : _o1[1] = captures[2];
2044 4 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2045 4 : res_op0 = _r1;
2046 : }
2047 4 : tree res_op1;
2048 4 : res_op1 = captures[1];
2049 4 : tree _r;
2050 4 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2051 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 542, __FILE__, __LINE__, true);
2052 : return _r;
2053 : }
2054 4 : next_after_fail654:;
2055 : }
2056 : return NULL_TREE;
2057 : }
2058 :
2059 : tree
2060 3 : generic_simplify_379 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2061 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
2062 : const enum tree_code ARG_UNUSED (neeq))
2063 : {
2064 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2065 3 : if (neeq == EQ_EXPR
2066 : )
2067 : {
2068 2 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail664;
2069 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail664;
2070 2 : {
2071 2 : tree _r;
2072 2 : _r = captures[2];
2073 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 552, __FILE__, __LINE__, true);
2074 : return _r;
2075 : }
2076 3 : next_after_fail664:;
2077 : }
2078 : else
2079 : {
2080 1 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail665;
2081 1 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail665;
2082 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail665;
2083 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail665;
2084 1 : {
2085 1 : tree _r;
2086 1 : _r = captures[0];
2087 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 553, __FILE__, __LINE__, true);
2088 : return _r;
2089 : }
2090 3 : next_after_fail665:;
2091 : }
2092 : return NULL_TREE;
2093 : }
2094 :
2095 : tree
2096 0 : generic_simplify_388 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2097 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
2098 : const enum tree_code ARG_UNUSED (cmp))
2099 : {
2100 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2101 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail675;
2102 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail675;
2103 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail675;
2104 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail675;
2105 0 : {
2106 0 : tree _r;
2107 0 : _r = captures[3];
2108 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 563, __FILE__, __LINE__, true);
2109 : return _r;
2110 : }
2111 0 : next_after_fail675:;
2112 : return NULL_TREE;
2113 : }
2114 :
2115 : tree
2116 17 : generic_simplify_397 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2117 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
2118 : const enum tree_code ARG_UNUSED (cmp))
2119 : {
2120 17 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2121 17 : if (INTEGRAL_TYPE_P (type)
2122 17 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2123 17 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2124 34 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == TYPE_PRECISION (type)
2125 : )
2126 : {
2127 17 : {
2128 17 : tree shifter = build_int_cst (integer_type_node, TYPE_PRECISION (type) - 1);
2129 17 : if (cmp == GE_EXPR
2130 : )
2131 : {
2132 9 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail686;
2133 9 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail686;
2134 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail686;
2135 9 : {
2136 9 : tree res_op0;
2137 9 : {
2138 9 : tree _o1[1], _r1;
2139 9 : {
2140 9 : tree _o2[2], _r2;
2141 9 : _o2[0] = captures[0];
2142 9 : _o2[1] = shifter;
2143 9 : _r2 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2144 9 : _o1[0] = _r2;
2145 : }
2146 9 : if (TREE_TYPE (_o1[0]) != type)
2147 : {
2148 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2149 : }
2150 : else
2151 : _r1 = _o1[0];
2152 9 : res_op0 = _r1;
2153 : }
2154 9 : tree res_op1;
2155 9 : res_op1 = captures[1];
2156 9 : tree _r;
2157 9 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
2158 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 572, __FILE__, __LINE__, true);
2159 : return _r;
2160 : }
2161 17 : next_after_fail686:;
2162 : }
2163 : else
2164 : {
2165 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail687;
2166 8 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail687;
2167 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail687;
2168 8 : {
2169 8 : tree res_op0;
2170 8 : {
2171 8 : tree _o1[2], _r1;
2172 8 : {
2173 8 : tree _o2[1], _r2;
2174 8 : {
2175 8 : tree _o3[2], _r3;
2176 8 : _o3[0] = captures[0];
2177 8 : _o3[1] = shifter;
2178 8 : _r3 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
2179 8 : _o2[0] = _r3;
2180 : }
2181 8 : if (TREE_TYPE (_o2[0]) != type)
2182 : {
2183 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
2184 : }
2185 : else
2186 : _r2 = _o2[0];
2187 8 : _o1[0] = _r2;
2188 : }
2189 8 : _o1[1] = captures[1];
2190 8 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2191 8 : res_op0 = _r1;
2192 : }
2193 8 : tree _r;
2194 8 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
2195 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 573, __FILE__, __LINE__, true);
2196 : return _r;
2197 : }
2198 17 : next_after_fail687:;
2199 : }
2200 : }
2201 : }
2202 : return NULL_TREE;
2203 : }
2204 :
2205 : tree
2206 0 : generic_simplify_417 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2207 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2208 : const enum tree_code ARG_UNUSED (cmp),
2209 : const enum tree_code ARG_UNUSED (cmp2))
2210 : {
2211 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2212 0 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[2]))
2213 0 : && TYPE_UNSIGNED (TREE_TYPE (captures[2])) && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2214 0 : && wi::gt_p (wi::to_wide (captures[1]), 0, TYPE_SIGN (TREE_TYPE (captures[1])))
2215 : )
2216 : {
2217 0 : {
2218 0 : tree utype = TREE_TYPE (captures[2]);
2219 0 : wide_int denom = wi::to_wide (captures[1]);
2220 0 : wide_int right = wi::to_wide (captures[2]);
2221 0 : wide_int smax = wi::sdiv_trunc (wi::max_value (TREE_TYPE (captures[0])), denom);
2222 0 : wide_int smin = wi::sdiv_trunc (wi::min_value (TREE_TYPE (captures[0])), denom);
2223 0 : bool small = wi::leu_p (right, smax);
2224 0 : bool large = wi::geu_p (right, smin);
2225 0 : if (small || large
2226 : )
2227 : {
2228 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail711;
2229 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail711;
2230 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail711;
2231 0 : {
2232 0 : tree res_op0;
2233 0 : {
2234 0 : tree _o1[1], _r1;
2235 0 : _o1[0] = captures[0];
2236 0 : if (TREE_TYPE (_o1[0]) != utype)
2237 : {
2238 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
2239 : }
2240 : else
2241 : _r1 = _o1[0];
2242 0 : res_op0 = _r1;
2243 : }
2244 0 : tree res_op1;
2245 0 : {
2246 0 : tree _o1[2], _r1;
2247 0 : _o1[0] = captures[2];
2248 0 : {
2249 0 : tree _o2[1], _r2;
2250 0 : _o2[0] = captures[1];
2251 0 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (res_op0))
2252 : {
2253 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o2[0]);
2254 : }
2255 : else
2256 : _r2 = _o2[0];
2257 0 : _o1[1] = _r2;
2258 : }
2259 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2260 0 : res_op1 = _r1;
2261 : }
2262 0 : tree _r;
2263 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2264 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 597, __FILE__, __LINE__, true);
2265 : return _r;
2266 : }
2267 0 : next_after_fail711:;
2268 : }
2269 : else
2270 : {
2271 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail712;
2272 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail712;
2273 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail712;
2274 0 : {
2275 0 : tree res_op0;
2276 0 : res_op0 = captures[0];
2277 0 : tree res_op1;
2278 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
2279 0 : tree _r;
2280 0 : _r = fold_build2_loc (loc, cmp2, type, res_op0, res_op1);
2281 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 598, __FILE__, __LINE__, true);
2282 : return _r;
2283 : }
2284 0 : next_after_fail712:;
2285 : }
2286 0 : }
2287 : }
2288 : return NULL_TREE;
2289 : }
2290 :
2291 : tree
2292 32275 : generic_simplify_433 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2293 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2294 : const enum tree_code ARG_UNUSED (cmp),
2295 : const enum tree_code ARG_UNUSED (eqcmp))
2296 : {
2297 32275 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2298 32275 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2299 : )
2300 : {
2301 32275 : {
2302 32275 : tree ty = TREE_TYPE (captures[0]);
2303 32275 : unsigned prec = TYPE_PRECISION (ty);
2304 32275 : wide_int mask = wi::to_wide (captures[2], prec);
2305 32275 : wide_int rhs = wi::to_wide (captures[3], prec);
2306 32275 : signop sgn = TYPE_SIGN (ty);
2307 75647 : if ((mask & (mask + 1)) == 0 && wi::gt_p (rhs, 0, sgn)
2308 65398 : && (rhs & (rhs + 1)) == 0 && wi::ge_p (mask, rhs, sgn)
2309 : )
2310 : {
2311 791 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail765;
2312 791 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail765;
2313 791 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail765;
2314 791 : {
2315 791 : tree res_op0;
2316 791 : {
2317 791 : tree _o1[2], _r1;
2318 791 : _o1[0] = captures[1];
2319 791 : _o1[1] = wide_int_to_tree (ty, mask - rhs);
2320 791 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2321 791 : res_op0 = _r1;
2322 : }
2323 791 : tree res_op1;
2324 791 : res_op1 = build_zero_cst (ty);
2325 791 : tree _r;
2326 791 : _r = fold_build2_loc (loc, eqcmp, type, res_op0, res_op1);
2327 791 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 634, __FILE__, __LINE__, true);
2328 791 : return _r;
2329 : }
2330 31484 : next_after_fail765:;
2331 : }
2332 32275 : }
2333 : }
2334 : return NULL_TREE;
2335 : }
2336 :
2337 : tree
2338 1 : generic_simplify_440 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2339 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2340 : const combined_fn ARG_UNUSED (logs),
2341 : const combined_fn ARG_UNUSED (exps),
2342 : const enum tree_code ARG_UNUSED (cmp))
2343 : {
2344 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2345 1 : if (flag_unsafe_math_optimizations
2346 : )
2347 : {
2348 1 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
2349 1 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
2350 1 : && ! flag_trapping_math
2351 2 : && ! flag_errno_math
2352 : )
2353 : {
2354 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail772;
2355 1 : {
2356 1 : tree res_op0;
2357 1 : res_op0 = captures[1];
2358 1 : tree res_op1;
2359 1 : {
2360 1 : tree _o1[1], _r1;
2361 1 : _o1[0] = captures[2];
2362 1 : _r1 = maybe_build_call_expr_loc (loc, logs, TREE_TYPE (_o1[0]), 1, _o1[0]);
2363 1 : if (!_r1)
2364 0 : goto next_after_fail772;
2365 1 : if (EXPR_P (_r1))
2366 1 : goto next_after_fail772;
2367 0 : res_op1 = _r1;
2368 : }
2369 0 : tree _r;
2370 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2371 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 637, __FILE__, __LINE__, true);
2372 : return _r;
2373 : }
2374 1 : next_after_fail772:;
2375 : }
2376 : }
2377 : return NULL_TREE;
2378 : }
2379 :
2380 : tree
2381 330 : generic_simplify_447 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2382 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2383 : const enum tree_code ARG_UNUSED (shiftrotate))
2384 : {
2385 330 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2386 330 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail783;
2387 330 : {
2388 330 : tree _r;
2389 330 : _r = captures[0];
2390 330 : if (TREE_SIDE_EFFECTS (captures[1]))
2391 42 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2392 330 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 648, __FILE__, __LINE__, true);
2393 : return _r;
2394 : }
2395 0 : next_after_fail783:;
2396 0 : return NULL_TREE;
2397 : }
2398 :
2399 : tree
2400 285 : generic_simplify_454 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2401 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2402 : const enum tree_code ARG_UNUSED (op))
2403 : {
2404 285 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2405 285 : if (INTEGRAL_TYPE_P (type)
2406 279 : && tree_fits_uhwi_p (captures[2])
2407 564 : && tree_to_uhwi (captures[2]) < TYPE_PRECISION (type)
2408 : )
2409 : {
2410 279 : {
2411 558 : wide_int mask = wi::mask (tree_to_uhwi (captures[2]), true,
2412 279 : TYPE_PRECISION (type));
2413 279 : if ((tree_nonzero_bits (captures[1]) & mask) == 0
2414 : )
2415 : {
2416 98 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail793;
2417 98 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail793;
2418 98 : {
2419 98 : tree res_op0;
2420 98 : res_op0 = captures[0];
2421 98 : tree res_op1;
2422 98 : res_op1 = captures[2];
2423 98 : tree _r;
2424 98 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
2425 98 : if (TREE_SIDE_EFFECTS (captures[1]))
2426 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2427 98 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 656, __FILE__, __LINE__, true);
2428 : return _r;
2429 : }
2430 170 : next_after_fail793:;
2431 : }
2432 : else
2433 : {
2434 181 : if ((tree_nonzero_bits (captures[0]) & mask) == 0
2435 : )
2436 : {
2437 11 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail794;
2438 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail794;
2439 11 : {
2440 11 : tree res_op0;
2441 11 : res_op0 = captures[1];
2442 11 : tree res_op1;
2443 11 : res_op1 = captures[2];
2444 11 : tree _r;
2445 11 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
2446 11 : if (TREE_SIDE_EFFECTS (captures[0]))
2447 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2448 11 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 657, __FILE__, __LINE__, true);
2449 : return _r;
2450 : }
2451 170 : next_after_fail794:;
2452 : }
2453 : }
2454 279 : }
2455 : }
2456 : return NULL_TREE;
2457 : }
2458 :
2459 : tree
2460 995106 : generic_simplify_461 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2461 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
2462 : const enum tree_code ARG_UNUSED (op))
2463 : {
2464 995106 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2465 995106 : if (INTEGRAL_TYPE_P (type)
2466 885439 : && op != MULT_EXPR
2467 885439 : && op != RDIV_EXPR
2468 532021 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2469 471347 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2470 471347 : && type_has_mode_precision_p (TREE_TYPE (captures[2]))
2471 421679 : && type_has_mode_precision_p (TREE_TYPE (captures[4]))
2472 421396 : && type_has_mode_precision_p (type)
2473 421374 : && TYPE_PRECISION (TREE_TYPE (captures[1])) > TYPE_PRECISION (TREE_TYPE (captures[2]))
2474 24709 : && types_match (captures[2], type)
2475 997798 : && (types_match (captures[2], captures[4])
2476 2623 : || poly_int_tree_p (captures[3]))
2477 : )
2478 : {
2479 69 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
2480 : )
2481 : {
2482 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail807;
2483 15 : {
2484 15 : tree res_op0;
2485 15 : res_op0 = captures[2];
2486 15 : tree res_op1;
2487 15 : {
2488 15 : tree _o1[1], _r1;
2489 15 : _o1[0] = captures[4];
2490 15 : if (TREE_TYPE (_o1[0]) != type)
2491 : {
2492 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2493 : }
2494 : else
2495 : _r1 = _o1[0];
2496 15 : res_op1 = _r1;
2497 : }
2498 15 : tree _r;
2499 15 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2500 15 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 670, __FILE__, __LINE__, true);
2501 : return _r;
2502 : }
2503 0 : next_after_fail807:;
2504 : }
2505 : else
2506 : {
2507 54 : {
2508 54 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
2509 54 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail808;
2510 54 : {
2511 54 : tree res_op0;
2512 54 : {
2513 54 : tree _o1[2], _r1;
2514 54 : {
2515 54 : tree _o2[1], _r2;
2516 54 : _o2[0] = captures[2];
2517 54 : if (TREE_TYPE (_o2[0]) != utype)
2518 : {
2519 54 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2520 : }
2521 : else
2522 : _r2 = _o2[0];
2523 54 : _o1[0] = _r2;
2524 : }
2525 54 : {
2526 54 : tree _o2[1], _r2;
2527 54 : _o2[0] = captures[4];
2528 54 : if (TREE_TYPE (_o2[0]) != utype)
2529 : {
2530 54 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2531 : }
2532 : else
2533 : _r2 = _o2[0];
2534 54 : _o1[1] = _r2;
2535 : }
2536 54 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2537 54 : res_op0 = _r1;
2538 : }
2539 54 : tree _r;
2540 54 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2541 54 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 671, __FILE__, __LINE__, true);
2542 : return _r;
2543 : }
2544 0 : next_after_fail808:;
2545 : }
2546 : }
2547 : }
2548 : else
2549 : {
2550 982404 : if (FLOAT_TYPE_P (type)
2551 1007670 : && DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
2552 12633 : == DECIMAL_FLOAT_TYPE_P (type)
2553 : )
2554 : {
2555 12610 : {
2556 12610 : tree arg0 = strip_float_extensions (captures[2]);
2557 12610 : tree arg1 = strip_float_extensions (captures[4]);
2558 12610 : tree itype = TREE_TYPE (captures[0]);
2559 12610 : tree ty1 = TREE_TYPE (arg0);
2560 12610 : tree ty2 = TREE_TYPE (arg1);
2561 12610 : enum tree_code code = TREE_CODE (itype);
2562 0 : if (FLOAT_TYPE_P (ty1)
2563 12610 : && FLOAT_TYPE_P (ty2)
2564 : )
2565 : {
2566 12610 : {
2567 12610 : tree newtype = type;
2568 12610 : if (TYPE_MODE (ty1) == SDmode
2569 12601 : || TYPE_MODE (ty2) == SDmode
2570 25211 : || TYPE_MODE (type) == SDmode)
2571 9 : newtype = dfloat32_type_node;
2572 12610 : if (TYPE_MODE (ty1) == DDmode
2573 12604 : || TYPE_MODE (ty2) == DDmode
2574 25214 : || TYPE_MODE (type) == DDmode)
2575 6 : newtype = dfloat64_type_node;
2576 12610 : if (TYPE_MODE (ty1) == TDmode
2577 12610 : || TYPE_MODE (ty2) == TDmode
2578 25220 : || TYPE_MODE (type) == TDmode)
2579 15 : newtype = dfloat128_type_node;
2580 12610 : if ((newtype == dfloat32_type_node
2581 12610 : || newtype == dfloat64_type_node
2582 12610 : || newtype == dfloat128_type_node)
2583 15 : && newtype == type
2584 12616 : && types_match (newtype, type)
2585 : )
2586 : {
2587 6 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail809;
2588 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail809;
2589 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail809;
2590 0 : {
2591 0 : tree res_op0;
2592 0 : {
2593 0 : tree _o1[1], _r1;
2594 0 : _o1[0] = captures[2];
2595 0 : if (TREE_TYPE (_o1[0]) != newtype)
2596 : {
2597 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
2598 : }
2599 : else
2600 : _r1 = _o1[0];
2601 0 : res_op0 = _r1;
2602 : }
2603 0 : tree res_op1;
2604 0 : {
2605 0 : tree _o1[1], _r1;
2606 0 : _o1[0] = captures[4];
2607 0 : if (TREE_TYPE (_o1[0]) != newtype)
2608 : {
2609 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
2610 : }
2611 : else
2612 : _r1 = _o1[0];
2613 0 : res_op1 = _r1;
2614 : }
2615 0 : tree _r;
2616 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2617 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 672, __FILE__, __LINE__, true);
2618 : return _r;
2619 : }
2620 995106 : next_after_fail809:;
2621 : }
2622 : else
2623 : {
2624 12604 : {
2625 12604 : if (element_precision (ty1) > element_precision (newtype))
2626 4 : newtype = ty1;
2627 12604 : if (element_precision (ty2) > element_precision (newtype))
2628 10 : newtype = ty2;
2629 12604 : if (element_precision (newtype) < element_precision (itype)
2630 12332 : && (!VECTOR_MODE_P (TYPE_MODE (newtype))
2631 0 : || target_supports_op_p (newtype, op, optab_default))
2632 12332 : && (flag_unsafe_math_optimizations
2633 12315 : || (element_precision (newtype) == element_precision (type)
2634 12311 : && real_can_shorten_arithmetic (element_mode (itype),
2635 : element_mode (type))
2636 4480 : && !excess_precision_type (newtype)))
2637 12629 : && !types_match (itype, newtype)
2638 : )
2639 : {
2640 25 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail810;
2641 25 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail810;
2642 17 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail810;
2643 17 : {
2644 17 : tree res_op0;
2645 17 : {
2646 17 : tree _o1[2], _r1;
2647 17 : {
2648 17 : tree _o2[1], _r2;
2649 17 : _o2[0] = captures[2];
2650 17 : if (TREE_TYPE (_o2[0]) != newtype)
2651 : {
2652 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
2653 : }
2654 : else
2655 : _r2 = _o2[0];
2656 17 : _o1[0] = _r2;
2657 : }
2658 17 : {
2659 17 : tree _o2[1], _r2;
2660 17 : _o2[0] = captures[4];
2661 17 : if (TREE_TYPE (_o2[0]) != newtype)
2662 : {
2663 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
2664 : }
2665 : else
2666 : _r2 = _o2[0];
2667 17 : _o1[1] = _r2;
2668 : }
2669 17 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2670 17 : res_op0 = _r1;
2671 : }
2672 17 : tree _r;
2673 17 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2674 17 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 673, __FILE__, __LINE__, true);
2675 : return _r;
2676 : }
2677 995106 : next_after_fail810:;
2678 : }
2679 : }
2680 : }
2681 : }
2682 : }
2683 : }
2684 : }
2685 : }
2686 : return NULL_TREE;
2687 : }
2688 :
2689 : tree
2690 244 : generic_simplify_490 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2691 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2692 : {
2693 244 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2694 244 : if (INTEGRAL_TYPE_P (type)
2695 244 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2696 244 : && TREE_CODE (TREE_TYPE (captures[0])) != BOOLEAN_TYPE
2697 488 : && (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2698 169 : || TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0])))
2699 : )
2700 : {
2701 244 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail848;
2702 244 : {
2703 244 : tree res_op0;
2704 244 : {
2705 244 : tree _o1[1], _r1;
2706 244 : _o1[0] = captures[0];
2707 244 : if (TREE_TYPE (_o1[0]) != type)
2708 : {
2709 20 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2710 : }
2711 : else
2712 : _r1 = _o1[0];
2713 244 : res_op0 = _r1;
2714 : }
2715 244 : tree res_op1;
2716 244 : res_op1 = captures[1];
2717 244 : tree _r;
2718 244 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
2719 244 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 698, __FILE__, __LINE__, true);
2720 : return _r;
2721 : }
2722 0 : next_after_fail848:;
2723 : }
2724 : return NULL_TREE;
2725 : }
2726 :
2727 : tree
2728 5859791 : generic_simplify_498 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2729 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2730 : {
2731 5859791 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2732 11529628 : if (POINTER_TYPE_P (TREE_TYPE (captures[0]))
2733 5859811 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
2734 : )
2735 : {
2736 189974 : {
2737 189974 : unsigned int align;
2738 189974 : unsigned HOST_WIDE_INT bitpos;
2739 189974 : get_pointer_alignment_1 (captures[0], &align, &bitpos);
2740 189974 : if (wi::ltu_p (wi::to_wide (captures[1]), align / BITS_PER_UNIT)
2741 : )
2742 : {
2743 6896 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail856;
2744 6896 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail856;
2745 6896 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail856;
2746 6896 : {
2747 6896 : tree _r;
2748 13792 : _r = wide_int_to_tree (type, (wi::to_wide (captures[1])
2749 13792 : & (bitpos / BITS_PER_UNIT)));
2750 6896 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 705, __FILE__, __LINE__, true);
2751 6896 : return _r;
2752 : }
2753 183078 : next_after_fail856:;
2754 : }
2755 : }
2756 : }
2757 : return NULL_TREE;
2758 : }
2759 :
2760 : tree
2761 0 : generic_simplify_508 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2762 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2763 : const enum tree_code ARG_UNUSED (code2),
2764 : const enum tree_code ARG_UNUSED (code1))
2765 : {
2766 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2767 0 : if ((TREE_CODE (captures[2]) == INTEGER_CST
2768 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
2769 0 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2770 0 : || ((VECTOR_INTEGER_TYPE_P (TREE_TYPE (captures[2]))
2771 0 : || VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (captures[2])))
2772 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, code2))
2773 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
2774 0 : && bitwise_equal_p (captures[2], captures[5]))
2775 : )
2776 : {
2777 0 : {
2778 0 : bool one_before = false;
2779 0 : bool one_after = false;
2780 0 : int cmp = 0;
2781 0 : bool allbits = true;
2782 0 : if (TREE_CODE (captures[2]) == INTEGER_CST
2783 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
2784 : {
2785 0 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
2786 0 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
2787 0 : auto t2 = wi::to_wide (captures[5]);
2788 0 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
2789 0 : if (cmp < 0
2790 0 : && t1 == t2 - 1)
2791 : one_before = true;
2792 0 : if (cmp > 0
2793 0 : && t1 == t2 + 1)
2794 : one_after = true;
2795 : }
2796 0 : bool val;
2797 0 : switch (code2)
2798 : {
2799 0 : case EQ_EXPR: val = (cmp == 0); break;
2800 0 : case NE_EXPR: val = (cmp != 0); break;
2801 0 : case LT_EXPR: val = (cmp < 0); break;
2802 0 : case GT_EXPR: val = (cmp > 0); break;
2803 0 : case LE_EXPR: val = (cmp <= 0); break;
2804 0 : case GE_EXPR: val = (cmp >= 0); break;
2805 0 : default: gcc_unreachable ();
2806 : }
2807 0 : if (code1 == EQ_EXPR && val
2808 : )
2809 : {
2810 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail888;
2811 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail888;
2812 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail888;
2813 0 : {
2814 0 : tree _r;
2815 0 : _r = captures[0];
2816 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 710, __FILE__, __LINE__, true);
2817 : return _r;
2818 : }
2819 0 : next_after_fail888:;
2820 : }
2821 : else
2822 : {
2823 0 : if (code1 == EQ_EXPR && !val
2824 : )
2825 : {
2826 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail889;
2827 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail889;
2828 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail889;
2829 0 : {
2830 0 : tree _r;
2831 0 : _r = constant_boolean_node (false, type);
2832 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2833 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2834 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 711, __FILE__, __LINE__, true);
2835 : return _r;
2836 : }
2837 0 : next_after_fail889:;
2838 : }
2839 : else
2840 : {
2841 0 : if (code1 == NE_EXPR && !val && allbits
2842 : )
2843 : {
2844 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail890;
2845 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail890;
2846 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail890;
2847 0 : {
2848 0 : tree _r;
2849 0 : _r = captures[3];
2850 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 712, __FILE__, __LINE__, true);
2851 : return _r;
2852 : }
2853 0 : next_after_fail890:;
2854 : }
2855 : else
2856 : {
2857 0 : if ((code1 == NE_EXPR
2858 0 : && code2 == GE_EXPR
2859 0 : && cmp == 0
2860 0 : && allbits)
2861 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2862 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
2863 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2864 : )
2865 : {
2866 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail891;
2867 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail891;
2868 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail891;
2869 0 : {
2870 0 : tree res_op0;
2871 0 : res_op0 = captures[4];
2872 0 : tree res_op1;
2873 0 : {
2874 0 : tree _o1[1], _r1;
2875 0 : _o1[0] = captures[2];
2876 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2877 : {
2878 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2879 : }
2880 : else
2881 : _r1 = _o1[0];
2882 0 : res_op1 = _r1;
2883 : }
2884 0 : tree _r;
2885 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2886 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 713, __FILE__, __LINE__, true);
2887 : return _r;
2888 : }
2889 0 : next_after_fail891:;
2890 : }
2891 : else
2892 : {
2893 0 : if ((code1 == NE_EXPR
2894 0 : && code2 == LE_EXPR
2895 0 : && cmp == 0
2896 0 : && allbits)
2897 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2898 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
2899 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2900 : )
2901 : {
2902 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail892;
2903 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail892;
2904 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail892;
2905 0 : {
2906 0 : tree res_op0;
2907 0 : res_op0 = captures[4];
2908 0 : tree res_op1;
2909 0 : {
2910 0 : tree _o1[1], _r1;
2911 0 : _o1[0] = captures[2];
2912 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2913 : {
2914 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2915 : }
2916 : else
2917 : _r1 = _o1[0];
2918 0 : res_op1 = _r1;
2919 : }
2920 0 : tree _r;
2921 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
2922 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 714, __FILE__, __LINE__, true);
2923 : return _r;
2924 : }
2925 0 : next_after_fail892:;
2926 : }
2927 : else
2928 : {
2929 0 : if ((code1 == NE_EXPR
2930 0 : && code2 == GT_EXPR
2931 : && one_after
2932 0 : && allbits)
2933 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2934 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
2935 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2936 : )
2937 : {
2938 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail893;
2939 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail893;
2940 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail893;
2941 0 : {
2942 0 : tree res_op0;
2943 0 : res_op0 = captures[4];
2944 0 : tree res_op1;
2945 0 : {
2946 0 : tree _o1[1], _r1;
2947 0 : _o1[0] = captures[2];
2948 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2949 : {
2950 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2951 : }
2952 : else
2953 : _r1 = _o1[0];
2954 0 : res_op1 = _r1;
2955 : }
2956 0 : tree _r;
2957 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2958 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 715, __FILE__, __LINE__, true);
2959 : return _r;
2960 : }
2961 0 : next_after_fail893:;
2962 : }
2963 : else
2964 : {
2965 0 : if ((code1 == NE_EXPR
2966 0 : && code2 == LT_EXPR
2967 : && one_before
2968 0 : && allbits)
2969 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2970 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
2971 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2972 : )
2973 : {
2974 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail894;
2975 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail894;
2976 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail894;
2977 0 : {
2978 0 : tree res_op0;
2979 0 : res_op0 = captures[4];
2980 0 : tree res_op1;
2981 0 : {
2982 0 : tree _o1[1], _r1;
2983 0 : _o1[0] = captures[2];
2984 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2985 : {
2986 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2987 : }
2988 : else
2989 : _r1 = _o1[0];
2990 0 : res_op1 = _r1;
2991 : }
2992 0 : tree _r;
2993 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
2994 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 716, __FILE__, __LINE__, true);
2995 : return _r;
2996 : }
2997 0 : next_after_fail894:;
2998 : }
2999 : }
3000 : }
3001 : }
3002 : }
3003 : }
3004 : }
3005 : }
3006 : }
3007 : return NULL_TREE;
3008 : }
3009 :
3010 : tree
3011 0 : generic_simplify_535 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3012 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3013 : const enum tree_code ARG_UNUSED (minmax),
3014 : const enum tree_code ARG_UNUSED (maxmin))
3015 : {
3016 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3017 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail937;
3018 0 : {
3019 0 : tree res_op0;
3020 0 : res_op0 = captures[1];
3021 0 : tree res_op1;
3022 0 : {
3023 0 : tree _o1[1], _r1;
3024 0 : _o1[0] = captures[2];
3025 0 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3026 0 : res_op1 = _r1;
3027 : }
3028 0 : tree _r;
3029 0 : _r = fold_build2_loc (loc, maxmin, type, res_op0, res_op1);
3030 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 748, __FILE__, __LINE__, true);
3031 : return _r;
3032 : }
3033 0 : next_after_fail937:;
3034 0 : return NULL_TREE;
3035 : }
3036 :
3037 : tree
3038 1843 : generic_simplify_542 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3039 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3040 : {
3041 1843 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3042 1843 : if (! TYPE_UNSIGNED (type)
3043 1440 : && ! HONOR_SIGN_DEPENDENT_ROUNDING (type)
3044 1843 : && single_use (captures[0])
3045 : )
3046 : {
3047 1440 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail945;
3048 1440 : {
3049 1440 : tree res_op0;
3050 1440 : res_op0 = captures[1];
3051 1440 : tree res_op1;
3052 1440 : {
3053 1440 : tree _o1[1], _r1;
3054 1440 : _o1[0] = captures[2];
3055 1440 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3056 1440 : res_op1 = _r1;
3057 : }
3058 1440 : tree _r;
3059 1440 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
3060 1440 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 755, __FILE__, __LINE__, true);
3061 : return _r;
3062 : }
3063 0 : next_after_fail945:;
3064 : }
3065 : return NULL_TREE;
3066 : }
3067 :
3068 : tree
3069 0 : generic_simplify_552 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3070 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3071 : const enum tree_code ARG_UNUSED (minmax))
3072 : {
3073 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3074 0 : if (INTEGRAL_TYPE_P (type)
3075 0 : && TYPE_OVERFLOW_UNDEFINED (type)
3076 0 : && !TYPE_OVERFLOW_SANITIZED (type)
3077 : )
3078 : {
3079 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail956;
3080 0 : {
3081 0 : tree res_op0;
3082 0 : {
3083 0 : tree _o1[2], _r1;
3084 0 : _o1[0] = captures[1];
3085 0 : _o1[1] = captures[4];
3086 0 : _r1 = fold_build2_loc (loc, minmax, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3087 0 : res_op0 = _r1;
3088 : }
3089 0 : tree res_op1;
3090 0 : res_op1 = captures[2];
3091 0 : tree _r;
3092 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
3093 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 765, __FILE__, __LINE__, true);
3094 : return _r;
3095 : }
3096 0 : next_after_fail956:;
3097 : }
3098 : return NULL_TREE;
3099 : }
3100 :
3101 : tree
3102 0 : generic_simplify_561 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3103 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3104 : const enum tree_code ARG_UNUSED (minmax),
3105 : const enum tree_code ARG_UNUSED (maxmin))
3106 : {
3107 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3108 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail979;
3109 0 : {
3110 0 : tree res_op0;
3111 0 : {
3112 0 : tree _o1[2], _r1;
3113 0 : _o1[0] = captures[1];
3114 0 : _o1[1] = captures[3];
3115 0 : _r1 = fold_build2_loc (loc, maxmin, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3116 0 : res_op0 = _r1;
3117 : }
3118 0 : tree _r;
3119 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
3120 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 776, __FILE__, __LINE__, true);
3121 : return _r;
3122 : }
3123 0 : next_after_fail979:;
3124 0 : return NULL_TREE;
3125 : }
3126 :
3127 : tree
3128 0 : generic_simplify_567 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3129 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3130 : const combined_fn ARG_UNUSED (minmax))
3131 : {
3132 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3133 0 : if (real_isnan (TREE_REAL_CST_PTR (captures[1]))
3134 0 : && (!HONOR_SNANS (captures[1]) || !TREE_REAL_CST (captures[1]).signalling)
3135 0 : && !tree_expr_maybe_signaling_nan_p (captures[0])
3136 : )
3137 : {
3138 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail985;
3139 0 : {
3140 0 : tree _r;
3141 0 : _r = captures[0];
3142 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3143 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3144 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 782, __FILE__, __LINE__, true);
3145 : return _r;
3146 : }
3147 0 : next_after_fail985:;
3148 : }
3149 : return NULL_TREE;
3150 : }
3151 :
3152 : tree
3153 0 : generic_simplify_575 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3154 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3155 : const combined_fn ARG_UNUSED (cond_op))
3156 : {
3157 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3158 0 : {
3159 0 : tree op_type = TREE_TYPE (captures[5]);
3160 0 : if (inverse_conditions_p (captures[0], captures[2])
3161 0 : && element_precision (type) == element_precision (op_type)
3162 : )
3163 : {
3164 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail993;
3165 0 : {
3166 0 : tree res_op0;
3167 0 : {
3168 0 : tree _o1[4], _r1;
3169 0 : _o1[0] = captures[2];
3170 0 : _o1[1] = captures[3];
3171 0 : _o1[2] = captures[4];
3172 0 : {
3173 0 : tree _o2[1], _r2;
3174 0 : _o2[0] = captures[1];
3175 0 : if (TREE_TYPE (_o2[0]) != op_type)
3176 : {
3177 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, op_type, _o2[0]);
3178 : }
3179 : else
3180 : _r2 = _o2[0];
3181 0 : _o1[3] = _r2;
3182 : }
3183 0 : _r1 = maybe_build_call_expr_loc (loc, cond_op, TREE_TYPE (_o1[1]), 4, _o1[0], _o1[1], _o1[2], _o1[3]);
3184 0 : if (!_r1)
3185 0 : goto next_after_fail993;
3186 0 : res_op0 = _r1;
3187 : }
3188 0 : tree _r;
3189 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
3190 0 : if (TREE_SIDE_EFFECTS (captures[0]))
3191 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
3192 0 : if (TREE_SIDE_EFFECTS (captures[5]))
3193 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
3194 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 786, __FILE__, __LINE__, true);
3195 : return _r;
3196 : }
3197 0 : next_after_fail993:;
3198 : }
3199 : }
3200 : return NULL_TREE;
3201 : }
3202 :
3203 : tree
3204 5786 : generic_simplify_586 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3205 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
3206 : {
3207 5786 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3208 11572 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3209 5786 : && TYPE_MAX_VALUE (TREE_TYPE (captures[1]))
3210 5786 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (TREE_TYPE (captures[0])))
3211 8082 : && int_fits_type_p (captures[2], TREE_TYPE (captures[1]))
3212 : )
3213 : {
3214 1904 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
3215 : )
3216 : {
3217 929 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1005;
3218 929 : {
3219 929 : tree res_op0;
3220 929 : {
3221 929 : tree _o1[2], _r1;
3222 929 : _o1[0] = captures[1];
3223 929 : {
3224 929 : tree _o2[2], _r2;
3225 929 : _o2[0] = TYPE_MAX_VALUE (TREE_TYPE (captures[1]));
3226 929 : _o2[1] = captures[2];
3227 929 : _r2 = fold_build2_loc (loc, TRUNC_DIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3228 929 : if (EXPR_P (_r2))
3229 0 : goto next_after_fail1005;
3230 929 : _o1[1] = _r2;
3231 : }
3232 929 : _r1 = fold_build2_loc (loc, GT_EXPR, boolean_type_node, _o1[0], _o1[1]);
3233 929 : res_op0 = _r1;
3234 : }
3235 929 : tree _r;
3236 929 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3237 929 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 798, __FILE__, __LINE__, true);
3238 : return _r;
3239 : }
3240 5786 : next_after_fail1005:;
3241 : }
3242 : else
3243 : {
3244 975 : if (TYPE_MIN_VALUE (TREE_TYPE (captures[1]))
3245 : )
3246 : {
3247 975 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[2])) && integer_minus_onep (captures[2])
3248 : )
3249 : {
3250 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1006;
3251 56 : {
3252 56 : tree res_op0;
3253 56 : {
3254 56 : tree _o1[2], _r1;
3255 56 : _o1[0] = captures[1];
3256 56 : _o1[1] = TYPE_MIN_VALUE (TREE_TYPE (captures[1]));
3257 56 : _r1 = fold_build2_loc (loc, EQ_EXPR, boolean_type_node, _o1[0], _o1[1]);
3258 56 : res_op0 = _r1;
3259 : }
3260 56 : tree _r;
3261 56 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3262 56 : if (TREE_SIDE_EFFECTS (captures[2]))
3263 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3264 56 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 799, __FILE__, __LINE__, true);
3265 : return _r;
3266 : }
3267 0 : next_after_fail1006:;
3268 : }
3269 : else
3270 : {
3271 919 : {
3272 919 : tree div = fold_convert (TREE_TYPE (captures[1]), captures[2]);
3273 1838 : tree lo = int_const_binop (TRUNC_DIV_EXPR,
3274 919 : TYPE_MIN_VALUE (TREE_TYPE (captures[1])), div);
3275 1838 : tree hi = int_const_binop (TRUNC_DIV_EXPR,
3276 919 : TYPE_MAX_VALUE (TREE_TYPE (captures[1])), div);
3277 919 : tree etype = range_check_type (TREE_TYPE (captures[1]));
3278 919 : if (etype)
3279 : {
3280 919 : if (wi::neg_p (wi::to_wide (div)))
3281 88 : std::swap (lo, hi);
3282 919 : lo = fold_convert (etype, lo);
3283 919 : hi = fold_convert (etype, hi);
3284 919 : hi = int_const_binop (MINUS_EXPR, hi, lo);
3285 : }
3286 919 : if (etype
3287 : )
3288 : {
3289 919 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1007;
3290 919 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1007;
3291 919 : {
3292 919 : tree res_op0;
3293 919 : {
3294 919 : tree _o1[2], _r1;
3295 919 : {
3296 919 : tree _o2[2], _r2;
3297 919 : {
3298 919 : tree _o3[1], _r3;
3299 919 : _o3[0] = captures[1];
3300 919 : if (TREE_TYPE (_o3[0]) != etype)
3301 : {
3302 919 : _r3 = fold_build1_loc (loc, NOP_EXPR, etype, _o3[0]);
3303 : }
3304 : else
3305 : _r3 = _o3[0];
3306 919 : _o2[0] = _r3;
3307 : }
3308 919 : _o2[1] = lo;
3309 919 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3310 919 : _o1[0] = _r2;
3311 : }
3312 919 : _o1[1] = hi;
3313 919 : _r1 = fold_build2_loc (loc, GT_EXPR, boolean_type_node, _o1[0], _o1[1]);
3314 919 : res_op0 = _r1;
3315 : }
3316 919 : tree _r;
3317 919 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3318 919 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 800, __FILE__, __LINE__, true);
3319 5786 : return _r;
3320 : }
3321 5786 : next_after_fail1007:;
3322 : }
3323 : }
3324 : }
3325 : }
3326 : }
3327 : }
3328 : return NULL_TREE;
3329 : }
3330 :
3331 : tree
3332 0 : generic_simplify_626 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3333 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
3334 : {
3335 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3336 0 : if (canonicalize_math_after_vectorization_p ()
3337 : )
3338 : {
3339 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1047;
3340 : {
3341 : tree res_op0;
3342 : res_op0 = captures[0];
3343 : tree res_op1;
3344 : res_op1 = captures[1];
3345 : tree res_op2;
3346 : res_op2 = captures[2];
3347 : tree _r;
3348 : _r = maybe_build_call_expr_loc (loc, CFN_FMS, type, 3, res_op0, res_op1, res_op2);
3349 : if (!_r)
3350 : goto next_after_fail1047;
3351 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 840, __FILE__, __LINE__, true);
3352 : return _r;
3353 : }
3354 0 : next_after_fail1047:;
3355 : }
3356 0 : return NULL_TREE;
3357 : }
3358 :
3359 : tree
3360 0 : generic_simplify_635 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3361 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree ARG_UNUSED (_p3), tree ARG_UNUSED (_p4), tree *ARG_UNUSED (captures))
3362 : {
3363 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3364 0 : if (canonicalize_math_after_vectorization_p ()
3365 : )
3366 : {
3367 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1056;
3368 : {
3369 : tree res_op0;
3370 : res_op0 = captures[0];
3371 : tree res_op1;
3372 : res_op1 = captures[1];
3373 : tree res_op2;
3374 : res_op2 = captures[2];
3375 : tree res_op3;
3376 : res_op3 = captures[3];
3377 : tree res_op4;
3378 : res_op4 = captures[4];
3379 : tree _r;
3380 : _r = maybe_build_call_expr_loc (loc, CFN_COND_FMA, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3381 : if (!_r)
3382 : goto next_after_fail1056;
3383 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 849, __FILE__, __LINE__, true);
3384 : return _r;
3385 : }
3386 0 : next_after_fail1056:;
3387 : }
3388 0 : return NULL_TREE;
3389 : }
3390 :
3391 : tree
3392 0 : generic_simplify_646 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3393 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3394 : const combined_fn ARG_UNUSED (PARITY))
3395 : {
3396 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3397 0 : if ((element_precision (TREE_TYPE (captures[0])) & 1) == 0
3398 : )
3399 : {
3400 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1068;
3401 0 : {
3402 0 : tree res_op0;
3403 0 : res_op0 = captures[0];
3404 0 : tree _r;
3405 0 : _r = maybe_build_call_expr_loc (loc, PARITY, type, 1, res_op0);
3406 0 : if (!_r)
3407 0 : goto next_after_fail1068;
3408 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 856, __FILE__, __LINE__, true);
3409 : return _r;
3410 : }
3411 0 : next_after_fail1068:;
3412 : }
3413 : else
3414 : {
3415 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1069;
3416 0 : {
3417 0 : tree res_op0;
3418 0 : {
3419 0 : tree _o1[1], _r1;
3420 0 : _o1[0] = captures[0];
3421 0 : _r1 = maybe_build_call_expr_loc (loc, PARITY, type, 1, _o1[0]);
3422 0 : if (!_r1)
3423 0 : goto next_after_fail1069;
3424 0 : res_op0 = _r1;
3425 : }
3426 0 : tree res_op1;
3427 0 : res_op1 = build_one_cst (type);
3428 0 : tree _r;
3429 0 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
3430 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 857, __FILE__, __LINE__, true);
3431 : return _r;
3432 : }
3433 0 : next_after_fail1069:;
3434 : }
3435 : return NULL_TREE;
3436 : }
3437 :
3438 : tree
3439 0 : generic_simplify_651 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3440 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3441 : const combined_fn ARG_UNUSED (reduc))
3442 : {
3443 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3444 0 : {
3445 0 : int i = single_nonzero_element (captures[1]);
3446 0 : if (i >= 0
3447 : )
3448 : {
3449 0 : {
3450 0 : tree elt = vector_cst_elt (captures[1], i);
3451 0 : tree elt_type = TREE_TYPE (elt);
3452 0 : unsigned int elt_bits = tree_to_uhwi (TYPE_SIZE (elt_type));
3453 0 : tree size = bitsize_int (elt_bits);
3454 0 : tree pos = bitsize_int (elt_bits * i);
3455 0 : if (compare_tree_int (TYPE_SIZE (type), elt_bits) == 0
3456 : )
3457 : {
3458 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1074;
3459 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1074;
3460 0 : {
3461 0 : tree res_op0;
3462 0 : {
3463 0 : tree _o1[2], _r1;
3464 0 : {
3465 0 : tree _o2[3], _r2;
3466 0 : _o2[0] = captures[0];
3467 0 : _o2[1] = size;
3468 0 : _o2[2] = pos;
3469 0 : _r2 = fold_build3_loc (loc, BIT_FIELD_REF, elt_type, _o2[0], _o2[1], _o2[2]);
3470 0 : _o1[0] = _r2;
3471 : }
3472 0 : _o1[1] = elt;
3473 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, elt_type, _o1[0], _o1[1]);
3474 0 : res_op0 = _r1;
3475 : }
3476 0 : tree _r;
3477 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
3478 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 860, __FILE__, __LINE__, true);
3479 0 : return _r;
3480 : }
3481 0 : next_after_fail1074:;
3482 : }
3483 : }
3484 : }
3485 : }
3486 : return NULL_TREE;
3487 : }
3488 :
3489 : tree
3490 518652 : generic_simplify_FIX_TRUNC_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
3491 : {
3492 518652 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3493 518652 : {
3494 518652 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
3495 1037304 : if ((
3496 :
3497 : && useless_type_conversion_p (type, TREE_TYPE (captures[0])))
3498 : || (
3499 : 1
3500 518652 : && type == TREE_TYPE (captures[0]))
3501 : )
3502 : {
3503 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1157;
3504 0 : {
3505 0 : tree _r;
3506 0 : _r = captures[0];
3507 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 875, __FILE__, __LINE__, true);
3508 518652 : return _r;
3509 : }
3510 0 : next_after_fail1157:;
3511 : }
3512 : }
3513 518652 : switch (TREE_CODE (_p0))
3514 : {
3515 14982 : CASE_CONVERT:
3516 14982 : {
3517 14982 : tree _q20 = TREE_OPERAND (_p0, 0);
3518 14982 : {
3519 14982 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
3520 14982 : {
3521 14982 : tree inside_type = TREE_TYPE (captures[1]);
3522 14982 : tree inter_type = TREE_TYPE (captures[0]);
3523 14982 : int inside_int = ANY_INTEGRAL_TYPE_P (inside_type);
3524 14982 : int inside_ptr = POINTER_TYPE_P (inside_type);
3525 14982 : int inside_float = FLOAT_TYPE_P (inside_type);
3526 14982 : unsigned int inside_prec = element_precision (inside_type);
3527 14982 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
3528 14982 : int inter_int = ANY_INTEGRAL_TYPE_P (inter_type);
3529 14982 : int inter_ptr = POINTER_TYPE_P (inter_type);
3530 14982 : int inter_float = FLOAT_TYPE_P (inter_type);
3531 14982 : unsigned int inter_prec = element_precision (inter_type);
3532 14982 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
3533 14982 : int final_int = ANY_INTEGRAL_TYPE_P (type);
3534 14982 : int final_ptr = POINTER_TYPE_P (type);
3535 14982 : int final_float = FLOAT_TYPE_P (type);
3536 14982 : unsigned int final_prec = element_precision (type);
3537 14982 : int final_unsignedp = TYPE_UNSIGNED (type);
3538 14982 : int is_vec = VECTOR_TYPE_P (type);
3539 14982 : gcc_checking_assert (is_vec == VECTOR_TYPE_P (inside_type)
3540 : && is_vec == VECTOR_TYPE_P (inter_type));
3541 14982 : if (((
3542 :
3543 : && useless_type_conversion_p (type, inside_type))
3544 : || (
3545 : 1
3546 14982 : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
3547 0 : && (((inter_int || inter_ptr) && final_int)
3548 0 : || (inter_float && final_float))
3549 0 : && inter_prec >= final_prec
3550 14982 : && (! is_vec
3551 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3552 : )
3553 : {
3554 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1158;
3555 0 : {
3556 0 : tree res_op0;
3557 0 : res_op0 = captures[1];
3558 0 : tree _r;
3559 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3560 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 876, __FILE__, __LINE__, true);
3561 : return _r;
3562 : }
3563 0 : next_after_fail1158:;
3564 : }
3565 : else
3566 : {
3567 14982 : if (((inter_int && inside_int) || (inter_float && inside_float))
3568 14982 : && (final_int || final_float)
3569 14982 : && inter_prec >= inside_prec
3570 14764 : && (inter_float || inter_unsignedp == inside_unsignedp)
3571 29746 : && (! is_vec
3572 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3573 : )
3574 : {
3575 14764 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1159;
3576 14764 : {
3577 14764 : tree res_op0;
3578 14764 : res_op0 = captures[1];
3579 14764 : tree _r;
3580 14764 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3581 14764 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 877, __FILE__, __LINE__, true);
3582 : return _r;
3583 : }
3584 0 : next_after_fail1159:;
3585 : }
3586 : else
3587 : {
3588 0 : if (inside_int && inter_int && final_int
3589 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
3590 0 : && inside_unsignedp && !inter_unsignedp)
3591 0 : || final_prec == inter_prec
3592 0 : || (inside_prec < inter_prec && inter_prec > final_prec
3593 0 : && !inside_unsignedp && inter_unsignedp))
3594 218 : && (! is_vec
3595 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3596 : )
3597 : {
3598 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1160;
3599 0 : {
3600 0 : tree res_op0;
3601 0 : res_op0 = captures[1];
3602 0 : tree _r;
3603 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3604 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 878, __FILE__, __LINE__, true);
3605 : return _r;
3606 : }
3607 0 : next_after_fail1160:;
3608 : }
3609 : else
3610 : {
3611 218 : if (! inside_float && ! inter_float && ! final_float
3612 : && ! is_vec
3613 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
3614 0 : && ! (inside_int && inter_int
3615 0 : && inter_unsignedp != inside_unsignedp
3616 0 : && inter_prec < final_prec)
3617 0 : && ((inter_unsignedp && inter_prec > inside_prec)
3618 0 : == (final_unsignedp && final_prec > inter_prec))
3619 0 : && ! (inside_ptr && inter_prec != final_prec)
3620 0 : && ! (final_ptr && inside_prec != inter_prec)
3621 : )
3622 : {
3623 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1161;
3624 0 : {
3625 0 : tree res_op0;
3626 0 : res_op0 = captures[1];
3627 0 : tree _r;
3628 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3629 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 879, __FILE__, __LINE__, true);
3630 : return _r;
3631 : }
3632 0 : next_after_fail1161:;
3633 0 : }
3634 : else
3635 : {
3636 218 : if (inside_int && inter_int && final_int
3637 0 : && final_prec <= inside_prec
3638 0 : && inter_prec >= inside_prec
3639 218 : && (! is_vec
3640 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3641 : )
3642 : {
3643 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1162;
3644 0 : {
3645 0 : tree res_op0;
3646 0 : res_op0 = captures[1];
3647 0 : tree _r;
3648 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3649 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 880, __FILE__, __LINE__, true);
3650 : return _r;
3651 : }
3652 0 : next_after_fail1162:;
3653 : }
3654 : else
3655 : {
3656 : if (0
3657 : && final_int && inter_int && inside_int
3658 : && ! is_vec
3659 : && final_prec >= inside_prec
3660 : && inside_prec > inter_prec
3661 : && inter_unsignedp
3662 : )
3663 : {
3664 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1163;
3665 : {
3666 : tree res_op0;
3667 : {
3668 : tree _o1[2], _r1;
3669 : _o1[0] = captures[1];
3670 : _o1[1] = wide_int_to_tree
3671 : (inside_type,
3672 : wi::mask (inter_prec, false,
3673 : TYPE_PRECISION (inside_type)));
3674 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3675 : res_op0 = _r1;
3676 : }
3677 : tree _r;
3678 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3679 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 881, __FILE__, __LINE__, true);
3680 : return _r;
3681 : }
3682 : next_after_fail1163:;
3683 : }
3684 : else
3685 : {
3686 : if (0
3687 : && inside_int && inter_float && final_int
3688 : && ! is_vec
3689 : && ((unsigned) significand_size (TYPE_MODE (inter_type))
3690 : >= inside_prec - !inside_unsignedp)
3691 : )
3692 : {
3693 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1164;
3694 : {
3695 : tree res_op0;
3696 : res_op0 = captures[1];
3697 : tree _r;
3698 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3699 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 882, __FILE__, __LINE__, true);
3700 : return _r;
3701 : }
3702 : next_after_fail1164:;
3703 : }
3704 : }
3705 : }
3706 : }
3707 : }
3708 : }
3709 : }
3710 : }
3711 : }
3712 : break;
3713 : }
3714 611 : case FLOAT_EXPR:
3715 611 : {
3716 611 : tree _q20 = TREE_OPERAND (_p0, 0);
3717 611 : {
3718 611 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
3719 611 : {
3720 611 : tree inside_type = TREE_TYPE (captures[1]);
3721 611 : tree inter_type = TREE_TYPE (captures[0]);
3722 611 : int inside_int = ANY_INTEGRAL_TYPE_P (inside_type);
3723 611 : int inside_ptr = POINTER_TYPE_P (inside_type);
3724 611 : int inside_float = FLOAT_TYPE_P (inside_type);
3725 611 : unsigned int inside_prec = element_precision (inside_type);
3726 611 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
3727 611 : int inter_int = ANY_INTEGRAL_TYPE_P (inter_type);
3728 611 : int inter_ptr = POINTER_TYPE_P (inter_type);
3729 611 : int inter_float = FLOAT_TYPE_P (inter_type);
3730 611 : unsigned int inter_prec = element_precision (inter_type);
3731 611 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
3732 611 : int final_int = ANY_INTEGRAL_TYPE_P (type);
3733 611 : int final_ptr = POINTER_TYPE_P (type);
3734 611 : int final_float = FLOAT_TYPE_P (type);
3735 611 : unsigned int final_prec = element_precision (type);
3736 611 : int final_unsignedp = TYPE_UNSIGNED (type);
3737 611 : int is_vec = VECTOR_TYPE_P (type);
3738 611 : gcc_checking_assert (is_vec == VECTOR_TYPE_P (inside_type)
3739 : && is_vec == VECTOR_TYPE_P (inter_type));
3740 611 : if (((
3741 :
3742 : && useless_type_conversion_p (type, inside_type))
3743 : || (
3744 : 1
3745 611 : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
3746 61 : && (((inter_int || inter_ptr) && final_int)
3747 61 : || (inter_float && final_float))
3748 0 : && inter_prec >= final_prec
3749 611 : && (! is_vec
3750 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3751 : )
3752 : {
3753 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1165;
3754 0 : {
3755 0 : tree res_op0;
3756 0 : res_op0 = captures[1];
3757 0 : tree _r;
3758 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3759 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 876, __FILE__, __LINE__, true);
3760 : return _r;
3761 : }
3762 0 : next_after_fail1165:;
3763 : }
3764 : else
3765 : {
3766 611 : if (((inter_int && inside_int) || (inter_float && inside_float))
3767 0 : && (final_int || final_float)
3768 0 : && inter_prec >= inside_prec
3769 0 : && (inter_float || inter_unsignedp == inside_unsignedp)
3770 611 : && (! is_vec
3771 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3772 : )
3773 : {
3774 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1166;
3775 0 : {
3776 0 : tree res_op0;
3777 0 : res_op0 = captures[1];
3778 0 : tree _r;
3779 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3780 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 877, __FILE__, __LINE__, true);
3781 : return _r;
3782 : }
3783 0 : next_after_fail1166:;
3784 : }
3785 : else
3786 : {
3787 0 : if (inside_int && inter_int && final_int
3788 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
3789 0 : && inside_unsignedp && !inter_unsignedp)
3790 0 : || final_prec == inter_prec
3791 0 : || (inside_prec < inter_prec && inter_prec > final_prec
3792 0 : && !inside_unsignedp && inter_unsignedp))
3793 611 : && (! is_vec
3794 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3795 : )
3796 : {
3797 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1167;
3798 0 : {
3799 0 : tree res_op0;
3800 0 : res_op0 = captures[1];
3801 0 : tree _r;
3802 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3803 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 878, __FILE__, __LINE__, true);
3804 : return _r;
3805 : }
3806 0 : next_after_fail1167:;
3807 : }
3808 : else
3809 : {
3810 611 : if (! inside_float && ! inter_float && ! final_float
3811 : && ! is_vec
3812 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
3813 0 : && ! (inside_int && inter_int
3814 0 : && inter_unsignedp != inside_unsignedp
3815 0 : && inter_prec < final_prec)
3816 0 : && ((inter_unsignedp && inter_prec > inside_prec)
3817 0 : == (final_unsignedp && final_prec > inter_prec))
3818 0 : && ! (inside_ptr && inter_prec != final_prec)
3819 0 : && ! (final_ptr && inside_prec != inter_prec)
3820 : )
3821 : {
3822 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1168;
3823 0 : {
3824 0 : tree res_op0;
3825 0 : res_op0 = captures[1];
3826 0 : tree _r;
3827 0 : _r = fold_build1_loc (loc, FIX_TRUNC_EXPR, type, res_op0);
3828 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 879, __FILE__, __LINE__, true);
3829 : return _r;
3830 : }
3831 0 : next_after_fail1168:;
3832 0 : }
3833 : else
3834 : {
3835 611 : if (inside_int && inter_int && final_int
3836 0 : && final_prec <= inside_prec
3837 0 : && inter_prec >= inside_prec
3838 611 : && (! is_vec
3839 0 : || supportable_convert_operation (FIX_TRUNC_EXPR, type, TREE_TYPE (captures[1])))
3840 : )
3841 : {
3842 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1169;
3843 0 : {
3844 0 : tree res_op0;
3845 0 : res_op0 = captures[1];
3846 0 : tree _r;
3847 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3848 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 880, __FILE__, __LINE__, true);
3849 : return _r;
3850 : }
3851 0 : next_after_fail1169:;
3852 : }
3853 : else
3854 : {
3855 : if (0
3856 : && final_int && inter_int && inside_int
3857 : && ! is_vec
3858 : && final_prec >= inside_prec
3859 : && inside_prec > inter_prec
3860 : && inter_unsignedp
3861 : )
3862 : {
3863 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1170;
3864 : {
3865 : tree res_op0;
3866 : {
3867 : tree _o1[2], _r1;
3868 : _o1[0] = captures[1];
3869 : _o1[1] = wide_int_to_tree
3870 : (inside_type,
3871 : wi::mask (inter_prec, false,
3872 : TYPE_PRECISION (inside_type)));
3873 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3874 : res_op0 = _r1;
3875 : }
3876 : tree _r;
3877 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3878 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 881, __FILE__, __LINE__, true);
3879 : return _r;
3880 : }
3881 : next_after_fail1170:;
3882 : }
3883 : else
3884 : {
3885 : if (0
3886 : && inside_int && inter_float && final_int
3887 : && ! is_vec
3888 : && ((unsigned) significand_size (TYPE_MODE (inter_type))
3889 : >= inside_prec - !inside_unsignedp)
3890 : )
3891 : {
3892 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1171;
3893 : {
3894 : tree res_op0;
3895 : res_op0 = captures[1];
3896 : tree _r;
3897 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3898 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 882, __FILE__, __LINE__, true);
3899 : return _r;
3900 : }
3901 : next_after_fail1171:;
3902 : }
3903 : }
3904 : }
3905 : }
3906 : }
3907 : }
3908 : }
3909 : }
3910 : }
3911 : break;
3912 : }
3913 : default:;
3914 : }
3915 : return NULL_TREE;
3916 : }
3917 :
3918 : tree
3919 33788763 : generic_simplify_MINUS_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
3920 : {
3921 33788763 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3922 33788763 : if (integer_zerop (_p1))
3923 : {
3924 2032832 : {
3925 2032832 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
3926 2032832 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1325;
3927 2032832 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1325;
3928 2032832 : {
3929 2032832 : tree res_op0;
3930 2032832 : res_op0 = captures[0];
3931 2032832 : tree _r;
3932 2032832 : _r = non_lvalue_loc (loc, res_op0);
3933 2032832 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
3934 33788763 : return _r;
3935 : }
3936 31755931 : next_after_fail1325:;
3937 : }
3938 : }
3939 31755931 : if (real_zerop (_p1))
3940 : {
3941 1158 : {
3942 1158 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
3943 1158 : if (fold_real_zero_addition_p (type, captures[0], captures[1], 1)
3944 : )
3945 : {
3946 770 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1326;
3947 770 : {
3948 770 : tree res_op0;
3949 770 : res_op0 = captures[0];
3950 770 : tree _r;
3951 770 : _r = non_lvalue_loc (loc, res_op0);
3952 770 : if (TREE_SIDE_EFFECTS (captures[1]))
3953 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3954 770 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 957, __FILE__, __LINE__, true);
3955 : return _r;
3956 : }
3957 0 : next_after_fail1326:;
3958 : }
3959 : }
3960 : }
3961 31755161 : switch (TREE_CODE (_p0))
3962 : {
3963 2324692 : case PLUS_EXPR:
3964 2324692 : {
3965 2324692 : tree _q20 = TREE_OPERAND (_p0, 0);
3966 2324692 : tree _q21 = TREE_OPERAND (_p0, 1);
3967 2324692 : switch (TREE_CODE (_q21))
3968 : {
3969 155075 : case REAL_CST:
3970 155075 : {
3971 155075 : switch (TREE_CODE (_p1))
3972 : {
3973 11 : case REAL_CST:
3974 11 : {
3975 11 : {
3976 11 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
3977 11 : tree res = generic_simplify_54 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR);
3978 11 : if (res) return res;
3979 : }
3980 8 : break;
3981 : }
3982 : default:;
3983 : }
3984 : break;
3985 : }
3986 : default:;
3987 : }
3988 : break;
3989 : }
3990 1254893 : case MINUS_EXPR:
3991 1254893 : {
3992 1254893 : tree _q20 = TREE_OPERAND (_p0, 0);
3993 1254893 : tree _q21 = TREE_OPERAND (_p0, 1);
3994 1254893 : switch (TREE_CODE (_q21))
3995 : {
3996 97493 : case REAL_CST:
3997 97493 : {
3998 97493 : switch (TREE_CODE (_p1))
3999 : {
4000 40 : case REAL_CST:
4001 40 : {
4002 40 : {
4003 40 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4004 40 : tree res = generic_simplify_54 (loc, type, _p0, _p1, captures, MINUS_EXPR, MINUS_EXPR);
4005 40 : if (res) return res;
4006 : }
4007 38 : break;
4008 : }
4009 : default:;
4010 : }
4011 : break;
4012 : }
4013 : default:;
4014 : }
4015 : break;
4016 : }
4017 31755156 : default:;
4018 : }
4019 31755156 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
4020 : {
4021 204825 : {
4022 204825 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4023 204067 : if (!FLOAT_TYPE_P (type)
4024 204888 : || (!tree_expr_maybe_nan_p (captures[0])
4025 107 : && !tree_expr_maybe_infinite_p (captures[0])
4026 15 : && (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
4027 1 : || !HONOR_SIGNED_ZEROS (type)))
4028 : )
4029 : {
4030 204018 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1327;
4031 204018 : {
4032 204018 : tree _r;
4033 204018 : _r = build_zero_cst (type);
4034 204018 : if (TREE_SIDE_EFFECTS (captures[0]))
4035 36 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4036 204018 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 958, __FILE__, __LINE__, true);
4037 33788763 : return _r;
4038 : }
4039 0 : next_after_fail1327:;
4040 : }
4041 : }
4042 : }
4043 31551138 : switch (TREE_CODE (_p0))
4044 : {
4045 8709271 : CASE_CONVERT:
4046 8709271 : {
4047 8709271 : tree _q20 = TREE_OPERAND (_p0, 0);
4048 8709271 : switch (TREE_CODE (_p1))
4049 : {
4050 4331274 : CASE_CONVERT:
4051 4331274 : {
4052 4331274 : tree _q40 = TREE_OPERAND (_p1, 0);
4053 4331274 : switch (TREE_CODE (_q40))
4054 : {
4055 110783 : case MULT_EXPR:
4056 110783 : {
4057 110783 : tree _q50 = TREE_OPERAND (_q40, 0);
4058 110783 : tree _q51 = TREE_OPERAND (_q40, 1);
4059 110783 : switch (TREE_CODE (_q50))
4060 : {
4061 21 : case TRUNC_DIV_EXPR:
4062 21 : {
4063 21 : tree _q60 = TREE_OPERAND (_q50, 0);
4064 21 : tree _q61 = TREE_OPERAND (_q50, 1);
4065 21 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
4066 : {
4067 21 : if ((_q51 == _q61 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q61, 0))
4068 : {
4069 21 : {
4070 21 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q61 };
4071 21 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4072 21 : if (res) return res;
4073 : }
4074 : }
4075 : }
4076 : break;
4077 : }
4078 110762 : default:;
4079 : }
4080 110762 : switch (TREE_CODE (_q51))
4081 : {
4082 0 : case TRUNC_DIV_EXPR:
4083 0 : {
4084 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4085 0 : tree _q71 = TREE_OPERAND (_q51, 1);
4086 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q20, 0))
4087 : {
4088 0 : if ((_q71 == _q50 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q50, 0))
4089 : {
4090 0 : {
4091 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q70, _q71, _q20, _q50 };
4092 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4093 0 : if (res) return res;
4094 : }
4095 : }
4096 : }
4097 : break;
4098 : }
4099 : default:;
4100 : }
4101 : break;
4102 : }
4103 : default:;
4104 : }
4105 : break;
4106 : }
4107 150292 : case MULT_EXPR:
4108 150292 : {
4109 150292 : tree _q40 = TREE_OPERAND (_p1, 0);
4110 150292 : tree _q41 = TREE_OPERAND (_p1, 1);
4111 150292 : switch (TREE_CODE (_q40))
4112 : {
4113 1837 : case TRUNC_DIV_EXPR:
4114 1837 : {
4115 1837 : tree _q50 = TREE_OPERAND (_q40, 0);
4116 1837 : tree _q51 = TREE_OPERAND (_q40, 1);
4117 1837 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
4118 : {
4119 10 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
4120 : {
4121 10 : {
4122 10 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _q20, _q51 };
4123 10 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4124 10 : if (res) return res;
4125 : }
4126 : }
4127 : }
4128 : break;
4129 : }
4130 150282 : default:;
4131 : }
4132 150282 : switch (TREE_CODE (_q41))
4133 : {
4134 0 : case TRUNC_DIV_EXPR:
4135 0 : {
4136 0 : tree _q60 = TREE_OPERAND (_q41, 0);
4137 0 : tree _q61 = TREE_OPERAND (_q41, 1);
4138 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
4139 : {
4140 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
4141 : {
4142 0 : {
4143 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q40 };
4144 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4145 0 : if (res) return res;
4146 : }
4147 : }
4148 : }
4149 : break;
4150 : }
4151 : default:;
4152 : }
4153 : break;
4154 : }
4155 : default:;
4156 : }
4157 : break;
4158 : }
4159 31551107 : default:;
4160 : }
4161 31551107 : switch (TREE_CODE (_p1))
4162 : {
4163 7786840 : CASE_CONVERT:
4164 7786840 : {
4165 7786840 : tree _q30 = TREE_OPERAND (_p1, 0);
4166 7786840 : switch (TREE_CODE (_q30))
4167 : {
4168 137694 : case MULT_EXPR:
4169 137694 : {
4170 137694 : tree _q40 = TREE_OPERAND (_q30, 0);
4171 137694 : tree _q41 = TREE_OPERAND (_q30, 1);
4172 137694 : switch (TREE_CODE (_q40))
4173 : {
4174 12 : case TRUNC_DIV_EXPR:
4175 12 : {
4176 12 : tree _q50 = TREE_OPERAND (_q40, 0);
4177 12 : tree _q51 = TREE_OPERAND (_q40, 1);
4178 12 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
4179 : {
4180 2 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
4181 : {
4182 2 : {
4183 2 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q51 };
4184 2 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4185 2 : if (res) return res;
4186 : }
4187 : }
4188 : }
4189 : break;
4190 : }
4191 137692 : default:;
4192 : }
4193 137692 : switch (TREE_CODE (_q41))
4194 : {
4195 0 : case TRUNC_DIV_EXPR:
4196 0 : {
4197 0 : tree _q60 = TREE_OPERAND (_q41, 0);
4198 0 : tree _q61 = TREE_OPERAND (_q41, 1);
4199 0 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _p0, 0))
4200 : {
4201 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
4202 : {
4203 0 : {
4204 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _p0, _q40 };
4205 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4206 0 : if (res) return res;
4207 : }
4208 : }
4209 : }
4210 : break;
4211 : }
4212 : default:;
4213 : }
4214 : break;
4215 : }
4216 : default:;
4217 : }
4218 : break;
4219 : }
4220 2069218 : case MULT_EXPR:
4221 2069218 : {
4222 2069218 : tree _q30 = TREE_OPERAND (_p1, 0);
4223 2069218 : tree _q31 = TREE_OPERAND (_p1, 1);
4224 2069218 : switch (TREE_CODE (_q30))
4225 : {
4226 2360 : case TRUNC_DIV_EXPR:
4227 2360 : {
4228 2360 : tree _q40 = TREE_OPERAND (_q30, 0);
4229 2360 : tree _q41 = TREE_OPERAND (_q30, 1);
4230 2360 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
4231 : {
4232 52 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _q41, 0))
4233 : {
4234 52 : {
4235 52 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _p0, _q41 };
4236 52 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4237 52 : if (res) return res;
4238 : }
4239 : }
4240 : }
4241 : break;
4242 : }
4243 2069166 : default:;
4244 : }
4245 2069166 : switch (TREE_CODE (_q31))
4246 : {
4247 0 : case TRUNC_DIV_EXPR:
4248 0 : {
4249 0 : tree _q50 = TREE_OPERAND (_q31, 0);
4250 0 : tree _q51 = TREE_OPERAND (_q31, 1);
4251 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
4252 : {
4253 0 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q30, 0))
4254 : {
4255 0 : {
4256 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q30 };
4257 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4258 0 : if (res) return res;
4259 : }
4260 : }
4261 : }
4262 : break;
4263 : }
4264 : default:;
4265 : }
4266 : break;
4267 : }
4268 31551053 : default:;
4269 : }
4270 31551053 : switch (TREE_CODE (_p0))
4271 : {
4272 1922327 : case MULT_EXPR:
4273 1922327 : {
4274 1922327 : tree _q20 = TREE_OPERAND (_p0, 0);
4275 1922327 : tree _q21 = TREE_OPERAND (_p0, 1);
4276 1922327 : switch (TREE_CODE (_q21))
4277 : {
4278 595 : case PLUS_EXPR:
4279 595 : {
4280 595 : tree _q40 = TREE_OPERAND (_q21, 0);
4281 595 : tree _q41 = TREE_OPERAND (_q21, 1);
4282 595 : switch (TREE_CODE (_q40))
4283 : {
4284 0 : case TRUNC_DIV_EXPR:
4285 0 : {
4286 0 : tree _q50 = TREE_OPERAND (_q40, 0);
4287 0 : tree _q51 = TREE_OPERAND (_q40, 1);
4288 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4289 : {
4290 0 : if (integer_onep (_q41))
4291 : {
4292 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
4293 : {
4294 0 : {
4295 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q40, _q50 };
4296 0 : tree res = generic_simplify_92 (loc, type, _p0, _p1, captures);
4297 0 : if (res) return res;
4298 : }
4299 : }
4300 : }
4301 : }
4302 : break;
4303 : }
4304 : default:;
4305 : }
4306 : break;
4307 : }
4308 1922327 : default:;
4309 : }
4310 1922327 : switch (TREE_CODE (_q20))
4311 : {
4312 106981 : case PLUS_EXPR:
4313 106981 : {
4314 106981 : tree _q30 = TREE_OPERAND (_q20, 0);
4315 106981 : tree _q31 = TREE_OPERAND (_q20, 1);
4316 106981 : switch (TREE_CODE (_q30))
4317 : {
4318 1 : case TRUNC_DIV_EXPR:
4319 1 : {
4320 1 : tree _q40 = TREE_OPERAND (_q30, 0);
4321 1 : tree _q41 = TREE_OPERAND (_q30, 1);
4322 1 : if (integer_onep (_q31))
4323 : {
4324 1 : if ((_q21 == _q41 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q41, 0) && types_match (_q21, _q41)))
4325 : {
4326 1 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
4327 : {
4328 1 : {
4329 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q20, _q30, _q40 };
4330 1 : tree res = generic_simplify_92 (loc, type, _p0, _p1, captures);
4331 1 : if (res) return res;
4332 : }
4333 : }
4334 : }
4335 : }
4336 : break;
4337 : }
4338 : default:;
4339 : }
4340 : break;
4341 : }
4342 : default:;
4343 : }
4344 : break;
4345 : }
4346 1266 : case LSHIFT_EXPR:
4347 1266 : {
4348 1266 : tree _q20 = TREE_OPERAND (_p0, 0);
4349 1266 : tree _q21 = TREE_OPERAND (_p0, 1);
4350 1266 : switch (TREE_CODE (_p1))
4351 : {
4352 0 : case LSHIFT_EXPR:
4353 0 : {
4354 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4355 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4356 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4357 : {
4358 0 : {
4359 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
4360 0 : tree res = generic_simplify_56 (loc, type, _p0, _p1, captures, MINUS_EXPR);
4361 0 : if (res) return res;
4362 : }
4363 : }
4364 : break;
4365 : }
4366 : default:;
4367 : }
4368 : break;
4369 : }
4370 1191 : case BIT_AND_EXPR:
4371 1191 : {
4372 1191 : tree _q20 = TREE_OPERAND (_p0, 0);
4373 1191 : tree _q21 = TREE_OPERAND (_p0, 1);
4374 1191 : switch (TREE_CODE (_q21))
4375 : {
4376 0 : case BIT_NOT_EXPR:
4377 0 : {
4378 0 : tree _q40 = TREE_OPERAND (_q21, 0);
4379 0 : switch (TREE_CODE (_p1))
4380 : {
4381 0 : case BIT_AND_EXPR:
4382 0 : {
4383 0 : tree _q60 = TREE_OPERAND (_p1, 0);
4384 0 : tree _q61 = TREE_OPERAND (_p1, 1);
4385 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4386 : {
4387 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q40, 0) && types_match (_q61, _q40)))
4388 : {
4389 0 : {
4390 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
4391 0 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
4392 0 : if (res) return res;
4393 : }
4394 : }
4395 : }
4396 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
4397 : {
4398 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
4399 : {
4400 0 : {
4401 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
4402 0 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
4403 0 : if (res) return res;
4404 : }
4405 : }
4406 : }
4407 : break;
4408 : }
4409 : default:;
4410 : }
4411 : break;
4412 : }
4413 1191 : default:;
4414 : }
4415 1191 : switch (TREE_CODE (_q20))
4416 : {
4417 27 : case BIT_NOT_EXPR:
4418 27 : {
4419 27 : tree _q30 = TREE_OPERAND (_q20, 0);
4420 27 : switch (TREE_CODE (_p1))
4421 : {
4422 21 : case BIT_AND_EXPR:
4423 21 : {
4424 21 : tree _q60 = TREE_OPERAND (_p1, 0);
4425 21 : tree _q61 = TREE_OPERAND (_p1, 1);
4426 21 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
4427 : {
4428 0 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
4429 : {
4430 0 : {
4431 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
4432 0 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
4433 0 : if (res) return res;
4434 : }
4435 : }
4436 : }
4437 21 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
4438 : {
4439 21 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
4440 : {
4441 21 : {
4442 21 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
4443 21 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
4444 21 : if (res) return res;
4445 : }
4446 : }
4447 : }
4448 : break;
4449 : }
4450 : default:;
4451 : }
4452 : break;
4453 : }
4454 1170 : default:;
4455 : }
4456 1170 : switch (TREE_CODE (_q21))
4457 : {
4458 1130 : case INTEGER_CST:
4459 1130 : {
4460 1130 : switch (TREE_CODE (_p1))
4461 : {
4462 28 : case BIT_AND_EXPR:
4463 28 : {
4464 28 : tree _q50 = TREE_OPERAND (_p1, 0);
4465 28 : tree _q51 = TREE_OPERAND (_p1, 1);
4466 28 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4467 : {
4468 6 : switch (TREE_CODE (_q51))
4469 : {
4470 6 : case INTEGER_CST:
4471 6 : {
4472 6 : {
4473 6 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
4474 6 : if (~wi::to_wide (captures[2]) == wi::to_wide (captures[4])
4475 : )
4476 : {
4477 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1328;
4478 0 : {
4479 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1328;
4480 0 : tree res_op0;
4481 0 : {
4482 0 : tree _o1[2], _r1;
4483 0 : _o1[0] = captures[1];
4484 0 : _o1[1] = unshare_expr (captures[4]);
4485 0 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4486 0 : res_op0 = _r1;
4487 : }
4488 0 : tree res_op1;
4489 0 : res_op1 = captures[4];
4490 0 : tree _r;
4491 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
4492 0 : if (TREE_SIDE_EFFECTS (captures[2]))
4493 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
4494 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 959, __FILE__, __LINE__, true);
4495 : return _r;
4496 : }
4497 1170 : next_after_fail1328:;
4498 : }
4499 : }
4500 : break;
4501 : }
4502 : default:;
4503 : }
4504 : }
4505 : break;
4506 : }
4507 : default:;
4508 : }
4509 : break;
4510 : }
4511 1170 : default:;
4512 : }
4513 1170 : switch (TREE_CODE (_p1))
4514 : {
4515 31 : case BIT_AND_EXPR:
4516 31 : {
4517 31 : tree _q50 = TREE_OPERAND (_p1, 0);
4518 31 : tree _q51 = TREE_OPERAND (_p1, 1);
4519 31 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4520 : {
4521 6 : switch (TREE_CODE (_q51))
4522 : {
4523 0 : case BIT_NOT_EXPR:
4524 0 : {
4525 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4526 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
4527 : {
4528 0 : {
4529 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4530 0 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
4531 0 : if (res) return res;
4532 : }
4533 : }
4534 : break;
4535 : }
4536 : default:;
4537 : }
4538 : }
4539 31 : switch (TREE_CODE (_q50))
4540 : {
4541 0 : case BIT_NOT_EXPR:
4542 0 : {
4543 0 : tree _q60 = TREE_OPERAND (_q50, 0);
4544 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
4545 : {
4546 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4547 : {
4548 0 : {
4549 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4550 0 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
4551 0 : if (res) return res;
4552 : }
4553 : }
4554 : }
4555 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4556 : {
4557 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4558 : {
4559 0 : {
4560 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
4561 0 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
4562 0 : if (res) return res;
4563 : }
4564 : }
4565 : }
4566 : break;
4567 : }
4568 31 : default:;
4569 : }
4570 31 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
4571 : {
4572 0 : switch (TREE_CODE (_q51))
4573 : {
4574 0 : case BIT_NOT_EXPR:
4575 0 : {
4576 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4577 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
4578 : {
4579 0 : {
4580 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
4581 0 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
4582 0 : if (res) return res;
4583 : }
4584 : }
4585 : break;
4586 : }
4587 : default:;
4588 : }
4589 : }
4590 : break;
4591 : }
4592 2 : case PLUS_EXPR:
4593 2 : {
4594 2 : tree _q50 = TREE_OPERAND (_p1, 0);
4595 2 : tree _q51 = TREE_OPERAND (_p1, 1);
4596 2 : switch (TREE_CODE (_q50))
4597 : {
4598 2 : case BIT_IOR_EXPR:
4599 2 : {
4600 2 : tree _q60 = TREE_OPERAND (_q50, 0);
4601 2 : tree _q61 = TREE_OPERAND (_q50, 1);
4602 2 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4603 : {
4604 2 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
4605 : {
4606 2 : if (integer_onep (_q51))
4607 : {
4608 2 : {
4609 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4610 2 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4611 2 : if (res) return res;
4612 : }
4613 : }
4614 : }
4615 : }
4616 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
4617 : {
4618 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
4619 : {
4620 0 : if (integer_onep (_q51))
4621 : {
4622 0 : {
4623 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4624 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4625 0 : if (res) return res;
4626 : }
4627 : }
4628 : }
4629 : }
4630 : break;
4631 : }
4632 0 : default:;
4633 : }
4634 0 : {
4635 0 : tree _q50_pops[1];
4636 0 : if (tree_nop_convert (_q50, _q50_pops))
4637 : {
4638 0 : tree _q60 = _q50_pops[0];
4639 0 : switch (TREE_CODE (_q60))
4640 : {
4641 0 : case BIT_IOR_EXPR:
4642 0 : {
4643 0 : tree _q70 = TREE_OPERAND (_q60, 0);
4644 0 : tree _q71 = TREE_OPERAND (_q60, 1);
4645 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
4646 : {
4647 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
4648 : {
4649 0 : if (integer_onep (_q51))
4650 : {
4651 0 : {
4652 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4653 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4654 0 : if (res) return res;
4655 : }
4656 : }
4657 : }
4658 : }
4659 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
4660 : {
4661 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
4662 : {
4663 0 : if (integer_onep (_q51))
4664 : {
4665 0 : {
4666 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4667 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4668 0 : if (res) return res;
4669 : }
4670 : }
4671 : }
4672 : }
4673 : break;
4674 : }
4675 : default:;
4676 : }
4677 : }
4678 : }
4679 0 : break;
4680 : }
4681 1168 : default:;
4682 : }
4683 1168 : {
4684 1168 : tree _p1_pops[1];
4685 1168 : if (tree_nop_convert (_p1, _p1_pops))
4686 : {
4687 7 : tree _q50 = _p1_pops[0];
4688 7 : switch (TREE_CODE (_q50))
4689 : {
4690 0 : case PLUS_EXPR:
4691 0 : {
4692 0 : tree _q60 = TREE_OPERAND (_q50, 0);
4693 0 : tree _q61 = TREE_OPERAND (_q50, 1);
4694 0 : switch (TREE_CODE (_q60))
4695 : {
4696 0 : case BIT_IOR_EXPR:
4697 0 : {
4698 0 : tree _q70 = TREE_OPERAND (_q60, 0);
4699 0 : tree _q71 = TREE_OPERAND (_q60, 1);
4700 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
4701 : {
4702 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
4703 : {
4704 0 : if (integer_onep (_q61))
4705 : {
4706 0 : {
4707 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4708 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4709 0 : if (res) return res;
4710 : }
4711 : }
4712 : }
4713 : }
4714 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
4715 : {
4716 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
4717 : {
4718 0 : if (integer_onep (_q61))
4719 : {
4720 0 : {
4721 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4722 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4723 0 : if (res) return res;
4724 : }
4725 : }
4726 : }
4727 : }
4728 : break;
4729 : }
4730 0 : default:;
4731 : }
4732 0 : {
4733 0 : tree _q60_pops[1];
4734 0 : if (tree_nop_convert (_q60, _q60_pops))
4735 : {
4736 0 : tree _q70 = _q60_pops[0];
4737 0 : switch (TREE_CODE (_q70))
4738 : {
4739 0 : case BIT_IOR_EXPR:
4740 0 : {
4741 0 : tree _q80 = TREE_OPERAND (_q70, 0);
4742 0 : tree _q81 = TREE_OPERAND (_q70, 1);
4743 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
4744 : {
4745 0 : if ((_q81 == _q21 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q21, 0) && types_match (_q81, _q21)))
4746 : {
4747 0 : if (integer_onep (_q61))
4748 : {
4749 0 : {
4750 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4751 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4752 0 : if (res) return res;
4753 : }
4754 : }
4755 : }
4756 : }
4757 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
4758 : {
4759 0 : if ((_q81 == _q20 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q20, 0) && types_match (_q81, _q20)))
4760 : {
4761 0 : if (integer_onep (_q61))
4762 : {
4763 0 : {
4764 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4765 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
4766 0 : if (res) return res;
4767 : }
4768 : }
4769 : }
4770 : }
4771 : break;
4772 : }
4773 : default:;
4774 : }
4775 : }
4776 : }
4777 0 : break;
4778 : }
4779 : default:;
4780 : }
4781 : }
4782 : }
4783 1168 : break;
4784 : }
4785 3287 : case BIT_NOT_EXPR:
4786 3287 : {
4787 3287 : tree _q20 = TREE_OPERAND (_p0, 0);
4788 3287 : switch (TREE_CODE (_p1))
4789 : {
4790 22 : case BIT_NOT_EXPR:
4791 22 : {
4792 22 : tree _q40 = TREE_OPERAND (_p1, 0);
4793 22 : {
4794 22 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
4795 22 : if (!TYPE_OVERFLOW_SANITIZED (type)
4796 : )
4797 : {
4798 9 : {
4799 9 : tree utype = unsigned_type_for (type);
4800 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1329;
4801 9 : {
4802 9 : tree res_op0;
4803 9 : {
4804 9 : tree _o1[2], _r1;
4805 9 : {
4806 9 : tree _o2[1], _r2;
4807 9 : _o2[0] = captures[1];
4808 9 : if (TREE_TYPE (_o2[0]) != utype)
4809 : {
4810 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
4811 : }
4812 : else
4813 : _r2 = _o2[0];
4814 9 : _o1[0] = _r2;
4815 : }
4816 9 : {
4817 9 : tree _o2[1], _r2;
4818 9 : _o2[0] = captures[0];
4819 9 : if (TREE_TYPE (_o2[0]) != utype)
4820 : {
4821 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
4822 : }
4823 : else
4824 : _r2 = _o2[0];
4825 9 : _o1[1] = _r2;
4826 : }
4827 9 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4828 9 : res_op0 = _r1;
4829 : }
4830 9 : tree _r;
4831 9 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4832 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 960, __FILE__, __LINE__, true);
4833 : return _r;
4834 : }
4835 0 : next_after_fail1329:;
4836 : }
4837 : }
4838 : }
4839 : break;
4840 : }
4841 : default:;
4842 : }
4843 : break;
4844 : }
4845 81 : case BIT_IOR_EXPR:
4846 81 : {
4847 81 : tree _q20 = TREE_OPERAND (_p0, 0);
4848 81 : tree _q21 = TREE_OPERAND (_p0, 1);
4849 81 : switch (TREE_CODE (_p1))
4850 : {
4851 0 : case BIT_AND_EXPR:
4852 0 : {
4853 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4854 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4855 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4856 : {
4857 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4858 : {
4859 0 : {
4860 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4861 0 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_XOR_EXPR);
4862 0 : if (res) return res;
4863 : }
4864 : }
4865 : }
4866 : break;
4867 : }
4868 0 : case BIT_XOR_EXPR:
4869 0 : {
4870 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4871 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4872 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4873 : {
4874 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4875 : {
4876 0 : {
4877 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4878 0 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, BIT_AND_EXPR);
4879 0 : if (res) return res;
4880 : }
4881 : }
4882 : }
4883 : break;
4884 : }
4885 81 : default:;
4886 : }
4887 81 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
4888 : {
4889 5 : {
4890 5 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4891 5 : tree res = generic_simplify_97 (loc, type, _p0, _p1, captures);
4892 5 : if (res) return res;
4893 : }
4894 : }
4895 76 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4896 : {
4897 0 : {
4898 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
4899 0 : tree res = generic_simplify_97 (loc, type, _p0, _p1, captures);
4900 0 : if (res) return res;
4901 : }
4902 : }
4903 : break;
4904 : }
4905 2323042 : case PLUS_EXPR:
4906 2323042 : {
4907 2323042 : tree _q20 = TREE_OPERAND (_p0, 0);
4908 2323042 : tree _q21 = TREE_OPERAND (_p0, 1);
4909 2323042 : switch (TREE_CODE (_p1))
4910 : {
4911 14 : case BIT_IOR_EXPR:
4912 14 : {
4913 14 : tree _q50 = TREE_OPERAND (_p1, 0);
4914 14 : tree _q51 = TREE_OPERAND (_p1, 1);
4915 14 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4916 : {
4917 13 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4918 : {
4919 13 : {
4920 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4921 13 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR);
4922 13 : if (res) return res;
4923 : }
4924 : }
4925 : }
4926 : break;
4927 : }
4928 82 : case BIT_AND_EXPR:
4929 82 : {
4930 82 : tree _q50 = TREE_OPERAND (_p1, 0);
4931 82 : tree _q51 = TREE_OPERAND (_p1, 1);
4932 82 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4933 : {
4934 25 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4935 : {
4936 13 : {
4937 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4938 13 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR);
4939 13 : if (res) return res;
4940 : }
4941 : }
4942 : }
4943 : break;
4944 : }
4945 0 : case MIN_EXPR:
4946 0 : {
4947 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4948 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4949 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4950 : {
4951 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4952 : {
4953 0 : {
4954 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4955 0 : tree res = generic_simplify_99 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
4956 0 : if (res) return res;
4957 : }
4958 : }
4959 : }
4960 : break;
4961 : }
4962 13 : case MAX_EXPR:
4963 13 : {
4964 13 : tree _q50 = TREE_OPERAND (_p1, 0);
4965 13 : tree _q51 = TREE_OPERAND (_p1, 1);
4966 13 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4967 : {
4968 4 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4969 : {
4970 0 : {
4971 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4972 0 : tree res = generic_simplify_99 (loc, type, _p0, _p1, captures, MAX_EXPR, MIN_EXPR);
4973 0 : if (res) return res;
4974 : }
4975 : }
4976 : }
4977 : break;
4978 : }
4979 2323042 : default:;
4980 : }
4981 2323042 : switch (TREE_CODE (_q20))
4982 : {
4983 593 : case BIT_AND_EXPR:
4984 593 : {
4985 593 : tree _q30 = TREE_OPERAND (_q20, 0);
4986 593 : tree _q31 = TREE_OPERAND (_q20, 1);
4987 593 : if (integer_all_onesp (_q21))
4988 : {
4989 1 : switch (TREE_CODE (_p1))
4990 : {
4991 1 : case BIT_IOR_EXPR:
4992 1 : {
4993 1 : tree _q70 = TREE_OPERAND (_p1, 0);
4994 1 : tree _q71 = TREE_OPERAND (_p1, 1);
4995 1 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
4996 : {
4997 1 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
4998 : {
4999 1 : {
5000 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
5001 1 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5002 1 : if (res) return res;
5003 : }
5004 : }
5005 : }
5006 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
5007 : {
5008 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
5009 : {
5010 0 : {
5011 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
5012 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5013 0 : if (res) return res;
5014 : }
5015 : }
5016 : }
5017 : break;
5018 : }
5019 0 : default:;
5020 : }
5021 0 : {
5022 0 : tree _p1_pops[1];
5023 0 : if (tree_nop_convert (_p1, _p1_pops))
5024 : {
5025 0 : tree _q70 = _p1_pops[0];
5026 0 : switch (TREE_CODE (_q70))
5027 : {
5028 0 : case BIT_IOR_EXPR:
5029 0 : {
5030 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5031 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5032 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
5033 : {
5034 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
5035 : {
5036 0 : {
5037 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
5038 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5039 0 : if (res) return res;
5040 : }
5041 : }
5042 : }
5043 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
5044 : {
5045 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
5046 : {
5047 0 : {
5048 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
5049 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5050 0 : if (res) return res;
5051 : }
5052 : }
5053 : }
5054 : break;
5055 : }
5056 : default:;
5057 : }
5058 : }
5059 : }
5060 : }
5061 : break;
5062 : }
5063 2323041 : default:;
5064 : }
5065 2323041 : {
5066 2323041 : tree _q20_pops[1];
5067 2323041 : if (tree_nop_convert (_q20, _q20_pops))
5068 : {
5069 547801 : tree _q30 = _q20_pops[0];
5070 547801 : switch (TREE_CODE (_q30))
5071 : {
5072 0 : case BIT_AND_EXPR:
5073 0 : {
5074 0 : tree _q40 = TREE_OPERAND (_q30, 0);
5075 0 : tree _q41 = TREE_OPERAND (_q30, 1);
5076 0 : if (integer_all_onesp (_q21))
5077 : {
5078 0 : switch (TREE_CODE (_p1))
5079 : {
5080 0 : case BIT_IOR_EXPR:
5081 0 : {
5082 0 : tree _q80 = TREE_OPERAND (_p1, 0);
5083 0 : tree _q81 = TREE_OPERAND (_p1, 1);
5084 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
5085 : {
5086 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
5087 : {
5088 0 : {
5089 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
5090 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5091 0 : if (res) return res;
5092 : }
5093 : }
5094 : }
5095 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
5096 : {
5097 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
5098 : {
5099 0 : {
5100 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
5101 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5102 0 : if (res) return res;
5103 : }
5104 : }
5105 : }
5106 : break;
5107 : }
5108 0 : default:;
5109 : }
5110 0 : {
5111 0 : tree _p1_pops[1];
5112 0 : if (tree_nop_convert (_p1, _p1_pops))
5113 : {
5114 0 : tree _q80 = _p1_pops[0];
5115 0 : switch (TREE_CODE (_q80))
5116 : {
5117 0 : case BIT_IOR_EXPR:
5118 0 : {
5119 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5120 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5121 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
5122 : {
5123 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
5124 : {
5125 0 : {
5126 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
5127 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5128 0 : if (res) return res;
5129 : }
5130 : }
5131 : }
5132 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
5133 : {
5134 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
5135 : {
5136 0 : {
5137 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
5138 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5139 0 : if (res) return res;
5140 : }
5141 : }
5142 : }
5143 : break;
5144 : }
5145 : default:;
5146 : }
5147 : }
5148 : }
5149 : }
5150 : break;
5151 : }
5152 : default:;
5153 : }
5154 : }
5155 : }
5156 2323041 : break;
5157 : }
5158 31551014 : default:;
5159 : }
5160 31551014 : {
5161 31551014 : tree _p0_pops[1];
5162 31551014 : if (tree_nop_convert (_p0, _p0_pops))
5163 : {
5164 7619885 : tree _q20 = _p0_pops[0];
5165 7619885 : switch (TREE_CODE (_q20))
5166 : {
5167 1038664 : case PLUS_EXPR:
5168 1038664 : {
5169 1038664 : tree _q30 = TREE_OPERAND (_q20, 0);
5170 1038664 : tree _q31 = TREE_OPERAND (_q20, 1);
5171 1038664 : switch (TREE_CODE (_q30))
5172 : {
5173 8 : case BIT_AND_EXPR:
5174 8 : {
5175 8 : tree _q40 = TREE_OPERAND (_q30, 0);
5176 8 : tree _q41 = TREE_OPERAND (_q30, 1);
5177 8 : if (integer_all_onesp (_q31))
5178 : {
5179 0 : switch (TREE_CODE (_p1))
5180 : {
5181 0 : case BIT_IOR_EXPR:
5182 0 : {
5183 0 : tree _q80 = TREE_OPERAND (_p1, 0);
5184 0 : tree _q81 = TREE_OPERAND (_p1, 1);
5185 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
5186 : {
5187 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
5188 : {
5189 0 : {
5190 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
5191 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5192 0 : if (res) return res;
5193 : }
5194 : }
5195 : }
5196 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
5197 : {
5198 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
5199 : {
5200 0 : {
5201 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
5202 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5203 0 : if (res) return res;
5204 : }
5205 : }
5206 : }
5207 : break;
5208 : }
5209 0 : default:;
5210 : }
5211 0 : {
5212 0 : tree _p1_pops[1];
5213 0 : if (tree_nop_convert (_p1, _p1_pops))
5214 : {
5215 0 : tree _q80 = _p1_pops[0];
5216 0 : switch (TREE_CODE (_q80))
5217 : {
5218 0 : case BIT_IOR_EXPR:
5219 0 : {
5220 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5221 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5222 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
5223 : {
5224 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
5225 : {
5226 0 : {
5227 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
5228 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5229 0 : if (res) return res;
5230 : }
5231 : }
5232 : }
5233 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
5234 : {
5235 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
5236 : {
5237 0 : {
5238 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
5239 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5240 0 : if (res) return res;
5241 : }
5242 : }
5243 : }
5244 : break;
5245 : }
5246 : default:;
5247 : }
5248 : }
5249 : }
5250 : }
5251 : break;
5252 : }
5253 1038664 : default:;
5254 : }
5255 1038664 : {
5256 1038664 : tree _q30_pops[1];
5257 1038664 : if (tree_nop_convert (_q30, _q30_pops))
5258 : {
5259 42905 : tree _q40 = _q30_pops[0];
5260 42905 : switch (TREE_CODE (_q40))
5261 : {
5262 0 : case BIT_AND_EXPR:
5263 0 : {
5264 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5265 0 : tree _q51 = TREE_OPERAND (_q40, 1);
5266 0 : if (integer_all_onesp (_q31))
5267 : {
5268 0 : switch (TREE_CODE (_p1))
5269 : {
5270 0 : case BIT_IOR_EXPR:
5271 0 : {
5272 0 : tree _q90 = TREE_OPERAND (_p1, 0);
5273 0 : tree _q91 = TREE_OPERAND (_p1, 1);
5274 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
5275 : {
5276 0 : if ((_q91 == _q51 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q51, 0) && types_match (_q91, _q51)))
5277 : {
5278 0 : {
5279 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5280 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5281 0 : if (res) return res;
5282 : }
5283 : }
5284 : }
5285 0 : if ((_q90 == _q51 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q51, 0) && types_match (_q90, _q51)))
5286 : {
5287 0 : if ((_q91 == _q50 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q50, 0) && types_match (_q91, _q50)))
5288 : {
5289 0 : {
5290 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
5291 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5292 0 : if (res) return res;
5293 : }
5294 : }
5295 : }
5296 : break;
5297 : }
5298 0 : default:;
5299 : }
5300 0 : {
5301 0 : tree _p1_pops[1];
5302 0 : if (tree_nop_convert (_p1, _p1_pops))
5303 : {
5304 0 : tree _q90 = _p1_pops[0];
5305 0 : switch (TREE_CODE (_q90))
5306 : {
5307 0 : case BIT_IOR_EXPR:
5308 0 : {
5309 0 : tree _q100 = TREE_OPERAND (_q90, 0);
5310 0 : tree _q101 = TREE_OPERAND (_q90, 1);
5311 0 : if ((_q100 == _q50 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q50, 0) && types_match (_q100, _q50)))
5312 : {
5313 0 : if ((_q101 == _q51 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q51, 0) && types_match (_q101, _q51)))
5314 : {
5315 0 : {
5316 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5317 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5318 0 : if (res) return res;
5319 : }
5320 : }
5321 : }
5322 0 : if ((_q100 == _q51 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q51, 0) && types_match (_q100, _q51)))
5323 : {
5324 0 : if ((_q101 == _q50 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q50, 0) && types_match (_q101, _q50)))
5325 : {
5326 0 : {
5327 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
5328 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
5329 0 : if (res) return res;
5330 : }
5331 : }
5332 : }
5333 : break;
5334 : }
5335 : default:;
5336 : }
5337 : }
5338 : }
5339 : }
5340 : break;
5341 : }
5342 : default:;
5343 : }
5344 : }
5345 : }
5346 1038664 : break;
5347 : }
5348 14 : case BIT_AND_EXPR:
5349 14 : {
5350 14 : tree _q30 = TREE_OPERAND (_q20, 0);
5351 14 : tree _q31 = TREE_OPERAND (_q20, 1);
5352 14 : switch (TREE_CODE (_p1))
5353 : {
5354 0 : case PLUS_EXPR:
5355 0 : {
5356 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5357 0 : tree _q61 = TREE_OPERAND (_p1, 1);
5358 0 : switch (TREE_CODE (_q60))
5359 : {
5360 0 : case BIT_IOR_EXPR:
5361 0 : {
5362 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5363 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5364 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
5365 : {
5366 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
5367 : {
5368 0 : if (integer_onep (_q61))
5369 : {
5370 0 : {
5371 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5372 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5373 0 : if (res) return res;
5374 : }
5375 : }
5376 : }
5377 : }
5378 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
5379 : {
5380 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
5381 : {
5382 0 : if (integer_onep (_q61))
5383 : {
5384 0 : {
5385 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5386 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5387 0 : if (res) return res;
5388 : }
5389 : }
5390 : }
5391 : }
5392 : break;
5393 : }
5394 0 : default:;
5395 : }
5396 0 : {
5397 0 : tree _q60_pops[1];
5398 0 : if (tree_nop_convert (_q60, _q60_pops))
5399 : {
5400 0 : tree _q70 = _q60_pops[0];
5401 0 : switch (TREE_CODE (_q70))
5402 : {
5403 0 : case BIT_IOR_EXPR:
5404 0 : {
5405 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5406 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5407 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
5408 : {
5409 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
5410 : {
5411 0 : if (integer_onep (_q61))
5412 : {
5413 0 : {
5414 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5415 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5416 0 : if (res) return res;
5417 : }
5418 : }
5419 : }
5420 : }
5421 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
5422 : {
5423 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
5424 : {
5425 0 : if (integer_onep (_q61))
5426 : {
5427 0 : {
5428 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5429 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5430 0 : if (res) return res;
5431 : }
5432 : }
5433 : }
5434 : }
5435 : break;
5436 : }
5437 : default:;
5438 : }
5439 : }
5440 : }
5441 0 : break;
5442 : }
5443 14 : default:;
5444 : }
5445 14 : {
5446 14 : tree _p1_pops[1];
5447 14 : if (tree_nop_convert (_p1, _p1_pops))
5448 : {
5449 14 : tree _q60 = _p1_pops[0];
5450 14 : switch (TREE_CODE (_q60))
5451 : {
5452 0 : case PLUS_EXPR:
5453 0 : {
5454 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5455 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5456 0 : switch (TREE_CODE (_q70))
5457 : {
5458 0 : case BIT_IOR_EXPR:
5459 0 : {
5460 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5461 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5462 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
5463 : {
5464 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
5465 : {
5466 0 : if (integer_onep (_q71))
5467 : {
5468 0 : {
5469 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5470 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5471 0 : if (res) return res;
5472 : }
5473 : }
5474 : }
5475 : }
5476 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
5477 : {
5478 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
5479 : {
5480 0 : if (integer_onep (_q71))
5481 : {
5482 0 : {
5483 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5484 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5485 0 : if (res) return res;
5486 : }
5487 : }
5488 : }
5489 : }
5490 : break;
5491 : }
5492 0 : default:;
5493 : }
5494 0 : {
5495 0 : tree _q70_pops[1];
5496 0 : if (tree_nop_convert (_q70, _q70_pops))
5497 : {
5498 0 : tree _q80 = _q70_pops[0];
5499 0 : switch (TREE_CODE (_q80))
5500 : {
5501 0 : case BIT_IOR_EXPR:
5502 0 : {
5503 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5504 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5505 0 : if ((_q90 == _q30 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q30, 0) && types_match (_q90, _q30)))
5506 : {
5507 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
5508 : {
5509 0 : if (integer_onep (_q71))
5510 : {
5511 0 : {
5512 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5513 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5514 0 : if (res) return res;
5515 : }
5516 : }
5517 : }
5518 : }
5519 0 : if ((_q90 == _q31 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q31, 0) && types_match (_q90, _q31)))
5520 : {
5521 0 : if ((_q91 == _q30 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q30, 0) && types_match (_q91, _q30)))
5522 : {
5523 0 : if (integer_onep (_q71))
5524 : {
5525 0 : {
5526 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5527 0 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5528 0 : if (res) return res;
5529 : }
5530 : }
5531 : }
5532 : }
5533 : break;
5534 : }
5535 : default:;
5536 : }
5537 : }
5538 : }
5539 0 : break;
5540 : }
5541 : default:;
5542 : }
5543 : }
5544 : }
5545 14 : break;
5546 : }
5547 : default:;
5548 : }
5549 : }
5550 : }
5551 31551014 : if (tree_negate_expr_p (_p1))
5552 : {
5553 7836801 : {
5554 7836801 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5555 7836801 : if (!FIXED_POINT_TYPE_P (type)
5556 : )
5557 : {
5558 7836801 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1330;
5559 7836801 : {
5560 7836801 : tree res_op0;
5561 7836801 : res_op0 = captures[0];
5562 7836801 : tree res_op1;
5563 7836801 : {
5564 7836801 : tree _o1[1], _r1;
5565 7836801 : _o1[0] = captures[1];
5566 7836801 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
5567 7836801 : res_op1 = _r1;
5568 : }
5569 7836801 : tree _r;
5570 7836801 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
5571 7836801 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 961, __FILE__, __LINE__, true);
5572 : return _r;
5573 : }
5574 0 : next_after_fail1330:;
5575 : }
5576 : }
5577 : }
5578 23714213 : switch (TREE_CODE (_p0))
5579 : {
5580 5205492 : CASE_CONVERT:
5581 5205492 : {
5582 5205492 : tree _q20 = TREE_OPERAND (_p0, 0);
5583 5205492 : switch (TREE_CODE (_p1))
5584 : {
5585 4331253 : CASE_CONVERT:
5586 4331253 : {
5587 4331253 : tree _q40 = TREE_OPERAND (_p1, 0);
5588 4331253 : switch (TREE_CODE (_q40))
5589 : {
5590 15 : case BIT_AND_EXPR:
5591 15 : {
5592 15 : tree _q50 = TREE_OPERAND (_q40, 0);
5593 15 : tree _q51 = TREE_OPERAND (_q40, 1);
5594 15 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
5595 : {
5596 0 : {
5597 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q50, _p1, _q40, _q51, _q20 };
5598 0 : tree res = generic_simplify_101 (loc, type, _p0, _p1, captures);
5599 0 : if (res) return res;
5600 : }
5601 : }
5602 15 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
5603 : {
5604 1 : {
5605 1 : tree captures[5] ATTRIBUTE_UNUSED = { _q51, _p1, _q40, _q50, _q20 };
5606 1 : tree res = generic_simplify_101 (loc, type, _p0, _p1, captures);
5607 1 : if (res) return res;
5608 : }
5609 : }
5610 : break;
5611 : }
5612 416803 : case POINTER_PLUS_EXPR:
5613 416803 : {
5614 416803 : tree _q50 = TREE_OPERAND (_q40, 0);
5615 416803 : tree _q51 = TREE_OPERAND (_q40, 1);
5616 416803 : {
5617 416803 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5618 416803 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5619 416803 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
5620 : )
5621 : {
5622 416799 : {
5623 416799 : poly_int64 diff;
5624 416799 : if (ptr_difference_const (captures[0], captures[1], &diff)
5625 : )
5626 : {
5627 32973 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1331;
5628 32973 : {
5629 32973 : tree res_op0;
5630 32973 : res_op0 = build_int_cst_type (type, diff);
5631 32973 : tree res_op1;
5632 32973 : {
5633 32973 : tree _o1[1], _r1;
5634 32973 : _o1[0] = captures[2];
5635 32973 : if (TREE_TYPE (_o1[0]) != type)
5636 : {
5637 32969 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5638 : }
5639 : else
5640 : _r1 = _o1[0];
5641 32973 : res_op1 = _r1;
5642 : }
5643 32973 : tree _r;
5644 32973 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5645 32973 : if (TREE_SIDE_EFFECTS (captures[0]))
5646 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5647 32973 : if (TREE_SIDE_EFFECTS (captures[1]))
5648 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5649 32973 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 962, __FILE__, __LINE__, true);
5650 32973 : return _r;
5651 : }
5652 0 : next_after_fail1331:;
5653 : }
5654 : }
5655 : }
5656 : }
5657 : break;
5658 : }
5659 : default:;
5660 : }
5661 : break;
5662 : }
5663 5349 : case BIT_AND_EXPR:
5664 5349 : {
5665 5349 : tree _q40 = TREE_OPERAND (_p1, 0);
5666 5349 : tree _q41 = TREE_OPERAND (_p1, 1);
5667 5349 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _q20, 0))
5668 : {
5669 0 : {
5670 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _p1, _q41, _q20 };
5671 0 : tree res = generic_simplify_102 (loc, type, _p0, _p1, captures);
5672 0 : if (res) return res;
5673 : }
5674 : }
5675 5349 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q20, 0))
5676 : {
5677 21 : {
5678 21 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _p1, _q40, _q20 };
5679 21 : tree res = generic_simplify_102 (loc, type, _p0, _p1, captures);
5680 21 : if (res) return res;
5681 : }
5682 : }
5683 : break;
5684 : }
5685 5172497 : default:;
5686 : }
5687 5172497 : switch (TREE_CODE (_q20))
5688 : {
5689 98163 : case POINTER_PLUS_EXPR:
5690 98163 : {
5691 98163 : tree _q30 = TREE_OPERAND (_q20, 0);
5692 98163 : tree _q31 = TREE_OPERAND (_q20, 1);
5693 98163 : switch (TREE_CODE (_p1))
5694 : {
5695 97093 : CASE_CONVERT:
5696 97093 : {
5697 97093 : tree _q60 = TREE_OPERAND (_p1, 0);
5698 97093 : {
5699 97093 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5700 97093 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5701 97093 : && tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
5702 : )
5703 : {
5704 97064 : {
5705 97064 : poly_int64 diff;
5706 97064 : if (ptr_difference_const (captures[0], captures[2], &diff)
5707 : )
5708 : {
5709 17300 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1332;
5710 17300 : {
5711 17300 : tree res_op0;
5712 17300 : {
5713 17300 : tree _o1[1], _r1;
5714 17300 : _o1[0] = captures[1];
5715 17300 : if (TREE_TYPE (_o1[0]) != type)
5716 : {
5717 16890 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5718 : }
5719 : else
5720 : _r1 = _o1[0];
5721 17300 : res_op0 = _r1;
5722 : }
5723 17300 : tree res_op1;
5724 17300 : res_op1 = build_int_cst_type (type, diff);
5725 17300 : tree _r;
5726 17300 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
5727 17300 : if (TREE_SIDE_EFFECTS (captures[0]))
5728 11 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5729 17300 : if (TREE_SIDE_EFFECTS (captures[2]))
5730 11 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
5731 17300 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 963, __FILE__, __LINE__, true);
5732 17300 : return _r;
5733 : }
5734 0 : next_after_fail1332:;
5735 : }
5736 : }
5737 : }
5738 : }
5739 : break;
5740 : }
5741 : default:;
5742 : }
5743 : break;
5744 : }
5745 5155197 : default:;
5746 : }
5747 5155197 : switch (TREE_CODE (_p1))
5748 : {
5749 4280979 : CASE_CONVERT:
5750 4280979 : {
5751 4280979 : tree _q40 = TREE_OPERAND (_p1, 0);
5752 4280979 : {
5753 4280979 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
5754 4280979 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5755 3780634 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
5756 8025165 : && tree_nop_conversion_p (type, ptr_type_node)
5757 : )
5758 : {
5759 3012295 : {
5760 3012295 : poly_int64 diff;
5761 3012295 : if (ptr_difference_const (captures[0], captures[1], &diff)
5762 : )
5763 : {
5764 52163 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1333;
5765 52163 : {
5766 52163 : tree _r;
5767 52163 : _r = build_int_cst_type (type, diff);
5768 52163 : if (TREE_SIDE_EFFECTS (captures[0]))
5769 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5770 52163 : if (TREE_SIDE_EFFECTS (captures[1]))
5771 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5772 52163 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 964, __FILE__, __LINE__, true);
5773 52163 : return _r;
5774 : }
5775 0 : next_after_fail1333:;
5776 : }
5777 : }
5778 : }
5779 : }
5780 : break;
5781 : }
5782 : default:;
5783 : }
5784 : break;
5785 : }
5786 23611755 : default:;
5787 : }
5788 23611755 : if (integer_onep (_p0))
5789 : {
5790 107513 : switch (TREE_CODE (_p1))
5791 : {
5792 28012 : case SSA_NAME:
5793 28012 : {
5794 28012 : {
5795 28012 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5796 28012 : if (INTEGRAL_TYPE_P (type)
5797 28012 : && ssa_name_has_boolean_range (captures[1])
5798 : )
5799 : {
5800 241 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1334;
5801 241 : {
5802 241 : tree res_op0;
5803 241 : res_op0 = captures[1];
5804 241 : tree res_op1;
5805 241 : res_op1 = captures[0];
5806 241 : tree _r;
5807 241 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
5808 241 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
5809 : return _r;
5810 : }
5811 0 : next_after_fail1334:;
5812 : }
5813 : }
5814 : break;
5815 : }
5816 : default:;
5817 : }
5818 : }
5819 23611514 : switch (TREE_CODE (_p1))
5820 : {
5821 7684401 : CASE_CONVERT:
5822 7684401 : {
5823 7684401 : tree _q30 = TREE_OPERAND (_p1, 0);
5824 7684401 : switch (TREE_CODE (_q30))
5825 : {
5826 14 : case BIT_AND_EXPR:
5827 14 : {
5828 14 : tree _q40 = TREE_OPERAND (_q30, 0);
5829 14 : tree _q41 = TREE_OPERAND (_q30, 1);
5830 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
5831 : {
5832 0 : {
5833 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _q30, _q41, _p0 };
5834 0 : tree res = generic_simplify_101 (loc, type, _p0, _p1, captures);
5835 0 : if (res) return res;
5836 : }
5837 : }
5838 14 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
5839 : {
5840 0 : {
5841 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _q30, _q40, _p0 };
5842 0 : tree res = generic_simplify_101 (loc, type, _p0, _p1, captures);
5843 0 : if (res) return res;
5844 : }
5845 : }
5846 : break;
5847 : }
5848 : default:;
5849 : }
5850 : break;
5851 : }
5852 7495 : case BIT_AND_EXPR:
5853 7495 : {
5854 7495 : tree _q30 = TREE_OPERAND (_p1, 0);
5855 7495 : tree _q31 = TREE_OPERAND (_p1, 1);
5856 7495 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || operand_equal_p (_q30, _p0, 0))
5857 : {
5858 217 : {
5859 217 : tree captures[5] ATTRIBUTE_UNUSED = { _q30, _p1, _p1, _q31, _p0 };
5860 217 : tree res = generic_simplify_102 (loc, type, _p0, _p1, captures);
5861 217 : if (res) return res;
5862 : }
5863 : }
5864 7278 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _p0, 0))
5865 : {
5866 38 : {
5867 38 : tree captures[5] ATTRIBUTE_UNUSED = { _q31, _p1, _p1, _q30, _p0 };
5868 38 : tree res = generic_simplify_102 (loc, type, _p0, _p1, captures);
5869 38 : if (res) return res;
5870 : }
5871 : }
5872 : break;
5873 : }
5874 23611259 : default:;
5875 : }
5876 23611259 : switch (TREE_CODE (_p0))
5877 : {
5878 1770065 : case PLUS_EXPR:
5879 1770065 : {
5880 1770065 : tree _q20 = TREE_OPERAND (_p0, 0);
5881 1770065 : tree _q21 = TREE_OPERAND (_p0, 1);
5882 1770065 : switch (TREE_CODE (_p1))
5883 : {
5884 479912 : case PLUS_EXPR:
5885 479912 : {
5886 479912 : tree _q50 = TREE_OPERAND (_p1, 0);
5887 479912 : tree _q51 = TREE_OPERAND (_p1, 1);
5888 479912 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5889 : {
5890 178485 : {
5891 178485 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5892 356970 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5893 356970 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5894 40187 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5895 : )
5896 : {
5897 178479 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1335;
5898 178479 : {
5899 178479 : tree res_op0;
5900 178479 : res_op0 = captures[0];
5901 178479 : tree res_op1;
5902 178479 : res_op1 = captures[2];
5903 178479 : tree _r;
5904 178479 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5905 178479 : if (TREE_SIDE_EFFECTS (captures[1]))
5906 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5907 178479 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
5908 : return _r;
5909 : }
5910 0 : next_after_fail1335:;
5911 : }
5912 : }
5913 : }
5914 301433 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5915 : {
5916 612 : {
5917 612 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5918 1224 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5919 1224 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5920 499 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5921 : )
5922 : {
5923 612 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1336;
5924 612 : {
5925 612 : tree res_op0;
5926 612 : res_op0 = captures[0];
5927 612 : tree res_op1;
5928 612 : res_op1 = captures[2];
5929 612 : tree _r;
5930 612 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5931 612 : if (TREE_SIDE_EFFECTS (captures[1]))
5932 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5933 612 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
5934 : return _r;
5935 : }
5936 0 : next_after_fail1336:;
5937 : }
5938 : }
5939 : }
5940 300821 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5941 : {
5942 478 : {
5943 478 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
5944 956 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5945 956 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5946 386 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5947 : )
5948 : {
5949 478 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1337;
5950 478 : {
5951 478 : tree res_op0;
5952 478 : res_op0 = captures[0];
5953 478 : tree res_op1;
5954 478 : res_op1 = captures[2];
5955 478 : tree _r;
5956 478 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5957 478 : if (TREE_SIDE_EFFECTS (captures[1]))
5958 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5959 478 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
5960 : return _r;
5961 : }
5962 0 : next_after_fail1337:;
5963 : }
5964 : }
5965 : }
5966 300343 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5967 : {
5968 175771 : {
5969 175771 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
5970 351542 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5971 351542 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5972 142648 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5973 : )
5974 : {
5975 175771 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1338;
5976 175771 : {
5977 175771 : tree res_op0;
5978 175771 : res_op0 = captures[0];
5979 175771 : tree res_op1;
5980 175771 : res_op1 = captures[2];
5981 175771 : tree _r;
5982 175771 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5983 175771 : if (TREE_SIDE_EFFECTS (captures[1]))
5984 2 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5985 175771 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
5986 : return _r;
5987 : }
5988 0 : next_after_fail1338:;
5989 : }
5990 : }
5991 : }
5992 : break;
5993 : }
5994 : default:;
5995 : }
5996 : break;
5997 : }
5998 986749 : case MINUS_EXPR:
5999 986749 : {
6000 986749 : tree _q20 = TREE_OPERAND (_p0, 0);
6001 986749 : tree _q21 = TREE_OPERAND (_p0, 1);
6002 986749 : switch (TREE_CODE (_p1))
6003 : {
6004 97 : case MINUS_EXPR:
6005 97 : {
6006 97 : tree _q50 = TREE_OPERAND (_p1, 0);
6007 97 : tree _q51 = TREE_OPERAND (_p1, 1);
6008 97 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6009 : {
6010 55 : {
6011 55 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6012 110 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6013 110 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6014 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6015 : )
6016 : {
6017 55 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1339;
6018 55 : {
6019 55 : tree res_op0;
6020 55 : res_op0 = captures[0];
6021 55 : tree res_op1;
6022 55 : res_op1 = captures[2];
6023 55 : tree _r;
6024 55 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6025 55 : if (TREE_SIDE_EFFECTS (captures[1]))
6026 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6027 55 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 967, __FILE__, __LINE__, true);
6028 : return _r;
6029 : }
6030 0 : next_after_fail1339:;
6031 : }
6032 : }
6033 : }
6034 42 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6035 : {
6036 0 : {
6037 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6038 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
6039 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
6040 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
6041 : )
6042 : {
6043 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1340;
6044 0 : {
6045 0 : tree res_op0;
6046 0 : res_op0 = captures[2];
6047 0 : tree res_op1;
6048 0 : res_op1 = captures[1];
6049 0 : tree _r;
6050 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6051 0 : if (TREE_SIDE_EFFECTS (captures[0]))
6052 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6053 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 968, __FILE__, __LINE__, true);
6054 : return _r;
6055 : }
6056 0 : next_after_fail1340:;
6057 : }
6058 : }
6059 : }
6060 : break;
6061 : }
6062 : default:;
6063 : }
6064 : break;
6065 : }
6066 59 : case POINTER_DIFF_EXPR:
6067 59 : {
6068 59 : tree _q20 = TREE_OPERAND (_p0, 0);
6069 59 : tree _q21 = TREE_OPERAND (_p0, 1);
6070 59 : switch (TREE_CODE (_p1))
6071 : {
6072 0 : case POINTER_DIFF_EXPR:
6073 0 : {
6074 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6075 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6076 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6077 : {
6078 0 : {
6079 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
6080 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6081 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
6082 : )
6083 : {
6084 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1341;
6085 0 : {
6086 0 : tree res_op0;
6087 0 : res_op0 = captures[1];
6088 0 : tree res_op1;
6089 0 : res_op1 = captures[3];
6090 0 : tree _r;
6091 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
6092 0 : if (TREE_SIDE_EFFECTS (captures[2]))
6093 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6094 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 969, __FILE__, __LINE__, true);
6095 : return _r;
6096 : }
6097 0 : next_after_fail1341:;
6098 : }
6099 : }
6100 : }
6101 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6102 : {
6103 0 : {
6104 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
6105 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6106 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
6107 : )
6108 : {
6109 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1342;
6110 0 : {
6111 0 : tree res_op0;
6112 0 : res_op0 = captures[3];
6113 0 : tree res_op1;
6114 0 : res_op1 = captures[2];
6115 0 : tree _r;
6116 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
6117 0 : if (TREE_SIDE_EFFECTS (captures[1]))
6118 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6119 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 970, __FILE__, __LINE__, true);
6120 : return _r;
6121 : }
6122 0 : next_after_fail1342:;
6123 : }
6124 : }
6125 : }
6126 : break;
6127 : }
6128 : default:;
6129 : }
6130 : break;
6131 : }
6132 23255864 : default:;
6133 : }
6134 23255864 : switch (TREE_CODE (_p1))
6135 : {
6136 7684401 : CASE_CONVERT:
6137 7684401 : {
6138 7684401 : tree _q30 = TREE_OPERAND (_p1, 0);
6139 7684401 : switch (TREE_CODE (_q30))
6140 : {
6141 2998 : case NEGATE_EXPR:
6142 2998 : {
6143 2998 : tree _q40 = TREE_OPERAND (_q30, 0);
6144 2998 : {
6145 2998 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6146 2998 : tree res = generic_simplify_103 (loc, type, _p0, _p1, captures);
6147 2998 : if (res) return res;
6148 : }
6149 2990 : break;
6150 : }
6151 : default:;
6152 : }
6153 : break;
6154 : }
6155 45 : case NEGATE_EXPR:
6156 45 : {
6157 45 : tree _q30 = TREE_OPERAND (_p1, 0);
6158 45 : {
6159 45 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6160 45 : tree res = generic_simplify_103 (loc, type, _p0, _p1, captures);
6161 45 : if (res) return res;
6162 : }
6163 40 : break;
6164 : }
6165 23255851 : default:;
6166 : }
6167 23255851 : switch (TREE_CODE (_p0))
6168 : {
6169 1414725 : case PLUS_EXPR:
6170 1414725 : {
6171 1414725 : tree _q20 = TREE_OPERAND (_p0, 0);
6172 1414725 : tree _q21 = TREE_OPERAND (_p0, 1);
6173 1414725 : {
6174 1414725 : tree _q20_pops[1];
6175 1414725 : if (tree_nop_convert (_q20, _q20_pops))
6176 : {
6177 334518 : tree _q30 = _q20_pops[0];
6178 334518 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6179 : {
6180 394 : {
6181 394 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6182 394 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6183 394 : if (res) return res;
6184 : }
6185 : }
6186 : }
6187 : }
6188 1414331 : {
6189 1414331 : tree _q21_pops[1];
6190 1414331 : if (tree_nop_convert (_q21, _q21_pops))
6191 : {
6192 478669 : tree _q40 = _q21_pops[0];
6193 478669 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6194 : {
6195 78 : {
6196 78 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6197 78 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6198 78 : if (res) return res;
6199 : }
6200 : }
6201 : }
6202 : }
6203 1414253 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6204 : {
6205 54851 : {
6206 54851 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6207 54851 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6208 54851 : if (res) return res;
6209 : }
6210 : }
6211 1359402 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6212 : {
6213 1862 : {
6214 1862 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6215 1862 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6216 1862 : if (res) return res;
6217 : }
6218 : }
6219 : break;
6220 : }
6221 986694 : case MINUS_EXPR:
6222 986694 : {
6223 986694 : tree _q20 = TREE_OPERAND (_p0, 0);
6224 986694 : tree _q21 = TREE_OPERAND (_p0, 1);
6225 986694 : {
6226 986694 : tree _q20_pops[1];
6227 986694 : if (tree_nop_convert (_q20, _q20_pops))
6228 : {
6229 85981 : tree _q30 = _q20_pops[0];
6230 85981 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6231 : {
6232 0 : {
6233 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6234 0 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6235 0 : if (res) return res;
6236 : }
6237 : }
6238 : }
6239 : }
6240 986694 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6241 : {
6242 170 : {
6243 170 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6244 170 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6245 170 : if (res) return res;
6246 : }
6247 : }
6248 : break;
6249 : }
6250 23198507 : default:;
6251 : }
6252 23198507 : {
6253 23198507 : tree _p0_pops[1];
6254 23198507 : if (tree_nop_convert (_p0, _p0_pops))
6255 : {
6256 4547852 : tree _q20 = _p0_pops[0];
6257 4547852 : switch (TREE_CODE (_q20))
6258 : {
6259 357704 : case PLUS_EXPR:
6260 357704 : {
6261 357704 : tree _q30 = TREE_OPERAND (_q20, 0);
6262 357704 : tree _q31 = TREE_OPERAND (_q20, 1);
6263 357704 : {
6264 357704 : tree _q30_pops[1];
6265 357704 : if (tree_nop_convert (_q30, _q30_pops))
6266 : {
6267 28536 : tree _q40 = _q30_pops[0];
6268 28536 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6269 : {
6270 632 : {
6271 632 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
6272 632 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6273 632 : if (res) return res;
6274 : }
6275 : }
6276 : }
6277 : }
6278 357072 : {
6279 357072 : tree _q31_pops[1];
6280 357072 : if (tree_nop_convert (_q31, _q31_pops))
6281 : {
6282 2688 : tree _q50 = _q31_pops[0];
6283 2688 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
6284 : {
6285 52 : {
6286 52 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
6287 52 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6288 52 : if (res) return res;
6289 : }
6290 : }
6291 : }
6292 : }
6293 357020 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6294 : {
6295 12 : {
6296 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
6297 12 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6298 12 : if (res) return res;
6299 : }
6300 : }
6301 357008 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
6302 : {
6303 0 : {
6304 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
6305 0 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6306 0 : if (res) return res;
6307 : }
6308 : }
6309 : break;
6310 : }
6311 720 : case MINUS_EXPR:
6312 720 : {
6313 720 : tree _q30 = TREE_OPERAND (_q20, 0);
6314 720 : tree _q31 = TREE_OPERAND (_q20, 1);
6315 720 : {
6316 720 : tree _q30_pops[1];
6317 720 : if (tree_nop_convert (_q30, _q30_pops))
6318 : {
6319 2 : tree _q40 = _q30_pops[0];
6320 2 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6321 : {
6322 0 : {
6323 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
6324 0 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6325 0 : if (res) return res;
6326 : }
6327 : }
6328 : }
6329 : }
6330 720 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6331 : {
6332 0 : {
6333 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
6334 0 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6335 0 : if (res) return res;
6336 : }
6337 : }
6338 : break;
6339 : }
6340 : default:;
6341 : }
6342 : }
6343 : }
6344 23197811 : switch (TREE_CODE (_p1))
6345 : {
6346 1321846 : case PLUS_EXPR:
6347 1321846 : {
6348 1321846 : tree _q30 = TREE_OPERAND (_p1, 0);
6349 1321846 : tree _q31 = TREE_OPERAND (_p1, 1);
6350 1321846 : {
6351 1321846 : tree _q30_pops[1];
6352 1321846 : if (tree_nop_convert (_q30, _q30_pops))
6353 : {
6354 341167 : tree _q40 = _q30_pops[0];
6355 341167 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6356 : {
6357 71 : {
6358 71 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6359 71 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6360 71 : if (res) return res;
6361 : }
6362 : }
6363 : }
6364 : }
6365 1321775 : {
6366 1321775 : tree _q31_pops[1];
6367 1321775 : if (tree_nop_convert (_q31, _q31_pops))
6368 : {
6369 74822 : tree _q50 = _q31_pops[0];
6370 74822 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6371 : {
6372 0 : {
6373 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6374 0 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6375 0 : if (res) return res;
6376 : }
6377 : }
6378 : }
6379 : }
6380 1321775 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6381 : {
6382 41795 : {
6383 41795 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6384 41795 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6385 41795 : if (res) return res;
6386 : }
6387 : }
6388 1279980 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6389 : {
6390 1669 : {
6391 1669 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6392 1669 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6393 1669 : if (res) return res;
6394 : }
6395 : }
6396 : break;
6397 : }
6398 83943 : case MINUS_EXPR:
6399 83943 : {
6400 83943 : tree _q30 = TREE_OPERAND (_p1, 0);
6401 83943 : tree _q31 = TREE_OPERAND (_p1, 1);
6402 83943 : {
6403 83943 : tree _q30_pops[1];
6404 83943 : if (tree_nop_convert (_q30, _q30_pops))
6405 : {
6406 61 : tree _q40 = _q30_pops[0];
6407 61 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6408 : {
6409 0 : {
6410 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6411 0 : tree res = generic_simplify_107 (loc, type, _p0, _p1, captures);
6412 0 : if (res) return res;
6413 : }
6414 : }
6415 : }
6416 : }
6417 83943 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6418 : {
6419 321 : {
6420 321 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6421 321 : tree res = generic_simplify_107 (loc, type, _p0, _p1, captures);
6422 321 : if (res) return res;
6423 : }
6424 : }
6425 : break;
6426 : }
6427 23153955 : default:;
6428 : }
6429 23153955 : {
6430 23153955 : tree _p1_pops[1];
6431 23153955 : if (tree_nop_convert (_p1, _p1_pops))
6432 : {
6433 6981984 : tree _q30 = _p1_pops[0];
6434 6981984 : switch (TREE_CODE (_q30))
6435 : {
6436 679392 : case PLUS_EXPR:
6437 679392 : {
6438 679392 : tree _q40 = TREE_OPERAND (_q30, 0);
6439 679392 : tree _q41 = TREE_OPERAND (_q30, 1);
6440 679392 : {
6441 679392 : tree _q40_pops[1];
6442 679392 : if (tree_nop_convert (_q40, _q40_pops))
6443 : {
6444 59654 : tree _q50 = _q40_pops[0];
6445 59654 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6446 : {
6447 157 : {
6448 157 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6449 157 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6450 157 : if (res) return res;
6451 : }
6452 : }
6453 : }
6454 : }
6455 679235 : {
6456 679235 : tree _q41_pops[1];
6457 679235 : if (tree_nop_convert (_q41, _q41_pops))
6458 : {
6459 20305 : tree _q60 = _q41_pops[0];
6460 20305 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
6461 : {
6462 0 : {
6463 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6464 0 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6465 0 : if (res) return res;
6466 : }
6467 : }
6468 : }
6469 : }
6470 679235 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6471 : {
6472 7 : {
6473 7 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6474 7 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6475 7 : if (res) return res;
6476 : }
6477 : }
6478 679228 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
6479 : {
6480 0 : {
6481 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6482 0 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
6483 0 : if (res) return res;
6484 : }
6485 : }
6486 : break;
6487 : }
6488 7627 : case MINUS_EXPR:
6489 7627 : {
6490 7627 : tree _q40 = TREE_OPERAND (_q30, 0);
6491 7627 : tree _q41 = TREE_OPERAND (_q30, 1);
6492 7627 : {
6493 7627 : tree _q40_pops[1];
6494 7627 : if (tree_nop_convert (_q40, _q40_pops))
6495 : {
6496 6814 : tree _q50 = _q40_pops[0];
6497 6814 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6498 : {
6499 0 : {
6500 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6501 0 : tree res = generic_simplify_107 (loc, type, _p0, _p1, captures);
6502 0 : if (res) return res;
6503 : }
6504 : }
6505 : }
6506 : }
6507 7627 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6508 : {
6509 2 : {
6510 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6511 2 : tree res = generic_simplify_107 (loc, type, _p0, _p1, captures);
6512 2 : if (res) return res;
6513 : }
6514 : }
6515 : break;
6516 : }
6517 : default:;
6518 : }
6519 : }
6520 : }
6521 23153789 : switch (TREE_CODE (_p0))
6522 : {
6523 1357551 : case PLUS_EXPR:
6524 1357551 : {
6525 1357551 : tree _q20 = TREE_OPERAND (_p0, 0);
6526 1357551 : tree _q21 = TREE_OPERAND (_p0, 1);
6527 1357551 : switch (TREE_CODE (_p1))
6528 : {
6529 112 : case MINUS_EXPR:
6530 112 : {
6531 112 : tree _q50 = TREE_OPERAND (_p1, 0);
6532 112 : tree _q51 = TREE_OPERAND (_p1, 1);
6533 112 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6534 : {
6535 0 : {
6536 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6537 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures);
6538 0 : if (res) return res;
6539 : }
6540 : }
6541 112 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6542 : {
6543 0 : {
6544 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
6545 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures);
6546 0 : if (res) return res;
6547 : }
6548 : }
6549 : break;
6550 : }
6551 1357551 : default:;
6552 : }
6553 1357551 : if (CONSTANT_CLASS_P (_q21))
6554 : {
6555 568409 : if (CONSTANT_CLASS_P (_p1))
6556 : {
6557 13 : {
6558 13 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6559 13 : tree res = generic_simplify_66 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
6560 13 : if (res) return res;
6561 : }
6562 : }
6563 : }
6564 : break;
6565 : }
6566 986517 : case MINUS_EXPR:
6567 986517 : {
6568 986517 : tree _q20 = TREE_OPERAND (_p0, 0);
6569 986517 : tree _q21 = TREE_OPERAND (_p0, 1);
6570 986517 : if (CONSTANT_CLASS_P (_q21))
6571 : {
6572 97467 : if (CONSTANT_CLASS_P (_p1))
6573 : {
6574 12 : {
6575 12 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6576 12 : tree res = generic_simplify_66 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
6577 12 : if (res) return res;
6578 : }
6579 : }
6580 : }
6581 986517 : if (CONSTANT_CLASS_P (_q20))
6582 : {
6583 2956 : if (CONSTANT_CLASS_P (_p1))
6584 : {
6585 1 : {
6586 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6587 1 : tree res = generic_simplify_67 (loc, type, _p0, _p1, captures, MINUS_EXPR);
6588 1 : if (res) return res;
6589 : }
6590 : }
6591 : }
6592 : break;
6593 : }
6594 5084764 : CASE_CONVERT:
6595 5084764 : {
6596 5084764 : tree _q20 = TREE_OPERAND (_p0, 0);
6597 5084764 : switch (TREE_CODE (_p1))
6598 : {
6599 4228804 : CASE_CONVERT:
6600 4228804 : {
6601 4228804 : tree _q40 = TREE_OPERAND (_p1, 0);
6602 4228804 : {
6603 4228804 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6604 4228804 : tree res = generic_simplify_71 (loc, type, _p0, _p1, captures, MINUS_EXPR);
6605 4228804 : if (res) return res;
6606 : }
6607 4218294 : break;
6608 : }
6609 5074254 : default:;
6610 : }
6611 5074254 : switch (TREE_CODE (_q20))
6612 : {
6613 272 : case NEGATE_EXPR:
6614 272 : {
6615 272 : tree _q30 = TREE_OPERAND (_q20, 0);
6616 272 : if (integer_each_onep (_p1))
6617 : {
6618 0 : {
6619 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
6620 0 : tree res = generic_simplify_110 (loc, type, _p0, _p1, captures);
6621 0 : if (res) return res;
6622 : }
6623 : }
6624 : break;
6625 : }
6626 407391 : case PLUS_EXPR:
6627 407391 : {
6628 407391 : tree _q30 = TREE_OPERAND (_q20, 0);
6629 407391 : tree _q31 = TREE_OPERAND (_q20, 1);
6630 407391 : switch (TREE_CODE (_p1))
6631 : {
6632 389938 : CASE_CONVERT:
6633 389938 : {
6634 389938 : tree _q60 = TREE_OPERAND (_p1, 0);
6635 389938 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
6636 : {
6637 6635 : {
6638 6635 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
6639 6635 : tree res = generic_simplify_111 (loc, type, _p0, _p1, captures);
6640 6635 : if (res) return res;
6641 : }
6642 : }
6643 383423 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
6644 : {
6645 21 : {
6646 21 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
6647 21 : tree res = generic_simplify_111 (loc, type, _p0, _p1, captures);
6648 21 : if (res) return res;
6649 : }
6650 : }
6651 : break;
6652 : }
6653 400855 : default:;
6654 : }
6655 400855 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q30, 0))
6656 : {
6657 4247 : {
6658 4247 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
6659 4247 : tree res = generic_simplify_111 (loc, type, _p0, _p1, captures);
6660 4247 : if (res) return res;
6661 : }
6662 : }
6663 396608 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
6664 : {
6665 1344 : {
6666 1344 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
6667 1344 : tree res = generic_simplify_111 (loc, type, _p0, _p1, captures);
6668 1344 : if (res) return res;
6669 : }
6670 : }
6671 : break;
6672 : }
6673 80833 : case POINTER_PLUS_EXPR:
6674 80833 : {
6675 80833 : tree _q30 = TREE_OPERAND (_q20, 0);
6676 80833 : tree _q31 = TREE_OPERAND (_q20, 1);
6677 80833 : switch (TREE_CODE (_p1))
6678 : {
6679 79763 : CASE_CONVERT:
6680 79763 : {
6681 79763 : tree _q60 = TREE_OPERAND (_p1, 0);
6682 79763 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
6683 : {
6684 0 : {
6685 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
6686 0 : if (!TYPE_SATURATING (type)
6687 : )
6688 : {
6689 0 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
6690 0 : && !FIXED_POINT_TYPE_P (type)
6691 : )
6692 : {
6693 0 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
6694 0 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
6695 0 : && TREE_CODE (captures[1]) == INTEGER_CST
6696 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
6697 : )
6698 : {
6699 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1343;
6700 0 : {
6701 0 : tree res_op0;
6702 0 : res_op0 = captures[1];
6703 0 : tree _r;
6704 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
6705 0 : if (TREE_SIDE_EFFECTS (captures[2]))
6706 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6707 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 971, __FILE__, __LINE__, true);
6708 : return _r;
6709 : }
6710 0 : next_after_fail1343:;
6711 : }
6712 : }
6713 : }
6714 : }
6715 : }
6716 : break;
6717 : }
6718 : default:;
6719 : }
6720 : break;
6721 : }
6722 5062127 : default:;
6723 : }
6724 5062127 : switch (TREE_CODE (_p1))
6725 : {
6726 4206295 : CASE_CONVERT:
6727 4206295 : {
6728 4206295 : tree _q40 = TREE_OPERAND (_p1, 0);
6729 4206295 : switch (TREE_CODE (_q40))
6730 : {
6731 498674 : case PLUS_EXPR:
6732 498674 : {
6733 498674 : tree _q50 = TREE_OPERAND (_q40, 0);
6734 498674 : tree _q51 = TREE_OPERAND (_q40, 1);
6735 498674 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
6736 : {
6737 2131 : {
6738 2131 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
6739 2131 : tree res = generic_simplify_112 (loc, type, _p0, _p1, captures);
6740 2131 : if (res) return res;
6741 : }
6742 : }
6743 496616 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
6744 : {
6745 18 : {
6746 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q51, _q50, _q20 };
6747 18 : tree res = generic_simplify_112 (loc, type, _p0, _p1, captures);
6748 18 : if (res) return res;
6749 : }
6750 : }
6751 : break;
6752 : }
6753 : default:;
6754 : }
6755 : break;
6756 : }
6757 : default:;
6758 : }
6759 : break;
6760 : }
6761 145428 : case NEGATE_EXPR:
6762 145428 : {
6763 145428 : tree _q20 = TREE_OPERAND (_p0, 0);
6764 145428 : if (integer_each_onep (_p1))
6765 : {
6766 41 : {
6767 41 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6768 41 : tree res = generic_simplify_110 (loc, type, _p0, _p1, captures);
6769 41 : if (res) return res;
6770 : }
6771 : }
6772 : break;
6773 : }
6774 23129035 : default:;
6775 : }
6776 23129035 : {
6777 23129035 : tree _p0_pops[1];
6778 23129035 : if (tree_nop_convert (_p0, _p0_pops))
6779 : {
6780 4510833 : tree _q20 = _p0_pops[0];
6781 4510833 : switch (TREE_CODE (_q20))
6782 : {
6783 341301 : case PLUS_EXPR:
6784 341301 : {
6785 341301 : tree _q30 = TREE_OPERAND (_q20, 0);
6786 341301 : tree _q31 = TREE_OPERAND (_q20, 1);
6787 341301 : if (CONSTANT_CLASS_P (_q31))
6788 : {
6789 334399 : if (CONSTANT_CLASS_P (_p1))
6790 : {
6791 27 : {
6792 27 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6793 27 : tree res = generic_simplify_66 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
6794 27 : if (res) return res;
6795 : }
6796 : }
6797 : }
6798 : break;
6799 : }
6800 720 : case MINUS_EXPR:
6801 720 : {
6802 720 : tree _q30 = TREE_OPERAND (_q20, 0);
6803 720 : tree _q31 = TREE_OPERAND (_q20, 1);
6804 720 : if (CONSTANT_CLASS_P (_q31))
6805 : {
6806 0 : if (CONSTANT_CLASS_P (_p1))
6807 : {
6808 0 : {
6809 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6810 0 : tree res = generic_simplify_66 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
6811 0 : if (res) return res;
6812 : }
6813 : }
6814 : }
6815 720 : if (CONSTANT_CLASS_P (_q30))
6816 : {
6817 34 : if (CONSTANT_CLASS_P (_p1))
6818 : {
6819 0 : {
6820 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6821 0 : tree res = generic_simplify_67 (loc, type, _p0, _p1, captures, MINUS_EXPR);
6822 0 : if (res) return res;
6823 : }
6824 : }
6825 : }
6826 : break;
6827 : }
6828 : default:;
6829 : }
6830 : }
6831 : }
6832 23129008 : if (CONSTANT_CLASS_P (_p0))
6833 : {
6834 5726083 : switch (TREE_CODE (_p1))
6835 : {
6836 823 : case MINUS_EXPR:
6837 823 : {
6838 823 : tree _q30 = TREE_OPERAND (_p1, 0);
6839 823 : tree _q31 = TREE_OPERAND (_p1, 1);
6840 823 : if (CONSTANT_CLASS_P (_q30))
6841 : {
6842 639 : {
6843 639 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
6844 639 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures);
6845 639 : if (res) return res;
6846 : }
6847 : }
6848 : break;
6849 : }
6850 5725453 : default:;
6851 : }
6852 5725453 : {
6853 5725453 : tree _p1_pops[1];
6854 5725453 : if (tree_nop_convert (_p1, _p1_pops))
6855 : {
6856 1917790 : tree _q30 = _p1_pops[0];
6857 1917790 : switch (TREE_CODE (_q30))
6858 : {
6859 7306 : case MINUS_EXPR:
6860 7306 : {
6861 7306 : tree _q40 = TREE_OPERAND (_q30, 0);
6862 7306 : tree _q41 = TREE_OPERAND (_q30, 1);
6863 7306 : if (CONSTANT_CLASS_P (_q40))
6864 : {
6865 25 : {
6866 25 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
6867 25 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures);
6868 25 : if (res) return res;
6869 : }
6870 : }
6871 : break;
6872 : }
6873 : default:;
6874 : }
6875 : }
6876 : }
6877 : }
6878 23128353 : if (integer_all_onesp (_p0))
6879 : {
6880 1254868 : {
6881 1254868 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
6882 1254868 : if (!TYPE_SATURATING (type)
6883 : )
6884 : {
6885 1254868 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
6886 2509736 : && !FIXED_POINT_TYPE_P (type)
6887 : )
6888 : {
6889 1254868 : if (TREE_CODE (type) != COMPLEX_TYPE
6890 : )
6891 : {
6892 1254866 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1344;
6893 1254866 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1344;
6894 1254866 : {
6895 1254866 : tree res_op0;
6896 1254866 : res_op0 = captures[0];
6897 1254866 : tree _r;
6898 1254866 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
6899 1254866 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 972, __FILE__, __LINE__, true);
6900 33788763 : return _r;
6901 : }
6902 21873487 : next_after_fail1344:;
6903 : }
6904 : }
6905 : }
6906 : }
6907 : }
6908 21873487 : switch (TREE_CODE (_p1))
6909 : {
6910 7273249 : CASE_CONVERT:
6911 7273249 : {
6912 7273249 : tree _q30 = TREE_OPERAND (_p1, 0);
6913 7273249 : switch (TREE_CODE (_q30))
6914 : {
6915 691514 : case PLUS_EXPR:
6916 691514 : {
6917 691514 : tree _q40 = TREE_OPERAND (_q30, 0);
6918 691514 : tree _q41 = TREE_OPERAND (_q30, 1);
6919 691514 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
6920 : {
6921 24 : {
6922 24 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _p0 };
6923 24 : tree res = generic_simplify_112 (loc, type, _p0, _p1, captures);
6924 24 : if (res) return res;
6925 : }
6926 : }
6927 691490 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
6928 : {
6929 8605 : {
6930 8605 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _p0 };
6931 8605 : tree res = generic_simplify_112 (loc, type, _p0, _p1, captures);
6932 8605 : if (res) return res;
6933 : }
6934 : }
6935 : break;
6936 : }
6937 : default:;
6938 : }
6939 : break;
6940 : }
6941 21865055 : default:;
6942 : }
6943 21865055 : switch (TREE_CODE (_p0))
6944 : {
6945 5060000 : CASE_CONVERT:
6946 5060000 : {
6947 5060000 : tree _q20 = TREE_OPERAND (_p0, 0);
6948 5060000 : switch (TREE_CODE (_p1))
6949 : {
6950 4204195 : CASE_CONVERT:
6951 4204195 : {
6952 4204195 : tree _q40 = TREE_OPERAND (_p1, 0);
6953 4204195 : switch (TREE_CODE (_q40))
6954 : {
6955 383561 : case POINTER_PLUS_EXPR:
6956 383561 : {
6957 383561 : tree _q50 = TREE_OPERAND (_q40, 0);
6958 383561 : tree _q51 = TREE_OPERAND (_q40, 1);
6959 383561 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
6960 : {
6961 0 : {
6962 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
6963 0 : if (!TYPE_SATURATING (type)
6964 : )
6965 : {
6966 0 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
6967 0 : && !FIXED_POINT_TYPE_P (type)
6968 : )
6969 : {
6970 0 : if (INTEGRAL_TYPE_P (type)
6971 0 : && TYPE_OVERFLOW_UNDEFINED (type)
6972 0 : && TREE_CODE (captures[1]) != INTEGER_CST
6973 0 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
6974 : )
6975 : {
6976 0 : {
6977 0 : tree utype = unsigned_type_for (type);
6978 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1345;
6979 0 : {
6980 0 : tree res_op0;
6981 0 : {
6982 0 : tree _o1[1], _r1;
6983 0 : {
6984 0 : tree _o2[1], _r2;
6985 0 : _o2[0] = captures[1];
6986 0 : if (TREE_TYPE (_o2[0]) != utype)
6987 : {
6988 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
6989 : }
6990 : else
6991 : _r2 = _o2[0];
6992 0 : _o1[0] = _r2;
6993 : }
6994 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
6995 0 : res_op0 = _r1;
6996 : }
6997 0 : tree _r;
6998 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
6999 0 : if (TREE_SIDE_EFFECTS (captures[2]))
7000 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7001 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 973, __FILE__, __LINE__, true);
7002 : return _r;
7003 : }
7004 0 : next_after_fail1345:;
7005 : }
7006 : }
7007 : else
7008 : {
7009 0 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7010 0 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7011 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7012 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
7013 : )
7014 : {
7015 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1346;
7016 0 : {
7017 0 : tree res_op0;
7018 0 : {
7019 0 : tree _o1[1], _r1;
7020 0 : _o1[0] = captures[1];
7021 0 : if (TREE_TYPE (_o1[0]) != type)
7022 : {
7023 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7024 : }
7025 : else
7026 : _r1 = _o1[0];
7027 0 : res_op0 = _r1;
7028 : }
7029 0 : tree _r;
7030 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
7031 0 : if (TREE_SIDE_EFFECTS (captures[2]))
7032 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7033 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 974, __FILE__, __LINE__, true);
7034 : return _r;
7035 : }
7036 0 : next_after_fail1346:;
7037 : }
7038 : }
7039 : }
7040 : }
7041 : }
7042 : }
7043 : break;
7044 : }
7045 : default:;
7046 : }
7047 : break;
7048 : }
7049 5060000 : default:;
7050 : }
7051 5060000 : switch (TREE_CODE (_q20))
7052 : {
7053 395237 : case PLUS_EXPR:
7054 395237 : {
7055 395237 : tree _q30 = TREE_OPERAND (_q20, 0);
7056 395237 : tree _q31 = TREE_OPERAND (_q20, 1);
7057 395237 : switch (TREE_CODE (_p1))
7058 : {
7059 377939 : CASE_CONVERT:
7060 377939 : {
7061 377939 : tree _q60 = TREE_OPERAND (_p1, 0);
7062 377939 : switch (TREE_CODE (_q60))
7063 : {
7064 206640 : case PLUS_EXPR:
7065 206640 : {
7066 206640 : tree _q70 = TREE_OPERAND (_q60, 0);
7067 206640 : tree _q71 = TREE_OPERAND (_q60, 1);
7068 206640 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
7069 : {
7070 5432 : {
7071 5432 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
7072 5432 : tree res = generic_simplify_113 (loc, type, _p0, _p1, captures);
7073 5432 : if (res) return res;
7074 : }
7075 : }
7076 201208 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q30, 0))
7077 : {
7078 73 : {
7079 73 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q70, _q30 };
7080 73 : tree res = generic_simplify_113 (loc, type, _p0, _p1, captures);
7081 73 : if (res) return res;
7082 : }
7083 : }
7084 201135 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q31, 0))
7085 : {
7086 90 : {
7087 90 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q71, _q31 };
7088 90 : tree res = generic_simplify_113 (loc, type, _p0, _p1, captures);
7089 90 : if (res) return res;
7090 : }
7091 : }
7092 201045 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q31, 0))
7093 : {
7094 153856 : {
7095 153856 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q70, _q31 };
7096 153856 : tree res = generic_simplify_113 (loc, type, _p0, _p1, captures);
7097 153856 : if (res) return res;
7098 : }
7099 : }
7100 : break;
7101 : }
7102 : default:;
7103 : }
7104 : break;
7105 : }
7106 : default:;
7107 : }
7108 : break;
7109 : }
7110 80833 : case POINTER_PLUS_EXPR:
7111 80833 : {
7112 80833 : tree _q30 = TREE_OPERAND (_q20, 0);
7113 80833 : tree _q31 = TREE_OPERAND (_q20, 1);
7114 80833 : switch (TREE_CODE (_p1))
7115 : {
7116 79763 : CASE_CONVERT:
7117 79763 : {
7118 79763 : tree _q60 = TREE_OPERAND (_p1, 0);
7119 79763 : switch (TREE_CODE (_q60))
7120 : {
7121 43632 : case POINTER_PLUS_EXPR:
7122 43632 : {
7123 43632 : tree _q70 = TREE_OPERAND (_q60, 0);
7124 43632 : tree _q71 = TREE_OPERAND (_q60, 1);
7125 43632 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
7126 : {
7127 87 : {
7128 87 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
7129 87 : if (!TYPE_SATURATING (type)
7130 : )
7131 : {
7132 87 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7133 174 : && !FIXED_POINT_TYPE_P (type)
7134 : )
7135 : {
7136 87 : if (INTEGRAL_TYPE_P (type)
7137 87 : && TYPE_OVERFLOW_UNDEFINED (type)
7138 87 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7139 : )
7140 : {
7141 0 : {
7142 0 : tree utype = unsigned_type_for (type);
7143 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1347;
7144 0 : {
7145 0 : tree res_op0;
7146 0 : {
7147 0 : tree _o1[2], _r1;
7148 0 : {
7149 0 : tree _o2[1], _r2;
7150 0 : _o2[0] = captures[1];
7151 0 : if (TREE_TYPE (_o2[0]) != utype)
7152 : {
7153 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7154 : }
7155 : else
7156 : _r2 = _o2[0];
7157 0 : _o1[0] = _r2;
7158 : }
7159 0 : {
7160 0 : tree _o2[1], _r2;
7161 0 : _o2[0] = captures[2];
7162 0 : if (TREE_TYPE (_o2[0]) != utype)
7163 : {
7164 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7165 : }
7166 : else
7167 : _r2 = _o2[0];
7168 0 : _o1[1] = _r2;
7169 : }
7170 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7171 0 : res_op0 = _r1;
7172 : }
7173 0 : tree _r;
7174 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7175 0 : if (TREE_SIDE_EFFECTS (captures[3]))
7176 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
7177 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 975, __FILE__, __LINE__, true);
7178 : return _r;
7179 : }
7180 0 : next_after_fail1347:;
7181 : }
7182 : }
7183 : else
7184 : {
7185 87 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7186 87 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7187 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7188 0 : && tree_int_cst_sign_bit (captures[1]) == 0
7189 0 : && TREE_CODE (captures[2]) == INTEGER_CST
7190 0 : && tree_int_cst_sign_bit (captures[2]) == 0)
7191 : )
7192 : {
7193 87 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1348;
7194 87 : {
7195 87 : tree res_op0;
7196 87 : {
7197 87 : tree _o1[1], _r1;
7198 87 : _o1[0] = captures[1];
7199 87 : if (TREE_TYPE (_o1[0]) != type)
7200 : {
7201 47 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7202 : }
7203 : else
7204 : _r1 = _o1[0];
7205 87 : res_op0 = _r1;
7206 : }
7207 87 : tree res_op1;
7208 87 : {
7209 87 : tree _o1[1], _r1;
7210 87 : _o1[0] = captures[2];
7211 87 : if (TREE_TYPE (_o1[0]) != type)
7212 : {
7213 47 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7214 : }
7215 : else
7216 : _r1 = _o1[0];
7217 87 : res_op1 = _r1;
7218 : }
7219 87 : tree _r;
7220 87 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
7221 87 : if (TREE_SIDE_EFFECTS (captures[3]))
7222 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
7223 87 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 976, __FILE__, __LINE__, true);
7224 : return _r;
7225 : }
7226 0 : next_after_fail1348:;
7227 : }
7228 : }
7229 : }
7230 : }
7231 : }
7232 : }
7233 : break;
7234 : }
7235 : default:;
7236 : }
7237 : break;
7238 : }
7239 : default:;
7240 : }
7241 : break;
7242 : }
7243 : default:;
7244 : }
7245 : break;
7246 : }
7247 1535179 : case MULT_EXPR:
7248 1535179 : {
7249 1535179 : tree _q20 = TREE_OPERAND (_p0, 0);
7250 1535179 : tree _q21 = TREE_OPERAND (_p0, 1);
7251 1535179 : switch (TREE_CODE (_p1))
7252 : {
7253 720976 : case MULT_EXPR:
7254 720976 : {
7255 720976 : tree _q50 = TREE_OPERAND (_p1, 0);
7256 720976 : tree _q51 = TREE_OPERAND (_p1, 1);
7257 720976 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7258 : {
7259 3906 : {
7260 3906 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
7261 3906 : tree res = generic_simplify_74 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7262 3906 : if (res) return res;
7263 : }
7264 : }
7265 719737 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7266 : {
7267 17325 : {
7268 17325 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
7269 17325 : tree res = generic_simplify_74 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7270 17325 : if (res) return res;
7271 : }
7272 : }
7273 702412 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7274 : {
7275 35422 : {
7276 35422 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
7277 35422 : tree res = generic_simplify_74 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7278 35422 : if (res) return res;
7279 : }
7280 : }
7281 667065 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7282 : {
7283 220461 : {
7284 220461 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
7285 220461 : tree res = generic_simplify_74 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7286 220461 : if (res) return res;
7287 : }
7288 : }
7289 : break;
7290 : }
7291 : default:;
7292 : }
7293 : break;
7294 : }
7295 21453195 : default:;
7296 : }
7297 21453195 : switch (TREE_CODE (_p1))
7298 : {
7299 1779599 : case MULT_EXPR:
7300 1779599 : {
7301 1779599 : tree _q30 = TREE_OPERAND (_p1, 0);
7302 1779599 : tree _q31 = TREE_OPERAND (_p1, 1);
7303 1779599 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7304 : {
7305 3899 : {
7306 3899 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
7307 3899 : tree res = generic_simplify_75 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7308 3899 : if (res) return res;
7309 : }
7310 : }
7311 1775744 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
7312 : {
7313 2007 : {
7314 2007 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
7315 2007 : tree res = generic_simplify_75 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7316 2007 : if (res) return res;
7317 : }
7318 : }
7319 : break;
7320 : }
7321 21447432 : default:;
7322 : }
7323 21447432 : switch (TREE_CODE (_p0))
7324 : {
7325 1266187 : case MULT_EXPR:
7326 1266187 : {
7327 1266187 : tree _q20 = TREE_OPERAND (_p0, 0);
7328 1266187 : tree _q21 = TREE_OPERAND (_p0, 1);
7329 1266187 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7330 : {
7331 66086 : {
7332 66086 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7333 66086 : tree res = generic_simplify_76 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7334 66086 : if (res) return res;
7335 : }
7336 : }
7337 1200393 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
7338 : {
7339 634 : {
7340 634 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
7341 634 : tree res = generic_simplify_76 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7342 634 : if (res) return res;
7343 : }
7344 : }
7345 : break;
7346 : }
7347 21381537 : default:;
7348 : }
7349 21381537 : switch (TREE_CODE (_p1))
7350 : {
7351 1773836 : case MULT_EXPR:
7352 1773836 : {
7353 1773836 : tree _q30 = TREE_OPERAND (_p1, 0);
7354 1773836 : tree _q31 = TREE_OPERAND (_p1, 1);
7355 1773836 : switch (TREE_CODE (_q30))
7356 : {
7357 78979 : case MINUS_EXPR:
7358 78979 : {
7359 78979 : tree _q40 = TREE_OPERAND (_q30, 0);
7360 78979 : tree _q41 = TREE_OPERAND (_q30, 1);
7361 78979 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7362 : {
7363 19 : if (tree_zero_one_valued_p (_q31))
7364 : {
7365 0 : {
7366 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
7367 0 : tree res = generic_simplify_114 (loc, type, _p0, _p1, captures);
7368 0 : if (res) return res;
7369 : }
7370 : }
7371 : }
7372 : break;
7373 : }
7374 1773836 : default:;
7375 : }
7376 1773836 : if (tree_zero_one_valued_p (_q30))
7377 : {
7378 1230 : switch (TREE_CODE (_q31))
7379 : {
7380 9 : case MINUS_EXPR:
7381 9 : {
7382 9 : tree _q50 = TREE_OPERAND (_q31, 0);
7383 9 : tree _q51 = TREE_OPERAND (_q31, 1);
7384 9 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7385 : {
7386 9 : {
7387 9 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q51, _q30 };
7388 9 : tree res = generic_simplify_114 (loc, type, _p0, _p1, captures);
7389 9 : if (res) return res;
7390 : }
7391 : }
7392 : break;
7393 : }
7394 : default:;
7395 : }
7396 : }
7397 : break;
7398 : }
7399 21381535 : default:;
7400 : }
7401 21381535 : switch (TREE_CODE (_p0))
7402 : {
7403 92 : case BIT_AND_EXPR:
7404 92 : {
7405 92 : tree _q20 = TREE_OPERAND (_p0, 0);
7406 92 : tree _q21 = TREE_OPERAND (_p0, 1);
7407 92 : switch (TREE_CODE (_q21))
7408 : {
7409 67 : case INTEGER_CST:
7410 67 : {
7411 67 : switch (TREE_CODE (_p1))
7412 : {
7413 28 : case BIT_AND_EXPR:
7414 28 : {
7415 28 : tree _q50 = TREE_OPERAND (_p1, 0);
7416 28 : tree _q51 = TREE_OPERAND (_p1, 1);
7417 28 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7418 : {
7419 6 : if (integer_pow2p (_q51))
7420 : {
7421 6 : {
7422 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
7423 12 : if (INTEGRAL_TYPE_P (type)
7424 12 : && TYPE_PRECISION (type) <= MAX_FIXED_MODE_SIZE
7425 12 : && wi::to_wide (captures[1]) + 1 == wi::to_wide (captures[2])
7426 : )
7427 : {
7428 4 : {
7429 4 : int width = wi::exact_log2 (wi::to_wide (captures[2])) + 1;
7430 4 : tree ntype = NULL_TREE;
7431 4 : if (width > 0 && width < TYPE_PRECISION (type))
7432 4 : ntype = build_nonstandard_integer_type (width, SIGNED);
7433 4 : if (ntype && type_has_mode_precision_p (ntype)
7434 : )
7435 : {
7436 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1349;
7437 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1349;
7438 4 : {
7439 4 : tree res_op0;
7440 4 : {
7441 4 : tree _o1[1], _r1;
7442 4 : _o1[0] = captures[0];
7443 4 : if (TREE_TYPE (_o1[0]) != ntype)
7444 : {
7445 4 : _r1 = fold_build1_loc (loc, NOP_EXPR, ntype, _o1[0]);
7446 : }
7447 : else
7448 : _r1 = _o1[0];
7449 4 : res_op0 = _r1;
7450 : }
7451 4 : tree _r;
7452 4 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7453 4 : if (TREE_SIDE_EFFECTS (captures[1]))
7454 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
7455 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 977, __FILE__, __LINE__, true);
7456 : return _r;
7457 : }
7458 21381531 : next_after_fail1349:;
7459 : }
7460 : }
7461 : }
7462 : }
7463 : }
7464 : }
7465 : break;
7466 : }
7467 : default:;
7468 : }
7469 : break;
7470 : }
7471 : default:;
7472 : }
7473 : break;
7474 : }
7475 0 : case VEC_COND_EXPR:
7476 0 : {
7477 0 : tree _q20 = TREE_OPERAND (_p0, 0);
7478 0 : tree _q21 = TREE_OPERAND (_p0, 1);
7479 0 : tree _q22 = TREE_OPERAND (_p0, 2);
7480 0 : switch (TREE_CODE (_p1))
7481 : {
7482 0 : case VEC_COND_EXPR:
7483 0 : {
7484 0 : tree _q60 = TREE_OPERAND (_p1, 0);
7485 0 : tree _q61 = TREE_OPERAND (_p1, 1);
7486 0 : tree _q62 = TREE_OPERAND (_p1, 2);
7487 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
7488 : {
7489 0 : {
7490 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
7491 0 : if (VECTOR_TYPE_P (type)
7492 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
7493 : || types_match (type, TREE_TYPE (captures[2]))
7494 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
7495 : || (optimize_vectors_before_lowering_p ()
7496 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
7497 : )
7498 : {
7499 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1350;
7500 0 : {
7501 0 : tree res_op0;
7502 0 : res_op0 = captures[1];
7503 0 : tree res_op1;
7504 0 : {
7505 0 : tree _o1[2], _r1;
7506 0 : _o1[0] = captures[2];
7507 0 : _o1[1] = captures[5];
7508 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7509 0 : if (EXPR_P (_r1))
7510 0 : goto next_after_fail1350;
7511 0 : res_op1 = _r1;
7512 : }
7513 0 : tree res_op2;
7514 0 : {
7515 0 : tree _o1[2], _r1;
7516 0 : _o1[0] = captures[3];
7517 0 : _o1[1] = captures[6];
7518 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7519 0 : if (EXPR_P (_r1))
7520 0 : goto next_after_fail1350;
7521 0 : res_op2 = _r1;
7522 : }
7523 0 : tree _r;
7524 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7525 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
7526 : return _r;
7527 : }
7528 0 : next_after_fail1350:;
7529 : }
7530 : }
7531 : }
7532 : break;
7533 : }
7534 0 : default:;
7535 : }
7536 0 : {
7537 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
7538 0 : if (VECTOR_TYPE_P (type)
7539 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
7540 : || types_match (type, TREE_TYPE (captures[2]))
7541 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
7542 : || (optimize_vectors_before_lowering_p ()
7543 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
7544 : )
7545 : {
7546 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1351;
7547 0 : {
7548 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1351;
7549 0 : tree res_op0;
7550 0 : res_op0 = captures[1];
7551 0 : tree res_op1;
7552 0 : {
7553 0 : tree _o1[2], _r1;
7554 0 : _o1[0] = captures[2];
7555 0 : _o1[1] = unshare_expr (captures[4]);
7556 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7557 0 : if (EXPR_P (_r1))
7558 0 : goto next_after_fail1351;
7559 0 : res_op1 = _r1;
7560 : }
7561 0 : tree res_op2;
7562 0 : {
7563 0 : tree _o1[2], _r1;
7564 0 : _o1[0] = captures[3];
7565 0 : _o1[1] = captures[4];
7566 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7567 0 : if (EXPR_P (_r1))
7568 0 : goto next_after_fail1351;
7569 0 : res_op2 = _r1;
7570 : }
7571 0 : tree _r;
7572 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7573 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
7574 : return _r;
7575 : }
7576 21381531 : next_after_fail1351:;
7577 : }
7578 : }
7579 : break;
7580 : }
7581 21381531 : default:;
7582 : }
7583 21381531 : if (integer_zerop (_p0))
7584 : {
7585 306694 : {
7586 306694 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
7587 306694 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1352;
7588 306694 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1352;
7589 306694 : {
7590 306694 : tree res_op0;
7591 306694 : res_op0 = captures[0];
7592 306694 : tree _r;
7593 306694 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
7594 306694 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 978, __FILE__, __LINE__, true);
7595 33788763 : return _r;
7596 : }
7597 21074837 : next_after_fail1352:;
7598 : }
7599 : }
7600 21074837 : if (real_zerop (_p0))
7601 : {
7602 185 : {
7603 185 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
7604 185 : if (!tree_expr_maybe_nan_p (captures[1])
7605 185 : && (!HONOR_SIGNED_ZEROS (type)
7606 0 : || tree_expr_nonzero_p (captures[1])
7607 0 : || (!flag_rounding_math
7608 0 : && real_negzerop (captures[0])))
7609 : )
7610 : {
7611 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1353;
7612 14 : {
7613 14 : tree res_op0;
7614 14 : res_op0 = captures[1];
7615 14 : tree _r;
7616 14 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
7617 14 : if (TREE_SIDE_EFFECTS (captures[0]))
7618 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
7619 14 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 979, __FILE__, __LINE__, true);
7620 : return _r;
7621 : }
7622 0 : next_after_fail1353:;
7623 : }
7624 : }
7625 : }
7626 21074823 : switch (TREE_CODE (_p1))
7627 : {
7628 4 : case VEC_COND_EXPR:
7629 4 : {
7630 4 : tree _q30 = TREE_OPERAND (_p1, 0);
7631 4 : tree _q31 = TREE_OPERAND (_p1, 1);
7632 4 : tree _q32 = TREE_OPERAND (_p1, 2);
7633 4 : {
7634 4 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
7635 4 : if (VECTOR_TYPE_P (type)
7636 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
7637 : || types_match (type, TREE_TYPE (captures[3]))
7638 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
7639 : || (optimize_vectors_before_lowering_p ()
7640 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
7641 : )
7642 : {
7643 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1354;
7644 4 : {
7645 4 : if (! tree_invariant_p (captures[0])) goto next_after_fail1354;
7646 0 : tree res_op0;
7647 0 : res_op0 = captures[2];
7648 0 : tree res_op1;
7649 0 : {
7650 0 : tree _o1[2], _r1;
7651 0 : _o1[0] = unshare_expr (captures[0]);
7652 0 : _o1[1] = captures[3];
7653 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7654 0 : if (EXPR_P (_r1))
7655 0 : goto next_after_fail1354;
7656 0 : res_op1 = _r1;
7657 : }
7658 0 : tree res_op2;
7659 0 : {
7660 0 : tree _o1[2], _r1;
7661 0 : _o1[0] = captures[0];
7662 0 : _o1[1] = captures[4];
7663 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7664 0 : if (EXPR_P (_r1))
7665 0 : goto next_after_fail1354;
7666 0 : res_op2 = _r1;
7667 : }
7668 0 : tree _r;
7669 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7670 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
7671 : return _r;
7672 : }
7673 4 : next_after_fail1354:;
7674 : }
7675 : }
7676 4 : if (integer_each_onep (_q31))
7677 : {
7678 0 : if (integer_zerop (_q32))
7679 : {
7680 0 : {
7681 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
7682 0 : tree res = generic_simplify_115 (loc, type, _p0, _p1, captures);
7683 0 : if (res) return res;
7684 : }
7685 : }
7686 : }
7687 : break;
7688 : }
7689 126369 : case VIEW_CONVERT_EXPR:
7690 126369 : {
7691 126369 : tree _q30 = TREE_OPERAND (_p1, 0);
7692 126369 : switch (TREE_CODE (_q30))
7693 : {
7694 0 : case VEC_COND_EXPR:
7695 0 : {
7696 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7697 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7698 0 : tree _q42 = TREE_OPERAND (_q30, 2);
7699 0 : if (integer_each_onep (_q41))
7700 : {
7701 0 : if (integer_zerop (_q42))
7702 : {
7703 0 : {
7704 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42 };
7705 0 : tree res = generic_simplify_115 (loc, type, _p0, _p1, captures);
7706 0 : if (res) return res;
7707 : }
7708 : }
7709 : }
7710 : break;
7711 : }
7712 : default:;
7713 : }
7714 : break;
7715 : }
7716 21074823 : default:;
7717 : }
7718 21074823 : switch (TREE_CODE (_p0))
7719 : {
7720 117056 : case RDIV_EXPR:
7721 117056 : {
7722 117056 : tree _q20 = TREE_OPERAND (_p0, 0);
7723 117056 : tree _q21 = TREE_OPERAND (_p0, 1);
7724 117056 : switch (TREE_CODE (_p1))
7725 : {
7726 19585 : case RDIV_EXPR:
7727 19585 : {
7728 19585 : tree _q50 = TREE_OPERAND (_p1, 0);
7729 19585 : tree _q51 = TREE_OPERAND (_p1, 1);
7730 19585 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7731 : {
7732 19565 : {
7733 19565 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7734 19565 : tree res = generic_simplify_83 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7735 19565 : if (res) return res;
7736 : }
7737 : }
7738 : break;
7739 : }
7740 : default:;
7741 : }
7742 : break;
7743 : }
7744 1357551 : case PLUS_EXPR:
7745 1357551 : {
7746 1357551 : tree _q20 = TREE_OPERAND (_p0, 0);
7747 1357551 : tree _q21 = TREE_OPERAND (_p0, 1);
7748 1357551 : switch (TREE_CODE (_q20))
7749 : {
7750 59871 : case CALL_EXPR:
7751 59871 : switch (get_call_combined_fn (_q20))
7752 : {
7753 4 : case CFN_BUILT_IN_POPCOUNT:
7754 4 : if (call_expr_nargs (_q20) == 1)
7755 : {
7756 4 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7757 4 : switch (TREE_CODE (_q21))
7758 : {
7759 4 : case CALL_EXPR:
7760 4 : switch (get_call_combined_fn (_q21))
7761 : {
7762 4 : case CFN_BUILT_IN_POPCOUNT:
7763 4 : if (call_expr_nargs (_q21) == 1)
7764 : {
7765 4 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7766 4 : switch (TREE_CODE (_p1))
7767 : {
7768 4 : case CALL_EXPR:
7769 4 : switch (get_call_combined_fn (_p1))
7770 : {
7771 4 : case CFN_BUILT_IN_POPCOUNT:
7772 4 : if (call_expr_nargs (_p1) == 1)
7773 : {
7774 4 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7775 4 : switch (TREE_CODE (_q70))
7776 : {
7777 2 : case BIT_AND_EXPR:
7778 2 : {
7779 2 : tree _q80 = TREE_OPERAND (_q70, 0);
7780 2 : tree _q81 = TREE_OPERAND (_q70, 1);
7781 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7782 : {
7783 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7784 : {
7785 1 : {
7786 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7787 1 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
7788 1 : if (res) return res;
7789 : }
7790 : }
7791 : }
7792 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7793 : {
7794 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7795 : {
7796 1 : {
7797 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7798 1 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
7799 1 : if (res) return res;
7800 : }
7801 : }
7802 : }
7803 : break;
7804 : }
7805 2 : case BIT_IOR_EXPR:
7806 2 : {
7807 2 : tree _q80 = TREE_OPERAND (_q70, 0);
7808 2 : tree _q81 = TREE_OPERAND (_q70, 1);
7809 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7810 : {
7811 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7812 : {
7813 1 : {
7814 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7815 1 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
7816 1 : if (res) return res;
7817 : }
7818 : }
7819 : }
7820 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7821 : {
7822 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7823 : {
7824 1 : {
7825 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7826 1 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
7827 1 : if (res) return res;
7828 : }
7829 : }
7830 : }
7831 : break;
7832 : }
7833 : default:;
7834 : }
7835 : }
7836 : break;
7837 : default:;
7838 : }
7839 : break;
7840 : default:;
7841 : }
7842 : }
7843 : break;
7844 : default:;
7845 : }
7846 : break;
7847 : default:;
7848 : }
7849 : }
7850 : break;
7851 0 : case CFN_BUILT_IN_POPCOUNTLL:
7852 0 : if (call_expr_nargs (_q20) == 1)
7853 : {
7854 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7855 0 : switch (TREE_CODE (_q21))
7856 : {
7857 0 : case CALL_EXPR:
7858 0 : switch (get_call_combined_fn (_q21))
7859 : {
7860 0 : case CFN_BUILT_IN_POPCOUNTLL:
7861 0 : if (call_expr_nargs (_q21) == 1)
7862 : {
7863 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7864 0 : switch (TREE_CODE (_p1))
7865 : {
7866 0 : case CALL_EXPR:
7867 0 : switch (get_call_combined_fn (_p1))
7868 : {
7869 0 : case CFN_BUILT_IN_POPCOUNTLL:
7870 0 : if (call_expr_nargs (_p1) == 1)
7871 : {
7872 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7873 0 : switch (TREE_CODE (_q70))
7874 : {
7875 0 : case BIT_AND_EXPR:
7876 0 : {
7877 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7878 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7879 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7880 : {
7881 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7882 : {
7883 0 : {
7884 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7885 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7886 0 : if (res) return res;
7887 : }
7888 : }
7889 : }
7890 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7891 : {
7892 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7893 : {
7894 0 : {
7895 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7896 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7897 0 : if (res) return res;
7898 : }
7899 : }
7900 : }
7901 : break;
7902 : }
7903 0 : case BIT_IOR_EXPR:
7904 0 : {
7905 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7906 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7907 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7908 : {
7909 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7910 : {
7911 0 : {
7912 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7913 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7914 0 : if (res) return res;
7915 : }
7916 : }
7917 : }
7918 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7919 : {
7920 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7921 : {
7922 0 : {
7923 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7924 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7925 0 : if (res) return res;
7926 : }
7927 : }
7928 : }
7929 : break;
7930 : }
7931 : default:;
7932 : }
7933 : }
7934 : break;
7935 : default:;
7936 : }
7937 : break;
7938 : default:;
7939 : }
7940 : }
7941 : break;
7942 : default:;
7943 : }
7944 : break;
7945 : default:;
7946 : }
7947 : }
7948 : break;
7949 0 : case CFN_POPCOUNT:
7950 0 : if (call_expr_nargs (_q20) == 1)
7951 : {
7952 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7953 0 : switch (TREE_CODE (_q21))
7954 : {
7955 0 : case CALL_EXPR:
7956 0 : switch (get_call_combined_fn (_q21))
7957 : {
7958 0 : case CFN_POPCOUNT:
7959 0 : if (call_expr_nargs (_q21) == 1)
7960 : {
7961 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7962 0 : switch (TREE_CODE (_p1))
7963 : {
7964 0 : case CALL_EXPR:
7965 0 : switch (get_call_combined_fn (_p1))
7966 : {
7967 0 : case CFN_POPCOUNT:
7968 0 : if (call_expr_nargs (_p1) == 1)
7969 : {
7970 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7971 0 : switch (TREE_CODE (_q70))
7972 : {
7973 0 : case BIT_AND_EXPR:
7974 0 : {
7975 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7976 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7977 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7978 : {
7979 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7980 : {
7981 0 : {
7982 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7983 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
7984 0 : if (res) return res;
7985 : }
7986 : }
7987 : }
7988 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7989 : {
7990 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7991 : {
7992 0 : {
7993 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7994 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
7995 0 : if (res) return res;
7996 : }
7997 : }
7998 : }
7999 : break;
8000 : }
8001 0 : case BIT_IOR_EXPR:
8002 0 : {
8003 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8004 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8005 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8006 : {
8007 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8008 : {
8009 0 : {
8010 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8011 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
8012 0 : if (res) return res;
8013 : }
8014 : }
8015 : }
8016 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8017 : {
8018 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8019 : {
8020 0 : {
8021 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8022 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
8023 0 : if (res) return res;
8024 : }
8025 : }
8026 : }
8027 : break;
8028 : }
8029 : default:;
8030 : }
8031 : }
8032 : break;
8033 : default:;
8034 : }
8035 : break;
8036 : default:;
8037 : }
8038 : }
8039 : break;
8040 : default:;
8041 : }
8042 : break;
8043 : default:;
8044 : }
8045 : }
8046 : break;
8047 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8048 0 : if (call_expr_nargs (_q20) == 1)
8049 : {
8050 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8051 0 : switch (TREE_CODE (_q21))
8052 : {
8053 0 : case CALL_EXPR:
8054 0 : switch (get_call_combined_fn (_q21))
8055 : {
8056 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8057 0 : if (call_expr_nargs (_q21) == 1)
8058 : {
8059 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8060 0 : switch (TREE_CODE (_p1))
8061 : {
8062 0 : case CALL_EXPR:
8063 0 : switch (get_call_combined_fn (_p1))
8064 : {
8065 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8066 0 : if (call_expr_nargs (_p1) == 1)
8067 : {
8068 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8069 0 : switch (TREE_CODE (_q70))
8070 : {
8071 0 : case BIT_AND_EXPR:
8072 0 : {
8073 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8074 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8075 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8076 : {
8077 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8078 : {
8079 0 : {
8080 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8081 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8082 0 : if (res) return res;
8083 : }
8084 : }
8085 : }
8086 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8087 : {
8088 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8089 : {
8090 0 : {
8091 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8092 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8093 0 : if (res) return res;
8094 : }
8095 : }
8096 : }
8097 : break;
8098 : }
8099 0 : case BIT_IOR_EXPR:
8100 0 : {
8101 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8102 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8103 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8104 : {
8105 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8106 : {
8107 0 : {
8108 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8109 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8110 0 : if (res) return res;
8111 : }
8112 : }
8113 : }
8114 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8115 : {
8116 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8117 : {
8118 0 : {
8119 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8120 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8121 0 : if (res) return res;
8122 : }
8123 : }
8124 : }
8125 : break;
8126 : }
8127 : default:;
8128 : }
8129 : }
8130 : break;
8131 : default:;
8132 : }
8133 : break;
8134 : default:;
8135 : }
8136 : }
8137 : break;
8138 : default:;
8139 : }
8140 : break;
8141 : default:;
8142 : }
8143 : }
8144 : break;
8145 0 : case CFN_BUILT_IN_POPCOUNTL:
8146 0 : if (call_expr_nargs (_q20) == 1)
8147 : {
8148 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8149 0 : switch (TREE_CODE (_q21))
8150 : {
8151 0 : case CALL_EXPR:
8152 0 : switch (get_call_combined_fn (_q21))
8153 : {
8154 0 : case CFN_BUILT_IN_POPCOUNTL:
8155 0 : if (call_expr_nargs (_q21) == 1)
8156 : {
8157 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8158 0 : switch (TREE_CODE (_p1))
8159 : {
8160 0 : case CALL_EXPR:
8161 0 : switch (get_call_combined_fn (_p1))
8162 : {
8163 0 : case CFN_BUILT_IN_POPCOUNTL:
8164 0 : if (call_expr_nargs (_p1) == 1)
8165 : {
8166 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8167 0 : switch (TREE_CODE (_q70))
8168 : {
8169 0 : case BIT_AND_EXPR:
8170 0 : {
8171 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8172 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8173 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8174 : {
8175 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8176 : {
8177 0 : {
8178 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8179 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
8180 0 : if (res) return res;
8181 : }
8182 : }
8183 : }
8184 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8185 : {
8186 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8187 : {
8188 0 : {
8189 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8190 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
8191 0 : if (res) return res;
8192 : }
8193 : }
8194 : }
8195 : break;
8196 : }
8197 0 : case BIT_IOR_EXPR:
8198 0 : {
8199 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8200 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8201 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8202 : {
8203 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8204 : {
8205 0 : {
8206 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8207 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8208 0 : if (res) return res;
8209 : }
8210 : }
8211 : }
8212 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8213 : {
8214 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8215 : {
8216 0 : {
8217 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8218 0 : tree res = generic_simplify_117 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8219 0 : if (res) return res;
8220 : }
8221 : }
8222 : }
8223 : break;
8224 : }
8225 : default:;
8226 : }
8227 : }
8228 : break;
8229 : default:;
8230 : }
8231 : break;
8232 : default:;
8233 : }
8234 : }
8235 : break;
8236 : default:;
8237 : }
8238 : break;
8239 : default:;
8240 : }
8241 : }
8242 : break;
8243 : default:;
8244 : }
8245 : break;
8246 : default:;
8247 : }
8248 : break;
8249 : }
8250 0 : case VEC_PERM_EXPR:
8251 0 : {
8252 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8253 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8254 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8255 0 : switch (TREE_CODE (_q20))
8256 : {
8257 0 : case MULT_EXPR:
8258 0 : {
8259 0 : tree _q30 = TREE_OPERAND (_q20, 0);
8260 0 : tree _q31 = TREE_OPERAND (_q20, 1);
8261 0 : if (tree_vec_same_elem_p (_q31))
8262 : {
8263 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8264 : {
8265 0 : {
8266 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q22, _p1 };
8267 0 : tree res = generic_simplify_118 (loc, type, _p0, _p1, captures);
8268 0 : if (res) return res;
8269 : }
8270 : }
8271 : }
8272 0 : if (tree_vec_same_elem_p (_q30))
8273 : {
8274 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8275 : {
8276 0 : {
8277 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30, _q22, _p1 };
8278 0 : tree res = generic_simplify_118 (loc, type, _p0, _p1, captures);
8279 0 : if (res) return res;
8280 : }
8281 : }
8282 : }
8283 : break;
8284 : }
8285 : default:;
8286 : }
8287 : break;
8288 : }
8289 722785 : case CALL_EXPR:
8290 722785 : switch (get_call_combined_fn (_p0))
8291 : {
8292 18 : case CFN_BUILT_IN_LOG:
8293 18 : if (call_expr_nargs (_p0) == 1)
8294 : {
8295 18 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8296 18 : switch (TREE_CODE (_p1))
8297 : {
8298 0 : case CALL_EXPR:
8299 0 : switch (get_call_combined_fn (_p1))
8300 : {
8301 0 : case CFN_BUILT_IN_LOG:
8302 0 : if (call_expr_nargs (_p1) == 1)
8303 : {
8304 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8305 0 : {
8306 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8307 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG);
8308 0 : if (res) return res;
8309 : }
8310 : }
8311 : break;
8312 : default:;
8313 : }
8314 : break;
8315 : default:;
8316 : }
8317 : }
8318 : break;
8319 2 : case CFN_BUILT_IN_LOG2:
8320 2 : if (call_expr_nargs (_p0) == 1)
8321 : {
8322 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8323 2 : switch (TREE_CODE (_p1))
8324 : {
8325 0 : case CALL_EXPR:
8326 0 : switch (get_call_combined_fn (_p1))
8327 : {
8328 0 : case CFN_BUILT_IN_LOG2:
8329 0 : if (call_expr_nargs (_p1) == 1)
8330 : {
8331 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8332 0 : {
8333 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8334 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2);
8335 0 : if (res) return res;
8336 : }
8337 : }
8338 : break;
8339 : default:;
8340 : }
8341 : break;
8342 : default:;
8343 : }
8344 : }
8345 : break;
8346 0 : case CFN_BUILT_IN_LOGF:
8347 0 : if (call_expr_nargs (_p0) == 1)
8348 : {
8349 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8350 0 : switch (TREE_CODE (_p1))
8351 : {
8352 0 : case CALL_EXPR:
8353 0 : switch (get_call_combined_fn (_p1))
8354 : {
8355 0 : case CFN_BUILT_IN_LOGF:
8356 0 : if (call_expr_nargs (_p1) == 1)
8357 : {
8358 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8359 0 : {
8360 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8361 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF);
8362 0 : if (res) return res;
8363 : }
8364 : }
8365 : break;
8366 : default:;
8367 : }
8368 : break;
8369 : default:;
8370 : }
8371 : }
8372 : break;
8373 0 : case CFN_BUILT_IN_LOGL:
8374 0 : if (call_expr_nargs (_p0) == 1)
8375 : {
8376 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8377 0 : switch (TREE_CODE (_p1))
8378 : {
8379 0 : case CALL_EXPR:
8380 0 : switch (get_call_combined_fn (_p1))
8381 : {
8382 0 : case CFN_BUILT_IN_LOGL:
8383 0 : if (call_expr_nargs (_p1) == 1)
8384 : {
8385 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8386 0 : {
8387 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8388 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL);
8389 0 : if (res) return res;
8390 : }
8391 : }
8392 : break;
8393 : default:;
8394 : }
8395 : break;
8396 : default:;
8397 : }
8398 : }
8399 : break;
8400 0 : case CFN_BUILT_IN_LOG10F:
8401 0 : if (call_expr_nargs (_p0) == 1)
8402 : {
8403 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8404 0 : switch (TREE_CODE (_p1))
8405 : {
8406 0 : case CALL_EXPR:
8407 0 : switch (get_call_combined_fn (_p1))
8408 : {
8409 0 : case CFN_BUILT_IN_LOG10F:
8410 0 : if (call_expr_nargs (_p1) == 1)
8411 : {
8412 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8413 0 : {
8414 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8415 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F);
8416 0 : if (res) return res;
8417 : }
8418 : }
8419 : break;
8420 : default:;
8421 : }
8422 : break;
8423 : default:;
8424 : }
8425 : }
8426 : break;
8427 0 : case CFN_BUILT_IN_LOG10L:
8428 0 : if (call_expr_nargs (_p0) == 1)
8429 : {
8430 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8431 0 : switch (TREE_CODE (_p1))
8432 : {
8433 0 : case CALL_EXPR:
8434 0 : switch (get_call_combined_fn (_p1))
8435 : {
8436 0 : case CFN_BUILT_IN_LOG10L:
8437 0 : if (call_expr_nargs (_p1) == 1)
8438 : {
8439 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8440 0 : {
8441 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8442 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L);
8443 0 : if (res) return res;
8444 : }
8445 : }
8446 : break;
8447 : default:;
8448 : }
8449 : break;
8450 : default:;
8451 : }
8452 : }
8453 : break;
8454 0 : case CFN_LOG:
8455 0 : if (call_expr_nargs (_p0) == 1)
8456 : {
8457 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8458 0 : switch (TREE_CODE (_p1))
8459 : {
8460 0 : case CALL_EXPR:
8461 0 : switch (get_call_combined_fn (_p1))
8462 : {
8463 0 : case CFN_LOG:
8464 0 : if (call_expr_nargs (_p1) == 1)
8465 : {
8466 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8467 0 : {
8468 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8469 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_LOG);
8470 0 : if (res) return res;
8471 : }
8472 : }
8473 : break;
8474 : default:;
8475 : }
8476 : break;
8477 : default:;
8478 : }
8479 : }
8480 : break;
8481 0 : case CFN_REDUC_PLUS:
8482 0 : if (call_expr_nargs (_p0) == 1)
8483 : {
8484 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8485 0 : switch (TREE_CODE (_p1))
8486 : {
8487 0 : case CALL_EXPR:
8488 0 : switch (get_call_combined_fn (_p1))
8489 : {
8490 0 : case CFN_REDUC_PLUS:
8491 0 : if (call_expr_nargs (_p1) == 1)
8492 : {
8493 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8494 0 : {
8495 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8496 0 : tree res = generic_simplify_88 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8497 0 : if (res) return res;
8498 : }
8499 : }
8500 : break;
8501 : default:;
8502 : }
8503 : break;
8504 : default:;
8505 : }
8506 : }
8507 : break;
8508 0 : case CFN_LOG2:
8509 0 : if (call_expr_nargs (_p0) == 1)
8510 : {
8511 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8512 0 : switch (TREE_CODE (_p1))
8513 : {
8514 0 : case CALL_EXPR:
8515 0 : switch (get_call_combined_fn (_p1))
8516 : {
8517 0 : case CFN_LOG2:
8518 0 : if (call_expr_nargs (_p1) == 1)
8519 : {
8520 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8521 0 : {
8522 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8523 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_LOG2);
8524 0 : if (res) return res;
8525 : }
8526 : }
8527 : break;
8528 : default:;
8529 : }
8530 : break;
8531 : default:;
8532 : }
8533 : }
8534 : break;
8535 0 : case CFN_LOG10:
8536 0 : if (call_expr_nargs (_p0) == 1)
8537 : {
8538 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8539 0 : switch (TREE_CODE (_p1))
8540 : {
8541 0 : case CALL_EXPR:
8542 0 : switch (get_call_combined_fn (_p1))
8543 : {
8544 0 : case CFN_LOG10:
8545 0 : if (call_expr_nargs (_p1) == 1)
8546 : {
8547 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8548 0 : {
8549 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8550 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_LOG10);
8551 0 : if (res) return res;
8552 : }
8553 : }
8554 : break;
8555 : default:;
8556 : }
8557 : break;
8558 : default:;
8559 : }
8560 : }
8561 : break;
8562 6 : case CFN_BUILT_IN_LOG10:
8563 6 : if (call_expr_nargs (_p0) == 1)
8564 : {
8565 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8566 6 : switch (TREE_CODE (_p1))
8567 : {
8568 2 : case CALL_EXPR:
8569 2 : switch (get_call_combined_fn (_p1))
8570 : {
8571 2 : case CFN_BUILT_IN_LOG10:
8572 2 : if (call_expr_nargs (_p1) == 1)
8573 : {
8574 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8575 2 : {
8576 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8577 2 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10);
8578 2 : if (res) return res;
8579 : }
8580 : }
8581 : break;
8582 : default:;
8583 : }
8584 : break;
8585 : default:;
8586 : }
8587 : }
8588 : break;
8589 0 : case CFN_BUILT_IN_LOG2F:
8590 0 : if (call_expr_nargs (_p0) == 1)
8591 : {
8592 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8593 0 : switch (TREE_CODE (_p1))
8594 : {
8595 0 : case CALL_EXPR:
8596 0 : switch (get_call_combined_fn (_p1))
8597 : {
8598 0 : case CFN_BUILT_IN_LOG2F:
8599 0 : if (call_expr_nargs (_p1) == 1)
8600 : {
8601 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8602 0 : {
8603 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8604 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F);
8605 0 : if (res) return res;
8606 : }
8607 : }
8608 : break;
8609 : default:;
8610 : }
8611 : break;
8612 : default:;
8613 : }
8614 : }
8615 : break;
8616 0 : case CFN_BUILT_IN_LOG2L:
8617 0 : if (call_expr_nargs (_p0) == 1)
8618 : {
8619 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8620 0 : switch (TREE_CODE (_p1))
8621 : {
8622 0 : case CALL_EXPR:
8623 0 : switch (get_call_combined_fn (_p1))
8624 : {
8625 0 : case CFN_BUILT_IN_LOG2L:
8626 0 : if (call_expr_nargs (_p1) == 1)
8627 : {
8628 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8629 0 : {
8630 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8631 0 : tree res = generic_simplify_116 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L);
8632 0 : if (res) return res;
8633 : }
8634 : }
8635 : break;
8636 : default:;
8637 : }
8638 : break;
8639 : default:;
8640 : }
8641 : }
8642 : break;
8643 : default:;
8644 : }
8645 : break;
8646 21074806 : default:;
8647 : }
8648 21074806 : switch (TREE_CODE (_p1))
8649 : {
8650 7218 : case BIT_AND_EXPR:
8651 7218 : {
8652 7218 : tree _q30 = TREE_OPERAND (_p1, 0);
8653 7218 : tree _q31 = TREE_OPERAND (_p1, 1);
8654 7218 : switch (TREE_CODE (_q30))
8655 : {
8656 80 : case MAX_EXPR:
8657 80 : {
8658 80 : tree _q40 = TREE_OPERAND (_q30, 0);
8659 80 : tree _q41 = TREE_OPERAND (_q30, 1);
8660 80 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
8661 : {
8662 80 : switch (TREE_CODE (_q41))
8663 : {
8664 80 : case INTEGER_CST:
8665 80 : {
8666 80 : switch (TREE_CODE (_q31))
8667 : {
8668 72 : case INTEGER_CST:
8669 72 : {
8670 72 : {
8671 72 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
8672 72 : {
8673 72 : auto i = wi::neg (wi::to_wide (captures[2]));
8674 72 : if (wi::popcount (i) == 1
8675 144 : && (wi::to_wide (captures[1])) == (i - 1)
8676 : )
8677 : {
8678 40 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
8679 : )
8680 : {
8681 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1355;
8682 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1355;
8683 8 : {
8684 8 : tree res_op0;
8685 8 : res_op0 = captures[0];
8686 8 : tree res_op1;
8687 8 : res_op1 = captures[1];
8688 8 : tree _r;
8689 8 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
8690 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 980, __FILE__, __LINE__, true);
8691 : return _r;
8692 : }
8693 64 : next_after_fail1355:;
8694 : }
8695 : else
8696 : {
8697 32 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1356;
8698 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1356;
8699 32 : {
8700 32 : if (! tree_invariant_p (captures[0])) goto next_after_fail1356;
8701 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail1356;
8702 0 : tree res_op0;
8703 0 : {
8704 0 : tree _o1[2], _r1;
8705 0 : _o1[0] = unshare_expr (captures[0]);
8706 0 : _o1[1] = unshare_expr (captures[1]);
8707 0 : _r1 = fold_build2_loc (loc, LE_EXPR, boolean_type_node, _o1[0], _o1[1]);
8708 0 : res_op0 = _r1;
8709 : }
8710 0 : tree res_op1;
8711 0 : res_op1 = unshare_expr (captures[0]);
8712 0 : tree res_op2;
8713 0 : {
8714 0 : tree _o1[2], _r1;
8715 0 : _o1[0] = captures[0];
8716 0 : _o1[1] = captures[1];
8717 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8718 0 : res_op2 = _r1;
8719 : }
8720 0 : tree _r;
8721 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
8722 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 981, __FILE__, __LINE__, true);
8723 : return _r;
8724 : }
8725 64 : next_after_fail1356:;
8726 : }
8727 : }
8728 8 : }
8729 : }
8730 64 : break;
8731 : }
8732 : default:;
8733 : }
8734 : break;
8735 : }
8736 : default:;
8737 : }
8738 : }
8739 : break;
8740 : }
8741 : default:;
8742 : }
8743 : break;
8744 : }
8745 21074798 : default:;
8746 : }
8747 21074798 : switch (TREE_CODE (_p0))
8748 : {
8749 0 : case VEC_PERM_EXPR:
8750 0 : {
8751 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8752 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8753 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8754 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8755 : {
8756 0 : switch (TREE_CODE (_p1))
8757 : {
8758 0 : case VEC_PERM_EXPR:
8759 0 : {
8760 0 : tree _q60 = TREE_OPERAND (_p1, 0);
8761 0 : tree _q61 = TREE_OPERAND (_p1, 1);
8762 0 : tree _q62 = TREE_OPERAND (_p1, 2);
8763 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
8764 : {
8765 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
8766 : {
8767 0 : {
8768 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
8769 0 : if (VECTOR_INTEGER_TYPE_P (type)
8770 : )
8771 : {
8772 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1357;
8773 0 : {
8774 0 : tree res_op0;
8775 0 : {
8776 0 : tree _o1[2], _r1;
8777 0 : _o1[0] = captures[0];
8778 0 : _o1[1] = captures[2];
8779 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8780 0 : captures[3] = _r1;
8781 : }
8782 0 : res_op0 = unshare_expr (captures[3]);
8783 0 : tree res_op1;
8784 0 : res_op1 = captures[3];
8785 0 : tree res_op2;
8786 0 : res_op2 = captures[1];
8787 0 : tree _r;
8788 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
8789 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 942, __FILE__, __LINE__, true);
8790 33788763 : return _r;
8791 : }
8792 0 : next_after_fail1357:;
8793 : }
8794 : }
8795 : }
8796 : }
8797 : break;
8798 : }
8799 0 : default:;
8800 : }
8801 0 : switch (TREE_CODE (_q22))
8802 : {
8803 0 : case VECTOR_CST:
8804 0 : {
8805 0 : switch (TREE_CODE (_p1))
8806 : {
8807 0 : case VEC_PERM_EXPR:
8808 0 : {
8809 0 : tree _q60 = TREE_OPERAND (_p1, 0);
8810 0 : tree _q61 = TREE_OPERAND (_p1, 1);
8811 0 : tree _q62 = TREE_OPERAND (_p1, 2);
8812 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
8813 : {
8814 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
8815 : {
8816 0 : switch (TREE_CODE (_q62))
8817 : {
8818 0 : case VECTOR_CST:
8819 0 : {
8820 0 : {
8821 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
8822 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8823 0 : if (res) return res;
8824 : }
8825 0 : break;
8826 : }
8827 : default:;
8828 : }
8829 : }
8830 : }
8831 : break;
8832 : }
8833 : default:;
8834 : }
8835 : break;
8836 : }
8837 : default:;
8838 : }
8839 : }
8840 : break;
8841 : }
8842 : default:;
8843 : }
8844 : return NULL_TREE;
8845 : }
8846 :
8847 : tree
8848 2102160 : generic_simplify_TRUNC_MOD_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
8849 : {
8850 2102160 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8851 2102160 : if (integer_zerop (_p0))
8852 : {
8853 933 : {
8854 933 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8855 933 : tree res = generic_simplify_343 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
8856 933 : if (res) return res;
8857 : }
8858 : }
8859 2101364 : if (integer_onep (_p1))
8860 : {
8861 221239 : {
8862 221239 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8863 221239 : tree res = generic_simplify_344 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
8864 221239 : if (res) return res;
8865 : }
8866 : }
8867 1880125 : if (integer_minus_onep (_p1))
8868 : {
8869 531 : {
8870 531 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8871 531 : tree res = generic_simplify_345 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
8872 531 : if (res) return res;
8873 : }
8874 : }
8875 1880103 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
8876 : {
8877 230 : {
8878 230 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8879 230 : tree res = generic_simplify_346 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
8880 230 : if (res) return res;
8881 : }
8882 : }
8883 1880010 : switch (TREE_CODE (_p0))
8884 : {
8885 113 : case TRUNC_MOD_EXPR:
8886 113 : {
8887 113 : tree _q20 = TREE_OPERAND (_p0, 0);
8888 113 : tree _q21 = TREE_OPERAND (_p0, 1);
8889 113 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8890 : {
8891 51 : {
8892 51 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8893 51 : tree res = generic_simplify_347 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
8894 51 : if (res) return res;
8895 : }
8896 : }
8897 62 : switch (TREE_CODE (_q21))
8898 : {
8899 12 : case INTEGER_CST:
8900 12 : {
8901 12 : switch (TREE_CODE (_p1))
8902 : {
8903 12 : case INTEGER_CST:
8904 12 : {
8905 12 : {
8906 12 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8907 12 : if (INTEGRAL_TYPE_P (type)
8908 12 : && ((!TYPE_OVERFLOW_TRAPS (type)
8909 11 : && !TYPE_OVERFLOW_SANITIZED (type))
8910 1 : || !integer_minus_onep (captures[1]))
8911 12 : && !integer_zerop (captures[1])
8912 12 : && !integer_zerop (captures[2])
8913 24 : && wi::multiple_of_p (wi::to_widest (captures[1]), wi::to_widest (captures[2]), SIGNED)
8914 : )
8915 : {
8916 7 : if (!TYPE_UNSIGNED (type) && integer_minus_onep (captures[2])
8917 : )
8918 : {
8919 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1732;
8920 0 : {
8921 0 : tree _r;
8922 0 : _r = build_zero_cst (type);
8923 0 : if (TREE_SIDE_EFFECTS (captures[0]))
8924 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
8925 0 : if (TREE_SIDE_EFFECTS (captures[1]))
8926 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
8927 0 : if (TREE_SIDE_EFFECTS (captures[2]))
8928 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
8929 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1046, __FILE__, __LINE__, true);
8930 : return _r;
8931 : }
8932 0 : next_after_fail1732:;
8933 : }
8934 : else
8935 : {
8936 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1733;
8937 7 : {
8938 7 : tree res_op0;
8939 7 : res_op0 = captures[0];
8940 7 : tree res_op1;
8941 7 : res_op1 = captures[2];
8942 7 : tree _r;
8943 7 : _r = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, res_op0, res_op1);
8944 7 : if (TREE_SIDE_EFFECTS (captures[1]))
8945 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
8946 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1047, __FILE__, __LINE__, true);
8947 : return _r;
8948 : }
8949 0 : next_after_fail1733:;
8950 : }
8951 : }
8952 : }
8953 : break;
8954 : }
8955 : default:;
8956 : }
8957 : break;
8958 : }
8959 : default:;
8960 : }
8961 : break;
8962 : }
8963 7332 : case MULT_EXPR:
8964 7332 : {
8965 7332 : tree _q20 = TREE_OPERAND (_p0, 0);
8966 7332 : tree _q21 = TREE_OPERAND (_p0, 1);
8967 7332 : switch (TREE_CODE (_q21))
8968 : {
8969 7237 : case INTEGER_CST:
8970 7237 : {
8971 7237 : switch (TREE_CODE (_p1))
8972 : {
8973 7215 : case INTEGER_CST:
8974 7215 : {
8975 7215 : {
8976 7215 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8977 7215 : tree res = generic_simplify_348 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
8978 7215 : if (res) return res;
8979 : }
8980 7215 : break;
8981 : }
8982 : default:;
8983 : }
8984 : break;
8985 : }
8986 : default:;
8987 : }
8988 : break;
8989 : }
8990 1879952 : default:;
8991 : }
8992 1879952 : switch (TREE_CODE (_p1))
8993 : {
8994 1596810 : case INTEGER_CST:
8995 1596810 : {
8996 1596810 : {
8997 1596810 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8998 1596810 : if (TYPE_SIGN (type) == SIGNED
8999 249644 : && !TREE_OVERFLOW (captures[1])
9000 1596815 : && wi::neg_p (wi::to_wide (captures[1]))
9001 317 : && !TYPE_OVERFLOW_TRAPS (type)
9002 1597126 : && !sign_bit_p (captures[1], captures[1])
9003 : )
9004 : {
9005 312 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1734;
9006 312 : {
9007 312 : tree res_op0;
9008 312 : res_op0 = captures[0];
9009 312 : tree res_op1;
9010 312 : {
9011 312 : tree _o1[1], _r1;
9012 312 : _o1[0] = captures[1];
9013 312 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
9014 312 : res_op1 = _r1;
9015 : }
9016 312 : tree _r;
9017 312 : _r = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, res_op0, res_op1);
9018 312 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1048, __FILE__, __LINE__, true);
9019 : return _r;
9020 : }
9021 0 : next_after_fail1734:;
9022 : }
9023 : }
9024 : break;
9025 : }
9026 59129 : CASE_CONVERT:
9027 59129 : {
9028 59129 : tree _q30 = TREE_OPERAND (_p1, 0);
9029 59129 : switch (TREE_CODE (_q30))
9030 : {
9031 0 : case NEGATE_EXPR:
9032 0 : {
9033 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9034 0 : {
9035 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q40 };
9036 0 : tree res = generic_simplify_442 (loc, type, _p0, _p1, captures);
9037 0 : if (res) return res;
9038 : }
9039 0 : break;
9040 : }
9041 59129 : default:;
9042 : }
9043 59129 : {
9044 59129 : tree _q30_pops[1];
9045 59129 : if (tree_power_of_two_cand (_q30, _q30_pops))
9046 : {
9047 7 : tree _q40 = _q30_pops[0];
9048 7 : {
9049 7 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q40 };
9050 7 : tree res = generic_simplify_349 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9051 7 : if (res) return res;
9052 : }
9053 : }
9054 : }
9055 59122 : break;
9056 : }
9057 94 : case NEGATE_EXPR:
9058 94 : {
9059 94 : tree _q30 = TREE_OPERAND (_p1, 0);
9060 94 : {
9061 94 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
9062 94 : tree res = generic_simplify_442 (loc, type, _p0, _p1, captures);
9063 94 : if (res) return res;
9064 : }
9065 94 : break;
9066 : }
9067 1879633 : default:;
9068 : }
9069 1879633 : {
9070 1879633 : tree _p1_pops[1];
9071 1879633 : if (tree_power_of_two_cand (_p1, _p1_pops))
9072 : {
9073 1596507 : tree _q30 = _p1_pops[0];
9074 1596507 : {
9075 1596507 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
9076 1596507 : tree res = generic_simplify_349 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9077 1596507 : if (res) return res;
9078 : }
9079 : }
9080 : }
9081 888861 : switch (TREE_CODE (_p0))
9082 : {
9083 2931 : case MULT_EXPR:
9084 2931 : {
9085 2931 : tree _q20 = TREE_OPERAND (_p0, 0);
9086 2931 : tree _q21 = TREE_OPERAND (_p0, 1);
9087 2931 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9088 : {
9089 534 : {
9090 534 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9091 534 : tree res = generic_simplify_350 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9092 534 : if (res) return res;
9093 : }
9094 : }
9095 2930 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9096 : {
9097 0 : {
9098 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
9099 0 : tree res = generic_simplify_350 (loc, type, _p0, _p1, captures, TRUNC_MOD_EXPR);
9100 0 : if (res) return res;
9101 : }
9102 : }
9103 : break;
9104 : }
9105 0 : case VEC_COND_EXPR:
9106 0 : {
9107 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9108 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9109 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9110 0 : switch (TREE_CODE (_p1))
9111 : {
9112 0 : case VEC_COND_EXPR:
9113 0 : {
9114 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9115 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9116 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9117 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9118 : {
9119 0 : {
9120 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
9121 0 : if (VECTOR_TYPE_P (type)
9122 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
9123 : || types_match (type, TREE_TYPE (captures[2]))
9124 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9125 : || (optimize_vectors_before_lowering_p ()
9126 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9127 : )
9128 : {
9129 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1735;
9130 0 : {
9131 0 : tree res_op0;
9132 0 : res_op0 = captures[1];
9133 0 : tree res_op1;
9134 0 : {
9135 0 : tree _o1[2], _r1;
9136 0 : _o1[0] = captures[2];
9137 0 : _o1[1] = captures[5];
9138 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, _o1[0], _o1[1]);
9139 0 : if (EXPR_P (_r1))
9140 0 : goto next_after_fail1735;
9141 0 : res_op1 = _r1;
9142 : }
9143 0 : tree res_op2;
9144 0 : {
9145 0 : tree _o1[2], _r1;
9146 0 : _o1[0] = captures[3];
9147 0 : _o1[1] = captures[6];
9148 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, _o1[0], _o1[1]);
9149 0 : if (EXPR_P (_r1))
9150 0 : goto next_after_fail1735;
9151 0 : res_op2 = _r1;
9152 : }
9153 0 : tree _r;
9154 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9155 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
9156 : return _r;
9157 : }
9158 0 : next_after_fail1735:;
9159 : }
9160 : }
9161 : }
9162 : break;
9163 : }
9164 0 : default:;
9165 : }
9166 0 : {
9167 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
9168 0 : if (VECTOR_TYPE_P (type)
9169 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
9170 : || types_match (type, TREE_TYPE (captures[2]))
9171 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9172 : || (optimize_vectors_before_lowering_p ()
9173 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9174 : )
9175 : {
9176 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1736;
9177 0 : {
9178 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1736;
9179 0 : tree res_op0;
9180 0 : res_op0 = captures[1];
9181 0 : tree res_op1;
9182 0 : {
9183 0 : tree _o1[2], _r1;
9184 0 : _o1[0] = captures[2];
9185 0 : _o1[1] = unshare_expr (captures[4]);
9186 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, _o1[0], _o1[1]);
9187 0 : if (EXPR_P (_r1))
9188 0 : goto next_after_fail1736;
9189 0 : res_op1 = _r1;
9190 : }
9191 0 : tree res_op2;
9192 0 : {
9193 0 : tree _o1[2], _r1;
9194 0 : _o1[0] = captures[3];
9195 0 : _o1[1] = captures[4];
9196 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, _o1[0], _o1[1]);
9197 0 : if (EXPR_P (_r1))
9198 0 : goto next_after_fail1736;
9199 0 : res_op2 = _r1;
9200 : }
9201 0 : tree _r;
9202 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9203 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
9204 : return _r;
9205 : }
9206 888860 : next_after_fail1736:;
9207 : }
9208 : }
9209 : break;
9210 : }
9211 888860 : default:;
9212 : }
9213 888860 : switch (TREE_CODE (_p1))
9214 : {
9215 7 : case VEC_COND_EXPR:
9216 7 : {
9217 7 : tree _q30 = TREE_OPERAND (_p1, 0);
9218 7 : tree _q31 = TREE_OPERAND (_p1, 1);
9219 7 : tree _q32 = TREE_OPERAND (_p1, 2);
9220 7 : {
9221 7 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
9222 7 : if (VECTOR_TYPE_P (type)
9223 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
9224 : || types_match (type, TREE_TYPE (captures[3]))
9225 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
9226 : || (optimize_vectors_before_lowering_p ()
9227 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
9228 : )
9229 : {
9230 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1737;
9231 7 : {
9232 7 : if (! tree_invariant_p (captures[0])) goto next_after_fail1737;
9233 0 : tree res_op0;
9234 0 : res_op0 = captures[2];
9235 0 : tree res_op1;
9236 0 : {
9237 0 : tree _o1[2], _r1;
9238 0 : _o1[0] = unshare_expr (captures[0]);
9239 0 : _o1[1] = captures[3];
9240 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, _o1[0], _o1[1]);
9241 0 : if (EXPR_P (_r1))
9242 0 : goto next_after_fail1737;
9243 0 : res_op1 = _r1;
9244 : }
9245 0 : tree res_op2;
9246 0 : {
9247 0 : tree _o1[2], _r1;
9248 0 : _o1[0] = captures[0];
9249 0 : _o1[1] = captures[4];
9250 0 : _r1 = fold_build2_loc (loc, TRUNC_MOD_EXPR, type, _o1[0], _o1[1]);
9251 0 : if (EXPR_P (_r1))
9252 0 : goto next_after_fail1737;
9253 0 : res_op2 = _r1;
9254 : }
9255 0 : tree _r;
9256 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9257 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
9258 : return _r;
9259 : }
9260 2102160 : next_after_fail1737:;
9261 : }
9262 : }
9263 : break;
9264 : }
9265 : default:;
9266 : }
9267 : return NULL_TREE;
9268 : }
9269 :
9270 : tree
9271 1022974 : generic_simplify_RSHIFT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9272 : {
9273 1022974 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9274 1022974 : switch (TREE_CODE (_p1))
9275 : {
9276 135 : case TRUNC_MOD_EXPR:
9277 135 : {
9278 135 : tree _q30 = TREE_OPERAND (_p1, 0);
9279 135 : tree _q31 = TREE_OPERAND (_p1, 1);
9280 135 : {
9281 135 : tree _q31_pops[1];
9282 135 : if (tree_power_of_two_cand (_q31, _q31_pops))
9283 : {
9284 127 : tree _q50 = _q31_pops[0];
9285 127 : {
9286 127 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9287 127 : tree res = generic_simplify_443 (loc, type, _p0, _p1, captures, RSHIFT_EXPR, TRUNC_MOD_EXPR);
9288 127 : if (res) return res;
9289 : }
9290 : }
9291 : }
9292 14 : break;
9293 : }
9294 0 : case FLOOR_MOD_EXPR:
9295 0 : {
9296 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9297 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9298 0 : {
9299 0 : tree _q31_pops[1];
9300 0 : if (tree_power_of_two_cand (_q31, _q31_pops))
9301 : {
9302 0 : tree _q50 = _q31_pops[0];
9303 0 : {
9304 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9305 0 : tree res = generic_simplify_443 (loc, type, _p0, _p1, captures, RSHIFT_EXPR, FLOOR_MOD_EXPR);
9306 0 : if (res) return res;
9307 : }
9308 : }
9309 : }
9310 0 : break;
9311 : }
9312 1022853 : default:;
9313 : }
9314 1022853 : if (uniform_integer_cst_p (_p1))
9315 : {
9316 817148 : {
9317 817148 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9318 817148 : tree res = generic_simplify_444 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
9319 817148 : if (res) return res;
9320 : }
9321 : }
9322 1022096 : switch (TREE_CODE (_p0))
9323 : {
9324 60 : case NEGATE_EXPR:
9325 60 : {
9326 60 : tree _q20 = TREE_OPERAND (_p0, 0);
9327 60 : switch (TREE_CODE (_p1))
9328 : {
9329 59 : case INTEGER_CST:
9330 59 : {
9331 59 : {
9332 59 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9333 59 : if (!TYPE_UNSIGNED (type)
9334 59 : && TYPE_OVERFLOW_UNDEFINED (type)
9335 : )
9336 : {
9337 32 : {
9338 32 : tree stype = TREE_TYPE (captures[2]);
9339 32 : tree bt = truth_type_for (type);
9340 32 : tree zeros = build_zero_cst (type);
9341 32 : tree INTEGER_CST = NULL_TREE;
9342 32 : if (INTEGRAL_TYPE_P (type)
9343 : && canonicalize_math_after_vectorization_p ()
9344 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
9345 : )
9346 : {
9347 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1746;
9348 : {
9349 : tree res_op0;
9350 : {
9351 : tree _o1[1], _r1;
9352 : {
9353 : tree _o2[2], _r2;
9354 : _o2[0] = captures[1];
9355 : _o2[1] = zeros;
9356 : _r2 = fold_build2_loc (loc, GT_EXPR, boolean_type_node, _o2[0], _o2[1]);
9357 : _o1[0] = _r2;
9358 : }
9359 : if (TREE_TYPE (_o1[0]) != type)
9360 : {
9361 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
9362 : }
9363 : else
9364 : _r1 = _o1[0];
9365 : res_op0 = _r1;
9366 : }
9367 : tree _r;
9368 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
9369 : if (TREE_SIDE_EFFECTS (captures[2]))
9370 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9371 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1053, __FILE__, __LINE__, true);
9372 : return _r;
9373 : }
9374 : next_after_fail1746:;
9375 : }
9376 : else
9377 : {
9378 0 : if (VECTOR_INTEGER_TYPE_P (type)
9379 0 : && TYPE_MODE (bt) == TYPE_MODE (type)
9380 0 : && expand_vec_cmp_expr_p (type, bt, GT_EXPR)
9381 0 : && (INTEGER_CST = uniform_integer_cst_p (captures[2])) != NULL
9382 32 : && wi::eq_p (wi::to_wide (INTEGER_CST), element_precision (type) - 1)
9383 : )
9384 : {
9385 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1747;
9386 0 : {
9387 0 : tree res_op0;
9388 0 : {
9389 0 : tree _o1[2], _r1;
9390 0 : _o1[0] = captures[1];
9391 0 : _o1[1] = zeros;
9392 0 : _r1 = fold_build2_loc (loc, GT_EXPR, bt, _o1[0], _o1[1]);
9393 0 : res_op0 = _r1;
9394 : }
9395 0 : tree _r;
9396 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
9397 0 : if (TREE_SIDE_EFFECTS (captures[2]))
9398 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9399 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1054, __FILE__, __LINE__, true);
9400 : return _r;
9401 : }
9402 0 : next_after_fail1747:;
9403 : }
9404 : }
9405 : }
9406 : }
9407 : }
9408 : break;
9409 : }
9410 0 : case VECTOR_CST:
9411 0 : {
9412 0 : {
9413 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9414 0 : if (!TYPE_UNSIGNED (type)
9415 0 : && TYPE_OVERFLOW_UNDEFINED (type)
9416 : )
9417 : {
9418 0 : {
9419 0 : tree stype = TREE_TYPE (captures[2]);
9420 0 : tree bt = truth_type_for (type);
9421 0 : tree zeros = build_zero_cst (type);
9422 0 : tree VECTOR_CST = NULL_TREE;
9423 0 : if (INTEGRAL_TYPE_P (type)
9424 : && canonicalize_math_after_vectorization_p ()
9425 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
9426 : )
9427 : {
9428 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1748;
9429 : {
9430 : tree res_op0;
9431 : {
9432 : tree _o1[1], _r1;
9433 : {
9434 : tree _o2[2], _r2;
9435 : _o2[0] = captures[1];
9436 : _o2[1] = zeros;
9437 : _r2 = fold_build2_loc (loc, GT_EXPR, boolean_type_node, _o2[0], _o2[1]);
9438 : _o1[0] = _r2;
9439 : }
9440 : if (TREE_TYPE (_o1[0]) != type)
9441 : {
9442 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
9443 : }
9444 : else
9445 : _r1 = _o1[0];
9446 : res_op0 = _r1;
9447 : }
9448 : tree _r;
9449 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
9450 : if (TREE_SIDE_EFFECTS (captures[2]))
9451 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9452 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1053, __FILE__, __LINE__, true);
9453 : return _r;
9454 : }
9455 : next_after_fail1748:;
9456 : }
9457 : else
9458 : {
9459 0 : if (VECTOR_INTEGER_TYPE_P (type)
9460 0 : && TYPE_MODE (bt) == TYPE_MODE (type)
9461 0 : && expand_vec_cmp_expr_p (type, bt, GT_EXPR)
9462 0 : && (VECTOR_CST = uniform_integer_cst_p (captures[2])) != NULL
9463 0 : && wi::eq_p (wi::to_wide (VECTOR_CST), element_precision (type) - 1)
9464 : )
9465 : {
9466 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1749;
9467 0 : {
9468 0 : tree res_op0;
9469 0 : {
9470 0 : tree _o1[2], _r1;
9471 0 : _o1[0] = captures[1];
9472 0 : _o1[1] = zeros;
9473 0 : _r1 = fold_build2_loc (loc, GT_EXPR, bt, _o1[0], _o1[1]);
9474 0 : res_op0 = _r1;
9475 : }
9476 0 : tree _r;
9477 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
9478 0 : if (TREE_SIDE_EFFECTS (captures[2]))
9479 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9480 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1054, __FILE__, __LINE__, true);
9481 : return _r;
9482 : }
9483 0 : next_after_fail1749:;
9484 : }
9485 : }
9486 : }
9487 : }
9488 : }
9489 : break;
9490 : }
9491 : default:;
9492 : }
9493 : break;
9494 : }
9495 48 : case BIT_IOR_EXPR:
9496 48 : {
9497 48 : tree _q20 = TREE_OPERAND (_p0, 0);
9498 48 : tree _q21 = TREE_OPERAND (_p0, 1);
9499 48 : switch (TREE_CODE (_p1))
9500 : {
9501 46 : case INTEGER_CST:
9502 46 : {
9503 46 : {
9504 46 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9505 46 : tree res = generic_simplify_454 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR);
9506 46 : if (res) return res;
9507 : }
9508 37 : break;
9509 : }
9510 : default:;
9511 : }
9512 : break;
9513 : }
9514 247 : case BIT_XOR_EXPR:
9515 247 : {
9516 247 : tree _q20 = TREE_OPERAND (_p0, 0);
9517 247 : tree _q21 = TREE_OPERAND (_p0, 1);
9518 247 : switch (TREE_CODE (_p1))
9519 : {
9520 239 : case INTEGER_CST:
9521 239 : {
9522 239 : {
9523 239 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9524 239 : tree res = generic_simplify_454 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR);
9525 239 : if (res) return res;
9526 : }
9527 139 : break;
9528 : }
9529 : default:;
9530 : }
9531 : break;
9532 : }
9533 449 : case LSHIFT_EXPR:
9534 449 : {
9535 449 : tree _q20 = TREE_OPERAND (_p0, 0);
9536 449 : tree _q21 = TREE_OPERAND (_p0, 1);
9537 449 : switch (TREE_CODE (_q21))
9538 : {
9539 370 : case INTEGER_CST:
9540 370 : {
9541 370 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q21, 0))
9542 : {
9543 75 : {
9544 75 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q21 };
9545 75 : tree res = generic_simplify_455 (loc, type, _p0, _p1, captures);
9546 75 : if (res) return res;
9547 : }
9548 : }
9549 : break;
9550 : }
9551 : default:;
9552 : }
9553 : break;
9554 : }
9555 1021960 : default:;
9556 : }
9557 1021960 : {
9558 1021960 : tree _p0_pops[1];
9559 1021960 : if (tree_nop_convert (_p0, _p0_pops))
9560 : {
9561 173215 : tree _q20 = _p0_pops[0];
9562 173215 : switch (TREE_CODE (_q20))
9563 : {
9564 20 : case LSHIFT_EXPR:
9565 20 : {
9566 20 : tree _q30 = TREE_OPERAND (_q20, 0);
9567 20 : tree _q31 = TREE_OPERAND (_q20, 1);
9568 20 : switch (TREE_CODE (_q31))
9569 : {
9570 0 : case INTEGER_CST:
9571 0 : {
9572 0 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
9573 : {
9574 0 : {
9575 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p1, _q31 };
9576 0 : tree res = generic_simplify_455 (loc, type, _p0, _p1, captures);
9577 0 : if (res) return res;
9578 : }
9579 : }
9580 : break;
9581 : }
9582 : default:;
9583 : }
9584 : break;
9585 : }
9586 : default:;
9587 : }
9588 : }
9589 : }
9590 1021960 : if (integer_all_onesp (_p0))
9591 : {
9592 11804 : {
9593 11804 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9594 11804 : if (!TYPE_UNSIGNED (type)
9595 : )
9596 : {
9597 119 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1750;
9598 119 : {
9599 119 : tree _r;
9600 119 : _r = captures[0];
9601 119 : if (TREE_SIDE_EFFECTS (captures[1]))
9602 1 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
9603 119 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1055, __FILE__, __LINE__, true);
9604 : return _r;
9605 : }
9606 0 : next_after_fail1750:;
9607 : }
9608 : }
9609 : }
9610 1021841 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9611 : {
9612 25 : {
9613 25 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9614 25 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1751;
9615 25 : {
9616 25 : tree _r;
9617 25 : _r = build_zero_cst (type);
9618 25 : if (TREE_SIDE_EFFECTS (captures[0]))
9619 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
9620 25 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1056, __FILE__, __LINE__, true);
9621 1022974 : return _r;
9622 : }
9623 0 : next_after_fail1751:;
9624 : }
9625 : }
9626 1021816 : if (integer_zerop (_p1))
9627 : {
9628 1419 : {
9629 1419 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9630 1419 : tree res = generic_simplify_446 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
9631 1419 : if (res) return res;
9632 : }
9633 : }
9634 1020397 : if (integer_zerop (_p0))
9635 : {
9636 152 : {
9637 152 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9638 152 : tree res = generic_simplify_447 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
9639 152 : if (res) return res;
9640 : }
9641 : }
9642 1020245 : switch (TREE_CODE (_p1))
9643 : {
9644 0 : case VECTOR_CST:
9645 0 : {
9646 0 : {
9647 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9648 0 : tree res = generic_simplify_448 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
9649 0 : if (res) return res;
9650 : }
9651 0 : break;
9652 : }
9653 0 : case CONSTRUCTOR:
9654 0 : {
9655 0 : {
9656 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9657 0 : tree res = generic_simplify_449 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
9658 0 : if (res) return res;
9659 : }
9660 0 : break;
9661 : }
9662 1020245 : default:;
9663 : }
9664 1020245 : switch (TREE_CODE (_p0))
9665 : {
9666 122 : case RSHIFT_EXPR:
9667 122 : {
9668 122 : tree _q20 = TREE_OPERAND (_p0, 0);
9669 122 : tree _q21 = TREE_OPERAND (_p0, 1);
9670 122 : switch (TREE_CODE (_q21))
9671 : {
9672 77 : case INTEGER_CST:
9673 77 : {
9674 77 : switch (TREE_CODE (_p1))
9675 : {
9676 51 : case INTEGER_CST:
9677 51 : {
9678 51 : {
9679 51 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9680 51 : tree res = generic_simplify_450 (loc, type, _p0, _p1, captures, RSHIFT_EXPR);
9681 51 : if (res) return res;
9682 : }
9683 0 : break;
9684 : }
9685 : default:;
9686 : }
9687 : break;
9688 : }
9689 : default:;
9690 : }
9691 : break;
9692 : }
9693 197691 : CASE_CONVERT:
9694 197691 : {
9695 197691 : tree _q20 = TREE_OPERAND (_p0, 0);
9696 197691 : switch (TREE_CODE (_q20))
9697 : {
9698 6 : case BIT_AND_EXPR:
9699 6 : {
9700 6 : tree _q30 = TREE_OPERAND (_q20, 0);
9701 6 : tree _q31 = TREE_OPERAND (_q20, 1);
9702 6 : switch (TREE_CODE (_q31))
9703 : {
9704 0 : case INTEGER_CST:
9705 0 : {
9706 0 : switch (TREE_CODE (_p1))
9707 : {
9708 0 : case INTEGER_CST:
9709 0 : {
9710 0 : {
9711 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9712 0 : tree res = generic_simplify_451 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, RSHIFT_EXPR);
9713 0 : if (res) return res;
9714 : }
9715 0 : break;
9716 : }
9717 : default:;
9718 : }
9719 : break;
9720 : }
9721 : default:;
9722 : }
9723 : break;
9724 : }
9725 15 : case BIT_XOR_EXPR:
9726 15 : {
9727 15 : tree _q30 = TREE_OPERAND (_q20, 0);
9728 15 : tree _q31 = TREE_OPERAND (_q20, 1);
9729 15 : switch (TREE_CODE (_q31))
9730 : {
9731 0 : case INTEGER_CST:
9732 0 : {
9733 0 : switch (TREE_CODE (_p1))
9734 : {
9735 0 : case INTEGER_CST:
9736 0 : {
9737 0 : {
9738 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9739 0 : tree res = generic_simplify_451 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, RSHIFT_EXPR);
9740 0 : if (res) return res;
9741 : }
9742 0 : break;
9743 : }
9744 : default:;
9745 : }
9746 : break;
9747 : }
9748 : default:;
9749 : }
9750 : break;
9751 : }
9752 43 : case BIT_IOR_EXPR:
9753 43 : {
9754 43 : tree _q30 = TREE_OPERAND (_q20, 0);
9755 43 : tree _q31 = TREE_OPERAND (_q20, 1);
9756 43 : switch (TREE_CODE (_q31))
9757 : {
9758 24 : case INTEGER_CST:
9759 24 : {
9760 24 : switch (TREE_CODE (_p1))
9761 : {
9762 7 : case INTEGER_CST:
9763 7 : {
9764 7 : {
9765 7 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9766 7 : tree res = generic_simplify_451 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, RSHIFT_EXPR);
9767 7 : if (res) return res;
9768 : }
9769 0 : break;
9770 : }
9771 : default:;
9772 : }
9773 : break;
9774 : }
9775 : default:;
9776 : }
9777 : break;
9778 : }
9779 203 : case CALL_EXPR:
9780 203 : switch (get_call_combined_fn (_q20))
9781 : {
9782 0 : case CFN_BSWAP:
9783 0 : if (call_expr_nargs (_q20) == 1)
9784 : {
9785 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
9786 0 : switch (TREE_CODE (_p1))
9787 : {
9788 0 : case INTEGER_CST:
9789 0 : {
9790 0 : {
9791 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
9792 0 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BSWAP);
9793 0 : if (res) return res;
9794 : }
9795 0 : break;
9796 : }
9797 : default:;
9798 : }
9799 : }
9800 : break;
9801 0 : case CFN_BUILT_IN_BSWAP128:
9802 0 : if (call_expr_nargs (_q20) == 1)
9803 : {
9804 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
9805 0 : switch (TREE_CODE (_p1))
9806 : {
9807 0 : case INTEGER_CST:
9808 0 : {
9809 0 : {
9810 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
9811 0 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP128);
9812 0 : if (res) return res;
9813 : }
9814 0 : break;
9815 : }
9816 : default:;
9817 : }
9818 : }
9819 : break;
9820 8 : case CFN_BUILT_IN_BSWAP16:
9821 8 : if (call_expr_nargs (_q20) == 1)
9822 : {
9823 8 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
9824 8 : switch (TREE_CODE (_p1))
9825 : {
9826 7 : case INTEGER_CST:
9827 7 : {
9828 7 : {
9829 7 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
9830 7 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP16);
9831 7 : if (res) return res;
9832 : }
9833 2 : break;
9834 : }
9835 : default:;
9836 : }
9837 : }
9838 : break;
9839 13 : case CFN_BUILT_IN_BSWAP32:
9840 13 : if (call_expr_nargs (_q20) == 1)
9841 : {
9842 13 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
9843 13 : switch (TREE_CODE (_p1))
9844 : {
9845 13 : case INTEGER_CST:
9846 13 : {
9847 13 : {
9848 13 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
9849 13 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP32);
9850 13 : if (res) return res;
9851 : }
9852 9 : break;
9853 : }
9854 : default:;
9855 : }
9856 : }
9857 : break;
9858 18 : case CFN_BUILT_IN_BSWAP64:
9859 18 : if (call_expr_nargs (_q20) == 1)
9860 : {
9861 18 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
9862 18 : switch (TREE_CODE (_p1))
9863 : {
9864 18 : case INTEGER_CST:
9865 18 : {
9866 18 : {
9867 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
9868 18 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP64);
9869 18 : if (res) return res;
9870 : }
9871 12 : break;
9872 : }
9873 : default:;
9874 : }
9875 : }
9876 : break;
9877 : default:;
9878 : }
9879 : break;
9880 : default:;
9881 : }
9882 : break;
9883 : }
9884 13949 : case BIT_AND_EXPR:
9885 13949 : {
9886 13949 : tree _q20 = TREE_OPERAND (_p0, 0);
9887 13949 : tree _q21 = TREE_OPERAND (_p0, 1);
9888 13949 : switch (TREE_CODE (_q21))
9889 : {
9890 13899 : case INTEGER_CST:
9891 13899 : {
9892 13899 : switch (TREE_CODE (_p1))
9893 : {
9894 13876 : case INTEGER_CST:
9895 13876 : {
9896 13876 : {
9897 13876 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9898 13876 : tree res = generic_simplify_452 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, RSHIFT_EXPR);
9899 13876 : if (res) return res;
9900 : }
9901 0 : break;
9902 : }
9903 : default:;
9904 : }
9905 : break;
9906 : }
9907 : default:;
9908 : }
9909 : break;
9910 : }
9911 147 : case BIT_XOR_EXPR:
9912 147 : {
9913 147 : tree _q20 = TREE_OPERAND (_p0, 0);
9914 147 : tree _q21 = TREE_OPERAND (_p0, 1);
9915 147 : switch (TREE_CODE (_q21))
9916 : {
9917 0 : case INTEGER_CST:
9918 0 : {
9919 0 : switch (TREE_CODE (_p1))
9920 : {
9921 0 : case INTEGER_CST:
9922 0 : {
9923 0 : {
9924 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9925 0 : tree res = generic_simplify_452 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, RSHIFT_EXPR);
9926 0 : if (res) return res;
9927 : }
9928 0 : break;
9929 : }
9930 : default:;
9931 : }
9932 : break;
9933 : }
9934 : default:;
9935 : }
9936 : break;
9937 : }
9938 39 : case BIT_IOR_EXPR:
9939 39 : {
9940 39 : tree _q20 = TREE_OPERAND (_p0, 0);
9941 39 : tree _q21 = TREE_OPERAND (_p0, 1);
9942 39 : switch (TREE_CODE (_q21))
9943 : {
9944 2 : case INTEGER_CST:
9945 2 : {
9946 2 : switch (TREE_CODE (_p1))
9947 : {
9948 0 : case INTEGER_CST:
9949 0 : {
9950 0 : {
9951 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9952 0 : tree res = generic_simplify_452 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, RSHIFT_EXPR);
9953 0 : if (res) return res;
9954 : }
9955 0 : break;
9956 : }
9957 : default:;
9958 : }
9959 : break;
9960 : }
9961 : default:;
9962 : }
9963 : break;
9964 : }
9965 0 : case VEC_COND_EXPR:
9966 0 : {
9967 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9968 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9969 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9970 0 : switch (TREE_CODE (_p1))
9971 : {
9972 0 : case VEC_COND_EXPR:
9973 0 : {
9974 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9975 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9976 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9977 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9978 : {
9979 0 : {
9980 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
9981 0 : if (VECTOR_TYPE_P (type)
9982 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
9983 : || types_match (type, TREE_TYPE (captures[2]))
9984 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9985 : || (optimize_vectors_before_lowering_p ()
9986 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9987 : )
9988 : {
9989 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1752;
9990 0 : {
9991 0 : tree res_op0;
9992 0 : res_op0 = captures[1];
9993 0 : tree res_op1;
9994 0 : {
9995 0 : tree _o1[2], _r1;
9996 0 : _o1[0] = captures[2];
9997 0 : _o1[1] = captures[5];
9998 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, type, _o1[0], _o1[1]);
9999 0 : if (EXPR_P (_r1))
10000 0 : goto next_after_fail1752;
10001 0 : res_op1 = _r1;
10002 : }
10003 0 : tree res_op2;
10004 0 : {
10005 0 : tree _o1[2], _r1;
10006 0 : _o1[0] = captures[3];
10007 0 : _o1[1] = captures[6];
10008 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, type, _o1[0], _o1[1]);
10009 0 : if (EXPR_P (_r1))
10010 0 : goto next_after_fail1752;
10011 0 : res_op2 = _r1;
10012 : }
10013 0 : tree _r;
10014 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10015 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
10016 : return _r;
10017 : }
10018 0 : next_after_fail1752:;
10019 : }
10020 : }
10021 : }
10022 : break;
10023 : }
10024 0 : default:;
10025 : }
10026 0 : {
10027 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10028 0 : if (VECTOR_TYPE_P (type)
10029 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
10030 : || types_match (type, TREE_TYPE (captures[2]))
10031 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10032 : || (optimize_vectors_before_lowering_p ()
10033 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10034 : )
10035 : {
10036 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1753;
10037 0 : {
10038 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1753;
10039 0 : tree res_op0;
10040 0 : res_op0 = captures[1];
10041 0 : tree res_op1;
10042 0 : {
10043 0 : tree _o1[2], _r1;
10044 0 : _o1[0] = captures[2];
10045 0 : _o1[1] = unshare_expr (captures[4]);
10046 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, type, _o1[0], _o1[1]);
10047 0 : if (EXPR_P (_r1))
10048 0 : goto next_after_fail1753;
10049 0 : res_op1 = _r1;
10050 : }
10051 0 : tree res_op2;
10052 0 : {
10053 0 : tree _o1[2], _r1;
10054 0 : _o1[0] = captures[3];
10055 0 : _o1[1] = captures[4];
10056 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, type, _o1[0], _o1[1]);
10057 0 : if (EXPR_P (_r1))
10058 0 : goto next_after_fail1753;
10059 0 : res_op2 = _r1;
10060 : }
10061 0 : tree _r;
10062 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10063 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
10064 : return _r;
10065 : }
10066 1006208 : next_after_fail1753:;
10067 : }
10068 : }
10069 : break;
10070 : }
10071 706 : case CALL_EXPR:
10072 706 : switch (get_call_combined_fn (_p0))
10073 : {
10074 0 : case CFN_BSWAP:
10075 0 : if (call_expr_nargs (_p0) == 1)
10076 : {
10077 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10078 0 : switch (TREE_CODE (_p1))
10079 : {
10080 0 : case INTEGER_CST:
10081 0 : {
10082 0 : {
10083 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10084 0 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BSWAP);
10085 0 : if (res) return res;
10086 : }
10087 0 : break;
10088 : }
10089 : default:;
10090 : }
10091 : }
10092 : break;
10093 0 : case CFN_BUILT_IN_BSWAP128:
10094 0 : if (call_expr_nargs (_p0) == 1)
10095 : {
10096 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10097 0 : switch (TREE_CODE (_p1))
10098 : {
10099 0 : case INTEGER_CST:
10100 0 : {
10101 0 : {
10102 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10103 0 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP128);
10104 0 : if (res) return res;
10105 : }
10106 0 : break;
10107 : }
10108 : default:;
10109 : }
10110 : }
10111 : break;
10112 32 : case CFN_BUILT_IN_BSWAP16:
10113 32 : if (call_expr_nargs (_p0) == 1)
10114 : {
10115 32 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10116 32 : switch (TREE_CODE (_p1))
10117 : {
10118 32 : case INTEGER_CST:
10119 32 : {
10120 32 : {
10121 32 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10122 32 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP16);
10123 32 : if (res) return res;
10124 : }
10125 9 : break;
10126 : }
10127 : default:;
10128 : }
10129 : }
10130 : break;
10131 101 : case CFN_BUILT_IN_BSWAP32:
10132 101 : if (call_expr_nargs (_p0) == 1)
10133 : {
10134 101 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10135 101 : switch (TREE_CODE (_p1))
10136 : {
10137 100 : case INTEGER_CST:
10138 100 : {
10139 100 : {
10140 100 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10141 100 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP32);
10142 100 : if (res) return res;
10143 : }
10144 61 : break;
10145 : }
10146 : default:;
10147 : }
10148 : }
10149 : break;
10150 102 : case CFN_BUILT_IN_BSWAP64:
10151 102 : if (call_expr_nargs (_p0) == 1)
10152 : {
10153 102 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10154 102 : switch (TREE_CODE (_p1))
10155 : {
10156 101 : case INTEGER_CST:
10157 101 : {
10158 101 : {
10159 101 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10160 101 : tree res = generic_simplify_456 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_BSWAP64);
10161 101 : if (res) return res;
10162 : }
10163 75 : break;
10164 : }
10165 : default:;
10166 : }
10167 : }
10168 : break;
10169 : default:;
10170 : }
10171 : break;
10172 1006208 : default:;
10173 : }
10174 1006208 : if (integer_onep (_p0))
10175 : {
10176 525 : {
10177 525 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
10178 525 : if (INTEGRAL_TYPE_P (type)
10179 : )
10180 : {
10181 525 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1754;
10182 525 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1754;
10183 525 : {
10184 525 : tree res_op0;
10185 525 : {
10186 525 : tree _o1[2], _r1;
10187 525 : _o1[0] = captures[0];
10188 525 : _o1[1] = build_zero_cst (TREE_TYPE (captures[0]));
10189 525 : _r1 = fold_build2_loc (loc, EQ_EXPR, boolean_type_node, _o1[0], _o1[1]);
10190 525 : res_op0 = _r1;
10191 : }
10192 525 : tree _r;
10193 525 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
10194 525 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1057, __FILE__, __LINE__, true);
10195 1022974 : return _r;
10196 : }
10197 1005683 : next_after_fail1754:;
10198 : }
10199 : }
10200 : }
10201 1005683 : switch (TREE_CODE (_p1))
10202 : {
10203 11 : case VEC_COND_EXPR:
10204 11 : {
10205 11 : tree _q30 = TREE_OPERAND (_p1, 0);
10206 11 : tree _q31 = TREE_OPERAND (_p1, 1);
10207 11 : tree _q32 = TREE_OPERAND (_p1, 2);
10208 11 : {
10209 11 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10210 11 : if (VECTOR_TYPE_P (type)
10211 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
10212 : || types_match (type, TREE_TYPE (captures[3]))
10213 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10214 : || (optimize_vectors_before_lowering_p ()
10215 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10216 : )
10217 : {
10218 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1755;
10219 11 : {
10220 11 : if (! tree_invariant_p (captures[0])) goto next_after_fail1755;
10221 0 : tree res_op0;
10222 0 : res_op0 = captures[2];
10223 0 : tree res_op1;
10224 0 : {
10225 0 : tree _o1[2], _r1;
10226 0 : _o1[0] = unshare_expr (captures[0]);
10227 0 : _o1[1] = captures[3];
10228 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, type, _o1[0], _o1[1]);
10229 0 : if (EXPR_P (_r1))
10230 0 : goto next_after_fail1755;
10231 0 : res_op1 = _r1;
10232 : }
10233 0 : tree res_op2;
10234 0 : {
10235 0 : tree _o1[2], _r1;
10236 0 : _o1[0] = captures[0];
10237 0 : _o1[1] = captures[4];
10238 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, type, _o1[0], _o1[1]);
10239 0 : if (EXPR_P (_r1))
10240 0 : goto next_after_fail1755;
10241 0 : res_op2 = _r1;
10242 : }
10243 0 : tree _r;
10244 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10245 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
10246 : return _r;
10247 : }
10248 1005683 : next_after_fail1755:;
10249 : }
10250 : }
10251 : break;
10252 : }
10253 1005683 : default:;
10254 : }
10255 1005683 : switch (TREE_CODE (_p0))
10256 : {
10257 0 : case VEC_PERM_EXPR:
10258 0 : {
10259 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10260 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10261 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10262 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
10263 : {
10264 0 : switch (TREE_CODE (_p1))
10265 : {
10266 0 : case VEC_PERM_EXPR:
10267 0 : {
10268 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10269 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10270 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10271 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
10272 : {
10273 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
10274 : {
10275 0 : {
10276 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
10277 0 : if (VECTOR_INTEGER_TYPE_P (type)
10278 : )
10279 : {
10280 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1756;
10281 0 : {
10282 0 : tree res_op0;
10283 0 : {
10284 0 : tree _o1[2], _r1;
10285 0 : _o1[0] = captures[0];
10286 0 : _o1[1] = captures[2];
10287 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10288 0 : captures[3] = _r1;
10289 : }
10290 0 : res_op0 = unshare_expr (captures[3]);
10291 0 : tree res_op1;
10292 0 : res_op1 = captures[3];
10293 0 : tree res_op2;
10294 0 : res_op2 = captures[1];
10295 0 : tree _r;
10296 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
10297 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 942, __FILE__, __LINE__, true);
10298 1022974 : return _r;
10299 : }
10300 0 : next_after_fail1756:;
10301 : }
10302 : }
10303 : }
10304 : }
10305 : break;
10306 : }
10307 : default:;
10308 : }
10309 : }
10310 : break;
10311 : }
10312 : default:;
10313 : }
10314 : return NULL_TREE;
10315 : }
10316 :
10317 : tree
10318 82667 : generic_simplify_MIN_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10319 : {
10320 82667 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10321 82667 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10322 : {
10323 0 : {
10324 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10325 0 : tree res = generic_simplify_546 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10326 0 : if (res) return res;
10327 : }
10328 : }
10329 82667 : switch (TREE_CODE (_p0))
10330 : {
10331 47 : case MIN_EXPR:
10332 47 : {
10333 47 : tree _q20 = TREE_OPERAND (_p0, 0);
10334 47 : tree _q21 = TREE_OPERAND (_p0, 1);
10335 47 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10336 : {
10337 0 : {
10338 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10339 0 : tree res = generic_simplify_547 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10340 0 : if (res) return res;
10341 : }
10342 : }
10343 47 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10344 : {
10345 0 : {
10346 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10347 0 : tree res = generic_simplify_547 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10348 0 : if (res) return res;
10349 : }
10350 : }
10351 : break;
10352 : }
10353 82667 : default:;
10354 : }
10355 82667 : switch (TREE_CODE (_p1))
10356 : {
10357 0 : case MIN_EXPR:
10358 0 : {
10359 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10360 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10361 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10362 : {
10363 0 : {
10364 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
10365 0 : tree res = generic_simplify_548 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10366 0 : if (res) return res;
10367 : }
10368 : }
10369 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10370 : {
10371 0 : {
10372 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q30 };
10373 0 : tree res = generic_simplify_548 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10374 0 : if (res) return res;
10375 : }
10376 : }
10377 : break;
10378 : }
10379 82667 : default:;
10380 : }
10381 82667 : switch (TREE_CODE (_p0))
10382 : {
10383 4 : case MAX_EXPR:
10384 4 : {
10385 4 : tree _q20 = TREE_OPERAND (_p0, 0);
10386 4 : tree _q21 = TREE_OPERAND (_p0, 1);
10387 4 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10388 : {
10389 3 : {
10390 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10391 3 : tree res = generic_simplify_549 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10392 3 : if (res) return res;
10393 : }
10394 : }
10395 1 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10396 : {
10397 1 : {
10398 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10399 1 : tree res = generic_simplify_549 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10400 1 : if (res) return res;
10401 : }
10402 : }
10403 : break;
10404 : }
10405 82663 : default:;
10406 : }
10407 82663 : switch (TREE_CODE (_p1))
10408 : {
10409 0 : case MAX_EXPR:
10410 0 : {
10411 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10412 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10413 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10414 : {
10415 0 : {
10416 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
10417 0 : tree res = generic_simplify_549 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10418 0 : if (res) return res;
10419 : }
10420 : }
10421 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10422 : {
10423 0 : {
10424 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
10425 0 : tree res = generic_simplify_549 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10426 0 : if (res) return res;
10427 : }
10428 : }
10429 : break;
10430 : }
10431 0 : case NEGATE_EXPR:
10432 0 : {
10433 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10434 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10435 : {
10436 0 : {
10437 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10438 0 : tree res = generic_simplify_550 (loc, type, _p0, _p1, captures);
10439 0 : if (res) return res;
10440 : }
10441 : }
10442 : break;
10443 : }
10444 82663 : default:;
10445 : }
10446 82663 : switch (TREE_CODE (_p0))
10447 : {
10448 2 : case NEGATE_EXPR:
10449 2 : {
10450 2 : tree _q20 = TREE_OPERAND (_p0, 0);
10451 2 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10452 : {
10453 2 : {
10454 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10455 2 : tree res = generic_simplify_550 (loc, type, _p0, _p1, captures);
10456 2 : if (res) return res;
10457 : }
10458 : }
10459 : break;
10460 : }
10461 82661 : default:;
10462 : }
10463 82661 : {
10464 82661 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10465 82661 : if (INTEGRAL_TYPE_P (type)
10466 80801 : && TYPE_MIN_VALUE (type)
10467 163462 : && operand_equal_p (captures[1], TYPE_MIN_VALUE (type), OEP_ONLY_CONST)
10468 : )
10469 : {
10470 556 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1836;
10471 556 : {
10472 556 : tree _r;
10473 556 : _r = captures[1];
10474 556 : if (TREE_SIDE_EFFECTS (captures[0]))
10475 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
10476 556 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1066, __FILE__, __LINE__, true);
10477 : return _r;
10478 : }
10479 0 : next_after_fail1836:;
10480 : }
10481 : else
10482 : {
10483 82105 : if (INTEGRAL_TYPE_P (type)
10484 80245 : && TYPE_MAX_VALUE (type)
10485 162350 : && operand_equal_p (captures[1], TYPE_MAX_VALUE (type), OEP_ONLY_CONST)
10486 : )
10487 : {
10488 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1837;
10489 1 : {
10490 1 : tree _r;
10491 1 : _r = captures[0];
10492 1 : if (TREE_SIDE_EFFECTS (captures[1]))
10493 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10494 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1067, __FILE__, __LINE__, true);
10495 : return _r;
10496 : }
10497 0 : next_after_fail1837:;
10498 : }
10499 : }
10500 : }
10501 82104 : switch (TREE_CODE (_p0))
10502 : {
10503 5613 : case PLUS_EXPR:
10504 5613 : {
10505 5613 : tree _q20 = TREE_OPERAND (_p0, 0);
10506 5613 : tree _q21 = TREE_OPERAND (_p0, 1);
10507 5613 : switch (TREE_CODE (_p1))
10508 : {
10509 15 : case PLUS_EXPR:
10510 15 : {
10511 15 : tree _q50 = TREE_OPERAND (_p1, 0);
10512 15 : tree _q51 = TREE_OPERAND (_p1, 1);
10513 15 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10514 : {
10515 0 : {
10516 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
10517 0 : tree res = generic_simplify_551 (loc, type, _p0, _p1, captures, MIN_EXPR);
10518 0 : if (res) return res;
10519 : }
10520 0 : {
10521 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q50, _q21, _p0, _q20 };
10522 0 : tree res = generic_simplify_551 (loc, type, _p0, _p1, captures, MIN_EXPR);
10523 0 : if (res) return res;
10524 : }
10525 : }
10526 15 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10527 : {
10528 0 : {
10529 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
10530 0 : tree res = generic_simplify_551 (loc, type, _p0, _p1, captures, MIN_EXPR);
10531 0 : if (res) return res;
10532 : }
10533 : }
10534 15 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10535 : {
10536 1 : {
10537 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q51, _q21, _p0, _q20 };
10538 1 : tree res = generic_simplify_551 (loc, type, _p0, _p1, captures, MIN_EXPR);
10539 1 : if (res) return res;
10540 : }
10541 : }
10542 : break;
10543 : }
10544 5612 : default:;
10545 : }
10546 5612 : switch (TREE_CODE (_q21))
10547 : {
10548 5484 : case INTEGER_CST:
10549 5484 : {
10550 5484 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10551 : {
10552 0 : {
10553 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
10554 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10555 : )
10556 : {
10557 0 : if (tree_int_cst_sgn (captures[2]) > 0
10558 : )
10559 : {
10560 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1838;
10561 0 : {
10562 0 : tree _r;
10563 0 : _r = captures[0];
10564 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10565 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10566 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1068, __FILE__, __LINE__, true);
10567 : return _r;
10568 : }
10569 0 : next_after_fail1838:;
10570 : }
10571 : else
10572 : {
10573 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1839;
10574 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1839;
10575 0 : {
10576 0 : tree _r;
10577 0 : _r = captures[1];
10578 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1069, __FILE__, __LINE__, true);
10579 : return _r;
10580 : }
10581 82103 : next_after_fail1839:;
10582 : }
10583 : }
10584 : }
10585 : }
10586 : break;
10587 : }
10588 : default:;
10589 : }
10590 : break;
10591 : }
10592 1014 : case MINUS_EXPR:
10593 1014 : {
10594 1014 : tree _q20 = TREE_OPERAND (_p0, 0);
10595 1014 : tree _q21 = TREE_OPERAND (_p0, 1);
10596 1014 : switch (TREE_CODE (_p1))
10597 : {
10598 996 : case MINUS_EXPR:
10599 996 : {
10600 996 : tree _q50 = TREE_OPERAND (_p1, 0);
10601 996 : tree _q51 = TREE_OPERAND (_p1, 1);
10602 996 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10603 : {
10604 0 : {
10605 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
10606 0 : tree res = generic_simplify_552 (loc, type, _p0, _p1, captures, MIN_EXPR);
10607 0 : if (res) return res;
10608 : }
10609 0 : {
10610 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q50, _q21, _p0, _q20 };
10611 0 : tree res = generic_simplify_552 (loc, type, _p0, _p1, captures, MIN_EXPR);
10612 0 : if (res) return res;
10613 : }
10614 : }
10615 : break;
10616 : }
10617 : default:;
10618 : }
10619 : break;
10620 : }
10621 672 : CASE_CONVERT:
10622 672 : {
10623 672 : tree _q20 = TREE_OPERAND (_p0, 0);
10624 672 : switch (TREE_CODE (_p1))
10625 : {
10626 72 : CASE_CONVERT:
10627 72 : {
10628 72 : tree _q40 = TREE_OPERAND (_p1, 0);
10629 72 : {
10630 72 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
10631 72 : tree res = generic_simplify_553 (loc, type, _p0, _p1, captures, MIN_EXPR, MIN_EXPR);
10632 72 : if (res) return res;
10633 : }
10634 72 : break;
10635 : }
10636 : default:;
10637 : }
10638 : break;
10639 : }
10640 82103 : default:;
10641 : }
10642 82103 : switch (TREE_CODE (_p1))
10643 : {
10644 21 : case PLUS_EXPR:
10645 21 : {
10646 21 : tree _q30 = TREE_OPERAND (_p1, 0);
10647 21 : tree _q31 = TREE_OPERAND (_p1, 1);
10648 21 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10649 : {
10650 0 : switch (TREE_CODE (_q31))
10651 : {
10652 0 : case INTEGER_CST:
10653 0 : {
10654 0 : {
10655 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
10656 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10657 : )
10658 : {
10659 0 : if (tree_int_cst_sgn (captures[2]) > 0
10660 : )
10661 : {
10662 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1840;
10663 0 : {
10664 0 : tree _r;
10665 0 : _r = captures[0];
10666 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10667 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10668 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1068, __FILE__, __LINE__, true);
10669 : return _r;
10670 : }
10671 0 : next_after_fail1840:;
10672 : }
10673 : else
10674 : {
10675 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1841;
10676 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1841;
10677 0 : {
10678 0 : tree _r;
10679 0 : _r = captures[1];
10680 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1069, __FILE__, __LINE__, true);
10681 : return _r;
10682 : }
10683 82103 : next_after_fail1841:;
10684 : }
10685 : }
10686 : }
10687 : break;
10688 : }
10689 : default:;
10690 : }
10691 : }
10692 : break;
10693 : }
10694 82103 : default:;
10695 : }
10696 82103 : switch (TREE_CODE (_p0))
10697 : {
10698 0 : case MAX_EXPR:
10699 0 : {
10700 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10701 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10702 0 : switch (TREE_CODE (_q21))
10703 : {
10704 0 : case PLUS_EXPR:
10705 0 : {
10706 0 : tree _q40 = TREE_OPERAND (_q21, 0);
10707 0 : tree _q41 = TREE_OPERAND (_q21, 1);
10708 0 : switch (TREE_CODE (_q41))
10709 : {
10710 0 : case INTEGER_CST:
10711 0 : {
10712 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
10713 : {
10714 0 : {
10715 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
10716 0 : tree res = generic_simplify_554 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10717 0 : if (res) return res;
10718 : }
10719 : }
10720 : break;
10721 : }
10722 : default:;
10723 : }
10724 : break;
10725 : }
10726 0 : default:;
10727 : }
10728 0 : switch (TREE_CODE (_q20))
10729 : {
10730 0 : case PLUS_EXPR:
10731 0 : {
10732 0 : tree _q30 = TREE_OPERAND (_q20, 0);
10733 0 : tree _q31 = TREE_OPERAND (_q20, 1);
10734 0 : switch (TREE_CODE (_q31))
10735 : {
10736 0 : case INTEGER_CST:
10737 0 : {
10738 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
10739 : {
10740 0 : {
10741 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q30, _q31 };
10742 0 : tree res = generic_simplify_554 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10743 0 : if (res) return res;
10744 : }
10745 : }
10746 : break;
10747 : }
10748 : default:;
10749 : }
10750 : break;
10751 : }
10752 0 : default:;
10753 : }
10754 0 : switch (TREE_CODE (_p1))
10755 : {
10756 0 : case MIN_EXPR:
10757 0 : {
10758 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10759 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10760 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10761 : {
10762 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10763 : {
10764 0 : {
10765 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10766 0 : if (!HONOR_NANS (captures[0])
10767 : )
10768 : {
10769 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1842;
10770 0 : {
10771 0 : tree res_op0;
10772 0 : res_op0 = captures[0];
10773 0 : tree res_op1;
10774 0 : res_op1 = captures[1];
10775 0 : tree _r;
10776 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10777 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 937, __FILE__, __LINE__, true);
10778 : return _r;
10779 : }
10780 0 : next_after_fail1842:;
10781 : }
10782 : }
10783 : }
10784 : }
10785 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10786 : {
10787 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10788 : {
10789 0 : {
10790 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10791 0 : if (!HONOR_NANS (captures[0])
10792 : )
10793 : {
10794 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1843;
10795 0 : {
10796 0 : tree res_op0;
10797 0 : res_op0 = captures[0];
10798 0 : tree res_op1;
10799 0 : res_op1 = captures[1];
10800 0 : tree _r;
10801 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10802 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 937, __FILE__, __LINE__, true);
10803 : return _r;
10804 : }
10805 0 : next_after_fail1843:;
10806 : }
10807 : }
10808 : }
10809 : }
10810 : break;
10811 : }
10812 : default:;
10813 : }
10814 : break;
10815 : }
10816 82103 : default:;
10817 : }
10818 82103 : switch (TREE_CODE (_p1))
10819 : {
10820 0 : case MAX_EXPR:
10821 0 : {
10822 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10823 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10824 0 : switch (TREE_CODE (_q31))
10825 : {
10826 0 : case PLUS_EXPR:
10827 0 : {
10828 0 : tree _q50 = TREE_OPERAND (_q31, 0);
10829 0 : tree _q51 = TREE_OPERAND (_q31, 1);
10830 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
10831 : {
10832 0 : switch (TREE_CODE (_q51))
10833 : {
10834 0 : case INTEGER_CST:
10835 0 : {
10836 0 : {
10837 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q51 };
10838 0 : tree res = generic_simplify_554 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10839 0 : if (res) return res;
10840 : }
10841 0 : break;
10842 : }
10843 : default:;
10844 : }
10845 : }
10846 : break;
10847 : }
10848 0 : default:;
10849 : }
10850 0 : switch (TREE_CODE (_q30))
10851 : {
10852 0 : case PLUS_EXPR:
10853 0 : {
10854 0 : tree _q40 = TREE_OPERAND (_q30, 0);
10855 0 : tree _q41 = TREE_OPERAND (_q30, 1);
10856 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
10857 : {
10858 0 : switch (TREE_CODE (_q41))
10859 : {
10860 0 : case INTEGER_CST:
10861 0 : {
10862 0 : {
10863 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _p0, _q41 };
10864 0 : tree res = generic_simplify_554 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10865 0 : if (res) return res;
10866 : }
10867 0 : break;
10868 : }
10869 : default:;
10870 : }
10871 : }
10872 : break;
10873 : }
10874 : default:;
10875 : }
10876 : break;
10877 : }
10878 82103 : default:;
10879 : }
10880 82103 : switch (TREE_CODE (_p0))
10881 : {
10882 47 : case MIN_EXPR:
10883 47 : {
10884 47 : tree _q20 = TREE_OPERAND (_p0, 0);
10885 47 : tree _q21 = TREE_OPERAND (_p0, 1);
10886 47 : switch (TREE_CODE (_p1))
10887 : {
10888 0 : case MAX_EXPR:
10889 0 : {
10890 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10891 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10892 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10893 : {
10894 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10895 : {
10896 0 : {
10897 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10898 0 : if (!HONOR_NANS (captures[0])
10899 : )
10900 : {
10901 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1844;
10902 0 : {
10903 0 : tree res_op0;
10904 0 : res_op0 = captures[0];
10905 0 : tree res_op1;
10906 0 : res_op1 = captures[1];
10907 0 : tree _r;
10908 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10909 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 937, __FILE__, __LINE__, true);
10910 : return _r;
10911 : }
10912 0 : next_after_fail1844:;
10913 : }
10914 : }
10915 : }
10916 : }
10917 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10918 : {
10919 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10920 : {
10921 0 : {
10922 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10923 0 : if (!HONOR_NANS (captures[0])
10924 : )
10925 : {
10926 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1845;
10927 0 : {
10928 0 : tree res_op0;
10929 0 : res_op0 = captures[0];
10930 0 : tree res_op1;
10931 0 : res_op1 = captures[1];
10932 0 : tree _r;
10933 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10934 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 937, __FILE__, __LINE__, true);
10935 : return _r;
10936 : }
10937 0 : next_after_fail1845:;
10938 : }
10939 : }
10940 : }
10941 : }
10942 : break;
10943 : }
10944 : default:;
10945 : }
10946 : break;
10947 : }
10948 1 : case BIT_AND_EXPR:
10949 1 : {
10950 1 : tree _q20 = TREE_OPERAND (_p0, 0);
10951 1 : tree _q21 = TREE_OPERAND (_p0, 1);
10952 1 : switch (TREE_CODE (_q21))
10953 : {
10954 1 : case INTEGER_CST:
10955 1 : {
10956 1 : switch (TREE_CODE (_p1))
10957 : {
10958 0 : case BIT_AND_EXPR:
10959 0 : {
10960 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10961 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10962 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10963 : {
10964 0 : switch (TREE_CODE (_q51))
10965 : {
10966 0 : case INTEGER_CST:
10967 0 : {
10968 0 : {
10969 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
10970 0 : tree res = generic_simplify_555 (loc, type, _p0, _p1, captures, MIN_EXPR);
10971 0 : if (res) return res;
10972 : }
10973 0 : break;
10974 : }
10975 : default:;
10976 : }
10977 : }
10978 : break;
10979 : }
10980 : default:;
10981 : }
10982 : break;
10983 : }
10984 : default:;
10985 : }
10986 : break;
10987 : }
10988 82103 : default:;
10989 : }
10990 82103 : switch (TREE_CODE (_p1))
10991 : {
10992 0 : case BIT_AND_EXPR:
10993 0 : {
10994 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10995 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10996 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10997 : {
10998 0 : switch (TREE_CODE (_q31))
10999 : {
11000 0 : case INTEGER_CST:
11001 0 : {
11002 0 : {
11003 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
11004 0 : tree res = generic_simplify_556 (loc, type, _p0, _p1, captures, MIN_EXPR);
11005 0 : if (res) return res;
11006 : }
11007 0 : break;
11008 : }
11009 : default:;
11010 : }
11011 : }
11012 : break;
11013 : }
11014 82103 : default:;
11015 : }
11016 82103 : switch (TREE_CODE (_p0))
11017 : {
11018 672 : CASE_CONVERT:
11019 672 : {
11020 672 : tree _q20 = TREE_OPERAND (_p0, 0);
11021 672 : switch (TREE_CODE (_q20))
11022 : {
11023 47 : case ADDR_EXPR:
11024 47 : {
11025 47 : switch (TREE_CODE (_p1))
11026 : {
11027 47 : CASE_CONVERT:
11028 47 : {
11029 47 : tree _q40 = TREE_OPERAND (_p1, 0);
11030 47 : switch (TREE_CODE (_q40))
11031 : {
11032 47 : case ADDR_EXPR:
11033 47 : {
11034 47 : {
11035 47 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11036 47 : tree res = generic_simplify_557 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
11037 47 : if (res) return res;
11038 : }
11039 47 : break;
11040 : }
11041 : default:;
11042 : }
11043 : break;
11044 : }
11045 0 : case ADDR_EXPR:
11046 0 : {
11047 0 : {
11048 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
11049 0 : tree res = generic_simplify_558 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
11050 0 : if (res) return res;
11051 : }
11052 0 : break;
11053 : }
11054 : default:;
11055 : }
11056 : break;
11057 : }
11058 : default:;
11059 : }
11060 : break;
11061 : }
11062 10 : case ADDR_EXPR:
11063 10 : {
11064 10 : switch (TREE_CODE (_p1))
11065 : {
11066 0 : CASE_CONVERT:
11067 0 : {
11068 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11069 0 : switch (TREE_CODE (_q30))
11070 : {
11071 0 : case ADDR_EXPR:
11072 0 : {
11073 0 : {
11074 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _q30 };
11075 0 : tree res = generic_simplify_559 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
11076 0 : if (res) return res;
11077 : }
11078 0 : break;
11079 : }
11080 : default:;
11081 : }
11082 : break;
11083 : }
11084 10 : case ADDR_EXPR:
11085 10 : {
11086 10 : {
11087 10 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _p1 };
11088 10 : tree res = generic_simplify_560 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
11089 10 : if (res) return res;
11090 : }
11091 10 : break;
11092 : }
11093 : default:;
11094 : }
11095 : break;
11096 : }
11097 0 : case NEGATE_EXPR:
11098 0 : {
11099 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11100 0 : switch (TREE_CODE (_p1))
11101 : {
11102 0 : case NEGATE_EXPR:
11103 0 : {
11104 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11105 0 : {
11106 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11107 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
11108 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
11109 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
11110 : )
11111 : {
11112 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1846;
11113 0 : {
11114 0 : tree res_op0;
11115 0 : {
11116 0 : tree _o1[2], _r1;
11117 0 : _o1[0] = captures[1];
11118 0 : _o1[1] = captures[3];
11119 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11120 0 : res_op0 = _r1;
11121 : }
11122 0 : tree _r;
11123 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
11124 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1070, __FILE__, __LINE__, true);
11125 : return _r;
11126 : }
11127 0 : next_after_fail1846:;
11128 : }
11129 : }
11130 : break;
11131 : }
11132 : default:;
11133 : }
11134 : break;
11135 : }
11136 0 : case BIT_NOT_EXPR:
11137 0 : {
11138 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11139 0 : switch (TREE_CODE (_p1))
11140 : {
11141 0 : case BIT_NOT_EXPR:
11142 0 : {
11143 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11144 0 : {
11145 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11146 0 : tree res = generic_simplify_561 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
11147 0 : if (res) return res;
11148 : }
11149 0 : break;
11150 : }
11151 : default:;
11152 : }
11153 : break;
11154 : }
11155 0 : case VEC_COND_EXPR:
11156 0 : {
11157 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11158 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11159 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11160 0 : switch (TREE_CODE (_p1))
11161 : {
11162 0 : case VEC_COND_EXPR:
11163 0 : {
11164 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11165 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11166 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11167 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11168 : {
11169 0 : {
11170 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11171 0 : if (VECTOR_TYPE_P (type)
11172 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
11173 : || types_match (type, TREE_TYPE (captures[2]))
11174 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11175 : || (optimize_vectors_before_lowering_p ()
11176 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11177 : )
11178 : {
11179 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1847;
11180 0 : {
11181 0 : tree res_op0;
11182 0 : res_op0 = captures[1];
11183 0 : tree res_op1;
11184 0 : {
11185 0 : tree _o1[2], _r1;
11186 0 : _o1[0] = captures[2];
11187 0 : _o1[1] = captures[5];
11188 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
11189 0 : if (EXPR_P (_r1))
11190 0 : goto next_after_fail1847;
11191 0 : res_op1 = _r1;
11192 : }
11193 0 : tree res_op2;
11194 0 : {
11195 0 : tree _o1[2], _r1;
11196 0 : _o1[0] = captures[3];
11197 0 : _o1[1] = captures[6];
11198 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
11199 0 : if (EXPR_P (_r1))
11200 0 : goto next_after_fail1847;
11201 0 : res_op2 = _r1;
11202 : }
11203 0 : tree _r;
11204 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11205 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
11206 : return _r;
11207 : }
11208 0 : next_after_fail1847:;
11209 : }
11210 : }
11211 : }
11212 : break;
11213 : }
11214 0 : default:;
11215 : }
11216 0 : {
11217 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11218 0 : if (VECTOR_TYPE_P (type)
11219 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
11220 : || types_match (type, TREE_TYPE (captures[2]))
11221 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11222 : || (optimize_vectors_before_lowering_p ()
11223 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11224 : )
11225 : {
11226 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1848;
11227 0 : {
11228 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1848;
11229 0 : tree res_op0;
11230 0 : res_op0 = captures[1];
11231 0 : tree res_op1;
11232 0 : {
11233 0 : tree _o1[2], _r1;
11234 0 : _o1[0] = captures[2];
11235 0 : _o1[1] = unshare_expr (captures[4]);
11236 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
11237 0 : if (EXPR_P (_r1))
11238 0 : goto next_after_fail1848;
11239 0 : res_op1 = _r1;
11240 : }
11241 0 : tree res_op2;
11242 0 : {
11243 0 : tree _o1[2], _r1;
11244 0 : _o1[0] = captures[3];
11245 0 : _o1[1] = captures[4];
11246 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
11247 0 : if (EXPR_P (_r1))
11248 0 : goto next_after_fail1848;
11249 0 : res_op2 = _r1;
11250 : }
11251 0 : tree _r;
11252 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11253 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
11254 : return _r;
11255 : }
11256 82103 : next_after_fail1848:;
11257 : }
11258 : }
11259 : break;
11260 : }
11261 82103 : default:;
11262 : }
11263 82103 : switch (TREE_CODE (_p1))
11264 : {
11265 0 : case VEC_COND_EXPR:
11266 0 : {
11267 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11268 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11269 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11270 0 : {
11271 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11272 0 : if (VECTOR_TYPE_P (type)
11273 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
11274 : || types_match (type, TREE_TYPE (captures[3]))
11275 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11276 : || (optimize_vectors_before_lowering_p ()
11277 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11278 : )
11279 : {
11280 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1849;
11281 0 : {
11282 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1849;
11283 0 : tree res_op0;
11284 0 : res_op0 = captures[2];
11285 0 : tree res_op1;
11286 0 : {
11287 0 : tree _o1[2], _r1;
11288 0 : _o1[0] = unshare_expr (captures[0]);
11289 0 : _o1[1] = captures[3];
11290 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
11291 0 : if (EXPR_P (_r1))
11292 0 : goto next_after_fail1849;
11293 0 : res_op1 = _r1;
11294 : }
11295 0 : tree res_op2;
11296 0 : {
11297 0 : tree _o1[2], _r1;
11298 0 : _o1[0] = captures[0];
11299 0 : _o1[1] = captures[4];
11300 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
11301 0 : if (EXPR_P (_r1))
11302 0 : goto next_after_fail1849;
11303 0 : res_op2 = _r1;
11304 : }
11305 0 : tree _r;
11306 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11307 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
11308 : return _r;
11309 : }
11310 82103 : next_after_fail1849:;
11311 : }
11312 : }
11313 : break;
11314 : }
11315 82103 : default:;
11316 : }
11317 82103 : switch (TREE_CODE (_p0))
11318 : {
11319 4 : case CALL_EXPR:
11320 4 : switch (get_call_combined_fn (_p0))
11321 : {
11322 1 : case CFN_BUILT_IN_CLZ:
11323 1 : if (call_expr_nargs (_p0) == 1)
11324 : {
11325 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11326 1 : switch (TREE_CODE (_p1))
11327 : {
11328 1 : case CALL_EXPR:
11329 1 : switch (get_call_combined_fn (_p1))
11330 : {
11331 1 : case CFN_BUILT_IN_CLZ:
11332 1 : if (call_expr_nargs (_p1) == 1)
11333 : {
11334 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11335 1 : {
11336 1 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11337 1 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CLZ);
11338 1 : if (res) return res;
11339 : }
11340 : }
11341 : break;
11342 : default:;
11343 : }
11344 : break;
11345 : default:;
11346 : }
11347 : }
11348 : break;
11349 1 : case CFN_BUILT_IN_CTZ:
11350 1 : if (call_expr_nargs (_p0) == 1)
11351 : {
11352 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11353 1 : switch (TREE_CODE (_p1))
11354 : {
11355 1 : case CALL_EXPR:
11356 1 : switch (get_call_combined_fn (_p1))
11357 : {
11358 1 : case CFN_BUILT_IN_CTZ:
11359 1 : if (call_expr_nargs (_p1) == 1)
11360 : {
11361 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11362 1 : {
11363 1 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11364 1 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CTZ);
11365 1 : if (res) return res;
11366 : }
11367 : }
11368 : break;
11369 : default:;
11370 : }
11371 : break;
11372 : default:;
11373 : }
11374 : }
11375 : break;
11376 0 : case CFN_REDUC_MIN:
11377 0 : if (call_expr_nargs (_p0) == 1)
11378 : {
11379 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11380 0 : switch (TREE_CODE (_p1))
11381 : {
11382 0 : case CALL_EXPR:
11383 0 : switch (get_call_combined_fn (_p1))
11384 : {
11385 0 : case CFN_REDUC_MIN:
11386 0 : if (call_expr_nargs (_p1) == 1)
11387 : {
11388 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11389 0 : {
11390 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11391 0 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures, CFN_REDUC_MIN, MIN_EXPR);
11392 0 : if (res) return res;
11393 : }
11394 : }
11395 : break;
11396 : default:;
11397 : }
11398 : break;
11399 : default:;
11400 : }
11401 : }
11402 : break;
11403 0 : case CFN_BUILT_IN_CLZL:
11404 0 : if (call_expr_nargs (_p0) == 1)
11405 : {
11406 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11407 0 : switch (TREE_CODE (_p1))
11408 : {
11409 0 : case CALL_EXPR:
11410 0 : switch (get_call_combined_fn (_p1))
11411 : {
11412 0 : case CFN_BUILT_IN_CLZL:
11413 0 : if (call_expr_nargs (_p1) == 1)
11414 : {
11415 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11416 0 : {
11417 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11418 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CLZL);
11419 0 : if (res) return res;
11420 : }
11421 : }
11422 : break;
11423 : default:;
11424 : }
11425 : break;
11426 : default:;
11427 : }
11428 : }
11429 : break;
11430 0 : case CFN_BUILT_IN_CTZL:
11431 0 : if (call_expr_nargs (_p0) == 1)
11432 : {
11433 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11434 0 : switch (TREE_CODE (_p1))
11435 : {
11436 0 : case CALL_EXPR:
11437 0 : switch (get_call_combined_fn (_p1))
11438 : {
11439 0 : case CFN_BUILT_IN_CTZL:
11440 0 : if (call_expr_nargs (_p1) == 1)
11441 : {
11442 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11443 0 : {
11444 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11445 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CTZL);
11446 0 : if (res) return res;
11447 : }
11448 : }
11449 : break;
11450 : default:;
11451 : }
11452 : break;
11453 : default:;
11454 : }
11455 : }
11456 : break;
11457 0 : case CFN_BUILT_IN_CTZIMAX:
11458 0 : if (call_expr_nargs (_p0) == 1)
11459 : {
11460 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11461 0 : switch (TREE_CODE (_p1))
11462 : {
11463 0 : case CALL_EXPR:
11464 0 : switch (get_call_combined_fn (_p1))
11465 : {
11466 0 : case CFN_BUILT_IN_CTZIMAX:
11467 0 : if (call_expr_nargs (_p1) == 1)
11468 : {
11469 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11470 0 : {
11471 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11472 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CTZIMAX);
11473 0 : if (res) return res;
11474 : }
11475 : }
11476 : break;
11477 : default:;
11478 : }
11479 : break;
11480 : default:;
11481 : }
11482 : }
11483 : break;
11484 1 : case CFN_CLZ:
11485 1 : if (call_expr_nargs (_p0) == 1)
11486 : {
11487 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11488 0 : switch (TREE_CODE (_p1))
11489 : {
11490 0 : case CALL_EXPR:
11491 0 : switch (get_call_combined_fn (_p1))
11492 : {
11493 0 : case CFN_CLZ:
11494 0 : if (call_expr_nargs (_p1) == 1)
11495 : {
11496 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11497 0 : {
11498 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11499 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_CLZ);
11500 0 : if (res) return res;
11501 : }
11502 : }
11503 : break;
11504 : default:;
11505 : }
11506 : break;
11507 : default:;
11508 : }
11509 : }
11510 1 : if (call_expr_nargs (_p0) == 2)
11511 : {
11512 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11513 1 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
11514 1 : switch (TREE_CODE (_q21))
11515 : {
11516 1 : case INTEGER_CST:
11517 1 : {
11518 1 : switch (TREE_CODE (_p1))
11519 : {
11520 1 : case CALL_EXPR:
11521 1 : switch (get_call_combined_fn (_p1))
11522 : {
11523 1 : case CFN_CLZ:
11524 1 : if (call_expr_nargs (_p1) == 2)
11525 : {
11526 1 : tree _q50 = CALL_EXPR_ARG (_p1, 0);
11527 1 : tree _q51 = CALL_EXPR_ARG (_p1, 1);
11528 1 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11529 : {
11530 1 : {
11531 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
11532 1 : tree res = generic_simplify_564 (loc, type, _p0, _p1, captures, CFN_CLZ);
11533 1 : if (res) return res;
11534 : }
11535 : }
11536 : }
11537 : break;
11538 : default:;
11539 : }
11540 : break;
11541 : default:;
11542 : }
11543 : break;
11544 : }
11545 : default:;
11546 : }
11547 : }
11548 : break;
11549 1 : case CFN_CTZ:
11550 1 : if (call_expr_nargs (_p0) == 1)
11551 : {
11552 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11553 0 : switch (TREE_CODE (_p1))
11554 : {
11555 0 : case CALL_EXPR:
11556 0 : switch (get_call_combined_fn (_p1))
11557 : {
11558 0 : case CFN_CTZ:
11559 0 : if (call_expr_nargs (_p1) == 1)
11560 : {
11561 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11562 0 : {
11563 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11564 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_CTZ);
11565 0 : if (res) return res;
11566 : }
11567 : }
11568 : break;
11569 : default:;
11570 : }
11571 : break;
11572 : default:;
11573 : }
11574 : }
11575 1 : if (call_expr_nargs (_p0) == 2)
11576 : {
11577 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11578 1 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
11579 1 : switch (TREE_CODE (_q21))
11580 : {
11581 1 : case INTEGER_CST:
11582 1 : {
11583 1 : switch (TREE_CODE (_p1))
11584 : {
11585 1 : case CALL_EXPR:
11586 1 : switch (get_call_combined_fn (_p1))
11587 : {
11588 1 : case CFN_CTZ:
11589 1 : if (call_expr_nargs (_p1) == 2)
11590 : {
11591 1 : tree _q50 = CALL_EXPR_ARG (_p1, 0);
11592 1 : tree _q51 = CALL_EXPR_ARG (_p1, 1);
11593 1 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11594 : {
11595 1 : {
11596 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
11597 1 : tree res = generic_simplify_564 (loc, type, _p0, _p1, captures, CFN_CTZ);
11598 1 : if (res) return res;
11599 : }
11600 : }
11601 : }
11602 : break;
11603 : default:;
11604 : }
11605 : break;
11606 : default:;
11607 : }
11608 : break;
11609 : }
11610 : default:;
11611 : }
11612 : }
11613 : break;
11614 0 : case CFN_BUILT_IN_CLZIMAX:
11615 0 : if (call_expr_nargs (_p0) == 1)
11616 : {
11617 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11618 0 : switch (TREE_CODE (_p1))
11619 : {
11620 0 : case CALL_EXPR:
11621 0 : switch (get_call_combined_fn (_p1))
11622 : {
11623 0 : case CFN_BUILT_IN_CLZIMAX:
11624 0 : if (call_expr_nargs (_p1) == 1)
11625 : {
11626 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11627 0 : {
11628 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11629 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CLZIMAX);
11630 0 : if (res) return res;
11631 : }
11632 : }
11633 : break;
11634 : default:;
11635 : }
11636 : break;
11637 : default:;
11638 : }
11639 : }
11640 : break;
11641 0 : case CFN_BUILT_IN_CLZLL:
11642 0 : if (call_expr_nargs (_p0) == 1)
11643 : {
11644 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11645 0 : switch (TREE_CODE (_p1))
11646 : {
11647 0 : case CALL_EXPR:
11648 0 : switch (get_call_combined_fn (_p1))
11649 : {
11650 0 : case CFN_BUILT_IN_CLZLL:
11651 0 : if (call_expr_nargs (_p1) == 1)
11652 : {
11653 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11654 0 : {
11655 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11656 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CLZLL);
11657 0 : if (res) return res;
11658 : }
11659 : }
11660 : break;
11661 : default:;
11662 : }
11663 : break;
11664 : default:;
11665 : }
11666 : }
11667 : break;
11668 0 : case CFN_BUILT_IN_CTZLL:
11669 0 : if (call_expr_nargs (_p0) == 1)
11670 : {
11671 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
11672 0 : switch (TREE_CODE (_p1))
11673 : {
11674 0 : case CALL_EXPR:
11675 0 : switch (get_call_combined_fn (_p1))
11676 : {
11677 0 : case CFN_BUILT_IN_CTZLL:
11678 0 : if (call_expr_nargs (_p1) == 1)
11679 : {
11680 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
11681 0 : {
11682 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11683 0 : tree res = generic_simplify_563 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_CTZLL);
11684 0 : if (res) return res;
11685 : }
11686 : }
11687 : break;
11688 : default:;
11689 : }
11690 : break;
11691 : default:;
11692 : }
11693 : }
11694 : break;
11695 : default:;
11696 : }
11697 : break;
11698 82099 : default:;
11699 : }
11700 82099 : if (tree_zero_one_valued_p (_p0))
11701 : {
11702 3 : if (tree_zero_one_valued_p (_p1))
11703 : {
11704 2 : {
11705 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11706 2 : tree res = generic_simplify_562 (loc, type, _p0, _p1, captures, MIN_EXPR, BIT_AND_EXPR);
11707 2 : if (res) return res;
11708 : }
11709 : }
11710 : }
11711 : return NULL_TREE;
11712 : }
11713 :
11714 : tree
11715 204905 : generic_simplify_ORDERED_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11716 : {
11717 204905 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11718 204905 : switch (TREE_CODE (_p0))
11719 : {
11720 0 : case VEC_COND_EXPR:
11721 0 : {
11722 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11723 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11724 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11725 0 : switch (TREE_CODE (_p1))
11726 : {
11727 0 : case VEC_COND_EXPR:
11728 0 : {
11729 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11730 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11731 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11732 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11733 : {
11734 0 : {
11735 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11736 0 : if (VECTOR_TYPE_P (type)
11737 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
11738 0 : || types_match (type, TREE_TYPE (captures[2]))
11739 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11740 : || (optimize_vectors_before_lowering_p ()
11741 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11742 : )
11743 : {
11744 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1871;
11745 0 : {
11746 0 : tree res_op0;
11747 0 : res_op0 = captures[1];
11748 0 : tree res_op1;
11749 0 : {
11750 0 : tree _o1[2], _r1;
11751 0 : _o1[0] = captures[2];
11752 0 : _o1[1] = captures[5];
11753 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
11754 0 : if (EXPR_P (_r1))
11755 0 : goto next_after_fail1871;
11756 0 : res_op1 = _r1;
11757 : }
11758 0 : tree res_op2;
11759 0 : {
11760 0 : tree _o1[2], _r1;
11761 0 : _o1[0] = captures[3];
11762 0 : _o1[1] = captures[6];
11763 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
11764 0 : if (EXPR_P (_r1))
11765 0 : goto next_after_fail1871;
11766 0 : res_op2 = _r1;
11767 : }
11768 0 : tree _r;
11769 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11770 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
11771 : return _r;
11772 : }
11773 0 : next_after_fail1871:;
11774 : }
11775 : }
11776 : }
11777 : break;
11778 : }
11779 0 : default:;
11780 : }
11781 0 : {
11782 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11783 0 : if (VECTOR_TYPE_P (type)
11784 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
11785 0 : || types_match (type, TREE_TYPE (captures[2]))
11786 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11787 : || (optimize_vectors_before_lowering_p ()
11788 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11789 : )
11790 : {
11791 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1872;
11792 0 : {
11793 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1872;
11794 0 : tree res_op0;
11795 0 : res_op0 = captures[1];
11796 0 : tree res_op1;
11797 0 : {
11798 0 : tree _o1[2], _r1;
11799 0 : _o1[0] = captures[2];
11800 0 : _o1[1] = unshare_expr (captures[4]);
11801 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
11802 0 : if (EXPR_P (_r1))
11803 0 : goto next_after_fail1872;
11804 0 : res_op1 = _r1;
11805 : }
11806 0 : tree res_op2;
11807 0 : {
11808 0 : tree _o1[2], _r1;
11809 0 : _o1[0] = captures[3];
11810 0 : _o1[1] = captures[4];
11811 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
11812 0 : if (EXPR_P (_r1))
11813 0 : goto next_after_fail1872;
11814 0 : res_op2 = _r1;
11815 : }
11816 0 : tree _r;
11817 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11818 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
11819 : return _r;
11820 : }
11821 204905 : next_after_fail1872:;
11822 : }
11823 : }
11824 : break;
11825 : }
11826 204905 : default:;
11827 : }
11828 204905 : switch (TREE_CODE (_p1))
11829 : {
11830 0 : case VEC_COND_EXPR:
11831 0 : {
11832 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11833 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11834 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11835 0 : {
11836 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11837 0 : if (VECTOR_TYPE_P (type)
11838 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
11839 0 : || types_match (type, TREE_TYPE (captures[3]))
11840 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11841 : || (optimize_vectors_before_lowering_p ()
11842 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11843 : )
11844 : {
11845 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1873;
11846 0 : {
11847 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1873;
11848 0 : tree res_op0;
11849 0 : res_op0 = captures[2];
11850 0 : tree res_op1;
11851 0 : {
11852 0 : tree _o1[2], _r1;
11853 0 : _o1[0] = unshare_expr (captures[0]);
11854 0 : _o1[1] = captures[3];
11855 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
11856 0 : if (EXPR_P (_r1))
11857 0 : goto next_after_fail1873;
11858 0 : res_op1 = _r1;
11859 : }
11860 0 : tree res_op2;
11861 0 : {
11862 0 : tree _o1[2], _r1;
11863 0 : _o1[0] = captures[0];
11864 0 : _o1[1] = captures[4];
11865 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
11866 0 : if (EXPR_P (_r1))
11867 0 : goto next_after_fail1873;
11868 0 : res_op2 = _r1;
11869 : }
11870 0 : tree _r;
11871 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11872 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
11873 : return _r;
11874 : }
11875 204905 : next_after_fail1873:;
11876 : }
11877 : }
11878 : break;
11879 : }
11880 204905 : default:;
11881 : }
11882 204905 : switch (TREE_CODE (_p0))
11883 : {
11884 0 : case FLOAT_EXPR:
11885 0 : {
11886 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11887 0 : switch (TREE_CODE (_p1))
11888 : {
11889 0 : case FLOAT_EXPR:
11890 0 : {
11891 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11892 0 : {
11893 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11894 0 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, ORDERED_EXPR, ORDERED_EXPR);
11895 0 : if (res) return res;
11896 : }
11897 0 : break;
11898 : }
11899 : default:;
11900 : }
11901 : break;
11902 : }
11903 0 : case NEGATE_EXPR:
11904 0 : {
11905 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11906 0 : switch (TREE_CODE (_p1))
11907 : {
11908 0 : case NEGATE_EXPR:
11909 0 : {
11910 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11911 0 : {
11912 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11913 0 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, ORDERED_EXPR, ORDERED_EXPR);
11914 0 : if (res) return res;
11915 : }
11916 0 : break;
11917 : }
11918 0 : default:;
11919 : }
11920 0 : if (CONSTANT_CLASS_P (_p1))
11921 : {
11922 0 : {
11923 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11924 0 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, ORDERED_EXPR, ORDERED_EXPR);
11925 0 : if (res) return res;
11926 : }
11927 : }
11928 : break;
11929 : }
11930 204905 : default:;
11931 : }
11932 204905 : switch (TREE_CODE (_p1))
11933 : {
11934 102 : case REAL_CST:
11935 102 : {
11936 102 : {
11937 102 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11938 102 : tree res = generic_simplify_591 (loc, type, _p0, _p1, captures, ORDERED_EXPR);
11939 102 : if (res) return res;
11940 : }
11941 102 : break;
11942 : }
11943 204905 : default:;
11944 : }
11945 204905 : {
11946 204905 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11947 204905 : if (tree_expr_nan_p (captures[0]) || tree_expr_nan_p (captures[1])
11948 : )
11949 : {
11950 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1874;
11951 0 : {
11952 0 : tree _r;
11953 0 : _r = constant_boolean_node (false, type);
11954 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11955 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11956 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11957 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11958 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1079, __FILE__, __LINE__, true);
11959 : return _r;
11960 : }
11961 0 : next_after_fail1874:;
11962 : }
11963 : else
11964 : {
11965 204905 : if (!tree_expr_maybe_nan_p (captures[0]) && !tree_expr_maybe_nan_p (captures[1])
11966 : )
11967 : {
11968 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1875;
11969 10 : {
11970 10 : tree _r;
11971 10 : _r = constant_boolean_node (true, type);
11972 10 : if (TREE_SIDE_EFFECTS (captures[0]))
11973 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11974 10 : if (TREE_SIDE_EFFECTS (captures[1]))
11975 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11976 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1080, __FILE__, __LINE__, true);
11977 : return _r;
11978 : }
11979 0 : next_after_fail1875:;
11980 : }
11981 : }
11982 : }
11983 : return NULL_TREE;
11984 : }
11985 :
11986 : tree
11987 377270 : generic_simplify_UNEQ_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11988 : {
11989 377270 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11990 377270 : switch (TREE_CODE (_p0))
11991 : {
11992 0 : case VEC_COND_EXPR:
11993 0 : {
11994 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11995 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11996 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11997 0 : switch (TREE_CODE (_p1))
11998 : {
11999 0 : case VEC_COND_EXPR:
12000 0 : {
12001 0 : tree _q60 = TREE_OPERAND (_p1, 0);
12002 0 : tree _q61 = TREE_OPERAND (_p1, 1);
12003 0 : tree _q62 = TREE_OPERAND (_p1, 2);
12004 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
12005 : {
12006 0 : {
12007 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
12008 0 : if (VECTOR_TYPE_P (type)
12009 0 : && (TREE_CODE_CLASS (UNEQ_EXPR) != tcc_comparison
12010 0 : || types_match (type, TREE_TYPE (captures[2]))
12011 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
12012 : || (optimize_vectors_before_lowering_p ()
12013 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
12014 : )
12015 : {
12016 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1888;
12017 0 : {
12018 0 : tree res_op0;
12019 0 : res_op0 = captures[1];
12020 0 : tree res_op1;
12021 0 : {
12022 0 : tree _o1[2], _r1;
12023 0 : _o1[0] = captures[2];
12024 0 : _o1[1] = captures[5];
12025 0 : _r1 = fold_build2_loc (loc, UNEQ_EXPR, type, _o1[0], _o1[1]);
12026 0 : if (EXPR_P (_r1))
12027 0 : goto next_after_fail1888;
12028 0 : res_op1 = _r1;
12029 : }
12030 0 : tree res_op2;
12031 0 : {
12032 0 : tree _o1[2], _r1;
12033 0 : _o1[0] = captures[3];
12034 0 : _o1[1] = captures[6];
12035 0 : _r1 = fold_build2_loc (loc, UNEQ_EXPR, type, _o1[0], _o1[1]);
12036 0 : if (EXPR_P (_r1))
12037 0 : goto next_after_fail1888;
12038 0 : res_op2 = _r1;
12039 : }
12040 0 : tree _r;
12041 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
12042 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
12043 : return _r;
12044 : }
12045 0 : next_after_fail1888:;
12046 : }
12047 : }
12048 : }
12049 : break;
12050 : }
12051 0 : default:;
12052 : }
12053 0 : {
12054 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
12055 0 : if (VECTOR_TYPE_P (type)
12056 0 : && (TREE_CODE_CLASS (UNEQ_EXPR) != tcc_comparison
12057 0 : || types_match (type, TREE_TYPE (captures[2]))
12058 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
12059 : || (optimize_vectors_before_lowering_p ()
12060 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
12061 : )
12062 : {
12063 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1889;
12064 0 : {
12065 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1889;
12066 0 : tree res_op0;
12067 0 : res_op0 = captures[1];
12068 0 : tree res_op1;
12069 0 : {
12070 0 : tree _o1[2], _r1;
12071 0 : _o1[0] = captures[2];
12072 0 : _o1[1] = unshare_expr (captures[4]);
12073 0 : _r1 = fold_build2_loc (loc, UNEQ_EXPR, type, _o1[0], _o1[1]);
12074 0 : if (EXPR_P (_r1))
12075 0 : goto next_after_fail1889;
12076 0 : res_op1 = _r1;
12077 : }
12078 0 : tree res_op2;
12079 0 : {
12080 0 : tree _o1[2], _r1;
12081 0 : _o1[0] = captures[3];
12082 0 : _o1[1] = captures[4];
12083 0 : _r1 = fold_build2_loc (loc, UNEQ_EXPR, type, _o1[0], _o1[1]);
12084 0 : if (EXPR_P (_r1))
12085 0 : goto next_after_fail1889;
12086 0 : res_op2 = _r1;
12087 : }
12088 0 : tree _r;
12089 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
12090 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
12091 : return _r;
12092 : }
12093 377270 : next_after_fail1889:;
12094 : }
12095 : }
12096 : break;
12097 : }
12098 377270 : default:;
12099 : }
12100 377270 : switch (TREE_CODE (_p1))
12101 : {
12102 0 : case VEC_COND_EXPR:
12103 0 : {
12104 0 : tree _q30 = TREE_OPERAND (_p1, 0);
12105 0 : tree _q31 = TREE_OPERAND (_p1, 1);
12106 0 : tree _q32 = TREE_OPERAND (_p1, 2);
12107 0 : {
12108 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
12109 0 : if (VECTOR_TYPE_P (type)
12110 0 : && (TREE_CODE_CLASS (UNEQ_EXPR) != tcc_comparison
12111 0 : || types_match (type, TREE_TYPE (captures[3]))
12112 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
12113 : || (optimize_vectors_before_lowering_p ()
12114 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
12115 : )
12116 : {
12117 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1890;
12118 0 : {
12119 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1890;
12120 0 : tree res_op0;
12121 0 : res_op0 = captures[2];
12122 0 : tree res_op1;
12123 0 : {
12124 0 : tree _o1[2], _r1;
12125 0 : _o1[0] = unshare_expr (captures[0]);
12126 0 : _o1[1] = captures[3];
12127 0 : _r1 = fold_build2_loc (loc, UNEQ_EXPR, type, _o1[0], _o1[1]);
12128 0 : if (EXPR_P (_r1))
12129 0 : goto next_after_fail1890;
12130 0 : res_op1 = _r1;
12131 : }
12132 0 : tree res_op2;
12133 0 : {
12134 0 : tree _o1[2], _r1;
12135 0 : _o1[0] = captures[0];
12136 0 : _o1[1] = captures[4];
12137 0 : _r1 = fold_build2_loc (loc, UNEQ_EXPR, type, _o1[0], _o1[1]);
12138 0 : if (EXPR_P (_r1))
12139 0 : goto next_after_fail1890;
12140 0 : res_op2 = _r1;
12141 : }
12142 0 : tree _r;
12143 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
12144 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
12145 : return _r;
12146 : }
12147 377270 : next_after_fail1890:;
12148 : }
12149 : }
12150 : break;
12151 : }
12152 377270 : default:;
12153 : }
12154 377270 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
12155 : {
12156 0 : {
12157 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
12158 0 : tree res = generic_simplify_593 (loc, type, _p0, _p1, captures, UNEQ_EXPR);
12159 0 : if (res) return res;
12160 : }
12161 : }
12162 377270 : switch (TREE_CODE (_p0))
12163 : {
12164 0 : case FLOAT_EXPR:
12165 0 : {
12166 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12167 0 : switch (TREE_CODE (_p1))
12168 : {
12169 0 : case FLOAT_EXPR:
12170 0 : {
12171 0 : tree _q40 = TREE_OPERAND (_p1, 0);
12172 0 : {
12173 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
12174 0 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, UNEQ_EXPR, EQ_EXPR);
12175 0 : if (res) return res;
12176 : }
12177 0 : break;
12178 : }
12179 : default:;
12180 : }
12181 : break;
12182 : }
12183 0 : case NEGATE_EXPR:
12184 0 : {
12185 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12186 0 : switch (TREE_CODE (_p1))
12187 : {
12188 0 : case NEGATE_EXPR:
12189 0 : {
12190 0 : tree _q40 = TREE_OPERAND (_p1, 0);
12191 0 : {
12192 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
12193 0 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, UNEQ_EXPR, UNEQ_EXPR);
12194 0 : if (res) return res;
12195 : }
12196 0 : break;
12197 : }
12198 0 : default:;
12199 : }
12200 0 : if (CONSTANT_CLASS_P (_p1))
12201 : {
12202 0 : {
12203 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
12204 0 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, UNEQ_EXPR, UNEQ_EXPR);
12205 0 : if (res) return res;
12206 : }
12207 : }
12208 : break;
12209 : }
12210 377270 : default:;
12211 : }
12212 377270 : switch (TREE_CODE (_p1))
12213 : {
12214 154 : case REAL_CST:
12215 154 : {
12216 154 : {
12217 154 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
12218 154 : tree res = generic_simplify_591 (loc, type, _p0, _p1, captures, UNEQ_EXPR);
12219 154 : if (res) return res;
12220 : }
12221 152 : break;
12222 : }
12223 : default:;
12224 : }
12225 : return NULL_TREE;
12226 : }
12227 :
12228 : tree
12229 945539 : generic_simplify_BIT_FIELD_REF (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
12230 : {
12231 945539 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
12232 945539 : switch (TREE_CODE (_p0))
12233 : {
12234 16 : case BIT_FIELD_REF:
12235 16 : {
12236 16 : tree _q20 = TREE_OPERAND (_p0, 0);
12237 16 : tree _q21 = TREE_OPERAND (_p0, 1);
12238 16 : tree _q22 = TREE_OPERAND (_p0, 2);
12239 16 : {
12240 16 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
12241 16 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2054;
12242 16 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail2054;
12243 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2054;
12244 16 : {
12245 16 : tree res_op0;
12246 16 : res_op0 = captures[0];
12247 16 : tree res_op1;
12248 16 : res_op1 = captures[3];
12249 16 : tree res_op2;
12250 16 : res_op2 = const_binop (PLUS_EXPR, bitsizetype, captures[2], captures[4]);
12251 16 : tree _r;
12252 16 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12253 16 : if (TREE_SIDE_EFFECTS (captures[1]))
12254 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12255 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1127, __FILE__, __LINE__, true);
12256 : return _r;
12257 : }
12258 945523 : next_after_fail2054:;
12259 : }
12260 : break;
12261 : }
12262 3 : case VIEW_CONVERT_EXPR:
12263 3 : {
12264 3 : tree _q20 = TREE_OPERAND (_p0, 0);
12265 3 : {
12266 3 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
12267 6 : if (! INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
12268 6 : || type_has_mode_precision_p (TREE_TYPE (captures[0]))
12269 : )
12270 : {
12271 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2055;
12272 0 : {
12273 0 : tree res_op0;
12274 0 : res_op0 = captures[0];
12275 0 : tree res_op1;
12276 0 : res_op1 = captures[1];
12277 0 : tree res_op2;
12278 0 : res_op2 = captures[2];
12279 0 : tree _r;
12280 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12281 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1128, __FILE__, __LINE__, true);
12282 : return _r;
12283 : }
12284 0 : next_after_fail2055:;
12285 : }
12286 : }
12287 : break;
12288 : }
12289 945523 : default:;
12290 : }
12291 945523 : if (integer_zerop (_p2))
12292 : {
12293 313526 : {
12294 313526 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
12295 313526 : if (tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (captures[0])))
12296 : )
12297 : {
12298 2665 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail2056;
12299 2665 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2056;
12300 2665 : {
12301 2665 : tree res_op0;
12302 2665 : res_op0 = captures[0];
12303 2665 : tree _r;
12304 2665 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12305 2665 : if (TREE_SIDE_EFFECTS (captures[1]))
12306 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12307 2665 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1129, __FILE__, __LINE__, true);
12308 : return _r;
12309 : }
12310 942858 : next_after_fail2056:;
12311 : }
12312 : }
12313 : }
12314 942858 : {
12315 942858 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
12316 942858 : if (TREE_CODE (TREE_TYPE (captures[0])) == COMPLEX_TYPE
12317 942858 : && tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
12318 : )
12319 : {
12320 2 : if (integer_zerop (captures[2])
12321 : )
12322 : {
12323 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2057;
12324 0 : {
12325 0 : tree res_op0;
12326 0 : {
12327 0 : tree _o1[1], _r1;
12328 0 : _o1[0] = captures[0];
12329 0 : _r1 = fold_build1_loc (loc, REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
12330 0 : res_op0 = _r1;
12331 : }
12332 0 : tree _r;
12333 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12334 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12335 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12336 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12337 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12338 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1130, __FILE__, __LINE__, true);
12339 : return _r;
12340 : }
12341 0 : next_after_fail2057:;
12342 : }
12343 : else
12344 : {
12345 2 : if (tree_int_cst_equal (captures[2], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
12346 : )
12347 : {
12348 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2058;
12349 0 : {
12350 0 : tree res_op0;
12351 0 : {
12352 0 : tree _o1[1], _r1;
12353 0 : _o1[0] = captures[0];
12354 0 : _r1 = fold_build1_loc (loc, IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
12355 0 : res_op0 = _r1;
12356 : }
12357 0 : tree _r;
12358 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12359 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12360 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12361 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12362 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12363 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1131, __FILE__, __LINE__, true);
12364 : return _r;
12365 : }
12366 0 : next_after_fail2058:;
12367 : }
12368 : }
12369 : }
12370 : else
12371 : {
12372 1885650 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
12373 20593 : && INTEGRAL_TYPE_P (type)
12374 : && (!
12375 :
12376 : || is_gimple_reg (captures[0]))
12377 962502 : && ((compare_tree_int (captures[1], TYPE_PRECISION (TREE_TYPE (captures[0]))) == 0
12378 0 : && integer_zerop (captures[2]))
12379 : || (BYTES_BIG_ENDIAN == WORDS_BIG_ENDIAN
12380 : && canonicalize_math_after_vectorization_p ()
12381 : && TYPE_PRECISION (TREE_TYPE (captures[0])) % BITS_PER_UNIT == 0
12382 : && TYPE_PRECISION (type) % BITS_PER_UNIT == 0
12383 : && compare_tree_int (captures[2], (BYTES_BIG_ENDIAN
12384 : ? (TYPE_PRECISION (TREE_TYPE (captures[0]))
12385 : - TYPE_PRECISION (type))
12386 : : 0)) == 0))
12387 : )
12388 : {
12389 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2059;
12390 0 : {
12391 0 : tree res_op0;
12392 0 : res_op0 = captures[0];
12393 0 : tree _r;
12394 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
12395 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12396 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12397 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12398 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12399 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1132, __FILE__, __LINE__, true);
12400 : return _r;
12401 : }
12402 0 : next_after_fail2059:;
12403 : }
12404 : }
12405 : }
12406 942858 : switch (TREE_CODE (_p0))
12407 : {
12408 2289 : case CONSTRUCTOR:
12409 2289 : {
12410 2289 : {
12411 2289 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
12412 2289 : if (VECTOR_TYPE_P (TREE_TYPE (captures[0]))
12413 2289 : && tree_fits_uhwi_p (TYPE_SIZE (type))
12414 4578 : && ((tree_to_uhwi (TYPE_SIZE (type))
12415 2289 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))
12416 0 : || (VECTOR_TYPE_P (type)
12417 0 : && (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (type)))
12418 0 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))))
12419 : )
12420 : {
12421 2289 : {
12422 2289 : tree ctor = (TREE_CODE (captures[0]) == SSA_NAME
12423 : ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])) : captures[0]);
12424 2289 : tree eltype = TREE_TYPE (TREE_TYPE (ctor));
12425 2289 : unsigned HOST_WIDE_INT width = tree_to_uhwi (TYPE_SIZE (eltype));
12426 2289 : unsigned HOST_WIDE_INT n = tree_to_uhwi (captures[1]);
12427 2289 : unsigned HOST_WIDE_INT idx = tree_to_uhwi (captures[2]);
12428 2289 : if (n != 0
12429 2289 : && (idx % width) == 0
12430 2289 : && (n % width) == 0
12431 4578 : && known_le ((idx + n) / width,
12432 : TYPE_VECTOR_SUBPARTS (TREE_TYPE (ctor)))
12433 : )
12434 : {
12435 2289 : {
12436 2289 : idx = idx / width;
12437 2289 : n = n / width;
12438 2289 : poly_uint64 k = 1;
12439 2289 : if (CONSTRUCTOR_NELTS (ctor) != 0)
12440 : {
12441 2289 : tree cons_elem = TREE_TYPE (CONSTRUCTOR_ELT (ctor, 0)->value);
12442 2289 : if (TREE_CODE (cons_elem) == VECTOR_TYPE)
12443 2289 : k = TYPE_VECTOR_SUBPARTS (cons_elem);
12444 : }
12445 2289 : unsigned HOST_WIDE_INT elt, count, const_k;
12446 2289 : if (multiple_p (idx, k, &elt) && multiple_p (n, k, &count)
12447 : )
12448 : {
12449 12 : if (CONSTRUCTOR_NELTS (ctor) == 0
12450 : )
12451 : {
12452 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2060;
12453 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2060;
12454 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2060;
12455 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2060;
12456 0 : {
12457 0 : tree _r;
12458 0 : _r = build_zero_cst (type);
12459 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1133, __FILE__, __LINE__, true);
12460 945539 : return _r;
12461 : }
12462 945539 : next_after_fail2060:;
12463 : }
12464 : else
12465 : {
12466 12 : if (count == 1
12467 : )
12468 : {
12469 12 : if (elt < CONSTRUCTOR_NELTS (ctor)
12470 : )
12471 : {
12472 12 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2061;
12473 12 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2061;
12474 12 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2061;
12475 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2061;
12476 12 : {
12477 12 : tree res_op0;
12478 12 : res_op0 = CONSTRUCTOR_ELT (ctor, elt)->value;
12479 12 : tree _r;
12480 12 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12481 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1134, __FILE__, __LINE__, true);
12482 : return _r;
12483 : }
12484 945539 : next_after_fail2061:;
12485 : }
12486 : else
12487 : {
12488 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2062;
12489 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2062;
12490 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2062;
12491 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2062;
12492 0 : {
12493 0 : tree _r;
12494 0 : _r = build_zero_cst (type);
12495 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1135, __FILE__, __LINE__, true);
12496 : return _r;
12497 : }
12498 945539 : next_after_fail2062:;
12499 : }
12500 : }
12501 : else
12502 : {
12503 0 : if (single_use (captures[0])
12504 : )
12505 : {
12506 0 : {
12507 0 : vec<constructor_elt, va_gc> *vals;
12508 0 : vec_alloc (vals, count);
12509 0 : bool constant_p = true;
12510 0 : tree res;
12511 0 : for (unsigned i = 0;
12512 0 : i < count && elt + i < CONSTRUCTOR_NELTS (ctor); ++i)
12513 : {
12514 0 : tree e = CONSTRUCTOR_ELT (ctor, elt + i)->value;
12515 0 : CONSTRUCTOR_APPEND_ELT (vals, NULL_TREE, e);
12516 0 : if (!CONSTANT_CLASS_P (e))
12517 0 : constant_p = false;
12518 : }
12519 0 : tree evtype = (types_match (TREE_TYPE (type),
12520 0 : TREE_TYPE (TREE_TYPE (ctor)))
12521 0 : ? type
12522 0 : : build_vector_type (TREE_TYPE (TREE_TYPE (ctor)),
12523 0 : count * k));
12524 0 : res = (constant_p ? build_vector_from_ctor (evtype, vals)
12525 : : (
12526 :
12527 0 : ? NULL_TREE : build_constructor (evtype, vals)));
12528 0 : if (res
12529 : )
12530 : {
12531 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2063;
12532 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2063;
12533 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2063;
12534 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2063;
12535 0 : {
12536 0 : tree res_op0;
12537 0 : res_op0 = res;
12538 0 : tree _r;
12539 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12540 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1136, __FILE__, __LINE__, true);
12541 0 : return _r;
12542 : }
12543 0 : next_after_fail2063:;
12544 : }
12545 : }
12546 : }
12547 : }
12548 : }
12549 : }
12550 : else
12551 : {
12552 2277 : if (k.is_constant (&const_k)
12553 2277 : && idx + n <= (idx / const_k + 1) * const_k
12554 : )
12555 : {
12556 2277 : if (CONSTRUCTOR_NELTS (ctor) <= idx / const_k
12557 : )
12558 : {
12559 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2064;
12560 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2064;
12561 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2064;
12562 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2064;
12563 0 : {
12564 0 : tree _r;
12565 0 : _r = build_zero_cst (type);
12566 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1137, __FILE__, __LINE__, true);
12567 : return _r;
12568 : }
12569 945539 : next_after_fail2064:;
12570 : }
12571 : else
12572 : {
12573 2277 : if (n == const_k
12574 : )
12575 : {
12576 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2065;
12577 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2065;
12578 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2065;
12579 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2065;
12580 0 : {
12581 0 : tree res_op0;
12582 0 : res_op0 = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
12583 0 : tree _r;
12584 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
12585 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1138, __FILE__, __LINE__, true);
12586 : return _r;
12587 : }
12588 945539 : next_after_fail2065:;
12589 : }
12590 : else
12591 : {
12592 2277 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2066;
12593 2277 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2066;
12594 2277 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2066;
12595 2277 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2066;
12596 2277 : {
12597 2277 : tree res_op0;
12598 2277 : res_op0 = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
12599 2277 : tree res_op1;
12600 2277 : res_op1 = captures[1];
12601 2277 : tree res_op2;
12602 2277 : res_op2 = bitsize_int ((idx % const_k) * width);
12603 2277 : tree _r;
12604 2277 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12605 2277 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1139, __FILE__, __LINE__, true);
12606 : return _r;
12607 : }
12608 945539 : next_after_fail2066:;
12609 : }
12610 : }
12611 : }
12612 : }
12613 : }
12614 : }
12615 : }
12616 : }
12617 : }
12618 : break;
12619 : }
12620 0 : case VEC_PERM_EXPR:
12621 0 : {
12622 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12623 0 : tree _q21 = TREE_OPERAND (_p0, 1);
12624 0 : tree _q22 = TREE_OPERAND (_p0, 2);
12625 0 : switch (TREE_CODE (_q22))
12626 : {
12627 0 : case VECTOR_CST:
12628 0 : {
12629 0 : {
12630 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _p2 };
12631 0 : {
12632 0 : tree elem_type = TREE_TYPE (TREE_TYPE (captures[0]));
12633 0 : poly_uint64 elem_size = tree_to_poly_uint64 (TYPE_SIZE (elem_type));
12634 0 : poly_uint64 size = tree_to_poly_uint64 (TYPE_SIZE (type));
12635 0 : unsigned HOST_WIDE_INT nelts, idx;
12636 0 : unsigned HOST_WIDE_INT nelts_op = 0;
12637 0 : if (constant_multiple_p (tree_to_poly_uint64 (captures[5]), elem_size, &idx)
12638 0 : && VECTOR_CST_NELTS (captures[3]).is_constant (&nelts)
12639 0 : && (known_eq (size, elem_size)
12640 0 : || (constant_multiple_p (size, elem_size, &nelts_op)
12641 0 : && pow2p_hwi (nelts_op)))
12642 : )
12643 : {
12644 0 : {
12645 0 : bool ok = true;
12646 0 : if (known_eq (size, elem_size))
12647 0 : idx = TREE_INT_CST_LOW (VECTOR_CST_ELT (captures[3], idx)) % (2 * nelts);
12648 : else
12649 : {
12650 0 : unsigned start
12651 0 : = TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx)) % (2 * nelts);
12652 0 : unsigned end
12653 0 : = (TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + nelts_op - 1))
12654 0 : % (2 * nelts));
12655 0 : if ((start < nelts) != (end < nelts))
12656 : ok = false;
12657 : else
12658 0 : for (unsigned HOST_WIDE_INT i = 1; i != nelts_op; i++)
12659 : {
12660 0 : if ((TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + i))
12661 0 : % (2 * nelts) - 1)
12662 0 : != (TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + i - 1))
12663 0 : % (2 * nelts)))
12664 : {
12665 : ok = false;
12666 : break;
12667 : }
12668 : }
12669 0 : if (start % nelts_op)
12670 : ok = false;
12671 0 : idx = start;
12672 : }
12673 0 : if (ok
12674 : )
12675 : {
12676 0 : if (idx < nelts
12677 : )
12678 : {
12679 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail2067;
12680 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2067;
12681 0 : {
12682 0 : tree res_op0;
12683 0 : res_op0 = captures[1];
12684 0 : tree res_op1;
12685 0 : res_op1 = captures[4];
12686 0 : tree res_op2;
12687 0 : res_op2 = bitsize_int (idx * elem_size);
12688 0 : tree _r;
12689 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12690 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12691 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12692 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12693 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12694 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1140, __FILE__, __LINE__, true);
12695 945539 : return _r;
12696 : }
12697 945539 : next_after_fail2067:;
12698 : }
12699 : else
12700 : {
12701 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail2068;
12702 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2068;
12703 0 : {
12704 0 : tree res_op0;
12705 0 : res_op0 = captures[2];
12706 0 : tree res_op1;
12707 0 : res_op1 = captures[4];
12708 0 : tree res_op2;
12709 0 : res_op2 = bitsize_int ((idx - nelts) * elem_size);
12710 0 : tree _r;
12711 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12712 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12713 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12714 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12715 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12716 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1141, __FILE__, __LINE__, true);
12717 : return _r;
12718 : }
12719 945539 : next_after_fail2068:;
12720 : }
12721 : }
12722 : }
12723 : }
12724 : }
12725 : }
12726 : break;
12727 : }
12728 : default:;
12729 : }
12730 : break;
12731 : }
12732 0 : case BIT_INSERT_EXPR:
12733 0 : {
12734 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12735 0 : tree _q21 = TREE_OPERAND (_p0, 1);
12736 0 : tree _q22 = TREE_OPERAND (_p0, 2);
12737 0 : {
12738 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
12739 0 : {
12740 0 : unsigned HOST_WIDE_INT isize;
12741 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1])))
12742 0 : isize = TYPE_PRECISION (TREE_TYPE (captures[1]));
12743 : else
12744 0 : isize = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (captures[1])));
12745 0 : if ((!INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
12746 0 : || type_has_mode_precision_p (TREE_TYPE (captures[1])))
12747 0 : && wi::leu_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
12748 0 : && wi::leu_p (wi::to_wide (captures[4]) + wi::to_wide (captures[3]),
12749 0 : wi::to_wide (captures[2]) + isize)
12750 : )
12751 : {
12752 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2069;
12753 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail2069;
12754 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2069;
12755 0 : {
12756 0 : tree res_op0;
12757 0 : res_op0 = captures[1];
12758 0 : tree res_op1;
12759 0 : res_op1 = captures[3];
12760 0 : tree res_op2;
12761 0 : res_op2 = wide_int_to_tree (bitsizetype,
12762 0 : wi::to_wide (captures[4])
12763 0 : - wi::to_wide (captures[2]));
12764 0 : tree _r;
12765 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12766 0 : if (TREE_SIDE_EFFECTS (captures[0]))
12767 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
12768 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1142, __FILE__, __LINE__, true);
12769 0 : return _r;
12770 : }
12771 0 : next_after_fail2069:;
12772 : }
12773 : else
12774 : {
12775 0 : if (wi::eq_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
12776 0 : && compare_tree_int (captures[3], isize) == 0
12777 : )
12778 : {
12779 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2070;
12780 0 : {
12781 0 : tree res_op0;
12782 0 : res_op0 = captures[1];
12783 0 : tree _r;
12784 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
12785 0 : if (TREE_SIDE_EFFECTS (captures[0]))
12786 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
12787 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12788 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12789 0 : if (TREE_SIDE_EFFECTS (captures[3]))
12790 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
12791 0 : if (TREE_SIDE_EFFECTS (captures[4]))
12792 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
12793 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1143, __FILE__, __LINE__, true);
12794 : return _r;
12795 : }
12796 0 : next_after_fail2070:;
12797 : }
12798 : else
12799 : {
12800 0 : if (wi::geu_p (wi::to_wide (captures[2]),
12801 0 : wi::to_wide (captures[4]) + wi::to_wide (captures[3]))
12802 0 : || wi::geu_p (wi::to_wide (captures[4]),
12803 0 : wi::to_wide (captures[2]) + isize)
12804 : )
12805 : {
12806 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2071;
12807 0 : {
12808 0 : tree res_op0;
12809 0 : res_op0 = captures[0];
12810 0 : tree res_op1;
12811 0 : res_op1 = captures[3];
12812 0 : tree res_op2;
12813 0 : res_op2 = captures[4];
12814 0 : tree _r;
12815 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12816 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12817 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12818 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12819 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12820 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1144, __FILE__, __LINE__, true);
12821 : return _r;
12822 : }
12823 0 : next_after_fail2071:;
12824 : }
12825 : }
12826 : }
12827 : }
12828 : }
12829 0 : break;
12830 : }
12831 : default:;
12832 : }
12833 : return NULL_TREE;
12834 : }
12835 : #pragma GCC diagnostic pop
|