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 126112821 : tree_bit_not_with_nop (tree t, tree *res_ops)
11 : {
12 126112821 : const tree type = TREE_TYPE (t);
13 126112821 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 126112821 : if (TREE_SIDE_EFFECTS (t)) return false;
15 126112821 : switch (TREE_CODE (t))
16 : {
17 144523 : case BIT_NOT_EXPR:
18 144523 : {
19 144523 : tree _p0 = TREE_OPERAND (t, 0);
20 144523 : {
21 144523 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
22 144523 : {
23 144523 : res_ops[0] = captures[0];
24 144523 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 2, __FILE__, __LINE__, false);
25 : return true;
26 : }
27 : }
28 25298943 : break;
29 : }
30 25298943 : CASE_CONVERT:
31 25298943 : {
32 25298943 : tree _p0 = TREE_OPERAND (t, 0);
33 25298943 : switch (TREE_CODE (_p0))
34 : {
35 1136 : case BIT_NOT_EXPR:
36 1136 : {
37 1136 : tree _q20 = TREE_OPERAND (_p0, 0);
38 1136 : {
39 1136 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
40 1136 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
41 : )
42 : {
43 623 : {
44 623 : res_ops[0] = captures[0];
45 623 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 3, __FILE__, __LINE__, false);
46 623 : return true;
47 : }
48 : }
49 : }
50 : break;
51 : }
52 : default:;
53 : }
54 : break;
55 : }
56 : default:;
57 : }
58 : return false;
59 : }
60 :
61 : bool
62 93421389 : tree_with_known_nonzero_bits_1 (tree t)
63 : {
64 93421389 : const tree type = TREE_TYPE (t);
65 93421389 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
66 93421389 : if (TREE_SIDE_EFFECTS (t)) return false;
67 93421389 : switch (TREE_CODE (t))
68 : {
69 20744734 : case INTEGER_CST:
70 20744734 : {
71 20744734 : {
72 20744734 : tree captures[1] ATTRIBUTE_UNUSED = { t };
73 20744734 : {
74 20744734 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 37, __FILE__, __LINE__, false);
75 20744734 : return true;
76 : }
77 : }
78 27813938 : break;
79 : }
80 27813938 : case SSA_NAME:
81 27813938 : {
82 27813938 : {
83 27813938 : tree captures[1] ATTRIBUTE_UNUSED = { t };
84 27813938 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
85 : )
86 : {
87 19585756 : {
88 19585756 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 38, __FILE__, __LINE__, false);
89 19585756 : return true;
90 : }
91 : }
92 : }
93 : break;
94 : }
95 : default:;
96 : }
97 : return false;
98 : }
99 :
100 : bool
101 0 : tree_compositional_complex (tree t)
102 : {
103 0 : const tree type = TREE_TYPE (t);
104 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
105 0 : if (TREE_SIDE_EFFECTS (t)) return false;
106 0 : switch (TREE_CODE (t))
107 : {
108 0 : CASE_CONVERT:
109 0 : {
110 0 : tree _p0 = TREE_OPERAND (t, 0);
111 0 : switch (TREE_CODE (_p0))
112 : {
113 0 : case COMPLEX_EXPR:
114 0 : {
115 0 : tree _q20 = TREE_OPERAND (_p0, 0);
116 0 : tree _q21 = TREE_OPERAND (_p0, 1);
117 0 : {
118 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
119 0 : {
120 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 43, __FILE__, __LINE__, false);
121 0 : return true;
122 : }
123 : }
124 : break;
125 : }
126 : default:;
127 : }
128 : break;
129 : }
130 0 : case COMPLEX_EXPR:
131 0 : {
132 0 : tree _p0 = TREE_OPERAND (t, 0);
133 0 : tree _p1 = TREE_OPERAND (t, 1);
134 0 : {
135 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
136 0 : {
137 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 43, __FILE__, __LINE__, false);
138 0 : return true;
139 : }
140 : }
141 : break;
142 : }
143 : default:;
144 : }
145 : return false;
146 : }
147 :
148 : tree
149 508 : generic_simplify_11 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
150 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
151 : const enum tree_code ARG_UNUSED (op))
152 : {
153 508 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
154 508 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
155 508 : && tree_nop_conversion_p (type, TREE_TYPE (captures[4]))
156 1016 : && (wi::to_wide (captures[2]) & wi::to_wide (captures[5])) == 0
157 : )
158 : {
159 101 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail83;
160 101 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail83;
161 101 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail83;
162 101 : {
163 101 : tree res_op0;
164 101 : {
165 101 : tree _o1[1], _r1;
166 101 : _o1[0] = captures[0];
167 101 : if (TREE_TYPE (_o1[0]) != type)
168 : {
169 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
170 : }
171 : else
172 : _r1 = _o1[0];
173 101 : res_op0 = _r1;
174 : }
175 101 : tree res_op1;
176 101 : {
177 101 : tree _o1[1], _r1;
178 101 : _o1[0] = captures[3];
179 101 : if (TREE_TYPE (_o1[0]) != type)
180 : {
181 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
182 : }
183 : else
184 : _r1 = _o1[0];
185 101 : res_op1 = _r1;
186 : }
187 101 : tree _r;
188 101 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
189 101 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 60, __FILE__, __LINE__, true);
190 101 : return _r;
191 : }
192 : next_after_fail83:;
193 : }
194 : return NULL_TREE;
195 : }
196 :
197 : tree
198 7 : generic_simplify_21 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
199 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
200 : {
201 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
202 7 : if (!TYPE_SATURATING (type)
203 : )
204 : {
205 7 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
206 14 : && !FIXED_POINT_TYPE_P (type)
207 : )
208 : {
209 7 : if (TYPE_OVERFLOW_UNDEFINED (type)
210 14 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
211 : )
212 : {
213 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail101;
214 7 : {
215 7 : tree res_op0;
216 7 : res_op0 = captures[2];
217 7 : tree res_op1;
218 7 : res_op1 = captures[1];
219 7 : tree _r;
220 7 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
221 7 : if (TREE_SIDE_EFFECTS (captures[0]))
222 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
223 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 78, __FILE__, __LINE__, true);
224 7 : return _r;
225 : }
226 0 : next_after_fail101:;
227 : }
228 : }
229 : }
230 : return NULL_TREE;
231 : }
232 :
233 : tree
234 3708475 : generic_simplify_28 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
235 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
236 : {
237 3708475 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
238 3708475 : if (!TYPE_SATURATING (type)
239 3708475 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
240 : )
241 : {
242 3708475 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
243 : )
244 : {
245 7416950 : if (TREE_CODE (type) == INTEGER_TYPE
246 3708475 : && wi::neg_p (wi::to_wide (captures[3]))
247 11125425 : && wi::to_wide (captures[3]) != wi::min_value (TYPE_PRECISION (type), SIGNED)
248 : )
249 : {
250 912925 : {
251 912925 : wide_int c0 = wi::to_wide (captures[1]);
252 912925 : wide_int c2 = wi::to_wide (captures[3]);
253 912925 : wide_int c2_abs = wi::abs (c2);
254 912925 : if (wi::multiple_of_p (c2_abs, c0, TYPE_SIGN (type))
255 : )
256 : {
257 447642 : {
258 447642 : wide_int div_res = wi::sdiv_trunc (c2, c0);
259 447642 : tree div_cst = wide_int_to_tree (type, div_res);
260 447642 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail109;
261 447642 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail109;
262 447642 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail109;
263 447642 : {
264 447642 : tree res_op0;
265 447642 : {
266 447642 : tree _o1[2], _r1;
267 447642 : _o1[0] = captures[2];
268 447642 : _o1[1] = div_cst;
269 447642 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
270 447642 : res_op0 = _r1;
271 : }
272 447642 : tree res_op1;
273 447642 : res_op1 = captures[1];
274 447642 : tree _r;
275 447642 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
276 447642 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 86, __FILE__, __LINE__, true);
277 447642 : return _r;
278 : }
279 0 : next_after_fail109:;
280 447642 : }
281 : }
282 912925 : }
283 : }
284 : }
285 : }
286 : return NULL_TREE;
287 : }
288 :
289 : tree
290 0 : generic_simplify_38 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
291 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
292 : {
293 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
294 0 : if (TREE_CODE (captures[1]) == SSA_NAME && num_imm_uses (captures[1]) == 2
295 : )
296 : {
297 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail120;
298 0 : {
299 0 : if (! tree_invariant_p (captures[2])) goto next_after_fail120;
300 0 : tree res_op0;
301 0 : {
302 0 : tree _o1[2], _r1;
303 0 : {
304 0 : tree _o2[3], _r2;
305 0 : _o2[0] = unshare_expr (captures[2]);
306 0 : _o2[1] = captures[2];
307 0 : _o2[2] = captures[4];
308 0 : _r2 = fold_build3_loc (loc, VEC_PERM_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1], _o2[2]);
309 0 : _o1[0] = _r2;
310 : }
311 0 : _o1[1] = captures[3];
312 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
313 0 : res_op0 = _r1;
314 : }
315 0 : tree res_op1;
316 0 : res_op1 = captures[5];
317 0 : tree _r;
318 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
319 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 97, __FILE__, __LINE__, true);
320 0 : return _r;
321 : }
322 : next_after_fail120:;
323 : }
324 : return NULL_TREE;
325 : }
326 :
327 : tree
328 1 : generic_simplify_45 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
329 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
330 : {
331 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
332 1 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
333 1 : && !TYPE_SATURATING (type) && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
334 1 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[0]))
335 2 : && !TYPE_SATURATING (TREE_TYPE (captures[0]))
336 : )
337 : {
338 1 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail127;
339 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail127;
340 1 : {
341 1 : tree res_op0;
342 1 : {
343 1 : tree _o1[1], _r1;
344 1 : {
345 1 : tree _o2[2], _r2;
346 1 : _o2[0] = captures[1];
347 1 : _o2[1] = captures[2];
348 1 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
349 1 : _o1[0] = _r2;
350 : }
351 1 : if (TREE_TYPE (_o1[0]) != type)
352 : {
353 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
354 : }
355 : else
356 : _r1 = _o1[0];
357 1 : res_op0 = _r1;
358 : }
359 1 : tree _r;
360 1 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
361 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 104, __FILE__, __LINE__, true);
362 1 : return _r;
363 : }
364 : next_after_fail127:;
365 : }
366 : return NULL_TREE;
367 : }
368 :
369 : tree
370 10225 : generic_simplify_58 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
371 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
372 : {
373 10225 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
374 10225 : if (!TYPE_SATURATING (type)
375 : )
376 : {
377 10225 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
378 20450 : && !FIXED_POINT_TYPE_P (type)
379 : )
380 : {
381 10225 : if (INTEGRAL_TYPE_P (type)
382 10225 : && TYPE_OVERFLOW_UNDEFINED (type)
383 3112 : && TREE_CODE (captures[1]) != INTEGER_CST
384 11261 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
385 : )
386 : {
387 1036 : {
388 1036 : tree utype = unsigned_type_for (type);
389 1036 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail144;
390 1036 : {
391 1036 : tree res_op0;
392 1036 : {
393 1036 : tree _o1[1], _r1;
394 1036 : {
395 1036 : tree _o2[1], _r2;
396 1036 : _o2[0] = captures[1];
397 1036 : if (TREE_TYPE (_o2[0]) != utype)
398 : {
399 1036 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
400 : }
401 : else
402 : _r2 = _o2[0];
403 1036 : _o1[0] = _r2;
404 : }
405 1036 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
406 1036 : res_op0 = _r1;
407 : }
408 1036 : tree _r;
409 1036 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
410 1036 : if (TREE_SIDE_EFFECTS (captures[2]))
411 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
412 1036 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 120, __FILE__, __LINE__, true);
413 1036 : return _r;
414 : }
415 0 : next_after_fail144:;
416 : }
417 : }
418 : else
419 : {
420 9189 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
421 9189 : || (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
422 2343 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
423 : )
424 : {
425 8920 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail145;
426 8920 : {
427 8920 : tree res_op0;
428 8920 : {
429 8920 : tree _o1[1], _r1;
430 8920 : _o1[0] = captures[1];
431 8920 : if (TREE_TYPE (_o1[0]) != type)
432 : {
433 8920 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
434 : }
435 : else
436 : _r1 = _o1[0];
437 8920 : res_op0 = _r1;
438 : }
439 8920 : tree _r;
440 8920 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
441 8920 : if (TREE_SIDE_EFFECTS (captures[2]))
442 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
443 8920 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 121, __FILE__, __LINE__, true);
444 8920 : return _r;
445 : }
446 0 : next_after_fail145:;
447 : }
448 : }
449 : }
450 : }
451 : return NULL_TREE;
452 : }
453 :
454 : tree
455 0 : generic_simplify_73 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
456 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
457 : {
458 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
459 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail161;
460 0 : {
461 0 : tree res_op0;
462 0 : res_op0 = captures[0];
463 0 : tree res_op1;
464 0 : {
465 0 : tree _o1[1], _r1;
466 0 : _o1[0] = captures[2];
467 0 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
468 0 : res_op1 = _r1;
469 : }
470 0 : tree _r;
471 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
472 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 136, __FILE__, __LINE__, true);
473 : return _r;
474 : }
475 0 : next_after_fail161:;
476 0 : return NULL_TREE;
477 : }
478 :
479 : tree
480 0 : generic_simplify_78 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
481 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
482 : const enum tree_code ARG_UNUSED (bit_op))
483 : {
484 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
485 0 : if (bit_op == BIT_AND_EXPR
486 : )
487 : {
488 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail169;
489 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail169;
490 0 : {
491 0 : tree _r;
492 0 : _r = build_zero_cst (type);
493 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 140, __FILE__, __LINE__, true);
494 0 : return _r;
495 : }
496 : next_after_fail169:;
497 : }
498 : else
499 : {
500 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail170;
501 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail170;
502 0 : {
503 0 : tree _r;
504 0 : _r = build_minus_one_cst (type);
505 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 141, __FILE__, __LINE__, true);
506 0 : return _r;
507 : }
508 : next_after_fail170:;
509 : }
510 : return NULL_TREE;
511 : }
512 :
513 : tree
514 1 : generic_simplify_93 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
515 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
516 : {
517 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
518 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail185;
519 1 : {
520 1 : tree res_op0;
521 1 : {
522 1 : tree _o1[2], _r1;
523 1 : _o1[0] = captures[1];
524 1 : _o1[1] = captures[2];
525 1 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
526 1 : res_op0 = _r1;
527 : }
528 1 : tree _r;
529 1 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
530 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 152, __FILE__, __LINE__, true);
531 : return _r;
532 : }
533 0 : next_after_fail185:;
534 0 : return NULL_TREE;
535 : }
536 :
537 : tree
538 1957030 : generic_simplify_103 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
539 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
540 : const enum tree_code ARG_UNUSED (bitop))
541 : {
542 1957030 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
543 1957030 : if (((TREE_CODE (captures[3]) == INTEGER_CST
544 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
545 0 : && (int_fits_type_p (captures[3], TREE_TYPE (captures[1]))
546 0 : || tree_nop_conversion_p (TREE_TYPE (captures[1]), type)))
547 1957030 : || types_match (captures[1], captures[3]))
548 1825551 : && !POINTER_TYPE_P (TREE_TYPE (captures[1]))
549 1825288 : && !VECTOR_TYPE_P (TREE_TYPE (captures[1]))
550 1825288 : && TREE_CODE (TREE_TYPE (captures[1])) != OFFSET_TYPE
551 1825288 : && (bitop != BIT_AND_EXPR ||
552 :
553 : )
554 1957030 : && (
555 1063187 : TYPE_PRECISION (TREE_TYPE (captures[1])) < TYPE_PRECISION (type)
556 : || (
557 :
558 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (type))
559 976814 : || GET_MODE_CLASS (TYPE_MODE (type)) != MODE_INT
560 976814 : || !type_has_mode_precision_p (type)
561 976814 : || (
562 :
563 : && TREE_CODE (captures[3]) != INTEGER_CST
564 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
565 : && single_use (captures[0])
566 : && single_use (captures[2])))
567 : )
568 : {
569 86373 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail199;
570 86373 : {
571 86373 : tree res_op0;
572 86373 : {
573 86373 : tree _o1[2], _r1;
574 86373 : _o1[0] = captures[1];
575 86373 : {
576 86373 : tree _o2[1], _r2;
577 86373 : _o2[0] = captures[3];
578 86373 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o1[0]))
579 : {
580 49728 : _r2 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
581 : }
582 : else
583 : _r2 = _o2[0];
584 86373 : _o1[1] = _r2;
585 : }
586 86373 : _r1 = fold_build2_loc (loc, bitop, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
587 86373 : res_op0 = _r1;
588 : }
589 86373 : tree _r;
590 86373 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
591 86373 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 158, __FILE__, __LINE__, true);
592 86373 : return _r;
593 : }
594 0 : next_after_fail199:;
595 : }
596 : return NULL_TREE;
597 : }
598 :
599 : tree
600 0 : generic_simplify_117 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
601 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
602 : const enum tree_code ARG_UNUSED (op))
603 : {
604 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
605 0 : if (INTEGRAL_TYPE_P (type)
606 0 : && tree_int_cst_sgn (captures[5]) > 0
607 0 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[4])) == 0
608 : )
609 : {
610 0 : {
611 0 : tree t = type;
612 0 : if (!TYPE_OVERFLOW_WRAPS (t))
613 0 : t = unsigned_type_for (t);
614 0 : wide_int wone = wi::one (TYPE_PRECISION (type));
615 0 : wide_int c = wi::add (wi::to_wide (captures[3]),
616 0 : wi::lshift (wone, wi::to_wide (captures[5])));
617 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail214;
618 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail214;
619 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail214;
620 0 : {
621 0 : tree res_op0;
622 0 : {
623 0 : tree _o1[2], _r1;
624 0 : {
625 0 : tree _o2[1], _r2;
626 0 : _o2[0] = captures[2];
627 0 : if (TREE_TYPE (_o2[0]) != t)
628 : {
629 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, t, _o2[0]);
630 : }
631 : else
632 : _r2 = _o2[0];
633 0 : _o1[0] = _r2;
634 : }
635 0 : _o1[1] = wide_int_to_tree (t, c);
636 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, t, _o1[0], _o1[1]);
637 0 : res_op0 = _r1;
638 : }
639 0 : tree _r;
640 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
641 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 167, __FILE__, __LINE__, true);
642 0 : return _r;
643 : }
644 0 : next_after_fail214:;
645 0 : }
646 : }
647 : return NULL_TREE;
648 : }
649 :
650 : tree
651 3 : generic_simplify_128 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
652 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
653 : const enum tree_code ARG_UNUSED (code2),
654 : const enum tree_code ARG_UNUSED (code1))
655 : {
656 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
657 3 : if ((TREE_CODE (captures[2]) == INTEGER_CST
658 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
659 3 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
660 3 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2])))
661 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
662 3 : && bitwise_equal_p (captures[2], captures[5]))
663 : )
664 : {
665 3 : {
666 3 : bool one_before = false;
667 3 : bool one_after = false;
668 3 : int cmp = 0;
669 3 : bool allbits = true;
670 3 : if (TREE_CODE (captures[2]) == INTEGER_CST
671 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
672 : {
673 0 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
674 0 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
675 0 : auto t2 = wi::to_wide (captures[5]);
676 0 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
677 0 : if (cmp < 0
678 0 : && t1 == t2 - 1)
679 : one_before = true;
680 0 : if (cmp > 0
681 0 : && t1 == t2 + 1)
682 : one_after = true;
683 : }
684 3 : bool val;
685 3 : switch (code2)
686 : {
687 0 : case EQ_EXPR: val = (cmp == 0); break;
688 0 : case NE_EXPR: val = (cmp != 0); break;
689 0 : case LT_EXPR: val = (cmp < 0); break;
690 3 : case GT_EXPR: val = (cmp > 0); break;
691 0 : case LE_EXPR: val = (cmp <= 0); break;
692 0 : case GE_EXPR: val = (cmp >= 0); break;
693 0 : default: gcc_unreachable ();
694 : }
695 3 : if (code1 == EQ_EXPR && val
696 : )
697 : {
698 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail231;
699 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail231;
700 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail231;
701 0 : {
702 0 : tree _r;
703 0 : _r = captures[3];
704 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 184, __FILE__, __LINE__, true);
705 0 : return _r;
706 : }
707 : next_after_fail231:;
708 : }
709 : else
710 : {
711 3 : if (code1 == NE_EXPR && val && allbits
712 : )
713 : {
714 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail232;
715 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail232;
716 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail232;
717 0 : {
718 0 : tree _r;
719 0 : _r = constant_boolean_node (true, type);
720 0 : if (TREE_SIDE_EFFECTS (captures[1]))
721 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
722 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 185, __FILE__, __LINE__, true);
723 0 : return _r;
724 : }
725 : next_after_fail232:;
726 : }
727 : else
728 : {
729 3 : if (code1 == NE_EXPR && !val && allbits
730 : )
731 : {
732 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail233;
733 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail233;
734 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail233;
735 0 : {
736 0 : tree _r;
737 0 : _r = captures[0];
738 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 186, __FILE__, __LINE__, true);
739 0 : return _r;
740 : }
741 : next_after_fail233:;
742 : }
743 : else
744 : {
745 3 : if (code1 == EQ_EXPR
746 3 : && code2 == GT_EXPR
747 3 : && cmp == 0
748 3 : && allbits
749 6 : && ((VECTOR_BOOLEAN_TYPE_P (type)
750 3 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
751 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
752 : )
753 : {
754 3 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail234;
755 3 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail234;
756 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail234;
757 3 : {
758 3 : tree res_op0;
759 3 : res_op0 = captures[4];
760 3 : tree res_op1;
761 3 : res_op1 = captures[5];
762 3 : tree _r;
763 3 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
764 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 187, __FILE__, __LINE__, true);
765 3 : return _r;
766 : }
767 : next_after_fail234:;
768 : }
769 : else
770 : {
771 0 : if (code1 == EQ_EXPR
772 0 : && code2 == LT_EXPR
773 0 : && cmp == 0
774 0 : && allbits
775 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
776 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
777 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
778 : )
779 : {
780 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail235;
781 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail235;
782 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail235;
783 0 : {
784 0 : tree res_op0;
785 0 : res_op0 = captures[4];
786 0 : tree res_op1;
787 0 : res_op1 = captures[5];
788 0 : tree _r;
789 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
790 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 188, __FILE__, __LINE__, true);
791 0 : return _r;
792 : }
793 : next_after_fail235:;
794 : }
795 : else
796 : {
797 0 : if (code1 == EQ_EXPR
798 0 : && code2 == GE_EXPR
799 : && one_before
800 0 : && allbits
801 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
802 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
803 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
804 : )
805 : {
806 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail236;
807 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail236;
808 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail236;
809 0 : {
810 0 : tree res_op0;
811 0 : res_op0 = captures[4];
812 0 : tree res_op1;
813 0 : {
814 0 : tree _o1[1], _r1;
815 0 : _o1[0] = captures[2];
816 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
817 : {
818 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
819 : }
820 : else
821 : _r1 = _o1[0];
822 0 : res_op1 = _r1;
823 : }
824 0 : tree _r;
825 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
826 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 189, __FILE__, __LINE__, true);
827 0 : return _r;
828 : }
829 : next_after_fail236:;
830 : }
831 : else
832 : {
833 0 : if (code1 == EQ_EXPR
834 0 : && code2 == LE_EXPR
835 : && one_after
836 0 : && allbits
837 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
838 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
839 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
840 : )
841 : {
842 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail237;
843 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail237;
844 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail237;
845 0 : {
846 0 : tree res_op0;
847 0 : res_op0 = captures[4];
848 0 : tree res_op1;
849 0 : {
850 0 : tree _o1[1], _r1;
851 0 : _o1[0] = captures[2];
852 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
853 : {
854 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
855 : }
856 : else
857 : _r1 = _o1[0];
858 0 : res_op1 = _r1;
859 : }
860 0 : tree _r;
861 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
862 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 190, __FILE__, __LINE__, true);
863 0 : return _r;
864 : }
865 : next_after_fail237:;
866 : }
867 : }
868 : }
869 : }
870 : }
871 : }
872 : }
873 : }
874 : }
875 : return NULL_TREE;
876 : }
877 :
878 : tree
879 731 : generic_simplify_167 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
880 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
881 : {
882 731 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
883 731 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
884 : )
885 : {
886 731 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail302;
887 731 : {
888 731 : tree res_op0;
889 731 : {
890 731 : tree _o1[2], _r1;
891 731 : {
892 731 : tree _o2[1], _r2;
893 731 : _o2[0] = captures[2];
894 731 : if (TREE_TYPE (_o2[0]) != type)
895 : {
896 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o2[0]);
897 : }
898 : else
899 : _r2 = _o2[0];
900 731 : _o1[0] = _r2;
901 : }
902 731 : _o1[1] = captures[3];
903 731 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
904 731 : res_op0 = _r1;
905 : }
906 731 : tree _r;
907 731 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
908 731 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 224, __FILE__, __LINE__, true);
909 731 : return _r;
910 : }
911 0 : next_after_fail302:;
912 : }
913 : return NULL_TREE;
914 : }
915 :
916 : tree
917 11 : generic_simplify_175 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
918 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
919 : const combined_fn ARG_UNUSED (PARITY))
920 : {
921 11 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
922 11 : if (types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[3]))
923 : )
924 : {
925 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail311;
926 10 : {
927 10 : tree res_op0;
928 10 : {
929 10 : tree _o1[2], _r1;
930 10 : _o1[0] = captures[1];
931 10 : _o1[1] = captures[3];
932 10 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
933 10 : res_op0 = _r1;
934 : }
935 10 : tree _r;
936 10 : _r = maybe_build_call_expr_loc (loc, PARITY, type, 1, res_op0);
937 10 : if (!_r)
938 0 : goto next_after_fail311;
939 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 232, __FILE__, __LINE__, true);
940 10 : return _r;
941 : }
942 : next_after_fail311:;
943 : }
944 : else
945 : {
946 2 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
947 2 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[3]))
948 : )
949 : {
950 1 : {
951 1 : tree utype = TREE_TYPE (captures[1]);
952 1 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
953 1 : utype = TREE_TYPE (captures[3]);
954 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail312;
955 1 : {
956 1 : tree res_op0;
957 1 : {
958 1 : tree _o1[2], _r1;
959 1 : {
960 1 : tree _o2[1], _r2;
961 1 : _o2[0] = captures[1];
962 1 : if (TREE_TYPE (_o2[0]) != utype)
963 : {
964 1 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
965 : }
966 : else
967 : _r2 = _o2[0];
968 1 : _o1[0] = _r2;
969 : }
970 1 : {
971 1 : tree _o2[1], _r2;
972 1 : _o2[0] = captures[3];
973 1 : if (TREE_TYPE (_o2[0]) != utype)
974 : {
975 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
976 : }
977 : else
978 : _r2 = _o2[0];
979 1 : _o1[1] = _r2;
980 : }
981 1 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
982 1 : res_op0 = _r1;
983 : }
984 1 : tree _r;
985 1 : _r = maybe_build_call_expr_loc (loc, PARITY, type, 1, res_op0);
986 1 : if (!_r)
987 1 : goto next_after_fail312;
988 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 233, __FILE__, __LINE__, true);
989 0 : return _r;
990 : }
991 : next_after_fail312:;
992 : }
993 : }
994 : }
995 : return NULL_TREE;
996 : }
997 :
998 : tree
999 145052 : generic_simplify_194 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1000 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1001 : {
1002 145052 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1003 145052 : if (TREE_CODE (captures[3]) != INTEGER_CST
1004 : && single_use (captures[0])
1005 145052 : && !integer_zerop (captures[2]) && !integer_minus_onep (captures[2])
1006 : )
1007 : {
1008 145022 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail334;
1009 145022 : {
1010 145022 : tree res_op0;
1011 145022 : {
1012 145022 : tree _o1[2], _r1;
1013 145022 : _o1[0] = captures[1];
1014 145022 : _o1[1] = captures[3];
1015 145022 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1016 145022 : res_op0 = _r1;
1017 : }
1018 145022 : tree res_op1;
1019 145022 : res_op1 = captures[2];
1020 145022 : tree _r;
1021 145022 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1022 145022 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 249, __FILE__, __LINE__, true);
1023 145022 : return _r;
1024 : }
1025 0 : next_after_fail334:;
1026 : }
1027 : return NULL_TREE;
1028 : }
1029 :
1030 : tree
1031 19955 : generic_simplify_203 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1032 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1033 : const enum tree_code ARG_UNUSED (cmp),
1034 : const enum tree_code ARG_UNUSED (mod))
1035 : {
1036 19955 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1037 19955 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1038 : )
1039 : {
1040 19955 : {
1041 19955 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
1042 19955 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail343;
1043 19955 : {
1044 19955 : tree res_op0;
1045 19955 : {
1046 19955 : tree _o1[2], _r1;
1047 19955 : {
1048 19955 : tree _o2[1], _r2;
1049 19955 : _o2[0] = captures[0];
1050 19955 : if (TREE_TYPE (_o2[0]) != utype)
1051 : {
1052 19955 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1053 : }
1054 : else
1055 : _r2 = _o2[0];
1056 19955 : _o1[0] = _r2;
1057 : }
1058 19955 : {
1059 19955 : tree _o2[1], _r2;
1060 19955 : _o2[0] = captures[1];
1061 19955 : if (TREE_TYPE (_o2[0]) != utype)
1062 : {
1063 19955 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1064 : }
1065 : else
1066 : _r2 = _o2[0];
1067 19955 : _o1[1] = _r2;
1068 : }
1069 19955 : _r1 = fold_build2_loc (loc, mod, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1070 19955 : res_op0 = _r1;
1071 : }
1072 19955 : tree res_op1;
1073 19955 : {
1074 19955 : tree _o1[1], _r1;
1075 19955 : _o1[0] = captures[2];
1076 19955 : if (TREE_TYPE (_o1[0]) != utype)
1077 : {
1078 19955 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1079 : }
1080 : else
1081 : _r1 = _o1[0];
1082 19955 : res_op1 = _r1;
1083 : }
1084 19955 : tree _r;
1085 19955 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1086 19955 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 258, __FILE__, __LINE__, true);
1087 19955 : return _r;
1088 : }
1089 0 : next_after_fail343:;
1090 : }
1091 : }
1092 : return NULL_TREE;
1093 : }
1094 :
1095 : tree
1096 43 : generic_simplify_218 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1097 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1098 : const enum tree_code ARG_UNUSED (op))
1099 : {
1100 43 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1101 43 : if (!TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
1102 : )
1103 : {
1104 43 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail374;
1105 43 : {
1106 43 : tree res_op0;
1107 43 : res_op0 = captures[1];
1108 43 : tree res_op1;
1109 43 : res_op1 = captures[3];
1110 43 : tree _r;
1111 43 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1112 43 : if (TREE_SIDE_EFFECTS (captures[2]))
1113 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1114 43 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 288, __FILE__, __LINE__, true);
1115 43 : return _r;
1116 : }
1117 0 : next_after_fail374:;
1118 : }
1119 : return NULL_TREE;
1120 : }
1121 :
1122 : tree
1123 6 : generic_simplify_222 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1124 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1125 : const enum tree_code ARG_UNUSED (neeq))
1126 : {
1127 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1128 6 : {
1129 6 : poly_int64 diff; tree inner_type = TREE_TYPE (captures[1]);
1130 6 : if (ptr_difference_const (captures[0], captures[2], &diff)
1131 : )
1132 : {
1133 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail378;
1134 0 : {
1135 0 : tree res_op0;
1136 0 : {
1137 0 : tree _o1[2], _r1;
1138 0 : _o1[0] = build_int_cst_type (inner_type, diff);
1139 0 : _o1[1] = captures[1];
1140 0 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1141 0 : res_op0 = _r1;
1142 : }
1143 0 : tree res_op1;
1144 0 : res_op1 = captures[3];
1145 0 : tree _r;
1146 0 : _r = fold_build2_loc (loc, neeq, type, res_op0, res_op1);
1147 0 : if (TREE_SIDE_EFFECTS (captures[0]))
1148 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1149 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1150 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1151 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 291, __FILE__, __LINE__, true);
1152 0 : return _r;
1153 : }
1154 0 : next_after_fail378:;
1155 : }
1156 : }
1157 6 : return NULL_TREE;
1158 : }
1159 :
1160 : tree
1161 2 : generic_simplify_234 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1162 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1163 : const enum tree_code ARG_UNUSED (cmp),
1164 : const enum tree_code ARG_UNUSED (icmp))
1165 : {
1166 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1167 2 : if (tree_int_cst_sgn (captures[0]) > 0
1168 : )
1169 : {
1170 2 : {
1171 2 : int c1 = wi::clz (wi::to_wide (captures[0]));
1172 2 : int c2 = wi::clz (wi::to_wide (captures[2]));
1173 2 : if (c1 > c2
1174 : )
1175 : {
1176 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail394;
1177 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail394;
1178 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail394;
1179 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail394;
1180 0 : {
1181 0 : tree _r;
1182 0 : _r = constant_boolean_node (cmp == NE_EXPR ? false : true, type);
1183 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1184 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1185 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 307, __FILE__, __LINE__, true);
1186 0 : return _r;
1187 : }
1188 : next_after_fail394:;
1189 : }
1190 : else
1191 : {
1192 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail395;
1193 2 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail395;
1194 2 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail395;
1195 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail395;
1196 2 : {
1197 2 : tree res_op0;
1198 2 : res_op0 = captures[1];
1199 2 : tree res_op1;
1200 2 : res_op1 = build_int_cst (TREE_TYPE (captures[1]), c2 - c1);
1201 2 : tree _r;
1202 2 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
1203 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 308, __FILE__, __LINE__, true);
1204 2 : return _r;
1205 : }
1206 : next_after_fail395:;
1207 : }
1208 : }
1209 : }
1210 : return NULL_TREE;
1211 : }
1212 :
1213 : tree
1214 180 : generic_simplify_243 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1215 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1216 : const enum tree_code ARG_UNUSED (cmp),
1217 : const enum tree_code ARG_UNUSED (icmp),
1218 : const enum tree_code ARG_UNUSED (ncmp))
1219 : {
1220 180 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1221 180 : if (types_match (type, TREE_TYPE (captures[0]))
1222 : )
1223 : {
1224 125 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail411;
1225 125 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail411;
1226 125 : {
1227 125 : tree res_op0;
1228 125 : res_op0 = captures[1];
1229 125 : tree res_op1;
1230 125 : res_op1 = captures[2];
1231 125 : tree _r;
1232 125 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1233 125 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 324, __FILE__, __LINE__, true);
1234 125 : return _r;
1235 : }
1236 : next_after_fail411:;
1237 : }
1238 : return NULL_TREE;
1239 : }
1240 :
1241 : tree
1242 55126435 : generic_simplify_250 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1243 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1244 : const enum tree_code ARG_UNUSED (cmp))
1245 : {
1246 55126435 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1247 55126435 : {
1248 55126435 : bool wascmp;
1249 55126435 : if (types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
1250 55126435 : && bitwise_inverted_equal_p (captures[0], captures[1], wascmp)
1251 : )
1252 : {
1253 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail424;
1254 5 : {
1255 5 : tree _r;
1256 5 : _r = constant_boolean_node (cmp == NE_EXPR, type);
1257 5 : if (TREE_SIDE_EFFECTS (captures[0]))
1258 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1259 5 : if (TREE_SIDE_EFFECTS (captures[1]))
1260 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1261 5 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 336, __FILE__, __LINE__, true);
1262 5 : return _r;
1263 : }
1264 0 : next_after_fail424:;
1265 : }
1266 : }
1267 55126430 : return NULL_TREE;
1268 : }
1269 :
1270 : tree
1271 8853 : generic_simplify_255 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1272 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1273 : const enum tree_code ARG_UNUSED (op),
1274 : const enum tree_code ARG_UNUSED (cmp))
1275 : {
1276 8853 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1277 8853 : if (flag_unsafe_math_optimizations
1278 : )
1279 : {
1280 5 : {
1281 8 : tree tem = const_binop (op == PLUS_EXPR ? MINUS_EXPR : PLUS_EXPR,
1282 5 : TREE_TYPE (captures[1]), captures[2], captures[1]);
1283 5 : if (tem && !TREE_OVERFLOW (tem)
1284 : )
1285 : {
1286 4 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail443;
1287 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail443;
1288 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail443;
1289 4 : {
1290 4 : tree res_op0;
1291 4 : res_op0 = captures[0];
1292 4 : tree res_op1;
1293 4 : res_op1 = tem;
1294 4 : tree _r;
1295 4 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1296 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 354, __FILE__, __LINE__, true);
1297 4 : return _r;
1298 : }
1299 : next_after_fail443:;
1300 : }
1301 : }
1302 : }
1303 : return NULL_TREE;
1304 : }
1305 :
1306 : tree
1307 69 : generic_simplify_261 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1308 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1309 : const enum tree_code ARG_UNUSED (cmp))
1310 : {
1311 69 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1312 69 : if (!integer_zerop (captures[1])
1313 : )
1314 : {
1315 69 : if (wi::to_wide (captures[2]) == 0
1316 : )
1317 : {
1318 22 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail474;
1319 22 : {
1320 22 : tree res_op0;
1321 22 : res_op0 = captures[0];
1322 22 : tree res_op1;
1323 22 : res_op1 = captures[2];
1324 22 : tree _r;
1325 22 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1326 22 : if (TREE_SIDE_EFFECTS (captures[1]))
1327 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1328 22 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 385, __FILE__, __LINE__, true);
1329 22 : return _r;
1330 : }
1331 0 : next_after_fail474:;
1332 : }
1333 : else
1334 : {
1335 47 : if (TREE_CODE (captures[1]) == INTEGER_CST
1336 : )
1337 : {
1338 47 : {
1339 47 : wi::overflow_type ovf;
1340 47 : wide_int prod = wi::mul (wi::to_wide (captures[2]), wi::to_wide (captures[1]),
1341 94 : TYPE_SIGN (TREE_TYPE (captures[1])), &ovf);
1342 47 : if (ovf
1343 : )
1344 : {
1345 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail475;
1346 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail475;
1347 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail475;
1348 0 : {
1349 0 : tree _r;
1350 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
1351 0 : if (TREE_SIDE_EFFECTS (captures[0]))
1352 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1353 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 386, __FILE__, __LINE__, true);
1354 0 : return _r;
1355 : }
1356 0 : next_after_fail475:;
1357 : }
1358 : else
1359 : {
1360 47 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail476;
1361 47 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail476;
1362 47 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail476;
1363 47 : {
1364 47 : tree res_op0;
1365 47 : res_op0 = captures[0];
1366 47 : tree res_op1;
1367 47 : res_op1 = wide_int_to_tree (TREE_TYPE (captures[0]), prod);
1368 47 : tree _r;
1369 47 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1370 47 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 387, __FILE__, __LINE__, true);
1371 47 : return _r;
1372 : }
1373 0 : next_after_fail476:;
1374 : }
1375 47 : }
1376 : }
1377 : }
1378 : }
1379 : return NULL_TREE;
1380 : }
1381 :
1382 : tree
1383 25058 : generic_simplify_268 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1384 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1385 : const enum tree_code ARG_UNUSED (cmp))
1386 : {
1387 25058 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1388 25058 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail498;
1389 25058 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail498;
1390 25058 : {
1391 25058 : tree res_op0;
1392 25058 : res_op0 = captures[0];
1393 25058 : tree res_op1;
1394 25058 : res_op1 = captures[1];
1395 25058 : tree _r;
1396 25058 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1397 25058 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 402, __FILE__, __LINE__, true);
1398 : return _r;
1399 : }
1400 : next_after_fail498:;
1401 : return NULL_TREE;
1402 : }
1403 :
1404 : tree
1405 0 : generic_simplify_271 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1406 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1407 : const enum tree_code ARG_UNUSED (cmp))
1408 : {
1409 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1410 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1411 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1412 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1413 0 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (TREE_TYPE (captures[2]))
1414 0 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
1415 0 : && !wi::neg_p (wi::to_wide (captures[3]))
1416 : )
1417 : {
1418 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail501;
1419 0 : {
1420 0 : tree res_op0;
1421 0 : {
1422 0 : tree _o1[2], _r1;
1423 0 : _o1[0] = captures[2];
1424 0 : {
1425 0 : tree _o2[1], _r2;
1426 0 : {
1427 0 : tree _o3[1], _r3;
1428 0 : _o3[0] = captures[3];
1429 0 : _r3 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
1430 0 : _o2[0] = _r3;
1431 : }
1432 0 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o1[0]))
1433 : {
1434 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
1435 : }
1436 : else
1437 : _r2 = _o2[0];
1438 0 : _o1[1] = _r2;
1439 : }
1440 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1441 0 : res_op0 = _r1;
1442 : }
1443 0 : tree res_op1;
1444 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[2]));
1445 0 : tree _r;
1446 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1447 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 405, __FILE__, __LINE__, true);
1448 0 : return _r;
1449 : }
1450 0 : next_after_fail501:;
1451 : }
1452 : return NULL_TREE;
1453 : }
1454 :
1455 : tree
1456 859499 : generic_simplify_278 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1457 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1458 : const enum tree_code ARG_UNUSED (cmp),
1459 : const enum tree_code ARG_UNUSED (ncmp))
1460 : {
1461 859499 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1462 1654983 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1463 859499 : && type_has_mode_precision_p (TREE_TYPE (captures[1]))
1464 858203 : && element_precision (captures[0]) >= element_precision (captures[1])
1465 1718998 : && wi::only_sign_bit_p (wi::to_wide (captures[2]), element_precision (captures[1]))
1466 : )
1467 : {
1468 12646 : {
1469 12646 : tree stype = signed_type_for (TREE_TYPE (captures[1]));
1470 12646 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail508;
1471 12646 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail508;
1472 12646 : {
1473 12646 : tree res_op0;
1474 12646 : {
1475 12646 : tree _o1[1], _r1;
1476 12646 : _o1[0] = captures[1];
1477 12646 : if (TREE_TYPE (_o1[0]) != stype)
1478 : {
1479 12433 : _r1 = fold_build1_loc (loc, NOP_EXPR, stype, _o1[0]);
1480 : }
1481 : else
1482 : _r1 = _o1[0];
1483 12646 : res_op0 = _r1;
1484 : }
1485 12646 : tree res_op1;
1486 12646 : res_op1 = build_zero_cst (stype);
1487 12646 : tree _r;
1488 12646 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
1489 12646 : if (TREE_SIDE_EFFECTS (captures[2]))
1490 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1491 12646 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 411, __FILE__, __LINE__, true);
1492 12646 : return _r;
1493 : }
1494 : next_after_fail508:;
1495 : }
1496 : }
1497 : return NULL_TREE;
1498 : }
1499 :
1500 : tree
1501 2 : generic_simplify_288 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1502 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1503 : const enum tree_code ARG_UNUSED (cmp))
1504 : {
1505 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1506 4 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1507 2 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1508 2 : && TYPE_UNSIGNED (TREE_TYPE (captures[2]))
1509 2 : && (TYPE_PRECISION (TREE_TYPE (captures[1]))
1510 2 : >= 2 * TYPE_PRECISION (TREE_TYPE (captures[2])))
1511 2 : && tree_fits_uhwi_p (captures[4])
1512 2 : && tree_to_uhwi (captures[4]) == TYPE_PRECISION (TREE_TYPE (captures[2]))
1513 2 : && types_match (captures[2], captures[3])
1514 2 : && type_has_mode_precision_p (TREE_TYPE (captures[2]))
1515 6 : && (optab_handler (umulv4_optab, TYPE_MODE (TREE_TYPE (captures[2])))
1516 : != CODE_FOR_nothing)
1517 : )
1518 : {
1519 2 : {
1520 2 : tree t = TREE_TYPE (captures[2]), cpx = build_complex_type (t);
1521 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail536;
1522 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail536;
1523 2 : {
1524 2 : tree res_op0;
1525 2 : {
1526 2 : tree _o1[1], _r1;
1527 2 : {
1528 2 : tree _o2[2], _r2;
1529 2 : _o2[0] = captures[2];
1530 2 : _o2[1] = captures[3];
1531 2 : _r2 = maybe_build_call_expr_loc (loc, CFN_MUL_OVERFLOW, cpx, 2, _o2[0], _o2[1]);
1532 2 : if (!_r2)
1533 0 : goto next_after_fail536;
1534 2 : _o1[0] = _r2;
1535 : }
1536 2 : _r1 = fold_build1_loc (loc, IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
1537 2 : res_op0 = _r1;
1538 : }
1539 2 : tree res_op1;
1540 2 : res_op1 = build_zero_cst (t);
1541 2 : tree _r;
1542 2 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1543 2 : if (TREE_SIDE_EFFECTS (captures[4]))
1544 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
1545 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 430, __FILE__, __LINE__, true);
1546 2 : return _r;
1547 : }
1548 : next_after_fail536:;
1549 : }
1550 : }
1551 : return NULL_TREE;
1552 : }
1553 :
1554 : tree
1555 366 : generic_simplify_291 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1556 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1557 : const enum tree_code ARG_UNUSED (op),
1558 : const enum tree_code ARG_UNUSED (cmp),
1559 : const combined_fn ARG_UNUSED (clz))
1560 : {
1561 366 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1562 366 : if (!sanitize_flags_p (SANITIZE_BUILTIN)
1563 366 : || (cfun && (cfun->curr_properties & PROP_ssa) != 0)
1564 : )
1565 : {
1566 302 : if (integer_zerop (captures[2]) && single_use (captures[0])
1567 : )
1568 : {
1569 59 : {
1570 59 : tree stype = signed_type_for (TREE_TYPE (captures[1]));
1571 59 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail548;
1572 59 : {
1573 59 : tree res_op0;
1574 59 : {
1575 59 : tree _o1[1], _r1;
1576 59 : _o1[0] = captures[1];
1577 59 : if (TREE_TYPE (_o1[0]) != stype)
1578 : {
1579 59 : _r1 = fold_build1_loc (loc, NOP_EXPR, stype, _o1[0]);
1580 : }
1581 : else
1582 : _r1 = _o1[0];
1583 59 : res_op0 = _r1;
1584 : }
1585 59 : tree res_op1;
1586 59 : res_op1 = build_zero_cst (stype);
1587 59 : tree _r;
1588 59 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1589 59 : if (TREE_SIDE_EFFECTS (captures[2]))
1590 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1591 59 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 442, __FILE__, __LINE__, true);
1592 59 : return _r;
1593 : }
1594 0 : next_after_fail548:;
1595 : }
1596 : }
1597 : else
1598 : {
1599 243 : if (wi::to_wide (captures[2]) == TYPE_PRECISION (TREE_TYPE (captures[1])) - 1
1600 : )
1601 : {
1602 79 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail549;
1603 79 : {
1604 79 : tree res_op0;
1605 79 : res_op0 = captures[1];
1606 79 : tree res_op1;
1607 79 : res_op1 = build_one_cst (TREE_TYPE (captures[1]));
1608 79 : tree _r;
1609 79 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1610 79 : if (TREE_SIDE_EFFECTS (captures[2]))
1611 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1612 79 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 443, __FILE__, __LINE__, true);
1613 79 : return _r;
1614 : }
1615 0 : next_after_fail549:;
1616 : }
1617 : }
1618 : }
1619 : return NULL_TREE;
1620 : }
1621 :
1622 : tree
1623 17 : generic_simplify_296 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1624 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1625 : const enum tree_code ARG_UNUSED (cmp),
1626 : const combined_fn ARG_UNUSED (ffs))
1627 : {
1628 17 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1629 17 : {
1630 17 : int prec = TYPE_PRECISION (TREE_TYPE (captures[1]));
1631 17 : if (integer_zerop (captures[2])
1632 : )
1633 : {
1634 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail557;
1635 9 : {
1636 9 : tree res_op0;
1637 9 : res_op0 = captures[1];
1638 9 : tree res_op1;
1639 9 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
1640 9 : tree _r;
1641 9 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1642 9 : if (TREE_SIDE_EFFECTS (captures[2]))
1643 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1644 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 451, __FILE__, __LINE__, true);
1645 17 : return _r;
1646 : }
1647 0 : next_after_fail557:;
1648 : }
1649 : else
1650 : {
1651 8 : if (tree_int_cst_sgn (captures[2]) < 0 || wi::to_widest (captures[2]) > prec
1652 : )
1653 : {
1654 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail558;
1655 4 : {
1656 4 : tree _r;
1657 4 : _r = constant_boolean_node (cmp == NE_EXPR ? true : false, type);
1658 4 : if (TREE_SIDE_EFFECTS (captures[1]))
1659 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1660 4 : if (TREE_SIDE_EFFECTS (captures[2]))
1661 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1662 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 452, __FILE__, __LINE__, true);
1663 4 : return _r;
1664 : }
1665 0 : next_after_fail558:;
1666 : }
1667 : else
1668 : {
1669 4 : if (single_use (captures[0])
1670 : )
1671 : {
1672 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail559;
1673 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail559;
1674 4 : {
1675 4 : tree res_op0;
1676 4 : {
1677 4 : tree _o1[2], _r1;
1678 4 : _o1[0] = captures[1];
1679 4 : _o1[1] = wide_int_to_tree (TREE_TYPE (captures[1]),
1680 4 : wi::mask (tree_to_uhwi (captures[2]),
1681 : false, prec));
1682 4 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1683 4 : res_op0 = _r1;
1684 : }
1685 4 : tree res_op1;
1686 4 : res_op1 = wide_int_to_tree (TREE_TYPE (captures[1]),
1687 4 : wi::shifted_mask (tree_to_uhwi (captures[2]) - 1, 1,
1688 : false, prec));
1689 4 : tree _r;
1690 4 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1691 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 453, __FILE__, __LINE__, true);
1692 4 : return _r;
1693 : }
1694 0 : next_after_fail559:;
1695 : }
1696 : }
1697 : }
1698 : }
1699 0 : return NULL_TREE;
1700 : }
1701 :
1702 : tree
1703 1 : generic_simplify_314 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1704 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1705 : const enum tree_code ARG_UNUSED (div))
1706 : {
1707 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1708 0 : if ((INTEGRAL_TYPE_P (type) || VECTOR_INTEGER_TYPE_P (type))
1709 1 : && TYPE_OVERFLOW_UNDEFINED (type)
1710 1 : && !integer_zerop (captures[0])
1711 2 : && (!flag_non_call_exceptions || tree_expr_nonzero_p (captures[0]))
1712 : )
1713 : {
1714 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail580;
1715 1 : {
1716 1 : tree _r;
1717 1 : _r = build_minus_one_cst (type);
1718 1 : if (TREE_SIDE_EFFECTS (captures[0]))
1719 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1720 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 472, __FILE__, __LINE__, true);
1721 1 : return _r;
1722 : }
1723 0 : next_after_fail580:;
1724 : }
1725 : return NULL_TREE;
1726 : }
1727 :
1728 : tree
1729 3 : generic_simplify_319 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1730 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1731 : const enum tree_code ARG_UNUSED (div))
1732 : {
1733 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1734 3 : if (INTEGRAL_TYPE_P (type)
1735 3 : && wi::multiple_of_p (wi::to_widest (captures[2]), wi::to_widest (captures[3]), SIGNED)
1736 : )
1737 : {
1738 3 : if (TYPE_OVERFLOW_UNDEFINED (type) && !TYPE_OVERFLOW_SANITIZED (type)
1739 : )
1740 : {
1741 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail586;
1742 3 : {
1743 3 : tree res_op0;
1744 3 : res_op0 = captures[2];
1745 3 : tree res_op1;
1746 3 : res_op1 = captures[3];
1747 3 : tree _r;
1748 3 : _r = fold_build2_loc (loc, div, type, res_op0, res_op1);
1749 3 : if (TREE_SIDE_EFFECTS (captures[1]))
1750 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1751 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 478, __FILE__, __LINE__, true);
1752 3 : return _r;
1753 : }
1754 0 : next_after_fail586:;
1755 : }
1756 : }
1757 : return NULL_TREE;
1758 : }
1759 :
1760 : tree
1761 1589278 : generic_simplify_327 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1762 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1763 : const enum tree_code ARG_UNUSED (mod))
1764 : {
1765 1589278 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1766 1867576 : if ((TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (captures[0]))
1767 1313444 : && INTEGRAL_TYPE_P (type)
1768 1313444 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1769 1313444 : && (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[1]))
1770 3 : || TYPE_UNSIGNED (TREE_TYPE (captures[1]))
1771 1 : || !TYPE_UNSIGNED (type))
1772 2902722 : && integer_pow2p (captures[2]) && tree_int_cst_sgn (captures[2]) > 0
1773 : )
1774 : {
1775 973169 : {
1776 973169 : tree utype = TREE_TYPE (captures[1]);
1777 973169 : if (!TYPE_OVERFLOW_WRAPS (utype))
1778 303 : utype = unsigned_type_for (utype);
1779 973169 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail594;
1780 973169 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail594;
1781 973169 : {
1782 973169 : tree res_op0;
1783 973169 : res_op0 = captures[0];
1784 973169 : tree res_op1;
1785 973169 : {
1786 973169 : tree _o1[1], _r1;
1787 973169 : {
1788 973169 : tree _o2[2], _r2;
1789 973169 : {
1790 973169 : tree _o3[1], _r3;
1791 973169 : _o3[0] = captures[1];
1792 973169 : if (TREE_TYPE (_o3[0]) != utype)
1793 : {
1794 303 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
1795 : }
1796 : else
1797 : _r3 = _o3[0];
1798 973169 : _o2[0] = _r3;
1799 : }
1800 973169 : _o2[1] = build_one_cst (utype);
1801 973169 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1802 973169 : _o1[0] = _r2;
1803 : }
1804 973169 : if (TREE_TYPE (_o1[0]) != type)
1805 : {
1806 19065 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1807 : }
1808 : else
1809 : _r1 = _o1[0];
1810 973169 : res_op1 = _r1;
1811 : }
1812 973169 : tree _r;
1813 973169 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
1814 973169 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 486, __FILE__, __LINE__, true);
1815 973169 : return _r;
1816 : }
1817 : next_after_fail594:;
1818 : }
1819 : }
1820 : return NULL_TREE;
1821 : }
1822 :
1823 : tree
1824 0 : generic_simplify_344 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1825 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1826 : const enum tree_code ARG_UNUSED (cmp),
1827 : const enum tree_code ARG_UNUSED (minmax))
1828 : {
1829 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1830 0 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[1]))
1831 0 : && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1832 : )
1833 : {
1834 0 : {
1835 0 : tree_code code;
1836 0 : widest_int c1 = wi::mask<widest_int>(TYPE_PRECISION (type) - 1, 0);
1837 0 : tree_code ncmp = cmp == GE_EXPR ? LE_EXPR : GT_EXPR;
1838 0 : code = minmax_from_comparison (ncmp, captures[0], c1, wi::to_widest (captures[4]));
1839 0 : if (ncmp == LE_EXPR
1840 0 : && code == MIN_EXPR
1841 0 : && wi::le_p (wi::to_wide (captures[3]),
1842 0 : wi::to_wide (captures[4]),
1843 0 : TYPE_SIGN (type))
1844 : )
1845 : {
1846 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail618;
1847 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail618;
1848 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail618;
1849 0 : {
1850 0 : tree res_op0;
1851 0 : res_op0 = captures[2];
1852 0 : tree res_op1;
1853 0 : res_op1 = captures[4];
1854 0 : tree _r;
1855 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
1856 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1857 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1858 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 510, __FILE__, __LINE__, true);
1859 0 : return _r;
1860 : }
1861 0 : next_after_fail618:;
1862 : }
1863 : else
1864 : {
1865 0 : if (ncmp == GT_EXPR
1866 0 : && code == MAX_EXPR
1867 0 : && wi::ge_p (wi::to_wide (captures[3]),
1868 0 : wi::to_wide (captures[4]),
1869 0 : TYPE_SIGN (type))
1870 : )
1871 : {
1872 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail619;
1873 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail619;
1874 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail619;
1875 0 : {
1876 0 : tree res_op0;
1877 0 : res_op0 = captures[2];
1878 0 : tree res_op1;
1879 0 : res_op1 = captures[4];
1880 0 : tree _r;
1881 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
1882 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1883 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1884 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 511, __FILE__, __LINE__, true);
1885 0 : return _r;
1886 : }
1887 0 : next_after_fail619:;
1888 : }
1889 : }
1890 0 : }
1891 : }
1892 : return NULL_TREE;
1893 : }
1894 :
1895 : tree
1896 0 : generic_simplify_359 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1897 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1898 : const enum tree_code ARG_UNUSED (op))
1899 : {
1900 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1901 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail634;
1902 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail634;
1903 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail634;
1904 0 : {
1905 0 : tree _r;
1906 0 : _r = captures[2];
1907 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 525, __FILE__, __LINE__, true);
1908 : return _r;
1909 : }
1910 : next_after_fail634:;
1911 : return NULL_TREE;
1912 : }
1913 :
1914 : tree
1915 0 : generic_simplify_366 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1916 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1917 : const combined_fn ARG_UNUSED (func))
1918 : {
1919 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1920 0 : if (wi::to_widest (captures[4]) == TYPE_PRECISION (TREE_TYPE (captures[3])) - 1
1921 : )
1922 : {
1923 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail642;
1924 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail642;
1925 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail642;
1926 0 : {
1927 0 : tree _r;
1928 0 : _r = captures[2];
1929 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1930 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1931 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 533, __FILE__, __LINE__, true);
1932 0 : return _r;
1933 : }
1934 : next_after_fail642:;
1935 : }
1936 : return NULL_TREE;
1937 : }
1938 :
1939 : tree
1940 485947 : generic_simplify_375 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1941 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1942 : const enum tree_code ARG_UNUSED (op))
1943 : {
1944 485947 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1945 971893 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1946 971806 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
1947 298062 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
1948 971850 : && (CONSTANT_CLASS_P (captures[1]) || single_use (captures[0]))
1949 : )
1950 : {
1951 297990 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail655;
1952 297990 : {
1953 297990 : tree res_op0;
1954 297990 : res_op0 = captures[1];
1955 297990 : tree res_op1;
1956 297990 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
1957 297990 : tree _r;
1958 297990 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1959 297990 : if (TREE_SIDE_EFFECTS (captures[2]))
1960 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1961 297990 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 545, __FILE__, __LINE__, true);
1962 297990 : return _r;
1963 : }
1964 0 : next_after_fail655:;
1965 : }
1966 : return NULL_TREE;
1967 : }
1968 :
1969 : tree
1970 37378 : generic_simplify_382 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1971 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1972 : const enum tree_code ARG_UNUSED (cmp),
1973 : const enum tree_code ARG_UNUSED (out))
1974 : {
1975 37378 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1976 37378 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
1977 37362 : && types_match (TREE_TYPE (captures[3]), TREE_TYPE (captures[0]))
1978 37362 : && tree_nop_conversion_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[3]))
1979 37378 : && wi::to_wide (captures[4]) != 0
1980 0 : && single_use (captures[1])
1981 : )
1982 : {
1983 37362 : {
1984 37362 : unsigned int prec = TYPE_PRECISION (TREE_TYPE (captures[3]));
1985 37362 : signop sign = TYPE_SIGN (TREE_TYPE (captures[3]));
1986 37362 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail663;
1987 37362 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail663;
1988 37362 : {
1989 37362 : tree res_op0;
1990 37362 : res_op0 = captures[3];
1991 37362 : tree res_op1;
1992 37362 : res_op1 = wide_int_to_tree (TREE_TYPE (captures[3]),
1993 37362 : wi::max_value (prec, sign)
1994 112086 : - wi::to_wide (captures[4]));
1995 37362 : tree _r;
1996 37362 : _r = fold_build2_loc (loc, out, type, res_op0, res_op1);
1997 37362 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 553, __FILE__, __LINE__, true);
1998 37362 : return _r;
1999 : }
2000 : next_after_fail663:;
2001 : }
2002 : }
2003 : return NULL_TREE;
2004 : }
2005 :
2006 : tree
2007 1107 : generic_simplify_392 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2008 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2009 : const enum tree_code ARG_UNUSED (cmp),
2010 : const enum tree_code ARG_UNUSED (out))
2011 : {
2012 1107 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2013 1107 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2])) && !VECTOR_TYPE_P (TREE_TYPE (captures[2]))
2014 : )
2015 : {
2016 1089 : {
2017 1089 : tree t = TREE_TYPE (captures[2]), cpx = build_complex_type (t);
2018 1089 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail705;
2019 1077 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail705;
2020 1077 : {
2021 1077 : tree res_op0;
2022 1077 : {
2023 1077 : tree _o1[1], _r1;
2024 1077 : {
2025 1077 : tree _o2[2], _r2;
2026 1077 : _o2[0] = captures[2];
2027 1077 : _o2[1] = captures[1];
2028 1077 : _r2 = maybe_build_call_expr_loc (loc, CFN_MUL_OVERFLOW, cpx, 2, _o2[0], _o2[1]);
2029 1077 : if (!_r2)
2030 0 : goto next_after_fail705;
2031 1077 : _o1[0] = _r2;
2032 : }
2033 1077 : _r1 = fold_build1_loc (loc, IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
2034 1077 : res_op0 = _r1;
2035 : }
2036 1077 : tree res_op1;
2037 1077 : res_op1 = build_zero_cst (t);
2038 1077 : tree _r;
2039 1077 : _r = fold_build2_loc (loc, out, type, res_op0, res_op1);
2040 1077 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 578, __FILE__, __LINE__, true);
2041 1077 : return _r;
2042 : }
2043 : next_after_fail705:;
2044 : }
2045 : }
2046 : return NULL_TREE;
2047 : }
2048 :
2049 : tree
2050 11990 : generic_simplify_399 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2051 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2052 : const enum tree_code ARG_UNUSED (cmp),
2053 : const enum tree_code ARG_UNUSED (eqcmp))
2054 : {
2055 11990 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2056 11990 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2057 : )
2058 : {
2059 11990 : {
2060 11990 : tree ty = TREE_TYPE (captures[0]);
2061 11990 : unsigned prec = TYPE_PRECISION (ty);
2062 11990 : wide_int mask = wi::to_wide (captures[2], prec);
2063 11990 : wide_int rhs = wi::to_wide (captures[3], prec);
2064 11990 : signop sgn = TYPE_SIGN (ty);
2065 33745 : if ((mask & (mask + 1)) == 0 && wi::gt_p (rhs, 0, sgn)
2066 43346 : && (rhs & (rhs + 1)) == 0 && wi::ge_p (mask, rhs, sgn)
2067 : )
2068 : {
2069 560 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail719;
2070 560 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail719;
2071 560 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail719;
2072 560 : {
2073 560 : tree res_op0;
2074 560 : {
2075 560 : tree _o1[2], _r1;
2076 560 : _o1[0] = captures[1];
2077 560 : _o1[1] = wide_int_to_tree (ty, mask - rhs);
2078 560 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2079 560 : res_op0 = _r1;
2080 : }
2081 560 : tree res_op1;
2082 560 : res_op1 = build_zero_cst (ty);
2083 560 : tree _r;
2084 560 : _r = fold_build2_loc (loc, eqcmp, type, res_op0, res_op1);
2085 560 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 592, __FILE__, __LINE__, true);
2086 560 : return _r;
2087 : }
2088 11430 : next_after_fail719:;
2089 : }
2090 11990 : }
2091 : }
2092 : return NULL_TREE;
2093 : }
2094 :
2095 : tree
2096 1 : generic_simplify_405 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2097 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2098 : const combined_fn ARG_UNUSED (logs),
2099 : const combined_fn ARG_UNUSED (exps),
2100 : const enum tree_code ARG_UNUSED (cmp))
2101 : {
2102 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2103 1 : if (flag_unsafe_math_optimizations
2104 : )
2105 : {
2106 1 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
2107 1 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
2108 1 : && ! flag_trapping_math
2109 2 : && ! flag_errno_math
2110 : )
2111 : {
2112 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail725;
2113 1 : {
2114 1 : tree res_op0;
2115 1 : res_op0 = captures[1];
2116 1 : tree res_op1;
2117 1 : {
2118 1 : tree _o1[1], _r1;
2119 1 : _o1[0] = captures[2];
2120 1 : _r1 = maybe_build_call_expr_loc (loc, logs, TREE_TYPE (_o1[0]), 1, _o1[0]);
2121 1 : if (!_r1)
2122 0 : goto next_after_fail725;
2123 1 : if (EXPR_P (_r1))
2124 1 : goto next_after_fail725;
2125 0 : res_op1 = _r1;
2126 : }
2127 0 : tree _r;
2128 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2129 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 594, __FILE__, __LINE__, true);
2130 0 : return _r;
2131 : }
2132 : next_after_fail725:;
2133 : }
2134 : }
2135 : return NULL_TREE;
2136 : }
2137 :
2138 : tree
2139 0 : generic_simplify_413 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2140 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2141 : const enum tree_code ARG_UNUSED (shiftrotate))
2142 : {
2143 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2144 0 : {
2145 0 : tree tem = uniform_vector_p (captures[1]);
2146 0 : if (tem
2147 : )
2148 : {
2149 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail737;
2150 0 : {
2151 0 : tree res_op0;
2152 0 : res_op0 = captures[0];
2153 0 : tree res_op1;
2154 0 : res_op1 = tem;
2155 0 : tree _r;
2156 0 : _r = fold_build2_loc (loc, shiftrotate, type, res_op0, res_op1);
2157 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2158 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2159 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 606, __FILE__, __LINE__, true);
2160 0 : return _r;
2161 : }
2162 0 : next_after_fail737:;
2163 : }
2164 : }
2165 : return NULL_TREE;
2166 : }
2167 :
2168 : tree
2169 3416062 : generic_simplify_420 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2170 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
2171 : const enum tree_code ARG_UNUSED (bitop))
2172 : {
2173 3416062 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2174 3416062 : if (0
2175 : && TREE_CODE (captures[3]) != INTEGER_CST
2176 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
2177 : && types_match (type, captures[2])
2178 : && !POINTER_TYPE_P (TREE_TYPE (captures[2]))
2179 : && TREE_CODE (TREE_TYPE (captures[2])) != OFFSET_TYPE
2180 : )
2181 : {
2182 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail751;
2183 : {
2184 : tree res_op0;
2185 : res_op0 = captures[2];
2186 : tree res_op1;
2187 : {
2188 : tree _o1[1], _r1;
2189 : _o1[0] = captures[3];
2190 : if (TREE_TYPE (_o1[0]) != type)
2191 : {
2192 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2193 : }
2194 : else
2195 : _r1 = _o1[0];
2196 : res_op1 = _r1;
2197 : }
2198 : tree _r;
2199 : _r = fold_build2_loc (loc, bitop, type, res_op0, res_op1);
2200 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 618, __FILE__, __LINE__, true);
2201 : return _r;
2202 : }
2203 : next_after_fail751:;
2204 : }
2205 3416062 : return NULL_TREE;
2206 : }
2207 :
2208 : tree
2209 917582 : generic_simplify_424 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2210 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
2211 : const enum tree_code ARG_UNUSED (op))
2212 : {
2213 917582 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2214 917582 : if (INTEGRAL_TYPE_P (type)
2215 817621 : && op != MULT_EXPR
2216 817621 : && op != RDIV_EXPR
2217 501011 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2218 439571 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2219 439571 : && type_has_mode_precision_p (TREE_TYPE (captures[2]))
2220 345449 : && type_has_mode_precision_p (TREE_TYPE (captures[4]))
2221 345182 : && type_has_mode_precision_p (type)
2222 345160 : && TYPE_PRECISION (TREE_TYPE (captures[1])) > TYPE_PRECISION (TREE_TYPE (captures[2]))
2223 25716 : && types_match (captures[2], type)
2224 921417 : && (types_match (captures[2], captures[4])
2225 3780 : || poly_int_tree_p (captures[3]))
2226 : )
2227 : {
2228 55 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
2229 : )
2230 : {
2231 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail757;
2232 15 : {
2233 15 : tree res_op0;
2234 15 : res_op0 = captures[2];
2235 15 : tree res_op1;
2236 15 : {
2237 15 : tree _o1[1], _r1;
2238 15 : _o1[0] = captures[4];
2239 15 : if (TREE_TYPE (_o1[0]) != type)
2240 : {
2241 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2242 : }
2243 : else
2244 : _r1 = _o1[0];
2245 15 : res_op1 = _r1;
2246 : }
2247 15 : tree _r;
2248 15 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2249 15 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 624, __FILE__, __LINE__, true);
2250 15 : return _r;
2251 : }
2252 0 : next_after_fail757:;
2253 : }
2254 : else
2255 : {
2256 40 : {
2257 40 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
2258 40 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail758;
2259 40 : {
2260 40 : tree res_op0;
2261 40 : {
2262 40 : tree _o1[2], _r1;
2263 40 : {
2264 40 : tree _o2[1], _r2;
2265 40 : _o2[0] = captures[2];
2266 40 : if (TREE_TYPE (_o2[0]) != utype)
2267 : {
2268 40 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2269 : }
2270 : else
2271 : _r2 = _o2[0];
2272 40 : _o1[0] = _r2;
2273 : }
2274 40 : {
2275 40 : tree _o2[1], _r2;
2276 40 : _o2[0] = captures[4];
2277 40 : if (TREE_TYPE (_o2[0]) != utype)
2278 : {
2279 40 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2280 : }
2281 : else
2282 : _r2 = _o2[0];
2283 40 : _o1[1] = _r2;
2284 : }
2285 40 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2286 40 : res_op0 = _r1;
2287 : }
2288 40 : tree _r;
2289 40 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2290 40 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 625, __FILE__, __LINE__, true);
2291 40 : return _r;
2292 : }
2293 0 : next_after_fail758:;
2294 : }
2295 : }
2296 : }
2297 : else
2298 : {
2299 907420 : if (FLOAT_TYPE_P (type)
2300 927634 : && DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
2301 10107 : == DECIMAL_FLOAT_TYPE_P (type)
2302 : )
2303 : {
2304 10084 : {
2305 10084 : tree arg0 = strip_float_extensions (captures[2]);
2306 10084 : tree arg1 = strip_float_extensions (captures[4]);
2307 10084 : tree itype = TREE_TYPE (captures[0]);
2308 10084 : tree ty1 = TREE_TYPE (arg0);
2309 10084 : tree ty2 = TREE_TYPE (arg1);
2310 10084 : enum tree_code code = TREE_CODE (itype);
2311 0 : if (FLOAT_TYPE_P (ty1)
2312 10084 : && FLOAT_TYPE_P (ty2)
2313 : )
2314 : {
2315 10084 : {
2316 10084 : tree newtype = type;
2317 10084 : if (TYPE_MODE (ty1) == SDmode
2318 10075 : || TYPE_MODE (ty2) == SDmode
2319 20159 : || TYPE_MODE (type) == SDmode)
2320 9 : newtype = dfloat32_type_node;
2321 10084 : if (TYPE_MODE (ty1) == DDmode
2322 10078 : || TYPE_MODE (ty2) == DDmode
2323 20162 : || TYPE_MODE (type) == DDmode)
2324 6 : newtype = dfloat64_type_node;
2325 10084 : if (TYPE_MODE (ty1) == TDmode
2326 10084 : || TYPE_MODE (ty2) == TDmode
2327 20168 : || TYPE_MODE (type) == TDmode)
2328 15 : newtype = dfloat128_type_node;
2329 10084 : if ((newtype == dfloat32_type_node
2330 10084 : || newtype == dfloat64_type_node
2331 10084 : || newtype == dfloat128_type_node)
2332 15 : && newtype == type
2333 10090 : && types_match (newtype, type)
2334 : )
2335 : {
2336 6 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail759;
2337 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail759;
2338 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail759;
2339 0 : {
2340 0 : tree res_op0;
2341 0 : {
2342 0 : tree _o1[1], _r1;
2343 0 : _o1[0] = captures[2];
2344 0 : if (TREE_TYPE (_o1[0]) != newtype)
2345 : {
2346 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
2347 : }
2348 : else
2349 : _r1 = _o1[0];
2350 0 : res_op0 = _r1;
2351 : }
2352 0 : tree res_op1;
2353 0 : {
2354 0 : tree _o1[1], _r1;
2355 0 : _o1[0] = captures[4];
2356 0 : if (TREE_TYPE (_o1[0]) != newtype)
2357 : {
2358 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
2359 : }
2360 : else
2361 : _r1 = _o1[0];
2362 0 : res_op1 = _r1;
2363 : }
2364 0 : tree _r;
2365 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2366 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 626, __FILE__, __LINE__, true);
2367 0 : return _r;
2368 : }
2369 : next_after_fail759:;
2370 : }
2371 : else
2372 : {
2373 10078 : {
2374 10078 : if (element_precision (ty1) > element_precision (newtype))
2375 4 : newtype = ty1;
2376 10078 : if (element_precision (ty2) > element_precision (newtype))
2377 1 : newtype = ty2;
2378 10078 : if (element_precision (newtype) < element_precision (itype)
2379 9834 : && (!VECTOR_MODE_P (TYPE_MODE (newtype))
2380 0 : || target_supports_op_p (newtype, op, optab_default))
2381 9834 : && (flag_unsafe_math_optimizations
2382 9817 : || (element_precision (newtype) == element_precision (type)
2383 9813 : && real_can_shorten_arithmetic (element_mode (itype),
2384 : element_mode (type))
2385 3224 : && !excess_precision_type (newtype)))
2386 10103 : && !types_match (itype, newtype)
2387 : )
2388 : {
2389 25 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail760;
2390 25 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail760;
2391 17 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail760;
2392 17 : {
2393 17 : tree res_op0;
2394 17 : {
2395 17 : tree _o1[2], _r1;
2396 17 : {
2397 17 : tree _o2[1], _r2;
2398 17 : _o2[0] = captures[2];
2399 17 : if (TREE_TYPE (_o2[0]) != newtype)
2400 : {
2401 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
2402 : }
2403 : else
2404 : _r2 = _o2[0];
2405 17 : _o1[0] = _r2;
2406 : }
2407 17 : {
2408 17 : tree _o2[1], _r2;
2409 17 : _o2[0] = captures[4];
2410 17 : if (TREE_TYPE (_o2[0]) != newtype)
2411 : {
2412 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
2413 : }
2414 : else
2415 : _r2 = _o2[0];
2416 17 : _o1[1] = _r2;
2417 : }
2418 17 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2419 17 : res_op0 = _r1;
2420 : }
2421 17 : tree _r;
2422 17 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2423 17 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 627, __FILE__, __LINE__, true);
2424 17 : return _r;
2425 : }
2426 : next_after_fail760:;
2427 : }
2428 : }
2429 : }
2430 : }
2431 : }
2432 : }
2433 : }
2434 : }
2435 : return NULL_TREE;
2436 : }
2437 :
2438 : tree
2439 15 : generic_simplify_452 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2440 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2441 : const enum tree_code ARG_UNUSED (bitop))
2442 : {
2443 15 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2444 15 : {
2445 15 : tree pmop[2];
2446 15 : tree utype = fold_bit_and_mask (TREE_TYPE (captures[1]), captures[4], NEGATE_EXPR, captures[1],
2447 : bitop, captures[2], captures[3], NULL_TREE, ERROR_MARK,
2448 : NULL_TREE, NULL_TREE, pmop);
2449 15 : if (utype
2450 : )
2451 : {
2452 7 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail797;
2453 7 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail797;
2454 7 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail797;
2455 7 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail797;
2456 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail797;
2457 7 : {
2458 7 : tree res_op0;
2459 7 : {
2460 7 : tree _o1[2], _r1;
2461 7 : {
2462 7 : tree _o2[1], _r2;
2463 7 : {
2464 7 : tree _o3[1], _r3;
2465 7 : _o3[0] = pmop[0];
2466 7 : if (TREE_TYPE (_o3[0]) != utype)
2467 : {
2468 4 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
2469 : }
2470 : else
2471 : _r3 = _o3[0];
2472 7 : _o2[0] = _r3;
2473 : }
2474 7 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
2475 7 : _o1[0] = _r2;
2476 : }
2477 7 : {
2478 7 : tree _o2[1], _r2;
2479 7 : _o2[0] = captures[4];
2480 7 : if (TREE_TYPE (_o2[0]) != utype)
2481 : {
2482 4 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2483 : }
2484 : else
2485 : _r2 = _o2[0];
2486 7 : _o1[1] = _r2;
2487 : }
2488 7 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2489 7 : res_op0 = _r1;
2490 : }
2491 7 : tree _r;
2492 7 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2493 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 651, __FILE__, __LINE__, true);
2494 7 : return _r;
2495 : }
2496 8 : next_after_fail797:;
2497 : }
2498 : }
2499 8 : return NULL_TREE;
2500 : }
2501 :
2502 : tree
2503 0 : generic_simplify_464 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2504 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2505 : const enum tree_code ARG_UNUSED (code2),
2506 : const enum tree_code ARG_UNUSED (code1))
2507 : {
2508 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2509 0 : if ((TREE_CODE (captures[2]) == INTEGER_CST
2510 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
2511 0 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2512 0 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2]))
2513 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, code2))
2514 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
2515 0 : && bitwise_equal_p (captures[2], captures[5]))
2516 : )
2517 : {
2518 0 : {
2519 0 : bool one_before = false;
2520 0 : bool one_after = false;
2521 0 : int cmp = 0;
2522 0 : bool allbits = true;
2523 0 : if (TREE_CODE (captures[2]) == INTEGER_CST
2524 0 : && TREE_CODE (captures[5]) == INTEGER_CST)
2525 : {
2526 0 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
2527 0 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
2528 0 : auto t2 = wi::to_wide (captures[5]);
2529 0 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
2530 0 : if (cmp < 0
2531 0 : && t1 == t2 - 1)
2532 : one_before = true;
2533 0 : if (cmp > 0
2534 0 : && t1 == t2 + 1)
2535 : one_after = true;
2536 : }
2537 0 : bool val;
2538 0 : switch (code2)
2539 : {
2540 0 : case EQ_EXPR: val = (cmp == 0); break;
2541 0 : case NE_EXPR: val = (cmp != 0); break;
2542 0 : case LT_EXPR: val = (cmp < 0); break;
2543 0 : case GT_EXPR: val = (cmp > 0); break;
2544 0 : case LE_EXPR: val = (cmp <= 0); break;
2545 0 : case GE_EXPR: val = (cmp >= 0); break;
2546 0 : default: gcc_unreachable ();
2547 : }
2548 0 : if (code1 == EQ_EXPR && val
2549 : )
2550 : {
2551 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail811;
2552 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail811;
2553 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail811;
2554 0 : {
2555 0 : tree _r;
2556 0 : _r = captures[0];
2557 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 664, __FILE__, __LINE__, true);
2558 0 : return _r;
2559 : }
2560 : next_after_fail811:;
2561 : }
2562 : else
2563 : {
2564 0 : if (code1 == EQ_EXPR && !val
2565 : )
2566 : {
2567 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail812;
2568 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail812;
2569 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail812;
2570 0 : {
2571 0 : tree _r;
2572 0 : _r = constant_boolean_node (false, type);
2573 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2574 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2575 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 665, __FILE__, __LINE__, true);
2576 0 : return _r;
2577 : }
2578 : next_after_fail812:;
2579 : }
2580 : else
2581 : {
2582 0 : if (code1 == NE_EXPR && !val && allbits
2583 : )
2584 : {
2585 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail813;
2586 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail813;
2587 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail813;
2588 0 : {
2589 0 : tree _r;
2590 0 : _r = captures[3];
2591 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 666, __FILE__, __LINE__, true);
2592 0 : return _r;
2593 : }
2594 : next_after_fail813:;
2595 : }
2596 : else
2597 : {
2598 0 : if ((code1 == NE_EXPR
2599 0 : && code2 == GE_EXPR
2600 0 : && cmp == 0
2601 0 : && allbits)
2602 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2603 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
2604 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2605 : )
2606 : {
2607 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail814;
2608 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail814;
2609 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail814;
2610 0 : {
2611 0 : tree res_op0;
2612 0 : res_op0 = captures[4];
2613 0 : tree res_op1;
2614 0 : {
2615 0 : tree _o1[1], _r1;
2616 0 : _o1[0] = captures[2];
2617 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2618 : {
2619 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2620 : }
2621 : else
2622 : _r1 = _o1[0];
2623 0 : res_op1 = _r1;
2624 : }
2625 0 : tree _r;
2626 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2627 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 667, __FILE__, __LINE__, true);
2628 0 : return _r;
2629 : }
2630 : next_after_fail814:;
2631 : }
2632 : else
2633 : {
2634 0 : if ((code1 == NE_EXPR
2635 0 : && code2 == LE_EXPR
2636 0 : && cmp == 0
2637 0 : && allbits)
2638 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2639 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
2640 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2641 : )
2642 : {
2643 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail815;
2644 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail815;
2645 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail815;
2646 0 : {
2647 0 : tree res_op0;
2648 0 : res_op0 = captures[4];
2649 0 : tree res_op1;
2650 0 : {
2651 0 : tree _o1[1], _r1;
2652 0 : _o1[0] = captures[2];
2653 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2654 : {
2655 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2656 : }
2657 : else
2658 : _r1 = _o1[0];
2659 0 : res_op1 = _r1;
2660 : }
2661 0 : tree _r;
2662 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
2663 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 668, __FILE__, __LINE__, true);
2664 0 : return _r;
2665 : }
2666 : next_after_fail815:;
2667 : }
2668 : else
2669 : {
2670 0 : if ((code1 == NE_EXPR
2671 0 : && code2 == GT_EXPR
2672 : && one_after
2673 0 : && allbits)
2674 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2675 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
2676 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2677 : )
2678 : {
2679 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail816;
2680 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail816;
2681 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail816;
2682 0 : {
2683 0 : tree res_op0;
2684 0 : res_op0 = captures[4];
2685 0 : tree res_op1;
2686 0 : {
2687 0 : tree _o1[1], _r1;
2688 0 : _o1[0] = captures[2];
2689 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2690 : {
2691 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2692 : }
2693 : else
2694 : _r1 = _o1[0];
2695 0 : res_op1 = _r1;
2696 : }
2697 0 : tree _r;
2698 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2699 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 669, __FILE__, __LINE__, true);
2700 0 : return _r;
2701 : }
2702 : next_after_fail816:;
2703 : }
2704 : else
2705 : {
2706 0 : if ((code1 == NE_EXPR
2707 0 : && code2 == LT_EXPR
2708 : && one_before
2709 0 : && allbits)
2710 0 : && ((VECTOR_BOOLEAN_TYPE_P (type)
2711 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
2712 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
2713 : )
2714 : {
2715 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail817;
2716 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail817;
2717 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail817;
2718 0 : {
2719 0 : tree res_op0;
2720 0 : res_op0 = captures[4];
2721 0 : tree res_op1;
2722 0 : {
2723 0 : tree _o1[1], _r1;
2724 0 : _o1[0] = captures[2];
2725 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2726 : {
2727 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2728 : }
2729 : else
2730 : _r1 = _o1[0];
2731 0 : res_op1 = _r1;
2732 : }
2733 0 : tree _r;
2734 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
2735 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 670, __FILE__, __LINE__, true);
2736 0 : return _r;
2737 : }
2738 : next_after_fail817:;
2739 : }
2740 : }
2741 : }
2742 : }
2743 : }
2744 : }
2745 : }
2746 : }
2747 : }
2748 : return NULL_TREE;
2749 : }
2750 :
2751 : tree
2752 3914 : generic_simplify_493 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2753 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
2754 : {
2755 3914 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2756 3914 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
2757 3914 : || !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2758 : )
2759 : {
2760 3474 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail882;
2761 3474 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail882;
2762 3474 : {
2763 3474 : tree res_op0;
2764 3474 : {
2765 3474 : tree _o1[1], _r1;
2766 3474 : _o1[0] = captures[0];
2767 3474 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2768 3474 : res_op0 = _r1;
2769 : }
2770 3474 : tree _r;
2771 3474 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2772 3474 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 697, __FILE__, __LINE__, true);
2773 3474 : return _r;
2774 : }
2775 : next_after_fail882:;
2776 : }
2777 : return NULL_TREE;
2778 : }
2779 :
2780 : tree
2781 2 : generic_simplify_501 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2782 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
2783 : const enum tree_code ARG_UNUSED (rotate))
2784 : {
2785 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2786 2 : if ((element_precision (TREE_TYPE (captures[2]))
2787 2 : <= element_precision (TREE_TYPE (captures[3]))
2788 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[3])))
2789 2 : && (element_precision (type) <= element_precision (TREE_TYPE (captures[2]))
2790 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[2])))
2791 : )
2792 : {
2793 2 : {
2794 2 : tree rotate_type = TREE_TYPE (captures[2]);
2795 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail890;
2796 2 : {
2797 2 : tree res_op0;
2798 2 : {
2799 2 : tree _o1[2], _r1;
2800 2 : {
2801 2 : tree _o2[1], _r2;
2802 2 : _o2[0] = captures[3];
2803 2 : if (TREE_TYPE (_o2[0]) != rotate_type)
2804 : {
2805 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, rotate_type, _o2[0]);
2806 : }
2807 : else
2808 : _r2 = _o2[0];
2809 2 : _o1[0] = _r2;
2810 : }
2811 2 : _o1[1] = captures[4];
2812 2 : _r1 = fold_build2_loc (loc, rotate, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2813 2 : res_op0 = _r1;
2814 : }
2815 2 : tree _r;
2816 2 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2817 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 702, __FILE__, __LINE__, true);
2818 2 : return _r;
2819 : }
2820 0 : next_after_fail890:;
2821 : }
2822 : }
2823 : return NULL_TREE;
2824 : }
2825 :
2826 : tree
2827 2 : generic_simplify_514 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2828 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2829 : {
2830 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2831 2 : if (TREE_CODE (type) != COMPLEX_TYPE
2832 2 : && (! ANY_INTEGRAL_TYPE_P (type)
2833 1 : || TYPE_OVERFLOW_UNDEFINED (type))
2834 : )
2835 : {
2836 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail905;
2837 2 : {
2838 2 : tree res_op0;
2839 2 : {
2840 2 : tree _o1[1], _r1;
2841 2 : _o1[0] = captures[0];
2842 2 : _r1 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2843 2 : res_op0 = _r1;
2844 : }
2845 2 : tree _r;
2846 2 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
2847 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 717, __FILE__, __LINE__, true);
2848 2 : return _r;
2849 : }
2850 0 : next_after_fail905:;
2851 : }
2852 : return NULL_TREE;
2853 : }
2854 :
2855 : tree
2856 0 : generic_simplify_523 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2857 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2858 : const combined_fn ARG_UNUSED (minmax))
2859 : {
2860 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2861 0 : if (!tree_expr_maybe_signaling_nan_p (captures[0])
2862 : )
2863 : {
2864 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail926;
2865 0 : {
2866 0 : tree _r;
2867 0 : _r = captures[0];
2868 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 726, __FILE__, __LINE__, true);
2869 0 : return _r;
2870 : }
2871 0 : next_after_fail926:;
2872 : }
2873 : return NULL_TREE;
2874 : }
2875 :
2876 : tree
2877 0 : generic_simplify_528 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2878 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2879 : const enum tree_code ARG_UNUSED (rotate),
2880 : const enum tree_code ARG_UNUSED (orotate))
2881 : {
2882 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2883 0 : {
2884 0 : auto prec = element_precision (TREE_TYPE (captures[0]));
2885 0 : if (prec == wi::to_wide (captures[2])
2886 : )
2887 : {
2888 0 : if (expr_not_equal_to (captures[3], wi::uhwi (prec,
2889 0 : TYPE_PRECISION (TREE_TYPE (captures[3]))),
2890 : gimple_match_ctx (captures[1]))
2891 : )
2892 : {
2893 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail931;
2894 0 : {
2895 0 : tree res_op0;
2896 0 : res_op0 = captures[0];
2897 0 : tree res_op1;
2898 0 : res_op1 = captures[3];
2899 0 : tree _r;
2900 0 : _r = fold_build2_loc (loc, orotate, type, res_op0, res_op1);
2901 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2902 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2903 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 731, __FILE__, __LINE__, true);
2904 0 : return _r;
2905 : }
2906 0 : next_after_fail931:;
2907 : }
2908 : else
2909 : {
2910 0 : if (single_use (captures[1])
2911 0 : && pow2p_hwi (prec)
2912 0 : && cfun
2913 0 : && (fold_before_rtl_expansion_p ()
2914 0 : || !flag_tree_vrp
2915 0 : || optimize_debug)
2916 : )
2917 : {
2918 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail932;
2919 0 : {
2920 0 : tree res_op0;
2921 0 : res_op0 = captures[0];
2922 0 : tree res_op1;
2923 0 : {
2924 0 : tree _o1[2], _r1;
2925 0 : _o1[0] = captures[3];
2926 0 : _o1[1] = build_int_cst (TREE_TYPE (captures[3]), prec - 1);
2927 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2928 0 : res_op1 = _r1;
2929 : }
2930 0 : tree _r;
2931 0 : _r = fold_build2_loc (loc, orotate, type, res_op0, res_op1);
2932 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2933 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2934 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 732, __FILE__, __LINE__, true);
2935 0 : return _r;
2936 : }
2937 0 : next_after_fail932:;
2938 : }
2939 : }
2940 : }
2941 : }
2942 0 : return NULL_TREE;
2943 : }
2944 :
2945 : tree
2946 0 : generic_simplify_547 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2947 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
2948 : const combined_fn ARG_UNUSED (cond_op))
2949 : {
2950 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2951 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail953;
2952 0 : {
2953 0 : tree res_op0;
2954 0 : {
2955 0 : tree _o1[2], _r1;
2956 0 : _o1[0] = captures[2];
2957 0 : _o1[1] = captures[0];
2958 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2959 0 : res_op0 = _r1;
2960 : }
2961 0 : tree res_op1;
2962 0 : res_op1 = captures[3];
2963 0 : tree res_op2;
2964 0 : res_op2 = captures[4];
2965 0 : tree res_op3;
2966 0 : res_op3 = captures[5];
2967 0 : tree _r;
2968 0 : _r = maybe_build_call_expr_loc (loc, cond_op, type, 4, res_op0, res_op1, res_op2, res_op3);
2969 0 : if (!_r)
2970 0 : goto next_after_fail953;
2971 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 748, __FILE__, __LINE__, true);
2972 : return _r;
2973 : }
2974 : next_after_fail953:;
2975 : return NULL_TREE;
2976 : }
2977 :
2978 : tree
2979 60 : generic_simplify_551 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2980 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2981 : const enum tree_code ARG_UNUSED (cmp))
2982 : {
2983 60 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2984 60 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail957;
2985 60 : {
2986 60 : tree _r;
2987 60 : _r = constant_boolean_node (true, type);
2988 60 : if (TREE_SIDE_EFFECTS (captures[0]))
2989 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2990 60 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 752, __FILE__, __LINE__, true);
2991 : return _r;
2992 : }
2993 0 : next_after_fail957:;
2994 0 : return NULL_TREE;
2995 : }
2996 :
2997 : tree
2998 0 : generic_simplify_560 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2999 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3000 : const combined_fn ARG_UNUSED (fns))
3001 : {
3002 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3003 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail966;
3004 0 : {
3005 0 : tree res_op0;
3006 0 : res_op0 = captures[0];
3007 0 : tree _r;
3008 0 : _r = maybe_build_call_expr_loc (loc, fns, type, 1, res_op0);
3009 0 : if (!_r)
3010 0 : goto next_after_fail966;
3011 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 761, __FILE__, __LINE__, true);
3012 : return _r;
3013 : }
3014 : next_after_fail966:;
3015 : return NULL_TREE;
3016 : }
3017 :
3018 : tree
3019 0 : generic_simplify_566 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3020 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3021 : {
3022 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3023 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail972;
3024 0 : {
3025 0 : tree _r;
3026 0 : _r = captures[0];
3027 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3028 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3029 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 767, __FILE__, __LINE__, true);
3030 : return _r;
3031 : }
3032 0 : next_after_fail972:;
3033 0 : return NULL_TREE;
3034 : }
3035 :
3036 : tree
3037 0 : generic_simplify_572 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3038 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3039 : const combined_fn ARG_UNUSED (ifn),
3040 : const combined_fn ARG_UNUSED (lfn),
3041 : const combined_fn ARG_UNUSED (llfn))
3042 : {
3043 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3044 0 : if (canonicalize_math_p ()
3045 : )
3046 : {
3047 0 : if (TYPE_PRECISION (long_long_integer_type_node)
3048 0 : == TYPE_PRECISION (long_integer_type_node)
3049 : )
3050 : {
3051 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail978;
3052 0 : {
3053 0 : tree res_op0;
3054 0 : res_op0 = captures[0];
3055 0 : tree _r;
3056 0 : _r = maybe_build_call_expr_loc (loc, lfn, type, 1, res_op0);
3057 0 : if (!_r)
3058 0 : goto next_after_fail978;
3059 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 773, __FILE__, __LINE__, true);
3060 0 : return _r;
3061 : }
3062 : next_after_fail978:;
3063 : }
3064 : }
3065 : return NULL_TREE;
3066 : }
3067 :
3068 : tree
3069 0 : generic_simplify_583 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3070 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
3071 : {
3072 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3073 0 : if (canonicalize_math_after_vectorization_p ()
3074 : )
3075 : {
3076 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail989;
3077 : {
3078 : tree res_op0;
3079 : res_op0 = captures[0];
3080 : tree res_op1;
3081 : res_op1 = captures[1];
3082 : tree res_op2;
3083 : res_op2 = captures[2];
3084 : tree _r;
3085 : _r = maybe_build_call_expr_loc (loc, CFN_FMS, type, 3, res_op0, res_op1, res_op2);
3086 : if (!_r)
3087 : goto next_after_fail989;
3088 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 784, __FILE__, __LINE__, true);
3089 : return _r;
3090 : }
3091 0 : next_after_fail989:;
3092 : }
3093 0 : return NULL_TREE;
3094 : }
3095 :
3096 : tree
3097 0 : generic_simplify_593 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3098 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3099 : const combined_fn ARG_UNUSED (ctz))
3100 : {
3101 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3102 0 : {
3103 0 : tree t = TREE_TYPE (captures[0]);
3104 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail999;
3105 0 : {
3106 0 : tree res_op0;
3107 0 : {
3108 0 : tree _o1[1], _r1;
3109 0 : _o1[0] = captures[1];
3110 0 : if (TREE_TYPE (_o1[0]) != t)
3111 : {
3112 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, t, _o1[0]);
3113 : }
3114 : else
3115 : _r1 = _o1[0];
3116 0 : res_op0 = _r1;
3117 : }
3118 0 : tree _r;
3119 0 : _r = maybe_build_call_expr_loc (loc, ctz, type, 1, res_op0);
3120 0 : if (!_r)
3121 0 : goto next_after_fail999;
3122 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 794, __FILE__, __LINE__, true);
3123 : return _r;
3124 : }
3125 : next_after_fail999:;
3126 : }
3127 : return NULL_TREE;
3128 : }
3129 :
3130 : tree
3131 0 : generic_simplify_602 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3132 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3133 : const combined_fn ARG_UNUSED (pfun))
3134 : {
3135 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3136 0 : if (INTEGRAL_TYPE_P (type)
3137 : )
3138 : {
3139 0 : {
3140 0 : wide_int nz = tree_nonzero_bits (captures[0]);
3141 0 : if (nz == 1
3142 : )
3143 : {
3144 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1008;
3145 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1008;
3146 0 : {
3147 0 : tree res_op0;
3148 0 : res_op0 = captures[0];
3149 0 : tree _r;
3150 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3151 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 798, __FILE__, __LINE__, true);
3152 0 : return _r;
3153 : }
3154 0 : next_after_fail1008:;
3155 : }
3156 : else
3157 : {
3158 0 : if (wi::popcount (nz) == 1
3159 : )
3160 : {
3161 0 : {
3162 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
3163 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1009;
3164 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1009;
3165 0 : {
3166 0 : tree res_op0;
3167 0 : {
3168 0 : tree _o1[2], _r1;
3169 0 : {
3170 0 : tree _o2[1], _r2;
3171 0 : _o2[0] = captures[0];
3172 0 : if (TREE_TYPE (_o2[0]) != utype)
3173 : {
3174 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
3175 : }
3176 : else
3177 : _r2 = _o2[0];
3178 0 : _o1[0] = _r2;
3179 : }
3180 0 : _o1[1] = build_int_cst (integer_type_node,
3181 0 : wi::ctz (nz));
3182 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, utype, _o1[0], _o1[1]);
3183 0 : res_op0 = _r1;
3184 : }
3185 0 : tree _r;
3186 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3187 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 799, __FILE__, __LINE__, true);
3188 0 : return _r;
3189 : }
3190 0 : next_after_fail1009:;
3191 : }
3192 : }
3193 : }
3194 0 : }
3195 : }
3196 : return NULL_TREE;
3197 : }
3198 :
3199 : tree
3200 4493992 : generic_simplify_NEGATE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
3201 : {
3202 4493992 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3203 4493992 : switch (TREE_CODE (_p0))
3204 : {
3205 40114 : case PLUS_EXPR:
3206 40114 : {
3207 40114 : tree _q20 = TREE_OPERAND (_p0, 0);
3208 40114 : tree _q21 = TREE_OPERAND (_p0, 1);
3209 40114 : if (tree_negate_expr_p (_q21))
3210 : {
3211 38965 : {
3212 38965 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
3213 38965 : tree res = generic_simplify_503 (loc, type, _p0, captures);
3214 38965 : if (res) return res;
3215 : }
3216 : }
3217 1149 : if (tree_negate_expr_p (_q20))
3218 : {
3219 9 : {
3220 9 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
3221 9 : tree res = generic_simplify_503 (loc, type, _p0, captures);
3222 9 : if (res) return res;
3223 : }
3224 : }
3225 : break;
3226 : }
3227 105992 : case MINUS_EXPR:
3228 105992 : {
3229 105992 : tree _q20 = TREE_OPERAND (_p0, 0);
3230 105992 : tree _q21 = TREE_OPERAND (_p0, 1);
3231 105992 : {
3232 105992 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
3233 105992 : if ((ANY_INTEGRAL_TYPE_P (type) && !TYPE_OVERFLOW_SANITIZED (type))
3234 180553 : || (FLOAT_TYPE_P (type)
3235 74561 : && !HONOR_SIGN_DEPENDENT_ROUNDING (type)
3236 74561 : && !HONOR_SIGNED_ZEROS (type))
3237 : )
3238 : {
3239 31488 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1060;
3240 31488 : {
3241 31488 : tree res_op0;
3242 31488 : res_op0 = captures[1];
3243 31488 : tree res_op1;
3244 31488 : res_op1 = captures[0];
3245 31488 : tree _r;
3246 31488 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
3247 31488 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 839, __FILE__, __LINE__, true);
3248 31488 : return _r;
3249 : }
3250 0 : next_after_fail1060:;
3251 : }
3252 : }
3253 74504 : break;
3254 : }
3255 16 : case POINTER_DIFF_EXPR:
3256 16 : {
3257 16 : tree _q20 = TREE_OPERAND (_p0, 0);
3258 16 : tree _q21 = TREE_OPERAND (_p0, 1);
3259 16 : {
3260 16 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3261 16 : tree res = generic_simplify_504 (loc, type, _p0, captures);
3262 16 : if (res) return res;
3263 : }
3264 0 : break;
3265 : }
3266 4119 : case MULT_EXPR:
3267 4119 : {
3268 4119 : tree _q20 = TREE_OPERAND (_p0, 0);
3269 4119 : tree _q21 = TREE_OPERAND (_p0, 1);
3270 4119 : if (tree_negate_expr_p (_q21))
3271 : {
3272 1826 : {
3273 1826 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3274 1826 : tree res = generic_simplify_507 (loc, type, _p0, captures);
3275 1826 : if (res) return res;
3276 : }
3277 : }
3278 2714 : if (tree_negate_expr_p (_q20))
3279 : {
3280 27 : {
3281 27 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
3282 27 : tree res = generic_simplify_507 (loc, type, _p0, captures);
3283 27 : if (res) return res;
3284 : }
3285 : }
3286 : break;
3287 : }
3288 188 : case RDIV_EXPR:
3289 188 : {
3290 188 : tree _q20 = TREE_OPERAND (_p0, 0);
3291 188 : tree _q21 = TREE_OPERAND (_p0, 1);
3292 188 : if (tree_negate_expr_p (_q21))
3293 : {
3294 60 : {
3295 60 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3296 60 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
3297 60 : && single_use (captures[0])
3298 : )
3299 : {
3300 60 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1061;
3301 60 : {
3302 60 : tree res_op0;
3303 60 : res_op0 = captures[1];
3304 60 : tree res_op1;
3305 60 : {
3306 60 : tree _o1[1], _r1;
3307 60 : _o1[0] = captures[2];
3308 60 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3309 60 : res_op1 = _r1;
3310 : }
3311 60 : tree _r;
3312 60 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
3313 60 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 840, __FILE__, __LINE__, true);
3314 60 : return _r;
3315 : }
3316 0 : next_after_fail1061:;
3317 : }
3318 : }
3319 : }
3320 128 : if (tree_negate_expr_p (_q20))
3321 : {
3322 0 : {
3323 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3324 0 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
3325 0 : && single_use (captures[0])
3326 : )
3327 : {
3328 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1062;
3329 0 : {
3330 0 : tree res_op0;
3331 0 : {
3332 0 : tree _o1[1], _r1;
3333 0 : _o1[0] = captures[1];
3334 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3335 0 : res_op0 = _r1;
3336 : }
3337 0 : tree res_op1;
3338 0 : res_op1 = captures[2];
3339 0 : tree _r;
3340 0 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
3341 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 841, __FILE__, __LINE__, true);
3342 0 : return _r;
3343 : }
3344 0 : next_after_fail1062:;
3345 : }
3346 : }
3347 : }
3348 : break;
3349 : }
3350 1563766 : CASE_CONVERT:
3351 1563766 : {
3352 1563766 : tree _q20 = TREE_OPERAND (_p0, 0);
3353 1563766 : switch (TREE_CODE (_q20))
3354 : {
3355 58 : case RSHIFT_EXPR:
3356 58 : {
3357 58 : tree _q30 = TREE_OPERAND (_q20, 0);
3358 58 : tree _q31 = TREE_OPERAND (_q20, 1);
3359 58 : switch (TREE_CODE (_q31))
3360 : {
3361 43 : case INTEGER_CST:
3362 43 : {
3363 43 : {
3364 43 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
3365 43 : tree res = generic_simplify_508 (loc, type, _p0, captures);
3366 43 : if (res) return res;
3367 : }
3368 36 : break;
3369 : }
3370 : default:;
3371 : }
3372 : break;
3373 : }
3374 151 : case NEGATE_EXPR:
3375 151 : {
3376 151 : tree _q30 = TREE_OPERAND (_q20, 0);
3377 151 : {
3378 151 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
3379 151 : if (!TYPE_SATURATING (type)
3380 : )
3381 : {
3382 151 : if (INTEGRAL_TYPE_P (type)
3383 151 : && (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
3384 17 : || (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3385 32 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))))
3386 150 : && !TYPE_OVERFLOW_SANITIZED (type)
3387 317 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
3388 : )
3389 : {
3390 150 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1063;
3391 150 : {
3392 150 : tree res_op0;
3393 150 : res_op0 = captures[0];
3394 150 : tree _r;
3395 150 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3396 150 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
3397 150 : return _r;
3398 : }
3399 0 : next_after_fail1063:;
3400 : }
3401 : }
3402 : }
3403 : break;
3404 : }
3405 1563609 : default:;
3406 : }
3407 1563609 : {
3408 1563609 : tree _q20_pops[1];
3409 1563609 : if (tree_logical_inverted_value (_q20, _q20_pops))
3410 : {
3411 1 : tree _q30 = _q20_pops[0];
3412 1 : {
3413 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
3414 1 : if (INTEGRAL_TYPE_P (type)
3415 1 : && TREE_CODE (type) != BOOLEAN_TYPE
3416 1 : && TYPE_PRECISION (type) > 1
3417 1 : && TREE_CODE (captures[2]) == SSA_NAME
3418 1 : && ssa_name_has_boolean_range (captures[2])
3419 : )
3420 : {
3421 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1064;
3422 0 : {
3423 0 : tree res_op0;
3424 0 : {
3425 0 : tree _o1[1], _r1;
3426 0 : _o1[0] = captures[2];
3427 0 : if (TREE_TYPE (_o1[0]) != type)
3428 : {
3429 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3430 : }
3431 : else
3432 : _r1 = _o1[0];
3433 0 : res_op0 = _r1;
3434 : }
3435 0 : tree res_op1;
3436 0 : res_op1 = build_all_ones_cst (type);
3437 0 : tree _r;
3438 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
3439 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 843, __FILE__, __LINE__, true);
3440 0 : return _r;
3441 : }
3442 0 : next_after_fail1064:;
3443 : }
3444 : }
3445 : }
3446 : }
3447 1563609 : if (tree_negate_expr_p (_q20))
3448 : {
3449 1454 : {
3450 1454 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
3451 1454 : if (!TYPE_SATURATING (type)
3452 : )
3453 : {
3454 1454 : if (SCALAR_FLOAT_TYPE_P (type)
3455 1454 : && ((DECIMAL_FLOAT_TYPE_P (type)
3456 0 : == DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
3457 0 : && TYPE_PRECISION (type) >= TYPE_PRECISION (TREE_TYPE (captures[0])))
3458 0 : || !HONOR_SIGN_DEPENDENT_ROUNDING (type))
3459 : )
3460 : {
3461 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1065;
3462 0 : {
3463 0 : tree res_op0;
3464 0 : {
3465 0 : tree _o1[1], _r1;
3466 0 : _o1[0] = captures[0];
3467 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3468 0 : res_op0 = _r1;
3469 : }
3470 0 : tree _r;
3471 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3472 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 844, __FILE__, __LINE__, true);
3473 0 : return _r;
3474 : }
3475 0 : next_after_fail1065:;
3476 : }
3477 : }
3478 : }
3479 : }
3480 : break;
3481 : }
3482 394 : case RSHIFT_EXPR:
3483 394 : {
3484 394 : tree _q20 = TREE_OPERAND (_p0, 0);
3485 394 : tree _q21 = TREE_OPERAND (_p0, 1);
3486 394 : switch (TREE_CODE (_q21))
3487 : {
3488 376 : case INTEGER_CST:
3489 376 : {
3490 376 : {
3491 376 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
3492 376 : tree res = generic_simplify_508 (loc, type, _p0, captures);
3493 376 : if (res) return res;
3494 : }
3495 339 : break;
3496 : }
3497 : default:;
3498 : }
3499 : break;
3500 : }
3501 147 : case BIT_NOT_EXPR:
3502 147 : {
3503 147 : tree _q20 = TREE_OPERAND (_p0, 0);
3504 147 : {
3505 147 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
3506 147 : tree res = generic_simplify_505 (loc, type, _p0, captures);
3507 147 : if (res) return res;
3508 : }
3509 0 : break;
3510 : }
3511 3515 : case NEGATE_EXPR:
3512 3515 : {
3513 3515 : tree _q20 = TREE_OPERAND (_p0, 0);
3514 3515 : {
3515 3515 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
3516 3515 : tree res = generic_simplify_506 (loc, type, _p0, captures);
3517 3515 : if (res) return res;
3518 : }
3519 13 : break;
3520 : }
3521 72 : case VEC_COND_EXPR:
3522 72 : {
3523 72 : tree _q20 = TREE_OPERAND (_p0, 0);
3524 72 : tree _q21 = TREE_OPERAND (_p0, 1);
3525 72 : tree _q22 = TREE_OPERAND (_p0, 2);
3526 72 : {
3527 72 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3528 72 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1066;
3529 72 : {
3530 72 : tree res_op0;
3531 72 : res_op0 = captures[1];
3532 72 : tree res_op1;
3533 72 : {
3534 72 : tree _o1[1], _r1;
3535 72 : _o1[0] = captures[2];
3536 72 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, type, _o1[0]);
3537 72 : if (EXPR_P (_r1))
3538 0 : goto next_after_fail1066;
3539 72 : res_op1 = _r1;
3540 : }
3541 72 : tree res_op2;
3542 72 : {
3543 72 : tree _o1[1], _r1;
3544 72 : _o1[0] = captures[3];
3545 72 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, type, _o1[0]);
3546 72 : if (EXPR_P (_r1))
3547 0 : goto next_after_fail1066;
3548 72 : res_op2 = _r1;
3549 : }
3550 72 : tree _r;
3551 72 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
3552 72 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 811, __FILE__, __LINE__, true);
3553 72 : return _r;
3554 : }
3555 0 : next_after_fail1066:;
3556 : }
3557 0 : break;
3558 : }
3559 264809 : case CALL_EXPR:
3560 264809 : switch (get_call_combined_fn (_p0))
3561 : {
3562 12 : case CFN_BUILT_IN_FMA:
3563 12 : if (call_expr_nargs (_p0) == 3)
3564 : {
3565 12 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3566 12 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3567 12 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3568 12 : {
3569 12 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3570 12 : tree res = generic_simplify_509 (loc, type, _p0, captures, CFN_BUILT_IN_FMA);
3571 12 : if (res) return res;
3572 : }
3573 : }
3574 : break;
3575 0 : case CFN_COND_FMA:
3576 0 : if (call_expr_nargs (_p0) == 5)
3577 : {
3578 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3579 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3580 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3581 0 : tree _q23 = CALL_EXPR_ARG (_p0, 3);
3582 0 : tree _q24 = CALL_EXPR_ARG (_p0, 4);
3583 0 : {
3584 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _q23, _q24 };
3585 0 : const combined_fn fmas = CFN_COND_FMA;
3586 0 : if (canonicalize_math_after_vectorization_p ()
3587 : )
3588 : {
3589 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
3590 : )
3591 : {
3592 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1067;
3593 : {
3594 : tree res_op0;
3595 : res_op0 = captures[1];
3596 : tree res_op1;
3597 : res_op1 = captures[2];
3598 : tree res_op2;
3599 : res_op2 = captures[3];
3600 : tree res_op3;
3601 : res_op3 = captures[4];
3602 : tree res_op4;
3603 : res_op4 = captures[5];
3604 : tree _r;
3605 : _r = maybe_build_call_expr_loc (loc, CFN_COND_FNMS, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3606 : if (!_r)
3607 : goto next_after_fail1067;
3608 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 845, __FILE__, __LINE__, true);
3609 : return _r;
3610 : }
3611 0 : next_after_fail1067:;
3612 : }
3613 : }
3614 : }
3615 : }
3616 : break;
3617 4 : case CFN_BUILT_IN_FMAF:
3618 4 : if (call_expr_nargs (_p0) == 3)
3619 : {
3620 4 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3621 4 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3622 4 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3623 4 : {
3624 4 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3625 4 : tree res = generic_simplify_509 (loc, type, _p0, captures, CFN_BUILT_IN_FMAF);
3626 4 : if (res) return res;
3627 : }
3628 : }
3629 : break;
3630 0 : case CFN_BUILT_IN_FMAL:
3631 0 : if (call_expr_nargs (_p0) == 3)
3632 : {
3633 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3634 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3635 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3636 0 : {
3637 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3638 0 : tree res = generic_simplify_509 (loc, type, _p0, captures, CFN_BUILT_IN_FMAL);
3639 0 : if (res) return res;
3640 : }
3641 : }
3642 : break;
3643 0 : case CFN_FMA:
3644 0 : if (call_expr_nargs (_p0) == 3)
3645 : {
3646 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3647 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3648 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3649 0 : {
3650 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3651 0 : tree res = generic_simplify_509 (loc, type, _p0, captures, CFN_FMA);
3652 0 : if (res) return res;
3653 : }
3654 : }
3655 : break;
3656 0 : case CFN_FMS:
3657 0 : if (call_expr_nargs (_p0) == 3)
3658 : {
3659 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3660 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3661 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3662 0 : {
3663 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3664 0 : if (canonicalize_math_after_vectorization_p ()
3665 : )
3666 : {
3667 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
3668 : )
3669 : {
3670 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1068;
3671 : {
3672 : tree res_op0;
3673 : res_op0 = captures[1];
3674 : tree res_op1;
3675 : res_op1 = captures[2];
3676 : tree res_op2;
3677 : res_op2 = captures[3];
3678 : tree _r;
3679 : _r = maybe_build_call_expr_loc (loc, CFN_FNMA, type, 3, res_op0, res_op1, res_op2);
3680 : if (!_r)
3681 : goto next_after_fail1068;
3682 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 846, __FILE__, __LINE__, true);
3683 : return _r;
3684 : }
3685 0 : next_after_fail1068:;
3686 : }
3687 : }
3688 : }
3689 : }
3690 0 : if (call_expr_nargs (_p0) == 5)
3691 : {
3692 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3693 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3694 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3695 0 : tree _q23 = CALL_EXPR_ARG (_p0, 3);
3696 0 : tree _q24 = CALL_EXPR_ARG (_p0, 4);
3697 0 : {
3698 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _q23, _q24 };
3699 0 : if (canonicalize_math_after_vectorization_p ()
3700 : )
3701 : {
3702 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
3703 : )
3704 : {
3705 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1069;
3706 : {
3707 : tree res_op0;
3708 : res_op0 = captures[1];
3709 : tree res_op1;
3710 : res_op1 = captures[2];
3711 : tree res_op2;
3712 : res_op2 = captures[3];
3713 : tree res_op3;
3714 : res_op3 = captures[4];
3715 : tree res_op4;
3716 : res_op4 = captures[5];
3717 : tree _r;
3718 : _r = maybe_build_call_expr_loc (loc, CFN_COND_FNMA, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3719 : if (!_r)
3720 : goto next_after_fail1069;
3721 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 847, __FILE__, __LINE__, true);
3722 : return _r;
3723 : }
3724 0 : next_after_fail1069:;
3725 : }
3726 : }
3727 : }
3728 : }
3729 : break;
3730 0 : case CFN_COND_FNMA:
3731 0 : if (call_expr_nargs (_p0) == 5)
3732 : {
3733 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3734 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3735 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3736 0 : tree _q23 = CALL_EXPR_ARG (_p0, 3);
3737 0 : tree _q24 = CALL_EXPR_ARG (_p0, 4);
3738 0 : {
3739 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _q23, _q24 };
3740 0 : if (canonicalize_math_after_vectorization_p ()
3741 : )
3742 : {
3743 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
3744 : )
3745 : {
3746 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1070;
3747 : {
3748 : tree res_op0;
3749 : res_op0 = captures[1];
3750 : tree res_op1;
3751 : res_op1 = captures[2];
3752 : tree res_op2;
3753 : res_op2 = captures[3];
3754 : tree res_op3;
3755 : res_op3 = captures[4];
3756 : tree res_op4;
3757 : res_op4 = captures[5];
3758 : tree _r;
3759 : _r = maybe_build_call_expr_loc (loc, CFN_COND_FMS, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3760 : if (!_r)
3761 : goto next_after_fail1070;
3762 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 848, __FILE__, __LINE__, true);
3763 : return _r;
3764 : }
3765 0 : next_after_fail1070:;
3766 : }
3767 : }
3768 : }
3769 : }
3770 : break;
3771 0 : case CFN_COND_FNMS:
3772 0 : if (call_expr_nargs (_p0) == 5)
3773 : {
3774 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3775 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3776 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3777 0 : tree _q23 = CALL_EXPR_ARG (_p0, 3);
3778 0 : tree _q24 = CALL_EXPR_ARG (_p0, 4);
3779 0 : {
3780 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _q23, _q24 };
3781 0 : if (canonicalize_math_after_vectorization_p ()
3782 : )
3783 : {
3784 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
3785 : )
3786 : {
3787 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1071;
3788 : {
3789 : tree res_op0;
3790 : res_op0 = captures[1];
3791 : tree res_op1;
3792 : res_op1 = captures[2];
3793 : tree res_op2;
3794 : res_op2 = captures[3];
3795 : tree res_op3;
3796 : res_op3 = captures[4];
3797 : tree res_op4;
3798 : res_op4 = captures[5];
3799 : tree _r;
3800 : _r = maybe_build_call_expr_loc (loc, CFN_COND_FMA, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3801 : if (!_r)
3802 : goto next_after_fail1071;
3803 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 849, __FILE__, __LINE__, true);
3804 : return _r;
3805 : }
3806 0 : next_after_fail1071:;
3807 : }
3808 : }
3809 : }
3810 : }
3811 : break;
3812 0 : case CFN_FNMA:
3813 0 : if (call_expr_nargs (_p0) == 3)
3814 : {
3815 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3816 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3817 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3818 0 : {
3819 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3820 0 : if (canonicalize_math_after_vectorization_p ()
3821 : )
3822 : {
3823 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
3824 : )
3825 : {
3826 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1072;
3827 : {
3828 : tree res_op0;
3829 : res_op0 = captures[1];
3830 : tree res_op1;
3831 : res_op1 = captures[2];
3832 : tree res_op2;
3833 : res_op2 = captures[3];
3834 : tree _r;
3835 : _r = maybe_build_call_expr_loc (loc, CFN_FMS, type, 3, res_op0, res_op1, res_op2);
3836 : if (!_r)
3837 : goto next_after_fail1072;
3838 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 850, __FILE__, __LINE__, true);
3839 : return _r;
3840 : }
3841 0 : next_after_fail1072:;
3842 : }
3843 : }
3844 : }
3845 : }
3846 : break;
3847 0 : case CFN_FNMS:
3848 0 : if (call_expr_nargs (_p0) == 3)
3849 : {
3850 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
3851 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
3852 0 : tree _q22 = CALL_EXPR_ARG (_p0, 2);
3853 0 : {
3854 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
3855 0 : if (canonicalize_math_after_vectorization_p ()
3856 : )
3857 : {
3858 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
3859 : )
3860 : {
3861 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1073;
3862 : {
3863 : tree res_op0;
3864 : res_op0 = captures[1];
3865 : tree res_op1;
3866 : res_op1 = captures[2];
3867 : tree res_op2;
3868 : res_op2 = captures[3];
3869 : tree _r;
3870 : _r = maybe_build_call_expr_loc (loc, CFN_FMA, type, 3, res_op0, res_op1, res_op2);
3871 : if (!_r)
3872 : goto next_after_fail1073;
3873 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 851, __FILE__, __LINE__, true);
3874 : return _r;
3875 : }
3876 0 : next_after_fail1073:;
3877 : }
3878 : }
3879 : }
3880 : }
3881 : break;
3882 : default:;
3883 : }
3884 : break;
3885 4418107 : default:;
3886 : }
3887 4418107 : {
3888 4418107 : tree _p0_pops[1];
3889 4418107 : if (tree_nop_convert (_p0, _p0_pops))
3890 : {
3891 1747458 : tree _q20 = _p0_pops[0];
3892 1747458 : switch (TREE_CODE (_q20))
3893 : {
3894 0 : case POINTER_DIFF_EXPR:
3895 0 : {
3896 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3897 0 : tree _q31 = TREE_OPERAND (_q20, 1);
3898 0 : {
3899 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
3900 0 : tree res = generic_simplify_504 (loc, type, _p0, captures);
3901 0 : if (res) return res;
3902 : }
3903 0 : break;
3904 : }
3905 0 : case BIT_NOT_EXPR:
3906 0 : {
3907 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3908 0 : {
3909 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
3910 0 : tree res = generic_simplify_505 (loc, type, _p0, captures);
3911 0 : if (res) return res;
3912 : }
3913 0 : break;
3914 : }
3915 0 : case NEGATE_EXPR:
3916 0 : {
3917 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3918 0 : {
3919 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
3920 0 : tree res = generic_simplify_506 (loc, type, _p0, captures);
3921 0 : if (res) return res;
3922 : }
3923 0 : break;
3924 : }
3925 : default:;
3926 : }
3927 : }
3928 : }
3929 4418107 : {
3930 4418107 : tree _p0_pops[1];
3931 4418107 : if (tree_logical_inverted_value (_p0, _p0_pops))
3932 : {
3933 70 : tree _q20 = _p0_pops[0];
3934 70 : {
3935 70 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
3936 70 : if (INTEGRAL_TYPE_P (type)
3937 70 : && TREE_CODE (type) != BOOLEAN_TYPE
3938 70 : && TYPE_PRECISION (type) > 1
3939 70 : && TREE_CODE (captures[2]) == SSA_NAME
3940 70 : && ssa_name_has_boolean_range (captures[2])
3941 : )
3942 : {
3943 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1074;
3944 0 : {
3945 0 : tree res_op0;
3946 0 : {
3947 0 : tree _o1[1], _r1;
3948 0 : _o1[0] = captures[2];
3949 0 : if (TREE_TYPE (_o1[0]) != type)
3950 : {
3951 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3952 : }
3953 : else
3954 : _r1 = _o1[0];
3955 0 : res_op0 = _r1;
3956 : }
3957 0 : tree res_op1;
3958 0 : res_op1 = build_all_ones_cst (type);
3959 0 : tree _r;
3960 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
3961 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 843, __FILE__, __LINE__, true);
3962 0 : return _r;
3963 : }
3964 0 : next_after_fail1074:;
3965 : }
3966 : }
3967 : }
3968 : }
3969 4418107 : {
3970 4418107 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
3971 4418107 : tree res = generic_simplify_428 (loc, type, _p0, captures);
3972 4418107 : if (res) return res;
3973 : }
3974 4404022 : return NULL_TREE;
3975 : }
3976 :
3977 : tree
3978 33564122 : generic_simplify_EQ_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
3979 : {
3980 33564122 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3981 33564122 : switch (TREE_CODE (_p1))
3982 : {
3983 42 : case NEGATE_EXPR:
3984 42 : {
3985 42 : tree _q30 = TREE_OPERAND (_p1, 0);
3986 42 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
3987 : {
3988 0 : {
3989 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
3990 0 : tree res = generic_simplify_202 (loc, type, _p0, _p1, captures, EQ_EXPR);
3991 0 : if (res) return res;
3992 : }
3993 : }
3994 : break;
3995 : }
3996 33564122 : default:;
3997 : }
3998 33564122 : switch (TREE_CODE (_p0))
3999 : {
4000 921 : case NEGATE_EXPR:
4001 921 : {
4002 921 : tree _q20 = TREE_OPERAND (_p0, 0);
4003 921 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4004 : {
4005 83 : {
4006 83 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4007 83 : tree res = generic_simplify_202 (loc, type, _p0, _p1, captures, EQ_EXPR);
4008 83 : if (res) return res;
4009 : }
4010 : }
4011 : break;
4012 : }
4013 0 : case CEIL_MOD_EXPR:
4014 0 : {
4015 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4016 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4017 0 : if (integer_pow2p (_q21))
4018 : {
4019 0 : if (integer_zerop (_p1))
4020 : {
4021 0 : {
4022 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4023 0 : tree res = generic_simplify_203 (loc, type, _p0, _p1, captures, EQ_EXPR, CEIL_MOD_EXPR);
4024 0 : if (res) return res;
4025 : }
4026 : }
4027 : }
4028 : break;
4029 : }
4030 876 : case FLOOR_MOD_EXPR:
4031 876 : {
4032 876 : tree _q20 = TREE_OPERAND (_p0, 0);
4033 876 : tree _q21 = TREE_OPERAND (_p0, 1);
4034 876 : if (integer_pow2p (_q21))
4035 : {
4036 26 : if (integer_zerop (_p1))
4037 : {
4038 26 : {
4039 26 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4040 26 : tree res = generic_simplify_203 (loc, type, _p0, _p1, captures, EQ_EXPR, FLOOR_MOD_EXPR);
4041 26 : if (res) return res;
4042 : }
4043 : }
4044 : }
4045 : break;
4046 : }
4047 0 : case ROUND_MOD_EXPR:
4048 0 : {
4049 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4050 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4051 0 : if (integer_pow2p (_q21))
4052 : {
4053 0 : if (integer_zerop (_p1))
4054 : {
4055 0 : {
4056 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4057 0 : tree res = generic_simplify_203 (loc, type, _p0, _p1, captures, EQ_EXPR, ROUND_MOD_EXPR);
4058 0 : if (res) return res;
4059 : }
4060 : }
4061 : }
4062 : break;
4063 : }
4064 89239 : case TRUNC_MOD_EXPR:
4065 89239 : {
4066 89239 : tree _q20 = TREE_OPERAND (_p0, 0);
4067 89239 : tree _q21 = TREE_OPERAND (_p0, 1);
4068 89239 : if (integer_pow2p (_q21))
4069 : {
4070 38411 : if (integer_zerop (_p1))
4071 : {
4072 547 : {
4073 547 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4074 547 : tree res = generic_simplify_203 (loc, type, _p0, _p1, captures, EQ_EXPR, TRUNC_MOD_EXPR);
4075 547 : if (res) return res;
4076 : }
4077 : }
4078 : }
4079 : break;
4080 : }
4081 6719631 : CASE_CONVERT:
4082 6719631 : {
4083 6719631 : tree _q20 = TREE_OPERAND (_p0, 0);
4084 6719631 : switch (TREE_CODE (_p1))
4085 : {
4086 2 : case LSHIFT_EXPR:
4087 2 : {
4088 2 : tree _q40 = TREE_OPERAND (_p1, 0);
4089 2 : tree _q41 = TREE_OPERAND (_p1, 1);
4090 2 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
4091 : {
4092 0 : {
4093 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
4094 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4095 0 : if (res) return res;
4096 : }
4097 : }
4098 : break;
4099 : }
4100 6719631 : default:;
4101 : }
4102 6719631 : {
4103 6719631 : tree _p1_pops[1];
4104 6719631 : if (tree_nop_convert (_p1, _p1_pops))
4105 : {
4106 908319 : tree _q40 = _p1_pops[0];
4107 908319 : switch (TREE_CODE (_q40))
4108 : {
4109 0 : case LSHIFT_EXPR:
4110 0 : {
4111 0 : tree _q50 = TREE_OPERAND (_q40, 0);
4112 0 : tree _q51 = TREE_OPERAND (_q40, 1);
4113 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4114 : {
4115 0 : {
4116 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q20 };
4117 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4118 0 : if (res) return res;
4119 : }
4120 : }
4121 : break;
4122 : }
4123 : default:;
4124 : }
4125 : }
4126 : }
4127 6719631 : switch (TREE_CODE (_q20))
4128 : {
4129 82 : case EXACT_DIV_EXPR:
4130 82 : {
4131 82 : tree _q30 = TREE_OPERAND (_q20, 0);
4132 82 : tree _q31 = TREE_OPERAND (_q20, 1);
4133 82 : switch (TREE_CODE (_q31))
4134 : {
4135 82 : case INTEGER_CST:
4136 82 : {
4137 82 : switch (TREE_CODE (_p1))
4138 : {
4139 0 : CASE_CONVERT:
4140 0 : {
4141 0 : tree _q60 = TREE_OPERAND (_p1, 0);
4142 0 : switch (TREE_CODE (_q60))
4143 : {
4144 0 : case EXACT_DIV_EXPR:
4145 0 : {
4146 0 : tree _q70 = TREE_OPERAND (_q60, 0);
4147 0 : tree _q71 = TREE_OPERAND (_q60, 1);
4148 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
4149 : {
4150 0 : {
4151 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q70 };
4152 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
4153 0 : if (res) return res;
4154 : }
4155 : }
4156 : break;
4157 : }
4158 : default:;
4159 : }
4160 : break;
4161 : }
4162 : default:;
4163 : }
4164 : break;
4165 : }
4166 : default:;
4167 : }
4168 : break;
4169 : }
4170 6719631 : default:;
4171 : }
4172 6719631 : switch (TREE_CODE (_p1))
4173 : {
4174 29612 : case PLUS_EXPR:
4175 29612 : {
4176 29612 : tree _q40 = TREE_OPERAND (_p1, 0);
4177 29612 : tree _q41 = TREE_OPERAND (_p1, 1);
4178 29612 : switch (TREE_CODE (_q41))
4179 : {
4180 26 : CASE_CONVERT:
4181 26 : {
4182 26 : tree _q60 = TREE_OPERAND (_q41, 0);
4183 26 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4184 : {
4185 0 : {
4186 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q40, _q20 };
4187 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
4188 0 : if (res) return res;
4189 : }
4190 : }
4191 : break;
4192 : }
4193 29612 : default:;
4194 : }
4195 29612 : switch (TREE_CODE (_q40))
4196 : {
4197 4003 : CASE_CONVERT:
4198 4003 : {
4199 4003 : tree _q50 = TREE_OPERAND (_q40, 0);
4200 4003 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4201 : {
4202 0 : {
4203 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q41, _q20 };
4204 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
4205 0 : if (res) return res;
4206 : }
4207 : }
4208 : break;
4209 : }
4210 29612 : default:;
4211 : }
4212 29612 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
4213 : {
4214 0 : {
4215 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q40, _q20 };
4216 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
4217 0 : if (res) return res;
4218 : }
4219 : }
4220 29612 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
4221 : {
4222 0 : {
4223 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q41, _q20 };
4224 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
4225 0 : if (res) return res;
4226 : }
4227 : }
4228 : break;
4229 : }
4230 6719631 : default:;
4231 : }
4232 6719631 : {
4233 6719631 : tree _p1_pops[1];
4234 6719631 : if (tree_nop_convert (_p1, _p1_pops))
4235 : {
4236 908319 : tree _q40 = _p1_pops[0];
4237 908319 : switch (TREE_CODE (_q40))
4238 : {
4239 472 : case PLUS_EXPR:
4240 472 : {
4241 472 : tree _q50 = TREE_OPERAND (_q40, 0);
4242 472 : tree _q51 = TREE_OPERAND (_q40, 1);
4243 472 : switch (TREE_CODE (_q51))
4244 : {
4245 0 : CASE_CONVERT:
4246 0 : {
4247 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4248 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
4249 : {
4250 0 : {
4251 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q50, _q20 };
4252 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4253 0 : if (res) return res;
4254 : }
4255 : }
4256 : break;
4257 : }
4258 472 : default:;
4259 : }
4260 472 : switch (TREE_CODE (_q50))
4261 : {
4262 403 : CASE_CONVERT:
4263 403 : {
4264 403 : tree _q60 = TREE_OPERAND (_q50, 0);
4265 403 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4266 : {
4267 0 : {
4268 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q51, _q20 };
4269 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4270 0 : if (res) return res;
4271 : }
4272 : }
4273 : break;
4274 : }
4275 472 : default:;
4276 : }
4277 472 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4278 : {
4279 0 : {
4280 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q50, _q20 };
4281 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4282 0 : if (res) return res;
4283 : }
4284 : }
4285 472 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4286 : {
4287 0 : {
4288 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q51, _q20 };
4289 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4290 0 : if (res) return res;
4291 : }
4292 : }
4293 : break;
4294 : }
4295 : default:;
4296 : }
4297 : }
4298 : }
4299 6719631 : break;
4300 : }
4301 33563546 : default:;
4302 : }
4303 33563546 : {
4304 33563546 : tree _p0_pops[1];
4305 33563546 : if (tree_nop_convert (_p0, _p0_pops))
4306 : {
4307 3103466 : tree _q20 = _p0_pops[0];
4308 3103466 : switch (TREE_CODE (_q20))
4309 : {
4310 1 : case LSHIFT_EXPR:
4311 1 : {
4312 1 : tree _q30 = TREE_OPERAND (_q20, 0);
4313 1 : tree _q31 = TREE_OPERAND (_q20, 1);
4314 1 : switch (TREE_CODE (_p1))
4315 : {
4316 0 : CASE_CONVERT:
4317 0 : {
4318 0 : tree _q60 = TREE_OPERAND (_p1, 0);
4319 0 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
4320 : {
4321 0 : {
4322 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
4323 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4324 0 : if (res) return res;
4325 : }
4326 : }
4327 : break;
4328 : }
4329 1 : default:;
4330 : }
4331 1 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
4332 : {
4333 1 : {
4334 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
4335 1 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4336 1 : if (res) return res;
4337 : }
4338 : }
4339 : break;
4340 : }
4341 2453 : case PLUS_EXPR:
4342 2453 : {
4343 2453 : tree _q30 = TREE_OPERAND (_q20, 0);
4344 2453 : tree _q31 = TREE_OPERAND (_q20, 1);
4345 2453 : switch (TREE_CODE (_q31))
4346 : {
4347 0 : CASE_CONVERT:
4348 0 : {
4349 0 : tree _q50 = TREE_OPERAND (_q31, 0);
4350 0 : switch (TREE_CODE (_p1))
4351 : {
4352 0 : CASE_CONVERT:
4353 0 : {
4354 0 : tree _q70 = TREE_OPERAND (_p1, 0);
4355 0 : if ((_q70 == _q50 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q50, 0) && types_match (_q70, _q50)))
4356 : {
4357 0 : {
4358 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50 };
4359 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4360 0 : if (res) return res;
4361 : }
4362 : }
4363 : break;
4364 : }
4365 : default:;
4366 : }
4367 : break;
4368 : }
4369 2453 : default:;
4370 : }
4371 2453 : switch (TREE_CODE (_q30))
4372 : {
4373 1255 : CASE_CONVERT:
4374 1255 : {
4375 1255 : tree _q40 = TREE_OPERAND (_q30, 0);
4376 1255 : switch (TREE_CODE (_p1))
4377 : {
4378 32 : CASE_CONVERT:
4379 32 : {
4380 32 : tree _q70 = TREE_OPERAND (_p1, 0);
4381 32 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
4382 : {
4383 0 : {
4384 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q40 };
4385 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4386 0 : if (res) return res;
4387 : }
4388 : }
4389 : break;
4390 : }
4391 1255 : default:;
4392 : }
4393 1255 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
4394 : {
4395 0 : {
4396 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q40 };
4397 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4398 0 : if (res) return res;
4399 : }
4400 : }
4401 : break;
4402 : }
4403 2453 : default:;
4404 : }
4405 2453 : switch (TREE_CODE (_q31))
4406 : {
4407 0 : CASE_CONVERT:
4408 0 : {
4409 0 : tree _q50 = TREE_OPERAND (_q31, 0);
4410 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
4411 : {
4412 0 : {
4413 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50 };
4414 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4415 0 : if (res) return res;
4416 : }
4417 : }
4418 : break;
4419 : }
4420 2453 : default:;
4421 : }
4422 2453 : switch (TREE_CODE (_p1))
4423 : {
4424 101 : CASE_CONVERT:
4425 101 : {
4426 101 : tree _q60 = TREE_OPERAND (_p1, 0);
4427 101 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
4428 : {
4429 0 : {
4430 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
4431 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4432 0 : if (res) return res;
4433 : }
4434 : }
4435 101 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
4436 : {
4437 0 : {
4438 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30 };
4439 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4440 0 : if (res) return res;
4441 : }
4442 : }
4443 : break;
4444 : }
4445 2453 : default:;
4446 : }
4447 2453 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
4448 : {
4449 0 : {
4450 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
4451 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4452 0 : if (res) return res;
4453 : }
4454 : }
4455 2453 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
4456 : {
4457 0 : {
4458 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30 };
4459 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
4460 0 : if (res) return res;
4461 : }
4462 : }
4463 : break;
4464 : }
4465 : default:;
4466 : }
4467 : }
4468 : }
4469 33563545 : {
4470 33563545 : tree _p1_pops[1];
4471 33563545 : if (tree_nop_convert (_p1, _p1_pops))
4472 : {
4473 1278454 : tree _q30 = _p1_pops[0];
4474 1278454 : switch (TREE_CODE (_q30))
4475 : {
4476 0 : case LSHIFT_EXPR:
4477 0 : {
4478 0 : tree _q40 = TREE_OPERAND (_q30, 0);
4479 0 : tree _q41 = TREE_OPERAND (_q30, 1);
4480 0 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
4481 : {
4482 0 : {
4483 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _p0 };
4484 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4485 0 : if (res) return res;
4486 : }
4487 : }
4488 : break;
4489 : }
4490 : default:;
4491 : }
4492 : }
4493 : }
4494 33563545 : switch (TREE_CODE (_p0))
4495 : {
4496 1423 : case LSHIFT_EXPR:
4497 1423 : {
4498 1423 : tree _q20 = TREE_OPERAND (_p0, 0);
4499 1423 : tree _q21 = TREE_OPERAND (_p0, 1);
4500 1423 : switch (TREE_CODE (_p1))
4501 : {
4502 61 : CASE_CONVERT:
4503 61 : {
4504 61 : tree _q50 = TREE_OPERAND (_p1, 0);
4505 61 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
4506 : {
4507 4 : {
4508 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4509 4 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4510 4 : if (res) return res;
4511 : }
4512 : }
4513 : break;
4514 : }
4515 1422 : default:;
4516 : }
4517 1422 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
4518 : {
4519 27 : {
4520 27 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4521 27 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4522 27 : if (res) return res;
4523 : }
4524 : }
4525 1418 : if (tree_zero_one_valued_p (_q20))
4526 : {
4527 234 : switch (TREE_CODE (_q21))
4528 : {
4529 10 : case INTEGER_CST:
4530 10 : {
4531 10 : if (integer_zerop (_p1))
4532 : {
4533 2 : {
4534 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4535 2 : if (tree_fits_shwi_p (captures[1])
4536 2 : && tree_to_shwi (captures[1]) > 0
4537 4 : && tree_to_shwi (captures[1]) < TYPE_PRECISION (TREE_TYPE (captures[0]))
4538 : )
4539 : {
4540 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1468;
4541 2 : {
4542 2 : tree res_op0;
4543 2 : res_op0 = captures[0];
4544 2 : tree res_op1;
4545 2 : res_op1 = captures[2];
4546 2 : tree _r;
4547 2 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
4548 2 : if (TREE_SIDE_EFFECTS (captures[1]))
4549 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4550 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 963, __FILE__, __LINE__, true);
4551 2 : return _r;
4552 : }
4553 0 : next_after_fail1468:;
4554 : }
4555 : }
4556 : }
4557 : break;
4558 : }
4559 : default:;
4560 : }
4561 : }
4562 : break;
4563 : }
4564 33563538 : default:;
4565 : }
4566 33563538 : switch (TREE_CODE (_p1))
4567 : {
4568 70 : case LSHIFT_EXPR:
4569 70 : {
4570 70 : tree _q30 = TREE_OPERAND (_p1, 0);
4571 70 : tree _q31 = TREE_OPERAND (_p1, 1);
4572 70 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
4573 : {
4574 0 : {
4575 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
4576 0 : tree res = generic_simplify_204 (loc, type, _p0, _p1, captures, EQ_EXPR);
4577 0 : if (res) return res;
4578 : }
4579 : }
4580 : break;
4581 : }
4582 33563538 : default:;
4583 : }
4584 33563538 : switch (TREE_CODE (_p0))
4585 : {
4586 45349 : case VIEW_CONVERT_EXPR:
4587 45349 : {
4588 45349 : tree _q20 = TREE_OPERAND (_p0, 0);
4589 45349 : if (tree_zero_one_valued_p (_q20))
4590 : {
4591 0 : if (integer_zerop (_p1))
4592 : {
4593 0 : {
4594 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4595 0 : tree res = generic_simplify_210 (loc, type, _p0, _p1, captures, EQ_EXPR);
4596 0 : if (res) return res;
4597 : }
4598 : }
4599 : }
4600 : break;
4601 : }
4602 897534 : case BIT_AND_EXPR:
4603 897534 : {
4604 897534 : tree _q20 = TREE_OPERAND (_p0, 0);
4605 897534 : tree _q21 = TREE_OPERAND (_p0, 1);
4606 897534 : if (tree_truth_valued_p (_q20))
4607 : {
4608 21 : if (tree_truth_valued_p (_q21))
4609 : {
4610 20 : switch (TREE_CODE (_p1))
4611 : {
4612 0 : case BIT_XOR_EXPR:
4613 0 : {
4614 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4615 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4616 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4617 : {
4618 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4619 : {
4620 0 : {
4621 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4622 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1469;
4623 0 : {
4624 0 : tree res_op0;
4625 0 : {
4626 0 : tree _o1[2], _r1;
4627 0 : _o1[0] = captures[0];
4628 0 : _o1[1] = captures[1];
4629 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4630 0 : res_op0 = _r1;
4631 : }
4632 0 : tree _r;
4633 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
4634 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
4635 0 : return _r;
4636 : }
4637 0 : next_after_fail1469:;
4638 : }
4639 : }
4640 : }
4641 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
4642 : {
4643 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4644 : {
4645 0 : {
4646 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
4647 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1470;
4648 0 : {
4649 0 : tree res_op0;
4650 0 : {
4651 0 : tree _o1[2], _r1;
4652 0 : _o1[0] = captures[0];
4653 0 : _o1[1] = captures[1];
4654 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4655 0 : res_op0 = _r1;
4656 : }
4657 0 : tree _r;
4658 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
4659 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
4660 0 : return _r;
4661 : }
4662 0 : next_after_fail1470:;
4663 : }
4664 : }
4665 : }
4666 : break;
4667 : }
4668 : default:;
4669 : }
4670 : }
4671 : }
4672 : break;
4673 : }
4674 581 : case BIT_XOR_EXPR:
4675 581 : {
4676 581 : tree _q20 = TREE_OPERAND (_p0, 0);
4677 581 : tree _q21 = TREE_OPERAND (_p0, 1);
4678 581 : switch (TREE_CODE (_p1))
4679 : {
4680 0 : case BIT_AND_EXPR:
4681 0 : {
4682 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4683 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4684 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4685 : {
4686 0 : if (tree_truth_valued_p (_q50))
4687 : {
4688 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4689 : {
4690 0 : if (tree_truth_valued_p (_q51))
4691 : {
4692 0 : {
4693 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4694 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1471;
4695 0 : {
4696 0 : tree res_op0;
4697 0 : {
4698 0 : tree _o1[2], _r1;
4699 0 : _o1[0] = captures[0];
4700 0 : _o1[1] = captures[1];
4701 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4702 0 : res_op0 = _r1;
4703 : }
4704 0 : tree _r;
4705 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
4706 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
4707 0 : return _r;
4708 : }
4709 0 : next_after_fail1471:;
4710 : }
4711 : }
4712 : }
4713 : }
4714 : }
4715 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
4716 : {
4717 0 : if (tree_truth_valued_p (_q50))
4718 : {
4719 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4720 : {
4721 0 : if (tree_truth_valued_p (_q51))
4722 : {
4723 0 : {
4724 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4725 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1472;
4726 0 : {
4727 0 : tree res_op0;
4728 0 : {
4729 0 : tree _o1[2], _r1;
4730 0 : _o1[0] = captures[0];
4731 0 : _o1[1] = captures[1];
4732 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4733 0 : res_op0 = _r1;
4734 : }
4735 0 : tree _r;
4736 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
4737 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
4738 0 : return _r;
4739 : }
4740 0 : next_after_fail1472:;
4741 : }
4742 : }
4743 : }
4744 : }
4745 : }
4746 : break;
4747 : }
4748 : default:;
4749 : }
4750 : break;
4751 : }
4752 404 : case BIT_NOT_EXPR:
4753 404 : {
4754 404 : tree _q20 = TREE_OPERAND (_p0, 0);
4755 404 : if (tree_truth_valued_p (_q20))
4756 : {
4757 0 : if (tree_truth_valued_p (_p1))
4758 : {
4759 0 : {
4760 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
4761 0 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures);
4762 0 : if (res) return res;
4763 : }
4764 : }
4765 : }
4766 : break;
4767 : }
4768 64187 : case MULT_EXPR:
4769 64187 : {
4770 64187 : tree _q20 = TREE_OPERAND (_p0, 0);
4771 64187 : tree _q21 = TREE_OPERAND (_p0, 1);
4772 64187 : switch (TREE_CODE (_p1))
4773 : {
4774 855 : case MULT_EXPR:
4775 855 : {
4776 855 : tree _q50 = TREE_OPERAND (_p1, 0);
4777 855 : tree _q51 = TREE_OPERAND (_p1, 1);
4778 855 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4779 : {
4780 544 : {
4781 544 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4782 544 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, EQ_EXPR);
4783 544 : if (res) return res;
4784 : }
4785 : }
4786 839 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
4787 : {
4788 0 : {
4789 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
4790 0 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, EQ_EXPR);
4791 0 : if (res) return res;
4792 : }
4793 : }
4794 839 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4795 : {
4796 0 : {
4797 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
4798 0 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, EQ_EXPR);
4799 0 : if (res) return res;
4800 : }
4801 : }
4802 839 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4803 : {
4804 16 : {
4805 16 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
4806 16 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, EQ_EXPR);
4807 16 : if (res) return res;
4808 : }
4809 : }
4810 : break;
4811 : }
4812 64171 : default:;
4813 : }
4814 64171 : switch (TREE_CODE (_q21))
4815 : {
4816 56503 : case INTEGER_CST:
4817 56503 : {
4818 56503 : switch (TREE_CODE (_p1))
4819 : {
4820 805 : case MULT_EXPR:
4821 805 : {
4822 805 : tree _q50 = TREE_OPERAND (_p1, 0);
4823 805 : tree _q51 = TREE_OPERAND (_p1, 1);
4824 805 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4825 : {
4826 499 : {
4827 499 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4828 499 : tree res = generic_simplify_212 (loc, type, _p0, _p1, captures, EQ_EXPR);
4829 499 : if (res) return res;
4830 : }
4831 : }
4832 : break;
4833 : }
4834 : default:;
4835 : }
4836 : break;
4837 : }
4838 : default:;
4839 : }
4840 : break;
4841 : }
4842 7454 : case EXACT_DIV_EXPR:
4843 7454 : {
4844 7454 : tree _q20 = TREE_OPERAND (_p0, 0);
4845 7454 : tree _q21 = TREE_OPERAND (_p0, 1);
4846 7454 : switch (TREE_CODE (_q21))
4847 : {
4848 7454 : case INTEGER_CST:
4849 7454 : {
4850 7454 : switch (TREE_CODE (_p1))
4851 : {
4852 0 : case EXACT_DIV_EXPR:
4853 0 : {
4854 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4855 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4856 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4857 : {
4858 0 : {
4859 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
4860 0 : tree res = generic_simplify_206 (loc, type, _p0, _p1, captures, EQ_EXPR);
4861 0 : if (res) return res;
4862 : }
4863 : }
4864 : break;
4865 : }
4866 : default:;
4867 : }
4868 : break;
4869 : }
4870 : default:;
4871 : }
4872 : break;
4873 : }
4874 5267 : case TRUNC_DIV_EXPR:
4875 5267 : {
4876 5267 : tree _q20 = TREE_OPERAND (_p0, 0);
4877 5267 : tree _q21 = TREE_OPERAND (_p0, 1);
4878 5267 : switch (TREE_CODE (_q21))
4879 : {
4880 3794 : case INTEGER_CST:
4881 3794 : {
4882 3794 : switch (TREE_CODE (_p1))
4883 : {
4884 966 : case INTEGER_CST:
4885 966 : {
4886 966 : {
4887 966 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4888 966 : tree res = generic_simplify_213 (loc, type, _p0, _p1, captures, EQ_EXPR);
4889 966 : if (res) return res;
4890 : }
4891 21 : break;
4892 : }
4893 : default:;
4894 : }
4895 : break;
4896 : }
4897 : default:;
4898 : }
4899 : break;
4900 : }
4901 17181 : case RSHIFT_EXPR:
4902 17181 : {
4903 17181 : tree _q20 = TREE_OPERAND (_p0, 0);
4904 17181 : tree _q21 = TREE_OPERAND (_p0, 1);
4905 17181 : switch (TREE_CODE (_q21))
4906 : {
4907 16463 : case INTEGER_CST:
4908 16463 : {
4909 16463 : if (integer_zerop (_p1))
4910 : {
4911 1512 : {
4912 1512 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4913 1512 : tree res = generic_simplify_214 (loc, type, _p0, _p1, captures, EQ_EXPR, GE_EXPR);
4914 1512 : if (res) return res;
4915 : }
4916 : }
4917 : break;
4918 : }
4919 : default:;
4920 : }
4921 : break;
4922 : }
4923 710395 : case PLUS_EXPR:
4924 710395 : {
4925 710395 : tree _q20 = TREE_OPERAND (_p0, 0);
4926 710395 : tree _q21 = TREE_OPERAND (_p0, 1);
4927 710395 : switch (TREE_CODE (_p1))
4928 : {
4929 51303 : case PLUS_EXPR:
4930 51303 : {
4931 51303 : tree _q50 = TREE_OPERAND (_p1, 0);
4932 51303 : tree _q51 = TREE_OPERAND (_p1, 1);
4933 51303 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4934 : {
4935 373 : {
4936 373 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4937 746 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4938 683 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
4939 268 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
4940 : )
4941 : {
4942 310 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1473;
4943 310 : {
4944 310 : tree res_op0;
4945 310 : res_op0 = captures[0];
4946 310 : tree res_op1;
4947 310 : res_op1 = captures[2];
4948 310 : tree _r;
4949 310 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
4950 310 : if (TREE_SIDE_EFFECTS (captures[1]))
4951 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4952 310 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
4953 310 : return _r;
4954 : }
4955 0 : next_after_fail1473:;
4956 : }
4957 : }
4958 : }
4959 50993 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
4960 : {
4961 0 : {
4962 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
4963 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4964 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
4965 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
4966 : )
4967 : {
4968 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1474;
4969 0 : {
4970 0 : tree res_op0;
4971 0 : res_op0 = captures[0];
4972 0 : tree res_op1;
4973 0 : res_op1 = captures[2];
4974 0 : tree _r;
4975 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
4976 0 : if (TREE_SIDE_EFFECTS (captures[1]))
4977 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4978 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
4979 0 : return _r;
4980 : }
4981 0 : next_after_fail1474:;
4982 : }
4983 : }
4984 : }
4985 50993 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4986 : {
4987 0 : {
4988 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
4989 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4990 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
4991 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
4992 : )
4993 : {
4994 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1475;
4995 0 : {
4996 0 : tree res_op0;
4997 0 : res_op0 = captures[0];
4998 0 : tree res_op1;
4999 0 : res_op1 = captures[2];
5000 0 : tree _r;
5001 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5002 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5003 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5004 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
5005 0 : return _r;
5006 : }
5007 0 : next_after_fail1475:;
5008 : }
5009 : }
5010 : }
5011 50993 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5012 : {
5013 35 : {
5014 35 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
5015 70 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5016 35 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5017 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5018 : )
5019 : {
5020 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1476;
5021 0 : {
5022 0 : tree res_op0;
5023 0 : res_op0 = captures[0];
5024 0 : tree res_op1;
5025 0 : res_op1 = captures[2];
5026 0 : tree _r;
5027 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5028 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5029 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5030 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
5031 0 : return _r;
5032 : }
5033 0 : next_after_fail1476:;
5034 : }
5035 : }
5036 : }
5037 : break;
5038 : }
5039 710085 : default:;
5040 : }
5041 710085 : switch (TREE_CODE (_q21))
5042 : {
5043 2708 : CASE_CONVERT:
5044 2708 : {
5045 2708 : tree _q40 = TREE_OPERAND (_q21, 0);
5046 2708 : switch (TREE_CODE (_p1))
5047 : {
5048 158 : CASE_CONVERT:
5049 158 : {
5050 158 : tree _q60 = TREE_OPERAND (_p1, 0);
5051 158 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
5052 : {
5053 0 : {
5054 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40 };
5055 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5056 0 : if (res) return res;
5057 : }
5058 : }
5059 : break;
5060 : }
5061 : default:;
5062 : }
5063 : break;
5064 : }
5065 710085 : default:;
5066 : }
5067 710085 : switch (TREE_CODE (_q20))
5068 : {
5069 27323 : CASE_CONVERT:
5070 27323 : {
5071 27323 : tree _q30 = TREE_OPERAND (_q20, 0);
5072 27323 : switch (TREE_CODE (_p1))
5073 : {
5074 367 : CASE_CONVERT:
5075 367 : {
5076 367 : tree _q60 = TREE_OPERAND (_p1, 0);
5077 367 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
5078 : {
5079 1 : {
5080 1 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q30 };
5081 1 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5082 1 : if (res) return res;
5083 : }
5084 : }
5085 : break;
5086 : }
5087 27322 : default:;
5088 : }
5089 27322 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
5090 : {
5091 0 : {
5092 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q30 };
5093 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5094 0 : if (res) return res;
5095 : }
5096 : }
5097 : break;
5098 : }
5099 710084 : default:;
5100 : }
5101 710084 : switch (TREE_CODE (_q21))
5102 : {
5103 2708 : CASE_CONVERT:
5104 2708 : {
5105 2708 : tree _q40 = TREE_OPERAND (_q21, 0);
5106 2708 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
5107 : {
5108 0 : {
5109 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40 };
5110 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5111 0 : if (res) return res;
5112 : }
5113 : }
5114 : break;
5115 : }
5116 710084 : default:;
5117 : }
5118 710084 : switch (TREE_CODE (_p1))
5119 : {
5120 14307 : CASE_CONVERT:
5121 14307 : {
5122 14307 : tree _q50 = TREE_OPERAND (_p1, 0);
5123 14307 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5124 : {
5125 0 : {
5126 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5127 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5128 0 : if (res) return res;
5129 : }
5130 : }
5131 14307 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5132 : {
5133 0 : {
5134 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q20 };
5135 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5136 0 : if (res) return res;
5137 : }
5138 : }
5139 : break;
5140 : }
5141 710084 : default:;
5142 : }
5143 710084 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
5144 : {
5145 17275 : {
5146 17275 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5147 17275 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5148 17275 : if (res) return res;
5149 : }
5150 : }
5151 692871 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5152 : {
5153 61 : {
5154 61 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q20 };
5155 61 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5156 61 : if (res) return res;
5157 : }
5158 : }
5159 : break;
5160 : }
5161 66562 : case POINTER_PLUS_EXPR:
5162 66562 : {
5163 66562 : tree _q20 = TREE_OPERAND (_p0, 0);
5164 66562 : tree _q21 = TREE_OPERAND (_p0, 1);
5165 66562 : switch (TREE_CODE (_p1))
5166 : {
5167 2778 : case POINTER_PLUS_EXPR:
5168 2778 : {
5169 2778 : tree _q50 = TREE_OPERAND (_p1, 0);
5170 2778 : tree _q51 = TREE_OPERAND (_p1, 1);
5171 2778 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5172 : {
5173 14 : {
5174 14 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5175 14 : tree res = generic_simplify_215 (loc, type, _p0, _p1, captures, EQ_EXPR);
5176 14 : if (res) return res;
5177 : }
5178 : }
5179 : break;
5180 : }
5181 66548 : default:;
5182 : }
5183 66548 : switch (TREE_CODE (_q20))
5184 : {
5185 1170 : CASE_CONVERT:
5186 1170 : {
5187 1170 : tree _q30 = TREE_OPERAND (_q20, 0);
5188 1170 : switch (TREE_CODE (_p1))
5189 : {
5190 84 : CASE_CONVERT:
5191 84 : {
5192 84 : tree _q60 = TREE_OPERAND (_p1, 0);
5193 84 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
5194 : {
5195 54 : {
5196 54 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q21 };
5197 54 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5198 54 : if (res) return res;
5199 : }
5200 : }
5201 : break;
5202 : }
5203 1116 : default:;
5204 : }
5205 1116 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
5206 : {
5207 0 : {
5208 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q21 };
5209 0 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5210 0 : if (res) return res;
5211 : }
5212 : }
5213 : break;
5214 : }
5215 66494 : default:;
5216 : }
5217 66494 : switch (TREE_CODE (_p1))
5218 : {
5219 382 : CASE_CONVERT:
5220 382 : {
5221 382 : tree _q50 = TREE_OPERAND (_p1, 0);
5222 382 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5223 : {
5224 0 : {
5225 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5226 0 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5227 0 : if (res) return res;
5228 : }
5229 : }
5230 : break;
5231 : }
5232 66494 : default:;
5233 : }
5234 66494 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5235 : {
5236 1250 : {
5237 1250 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
5238 1250 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5239 1250 : if (res) return res;
5240 : }
5241 : }
5242 : break;
5243 : }
5244 149379 : case MINUS_EXPR:
5245 149379 : {
5246 149379 : tree _q20 = TREE_OPERAND (_p0, 0);
5247 149379 : tree _q21 = TREE_OPERAND (_p0, 1);
5248 149379 : switch (TREE_CODE (_p1))
5249 : {
5250 158 : case MINUS_EXPR:
5251 158 : {
5252 158 : tree _q50 = TREE_OPERAND (_p1, 0);
5253 158 : tree _q51 = TREE_OPERAND (_p1, 1);
5254 158 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5255 : {
5256 18 : {
5257 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5258 36 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5259 18 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5260 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5261 : )
5262 : {
5263 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1477;
5264 0 : {
5265 0 : tree res_op0;
5266 0 : res_op0 = captures[0];
5267 0 : tree res_op1;
5268 0 : res_op1 = captures[2];
5269 0 : tree _r;
5270 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5271 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5272 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5273 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
5274 0 : return _r;
5275 : }
5276 0 : next_after_fail1477:;
5277 : }
5278 : }
5279 : }
5280 158 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5281 : {
5282 18 : {
5283 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5284 36 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5285 18 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
5286 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
5287 : )
5288 : {
5289 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1478;
5290 0 : {
5291 0 : tree res_op0;
5292 0 : res_op0 = captures[2];
5293 0 : tree res_op1;
5294 0 : res_op1 = captures[1];
5295 0 : tree _r;
5296 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
5297 0 : if (TREE_SIDE_EFFECTS (captures[0]))
5298 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5299 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 905, __FILE__, __LINE__, true);
5300 0 : return _r;
5301 : }
5302 0 : next_after_fail1478:;
5303 : }
5304 : }
5305 : }
5306 : break;
5307 : }
5308 149379 : default:;
5309 : }
5310 149379 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5311 : {
5312 74 : {
5313 74 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
5314 74 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
5315 74 : if (res) return res;
5316 : }
5317 : }
5318 : break;
5319 : }
5320 31957 : case POINTER_DIFF_EXPR:
5321 31957 : {
5322 31957 : tree _q20 = TREE_OPERAND (_p0, 0);
5323 31957 : tree _q21 = TREE_OPERAND (_p0, 1);
5324 31957 : switch (TREE_CODE (_p1))
5325 : {
5326 967 : case POINTER_DIFF_EXPR:
5327 967 : {
5328 967 : tree _q50 = TREE_OPERAND (_p1, 0);
5329 967 : tree _q51 = TREE_OPERAND (_p1, 1);
5330 967 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5331 : {
5332 0 : {
5333 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
5334 0 : tree res = generic_simplify_218 (loc, type, _p0, _p1, captures, EQ_EXPR);
5335 0 : if (res) return res;
5336 : }
5337 : }
5338 967 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5339 : {
5340 0 : {
5341 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
5342 0 : tree res = generic_simplify_219 (loc, type, _p0, _p1, captures, EQ_EXPR);
5343 0 : if (res) return res;
5344 : }
5345 : }
5346 : break;
5347 : }
5348 : default:;
5349 : }
5350 : break;
5351 : }
5352 33543569 : default:;
5353 : }
5354 33543569 : {
5355 33543569 : tree _p0_pops[1];
5356 33543569 : if (tree_logical_inverted_value (_p0, _p0_pops))
5357 : {
5358 7826 : tree _q20 = _p0_pops[0];
5359 7826 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5360 : {
5361 9 : if (tree_truth_valued_p (_p1))
5362 : {
5363 0 : {
5364 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5365 0 : tree res = generic_simplify_208 (loc, type, _p0, _p1, captures, EQ_EXPR);
5366 0 : if (res) return res;
5367 : }
5368 : }
5369 : }
5370 : }
5371 : }
5372 33543569 : if (tree_truth_valued_p (_p0))
5373 : {
5374 790341 : switch (TREE_CODE (_p1))
5375 : {
5376 24 : case BIT_NOT_EXPR:
5377 24 : {
5378 24 : tree _q30 = TREE_OPERAND (_p1, 0);
5379 24 : if (tree_truth_valued_p (_q30))
5380 : {
5381 4 : {
5382 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
5383 4 : tree res = generic_simplify_209 (loc, type, _p0, _p1, captures);
5384 4 : if (res) return res;
5385 : }
5386 : }
5387 : break;
5388 : }
5389 790341 : default:;
5390 : }
5391 790341 : {
5392 790341 : tree _p1_pops[1];
5393 790341 : if (tree_logical_inverted_value (_p1, _p1_pops))
5394 : {
5395 90 : tree _q30 = _p1_pops[0];
5396 90 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5397 : {
5398 0 : {
5399 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5400 0 : tree res = generic_simplify_208 (loc, type, _p0, _p1, captures, EQ_EXPR);
5401 0 : if (res) return res;
5402 : }
5403 : }
5404 : }
5405 : }
5406 : }
5407 33543569 : switch (TREE_CODE (_p1))
5408 : {
5409 85516 : case PLUS_EXPR:
5410 85516 : {
5411 85516 : tree _q30 = TREE_OPERAND (_p1, 0);
5412 85516 : tree _q31 = TREE_OPERAND (_p1, 1);
5413 85516 : switch (TREE_CODE (_q31))
5414 : {
5415 26 : CASE_CONVERT:
5416 26 : {
5417 26 : tree _q50 = TREE_OPERAND (_q31, 0);
5418 26 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
5419 : {
5420 0 : {
5421 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0 };
5422 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5423 0 : if (res) return res;
5424 : }
5425 : }
5426 : break;
5427 : }
5428 85516 : default:;
5429 : }
5430 85516 : switch (TREE_CODE (_q30))
5431 : {
5432 21206 : CASE_CONVERT:
5433 21206 : {
5434 21206 : tree _q40 = TREE_OPERAND (_q30, 0);
5435 21206 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
5436 : {
5437 0 : {
5438 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q31, _p0 };
5439 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5440 0 : if (res) return res;
5441 : }
5442 : }
5443 : break;
5444 : }
5445 85516 : default:;
5446 : }
5447 85516 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
5448 : {
5449 0 : {
5450 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0 };
5451 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5452 0 : if (res) return res;
5453 : }
5454 : }
5455 85516 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5456 : {
5457 0 : {
5458 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q31, _p0 };
5459 0 : tree res = generic_simplify_207 (loc, type, _p0, _p1, captures, EQ_EXPR);
5460 0 : if (res) return res;
5461 : }
5462 : }
5463 : break;
5464 : }
5465 33543569 : default:;
5466 : }
5467 33543569 : {
5468 33543569 : tree _p1_pops[1];
5469 33543569 : if (tree_nop_convert (_p1, _p1_pops))
5470 : {
5471 1278397 : tree _q30 = _p1_pops[0];
5472 1278397 : switch (TREE_CODE (_q30))
5473 : {
5474 1717 : case PLUS_EXPR:
5475 1717 : {
5476 1717 : tree _q40 = TREE_OPERAND (_q30, 0);
5477 1717 : tree _q41 = TREE_OPERAND (_q30, 1);
5478 1717 : switch (TREE_CODE (_q41))
5479 : {
5480 2 : CASE_CONVERT:
5481 2 : {
5482 2 : tree _q60 = TREE_OPERAND (_q41, 0);
5483 2 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
5484 : {
5485 0 : {
5486 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0 };
5487 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5488 0 : if (res) return res;
5489 : }
5490 : }
5491 : break;
5492 : }
5493 1717 : default:;
5494 : }
5495 1717 : switch (TREE_CODE (_q40))
5496 : {
5497 1615 : CASE_CONVERT:
5498 1615 : {
5499 1615 : tree _q50 = TREE_OPERAND (_q40, 0);
5500 1615 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
5501 : {
5502 0 : {
5503 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q41, _p0 };
5504 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5505 0 : if (res) return res;
5506 : }
5507 : }
5508 : break;
5509 : }
5510 1717 : default:;
5511 : }
5512 1717 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
5513 : {
5514 0 : {
5515 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0 };
5516 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5517 0 : if (res) return res;
5518 : }
5519 : }
5520 1717 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
5521 : {
5522 0 : {
5523 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q41, _p0 };
5524 0 : tree res = generic_simplify_205 (loc, type, _p0, _p1, captures, EQ_EXPR);
5525 0 : if (res) return res;
5526 : }
5527 : }
5528 : break;
5529 : }
5530 : default:;
5531 : }
5532 : }
5533 : }
5534 33543569 : switch (TREE_CODE (_p0))
5535 : {
5536 6719630 : CASE_CONVERT:
5537 6719630 : {
5538 6719630 : tree _q20 = TREE_OPERAND (_p0, 0);
5539 6719630 : switch (TREE_CODE (_p1))
5540 : {
5541 155 : case POINTER_PLUS_EXPR:
5542 155 : {
5543 155 : tree _q40 = TREE_OPERAND (_p1, 0);
5544 155 : tree _q41 = TREE_OPERAND (_p1, 1);
5545 155 : switch (TREE_CODE (_q40))
5546 : {
5547 96 : CASE_CONVERT:
5548 96 : {
5549 96 : tree _q50 = TREE_OPERAND (_q40, 0);
5550 96 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5551 : {
5552 3 : {
5553 3 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q20, _q41 };
5554 3 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5555 3 : if (res) return res;
5556 : }
5557 : }
5558 : break;
5559 : }
5560 152 : default:;
5561 : }
5562 152 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
5563 : {
5564 0 : {
5565 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q20, _q41 };
5566 0 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5567 0 : if (res) return res;
5568 : }
5569 : }
5570 : break;
5571 : }
5572 6719627 : default:;
5573 : }
5574 6719627 : {
5575 6719627 : tree _p1_pops[1];
5576 6719627 : if (tree_nop_convert (_p1, _p1_pops))
5577 : {
5578 908319 : tree _q40 = _p1_pops[0];
5579 908319 : switch (TREE_CODE (_q40))
5580 : {
5581 6 : case POINTER_PLUS_EXPR:
5582 6 : {
5583 6 : tree _q50 = TREE_OPERAND (_q40, 0);
5584 6 : tree _q51 = TREE_OPERAND (_q40, 1);
5585 6 : switch (TREE_CODE (_q50))
5586 : {
5587 0 : CASE_CONVERT:
5588 0 : {
5589 0 : tree _q60 = TREE_OPERAND (_q50, 0);
5590 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5591 : {
5592 0 : {
5593 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q20, _q51 };
5594 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5595 0 : if (res) return res;
5596 : }
5597 : }
5598 : break;
5599 : }
5600 6 : default:;
5601 : }
5602 6 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5603 : {
5604 0 : {
5605 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q20, _q51 };
5606 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5607 0 : if (res) return res;
5608 : }
5609 : }
5610 : break;
5611 : }
5612 : default:;
5613 : }
5614 : }
5615 : }
5616 6719627 : break;
5617 : }
5618 33543566 : default:;
5619 : }
5620 33543566 : {
5621 33543566 : tree _p0_pops[1];
5622 33543566 : if (tree_nop_convert (_p0, _p0_pops))
5623 : {
5624 3103462 : tree _q20 = _p0_pops[0];
5625 3103462 : switch (TREE_CODE (_q20))
5626 : {
5627 97 : case POINTER_PLUS_EXPR:
5628 97 : {
5629 97 : tree _q30 = TREE_OPERAND (_q20, 0);
5630 97 : tree _q31 = TREE_OPERAND (_q20, 1);
5631 97 : switch (TREE_CODE (_q30))
5632 : {
5633 21 : CASE_CONVERT:
5634 21 : {
5635 21 : tree _q40 = TREE_OPERAND (_q30, 0);
5636 21 : switch (TREE_CODE (_p1))
5637 : {
5638 0 : CASE_CONVERT:
5639 0 : {
5640 0 : tree _q70 = TREE_OPERAND (_p1, 0);
5641 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
5642 : {
5643 0 : {
5644 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q31 };
5645 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5646 0 : if (res) return res;
5647 : }
5648 : }
5649 : break;
5650 : }
5651 21 : default:;
5652 : }
5653 21 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
5654 : {
5655 0 : {
5656 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q31 };
5657 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5658 0 : if (res) return res;
5659 : }
5660 : }
5661 : break;
5662 : }
5663 97 : default:;
5664 : }
5665 97 : switch (TREE_CODE (_p1))
5666 : {
5667 27 : CASE_CONVERT:
5668 27 : {
5669 27 : tree _q60 = TREE_OPERAND (_p1, 0);
5670 27 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
5671 : {
5672 0 : {
5673 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
5674 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5675 0 : if (res) return res;
5676 : }
5677 : }
5678 : break;
5679 : }
5680 97 : default:;
5681 : }
5682 97 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
5683 : {
5684 0 : {
5685 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
5686 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5687 0 : if (res) return res;
5688 : }
5689 : }
5690 : break;
5691 : }
5692 : default:;
5693 : }
5694 : }
5695 : }
5696 33543566 : switch (TREE_CODE (_p1))
5697 : {
5698 6572 : case POINTER_PLUS_EXPR:
5699 6572 : {
5700 6572 : tree _q30 = TREE_OPERAND (_p1, 0);
5701 6572 : tree _q31 = TREE_OPERAND (_p1, 1);
5702 6572 : switch (TREE_CODE (_q30))
5703 : {
5704 3536 : CASE_CONVERT:
5705 3536 : {
5706 3536 : tree _q40 = TREE_OPERAND (_q30, 0);
5707 3536 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
5708 : {
5709 0 : {
5710 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _p0, _q31 };
5711 0 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5712 0 : if (res) return res;
5713 : }
5714 : }
5715 : break;
5716 : }
5717 6572 : default:;
5718 : }
5719 6572 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5720 : {
5721 0 : {
5722 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _p0, _q31 };
5723 0 : tree res = generic_simplify_216 (loc, type, _p0, _p1, captures, EQ_EXPR);
5724 0 : if (res) return res;
5725 : }
5726 : }
5727 : break;
5728 : }
5729 33543566 : default:;
5730 : }
5731 33543566 : {
5732 33543566 : tree _p1_pops[1];
5733 33543566 : if (tree_nop_convert (_p1, _p1_pops))
5734 : {
5735 1278397 : tree _q30 = _p1_pops[0];
5736 1278397 : switch (TREE_CODE (_q30))
5737 : {
5738 18 : case POINTER_PLUS_EXPR:
5739 18 : {
5740 18 : tree _q40 = TREE_OPERAND (_q30, 0);
5741 18 : tree _q41 = TREE_OPERAND (_q30, 1);
5742 18 : switch (TREE_CODE (_q40))
5743 : {
5744 0 : CASE_CONVERT:
5745 0 : {
5746 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5747 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
5748 : {
5749 0 : {
5750 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _p0, _q41 };
5751 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5752 0 : if (res) return res;
5753 : }
5754 : }
5755 : break;
5756 : }
5757 18 : default:;
5758 : }
5759 18 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
5760 : {
5761 0 : {
5762 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _p0, _q41 };
5763 0 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, EQ_EXPR);
5764 0 : if (res) return res;
5765 : }
5766 : }
5767 : break;
5768 : }
5769 : default:;
5770 : }
5771 : }
5772 : }
5773 33543566 : switch (TREE_CODE (_p0))
5774 : {
5775 65244 : case POINTER_PLUS_EXPR:
5776 65244 : {
5777 65244 : tree _q20 = TREE_OPERAND (_p0, 0);
5778 65244 : tree _q21 = TREE_OPERAND (_p0, 1);
5779 65244 : switch (TREE_CODE (_p1))
5780 : {
5781 10377 : case ADDR_EXPR:
5782 10377 : {
5783 10377 : {
5784 10377 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5785 10377 : tree res = generic_simplify_221 (loc, type, _p0, _p1, captures, EQ_EXPR);
5786 10377 : if (res) return res;
5787 : }
5788 10376 : break;
5789 : }
5790 65243 : default:;
5791 : }
5792 65243 : switch (TREE_CODE (_q20))
5793 : {
5794 1219 : case ADDR_EXPR:
5795 1219 : {
5796 1219 : switch (TREE_CODE (_p1))
5797 : {
5798 15 : case POINTER_PLUS_EXPR:
5799 15 : {
5800 15 : tree _q50 = TREE_OPERAND (_p1, 0);
5801 15 : tree _q51 = TREE_OPERAND (_p1, 1);
5802 15 : switch (TREE_CODE (_q50))
5803 : {
5804 6 : case ADDR_EXPR:
5805 6 : {
5806 6 : {
5807 6 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51 };
5808 6 : tree res = generic_simplify_222 (loc, type, _p0, _p1, captures, EQ_EXPR);
5809 6 : if (res) return res;
5810 : }
5811 6 : break;
5812 : }
5813 : default:;
5814 : }
5815 : break;
5816 : }
5817 : default:;
5818 : }
5819 : break;
5820 : }
5821 : default:;
5822 : }
5823 : break;
5824 : }
5825 87989 : case ADDR_EXPR:
5826 87989 : {
5827 87989 : switch (TREE_CODE (_p1))
5828 : {
5829 0 : case POINTER_PLUS_EXPR:
5830 0 : {
5831 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5832 0 : tree _q31 = TREE_OPERAND (_p1, 1);
5833 0 : {
5834 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p0 };
5835 0 : tree res = generic_simplify_221 (loc, type, _p0, _p1, captures, EQ_EXPR);
5836 0 : if (res) return res;
5837 : }
5838 0 : break;
5839 : }
5840 : default:;
5841 : }
5842 : break;
5843 : }
5844 33543565 : default:;
5845 : }
5846 33543565 : switch (TREE_CODE (_p1))
5847 : {
5848 3299 : case MINUS_EXPR:
5849 3299 : {
5850 3299 : tree _q30 = TREE_OPERAND (_p1, 0);
5851 3299 : tree _q31 = TREE_OPERAND (_p1, 1);
5852 3299 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5853 : {
5854 0 : {
5855 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
5856 0 : tree res = generic_simplify_217 (loc, type, _p0, _p1, captures, EQ_EXPR);
5857 0 : if (res) return res;
5858 : }
5859 : }
5860 : break;
5861 : }
5862 33543565 : default:;
5863 : }
5864 33543565 : switch (TREE_CODE (_p0))
5865 : {
5866 4322 : case TRUNC_DIV_EXPR:
5867 4322 : {
5868 4322 : tree _q20 = TREE_OPERAND (_p0, 0);
5869 4322 : tree _q21 = TREE_OPERAND (_p0, 1);
5870 4322 : if (integer_zerop (_p1))
5871 : {
5872 328 : {
5873 328 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5874 328 : tree res = generic_simplify_223 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
5875 328 : if (res) return res;
5876 : }
5877 : }
5878 : break;
5879 : }
5880 6719627 : CASE_CONVERT:
5881 6719627 : {
5882 6719627 : tree _q20 = TREE_OPERAND (_p0, 0);
5883 6719627 : switch (TREE_CODE (_p1))
5884 : {
5885 1421679 : CASE_CONVERT:
5886 1421679 : {
5887 1421679 : tree _q40 = TREE_OPERAND (_p1, 0);
5888 1421679 : switch (TREE_CODE (_q40))
5889 : {
5890 0 : case MINUS_EXPR:
5891 0 : {
5892 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5893 0 : tree _q51 = TREE_OPERAND (_q40, 1);
5894 0 : switch (TREE_CODE (_q50))
5895 : {
5896 0 : case INTEGER_CST:
5897 0 : {
5898 0 : switch (TREE_CODE (_q51))
5899 : {
5900 0 : CASE_CONVERT:
5901 0 : {
5902 0 : tree _q70 = TREE_OPERAND (_q51, 0);
5903 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5904 : {
5905 0 : {
5906 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
5907 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
5908 0 : if (res) return res;
5909 : }
5910 : }
5911 : break;
5912 : }
5913 : default:;
5914 : }
5915 : break;
5916 : }
5917 : default:;
5918 : }
5919 : break;
5920 : }
5921 : default:;
5922 : }
5923 : break;
5924 : }
5925 6719627 : default:;
5926 : }
5927 6719627 : switch (TREE_CODE (_q20))
5928 : {
5929 242 : case MINUS_EXPR:
5930 242 : {
5931 242 : tree _q30 = TREE_OPERAND (_q20, 0);
5932 242 : tree _q31 = TREE_OPERAND (_q20, 1);
5933 242 : switch (TREE_CODE (_q30))
5934 : {
5935 56 : case INTEGER_CST:
5936 56 : {
5937 56 : switch (TREE_CODE (_q31))
5938 : {
5939 0 : CASE_CONVERT:
5940 0 : {
5941 0 : tree _q50 = TREE_OPERAND (_q31, 0);
5942 0 : switch (TREE_CODE (_p1))
5943 : {
5944 0 : CASE_CONVERT:
5945 0 : {
5946 0 : tree _q70 = TREE_OPERAND (_p1, 0);
5947 0 : if ((_q70 == _q50 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q50, 0) && types_match (_q70, _q50)))
5948 : {
5949 0 : {
5950 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
5951 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
5952 0 : if (res) return res;
5953 : }
5954 : }
5955 : break;
5956 : }
5957 0 : default:;
5958 : }
5959 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
5960 : {
5961 0 : {
5962 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
5963 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
5964 0 : if (res) return res;
5965 : }
5966 : }
5967 : break;
5968 : }
5969 56 : default:;
5970 : }
5971 56 : switch (TREE_CODE (_p1))
5972 : {
5973 0 : CASE_CONVERT:
5974 0 : {
5975 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5976 0 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
5977 : {
5978 0 : {
5979 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
5980 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
5981 0 : if (res) return res;
5982 : }
5983 : }
5984 : break;
5985 : }
5986 56 : default:;
5987 : }
5988 56 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
5989 : {
5990 0 : {
5991 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
5992 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
5993 0 : if (res) return res;
5994 : }
5995 : }
5996 : break;
5997 : }
5998 : default:;
5999 : }
6000 : break;
6001 : }
6002 6719627 : default:;
6003 : }
6004 6719627 : switch (TREE_CODE (_p1))
6005 : {
6006 1421679 : CASE_CONVERT:
6007 1421679 : {
6008 1421679 : tree _q40 = TREE_OPERAND (_p1, 0);
6009 1421679 : switch (TREE_CODE (_q40))
6010 : {
6011 0 : case MINUS_EXPR:
6012 0 : {
6013 0 : tree _q50 = TREE_OPERAND (_q40, 0);
6014 0 : tree _q51 = TREE_OPERAND (_q40, 1);
6015 0 : switch (TREE_CODE (_q50))
6016 : {
6017 0 : case INTEGER_CST:
6018 0 : {
6019 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6020 : {
6021 0 : {
6022 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
6023 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6024 0 : if (res) return res;
6025 : }
6026 : }
6027 : break;
6028 : }
6029 : default:;
6030 : }
6031 : break;
6032 : }
6033 : default:;
6034 : }
6035 : break;
6036 : }
6037 266 : case MINUS_EXPR:
6038 266 : {
6039 266 : tree _q40 = TREE_OPERAND (_p1, 0);
6040 266 : tree _q41 = TREE_OPERAND (_p1, 1);
6041 266 : switch (TREE_CODE (_q40))
6042 : {
6043 59 : case INTEGER_CST:
6044 59 : {
6045 59 : switch (TREE_CODE (_q41))
6046 : {
6047 12 : CASE_CONVERT:
6048 12 : {
6049 12 : tree _q60 = TREE_OPERAND (_q41, 0);
6050 12 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
6051 : {
6052 0 : {
6053 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6054 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6055 0 : if (res) return res;
6056 : }
6057 : }
6058 : break;
6059 : }
6060 59 : default:;
6061 : }
6062 59 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
6063 : {
6064 0 : {
6065 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6066 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6067 0 : if (res) return res;
6068 : }
6069 : }
6070 : break;
6071 : }
6072 : default:;
6073 : }
6074 : break;
6075 : }
6076 : default:;
6077 : }
6078 : break;
6079 : }
6080 149305 : case MINUS_EXPR:
6081 149305 : {
6082 149305 : tree _q20 = TREE_OPERAND (_p0, 0);
6083 149305 : tree _q21 = TREE_OPERAND (_p0, 1);
6084 149305 : switch (TREE_CODE (_q20))
6085 : {
6086 40276 : case INTEGER_CST:
6087 40276 : {
6088 40276 : switch (TREE_CODE (_q21))
6089 : {
6090 23574 : CASE_CONVERT:
6091 23574 : {
6092 23574 : tree _q40 = TREE_OPERAND (_q21, 0);
6093 23574 : switch (TREE_CODE (_p1))
6094 : {
6095 0 : CASE_CONVERT:
6096 0 : {
6097 0 : tree _q60 = TREE_OPERAND (_p1, 0);
6098 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
6099 : {
6100 0 : {
6101 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6102 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6103 0 : if (res) return res;
6104 : }
6105 : }
6106 : break;
6107 : }
6108 23574 : default:;
6109 : }
6110 23574 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6111 : {
6112 0 : {
6113 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6114 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6115 0 : if (res) return res;
6116 : }
6117 : }
6118 : break;
6119 : }
6120 40276 : default:;
6121 : }
6122 40276 : switch (TREE_CODE (_p1))
6123 : {
6124 4 : CASE_CONVERT:
6125 4 : {
6126 4 : tree _q50 = TREE_OPERAND (_p1, 0);
6127 4 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6128 : {
6129 0 : {
6130 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6131 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6132 0 : if (res) return res;
6133 : }
6134 : }
6135 : break;
6136 : }
6137 40276 : default:;
6138 : }
6139 40276 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6140 : {
6141 2 : {
6142 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6143 2 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6144 2 : if (res) return res;
6145 : }
6146 : }
6147 : break;
6148 : }
6149 : default:;
6150 : }
6151 : break;
6152 : }
6153 33543327 : default:;
6154 : }
6155 33543327 : switch (TREE_CODE (_p1))
6156 : {
6157 1866307 : CASE_CONVERT:
6158 1866307 : {
6159 1866307 : tree _q30 = TREE_OPERAND (_p1, 0);
6160 1866307 : switch (TREE_CODE (_q30))
6161 : {
6162 12 : case MINUS_EXPR:
6163 12 : {
6164 12 : tree _q40 = TREE_OPERAND (_q30, 0);
6165 12 : tree _q41 = TREE_OPERAND (_q30, 1);
6166 12 : switch (TREE_CODE (_q40))
6167 : {
6168 12 : case INTEGER_CST:
6169 12 : {
6170 12 : switch (TREE_CODE (_q41))
6171 : {
6172 12 : CASE_CONVERT:
6173 12 : {
6174 12 : tree _q60 = TREE_OPERAND (_q41, 0);
6175 12 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
6176 : {
6177 0 : {
6178 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6179 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6180 0 : if (res) return res;
6181 : }
6182 : }
6183 : break;
6184 : }
6185 12 : default:;
6186 : }
6187 12 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
6188 : {
6189 0 : {
6190 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6191 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6192 0 : if (res) return res;
6193 : }
6194 : }
6195 : break;
6196 : }
6197 : default:;
6198 : }
6199 : break;
6200 : }
6201 : default:;
6202 : }
6203 : break;
6204 : }
6205 3299 : case MINUS_EXPR:
6206 3299 : {
6207 3299 : tree _q30 = TREE_OPERAND (_p1, 0);
6208 3299 : tree _q31 = TREE_OPERAND (_p1, 1);
6209 3299 : switch (TREE_CODE (_q30))
6210 : {
6211 154 : case INTEGER_CST:
6212 154 : {
6213 154 : switch (TREE_CODE (_q31))
6214 : {
6215 16 : CASE_CONVERT:
6216 16 : {
6217 16 : tree _q50 = TREE_OPERAND (_q31, 0);
6218 16 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6219 : {
6220 0 : {
6221 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6222 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6223 0 : if (res) return res;
6224 : }
6225 : }
6226 : break;
6227 : }
6228 154 : default:;
6229 : }
6230 154 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6231 : {
6232 0 : {
6233 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6234 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, EQ_EXPR);
6235 0 : if (res) return res;
6236 : }
6237 : }
6238 : break;
6239 : }
6240 : default:;
6241 : }
6242 : break;
6243 : }
6244 33543327 : default:;
6245 : }
6246 33543327 : switch (TREE_CODE (_p0))
6247 : {
6248 1141 : case LT_EXPR:
6249 1141 : {
6250 1141 : tree _q20 = TREE_OPERAND (_p0, 0);
6251 1141 : tree _q21 = TREE_OPERAND (_p0, 1);
6252 1141 : switch (TREE_CODE (_p1))
6253 : {
6254 16 : case GT_EXPR:
6255 16 : {
6256 16 : tree _q50 = TREE_OPERAND (_p1, 0);
6257 16 : tree _q51 = TREE_OPERAND (_p1, 1);
6258 16 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6259 : {
6260 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6261 : {
6262 0 : {
6263 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6264 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
6265 0 : if (res) return res;
6266 : }
6267 : }
6268 : }
6269 : break;
6270 : }
6271 0 : case EQ_EXPR:
6272 0 : {
6273 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6274 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6275 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6276 : {
6277 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6278 : {
6279 0 : {
6280 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6281 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
6282 0 : if (res) return res;
6283 : }
6284 : }
6285 : }
6286 : break;
6287 : }
6288 2 : case NE_EXPR:
6289 2 : {
6290 2 : tree _q50 = TREE_OPERAND (_p1, 0);
6291 2 : tree _q51 = TREE_OPERAND (_p1, 1);
6292 2 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6293 : {
6294 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6295 : {
6296 0 : {
6297 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6298 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
6299 0 : if (res) return res;
6300 : }
6301 : }
6302 : }
6303 : break;
6304 : }
6305 : default:;
6306 : }
6307 : break;
6308 : }
6309 1542 : case LE_EXPR:
6310 1542 : {
6311 1542 : tree _q20 = TREE_OPERAND (_p0, 0);
6312 1542 : tree _q21 = TREE_OPERAND (_p0, 1);
6313 1542 : switch (TREE_CODE (_p1))
6314 : {
6315 4 : case GE_EXPR:
6316 4 : {
6317 4 : tree _q50 = TREE_OPERAND (_p1, 0);
6318 4 : tree _q51 = TREE_OPERAND (_p1, 1);
6319 4 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6320 : {
6321 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6322 : {
6323 0 : {
6324 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6325 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
6326 0 : if (res) return res;
6327 : }
6328 : }
6329 : }
6330 : break;
6331 : }
6332 0 : case EQ_EXPR:
6333 0 : {
6334 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6335 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6336 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6337 : {
6338 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6339 : {
6340 0 : {
6341 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6342 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
6343 0 : if (res) return res;
6344 : }
6345 : }
6346 : }
6347 : break;
6348 : }
6349 8 : case NE_EXPR:
6350 8 : {
6351 8 : tree _q50 = TREE_OPERAND (_p1, 0);
6352 8 : tree _q51 = TREE_OPERAND (_p1, 1);
6353 8 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6354 : {
6355 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6356 : {
6357 0 : {
6358 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6359 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
6360 0 : if (res) return res;
6361 : }
6362 : }
6363 : }
6364 : break;
6365 : }
6366 : default:;
6367 : }
6368 : break;
6369 : }
6370 64139 : case GT_EXPR:
6371 64139 : {
6372 64139 : tree _q20 = TREE_OPERAND (_p0, 0);
6373 64139 : tree _q21 = TREE_OPERAND (_p0, 1);
6374 64139 : switch (TREE_CODE (_p1))
6375 : {
6376 62390 : case GT_EXPR:
6377 62390 : {
6378 62390 : tree _q50 = TREE_OPERAND (_p1, 0);
6379 62390 : tree _q51 = TREE_OPERAND (_p1, 1);
6380 62390 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6381 : {
6382 12 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6383 : {
6384 0 : {
6385 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6386 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
6387 0 : if (res) return res;
6388 : }
6389 0 : {
6390 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6391 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
6392 0 : if (res) return res;
6393 : }
6394 : }
6395 : }
6396 : break;
6397 : }
6398 57 : case EQ_EXPR:
6399 57 : {
6400 57 : tree _q50 = TREE_OPERAND (_p1, 0);
6401 57 : tree _q51 = TREE_OPERAND (_p1, 1);
6402 57 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6403 : {
6404 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6405 : {
6406 0 : {
6407 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6408 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
6409 0 : if (res) return res;
6410 : }
6411 : }
6412 : }
6413 : break;
6414 : }
6415 37 : case NE_EXPR:
6416 37 : {
6417 37 : tree _q50 = TREE_OPERAND (_p1, 0);
6418 37 : tree _q51 = TREE_OPERAND (_p1, 1);
6419 37 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6420 : {
6421 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6422 : {
6423 0 : {
6424 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6425 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
6426 0 : if (res) return res;
6427 : }
6428 : }
6429 : }
6430 : break;
6431 : }
6432 41 : case LT_EXPR:
6433 41 : {
6434 41 : tree _q50 = TREE_OPERAND (_p1, 0);
6435 41 : tree _q51 = TREE_OPERAND (_p1, 1);
6436 41 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6437 : {
6438 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6439 : {
6440 0 : {
6441 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6442 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, GT_EXPR, EQ_EXPR);
6443 0 : if (res) return res;
6444 : }
6445 : }
6446 : }
6447 : break;
6448 : }
6449 : default:;
6450 : }
6451 : break;
6452 : }
6453 6626 : case GE_EXPR:
6454 6626 : {
6455 6626 : tree _q20 = TREE_OPERAND (_p0, 0);
6456 6626 : tree _q21 = TREE_OPERAND (_p0, 1);
6457 6626 : switch (TREE_CODE (_p1))
6458 : {
6459 26 : case GE_EXPR:
6460 26 : {
6461 26 : tree _q50 = TREE_OPERAND (_p1, 0);
6462 26 : tree _q51 = TREE_OPERAND (_p1, 1);
6463 26 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6464 : {
6465 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6466 : {
6467 0 : {
6468 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6469 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
6470 0 : if (res) return res;
6471 : }
6472 0 : {
6473 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6474 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
6475 0 : if (res) return res;
6476 : }
6477 : }
6478 : }
6479 : break;
6480 : }
6481 90 : case EQ_EXPR:
6482 90 : {
6483 90 : tree _q50 = TREE_OPERAND (_p1, 0);
6484 90 : tree _q51 = TREE_OPERAND (_p1, 1);
6485 90 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6486 : {
6487 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6488 : {
6489 0 : {
6490 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6491 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
6492 0 : if (res) return res;
6493 : }
6494 : }
6495 : }
6496 : break;
6497 : }
6498 56 : case NE_EXPR:
6499 56 : {
6500 56 : tree _q50 = TREE_OPERAND (_p1, 0);
6501 56 : tree _q51 = TREE_OPERAND (_p1, 1);
6502 56 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6503 : {
6504 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6505 : {
6506 0 : {
6507 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6508 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
6509 0 : if (res) return res;
6510 : }
6511 : }
6512 : }
6513 : break;
6514 : }
6515 8 : case LE_EXPR:
6516 8 : {
6517 8 : tree _q50 = TREE_OPERAND (_p1, 0);
6518 8 : tree _q51 = TREE_OPERAND (_p1, 1);
6519 8 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6520 : {
6521 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6522 : {
6523 0 : {
6524 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6525 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, GE_EXPR, EQ_EXPR);
6526 0 : if (res) return res;
6527 : }
6528 : }
6529 : }
6530 : break;
6531 : }
6532 : default:;
6533 : }
6534 : break;
6535 : }
6536 29917 : case EQ_EXPR:
6537 29917 : {
6538 29917 : tree _q20 = TREE_OPERAND (_p0, 0);
6539 29917 : tree _q21 = TREE_OPERAND (_p0, 1);
6540 29917 : switch (TREE_CODE (_p1))
6541 : {
6542 4 : case LT_EXPR:
6543 4 : {
6544 4 : tree _q50 = TREE_OPERAND (_p1, 0);
6545 4 : tree _q51 = TREE_OPERAND (_p1, 1);
6546 4 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6547 : {
6548 4 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6549 : {
6550 0 : {
6551 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6552 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
6553 0 : if (res) return res;
6554 : }
6555 : }
6556 : }
6557 : break;
6558 : }
6559 4 : case LE_EXPR:
6560 4 : {
6561 4 : tree _q50 = TREE_OPERAND (_p1, 0);
6562 4 : tree _q51 = TREE_OPERAND (_p1, 1);
6563 4 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6564 : {
6565 4 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6566 : {
6567 0 : {
6568 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6569 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
6570 0 : if (res) return res;
6571 : }
6572 : }
6573 : }
6574 : break;
6575 : }
6576 75 : case GT_EXPR:
6577 75 : {
6578 75 : tree _q50 = TREE_OPERAND (_p1, 0);
6579 75 : tree _q51 = TREE_OPERAND (_p1, 1);
6580 75 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6581 : {
6582 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6583 : {
6584 0 : {
6585 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6586 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GT_EXPR);
6587 0 : if (res) return res;
6588 : }
6589 : }
6590 : }
6591 : break;
6592 : }
6593 112 : case GE_EXPR:
6594 112 : {
6595 112 : tree _q50 = TREE_OPERAND (_p1, 0);
6596 112 : tree _q51 = TREE_OPERAND (_p1, 1);
6597 112 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6598 : {
6599 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6600 : {
6601 0 : {
6602 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6603 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR, GE_EXPR);
6604 0 : if (res) return res;
6605 : }
6606 : }
6607 : }
6608 : break;
6609 : }
6610 : default:;
6611 : }
6612 : break;
6613 : }
6614 11649 : case NE_EXPR:
6615 11649 : {
6616 11649 : tree _q20 = TREE_OPERAND (_p0, 0);
6617 11649 : tree _q21 = TREE_OPERAND (_p0, 1);
6618 11649 : switch (TREE_CODE (_p1))
6619 : {
6620 3 : case LT_EXPR:
6621 3 : {
6622 3 : tree _q50 = TREE_OPERAND (_p1, 0);
6623 3 : tree _q51 = TREE_OPERAND (_p1, 1);
6624 3 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6625 : {
6626 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6627 : {
6628 0 : {
6629 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6630 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
6631 0 : if (res) return res;
6632 : }
6633 : }
6634 : }
6635 : break;
6636 : }
6637 0 : case LE_EXPR:
6638 0 : {
6639 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6640 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6641 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6642 : {
6643 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6644 : {
6645 0 : {
6646 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6647 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
6648 0 : if (res) return res;
6649 : }
6650 : }
6651 : }
6652 : break;
6653 : }
6654 21 : case GT_EXPR:
6655 21 : {
6656 21 : tree _q50 = TREE_OPERAND (_p1, 0);
6657 21 : tree _q51 = TREE_OPERAND (_p1, 1);
6658 21 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6659 : {
6660 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6661 : {
6662 0 : {
6663 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6664 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LT_EXPR, NE_EXPR, LE_EXPR);
6665 0 : if (res) return res;
6666 : }
6667 : }
6668 : }
6669 : break;
6670 : }
6671 2 : case GE_EXPR:
6672 2 : {
6673 2 : tree _q50 = TREE_OPERAND (_p1, 0);
6674 2 : tree _q51 = TREE_OPERAND (_p1, 1);
6675 2 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6676 : {
6677 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6678 : {
6679 0 : {
6680 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6681 0 : tree res = generic_simplify_226 (loc, type, _p0, _p1, captures, LE_EXPR, NE_EXPR, LT_EXPR);
6682 0 : if (res) return res;
6683 : }
6684 : }
6685 : }
6686 : break;
6687 : }
6688 : default:;
6689 : }
6690 : break;
6691 : }
6692 12776 : case MIN_EXPR:
6693 12776 : {
6694 12776 : tree _q20 = TREE_OPERAND (_p0, 0);
6695 12776 : tree _q21 = TREE_OPERAND (_p0, 1);
6696 12776 : switch (TREE_CODE (_p1))
6697 : {
6698 0 : case MAX_EXPR:
6699 0 : {
6700 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6701 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6702 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6703 : {
6704 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6705 : {
6706 0 : {
6707 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6708 0 : if (!HONOR_NANS (captures[0])
6709 : )
6710 : {
6711 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1479;
6712 0 : {
6713 0 : tree res_op0;
6714 0 : res_op0 = captures[0];
6715 0 : tree res_op1;
6716 0 : res_op1 = captures[1];
6717 0 : tree _r;
6718 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
6719 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 872, __FILE__, __LINE__, true);
6720 0 : return _r;
6721 : }
6722 0 : next_after_fail1479:;
6723 : }
6724 : }
6725 : }
6726 : }
6727 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6728 : {
6729 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6730 : {
6731 0 : {
6732 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6733 0 : if (!HONOR_NANS (captures[0])
6734 : )
6735 : {
6736 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1480;
6737 0 : {
6738 0 : tree res_op0;
6739 0 : res_op0 = captures[0];
6740 0 : tree res_op1;
6741 0 : res_op1 = captures[1];
6742 0 : tree _r;
6743 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
6744 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 872, __FILE__, __LINE__, true);
6745 0 : return _r;
6746 : }
6747 0 : next_after_fail1480:;
6748 : }
6749 : }
6750 : }
6751 : }
6752 : break;
6753 : }
6754 12776 : default:;
6755 : }
6756 12776 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6757 : {
6758 0 : {
6759 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6760 0 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
6761 0 : if (res) return res;
6762 : }
6763 : }
6764 12776 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6765 : {
6766 0 : {
6767 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6768 0 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
6769 0 : if (res) return res;
6770 : }
6771 : }
6772 : break;
6773 : }
6774 607 : case MAX_EXPR:
6775 607 : {
6776 607 : tree _q20 = TREE_OPERAND (_p0, 0);
6777 607 : tree _q21 = TREE_OPERAND (_p0, 1);
6778 607 : switch (TREE_CODE (_p1))
6779 : {
6780 0 : case MIN_EXPR:
6781 0 : {
6782 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6783 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6784 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6785 : {
6786 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6787 : {
6788 0 : {
6789 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6790 0 : if (!HONOR_NANS (captures[0])
6791 : )
6792 : {
6793 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1481;
6794 0 : {
6795 0 : tree res_op0;
6796 0 : res_op0 = captures[0];
6797 0 : tree res_op1;
6798 0 : res_op1 = captures[1];
6799 0 : tree _r;
6800 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
6801 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 872, __FILE__, __LINE__, true);
6802 0 : return _r;
6803 : }
6804 0 : next_after_fail1481:;
6805 : }
6806 : }
6807 : }
6808 : }
6809 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6810 : {
6811 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6812 : {
6813 0 : {
6814 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6815 0 : if (!HONOR_NANS (captures[0])
6816 : )
6817 : {
6818 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1482;
6819 0 : {
6820 0 : tree res_op0;
6821 0 : res_op0 = captures[0];
6822 0 : tree res_op1;
6823 0 : res_op1 = captures[1];
6824 0 : tree _r;
6825 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
6826 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 872, __FILE__, __LINE__, true);
6827 0 : return _r;
6828 : }
6829 0 : next_after_fail1482:;
6830 : }
6831 : }
6832 : }
6833 : }
6834 : break;
6835 : }
6836 607 : default:;
6837 : }
6838 607 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6839 : {
6840 0 : {
6841 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6842 0 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
6843 0 : if (res) return res;
6844 : }
6845 : }
6846 607 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6847 : {
6848 1 : {
6849 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6850 1 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
6851 1 : if (res) return res;
6852 : }
6853 : }
6854 : break;
6855 : }
6856 33543327 : default:;
6857 : }
6858 33543327 : if (tree_with_possible_nonzero_bits (_p0))
6859 : {
6860 9818809 : if (tree_with_known_nonzero_bits (_p1))
6861 : {
6862 8331257 : {
6863 8331257 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6864 8331257 : tree res = generic_simplify_225 (loc, type, _p0, _p1, captures, EQ_EXPR);
6865 8331257 : if (res) return res;
6866 : }
6867 : }
6868 : }
6869 33524162 : if (tree_with_known_nonzero_bits (_p0))
6870 : {
6871 6315444 : if (tree_with_possible_nonzero_bits (_p1))
6872 : {
6873 6282098 : {
6874 6282098 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
6875 6282098 : tree res = generic_simplify_225 (loc, type, _p0, _p1, captures, EQ_EXPR);
6876 6282098 : if (res) return res;
6877 : }
6878 : }
6879 : }
6880 33523725 : switch (TREE_CODE (_p1))
6881 : {
6882 142 : case MIN_EXPR:
6883 142 : {
6884 142 : tree _q30 = TREE_OPERAND (_p1, 0);
6885 142 : tree _q31 = TREE_OPERAND (_p1, 1);
6886 142 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6887 : {
6888 0 : {
6889 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6890 0 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
6891 0 : if (res) return res;
6892 : }
6893 : }
6894 142 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6895 : {
6896 0 : {
6897 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6898 0 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MIN_EXPR, EQ_EXPR, LE_EXPR);
6899 0 : if (res) return res;
6900 : }
6901 : }
6902 : break;
6903 : }
6904 54 : case MAX_EXPR:
6905 54 : {
6906 54 : tree _q30 = TREE_OPERAND (_p1, 0);
6907 54 : tree _q31 = TREE_OPERAND (_p1, 1);
6908 54 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6909 : {
6910 0 : {
6911 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6912 0 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
6913 0 : if (res) return res;
6914 : }
6915 : }
6916 54 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6917 : {
6918 0 : {
6919 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6920 0 : tree res = generic_simplify_227 (loc, type, _p0, _p1, captures, MAX_EXPR, EQ_EXPR, GE_EXPR);
6921 0 : if (res) return res;
6922 : }
6923 : }
6924 : break;
6925 : }
6926 33523725 : default:;
6927 : }
6928 33523725 : switch (TREE_CODE (_p0))
6929 : {
6930 12776 : case MIN_EXPR:
6931 12776 : {
6932 12776 : tree _q20 = TREE_OPERAND (_p0, 0);
6933 12776 : tree _q21 = TREE_OPERAND (_p0, 1);
6934 12776 : switch (TREE_CODE (_q21))
6935 : {
6936 158 : case INTEGER_CST:
6937 158 : {
6938 158 : switch (TREE_CODE (_p1))
6939 : {
6940 0 : case INTEGER_CST:
6941 0 : {
6942 0 : {
6943 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6944 0 : tree res = generic_simplify_228 (loc, type, _p0, _p1, captures, EQ_EXPR);
6945 0 : if (res) return res;
6946 : }
6947 0 : break;
6948 : }
6949 : default:;
6950 : }
6951 : break;
6952 : }
6953 : default:;
6954 : }
6955 : break;
6956 : }
6957 607 : case MAX_EXPR:
6958 607 : {
6959 607 : tree _q20 = TREE_OPERAND (_p0, 0);
6960 607 : tree _q21 = TREE_OPERAND (_p0, 1);
6961 607 : switch (TREE_CODE (_q21))
6962 : {
6963 381 : case INTEGER_CST:
6964 381 : {
6965 381 : switch (TREE_CODE (_p1))
6966 : {
6967 42 : case INTEGER_CST:
6968 42 : {
6969 42 : {
6970 42 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6971 42 : tree res = generic_simplify_229 (loc, type, _p0, _p1, captures, EQ_EXPR);
6972 42 : if (res) return res;
6973 : }
6974 0 : break;
6975 : }
6976 : default:;
6977 : }
6978 : break;
6979 : }
6980 565 : default:;
6981 : }
6982 565 : if (integer_zerop (_p1))
6983 : {
6984 11 : {
6985 11 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6986 11 : tree res = generic_simplify_230 (loc, type, _p0, _p1, captures, EQ_EXPR);
6987 11 : if (res) return res;
6988 : }
6989 : }
6990 : break;
6991 : }
6992 897382 : case BIT_AND_EXPR:
6993 897382 : {
6994 897382 : tree _q20 = TREE_OPERAND (_p0, 0);
6995 897382 : tree _q21 = TREE_OPERAND (_p0, 1);
6996 897382 : switch (TREE_CODE (_q20))
6997 : {
6998 743 : case LSHIFT_EXPR:
6999 743 : {
7000 743 : tree _q30 = TREE_OPERAND (_q20, 0);
7001 743 : tree _q31 = TREE_OPERAND (_q20, 1);
7002 743 : if (integer_pow2p (_q30))
7003 : {
7004 735 : if (integer_pow2p (_q21))
7005 : {
7006 1 : if (integer_zerop (_p1))
7007 : {
7008 1 : {
7009 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q21 };
7010 1 : tree res = generic_simplify_231 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7011 1 : if (res) return res;
7012 : }
7013 : }
7014 : }
7015 : }
7016 742 : switch (TREE_CODE (_q31))
7017 : {
7018 0 : case INTEGER_CST:
7019 0 : {
7020 0 : switch (TREE_CODE (_q21))
7021 : {
7022 0 : case INTEGER_CST:
7023 0 : {
7024 0 : switch (TREE_CODE (_p1))
7025 : {
7026 0 : case INTEGER_CST:
7027 0 : {
7028 0 : {
7029 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1 };
7030 0 : tree res = generic_simplify_232 (loc, type, _p0, _p1, captures, EQ_EXPR);
7031 0 : if (res) return res;
7032 : }
7033 0 : break;
7034 : }
7035 : default:;
7036 : }
7037 : break;
7038 : }
7039 : default:;
7040 : }
7041 : break;
7042 : }
7043 742 : default:;
7044 : }
7045 742 : if (integer_onep (_q30))
7046 : {
7047 734 : if (integer_pow2p (_q21))
7048 : {
7049 0 : if (integer_zerop (_p1))
7050 : {
7051 0 : {
7052 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q21 };
7053 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7054 0 : if (res) return res;
7055 : }
7056 : }
7057 : }
7058 : }
7059 : break;
7060 : }
7061 2509 : case RSHIFT_EXPR:
7062 2509 : {
7063 2509 : tree _q30 = TREE_OPERAND (_q20, 0);
7064 2509 : tree _q31 = TREE_OPERAND (_q20, 1);
7065 2509 : if (integer_pow2p (_q30))
7066 : {
7067 1 : if (integer_pow2p (_q21))
7068 : {
7069 1 : if (integer_zerop (_p1))
7070 : {
7071 1 : {
7072 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q21 };
7073 1 : tree res = generic_simplify_234 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7074 1 : if (res) return res;
7075 : }
7076 : }
7077 : }
7078 : }
7079 2508 : switch (TREE_CODE (_q31))
7080 : {
7081 364 : case INTEGER_CST:
7082 364 : {
7083 364 : switch (TREE_CODE (_q21))
7084 : {
7085 364 : case INTEGER_CST:
7086 364 : {
7087 364 : switch (TREE_CODE (_p1))
7088 : {
7089 364 : case INTEGER_CST:
7090 364 : {
7091 364 : {
7092 364 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1 };
7093 364 : tree res = generic_simplify_235 (loc, type, _p0, _p1, captures, EQ_EXPR);
7094 364 : if (res) return res;
7095 : }
7096 0 : break;
7097 : }
7098 : default:;
7099 : }
7100 : break;
7101 : }
7102 : default:;
7103 : }
7104 : break;
7105 : }
7106 : default:;
7107 : }
7108 : break;
7109 : }
7110 897016 : default:;
7111 : }
7112 897016 : {
7113 897016 : tree _q20_pops[1];
7114 897016 : if (tree_nop_convert (_q20, _q20_pops))
7115 : {
7116 25633 : tree _q30 = _q20_pops[0];
7117 25633 : switch (TREE_CODE (_q30))
7118 : {
7119 0 : case LSHIFT_EXPR:
7120 0 : {
7121 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7122 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7123 0 : if (integer_onep (_q40))
7124 : {
7125 0 : if (integer_pow2p (_q21))
7126 : {
7127 0 : if (integer_zerop (_p1))
7128 : {
7129 0 : {
7130 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q41, _q21 };
7131 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
7132 0 : if (res) return res;
7133 : }
7134 : }
7135 : }
7136 : }
7137 : break;
7138 : }
7139 : default:;
7140 : }
7141 : }
7142 : }
7143 897016 : break;
7144 : }
7145 1416 : case LSHIFT_EXPR:
7146 1416 : {
7147 1416 : tree _q20 = TREE_OPERAND (_p0, 0);
7148 1416 : tree _q21 = TREE_OPERAND (_p0, 1);
7149 1416 : switch (TREE_CODE (_q20))
7150 : {
7151 287 : case INTEGER_CST:
7152 287 : {
7153 287 : switch (TREE_CODE (_p1))
7154 : {
7155 20 : case INTEGER_CST:
7156 20 : {
7157 20 : {
7158 20 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7159 20 : tree res = generic_simplify_236 (loc, type, _p0, _p1, captures, EQ_EXPR);
7160 20 : if (res) return res;
7161 : }
7162 3 : break;
7163 : }
7164 : default:;
7165 : }
7166 : break;
7167 : }
7168 : default:;
7169 : }
7170 : break;
7171 : }
7172 0 : case LROTATE_EXPR:
7173 0 : {
7174 0 : tree _q20 = TREE_OPERAND (_p0, 0);
7175 0 : tree _q21 = TREE_OPERAND (_p0, 1);
7176 0 : switch (TREE_CODE (_p1))
7177 : {
7178 0 : case LROTATE_EXPR:
7179 0 : {
7180 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7181 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7182 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7183 : {
7184 0 : {
7185 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7186 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR);
7187 0 : if (res) return res;
7188 : }
7189 : }
7190 : break;
7191 : }
7192 0 : default:;
7193 : }
7194 0 : switch (TREE_CODE (_q21))
7195 : {
7196 0 : case INTEGER_CST:
7197 0 : {
7198 0 : switch (TREE_CODE (_p1))
7199 : {
7200 0 : case INTEGER_CST:
7201 0 : {
7202 0 : {
7203 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7204 0 : tree res = generic_simplify_238 (loc, type, _p0, _p1, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR);
7205 0 : if (res) return res;
7206 : }
7207 0 : break;
7208 : }
7209 : default:;
7210 : }
7211 : break;
7212 : }
7213 0 : default:;
7214 : }
7215 0 : switch (TREE_CODE (_p1))
7216 : {
7217 0 : case INTEGER_CST:
7218 0 : {
7219 0 : {
7220 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7221 0 : tree res = generic_simplify_239 (loc, type, _p0, _p1, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR);
7222 0 : if (res) return res;
7223 : }
7224 0 : break;
7225 : }
7226 : default:;
7227 : }
7228 : break;
7229 : }
7230 42 : case RROTATE_EXPR:
7231 42 : {
7232 42 : tree _q20 = TREE_OPERAND (_p0, 0);
7233 42 : tree _q21 = TREE_OPERAND (_p0, 1);
7234 42 : switch (TREE_CODE (_p1))
7235 : {
7236 0 : case RROTATE_EXPR:
7237 0 : {
7238 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7239 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7240 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7241 : {
7242 0 : {
7243 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7244 0 : tree res = generic_simplify_237 (loc, type, _p0, _p1, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR);
7245 0 : if (res) return res;
7246 : }
7247 : }
7248 : break;
7249 : }
7250 42 : default:;
7251 : }
7252 42 : switch (TREE_CODE (_q21))
7253 : {
7254 42 : case INTEGER_CST:
7255 42 : {
7256 42 : switch (TREE_CODE (_p1))
7257 : {
7258 0 : case INTEGER_CST:
7259 0 : {
7260 0 : {
7261 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7262 0 : tree res = generic_simplify_238 (loc, type, _p0, _p1, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR);
7263 0 : if (res) return res;
7264 : }
7265 0 : break;
7266 : }
7267 : default:;
7268 : }
7269 : break;
7270 : }
7271 42 : default:;
7272 : }
7273 42 : switch (TREE_CODE (_p1))
7274 : {
7275 0 : case INTEGER_CST:
7276 0 : {
7277 0 : {
7278 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7279 0 : tree res = generic_simplify_239 (loc, type, _p0, _p1, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR);
7280 0 : if (res) return res;
7281 : }
7282 0 : break;
7283 : }
7284 : default:;
7285 : }
7286 : break;
7287 : }
7288 64171 : case MULT_EXPR:
7289 64171 : {
7290 64171 : tree _q20 = TREE_OPERAND (_p0, 0);
7291 64171 : tree _q21 = TREE_OPERAND (_p0, 1);
7292 64171 : switch (TREE_CODE (_q20))
7293 : {
7294 66 : case TRUNC_DIV_EXPR:
7295 66 : {
7296 66 : tree _q30 = TREE_OPERAND (_q20, 0);
7297 66 : tree _q31 = TREE_OPERAND (_q20, 1);
7298 66 : if ((_q21 == _q31 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q31, 0) && types_match (_q21, _q31)))
7299 : {
7300 47 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7301 : {
7302 47 : {
7303 47 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
7304 47 : tree res = generic_simplify_240 (loc, type, _p0, _p1, captures);
7305 47 : if (res) return res;
7306 : }
7307 : }
7308 : }
7309 : break;
7310 : }
7311 64124 : default:;
7312 : }
7313 64124 : switch (TREE_CODE (_q21))
7314 : {
7315 0 : case TRUNC_DIV_EXPR:
7316 0 : {
7317 0 : tree _q40 = TREE_OPERAND (_q21, 0);
7318 0 : tree _q41 = TREE_OPERAND (_q21, 1);
7319 0 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
7320 : {
7321 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
7322 : {
7323 0 : {
7324 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q40, _q20 };
7325 0 : tree res = generic_simplify_240 (loc, type, _p0, _p1, captures);
7326 0 : if (res) return res;
7327 : }
7328 : }
7329 : }
7330 : break;
7331 : }
7332 : default:;
7333 : }
7334 : break;
7335 : }
7336 33523253 : default:;
7337 : }
7338 33523253 : switch (TREE_CODE (_p1))
7339 : {
7340 13681 : case MULT_EXPR:
7341 13681 : {
7342 13681 : tree _q30 = TREE_OPERAND (_p1, 0);
7343 13681 : tree _q31 = TREE_OPERAND (_p1, 1);
7344 13681 : switch (TREE_CODE (_q30))
7345 : {
7346 0 : case TRUNC_DIV_EXPR:
7347 0 : {
7348 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7349 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7350 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7351 : {
7352 0 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q41, 0) && types_match (_q31, _q41)))
7353 : {
7354 0 : {
7355 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q41 };
7356 0 : tree res = generic_simplify_240 (loc, type, _p0, _p1, captures);
7357 0 : if (res) return res;
7358 : }
7359 : }
7360 : }
7361 : break;
7362 : }
7363 13681 : default:;
7364 : }
7365 13681 : switch (TREE_CODE (_q31))
7366 : {
7367 0 : case TRUNC_DIV_EXPR:
7368 0 : {
7369 0 : tree _q50 = TREE_OPERAND (_q31, 0);
7370 0 : tree _q51 = TREE_OPERAND (_q31, 1);
7371 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7372 : {
7373 0 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q30, 0) && types_match (_q51, _q30)))
7374 : {
7375 0 : {
7376 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _p0, _q30 };
7377 0 : tree res = generic_simplify_240 (loc, type, _p0, _p1, captures);
7378 0 : if (res) return res;
7379 : }
7380 : }
7381 : }
7382 : break;
7383 : }
7384 : default:;
7385 : }
7386 : break;
7387 : }
7388 33523253 : default:;
7389 : }
7390 33523253 : switch (TREE_CODE (_p0))
7391 : {
7392 130 : case VEC_COND_EXPR:
7393 130 : {
7394 130 : tree _q20 = TREE_OPERAND (_p0, 0);
7395 130 : tree _q21 = TREE_OPERAND (_p0, 1);
7396 130 : tree _q22 = TREE_OPERAND (_p0, 2);
7397 130 : switch (TREE_CODE (_p1))
7398 : {
7399 27 : case VEC_COND_EXPR:
7400 27 : {
7401 27 : tree _q60 = TREE_OPERAND (_p1, 0);
7402 27 : tree _q61 = TREE_OPERAND (_p1, 1);
7403 27 : tree _q62 = TREE_OPERAND (_p1, 2);
7404 27 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
7405 : {
7406 0 : {
7407 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
7408 0 : if (VECTOR_TYPE_P (type)
7409 0 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
7410 0 : || types_match (type, TREE_TYPE (captures[2]))
7411 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
7412 : || (optimize_vectors_before_lowering_p ()
7413 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
7414 : )
7415 : {
7416 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1483;
7417 0 : {
7418 0 : tree res_op0;
7419 0 : res_op0 = captures[1];
7420 0 : tree res_op1;
7421 0 : {
7422 0 : tree _o1[2], _r1;
7423 0 : _o1[0] = captures[2];
7424 0 : _o1[1] = captures[5];
7425 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
7426 0 : if (EXPR_P (_r1))
7427 0 : goto next_after_fail1483;
7428 0 : res_op1 = _r1;
7429 : }
7430 0 : tree res_op2;
7431 0 : {
7432 0 : tree _o1[2], _r1;
7433 0 : _o1[0] = captures[3];
7434 0 : _o1[1] = captures[6];
7435 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
7436 0 : if (EXPR_P (_r1))
7437 0 : goto next_after_fail1483;
7438 0 : res_op2 = _r1;
7439 : }
7440 0 : tree _r;
7441 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7442 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 876, __FILE__, __LINE__, true);
7443 0 : return _r;
7444 : }
7445 0 : next_after_fail1483:;
7446 : }
7447 : }
7448 : }
7449 : break;
7450 : }
7451 130 : default:;
7452 : }
7453 130 : {
7454 130 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
7455 130 : if (VECTOR_TYPE_P (type)
7456 130 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
7457 130 : || types_match (type, TREE_TYPE (captures[2]))
7458 130 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
7459 : || (optimize_vectors_before_lowering_p ()
7460 79 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
7461 : )
7462 : {
7463 130 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1484;
7464 130 : {
7465 130 : if (! tree_invariant_p (captures[4])) goto next_after_fail1484;
7466 22 : tree res_op0;
7467 22 : res_op0 = captures[1];
7468 22 : tree res_op1;
7469 22 : {
7470 22 : tree _o1[2], _r1;
7471 22 : _o1[0] = captures[2];
7472 22 : _o1[1] = unshare_expr (captures[4]);
7473 22 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
7474 22 : if (EXPR_P (_r1))
7475 0 : goto next_after_fail1484;
7476 22 : res_op1 = _r1;
7477 : }
7478 22 : tree res_op2;
7479 22 : {
7480 22 : tree _o1[2], _r1;
7481 22 : _o1[0] = captures[3];
7482 22 : _o1[1] = captures[4];
7483 22 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
7484 22 : if (EXPR_P (_r1))
7485 1 : goto next_after_fail1484;
7486 21 : res_op2 = _r1;
7487 : }
7488 21 : tree _r;
7489 21 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7490 21 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 877, __FILE__, __LINE__, true);
7491 21 : return _r;
7492 : }
7493 109 : next_after_fail1484:;
7494 : }
7495 : }
7496 109 : break;
7497 : }
7498 2246000 : case CALL_EXPR:
7499 2246000 : switch (get_call_combined_fn (_p0))
7500 : {
7501 0 : case CFN_BUILT_IN_BSWAP128:
7502 0 : if (call_expr_nargs (_p0) == 1)
7503 : {
7504 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7505 0 : switch (TREE_CODE (_p1))
7506 : {
7507 0 : case INTEGER_CST:
7508 0 : {
7509 0 : {
7510 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7511 0 : tree res = generic_simplify_242 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP128);
7512 0 : if (res) return res;
7513 : }
7514 0 : break;
7515 : }
7516 0 : case CALL_EXPR:
7517 0 : switch (get_call_combined_fn (_p1))
7518 : {
7519 0 : case CFN_BUILT_IN_BSWAP128:
7520 0 : if (call_expr_nargs (_p1) == 1)
7521 : {
7522 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7523 0 : {
7524 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
7525 0 : tree res = generic_simplify_241 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP128);
7526 0 : if (res) return res;
7527 : }
7528 : }
7529 : break;
7530 : default:;
7531 : }
7532 : break;
7533 : default:;
7534 : }
7535 : }
7536 : break;
7537 2 : case CFN_BUILT_IN_BSWAP16:
7538 2 : if (call_expr_nargs (_p0) == 1)
7539 : {
7540 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7541 2 : switch (TREE_CODE (_p1))
7542 : {
7543 1 : case INTEGER_CST:
7544 1 : {
7545 1 : {
7546 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7547 1 : tree res = generic_simplify_242 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP16);
7548 1 : if (res) return res;
7549 : }
7550 1 : break;
7551 : }
7552 1 : case CALL_EXPR:
7553 1 : switch (get_call_combined_fn (_p1))
7554 : {
7555 1 : case CFN_BUILT_IN_BSWAP16:
7556 1 : if (call_expr_nargs (_p1) == 1)
7557 : {
7558 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7559 1 : {
7560 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
7561 1 : tree res = generic_simplify_241 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP16);
7562 1 : if (res) return res;
7563 : }
7564 : }
7565 : break;
7566 : default:;
7567 : }
7568 : break;
7569 : default:;
7570 : }
7571 : }
7572 : break;
7573 6 : case CFN_BUILT_IN_BSWAP32:
7574 6 : if (call_expr_nargs (_p0) == 1)
7575 : {
7576 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7577 6 : switch (TREE_CODE (_p1))
7578 : {
7579 3 : case INTEGER_CST:
7580 3 : {
7581 3 : {
7582 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7583 3 : tree res = generic_simplify_242 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP32);
7584 3 : if (res) return res;
7585 : }
7586 3 : break;
7587 : }
7588 3 : case CALL_EXPR:
7589 3 : switch (get_call_combined_fn (_p1))
7590 : {
7591 3 : case CFN_BUILT_IN_BSWAP32:
7592 3 : if (call_expr_nargs (_p1) == 1)
7593 : {
7594 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7595 3 : {
7596 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
7597 3 : tree res = generic_simplify_241 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP32);
7598 3 : if (res) return res;
7599 : }
7600 : }
7601 : break;
7602 : default:;
7603 : }
7604 : break;
7605 : default:;
7606 : }
7607 : }
7608 : break;
7609 6 : case CFN_BUILT_IN_BSWAP64:
7610 6 : if (call_expr_nargs (_p0) == 1)
7611 : {
7612 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7613 6 : switch (TREE_CODE (_p1))
7614 : {
7615 3 : case INTEGER_CST:
7616 3 : {
7617 3 : {
7618 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
7619 3 : tree res = generic_simplify_242 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP64);
7620 3 : if (res) return res;
7621 : }
7622 3 : break;
7623 : }
7624 3 : case CALL_EXPR:
7625 3 : switch (get_call_combined_fn (_p1))
7626 : {
7627 3 : case CFN_BUILT_IN_BSWAP64:
7628 3 : if (call_expr_nargs (_p1) == 1)
7629 : {
7630 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7631 3 : {
7632 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
7633 3 : tree res = generic_simplify_241 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP64);
7634 3 : if (res) return res;
7635 : }
7636 : }
7637 : break;
7638 : default:;
7639 : }
7640 : break;
7641 : default:;
7642 : }
7643 : }
7644 : break;
7645 : default:;
7646 : }
7647 : break;
7648 33523225 : default:;
7649 : }
7650 33523225 : switch (TREE_CODE (_p1))
7651 : {
7652 29 : case VEC_COND_EXPR:
7653 29 : {
7654 29 : tree _q30 = TREE_OPERAND (_p1, 0);
7655 29 : tree _q31 = TREE_OPERAND (_p1, 1);
7656 29 : tree _q32 = TREE_OPERAND (_p1, 2);
7657 29 : {
7658 29 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
7659 29 : if (VECTOR_TYPE_P (type)
7660 29 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
7661 29 : || types_match (type, TREE_TYPE (captures[3]))
7662 29 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
7663 : || (optimize_vectors_before_lowering_p ()
7664 21 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
7665 : )
7666 : {
7667 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1485;
7668 29 : {
7669 29 : if (! tree_invariant_p (captures[0])) goto next_after_fail1485;
7670 0 : tree res_op0;
7671 0 : res_op0 = captures[2];
7672 0 : tree res_op1;
7673 0 : {
7674 0 : tree _o1[2], _r1;
7675 0 : _o1[0] = unshare_expr (captures[0]);
7676 0 : _o1[1] = captures[3];
7677 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
7678 0 : if (EXPR_P (_r1))
7679 0 : goto next_after_fail1485;
7680 0 : res_op1 = _r1;
7681 : }
7682 0 : tree res_op2;
7683 0 : {
7684 0 : tree _o1[2], _r1;
7685 0 : _o1[0] = captures[0];
7686 0 : _o1[1] = captures[4];
7687 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, type, _o1[0], _o1[1]);
7688 0 : if (EXPR_P (_r1))
7689 0 : goto next_after_fail1485;
7690 0 : res_op2 = _r1;
7691 : }
7692 0 : tree _r;
7693 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7694 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 878, __FILE__, __LINE__, true);
7695 0 : return _r;
7696 : }
7697 29 : next_after_fail1485:;
7698 : }
7699 : }
7700 29 : break;
7701 : }
7702 33523225 : default:;
7703 : }
7704 33523225 : switch (TREE_CODE (_p0))
7705 : {
7706 41176 : case COND_EXPR:
7707 41176 : {
7708 41176 : tree _q20 = TREE_OPERAND (_p0, 0);
7709 41176 : tree _q21 = TREE_OPERAND (_p0, 1);
7710 41176 : tree _q22 = TREE_OPERAND (_p0, 2);
7711 41176 : switch (TREE_CODE (_p1))
7712 : {
7713 37 : case COND_EXPR:
7714 37 : {
7715 37 : tree _q60 = TREE_OPERAND (_p1, 0);
7716 37 : tree _q61 = TREE_OPERAND (_p1, 1);
7717 37 : tree _q62 = TREE_OPERAND (_p1, 2);
7718 37 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
7719 : {
7720 3 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
7721 : {
7722 3 : {
7723 3 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
7724 3 : const enum tree_code eqne = EQ_EXPR;
7725 3 : if (!HONOR_NANS (captures[1])
7726 3 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
7727 3 : && types_match (type, TREE_TYPE (captures[0]))
7728 3 : && expr_no_side_effects_p (captures[1])
7729 4 : && expr_no_side_effects_p (captures[2])
7730 : )
7731 : {
7732 1 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1486;
7733 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1486;
7734 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1486;
7735 1 : {
7736 1 : tree res_op0;
7737 1 : {
7738 1 : tree _o1[2], _r1;
7739 1 : {
7740 1 : tree _o2[2], _r2;
7741 1 : _o2[0] = captures[0];
7742 1 : _o2[1] = captures[3];
7743 1 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
7744 1 : _o1[0] = _r2;
7745 : }
7746 1 : {
7747 1 : tree _o2[2], _r2;
7748 1 : _o2[0] = captures[1];
7749 1 : _o2[1] = captures[2];
7750 1 : _r2 = fold_build2_loc (loc, NE_EXPR, type, _o2[0], _o2[1]);
7751 1 : _o1[1] = _r2;
7752 : }
7753 1 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7754 1 : res_op0 = _r1;
7755 : }
7756 1 : tree res_op1;
7757 1 : res_op1 = constant_boolean_node (eqne == NE_EXPR, type);
7758 1 : tree res_op2;
7759 1 : res_op2 = constant_boolean_node (eqne != NE_EXPR, type);
7760 1 : tree _r;
7761 1 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
7762 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 964, __FILE__, __LINE__, true);
7763 1 : return _r;
7764 : }
7765 2 : next_after_fail1486:;
7766 : }
7767 : }
7768 : }
7769 : }
7770 36 : if ((_q61 == _q22 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q22, 0) && types_match (_q61, _q22)))
7771 : {
7772 7 : if ((_q62 == _q21 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q21, 0) && types_match (_q62, _q21)))
7773 : {
7774 7 : {
7775 7 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
7776 7 : const enum tree_code eqne = EQ_EXPR;
7777 7 : if (!HONOR_NANS (captures[1])
7778 0 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
7779 0 : && types_match (type, TREE_TYPE (captures[0]))
7780 0 : && expr_no_side_effects_p (captures[1])
7781 7 : && expr_no_side_effects_p (captures[2])
7782 : )
7783 : {
7784 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1487;
7785 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1487;
7786 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1487;
7787 0 : {
7788 0 : tree res_op0;
7789 0 : {
7790 0 : tree _o1[2], _r1;
7791 0 : {
7792 0 : tree _o2[2], _r2;
7793 0 : _o2[0] = captures[0];
7794 0 : _o2[1] = captures[3];
7795 0 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
7796 0 : _o1[0] = _r2;
7797 : }
7798 0 : {
7799 0 : tree _o2[2], _r2;
7800 0 : _o2[0] = captures[1];
7801 0 : _o2[1] = captures[2];
7802 0 : _r2 = fold_build2_loc (loc, EQ_EXPR, type, _o2[0], _o2[1]);
7803 0 : _o1[1] = _r2;
7804 : }
7805 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7806 0 : res_op0 = _r1;
7807 : }
7808 0 : tree res_op1;
7809 0 : res_op1 = constant_boolean_node (eqne != NE_EXPR, type);
7810 0 : tree res_op2;
7811 0 : res_op2 = constant_boolean_node (eqne == NE_EXPR, type);
7812 0 : tree _r;
7813 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
7814 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
7815 0 : return _r;
7816 : }
7817 7 : next_after_fail1487:;
7818 : }
7819 : }
7820 : }
7821 : }
7822 : break;
7823 : }
7824 : default:;
7825 : }
7826 : break;
7827 : }
7828 109 : case VEC_COND_EXPR:
7829 109 : {
7830 109 : tree _q20 = TREE_OPERAND (_p0, 0);
7831 109 : tree _q21 = TREE_OPERAND (_p0, 1);
7832 109 : tree _q22 = TREE_OPERAND (_p0, 2);
7833 109 : switch (TREE_CODE (_p1))
7834 : {
7835 27 : case VEC_COND_EXPR:
7836 27 : {
7837 27 : tree _q60 = TREE_OPERAND (_p1, 0);
7838 27 : tree _q61 = TREE_OPERAND (_p1, 1);
7839 27 : tree _q62 = TREE_OPERAND (_p1, 2);
7840 27 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
7841 : {
7842 6 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
7843 : {
7844 6 : {
7845 6 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
7846 6 : const enum tree_code eqne = EQ_EXPR;
7847 6 : if (!HONOR_NANS (captures[1])
7848 6 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
7849 6 : && types_match (type, TREE_TYPE (captures[0]))
7850 6 : && expr_no_side_effects_p (captures[1])
7851 12 : && expr_no_side_effects_p (captures[2])
7852 : )
7853 : {
7854 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1488;
7855 6 : {
7856 6 : tree res_op0;
7857 6 : {
7858 6 : tree _o1[2], _r1;
7859 6 : {
7860 6 : tree _o2[2], _r2;
7861 6 : _o2[0] = captures[0];
7862 6 : _o2[1] = captures[3];
7863 6 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
7864 6 : _o1[0] = _r2;
7865 : }
7866 6 : {
7867 6 : tree _o2[2], _r2;
7868 6 : _o2[0] = captures[1];
7869 6 : _o2[1] = captures[2];
7870 6 : _r2 = fold_build2_loc (loc, NE_EXPR, type, _o2[0], _o2[1]);
7871 6 : _o1[1] = _r2;
7872 : }
7873 6 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7874 6 : res_op0 = _r1;
7875 : }
7876 6 : tree res_op1;
7877 6 : res_op1 = constant_boolean_node (eqne == NE_EXPR, type);
7878 6 : tree res_op2;
7879 6 : res_op2 = constant_boolean_node (eqne != NE_EXPR, type);
7880 6 : tree _r;
7881 6 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7882 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 964, __FILE__, __LINE__, true);
7883 6 : return _r;
7884 : }
7885 0 : next_after_fail1488:;
7886 : }
7887 : }
7888 : }
7889 : }
7890 21 : if ((_q61 == _q22 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q22, 0) && types_match (_q61, _q22)))
7891 : {
7892 21 : if ((_q62 == _q21 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q21, 0) && types_match (_q62, _q21)))
7893 : {
7894 21 : {
7895 21 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
7896 21 : const enum tree_code eqne = EQ_EXPR;
7897 21 : if (!HONOR_NANS (captures[1])
7898 0 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
7899 0 : && types_match (type, TREE_TYPE (captures[0]))
7900 0 : && expr_no_side_effects_p (captures[1])
7901 21 : && expr_no_side_effects_p (captures[2])
7902 : )
7903 : {
7904 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1489;
7905 0 : {
7906 0 : tree res_op0;
7907 0 : {
7908 0 : tree _o1[2], _r1;
7909 0 : {
7910 0 : tree _o2[2], _r2;
7911 0 : _o2[0] = captures[0];
7912 0 : _o2[1] = captures[3];
7913 0 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
7914 0 : _o1[0] = _r2;
7915 : }
7916 0 : {
7917 0 : tree _o2[2], _r2;
7918 0 : _o2[0] = captures[1];
7919 0 : _o2[1] = captures[2];
7920 0 : _r2 = fold_build2_loc (loc, EQ_EXPR, type, _o2[0], _o2[1]);
7921 0 : _o1[1] = _r2;
7922 : }
7923 0 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7924 0 : res_op0 = _r1;
7925 : }
7926 0 : tree res_op1;
7927 0 : res_op1 = constant_boolean_node (eqne != NE_EXPR, type);
7928 0 : tree res_op2;
7929 0 : res_op2 = constant_boolean_node (eqne == NE_EXPR, type);
7930 0 : tree _r;
7931 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7932 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 965, __FILE__, __LINE__, true);
7933 0 : return _r;
7934 : }
7935 0 : next_after_fail1489:;
7936 : }
7937 : }
7938 : }
7939 : }
7940 : break;
7941 : }
7942 : default:;
7943 : }
7944 : break;
7945 : }
7946 1141 : case LT_EXPR:
7947 1141 : {
7948 1141 : tree _q20 = TREE_OPERAND (_p0, 0);
7949 1141 : tree _q21 = TREE_OPERAND (_p0, 1);
7950 1141 : if (integer_truep (_p1))
7951 : {
7952 5 : {
7953 5 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7954 5 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, LT_EXPR, GE_EXPR, UNGE_EXPR);
7955 5 : if (res) return res;
7956 : }
7957 : }
7958 1141 : if (integer_zerop (_p1))
7959 : {
7960 424 : {
7961 424 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7962 424 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, LT_EXPR, GE_EXPR, UNGE_EXPR);
7963 424 : if (res) return res;
7964 : }
7965 : }
7966 : break;
7967 : }
7968 1542 : case LE_EXPR:
7969 1542 : {
7970 1542 : tree _q20 = TREE_OPERAND (_p0, 0);
7971 1542 : tree _q21 = TREE_OPERAND (_p0, 1);
7972 1542 : if (integer_truep (_p1))
7973 : {
7974 0 : {
7975 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7976 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR, UNGT_EXPR);
7977 0 : if (res) return res;
7978 : }
7979 : }
7980 1542 : if (integer_zerop (_p1))
7981 : {
7982 678 : {
7983 678 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7984 678 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR, UNGT_EXPR);
7985 678 : if (res) return res;
7986 : }
7987 : }
7988 : break;
7989 : }
7990 29917 : case EQ_EXPR:
7991 29917 : {
7992 29917 : tree _q20 = TREE_OPERAND (_p0, 0);
7993 29917 : tree _q21 = TREE_OPERAND (_p0, 1);
7994 29917 : if (integer_truep (_p1))
7995 : {
7996 48 : {
7997 48 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7998 48 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR, NE_EXPR);
7999 48 : if (res) return res;
8000 : }
8001 : }
8002 29912 : if (integer_zerop (_p1))
8003 : {
8004 7524 : {
8005 7524 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8006 7524 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR, NE_EXPR);
8007 7524 : if (res) return res;
8008 : }
8009 : }
8010 : break;
8011 : }
8012 11649 : case NE_EXPR:
8013 11649 : {
8014 11649 : tree _q20 = TREE_OPERAND (_p0, 0);
8015 11649 : tree _q21 = TREE_OPERAND (_p0, 1);
8016 11649 : if (integer_truep (_p1))
8017 : {
8018 127 : {
8019 127 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8020 127 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR, EQ_EXPR);
8021 127 : if (res) return res;
8022 : }
8023 : }
8024 11529 : if (integer_zerop (_p1))
8025 : {
8026 9829 : {
8027 9829 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8028 9829 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR, EQ_EXPR);
8029 9829 : if (res) return res;
8030 : }
8031 : }
8032 : break;
8033 : }
8034 6626 : case GE_EXPR:
8035 6626 : {
8036 6626 : tree _q20 = TREE_OPERAND (_p0, 0);
8037 6626 : tree _q21 = TREE_OPERAND (_p0, 1);
8038 6626 : if (integer_truep (_p1))
8039 : {
8040 0 : {
8041 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8042 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, GE_EXPR, LT_EXPR, UNLT_EXPR);
8043 0 : if (res) return res;
8044 : }
8045 : }
8046 6626 : if (integer_zerop (_p1))
8047 : {
8048 5507 : {
8049 5507 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8050 5507 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, GE_EXPR, LT_EXPR, UNLT_EXPR);
8051 5507 : if (res) return res;
8052 : }
8053 : }
8054 : break;
8055 : }
8056 64139 : case GT_EXPR:
8057 64139 : {
8058 64139 : tree _q20 = TREE_OPERAND (_p0, 0);
8059 64139 : tree _q21 = TREE_OPERAND (_p0, 1);
8060 64139 : if (integer_truep (_p1))
8061 : {
8062 0 : {
8063 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8064 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, GT_EXPR, LE_EXPR, UNLE_EXPR);
8065 0 : if (res) return res;
8066 : }
8067 : }
8068 64139 : if (integer_zerop (_p1))
8069 : {
8070 447 : {
8071 447 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8072 447 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, GT_EXPR, LE_EXPR, UNLE_EXPR);
8073 447 : if (res) return res;
8074 : }
8075 : }
8076 : break;
8077 : }
8078 1023 : case UNORDERED_EXPR:
8079 1023 : {
8080 1023 : tree _q20 = TREE_OPERAND (_p0, 0);
8081 1023 : tree _q21 = TREE_OPERAND (_p0, 1);
8082 1023 : if (integer_truep (_p1))
8083 : {
8084 0 : {
8085 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8086 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR);
8087 0 : if (res) return res;
8088 : }
8089 : }
8090 1023 : if (integer_zerop (_p1))
8091 : {
8092 1017 : {
8093 1017 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8094 1017 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR);
8095 1017 : if (res) return res;
8096 : }
8097 : }
8098 : break;
8099 : }
8100 0 : case ORDERED_EXPR:
8101 0 : {
8102 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8103 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8104 0 : if (integer_truep (_p1))
8105 : {
8106 0 : {
8107 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8108 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR);
8109 0 : if (res) return res;
8110 : }
8111 : }
8112 0 : if (integer_zerop (_p1))
8113 : {
8114 0 : {
8115 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8116 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR);
8117 0 : if (res) return res;
8118 : }
8119 : }
8120 : break;
8121 : }
8122 0 : case UNLT_EXPR:
8123 0 : {
8124 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8125 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8126 0 : if (integer_truep (_p1))
8127 : {
8128 0 : {
8129 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8130 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, UNLT_EXPR, GE_EXPR, GE_EXPR);
8131 0 : if (res) return res;
8132 : }
8133 : }
8134 0 : if (integer_zerop (_p1))
8135 : {
8136 0 : {
8137 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8138 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, UNLT_EXPR, GE_EXPR, GE_EXPR);
8139 0 : if (res) return res;
8140 : }
8141 : }
8142 : break;
8143 : }
8144 0 : case UNLE_EXPR:
8145 0 : {
8146 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8147 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8148 0 : if (integer_truep (_p1))
8149 : {
8150 0 : {
8151 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8152 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, UNLE_EXPR, GT_EXPR, GT_EXPR);
8153 0 : if (res) return res;
8154 : }
8155 : }
8156 0 : if (integer_zerop (_p1))
8157 : {
8158 0 : {
8159 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8160 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, UNLE_EXPR, GT_EXPR, GT_EXPR);
8161 0 : if (res) return res;
8162 : }
8163 : }
8164 : break;
8165 : }
8166 0 : case UNGT_EXPR:
8167 0 : {
8168 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8169 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8170 0 : if (integer_truep (_p1))
8171 : {
8172 0 : {
8173 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8174 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, UNGT_EXPR, LE_EXPR, LE_EXPR);
8175 0 : if (res) return res;
8176 : }
8177 : }
8178 0 : if (integer_zerop (_p1))
8179 : {
8180 0 : {
8181 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8182 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, UNGT_EXPR, LE_EXPR, LE_EXPR);
8183 0 : if (res) return res;
8184 : }
8185 : }
8186 : break;
8187 : }
8188 0 : case UNGE_EXPR:
8189 0 : {
8190 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8191 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8192 0 : if (integer_truep (_p1))
8193 : {
8194 0 : {
8195 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8196 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, UNGE_EXPR, LT_EXPR, LT_EXPR);
8197 0 : if (res) return res;
8198 : }
8199 : }
8200 0 : if (integer_zerop (_p1))
8201 : {
8202 0 : {
8203 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8204 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, UNGE_EXPR, LT_EXPR, LT_EXPR);
8205 0 : if (res) return res;
8206 : }
8207 : }
8208 : break;
8209 : }
8210 0 : case UNEQ_EXPR:
8211 0 : {
8212 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8213 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8214 0 : if (integer_truep (_p1))
8215 : {
8216 0 : {
8217 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8218 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR);
8219 0 : if (res) return res;
8220 : }
8221 : }
8222 0 : if (integer_zerop (_p1))
8223 : {
8224 0 : {
8225 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8226 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR);
8227 0 : if (res) return res;
8228 : }
8229 : }
8230 : break;
8231 : }
8232 0 : case LTGT_EXPR:
8233 0 : {
8234 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8235 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8236 0 : if (integer_truep (_p1))
8237 : {
8238 0 : {
8239 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8240 0 : tree res = generic_simplify_243 (loc, type, _p0, _p1, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR);
8241 0 : if (res) return res;
8242 : }
8243 : }
8244 0 : if (integer_zerop (_p1))
8245 : {
8246 0 : {
8247 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8248 0 : tree res = generic_simplify_244 (loc, type, _p0, _p1, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR);
8249 0 : if (res) return res;
8250 : }
8251 : }
8252 : break;
8253 : }
8254 149304 : case MINUS_EXPR:
8255 149304 : {
8256 149304 : tree _q20 = TREE_OPERAND (_p0, 0);
8257 149304 : tree _q21 = TREE_OPERAND (_p0, 1);
8258 149304 : if (integer_zerop (_p1))
8259 : {
8260 54863 : {
8261 54863 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8262 54863 : tree res = generic_simplify_245 (loc, type, _p0, _p1, captures, EQ_EXPR);
8263 54863 : if (res) return res;
8264 : }
8265 : }
8266 : break;
8267 : }
8268 31957 : case POINTER_DIFF_EXPR:
8269 31957 : {
8270 31957 : tree _q20 = TREE_OPERAND (_p0, 0);
8271 31957 : tree _q21 = TREE_OPERAND (_p0, 1);
8272 31957 : if (integer_zerop (_p1))
8273 : {
8274 1405 : {
8275 1405 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8276 1405 : tree res = generic_simplify_246 (loc, type, _p0, _p1, captures, EQ_EXPR);
8277 1405 : if (res) return res;
8278 : }
8279 : }
8280 : break;
8281 : }
8282 64124 : case MULT_EXPR:
8283 64124 : {
8284 64124 : tree _q20 = TREE_OPERAND (_p0, 0);
8285 64124 : tree _q21 = TREE_OPERAND (_p0, 1);
8286 64124 : switch (TREE_CODE (_q21))
8287 : {
8288 56503 : case INTEGER_CST:
8289 56503 : {
8290 56503 : switch (TREE_CODE (_p1))
8291 : {
8292 9659 : case INTEGER_CST:
8293 9659 : {
8294 9659 : {
8295 9659 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8296 9659 : tree res = generic_simplify_248 (loc, type, _p0, _p1, captures, EQ_EXPR);
8297 9659 : if (res) return res;
8298 : }
8299 8689 : break;
8300 : }
8301 55533 : default:;
8302 : }
8303 55533 : if (integer_zerop (_p1))
8304 : {
8305 4237 : {
8306 4237 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
8307 4237 : tree res = generic_simplify_247 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8308 4237 : if (res) return res;
8309 : }
8310 : }
8311 : break;
8312 : }
8313 : default:;
8314 : }
8315 : break;
8316 : }
8317 33441329 : default:;
8318 : }
8319 33441329 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
8320 : {
8321 90734 : {
8322 90734 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8323 90734 : tree res = generic_simplify_249 (loc, type, _p0, _p1, captures, EQ_EXPR);
8324 90734 : if (res) return res;
8325 : }
8326 : }
8327 33355301 : switch (TREE_CODE (_p0))
8328 : {
8329 6666185 : CASE_CONVERT:
8330 6666185 : {
8331 6666185 : tree _q20 = TREE_OPERAND (_p0, 0);
8332 6666185 : switch (TREE_CODE (_p1))
8333 : {
8334 1368324 : CASE_CONVERT:
8335 1368324 : {
8336 1368324 : tree _q40 = TREE_OPERAND (_p1, 0);
8337 1368324 : {
8338 1368324 : tree _q40_pops[1];
8339 1368324 : if (tree_maybe_bit_not (_q40, _q40_pops))
8340 : {
8341 0 : tree _q50 = _q40_pops[0];
8342 0 : {
8343 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
8344 0 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, EQ_EXPR);
8345 0 : if (res) return res;
8346 : }
8347 : }
8348 : }
8349 1368324 : break;
8350 : }
8351 6666185 : default:;
8352 : }
8353 6666185 : {
8354 6666185 : tree _q20_pops[1];
8355 6666185 : if (tree_maybe_bit_not (_q20, _q20_pops))
8356 : {
8357 232 : tree _q30 = _q20_pops[0];
8358 232 : switch (TREE_CODE (_p1))
8359 : {
8360 74 : CASE_CONVERT:
8361 74 : {
8362 74 : tree _q50 = TREE_OPERAND (_p1, 0);
8363 74 : {
8364 74 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
8365 74 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, EQ_EXPR);
8366 74 : if (res) return res;
8367 : }
8368 74 : break;
8369 : }
8370 : default:;
8371 : }
8372 : }
8373 : }
8374 6666185 : break;
8375 : }
8376 33355301 : default:;
8377 : }
8378 33355301 : {
8379 33355301 : tree _p1_pops[1];
8380 33355301 : if (tree_maybe_bit_not (_p1, _p1_pops))
8381 : {
8382 24679590 : tree _q30 = _p1_pops[0];
8383 24679590 : {
8384 24679590 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
8385 24679590 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, EQ_EXPR);
8386 24679590 : if (res) return res;
8387 : }
8388 : }
8389 : }
8390 33355299 : switch (TREE_CODE (_p0))
8391 : {
8392 404 : case BIT_NOT_EXPR:
8393 404 : {
8394 404 : tree _q20 = TREE_OPERAND (_p0, 0);
8395 404 : switch (TREE_CODE (_p1))
8396 : {
8397 1 : case BIT_NOT_EXPR:
8398 1 : {
8399 1 : tree _q40 = TREE_OPERAND (_p1, 0);
8400 1 : {
8401 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _p1, _q40 };
8402 1 : tree res = generic_simplify_253 (loc, type, _p0, _p1, captures, EQ_EXPR);
8403 1 : if (res) return res;
8404 : }
8405 0 : break;
8406 : }
8407 403 : default:;
8408 : }
8409 403 : {
8410 403 : tree _p1_pops[1];
8411 403 : if (tree_nop_convert (_p1, _p1_pops))
8412 : {
8413 3 : tree _q40 = _p1_pops[0];
8414 3 : switch (TREE_CODE (_q40))
8415 : {
8416 0 : case BIT_NOT_EXPR:
8417 0 : {
8418 0 : tree _q50 = TREE_OPERAND (_q40, 0);
8419 0 : {
8420 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q50 };
8421 0 : tree res = generic_simplify_253 (loc, type, _p0, _p1, captures, EQ_EXPR);
8422 0 : if (res) return res;
8423 : }
8424 0 : break;
8425 : }
8426 : default:;
8427 : }
8428 : }
8429 : }
8430 403 : if (CONSTANT_CLASS_P (_p1))
8431 : {
8432 195 : {
8433 195 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8434 195 : tree res = generic_simplify_252 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8435 195 : if (res) return res;
8436 : }
8437 : }
8438 : break;
8439 : }
8440 33355103 : default:;
8441 : }
8442 33355103 : {
8443 33355103 : tree _p0_pops[1];
8444 33355103 : if (tree_maybe_bit_not (_p0, _p0_pops))
8445 : {
8446 91238 : tree _q20 = _p0_pops[0];
8447 91238 : {
8448 91238 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _q20 };
8449 91238 : tree res = generic_simplify_250 (loc, type, _p0, _p1, captures, EQ_EXPR);
8450 91238 : if (res) return res;
8451 : }
8452 : }
8453 : }
8454 33355102 : {
8455 33355102 : tree _p0_pops[1];
8456 33355102 : if (tree_nop_convert (_p0, _p0_pops))
8457 : {
8458 3050035 : tree _q20 = _p0_pops[0];
8459 3050035 : switch (TREE_CODE (_q20))
8460 : {
8461 41 : case BIT_NOT_EXPR:
8462 41 : {
8463 41 : tree _q30 = TREE_OPERAND (_q20, 0);
8464 41 : switch (TREE_CODE (_p1))
8465 : {
8466 0 : case BIT_NOT_EXPR:
8467 0 : {
8468 0 : tree _q50 = TREE_OPERAND (_p1, 0);
8469 0 : {
8470 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _p1, _q50 };
8471 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, EQ_EXPR);
8472 0 : if (res) return res;
8473 : }
8474 0 : break;
8475 : }
8476 41 : default:;
8477 : }
8478 41 : {
8479 41 : tree _p1_pops[1];
8480 41 : if (tree_nop_convert (_p1, _p1_pops))
8481 : {
8482 0 : tree _q50 = _p1_pops[0];
8483 0 : switch (TREE_CODE (_q50))
8484 : {
8485 0 : case BIT_NOT_EXPR:
8486 0 : {
8487 0 : tree _q60 = TREE_OPERAND (_q50, 0);
8488 0 : {
8489 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q60 };
8490 0 : tree res = generic_simplify_251 (loc, type, _p0, _p1, captures, EQ_EXPR);
8491 0 : if (res) return res;
8492 : }
8493 0 : break;
8494 : }
8495 : default:;
8496 : }
8497 : }
8498 : }
8499 41 : if (CONSTANT_CLASS_P (_p1))
8500 : {
8501 41 : {
8502 41 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
8503 41 : tree res = generic_simplify_252 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8504 41 : if (res) return res;
8505 : }
8506 : }
8507 : break;
8508 : }
8509 : default:;
8510 : }
8511 : }
8512 : }
8513 33355061 : switch (TREE_CODE (_p1))
8514 : {
8515 918374 : case REAL_CST:
8516 918374 : {
8517 918374 : {
8518 918374 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8519 918374 : tree res = generic_simplify_254 (loc, type, _p0, _p1, captures, EQ_EXPR);
8520 918374 : if (res) return res;
8521 : }
8522 917370 : break;
8523 : }
8524 33354057 : default:;
8525 : }
8526 33354057 : switch (TREE_CODE (_p0))
8527 : {
8528 692818 : case PLUS_EXPR:
8529 692818 : {
8530 692818 : tree _q20 = TREE_OPERAND (_p0, 0);
8531 692818 : tree _q21 = TREE_OPERAND (_p0, 1);
8532 692818 : switch (TREE_CODE (_q21))
8533 : {
8534 590 : case REAL_CST:
8535 590 : {
8536 590 : switch (TREE_CODE (_p1))
8537 : {
8538 409 : case REAL_CST:
8539 409 : {
8540 409 : {
8541 409 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8542 409 : tree res = generic_simplify_255 (loc, type, _p0, _p1, captures, PLUS_EXPR, EQ_EXPR);
8543 409 : if (res) return res;
8544 : }
8545 409 : break;
8546 : }
8547 : default:;
8548 : }
8549 : break;
8550 : }
8551 : default:;
8552 : }
8553 : break;
8554 : }
8555 94441 : case MINUS_EXPR:
8556 94441 : {
8557 94441 : tree _q20 = TREE_OPERAND (_p0, 0);
8558 94441 : tree _q21 = TREE_OPERAND (_p0, 1);
8559 94441 : switch (TREE_CODE (_q21))
8560 : {
8561 60 : case REAL_CST:
8562 60 : {
8563 60 : switch (TREE_CODE (_p1))
8564 : {
8565 60 : case REAL_CST:
8566 60 : {
8567 60 : {
8568 60 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8569 60 : tree res = generic_simplify_255 (loc, type, _p0, _p1, captures, MINUS_EXPR, EQ_EXPR);
8570 60 : if (res) return res;
8571 : }
8572 60 : break;
8573 : }
8574 : default:;
8575 : }
8576 : break;
8577 : }
8578 94441 : default:;
8579 : }
8580 94441 : switch (TREE_CODE (_q20))
8581 : {
8582 273 : case REAL_CST:
8583 273 : {
8584 273 : switch (TREE_CODE (_p1))
8585 : {
8586 245 : case REAL_CST:
8587 245 : {
8588 245 : {
8589 245 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8590 245 : tree res = generic_simplify_256 (loc, type, _p0, _p1, captures, EQ_EXPR);
8591 245 : if (res) return res;
8592 : }
8593 244 : break;
8594 : }
8595 : default:;
8596 : }
8597 : break;
8598 : }
8599 : default:;
8600 : }
8601 : break;
8602 : }
8603 2610 : case FLOAT_EXPR:
8604 2610 : {
8605 2610 : tree _q20 = TREE_OPERAND (_p0, 0);
8606 2610 : switch (TREE_CODE (_p1))
8607 : {
8608 1 : case FLOAT_EXPR:
8609 1 : {
8610 1 : tree _q40 = TREE_OPERAND (_p1, 0);
8611 1 : {
8612 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
8613 1 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8614 1 : if (res) return res;
8615 : }
8616 0 : break;
8617 : }
8618 180 : case REAL_CST:
8619 180 : {
8620 180 : {
8621 180 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8622 180 : tree res = generic_simplify_260 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8623 180 : if (res) return res;
8624 : }
8625 149 : break;
8626 : }
8627 : default:;
8628 : }
8629 : break;
8630 : }
8631 7454 : case EXACT_DIV_EXPR:
8632 7454 : {
8633 7454 : tree _q20 = TREE_OPERAND (_p0, 0);
8634 7454 : tree _q21 = TREE_OPERAND (_p0, 1);
8635 7454 : switch (TREE_CODE (_p1))
8636 : {
8637 33 : case INTEGER_CST:
8638 33 : {
8639 33 : {
8640 33 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8641 33 : tree res = generic_simplify_261 (loc, type, _p0, _p1, captures, EQ_EXPR);
8642 33 : if (res) return res;
8643 : }
8644 0 : break;
8645 : }
8646 : default:;
8647 : }
8648 : break;
8649 : }
8650 918 : case NEGATE_EXPR:
8651 918 : {
8652 918 : tree _q20 = TREE_OPERAND (_p0, 0);
8653 918 : switch (TREE_CODE (_p1))
8654 : {
8655 1 : case NEGATE_EXPR:
8656 1 : {
8657 1 : tree _q40 = TREE_OPERAND (_p1, 0);
8658 1 : {
8659 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
8660 1 : tree res = generic_simplify_262 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8661 1 : if (res) return res;
8662 : }
8663 0 : break;
8664 : }
8665 917 : default:;
8666 : }
8667 917 : if (CONSTANT_CLASS_P (_p1))
8668 : {
8669 210 : {
8670 210 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8671 210 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
8672 210 : if (res) return res;
8673 : }
8674 : }
8675 : break;
8676 : }
8677 1324 : case ABS_EXPR:
8678 1324 : {
8679 1324 : tree _q20 = TREE_OPERAND (_p0, 0);
8680 1324 : if (zerop (_p1))
8681 : {
8682 72 : {
8683 72 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8684 72 : const enum tree_code eqne = EQ_EXPR;
8685 72 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1490;
8686 72 : {
8687 72 : tree res_op0;
8688 72 : res_op0 = captures[0];
8689 72 : tree res_op1;
8690 72 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
8691 72 : tree _r;
8692 72 : _r = fold_build2_loc (loc, eqne, type, res_op0, res_op1);
8693 72 : if (TREE_SIDE_EFFECTS (captures[1]))
8694 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
8695 72 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
8696 72 : return _r;
8697 : }
8698 0 : next_after_fail1490:;
8699 : }
8700 : }
8701 : break;
8702 : }
8703 1 : case ABSU_EXPR:
8704 1 : {
8705 1 : tree _q20 = TREE_OPERAND (_p0, 0);
8706 1 : if (zerop (_p1))
8707 : {
8708 0 : {
8709 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8710 0 : const enum tree_code eqne = EQ_EXPR;
8711 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1491;
8712 0 : {
8713 0 : tree res_op0;
8714 0 : res_op0 = captures[0];
8715 0 : tree res_op1;
8716 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
8717 0 : tree _r;
8718 0 : _r = fold_build2_loc (loc, eqne, type, res_op0, res_op1);
8719 0 : if (TREE_SIDE_EFFECTS (captures[1]))
8720 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
8721 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 966, __FILE__, __LINE__, true);
8722 0 : return _r;
8723 : }
8724 0 : next_after_fail1491:;
8725 : }
8726 : }
8727 : break;
8728 : }
8729 6666106 : CASE_CONVERT:
8730 6666106 : {
8731 6666106 : tree _q20 = TREE_OPERAND (_p0, 0);
8732 6666106 : switch (TREE_CODE (_p1))
8733 : {
8734 1368324 : CASE_CONVERT:
8735 1368324 : {
8736 1368324 : tree _q40 = TREE_OPERAND (_p1, 0);
8737 1368324 : {
8738 1368324 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8739 1368324 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, EQ_EXPR);
8740 1368324 : if (res) return res;
8741 : }
8742 653699 : break;
8743 : }
8744 5951481 : default:;
8745 : }
8746 5951481 : {
8747 5951481 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
8748 5951481 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, EQ_EXPR);
8749 5951481 : if (res) return res;
8750 : }
8751 2239321 : switch (TREE_CODE (_q20))
8752 : {
8753 3 : case BIT_IOR_EXPR:
8754 3 : {
8755 3 : tree _q30 = TREE_OPERAND (_q20, 0);
8756 3 : tree _q31 = TREE_OPERAND (_q20, 1);
8757 3 : switch (TREE_CODE (_q31))
8758 : {
8759 0 : case INTEGER_CST:
8760 0 : {
8761 0 : switch (TREE_CODE (_p1))
8762 : {
8763 0 : case INTEGER_CST:
8764 0 : {
8765 0 : {
8766 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _p1 };
8767 0 : tree res = generic_simplify_266 (loc, type, _p0, _p1, captures, EQ_EXPR);
8768 0 : if (res) return res;
8769 : }
8770 0 : break;
8771 : }
8772 : default:;
8773 : }
8774 : break;
8775 : }
8776 : default:;
8777 : }
8778 : break;
8779 : }
8780 : default:;
8781 : }
8782 : break;
8783 : }
8784 9007415 : case SSA_NAME:
8785 9007415 : {
8786 9007415 : switch (TREE_CODE (_p1))
8787 : {
8788 795675 : case ADDR_EXPR:
8789 795675 : {
8790 795675 : {
8791 795675 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8792 795675 : tree res = generic_simplify_267 (loc, type, _p0, _p1, captures, EQ_EXPR);
8793 795675 : if (res) return res;
8794 : }
8795 795675 : break;
8796 : }
8797 : default:;
8798 : }
8799 : break;
8800 : }
8801 33566 : case BIT_IOR_EXPR:
8802 33566 : {
8803 33566 : tree _q20 = TREE_OPERAND (_p0, 0);
8804 33566 : tree _q21 = TREE_OPERAND (_p0, 1);
8805 33566 : switch (TREE_CODE (_q21))
8806 : {
8807 1507 : case INTEGER_CST:
8808 1507 : {
8809 1507 : switch (TREE_CODE (_p1))
8810 : {
8811 464 : case INTEGER_CST:
8812 464 : {
8813 464 : {
8814 464 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
8815 464 : tree res = generic_simplify_266 (loc, type, _p0, _p1, captures, EQ_EXPR);
8816 464 : if (res) return res;
8817 : }
8818 464 : break;
8819 : }
8820 : default:;
8821 : }
8822 : break;
8823 : }
8824 : default:;
8825 : }
8826 : break;
8827 : }
8828 577 : case BIT_XOR_EXPR:
8829 577 : {
8830 577 : tree _q20 = TREE_OPERAND (_p0, 0);
8831 577 : tree _q21 = TREE_OPERAND (_p0, 1);
8832 577 : if (integer_zerop (_p1))
8833 : {
8834 163 : {
8835 163 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8836 163 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, EQ_EXPR);
8837 163 : if (res) return res;
8838 : }
8839 : }
8840 414 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8841 : {
8842 29 : {
8843 29 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8844 29 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, EQ_EXPR);
8845 29 : if (res) return res;
8846 : }
8847 : }
8848 385 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8849 : {
8850 30 : {
8851 30 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8852 30 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, EQ_EXPR);
8853 30 : if (res) return res;
8854 : }
8855 : }
8856 : break;
8857 : }
8858 2245990 : case CALL_EXPR:
8859 2245990 : switch (get_call_combined_fn (_p0))
8860 : {
8861 3 : case CFN_BUILT_IN_SQRTF:
8862 3 : if (call_expr_nargs (_p0) == 1)
8863 : {
8864 3 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8865 3 : switch (TREE_CODE (_p1))
8866 : {
8867 0 : case REAL_CST:
8868 0 : {
8869 0 : {
8870 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8871 0 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, EQ_EXPR);
8872 0 : if (res) return res;
8873 : }
8874 0 : break;
8875 : }
8876 3 : case CALL_EXPR:
8877 3 : switch (get_call_combined_fn (_p1))
8878 : {
8879 3 : case CFN_BUILT_IN_SQRTF:
8880 3 : if (call_expr_nargs (_p1) == 1)
8881 : {
8882 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8883 3 : {
8884 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
8885 3 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, EQ_EXPR);
8886 3 : if (res) return res;
8887 : }
8888 : }
8889 : break;
8890 : default:;
8891 : }
8892 : break;
8893 : default:;
8894 : }
8895 : }
8896 : break;
8897 3 : case CFN_BUILT_IN_SQRTL:
8898 3 : if (call_expr_nargs (_p0) == 1)
8899 : {
8900 3 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8901 3 : switch (TREE_CODE (_p1))
8902 : {
8903 0 : case REAL_CST:
8904 0 : {
8905 0 : {
8906 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8907 0 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, EQ_EXPR);
8908 0 : if (res) return res;
8909 : }
8910 0 : break;
8911 : }
8912 3 : case CALL_EXPR:
8913 3 : switch (get_call_combined_fn (_p1))
8914 : {
8915 3 : case CFN_BUILT_IN_SQRTL:
8916 3 : if (call_expr_nargs (_p1) == 1)
8917 : {
8918 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8919 3 : {
8920 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
8921 3 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, EQ_EXPR);
8922 3 : if (res) return res;
8923 : }
8924 : }
8925 : break;
8926 : default:;
8927 : }
8928 : break;
8929 : default:;
8930 : }
8931 : }
8932 : break;
8933 0 : case CFN_BUILT_IN_SQRT:
8934 0 : if (call_expr_nargs (_p0) == 1)
8935 : {
8936 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8937 0 : switch (TREE_CODE (_p1))
8938 : {
8939 0 : case REAL_CST:
8940 0 : {
8941 0 : {
8942 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8943 0 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, EQ_EXPR);
8944 0 : if (res) return res;
8945 : }
8946 0 : break;
8947 : }
8948 0 : case CALL_EXPR:
8949 0 : switch (get_call_combined_fn (_p1))
8950 : {
8951 0 : case CFN_BUILT_IN_SQRT:
8952 0 : if (call_expr_nargs (_p1) == 1)
8953 : {
8954 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8955 0 : {
8956 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
8957 0 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, EQ_EXPR);
8958 0 : if (res) return res;
8959 : }
8960 : }
8961 : break;
8962 : default:;
8963 : }
8964 : break;
8965 : default:;
8966 : }
8967 : }
8968 : break;
8969 0 : case CFN_SQRT:
8970 0 : if (call_expr_nargs (_p0) == 1)
8971 : {
8972 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8973 0 : switch (TREE_CODE (_p1))
8974 : {
8975 0 : case REAL_CST:
8976 0 : {
8977 0 : {
8978 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
8979 0 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, CFN_SQRT, EQ_EXPR);
8980 0 : if (res) return res;
8981 : }
8982 0 : break;
8983 : }
8984 0 : case CALL_EXPR:
8985 0 : switch (get_call_combined_fn (_p1))
8986 : {
8987 0 : case CFN_SQRT:
8988 0 : if (call_expr_nargs (_p1) == 1)
8989 : {
8990 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8991 0 : {
8992 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
8993 0 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, CFN_SQRT, EQ_EXPR);
8994 0 : if (res) return res;
8995 : }
8996 : }
8997 : break;
8998 : default:;
8999 : }
9000 : break;
9001 : default:;
9002 : }
9003 : }
9004 : break;
9005 : default:;
9006 : }
9007 : break;
9008 28926711 : default:;
9009 : }
9010 28926711 : switch (TREE_CODE (_p1))
9011 : {
9012 22 : case BIT_XOR_EXPR:
9013 22 : {
9014 22 : tree _q30 = TREE_OPERAND (_p1, 0);
9015 22 : tree _q31 = TREE_OPERAND (_p1, 1);
9016 22 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9017 : {
9018 0 : {
9019 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
9020 0 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, EQ_EXPR);
9021 0 : if (res) return res;
9022 : }
9023 : }
9024 22 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9025 : {
9026 0 : {
9027 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
9028 0 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, EQ_EXPR);
9029 0 : if (res) return res;
9030 : }
9031 : }
9032 : break;
9033 : }
9034 28926711 : default:;
9035 : }
9036 28926711 : switch (TREE_CODE (_p0))
9037 : {
9038 897016 : case BIT_AND_EXPR:
9039 897016 : {
9040 897016 : tree _q20 = TREE_OPERAND (_p0, 0);
9041 897016 : tree _q21 = TREE_OPERAND (_p0, 1);
9042 897016 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9043 : {
9044 130 : {
9045 130 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9046 130 : tree res = generic_simplify_270 (loc, type, _p0, _p1, captures, EQ_EXPR);
9047 130 : if (res) return res;
9048 : }
9049 : }
9050 897015 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9051 : {
9052 140872 : {
9053 140872 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
9054 140872 : tree res = generic_simplify_270 (loc, type, _p0, _p1, captures, EQ_EXPR);
9055 140872 : if (res) return res;
9056 : }
9057 : }
9058 : break;
9059 : }
9060 28926710 : default:;
9061 : }
9062 28926710 : switch (TREE_CODE (_p1))
9063 : {
9064 24228 : case BIT_AND_EXPR:
9065 24228 : {
9066 24228 : tree _q30 = TREE_OPERAND (_p1, 0);
9067 24228 : tree _q31 = TREE_OPERAND (_p1, 1);
9068 24228 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9069 : {
9070 0 : {
9071 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
9072 0 : tree res = generic_simplify_270 (loc, type, _p0, _p1, captures, EQ_EXPR);
9073 0 : if (res) return res;
9074 : }
9075 : }
9076 24228 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9077 : {
9078 0 : {
9079 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
9080 0 : tree res = generic_simplify_270 (loc, type, _p0, _p1, captures, EQ_EXPR);
9081 0 : if (res) return res;
9082 : }
9083 : }
9084 : break;
9085 : }
9086 28926710 : default:;
9087 : }
9088 28926710 : switch (TREE_CODE (_p0))
9089 : {
9090 2239321 : CASE_CONVERT:
9091 2239321 : {
9092 2239321 : tree _q20 = TREE_OPERAND (_p0, 0);
9093 2239321 : switch (TREE_CODE (_q20))
9094 : {
9095 2 : case BIT_AND_EXPR:
9096 2 : {
9097 2 : tree _q30 = TREE_OPERAND (_q20, 0);
9098 2 : tree _q31 = TREE_OPERAND (_q20, 1);
9099 2 : switch (TREE_CODE (_q30))
9100 : {
9101 0 : CASE_CONVERT:
9102 0 : {
9103 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9104 0 : switch (TREE_CODE (_q31))
9105 : {
9106 0 : case INTEGER_CST:
9107 0 : {
9108 0 : switch (TREE_CODE (_p1))
9109 : {
9110 0 : CASE_CONVERT:
9111 0 : {
9112 0 : tree _q70 = TREE_OPERAND (_p1, 0);
9113 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
9114 : {
9115 0 : {
9116 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q31 };
9117 0 : tree res = generic_simplify_271 (loc, type, _p0, _p1, captures, EQ_EXPR);
9118 0 : if (res) return res;
9119 : }
9120 : }
9121 : break;
9122 : }
9123 : default:;
9124 : }
9125 : break;
9126 : }
9127 : default:;
9128 : }
9129 : break;
9130 : }
9131 : default:;
9132 : }
9133 : break;
9134 : }
9135 2239321 : default:;
9136 : }
9137 2239321 : switch (TREE_CODE (_p1))
9138 : {
9139 653699 : CASE_CONVERT:
9140 653699 : {
9141 653699 : tree _q40 = TREE_OPERAND (_p1, 0);
9142 653699 : switch (TREE_CODE (_q40))
9143 : {
9144 7 : case BIT_AND_EXPR:
9145 7 : {
9146 7 : tree _q50 = TREE_OPERAND (_q40, 0);
9147 7 : tree _q51 = TREE_OPERAND (_q40, 1);
9148 7 : switch (TREE_CODE (_q50))
9149 : {
9150 7 : CASE_CONVERT:
9151 7 : {
9152 7 : tree _q60 = TREE_OPERAND (_q50, 0);
9153 7 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9154 : {
9155 0 : switch (TREE_CODE (_q51))
9156 : {
9157 0 : case INTEGER_CST:
9158 0 : {
9159 0 : {
9160 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q50, _q20, _q51 };
9161 0 : tree res = generic_simplify_271 (loc, type, _p0, _p1, captures, EQ_EXPR);
9162 0 : if (res) return res;
9163 : }
9164 0 : break;
9165 : }
9166 : default:;
9167 : }
9168 : }
9169 : break;
9170 : }
9171 : default:;
9172 : }
9173 : break;
9174 : }
9175 : default:;
9176 : }
9177 : break;
9178 : }
9179 : default:;
9180 : }
9181 : break;
9182 : }
9183 33566 : case BIT_IOR_EXPR:
9184 33566 : {
9185 33566 : tree _q20 = TREE_OPERAND (_p0, 0);
9186 33566 : tree _q21 = TREE_OPERAND (_p0, 1);
9187 33566 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9188 : {
9189 24 : {
9190 24 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9191 24 : tree res = generic_simplify_272 (loc, type, _p0, _p1, captures, EQ_EXPR);
9192 24 : if (res) return res;
9193 : }
9194 : }
9195 33566 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9196 : {
9197 46 : {
9198 46 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
9199 46 : tree res = generic_simplify_272 (loc, type, _p0, _p1, captures, EQ_EXPR);
9200 46 : if (res) return res;
9201 : }
9202 : }
9203 : break;
9204 : }
9205 28926710 : default:;
9206 : }
9207 28926710 : switch (TREE_CODE (_p1))
9208 : {
9209 618 : case BIT_IOR_EXPR:
9210 618 : {
9211 618 : tree _q30 = TREE_OPERAND (_p1, 0);
9212 618 : tree _q31 = TREE_OPERAND (_p1, 1);
9213 618 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9214 : {
9215 0 : {
9216 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
9217 0 : tree res = generic_simplify_272 (loc, type, _p0, _p1, captures, EQ_EXPR);
9218 0 : if (res) return res;
9219 : }
9220 : }
9221 618 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9222 : {
9223 0 : {
9224 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
9225 0 : tree res = generic_simplify_272 (loc, type, _p0, _p1, captures, EQ_EXPR);
9226 0 : if (res) return res;
9227 : }
9228 : }
9229 : break;
9230 : }
9231 28926710 : default:;
9232 : }
9233 28926710 : switch (TREE_CODE (_p0))
9234 : {
9235 2239321 : CASE_CONVERT:
9236 2239321 : {
9237 2239321 : tree _q20 = TREE_OPERAND (_p0, 0);
9238 2239321 : switch (TREE_CODE (_q20))
9239 : {
9240 9 : case BIT_XOR_EXPR:
9241 9 : {
9242 9 : tree _q30 = TREE_OPERAND (_q20, 0);
9243 9 : tree _q31 = TREE_OPERAND (_q20, 1);
9244 9 : switch (TREE_CODE (_q31))
9245 : {
9246 7 : case INTEGER_CST:
9247 7 : {
9248 7 : switch (TREE_CODE (_p1))
9249 : {
9250 0 : case INTEGER_CST:
9251 0 : {
9252 0 : {
9253 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _p1 };
9254 0 : tree res = generic_simplify_273 (loc, type, _p0, _p1, captures, EQ_EXPR);
9255 0 : if (res) return res;
9256 : }
9257 0 : break;
9258 : }
9259 : default:;
9260 : }
9261 : break;
9262 : }
9263 : default:;
9264 : }
9265 : break;
9266 : }
9267 : default:;
9268 : }
9269 : break;
9270 : }
9271 355 : case BIT_XOR_EXPR:
9272 355 : {
9273 355 : tree _q20 = TREE_OPERAND (_p0, 0);
9274 355 : tree _q21 = TREE_OPERAND (_p0, 1);
9275 355 : switch (TREE_CODE (_q21))
9276 : {
9277 103 : case INTEGER_CST:
9278 103 : {
9279 103 : switch (TREE_CODE (_p1))
9280 : {
9281 16 : case INTEGER_CST:
9282 16 : {
9283 16 : {
9284 16 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
9285 16 : tree res = generic_simplify_273 (loc, type, _p0, _p1, captures, EQ_EXPR);
9286 16 : if (res) return res;
9287 : }
9288 0 : break;
9289 : }
9290 : default:;
9291 : }
9292 : break;
9293 : }
9294 : default:;
9295 : }
9296 : break;
9297 : }
9298 28926694 : default:;
9299 : }
9300 28926694 : {
9301 28926694 : tree _p0_pops[1];
9302 28926694 : if (tree_nop_convert (_p0, _p0_pops))
9303 : {
9304 1847201 : tree _q20 = _p0_pops[0];
9305 1847201 : if (integer_zerop (_p1))
9306 : {
9307 675473 : {
9308 675473 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9309 675473 : tree res = generic_simplify_274 (loc, type, _p0, _p1, captures, EQ_EXPR);
9310 675473 : if (res) return res;
9311 : }
9312 : }
9313 : }
9314 : }
9315 28392190 : if (integer_zerop (_p1))
9316 : {
9317 10418581 : {
9318 10418581 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9319 10418581 : tree res = generic_simplify_274 (loc, type, _p0, _p1, captures, EQ_EXPR);
9320 10418581 : if (res) return res;
9321 : }
9322 : }
9323 28314831 : switch (TREE_CODE (_p0))
9324 : {
9325 897015 : case BIT_AND_EXPR:
9326 897015 : {
9327 897015 : tree _q20 = TREE_OPERAND (_p0, 0);
9328 897015 : tree _q21 = TREE_OPERAND (_p0, 1);
9329 897015 : switch (TREE_CODE (_p1))
9330 : {
9331 23971 : case BIT_AND_EXPR:
9332 23971 : {
9333 23971 : tree _q50 = TREE_OPERAND (_p1, 0);
9334 23971 : tree _q51 = TREE_OPERAND (_p1, 1);
9335 23971 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
9336 : {
9337 23446 : {
9338 23446 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
9339 23446 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, EQ_EXPR);
9340 23446 : if (res) return res;
9341 : }
9342 : }
9343 525 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
9344 : {
9345 28 : {
9346 28 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
9347 28 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, EQ_EXPR);
9348 28 : if (res) return res;
9349 : }
9350 : }
9351 497 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
9352 : {
9353 28 : {
9354 28 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
9355 28 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, EQ_EXPR);
9356 28 : if (res) return res;
9357 : }
9358 : }
9359 469 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
9360 : {
9361 28 : {
9362 28 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
9363 28 : tree res = generic_simplify_275 (loc, type, _p0, _p1, captures, EQ_EXPR);
9364 28 : if (res) return res;
9365 : }
9366 : }
9367 : break;
9368 : }
9369 873485 : default:;
9370 : }
9371 873485 : if (integer_pow2p (_q21))
9372 : {
9373 326523 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9374 : {
9375 107353 : {
9376 107353 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9377 107353 : tree res = generic_simplify_276 (loc, type, _p0, _p1, captures, EQ_EXPR, NE_EXPR);
9378 107353 : if (res) return res;
9379 : }
9380 : }
9381 : }
9382 766150 : switch (TREE_CODE (_q20))
9383 : {
9384 84067 : CASE_CONVERT:
9385 84067 : {
9386 84067 : tree _q30 = TREE_OPERAND (_q20, 0);
9387 84067 : if (integer_pow2p (_q21))
9388 : {
9389 46992 : if (integer_zerop (_p1))
9390 : {
9391 46990 : {
9392 46990 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q21 };
9393 46990 : tree res = generic_simplify_277 (loc, type, _p0, _p1, captures, EQ_EXPR, GE_EXPR);
9394 46990 : if (res) return res;
9395 : }
9396 : }
9397 : }
9398 : break;
9399 : }
9400 765193 : default:;
9401 : }
9402 765193 : if (integer_pow2p (_q21))
9403 : {
9404 218231 : if (integer_zerop (_p1))
9405 : {
9406 218102 : {
9407 218102 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q20, _q21 };
9408 218102 : tree res = generic_simplify_278 (loc, type, _p0, _p1, captures, EQ_EXPR, GE_EXPR);
9409 218102 : if (res) return res;
9410 : }
9411 : }
9412 : }
9413 : break;
9414 : }
9415 1211 : case GE_EXPR:
9416 1211 : {
9417 1211 : tree _q20 = TREE_OPERAND (_p0, 0);
9418 1211 : tree _q21 = TREE_OPERAND (_p0, 1);
9419 1211 : if (integer_zerop (_q21))
9420 : {
9421 98 : switch (TREE_CODE (_p1))
9422 : {
9423 5 : case GE_EXPR:
9424 5 : {
9425 5 : tree _q50 = TREE_OPERAND (_p1, 0);
9426 5 : tree _q51 = TREE_OPERAND (_p1, 1);
9427 5 : if (integer_zerop (_q51))
9428 : {
9429 5 : {
9430 5 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
9431 5 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR, GE_EXPR);
9432 5 : if (res) return res;
9433 : }
9434 : }
9435 : break;
9436 : }
9437 1 : case LT_EXPR:
9438 1 : {
9439 1 : tree _q50 = TREE_OPERAND (_p1, 0);
9440 1 : tree _q51 = TREE_OPERAND (_p1, 1);
9441 1 : if (integer_zerop (_q51))
9442 : {
9443 1 : {
9444 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
9445 1 : tree res = generic_simplify_280 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
9446 1 : if (res) return res;
9447 : }
9448 : }
9449 : break;
9450 : }
9451 : default:;
9452 : }
9453 : }
9454 : break;
9455 : }
9456 837 : case LT_EXPR:
9457 837 : {
9458 837 : tree _q20 = TREE_OPERAND (_p0, 0);
9459 837 : tree _q21 = TREE_OPERAND (_p0, 1);
9460 837 : if (integer_zerop (_q21))
9461 : {
9462 140 : switch (TREE_CODE (_p1))
9463 : {
9464 11 : case LT_EXPR:
9465 11 : {
9466 11 : tree _q50 = TREE_OPERAND (_p1, 0);
9467 11 : tree _q51 = TREE_OPERAND (_p1, 1);
9468 11 : if (integer_zerop (_q51))
9469 : {
9470 9 : {
9471 9 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
9472 9 : tree res = generic_simplify_279 (loc, type, _p0, _p1, captures, LT_EXPR, EQ_EXPR, GE_EXPR);
9473 9 : if (res) return res;
9474 : }
9475 : }
9476 : break;
9477 : }
9478 1 : case GE_EXPR:
9479 1 : {
9480 1 : tree _q50 = TREE_OPERAND (_p1, 0);
9481 1 : tree _q51 = TREE_OPERAND (_p1, 1);
9482 1 : if (integer_zerop (_q51))
9483 : {
9484 1 : {
9485 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
9486 1 : tree res = generic_simplify_281 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
9487 1 : if (res) return res;
9488 : }
9489 : }
9490 : break;
9491 : }
9492 : default:;
9493 : }
9494 : }
9495 : break;
9496 : }
9497 33566 : case BIT_IOR_EXPR:
9498 33566 : {
9499 33566 : tree _q20 = TREE_OPERAND (_p0, 0);
9500 33566 : tree _q21 = TREE_OPERAND (_p0, 1);
9501 33566 : switch (TREE_CODE (_q21))
9502 : {
9503 658 : CASE_CONVERT:
9504 658 : {
9505 658 : tree _q40 = TREE_OPERAND (_q21, 0);
9506 658 : switch (TREE_CODE (_q40))
9507 : {
9508 0 : case NE_EXPR:
9509 0 : {
9510 0 : tree _q50 = TREE_OPERAND (_q40, 0);
9511 0 : tree _q51 = TREE_OPERAND (_q40, 1);
9512 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
9513 : {
9514 0 : if (integer_zerop (_q51))
9515 : {
9516 0 : if (integer_zerop (_p1))
9517 : {
9518 0 : {
9519 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9520 0 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, EQ_EXPR);
9521 0 : if (res) return res;
9522 : }
9523 : }
9524 : }
9525 : }
9526 : break;
9527 : }
9528 : default:;
9529 : }
9530 : break;
9531 : }
9532 33566 : default:;
9533 : }
9534 33566 : switch (TREE_CODE (_q20))
9535 : {
9536 643 : CASE_CONVERT:
9537 643 : {
9538 643 : tree _q30 = TREE_OPERAND (_q20, 0);
9539 643 : switch (TREE_CODE (_q30))
9540 : {
9541 0 : case NE_EXPR:
9542 0 : {
9543 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9544 0 : tree _q41 = TREE_OPERAND (_q30, 1);
9545 0 : if (integer_zerop (_q41))
9546 : {
9547 0 : if ((_q21 == _q40 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q40, 0) && types_match (_q21, _q40)))
9548 : {
9549 0 : if (integer_zerop (_p1))
9550 : {
9551 0 : {
9552 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
9553 0 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, EQ_EXPR);
9554 0 : if (res) return res;
9555 : }
9556 : }
9557 : }
9558 : }
9559 : break;
9560 : }
9561 : default:;
9562 : }
9563 : break;
9564 : }
9565 33566 : default:;
9566 : }
9567 33566 : switch (TREE_CODE (_q21))
9568 : {
9569 1 : case NE_EXPR:
9570 1 : {
9571 1 : tree _q40 = TREE_OPERAND (_q21, 0);
9572 1 : tree _q41 = TREE_OPERAND (_q21, 1);
9573 1 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
9574 : {
9575 0 : if (integer_zerop (_q41))
9576 : {
9577 0 : if (integer_zerop (_p1))
9578 : {
9579 0 : {
9580 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9581 0 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, EQ_EXPR);
9582 0 : if (res) return res;
9583 : }
9584 : }
9585 : }
9586 : }
9587 : break;
9588 : }
9589 33566 : default:;
9590 : }
9591 33566 : switch (TREE_CODE (_q20))
9592 : {
9593 8 : case NE_EXPR:
9594 8 : {
9595 8 : tree _q30 = TREE_OPERAND (_q20, 0);
9596 8 : tree _q31 = TREE_OPERAND (_q20, 1);
9597 8 : if (integer_zerop (_q31))
9598 : {
9599 0 : if ((_q21 == _q30 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q30, 0) && types_match (_q21, _q30)))
9600 : {
9601 0 : if (integer_zerop (_p1))
9602 : {
9603 0 : {
9604 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
9605 0 : tree res = generic_simplify_282 (loc, type, _p0, _p1, captures, EQ_EXPR);
9606 0 : if (res) return res;
9607 : }
9608 : }
9609 : }
9610 : }
9611 : break;
9612 : }
9613 : default:;
9614 : }
9615 : break;
9616 : }
9617 1704814 : CASE_CONVERT:
9618 1704814 : {
9619 1704814 : tree _q20 = TREE_OPERAND (_p0, 0);
9620 1704814 : switch (TREE_CODE (_q20))
9621 : {
9622 244904 : case ADDR_EXPR:
9623 244904 : {
9624 244904 : switch (TREE_CODE (_p1))
9625 : {
9626 216815 : CASE_CONVERT:
9627 216815 : {
9628 216815 : tree _q40 = TREE_OPERAND (_p1, 0);
9629 216815 : switch (TREE_CODE (_q40))
9630 : {
9631 216815 : case ADDR_EXPR:
9632 216815 : {
9633 216815 : {
9634 216815 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
9635 216815 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, EQ_EXPR);
9636 216815 : if (res) return res;
9637 : }
9638 30 : break;
9639 : }
9640 : default:;
9641 : }
9642 : break;
9643 : }
9644 20864 : case ADDR_EXPR:
9645 20864 : {
9646 20864 : {
9647 20864 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9648 20864 : tree res = generic_simplify_283 (loc, type, _p0, _p1, captures, EQ_EXPR);
9649 20864 : if (res) return res;
9650 : }
9651 7896 : break;
9652 : }
9653 : default:;
9654 : }
9655 : break;
9656 : }
9657 : default:;
9658 : }
9659 : break;
9660 : }
9661 17318 : case ADDR_EXPR:
9662 17318 : {
9663 17318 : switch (TREE_CODE (_p1))
9664 : {
9665 119 : CASE_CONVERT:
9666 119 : {
9667 119 : tree _q30 = TREE_OPERAND (_p1, 0);
9668 119 : switch (TREE_CODE (_q30))
9669 : {
9670 119 : case ADDR_EXPR:
9671 119 : {
9672 119 : {
9673 119 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
9674 119 : tree res = generic_simplify_284 (loc, type, _p0, _p1, captures, EQ_EXPR);
9675 119 : if (res) return res;
9676 : }
9677 0 : break;
9678 : }
9679 : default:;
9680 : }
9681 : break;
9682 : }
9683 14826 : case ADDR_EXPR:
9684 14826 : {
9685 14826 : {
9686 14826 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
9687 14826 : tree res = generic_simplify_284 (loc, type, _p0, _p1, captures, EQ_EXPR);
9688 14826 : if (res) return res;
9689 : }
9690 6051 : break;
9691 : }
9692 : default:;
9693 : }
9694 : break;
9695 : }
9696 27944054 : default:;
9697 : }
9698 27944054 : {
9699 27944054 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9700 27944054 : tree res = generic_simplify_285 (loc, type, _p0, _p1, captures, EQ_EXPR);
9701 27944054 : if (res) return res;
9702 : }
9703 27940935 : switch (TREE_CODE (_p0))
9704 : {
9705 1475061 : CASE_CONVERT:
9706 1475061 : {
9707 1475061 : tree _q20 = TREE_OPERAND (_p0, 0);
9708 1475061 : switch (TREE_CODE (_p1))
9709 : {
9710 242895 : case INTEGER_CST:
9711 242895 : {
9712 242895 : {
9713 242895 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9714 242895 : tree res = generic_simplify_286 (loc, type, _p0, _p1, captures, EQ_EXPR);
9715 242895 : if (res) return res;
9716 : }
9717 241524 : break;
9718 : }
9719 1473690 : default:;
9720 : }
9721 1473690 : switch (TREE_CODE (_q20))
9722 : {
9723 0 : case NE_EXPR:
9724 0 : {
9725 0 : tree _q30 = TREE_OPERAND (_q20, 0);
9726 0 : tree _q31 = TREE_OPERAND (_q20, 1);
9727 0 : switch (TREE_CODE (_q31))
9728 : {
9729 0 : case INTEGER_CST:
9730 0 : {
9731 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
9732 : {
9733 0 : {
9734 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
9735 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR);
9736 0 : if (res) return res;
9737 : }
9738 : }
9739 : break;
9740 : }
9741 : default:;
9742 : }
9743 : break;
9744 : }
9745 0 : case EQ_EXPR:
9746 0 : {
9747 0 : tree _q30 = TREE_OPERAND (_q20, 0);
9748 0 : tree _q31 = TREE_OPERAND (_q20, 1);
9749 0 : switch (TREE_CODE (_q31))
9750 : {
9751 0 : case INTEGER_CST:
9752 0 : {
9753 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
9754 : {
9755 0 : {
9756 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
9757 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9758 0 : if (res) return res;
9759 : }
9760 : }
9761 : break;
9762 : }
9763 : default:;
9764 : }
9765 : break;
9766 : }
9767 : default:;
9768 : }
9769 : break;
9770 : }
9771 27939564 : default:;
9772 : }
9773 27939564 : switch (TREE_CODE (_p1))
9774 : {
9775 881414 : CASE_CONVERT:
9776 881414 : {
9777 881414 : tree _q30 = TREE_OPERAND (_p1, 0);
9778 881414 : switch (TREE_CODE (_q30))
9779 : {
9780 0 : case NE_EXPR:
9781 0 : {
9782 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9783 0 : tree _q41 = TREE_OPERAND (_q30, 1);
9784 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
9785 : {
9786 0 : switch (TREE_CODE (_q41))
9787 : {
9788 0 : case INTEGER_CST:
9789 0 : {
9790 0 : {
9791 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
9792 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, NE_EXPR, EQ_EXPR);
9793 0 : if (res) return res;
9794 : }
9795 0 : break;
9796 : }
9797 : default:;
9798 : }
9799 : }
9800 : break;
9801 : }
9802 0 : case EQ_EXPR:
9803 0 : {
9804 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9805 0 : tree _q41 = TREE_OPERAND (_q30, 1);
9806 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
9807 : {
9808 0 : switch (TREE_CODE (_q41))
9809 : {
9810 0 : case INTEGER_CST:
9811 0 : {
9812 0 : {
9813 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
9814 0 : tree res = generic_simplify_287 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
9815 0 : if (res) return res;
9816 : }
9817 0 : break;
9818 : }
9819 : default:;
9820 : }
9821 : }
9822 : break;
9823 : }
9824 : default:;
9825 : }
9826 : break;
9827 : }
9828 27939564 : default:;
9829 : }
9830 27939564 : if (integer_onep (_p1))
9831 : {
9832 2143094 : {
9833 2143094 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9834 2143094 : if (TREE_CODE (TREE_TYPE (captures[0])) == BOOLEAN_TYPE
9835 2143094 : && types_match (type, TREE_TYPE (captures[0]))
9836 : )
9837 : {
9838 114517 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1492;
9839 114517 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1492;
9840 114517 : {
9841 114517 : tree res_op0;
9842 114517 : res_op0 = captures[0];
9843 114517 : tree _r;
9844 114517 : _r = non_lvalue_loc (loc, res_op0);
9845 114517 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 967, __FILE__, __LINE__, true);
9846 114517 : return _r;
9847 : }
9848 : next_after_fail1492:;
9849 : }
9850 : }
9851 : }
9852 27825047 : switch (TREE_CODE (_p0))
9853 : {
9854 764901 : case BIT_AND_EXPR:
9855 764901 : {
9856 764901 : tree _q20 = TREE_OPERAND (_p0, 0);
9857 764901 : tree _q21 = TREE_OPERAND (_p0, 1);
9858 764901 : switch (TREE_CODE (_q21))
9859 : {
9860 399 : case VECTOR_CST:
9861 399 : {
9862 399 : if (integer_zerop (_p1))
9863 : {
9864 393 : {
9865 393 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9866 393 : const enum tree_code cmp = EQ_EXPR;
9867 393 : const enum tree_code icmp = LE_EXPR;
9868 393 : {
9869 393 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
9870 393 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
9871 : )
9872 : {
9873 2 : {
9874 2 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
9875 2 : ? optab_vector : optab_default;
9876 2 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
9877 2 : if (target_supports_op_p (utype, icmp, optab)
9878 2 : || (optimize_vectors_before_lowering_p ()
9879 2 : && (!target_supports_op_p (type, cmp, optab)
9880 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
9881 : )
9882 : {
9883 2 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
9884 : )
9885 : {
9886 2 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1493;
9887 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1493;
9888 2 : {
9889 2 : tree res_op0;
9890 2 : res_op0 = captures[1];
9891 2 : tree res_op1;
9892 2 : res_op1 = csts;
9893 2 : tree _r;
9894 2 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
9895 2 : if (TREE_SIDE_EFFECTS (captures[2]))
9896 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9897 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 968, __FILE__, __LINE__, true);
9898 2 : return _r;
9899 : }
9900 391 : next_after_fail1493:;
9901 : }
9902 : else
9903 : {
9904 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1494;
9905 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1494;
9906 0 : {
9907 0 : tree res_op0;
9908 0 : {
9909 0 : tree _o1[1], _r1;
9910 0 : _o1[0] = captures[1];
9911 0 : if (TREE_TYPE (_o1[0]) != utype)
9912 : {
9913 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
9914 : }
9915 : else
9916 : _r1 = _o1[0];
9917 0 : res_op0 = _r1;
9918 : }
9919 0 : tree res_op1;
9920 0 : res_op1 = csts;
9921 0 : tree _r;
9922 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
9923 0 : if (TREE_SIDE_EFFECTS (captures[2]))
9924 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9925 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 969, __FILE__, __LINE__, true);
9926 0 : return _r;
9927 : }
9928 391 : next_after_fail1494:;
9929 : }
9930 : }
9931 : }
9932 : }
9933 : }
9934 : }
9935 : }
9936 : break;
9937 : }
9938 704460 : case INTEGER_CST:
9939 704460 : {
9940 704460 : if (integer_zerop (_p1))
9941 : {
9942 578076 : {
9943 578076 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9944 578076 : const enum tree_code cmp = EQ_EXPR;
9945 578076 : const enum tree_code icmp = LE_EXPR;
9946 578076 : {
9947 578076 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
9948 578076 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
9949 : )
9950 : {
9951 1046 : {
9952 1046 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
9953 1046 : ? optab_vector : optab_default;
9954 1046 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
9955 1046 : if (target_supports_op_p (utype, icmp, optab)
9956 1046 : || (optimize_vectors_before_lowering_p ()
9957 902 : && (!target_supports_op_p (type, cmp, optab)
9958 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
9959 : )
9960 : {
9961 902 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
9962 : )
9963 : {
9964 613 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1495;
9965 613 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1495;
9966 613 : {
9967 613 : tree res_op0;
9968 613 : res_op0 = captures[1];
9969 613 : tree res_op1;
9970 613 : res_op1 = csts;
9971 613 : tree _r;
9972 613 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
9973 613 : if (TREE_SIDE_EFFECTS (captures[2]))
9974 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9975 613 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 968, __FILE__, __LINE__, true);
9976 613 : return _r;
9977 : }
9978 577174 : next_after_fail1495:;
9979 : }
9980 : else
9981 : {
9982 289 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1496;
9983 289 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1496;
9984 289 : {
9985 289 : tree res_op0;
9986 289 : {
9987 289 : tree _o1[1], _r1;
9988 289 : _o1[0] = captures[1];
9989 289 : if (TREE_TYPE (_o1[0]) != utype)
9990 : {
9991 289 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
9992 : }
9993 : else
9994 : _r1 = _o1[0];
9995 289 : res_op0 = _r1;
9996 : }
9997 289 : tree res_op1;
9998 289 : res_op1 = csts;
9999 289 : tree _r;
10000 289 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10001 289 : if (TREE_SIDE_EFFECTS (captures[2]))
10002 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10003 289 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 969, __FILE__, __LINE__, true);
10004 289 : return _r;
10005 : }
10006 577174 : next_after_fail1496:;
10007 : }
10008 : }
10009 : }
10010 : }
10011 : }
10012 : }
10013 : }
10014 : break;
10015 : }
10016 763997 : default:;
10017 : }
10018 763997 : switch (TREE_CODE (_q20))
10019 : {
10020 0 : case VECTOR_CST:
10021 0 : {
10022 0 : if (integer_zerop (_p1))
10023 : {
10024 0 : {
10025 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10026 0 : const enum tree_code cmp = EQ_EXPR;
10027 0 : const enum tree_code icmp = LE_EXPR;
10028 0 : {
10029 0 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
10030 0 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
10031 : )
10032 : {
10033 0 : {
10034 0 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
10035 0 : ? optab_vector : optab_default;
10036 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
10037 0 : if (target_supports_op_p (utype, icmp, optab)
10038 0 : || (optimize_vectors_before_lowering_p ()
10039 0 : && (!target_supports_op_p (type, cmp, optab)
10040 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
10041 : )
10042 : {
10043 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
10044 : )
10045 : {
10046 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1497;
10047 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1497;
10048 0 : {
10049 0 : tree res_op0;
10050 0 : res_op0 = captures[1];
10051 0 : tree res_op1;
10052 0 : res_op1 = csts;
10053 0 : tree _r;
10054 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10055 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10056 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10057 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 968, __FILE__, __LINE__, true);
10058 0 : return _r;
10059 : }
10060 0 : next_after_fail1497:;
10061 : }
10062 : else
10063 : {
10064 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1498;
10065 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1498;
10066 0 : {
10067 0 : tree res_op0;
10068 0 : {
10069 0 : tree _o1[1], _r1;
10070 0 : _o1[0] = captures[1];
10071 0 : if (TREE_TYPE (_o1[0]) != utype)
10072 : {
10073 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
10074 : }
10075 : else
10076 : _r1 = _o1[0];
10077 0 : res_op0 = _r1;
10078 : }
10079 0 : tree res_op1;
10080 0 : res_op1 = csts;
10081 0 : tree _r;
10082 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10083 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10084 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10085 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 969, __FILE__, __LINE__, true);
10086 0 : return _r;
10087 : }
10088 0 : next_after_fail1498:;
10089 : }
10090 : }
10091 : }
10092 : }
10093 : }
10094 : }
10095 : }
10096 : break;
10097 : }
10098 0 : case INTEGER_CST:
10099 0 : {
10100 0 : if (integer_zerop (_p1))
10101 : {
10102 0 : {
10103 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10104 0 : const enum tree_code cmp = EQ_EXPR;
10105 0 : const enum tree_code icmp = LE_EXPR;
10106 0 : {
10107 0 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
10108 0 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
10109 : )
10110 : {
10111 0 : {
10112 0 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
10113 0 : ? optab_vector : optab_default;
10114 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
10115 0 : if (target_supports_op_p (utype, icmp, optab)
10116 0 : || (optimize_vectors_before_lowering_p ()
10117 0 : && (!target_supports_op_p (type, cmp, optab)
10118 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
10119 : )
10120 : {
10121 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
10122 : )
10123 : {
10124 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1499;
10125 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1499;
10126 0 : {
10127 0 : tree res_op0;
10128 0 : res_op0 = captures[1];
10129 0 : tree res_op1;
10130 0 : res_op1 = csts;
10131 0 : tree _r;
10132 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10133 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10134 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10135 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 968, __FILE__, __LINE__, true);
10136 0 : return _r;
10137 : }
10138 0 : next_after_fail1499:;
10139 : }
10140 : else
10141 : {
10142 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1500;
10143 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1500;
10144 0 : {
10145 0 : tree res_op0;
10146 0 : {
10147 0 : tree _o1[1], _r1;
10148 0 : _o1[0] = captures[1];
10149 0 : if (TREE_TYPE (_o1[0]) != utype)
10150 : {
10151 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, utype, _o1[0]);
10152 : }
10153 : else
10154 : _r1 = _o1[0];
10155 0 : res_op0 = _r1;
10156 : }
10157 0 : tree res_op1;
10158 0 : res_op1 = csts;
10159 0 : tree _r;
10160 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
10161 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10162 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10163 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 969, __FILE__, __LINE__, true);
10164 0 : return _r;
10165 : }
10166 0 : next_after_fail1500:;
10167 : }
10168 : }
10169 : }
10170 : }
10171 : }
10172 : }
10173 : }
10174 : break;
10175 : }
10176 : default:;
10177 : }
10178 : break;
10179 : }
10180 17142 : case RSHIFT_EXPR:
10181 17142 : {
10182 17142 : tree _q20 = TREE_OPERAND (_p0, 0);
10183 17142 : tree _q21 = TREE_OPERAND (_p0, 1);
10184 17142 : switch (TREE_CODE (_q20))
10185 : {
10186 1 : case MULT_EXPR:
10187 1 : {
10188 1 : tree _q30 = TREE_OPERAND (_q20, 0);
10189 1 : tree _q31 = TREE_OPERAND (_q20, 1);
10190 1 : switch (TREE_CODE (_q30))
10191 : {
10192 1 : CASE_CONVERT:
10193 1 : {
10194 1 : tree _q40 = TREE_OPERAND (_q30, 0);
10195 1 : switch (TREE_CODE (_q31))
10196 : {
10197 1 : CASE_CONVERT:
10198 1 : {
10199 1 : tree _q60 = TREE_OPERAND (_q31, 0);
10200 1 : switch (TREE_CODE (_q21))
10201 : {
10202 1 : case INTEGER_CST:
10203 1 : {
10204 1 : if (integer_zerop (_p1))
10205 : {
10206 1 : {
10207 1 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q60, _q21 };
10208 1 : tree res = generic_simplify_288 (loc, type, _p0, _p1, captures, EQ_EXPR);
10209 1 : if (res) return res;
10210 : }
10211 : }
10212 : break;
10213 : }
10214 : default:;
10215 : }
10216 : break;
10217 : }
10218 : default:;
10219 : }
10220 : break;
10221 : }
10222 : default:;
10223 : }
10224 : break;
10225 : }
10226 : default:;
10227 : }
10228 : break;
10229 : }
10230 692806 : case PLUS_EXPR:
10231 692806 : {
10232 692806 : tree _q20 = TREE_OPERAND (_p0, 0);
10233 692806 : tree _q21 = TREE_OPERAND (_p0, 1);
10234 692806 : switch (TREE_CODE (_q21))
10235 : {
10236 641919 : case INTEGER_CST:
10237 641919 : {
10238 641919 : switch (TREE_CODE (_p1))
10239 : {
10240 343075 : case INTEGER_CST:
10241 343075 : {
10242 343075 : {
10243 343075 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10244 343075 : tree res = generic_simplify_289 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, EQ_EXPR);
10245 343075 : if (res) return res;
10246 : }
10247 14 : break;
10248 : }
10249 : default:;
10250 : }
10251 : break;
10252 : }
10253 : default:;
10254 : }
10255 : break;
10256 : }
10257 94440 : case MINUS_EXPR:
10258 94440 : {
10259 94440 : tree _q20 = TREE_OPERAND (_p0, 0);
10260 94440 : tree _q21 = TREE_OPERAND (_p0, 1);
10261 94440 : switch (TREE_CODE (_q21))
10262 : {
10263 19 : case INTEGER_CST:
10264 19 : {
10265 19 : switch (TREE_CODE (_p1))
10266 : {
10267 16 : case INTEGER_CST:
10268 16 : {
10269 16 : {
10270 16 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10271 16 : tree res = generic_simplify_289 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, EQ_EXPR);
10272 16 : if (res) return res;
10273 : }
10274 16 : break;
10275 : }
10276 : default:;
10277 : }
10278 : break;
10279 : }
10280 94440 : default:;
10281 : }
10282 94440 : switch (TREE_CODE (_q20))
10283 : {
10284 37817 : case INTEGER_CST:
10285 37817 : {
10286 37817 : switch (TREE_CODE (_p1))
10287 : {
10288 36880 : case INTEGER_CST:
10289 36880 : {
10290 36880 : {
10291 36880 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10292 36880 : tree res = generic_simplify_290 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR);
10293 36880 : if (res) return res;
10294 : }
10295 0 : break;
10296 : }
10297 : default:;
10298 : }
10299 : break;
10300 : }
10301 : default:;
10302 : }
10303 : break;
10304 : }
10305 2241778 : case CALL_EXPR:
10306 2241778 : switch (get_call_combined_fn (_p0))
10307 : {
10308 19 : case CFN_BUILT_IN_CLZ:
10309 19 : if (call_expr_nargs (_p0) == 1)
10310 : {
10311 19 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10312 19 : switch (TREE_CODE (_p1))
10313 : {
10314 19 : case INTEGER_CST:
10315 19 : {
10316 19 : {
10317 19 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10318 19 : tree res = generic_simplify_291 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZ);
10319 19 : if (res) return res;
10320 : }
10321 16 : break;
10322 : }
10323 : default:;
10324 : }
10325 : }
10326 : break;
10327 17 : case CFN_BUILT_IN_CTZ:
10328 17 : if (call_expr_nargs (_p0) == 1)
10329 : {
10330 17 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10331 17 : switch (TREE_CODE (_p1))
10332 : {
10333 17 : case INTEGER_CST:
10334 17 : {
10335 17 : {
10336 17 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10337 17 : tree res = generic_simplify_293 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZ);
10338 17 : if (res) return res;
10339 : }
10340 16 : break;
10341 : }
10342 : default:;
10343 : }
10344 : }
10345 : break;
10346 4 : case CFN_BUILT_IN_FFS:
10347 4 : if (call_expr_nargs (_p0) == 1)
10348 : {
10349 4 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10350 4 : switch (TREE_CODE (_p1))
10351 : {
10352 4 : case INTEGER_CST:
10353 4 : {
10354 4 : {
10355 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10356 4 : tree res = generic_simplify_296 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFS);
10357 4 : if (res) return res;
10358 : }
10359 0 : break;
10360 : }
10361 : default:;
10362 : }
10363 : }
10364 : break;
10365 0 : case CFN_REDUC_IOR:
10366 0 : if (call_expr_nargs (_p0) == 1)
10367 : {
10368 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10369 0 : if (integer_zerop (_p1))
10370 : {
10371 0 : {
10372 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10373 0 : tree res = generic_simplify_297 (loc, type, _p0, _p1, captures, EQ_EXPR);
10374 0 : if (res) return res;
10375 : }
10376 : }
10377 : }
10378 : break;
10379 0 : case CFN_BUILT_IN_FFSIMAX:
10380 0 : if (call_expr_nargs (_p0) == 1)
10381 : {
10382 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10383 0 : switch (TREE_CODE (_p1))
10384 : {
10385 0 : case INTEGER_CST:
10386 0 : {
10387 0 : {
10388 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10389 0 : tree res = generic_simplify_296 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFSIMAX);
10390 0 : if (res) return res;
10391 : }
10392 0 : break;
10393 : }
10394 : default:;
10395 : }
10396 : }
10397 : break;
10398 15 : case CFN_BUILT_IN_POPCOUNT:
10399 15 : if (call_expr_nargs (_p0) == 1)
10400 : {
10401 15 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10402 15 : if (integer_zerop (_p1))
10403 : {
10404 1 : {
10405 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10406 1 : tree res = generic_simplify_295 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNT);
10407 1 : if (res) return res;
10408 : }
10409 : }
10410 : }
10411 : break;
10412 0 : case CFN_BUILT_IN_CLZL:
10413 0 : if (call_expr_nargs (_p0) == 1)
10414 : {
10415 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10416 0 : switch (TREE_CODE (_p1))
10417 : {
10418 0 : case INTEGER_CST:
10419 0 : {
10420 0 : {
10421 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10422 0 : tree res = generic_simplify_291 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZL);
10423 0 : if (res) return res;
10424 : }
10425 0 : break;
10426 : }
10427 : default:;
10428 : }
10429 : }
10430 : break;
10431 16 : case CFN_BUILT_IN_CTZL:
10432 16 : if (call_expr_nargs (_p0) == 1)
10433 : {
10434 16 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10435 16 : switch (TREE_CODE (_p1))
10436 : {
10437 16 : case INTEGER_CST:
10438 16 : {
10439 16 : {
10440 16 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10441 16 : tree res = generic_simplify_293 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZL);
10442 16 : if (res) return res;
10443 : }
10444 16 : break;
10445 : }
10446 : default:;
10447 : }
10448 : }
10449 : break;
10450 1 : case CFN_BUILT_IN_FFSL:
10451 1 : if (call_expr_nargs (_p0) == 1)
10452 : {
10453 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10454 1 : switch (TREE_CODE (_p1))
10455 : {
10456 1 : case INTEGER_CST:
10457 1 : {
10458 1 : {
10459 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10460 1 : tree res = generic_simplify_296 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFSL);
10461 1 : if (res) return res;
10462 : }
10463 0 : break;
10464 : }
10465 : default:;
10466 : }
10467 : }
10468 : break;
10469 7 : case CFN_BUILT_IN_POPCOUNTLL:
10470 7 : if (call_expr_nargs (_p0) == 1)
10471 : {
10472 7 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10473 7 : if (integer_zerop (_p1))
10474 : {
10475 1 : {
10476 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10477 1 : tree res = generic_simplify_295 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTLL);
10478 1 : if (res) return res;
10479 : }
10480 : }
10481 : }
10482 : break;
10483 0 : case CFN_BUILT_IN_CTZIMAX:
10484 0 : if (call_expr_nargs (_p0) == 1)
10485 : {
10486 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10487 0 : switch (TREE_CODE (_p1))
10488 : {
10489 0 : case INTEGER_CST:
10490 0 : {
10491 0 : {
10492 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10493 0 : tree res = generic_simplify_293 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZIMAX);
10494 0 : if (res) return res;
10495 : }
10496 0 : break;
10497 : }
10498 : default:;
10499 : }
10500 : }
10501 : break;
10502 0 : case CFN_POPCOUNT:
10503 0 : if (call_expr_nargs (_p0) == 1)
10504 : {
10505 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10506 0 : if (integer_zerop (_p1))
10507 : {
10508 0 : {
10509 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10510 0 : tree res = generic_simplify_295 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_POPCOUNT);
10511 0 : if (res) return res;
10512 : }
10513 : }
10514 : }
10515 : break;
10516 0 : case CFN_CLZ:
10517 0 : if (call_expr_nargs (_p0) == 1)
10518 : {
10519 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10520 0 : switch (TREE_CODE (_p1))
10521 : {
10522 0 : case INTEGER_CST:
10523 0 : {
10524 0 : {
10525 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10526 0 : tree res = generic_simplify_291 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_CLZ);
10527 0 : if (res) return res;
10528 : }
10529 0 : break;
10530 : }
10531 : default:;
10532 : }
10533 : }
10534 0 : if (call_expr_nargs (_p0) == 2)
10535 : {
10536 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10537 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
10538 0 : switch (TREE_CODE (_p1))
10539 : {
10540 0 : case INTEGER_CST:
10541 0 : {
10542 0 : {
10543 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10544 0 : tree res = generic_simplify_292 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR);
10545 0 : if (res) return res;
10546 : }
10547 0 : break;
10548 : }
10549 : default:;
10550 : }
10551 : }
10552 : break;
10553 0 : case CFN_CTZ:
10554 0 : if (call_expr_nargs (_p0) == 1)
10555 : {
10556 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10557 0 : switch (TREE_CODE (_p1))
10558 : {
10559 0 : case INTEGER_CST:
10560 0 : {
10561 0 : {
10562 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10563 0 : tree res = generic_simplify_293 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_CTZ);
10564 0 : if (res) return res;
10565 : }
10566 0 : break;
10567 : }
10568 : default:;
10569 : }
10570 : }
10571 0 : if (call_expr_nargs (_p0) == 2)
10572 : {
10573 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10574 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
10575 0 : switch (TREE_CODE (_p1))
10576 : {
10577 0 : case INTEGER_CST:
10578 0 : {
10579 0 : {
10580 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10581 0 : tree res = generic_simplify_294 (loc, type, _p0, _p1, captures, EQ_EXPR);
10582 0 : if (res) return res;
10583 : }
10584 0 : break;
10585 : }
10586 : default:;
10587 : }
10588 : }
10589 : break;
10590 0 : case CFN_FFS:
10591 0 : if (call_expr_nargs (_p0) == 1)
10592 : {
10593 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10594 0 : switch (TREE_CODE (_p1))
10595 : {
10596 0 : case INTEGER_CST:
10597 0 : {
10598 0 : {
10599 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10600 0 : tree res = generic_simplify_296 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_FFS);
10601 0 : if (res) return res;
10602 : }
10603 0 : break;
10604 : }
10605 : default:;
10606 : }
10607 : }
10608 : break;
10609 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
10610 0 : if (call_expr_nargs (_p0) == 1)
10611 : {
10612 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10613 0 : if (integer_zerop (_p1))
10614 : {
10615 0 : {
10616 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10617 0 : tree res = generic_simplify_295 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
10618 0 : if (res) return res;
10619 : }
10620 : }
10621 : }
10622 : break;
10623 0 : case CFN_BUILT_IN_CLZIMAX:
10624 0 : if (call_expr_nargs (_p0) == 1)
10625 : {
10626 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10627 0 : switch (TREE_CODE (_p1))
10628 : {
10629 0 : case INTEGER_CST:
10630 0 : {
10631 0 : {
10632 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10633 0 : tree res = generic_simplify_291 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZIMAX);
10634 0 : if (res) return res;
10635 : }
10636 0 : break;
10637 : }
10638 : default:;
10639 : }
10640 : }
10641 : break;
10642 7 : case CFN_BUILT_IN_POPCOUNTL:
10643 7 : if (call_expr_nargs (_p0) == 1)
10644 : {
10645 7 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10646 7 : if (integer_zerop (_p1))
10647 : {
10648 1 : {
10649 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10650 1 : tree res = generic_simplify_295 (loc, type, _p0, _p1, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTL);
10651 1 : if (res) return res;
10652 : }
10653 : }
10654 : }
10655 : break;
10656 16 : case CFN_BUILT_IN_CLZLL:
10657 16 : if (call_expr_nargs (_p0) == 1)
10658 : {
10659 16 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10660 16 : switch (TREE_CODE (_p1))
10661 : {
10662 16 : case INTEGER_CST:
10663 16 : {
10664 16 : {
10665 16 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10666 16 : tree res = generic_simplify_291 (loc, type, _p0, _p1, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZLL);
10667 16 : if (res) return res;
10668 : }
10669 16 : break;
10670 : }
10671 : default:;
10672 : }
10673 : }
10674 : break;
10675 0 : case CFN_BUILT_IN_CTZLL:
10676 0 : if (call_expr_nargs (_p0) == 1)
10677 : {
10678 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10679 0 : switch (TREE_CODE (_p1))
10680 : {
10681 0 : case INTEGER_CST:
10682 0 : {
10683 0 : {
10684 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10685 0 : tree res = generic_simplify_293 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_CTZLL);
10686 0 : if (res) return res;
10687 : }
10688 0 : break;
10689 : }
10690 : default:;
10691 : }
10692 : }
10693 : break;
10694 0 : case CFN_BUILT_IN_FFSLL:
10695 0 : if (call_expr_nargs (_p0) == 1)
10696 : {
10697 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10698 0 : switch (TREE_CODE (_p1))
10699 : {
10700 0 : case INTEGER_CST:
10701 0 : {
10702 0 : {
10703 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10704 0 : tree res = generic_simplify_296 (loc, type, _p0, _p1, captures, EQ_EXPR, CFN_BUILT_IN_FFSLL);
10705 0 : if (res) return res;
10706 : }
10707 0 : break;
10708 : }
10709 : default:;
10710 : }
10711 : }
10712 : break;
10713 : default:;
10714 : }
10715 : break;
10716 : default:;
10717 : }
10718 : return NULL_TREE;
10719 : }
10720 :
10721 : tree
10722 403773 : generic_simplify_UNGE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10723 : {
10724 403773 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10725 403773 : switch (TREE_CODE (_p0))
10726 : {
10727 0 : case VEC_COND_EXPR:
10728 0 : {
10729 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10730 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10731 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10732 0 : switch (TREE_CODE (_p1))
10733 : {
10734 0 : case VEC_COND_EXPR:
10735 0 : {
10736 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10737 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10738 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10739 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10740 : {
10741 0 : {
10742 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10743 0 : if (VECTOR_TYPE_P (type)
10744 0 : && (TREE_CODE_CLASS (UNGE_EXPR) != tcc_comparison
10745 0 : || types_match (type, TREE_TYPE (captures[2]))
10746 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10747 : || (optimize_vectors_before_lowering_p ()
10748 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10749 : )
10750 : {
10751 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1756;
10752 0 : {
10753 0 : tree res_op0;
10754 0 : res_op0 = captures[1];
10755 0 : tree res_op1;
10756 0 : {
10757 0 : tree _o1[2], _r1;
10758 0 : _o1[0] = captures[2];
10759 0 : _o1[1] = captures[5];
10760 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10761 0 : if (EXPR_P (_r1))
10762 0 : goto next_after_fail1756;
10763 0 : res_op1 = _r1;
10764 : }
10765 0 : tree res_op2;
10766 0 : {
10767 0 : tree _o1[2], _r1;
10768 0 : _o1[0] = captures[3];
10769 0 : _o1[1] = captures[6];
10770 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10771 0 : if (EXPR_P (_r1))
10772 0 : goto next_after_fail1756;
10773 0 : res_op2 = _r1;
10774 : }
10775 0 : tree _r;
10776 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10777 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 876, __FILE__, __LINE__, true);
10778 0 : return _r;
10779 : }
10780 0 : next_after_fail1756:;
10781 : }
10782 : }
10783 : }
10784 : break;
10785 : }
10786 0 : default:;
10787 : }
10788 0 : {
10789 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10790 0 : if (VECTOR_TYPE_P (type)
10791 0 : && (TREE_CODE_CLASS (UNGE_EXPR) != tcc_comparison
10792 0 : || types_match (type, TREE_TYPE (captures[2]))
10793 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10794 : || (optimize_vectors_before_lowering_p ()
10795 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10796 : )
10797 : {
10798 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1757;
10799 0 : {
10800 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1757;
10801 0 : tree res_op0;
10802 0 : res_op0 = captures[1];
10803 0 : tree res_op1;
10804 0 : {
10805 0 : tree _o1[2], _r1;
10806 0 : _o1[0] = captures[2];
10807 0 : _o1[1] = unshare_expr (captures[4]);
10808 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10809 0 : if (EXPR_P (_r1))
10810 0 : goto next_after_fail1757;
10811 0 : res_op1 = _r1;
10812 : }
10813 0 : tree res_op2;
10814 0 : {
10815 0 : tree _o1[2], _r1;
10816 0 : _o1[0] = captures[3];
10817 0 : _o1[1] = captures[4];
10818 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10819 0 : if (EXPR_P (_r1))
10820 0 : goto next_after_fail1757;
10821 0 : res_op2 = _r1;
10822 : }
10823 0 : tree _r;
10824 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10825 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 877, __FILE__, __LINE__, true);
10826 0 : return _r;
10827 : }
10828 0 : next_after_fail1757:;
10829 : }
10830 : }
10831 0 : break;
10832 : }
10833 403773 : default:;
10834 : }
10835 403773 : switch (TREE_CODE (_p1))
10836 : {
10837 0 : case VEC_COND_EXPR:
10838 0 : {
10839 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10840 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10841 0 : tree _q32 = TREE_OPERAND (_p1, 2);
10842 0 : {
10843 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10844 0 : if (VECTOR_TYPE_P (type)
10845 0 : && (TREE_CODE_CLASS (UNGE_EXPR) != tcc_comparison
10846 0 : || types_match (type, TREE_TYPE (captures[3]))
10847 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10848 : || (optimize_vectors_before_lowering_p ()
10849 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10850 : )
10851 : {
10852 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1758;
10853 0 : {
10854 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1758;
10855 0 : tree res_op0;
10856 0 : res_op0 = captures[2];
10857 0 : tree res_op1;
10858 0 : {
10859 0 : tree _o1[2], _r1;
10860 0 : _o1[0] = unshare_expr (captures[0]);
10861 0 : _o1[1] = captures[3];
10862 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10863 0 : if (EXPR_P (_r1))
10864 0 : goto next_after_fail1758;
10865 0 : res_op1 = _r1;
10866 : }
10867 0 : tree res_op2;
10868 0 : {
10869 0 : tree _o1[2], _r1;
10870 0 : _o1[0] = captures[0];
10871 0 : _o1[1] = captures[4];
10872 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10873 0 : if (EXPR_P (_r1))
10874 0 : goto next_after_fail1758;
10875 0 : res_op2 = _r1;
10876 : }
10877 0 : tree _r;
10878 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10879 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 878, __FILE__, __LINE__, true);
10880 0 : return _r;
10881 : }
10882 0 : next_after_fail1758:;
10883 : }
10884 : }
10885 0 : break;
10886 : }
10887 403773 : default:;
10888 : }
10889 403773 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10890 : {
10891 30 : {
10892 30 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10893 30 : tree res = generic_simplify_551 (loc, type, _p0, _p1, captures, UNGE_EXPR);
10894 30 : if (res) return res;
10895 : }
10896 : }
10897 403743 : switch (TREE_CODE (_p0))
10898 : {
10899 275 : case FLOAT_EXPR:
10900 275 : {
10901 275 : tree _q20 = TREE_OPERAND (_p0, 0);
10902 275 : switch (TREE_CODE (_p1))
10903 : {
10904 0 : case FLOAT_EXPR:
10905 0 : {
10906 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10907 0 : {
10908 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
10909 0 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, UNGE_EXPR, GE_EXPR);
10910 0 : if (res) return res;
10911 : }
10912 0 : break;
10913 : }
10914 : default:;
10915 : }
10916 : break;
10917 : }
10918 112 : case NEGATE_EXPR:
10919 112 : {
10920 112 : tree _q20 = TREE_OPERAND (_p0, 0);
10921 112 : switch (TREE_CODE (_p1))
10922 : {
10923 0 : case NEGATE_EXPR:
10924 0 : {
10925 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10926 0 : {
10927 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
10928 0 : tree res = generic_simplify_262 (loc, type, _p0, _p1, captures, UNGE_EXPR, UNLE_EXPR);
10929 0 : if (res) return res;
10930 : }
10931 0 : break;
10932 : }
10933 112 : default:;
10934 : }
10935 112 : if (CONSTANT_CLASS_P (_p1))
10936 : {
10937 112 : {
10938 112 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
10939 112 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, UNGE_EXPR, UNLE_EXPR);
10940 112 : if (res) return res;
10941 : }
10942 : }
10943 : break;
10944 : }
10945 403631 : default:;
10946 : }
10947 403631 : switch (TREE_CODE (_p1))
10948 : {
10949 53810 : case REAL_CST:
10950 53810 : {
10951 53810 : {
10952 53810 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10953 53810 : tree res = generic_simplify_549 (loc, type, _p0, _p1, captures, UNGE_EXPR);
10954 53810 : if (res) return res;
10955 : }
10956 53808 : break;
10957 : }
10958 : default:;
10959 : }
10960 : return NULL_TREE;
10961 : }
10962 :
10963 : tree
10964 658707327 : generic_simplify (location_t loc, enum tree_code code, const tree type ATTRIBUTE_UNUSED, tree _p0, tree _p1)
10965 : {
10966 658707327 : switch (code)
10967 : {
10968 98205673 : case PLUS_EXPR:
10969 98205673 : return generic_simplify_PLUS_EXPR (loc, code, type, _p0, _p1);
10970 60059973 : case POINTER_PLUS_EXPR:
10971 60059973 : return generic_simplify_POINTER_PLUS_EXPR (loc, code, type, _p0, _p1);
10972 33716408 : case MINUS_EXPR:
10973 33716408 : return generic_simplify_MINUS_EXPR (loc, code, type, _p0, _p1);
10974 2231495 : case BIT_IOR_EXPR:
10975 2231495 : return generic_simplify_BIT_IOR_EXPR (loc, code, type, _p0, _p1);
10976 980029 : case BIT_XOR_EXPR:
10977 980029 : return generic_simplify_BIT_XOR_EXPR (loc, code, type, _p0, _p1);
10978 4066643 : case POINTER_DIFF_EXPR:
10979 4066643 : return generic_simplify_POINTER_DIFF_EXPR (loc, code, type, _p0, _p1);
10980 72644700 : case MULT_EXPR:
10981 72644700 : return generic_simplify_MULT_EXPR (loc, code, type, _p0, _p1);
10982 33564122 : case EQ_EXPR:
10983 33564122 : return generic_simplify_EQ_EXPR (loc, code, type, _p0, _p1);
10984 40891298 : case NE_EXPR:
10985 40891298 : return generic_simplify_NE_EXPR (loc, code, type, _p0, _p1);
10986 2368812 : case TRUNC_DIV_EXPR:
10987 2368812 : return generic_simplify_TRUNC_DIV_EXPR (loc, code, type, _p0, _p1);
10988 6916 : case CEIL_DIV_EXPR:
10989 6916 : return generic_simplify_CEIL_DIV_EXPR (loc, code, type, _p0, _p1);
10990 2252885 : case FLOOR_DIV_EXPR:
10991 2252885 : return generic_simplify_FLOOR_DIV_EXPR (loc, code, type, _p0, _p1);
10992 0 : case ROUND_DIV_EXPR:
10993 0 : return generic_simplify_ROUND_DIV_EXPR (loc, code, type, _p0, _p1);
10994 4435268 : case EXACT_DIV_EXPR:
10995 4435268 : return generic_simplify_EXACT_DIV_EXPR (loc, code, type, _p0, _p1);
10996 882907 : case FLOOR_MOD_EXPR:
10997 882907 : return generic_simplify_FLOOR_MOD_EXPR (loc, code, type, _p0, _p1);
10998 6163186 : case RDIV_EXPR:
10999 6163186 : return generic_simplify_RDIV_EXPR (loc, code, type, _p0, _p1);
11000 18463820 : case LT_EXPR:
11001 18463820 : return generic_simplify_LT_EXPR (loc, code, type, _p0, _p1);
11002 10375479 : case LE_EXPR:
11003 10375479 : return generic_simplify_LE_EXPR (loc, code, type, _p0, _p1);
11004 20915489 : case GT_EXPR:
11005 20915489 : return generic_simplify_GT_EXPR (loc, code, type, _p0, _p1);
11006 7249348 : case GE_EXPR:
11007 7249348 : return generic_simplify_GE_EXPR (loc, code, type, _p0, _p1);
11008 4068 : case CEIL_MOD_EXPR:
11009 4068 : return generic_simplify_CEIL_MOD_EXPR (loc, code, type, _p0, _p1);
11010 0 : case ROUND_MOD_EXPR:
11011 0 : return generic_simplify_ROUND_MOD_EXPR (loc, code, type, _p0, _p1);
11012 2072741 : case TRUNC_MOD_EXPR:
11013 2072741 : return generic_simplify_TRUNC_MOD_EXPR (loc, code, type, _p0, _p1);
11014 1386532 : case LSHIFT_EXPR:
11015 1386532 : return generic_simplify_LSHIFT_EXPR (loc, code, type, _p0, _p1);
11016 1259629 : case RSHIFT_EXPR:
11017 1259629 : return generic_simplify_RSHIFT_EXPR (loc, code, type, _p0, _p1);
11018 9511063 : case BIT_AND_EXPR:
11019 9511063 : return generic_simplify_BIT_AND_EXPR (loc, code, type, _p0, _p1);
11020 82721 : case MIN_EXPR:
11021 82721 : return generic_simplify_MIN_EXPR (loc, code, type, _p0, _p1);
11022 378820 : case MAX_EXPR:
11023 378820 : return generic_simplify_MAX_EXPR (loc, code, type, _p0, _p1);
11024 1908 : case LROTATE_EXPR:
11025 1908 : return generic_simplify_LROTATE_EXPR (loc, code, type, _p0, _p1);
11026 2784 : case RROTATE_EXPR:
11027 2784 : return generic_simplify_RROTATE_EXPR (loc, code, type, _p0, _p1);
11028 555114 : case COMPLEX_EXPR:
11029 555114 : return generic_simplify_COMPLEX_EXPR (loc, code, type, _p0, _p1);
11030 730895 : case UNORDERED_EXPR:
11031 730895 : return generic_simplify_UNORDERED_EXPR (loc, code, type, _p0, _p1);
11032 190995 : case ORDERED_EXPR:
11033 190995 : return generic_simplify_ORDERED_EXPR (loc, code, type, _p0, _p1);
11034 695569 : case UNLT_EXPR:
11035 695569 : return generic_simplify_UNLT_EXPR (loc, code, type, _p0, _p1);
11036 839503 : case UNLE_EXPR:
11037 839503 : return generic_simplify_UNLE_EXPR (loc, code, type, _p0, _p1);
11038 2845078 : case UNGT_EXPR:
11039 2845078 : return generic_simplify_UNGT_EXPR (loc, code, type, _p0, _p1);
11040 403773 : case UNGE_EXPR:
11041 403773 : return generic_simplify_UNGE_EXPR (loc, code, type, _p0, _p1);
11042 346227 : case UNEQ_EXPR:
11043 346227 : return generic_simplify_UNEQ_EXPR (loc, code, type, _p0, _p1);
11044 87 : case LTGT_EXPR:
11045 87 : return generic_simplify_LTGT_EXPR (loc, code, type, _p0, _p1);
11046 3951935 : case TRUTH_ORIF_EXPR:
11047 3951935 : return generic_simplify_TRUTH_ORIF_EXPR (loc, code, type, _p0, _p1);
11048 9406301 : case TRUTH_OR_EXPR:
11049 9406301 : return generic_simplify_TRUTH_OR_EXPR (loc, code, type, _p0, _p1);
11050 : default:;
11051 : }
11052 : return NULL_TREE;
11053 : }
11054 :
11055 : tree
11056 14647 : generic_simplify_BIT_INSERT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
11057 : {
11058 14647 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11059 14647 : switch (TREE_CODE (_p1))
11060 : {
11061 0 : case BIT_FIELD_REF:
11062 0 : {
11063 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11064 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11065 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11066 0 : {
11067 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
11068 0 : if (VECTOR_TYPE_P (type)
11069 0 : && (VECTOR_MODE_P (TYPE_MODE (type))
11070 : || optimize_vectors_before_lowering_p ())
11071 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
11072 0 : TYPE_SIZE (TREE_TYPE (captures[2])), 0)
11073 0 : && types_match (TREE_TYPE (TREE_TYPE (captures[0])), TREE_TYPE (captures[1]))
11074 0 : && TYPE_VECTOR_SUBPARTS (type).is_constant ()
11075 0 : && multiple_p (wi::to_poly_offset (captures[4]),
11076 0 : wi::to_poly_offset (TYPE_SIZE (TREE_TYPE (type))))
11077 : )
11078 : {
11079 0 : {
11080 0 : unsigned HOST_WIDE_INT elsz
11081 0 : = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))));
11082 0 : poly_uint64 relt = exact_div (tree_to_poly_uint64 (captures[4]), elsz);
11083 0 : poly_uint64 ielt = exact_div (tree_to_poly_uint64 (captures[5]), elsz);
11084 0 : unsigned nunits = TYPE_VECTOR_SUBPARTS (type).to_constant ();
11085 0 : vec_perm_builder builder;
11086 0 : builder.new_vector (nunits, nunits, 1);
11087 0 : for (unsigned i = 0; i < nunits; ++i)
11088 0 : builder.quick_push (known_eq (ielt, i) ? nunits + relt : i);
11089 0 : vec_perm_indices sel (builder, 2, nunits);
11090 0 : if (!VECTOR_MODE_P (TYPE_MODE (type))
11091 0 : || can_vec_perm_const_p (TYPE_MODE (type),
11092 0 : TYPE_MODE (type), sel, false)
11093 : )
11094 : {
11095 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1946;
11096 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1946;
11097 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1946;
11098 0 : {
11099 0 : tree res_op0;
11100 0 : res_op0 = captures[0];
11101 0 : tree res_op1;
11102 0 : {
11103 0 : tree _o1[1], _r1;
11104 0 : _o1[0] = captures[2];
11105 0 : if (TREE_TYPE (_o1[0]) != type)
11106 : {
11107 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
11108 : }
11109 : else
11110 : _r1 = _o1[0];
11111 0 : res_op1 = _r1;
11112 : }
11113 0 : tree res_op2;
11114 0 : res_op2 = vec_perm_indices_to_tree (build_vector_type (ssizetype, nunits),
11115 : sel);
11116 0 : tree _r;
11117 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11118 0 : if (TREE_SIDE_EFFECTS (captures[3]))
11119 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
11120 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1078, __FILE__, __LINE__, true);
11121 0 : return _r;
11122 : }
11123 0 : next_after_fail1946:;
11124 : }
11125 0 : }
11126 : }
11127 : }
11128 0 : break;
11129 : }
11130 : default:;
11131 : }
11132 : return NULL_TREE;
11133 : }
11134 :
11135 : tree
11136 743602 : generic_simplify_VEC_PERM_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
11137 : {
11138 743602 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11139 743602 : switch (TREE_CODE (_p0))
11140 : {
11141 0 : case PLUS_EXPR:
11142 0 : {
11143 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11144 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11145 0 : switch (TREE_CODE (_p1))
11146 : {
11147 0 : case MINUS_EXPR:
11148 0 : {
11149 0 : tree _q50 = TREE_OPERAND (_p1, 0);
11150 0 : tree _q51 = TREE_OPERAND (_p1, 1);
11151 0 : switch (TREE_CODE (_p2))
11152 : {
11153 0 : case VECTOR_CST:
11154 0 : {
11155 0 : {
11156 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51, _p2 };
11157 0 : tree res = generic_simplify_610 (loc, type, _p0, _p1, _p2, captures, PLUS_EXPR, MINUS_EXPR);
11158 0 : if (res) return res;
11159 : }
11160 0 : break;
11161 : }
11162 : default:;
11163 : }
11164 : break;
11165 : }
11166 : default:;
11167 : }
11168 : break;
11169 : }
11170 0 : case MINUS_EXPR:
11171 0 : {
11172 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11173 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11174 0 : switch (TREE_CODE (_p1))
11175 : {
11176 0 : case PLUS_EXPR:
11177 0 : {
11178 0 : tree _q50 = TREE_OPERAND (_p1, 0);
11179 0 : tree _q51 = TREE_OPERAND (_p1, 1);
11180 0 : switch (TREE_CODE (_p2))
11181 : {
11182 0 : case VECTOR_CST:
11183 0 : {
11184 0 : {
11185 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51, _p2 };
11186 0 : tree res = generic_simplify_610 (loc, type, _p0, _p1, _p2, captures, MINUS_EXPR, PLUS_EXPR);
11187 0 : if (res) return res;
11188 : }
11189 0 : break;
11190 : }
11191 : default:;
11192 : }
11193 : break;
11194 : }
11195 : default:;
11196 : }
11197 : break;
11198 : }
11199 743602 : default:;
11200 : }
11201 743602 : switch (TREE_CODE (_p2))
11202 : {
11203 732270 : case VECTOR_CST:
11204 732270 : {
11205 732270 : {
11206 732270 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
11207 732270 : {
11208 732270 : tree op0 = captures[0], op1 = captures[1], op2 = captures[2];
11209 732270 : machine_mode result_mode = TYPE_MODE (type);
11210 732270 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (op0));
11211 732270 : vec_perm_builder builder;
11212 732270 : if (tree_to_vec_perm_builder (&builder, op2)
11213 : )
11214 : {
11215 732258 : {
11216 732258 : poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (type);
11217 732258 : poly_uint64 nelts_in = TYPE_VECTOR_SUBPARTS (TREE_TYPE (op0));
11218 732258 : bool single_arg = (op0 == op1);
11219 1272140 : vec_perm_indices sel (builder, single_arg ? 1 : 2, nelts_in);
11220 732258 : if (known_eq (nelts, nelts_in) && sel.series_p (0, 1, 0, 1)
11221 : )
11222 : {
11223 1344 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1947;
11224 1344 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1947;
11225 1344 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1947;
11226 1344 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1947;
11227 1344 : {
11228 1344 : tree res_op0;
11229 1344 : res_op0 = captures[0];
11230 1344 : tree _r;
11231 1344 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11232 1344 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1079, __FILE__, __LINE__, true);
11233 1344 : return _r;
11234 : }
11235 720533 : next_after_fail1947:;
11236 : }
11237 : else
11238 : {
11239 730914 : if (known_eq (nelts, nelts_in) && sel.series_p (0, 1, nelts_in, 1)
11240 : )
11241 : {
11242 13 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1948;
11243 13 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1948;
11244 13 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1948;
11245 13 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1948;
11246 13 : {
11247 13 : tree res_op0;
11248 13 : res_op0 = captures[1];
11249 13 : tree _r;
11250 13 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11251 13 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1080, __FILE__, __LINE__, true);
11252 13 : return _r;
11253 : }
11254 720533 : next_after_fail1948:;
11255 : }
11256 : else
11257 : {
11258 730901 : {
11259 730901 : if (!single_arg)
11260 : {
11261 539201 : if (sel.all_from_input_p (0))
11262 : op1 = op0;
11263 539185 : else if (sel.all_from_input_p (1))
11264 : {
11265 31 : op0 = op1;
11266 31 : sel.rotate_inputs (1);
11267 : }
11268 539154 : else if (known_ge (poly_uint64 (sel[0]), nelts_in))
11269 : {
11270 142 : std::swap (op0, op1);
11271 142 : sel.rotate_inputs (1);
11272 : }
11273 : }
11274 730901 : gassign *def;
11275 730901 : tree cop0 = op0, cop1 = op1;
11276 730901 : if (TREE_CODE (op0) == SSA_NAME
11277 705927 : && (def = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (op0)))
11278 1402856 : && gimple_assign_rhs_code (def) == CONSTRUCTOR)
11279 5003 : cop0 = gimple_assign_rhs1 (def);
11280 730901 : if (TREE_CODE (op1) == SSA_NAME
11281 701291 : && (def = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (op1)))
11282 1399319 : && gimple_assign_rhs_code (def) == CONSTRUCTOR)
11283 10720 : cop1 = gimple_assign_rhs1 (def);
11284 730901 : tree t;
11285 730901 : if ((TREE_CODE (cop0) == VECTOR_CST
11286 708744 : || TREE_CODE (cop0) == CONSTRUCTOR)
11287 27380 : && (TREE_CODE (cop1) == VECTOR_CST
11288 16006 : || TREE_CODE (cop1) == CONSTRUCTOR)
11289 745868 : && (t = fold_vec_perm (type, cop0, cop1, sel))
11290 : )
11291 : {
11292 7941 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1949;
11293 7941 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1949;
11294 7941 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1949;
11295 7941 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1949;
11296 7941 : {
11297 7941 : tree _r;
11298 7941 : _r = t;
11299 7941 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1081, __FILE__, __LINE__, true);
11300 7941 : return _r;
11301 : }
11302 720533 : next_after_fail1949:;
11303 : }
11304 : else
11305 : {
11306 722960 : {
11307 722960 : bool changed = (op0 == op1 && !single_arg);
11308 722960 : tree ins = NULL_TREE;
11309 722960 : unsigned at = 0;
11310 722960 : if (op_mode != BLKmode
11311 715605 : && known_eq (nelts, nelts_in)
11312 1438412 : && (TREE_CODE (cop0) == VECTOR_CST
11313 700043 : || TREE_CODE (cop0) == CONSTRUCTOR
11314 696925 : || TREE_CODE (cop1) == VECTOR_CST
11315 681439 : || TREE_CODE (cop1) == CONSTRUCTOR))
11316 : {
11317 40866 : bool insert_first_p = sel.series_p (1, 1, nelts + 1, 1);
11318 40866 : if (insert_first_p)
11319 : {
11320 792 : at = 0;
11321 792 : if ((ins = fold_read_from_vector (cop0, sel[0])))
11322 115 : op0 = op1;
11323 : }
11324 792 : if (!insert_first_p || (!ins && maybe_eq (nelts, 2u)))
11325 : {
11326 40553 : unsigned int encoded_nelts = sel.encoding ().encoded_nelts ();
11327 77080 : for (at = 0; at < encoded_nelts; ++at)
11328 76975 : if (maybe_ne (sel[at], at))
11329 : break;
11330 40553 : if (at < encoded_nelts
11331 40553 : && (known_eq (at + 1, nelts)
11332 39532 : || sel.series_p (at + 1, 1, at + 1, 1)))
11333 : {
11334 1602 : if (known_lt (poly_uint64 (sel[at]), nelts))
11335 0 : ins = fold_read_from_vector (cop0, sel[at]);
11336 : else
11337 1602 : ins = fold_read_from_vector (cop1, sel[at] - nelts);
11338 : }
11339 : }
11340 : }
11341 722960 : if (!ins && sel.encoding () != builder)
11342 : {
11343 1118 : tree oldop2 = op2;
11344 1118 : if (sel.ninputs () == 2
11345 1118 : || can_vec_perm_const_p (result_mode, op_mode, sel, false))
11346 679 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel);
11347 : else
11348 : {
11349 439 : vec_perm_indices sel2 (builder, 2, nelts);
11350 439 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false))
11351 164 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel2);
11352 : else
11353 275 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel);
11354 439 : }
11355 1118 : if (!operand_equal_p (op2, oldop2, 0))
11356 954 : changed = true;
11357 : }
11358 722960 : if (ins
11359 : )
11360 : {
11361 1472 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1950;
11362 1472 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1950;
11363 1472 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1950;
11364 1472 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1950;
11365 1472 : {
11366 1472 : tree res_op0;
11367 1472 : res_op0 = op0;
11368 1472 : tree res_op1;
11369 1472 : res_op1 = ins;
11370 1472 : tree res_op2;
11371 1472 : res_op2 = bitsize_int (at * vector_element_bits (type));
11372 1472 : tree _r;
11373 1472 : _r = fold_build3_loc (loc, BIT_INSERT_EXPR, type, res_op0, res_op1, res_op2);
11374 1472 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1082, __FILE__, __LINE__, true);
11375 11725 : return _r;
11376 : }
11377 : next_after_fail1950:;
11378 : }
11379 : else
11380 : {
11381 721488 : if (changed
11382 : )
11383 : {
11384 955 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1951;
11385 955 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1951;
11386 955 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1951;
11387 955 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1951;
11388 955 : {
11389 955 : tree res_op0;
11390 955 : res_op0 = op0;
11391 955 : tree res_op1;
11392 955 : res_op1 = op1;
11393 955 : tree res_op2;
11394 955 : res_op2 = op2;
11395 955 : tree _r;
11396 955 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11397 955 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1083, __FILE__, __LINE__, true);
11398 955 : return _r;
11399 : }
11400 : next_after_fail1951:;
11401 : }
11402 : }
11403 : }
11404 : }
11405 : }
11406 : }
11407 : }
11408 732258 : }
11409 : }
11410 11725 : }
11411 : }
11412 720545 : break;
11413 : }
11414 731877 : default:;
11415 : }
11416 731877 : switch (TREE_CODE (_p0))
11417 : {
11418 0 : case VIEW_CONVERT_EXPR:
11419 0 : {
11420 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11421 0 : switch (TREE_CODE (_q20))
11422 : {
11423 0 : case VEC_PERM_EXPR:
11424 0 : {
11425 0 : tree _q30 = TREE_OPERAND (_q20, 0);
11426 0 : tree _q31 = TREE_OPERAND (_q20, 1);
11427 0 : tree _q32 = TREE_OPERAND (_q20, 2);
11428 0 : switch (TREE_CODE (_q32))
11429 : {
11430 0 : case VECTOR_CST:
11431 0 : {
11432 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11433 : {
11434 0 : switch (TREE_CODE (_p2))
11435 : {
11436 0 : case VECTOR_CST:
11437 0 : {
11438 0 : {
11439 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q32, _p2 };
11440 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
11441 : )
11442 : {
11443 0 : {
11444 0 : machine_mode result_mode = TYPE_MODE (type);
11445 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
11446 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
11447 0 : vec_perm_builder builder0;
11448 0 : vec_perm_builder builder1;
11449 0 : vec_perm_builder builder2 (nelts, nelts, 1);
11450 0 : if (tree_to_vec_perm_builder (&builder0, captures[4])
11451 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
11452 0 : && TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))
11453 0 : == TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[1])))
11454 : )
11455 : {
11456 0 : {
11457 0 : vec_perm_indices sel0 (builder0, 2, nelts);
11458 0 : vec_perm_indices sel1 (builder1, 2, nelts);
11459 0 : for (int i = 0; i < nelts; i++)
11460 0 : builder2.quick_push (sel0[sel1[i].to_constant ()]);
11461 0 : vec_perm_indices sel2 (builder2, 2, nelts);
11462 0 : tree op0 = NULL_TREE;
11463 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
11464 0 : || (single_use (captures[0])
11465 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
11466 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
11467 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
11468 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
11469 0 : if (op0
11470 : )
11471 : {
11472 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1952;
11473 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1952;
11474 0 : {
11475 0 : tree res_op0;
11476 0 : {
11477 0 : tree _o1[3], _r1;
11478 0 : _o1[0] = captures[2];
11479 0 : _o1[1] = captures[3];
11480 0 : _o1[2] = op0;
11481 0 : _r1 = fold_build3_loc (loc, VEC_PERM_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1], _o1[2]);
11482 0 : res_op0 = _r1;
11483 : }
11484 0 : tree _r;
11485 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11486 0 : if (TREE_SIDE_EFFECTS (captures[4]))
11487 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
11488 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11489 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11490 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1084, __FILE__, __LINE__, true);
11491 0 : return _r;
11492 : }
11493 0 : next_after_fail1952:;
11494 : }
11495 0 : }
11496 : }
11497 0 : }
11498 : }
11499 : }
11500 0 : break;
11501 : }
11502 : default:;
11503 : }
11504 : }
11505 : break;
11506 : }
11507 : default:;
11508 : }
11509 : break;
11510 : }
11511 : default:;
11512 : }
11513 : break;
11514 : }
11515 0 : case VEC_PERM_EXPR:
11516 0 : {
11517 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11518 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11519 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11520 0 : switch (TREE_CODE (_q22))
11521 : {
11522 0 : case VECTOR_CST:
11523 0 : {
11524 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11525 : {
11526 0 : switch (TREE_CODE (_p2))
11527 : {
11528 0 : case VECTOR_CST:
11529 0 : {
11530 0 : {
11531 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _q22, _p2 };
11532 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
11533 : )
11534 : {
11535 0 : {
11536 0 : machine_mode result_mode = TYPE_MODE (type);
11537 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
11538 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
11539 0 : vec_perm_builder builder0;
11540 0 : vec_perm_builder builder1;
11541 0 : vec_perm_builder builder2 (nelts, nelts, 1);
11542 0 : if (tree_to_vec_perm_builder (&builder0, captures[4])
11543 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
11544 0 : && TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))
11545 0 : == TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[1])))
11546 : )
11547 : {
11548 0 : {
11549 0 : vec_perm_indices sel0 (builder0, 2, nelts);
11550 0 : vec_perm_indices sel1 (builder1, 2, nelts);
11551 0 : for (int i = 0; i < nelts; i++)
11552 0 : builder2.quick_push (sel0[sel1[i].to_constant ()]);
11553 0 : vec_perm_indices sel2 (builder2, 2, nelts);
11554 0 : tree op0 = NULL_TREE;
11555 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
11556 0 : || (single_use (captures[0])
11557 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
11558 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
11559 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
11560 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
11561 0 : if (op0
11562 : )
11563 : {
11564 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1953;
11565 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1953;
11566 0 : {
11567 0 : tree res_op0;
11568 0 : {
11569 0 : tree _o1[3], _r1;
11570 0 : _o1[0] = captures[2];
11571 0 : _o1[1] = captures[3];
11572 0 : _o1[2] = op0;
11573 0 : _r1 = fold_build3_loc (loc, VEC_PERM_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1], _o1[2]);
11574 0 : res_op0 = _r1;
11575 : }
11576 0 : tree _r;
11577 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11578 0 : if (TREE_SIDE_EFFECTS (captures[4]))
11579 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
11580 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11581 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11582 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1084, __FILE__, __LINE__, true);
11583 0 : return _r;
11584 : }
11585 0 : next_after_fail1953:;
11586 : }
11587 0 : }
11588 : }
11589 0 : }
11590 : }
11591 : }
11592 0 : break;
11593 : }
11594 : default:;
11595 : }
11596 : }
11597 : break;
11598 : }
11599 : default:;
11600 : }
11601 : break;
11602 : }
11603 731877 : default:;
11604 : }
11605 731877 : if (tree_vec_same_elem_p (_p0))
11606 : {
11607 13913 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11608 : {
11609 0 : {
11610 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p2 };
11611 0 : if (types_match (type, TREE_TYPE (captures[0]))
11612 : )
11613 : {
11614 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1954;
11615 0 : {
11616 0 : tree _r;
11617 0 : _r = captures[0];
11618 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11619 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11620 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1085, __FILE__, __LINE__, true);
11621 0 : return _r;
11622 : }
11623 0 : next_after_fail1954:;
11624 : }
11625 : else
11626 : {
11627 0 : {
11628 0 : tree elem = uniform_vector_p (captures[0]);
11629 0 : if (elem
11630 : )
11631 : {
11632 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1955;
11633 0 : {
11634 0 : tree _r;
11635 0 : _r = build_vector_from_val (type, elem);
11636 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11637 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11638 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11639 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11640 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1086, __FILE__, __LINE__, true);
11641 0 : return _r;
11642 : }
11643 0 : next_after_fail1955:;
11644 : }
11645 : }
11646 : }
11647 : }
11648 : }
11649 : }
11650 731877 : switch (TREE_CODE (_p1))
11651 : {
11652 0 : case VEC_PERM_EXPR:
11653 0 : {
11654 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11655 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11656 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11657 0 : switch (TREE_CODE (_q32))
11658 : {
11659 0 : case VECTOR_CST:
11660 0 : {
11661 0 : switch (TREE_CODE (_p2))
11662 : {
11663 0 : case VECTOR_CST:
11664 0 : {
11665 0 : {
11666 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
11667 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
11668 : )
11669 : {
11670 0 : {
11671 0 : machine_mode result_mode = TYPE_MODE (type);
11672 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
11673 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
11674 0 : vec_perm_builder builder0;
11675 0 : vec_perm_builder builder1;
11676 0 : vec_perm_builder builder2 (nelts, nelts, 2);
11677 0 : if (tree_to_vec_perm_builder (&builder0, captures[4])
11678 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
11679 : )
11680 : {
11681 0 : {
11682 0 : vec_perm_indices sel0 (builder0, 2, nelts);
11683 0 : vec_perm_indices sel1 (builder1, 2, nelts);
11684 0 : bool use_1 = false, use_2 = false;
11685 0 : for (int i = 0; i < nelts; i++)
11686 : {
11687 0 : if (known_lt ((poly_uint64)sel1[i], sel1.nelts_per_input ()))
11688 0 : builder2.quick_push (sel1[i]);
11689 : else
11690 : {
11691 0 : poly_uint64 j = sel0[(sel1[i] - sel1.nelts_per_input ())
11692 0 : .to_constant ()];
11693 0 : if (known_lt (j, sel0.nelts_per_input ()))
11694 : use_1 = true;
11695 : else
11696 : {
11697 0 : use_2 = true;
11698 0 : j -= sel0.nelts_per_input ();
11699 : }
11700 0 : builder2.quick_push (j + sel1.nelts_per_input ());
11701 : }
11702 : }
11703 0 : if (use_1 ^ use_2
11704 : )
11705 : {
11706 0 : {
11707 0 : vec_perm_indices sel2 (builder2, 2, nelts);
11708 0 : tree op0 = NULL_TREE;
11709 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
11710 0 : || (single_use (captures[1])
11711 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
11712 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
11713 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
11714 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
11715 0 : if (op0
11716 : )
11717 : {
11718 0 : if (use_1
11719 : )
11720 : {
11721 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1956;
11722 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1956;
11723 0 : {
11724 0 : tree res_op0;
11725 0 : res_op0 = captures[0];
11726 0 : tree res_op1;
11727 0 : res_op1 = captures[2];
11728 0 : tree res_op2;
11729 0 : res_op2 = op0;
11730 0 : tree _r;
11731 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11732 0 : if (TREE_SIDE_EFFECTS (captures[3]))
11733 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
11734 0 : if (TREE_SIDE_EFFECTS (captures[4]))
11735 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
11736 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11737 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11738 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1087, __FILE__, __LINE__, true);
11739 0 : return _r;
11740 : }
11741 0 : next_after_fail1956:;
11742 : }
11743 : else
11744 : {
11745 0 : if (use_2
11746 : )
11747 : {
11748 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1957;
11749 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1957;
11750 0 : {
11751 0 : tree res_op0;
11752 0 : res_op0 = captures[0];
11753 0 : tree res_op1;
11754 0 : res_op1 = captures[3];
11755 0 : tree res_op2;
11756 0 : res_op2 = op0;
11757 0 : tree _r;
11758 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11759 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11760 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11761 0 : if (TREE_SIDE_EFFECTS (captures[4]))
11762 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
11763 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11764 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11765 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1088, __FILE__, __LINE__, true);
11766 0 : return _r;
11767 : }
11768 0 : next_after_fail1957:;
11769 : }
11770 : }
11771 : }
11772 0 : }
11773 : }
11774 0 : }
11775 : }
11776 0 : }
11777 : }
11778 : }
11779 0 : break;
11780 : }
11781 : default:;
11782 : }
11783 : break;
11784 : }
11785 : default:;
11786 : }
11787 : break;
11788 : }
11789 731877 : default:;
11790 : }
11791 731877 : switch (TREE_CODE (_p0))
11792 : {
11793 0 : case VEC_PERM_EXPR:
11794 0 : {
11795 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11796 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11797 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11798 0 : switch (TREE_CODE (_q22))
11799 : {
11800 0 : case VECTOR_CST:
11801 0 : {
11802 0 : switch (TREE_CODE (_p2))
11803 : {
11804 0 : case VECTOR_CST:
11805 0 : {
11806 0 : {
11807 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _p2 };
11808 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
11809 : )
11810 : {
11811 0 : {
11812 0 : machine_mode result_mode = TYPE_MODE (type);
11813 0 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[1]));
11814 0 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
11815 0 : vec_perm_builder builder0;
11816 0 : vec_perm_builder builder1;
11817 0 : vec_perm_builder builder2 (nelts, nelts, 2);
11818 0 : if (tree_to_vec_perm_builder (&builder0, captures[3])
11819 0 : && tree_to_vec_perm_builder (&builder1, captures[5])
11820 : )
11821 : {
11822 0 : {
11823 0 : vec_perm_indices sel0 (builder0, 2, nelts);
11824 0 : vec_perm_indices sel1 (builder1, 2, nelts);
11825 0 : bool use_1 = false, use_2 = false;
11826 0 : for (int i = 0; i < nelts; i++)
11827 : {
11828 0 : if (known_ge ((poly_uint64)sel1[i], sel1.nelts_per_input ()))
11829 0 : builder2.quick_push (sel1[i]);
11830 : else
11831 : {
11832 0 : poly_uint64 j = sel0[sel1[i].to_constant ()];
11833 0 : if (known_lt (j, sel0.nelts_per_input ()))
11834 : use_1 = true;
11835 : else
11836 : {
11837 0 : use_2 = true;
11838 0 : j -= sel0.nelts_per_input ();
11839 : }
11840 0 : builder2.quick_push (j);
11841 : }
11842 : }
11843 0 : if (use_1 ^ use_2
11844 : )
11845 : {
11846 0 : {
11847 0 : vec_perm_indices sel2 (builder2, 2, nelts);
11848 0 : tree op0 = NULL_TREE;
11849 0 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
11850 0 : || (single_use (captures[0])
11851 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
11852 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
11853 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
11854 0 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
11855 0 : if (op0
11856 : )
11857 : {
11858 0 : if (use_1
11859 : )
11860 : {
11861 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1958;
11862 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1958;
11863 0 : {
11864 0 : tree res_op0;
11865 0 : res_op0 = captures[1];
11866 0 : tree res_op1;
11867 0 : res_op1 = captures[4];
11868 0 : tree res_op2;
11869 0 : res_op2 = op0;
11870 0 : tree _r;
11871 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11872 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11873 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11874 0 : if (TREE_SIDE_EFFECTS (captures[3]))
11875 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
11876 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11877 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11878 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1089, __FILE__, __LINE__, true);
11879 0 : return _r;
11880 : }
11881 0 : next_after_fail1958:;
11882 : }
11883 : else
11884 : {
11885 0 : if (use_2
11886 : )
11887 : {
11888 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1959;
11889 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1959;
11890 0 : {
11891 0 : tree res_op0;
11892 0 : res_op0 = captures[2];
11893 0 : tree res_op1;
11894 0 : res_op1 = captures[4];
11895 0 : tree res_op2;
11896 0 : res_op2 = op0;
11897 0 : tree _r;
11898 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11899 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11900 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11901 0 : if (TREE_SIDE_EFFECTS (captures[3]))
11902 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
11903 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11904 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11905 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1090, __FILE__, __LINE__, true);
11906 0 : return _r;
11907 : }
11908 0 : next_after_fail1959:;
11909 : }
11910 : }
11911 : }
11912 0 : }
11913 : }
11914 0 : }
11915 : }
11916 0 : }
11917 : }
11918 : }
11919 0 : break;
11920 : }
11921 0 : default:;
11922 : }
11923 0 : switch (TREE_CODE (_p1))
11924 : {
11925 0 : case VEC_PERM_EXPR:
11926 0 : {
11927 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11928 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11929 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11930 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
11931 : {
11932 0 : switch (TREE_CODE (_q62))
11933 : {
11934 0 : case VECTOR_CST:
11935 0 : {
11936 0 : switch (TREE_CODE (_p2))
11937 : {
11938 0 : case VECTOR_CST:
11939 0 : {
11940 0 : {
11941 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60, _q61, _p2 };
11942 0 : tree res = generic_simplify_611 (loc, type, _p0, _p1, _p2, captures);
11943 0 : if (res) return res;
11944 : }
11945 0 : break;
11946 : }
11947 : default:;
11948 : }
11949 : break;
11950 : }
11951 : default:;
11952 : }
11953 : }
11954 : break;
11955 : }
11956 : default:;
11957 : }
11958 : break;
11959 : }
11960 : default:;
11961 : }
11962 : break;
11963 : }
11964 0 : case VIEW_CONVERT_EXPR:
11965 0 : {
11966 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11967 0 : switch (TREE_CODE (_q20))
11968 : {
11969 0 : case VEC_PERM_EXPR:
11970 0 : {
11971 0 : tree _q30 = TREE_OPERAND (_q20, 0);
11972 0 : tree _q31 = TREE_OPERAND (_q20, 1);
11973 0 : tree _q32 = TREE_OPERAND (_q20, 2);
11974 0 : switch (TREE_CODE (_q32))
11975 : {
11976 0 : case VECTOR_CST:
11977 0 : {
11978 0 : switch (TREE_CODE (_p1))
11979 : {
11980 0 : case VIEW_CONVERT_EXPR:
11981 0 : {
11982 0 : tree _q70 = TREE_OPERAND (_p1, 0);
11983 0 : switch (TREE_CODE (_q70))
11984 : {
11985 0 : case VEC_PERM_EXPR:
11986 0 : {
11987 0 : tree _q80 = TREE_OPERAND (_q70, 0);
11988 0 : tree _q81 = TREE_OPERAND (_q70, 1);
11989 0 : tree _q82 = TREE_OPERAND (_q70, 2);
11990 0 : if ((_q82 == _q32 && ! TREE_SIDE_EFFECTS (_q82)) || (operand_equal_p (_q82, _q32, 0) && types_match (_q82, _q32)))
11991 : {
11992 0 : switch (TREE_CODE (_q82))
11993 : {
11994 0 : case VECTOR_CST:
11995 0 : {
11996 0 : switch (TREE_CODE (_p2))
11997 : {
11998 0 : case VECTOR_CST:
11999 0 : {
12000 0 : {
12001 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q30, _q31, _q32, _q80, _q81, _p2 };
12002 0 : tree res = generic_simplify_611 (loc, type, _p0, _p1, _p2, captures);
12003 0 : if (res) return res;
12004 : }
12005 0 : break;
12006 : }
12007 : default:;
12008 : }
12009 : break;
12010 : }
12011 : default:;
12012 : }
12013 : }
12014 : break;
12015 : }
12016 : default:;
12017 : }
12018 : break;
12019 : }
12020 : default:;
12021 : }
12022 : break;
12023 : }
12024 : default:;
12025 : }
12026 : break;
12027 : }
12028 : default:;
12029 : }
12030 : break;
12031 : }
12032 : default:;
12033 : }
12034 : return NULL_TREE;
12035 : }
12036 : #pragma GCC diagnostic pop
|