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 170051290 : tree_maybe_bit_not (tree t, tree *res_ops)
11 : {
12 170051290 : const tree type = TREE_TYPE (t);
13 170051290 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 170051290 : if (TREE_SIDE_EFFECTS (t)) return false;
15 162649718 : switch (TREE_CODE (t))
16 : {
17 49498432 : case INTEGER_CST:
18 49498432 : {
19 49498432 : {
20 49498432 : tree captures[1] ATTRIBUTE_UNUSED = { t };
21 49498432 : {
22 49498432 : res_ops[0] = captures[0];
23 49498432 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 8, __FILE__, __LINE__, false);
24 : return true;
25 : }
26 : }
27 113151286 : break;
28 : }
29 113151286 : default:;
30 : }
31 113151286 : {
32 113151286 : tree t_pops[1];
33 113151286 : if (tree_bit_not_with_nop (t, t_pops))
34 : {
35 146820 : tree _p0 = t_pops[0];
36 146820 : {
37 146820 : tree captures[2] ATTRIBUTE_UNUSED = { t, _p0 };
38 146820 : {
39 146820 : res_ops[0] = captures[0];
40 146820 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 9, __FILE__, __LINE__, false);
41 146820 : return true;
42 : }
43 : }
44 : }
45 : }
46 113004466 : {
47 113004466 : tree t_pops[1];
48 113004466 : if (tree_maybe_cmp (t, t_pops))
49 : {
50 540164 : tree _p0 = t_pops[0];
51 540164 : {
52 540164 : tree captures[2] ATTRIBUTE_UNUSED = { t, _p0 };
53 540164 : {
54 540164 : res_ops[0] = captures[0];
55 540164 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 10, __FILE__, __LINE__, false);
56 540164 : return true;
57 : }
58 : }
59 : }
60 : }
61 112464302 : {
62 112464302 : tree t_pops[2];
63 112464302 : if (tree_bit_xor_cst (t, t_pops))
64 : {
65 1601 : tree _p0 = t_pops[0];
66 1601 : tree _p1 = t_pops[1];
67 1601 : {
68 1601 : tree captures[3] ATTRIBUTE_UNUSED = { t, _p0, _p1 };
69 1601 : {
70 1601 : res_ops[0] = captures[0];
71 1601 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 11, __FILE__, __LINE__, false);
72 1601 : return true;
73 : }
74 : }
75 : }
76 : }
77 112462701 : return false;
78 : }
79 :
80 : bool
81 2361 : tree_min_value (tree t)
82 : {
83 2361 : const tree type = TREE_TYPE (t);
84 2361 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
85 2361 : if (TREE_SIDE_EFFECTS (t)) return false;
86 2353 : if (uniform_integer_cst_p (t))
87 : {
88 2081 : {
89 2081 : {
90 2081 : tree int_cst = uniform_integer_cst_p (t);
91 2081 : tree inner_type = TREE_TYPE (int_cst);
92 4162 : if ((INTEGRAL_TYPE_P (inner_type)
93 17 : || POINTER_TYPE_P (inner_type))
94 4179 : && wi::eq_p (wi::to_wide (int_cst), wi::min_value (inner_type))
95 : )
96 : {
97 138 : {
98 138 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 41, __FILE__, __LINE__, false);
99 138 : return true;
100 : }
101 : }
102 : }
103 : }
104 : }
105 : return false;
106 : }
107 :
108 : tree
109 3 : generic_simplify_1 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
110 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
111 : const enum tree_code ARG_UNUSED (op))
112 : {
113 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
114 3 : if (!flag_trapping_math
115 : )
116 : {
117 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail72;
118 2 : {
119 2 : tree res_op0;
120 2 : res_op0 = captures[0];
121 2 : tree _r;
122 2 : _r = fold_build1_loc (loc, ABS_EXPR, type, res_op0);
123 2 : if (TREE_SIDE_EFFECTS (captures[1]))
124 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
125 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 49, __FILE__, __LINE__, true);
126 2 : return _r;
127 : }
128 0 : next_after_fail72:;
129 : }
130 : return NULL_TREE;
131 : }
132 :
133 : tree
134 29 : generic_simplify_8 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
135 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
136 : const enum tree_code ARG_UNUSED (bit_op))
137 : {
138 29 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
139 29 : if (bit_op == BIT_AND_EXPR
140 : )
141 : {
142 9 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail79;
143 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail79;
144 9 : {
145 9 : tree _r;
146 9 : _r = build_zero_cst (type);
147 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 56, __FILE__, __LINE__, true);
148 9 : return _r;
149 : }
150 : next_after_fail79:;
151 : }
152 : else
153 : {
154 20 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail80;
155 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail80;
156 20 : {
157 20 : tree _r;
158 20 : _r = build_minus_one_cst (type);
159 20 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 57, __FILE__, __LINE__, true);
160 20 : return _r;
161 : }
162 : next_after_fail80:;
163 : }
164 : return NULL_TREE;
165 : }
166 :
167 : tree
168 1 : generic_simplify_17 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
169 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
170 : {
171 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
172 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail92;
173 1 : {
174 1 : tree res_op0;
175 1 : res_op0 = captures[0];
176 1 : tree res_op1;
177 1 : res_op1 = captures[1];
178 1 : tree _r;
179 1 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
180 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 65, __FILE__, __LINE__, true);
181 : return _r;
182 : }
183 0 : next_after_fail92:;
184 0 : return NULL_TREE;
185 : }
186 :
187 : tree
188 510 : generic_simplify_25 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
189 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
190 : const enum tree_code ARG_UNUSED (op))
191 : {
192 510 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
193 510 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
194 510 : && tree_nop_conversion_p (type, TREE_TYPE (captures[4]))
195 1020 : && (wi::to_wide (captures[2]) & wi::to_wide (captures[5])) == 0
196 : )
197 : {
198 101 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail100;
199 101 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail100;
200 101 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail100;
201 101 : {
202 101 : tree res_op0;
203 101 : {
204 101 : tree _o1[1], _r1;
205 101 : _o1[0] = captures[0];
206 101 : if (TREE_TYPE (_o1[0]) != type)
207 : {
208 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
209 : }
210 : else
211 : _r1 = _o1[0];
212 101 : res_op0 = _r1;
213 : }
214 101 : tree res_op1;
215 101 : {
216 101 : tree _o1[1], _r1;
217 101 : _o1[0] = captures[3];
218 101 : if (TREE_TYPE (_o1[0]) != type)
219 : {
220 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
221 : }
222 : else
223 : _r1 = _o1[0];
224 101 : res_op1 = _r1;
225 : }
226 101 : tree _r;
227 101 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
228 101 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 73, __FILE__, __LINE__, true);
229 101 : return _r;
230 : }
231 : next_after_fail100:;
232 : }
233 : return NULL_TREE;
234 : }
235 :
236 : tree
237 24 : generic_simplify_38 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
238 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
239 : const enum tree_code ARG_UNUSED (op),
240 : const enum tree_code ARG_UNUSED (cmp),
241 : const enum tree_code ARG_UNUSED (icmp))
242 : {
243 24 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
244 24 : if (invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
245 : )
246 : {
247 24 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail115;
248 24 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail115;
249 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail115;
250 24 : {
251 24 : tree res_op0;
252 24 : res_op0 = captures[1];
253 24 : tree res_op1;
254 24 : res_op1 = captures[4];
255 24 : tree res_op2;
256 24 : res_op2 = captures[7];
257 24 : tree _r;
258 24 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
259 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 87, __FILE__, __LINE__, true);
260 24 : return _r;
261 : }
262 : next_after_fail115:;
263 : }
264 : return NULL_TREE;
265 : }
266 :
267 : tree
268 0 : generic_simplify_45 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
269 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
270 : const enum tree_code ARG_UNUSED (op))
271 : {
272 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
273 0 : if (INTEGRAL_TYPE_P (type)
274 0 : && tree_int_cst_sgn (captures[5]) > 0
275 0 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[4])) == 0
276 : )
277 : {
278 0 : {
279 0 : tree t = type;
280 0 : if (!TYPE_OVERFLOW_WRAPS (t))
281 0 : t = unsigned_type_for (t);
282 0 : wide_int wone = wi::one (TYPE_PRECISION (type));
283 0 : wide_int c = wi::add (wi::to_wide (captures[3]),
284 0 : wi::lshift (wone, wi::to_wide (captures[5])));
285 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail123;
286 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail123;
287 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail123;
288 0 : {
289 0 : tree res_op0;
290 0 : {
291 0 : tree _o1[2], _r1;
292 0 : {
293 0 : tree _o2[1], _r2;
294 0 : _o2[0] = captures[2];
295 0 : if (TREE_TYPE (_o2[0]) != t)
296 : {
297 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, t, _o2[0]);
298 : }
299 : else
300 : _r2 = _o2[0];
301 0 : _o1[0] = _r2;
302 : }
303 0 : _o1[1] = wide_int_to_tree (t, c);
304 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, t, _o1[0], _o1[1]);
305 0 : res_op0 = _r1;
306 : }
307 0 : tree _r;
308 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
309 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 89, __FILE__, __LINE__, true);
310 0 : return _r;
311 : }
312 0 : next_after_fail123:;
313 0 : }
314 : }
315 : return NULL_TREE;
316 : }
317 :
318 : tree
319 311 : generic_simplify_55 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
320 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
321 : const enum tree_code ARG_UNUSED (outer_op),
322 : const enum tree_code ARG_UNUSED (inner_op))
323 : {
324 311 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
325 311 : if (real_zerop (captures[2])
326 34 : && real_zerop (captures[3])
327 345 : && !HONOR_SIGN_DEPENDENT_ROUNDING (type)
328 : )
329 : {
330 10 : {
331 10 : bool inner_plus = ((inner_op == PLUS_EXPR)
332 10 : ^ REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[2])));
333 10 : bool outer_plus
334 10 : = ((outer_op == PLUS_EXPR)
335 10 : ^ REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[3])));
336 10 : if (outer_plus && !inner_plus
337 : )
338 : {
339 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail135;
340 2 : {
341 2 : tree res_op0;
342 2 : res_op0 = captures[1];
343 2 : tree res_op1;
344 2 : res_op1 = captures[3];
345 2 : tree _r;
346 2 : _r = fold_build2_loc (loc, outer_op, type, res_op0, res_op1);
347 2 : if (TREE_SIDE_EFFECTS (captures[2]))
348 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
349 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 103, __FILE__, __LINE__, true);
350 2 : return _r;
351 : }
352 0 : next_after_fail135:;
353 : }
354 : else
355 : {
356 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail136;
357 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail136;
358 8 : {
359 8 : tree _r;
360 8 : _r = captures[0];
361 8 : if (TREE_SIDE_EFFECTS (captures[3]))
362 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
363 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 104, __FILE__, __LINE__, true);
364 8 : return _r;
365 : }
366 : next_after_fail136:;
367 : }
368 : }
369 : }
370 : return NULL_TREE;
371 : }
372 :
373 : tree
374 538 : generic_simplify_69 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
375 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
376 : {
377 538 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
378 538 : if (!TYPE_SATURATING (type)
379 : )
380 : {
381 538 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
382 1076 : && !FIXED_POINT_TYPE_P (type)
383 : )
384 : {
385 538 : if (!TYPE_OVERFLOW_TRAPS (type)
386 : )
387 : {
388 538 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail158;
389 538 : {
390 538 : tree res_op0;
391 538 : res_op0 = build_all_ones_cst (TREE_TYPE (captures[0]));
392 538 : tree _r;
393 538 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
394 538 : if (TREE_SIDE_EFFECTS (captures[0]))
395 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
396 538 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 126, __FILE__, __LINE__, true);
397 538 : return _r;
398 : }
399 0 : next_after_fail158:;
400 : }
401 : }
402 : }
403 : return NULL_TREE;
404 : }
405 :
406 : tree
407 2 : generic_simplify_76 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
408 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
409 : const enum tree_code ARG_UNUSED (div),
410 : const enum tree_code ARG_UNUSED (mod))
411 : {
412 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
413 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail166;
414 2 : {
415 2 : tree _r;
416 2 : _r = captures[0];
417 2 : if (TREE_SIDE_EFFECTS (captures[1]))
418 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
419 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 134, __FILE__, __LINE__, true);
420 : return _r;
421 : }
422 0 : next_after_fail166:;
423 0 : return NULL_TREE;
424 : }
425 :
426 : tree
427 18779 : generic_simplify_79 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
428 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
429 : const enum tree_code ARG_UNUSED (op))
430 : {
431 18779 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
432 18779 : if (flag_unsafe_math_optimizations
433 : )
434 : {
435 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail170;
436 12 : {
437 12 : tree res_op0;
438 12 : {
439 12 : tree _o1[2], _r1;
440 12 : _o1[0] = captures[0];
441 12 : _o1[1] = captures[2];
442 12 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
443 12 : res_op0 = _r1;
444 : }
445 12 : tree res_op1;
446 12 : res_op1 = captures[1];
447 12 : tree _r;
448 12 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
449 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 138, __FILE__, __LINE__, true);
450 12 : return _r;
451 : }
452 0 : next_after_fail170:;
453 : }
454 : return NULL_TREE;
455 : }
456 :
457 : tree
458 0 : generic_simplify_85 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
459 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
460 : const enum tree_code ARG_UNUSED (op))
461 : {
462 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
463 0 : if (VECTOR_FLOAT_TYPE_P (type)
464 0 : && TYPE_VECTOR_SUBPARTS (type).is_constant ()
465 : )
466 : {
467 0 : {
468 0 : tree perm_cst = captures[1];
469 0 : vec_perm_builder builder;
470 0 : bool full_perm_p = false;
471 0 : if (tree_to_vec_perm_builder (&builder, perm_cst))
472 : {
473 0 : unsigned HOST_WIDE_INT nelts;
474 0 : nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
475 0 : vec_perm_indices sel (builder, 1, nelts);
476 0 : if (sel.encoding ().encoded_full_vector_p ())
477 : {
478 0 : auto_sbitmap seen (nelts);
479 0 : bitmap_clear (seen);
480 0 : unsigned HOST_WIDE_INT count = 0, i;
481 0 : for (i = 0; i < nelts; i++)
482 : {
483 0 : if (!bitmap_set_bit (seen, sel[i].to_constant ()))
484 : break;
485 0 : count++;
486 : }
487 0 : full_perm_p = count == nelts;
488 0 : }
489 0 : }
490 0 : if (full_perm_p
491 : )
492 : {
493 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail176;
494 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail176;
495 0 : {
496 0 : tree res_op0;
497 0 : {
498 0 : tree _o1[2], _r1;
499 0 : _o1[0] = captures[0];
500 0 : _o1[1] = captures[2];
501 0 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
502 0 : captures[3] = _r1;
503 : }
504 0 : res_op0 = unshare_expr (captures[3]);
505 0 : tree res_op1;
506 0 : res_op1 = captures[3];
507 0 : tree res_op2;
508 0 : res_op2 = captures[1];
509 0 : tree _r;
510 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
511 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 144, __FILE__, __LINE__, true);
512 0 : return _r;
513 : }
514 0 : next_after_fail176:;
515 : }
516 0 : }
517 : }
518 : return NULL_TREE;
519 : }
520 :
521 : tree
522 38800 : generic_simplify_98 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
523 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
524 : {
525 38800 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
526 38800 : if (!TYPE_SATURATING (type)
527 : )
528 : {
529 38800 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
530 77600 : && !FIXED_POINT_TYPE_P (type)
531 : )
532 : {
533 0 : if (!ANY_INTEGRAL_TYPE_P (type)
534 38800 : || TYPE_OVERFLOW_WRAPS (type)
535 : )
536 : {
537 34751 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail190;
538 34751 : {
539 34751 : tree res_op0;
540 34751 : {
541 34751 : tree _o1[1], _r1;
542 34751 : _o1[0] = captures[1];
543 34751 : if (TREE_TYPE (_o1[0]) != type)
544 : {
545 208 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
546 : }
547 : else
548 : _r1 = _o1[0];
549 34751 : res_op0 = _r1;
550 : }
551 34751 : tree _r;
552 34751 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
553 34751 : if (TREE_SIDE_EFFECTS (captures[0]))
554 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
555 34751 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 157, __FILE__, __LINE__, true);
556 34751 : return _r;
557 : }
558 0 : next_after_fail190:;
559 : }
560 : else
561 : {
562 4049 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail191;
563 4049 : {
564 4049 : tree res_op0;
565 4049 : {
566 4049 : tree _o1[1], _r1;
567 4049 : _o1[0] = captures[1];
568 4049 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
569 4049 : res_op0 = _r1;
570 : }
571 4049 : tree _r;
572 4049 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
573 4049 : if (TREE_SIDE_EFFECTS (captures[0]))
574 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
575 4049 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 158, __FILE__, __LINE__, true);
576 4049 : return _r;
577 : }
578 0 : next_after_fail191:;
579 : }
580 : }
581 : }
582 : return NULL_TREE;
583 : }
584 :
585 : tree
586 178 : generic_simplify_111 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
587 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
588 : const enum tree_code ARG_UNUSED (bitop),
589 : const enum tree_code ARG_UNUSED (result),
590 : const enum tree_code ARG_UNUSED (rresult))
591 : {
592 178 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
593 178 : if (INTEGRAL_TYPE_P (type)
594 178 : && !TYPE_UNSIGNED (type)
595 356 : && wi::eq_p (wi::to_wide (captures[1]), TYPE_PRECISION (type) - 1)
596 : )
597 : {
598 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail208;
599 0 : {
600 0 : tree res_op0;
601 0 : res_op0 = captures[0];
602 0 : tree res_op1;
603 0 : res_op1 = build_int_cst (type, bitop == BIT_IOR_EXPR ? -1 : 0);
604 0 : tree _r;
605 0 : _r = fold_build2_loc (loc, result, type, res_op0, res_op1);
606 0 : if (TREE_SIDE_EFFECTS (captures[1]))
607 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
608 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 175, __FILE__, __LINE__, true);
609 0 : return _r;
610 : }
611 0 : next_after_fail208:;
612 : }
613 : return NULL_TREE;
614 : }
615 :
616 : tree
617 0 : generic_simplify_117 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
618 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
619 : {
620 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
621 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail214;
622 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail214;
623 0 : {
624 0 : tree _r;
625 0 : _r = captures[2];
626 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 179, __FILE__, __LINE__, true);
627 : return _r;
628 : }
629 : next_after_fail214:;
630 : return NULL_TREE;
631 : }
632 :
633 : tree
634 0 : generic_simplify_122 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
635 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
636 : const enum tree_code ARG_UNUSED (op))
637 : {
638 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
639 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail219;
640 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail219;
641 0 : {
642 0 : tree _r;
643 0 : _r = captures[0];
644 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 183, __FILE__, __LINE__, true);
645 : return _r;
646 : }
647 : next_after_fail219:;
648 : return NULL_TREE;
649 : }
650 :
651 : tree
652 1 : generic_simplify_131 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
653 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
654 : {
655 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
656 1 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail228;
657 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail228;
658 1 : {
659 1 : tree _r;
660 1 : _r = captures[0];
661 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 190, __FILE__, __LINE__, true);
662 : return _r;
663 : }
664 : next_after_fail228:;
665 : return NULL_TREE;
666 : }
667 :
668 : tree
669 0 : generic_simplify_138 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
670 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
671 : const enum tree_code ARG_UNUSED (op))
672 : {
673 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
674 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
675 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
676 : )
677 : {
678 0 : if (single_use (captures[4]) && single_use (captures[5])
679 : )
680 : {
681 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail235;
682 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail235;
683 0 : {
684 0 : tree res_op0;
685 0 : res_op0 = captures[0];
686 0 : tree res_op1;
687 0 : {
688 0 : tree _o1[1], _r1;
689 0 : _o1[0] = captures[6];
690 0 : if (TREE_TYPE (_o1[0]) != type)
691 : {
692 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
693 : }
694 : else
695 : _r1 = _o1[0];
696 0 : res_op1 = _r1;
697 : }
698 0 : tree _r;
699 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
700 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 195, __FILE__, __LINE__, true);
701 0 : return _r;
702 : }
703 : next_after_fail235:;
704 : }
705 : else
706 : {
707 : if (single_use (captures[0]) && single_use (captures[1])
708 : )
709 : {
710 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail236;
711 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail236;
712 : {
713 : tree res_op0;
714 : {
715 : tree _o1[1], _r1;
716 : _o1[0] = captures[3];
717 : if (TREE_TYPE (_o1[0]) != type)
718 : {
719 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
720 : }
721 : else
722 : _r1 = _o1[0];
723 : res_op0 = _r1;
724 : }
725 : tree res_op1;
726 : res_op1 = captures[4];
727 : tree _r;
728 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
729 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 196, __FILE__, __LINE__, true);
730 : return _r;
731 : }
732 : next_after_fail236:;
733 : }
734 : }
735 : }
736 : return NULL_TREE;
737 : }
738 :
739 : tree
740 0 : generic_simplify_153 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
741 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
742 : const enum tree_code ARG_UNUSED (cmp),
743 : const enum tree_code ARG_UNUSED (icmp))
744 : {
745 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
746 0 : if (integer_zerop (captures[5])
747 0 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
748 : )
749 : {
750 0 : if (integer_onep (captures[4])
751 : )
752 : {
753 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail255;
754 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail255;
755 0 : {
756 0 : tree res_op0;
757 0 : {
758 0 : tree _o1[3], _r1;
759 0 : _o1[0] = captures[1];
760 0 : _o1[1] = captures[6];
761 0 : _o1[2] = captures[9];
762 0 : _r1 = fold_build3_loc (loc, VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
763 0 : res_op0 = _r1;
764 : }
765 0 : tree res_op1;
766 0 : res_op1 = captures[4];
767 0 : tree _r;
768 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
769 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 204, __FILE__, __LINE__, true);
770 0 : return _r;
771 : }
772 : next_after_fail255:;
773 : }
774 : else
775 : {
776 0 : if (integer_minus_onep (captures[4])
777 : )
778 : {
779 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail256;
780 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail256;
781 0 : {
782 0 : tree res_op0;
783 0 : res_op0 = captures[1];
784 0 : tree res_op1;
785 0 : res_op1 = captures[6];
786 0 : tree res_op2;
787 0 : res_op2 = captures[9];
788 0 : tree _r;
789 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
790 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 205, __FILE__, __LINE__, true);
791 0 : return _r;
792 : }
793 : next_after_fail256:;
794 : }
795 : }
796 : }
797 : else
798 : {
799 0 : if (integer_zerop (captures[4])
800 0 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
801 : )
802 : {
803 0 : if (integer_onep (captures[5])
804 : )
805 : {
806 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail257;
807 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail257;
808 0 : {
809 0 : tree res_op0;
810 0 : {
811 0 : tree _o1[3], _r1;
812 0 : _o1[0] = captures[1];
813 0 : _o1[1] = captures[9];
814 0 : _o1[2] = captures[6];
815 0 : _r1 = fold_build3_loc (loc, VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
816 0 : res_op0 = _r1;
817 : }
818 0 : tree res_op1;
819 0 : res_op1 = captures[5];
820 0 : tree _r;
821 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
822 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 206, __FILE__, __LINE__, true);
823 0 : return _r;
824 : }
825 : next_after_fail257:;
826 : }
827 : else
828 : {
829 0 : if (integer_minus_onep (captures[5])
830 : )
831 : {
832 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail258;
833 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail258;
834 0 : {
835 0 : tree res_op0;
836 0 : res_op0 = captures[1];
837 0 : tree res_op1;
838 0 : res_op1 = captures[9];
839 0 : tree res_op2;
840 0 : res_op2 = captures[6];
841 0 : tree _r;
842 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
843 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 207, __FILE__, __LINE__, true);
844 0 : return _r;
845 : }
846 : next_after_fail258:;
847 : }
848 : }
849 : }
850 : }
851 : return NULL_TREE;
852 : }
853 :
854 : tree
855 94 : generic_simplify_176 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
856 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
857 : const enum tree_code ARG_UNUSED (logic),
858 : const enum tree_code ARG_UNUSED (op),
859 : const enum tree_code ARG_UNUSED (ext))
860 : {
861 94 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
862 188 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
863 188 : && TREE_CODE (captures[1]) != INTEGER_CST
864 : )
865 : {
866 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail313;
867 0 : {
868 0 : tree res_op0;
869 0 : res_op0 = captures[1];
870 0 : tree res_op1;
871 0 : {
872 0 : tree _o1[2], _r1;
873 0 : _o1[0] = captures[2];
874 0 : _o1[1] = captures[4];
875 0 : _r1 = fold_build2_loc (loc, ext, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
876 0 : res_op1 = _r1;
877 : }
878 0 : tree _r;
879 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
880 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 234, __FILE__, __LINE__, true);
881 0 : return _r;
882 : }
883 0 : next_after_fail313:;
884 : }
885 : return NULL_TREE;
886 : }
887 :
888 : tree
889 0 : generic_simplify_181 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
890 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
891 : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
892 : {
893 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
894 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
895 : )
896 : {
897 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail318;
898 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail318;
899 0 : {
900 0 : tree res_op0;
901 0 : {
902 0 : tree _o1[1], _r1;
903 0 : _o1[0] = captures[0];
904 0 : _r1 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
905 0 : res_op0 = _r1;
906 : }
907 0 : tree _r;
908 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
909 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 238, __FILE__, __LINE__, true);
910 0 : return _r;
911 : }
912 : next_after_fail318:;
913 : }
914 : return NULL_TREE;
915 : }
916 :
917 : tree
918 3 : generic_simplify_186 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
919 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
920 : {
921 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
922 3 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail323;
923 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail323;
924 3 : {
925 3 : tree _r;
926 3 : _r = build_zero_cst (type);
927 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 242, __FILE__, __LINE__, true);
928 : return _r;
929 : }
930 : next_after_fail323:;
931 : return NULL_TREE;
932 : }
933 :
934 : tree
935 0 : generic_simplify_189 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
936 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
937 : {
938 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
939 0 : if (INTEGRAL_TYPE_P (type)
940 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
941 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
942 : )
943 : {
944 0 : if (TYPE_UNSIGNED (type)
945 : )
946 : {
947 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail327;
948 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail327;
949 0 : {
950 0 : tree res_op0;
951 0 : res_op0 = captures[0];
952 0 : tree _r;
953 0 : _r = fold_build1_loc (loc, ABSU_EXPR, type, res_op0);
954 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 243, __FILE__, __LINE__, true);
955 0 : return _r;
956 : }
957 : next_after_fail327:;
958 : }
959 : else
960 : {
961 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail328;
962 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail328;
963 0 : {
964 0 : tree res_op0;
965 0 : res_op0 = captures[0];
966 0 : tree _r;
967 0 : _r = fold_build1_loc (loc, ABS_EXPR, type, res_op0);
968 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 244, __FILE__, __LINE__, true);
969 0 : return _r;
970 : }
971 : next_after_fail328:;
972 : }
973 : }
974 : return NULL_TREE;
975 : }
976 :
977 : tree
978 175327 : generic_simplify_198 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
979 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
980 : {
981 175327 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
982 175327 : if (TREE_CODE (captures[3]) != INTEGER_CST
983 : && single_use (captures[0])
984 175327 : && !integer_zerop (captures[2]) && !integer_minus_onep (captures[2])
985 : )
986 : {
987 175297 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail338;
988 175297 : {
989 175297 : tree res_op0;
990 175297 : {
991 175297 : tree _o1[2], _r1;
992 175297 : _o1[0] = captures[1];
993 175297 : _o1[1] = captures[3];
994 175297 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
995 175297 : res_op0 = _r1;
996 : }
997 175297 : tree res_op1;
998 175297 : res_op1 = captures[2];
999 175297 : tree _r;
1000 175297 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1001 175297 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 253, __FILE__, __LINE__, true);
1002 175297 : return _r;
1003 : }
1004 0 : next_after_fail338:;
1005 : }
1006 : return NULL_TREE;
1007 : }
1008 :
1009 : tree
1010 12 : generic_simplify_203 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1011 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1012 : const combined_fn ARG_UNUSED (TAN),
1013 : const combined_fn ARG_UNUSED (COS),
1014 : const combined_fn ARG_UNUSED (SIN))
1015 : {
1016 12 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1017 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
1018 : )
1019 : {
1020 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail343;
1021 12 : {
1022 12 : tree res_op0;
1023 12 : res_op0 = captures[1];
1024 12 : tree _r;
1025 12 : _r = maybe_build_call_expr_loc (loc, SIN, type, 1, res_op0);
1026 12 : if (!_r)
1027 0 : goto next_after_fail343;
1028 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 258, __FILE__, __LINE__, true);
1029 12 : return _r;
1030 : }
1031 : next_after_fail343:;
1032 : }
1033 : return NULL_TREE;
1034 : }
1035 :
1036 : tree
1037 12 : generic_simplify_210 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1038 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1039 : const enum tree_code ARG_UNUSED (cmp))
1040 : {
1041 12 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1042 12 : if (element_precision (captures[0]) >= element_precision (captures[1])
1043 12 : && types_match (captures[1], captures[3])
1044 : )
1045 : {
1046 12 : if (wi::lt_p (wi::to_wide (captures[2]), 0, TYPE_SIGN (TREE_TYPE (captures[2])))
1047 : )
1048 : {
1049 0 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1050 : )
1051 : {
1052 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail350;
1053 0 : {
1054 0 : tree res_op0;
1055 0 : res_op0 = captures[3];
1056 0 : tree res_op1;
1057 0 : res_op1 = captures[1];
1058 0 : tree _r;
1059 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1060 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1061 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1062 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 265, __FILE__, __LINE__, true);
1063 0 : return _r;
1064 : }
1065 0 : next_after_fail350:;
1066 : }
1067 : else
1068 : {
1069 0 : if (tree_expr_nonzero_p (captures[1]) && tree_expr_nonzero_p (captures[3])
1070 : )
1071 : {
1072 0 : {
1073 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[1]));
1074 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail351;
1075 0 : {
1076 0 : tree res_op0;
1077 0 : {
1078 0 : tree _o1[1], _r1;
1079 0 : _o1[0] = captures[3];
1080 0 : if (TREE_TYPE (_o1[0]) != utype)
1081 : {
1082 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1083 : }
1084 : else
1085 : _r1 = _o1[0];
1086 0 : res_op0 = _r1;
1087 : }
1088 0 : tree res_op1;
1089 0 : {
1090 0 : tree _o1[1], _r1;
1091 0 : _o1[0] = captures[1];
1092 0 : if (TREE_TYPE (_o1[0]) != utype)
1093 : {
1094 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1095 : }
1096 : else
1097 : _r1 = _o1[0];
1098 0 : res_op1 = _r1;
1099 : }
1100 0 : tree _r;
1101 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1102 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1103 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1104 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 266, __FILE__, __LINE__, true);
1105 0 : return _r;
1106 : }
1107 0 : next_after_fail351:;
1108 : }
1109 : }
1110 : }
1111 : }
1112 : else
1113 : {
1114 12 : if (wi::gt_p (wi::to_wide (captures[2]), 1, TYPE_SIGN (TREE_TYPE (captures[2])))
1115 : )
1116 : {
1117 12 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1])) || !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1118 : )
1119 : {
1120 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail352;
1121 12 : {
1122 12 : tree res_op0;
1123 12 : res_op0 = captures[1];
1124 12 : tree res_op1;
1125 12 : res_op1 = captures[3];
1126 12 : tree _r;
1127 12 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1128 12 : if (TREE_SIDE_EFFECTS (captures[2]))
1129 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1130 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 267, __FILE__, __LINE__, true);
1131 12 : return _r;
1132 : }
1133 0 : next_after_fail352:;
1134 : }
1135 : else
1136 : {
1137 0 : {
1138 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[1]));
1139 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail353;
1140 0 : {
1141 0 : tree res_op0;
1142 0 : {
1143 0 : tree _o1[1], _r1;
1144 0 : _o1[0] = captures[1];
1145 0 : if (TREE_TYPE (_o1[0]) != utype)
1146 : {
1147 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1148 : }
1149 : else
1150 : _r1 = _o1[0];
1151 0 : res_op0 = _r1;
1152 : }
1153 0 : tree res_op1;
1154 0 : {
1155 0 : tree _o1[1], _r1;
1156 0 : _o1[0] = captures[3];
1157 0 : if (TREE_TYPE (_o1[0]) != utype)
1158 : {
1159 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1160 : }
1161 : else
1162 : _r1 = _o1[0];
1163 0 : res_op1 = _r1;
1164 : }
1165 0 : tree _r;
1166 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1167 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1168 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1169 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 268, __FILE__, __LINE__, true);
1170 0 : return _r;
1171 : }
1172 0 : next_after_fail353:;
1173 : }
1174 : }
1175 : }
1176 : }
1177 : }
1178 : return NULL_TREE;
1179 : }
1180 :
1181 : tree
1182 179 : generic_simplify_241 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1183 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1184 : const enum tree_code ARG_UNUSED (cmp))
1185 : {
1186 179 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1187 179 : {
1188 179 : int cand = wi::ctz (wi::to_wide (captures[2])) - wi::ctz (wi::to_wide (captures[0]));
1189 358 : if (cand < 0
1190 179 : || (!integer_zerop (captures[2])
1191 246 : && wi::lshift (wi::to_wide (captures[0]), cand) != wi::to_wide (captures[2]))
1192 : )
1193 : {
1194 35 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail408;
1195 35 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail408;
1196 35 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail408;
1197 35 : {
1198 35 : tree _r;
1199 35 : _r = constant_boolean_node (cmp == NE_EXPR, type);
1200 35 : if (TREE_SIDE_EFFECTS (captures[1]))
1201 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1202 35 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 321, __FILE__, __LINE__, true);
1203 88 : return _r;
1204 : }
1205 91 : next_after_fail408:;
1206 : }
1207 : else
1208 : {
1209 144 : if (!integer_zerop (captures[2])
1210 144 : && wi::lshift (wi::to_wide (captures[0]), cand) == wi::to_wide (captures[2])
1211 : )
1212 : {
1213 53 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail409;
1214 53 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail409;
1215 53 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail409;
1216 53 : {
1217 53 : tree res_op0;
1218 53 : res_op0 = captures[1];
1219 53 : tree res_op1;
1220 53 : res_op1 = build_int_cst (TREE_TYPE (captures[1]), cand);
1221 53 : tree _r;
1222 53 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1223 53 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 322, __FILE__, __LINE__, true);
1224 53 : return _r;
1225 : }
1226 91 : next_after_fail409:;
1227 : }
1228 : }
1229 : }
1230 91 : return NULL_TREE;
1231 : }
1232 :
1233 : tree
1234 13734 : generic_simplify_251 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1235 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1236 : const enum tree_code ARG_UNUSED (cmp))
1237 : {
1238 13734 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1239 13734 : if (single_use (captures[0])
1240 : )
1241 : {
1242 13734 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail420;
1243 13734 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail420;
1244 13734 : {
1245 13734 : tree res_op0;
1246 13734 : res_op0 = captures[1];
1247 13734 : tree res_op1;
1248 13734 : res_op1 = captures[2];
1249 13734 : tree _r;
1250 13734 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1251 13734 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 332, __FILE__, __LINE__, true);
1252 13734 : return _r;
1253 : }
1254 : next_after_fail420:;
1255 : }
1256 : return NULL_TREE;
1257 : }
1258 :
1259 : tree
1260 20 : generic_simplify_258 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1261 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1262 : const enum tree_code ARG_UNUSED (cmp))
1263 : {
1264 20 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1265 20 : if (single_use (captures[1]) && single_use (captures[3])
1266 : )
1267 : {
1268 20 : {
1269 20 : tree otype = TREE_TYPE (captures[0]);
1270 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail432;
1271 20 : {
1272 20 : tree res_op0;
1273 20 : {
1274 20 : tree _o1[1], _r1;
1275 20 : _o1[0] = captures[4];
1276 20 : if (TREE_TYPE (_o1[0]) != otype)
1277 : {
1278 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, otype, _o1[0]);
1279 : }
1280 : else
1281 : _r1 = _o1[0];
1282 20 : res_op0 = _r1;
1283 : }
1284 20 : tree res_op1;
1285 20 : {
1286 20 : tree _o1[1], _r1;
1287 20 : _o1[0] = captures[2];
1288 20 : if (TREE_TYPE (_o1[0]) != otype)
1289 : {
1290 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, otype, _o1[0]);
1291 : }
1292 : else
1293 : _r1 = _o1[0];
1294 20 : res_op1 = _r1;
1295 : }
1296 20 : tree _r;
1297 20 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1298 20 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 342, __FILE__, __LINE__, true);
1299 20 : return _r;
1300 : }
1301 0 : next_after_fail432:;
1302 : }
1303 : }
1304 0 : return NULL_TREE;
1305 : }
1306 :
1307 : tree
1308 6 : generic_simplify_263 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1309 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1310 : const combined_fn ARG_UNUSED (sq),
1311 : const enum tree_code ARG_UNUSED (cmp))
1312 : {
1313 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1314 6 : if (flag_unsafe_math_optimizations && ! flag_errno_math
1315 : )
1316 : {
1317 0 : if (! HONOR_NANS (captures[0])
1318 : )
1319 : {
1320 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail469;
1321 0 : {
1322 0 : tree res_op0;
1323 0 : res_op0 = captures[0];
1324 0 : tree res_op1;
1325 0 : res_op1 = captures[1];
1326 0 : tree _r;
1327 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1328 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 380, __FILE__, __LINE__, true);
1329 0 : return _r;
1330 : }
1331 0 : next_after_fail469:;
1332 : }
1333 : }
1334 : return NULL_TREE;
1335 : }
1336 :
1337 : tree
1338 2597 : generic_simplify_268 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1339 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1340 : const enum tree_code ARG_UNUSED (cmp),
1341 : const enum tree_code ARG_UNUSED (scmp))
1342 : {
1343 2597 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1344 4824 : if (FLOAT_TYPE_P (TREE_TYPE (captures[0]))
1345 4824 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1346 2227 : && (cmp == EQ_EXPR
1347 2227 : || cmp == NE_EXPR
1348 1452 : || TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))))
1349 : )
1350 : {
1351 1449 : {
1352 1449 : tree tem = const_unop (NEGATE_EXPR, TREE_TYPE (captures[0]), captures[1]);
1353 1449 : if (tem && !TREE_OVERFLOW (tem)
1354 : )
1355 : {
1356 1421 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail483;
1357 1421 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail483;
1358 1421 : {
1359 1421 : tree res_op0;
1360 1421 : res_op0 = captures[0];
1361 1421 : tree res_op1;
1362 1421 : res_op1 = tem;
1363 1421 : tree _r;
1364 1421 : _r = fold_build2_loc (loc, scmp, type, res_op0, res_op1);
1365 1421 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 394, __FILE__, __LINE__, true);
1366 1421 : return _r;
1367 : }
1368 : next_after_fail483:;
1369 : }
1370 : }
1371 : }
1372 : return NULL_TREE;
1373 : }
1374 :
1375 : tree
1376 697 : generic_simplify_271 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1377 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1378 : const enum tree_code ARG_UNUSED (cmp))
1379 : {
1380 697 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1381 697 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
1382 1394 : && wi::bit_and_not (wi::to_wide (captures[2]), wi::to_wide (captures[3])) != 0
1383 : )
1384 : {
1385 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail500;
1386 0 : {
1387 0 : tree _r;
1388 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
1389 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1390 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1391 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1392 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1393 0 : if (TREE_SIDE_EFFECTS (captures[3]))
1394 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
1395 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 403, __FILE__, __LINE__, true);
1396 0 : return _r;
1397 : }
1398 0 : next_after_fail500:;
1399 : }
1400 : return NULL_TREE;
1401 : }
1402 :
1403 : tree
1404 62 : generic_simplify_274 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1405 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1406 : const enum tree_code ARG_UNUSED (cmp))
1407 : {
1408 62 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1409 62 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail506;
1410 62 : {
1411 62 : tree res_op0;
1412 62 : res_op0 = captures[1];
1413 62 : tree res_op1;
1414 62 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
1415 62 : tree _r;
1416 62 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1417 62 : if (TREE_SIDE_EFFECTS (captures[0]))
1418 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1419 62 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 409, __FILE__, __LINE__, true);
1420 : return _r;
1421 : }
1422 0 : next_after_fail506:;
1423 0 : return NULL_TREE;
1424 : }
1425 :
1426 : tree
1427 26 : generic_simplify_278 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1428 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1429 : const enum tree_code ARG_UNUSED (cmp))
1430 : {
1431 26 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1432 26 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
1433 : )
1434 : {
1435 26 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail510;
1436 26 : {
1437 26 : tree res_op0;
1438 26 : res_op0 = captures[1];
1439 26 : tree res_op1;
1440 26 : {
1441 26 : tree _o1[2], _r1;
1442 26 : _o1[0] = captures[2];
1443 26 : {
1444 26 : tree _o2[1], _r2;
1445 26 : _o2[0] = captures[3];
1446 26 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (res_op0))
1447 : {
1448 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o2[0]);
1449 : }
1450 : else
1451 : _r2 = _o2[0];
1452 26 : _o1[1] = _r2;
1453 : }
1454 26 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1455 26 : res_op1 = _r1;
1456 : }
1457 26 : tree _r;
1458 26 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1459 26 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 413, __FILE__, __LINE__, true);
1460 26 : return _r;
1461 : }
1462 0 : next_after_fail510:;
1463 : }
1464 : return NULL_TREE;
1465 : }
1466 :
1467 : tree
1468 105162 : generic_simplify_282 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1469 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1470 : const enum tree_code ARG_UNUSED (cmp),
1471 : const enum tree_code ARG_UNUSED (ncmp))
1472 : {
1473 105162 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1474 209925 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1475 58896 : && type_has_mode_precision_p (TREE_TYPE (captures[1]))
1476 57895 : && element_precision (captures[0]) >= element_precision (captures[1])
1477 210324 : && wi::only_sign_bit_p (wi::to_wide (captures[2]), element_precision (captures[1]))
1478 : )
1479 : {
1480 4955 : {
1481 4955 : tree stype = signed_type_for (TREE_TYPE (captures[1]));
1482 4955 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail514;
1483 4955 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail514;
1484 4955 : {
1485 4955 : tree res_op0;
1486 4955 : {
1487 4955 : tree _o1[1], _r1;
1488 4955 : _o1[0] = captures[1];
1489 4955 : if (TREE_TYPE (_o1[0]) != stype)
1490 : {
1491 4303 : _r1 = fold_build1_loc (loc, NOP_EXPR, stype, _o1[0]);
1492 : }
1493 : else
1494 : _r1 = _o1[0];
1495 4955 : res_op0 = _r1;
1496 : }
1497 4955 : tree res_op1;
1498 4955 : res_op1 = build_zero_cst (stype);
1499 4955 : tree _r;
1500 4955 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
1501 4955 : if (TREE_SIDE_EFFECTS (captures[2]))
1502 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1503 4955 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 417, __FILE__, __LINE__, true);
1504 4955 : return _r;
1505 : }
1506 : next_after_fail514:;
1507 : }
1508 : }
1509 : return NULL_TREE;
1510 : }
1511 :
1512 : tree
1513 4628662 : generic_simplify_288 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1514 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1515 : const enum tree_code ARG_UNUSED (cmp))
1516 : {
1517 4628662 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1518 4628662 : {
1519 4628662 : poly_int64 off0, off1;
1520 4628662 : tree base0, base1;
1521 4628662 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[2], base0, base1,
1522 : off0, off1,
1523 : 1
1524 : );
1525 4628662 : if (equal == 1
1526 : )
1527 : {
1528 4588578 : if (cmp == EQ_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
1529 : )
1530 : {
1531 473679 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail520;
1532 473679 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail520;
1533 473679 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail520;
1534 473679 : {
1535 473679 : tree _r;
1536 473679 : _r = constant_boolean_node (known_eq (off0, off1), type);
1537 473679 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 421, __FILE__, __LINE__, true);
1538 4611874 : return _r;
1539 : }
1540 16788 : next_after_fail520:;
1541 : }
1542 : else
1543 : {
1544 4054178 : if (cmp == NE_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
1545 : )
1546 : {
1547 4054178 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail521;
1548 4054178 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail521;
1549 4054178 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail521;
1550 4054178 : {
1551 4054178 : tree _r;
1552 4054178 : _r = constant_boolean_node (known_ne (off0, off1), type);
1553 4054178 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 422, __FILE__, __LINE__, true);
1554 4054178 : return _r;
1555 : }
1556 16788 : next_after_fail521:;
1557 : }
1558 : else
1559 : {
1560 51799 : if (cmp == LT_EXPR && (known_lt (off0, off1) || known_ge (off0, off1))
1561 : )
1562 : {
1563 51799 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail522;
1564 51799 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail522;
1565 51799 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail522;
1566 51799 : {
1567 51799 : tree _r;
1568 51799 : _r = constant_boolean_node (known_lt (off0, off1), type);
1569 51799 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 423, __FILE__, __LINE__, true);
1570 51799 : return _r;
1571 : }
1572 16788 : next_after_fail522:;
1573 : }
1574 : else
1575 : {
1576 5610 : if (cmp == LE_EXPR && (known_le (off0, off1) || known_gt (off0, off1))
1577 : )
1578 : {
1579 5610 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail523;
1580 5610 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail523;
1581 5610 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail523;
1582 5610 : {
1583 5610 : tree _r;
1584 5610 : _r = constant_boolean_node (known_le (off0, off1), type);
1585 5610 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 424, __FILE__, __LINE__, true);
1586 5610 : return _r;
1587 : }
1588 16788 : next_after_fail523:;
1589 : }
1590 : else
1591 : {
1592 2812 : if (cmp == GE_EXPR && (known_ge (off0, off1) || known_lt (off0, off1))
1593 : )
1594 : {
1595 2812 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail524;
1596 2812 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail524;
1597 2812 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail524;
1598 2812 : {
1599 2812 : tree _r;
1600 2812 : _r = constant_boolean_node (known_ge (off0, off1), type);
1601 2812 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 425, __FILE__, __LINE__, true);
1602 2812 : return _r;
1603 : }
1604 16788 : next_after_fail524:;
1605 : }
1606 : else
1607 : {
1608 500 : if (cmp == GT_EXPR && (known_gt (off0, off1) || known_le (off0, off1))
1609 : )
1610 : {
1611 500 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail525;
1612 500 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail525;
1613 500 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail525;
1614 500 : {
1615 500 : tree _r;
1616 500 : _r = constant_boolean_node (known_gt (off0, off1), type);
1617 500 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 426, __FILE__, __LINE__, true);
1618 500 : return _r;
1619 : }
1620 16788 : next_after_fail525:;
1621 : }
1622 : }
1623 : }
1624 : }
1625 : }
1626 : }
1627 : }
1628 : else
1629 : {
1630 40084 : if (equal == 0
1631 : )
1632 : {
1633 23296 : if (cmp == EQ_EXPR
1634 : )
1635 : {
1636 17287 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail526;
1637 17287 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail526;
1638 17287 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail526;
1639 17287 : {
1640 17287 : tree _r;
1641 17287 : _r = constant_boolean_node (false, type);
1642 17287 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 427, __FILE__, __LINE__, true);
1643 17287 : return _r;
1644 : }
1645 16788 : next_after_fail526:;
1646 : }
1647 : else
1648 : {
1649 6009 : if (cmp == NE_EXPR
1650 : )
1651 : {
1652 6009 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail527;
1653 6009 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail527;
1654 6009 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail527;
1655 6009 : {
1656 6009 : tree _r;
1657 6009 : _r = constant_boolean_node (true, type);
1658 6009 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 428, __FILE__, __LINE__, true);
1659 6009 : return _r;
1660 : }
1661 16788 : next_after_fail527:;
1662 : }
1663 : }
1664 : }
1665 : }
1666 : }
1667 16788 : return NULL_TREE;
1668 : }
1669 :
1670 : tree
1671 285159 : generic_simplify_303 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1672 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1673 : const enum tree_code ARG_UNUSED (cmp),
1674 : const enum tree_code ARG_UNUSED (icmp),
1675 : const enum tree_code ARG_UNUSED (ncmp))
1676 : {
1677 285159 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1678 285159 : if (types_match (type, TREE_TYPE (captures[0]))
1679 : )
1680 : {
1681 46946 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail568;
1682 46946 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail568;
1683 46946 : {
1684 46946 : tree res_op0;
1685 46946 : res_op0 = captures[1];
1686 46946 : tree res_op1;
1687 46946 : res_op1 = captures[2];
1688 46946 : tree _r;
1689 46946 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1690 46946 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 461, __FILE__, __LINE__, true);
1691 46946 : return _r;
1692 : }
1693 : next_after_fail568:;
1694 : }
1695 : return NULL_TREE;
1696 : }
1697 :
1698 : tree
1699 0 : generic_simplify_308 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1700 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1701 : const combined_fn ARG_UNUSED (copysigns))
1702 : {
1703 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1704 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail574;
1705 0 : {
1706 0 : tree res_op0;
1707 0 : res_op0 = captures[0];
1708 0 : tree res_op1;
1709 0 : res_op1 = captures[2];
1710 0 : tree _r;
1711 0 : _r = maybe_build_call_expr_loc (loc, copysigns, type, 2, res_op0, res_op1);
1712 0 : if (!_r)
1713 0 : goto next_after_fail574;
1714 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1715 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1716 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 467, __FILE__, __LINE__, true);
1717 : return _r;
1718 : }
1719 : next_after_fail574:;
1720 : return NULL_TREE;
1721 : }
1722 :
1723 : tree
1724 2749 : generic_simplify_315 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1725 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1726 : const enum tree_code ARG_UNUSED (div))
1727 : {
1728 2749 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1729 2749 : if (!TYPE_UNSIGNED (type)
1730 : )
1731 : {
1732 1683 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail583;
1733 1683 : {
1734 1683 : tree res_op0;
1735 1683 : res_op0 = captures[0];
1736 1683 : tree _r;
1737 1683 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
1738 1683 : if (TREE_SIDE_EFFECTS (captures[1]))
1739 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1740 1683 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 474, __FILE__, __LINE__, true);
1741 1683 : return _r;
1742 : }
1743 0 : next_after_fail583:;
1744 : }
1745 : return NULL_TREE;
1746 : }
1747 :
1748 : tree
1749 45352 : generic_simplify_321 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1750 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1751 : const enum tree_code ARG_UNUSED (div))
1752 : {
1753 45352 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1754 45352 : if (integer_pow2p (captures[2])
1755 36354 : && tree_int_cst_sgn (captures[2]) > 0
1756 36354 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1757 90704 : && wi::to_wide (captures[2]) + wi::to_wide (captures[1]) == 0
1758 : )
1759 : {
1760 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail590;
1761 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail590;
1762 1 : {
1763 1 : tree res_op0;
1764 1 : {
1765 1 : tree _o1[1], _r1;
1766 1 : _o1[0] = captures[0];
1767 1 : if (TREE_TYPE (_o1[0]) != type)
1768 : {
1769 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1770 : }
1771 : else
1772 : _r1 = _o1[0];
1773 1 : res_op0 = _r1;
1774 : }
1775 1 : tree res_op1;
1776 1 : res_op1 = build_int_cst (integer_type_node,
1777 1 : wi::exact_log2 (wi::to_wide (captures[2])));
1778 1 : tree _r;
1779 1 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
1780 1 : if (TREE_SIDE_EFFECTS (captures[1]))
1781 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1782 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 481, __FILE__, __LINE__, true);
1783 1 : return _r;
1784 : }
1785 : next_after_fail590:;
1786 : }
1787 : return NULL_TREE;
1788 : }
1789 :
1790 : tree
1791 529 : generic_simplify_328 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1792 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1793 : const enum tree_code ARG_UNUSED (mod))
1794 : {
1795 529 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1796 529 : if (!TYPE_UNSIGNED (type)
1797 : )
1798 : {
1799 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail597;
1800 20 : {
1801 20 : tree _r;
1802 20 : _r = build_zero_cst (type);
1803 20 : if (TREE_SIDE_EFFECTS (captures[0]))
1804 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1805 20 : if (TREE_SIDE_EFFECTS (captures[1]))
1806 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1807 20 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 488, __FILE__, __LINE__, true);
1808 20 : return _r;
1809 : }
1810 0 : next_after_fail597:;
1811 : }
1812 : return NULL_TREE;
1813 : }
1814 :
1815 : tree
1816 6 : generic_simplify_340 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1817 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1818 : const combined_fn ARG_UNUSED (COS),
1819 : const combined_fn ARG_UNUSED (SIN),
1820 : const combined_fn ARG_UNUSED (TAN))
1821 : {
1822 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1823 6 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
1824 : )
1825 : {
1826 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail611;
1827 6 : {
1828 6 : tree res_op0;
1829 6 : res_op0 = build_one_cst (type);
1830 6 : tree res_op1;
1831 6 : {
1832 6 : tree _o1[1], _r1;
1833 6 : _o1[0] = captures[1];
1834 6 : _r1 = maybe_build_call_expr_loc (loc, TAN, TREE_TYPE (_o1[0]), 1, _o1[0]);
1835 6 : if (!_r1)
1836 0 : goto next_after_fail611;
1837 6 : res_op1 = _r1;
1838 : }
1839 6 : tree _r;
1840 6 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
1841 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 502, __FILE__, __LINE__, true);
1842 6 : return _r;
1843 : }
1844 : next_after_fail611:;
1845 : }
1846 : return NULL_TREE;
1847 : }
1848 :
1849 : tree
1850 39 : generic_simplify_348 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1851 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1852 : const enum tree_code ARG_UNUSED (cmp),
1853 : const enum tree_code ARG_UNUSED (minmax))
1854 : {
1855 39 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1856 39 : {
1857 39 : tree_code code = minmax_from_comparison (cmp, captures[0], captures[1], captures[0], captures[4]);
1858 39 : if ((cmp == LT_EXPR || cmp == LE_EXPR)
1859 15 : && code == MIN_EXPR
1860 43 : && integer_nonzerop (fold_build2 (LE_EXPR, boolean_type_node, captures[3], captures[4]))
1861 : )
1862 : {
1863 4 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail623;
1864 4 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail623;
1865 4 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail623;
1866 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail623;
1867 4 : {
1868 4 : tree res_op0;
1869 4 : res_op0 = captures[2];
1870 4 : tree res_op1;
1871 4 : res_op1 = captures[4];
1872 4 : tree _r;
1873 4 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
1874 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 514, __FILE__, __LINE__, true);
1875 4 : return _r;
1876 : }
1877 : next_after_fail623:;
1878 : }
1879 : else
1880 : {
1881 35 : if ((cmp == GT_EXPR || cmp == GE_EXPR)
1882 24 : && code == MAX_EXPR
1883 59 : && integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node, captures[3], captures[4]))
1884 : )
1885 : {
1886 10 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail624;
1887 10 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail624;
1888 10 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail624;
1889 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail624;
1890 10 : {
1891 10 : tree res_op0;
1892 10 : res_op0 = captures[2];
1893 10 : tree res_op1;
1894 10 : res_op1 = captures[4];
1895 10 : tree _r;
1896 10 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
1897 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 515, __FILE__, __LINE__, true);
1898 10 : return _r;
1899 : }
1900 : next_after_fail624:;
1901 : }
1902 : }
1903 : }
1904 : return NULL_TREE;
1905 : }
1906 :
1907 : tree
1908 15 : generic_simplify_360 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1909 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1910 : const enum tree_code ARG_UNUSED (op))
1911 : {
1912 15 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1913 15 : if (INTEGRAL_TYPE_P (type)
1914 15 : && TYPE_PRECISION (type) > 1
1915 15 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1916 30 : && expr_no_side_effects_p (captures[1])
1917 : )
1918 : {
1919 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail637;
1920 8 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail637;
1921 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail637;
1922 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail637;
1923 8 : {
1924 8 : tree res_op0;
1925 8 : {
1926 8 : tree _o1[2], _r1;
1927 8 : {
1928 8 : tree _o2[1], _r2;
1929 8 : _o2[0] = captures[0];
1930 8 : if (TREE_TYPE (_o2[0]) != type)
1931 : {
1932 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
1933 : }
1934 : else
1935 : _r2 = _o2[0];
1936 8 : _o1[0] = _r2;
1937 : }
1938 8 : _o1[1] = captures[1];
1939 8 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1940 8 : res_op0 = _r1;
1941 : }
1942 8 : tree res_op1;
1943 8 : res_op1 = captures[2];
1944 8 : tree _r;
1945 8 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1946 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 528, __FILE__, __LINE__, true);
1947 8 : return _r;
1948 : }
1949 : next_after_fail637:;
1950 : }
1951 : return NULL_TREE;
1952 : }
1953 :
1954 : tree
1955 22 : generic_simplify_375 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1956 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1957 : const enum tree_code ARG_UNUSED (cmp))
1958 : {
1959 22 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1960 22 : if (INTEGRAL_TYPE_P (type)
1961 22 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1962 22 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1963 44 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == TYPE_PRECISION (type)
1964 : )
1965 : {
1966 22 : {
1967 22 : tree shifter = build_int_cst (integer_type_node, TYPE_PRECISION (type) - 1);
1968 22 : if (cmp == LT_EXPR
1969 : )
1970 : {
1971 13 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail653;
1972 13 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail653;
1973 13 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail653;
1974 13 : {
1975 13 : tree res_op0;
1976 13 : {
1977 13 : tree _o1[1], _r1;
1978 13 : {
1979 13 : tree _o2[2], _r2;
1980 13 : _o2[0] = captures[0];
1981 13 : _o2[1] = shifter;
1982 13 : _r2 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1983 13 : _o1[0] = _r2;
1984 : }
1985 13 : if (TREE_TYPE (_o1[0]) != type)
1986 : {
1987 1 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1988 : }
1989 : else
1990 : _r1 = _o1[0];
1991 13 : res_op0 = _r1;
1992 : }
1993 13 : tree res_op1;
1994 13 : res_op1 = captures[1];
1995 13 : tree _r;
1996 13 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
1997 13 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 542, __FILE__, __LINE__, true);
1998 13 : return _r;
1999 : }
2000 : next_after_fail653:;
2001 : }
2002 : else
2003 : {
2004 9 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail654;
2005 9 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail654;
2006 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail654;
2007 9 : {
2008 9 : tree res_op0;
2009 9 : {
2010 9 : tree _o1[2], _r1;
2011 9 : {
2012 9 : tree _o2[1], _r2;
2013 9 : {
2014 9 : tree _o3[2], _r3;
2015 9 : _o3[0] = captures[0];
2016 9 : _o3[1] = shifter;
2017 9 : _r3 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
2018 9 : _o2[0] = _r3;
2019 : }
2020 9 : if (TREE_TYPE (_o2[0]) != type)
2021 : {
2022 1 : _r2 = fold_build1_loc (loc, NOP_EXPR, type, _o2[0]);
2023 : }
2024 : else
2025 : _r2 = _o2[0];
2026 9 : _o1[0] = _r2;
2027 : }
2028 9 : _o1[1] = captures[1];
2029 9 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2030 9 : res_op0 = _r1;
2031 : }
2032 9 : tree _r;
2033 9 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
2034 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 543, __FILE__, __LINE__, true);
2035 9 : return _r;
2036 : }
2037 : next_after_fail654:;
2038 : }
2039 : }
2040 : }
2041 : return NULL_TREE;
2042 : }
2043 :
2044 : tree
2045 551 : generic_simplify_393 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2046 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2047 : const enum tree_code ARG_UNUSED (cmp))
2048 : {
2049 551 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2050 551 : if (wi::gt_p (wi::to_wide (captures[1]), 0, TYPE_SIGN (TREE_TYPE (captures[1])))
2051 : )
2052 : {
2053 551 : {
2054 551 : wi::overflow_type ovf;
2055 551 : wide_int prod = wi::mul (wi::to_wide (captures[2]), wi::to_wide (captures[1]),
2056 1102 : TYPE_SIGN (TREE_TYPE (captures[1])), &ovf);
2057 551 : if (ovf
2058 : )
2059 : {
2060 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail676;
2061 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail676;
2062 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail676;
2063 0 : {
2064 0 : tree _r;
2065 0 : _r = constant_boolean_node (wi::lt_p (wi::to_wide (captures[2]), 0,
2066 0 : TYPE_SIGN (TREE_TYPE (captures[2])))
2067 0 : != (cmp == LT_EXPR || cmp == LE_EXPR), type);
2068 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2069 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2070 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 565, __FILE__, __LINE__, true);
2071 0 : return _r;
2072 : }
2073 0 : next_after_fail676:;
2074 : }
2075 : else
2076 : {
2077 551 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail677;
2078 551 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail677;
2079 551 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail677;
2080 551 : {
2081 551 : tree res_op0;
2082 551 : res_op0 = captures[0];
2083 551 : tree res_op1;
2084 551 : res_op1 = wide_int_to_tree (TREE_TYPE (captures[0]), prod);
2085 551 : tree _r;
2086 551 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2087 551 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 566, __FILE__, __LINE__, true);
2088 551 : return _r;
2089 : }
2090 0 : next_after_fail677:;
2091 : }
2092 551 : }
2093 : }
2094 : return NULL_TREE;
2095 : }
2096 :
2097 : tree
2098 0 : generic_simplify_406 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2099 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2100 : const enum tree_code ARG_UNUSED (op),
2101 : const enum tree_code ARG_UNUSED (cmp))
2102 : {
2103 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2104 0 : {
2105 0 : bool ok = true;
2106 0 : HOST_WIDE_INT val = 0;
2107 0 : if (!tree_fits_shwi_p (captures[3]))
2108 : ok = false;
2109 : else
2110 : {
2111 0 : val = tree_to_shwi (captures[3]);
2112 0 : if (op == GT_EXPR || op == LE_EXPR)
2113 : {
2114 0 : if (val == HOST_WIDE_INT_MAX)
2115 : ok = false;
2116 : else
2117 0 : val++;
2118 : }
2119 : }
2120 0 : HOST_WIDE_INT zero_val = tree_to_shwi (captures[2]);
2121 0 : tree type0 = TREE_TYPE (captures[1]);
2122 0 : int prec = TYPE_PRECISION (type0);
2123 0 : if (prec > MAX_FIXED_MODE_SIZE)
2124 0 : ok = false;
2125 0 : if (val <= 0
2126 : )
2127 : {
2128 0 : if (ok && zero_val >= val
2129 : )
2130 : {
2131 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail726;
2132 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail726;
2133 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail726;
2134 0 : {
2135 0 : tree _r;
2136 0 : _r = constant_boolean_node (cmp == EQ_EXPR ? true : false, type);
2137 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2138 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2139 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 598, __FILE__, __LINE__, true);
2140 0 : return _r;
2141 : }
2142 : next_after_fail726:;
2143 : }
2144 : }
2145 : else
2146 : {
2147 0 : if (val >= prec
2148 : )
2149 : {
2150 0 : if (ok && zero_val < val
2151 : )
2152 : {
2153 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail727;
2154 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail727;
2155 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail727;
2156 0 : {
2157 0 : tree _r;
2158 0 : _r = constant_boolean_node (cmp == EQ_EXPR ? false : true, type);
2159 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2160 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2161 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 599, __FILE__, __LINE__, true);
2162 0 : return _r;
2163 : }
2164 : next_after_fail727:;
2165 : }
2166 : }
2167 : else
2168 : {
2169 0 : if (ok && (zero_val < 0 || zero_val >= prec)
2170 : )
2171 : {
2172 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail728;
2173 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail728;
2174 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail728;
2175 0 : {
2176 0 : tree res_op0;
2177 0 : {
2178 0 : tree _o1[2], _r1;
2179 0 : _o1[0] = captures[1];
2180 0 : _o1[1] = wide_int_to_tree (type0,
2181 0 : wi::mask (val, false, prec));
2182 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2183 0 : res_op0 = _r1;
2184 : }
2185 0 : tree res_op1;
2186 0 : res_op1 = build_zero_cst (type0);
2187 0 : tree _r;
2188 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2189 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 600, __FILE__, __LINE__, true);
2190 0 : return _r;
2191 : }
2192 : next_after_fail728:;
2193 : }
2194 : }
2195 : }
2196 : }
2197 : return NULL_TREE;
2198 : }
2199 :
2200 : tree
2201 2565 : generic_simplify_421 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2202 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2203 : const enum tree_code ARG_UNUSED (shiftrotate))
2204 : {
2205 2565 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2206 2565 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail747;
2207 2565 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail747;
2208 2565 : {
2209 2565 : tree res_op0;
2210 2565 : res_op0 = captures[0];
2211 2565 : tree _r;
2212 2565 : _r = non_lvalue_loc (loc, res_op0);
2213 2565 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 615, __FILE__, __LINE__, true);
2214 : return _r;
2215 : }
2216 : next_after_fail747:;
2217 : return NULL_TREE;
2218 : }
2219 :
2220 : tree
2221 86 : generic_simplify_425 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2222 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2223 : const enum tree_code ARG_UNUSED (op))
2224 : {
2225 86 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2226 86 : {
2227 86 : unsigned int prec = element_precision (type);
2228 86 : if (wi::ge_p (wi::to_wide (captures[1]), 0, TYPE_SIGN (TREE_TYPE (captures[1])))
2229 86 : && wi::lt_p (wi::to_wide (captures[1]), prec, TYPE_SIGN (TREE_TYPE (captures[1])))
2230 86 : && wi::ge_p (wi::to_wide (captures[2]), 0, TYPE_SIGN (TREE_TYPE (captures[2])))
2231 172 : && wi::lt_p (wi::to_wide (captures[2]), prec, TYPE_SIGN (TREE_TYPE (captures[2])))
2232 : )
2233 : {
2234 86 : {
2235 86 : unsigned int low = (tree_to_uhwi (captures[1])
2236 86 : + tree_to_uhwi (captures[2]));
2237 86 : if (low >= prec
2238 : )
2239 : {
2240 25 : if (op == LROTATE_EXPR || op == RROTATE_EXPR
2241 : )
2242 : {
2243 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail751;
2244 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail751;
2245 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail751;
2246 0 : {
2247 0 : tree res_op0;
2248 0 : res_op0 = captures[0];
2249 0 : tree res_op1;
2250 0 : res_op1 = build_int_cst (TREE_TYPE (captures[1]), low % prec);
2251 0 : tree _r;
2252 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2253 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 618, __FILE__, __LINE__, true);
2254 86 : return _r;
2255 : }
2256 : next_after_fail751:;
2257 : }
2258 : else
2259 : {
2260 25 : if (TYPE_UNSIGNED (type) || op == LSHIFT_EXPR
2261 : )
2262 : {
2263 24 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail752;
2264 24 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail752;
2265 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail752;
2266 24 : {
2267 24 : tree _r;
2268 24 : _r = build_zero_cst (type);
2269 24 : if (TREE_SIDE_EFFECTS (captures[0]))
2270 14 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2271 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 619, __FILE__, __LINE__, true);
2272 24 : return _r;
2273 : }
2274 : next_after_fail752:;
2275 : }
2276 : else
2277 : {
2278 1 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail753;
2279 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail753;
2280 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail753;
2281 1 : {
2282 1 : tree res_op0;
2283 1 : res_op0 = captures[0];
2284 1 : tree res_op1;
2285 1 : res_op1 = build_int_cst (TREE_TYPE (captures[1]), prec - 1);
2286 1 : tree _r;
2287 1 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2288 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 620, __FILE__, __LINE__, true);
2289 1 : return _r;
2290 : }
2291 : next_after_fail753:;
2292 : }
2293 : }
2294 : }
2295 : else
2296 : {
2297 61 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail754;
2298 61 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail754;
2299 61 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail754;
2300 61 : {
2301 61 : tree res_op0;
2302 61 : res_op0 = captures[0];
2303 61 : tree res_op1;
2304 61 : res_op1 = build_int_cst (TREE_TYPE (captures[1]), low);
2305 61 : tree _r;
2306 61 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2307 61 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 621, __FILE__, __LINE__, true);
2308 61 : return _r;
2309 : }
2310 : next_after_fail754:;
2311 : }
2312 : }
2313 : }
2314 : }
2315 0 : return NULL_TREE;
2316 : }
2317 :
2318 : tree
2319 0 : generic_simplify_441 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2320 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
2321 : const combined_fn ARG_UNUSED (coss),
2322 : const combined_fn ARG_UNUSED (atans),
2323 : const combined_fn ARG_UNUSED (sqrts),
2324 : const combined_fn ARG_UNUSED (copysigns))
2325 : {
2326 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2327 0 : {
2328 0 : REAL_VALUE_TYPE r_cst;
2329 0 : build_sinatan_real (&r_cst, type);
2330 0 : tree t_cst = build_real (type, r_cst);
2331 0 : tree t_one = build_one_cst (type);
2332 0 : tree t_zero = build_zero_cst (type);
2333 0 : if (SCALAR_FLOAT_TYPE_P (type)
2334 : )
2335 : {
2336 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail788;
2337 0 : {
2338 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail788;
2339 0 : tree res_op0;
2340 0 : {
2341 0 : tree _o1[2], _r1;
2342 0 : {
2343 0 : tree _o2[1], _r2;
2344 0 : _o2[0] = unshare_expr (captures[1]);
2345 0 : _r2 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
2346 0 : _o1[0] = _r2;
2347 : }
2348 0 : _o1[1] = t_cst;
2349 0 : _r1 = fold_build2_loc (loc, LT_EXPR, boolean_type_node, _o1[0], _o1[1]);
2350 0 : res_op0 = _r1;
2351 : }
2352 0 : tree res_op1;
2353 0 : {
2354 0 : tree _o1[2], _r1;
2355 0 : _o1[0] = t_one;
2356 0 : {
2357 0 : tree _o2[1], _r2;
2358 0 : {
2359 0 : tree _o3[2], _r3;
2360 0 : {
2361 0 : tree _o4[2], _r4;
2362 0 : _o4[0] = unshare_expr (captures[1]);
2363 0 : _o4[1] = unshare_expr (captures[1]);
2364 0 : _r4 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o4[0]), _o4[0], _o4[1]);
2365 0 : _o3[0] = _r4;
2366 : }
2367 0 : _o3[1] = t_one;
2368 0 : _r3 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
2369 0 : _o2[0] = _r3;
2370 : }
2371 0 : _r2 = maybe_build_call_expr_loc (loc, sqrts, TREE_TYPE (_o2[0]), 1, _o2[0]);
2372 0 : if (!_r2)
2373 0 : goto next_after_fail788;
2374 0 : _o1[1] = _r2;
2375 : }
2376 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2377 0 : res_op1 = _r1;
2378 : }
2379 0 : tree res_op2;
2380 0 : {
2381 0 : tree _o1[2], _r1;
2382 0 : _o1[0] = t_zero;
2383 0 : _o1[1] = captures[1];
2384 0 : _r1 = maybe_build_call_expr_loc (loc, copysigns, TREE_TYPE (_o1[0]), 2, _o1[0], _o1[1]);
2385 0 : if (!_r1)
2386 0 : goto next_after_fail788;
2387 0 : res_op2 = _r1;
2388 : }
2389 0 : tree _r;
2390 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
2391 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 642, __FILE__, __LINE__, true);
2392 0 : return _r;
2393 : }
2394 0 : next_after_fail788:;
2395 : }
2396 : }
2397 0 : return NULL_TREE;
2398 : }
2399 :
2400 : tree
2401 0 : generic_simplify_447 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2402 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2403 : {
2404 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2405 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail794;
2406 0 : {
2407 0 : tree _r;
2408 0 : _r = captures[0];
2409 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2410 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2411 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 648, __FILE__, __LINE__, true);
2412 : return _r;
2413 : }
2414 0 : next_after_fail794:;
2415 0 : return NULL_TREE;
2416 : }
2417 :
2418 : tree
2419 0 : generic_simplify_451 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2420 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2421 : const combined_fn ARG_UNUSED (HYPOT))
2422 : {
2423 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2424 0 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
2425 : )
2426 : {
2427 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail798;
2428 0 : {
2429 0 : tree res_op0;
2430 0 : {
2431 0 : tree _o1[1], _r1;
2432 0 : _o1[0] = captures[0];
2433 0 : _r1 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2434 0 : res_op0 = _r1;
2435 : }
2436 0 : tree res_op1;
2437 0 : res_op1 = build_real_truncate (type, dconst_sqrt2 ());
2438 0 : tree _r;
2439 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
2440 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 652, __FILE__, __LINE__, true);
2441 0 : return _r;
2442 : }
2443 0 : next_after_fail798:;
2444 : }
2445 : return NULL_TREE;
2446 : }
2447 :
2448 : tree
2449 1 : generic_simplify_456 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2450 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2451 : {
2452 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2453 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail803;
2454 1 : {
2455 1 : tree res_op0;
2456 1 : res_op0 = captures[0];
2457 1 : tree res_op1;
2458 1 : res_op1 = captures[1];
2459 1 : tree _r;
2460 1 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2461 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 657, __FILE__, __LINE__, true);
2462 : return _r;
2463 : }
2464 0 : next_after_fail803:;
2465 0 : return NULL_TREE;
2466 : }
2467 :
2468 : tree
2469 915619 : generic_simplify_462 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2470 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2471 : const enum tree_code ARG_UNUSED (op))
2472 : {
2473 915619 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2474 915619 : {
2475 915619 : tree pmop[2];
2476 915619 : tree utype = fold_bit_and_mask (TREE_TYPE (captures[1]), captures[3], op, captures[1], ERROR_MARK,
2477 : NULL_TREE, NULL_TREE, captures[2], ERROR_MARK,
2478 : NULL_TREE, NULL_TREE, pmop);
2479 915619 : if (utype
2480 : )
2481 : {
2482 321842 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail809;
2483 321842 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail809;
2484 321842 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail809;
2485 321842 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail809;
2486 321842 : {
2487 321842 : tree res_op0;
2488 321842 : {
2489 321842 : tree _o1[2], _r1;
2490 321842 : {
2491 321842 : tree _o2[2], _r2;
2492 321842 : {
2493 321842 : tree _o3[1], _r3;
2494 321842 : _o3[0] = pmop[0];
2495 321842 : if (TREE_TYPE (_o3[0]) != utype)
2496 : {
2497 202 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
2498 : }
2499 : else
2500 : _r3 = _o3[0];
2501 321842 : _o2[0] = _r3;
2502 : }
2503 321842 : {
2504 321842 : tree _o3[1], _r3;
2505 321842 : _o3[0] = pmop[1];
2506 321842 : if (TREE_TYPE (_o3[0]) != utype)
2507 : {
2508 202 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
2509 : }
2510 : else
2511 : _r3 = _o3[0];
2512 321842 : _o2[1] = _r3;
2513 : }
2514 321842 : _r2 = fold_build2_loc (loc, op, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2515 321842 : _o1[0] = _r2;
2516 : }
2517 321842 : {
2518 321842 : tree _o2[1], _r2;
2519 321842 : _o2[0] = captures[3];
2520 321842 : if (TREE_TYPE (_o2[0]) != utype)
2521 : {
2522 202 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2523 : }
2524 : else
2525 : _r2 = _o2[0];
2526 321842 : _o1[1] = _r2;
2527 : }
2528 321842 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2529 321842 : res_op0 = _r1;
2530 : }
2531 321842 : tree _r;
2532 321842 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2533 321842 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 662, __FILE__, __LINE__, true);
2534 321842 : return _r;
2535 : }
2536 593777 : next_after_fail809:;
2537 : }
2538 : }
2539 593777 : return NULL_TREE;
2540 : }
2541 :
2542 : tree
2543 159 : generic_simplify_477 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2544 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2545 : const enum tree_code ARG_UNUSED (code2),
2546 : const enum tree_code ARG_UNUSED (code1))
2547 : {
2548 159 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2549 159 : if ((TREE_CODE (captures[2]) == INTEGER_CST
2550 47 : && TREE_CODE (captures[4]) == INTEGER_CST)
2551 159 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2552 14 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2]))
2553 4 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, code2))
2554 10 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
2555 102 : && operand_equal_p (captures[2], captures[4]))
2556 : )
2557 : {
2558 51 : {
2559 51 : int cmp = 0;
2560 51 : if (TREE_CODE (captures[2]) == INTEGER_CST
2561 47 : && TREE_CODE (captures[4]) == INTEGER_CST)
2562 47 : cmp = tree_int_cst_compare (captures[2], captures[4]);
2563 51 : if ((code1 == LT_EXPR || code1 == LE_EXPR)
2564 4 : && (code2 == LT_EXPR || code2 == LE_EXPR)
2565 : )
2566 : {
2567 0 : if ((cmp < 0) || (cmp == 0 && code1 == LT_EXPR)
2568 : )
2569 : {
2570 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail838;
2571 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail838;
2572 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail838;
2573 0 : {
2574 0 : tree _r;
2575 0 : _r = captures[0];
2576 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 683, __FILE__, __LINE__, true);
2577 0 : return _r;
2578 : }
2579 : next_after_fail838:;
2580 : }
2581 : else
2582 : {
2583 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail839;
2584 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail839;
2585 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail839;
2586 0 : {
2587 0 : tree _r;
2588 0 : _r = captures[3];
2589 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 684, __FILE__, __LINE__, true);
2590 0 : return _r;
2591 : }
2592 : next_after_fail839:;
2593 : }
2594 : }
2595 : else
2596 : {
2597 51 : if ((code1 == GT_EXPR || code1 == GE_EXPR)
2598 47 : && (code2 == GT_EXPR || code2 == GE_EXPR)
2599 : )
2600 : {
2601 0 : if ((cmp > 0) || (cmp == 0 && code1 == GT_EXPR)
2602 : )
2603 : {
2604 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail840;
2605 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail840;
2606 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail840;
2607 0 : {
2608 0 : tree _r;
2609 0 : _r = captures[0];
2610 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 685, __FILE__, __LINE__, true);
2611 0 : return _r;
2612 : }
2613 : next_after_fail840:;
2614 : }
2615 : else
2616 : {
2617 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail841;
2618 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail841;
2619 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail841;
2620 0 : {
2621 0 : tree _r;
2622 0 : _r = captures[3];
2623 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 686, __FILE__, __LINE__, true);
2624 0 : return _r;
2625 : }
2626 : next_after_fail841:;
2627 : }
2628 : }
2629 : else
2630 : {
2631 51 : if (cmp == 0
2632 4 : && ((code1 == LE_EXPR && code2 == GE_EXPR)
2633 4 : || (code1 == GE_EXPR && code2 == LE_EXPR))
2634 : )
2635 : {
2636 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail842;
2637 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail842;
2638 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail842;
2639 0 : {
2640 0 : tree res_op0;
2641 0 : res_op0 = captures[1];
2642 0 : tree res_op1;
2643 0 : res_op1 = captures[2];
2644 0 : tree _r;
2645 0 : _r = fold_build2_loc (loc, EQ_EXPR, type, res_op0, res_op1);
2646 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 687, __FILE__, __LINE__, true);
2647 0 : return _r;
2648 : }
2649 : next_after_fail842:;
2650 : }
2651 : else
2652 : {
2653 51 : if (cmp <= 0
2654 50 : && (code1 == LT_EXPR || code1 == LE_EXPR)
2655 4 : && (code2 == GT_EXPR || code2 == GE_EXPR)
2656 : )
2657 : {
2658 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail843;
2659 4 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail843;
2660 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail843;
2661 4 : {
2662 4 : tree _r;
2663 4 : _r = constant_boolean_node (false, type);
2664 4 : if (TREE_SIDE_EFFECTS (captures[1]))
2665 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2666 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 688, __FILE__, __LINE__, true);
2667 4 : return _r;
2668 : }
2669 : next_after_fail843:;
2670 : }
2671 : else
2672 : {
2673 46 : if (cmp >= 0
2674 1 : && (code1 == GT_EXPR || code1 == GE_EXPR)
2675 1 : && (code2 == LT_EXPR || code2 == LE_EXPR)
2676 : )
2677 : {
2678 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail844;
2679 1 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail844;
2680 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail844;
2681 1 : {
2682 1 : tree _r;
2683 1 : _r = constant_boolean_node (false, type);
2684 1 : if (TREE_SIDE_EFFECTS (captures[1]))
2685 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2686 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 689, __FILE__, __LINE__, true);
2687 1 : return _r;
2688 : }
2689 : next_after_fail844:;
2690 : }
2691 : }
2692 : }
2693 : }
2694 : }
2695 : }
2696 : }
2697 : return NULL_TREE;
2698 : }
2699 :
2700 : tree
2701 34 : generic_simplify_494 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2702 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2703 : const combined_fn ARG_UNUSED (bswap))
2704 : {
2705 34 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2706 34 : if (BITS_PER_UNIT == 8
2707 34 : && tree_fits_uhwi_p (captures[2])
2708 34 : && tree_to_uhwi (captures[2]) < 256
2709 : )
2710 : {
2711 32 : {
2712 32 : unsigned HOST_WIDE_INT prec = TYPE_PRECISION (TREE_TYPE (captures[0]));
2713 32 : tree utype = unsigned_type_for (TREE_TYPE (captures[1]));
2714 32 : tree nst = build_int_cst (integer_type_node, prec - 8);
2715 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail884;
2716 32 : {
2717 32 : tree res_op0;
2718 32 : {
2719 32 : tree _o1[1], _r1;
2720 32 : {
2721 32 : tree _o2[2], _r2;
2722 32 : {
2723 32 : tree _o3[1], _r3;
2724 32 : _o3[0] = captures[1];
2725 32 : if (TREE_TYPE (_o3[0]) != utype)
2726 : {
2727 0 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
2728 : }
2729 : else
2730 : _r3 = _o3[0];
2731 32 : _o2[0] = _r3;
2732 : }
2733 32 : _o2[1] = nst;
2734 32 : _r2 = fold_build2_loc (loc, RSHIFT_EXPR, utype, _o2[0], _o2[1]);
2735 32 : _o1[0] = _r2;
2736 : }
2737 32 : if (TREE_TYPE (_o1[0]) != type)
2738 : {
2739 18 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2740 : }
2741 : else
2742 : _r1 = _o1[0];
2743 32 : res_op0 = _r1;
2744 : }
2745 32 : tree res_op1;
2746 32 : res_op1 = captures[2];
2747 32 : tree _r;
2748 32 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2749 32 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 699, __FILE__, __LINE__, true);
2750 32 : return _r;
2751 : }
2752 0 : next_after_fail884:;
2753 : }
2754 : }
2755 : return NULL_TREE;
2756 : }
2757 :
2758 : tree
2759 0 : generic_simplify_497 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2760 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2761 : {
2762 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2763 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail887;
2764 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail887;
2765 0 : {
2766 0 : tree _r;
2767 0 : _r = captures[1];
2768 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 701, __FILE__, __LINE__, true);
2769 : return _r;
2770 : }
2771 : next_after_fail887:;
2772 : return NULL_TREE;
2773 : }
2774 :
2775 : tree
2776 28 : generic_simplify_502 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2777 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
2778 : {
2779 28 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2780 28 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
2781 28 : || !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2782 : )
2783 : {
2784 28 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail893;
2785 28 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail893;
2786 28 : {
2787 28 : tree res_op0;
2788 28 : {
2789 28 : tree _o1[1], _r1;
2790 28 : _o1[0] = captures[0];
2791 28 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2792 28 : res_op0 = _r1;
2793 : }
2794 28 : tree _r;
2795 28 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2796 28 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 707, __FILE__, __LINE__, true);
2797 28 : return _r;
2798 : }
2799 : next_after_fail893:;
2800 : }
2801 : return NULL_TREE;
2802 : }
2803 :
2804 : tree
2805 0 : generic_simplify_510 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2806 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
2807 : const enum tree_code ARG_UNUSED (rotate))
2808 : {
2809 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2810 0 : if ((element_precision (TREE_TYPE (captures[2]))
2811 0 : <= element_precision (TREE_TYPE (captures[3]))
2812 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[3])))
2813 0 : && (element_precision (type) <= element_precision (TREE_TYPE (captures[2]))
2814 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[2])))
2815 : )
2816 : {
2817 0 : {
2818 0 : tree rotate_type = TREE_TYPE (captures[2]);
2819 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail901;
2820 0 : {
2821 0 : tree res_op0;
2822 0 : {
2823 0 : tree _o1[2], _r1;
2824 0 : {
2825 0 : tree _o2[1], _r2;
2826 0 : _o2[0] = captures[3];
2827 0 : if (TREE_TYPE (_o2[0]) != rotate_type)
2828 : {
2829 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, rotate_type, _o2[0]);
2830 : }
2831 : else
2832 : _r2 = _o2[0];
2833 0 : _o1[0] = _r2;
2834 : }
2835 0 : _o1[1] = captures[4];
2836 0 : _r1 = fold_build2_loc (loc, rotate, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2837 0 : res_op0 = _r1;
2838 : }
2839 0 : tree _r;
2840 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2841 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 714, __FILE__, __LINE__, true);
2842 0 : return _r;
2843 : }
2844 0 : next_after_fail901:;
2845 : }
2846 : }
2847 : return NULL_TREE;
2848 : }
2849 :
2850 : tree
2851 0 : generic_simplify_521 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2852 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2853 : const enum tree_code ARG_UNUSED (minmax))
2854 : {
2855 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2856 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail914;
2857 0 : {
2858 0 : tree _r;
2859 0 : _r = captures[0];
2860 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 726, __FILE__, __LINE__, true);
2861 : return _r;
2862 : }
2863 0 : next_after_fail914:;
2864 0 : return NULL_TREE;
2865 : }
2866 :
2867 : tree
2868 0 : generic_simplify_527 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2869 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2870 : const enum tree_code ARG_UNUSED (minmax))
2871 : {
2872 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2873 0 : if (INTEGRAL_TYPE_P (type)
2874 0 : && TYPE_OVERFLOW_UNDEFINED (type)
2875 0 : && !TYPE_OVERFLOW_SANITIZED (type)
2876 : )
2877 : {
2878 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail920;
2879 0 : {
2880 0 : tree res_op0;
2881 0 : {
2882 0 : tree _o1[2], _r1;
2883 0 : _o1[0] = captures[1];
2884 0 : _o1[1] = captures[4];
2885 0 : _r1 = fold_build2_loc (loc, minmax, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2886 0 : res_op0 = _r1;
2887 : }
2888 0 : tree res_op1;
2889 0 : res_op1 = captures[2];
2890 0 : tree _r;
2891 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
2892 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 731, __FILE__, __LINE__, true);
2893 0 : return _r;
2894 : }
2895 0 : next_after_fail920:;
2896 : }
2897 : return NULL_TREE;
2898 : }
2899 :
2900 : tree
2901 2 : generic_simplify_536 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2902 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2903 : {
2904 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2905 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail943;
2906 2 : {
2907 2 : tree _r;
2908 2 : _r = captures[1];
2909 2 : if (TREE_SIDE_EFFECTS (captures[0]))
2910 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2911 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 742, __FILE__, __LINE__, true);
2912 : return _r;
2913 : }
2914 0 : next_after_fail943:;
2915 0 : return NULL_TREE;
2916 : }
2917 :
2918 : tree
2919 0 : generic_simplify_541 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2920 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2921 : const combined_fn ARG_UNUSED (FMAX_ALL))
2922 : {
2923 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2924 0 : if (flag_finite_math_only
2925 : )
2926 : {
2927 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail948;
2928 0 : {
2929 0 : tree res_op0;
2930 0 : res_op0 = captures[0];
2931 0 : tree res_op1;
2932 0 : res_op1 = captures[1];
2933 0 : tree _r;
2934 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
2935 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 747, __FILE__, __LINE__, true);
2936 0 : return _r;
2937 : }
2938 0 : next_after_fail948:;
2939 : }
2940 : return NULL_TREE;
2941 : }
2942 :
2943 : tree
2944 0 : generic_simplify_547 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2945 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
2946 : const combined_fn ARG_UNUSED (cond_op))
2947 : {
2948 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2949 0 : {
2950 0 : tree op_type = TREE_TYPE (captures[3]);
2951 0 : if (element_precision (type) == element_precision (op_type)
2952 : )
2953 : {
2954 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail954;
2955 0 : {
2956 0 : tree res_op0;
2957 0 : {
2958 0 : tree _o1[4], _r1;
2959 0 : _o1[0] = captures[0];
2960 0 : _o1[1] = captures[1];
2961 0 : _o1[2] = captures[2];
2962 0 : {
2963 0 : tree _o2[1], _r2;
2964 0 : _o2[0] = captures[4];
2965 0 : if (TREE_TYPE (_o2[0]) != op_type)
2966 : {
2967 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, op_type, _o2[0]);
2968 : }
2969 : else
2970 : _r2 = _o2[0];
2971 0 : _o1[3] = _r2;
2972 : }
2973 0 : _r1 = maybe_build_call_expr_loc (loc, cond_op, TREE_TYPE (_o1[1]), 4, _o1[0], _o1[1], _o1[2], _o1[3]);
2974 0 : if (!_r1)
2975 0 : goto next_after_fail954;
2976 0 : res_op0 = _r1;
2977 : }
2978 0 : tree _r;
2979 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
2980 0 : if (TREE_SIDE_EFFECTS (captures[3]))
2981 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
2982 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 748, __FILE__, __LINE__, true);
2983 0 : return _r;
2984 : }
2985 : next_after_fail954:;
2986 : }
2987 : }
2988 : return NULL_TREE;
2989 : }
2990 :
2991 : tree
2992 0 : generic_simplify_557 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2993 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2994 : const enum tree_code ARG_UNUSED (rotate))
2995 : {
2996 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2997 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail964;
2998 0 : {
2999 0 : tree _r;
3000 0 : _r = captures[0];
3001 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3002 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3003 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 758, __FILE__, __LINE__, true);
3004 : return _r;
3005 : }
3006 0 : next_after_fail964:;
3007 0 : return NULL_TREE;
3008 : }
3009 :
3010 : tree
3011 60 : generic_simplify_566 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3012 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3013 : const enum tree_code ARG_UNUSED (cmp))
3014 : {
3015 60 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3016 60 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail976;
3017 60 : {
3018 60 : tree _r;
3019 60 : _r = constant_boolean_node (true, type);
3020 60 : if (TREE_SIDE_EFFECTS (captures[0]))
3021 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
3022 60 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 770, __FILE__, __LINE__, true);
3023 : return _r;
3024 : }
3025 0 : next_after_fail976:;
3026 0 : return NULL_TREE;
3027 : }
3028 :
3029 : tree
3030 0 : generic_simplify_573 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3031 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3032 : const combined_fn ARG_UNUSED (sins),
3033 : const combined_fn ARG_UNUSED (atans),
3034 : const combined_fn ARG_UNUSED (sqrts),
3035 : const combined_fn ARG_UNUSED (copysigns))
3036 : {
3037 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3038 0 : {
3039 0 : REAL_VALUE_TYPE r_cst;
3040 0 : build_sinatan_real (&r_cst, type);
3041 0 : tree t_cst = build_real (type, r_cst);
3042 0 : tree t_one = build_one_cst (type);
3043 0 : if (SCALAR_FLOAT_TYPE_P (type)
3044 : )
3045 : {
3046 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail983;
3047 0 : {
3048 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail983;
3049 0 : tree res_op0;
3050 0 : {
3051 0 : tree _o1[2], _r1;
3052 0 : {
3053 0 : tree _o2[1], _r2;
3054 0 : _o2[0] = unshare_expr (captures[1]);
3055 0 : _r2 = fold_build1_loc (loc, ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
3056 0 : _o1[0] = _r2;
3057 : }
3058 0 : _o1[1] = t_cst;
3059 0 : _r1 = fold_build2_loc (loc, LT_EXPR, boolean_type_node, _o1[0], _o1[1]);
3060 0 : res_op0 = _r1;
3061 : }
3062 0 : tree res_op1;
3063 0 : {
3064 0 : tree _o1[2], _r1;
3065 0 : _o1[0] = unshare_expr (captures[1]);
3066 0 : {
3067 0 : tree _o2[1], _r2;
3068 0 : {
3069 0 : tree _o3[2], _r3;
3070 0 : {
3071 0 : tree _o4[2], _r4;
3072 0 : _o4[0] = unshare_expr (captures[1]);
3073 0 : _o4[1] = unshare_expr (captures[1]);
3074 0 : _r4 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o4[0]), _o4[0], _o4[1]);
3075 0 : _o3[0] = _r4;
3076 : }
3077 0 : _o3[1] = t_one;
3078 0 : _r3 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
3079 0 : _o2[0] = _r3;
3080 : }
3081 0 : _r2 = maybe_build_call_expr_loc (loc, sqrts, TREE_TYPE (_o2[0]), 1, _o2[0]);
3082 0 : if (!_r2)
3083 0 : goto next_after_fail983;
3084 0 : _o1[1] = _r2;
3085 : }
3086 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3087 0 : res_op1 = _r1;
3088 : }
3089 0 : tree res_op2;
3090 0 : {
3091 0 : tree _o1[2], _r1;
3092 0 : _o1[0] = t_one;
3093 0 : _o1[1] = captures[1];
3094 0 : _r1 = maybe_build_call_expr_loc (loc, copysigns, TREE_TYPE (_o1[0]), 2, _o1[0], _o1[1]);
3095 0 : if (!_r1)
3096 0 : goto next_after_fail983;
3097 0 : res_op2 = _r1;
3098 : }
3099 0 : tree _r;
3100 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
3101 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 777, __FILE__, __LINE__, true);
3102 0 : return _r;
3103 : }
3104 0 : next_after_fail983:;
3105 : }
3106 : }
3107 0 : return NULL_TREE;
3108 : }
3109 :
3110 : tree
3111 0 : generic_simplify_595 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3112 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
3113 : {
3114 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3115 0 : if (canonicalize_math_after_vectorization_p ()
3116 : )
3117 : {
3118 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1005;
3119 : {
3120 : tree res_op0;
3121 : res_op0 = captures[0];
3122 : tree res_op1;
3123 : res_op1 = captures[1];
3124 : tree res_op2;
3125 : res_op2 = captures[2];
3126 : tree _r;
3127 : _r = maybe_build_call_expr_loc (loc, CFN_FNMS, type, 3, res_op0, res_op1, res_op2);
3128 : if (!_r)
3129 : goto next_after_fail1005;
3130 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 799, __FILE__, __LINE__, true);
3131 : return _r;
3132 : }
3133 0 : next_after_fail1005:;
3134 : }
3135 0 : return NULL_TREE;
3136 : }
3137 :
3138 : tree
3139 0 : generic_simplify_604 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3140 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree ARG_UNUSED (_p3), tree ARG_UNUSED (_p4), tree *ARG_UNUSED (captures))
3141 : {
3142 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3143 0 : if (canonicalize_math_after_vectorization_p ()
3144 : )
3145 : {
3146 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1014;
3147 : {
3148 : tree res_op0;
3149 : res_op0 = captures[0];
3150 : tree res_op1;
3151 : res_op1 = captures[1];
3152 : tree res_op2;
3153 : res_op2 = captures[2];
3154 : tree res_op3;
3155 : res_op3 = captures[3];
3156 : tree res_op4;
3157 : res_op4 = captures[4];
3158 : tree _r;
3159 : _r = maybe_build_call_expr_loc (loc, CFN_COND_FNMA, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3160 : if (!_r)
3161 : goto next_after_fail1014;
3162 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 808, __FILE__, __LINE__, true);
3163 : return _r;
3164 : }
3165 0 : next_after_fail1014:;
3166 : }
3167 0 : return NULL_TREE;
3168 : }
3169 :
3170 : tree
3171 0 : generic_simplify_613 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3172 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3173 : const combined_fn ARG_UNUSED (bswap),
3174 : const combined_fn ARG_UNUSED (popcount))
3175 : {
3176 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3177 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3178 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3179 : )
3180 : {
3181 0 : {
3182 0 : tree type0 = TREE_TYPE (captures[0]);
3183 0 : tree type1 = TREE_TYPE (captures[1]);
3184 0 : unsigned int prec0 = TYPE_PRECISION (type0);
3185 0 : unsigned int prec1 = TYPE_PRECISION (type1);
3186 0 : if (prec0 == prec1 || (prec0 > prec1 && TYPE_UNSIGNED (type1))
3187 : )
3188 : {
3189 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1023;
3190 0 : {
3191 0 : tree res_op0;
3192 0 : {
3193 0 : tree _o1[1], _r1;
3194 0 : {
3195 0 : tree _o2[1], _r2;
3196 0 : _o2[0] = captures[2];
3197 0 : if (TREE_TYPE (_o2[0]) != type1)
3198 : {
3199 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, type1, _o2[0]);
3200 : }
3201 : else
3202 : _r2 = _o2[0];
3203 0 : _o1[0] = _r2;
3204 : }
3205 0 : if (TREE_TYPE (_o1[0]) != type0)
3206 : {
3207 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type0, _o1[0]);
3208 : }
3209 : else
3210 : _r1 = _o1[0];
3211 0 : res_op0 = _r1;
3212 : }
3213 0 : tree _r;
3214 0 : _r = maybe_build_call_expr_loc (loc, popcount, type, 1, res_op0);
3215 0 : if (!_r)
3216 0 : goto next_after_fail1023;
3217 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 814, __FILE__, __LINE__, true);
3218 0 : return _r;
3219 : }
3220 : next_after_fail1023:;
3221 : }
3222 : }
3223 : }
3224 : return NULL_TREE;
3225 : }
3226 :
3227 : tree
3228 0 : generic_simplify_625 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3229 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3230 : const combined_fn ARG_UNUSED (reduc))
3231 : {
3232 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3233 0 : {
3234 0 : tree ctor = (TREE_CODE (captures[0]) == SSA_NAME
3235 0 : ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])) : captures[0]);
3236 0 : tree elt = ctor_single_nonzero_element (ctor);
3237 0 : if (elt
3238 0 : && types_match (type, TREE_TYPE (elt))
3239 0 : && !HONOR_SNANS (type)
3240 0 : && !HONOR_SIGNED_ZEROS (type)
3241 : )
3242 : {
3243 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1036;
3244 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1036;
3245 0 : {
3246 0 : tree _r;
3247 0 : _r = elt;
3248 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 823, __FILE__, __LINE__, true);
3249 0 : return _r;
3250 : }
3251 : next_after_fail1036:;
3252 : }
3253 : }
3254 : return NULL_TREE;
3255 : }
3256 :
3257 : tree
3258 6368254 : generic_simplify_FLOAT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
3259 : {
3260 6368254 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3261 6368254 : {
3262 6368254 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
3263 12736508 : if ((
3264 :
3265 : && useless_type_conversion_p (type, TREE_TYPE (captures[0])))
3266 : || (
3267 : 1
3268 6368254 : && type == TREE_TYPE (captures[0]))
3269 : )
3270 : {
3271 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1103;
3272 0 : {
3273 0 : tree _r;
3274 0 : _r = captures[0];
3275 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 837, __FILE__, __LINE__, true);
3276 0 : return _r;
3277 : }
3278 0 : next_after_fail1103:;
3279 : }
3280 : }
3281 6368254 : switch (TREE_CODE (_p0))
3282 : {
3283 543837 : CASE_CONVERT:
3284 543837 : {
3285 543837 : tree _q20 = TREE_OPERAND (_p0, 0);
3286 543837 : {
3287 543837 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
3288 543837 : {
3289 543837 : tree inside_type = TREE_TYPE (captures[1]);
3290 543837 : tree inter_type = TREE_TYPE (captures[0]);
3291 543837 : int inside_int = INTEGRAL_TYPE_P (inside_type);
3292 543837 : int inside_ptr = POINTER_TYPE_P (inside_type);
3293 543837 : int inside_float = FLOAT_TYPE_P (inside_type);
3294 543837 : int inside_vec = VECTOR_TYPE_P (inside_type);
3295 543837 : unsigned int inside_prec = element_precision (inside_type);
3296 543837 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
3297 543837 : int inter_int = INTEGRAL_TYPE_P (inter_type);
3298 543837 : int inter_ptr = POINTER_TYPE_P (inter_type);
3299 543837 : int inter_float = FLOAT_TYPE_P (inter_type);
3300 543837 : int inter_vec = VECTOR_TYPE_P (inter_type);
3301 543837 : unsigned int inter_prec = element_precision (inter_type);
3302 543837 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
3303 543837 : int final_int = INTEGRAL_TYPE_P (type);
3304 543837 : int final_ptr = POINTER_TYPE_P (type);
3305 543837 : int final_float = FLOAT_TYPE_P (type);
3306 543837 : int final_vec = VECTOR_TYPE_P (type);
3307 543837 : unsigned int final_prec = element_precision (type);
3308 543837 : int final_unsignedp = TYPE_UNSIGNED (type);
3309 543837 : if (((
3310 :
3311 : && useless_type_conversion_p (type, inside_type))
3312 : || (
3313 : 1
3314 543837 : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
3315 0 : && (((inter_int || inter_ptr) && final_int)
3316 0 : || (inter_float && final_float))
3317 543837 : && inter_prec >= final_prec
3318 : )
3319 : {
3320 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1104;
3321 0 : {
3322 0 : tree res_op0;
3323 0 : res_op0 = captures[1];
3324 0 : tree _r;
3325 0 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3326 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 838, __FILE__, __LINE__, true);
3327 0 : return _r;
3328 : }
3329 0 : next_after_fail1104:;
3330 : }
3331 : else
3332 : {
3333 543837 : if (((inter_int && inside_int) || (inter_float && inside_float))
3334 543831 : && (final_int || final_float)
3335 543831 : && inter_prec >= inside_prec
3336 542844 : && (inter_float || inter_unsignedp == inside_unsignedp)
3337 : )
3338 : {
3339 540457 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1105;
3340 540457 : {
3341 540457 : tree res_op0;
3342 540457 : res_op0 = captures[1];
3343 540457 : tree _r;
3344 540457 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3345 540457 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 839, __FILE__, __LINE__, true);
3346 540457 : return _r;
3347 : }
3348 0 : next_after_fail1105:;
3349 0 : }
3350 : else
3351 : {
3352 3380 : if (inside_int && inter_int && final_int
3353 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
3354 0 : && inside_unsignedp && !inter_unsignedp)
3355 0 : || final_prec == inter_prec
3356 0 : || (inside_prec < inter_prec && inter_prec > final_prec
3357 0 : && !inside_unsignedp && inter_unsignedp))
3358 : )
3359 : {
3360 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1106;
3361 0 : {
3362 0 : tree res_op0;
3363 0 : res_op0 = captures[1];
3364 0 : tree _r;
3365 0 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3366 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 840, __FILE__, __LINE__, true);
3367 0 : return _r;
3368 : }
3369 0 : next_after_fail1106:;
3370 0 : }
3371 : else
3372 : {
3373 3380 : if (! inside_float && ! inter_float && ! final_float
3374 : && ! inside_vec && ! inter_vec && ! final_vec
3375 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
3376 0 : && ! (inside_int && inter_int
3377 0 : && inter_unsignedp != inside_unsignedp
3378 0 : && inter_prec < final_prec)
3379 0 : && ((inter_unsignedp && inter_prec > inside_prec)
3380 0 : == (final_unsignedp && final_prec > inter_prec))
3381 0 : && ! (inside_ptr && inter_prec != final_prec)
3382 0 : && ! (final_ptr && inside_prec != inter_prec)
3383 : )
3384 : {
3385 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1107;
3386 0 : {
3387 0 : tree res_op0;
3388 0 : res_op0 = captures[1];
3389 0 : tree _r;
3390 0 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3391 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 841, __FILE__, __LINE__, true);
3392 0 : return _r;
3393 : }
3394 0 : next_after_fail1107:;
3395 0 : }
3396 : else
3397 : {
3398 3380 : if (inside_int && inter_int && final_int
3399 3374 : && final_prec <= inside_prec
3400 0 : && inter_prec >= inside_prec
3401 : )
3402 : {
3403 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1108;
3404 0 : {
3405 0 : tree res_op0;
3406 0 : res_op0 = captures[1];
3407 0 : tree _r;
3408 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3409 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
3410 0 : return _r;
3411 : }
3412 0 : next_after_fail1108:;
3413 0 : }
3414 : else
3415 : {
3416 : if (0
3417 : && final_int && inter_int && inside_int
3418 : && final_prec >= inside_prec
3419 : && inside_prec > inter_prec
3420 : && inter_unsignedp
3421 : )
3422 : {
3423 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1109;
3424 : {
3425 : tree res_op0;
3426 : {
3427 : tree _o1[2], _r1;
3428 : _o1[0] = captures[1];
3429 : _o1[1] = wide_int_to_tree
3430 : (inside_type,
3431 : wi::mask (inter_prec, false,
3432 : TYPE_PRECISION (inside_type)));
3433 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3434 : res_op0 = _r1;
3435 : }
3436 : tree _r;
3437 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3438 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 843, __FILE__, __LINE__, true);
3439 : return _r;
3440 : }
3441 : next_after_fail1109:;
3442 : }
3443 : else
3444 : {
3445 : if (0
3446 : && inside_int && inter_float && final_int &&
3447 : (unsigned) significand_size (TYPE_MODE (inter_type))
3448 : >= inside_prec - !inside_unsignedp
3449 : )
3450 : {
3451 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1110;
3452 : {
3453 : tree res_op0;
3454 : res_op0 = captures[1];
3455 : tree _r;
3456 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3457 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 844, __FILE__, __LINE__, true);
3458 : return _r;
3459 : }
3460 : next_after_fail1110:;
3461 : }
3462 : }
3463 : }
3464 : }
3465 : }
3466 : }
3467 : }
3468 : }
3469 : }
3470 3380 : break;
3471 : }
3472 0 : case FLOAT_EXPR:
3473 0 : {
3474 0 : tree _q20 = TREE_OPERAND (_p0, 0);
3475 0 : {
3476 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
3477 0 : {
3478 0 : tree inside_type = TREE_TYPE (captures[1]);
3479 0 : tree inter_type = TREE_TYPE (captures[0]);
3480 0 : int inside_int = INTEGRAL_TYPE_P (inside_type);
3481 0 : int inside_ptr = POINTER_TYPE_P (inside_type);
3482 0 : int inside_float = FLOAT_TYPE_P (inside_type);
3483 0 : int inside_vec = VECTOR_TYPE_P (inside_type);
3484 0 : unsigned int inside_prec = element_precision (inside_type);
3485 0 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
3486 0 : int inter_int = INTEGRAL_TYPE_P (inter_type);
3487 0 : int inter_ptr = POINTER_TYPE_P (inter_type);
3488 0 : int inter_float = FLOAT_TYPE_P (inter_type);
3489 0 : int inter_vec = VECTOR_TYPE_P (inter_type);
3490 0 : unsigned int inter_prec = element_precision (inter_type);
3491 0 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
3492 0 : int final_int = INTEGRAL_TYPE_P (type);
3493 0 : int final_ptr = POINTER_TYPE_P (type);
3494 0 : int final_float = FLOAT_TYPE_P (type);
3495 0 : int final_vec = VECTOR_TYPE_P (type);
3496 0 : unsigned int final_prec = element_precision (type);
3497 0 : int final_unsignedp = TYPE_UNSIGNED (type);
3498 0 : if (((
3499 :
3500 : && useless_type_conversion_p (type, inside_type))
3501 : || (
3502 : 1
3503 0 : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
3504 0 : && (((inter_int || inter_ptr) && final_int)
3505 0 : || (inter_float && final_float))
3506 0 : && inter_prec >= final_prec
3507 : )
3508 : {
3509 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1111;
3510 0 : {
3511 0 : tree res_op0;
3512 0 : res_op0 = captures[1];
3513 0 : tree _r;
3514 0 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3515 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 838, __FILE__, __LINE__, true);
3516 0 : return _r;
3517 : }
3518 0 : next_after_fail1111:;
3519 : }
3520 : else
3521 : {
3522 0 : if (((inter_int && inside_int) || (inter_float && inside_float))
3523 0 : && (final_int || final_float)
3524 0 : && inter_prec >= inside_prec
3525 0 : && (inter_float || inter_unsignedp == inside_unsignedp)
3526 : )
3527 : {
3528 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1112;
3529 0 : {
3530 0 : tree res_op0;
3531 0 : res_op0 = captures[1];
3532 0 : tree _r;
3533 0 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3534 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 839, __FILE__, __LINE__, true);
3535 0 : return _r;
3536 : }
3537 0 : next_after_fail1112:;
3538 0 : }
3539 : else
3540 : {
3541 0 : if (inside_int && inter_int && final_int
3542 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
3543 0 : && inside_unsignedp && !inter_unsignedp)
3544 0 : || final_prec == inter_prec
3545 0 : || (inside_prec < inter_prec && inter_prec > final_prec
3546 0 : && !inside_unsignedp && inter_unsignedp))
3547 : )
3548 : {
3549 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1113;
3550 0 : {
3551 0 : tree res_op0;
3552 0 : res_op0 = captures[1];
3553 0 : tree _r;
3554 0 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3555 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 840, __FILE__, __LINE__, true);
3556 0 : return _r;
3557 : }
3558 0 : next_after_fail1113:;
3559 0 : }
3560 : else
3561 : {
3562 0 : if (! inside_float && ! inter_float && ! final_float
3563 : && ! inside_vec && ! inter_vec && ! final_vec
3564 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
3565 0 : && ! (inside_int && inter_int
3566 0 : && inter_unsignedp != inside_unsignedp
3567 0 : && inter_prec < final_prec)
3568 0 : && ((inter_unsignedp && inter_prec > inside_prec)
3569 0 : == (final_unsignedp && final_prec > inter_prec))
3570 0 : && ! (inside_ptr && inter_prec != final_prec)
3571 0 : && ! (final_ptr && inside_prec != inter_prec)
3572 : )
3573 : {
3574 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1114;
3575 0 : {
3576 0 : tree res_op0;
3577 0 : res_op0 = captures[1];
3578 0 : tree _r;
3579 0 : _r = fold_build1_loc (loc, FLOAT_EXPR, type, res_op0);
3580 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 841, __FILE__, __LINE__, true);
3581 0 : return _r;
3582 : }
3583 0 : next_after_fail1114:;
3584 0 : }
3585 : else
3586 : {
3587 0 : if (inside_int && inter_int && final_int
3588 0 : && final_prec <= inside_prec
3589 0 : && inter_prec >= inside_prec
3590 : )
3591 : {
3592 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1115;
3593 0 : {
3594 0 : tree res_op0;
3595 0 : res_op0 = captures[1];
3596 0 : tree _r;
3597 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3598 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
3599 0 : return _r;
3600 : }
3601 0 : next_after_fail1115:;
3602 0 : }
3603 : else
3604 : {
3605 : if (0
3606 : && final_int && inter_int && inside_int
3607 : && final_prec >= inside_prec
3608 : && inside_prec > inter_prec
3609 : && inter_unsignedp
3610 : )
3611 : {
3612 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1116;
3613 : {
3614 : tree res_op0;
3615 : {
3616 : tree _o1[2], _r1;
3617 : _o1[0] = captures[1];
3618 : _o1[1] = wide_int_to_tree
3619 : (inside_type,
3620 : wi::mask (inter_prec, false,
3621 : TYPE_PRECISION (inside_type)));
3622 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3623 : res_op0 = _r1;
3624 : }
3625 : tree _r;
3626 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3627 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 843, __FILE__, __LINE__, true);
3628 : return _r;
3629 : }
3630 : next_after_fail1116:;
3631 : }
3632 : else
3633 : {
3634 : if (0
3635 : && inside_int && inter_float && final_int &&
3636 : (unsigned) significand_size (TYPE_MODE (inter_type))
3637 : >= inside_prec - !inside_unsignedp
3638 : )
3639 : {
3640 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1117;
3641 : {
3642 : tree res_op0;
3643 : res_op0 = captures[1];
3644 : tree _r;
3645 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3646 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 844, __FILE__, __LINE__, true);
3647 : return _r;
3648 : }
3649 : next_after_fail1117:;
3650 : }
3651 : }
3652 : }
3653 : }
3654 : }
3655 : }
3656 : }
3657 : }
3658 : }
3659 0 : break;
3660 : }
3661 : default:;
3662 : }
3663 : return NULL_TREE;
3664 : }
3665 :
3666 : tree
3667 32995926 : generic_simplify_MINUS_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
3668 : {
3669 32995926 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3670 32995926 : if (integer_zerop (_p1))
3671 : {
3672 1994820 : {
3673 1994820 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
3674 1994820 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1271;
3675 1994820 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1271;
3676 1994820 : {
3677 1994820 : tree res_op0;
3678 1994820 : res_op0 = captures[0];
3679 1994820 : tree _r;
3680 1994820 : _r = non_lvalue_loc (loc, res_op0);
3681 1994820 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 889, __FILE__, __LINE__, true);
3682 1994820 : return _r;
3683 : }
3684 : next_after_fail1271:;
3685 : }
3686 : }
3687 31001106 : if (real_zerop (_p1))
3688 : {
3689 1140 : {
3690 1140 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
3691 1140 : if (fold_real_zero_addition_p (type, captures[0], captures[1], 1)
3692 : )
3693 : {
3694 752 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1272;
3695 752 : {
3696 752 : tree res_op0;
3697 752 : res_op0 = captures[0];
3698 752 : tree _r;
3699 752 : _r = non_lvalue_loc (loc, res_op0);
3700 752 : if (TREE_SIDE_EFFECTS (captures[1]))
3701 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3702 752 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 914, __FILE__, __LINE__, true);
3703 752 : return _r;
3704 : }
3705 0 : next_after_fail1272:;
3706 : }
3707 : }
3708 : }
3709 31000354 : switch (TREE_CODE (_p0))
3710 : {
3711 2276598 : case PLUS_EXPR:
3712 2276598 : {
3713 2276598 : tree _q20 = TREE_OPERAND (_p0, 0);
3714 2276598 : tree _q21 = TREE_OPERAND (_p0, 1);
3715 2276598 : switch (TREE_CODE (_q21))
3716 : {
3717 148787 : case REAL_CST:
3718 148787 : {
3719 148787 : switch (TREE_CODE (_p1))
3720 : {
3721 11 : case REAL_CST:
3722 11 : {
3723 11 : {
3724 11 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
3725 11 : tree res = generic_simplify_55 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR);
3726 11 : if (res) return res;
3727 : }
3728 8 : break;
3729 : }
3730 : default:;
3731 : }
3732 : break;
3733 : }
3734 : default:;
3735 : }
3736 : break;
3737 : }
3738 1223859 : case MINUS_EXPR:
3739 1223859 : {
3740 1223859 : tree _q20 = TREE_OPERAND (_p0, 0);
3741 1223859 : tree _q21 = TREE_OPERAND (_p0, 1);
3742 1223859 : switch (TREE_CODE (_q21))
3743 : {
3744 93544 : case REAL_CST:
3745 93544 : {
3746 93544 : switch (TREE_CODE (_p1))
3747 : {
3748 40 : case REAL_CST:
3749 40 : {
3750 40 : {
3751 40 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
3752 40 : tree res = generic_simplify_55 (loc, type, _p0, _p1, captures, MINUS_EXPR, MINUS_EXPR);
3753 40 : if (res) return res;
3754 : }
3755 38 : break;
3756 : }
3757 : default:;
3758 : }
3759 : break;
3760 : }
3761 : default:;
3762 : }
3763 : break;
3764 : }
3765 31000349 : default:;
3766 : }
3767 31000349 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
3768 : {
3769 226765 : {
3770 226765 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
3771 226023 : if (!FLOAT_TYPE_P (type)
3772 226793 : || (!tree_expr_maybe_nan_p (captures[0])
3773 107 : && !tree_expr_maybe_infinite_p (captures[0])
3774 15 : && (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
3775 1 : || !HONOR_SIGNED_ZEROS (type)))
3776 : )
3777 : {
3778 226009 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1273;
3779 226009 : {
3780 226009 : tree _r;
3781 226009 : _r = build_zero_cst (type);
3782 226009 : if (TREE_SIDE_EFFECTS (captures[0]))
3783 36 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
3784 226009 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 915, __FILE__, __LINE__, true);
3785 226009 : return _r;
3786 : }
3787 0 : next_after_fail1273:;
3788 : }
3789 : }
3790 : }
3791 30774340 : switch (TREE_CODE (_p0))
3792 : {
3793 8554451 : CASE_CONVERT:
3794 8554451 : {
3795 8554451 : tree _q20 = TREE_OPERAND (_p0, 0);
3796 8554451 : switch (TREE_CODE (_p1))
3797 : {
3798 4244619 : CASE_CONVERT:
3799 4244619 : {
3800 4244619 : tree _q40 = TREE_OPERAND (_p1, 0);
3801 4244619 : switch (TREE_CODE (_q40))
3802 : {
3803 91085 : case MULT_EXPR:
3804 91085 : {
3805 91085 : tree _q50 = TREE_OPERAND (_q40, 0);
3806 91085 : tree _q51 = TREE_OPERAND (_q40, 1);
3807 91085 : switch (TREE_CODE (_q50))
3808 : {
3809 21 : case TRUNC_DIV_EXPR:
3810 21 : {
3811 21 : tree _q60 = TREE_OPERAND (_q50, 0);
3812 21 : tree _q61 = TREE_OPERAND (_q50, 1);
3813 21 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
3814 : {
3815 21 : if ((_q51 == _q61 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q61, 0))
3816 : {
3817 21 : {
3818 21 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q61 };
3819 21 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
3820 21 : if (res) return res;
3821 : }
3822 : }
3823 : }
3824 : break;
3825 : }
3826 91064 : default:;
3827 : }
3828 91064 : switch (TREE_CODE (_q51))
3829 : {
3830 0 : case TRUNC_DIV_EXPR:
3831 0 : {
3832 0 : tree _q70 = TREE_OPERAND (_q51, 0);
3833 0 : tree _q71 = TREE_OPERAND (_q51, 1);
3834 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q20, 0))
3835 : {
3836 0 : if ((_q71 == _q50 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q50, 0))
3837 : {
3838 0 : {
3839 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q70, _q71, _q20, _q50 };
3840 0 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
3841 0 : if (res) return res;
3842 : }
3843 : }
3844 : }
3845 : break;
3846 : }
3847 : default:;
3848 : }
3849 : break;
3850 : }
3851 : default:;
3852 : }
3853 : break;
3854 : }
3855 166947 : case MULT_EXPR:
3856 166947 : {
3857 166947 : tree _q40 = TREE_OPERAND (_p1, 0);
3858 166947 : tree _q41 = TREE_OPERAND (_p1, 1);
3859 166947 : switch (TREE_CODE (_q40))
3860 : {
3861 2892 : case TRUNC_DIV_EXPR:
3862 2892 : {
3863 2892 : tree _q50 = TREE_OPERAND (_q40, 0);
3864 2892 : tree _q51 = TREE_OPERAND (_q40, 1);
3865 2892 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
3866 : {
3867 12 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
3868 : {
3869 12 : {
3870 12 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _q20, _q51 };
3871 12 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
3872 12 : if (res) return res;
3873 : }
3874 : }
3875 : }
3876 : break;
3877 : }
3878 166935 : default:;
3879 : }
3880 166935 : switch (TREE_CODE (_q41))
3881 : {
3882 0 : case TRUNC_DIV_EXPR:
3883 0 : {
3884 0 : tree _q60 = TREE_OPERAND (_q41, 0);
3885 0 : tree _q61 = TREE_OPERAND (_q41, 1);
3886 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
3887 : {
3888 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
3889 : {
3890 0 : {
3891 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q40 };
3892 0 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
3893 0 : if (res) return res;
3894 : }
3895 : }
3896 : }
3897 : break;
3898 : }
3899 : default:;
3900 : }
3901 : break;
3902 : }
3903 : default:;
3904 : }
3905 : break;
3906 : }
3907 30774307 : default:;
3908 : }
3909 30774307 : switch (TREE_CODE (_p1))
3910 : {
3911 7585608 : CASE_CONVERT:
3912 7585608 : {
3913 7585608 : tree _q30 = TREE_OPERAND (_p1, 0);
3914 7585608 : switch (TREE_CODE (_q30))
3915 : {
3916 125171 : case MULT_EXPR:
3917 125171 : {
3918 125171 : tree _q40 = TREE_OPERAND (_q30, 0);
3919 125171 : tree _q41 = TREE_OPERAND (_q30, 1);
3920 125171 : switch (TREE_CODE (_q40))
3921 : {
3922 12 : case TRUNC_DIV_EXPR:
3923 12 : {
3924 12 : tree _q50 = TREE_OPERAND (_q40, 0);
3925 12 : tree _q51 = TREE_OPERAND (_q40, 1);
3926 12 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
3927 : {
3928 2 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
3929 : {
3930 2 : {
3931 2 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q51 };
3932 2 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
3933 2 : if (res) return res;
3934 : }
3935 : }
3936 : }
3937 : break;
3938 : }
3939 125169 : default:;
3940 : }
3941 125169 : switch (TREE_CODE (_q41))
3942 : {
3943 0 : case TRUNC_DIV_EXPR:
3944 0 : {
3945 0 : tree _q60 = TREE_OPERAND (_q41, 0);
3946 0 : tree _q61 = TREE_OPERAND (_q41, 1);
3947 0 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _p0, 0))
3948 : {
3949 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
3950 : {
3951 0 : {
3952 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _p0, _q40 };
3953 0 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
3954 0 : if (res) return res;
3955 : }
3956 : }
3957 : }
3958 : break;
3959 : }
3960 : default:;
3961 : }
3962 : break;
3963 : }
3964 : default:;
3965 : }
3966 : break;
3967 : }
3968 1980588 : case MULT_EXPR:
3969 1980588 : {
3970 1980588 : tree _q30 = TREE_OPERAND (_p1, 0);
3971 1980588 : tree _q31 = TREE_OPERAND (_p1, 1);
3972 1980588 : switch (TREE_CODE (_q30))
3973 : {
3974 3446 : case TRUNC_DIV_EXPR:
3975 3446 : {
3976 3446 : tree _q40 = TREE_OPERAND (_q30, 0);
3977 3446 : tree _q41 = TREE_OPERAND (_q30, 1);
3978 3446 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
3979 : {
3980 60 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _q41, 0))
3981 : {
3982 60 : {
3983 60 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _p0, _q41 };
3984 60 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
3985 60 : if (res) return res;
3986 : }
3987 : }
3988 : }
3989 : break;
3990 : }
3991 1980528 : default:;
3992 : }
3993 1980528 : switch (TREE_CODE (_q31))
3994 : {
3995 0 : case TRUNC_DIV_EXPR:
3996 0 : {
3997 0 : tree _q50 = TREE_OPERAND (_q31, 0);
3998 0 : tree _q51 = TREE_OPERAND (_q31, 1);
3999 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
4000 : {
4001 0 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q30, 0))
4002 : {
4003 0 : {
4004 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q30 };
4005 0 : tree res = generic_simplify_86 (loc, type, _p0, _p1, captures);
4006 0 : if (res) return res;
4007 : }
4008 : }
4009 : }
4010 : break;
4011 : }
4012 : default:;
4013 : }
4014 : break;
4015 : }
4016 30774245 : default:;
4017 : }
4018 30774245 : switch (TREE_CODE (_p0))
4019 : {
4020 1835782 : case MULT_EXPR:
4021 1835782 : {
4022 1835782 : tree _q20 = TREE_OPERAND (_p0, 0);
4023 1835782 : tree _q21 = TREE_OPERAND (_p0, 1);
4024 1835782 : switch (TREE_CODE (_q21))
4025 : {
4026 604 : case PLUS_EXPR:
4027 604 : {
4028 604 : tree _q40 = TREE_OPERAND (_q21, 0);
4029 604 : tree _q41 = TREE_OPERAND (_q21, 1);
4030 604 : switch (TREE_CODE (_q40))
4031 : {
4032 0 : case TRUNC_DIV_EXPR:
4033 0 : {
4034 0 : tree _q50 = TREE_OPERAND (_q40, 0);
4035 0 : tree _q51 = TREE_OPERAND (_q40, 1);
4036 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4037 : {
4038 0 : if (integer_onep (_q41))
4039 : {
4040 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
4041 : {
4042 0 : {
4043 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q40, _q50 };
4044 0 : tree res = generic_simplify_87 (loc, type, _p0, _p1, captures);
4045 0 : if (res) return res;
4046 : }
4047 : }
4048 : }
4049 : }
4050 : break;
4051 : }
4052 : default:;
4053 : }
4054 : break;
4055 : }
4056 1835782 : default:;
4057 : }
4058 1835782 : switch (TREE_CODE (_q20))
4059 : {
4060 96103 : case PLUS_EXPR:
4061 96103 : {
4062 96103 : tree _q30 = TREE_OPERAND (_q20, 0);
4063 96103 : tree _q31 = TREE_OPERAND (_q20, 1);
4064 96103 : switch (TREE_CODE (_q30))
4065 : {
4066 1 : case TRUNC_DIV_EXPR:
4067 1 : {
4068 1 : tree _q40 = TREE_OPERAND (_q30, 0);
4069 1 : tree _q41 = TREE_OPERAND (_q30, 1);
4070 1 : if (integer_onep (_q31))
4071 : {
4072 1 : if ((_q21 == _q41 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q41, 0) && types_match (_q21, _q41)))
4073 : {
4074 1 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
4075 : {
4076 1 : {
4077 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q20, _q30, _q40 };
4078 1 : tree res = generic_simplify_87 (loc, type, _p0, _p1, captures);
4079 1 : if (res) return res;
4080 : }
4081 : }
4082 : }
4083 : }
4084 : break;
4085 : }
4086 : default:;
4087 : }
4088 : break;
4089 : }
4090 : default:;
4091 : }
4092 : break;
4093 : }
4094 1266 : case LSHIFT_EXPR:
4095 1266 : {
4096 1266 : tree _q20 = TREE_OPERAND (_p0, 0);
4097 1266 : tree _q21 = TREE_OPERAND (_p0, 1);
4098 1266 : switch (TREE_CODE (_p1))
4099 : {
4100 0 : case LSHIFT_EXPR:
4101 0 : {
4102 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4103 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4104 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4105 : {
4106 0 : {
4107 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
4108 0 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures, MINUS_EXPR);
4109 0 : if (res) return res;
4110 : }
4111 : }
4112 : break;
4113 : }
4114 : default:;
4115 : }
4116 : break;
4117 : }
4118 1217 : case BIT_AND_EXPR:
4119 1217 : {
4120 1217 : tree _q20 = TREE_OPERAND (_p0, 0);
4121 1217 : tree _q21 = TREE_OPERAND (_p0, 1);
4122 1217 : switch (TREE_CODE (_q21))
4123 : {
4124 0 : case BIT_NOT_EXPR:
4125 0 : {
4126 0 : tree _q40 = TREE_OPERAND (_q21, 0);
4127 0 : switch (TREE_CODE (_p1))
4128 : {
4129 0 : case BIT_AND_EXPR:
4130 0 : {
4131 0 : tree _q60 = TREE_OPERAND (_p1, 0);
4132 0 : tree _q61 = TREE_OPERAND (_p1, 1);
4133 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4134 : {
4135 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q40, 0) && types_match (_q61, _q40)))
4136 : {
4137 0 : {
4138 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
4139 0 : tree res = generic_simplify_88 (loc, type, _p0, _p1, captures);
4140 0 : if (res) return res;
4141 : }
4142 : }
4143 : }
4144 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
4145 : {
4146 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
4147 : {
4148 0 : {
4149 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
4150 0 : tree res = generic_simplify_88 (loc, type, _p0, _p1, captures);
4151 0 : if (res) return res;
4152 : }
4153 : }
4154 : }
4155 : break;
4156 : }
4157 : default:;
4158 : }
4159 : break;
4160 : }
4161 1217 : default:;
4162 : }
4163 1217 : switch (TREE_CODE (_q20))
4164 : {
4165 27 : case BIT_NOT_EXPR:
4166 27 : {
4167 27 : tree _q30 = TREE_OPERAND (_q20, 0);
4168 27 : switch (TREE_CODE (_p1))
4169 : {
4170 21 : case BIT_AND_EXPR:
4171 21 : {
4172 21 : tree _q60 = TREE_OPERAND (_p1, 0);
4173 21 : tree _q61 = TREE_OPERAND (_p1, 1);
4174 21 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
4175 : {
4176 0 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
4177 : {
4178 0 : {
4179 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
4180 0 : tree res = generic_simplify_88 (loc, type, _p0, _p1, captures);
4181 0 : if (res) return res;
4182 : }
4183 : }
4184 : }
4185 21 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
4186 : {
4187 21 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
4188 : {
4189 21 : {
4190 21 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
4191 21 : tree res = generic_simplify_88 (loc, type, _p0, _p1, captures);
4192 21 : if (res) return res;
4193 : }
4194 : }
4195 : }
4196 : break;
4197 : }
4198 : default:;
4199 : }
4200 : break;
4201 : }
4202 1196 : default:;
4203 : }
4204 1196 : switch (TREE_CODE (_q21))
4205 : {
4206 1156 : case INTEGER_CST:
4207 1156 : {
4208 1156 : switch (TREE_CODE (_p1))
4209 : {
4210 28 : case BIT_AND_EXPR:
4211 28 : {
4212 28 : tree _q50 = TREE_OPERAND (_p1, 0);
4213 28 : tree _q51 = TREE_OPERAND (_p1, 1);
4214 28 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4215 : {
4216 6 : switch (TREE_CODE (_q51))
4217 : {
4218 6 : case INTEGER_CST:
4219 6 : {
4220 6 : {
4221 6 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
4222 6 : if (~wi::to_wide (captures[2]) == wi::to_wide (captures[4])
4223 : )
4224 : {
4225 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1274;
4226 0 : {
4227 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1274;
4228 0 : tree res_op0;
4229 0 : {
4230 0 : tree _o1[2], _r1;
4231 0 : _o1[0] = captures[1];
4232 0 : _o1[1] = unshare_expr (captures[4]);
4233 0 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4234 0 : res_op0 = _r1;
4235 : }
4236 0 : tree res_op1;
4237 0 : res_op1 = captures[4];
4238 0 : tree _r;
4239 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
4240 0 : if (TREE_SIDE_EFFECTS (captures[2]))
4241 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
4242 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 916, __FILE__, __LINE__, true);
4243 0 : return _r;
4244 : }
4245 6 : next_after_fail1274:;
4246 : }
4247 : }
4248 6 : break;
4249 : }
4250 : default:;
4251 : }
4252 : }
4253 : break;
4254 : }
4255 : default:;
4256 : }
4257 : break;
4258 : }
4259 1196 : default:;
4260 : }
4261 1196 : switch (TREE_CODE (_p1))
4262 : {
4263 31 : case BIT_AND_EXPR:
4264 31 : {
4265 31 : tree _q50 = TREE_OPERAND (_p1, 0);
4266 31 : tree _q51 = TREE_OPERAND (_p1, 1);
4267 31 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4268 : {
4269 6 : switch (TREE_CODE (_q51))
4270 : {
4271 0 : case BIT_NOT_EXPR:
4272 0 : {
4273 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4274 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
4275 : {
4276 0 : {
4277 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4278 0 : tree res = generic_simplify_89 (loc, type, _p0, _p1, captures);
4279 0 : if (res) return res;
4280 : }
4281 : }
4282 : break;
4283 : }
4284 : default:;
4285 : }
4286 : }
4287 31 : switch (TREE_CODE (_q50))
4288 : {
4289 0 : case BIT_NOT_EXPR:
4290 0 : {
4291 0 : tree _q60 = TREE_OPERAND (_q50, 0);
4292 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
4293 : {
4294 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4295 : {
4296 0 : {
4297 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4298 0 : tree res = generic_simplify_89 (loc, type, _p0, _p1, captures);
4299 0 : if (res) return res;
4300 : }
4301 : }
4302 : }
4303 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4304 : {
4305 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4306 : {
4307 0 : {
4308 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
4309 0 : tree res = generic_simplify_89 (loc, type, _p0, _p1, captures);
4310 0 : if (res) return res;
4311 : }
4312 : }
4313 : }
4314 : break;
4315 : }
4316 31 : default:;
4317 : }
4318 31 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
4319 : {
4320 0 : switch (TREE_CODE (_q51))
4321 : {
4322 0 : case BIT_NOT_EXPR:
4323 0 : {
4324 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4325 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
4326 : {
4327 0 : {
4328 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
4329 0 : tree res = generic_simplify_89 (loc, type, _p0, _p1, captures);
4330 0 : if (res) return res;
4331 : }
4332 : }
4333 : break;
4334 : }
4335 : default:;
4336 : }
4337 : }
4338 : break;
4339 : }
4340 2 : case PLUS_EXPR:
4341 2 : {
4342 2 : tree _q50 = TREE_OPERAND (_p1, 0);
4343 2 : tree _q51 = TREE_OPERAND (_p1, 1);
4344 2 : switch (TREE_CODE (_q50))
4345 : {
4346 2 : case BIT_IOR_EXPR:
4347 2 : {
4348 2 : tree _q60 = TREE_OPERAND (_q50, 0);
4349 2 : tree _q61 = TREE_OPERAND (_q50, 1);
4350 2 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4351 : {
4352 2 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
4353 : {
4354 2 : if (integer_onep (_q51))
4355 : {
4356 2 : {
4357 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4358 2 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4359 2 : if (res) return res;
4360 : }
4361 : }
4362 : }
4363 : }
4364 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
4365 : {
4366 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
4367 : {
4368 0 : if (integer_onep (_q51))
4369 : {
4370 0 : {
4371 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4372 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4373 0 : if (res) return res;
4374 : }
4375 : }
4376 : }
4377 : }
4378 : break;
4379 : }
4380 0 : default:;
4381 : }
4382 0 : {
4383 0 : tree _q50_pops[1];
4384 0 : if (tree_nop_convert (_q50, _q50_pops))
4385 : {
4386 0 : tree _q60 = _q50_pops[0];
4387 0 : switch (TREE_CODE (_q60))
4388 : {
4389 0 : case BIT_IOR_EXPR:
4390 0 : {
4391 0 : tree _q70 = TREE_OPERAND (_q60, 0);
4392 0 : tree _q71 = TREE_OPERAND (_q60, 1);
4393 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
4394 : {
4395 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
4396 : {
4397 0 : if (integer_onep (_q51))
4398 : {
4399 0 : {
4400 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4401 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4402 0 : if (res) return res;
4403 : }
4404 : }
4405 : }
4406 : }
4407 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
4408 : {
4409 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
4410 : {
4411 0 : if (integer_onep (_q51))
4412 : {
4413 0 : {
4414 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4415 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4416 0 : if (res) return res;
4417 : }
4418 : }
4419 : }
4420 : }
4421 : break;
4422 : }
4423 : default:;
4424 : }
4425 : }
4426 : }
4427 0 : break;
4428 : }
4429 1194 : default:;
4430 : }
4431 1194 : {
4432 1194 : tree _p1_pops[1];
4433 1194 : if (tree_nop_convert (_p1, _p1_pops))
4434 : {
4435 7 : tree _q50 = _p1_pops[0];
4436 7 : switch (TREE_CODE (_q50))
4437 : {
4438 0 : case PLUS_EXPR:
4439 0 : {
4440 0 : tree _q60 = TREE_OPERAND (_q50, 0);
4441 0 : tree _q61 = TREE_OPERAND (_q50, 1);
4442 0 : switch (TREE_CODE (_q60))
4443 : {
4444 0 : case BIT_IOR_EXPR:
4445 0 : {
4446 0 : tree _q70 = TREE_OPERAND (_q60, 0);
4447 0 : tree _q71 = TREE_OPERAND (_q60, 1);
4448 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
4449 : {
4450 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
4451 : {
4452 0 : if (integer_onep (_q61))
4453 : {
4454 0 : {
4455 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4456 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4457 0 : if (res) return res;
4458 : }
4459 : }
4460 : }
4461 : }
4462 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
4463 : {
4464 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
4465 : {
4466 0 : if (integer_onep (_q61))
4467 : {
4468 0 : {
4469 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4470 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4471 0 : if (res) return res;
4472 : }
4473 : }
4474 : }
4475 : }
4476 : break;
4477 : }
4478 0 : default:;
4479 : }
4480 0 : {
4481 0 : tree _q60_pops[1];
4482 0 : if (tree_nop_convert (_q60, _q60_pops))
4483 : {
4484 0 : tree _q70 = _q60_pops[0];
4485 0 : switch (TREE_CODE (_q70))
4486 : {
4487 0 : case BIT_IOR_EXPR:
4488 0 : {
4489 0 : tree _q80 = TREE_OPERAND (_q70, 0);
4490 0 : tree _q81 = TREE_OPERAND (_q70, 1);
4491 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
4492 : {
4493 0 : if ((_q81 == _q21 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q21, 0) && types_match (_q81, _q21)))
4494 : {
4495 0 : if (integer_onep (_q61))
4496 : {
4497 0 : {
4498 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4499 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4500 0 : if (res) return res;
4501 : }
4502 : }
4503 : }
4504 : }
4505 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
4506 : {
4507 0 : if ((_q81 == _q20 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q20, 0) && types_match (_q81, _q20)))
4508 : {
4509 0 : if (integer_onep (_q61))
4510 : {
4511 0 : {
4512 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
4513 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
4514 0 : if (res) return res;
4515 : }
4516 : }
4517 : }
4518 : }
4519 : break;
4520 : }
4521 : default:;
4522 : }
4523 : }
4524 : }
4525 0 : break;
4526 : }
4527 : default:;
4528 : }
4529 : }
4530 : }
4531 1194 : break;
4532 : }
4533 2823 : case BIT_NOT_EXPR:
4534 2823 : {
4535 2823 : tree _q20 = TREE_OPERAND (_p0, 0);
4536 2823 : switch (TREE_CODE (_p1))
4537 : {
4538 22 : case BIT_NOT_EXPR:
4539 22 : {
4540 22 : tree _q40 = TREE_OPERAND (_p1, 0);
4541 22 : {
4542 22 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
4543 22 : if (!TYPE_OVERFLOW_SANITIZED (type)
4544 : )
4545 : {
4546 9 : {
4547 9 : tree utype = unsigned_type_for (type);
4548 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1275;
4549 9 : {
4550 9 : tree res_op0;
4551 9 : {
4552 9 : tree _o1[2], _r1;
4553 9 : {
4554 9 : tree _o2[1], _r2;
4555 9 : _o2[0] = captures[1];
4556 9 : if (TREE_TYPE (_o2[0]) != utype)
4557 : {
4558 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
4559 : }
4560 : else
4561 : _r2 = _o2[0];
4562 9 : _o1[0] = _r2;
4563 : }
4564 9 : {
4565 9 : tree _o2[1], _r2;
4566 9 : _o2[0] = captures[0];
4567 9 : if (TREE_TYPE (_o2[0]) != utype)
4568 : {
4569 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
4570 : }
4571 : else
4572 : _r2 = _o2[0];
4573 9 : _o1[1] = _r2;
4574 : }
4575 9 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4576 9 : res_op0 = _r1;
4577 : }
4578 9 : tree _r;
4579 9 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4580 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 917, __FILE__, __LINE__, true);
4581 9 : return _r;
4582 : }
4583 0 : next_after_fail1275:;
4584 : }
4585 : }
4586 : }
4587 13 : break;
4588 : }
4589 : default:;
4590 : }
4591 : break;
4592 : }
4593 2274959 : case PLUS_EXPR:
4594 2274959 : {
4595 2274959 : tree _q20 = TREE_OPERAND (_p0, 0);
4596 2274959 : tree _q21 = TREE_OPERAND (_p0, 1);
4597 2274959 : switch (TREE_CODE (_p1))
4598 : {
4599 14 : case BIT_IOR_EXPR:
4600 14 : {
4601 14 : tree _q50 = TREE_OPERAND (_p1, 0);
4602 14 : tree _q51 = TREE_OPERAND (_p1, 1);
4603 14 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4604 : {
4605 13 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4606 : {
4607 13 : {
4608 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4609 13 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
4610 13 : && !TYPE_SATURATING (type)
4611 : )
4612 : {
4613 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1276;
4614 0 : {
4615 0 : tree res_op0;
4616 0 : res_op0 = captures[0];
4617 0 : tree res_op1;
4618 0 : res_op1 = captures[1];
4619 0 : tree _r;
4620 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
4621 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 918, __FILE__, __LINE__, true);
4622 0 : return _r;
4623 : }
4624 0 : next_after_fail1276:;
4625 : }
4626 : }
4627 : }
4628 : }
4629 : break;
4630 : }
4631 82 : case BIT_AND_EXPR:
4632 82 : {
4633 82 : tree _q50 = TREE_OPERAND (_p1, 0);
4634 82 : tree _q51 = TREE_OPERAND (_p1, 1);
4635 82 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4636 : {
4637 25 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4638 : {
4639 13 : {
4640 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4641 13 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
4642 13 : && !TYPE_SATURATING (type)
4643 : )
4644 : {
4645 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1277;
4646 0 : {
4647 0 : tree res_op0;
4648 0 : res_op0 = captures[0];
4649 0 : tree res_op1;
4650 0 : res_op1 = captures[1];
4651 0 : tree _r;
4652 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
4653 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
4654 0 : return _r;
4655 : }
4656 0 : next_after_fail1277:;
4657 : }
4658 : }
4659 : }
4660 : }
4661 : break;
4662 : }
4663 2274959 : default:;
4664 : }
4665 2274959 : switch (TREE_CODE (_q20))
4666 : {
4667 599 : case BIT_AND_EXPR:
4668 599 : {
4669 599 : tree _q30 = TREE_OPERAND (_q20, 0);
4670 599 : tree _q31 = TREE_OPERAND (_q20, 1);
4671 599 : if (integer_all_onesp (_q21))
4672 : {
4673 1 : switch (TREE_CODE (_p1))
4674 : {
4675 1 : case BIT_IOR_EXPR:
4676 1 : {
4677 1 : tree _q70 = TREE_OPERAND (_p1, 0);
4678 1 : tree _q71 = TREE_OPERAND (_p1, 1);
4679 1 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
4680 : {
4681 1 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
4682 : {
4683 1 : {
4684 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
4685 1 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4686 1 : if (res) return res;
4687 : }
4688 : }
4689 : }
4690 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
4691 : {
4692 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
4693 : {
4694 0 : {
4695 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
4696 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4697 0 : if (res) return res;
4698 : }
4699 : }
4700 : }
4701 : break;
4702 : }
4703 0 : default:;
4704 : }
4705 0 : {
4706 0 : tree _p1_pops[1];
4707 0 : if (tree_nop_convert (_p1, _p1_pops))
4708 : {
4709 0 : tree _q70 = _p1_pops[0];
4710 0 : switch (TREE_CODE (_q70))
4711 : {
4712 0 : case BIT_IOR_EXPR:
4713 0 : {
4714 0 : tree _q80 = TREE_OPERAND (_q70, 0);
4715 0 : tree _q81 = TREE_OPERAND (_q70, 1);
4716 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
4717 : {
4718 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
4719 : {
4720 0 : {
4721 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
4722 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4723 0 : if (res) return res;
4724 : }
4725 : }
4726 : }
4727 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
4728 : {
4729 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
4730 : {
4731 0 : {
4732 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
4733 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4734 0 : if (res) return res;
4735 : }
4736 : }
4737 : }
4738 : break;
4739 : }
4740 : default:;
4741 : }
4742 : }
4743 : }
4744 : }
4745 : break;
4746 : }
4747 2274958 : default:;
4748 : }
4749 2274958 : {
4750 2274958 : tree _q20_pops[1];
4751 2274958 : if (tree_nop_convert (_q20, _q20_pops))
4752 : {
4753 521391 : tree _q30 = _q20_pops[0];
4754 521391 : switch (TREE_CODE (_q30))
4755 : {
4756 0 : case BIT_AND_EXPR:
4757 0 : {
4758 0 : tree _q40 = TREE_OPERAND (_q30, 0);
4759 0 : tree _q41 = TREE_OPERAND (_q30, 1);
4760 0 : if (integer_all_onesp (_q21))
4761 : {
4762 0 : switch (TREE_CODE (_p1))
4763 : {
4764 0 : case BIT_IOR_EXPR:
4765 0 : {
4766 0 : tree _q80 = TREE_OPERAND (_p1, 0);
4767 0 : tree _q81 = TREE_OPERAND (_p1, 1);
4768 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
4769 : {
4770 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
4771 : {
4772 0 : {
4773 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
4774 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4775 0 : if (res) return res;
4776 : }
4777 : }
4778 : }
4779 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
4780 : {
4781 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
4782 : {
4783 0 : {
4784 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
4785 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4786 0 : if (res) return res;
4787 : }
4788 : }
4789 : }
4790 : break;
4791 : }
4792 0 : default:;
4793 : }
4794 0 : {
4795 0 : tree _p1_pops[1];
4796 0 : if (tree_nop_convert (_p1, _p1_pops))
4797 : {
4798 0 : tree _q80 = _p1_pops[0];
4799 0 : switch (TREE_CODE (_q80))
4800 : {
4801 0 : case BIT_IOR_EXPR:
4802 0 : {
4803 0 : tree _q90 = TREE_OPERAND (_q80, 0);
4804 0 : tree _q91 = TREE_OPERAND (_q80, 1);
4805 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
4806 : {
4807 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
4808 : {
4809 0 : {
4810 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
4811 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4812 0 : if (res) return res;
4813 : }
4814 : }
4815 : }
4816 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
4817 : {
4818 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
4819 : {
4820 0 : {
4821 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
4822 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4823 0 : if (res) return res;
4824 : }
4825 : }
4826 : }
4827 : break;
4828 : }
4829 : default:;
4830 : }
4831 : }
4832 : }
4833 : }
4834 : break;
4835 : }
4836 : default:;
4837 : }
4838 : }
4839 : }
4840 2274958 : break;
4841 : }
4842 77 : case BIT_IOR_EXPR:
4843 77 : {
4844 77 : tree _q20 = TREE_OPERAND (_p0, 0);
4845 77 : tree _q21 = TREE_OPERAND (_p0, 1);
4846 77 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
4847 : {
4848 5 : {
4849 5 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4850 5 : tree res = generic_simplify_92 (loc, type, _p0, _p1, captures);
4851 5 : if (res) return res;
4852 : }
4853 : }
4854 72 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4855 : {
4856 0 : {
4857 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
4858 0 : tree res = generic_simplify_92 (loc, type, _p0, _p1, captures);
4859 0 : if (res) return res;
4860 : }
4861 : }
4862 72 : switch (TREE_CODE (_p1))
4863 : {
4864 0 : case BIT_XOR_EXPR:
4865 0 : {
4866 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4867 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4868 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4869 : {
4870 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4871 : {
4872 0 : {
4873 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4874 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1278;
4875 0 : {
4876 0 : tree res_op0;
4877 0 : res_op0 = captures[0];
4878 0 : tree res_op1;
4879 0 : res_op1 = captures[1];
4880 0 : tree _r;
4881 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
4882 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
4883 0 : return _r;
4884 : }
4885 0 : next_after_fail1278:;
4886 : }
4887 : }
4888 : }
4889 : break;
4890 : }
4891 0 : case BIT_AND_EXPR:
4892 0 : {
4893 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4894 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4895 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4896 : {
4897 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4898 : {
4899 0 : {
4900 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4901 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1279;
4902 0 : {
4903 0 : tree res_op0;
4904 0 : res_op0 = captures[0];
4905 0 : tree res_op1;
4906 0 : res_op1 = captures[1];
4907 0 : tree _r;
4908 0 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
4909 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
4910 0 : return _r;
4911 : }
4912 0 : next_after_fail1279:;
4913 : }
4914 : }
4915 : }
4916 : break;
4917 : }
4918 : default:;
4919 : }
4920 : break;
4921 : }
4922 30774206 : default:;
4923 : }
4924 30774206 : {
4925 30774206 : tree _p0_pops[1];
4926 30774206 : if (tree_nop_convert (_p0, _p0_pops))
4927 : {
4928 7405147 : tree _q20 = _p0_pops[0];
4929 7405147 : switch (TREE_CODE (_q20))
4930 : {
4931 1034443 : case PLUS_EXPR:
4932 1034443 : {
4933 1034443 : tree _q30 = TREE_OPERAND (_q20, 0);
4934 1034443 : tree _q31 = TREE_OPERAND (_q20, 1);
4935 1034443 : switch (TREE_CODE (_q30))
4936 : {
4937 8 : case BIT_AND_EXPR:
4938 8 : {
4939 8 : tree _q40 = TREE_OPERAND (_q30, 0);
4940 8 : tree _q41 = TREE_OPERAND (_q30, 1);
4941 8 : if (integer_all_onesp (_q31))
4942 : {
4943 0 : switch (TREE_CODE (_p1))
4944 : {
4945 0 : case BIT_IOR_EXPR:
4946 0 : {
4947 0 : tree _q80 = TREE_OPERAND (_p1, 0);
4948 0 : tree _q81 = TREE_OPERAND (_p1, 1);
4949 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
4950 : {
4951 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
4952 : {
4953 0 : {
4954 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
4955 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4956 0 : if (res) return res;
4957 : }
4958 : }
4959 : }
4960 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
4961 : {
4962 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
4963 : {
4964 0 : {
4965 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
4966 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4967 0 : if (res) return res;
4968 : }
4969 : }
4970 : }
4971 : break;
4972 : }
4973 0 : default:;
4974 : }
4975 0 : {
4976 0 : tree _p1_pops[1];
4977 0 : if (tree_nop_convert (_p1, _p1_pops))
4978 : {
4979 0 : tree _q80 = _p1_pops[0];
4980 0 : switch (TREE_CODE (_q80))
4981 : {
4982 0 : case BIT_IOR_EXPR:
4983 0 : {
4984 0 : tree _q90 = TREE_OPERAND (_q80, 0);
4985 0 : tree _q91 = TREE_OPERAND (_q80, 1);
4986 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
4987 : {
4988 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
4989 : {
4990 0 : {
4991 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
4992 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
4993 0 : if (res) return res;
4994 : }
4995 : }
4996 : }
4997 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
4998 : {
4999 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
5000 : {
5001 0 : {
5002 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
5003 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
5004 0 : if (res) return res;
5005 : }
5006 : }
5007 : }
5008 : break;
5009 : }
5010 : default:;
5011 : }
5012 : }
5013 : }
5014 : }
5015 : break;
5016 : }
5017 1034443 : default:;
5018 : }
5019 1034443 : {
5020 1034443 : tree _q30_pops[1];
5021 1034443 : if (tree_nop_convert (_q30, _q30_pops))
5022 : {
5023 44706 : tree _q40 = _q30_pops[0];
5024 44706 : switch (TREE_CODE (_q40))
5025 : {
5026 0 : case BIT_AND_EXPR:
5027 0 : {
5028 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5029 0 : tree _q51 = TREE_OPERAND (_q40, 1);
5030 0 : if (integer_all_onesp (_q31))
5031 : {
5032 0 : switch (TREE_CODE (_p1))
5033 : {
5034 0 : case BIT_IOR_EXPR:
5035 0 : {
5036 0 : tree _q90 = TREE_OPERAND (_p1, 0);
5037 0 : tree _q91 = TREE_OPERAND (_p1, 1);
5038 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
5039 : {
5040 0 : if ((_q91 == _q51 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q51, 0) && types_match (_q91, _q51)))
5041 : {
5042 0 : {
5043 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5044 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
5045 0 : if (res) return res;
5046 : }
5047 : }
5048 : }
5049 0 : if ((_q90 == _q51 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q51, 0) && types_match (_q90, _q51)))
5050 : {
5051 0 : if ((_q91 == _q50 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q50, 0) && types_match (_q91, _q50)))
5052 : {
5053 0 : {
5054 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
5055 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
5056 0 : if (res) return res;
5057 : }
5058 : }
5059 : }
5060 : break;
5061 : }
5062 0 : default:;
5063 : }
5064 0 : {
5065 0 : tree _p1_pops[1];
5066 0 : if (tree_nop_convert (_p1, _p1_pops))
5067 : {
5068 0 : tree _q90 = _p1_pops[0];
5069 0 : switch (TREE_CODE (_q90))
5070 : {
5071 0 : case BIT_IOR_EXPR:
5072 0 : {
5073 0 : tree _q100 = TREE_OPERAND (_q90, 0);
5074 0 : tree _q101 = TREE_OPERAND (_q90, 1);
5075 0 : if ((_q100 == _q50 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q50, 0) && types_match (_q100, _q50)))
5076 : {
5077 0 : if ((_q101 == _q51 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q51, 0) && types_match (_q101, _q51)))
5078 : {
5079 0 : {
5080 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5081 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
5082 0 : if (res) return res;
5083 : }
5084 : }
5085 : }
5086 0 : if ((_q100 == _q51 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q51, 0) && types_match (_q100, _q51)))
5087 : {
5088 0 : if ((_q101 == _q50 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q50, 0) && types_match (_q101, _q50)))
5089 : {
5090 0 : {
5091 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
5092 0 : tree res = generic_simplify_91 (loc, type, _p0, _p1, captures);
5093 0 : if (res) return res;
5094 : }
5095 : }
5096 : }
5097 : break;
5098 : }
5099 : default:;
5100 : }
5101 : }
5102 : }
5103 : }
5104 : break;
5105 : }
5106 : default:;
5107 : }
5108 : }
5109 : }
5110 1034443 : break;
5111 : }
5112 14 : case BIT_AND_EXPR:
5113 14 : {
5114 14 : tree _q30 = TREE_OPERAND (_q20, 0);
5115 14 : tree _q31 = TREE_OPERAND (_q20, 1);
5116 14 : switch (TREE_CODE (_p1))
5117 : {
5118 0 : case PLUS_EXPR:
5119 0 : {
5120 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5121 0 : tree _q61 = TREE_OPERAND (_p1, 1);
5122 0 : switch (TREE_CODE (_q60))
5123 : {
5124 0 : case BIT_IOR_EXPR:
5125 0 : {
5126 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5127 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5128 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
5129 : {
5130 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
5131 : {
5132 0 : if (integer_onep (_q61))
5133 : {
5134 0 : {
5135 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5136 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5137 0 : if (res) return res;
5138 : }
5139 : }
5140 : }
5141 : }
5142 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
5143 : {
5144 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
5145 : {
5146 0 : if (integer_onep (_q61))
5147 : {
5148 0 : {
5149 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5150 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5151 0 : if (res) return res;
5152 : }
5153 : }
5154 : }
5155 : }
5156 : break;
5157 : }
5158 0 : default:;
5159 : }
5160 0 : {
5161 0 : tree _q60_pops[1];
5162 0 : if (tree_nop_convert (_q60, _q60_pops))
5163 : {
5164 0 : tree _q70 = _q60_pops[0];
5165 0 : switch (TREE_CODE (_q70))
5166 : {
5167 0 : case BIT_IOR_EXPR:
5168 0 : {
5169 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5170 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5171 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
5172 : {
5173 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
5174 : {
5175 0 : if (integer_onep (_q61))
5176 : {
5177 0 : {
5178 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5179 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5180 0 : if (res) return res;
5181 : }
5182 : }
5183 : }
5184 : }
5185 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
5186 : {
5187 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
5188 : {
5189 0 : if (integer_onep (_q61))
5190 : {
5191 0 : {
5192 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5193 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5194 0 : if (res) return res;
5195 : }
5196 : }
5197 : }
5198 : }
5199 : break;
5200 : }
5201 : default:;
5202 : }
5203 : }
5204 : }
5205 0 : break;
5206 : }
5207 14 : default:;
5208 : }
5209 14 : {
5210 14 : tree _p1_pops[1];
5211 14 : if (tree_nop_convert (_p1, _p1_pops))
5212 : {
5213 14 : tree _q60 = _p1_pops[0];
5214 14 : switch (TREE_CODE (_q60))
5215 : {
5216 0 : case PLUS_EXPR:
5217 0 : {
5218 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5219 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5220 0 : switch (TREE_CODE (_q70))
5221 : {
5222 0 : case BIT_IOR_EXPR:
5223 0 : {
5224 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5225 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5226 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
5227 : {
5228 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
5229 : {
5230 0 : if (integer_onep (_q71))
5231 : {
5232 0 : {
5233 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5234 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5235 0 : if (res) return res;
5236 : }
5237 : }
5238 : }
5239 : }
5240 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
5241 : {
5242 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
5243 : {
5244 0 : if (integer_onep (_q71))
5245 : {
5246 0 : {
5247 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5248 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5249 0 : if (res) return res;
5250 : }
5251 : }
5252 : }
5253 : }
5254 : break;
5255 : }
5256 0 : default:;
5257 : }
5258 0 : {
5259 0 : tree _q70_pops[1];
5260 0 : if (tree_nop_convert (_q70, _q70_pops))
5261 : {
5262 0 : tree _q80 = _q70_pops[0];
5263 0 : switch (TREE_CODE (_q80))
5264 : {
5265 0 : case BIT_IOR_EXPR:
5266 0 : {
5267 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5268 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5269 0 : if ((_q90 == _q30 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q30, 0) && types_match (_q90, _q30)))
5270 : {
5271 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
5272 : {
5273 0 : if (integer_onep (_q71))
5274 : {
5275 0 : {
5276 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5277 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5278 0 : if (res) return res;
5279 : }
5280 : }
5281 : }
5282 : }
5283 0 : if ((_q90 == _q31 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q31, 0) && types_match (_q90, _q31)))
5284 : {
5285 0 : if ((_q91 == _q30 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q30, 0) && types_match (_q91, _q30)))
5286 : {
5287 0 : if (integer_onep (_q71))
5288 : {
5289 0 : {
5290 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5291 0 : tree res = generic_simplify_90 (loc, type, _p0, _p1, captures);
5292 0 : if (res) return res;
5293 : }
5294 : }
5295 : }
5296 : }
5297 : break;
5298 : }
5299 : default:;
5300 : }
5301 : }
5302 : }
5303 0 : break;
5304 : }
5305 : default:;
5306 : }
5307 : }
5308 : }
5309 14 : break;
5310 : }
5311 : default:;
5312 : }
5313 : }
5314 : }
5315 30774206 : if (tree_negate_expr_p (_p1))
5316 : {
5317 7713207 : {
5318 7713207 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5319 7713207 : if (!FIXED_POINT_TYPE_P (type)
5320 : )
5321 : {
5322 7713207 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1280;
5323 7713207 : {
5324 7713207 : tree res_op0;
5325 7713207 : res_op0 = captures[0];
5326 7713207 : tree res_op1;
5327 7713207 : {
5328 7713207 : tree _o1[1], _r1;
5329 7713207 : _o1[0] = captures[1];
5330 7713207 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
5331 7713207 : res_op1 = _r1;
5332 : }
5333 7713207 : tree _r;
5334 7713207 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
5335 7713207 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 922, __FILE__, __LINE__, true);
5336 7713207 : return _r;
5337 : }
5338 0 : next_after_fail1280:;
5339 : }
5340 : }
5341 : }
5342 23060999 : switch (TREE_CODE (_p0))
5343 : {
5344 5104174 : CASE_CONVERT:
5345 5104174 : {
5346 5104174 : tree _q20 = TREE_OPERAND (_p0, 0);
5347 5104174 : switch (TREE_CODE (_p1))
5348 : {
5349 4244598 : CASE_CONVERT:
5350 4244598 : {
5351 4244598 : tree _q40 = TREE_OPERAND (_p1, 0);
5352 4244598 : switch (TREE_CODE (_q40))
5353 : {
5354 15 : case BIT_AND_EXPR:
5355 15 : {
5356 15 : tree _q50 = TREE_OPERAND (_q40, 0);
5357 15 : tree _q51 = TREE_OPERAND (_q40, 1);
5358 15 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
5359 : {
5360 0 : {
5361 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q50, _p1, _q40, _q51, _q20 };
5362 0 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
5363 0 : if (res) return res;
5364 : }
5365 : }
5366 15 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
5367 : {
5368 1 : {
5369 1 : tree captures[5] ATTRIBUTE_UNUSED = { _q51, _p1, _q40, _q50, _q20 };
5370 1 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
5371 1 : if (res) return res;
5372 : }
5373 : }
5374 : break;
5375 : }
5376 : default:;
5377 : }
5378 : break;
5379 : }
5380 8821 : case BIT_AND_EXPR:
5381 8821 : {
5382 8821 : tree _q40 = TREE_OPERAND (_p1, 0);
5383 8821 : tree _q41 = TREE_OPERAND (_p1, 1);
5384 8821 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _q20, 0))
5385 : {
5386 0 : {
5387 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _p1, _q41, _q20 };
5388 0 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
5389 0 : if (res) return res;
5390 : }
5391 : }
5392 8821 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q20, 0))
5393 : {
5394 21 : {
5395 21 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _p1, _q40, _q20 };
5396 21 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
5397 21 : if (res) return res;
5398 : }
5399 : }
5400 : break;
5401 : }
5402 5104152 : default:;
5403 : }
5404 5104152 : switch (TREE_CODE (_q20))
5405 : {
5406 113014 : case ADDR_EXPR:
5407 113014 : {
5408 113014 : switch (TREE_CODE (_p1))
5409 : {
5410 104234 : CASE_CONVERT:
5411 104234 : {
5412 104234 : tree _q40 = TREE_OPERAND (_p1, 0);
5413 104234 : switch (TREE_CODE (_q40))
5414 : {
5415 31020 : case POINTER_PLUS_EXPR:
5416 31020 : {
5417 31020 : tree _q50 = TREE_OPERAND (_q40, 0);
5418 31020 : tree _q51 = TREE_OPERAND (_q40, 1);
5419 31020 : {
5420 31020 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5421 31020 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5422 : )
5423 : {
5424 31020 : {
5425 31020 : poly_int64 diff;
5426 31020 : if (ptr_difference_const (captures[0], captures[1], &diff)
5427 : )
5428 : {
5429 16237 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1281;
5430 16237 : {
5431 16237 : tree res_op0;
5432 16237 : res_op0 = build_int_cst_type (type, diff);
5433 16237 : tree res_op1;
5434 16237 : {
5435 16237 : tree _o1[1], _r1;
5436 16237 : _o1[0] = captures[2];
5437 16237 : if (TREE_TYPE (_o1[0]) != type)
5438 : {
5439 16237 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5440 : }
5441 : else
5442 : _r1 = _o1[0];
5443 16237 : res_op1 = _r1;
5444 : }
5445 16237 : tree _r;
5446 16237 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5447 16237 : if (TREE_SIDE_EFFECTS (captures[0]))
5448 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5449 16237 : if (TREE_SIDE_EFFECTS (captures[1]))
5450 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5451 16237 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
5452 16237 : return _r;
5453 : }
5454 0 : next_after_fail1281:;
5455 : }
5456 : }
5457 : }
5458 : }
5459 14783 : break;
5460 : }
5461 87997 : default:;
5462 : }
5463 87997 : {
5464 87997 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
5465 87997 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5466 : )
5467 : {
5468 87997 : {
5469 87997 : poly_int64 diff;
5470 87997 : if (ptr_difference_const (captures[0], captures[1], &diff)
5471 : )
5472 : {
5473 54369 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1282;
5474 54369 : {
5475 54369 : tree _r;
5476 54369 : _r = build_int_cst_type (type, diff);
5477 54369 : if (TREE_SIDE_EFFECTS (captures[0]))
5478 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5479 54369 : if (TREE_SIDE_EFFECTS (captures[1]))
5480 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5481 54369 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
5482 54369 : return _r;
5483 : }
5484 0 : next_after_fail1282:;
5485 : }
5486 : }
5487 : }
5488 : }
5489 33628 : break;
5490 : }
5491 : default:;
5492 : }
5493 : break;
5494 : }
5495 102906 : case POINTER_PLUS_EXPR:
5496 102906 : {
5497 102906 : tree _q30 = TREE_OPERAND (_q20, 0);
5498 102906 : tree _q31 = TREE_OPERAND (_q20, 1);
5499 102906 : switch (TREE_CODE (_p1))
5500 : {
5501 102756 : CASE_CONVERT:
5502 102756 : {
5503 102756 : tree _q60 = TREE_OPERAND (_p1, 0);
5504 102756 : switch (TREE_CODE (_q60))
5505 : {
5506 5755 : case ADDR_EXPR:
5507 5755 : {
5508 5755 : {
5509 5755 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
5510 5755 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5511 : )
5512 : {
5513 5755 : {
5514 5755 : poly_int64 diff;
5515 5755 : if (ptr_difference_const (captures[0], captures[2], &diff)
5516 : )
5517 : {
5518 1193 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1283;
5519 1193 : {
5520 1193 : tree res_op0;
5521 1193 : {
5522 1193 : tree _o1[1], _r1;
5523 1193 : _o1[0] = captures[1];
5524 1193 : if (TREE_TYPE (_o1[0]) != type)
5525 : {
5526 920 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
5527 : }
5528 : else
5529 : _r1 = _o1[0];
5530 1193 : res_op0 = _r1;
5531 : }
5532 1193 : tree res_op1;
5533 1193 : res_op1 = build_int_cst_type (type, diff);
5534 1193 : tree _r;
5535 1193 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
5536 1193 : if (TREE_SIDE_EFFECTS (captures[0]))
5537 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5538 1193 : if (TREE_SIDE_EFFECTS (captures[2]))
5539 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
5540 1193 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 925, __FILE__, __LINE__, true);
5541 1193 : return _r;
5542 : }
5543 0 : next_after_fail1283:;
5544 : }
5545 : }
5546 : }
5547 : }
5548 4562 : break;
5549 : }
5550 : default:;
5551 : }
5552 : break;
5553 : }
5554 : default:;
5555 : }
5556 : break;
5557 : }
5558 5032353 : default:;
5559 : }
5560 5032353 : switch (TREE_CODE (_p1))
5561 : {
5562 4172798 : CASE_CONVERT:
5563 4172798 : {
5564 4172798 : tree _q40 = TREE_OPERAND (_p1, 0);
5565 4172798 : switch (TREE_CODE (_q40))
5566 : {
5567 48314 : case ADDR_EXPR:
5568 48314 : {
5569 48314 : {
5570 48314 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
5571 48314 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5572 : )
5573 : {
5574 48290 : {
5575 48290 : poly_int64 diff;
5576 48290 : if (ptr_difference_const (captures[0], captures[1], &diff)
5577 : )
5578 : {
5579 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1284;
5580 0 : {
5581 0 : tree _r;
5582 0 : _r = build_int_cst_type (type, diff);
5583 0 : if (TREE_SIDE_EFFECTS (captures[0]))
5584 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5585 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5586 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5587 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
5588 0 : return _r;
5589 : }
5590 0 : next_after_fail1284:;
5591 : }
5592 : }
5593 : }
5594 : }
5595 48314 : break;
5596 : }
5597 : default:;
5598 : }
5599 : break;
5600 : }
5601 : default:;
5602 : }
5603 : break;
5604 : }
5605 22989178 : default:;
5606 : }
5607 22989178 : if (integer_onep (_p0))
5608 : {
5609 117010 : switch (TREE_CODE (_p1))
5610 : {
5611 27787 : case SSA_NAME:
5612 27787 : {
5613 27787 : {
5614 27787 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5615 27787 : if (INTEGRAL_TYPE_P (type)
5616 27787 : && ssa_name_has_boolean_range (captures[1])
5617 : )
5618 : {
5619 234 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1285;
5620 234 : {
5621 234 : tree res_op0;
5622 234 : res_op0 = captures[1];
5623 234 : tree res_op1;
5624 234 : res_op1 = captures[0];
5625 234 : tree _r;
5626 234 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
5627 234 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
5628 234 : return _r;
5629 : }
5630 0 : next_after_fail1285:;
5631 : }
5632 : }
5633 27553 : break;
5634 : }
5635 : default:;
5636 : }
5637 : }
5638 22988944 : switch (TREE_CODE (_p1))
5639 : {
5640 7513806 : CASE_CONVERT:
5641 7513806 : {
5642 7513806 : tree _q30 = TREE_OPERAND (_p1, 0);
5643 7513806 : switch (TREE_CODE (_q30))
5644 : {
5645 14 : case BIT_AND_EXPR:
5646 14 : {
5647 14 : tree _q40 = TREE_OPERAND (_q30, 0);
5648 14 : tree _q41 = TREE_OPERAND (_q30, 1);
5649 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
5650 : {
5651 0 : {
5652 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _q30, _q41, _p0 };
5653 0 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
5654 0 : if (res) return res;
5655 : }
5656 : }
5657 14 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
5658 : {
5659 0 : {
5660 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _q30, _q40, _p0 };
5661 0 : tree res = generic_simplify_93 (loc, type, _p0, _p1, captures);
5662 0 : if (res) return res;
5663 : }
5664 : }
5665 : break;
5666 : }
5667 : default:;
5668 : }
5669 : break;
5670 : }
5671 10940 : case BIT_AND_EXPR:
5672 10940 : {
5673 10940 : tree _q30 = TREE_OPERAND (_p1, 0);
5674 10940 : tree _q31 = TREE_OPERAND (_p1, 1);
5675 10940 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || operand_equal_p (_q30, _p0, 0))
5676 : {
5677 245 : {
5678 245 : tree captures[5] ATTRIBUTE_UNUSED = { _q30, _p1, _p1, _q31, _p0 };
5679 245 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
5680 245 : if (res) return res;
5681 : }
5682 : }
5683 10695 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _p0, 0))
5684 : {
5685 38 : {
5686 38 : tree captures[5] ATTRIBUTE_UNUSED = { _q31, _p1, _p1, _q30, _p0 };
5687 38 : tree res = generic_simplify_94 (loc, type, _p0, _p1, captures);
5688 38 : if (res) return res;
5689 : }
5690 : }
5691 : break;
5692 : }
5693 22988661 : default:;
5694 : }
5695 22988661 : switch (TREE_CODE (_p0))
5696 : {
5697 1759709 : case PLUS_EXPR:
5698 1759709 : {
5699 1759709 : tree _q20 = TREE_OPERAND (_p0, 0);
5700 1759709 : tree _q21 = TREE_OPERAND (_p0, 1);
5701 1759709 : switch (TREE_CODE (_p1))
5702 : {
5703 474140 : case PLUS_EXPR:
5704 474140 : {
5705 474140 : tree _q50 = TREE_OPERAND (_p1, 0);
5706 474140 : tree _q51 = TREE_OPERAND (_p1, 1);
5707 474140 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5708 : {
5709 177413 : {
5710 177413 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5711 354826 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5712 354826 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5713 40302 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5714 : )
5715 : {
5716 177407 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1286;
5717 177407 : {
5718 177407 : tree res_op0;
5719 177407 : res_op0 = captures[0];
5720 177407 : tree res_op1;
5721 177407 : res_op1 = captures[2];
5722 177407 : tree _r;
5723 177407 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5724 177407 : if (TREE_SIDE_EFFECTS (captures[1]))
5725 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5726 177407 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
5727 177407 : return _r;
5728 : }
5729 0 : next_after_fail1286:;
5730 : }
5731 : }
5732 : }
5733 296733 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5734 : {
5735 704 : {
5736 704 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5737 1408 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5738 1408 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5739 594 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5740 : )
5741 : {
5742 704 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1287;
5743 704 : {
5744 704 : tree res_op0;
5745 704 : res_op0 = captures[0];
5746 704 : tree res_op1;
5747 704 : res_op1 = captures[2];
5748 704 : tree _r;
5749 704 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5750 704 : if (TREE_SIDE_EFFECTS (captures[1]))
5751 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5752 704 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
5753 704 : return _r;
5754 : }
5755 0 : next_after_fail1287:;
5756 : }
5757 : }
5758 : }
5759 296029 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5760 : {
5761 883 : {
5762 883 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
5763 1766 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5764 1766 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5765 794 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5766 : )
5767 : {
5768 883 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1288;
5769 883 : {
5770 883 : tree res_op0;
5771 883 : res_op0 = captures[0];
5772 883 : tree res_op1;
5773 883 : res_op1 = captures[2];
5774 883 : tree _r;
5775 883 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5776 883 : if (TREE_SIDE_EFFECTS (captures[1]))
5777 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5778 883 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
5779 883 : return _r;
5780 : }
5781 0 : next_after_fail1288:;
5782 : }
5783 : }
5784 : }
5785 295146 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5786 : {
5787 167517 : {
5788 167517 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
5789 335034 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5790 335034 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5791 135357 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5792 : )
5793 : {
5794 167517 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1289;
5795 167517 : {
5796 167517 : tree res_op0;
5797 167517 : res_op0 = captures[0];
5798 167517 : tree res_op1;
5799 167517 : res_op1 = captures[2];
5800 167517 : tree _r;
5801 167517 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5802 167517 : if (TREE_SIDE_EFFECTS (captures[1]))
5803 2 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5804 167517 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
5805 167517 : return _r;
5806 : }
5807 0 : next_after_fail1289:;
5808 : }
5809 : }
5810 : }
5811 : break;
5812 : }
5813 : default:;
5814 : }
5815 : break;
5816 : }
5817 951602 : case MINUS_EXPR:
5818 951602 : {
5819 951602 : tree _q20 = TREE_OPERAND (_p0, 0);
5820 951602 : tree _q21 = TREE_OPERAND (_p0, 1);
5821 951602 : switch (TREE_CODE (_p1))
5822 : {
5823 3919 : case MINUS_EXPR:
5824 3919 : {
5825 3919 : tree _q50 = TREE_OPERAND (_p1, 0);
5826 3919 : tree _q51 = TREE_OPERAND (_p1, 1);
5827 3919 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5828 : {
5829 3877 : {
5830 3877 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5831 7754 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5832 7754 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5833 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
5834 : )
5835 : {
5836 3877 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1290;
5837 3877 : {
5838 3877 : tree res_op0;
5839 3877 : res_op0 = captures[0];
5840 3877 : tree res_op1;
5841 3877 : res_op1 = captures[2];
5842 3877 : tree _r;
5843 3877 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5844 3877 : if (TREE_SIDE_EFFECTS (captures[1]))
5845 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5846 3877 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 929, __FILE__, __LINE__, true);
5847 3877 : return _r;
5848 : }
5849 0 : next_after_fail1290:;
5850 : }
5851 : }
5852 : }
5853 42 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5854 : {
5855 0 : {
5856 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
5857 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5858 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
5859 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
5860 : )
5861 : {
5862 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1291;
5863 0 : {
5864 0 : tree res_op0;
5865 0 : res_op0 = captures[2];
5866 0 : tree res_op1;
5867 0 : res_op1 = captures[1];
5868 0 : tree _r;
5869 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5870 0 : if (TREE_SIDE_EFFECTS (captures[0]))
5871 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5872 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 930, __FILE__, __LINE__, true);
5873 0 : return _r;
5874 : }
5875 0 : next_after_fail1291:;
5876 : }
5877 : }
5878 : }
5879 : break;
5880 : }
5881 : default:;
5882 : }
5883 : break;
5884 : }
5885 59 : case POINTER_DIFF_EXPR:
5886 59 : {
5887 59 : tree _q20 = TREE_OPERAND (_p0, 0);
5888 59 : tree _q21 = TREE_OPERAND (_p0, 1);
5889 59 : switch (TREE_CODE (_p1))
5890 : {
5891 0 : case POINTER_DIFF_EXPR:
5892 0 : {
5893 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5894 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5895 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5896 : {
5897 0 : {
5898 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
5899 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5900 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
5901 : )
5902 : {
5903 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1292;
5904 0 : {
5905 0 : tree res_op0;
5906 0 : res_op0 = captures[1];
5907 0 : tree res_op1;
5908 0 : res_op1 = captures[3];
5909 0 : tree _r;
5910 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
5911 0 : if (TREE_SIDE_EFFECTS (captures[2]))
5912 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
5913 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 931, __FILE__, __LINE__, true);
5914 0 : return _r;
5915 : }
5916 0 : next_after_fail1292:;
5917 : }
5918 : }
5919 : }
5920 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5921 : {
5922 0 : {
5923 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
5924 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
5925 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
5926 : )
5927 : {
5928 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1293;
5929 0 : {
5930 0 : tree res_op0;
5931 0 : res_op0 = captures[3];
5932 0 : tree res_op1;
5933 0 : res_op1 = captures[2];
5934 0 : tree _r;
5935 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
5936 0 : if (TREE_SIDE_EFFECTS (captures[1]))
5937 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
5938 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 932, __FILE__, __LINE__, true);
5939 0 : return _r;
5940 : }
5941 0 : next_after_fail1293:;
5942 : }
5943 : }
5944 : }
5945 : break;
5946 : }
5947 : default:;
5948 : }
5949 : break;
5950 : }
5951 22638273 : default:;
5952 : }
5953 22638273 : switch (TREE_CODE (_p1))
5954 : {
5955 7513806 : CASE_CONVERT:
5956 7513806 : {
5957 7513806 : tree _q30 = TREE_OPERAND (_p1, 0);
5958 7513806 : switch (TREE_CODE (_q30))
5959 : {
5960 2616 : case NEGATE_EXPR:
5961 2616 : {
5962 2616 : tree _q40 = TREE_OPERAND (_q30, 0);
5963 2616 : {
5964 2616 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
5965 2616 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5966 2616 : if (res) return res;
5967 : }
5968 2603 : break;
5969 : }
5970 : default:;
5971 : }
5972 : break;
5973 : }
5974 45 : case NEGATE_EXPR:
5975 45 : {
5976 45 : tree _q30 = TREE_OPERAND (_p1, 0);
5977 45 : {
5978 45 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
5979 45 : tree res = generic_simplify_95 (loc, type, _p0, _p1, captures);
5980 45 : if (res) return res;
5981 : }
5982 40 : break;
5983 : }
5984 22638255 : default:;
5985 : }
5986 22638255 : switch (TREE_CODE (_p0))
5987 : {
5988 1413198 : case PLUS_EXPR:
5989 1413198 : {
5990 1413198 : tree _q20 = TREE_OPERAND (_p0, 0);
5991 1413198 : tree _q21 = TREE_OPERAND (_p0, 1);
5992 1413198 : {
5993 1413198 : tree _q20_pops[1];
5994 1413198 : if (tree_nop_convert (_q20, _q20_pops))
5995 : {
5996 319983 : tree _q30 = _q20_pops[0];
5997 319983 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
5998 : {
5999 543 : {
6000 543 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6001 543 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6002 543 : if (res) return res;
6003 : }
6004 : }
6005 : }
6006 : }
6007 1412655 : {
6008 1412655 : tree _q21_pops[1];
6009 1412655 : if (tree_nop_convert (_q21, _q21_pops))
6010 : {
6011 494431 : tree _q40 = _q21_pops[0];
6012 494431 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6013 : {
6014 71 : {
6015 71 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6016 71 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6017 71 : if (res) return res;
6018 : }
6019 : }
6020 : }
6021 : }
6022 1412584 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6023 : {
6024 50664 : {
6025 50664 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6026 50664 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6027 50664 : if (res) return res;
6028 : }
6029 : }
6030 1361920 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6031 : {
6032 2303 : {
6033 2303 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6034 2303 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6035 2303 : if (res) return res;
6036 : }
6037 : }
6038 : break;
6039 : }
6040 947725 : case MINUS_EXPR:
6041 947725 : {
6042 947725 : tree _q20 = TREE_OPERAND (_p0, 0);
6043 947725 : tree _q21 = TREE_OPERAND (_p0, 1);
6044 947725 : {
6045 947725 : tree _q20_pops[1];
6046 947725 : if (tree_nop_convert (_q20, _q20_pops))
6047 : {
6048 84325 : tree _q30 = _q20_pops[0];
6049 84325 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6050 : {
6051 0 : {
6052 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6053 0 : tree res = generic_simplify_97 (loc, type, _p0, _p1, captures);
6054 0 : if (res) return res;
6055 : }
6056 : }
6057 : }
6058 : }
6059 947725 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6060 : {
6061 3087 : {
6062 3087 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6063 3087 : tree res = generic_simplify_97 (loc, type, _p0, _p1, captures);
6064 3087 : if (res) return res;
6065 : }
6066 : }
6067 : break;
6068 : }
6069 22581598 : default:;
6070 : }
6071 22581598 : {
6072 22581598 : tree _p0_pops[1];
6073 22581598 : if (tree_nop_convert (_p0, _p0_pops))
6074 : {
6075 4423451 : tree _q20 = _p0_pops[0];
6076 4423451 : switch (TREE_CODE (_q20))
6077 : {
6078 362199 : case PLUS_EXPR:
6079 362199 : {
6080 362199 : tree _q30 = TREE_OPERAND (_q20, 0);
6081 362199 : tree _q31 = TREE_OPERAND (_q20, 1);
6082 362199 : {
6083 362199 : tree _q30_pops[1];
6084 362199 : if (tree_nop_convert (_q30, _q30_pops))
6085 : {
6086 31717 : tree _q40 = _q30_pops[0];
6087 31717 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6088 : {
6089 616 : {
6090 616 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
6091 616 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6092 616 : if (res) return res;
6093 : }
6094 : }
6095 : }
6096 : }
6097 361583 : {
6098 361583 : tree _q31_pops[1];
6099 361583 : if (tree_nop_convert (_q31, _q31_pops))
6100 : {
6101 2107 : tree _q50 = _q31_pops[0];
6102 2107 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
6103 : {
6104 52 : {
6105 52 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
6106 52 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6107 52 : if (res) return res;
6108 : }
6109 : }
6110 : }
6111 : }
6112 361531 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6113 : {
6114 4 : {
6115 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
6116 4 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6117 4 : if (res) return res;
6118 : }
6119 : }
6120 361527 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
6121 : {
6122 0 : {
6123 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
6124 0 : tree res = generic_simplify_96 (loc, type, _p0, _p1, captures);
6125 0 : if (res) return res;
6126 : }
6127 : }
6128 : break;
6129 : }
6130 1280 : case MINUS_EXPR:
6131 1280 : {
6132 1280 : tree _q30 = TREE_OPERAND (_q20, 0);
6133 1280 : tree _q31 = TREE_OPERAND (_q20, 1);
6134 1280 : {
6135 1280 : tree _q30_pops[1];
6136 1280 : if (tree_nop_convert (_q30, _q30_pops))
6137 : {
6138 250 : tree _q40 = _q30_pops[0];
6139 250 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6140 : {
6141 0 : {
6142 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
6143 0 : tree res = generic_simplify_97 (loc, type, _p0, _p1, captures);
6144 0 : if (res) return res;
6145 : }
6146 : }
6147 : }
6148 : }
6149 1280 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6150 : {
6151 0 : {
6152 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
6153 0 : tree res = generic_simplify_97 (loc, type, _p0, _p1, captures);
6154 0 : if (res) return res;
6155 : }
6156 : }
6157 : break;
6158 : }
6159 : default:;
6160 : }
6161 : }
6162 : }
6163 22580926 : switch (TREE_CODE (_p1))
6164 : {
6165 1277300 : case PLUS_EXPR:
6166 1277300 : {
6167 1277300 : tree _q30 = TREE_OPERAND (_p1, 0);
6168 1277300 : tree _q31 = TREE_OPERAND (_p1, 1);
6169 1277300 : {
6170 1277300 : tree _q30_pops[1];
6171 1277300 : if (tree_nop_convert (_q30, _q30_pops))
6172 : {
6173 331856 : tree _q40 = _q30_pops[0];
6174 331856 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6175 : {
6176 80 : {
6177 80 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6178 80 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6179 80 : if (res) return res;
6180 : }
6181 : }
6182 : }
6183 : }
6184 1277220 : {
6185 1277220 : tree _q31_pops[1];
6186 1277220 : if (tree_nop_convert (_q31, _q31_pops))
6187 : {
6188 64141 : tree _q50 = _q31_pops[0];
6189 64141 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6190 : {
6191 0 : {
6192 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6193 0 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6194 0 : if (res) return res;
6195 : }
6196 : }
6197 : }
6198 : }
6199 1277220 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6200 : {
6201 36791 : {
6202 36791 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6203 36791 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6204 36791 : if (res) return res;
6205 : }
6206 : }
6207 1240429 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6208 : {
6209 1712 : {
6210 1712 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6211 1712 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6212 1712 : if (res) return res;
6213 : }
6214 : }
6215 : break;
6216 : }
6217 80620 : case MINUS_EXPR:
6218 80620 : {
6219 80620 : tree _q30 = TREE_OPERAND (_p1, 0);
6220 80620 : tree _q31 = TREE_OPERAND (_p1, 1);
6221 80620 : {
6222 80620 : tree _q30_pops[1];
6223 80620 : if (tree_nop_convert (_q30, _q30_pops))
6224 : {
6225 61 : tree _q40 = _q30_pops[0];
6226 61 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6227 : {
6228 0 : {
6229 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6230 0 : tree res = generic_simplify_99 (loc, type, _p0, _p1, captures);
6231 0 : if (res) return res;
6232 : }
6233 : }
6234 : }
6235 : }
6236 80620 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6237 : {
6238 353 : {
6239 353 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
6240 353 : tree res = generic_simplify_99 (loc, type, _p0, _p1, captures);
6241 353 : if (res) return res;
6242 : }
6243 : }
6244 : break;
6245 : }
6246 22541990 : default:;
6247 : }
6248 22541990 : {
6249 22541990 : tree _p1_pops[1];
6250 22541990 : if (tree_nop_convert (_p1, _p1_pops))
6251 : {
6252 6773058 : tree _q30 = _p1_pops[0];
6253 6773058 : switch (TREE_CODE (_q30))
6254 : {
6255 681550 : case PLUS_EXPR:
6256 681550 : {
6257 681550 : tree _q40 = TREE_OPERAND (_q30, 0);
6258 681550 : tree _q41 = TREE_OPERAND (_q30, 1);
6259 681550 : {
6260 681550 : tree _q40_pops[1];
6261 681550 : if (tree_nop_convert (_q40, _q40_pops))
6262 : {
6263 64091 : tree _q50 = _q40_pops[0];
6264 64091 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6265 : {
6266 210 : {
6267 210 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6268 210 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6269 210 : if (res) return res;
6270 : }
6271 : }
6272 : }
6273 : }
6274 681340 : {
6275 681340 : tree _q41_pops[1];
6276 681340 : if (tree_nop_convert (_q41, _q41_pops))
6277 : {
6278 19785 : tree _q60 = _q41_pops[0];
6279 19785 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
6280 : {
6281 0 : {
6282 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6283 0 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6284 0 : if (res) return res;
6285 : }
6286 : }
6287 : }
6288 : }
6289 681340 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6290 : {
6291 7 : {
6292 7 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6293 7 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6294 7 : if (res) return res;
6295 : }
6296 : }
6297 681333 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
6298 : {
6299 0 : {
6300 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6301 0 : tree res = generic_simplify_98 (loc, type, _p0, _p1, captures);
6302 0 : if (res) return res;
6303 : }
6304 : }
6305 : break;
6306 : }
6307 7540 : case MINUS_EXPR:
6308 7540 : {
6309 7540 : tree _q40 = TREE_OPERAND (_q30, 0);
6310 7540 : tree _q41 = TREE_OPERAND (_q30, 1);
6311 7540 : {
6312 7540 : tree _q40_pops[1];
6313 7540 : if (tree_nop_convert (_q40, _q40_pops))
6314 : {
6315 6684 : tree _q50 = _q40_pops[0];
6316 6684 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
6317 : {
6318 0 : {
6319 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6320 0 : tree res = generic_simplify_99 (loc, type, _p0, _p1, captures);
6321 0 : if (res) return res;
6322 : }
6323 : }
6324 : }
6325 : }
6326 7540 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
6327 : {
6328 2 : {
6329 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
6330 2 : tree res = generic_simplify_99 (loc, type, _p0, _p1, captures);
6331 2 : if (res) return res;
6332 : }
6333 : }
6334 : break;
6335 : }
6336 : default:;
6337 : }
6338 : }
6339 : }
6340 22541771 : switch (TREE_CODE (_p0))
6341 : {
6342 1359628 : case PLUS_EXPR:
6343 1359628 : {
6344 1359628 : tree _q20 = TREE_OPERAND (_p0, 0);
6345 1359628 : tree _q21 = TREE_OPERAND (_p0, 1);
6346 1359628 : switch (TREE_CODE (_p1))
6347 : {
6348 112 : case MINUS_EXPR:
6349 112 : {
6350 112 : tree _q50 = TREE_OPERAND (_p1, 0);
6351 112 : tree _q51 = TREE_OPERAND (_p1, 1);
6352 112 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6353 : {
6354 0 : {
6355 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6356 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
6357 0 : if (res) return res;
6358 : }
6359 : }
6360 112 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6361 : {
6362 0 : {
6363 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
6364 0 : tree res = generic_simplify_100 (loc, type, _p0, _p1, captures);
6365 0 : if (res) return res;
6366 : }
6367 : }
6368 : break;
6369 : }
6370 1359628 : default:;
6371 : }
6372 1359628 : if (CONSTANT_CLASS_P (_q21))
6373 : {
6374 568454 : if (CONSTANT_CLASS_P (_p1))
6375 : {
6376 13 : {
6377 13 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6378 13 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
6379 13 : if (res) return res;
6380 : }
6381 : }
6382 : }
6383 : break;
6384 : }
6385 944630 : case MINUS_EXPR:
6386 944630 : {
6387 944630 : tree _q20 = TREE_OPERAND (_p0, 0);
6388 944630 : tree _q21 = TREE_OPERAND (_p0, 1);
6389 944630 : if (CONSTANT_CLASS_P (_q21))
6390 : {
6391 93518 : if (CONSTANT_CLASS_P (_p1))
6392 : {
6393 12 : {
6394 12 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6395 12 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
6396 12 : if (res) return res;
6397 : }
6398 : }
6399 : }
6400 944630 : if (CONSTANT_CLASS_P (_q20))
6401 : {
6402 2936 : if (CONSTANT_CLASS_P (_p1))
6403 : {
6404 1 : {
6405 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
6406 1 : tree res = generic_simplify_64 (loc, type, _p0, _p1, captures, MINUS_EXPR);
6407 1 : if (res) return res;
6408 : }
6409 : }
6410 : }
6411 : break;
6412 : }
6413 5019990 : CASE_CONVERT:
6414 5019990 : {
6415 5019990 : tree _q20 = TREE_OPERAND (_p0, 0);
6416 5019990 : switch (TREE_CODE (_p1))
6417 : {
6418 4172794 : CASE_CONVERT:
6419 4172794 : {
6420 4172794 : tree _q40 = TREE_OPERAND (_p1, 0);
6421 4172794 : {
6422 4172794 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6423 4172794 : tree res = generic_simplify_68 (loc, type, _p0, _p1, captures, MINUS_EXPR);
6424 4172794 : if (res) return res;
6425 : }
6426 4157423 : break;
6427 : }
6428 5004619 : default:;
6429 : }
6430 5004619 : switch (TREE_CODE (_q20))
6431 : {
6432 295 : case NEGATE_EXPR:
6433 295 : {
6434 295 : tree _q30 = TREE_OPERAND (_q20, 0);
6435 295 : if (integer_each_onep (_p1))
6436 : {
6437 0 : {
6438 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
6439 0 : tree res = generic_simplify_102 (loc, type, _p0, _p1, captures);
6440 0 : if (res) return res;
6441 : }
6442 : }
6443 : break;
6444 : }
6445 414934 : case PLUS_EXPR:
6446 414934 : {
6447 414934 : tree _q30 = TREE_OPERAND (_q20, 0);
6448 414934 : tree _q31 = TREE_OPERAND (_q20, 1);
6449 414934 : switch (TREE_CODE (_p1))
6450 : {
6451 397687 : CASE_CONVERT:
6452 397687 : {
6453 397687 : tree _q60 = TREE_OPERAND (_p1, 0);
6454 397687 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
6455 : {
6456 6686 : {
6457 6686 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
6458 6686 : tree res = generic_simplify_103 (loc, type, _p0, _p1, captures);
6459 6686 : if (res) return res;
6460 : }
6461 : }
6462 391177 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
6463 : {
6464 135 : {
6465 135 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
6466 135 : tree res = generic_simplify_103 (loc, type, _p0, _p1, captures);
6467 135 : if (res) return res;
6468 : }
6469 : }
6470 : break;
6471 : }
6472 408289 : default:;
6473 : }
6474 408289 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q30, 0))
6475 : {
6476 3773 : {
6477 3773 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
6478 3773 : tree res = generic_simplify_103 (loc, type, _p0, _p1, captures);
6479 3773 : if (res) return res;
6480 : }
6481 : }
6482 404516 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
6483 : {
6484 1224 : {
6485 1224 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
6486 1224 : tree res = generic_simplify_103 (loc, type, _p0, _p1, captures);
6487 1224 : if (res) return res;
6488 : }
6489 : }
6490 : break;
6491 : }
6492 101713 : case POINTER_PLUS_EXPR:
6493 101713 : {
6494 101713 : tree _q30 = TREE_OPERAND (_q20, 0);
6495 101713 : tree _q31 = TREE_OPERAND (_q20, 1);
6496 101713 : switch (TREE_CODE (_p1))
6497 : {
6498 101563 : CASE_CONVERT:
6499 101563 : {
6500 101563 : tree _q60 = TREE_OPERAND (_p1, 0);
6501 101563 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
6502 : {
6503 11214 : {
6504 11214 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
6505 11214 : if (!TYPE_SATURATING (type)
6506 : )
6507 : {
6508 11214 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
6509 22428 : && !FIXED_POINT_TYPE_P (type)
6510 : )
6511 : {
6512 11214 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
6513 11214 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
6514 0 : && TREE_CODE (captures[1]) == INTEGER_CST
6515 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
6516 : )
6517 : {
6518 11214 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1294;
6519 11214 : {
6520 11214 : tree res_op0;
6521 11214 : res_op0 = captures[1];
6522 11214 : tree _r;
6523 11214 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
6524 11214 : if (TREE_SIDE_EFFECTS (captures[2]))
6525 11 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6526 11214 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 933, __FILE__, __LINE__, true);
6527 11214 : return _r;
6528 : }
6529 0 : next_after_fail1294:;
6530 : }
6531 : }
6532 : }
6533 : }
6534 : }
6535 : break;
6536 : }
6537 : default:;
6538 : }
6539 : break;
6540 : }
6541 4981763 : default:;
6542 : }
6543 4981763 : switch (TREE_CODE (_p1))
6544 : {
6545 4134767 : CASE_CONVERT:
6546 4134767 : {
6547 4134767 : tree _q40 = TREE_OPERAND (_p1, 0);
6548 4134767 : switch (TREE_CODE (_q40))
6549 : {
6550 517605 : case PLUS_EXPR:
6551 517605 : {
6552 517605 : tree _q50 = TREE_OPERAND (_q40, 0);
6553 517605 : tree _q51 = TREE_OPERAND (_q40, 1);
6554 517605 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
6555 : {
6556 2162 : {
6557 2162 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
6558 2162 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6559 2162 : if (res) return res;
6560 : }
6561 : }
6562 515521 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
6563 : {
6564 321 : {
6565 321 : tree captures[3] ATTRIBUTE_UNUSED = { _q51, _q50, _q20 };
6566 321 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6567 321 : if (res) return res;
6568 : }
6569 : }
6570 : break;
6571 : }
6572 : default:;
6573 : }
6574 : break;
6575 : }
6576 : default:;
6577 : }
6578 : break;
6579 : }
6580 143551 : case NEGATE_EXPR:
6581 143551 : {
6582 143551 : tree _q20 = TREE_OPERAND (_p0, 0);
6583 143551 : if (integer_each_onep (_p1))
6584 : {
6585 41 : {
6586 41 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6587 41 : tree res = generic_simplify_102 (loc, type, _p0, _p1, captures);
6588 41 : if (res) return res;
6589 : }
6590 : }
6591 : break;
6592 : }
6593 22501098 : default:;
6594 : }
6595 22501098 : {
6596 22501098 : tree _p0_pops[1];
6597 22501098 : if (tree_nop_convert (_p0, _p0_pops))
6598 : {
6599 4377300 : tree _q20 = _p0_pops[0];
6600 4377300 : switch (TREE_CODE (_q20))
6601 : {
6602 342458 : case PLUS_EXPR:
6603 342458 : {
6604 342458 : tree _q30 = TREE_OPERAND (_q20, 0);
6605 342458 : tree _q31 = TREE_OPERAND (_q20, 1);
6606 342458 : if (CONSTANT_CLASS_P (_q31))
6607 : {
6608 336242 : if (CONSTANT_CLASS_P (_p1))
6609 : {
6610 27 : {
6611 27 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6612 27 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
6613 27 : if (res) return res;
6614 : }
6615 : }
6616 : }
6617 : break;
6618 : }
6619 1280 : case MINUS_EXPR:
6620 1280 : {
6621 1280 : tree _q30 = TREE_OPERAND (_q20, 0);
6622 1280 : tree _q31 = TREE_OPERAND (_q20, 1);
6623 1280 : if (CONSTANT_CLASS_P (_q31))
6624 : {
6625 0 : if (CONSTANT_CLASS_P (_p1))
6626 : {
6627 0 : {
6628 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6629 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
6630 0 : if (res) return res;
6631 : }
6632 : }
6633 : }
6634 1280 : if (CONSTANT_CLASS_P (_q30))
6635 : {
6636 18 : if (CONSTANT_CLASS_P (_p1))
6637 : {
6638 0 : {
6639 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6640 0 : tree res = generic_simplify_64 (loc, type, _p0, _p1, captures, MINUS_EXPR);
6641 0 : if (res) return res;
6642 : }
6643 : }
6644 : }
6645 : break;
6646 : }
6647 : default:;
6648 : }
6649 : }
6650 : }
6651 22501071 : if (CONSTANT_CLASS_P (_p0))
6652 : {
6653 5647671 : switch (TREE_CODE (_p1))
6654 : {
6655 823 : case MINUS_EXPR:
6656 823 : {
6657 823 : tree _q30 = TREE_OPERAND (_p1, 0);
6658 823 : tree _q31 = TREE_OPERAND (_p1, 1);
6659 823 : if (CONSTANT_CLASS_P (_q30))
6660 : {
6661 639 : {
6662 639 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
6663 639 : tree res = generic_simplify_101 (loc, type, _p0, _p1, captures);
6664 639 : if (res) return res;
6665 : }
6666 : }
6667 : break;
6668 : }
6669 5647041 : default:;
6670 : }
6671 5647041 : {
6672 5647041 : tree _p1_pops[1];
6673 5647041 : if (tree_nop_convert (_p1, _p1_pops))
6674 : {
6675 1880180 : tree _q30 = _p1_pops[0];
6676 1880180 : switch (TREE_CODE (_q30))
6677 : {
6678 7187 : case MINUS_EXPR:
6679 7187 : {
6680 7187 : tree _q40 = TREE_OPERAND (_q30, 0);
6681 7187 : tree _q41 = TREE_OPERAND (_q30, 1);
6682 7187 : if (CONSTANT_CLASS_P (_q40))
6683 : {
6684 29 : {
6685 29 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
6686 29 : tree res = generic_simplify_101 (loc, type, _p0, _p1, captures);
6687 29 : if (res) return res;
6688 : }
6689 : }
6690 : break;
6691 : }
6692 : default:;
6693 : }
6694 : }
6695 : }
6696 : }
6697 22500412 : if (integer_all_onesp (_p0))
6698 : {
6699 1323662 : {
6700 1323662 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
6701 1323662 : if (!TYPE_SATURATING (type)
6702 : )
6703 : {
6704 1323662 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
6705 2647324 : && !FIXED_POINT_TYPE_P (type)
6706 : )
6707 : {
6708 1323662 : if (TREE_CODE (type) != COMPLEX_TYPE
6709 : )
6710 : {
6711 1323660 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1295;
6712 1323660 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1295;
6713 1323660 : {
6714 1323660 : tree res_op0;
6715 1323660 : res_op0 = captures[0];
6716 1323660 : tree _r;
6717 1323660 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
6718 1323660 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 934, __FILE__, __LINE__, true);
6719 1323660 : return _r;
6720 : }
6721 : next_after_fail1295:;
6722 : }
6723 : }
6724 : }
6725 : }
6726 : }
6727 21176752 : switch (TREE_CODE (_p1))
6728 : {
6729 7120831 : CASE_CONVERT:
6730 7120831 : {
6731 7120831 : tree _q30 = TREE_OPERAND (_p1, 0);
6732 7120831 : switch (TREE_CODE (_q30))
6733 : {
6734 704646 : case PLUS_EXPR:
6735 704646 : {
6736 704646 : tree _q40 = TREE_OPERAND (_q30, 0);
6737 704646 : tree _q41 = TREE_OPERAND (_q30, 1);
6738 704646 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
6739 : {
6740 6 : {
6741 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _p0 };
6742 6 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6743 6 : if (res) return res;
6744 : }
6745 : }
6746 704640 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
6747 : {
6748 9149 : {
6749 9149 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _p0 };
6750 9149 : tree res = generic_simplify_104 (loc, type, _p0, _p1, captures);
6751 9149 : if (res) return res;
6752 : }
6753 : }
6754 : break;
6755 : }
6756 : default:;
6757 : }
6758 : break;
6759 : }
6760 21167784 : default:;
6761 : }
6762 21167784 : switch (TREE_CODE (_p0))
6763 : {
6764 4979325 : CASE_CONVERT:
6765 4979325 : {
6766 4979325 : tree _q20 = TREE_OPERAND (_p0, 0);
6767 4979325 : switch (TREE_CODE (_p1))
6768 : {
6769 4132356 : CASE_CONVERT:
6770 4132356 : {
6771 4132356 : tree _q40 = TREE_OPERAND (_p1, 0);
6772 4132356 : switch (TREE_CODE (_q40))
6773 : {
6774 372644 : case POINTER_PLUS_EXPR:
6775 372644 : {
6776 372644 : tree _q50 = TREE_OPERAND (_q40, 0);
6777 372644 : tree _q51 = TREE_OPERAND (_q40, 1);
6778 372644 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
6779 : {
6780 2102 : {
6781 2102 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
6782 2102 : if (!TYPE_SATURATING (type)
6783 : )
6784 : {
6785 2102 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
6786 4204 : && !FIXED_POINT_TYPE_P (type)
6787 : )
6788 : {
6789 2102 : if (INTEGRAL_TYPE_P (type)
6790 2102 : && TYPE_OVERFLOW_UNDEFINED (type)
6791 0 : && TREE_CODE (captures[1]) != INTEGER_CST
6792 2102 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
6793 : )
6794 : {
6795 0 : {
6796 0 : tree utype = unsigned_type_for (type);
6797 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1296;
6798 0 : {
6799 0 : tree res_op0;
6800 0 : {
6801 0 : tree _o1[1], _r1;
6802 0 : {
6803 0 : tree _o2[1], _r2;
6804 0 : _o2[0] = captures[1];
6805 0 : if (TREE_TYPE (_o2[0]) != utype)
6806 : {
6807 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
6808 : }
6809 : else
6810 : _r2 = _o2[0];
6811 0 : _o1[0] = _r2;
6812 : }
6813 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
6814 0 : res_op0 = _r1;
6815 : }
6816 0 : tree _r;
6817 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
6818 0 : if (TREE_SIDE_EFFECTS (captures[2]))
6819 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6820 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 935, __FILE__, __LINE__, true);
6821 0 : return _r;
6822 : }
6823 0 : next_after_fail1296:;
6824 : }
6825 : }
6826 : else
6827 : {
6828 2102 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
6829 2102 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
6830 0 : && TREE_CODE (captures[1]) == INTEGER_CST
6831 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
6832 : )
6833 : {
6834 2102 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1297;
6835 2102 : {
6836 2102 : tree res_op0;
6837 2102 : {
6838 2102 : tree _o1[1], _r1;
6839 2102 : _o1[0] = captures[1];
6840 2102 : if (TREE_TYPE (_o1[0]) != type)
6841 : {
6842 2098 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
6843 : }
6844 : else
6845 : _r1 = _o1[0];
6846 2102 : res_op0 = _r1;
6847 : }
6848 2102 : tree _r;
6849 2102 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
6850 2102 : if (TREE_SIDE_EFFECTS (captures[2]))
6851 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6852 2102 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 936, __FILE__, __LINE__, true);
6853 2102 : return _r;
6854 : }
6855 0 : next_after_fail1297:;
6856 : }
6857 : }
6858 : }
6859 : }
6860 : }
6861 : }
6862 : break;
6863 : }
6864 : default:;
6865 : }
6866 : break;
6867 : }
6868 4977223 : default:;
6869 : }
6870 4977223 : switch (TREE_CODE (_q20))
6871 : {
6872 403265 : case PLUS_EXPR:
6873 403265 : {
6874 403265 : tree _q30 = TREE_OPERAND (_q20, 0);
6875 403265 : tree _q31 = TREE_OPERAND (_q20, 1);
6876 403265 : switch (TREE_CODE (_p1))
6877 : {
6878 386245 : CASE_CONVERT:
6879 386245 : {
6880 386245 : tree _q60 = TREE_OPERAND (_p1, 0);
6881 386245 : switch (TREE_CODE (_q60))
6882 : {
6883 208482 : case PLUS_EXPR:
6884 208482 : {
6885 208482 : tree _q70 = TREE_OPERAND (_q60, 0);
6886 208482 : tree _q71 = TREE_OPERAND (_q60, 1);
6887 208482 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
6888 : {
6889 4497 : {
6890 4497 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
6891 4497 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6892 4497 : if (res) return res;
6893 : }
6894 : }
6895 203985 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q30, 0))
6896 : {
6897 70 : {
6898 70 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q70, _q30 };
6899 70 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6900 70 : if (res) return res;
6901 : }
6902 : }
6903 203915 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q31, 0))
6904 : {
6905 90 : {
6906 90 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q71, _q31 };
6907 90 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6908 90 : if (res) return res;
6909 : }
6910 : }
6911 203825 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q31, 0))
6912 : {
6913 152678 : {
6914 152678 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q70, _q31 };
6915 152678 : tree res = generic_simplify_105 (loc, type, _p0, _p1, captures);
6916 152678 : if (res) return res;
6917 : }
6918 : }
6919 : break;
6920 : }
6921 : default:;
6922 : }
6923 : break;
6924 : }
6925 : default:;
6926 : }
6927 : break;
6928 : }
6929 90499 : case POINTER_PLUS_EXPR:
6930 90499 : {
6931 90499 : tree _q30 = TREE_OPERAND (_q20, 0);
6932 90499 : tree _q31 = TREE_OPERAND (_q20, 1);
6933 90499 : switch (TREE_CODE (_p1))
6934 : {
6935 90349 : CASE_CONVERT:
6936 90349 : {
6937 90349 : tree _q60 = TREE_OPERAND (_p1, 0);
6938 90349 : switch (TREE_CODE (_q60))
6939 : {
6940 53510 : case POINTER_PLUS_EXPR:
6941 53510 : {
6942 53510 : tree _q70 = TREE_OPERAND (_q60, 0);
6943 53510 : tree _q71 = TREE_OPERAND (_q60, 1);
6944 53510 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
6945 : {
6946 9781 : {
6947 9781 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
6948 9781 : if (!TYPE_SATURATING (type)
6949 : )
6950 : {
6951 9781 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
6952 19562 : && !FIXED_POINT_TYPE_P (type)
6953 : )
6954 : {
6955 9781 : if (INTEGRAL_TYPE_P (type)
6956 9781 : && TYPE_OVERFLOW_UNDEFINED (type)
6957 9781 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
6958 : )
6959 : {
6960 0 : {
6961 0 : tree utype = unsigned_type_for (type);
6962 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1298;
6963 0 : {
6964 0 : tree res_op0;
6965 0 : {
6966 0 : tree _o1[2], _r1;
6967 0 : {
6968 0 : tree _o2[1], _r2;
6969 0 : _o2[0] = captures[1];
6970 0 : if (TREE_TYPE (_o2[0]) != utype)
6971 : {
6972 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
6973 : }
6974 : else
6975 : _r2 = _o2[0];
6976 0 : _o1[0] = _r2;
6977 : }
6978 0 : {
6979 0 : tree _o2[1], _r2;
6980 0 : _o2[0] = captures[2];
6981 0 : if (TREE_TYPE (_o2[0]) != utype)
6982 : {
6983 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
6984 : }
6985 : else
6986 : _r2 = _o2[0];
6987 0 : _o1[1] = _r2;
6988 : }
6989 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6990 0 : res_op0 = _r1;
6991 : }
6992 0 : tree _r;
6993 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
6994 0 : if (TREE_SIDE_EFFECTS (captures[3]))
6995 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
6996 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 937, __FILE__, __LINE__, true);
6997 0 : return _r;
6998 : }
6999 0 : next_after_fail1298:;
7000 : }
7001 : }
7002 : else
7003 : {
7004 9781 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7005 9781 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7006 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7007 0 : && tree_int_cst_sign_bit (captures[1]) == 0
7008 0 : && TREE_CODE (captures[2]) == INTEGER_CST
7009 0 : && tree_int_cst_sign_bit (captures[2]) == 0)
7010 : )
7011 : {
7012 9781 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1299;
7013 9781 : {
7014 9781 : tree res_op0;
7015 9781 : {
7016 9781 : tree _o1[1], _r1;
7017 9781 : _o1[0] = captures[1];
7018 9781 : if (TREE_TYPE (_o1[0]) != type)
7019 : {
7020 9728 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7021 : }
7022 : else
7023 : _r1 = _o1[0];
7024 9781 : res_op0 = _r1;
7025 : }
7026 9781 : tree res_op1;
7027 9781 : {
7028 9781 : tree _o1[1], _r1;
7029 9781 : _o1[0] = captures[2];
7030 9781 : if (TREE_TYPE (_o1[0]) != type)
7031 : {
7032 9728 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7033 : }
7034 : else
7035 : _r1 = _o1[0];
7036 9781 : res_op1 = _r1;
7037 : }
7038 9781 : tree _r;
7039 9781 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
7040 9781 : if (TREE_SIDE_EFFECTS (captures[3]))
7041 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
7042 9781 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
7043 9781 : return _r;
7044 : }
7045 0 : next_after_fail1299:;
7046 : }
7047 : }
7048 : }
7049 : }
7050 : }
7051 : }
7052 : break;
7053 : }
7054 : default:;
7055 : }
7056 : break;
7057 : }
7058 : default:;
7059 : }
7060 : break;
7061 : }
7062 : default:;
7063 : }
7064 : break;
7065 : }
7066 1407573 : case MULT_EXPR:
7067 1407573 : {
7068 1407573 : tree _q20 = TREE_OPERAND (_p0, 0);
7069 1407573 : tree _q21 = TREE_OPERAND (_p0, 1);
7070 1407573 : switch (TREE_CODE (_p1))
7071 : {
7072 617545 : case MULT_EXPR:
7073 617545 : {
7074 617545 : tree _q50 = TREE_OPERAND (_p1, 0);
7075 617545 : tree _q51 = TREE_OPERAND (_p1, 1);
7076 617545 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7077 : {
7078 3487 : {
7079 3487 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
7080 3487 : tree res = generic_simplify_71 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7081 3487 : if (res) return res;
7082 : }
7083 : }
7084 616426 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7085 : {
7086 11413 : {
7087 11413 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
7088 11413 : tree res = generic_simplify_71 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7089 11413 : if (res) return res;
7090 : }
7091 : }
7092 605013 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7093 : {
7094 30011 : {
7095 30011 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
7096 30011 : tree res = generic_simplify_71 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7097 30011 : if (res) return res;
7098 : }
7099 : }
7100 575084 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7101 : {
7102 142554 : {
7103 142554 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
7104 142554 : tree res = generic_simplify_71 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7105 142554 : if (res) return res;
7106 : }
7107 : }
7108 : break;
7109 : }
7110 : default:;
7111 : }
7112 : break;
7113 : }
7114 20834380 : default:;
7115 : }
7116 20834380 : switch (TREE_CODE (_p1))
7117 : {
7118 1778708 : case MULT_EXPR:
7119 1778708 : {
7120 1778708 : tree _q30 = TREE_OPERAND (_p1, 0);
7121 1778708 : tree _q31 = TREE_OPERAND (_p1, 1);
7122 1778708 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7123 : {
7124 3884 : {
7125 3884 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
7126 3884 : tree res = generic_simplify_72 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7127 3884 : if (res) return res;
7128 : }
7129 : }
7130 1774868 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
7131 : {
7132 1855 : {
7133 1855 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
7134 1855 : tree res = generic_simplify_72 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7135 1855 : if (res) return res;
7136 : }
7137 : }
7138 : break;
7139 : }
7140 20828778 : default:;
7141 : }
7142 20828778 : switch (TREE_CODE (_p0))
7143 : {
7144 1226731 : case MULT_EXPR:
7145 1226731 : {
7146 1226731 : tree _q20 = TREE_OPERAND (_p0, 0);
7147 1226731 : tree _q21 = TREE_OPERAND (_p0, 1);
7148 1226731 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7149 : {
7150 62080 : {
7151 62080 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7152 62080 : tree res = generic_simplify_73 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7153 62080 : if (res) return res;
7154 : }
7155 : }
7156 1164991 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
7157 : {
7158 632 : {
7159 632 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
7160 632 : tree res = generic_simplify_73 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7161 632 : if (res) return res;
7162 : }
7163 : }
7164 : break;
7165 : }
7166 20766939 : default:;
7167 : }
7168 20766939 : switch (TREE_CODE (_p1))
7169 : {
7170 1773106 : case MULT_EXPR:
7171 1773106 : {
7172 1773106 : tree _q30 = TREE_OPERAND (_p1, 0);
7173 1773106 : tree _q31 = TREE_OPERAND (_p1, 1);
7174 1773106 : switch (TREE_CODE (_q30))
7175 : {
7176 75736 : case MINUS_EXPR:
7177 75736 : {
7178 75736 : tree _q40 = TREE_OPERAND (_q30, 0);
7179 75736 : tree _q41 = TREE_OPERAND (_q30, 1);
7180 75736 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7181 : {
7182 19 : if (tree_zero_one_valued_p (_q31))
7183 : {
7184 0 : {
7185 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
7186 0 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
7187 0 : if (res) return res;
7188 : }
7189 : }
7190 : }
7191 : break;
7192 : }
7193 1773106 : default:;
7194 : }
7195 1773106 : if (tree_zero_one_valued_p (_q30))
7196 : {
7197 1321 : switch (TREE_CODE (_q31))
7198 : {
7199 9 : case MINUS_EXPR:
7200 9 : {
7201 9 : tree _q50 = TREE_OPERAND (_q31, 0);
7202 9 : tree _q51 = TREE_OPERAND (_q31, 1);
7203 9 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7204 : {
7205 9 : {
7206 9 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q51, _q30 };
7207 9 : tree res = generic_simplify_106 (loc, type, _p0, _p1, captures);
7208 9 : if (res) return res;
7209 : }
7210 : }
7211 : break;
7212 : }
7213 : default:;
7214 : }
7215 : }
7216 : break;
7217 : }
7218 20766937 : default:;
7219 : }
7220 20766937 : switch (TREE_CODE (_p0))
7221 : {
7222 92 : case BIT_AND_EXPR:
7223 92 : {
7224 92 : tree _q20 = TREE_OPERAND (_p0, 0);
7225 92 : tree _q21 = TREE_OPERAND (_p0, 1);
7226 92 : switch (TREE_CODE (_q21))
7227 : {
7228 67 : case INTEGER_CST:
7229 67 : {
7230 67 : switch (TREE_CODE (_p1))
7231 : {
7232 28 : case BIT_AND_EXPR:
7233 28 : {
7234 28 : tree _q50 = TREE_OPERAND (_p1, 0);
7235 28 : tree _q51 = TREE_OPERAND (_p1, 1);
7236 28 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7237 : {
7238 6 : if (integer_pow2p (_q51))
7239 : {
7240 6 : {
7241 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
7242 12 : if (INTEGRAL_TYPE_P (type)
7243 12 : && TYPE_PRECISION (type) <= MAX_FIXED_MODE_SIZE
7244 12 : && wi::to_wide (captures[1]) + 1 == wi::to_wide (captures[2])
7245 : )
7246 : {
7247 4 : {
7248 4 : int width = wi::exact_log2 (wi::to_wide (captures[2])) + 1;
7249 4 : tree ntype = NULL_TREE;
7250 4 : if (width > 0 && width < TYPE_PRECISION (type))
7251 4 : ntype = build_nonstandard_integer_type (width, SIGNED);
7252 4 : if (ntype && type_has_mode_precision_p (ntype)
7253 : )
7254 : {
7255 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1300;
7256 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1300;
7257 4 : {
7258 4 : tree res_op0;
7259 4 : {
7260 4 : tree _o1[1], _r1;
7261 4 : _o1[0] = captures[0];
7262 4 : if (TREE_TYPE (_o1[0]) != ntype)
7263 : {
7264 4 : _r1 = fold_build1_loc (loc, NOP_EXPR, ntype, _o1[0]);
7265 : }
7266 : else
7267 : _r1 = _o1[0];
7268 4 : res_op0 = _r1;
7269 : }
7270 4 : tree _r;
7271 4 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7272 4 : if (TREE_SIDE_EFFECTS (captures[1]))
7273 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
7274 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 939, __FILE__, __LINE__, true);
7275 4 : return _r;
7276 : }
7277 2 : next_after_fail1300:;
7278 : }
7279 : }
7280 : }
7281 : }
7282 : }
7283 : }
7284 : break;
7285 : }
7286 : default:;
7287 : }
7288 : break;
7289 : }
7290 : default:;
7291 : }
7292 : break;
7293 : }
7294 0 : case VEC_COND_EXPR:
7295 0 : {
7296 0 : tree _q20 = TREE_OPERAND (_p0, 0);
7297 0 : tree _q21 = TREE_OPERAND (_p0, 1);
7298 0 : tree _q22 = TREE_OPERAND (_p0, 2);
7299 0 : switch (TREE_CODE (_p1))
7300 : {
7301 0 : case VEC_COND_EXPR:
7302 0 : {
7303 0 : tree _q60 = TREE_OPERAND (_p1, 0);
7304 0 : tree _q61 = TREE_OPERAND (_p1, 1);
7305 0 : tree _q62 = TREE_OPERAND (_p1, 2);
7306 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
7307 : {
7308 0 : {
7309 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
7310 0 : if (VECTOR_TYPE_P (type)
7311 0 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
7312 : || types_match (type, TREE_TYPE (captures[2]))
7313 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
7314 : || (optimize_vectors_before_lowering_p ()
7315 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
7316 : )
7317 : {
7318 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1301;
7319 0 : {
7320 0 : tree res_op0;
7321 0 : res_op0 = captures[1];
7322 0 : tree res_op1;
7323 0 : {
7324 0 : tree _o1[2], _r1;
7325 0 : _o1[0] = captures[2];
7326 0 : _o1[1] = captures[5];
7327 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7328 0 : if (EXPR_P (_r1))
7329 0 : goto next_after_fail1301;
7330 0 : res_op1 = _r1;
7331 : }
7332 0 : tree res_op2;
7333 0 : {
7334 0 : tree _o1[2], _r1;
7335 0 : _o1[0] = captures[3];
7336 0 : _o1[1] = captures[6];
7337 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7338 0 : if (EXPR_P (_r1))
7339 0 : goto next_after_fail1301;
7340 0 : res_op2 = _r1;
7341 : }
7342 0 : tree _r;
7343 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7344 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
7345 0 : return _r;
7346 : }
7347 0 : next_after_fail1301:;
7348 : }
7349 : }
7350 : }
7351 : break;
7352 : }
7353 0 : default:;
7354 : }
7355 0 : {
7356 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
7357 0 : if (VECTOR_TYPE_P (type)
7358 0 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
7359 : || types_match (type, TREE_TYPE (captures[2]))
7360 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
7361 : || (optimize_vectors_before_lowering_p ()
7362 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
7363 : )
7364 : {
7365 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1302;
7366 0 : {
7367 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1302;
7368 0 : tree res_op0;
7369 0 : res_op0 = captures[1];
7370 0 : tree res_op1;
7371 0 : {
7372 0 : tree _o1[2], _r1;
7373 0 : _o1[0] = captures[2];
7374 0 : _o1[1] = unshare_expr (captures[4]);
7375 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7376 0 : if (EXPR_P (_r1))
7377 0 : goto next_after_fail1302;
7378 0 : res_op1 = _r1;
7379 : }
7380 0 : tree res_op2;
7381 0 : {
7382 0 : tree _o1[2], _r1;
7383 0 : _o1[0] = captures[3];
7384 0 : _o1[1] = captures[4];
7385 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7386 0 : if (EXPR_P (_r1))
7387 0 : goto next_after_fail1302;
7388 0 : res_op2 = _r1;
7389 : }
7390 0 : tree _r;
7391 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7392 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
7393 0 : return _r;
7394 : }
7395 0 : next_after_fail1302:;
7396 : }
7397 : }
7398 0 : break;
7399 : }
7400 20766933 : default:;
7401 : }
7402 20766933 : if (integer_zerop (_p0))
7403 : {
7404 304301 : {
7405 304301 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
7406 304301 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1303;
7407 304301 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1303;
7408 304301 : {
7409 304301 : tree res_op0;
7410 304301 : res_op0 = captures[0];
7411 304301 : tree _r;
7412 304301 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
7413 304301 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
7414 304301 : return _r;
7415 : }
7416 : next_after_fail1303:;
7417 : }
7418 : }
7419 20462632 : if (real_zerop (_p0))
7420 : {
7421 158 : {
7422 158 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
7423 158 : if (fold_real_zero_addition_p (type, captures[1], captures[0], 0)
7424 : )
7425 : {
7426 55 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1304;
7427 55 : {
7428 55 : tree res_op0;
7429 55 : res_op0 = captures[1];
7430 55 : tree _r;
7431 55 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
7432 55 : if (TREE_SIDE_EFFECTS (captures[0]))
7433 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
7434 55 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
7435 55 : return _r;
7436 : }
7437 0 : next_after_fail1304:;
7438 : }
7439 : }
7440 : }
7441 20462577 : switch (TREE_CODE (_p1))
7442 : {
7443 4 : case VEC_COND_EXPR:
7444 4 : {
7445 4 : tree _q30 = TREE_OPERAND (_p1, 0);
7446 4 : tree _q31 = TREE_OPERAND (_p1, 1);
7447 4 : tree _q32 = TREE_OPERAND (_p1, 2);
7448 4 : {
7449 4 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
7450 4 : if (VECTOR_TYPE_P (type)
7451 4 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
7452 : || types_match (type, TREE_TYPE (captures[3]))
7453 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
7454 : || (optimize_vectors_before_lowering_p ()
7455 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
7456 : )
7457 : {
7458 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1305;
7459 4 : {
7460 4 : if (! tree_invariant_p (captures[0])) goto next_after_fail1305;
7461 0 : tree res_op0;
7462 0 : res_op0 = captures[2];
7463 0 : tree res_op1;
7464 0 : {
7465 0 : tree _o1[2], _r1;
7466 0 : _o1[0] = unshare_expr (captures[0]);
7467 0 : _o1[1] = captures[3];
7468 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7469 0 : if (EXPR_P (_r1))
7470 0 : goto next_after_fail1305;
7471 0 : res_op1 = _r1;
7472 : }
7473 0 : tree res_op2;
7474 0 : {
7475 0 : tree _o1[2], _r1;
7476 0 : _o1[0] = captures[0];
7477 0 : _o1[1] = captures[4];
7478 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, type, _o1[0], _o1[1]);
7479 0 : if (EXPR_P (_r1))
7480 0 : goto next_after_fail1305;
7481 0 : res_op2 = _r1;
7482 : }
7483 0 : tree _r;
7484 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
7485 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
7486 0 : return _r;
7487 : }
7488 4 : next_after_fail1305:;
7489 : }
7490 : }
7491 4 : if (integer_each_onep (_q31))
7492 : {
7493 0 : if (integer_zerop (_q32))
7494 : {
7495 0 : {
7496 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
7497 0 : tree res = generic_simplify_107 (loc, type, _p0, _p1, captures);
7498 0 : if (res) return res;
7499 : }
7500 : }
7501 : }
7502 : break;
7503 : }
7504 111903 : case VIEW_CONVERT_EXPR:
7505 111903 : {
7506 111903 : tree _q30 = TREE_OPERAND (_p1, 0);
7507 111903 : switch (TREE_CODE (_q30))
7508 : {
7509 0 : case VEC_COND_EXPR:
7510 0 : {
7511 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7512 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7513 0 : tree _q42 = TREE_OPERAND (_q30, 2);
7514 0 : if (integer_each_onep (_q41))
7515 : {
7516 0 : if (integer_zerop (_q42))
7517 : {
7518 0 : {
7519 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42 };
7520 0 : tree res = generic_simplify_107 (loc, type, _p0, _p1, captures);
7521 0 : if (res) return res;
7522 : }
7523 : }
7524 : }
7525 : break;
7526 : }
7527 : default:;
7528 : }
7529 : break;
7530 : }
7531 20462577 : default:;
7532 : }
7533 20462577 : switch (TREE_CODE (_p0))
7534 : {
7535 112325 : case RDIV_EXPR:
7536 112325 : {
7537 112325 : tree _q20 = TREE_OPERAND (_p0, 0);
7538 112325 : tree _q21 = TREE_OPERAND (_p0, 1);
7539 112325 : switch (TREE_CODE (_p1))
7540 : {
7541 18797 : case RDIV_EXPR:
7542 18797 : {
7543 18797 : tree _q50 = TREE_OPERAND (_p1, 0);
7544 18797 : tree _q51 = TREE_OPERAND (_p1, 1);
7545 18797 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7546 : {
7547 18777 : {
7548 18777 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7549 18777 : tree res = generic_simplify_79 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7550 18777 : if (res) return res;
7551 : }
7552 : }
7553 : break;
7554 : }
7555 : default:;
7556 : }
7557 : break;
7558 : }
7559 1359628 : case PLUS_EXPR:
7560 1359628 : {
7561 1359628 : tree _q20 = TREE_OPERAND (_p0, 0);
7562 1359628 : tree _q21 = TREE_OPERAND (_p0, 1);
7563 1359628 : switch (TREE_CODE (_q20))
7564 : {
7565 57180 : case CALL_EXPR:
7566 57180 : switch (get_call_combined_fn (_q20))
7567 : {
7568 4 : case CFN_BUILT_IN_POPCOUNT:
7569 4 : if (call_expr_nargs (_q20) == 1)
7570 : {
7571 4 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7572 4 : switch (TREE_CODE (_q21))
7573 : {
7574 4 : case CALL_EXPR:
7575 4 : switch (get_call_combined_fn (_q21))
7576 : {
7577 4 : case CFN_BUILT_IN_POPCOUNT:
7578 4 : if (call_expr_nargs (_q21) == 1)
7579 : {
7580 4 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7581 4 : switch (TREE_CODE (_p1))
7582 : {
7583 4 : case CALL_EXPR:
7584 4 : switch (get_call_combined_fn (_p1))
7585 : {
7586 4 : case CFN_BUILT_IN_POPCOUNT:
7587 4 : if (call_expr_nargs (_p1) == 1)
7588 : {
7589 4 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7590 4 : switch (TREE_CODE (_q70))
7591 : {
7592 2 : case BIT_AND_EXPR:
7593 2 : {
7594 2 : tree _q80 = TREE_OPERAND (_q70, 0);
7595 2 : tree _q81 = TREE_OPERAND (_q70, 1);
7596 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7597 : {
7598 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7599 : {
7600 1 : {
7601 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7602 1 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
7603 1 : if (res) return res;
7604 : }
7605 : }
7606 : }
7607 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7608 : {
7609 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7610 : {
7611 1 : {
7612 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7613 1 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
7614 1 : if (res) return res;
7615 : }
7616 : }
7617 : }
7618 : break;
7619 : }
7620 2 : case BIT_IOR_EXPR:
7621 2 : {
7622 2 : tree _q80 = TREE_OPERAND (_q70, 0);
7623 2 : tree _q81 = TREE_OPERAND (_q70, 1);
7624 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7625 : {
7626 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7627 : {
7628 1 : {
7629 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7630 1 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
7631 1 : if (res) return res;
7632 : }
7633 : }
7634 : }
7635 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7636 : {
7637 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7638 : {
7639 1 : {
7640 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7641 1 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
7642 1 : if (res) return res;
7643 : }
7644 : }
7645 : }
7646 : break;
7647 : }
7648 : default:;
7649 : }
7650 : }
7651 : break;
7652 : default:;
7653 : }
7654 : break;
7655 : default:;
7656 : }
7657 : }
7658 : break;
7659 : default:;
7660 : }
7661 : break;
7662 : default:;
7663 : }
7664 : }
7665 : break;
7666 0 : case CFN_BUILT_IN_POPCOUNTLL:
7667 0 : if (call_expr_nargs (_q20) == 1)
7668 : {
7669 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7670 0 : switch (TREE_CODE (_q21))
7671 : {
7672 0 : case CALL_EXPR:
7673 0 : switch (get_call_combined_fn (_q21))
7674 : {
7675 0 : case CFN_BUILT_IN_POPCOUNTLL:
7676 0 : if (call_expr_nargs (_q21) == 1)
7677 : {
7678 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7679 0 : switch (TREE_CODE (_p1))
7680 : {
7681 0 : case CALL_EXPR:
7682 0 : switch (get_call_combined_fn (_p1))
7683 : {
7684 0 : case CFN_BUILT_IN_POPCOUNTLL:
7685 0 : if (call_expr_nargs (_p1) == 1)
7686 : {
7687 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7688 0 : switch (TREE_CODE (_q70))
7689 : {
7690 0 : case BIT_AND_EXPR:
7691 0 : {
7692 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7693 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7694 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7695 : {
7696 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7697 : {
7698 0 : {
7699 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7700 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7701 0 : if (res) return res;
7702 : }
7703 : }
7704 : }
7705 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7706 : {
7707 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7708 : {
7709 0 : {
7710 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7711 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7712 0 : if (res) return res;
7713 : }
7714 : }
7715 : }
7716 : break;
7717 : }
7718 0 : case BIT_IOR_EXPR:
7719 0 : {
7720 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7721 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7722 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7723 : {
7724 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7725 : {
7726 0 : {
7727 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7728 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7729 0 : if (res) return res;
7730 : }
7731 : }
7732 : }
7733 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7734 : {
7735 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7736 : {
7737 0 : {
7738 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7739 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
7740 0 : if (res) return res;
7741 : }
7742 : }
7743 : }
7744 : break;
7745 : }
7746 : default:;
7747 : }
7748 : }
7749 : break;
7750 : default:;
7751 : }
7752 : break;
7753 : default:;
7754 : }
7755 : }
7756 : break;
7757 : default:;
7758 : }
7759 : break;
7760 : default:;
7761 : }
7762 : }
7763 : break;
7764 0 : case CFN_POPCOUNT:
7765 0 : if (call_expr_nargs (_q20) == 1)
7766 : {
7767 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7768 0 : switch (TREE_CODE (_q21))
7769 : {
7770 0 : case CALL_EXPR:
7771 0 : switch (get_call_combined_fn (_q21))
7772 : {
7773 0 : case CFN_POPCOUNT:
7774 0 : if (call_expr_nargs (_q21) == 1)
7775 : {
7776 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7777 0 : switch (TREE_CODE (_p1))
7778 : {
7779 0 : case CALL_EXPR:
7780 0 : switch (get_call_combined_fn (_p1))
7781 : {
7782 0 : case CFN_POPCOUNT:
7783 0 : if (call_expr_nargs (_p1) == 1)
7784 : {
7785 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7786 0 : switch (TREE_CODE (_q70))
7787 : {
7788 0 : case BIT_AND_EXPR:
7789 0 : {
7790 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7791 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7792 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7793 : {
7794 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7795 : {
7796 0 : {
7797 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7798 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
7799 0 : if (res) return res;
7800 : }
7801 : }
7802 : }
7803 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7804 : {
7805 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7806 : {
7807 0 : {
7808 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7809 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
7810 0 : if (res) return res;
7811 : }
7812 : }
7813 : }
7814 : break;
7815 : }
7816 0 : case BIT_IOR_EXPR:
7817 0 : {
7818 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7819 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7820 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7821 : {
7822 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7823 : {
7824 0 : {
7825 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7826 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
7827 0 : if (res) return res;
7828 : }
7829 : }
7830 : }
7831 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7832 : {
7833 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7834 : {
7835 0 : {
7836 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7837 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
7838 0 : if (res) return res;
7839 : }
7840 : }
7841 : }
7842 : break;
7843 : }
7844 : default:;
7845 : }
7846 : }
7847 : break;
7848 : default:;
7849 : }
7850 : break;
7851 : default:;
7852 : }
7853 : }
7854 : break;
7855 : default:;
7856 : }
7857 : break;
7858 : default:;
7859 : }
7860 : }
7861 : break;
7862 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
7863 0 : if (call_expr_nargs (_q20) == 1)
7864 : {
7865 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7866 0 : switch (TREE_CODE (_q21))
7867 : {
7868 0 : case CALL_EXPR:
7869 0 : switch (get_call_combined_fn (_q21))
7870 : {
7871 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
7872 0 : if (call_expr_nargs (_q21) == 1)
7873 : {
7874 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7875 0 : switch (TREE_CODE (_p1))
7876 : {
7877 0 : case CALL_EXPR:
7878 0 : switch (get_call_combined_fn (_p1))
7879 : {
7880 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
7881 0 : if (call_expr_nargs (_p1) == 1)
7882 : {
7883 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7884 0 : switch (TREE_CODE (_q70))
7885 : {
7886 0 : case BIT_AND_EXPR:
7887 0 : {
7888 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7889 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7890 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7891 : {
7892 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7893 : {
7894 0 : {
7895 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7896 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
7897 0 : if (res) return res;
7898 : }
7899 : }
7900 : }
7901 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7902 : {
7903 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7904 : {
7905 0 : {
7906 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7907 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
7908 0 : if (res) return res;
7909 : }
7910 : }
7911 : }
7912 : break;
7913 : }
7914 0 : case BIT_IOR_EXPR:
7915 0 : {
7916 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7917 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7918 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7919 : {
7920 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7921 : {
7922 0 : {
7923 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7924 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
7925 0 : if (res) return res;
7926 : }
7927 : }
7928 : }
7929 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
7930 : {
7931 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
7932 : {
7933 0 : {
7934 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7935 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
7936 0 : if (res) return res;
7937 : }
7938 : }
7939 : }
7940 : break;
7941 : }
7942 : default:;
7943 : }
7944 : }
7945 : break;
7946 : default:;
7947 : }
7948 : break;
7949 : default:;
7950 : }
7951 : }
7952 : break;
7953 : default:;
7954 : }
7955 : break;
7956 : default:;
7957 : }
7958 : }
7959 : break;
7960 0 : case CFN_BUILT_IN_POPCOUNTL:
7961 0 : if (call_expr_nargs (_q20) == 1)
7962 : {
7963 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
7964 0 : switch (TREE_CODE (_q21))
7965 : {
7966 0 : case CALL_EXPR:
7967 0 : switch (get_call_combined_fn (_q21))
7968 : {
7969 0 : case CFN_BUILT_IN_POPCOUNTL:
7970 0 : if (call_expr_nargs (_q21) == 1)
7971 : {
7972 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
7973 0 : switch (TREE_CODE (_p1))
7974 : {
7975 0 : case CALL_EXPR:
7976 0 : switch (get_call_combined_fn (_p1))
7977 : {
7978 0 : case CFN_BUILT_IN_POPCOUNTL:
7979 0 : if (call_expr_nargs (_p1) == 1)
7980 : {
7981 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
7982 0 : switch (TREE_CODE (_q70))
7983 : {
7984 0 : case BIT_AND_EXPR:
7985 0 : {
7986 0 : tree _q80 = TREE_OPERAND (_q70, 0);
7987 0 : tree _q81 = TREE_OPERAND (_q70, 1);
7988 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
7989 : {
7990 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
7991 : {
7992 0 : {
7993 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
7994 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
7995 0 : if (res) return res;
7996 : }
7997 : }
7998 : }
7999 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8000 : {
8001 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8002 : {
8003 0 : {
8004 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8005 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
8006 0 : if (res) return res;
8007 : }
8008 : }
8009 : }
8010 : break;
8011 : }
8012 0 : case BIT_IOR_EXPR:
8013 0 : {
8014 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8015 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8016 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8017 : {
8018 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8019 : {
8020 0 : {
8021 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8022 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8023 0 : if (res) return res;
8024 : }
8025 : }
8026 : }
8027 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8028 : {
8029 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8030 : {
8031 0 : {
8032 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8033 0 : tree res = generic_simplify_109 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8034 0 : if (res) return res;
8035 : }
8036 : }
8037 : }
8038 : break;
8039 : }
8040 : default:;
8041 : }
8042 : }
8043 : break;
8044 : default:;
8045 : }
8046 : break;
8047 : default:;
8048 : }
8049 : }
8050 : break;
8051 : default:;
8052 : }
8053 : break;
8054 : default:;
8055 : }
8056 : }
8057 : break;
8058 : default:;
8059 : }
8060 : break;
8061 : default:;
8062 : }
8063 : break;
8064 : }
8065 0 : case VEC_PERM_EXPR:
8066 0 : {
8067 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8068 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8069 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8070 0 : switch (TREE_CODE (_q20))
8071 : {
8072 0 : case MULT_EXPR:
8073 0 : {
8074 0 : tree _q30 = TREE_OPERAND (_q20, 0);
8075 0 : tree _q31 = TREE_OPERAND (_q20, 1);
8076 0 : if (tree_vec_same_elem_p (_q31))
8077 : {
8078 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8079 : {
8080 0 : {
8081 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q22, _p1 };
8082 0 : tree res = generic_simplify_110 (loc, type, _p0, _p1, captures);
8083 0 : if (res) return res;
8084 : }
8085 : }
8086 : }
8087 0 : if (tree_vec_same_elem_p (_q30))
8088 : {
8089 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8090 : {
8091 0 : {
8092 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30, _q22, _p1 };
8093 0 : tree res = generic_simplify_110 (loc, type, _p0, _p1, captures);
8094 0 : if (res) return res;
8095 : }
8096 : }
8097 : }
8098 : break;
8099 : }
8100 : default:;
8101 : }
8102 : break;
8103 : }
8104 684720 : case CALL_EXPR:
8105 684720 : switch (get_call_combined_fn (_p0))
8106 : {
8107 18 : case CFN_BUILT_IN_LOG:
8108 18 : if (call_expr_nargs (_p0) == 1)
8109 : {
8110 18 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8111 18 : switch (TREE_CODE (_p1))
8112 : {
8113 0 : case CALL_EXPR:
8114 0 : switch (get_call_combined_fn (_p1))
8115 : {
8116 0 : case CFN_BUILT_IN_LOG:
8117 0 : if (call_expr_nargs (_p1) == 1)
8118 : {
8119 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8120 0 : {
8121 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8122 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG);
8123 0 : if (res) return res;
8124 : }
8125 : }
8126 : break;
8127 : default:;
8128 : }
8129 : break;
8130 : default:;
8131 : }
8132 : }
8133 : break;
8134 2 : case CFN_BUILT_IN_LOG2:
8135 2 : if (call_expr_nargs (_p0) == 1)
8136 : {
8137 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8138 2 : switch (TREE_CODE (_p1))
8139 : {
8140 0 : case CALL_EXPR:
8141 0 : switch (get_call_combined_fn (_p1))
8142 : {
8143 0 : case CFN_BUILT_IN_LOG2:
8144 0 : if (call_expr_nargs (_p1) == 1)
8145 : {
8146 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8147 0 : {
8148 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8149 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2);
8150 0 : if (res) return res;
8151 : }
8152 : }
8153 : break;
8154 : default:;
8155 : }
8156 : break;
8157 : default:;
8158 : }
8159 : }
8160 : break;
8161 0 : case CFN_BUILT_IN_LOGF:
8162 0 : if (call_expr_nargs (_p0) == 1)
8163 : {
8164 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8165 0 : switch (TREE_CODE (_p1))
8166 : {
8167 0 : case CALL_EXPR:
8168 0 : switch (get_call_combined_fn (_p1))
8169 : {
8170 0 : case CFN_BUILT_IN_LOGF:
8171 0 : if (call_expr_nargs (_p1) == 1)
8172 : {
8173 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8174 0 : {
8175 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8176 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF);
8177 0 : if (res) return res;
8178 : }
8179 : }
8180 : break;
8181 : default:;
8182 : }
8183 : break;
8184 : default:;
8185 : }
8186 : }
8187 : break;
8188 0 : case CFN_BUILT_IN_LOGL:
8189 0 : if (call_expr_nargs (_p0) == 1)
8190 : {
8191 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8192 0 : switch (TREE_CODE (_p1))
8193 : {
8194 0 : case CALL_EXPR:
8195 0 : switch (get_call_combined_fn (_p1))
8196 : {
8197 0 : case CFN_BUILT_IN_LOGL:
8198 0 : if (call_expr_nargs (_p1) == 1)
8199 : {
8200 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8201 0 : {
8202 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8203 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL);
8204 0 : if (res) return res;
8205 : }
8206 : }
8207 : break;
8208 : default:;
8209 : }
8210 : break;
8211 : default:;
8212 : }
8213 : }
8214 : break;
8215 0 : case CFN_BUILT_IN_LOG10F:
8216 0 : if (call_expr_nargs (_p0) == 1)
8217 : {
8218 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8219 0 : switch (TREE_CODE (_p1))
8220 : {
8221 0 : case CALL_EXPR:
8222 0 : switch (get_call_combined_fn (_p1))
8223 : {
8224 0 : case CFN_BUILT_IN_LOG10F:
8225 0 : if (call_expr_nargs (_p1) == 1)
8226 : {
8227 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8228 0 : {
8229 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8230 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F);
8231 0 : if (res) return res;
8232 : }
8233 : }
8234 : break;
8235 : default:;
8236 : }
8237 : break;
8238 : default:;
8239 : }
8240 : }
8241 : break;
8242 0 : case CFN_BUILT_IN_LOG10L:
8243 0 : if (call_expr_nargs (_p0) == 1)
8244 : {
8245 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8246 0 : switch (TREE_CODE (_p1))
8247 : {
8248 0 : case CALL_EXPR:
8249 0 : switch (get_call_combined_fn (_p1))
8250 : {
8251 0 : case CFN_BUILT_IN_LOG10L:
8252 0 : if (call_expr_nargs (_p1) == 1)
8253 : {
8254 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8255 0 : {
8256 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8257 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L);
8258 0 : if (res) return res;
8259 : }
8260 : }
8261 : break;
8262 : default:;
8263 : }
8264 : break;
8265 : default:;
8266 : }
8267 : }
8268 : break;
8269 0 : case CFN_LOG:
8270 0 : if (call_expr_nargs (_p0) == 1)
8271 : {
8272 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8273 0 : switch (TREE_CODE (_p1))
8274 : {
8275 0 : case CALL_EXPR:
8276 0 : switch (get_call_combined_fn (_p1))
8277 : {
8278 0 : case CFN_LOG:
8279 0 : if (call_expr_nargs (_p1) == 1)
8280 : {
8281 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8282 0 : {
8283 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8284 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_LOG);
8285 0 : if (res) return res;
8286 : }
8287 : }
8288 : break;
8289 : default:;
8290 : }
8291 : break;
8292 : default:;
8293 : }
8294 : }
8295 : break;
8296 0 : case CFN_LOG2:
8297 0 : if (call_expr_nargs (_p0) == 1)
8298 : {
8299 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8300 0 : switch (TREE_CODE (_p1))
8301 : {
8302 0 : case CALL_EXPR:
8303 0 : switch (get_call_combined_fn (_p1))
8304 : {
8305 0 : case CFN_LOG2:
8306 0 : if (call_expr_nargs (_p1) == 1)
8307 : {
8308 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8309 0 : {
8310 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8311 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_LOG2);
8312 0 : if (res) return res;
8313 : }
8314 : }
8315 : break;
8316 : default:;
8317 : }
8318 : break;
8319 : default:;
8320 : }
8321 : }
8322 : break;
8323 0 : case CFN_LOG10:
8324 0 : if (call_expr_nargs (_p0) == 1)
8325 : {
8326 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8327 0 : switch (TREE_CODE (_p1))
8328 : {
8329 0 : case CALL_EXPR:
8330 0 : switch (get_call_combined_fn (_p1))
8331 : {
8332 0 : case CFN_LOG10:
8333 0 : if (call_expr_nargs (_p1) == 1)
8334 : {
8335 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8336 0 : {
8337 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8338 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_LOG10);
8339 0 : if (res) return res;
8340 : }
8341 : }
8342 : break;
8343 : default:;
8344 : }
8345 : break;
8346 : default:;
8347 : }
8348 : }
8349 : break;
8350 6 : case CFN_BUILT_IN_LOG10:
8351 6 : if (call_expr_nargs (_p0) == 1)
8352 : {
8353 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8354 6 : switch (TREE_CODE (_p1))
8355 : {
8356 2 : case CALL_EXPR:
8357 2 : switch (get_call_combined_fn (_p1))
8358 : {
8359 2 : case CFN_BUILT_IN_LOG10:
8360 2 : if (call_expr_nargs (_p1) == 1)
8361 : {
8362 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8363 2 : {
8364 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8365 2 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10);
8366 2 : if (res) return res;
8367 : }
8368 : }
8369 : break;
8370 : default:;
8371 : }
8372 : break;
8373 : default:;
8374 : }
8375 : }
8376 : break;
8377 0 : case CFN_BUILT_IN_LOG2F:
8378 0 : if (call_expr_nargs (_p0) == 1)
8379 : {
8380 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8381 0 : switch (TREE_CODE (_p1))
8382 : {
8383 0 : case CALL_EXPR:
8384 0 : switch (get_call_combined_fn (_p1))
8385 : {
8386 0 : case CFN_BUILT_IN_LOG2F:
8387 0 : if (call_expr_nargs (_p1) == 1)
8388 : {
8389 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8390 0 : {
8391 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8392 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F);
8393 0 : if (res) return res;
8394 : }
8395 : }
8396 : break;
8397 : default:;
8398 : }
8399 : break;
8400 : default:;
8401 : }
8402 : }
8403 : break;
8404 0 : case CFN_BUILT_IN_LOG2L:
8405 0 : if (call_expr_nargs (_p0) == 1)
8406 : {
8407 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8408 0 : switch (TREE_CODE (_p1))
8409 : {
8410 0 : case CALL_EXPR:
8411 0 : switch (get_call_combined_fn (_p1))
8412 : {
8413 0 : case CFN_BUILT_IN_LOG2L:
8414 0 : if (call_expr_nargs (_p1) == 1)
8415 : {
8416 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8417 0 : {
8418 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8419 0 : tree res = generic_simplify_108 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L);
8420 0 : if (res) return res;
8421 : }
8422 : }
8423 : break;
8424 : default:;
8425 : }
8426 : break;
8427 : default:;
8428 : }
8429 : }
8430 : break;
8431 : default:;
8432 : }
8433 : break;
8434 20462560 : default:;
8435 : }
8436 20462560 : switch (TREE_CODE (_p1))
8437 : {
8438 10635 : case BIT_AND_EXPR:
8439 10635 : {
8440 10635 : tree _q30 = TREE_OPERAND (_p1, 0);
8441 10635 : tree _q31 = TREE_OPERAND (_p1, 1);
8442 10635 : switch (TREE_CODE (_q30))
8443 : {
8444 80 : case MAX_EXPR:
8445 80 : {
8446 80 : tree _q40 = TREE_OPERAND (_q30, 0);
8447 80 : tree _q41 = TREE_OPERAND (_q30, 1);
8448 80 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
8449 : {
8450 80 : switch (TREE_CODE (_q41))
8451 : {
8452 80 : case INTEGER_CST:
8453 80 : {
8454 80 : switch (TREE_CODE (_q31))
8455 : {
8456 72 : case INTEGER_CST:
8457 72 : {
8458 72 : {
8459 72 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
8460 72 : {
8461 72 : auto i = wi::neg (wi::to_wide (captures[2]));
8462 72 : if (wi::popcount (i) == 1
8463 200 : && (wi::to_wide (captures[1])) == (i - 1)
8464 : )
8465 : {
8466 40 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
8467 : )
8468 : {
8469 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1306;
8470 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1306;
8471 8 : {
8472 8 : tree res_op0;
8473 8 : res_op0 = captures[0];
8474 8 : tree res_op1;
8475 8 : res_op1 = captures[1];
8476 8 : tree _r;
8477 8 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
8478 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 942, __FILE__, __LINE__, true);
8479 8 : return _r;
8480 : }
8481 64 : next_after_fail1306:;
8482 : }
8483 : else
8484 : {
8485 32 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1307;
8486 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1307;
8487 32 : {
8488 32 : if (! tree_invariant_p (captures[0])) goto next_after_fail1307;
8489 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail1307;
8490 0 : tree res_op0;
8491 0 : {
8492 0 : tree _o1[2], _r1;
8493 0 : _o1[0] = unshare_expr (captures[0]);
8494 0 : _o1[1] = unshare_expr (captures[1]);
8495 0 : _r1 = fold_build2_loc (loc, LE_EXPR, boolean_type_node, _o1[0], _o1[1]);
8496 0 : res_op0 = _r1;
8497 : }
8498 0 : tree res_op1;
8499 0 : res_op1 = unshare_expr (captures[0]);
8500 0 : tree res_op2;
8501 0 : {
8502 0 : tree _o1[2], _r1;
8503 0 : _o1[0] = captures[0];
8504 0 : _o1[1] = captures[1];
8505 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8506 0 : res_op2 = _r1;
8507 : }
8508 0 : tree _r;
8509 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
8510 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
8511 0 : return _r;
8512 : }
8513 64 : next_after_fail1307:;
8514 : }
8515 : }
8516 8 : }
8517 : }
8518 64 : break;
8519 : }
8520 : default:;
8521 : }
8522 : break;
8523 : }
8524 : default:;
8525 : }
8526 : }
8527 : break;
8528 : }
8529 : default:;
8530 : }
8531 : break;
8532 : }
8533 20462552 : default:;
8534 : }
8535 20462552 : switch (TREE_CODE (_p0))
8536 : {
8537 0 : case VEC_PERM_EXPR:
8538 0 : {
8539 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8540 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8541 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8542 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8543 : {
8544 0 : switch (TREE_CODE (_p1))
8545 : {
8546 0 : case VEC_PERM_EXPR:
8547 0 : {
8548 0 : tree _q60 = TREE_OPERAND (_p1, 0);
8549 0 : tree _q61 = TREE_OPERAND (_p1, 1);
8550 0 : tree _q62 = TREE_OPERAND (_p1, 2);
8551 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
8552 : {
8553 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
8554 : {
8555 0 : {
8556 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
8557 0 : if (VECTOR_INTEGER_TYPE_P (type)
8558 : )
8559 : {
8560 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1308;
8561 0 : {
8562 0 : tree res_op0;
8563 0 : {
8564 0 : tree _o1[2], _r1;
8565 0 : _o1[0] = captures[0];
8566 0 : _o1[1] = captures[2];
8567 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8568 0 : captures[3] = _r1;
8569 : }
8570 0 : res_op0 = unshare_expr (captures[3]);
8571 0 : tree res_op1;
8572 0 : res_op1 = captures[3];
8573 0 : tree res_op2;
8574 0 : res_op2 = captures[1];
8575 0 : tree _r;
8576 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
8577 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
8578 0 : return _r;
8579 : }
8580 0 : next_after_fail1308:;
8581 : }
8582 : }
8583 : }
8584 : }
8585 : break;
8586 : }
8587 0 : default:;
8588 : }
8589 0 : switch (TREE_CODE (_q22))
8590 : {
8591 0 : case VECTOR_CST:
8592 0 : {
8593 0 : switch (TREE_CODE (_p1))
8594 : {
8595 0 : case VEC_PERM_EXPR:
8596 0 : {
8597 0 : tree _q60 = TREE_OPERAND (_p1, 0);
8598 0 : tree _q61 = TREE_OPERAND (_p1, 1);
8599 0 : tree _q62 = TREE_OPERAND (_p1, 2);
8600 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
8601 : {
8602 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
8603 : {
8604 0 : switch (TREE_CODE (_q62))
8605 : {
8606 0 : case VECTOR_CST:
8607 0 : {
8608 0 : {
8609 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
8610 0 : tree res = generic_simplify_85 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8611 0 : if (res) return res;
8612 : }
8613 0 : break;
8614 : }
8615 : default:;
8616 : }
8617 : }
8618 : }
8619 : break;
8620 : }
8621 : default:;
8622 : }
8623 : break;
8624 : }
8625 : default:;
8626 : }
8627 : }
8628 : break;
8629 : }
8630 : default:;
8631 : }
8632 : return NULL_TREE;
8633 : }
8634 :
8635 : tree
8636 1249506 : generic_simplify_LSHIFT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
8637 : {
8638 1249506 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8639 1249506 : switch (TREE_CODE (_p1))
8640 : {
8641 250 : case TRUNC_MOD_EXPR:
8642 250 : {
8643 250 : tree _q30 = TREE_OPERAND (_p1, 0);
8644 250 : tree _q31 = TREE_OPERAND (_p1, 1);
8645 250 : {
8646 250 : tree _q31_pops[1];
8647 250 : if (tree_power_of_two_cand (_q31, _q31_pops))
8648 : {
8649 244 : tree _q50 = _q31_pops[0];
8650 244 : {
8651 244 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
8652 244 : tree res = generic_simplify_418 (loc, type, _p0, _p1, captures, LSHIFT_EXPR, TRUNC_MOD_EXPR);
8653 244 : if (res) return res;
8654 : }
8655 : }
8656 : }
8657 75 : break;
8658 : }
8659 0 : case FLOOR_MOD_EXPR:
8660 0 : {
8661 0 : tree _q30 = TREE_OPERAND (_p1, 0);
8662 0 : tree _q31 = TREE_OPERAND (_p1, 1);
8663 0 : {
8664 0 : tree _q31_pops[1];
8665 0 : if (tree_power_of_two_cand (_q31, _q31_pops))
8666 : {
8667 0 : tree _q50 = _q31_pops[0];
8668 0 : {
8669 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
8670 0 : tree res = generic_simplify_418 (loc, type, _p0, _p1, captures, LSHIFT_EXPR, FLOOR_MOD_EXPR);
8671 0 : if (res) return res;
8672 : }
8673 : }
8674 : }
8675 0 : break;
8676 : }
8677 1249331 : default:;
8678 : }
8679 1249331 : if (uniform_integer_cst_p (_p1))
8680 : {
8681 853994 : {
8682 853994 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8683 853994 : tree res = generic_simplify_419 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
8684 853994 : if (res) return res;
8685 : }
8686 : }
8687 1248866 : switch (TREE_CODE (_p0))
8688 : {
8689 704328 : CASE_CONVERT:
8690 704328 : {
8691 704328 : tree _q20 = TREE_OPERAND (_p0, 0);
8692 704328 : switch (TREE_CODE (_q20))
8693 : {
8694 4 : case LT_EXPR:
8695 4 : {
8696 4 : tree _q30 = TREE_OPERAND (_q20, 0);
8697 4 : tree _q31 = TREE_OPERAND (_q20, 1);
8698 4 : if (integer_zerop (_q31))
8699 : {
8700 4 : switch (TREE_CODE (_p1))
8701 : {
8702 4 : case INTEGER_CST:
8703 4 : {
8704 4 : {
8705 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
8706 4 : if (TYPE_SIGN (TREE_TYPE (captures[0])) == SIGNED
8707 4 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (TREE_TYPE (captures[0])) - 1)
8708 : )
8709 : {
8710 0 : {
8711 0 : wide_int wone = wi::one (TYPE_PRECISION (type));
8712 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1659;
8713 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1659;
8714 0 : {
8715 0 : tree res_op0;
8716 0 : {
8717 0 : tree _o1[1], _r1;
8718 0 : _o1[0] = captures[0];
8719 0 : if (TREE_TYPE (_o1[0]) != type)
8720 : {
8721 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
8722 : }
8723 : else
8724 : _r1 = _o1[0];
8725 0 : res_op0 = _r1;
8726 : }
8727 0 : tree res_op1;
8728 0 : res_op1 = wide_int_to_tree (type,
8729 0 : wi::lshift (wone, wi::to_wide (captures[2])));
8730 0 : tree _r;
8731 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
8732 0 : if (TREE_SIDE_EFFECTS (captures[1]))
8733 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
8734 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
8735 0 : return _r;
8736 : }
8737 0 : next_after_fail1659:;
8738 0 : }
8739 : }
8740 : }
8741 4 : break;
8742 : }
8743 : default:;
8744 : }
8745 : }
8746 : break;
8747 : }
8748 426 : CASE_CONVERT:
8749 426 : {
8750 426 : tree _q30 = TREE_OPERAND (_q20, 0);
8751 426 : switch (TREE_CODE (_q30))
8752 : {
8753 0 : case RSHIFT_EXPR:
8754 0 : {
8755 0 : tree _q40 = TREE_OPERAND (_q30, 0);
8756 0 : tree _q41 = TREE_OPERAND (_q30, 1);
8757 0 : switch (TREE_CODE (_q41))
8758 : {
8759 0 : case INTEGER_CST:
8760 0 : {
8761 0 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q41, 0) && types_match (_p1, _q41)))
8762 : {
8763 0 : {
8764 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
8765 0 : if (wi::ltu_p (wi::to_wide (captures[2]), element_precision (type))
8766 0 : && INTEGRAL_TYPE_P (type)
8767 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
8768 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
8769 0 : && TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (captures[1]))
8770 0 : && (TYPE_PRECISION (TREE_TYPE (captures[0])) >= TYPE_PRECISION (type)
8771 0 : || wi::geu_p (wi::to_wide (captures[2]),
8772 0 : TYPE_PRECISION (type)
8773 0 : - TYPE_PRECISION (TREE_TYPE (captures[0]))))
8774 : )
8775 : {
8776 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1660;
8777 0 : {
8778 0 : tree res_op0;
8779 0 : {
8780 0 : tree _o1[1], _r1;
8781 0 : _o1[0] = captures[1];
8782 0 : if (TREE_TYPE (_o1[0]) != type)
8783 : {
8784 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
8785 : }
8786 : else
8787 : _r1 = _o1[0];
8788 0 : res_op0 = _r1;
8789 : }
8790 0 : tree res_op1;
8791 0 : {
8792 0 : tree _o1[2], _r1;
8793 0 : _o1[0] = build_minus_one_cst (type);
8794 0 : _o1[1] = captures[2];
8795 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8796 0 : res_op1 = _r1;
8797 : }
8798 0 : tree _r;
8799 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
8800 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1009, __FILE__, __LINE__, true);
8801 0 : return _r;
8802 : }
8803 0 : next_after_fail1660:;
8804 : }
8805 : }
8806 : }
8807 : break;
8808 : }
8809 : default:;
8810 : }
8811 : break;
8812 : }
8813 : default:;
8814 : }
8815 : break;
8816 : }
8817 : default:;
8818 : }
8819 : break;
8820 : }
8821 19026 : case RSHIFT_EXPR:
8822 19026 : {
8823 19026 : tree _q20 = TREE_OPERAND (_p0, 0);
8824 19026 : tree _q21 = TREE_OPERAND (_p0, 1);
8825 19026 : switch (TREE_CODE (_q21))
8826 : {
8827 48 : case INTEGER_CST:
8828 48 : {
8829 48 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8830 : {
8831 3 : {
8832 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8833 3 : tree res = generic_simplify_420 (loc, type, _p0, _p1, captures);
8834 3 : if (res) return res;
8835 : }
8836 : }
8837 : break;
8838 : }
8839 : default:;
8840 : }
8841 : break;
8842 : }
8843 1248863 : default:;
8844 : }
8845 1248863 : {
8846 1248863 : tree _p0_pops[1];
8847 1248863 : if (tree_nop_convert (_p0, _p0_pops))
8848 : {
8849 672285 : tree _q20 = _p0_pops[0];
8850 672285 : switch (TREE_CODE (_q20))
8851 : {
8852 73 : case RSHIFT_EXPR:
8853 73 : {
8854 73 : tree _q30 = TREE_OPERAND (_q20, 0);
8855 73 : tree _q31 = TREE_OPERAND (_q20, 1);
8856 73 : switch (TREE_CODE (_q31))
8857 : {
8858 67 : case INTEGER_CST:
8859 67 : {
8860 67 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
8861 : {
8862 8 : {
8863 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
8864 8 : tree res = generic_simplify_420 (loc, type, _p0, _p1, captures);
8865 8 : if (res) return res;
8866 : }
8867 : }
8868 : break;
8869 : }
8870 : default:;
8871 : }
8872 : break;
8873 : }
8874 : default:;
8875 : }
8876 : }
8877 : }
8878 1248855 : if (integer_onep (_p0))
8879 : {
8880 320438 : switch (TREE_CODE (_p1))
8881 : {
8882 46994 : case MINUS_EXPR:
8883 46994 : {
8884 46994 : tree _q30 = TREE_OPERAND (_p1, 0);
8885 46994 : tree _q31 = TREE_OPERAND (_p1, 1);
8886 46994 : switch (TREE_CODE (_q30))
8887 : {
8888 46991 : case INTEGER_CST:
8889 46991 : {
8890 46991 : {
8891 46991 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
8892 46991 : if (INTEGRAL_TYPE_P (type)
8893 46991 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
8894 46991 : && single_use (captures[1])
8895 : )
8896 : {
8897 28176 : if (TYPE_UNSIGNED (type)
8898 : )
8899 : {
8900 28170 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1661;
8901 28170 : {
8902 28170 : tree res_op0;
8903 28170 : {
8904 28170 : tree _o1[2], _r1;
8905 28170 : _o1[0] = captures[0];
8906 28170 : _o1[1] = captures[2];
8907 28170 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8908 28170 : res_op0 = _r1;
8909 : }
8910 28170 : tree res_op1;
8911 28170 : res_op1 = captures[3];
8912 28170 : tree _r;
8913 28170 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
8914 28170 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1010, __FILE__, __LINE__, true);
8915 28170 : return _r;
8916 : }
8917 0 : next_after_fail1661:;
8918 : }
8919 : else
8920 : {
8921 6 : {
8922 6 : tree utype = unsigned_type_for (type);
8923 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1662;
8924 6 : {
8925 6 : tree res_op0;
8926 6 : {
8927 6 : tree _o1[2], _r1;
8928 6 : {
8929 6 : tree _o2[2], _r2;
8930 6 : {
8931 6 : tree _o3[1], _r3;
8932 6 : _o3[0] = captures[0];
8933 6 : if (TREE_TYPE (_o3[0]) != utype)
8934 : {
8935 6 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
8936 : }
8937 : else
8938 : _r3 = _o3[0];
8939 6 : _o2[0] = _r3;
8940 : }
8941 6 : _o2[1] = captures[2];
8942 6 : _r2 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
8943 6 : _o1[0] = _r2;
8944 : }
8945 6 : _o1[1] = captures[3];
8946 6 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8947 6 : res_op0 = _r1;
8948 : }
8949 6 : tree _r;
8950 6 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
8951 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1011, __FILE__, __LINE__, true);
8952 6 : return _r;
8953 : }
8954 0 : next_after_fail1662:;
8955 : }
8956 : }
8957 : }
8958 : }
8959 18815 : break;
8960 : }
8961 : default:;
8962 : }
8963 : break;
8964 : }
8965 : default:;
8966 : }
8967 : }
8968 1220679 : if (integer_zerop (_p1))
8969 : {
8970 1265 : {
8971 1265 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8972 1265 : tree res = generic_simplify_421 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
8973 1265 : if (res) return res;
8974 : }
8975 : }
8976 1219414 : if (integer_zerop (_p0))
8977 : {
8978 178 : {
8979 178 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8980 178 : tree res = generic_simplify_422 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
8981 178 : if (res) return res;
8982 : }
8983 : }
8984 1219236 : switch (TREE_CODE (_p1))
8985 : {
8986 0 : case VECTOR_CST:
8987 0 : {
8988 0 : {
8989 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8990 0 : tree res = generic_simplify_423 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
8991 0 : if (res) return res;
8992 : }
8993 0 : break;
8994 : }
8995 0 : case CONSTRUCTOR:
8996 0 : {
8997 0 : {
8998 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8999 0 : tree res = generic_simplify_424 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9000 0 : if (res) return res;
9001 : }
9002 0 : break;
9003 : }
9004 1219236 : default:;
9005 : }
9006 1219236 : switch (TREE_CODE (_p0))
9007 : {
9008 280 : case LSHIFT_EXPR:
9009 280 : {
9010 280 : tree _q20 = TREE_OPERAND (_p0, 0);
9011 280 : tree _q21 = TREE_OPERAND (_p0, 1);
9012 280 : switch (TREE_CODE (_q21))
9013 : {
9014 39 : case INTEGER_CST:
9015 39 : {
9016 39 : switch (TREE_CODE (_p1))
9017 : {
9018 39 : case INTEGER_CST:
9019 39 : {
9020 39 : {
9021 39 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9022 39 : tree res = generic_simplify_425 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9023 39 : if (res) return res;
9024 : }
9025 0 : break;
9026 : }
9027 : default:;
9028 : }
9029 : break;
9030 : }
9031 : default:;
9032 : }
9033 : break;
9034 : }
9035 703954 : CASE_CONVERT:
9036 703954 : {
9037 703954 : tree _q20 = TREE_OPERAND (_p0, 0);
9038 703954 : switch (TREE_CODE (_q20))
9039 : {
9040 0 : case BIT_AND_EXPR:
9041 0 : {
9042 0 : tree _q30 = TREE_OPERAND (_q20, 0);
9043 0 : tree _q31 = TREE_OPERAND (_q20, 1);
9044 0 : switch (TREE_CODE (_q31))
9045 : {
9046 0 : case INTEGER_CST:
9047 0 : {
9048 0 : switch (TREE_CODE (_p1))
9049 : {
9050 0 : case INTEGER_CST:
9051 0 : {
9052 0 : {
9053 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9054 0 : tree res = generic_simplify_426 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, LSHIFT_EXPR);
9055 0 : if (res) return res;
9056 : }
9057 0 : break;
9058 : }
9059 : default:;
9060 : }
9061 : break;
9062 : }
9063 : default:;
9064 : }
9065 : break;
9066 : }
9067 11 : case BIT_XOR_EXPR:
9068 11 : {
9069 11 : tree _q30 = TREE_OPERAND (_q20, 0);
9070 11 : tree _q31 = TREE_OPERAND (_q20, 1);
9071 11 : switch (TREE_CODE (_q31))
9072 : {
9073 0 : case INTEGER_CST:
9074 0 : {
9075 0 : switch (TREE_CODE (_p1))
9076 : {
9077 0 : case INTEGER_CST:
9078 0 : {
9079 0 : {
9080 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9081 0 : tree res = generic_simplify_426 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, LSHIFT_EXPR);
9082 0 : if (res) return res;
9083 : }
9084 0 : break;
9085 : }
9086 : default:;
9087 : }
9088 : break;
9089 : }
9090 : default:;
9091 : }
9092 : break;
9093 : }
9094 18 : case BIT_IOR_EXPR:
9095 18 : {
9096 18 : tree _q30 = TREE_OPERAND (_q20, 0);
9097 18 : tree _q31 = TREE_OPERAND (_q20, 1);
9098 18 : switch (TREE_CODE (_q31))
9099 : {
9100 11 : case INTEGER_CST:
9101 11 : {
9102 11 : switch (TREE_CODE (_p1))
9103 : {
9104 11 : case INTEGER_CST:
9105 11 : {
9106 11 : {
9107 11 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9108 11 : tree res = generic_simplify_426 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, LSHIFT_EXPR);
9109 11 : if (res) return res;
9110 : }
9111 2 : break;
9112 : }
9113 : default:;
9114 : }
9115 : break;
9116 : }
9117 : default:;
9118 : }
9119 : break;
9120 : }
9121 : default:;
9122 : }
9123 : break;
9124 : }
9125 13777 : case BIT_AND_EXPR:
9126 13777 : {
9127 13777 : tree _q20 = TREE_OPERAND (_p0, 0);
9128 13777 : tree _q21 = TREE_OPERAND (_p0, 1);
9129 13777 : switch (TREE_CODE (_q21))
9130 : {
9131 13682 : case INTEGER_CST:
9132 13682 : {
9133 13682 : switch (TREE_CODE (_p1))
9134 : {
9135 13543 : case INTEGER_CST:
9136 13543 : {
9137 13543 : {
9138 13543 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9139 13543 : tree res = generic_simplify_427 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, LSHIFT_EXPR);
9140 13543 : if (res) return res;
9141 : }
9142 7 : break;
9143 : }
9144 : default:;
9145 : }
9146 : break;
9147 : }
9148 : default:;
9149 : }
9150 : break;
9151 : }
9152 76 : case BIT_XOR_EXPR:
9153 76 : {
9154 76 : tree _q20 = TREE_OPERAND (_p0, 0);
9155 76 : tree _q21 = TREE_OPERAND (_p0, 1);
9156 76 : switch (TREE_CODE (_q21))
9157 : {
9158 7 : case INTEGER_CST:
9159 7 : {
9160 7 : switch (TREE_CODE (_p1))
9161 : {
9162 7 : case INTEGER_CST:
9163 7 : {
9164 7 : {
9165 7 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9166 7 : tree res = generic_simplify_427 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, LSHIFT_EXPR);
9167 7 : if (res) return res;
9168 : }
9169 0 : break;
9170 : }
9171 : default:;
9172 : }
9173 : break;
9174 : }
9175 : default:;
9176 : }
9177 : break;
9178 : }
9179 78 : case BIT_IOR_EXPR:
9180 78 : {
9181 78 : tree _q20 = TREE_OPERAND (_p0, 0);
9182 78 : tree _q21 = TREE_OPERAND (_p0, 1);
9183 78 : switch (TREE_CODE (_q21))
9184 : {
9185 2 : case INTEGER_CST:
9186 2 : {
9187 2 : switch (TREE_CODE (_p1))
9188 : {
9189 2 : case INTEGER_CST:
9190 2 : {
9191 2 : {
9192 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9193 2 : tree res = generic_simplify_427 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, LSHIFT_EXPR);
9194 2 : if (res) return res;
9195 : }
9196 0 : break;
9197 : }
9198 : default:;
9199 : }
9200 : break;
9201 : }
9202 : default:;
9203 : }
9204 : break;
9205 : }
9206 1 : case VEC_COND_EXPR:
9207 1 : {
9208 1 : tree _q20 = TREE_OPERAND (_p0, 0);
9209 1 : tree _q21 = TREE_OPERAND (_p0, 1);
9210 1 : tree _q22 = TREE_OPERAND (_p0, 2);
9211 1 : switch (TREE_CODE (_p1))
9212 : {
9213 0 : case VEC_COND_EXPR:
9214 0 : {
9215 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9216 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9217 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9218 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9219 : {
9220 0 : {
9221 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
9222 0 : if (VECTOR_TYPE_P (type)
9223 0 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
9224 : || types_match (type, TREE_TYPE (captures[2]))
9225 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9226 : || (optimize_vectors_before_lowering_p ()
9227 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9228 : )
9229 : {
9230 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1663;
9231 0 : {
9232 0 : tree res_op0;
9233 0 : res_op0 = captures[1];
9234 0 : tree res_op1;
9235 0 : {
9236 0 : tree _o1[2], _r1;
9237 0 : _o1[0] = captures[2];
9238 0 : _o1[1] = captures[5];
9239 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, type, _o1[0], _o1[1]);
9240 0 : if (EXPR_P (_r1))
9241 0 : goto next_after_fail1663;
9242 0 : res_op1 = _r1;
9243 : }
9244 0 : tree res_op2;
9245 0 : {
9246 0 : tree _o1[2], _r1;
9247 0 : _o1[0] = captures[3];
9248 0 : _o1[1] = captures[6];
9249 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, type, _o1[0], _o1[1]);
9250 0 : if (EXPR_P (_r1))
9251 0 : goto next_after_fail1663;
9252 0 : res_op2 = _r1;
9253 : }
9254 0 : tree _r;
9255 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9256 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
9257 0 : return _r;
9258 : }
9259 0 : next_after_fail1663:;
9260 : }
9261 : }
9262 : }
9263 : break;
9264 : }
9265 1 : default:;
9266 : }
9267 1 : {
9268 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
9269 1 : if (VECTOR_TYPE_P (type)
9270 1 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
9271 : || types_match (type, TREE_TYPE (captures[2]))
9272 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
9273 : || (optimize_vectors_before_lowering_p ()
9274 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
9275 : )
9276 : {
9277 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1664;
9278 1 : {
9279 1 : if (! tree_invariant_p (captures[4])) goto next_after_fail1664;
9280 0 : tree res_op0;
9281 0 : res_op0 = captures[1];
9282 0 : tree res_op1;
9283 0 : {
9284 0 : tree _o1[2], _r1;
9285 0 : _o1[0] = captures[2];
9286 0 : _o1[1] = unshare_expr (captures[4]);
9287 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, type, _o1[0], _o1[1]);
9288 0 : if (EXPR_P (_r1))
9289 0 : goto next_after_fail1664;
9290 0 : res_op1 = _r1;
9291 : }
9292 0 : tree res_op2;
9293 0 : {
9294 0 : tree _o1[2], _r1;
9295 0 : _o1[0] = captures[3];
9296 0 : _o1[1] = captures[4];
9297 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, type, _o1[0], _o1[1]);
9298 0 : if (EXPR_P (_r1))
9299 0 : goto next_after_fail1664;
9300 0 : res_op2 = _r1;
9301 : }
9302 0 : tree _r;
9303 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9304 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
9305 0 : return _r;
9306 : }
9307 1 : next_after_fail1664:;
9308 : }
9309 : }
9310 1 : break;
9311 : }
9312 1205643 : default:;
9313 : }
9314 1205643 : switch (TREE_CODE (_p1))
9315 : {
9316 3 : case VEC_COND_EXPR:
9317 3 : {
9318 3 : tree _q30 = TREE_OPERAND (_p1, 0);
9319 3 : tree _q31 = TREE_OPERAND (_p1, 1);
9320 3 : tree _q32 = TREE_OPERAND (_p1, 2);
9321 3 : {
9322 3 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
9323 3 : if (VECTOR_TYPE_P (type)
9324 3 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
9325 : || types_match (type, TREE_TYPE (captures[3]))
9326 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
9327 : || (optimize_vectors_before_lowering_p ()
9328 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
9329 : )
9330 : {
9331 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1665;
9332 3 : {
9333 3 : if (! tree_invariant_p (captures[0])) goto next_after_fail1665;
9334 1 : tree res_op0;
9335 1 : res_op0 = captures[2];
9336 1 : tree res_op1;
9337 1 : {
9338 1 : tree _o1[2], _r1;
9339 1 : _o1[0] = unshare_expr (captures[0]);
9340 1 : _o1[1] = captures[3];
9341 1 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, type, _o1[0], _o1[1]);
9342 1 : if (EXPR_P (_r1))
9343 0 : goto next_after_fail1665;
9344 1 : res_op1 = _r1;
9345 : }
9346 1 : tree res_op2;
9347 1 : {
9348 1 : tree _o1[2], _r1;
9349 1 : _o1[0] = captures[0];
9350 1 : _o1[1] = captures[4];
9351 1 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, type, _o1[0], _o1[1]);
9352 1 : if (EXPR_P (_r1))
9353 0 : goto next_after_fail1665;
9354 1 : res_op2 = _r1;
9355 : }
9356 1 : tree _r;
9357 1 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
9358 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
9359 1 : return _r;
9360 : }
9361 2 : next_after_fail1665:;
9362 : }
9363 : }
9364 2 : break;
9365 : }
9366 1205642 : default:;
9367 : }
9368 1205642 : switch (TREE_CODE (_p0))
9369 : {
9370 0 : case VEC_PERM_EXPR:
9371 0 : {
9372 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9373 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9374 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9375 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
9376 : {
9377 0 : switch (TREE_CODE (_p1))
9378 : {
9379 0 : case VEC_PERM_EXPR:
9380 0 : {
9381 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9382 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9383 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9384 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
9385 : {
9386 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
9387 : {
9388 0 : {
9389 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
9390 0 : if (VECTOR_INTEGER_TYPE_P (type)
9391 : )
9392 : {
9393 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1666;
9394 0 : {
9395 0 : tree res_op0;
9396 0 : {
9397 0 : tree _o1[2], _r1;
9398 0 : _o1[0] = captures[0];
9399 0 : _o1[1] = captures[2];
9400 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9401 0 : captures[3] = _r1;
9402 : }
9403 0 : res_op0 = unshare_expr (captures[3]);
9404 0 : tree res_op1;
9405 0 : res_op1 = captures[3];
9406 0 : tree res_op2;
9407 0 : res_op2 = captures[1];
9408 0 : tree _r;
9409 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
9410 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
9411 0 : return _r;
9412 : }
9413 0 : next_after_fail1666:;
9414 : }
9415 : }
9416 : }
9417 : }
9418 : break;
9419 : }
9420 : default:;
9421 : }
9422 : }
9423 : break;
9424 : }
9425 : default:;
9426 : }
9427 : return NULL_TREE;
9428 : }
9429 :
9430 : tree
9431 80815 : generic_simplify_MIN_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9432 : {
9433 80815 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9434 80815 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9435 : {
9436 0 : {
9437 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9438 0 : tree res = generic_simplify_521 (loc, type, _p0, _p1, captures, MIN_EXPR);
9439 0 : if (res) return res;
9440 : }
9441 : }
9442 80815 : switch (TREE_CODE (_p0))
9443 : {
9444 46 : case MIN_EXPR:
9445 46 : {
9446 46 : tree _q20 = TREE_OPERAND (_p0, 0);
9447 46 : tree _q21 = TREE_OPERAND (_p0, 1);
9448 46 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9449 : {
9450 0 : {
9451 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9452 0 : tree res = generic_simplify_522 (loc, type, _p0, _p1, captures, MIN_EXPR);
9453 0 : if (res) return res;
9454 : }
9455 : }
9456 46 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9457 : {
9458 0 : {
9459 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
9460 0 : tree res = generic_simplify_522 (loc, type, _p0, _p1, captures, MIN_EXPR);
9461 0 : if (res) return res;
9462 : }
9463 : }
9464 : break;
9465 : }
9466 80815 : default:;
9467 : }
9468 80815 : switch (TREE_CODE (_p1))
9469 : {
9470 0 : case MIN_EXPR:
9471 0 : {
9472 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9473 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9474 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9475 : {
9476 0 : {
9477 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
9478 0 : tree res = generic_simplify_523 (loc, type, _p0, _p1, captures, MIN_EXPR);
9479 0 : if (res) return res;
9480 : }
9481 : }
9482 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9483 : {
9484 0 : {
9485 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q30 };
9486 0 : tree res = generic_simplify_523 (loc, type, _p0, _p1, captures, MIN_EXPR);
9487 0 : if (res) return res;
9488 : }
9489 : }
9490 : break;
9491 : }
9492 80815 : default:;
9493 : }
9494 80815 : switch (TREE_CODE (_p0))
9495 : {
9496 4 : case MAX_EXPR:
9497 4 : {
9498 4 : tree _q20 = TREE_OPERAND (_p0, 0);
9499 4 : tree _q21 = TREE_OPERAND (_p0, 1);
9500 4 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9501 : {
9502 3 : {
9503 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9504 3 : tree res = generic_simplify_524 (loc, type, _p0, _p1, captures);
9505 3 : if (res) return res;
9506 : }
9507 : }
9508 1 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9509 : {
9510 1 : {
9511 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
9512 1 : tree res = generic_simplify_524 (loc, type, _p0, _p1, captures);
9513 1 : if (res) return res;
9514 : }
9515 : }
9516 : break;
9517 : }
9518 80811 : default:;
9519 : }
9520 80811 : switch (TREE_CODE (_p1))
9521 : {
9522 0 : case MAX_EXPR:
9523 0 : {
9524 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9525 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9526 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9527 : {
9528 0 : {
9529 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
9530 0 : tree res = generic_simplify_524 (loc, type, _p0, _p1, captures);
9531 0 : if (res) return res;
9532 : }
9533 : }
9534 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9535 : {
9536 0 : {
9537 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
9538 0 : tree res = generic_simplify_524 (loc, type, _p0, _p1, captures);
9539 0 : if (res) return res;
9540 : }
9541 : }
9542 : break;
9543 : }
9544 0 : case NEGATE_EXPR:
9545 0 : {
9546 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9547 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9548 : {
9549 0 : {
9550 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9551 0 : tree res = generic_simplify_525 (loc, type, _p0, _p1, captures);
9552 0 : if (res) return res;
9553 : }
9554 : }
9555 : break;
9556 : }
9557 80811 : default:;
9558 : }
9559 80811 : switch (TREE_CODE (_p0))
9560 : {
9561 2 : case NEGATE_EXPR:
9562 2 : {
9563 2 : tree _q20 = TREE_OPERAND (_p0, 0);
9564 2 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9565 : {
9566 2 : {
9567 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9568 2 : tree res = generic_simplify_525 (loc, type, _p0, _p1, captures);
9569 2 : if (res) return res;
9570 : }
9571 : }
9572 : break;
9573 : }
9574 80809 : default:;
9575 : }
9576 80809 : {
9577 80809 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9578 80809 : if (INTEGRAL_TYPE_P (type)
9579 78988 : && TYPE_MIN_VALUE (type)
9580 159797 : && operand_equal_p (captures[1], TYPE_MIN_VALUE (type), OEP_ONLY_CONST)
9581 : )
9582 : {
9583 544 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1730;
9584 544 : {
9585 544 : tree _r;
9586 544 : _r = captures[1];
9587 544 : if (TREE_SIDE_EFFECTS (captures[0]))
9588 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
9589 544 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1026, __FILE__, __LINE__, true);
9590 544 : return _r;
9591 : }
9592 0 : next_after_fail1730:;
9593 : }
9594 : else
9595 : {
9596 80265 : if (INTEGRAL_TYPE_P (type)
9597 78444 : && TYPE_MAX_VALUE (type)
9598 158709 : && operand_equal_p (captures[1], TYPE_MAX_VALUE (type), OEP_ONLY_CONST)
9599 : )
9600 : {
9601 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1731;
9602 1 : {
9603 1 : tree _r;
9604 1 : _r = captures[0];
9605 1 : if (TREE_SIDE_EFFECTS (captures[1]))
9606 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
9607 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1027, __FILE__, __LINE__, true);
9608 1 : return _r;
9609 : }
9610 0 : next_after_fail1731:;
9611 : }
9612 : }
9613 : }
9614 80264 : switch (TREE_CODE (_p0))
9615 : {
9616 5613 : case PLUS_EXPR:
9617 5613 : {
9618 5613 : tree _q20 = TREE_OPERAND (_p0, 0);
9619 5613 : tree _q21 = TREE_OPERAND (_p0, 1);
9620 5613 : switch (TREE_CODE (_p1))
9621 : {
9622 15 : case PLUS_EXPR:
9623 15 : {
9624 15 : tree _q50 = TREE_OPERAND (_p1, 0);
9625 15 : tree _q51 = TREE_OPERAND (_p1, 1);
9626 15 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
9627 : {
9628 0 : {
9629 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
9630 0 : tree res = generic_simplify_526 (loc, type, _p0, _p1, captures, MIN_EXPR);
9631 0 : if (res) return res;
9632 : }
9633 0 : {
9634 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q50, _q21, _p0, _q20 };
9635 0 : tree res = generic_simplify_526 (loc, type, _p0, _p1, captures, MIN_EXPR);
9636 0 : if (res) return res;
9637 : }
9638 : }
9639 15 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
9640 : {
9641 0 : {
9642 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
9643 0 : tree res = generic_simplify_526 (loc, type, _p0, _p1, captures, MIN_EXPR);
9644 0 : if (res) return res;
9645 : }
9646 : }
9647 15 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
9648 : {
9649 1 : {
9650 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q51, _q21, _p0, _q20 };
9651 1 : tree res = generic_simplify_526 (loc, type, _p0, _p1, captures, MIN_EXPR);
9652 1 : if (res) return res;
9653 : }
9654 : }
9655 : break;
9656 : }
9657 5612 : default:;
9658 : }
9659 5612 : switch (TREE_CODE (_q21))
9660 : {
9661 5484 : case INTEGER_CST:
9662 5484 : {
9663 5484 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9664 : {
9665 0 : {
9666 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
9667 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
9668 : )
9669 : {
9670 0 : if (tree_int_cst_sgn (captures[2]) > 0
9671 : )
9672 : {
9673 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1732;
9674 0 : {
9675 0 : tree _r;
9676 0 : _r = captures[0];
9677 0 : if (TREE_SIDE_EFFECTS (captures[2]))
9678 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9679 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1028, __FILE__, __LINE__, true);
9680 0 : return _r;
9681 : }
9682 0 : next_after_fail1732:;
9683 : }
9684 : else
9685 : {
9686 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1733;
9687 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1733;
9688 0 : {
9689 0 : tree _r;
9690 0 : _r = captures[1];
9691 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1029, __FILE__, __LINE__, true);
9692 0 : return _r;
9693 : }
9694 0 : next_after_fail1733:;
9695 : }
9696 : }
9697 : }
9698 : }
9699 : break;
9700 : }
9701 : default:;
9702 : }
9703 : break;
9704 : }
9705 998 : case MINUS_EXPR:
9706 998 : {
9707 998 : tree _q20 = TREE_OPERAND (_p0, 0);
9708 998 : tree _q21 = TREE_OPERAND (_p0, 1);
9709 998 : switch (TREE_CODE (_p1))
9710 : {
9711 980 : case MINUS_EXPR:
9712 980 : {
9713 980 : tree _q50 = TREE_OPERAND (_p1, 0);
9714 980 : tree _q51 = TREE_OPERAND (_p1, 1);
9715 980 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
9716 : {
9717 0 : {
9718 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
9719 0 : tree res = generic_simplify_527 (loc, type, _p0, _p1, captures, MIN_EXPR);
9720 0 : if (res) return res;
9721 : }
9722 0 : {
9723 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q50, _q21, _p0, _q20 };
9724 0 : tree res = generic_simplify_527 (loc, type, _p0, _p1, captures, MIN_EXPR);
9725 0 : if (res) return res;
9726 : }
9727 : }
9728 : break;
9729 : }
9730 : default:;
9731 : }
9732 : break;
9733 : }
9734 80263 : default:;
9735 : }
9736 80263 : switch (TREE_CODE (_p1))
9737 : {
9738 21 : case PLUS_EXPR:
9739 21 : {
9740 21 : tree _q30 = TREE_OPERAND (_p1, 0);
9741 21 : tree _q31 = TREE_OPERAND (_p1, 1);
9742 21 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9743 : {
9744 0 : switch (TREE_CODE (_q31))
9745 : {
9746 0 : case INTEGER_CST:
9747 0 : {
9748 0 : {
9749 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
9750 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
9751 : )
9752 : {
9753 0 : if (tree_int_cst_sgn (captures[2]) > 0
9754 : )
9755 : {
9756 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1734;
9757 0 : {
9758 0 : tree _r;
9759 0 : _r = captures[0];
9760 0 : if (TREE_SIDE_EFFECTS (captures[2]))
9761 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
9762 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1028, __FILE__, __LINE__, true);
9763 0 : return _r;
9764 : }
9765 0 : next_after_fail1734:;
9766 : }
9767 : else
9768 : {
9769 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1735;
9770 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1735;
9771 0 : {
9772 0 : tree _r;
9773 0 : _r = captures[1];
9774 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1029, __FILE__, __LINE__, true);
9775 0 : return _r;
9776 : }
9777 0 : next_after_fail1735:;
9778 : }
9779 : }
9780 : }
9781 0 : break;
9782 : }
9783 : default:;
9784 : }
9785 : }
9786 : break;
9787 : }
9788 80263 : default:;
9789 : }
9790 80263 : switch (TREE_CODE (_p0))
9791 : {
9792 46 : case MIN_EXPR:
9793 46 : {
9794 46 : tree _q20 = TREE_OPERAND (_p0, 0);
9795 46 : tree _q21 = TREE_OPERAND (_p0, 1);
9796 46 : switch (TREE_CODE (_p1))
9797 : {
9798 0 : case MAX_EXPR:
9799 0 : {
9800 0 : tree _q50 = TREE_OPERAND (_p1, 0);
9801 0 : tree _q51 = TREE_OPERAND (_p1, 1);
9802 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
9803 : {
9804 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
9805 : {
9806 0 : {
9807 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9808 0 : if (!HONOR_NANS (captures[0])
9809 : )
9810 : {
9811 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1736;
9812 0 : {
9813 0 : tree res_op0;
9814 0 : res_op0 = captures[0];
9815 0 : tree res_op1;
9816 0 : res_op1 = captures[1];
9817 0 : tree _r;
9818 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
9819 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 895, __FILE__, __LINE__, true);
9820 0 : return _r;
9821 : }
9822 0 : next_after_fail1736:;
9823 : }
9824 : }
9825 : }
9826 : }
9827 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
9828 : {
9829 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
9830 : {
9831 0 : {
9832 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
9833 0 : if (!HONOR_NANS (captures[0])
9834 : )
9835 : {
9836 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1737;
9837 0 : {
9838 0 : tree res_op0;
9839 0 : res_op0 = captures[0];
9840 0 : tree res_op1;
9841 0 : res_op1 = captures[1];
9842 0 : tree _r;
9843 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
9844 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 895, __FILE__, __LINE__, true);
9845 0 : return _r;
9846 : }
9847 0 : next_after_fail1737:;
9848 : }
9849 : }
9850 : }
9851 : }
9852 : break;
9853 : }
9854 : default:;
9855 : }
9856 : break;
9857 : }
9858 0 : case MAX_EXPR:
9859 0 : {
9860 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9861 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9862 0 : switch (TREE_CODE (_p1))
9863 : {
9864 0 : case MIN_EXPR:
9865 0 : {
9866 0 : tree _q50 = TREE_OPERAND (_p1, 0);
9867 0 : tree _q51 = TREE_OPERAND (_p1, 1);
9868 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
9869 : {
9870 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
9871 : {
9872 0 : {
9873 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9874 0 : if (!HONOR_NANS (captures[0])
9875 : )
9876 : {
9877 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1738;
9878 0 : {
9879 0 : tree res_op0;
9880 0 : res_op0 = captures[0];
9881 0 : tree res_op1;
9882 0 : res_op1 = captures[1];
9883 0 : tree _r;
9884 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
9885 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 895, __FILE__, __LINE__, true);
9886 0 : return _r;
9887 : }
9888 0 : next_after_fail1738:;
9889 : }
9890 : }
9891 : }
9892 : }
9893 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
9894 : {
9895 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
9896 : {
9897 0 : {
9898 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9899 0 : if (!HONOR_NANS (captures[0])
9900 : )
9901 : {
9902 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1739;
9903 0 : {
9904 0 : tree res_op0;
9905 0 : res_op0 = captures[0];
9906 0 : tree res_op1;
9907 0 : res_op1 = captures[1];
9908 0 : tree _r;
9909 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
9910 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 895, __FILE__, __LINE__, true);
9911 0 : return _r;
9912 : }
9913 0 : next_after_fail1739:;
9914 : }
9915 : }
9916 : }
9917 : }
9918 : break;
9919 : }
9920 : default:;
9921 : }
9922 : break;
9923 : }
9924 1 : case BIT_AND_EXPR:
9925 1 : {
9926 1 : tree _q20 = TREE_OPERAND (_p0, 0);
9927 1 : tree _q21 = TREE_OPERAND (_p0, 1);
9928 1 : switch (TREE_CODE (_q21))
9929 : {
9930 1 : case INTEGER_CST:
9931 1 : {
9932 1 : switch (TREE_CODE (_p1))
9933 : {
9934 0 : case BIT_AND_EXPR:
9935 0 : {
9936 0 : tree _q50 = TREE_OPERAND (_p1, 0);
9937 0 : tree _q51 = TREE_OPERAND (_p1, 1);
9938 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
9939 : {
9940 0 : switch (TREE_CODE (_q51))
9941 : {
9942 0 : case INTEGER_CST:
9943 0 : {
9944 0 : {
9945 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
9946 0 : tree res = generic_simplify_528 (loc, type, _p0, _p1, captures, MIN_EXPR);
9947 0 : if (res) return res;
9948 : }
9949 0 : break;
9950 : }
9951 : default:;
9952 : }
9953 : }
9954 : break;
9955 : }
9956 : default:;
9957 : }
9958 : break;
9959 : }
9960 : default:;
9961 : }
9962 : break;
9963 : }
9964 80263 : default:;
9965 : }
9966 80263 : switch (TREE_CODE (_p1))
9967 : {
9968 0 : case BIT_AND_EXPR:
9969 0 : {
9970 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9971 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9972 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9973 : {
9974 0 : switch (TREE_CODE (_q31))
9975 : {
9976 0 : case INTEGER_CST:
9977 0 : {
9978 0 : {
9979 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
9980 0 : tree res = generic_simplify_529 (loc, type, _p0, _p1, captures, MIN_EXPR);
9981 0 : if (res) return res;
9982 : }
9983 0 : break;
9984 : }
9985 : default:;
9986 : }
9987 : }
9988 : break;
9989 : }
9990 80263 : default:;
9991 : }
9992 80263 : switch (TREE_CODE (_p0))
9993 : {
9994 574 : CASE_CONVERT:
9995 574 : {
9996 574 : tree _q20 = TREE_OPERAND (_p0, 0);
9997 574 : switch (TREE_CODE (_q20))
9998 : {
9999 47 : case ADDR_EXPR:
10000 47 : {
10001 47 : switch (TREE_CODE (_p1))
10002 : {
10003 47 : CASE_CONVERT:
10004 47 : {
10005 47 : tree _q40 = TREE_OPERAND (_p1, 0);
10006 47 : switch (TREE_CODE (_q40))
10007 : {
10008 47 : case ADDR_EXPR:
10009 47 : {
10010 47 : {
10011 47 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10012 47 : tree res = generic_simplify_530 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10013 47 : if (res) return res;
10014 : }
10015 47 : break;
10016 : }
10017 : default:;
10018 : }
10019 : break;
10020 : }
10021 0 : case ADDR_EXPR:
10022 0 : {
10023 0 : {
10024 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
10025 0 : tree res = generic_simplify_531 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10026 0 : if (res) return res;
10027 : }
10028 0 : break;
10029 : }
10030 : default:;
10031 : }
10032 : break;
10033 : }
10034 : default:;
10035 : }
10036 : break;
10037 : }
10038 10 : case ADDR_EXPR:
10039 10 : {
10040 10 : switch (TREE_CODE (_p1))
10041 : {
10042 0 : CASE_CONVERT:
10043 0 : {
10044 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10045 0 : switch (TREE_CODE (_q30))
10046 : {
10047 0 : case ADDR_EXPR:
10048 0 : {
10049 0 : {
10050 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _q30 };
10051 0 : tree res = generic_simplify_532 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10052 0 : if (res) return res;
10053 : }
10054 0 : break;
10055 : }
10056 : default:;
10057 : }
10058 : break;
10059 : }
10060 10 : case ADDR_EXPR:
10061 10 : {
10062 10 : {
10063 10 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _p1 };
10064 10 : tree res = generic_simplify_533 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10065 10 : if (res) return res;
10066 : }
10067 10 : break;
10068 : }
10069 : default:;
10070 : }
10071 : break;
10072 : }
10073 0 : case NEGATE_EXPR:
10074 0 : {
10075 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10076 0 : switch (TREE_CODE (_p1))
10077 : {
10078 0 : case NEGATE_EXPR:
10079 0 : {
10080 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10081 0 : {
10082 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10083 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
10084 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
10085 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
10086 : )
10087 : {
10088 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1740;
10089 0 : {
10090 0 : tree res_op0;
10091 0 : {
10092 0 : tree _o1[2], _r1;
10093 0 : _o1[0] = captures[1];
10094 0 : _o1[1] = captures[3];
10095 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10096 0 : res_op0 = _r1;
10097 : }
10098 0 : tree _r;
10099 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
10100 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1030, __FILE__, __LINE__, true);
10101 0 : return _r;
10102 : }
10103 0 : next_after_fail1740:;
10104 : }
10105 : }
10106 0 : break;
10107 : }
10108 : default:;
10109 : }
10110 : break;
10111 : }
10112 0 : case BIT_NOT_EXPR:
10113 0 : {
10114 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10115 0 : switch (TREE_CODE (_p1))
10116 : {
10117 0 : case BIT_NOT_EXPR:
10118 0 : {
10119 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10120 0 : {
10121 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10122 0 : tree res = generic_simplify_534 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10123 0 : if (res) return res;
10124 : }
10125 0 : break;
10126 : }
10127 : default:;
10128 : }
10129 : break;
10130 : }
10131 0 : case VEC_COND_EXPR:
10132 0 : {
10133 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10134 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10135 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10136 0 : switch (TREE_CODE (_p1))
10137 : {
10138 0 : case VEC_COND_EXPR:
10139 0 : {
10140 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10141 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10142 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10143 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10144 : {
10145 0 : {
10146 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10147 0 : if (VECTOR_TYPE_P (type)
10148 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10149 : || types_match (type, TREE_TYPE (captures[2]))
10150 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10151 : || (optimize_vectors_before_lowering_p ()
10152 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10153 : )
10154 : {
10155 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1741;
10156 0 : {
10157 0 : tree res_op0;
10158 0 : res_op0 = captures[1];
10159 0 : tree res_op1;
10160 0 : {
10161 0 : tree _o1[2], _r1;
10162 0 : _o1[0] = captures[2];
10163 0 : _o1[1] = captures[5];
10164 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
10165 0 : if (EXPR_P (_r1))
10166 0 : goto next_after_fail1741;
10167 0 : res_op1 = _r1;
10168 : }
10169 0 : tree res_op2;
10170 0 : {
10171 0 : tree _o1[2], _r1;
10172 0 : _o1[0] = captures[3];
10173 0 : _o1[1] = captures[6];
10174 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
10175 0 : if (EXPR_P (_r1))
10176 0 : goto next_after_fail1741;
10177 0 : res_op2 = _r1;
10178 : }
10179 0 : tree _r;
10180 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10181 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
10182 0 : return _r;
10183 : }
10184 0 : next_after_fail1741:;
10185 : }
10186 : }
10187 : }
10188 : break;
10189 : }
10190 0 : default:;
10191 : }
10192 0 : {
10193 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10194 0 : if (VECTOR_TYPE_P (type)
10195 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10196 : || types_match (type, TREE_TYPE (captures[2]))
10197 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10198 : || (optimize_vectors_before_lowering_p ()
10199 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10200 : )
10201 : {
10202 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1742;
10203 0 : {
10204 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1742;
10205 0 : tree res_op0;
10206 0 : res_op0 = captures[1];
10207 0 : tree res_op1;
10208 0 : {
10209 0 : tree _o1[2], _r1;
10210 0 : _o1[0] = captures[2];
10211 0 : _o1[1] = unshare_expr (captures[4]);
10212 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
10213 0 : if (EXPR_P (_r1))
10214 0 : goto next_after_fail1742;
10215 0 : res_op1 = _r1;
10216 : }
10217 0 : tree res_op2;
10218 0 : {
10219 0 : tree _o1[2], _r1;
10220 0 : _o1[0] = captures[3];
10221 0 : _o1[1] = captures[4];
10222 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
10223 0 : if (EXPR_P (_r1))
10224 0 : goto next_after_fail1742;
10225 0 : res_op2 = _r1;
10226 : }
10227 0 : tree _r;
10228 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10229 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
10230 0 : return _r;
10231 : }
10232 0 : next_after_fail1742:;
10233 : }
10234 : }
10235 0 : break;
10236 : }
10237 80263 : default:;
10238 : }
10239 80263 : switch (TREE_CODE (_p1))
10240 : {
10241 0 : case VEC_COND_EXPR:
10242 0 : {
10243 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10244 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10245 0 : tree _q32 = TREE_OPERAND (_p1, 2);
10246 0 : {
10247 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10248 0 : if (VECTOR_TYPE_P (type)
10249 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10250 : || types_match (type, TREE_TYPE (captures[3]))
10251 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10252 : || (optimize_vectors_before_lowering_p ()
10253 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10254 : )
10255 : {
10256 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1743;
10257 0 : {
10258 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1743;
10259 0 : tree res_op0;
10260 0 : res_op0 = captures[2];
10261 0 : tree res_op1;
10262 0 : {
10263 0 : tree _o1[2], _r1;
10264 0 : _o1[0] = unshare_expr (captures[0]);
10265 0 : _o1[1] = captures[3];
10266 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
10267 0 : if (EXPR_P (_r1))
10268 0 : goto next_after_fail1743;
10269 0 : res_op1 = _r1;
10270 : }
10271 0 : tree res_op2;
10272 0 : {
10273 0 : tree _o1[2], _r1;
10274 0 : _o1[0] = captures[0];
10275 0 : _o1[1] = captures[4];
10276 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, type, _o1[0], _o1[1]);
10277 0 : if (EXPR_P (_r1))
10278 0 : goto next_after_fail1743;
10279 0 : res_op2 = _r1;
10280 : }
10281 0 : tree _r;
10282 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10283 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
10284 0 : return _r;
10285 : }
10286 0 : next_after_fail1743:;
10287 : }
10288 : }
10289 0 : break;
10290 : }
10291 80263 : default:;
10292 : }
10293 80263 : if (tree_zero_one_valued_p (_p0))
10294 : {
10295 3 : if (tree_zero_one_valued_p (_p1))
10296 : {
10297 2 : {
10298 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10299 2 : tree res = generic_simplify_535 (loc, type, _p0, _p1, captures, MIN_EXPR, BIT_AND_EXPR);
10300 2 : if (res) return res;
10301 : }
10302 : }
10303 : }
10304 : return NULL_TREE;
10305 : }
10306 :
10307 : tree
10308 192777 : generic_simplify_ORDERED_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10309 : {
10310 192777 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10311 192777 : switch (TREE_CODE (_p0))
10312 : {
10313 0 : case VEC_COND_EXPR:
10314 0 : {
10315 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10316 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10317 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10318 0 : switch (TREE_CODE (_p1))
10319 : {
10320 0 : case VEC_COND_EXPR:
10321 0 : {
10322 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10323 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10324 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10325 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10326 : {
10327 0 : {
10328 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10329 0 : if (VECTOR_TYPE_P (type)
10330 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
10331 0 : || types_match (type, TREE_TYPE (captures[2]))
10332 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10333 : || (optimize_vectors_before_lowering_p ()
10334 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10335 : )
10336 : {
10337 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1765;
10338 0 : {
10339 0 : tree res_op0;
10340 0 : res_op0 = captures[1];
10341 0 : tree res_op1;
10342 0 : {
10343 0 : tree _o1[2], _r1;
10344 0 : _o1[0] = captures[2];
10345 0 : _o1[1] = captures[5];
10346 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
10347 0 : if (EXPR_P (_r1))
10348 0 : goto next_after_fail1765;
10349 0 : res_op1 = _r1;
10350 : }
10351 0 : tree res_op2;
10352 0 : {
10353 0 : tree _o1[2], _r1;
10354 0 : _o1[0] = captures[3];
10355 0 : _o1[1] = captures[6];
10356 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
10357 0 : if (EXPR_P (_r1))
10358 0 : goto next_after_fail1765;
10359 0 : res_op2 = _r1;
10360 : }
10361 0 : tree _r;
10362 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10363 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
10364 0 : return _r;
10365 : }
10366 0 : next_after_fail1765:;
10367 : }
10368 : }
10369 : }
10370 : break;
10371 : }
10372 0 : default:;
10373 : }
10374 0 : {
10375 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10376 0 : if (VECTOR_TYPE_P (type)
10377 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
10378 0 : || types_match (type, TREE_TYPE (captures[2]))
10379 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10380 : || (optimize_vectors_before_lowering_p ()
10381 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10382 : )
10383 : {
10384 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1766;
10385 0 : {
10386 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1766;
10387 0 : tree res_op0;
10388 0 : res_op0 = captures[1];
10389 0 : tree res_op1;
10390 0 : {
10391 0 : tree _o1[2], _r1;
10392 0 : _o1[0] = captures[2];
10393 0 : _o1[1] = unshare_expr (captures[4]);
10394 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
10395 0 : if (EXPR_P (_r1))
10396 0 : goto next_after_fail1766;
10397 0 : res_op1 = _r1;
10398 : }
10399 0 : tree res_op2;
10400 0 : {
10401 0 : tree _o1[2], _r1;
10402 0 : _o1[0] = captures[3];
10403 0 : _o1[1] = captures[4];
10404 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
10405 0 : if (EXPR_P (_r1))
10406 0 : goto next_after_fail1766;
10407 0 : res_op2 = _r1;
10408 : }
10409 0 : tree _r;
10410 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10411 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
10412 0 : return _r;
10413 : }
10414 0 : next_after_fail1766:;
10415 : }
10416 : }
10417 0 : break;
10418 : }
10419 192777 : default:;
10420 : }
10421 192777 : switch (TREE_CODE (_p1))
10422 : {
10423 0 : case VEC_COND_EXPR:
10424 0 : {
10425 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10426 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10427 0 : tree _q32 = TREE_OPERAND (_p1, 2);
10428 0 : {
10429 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10430 0 : if (VECTOR_TYPE_P (type)
10431 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
10432 0 : || types_match (type, TREE_TYPE (captures[3]))
10433 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10434 : || (optimize_vectors_before_lowering_p ()
10435 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10436 : )
10437 : {
10438 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1767;
10439 0 : {
10440 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1767;
10441 0 : tree res_op0;
10442 0 : res_op0 = captures[2];
10443 0 : tree res_op1;
10444 0 : {
10445 0 : tree _o1[2], _r1;
10446 0 : _o1[0] = unshare_expr (captures[0]);
10447 0 : _o1[1] = captures[3];
10448 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
10449 0 : if (EXPR_P (_r1))
10450 0 : goto next_after_fail1767;
10451 0 : res_op1 = _r1;
10452 : }
10453 0 : tree res_op2;
10454 0 : {
10455 0 : tree _o1[2], _r1;
10456 0 : _o1[0] = captures[0];
10457 0 : _o1[1] = captures[4];
10458 0 : _r1 = fold_build2_loc (loc, ORDERED_EXPR, type, _o1[0], _o1[1]);
10459 0 : if (EXPR_P (_r1))
10460 0 : goto next_after_fail1767;
10461 0 : res_op2 = _r1;
10462 : }
10463 0 : tree _r;
10464 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10465 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
10466 0 : return _r;
10467 : }
10468 0 : next_after_fail1767:;
10469 : }
10470 : }
10471 0 : break;
10472 : }
10473 192777 : default:;
10474 : }
10475 192777 : switch (TREE_CODE (_p0))
10476 : {
10477 0 : case FLOAT_EXPR:
10478 0 : {
10479 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10480 0 : switch (TREE_CODE (_p1))
10481 : {
10482 0 : case FLOAT_EXPR:
10483 0 : {
10484 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10485 0 : {
10486 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
10487 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, ORDERED_EXPR, ORDERED_EXPR);
10488 0 : if (res) return res;
10489 : }
10490 0 : break;
10491 : }
10492 : default:;
10493 : }
10494 : break;
10495 : }
10496 0 : case NEGATE_EXPR:
10497 0 : {
10498 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10499 0 : switch (TREE_CODE (_p1))
10500 : {
10501 0 : case NEGATE_EXPR:
10502 0 : {
10503 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10504 0 : {
10505 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
10506 0 : tree res = generic_simplify_267 (loc, type, _p0, _p1, captures, ORDERED_EXPR, ORDERED_EXPR);
10507 0 : if (res) return res;
10508 : }
10509 0 : break;
10510 : }
10511 0 : default:;
10512 : }
10513 0 : if (CONSTANT_CLASS_P (_p1))
10514 : {
10515 0 : {
10516 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
10517 0 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, ORDERED_EXPR, ORDERED_EXPR);
10518 0 : if (res) return res;
10519 : }
10520 : }
10521 : break;
10522 : }
10523 192777 : default:;
10524 : }
10525 192777 : switch (TREE_CODE (_p1))
10526 : {
10527 102 : case REAL_CST:
10528 102 : {
10529 102 : {
10530 102 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10531 102 : tree res = generic_simplify_564 (loc, type, _p0, _p1, captures, ORDERED_EXPR);
10532 102 : if (res) return res;
10533 : }
10534 102 : break;
10535 : }
10536 192777 : default:;
10537 : }
10538 192777 : {
10539 192777 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10540 192777 : if (tree_expr_nan_p (captures[0]) || tree_expr_nan_p (captures[1])
10541 : )
10542 : {
10543 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1768;
10544 0 : {
10545 0 : tree _r;
10546 0 : _r = constant_boolean_node (false, type);
10547 0 : if (TREE_SIDE_EFFECTS (captures[0]))
10548 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
10549 0 : if (TREE_SIDE_EFFECTS (captures[1]))
10550 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10551 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1039, __FILE__, __LINE__, true);
10552 0 : return _r;
10553 : }
10554 0 : next_after_fail1768:;
10555 : }
10556 : else
10557 : {
10558 192777 : if (!tree_expr_maybe_nan_p (captures[0]) && !tree_expr_maybe_nan_p (captures[1])
10559 : )
10560 : {
10561 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1769;
10562 10 : {
10563 10 : tree _r;
10564 10 : _r = constant_boolean_node (true, type);
10565 10 : if (TREE_SIDE_EFFECTS (captures[0]))
10566 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
10567 10 : if (TREE_SIDE_EFFECTS (captures[1]))
10568 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10569 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1040, __FILE__, __LINE__, true);
10570 10 : return _r;
10571 : }
10572 0 : next_after_fail1769:;
10573 : }
10574 : }
10575 : }
10576 192767 : return NULL_TREE;
10577 : }
10578 :
10579 : tree
10580 407945 : generic_simplify_UNGE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10581 : {
10582 407945 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10583 407945 : switch (TREE_CODE (_p0))
10584 : {
10585 0 : case VEC_COND_EXPR:
10586 0 : {
10587 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10588 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10589 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10590 0 : switch (TREE_CODE (_p1))
10591 : {
10592 0 : case VEC_COND_EXPR:
10593 0 : {
10594 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10595 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10596 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10597 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10598 : {
10599 0 : {
10600 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10601 0 : if (VECTOR_TYPE_P (type)
10602 0 : && (TREE_CODE_CLASS (UNGE_EXPR) != tcc_comparison
10603 0 : || types_match (type, TREE_TYPE (captures[2]))
10604 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10605 : || (optimize_vectors_before_lowering_p ()
10606 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10607 : )
10608 : {
10609 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1779;
10610 0 : {
10611 0 : tree res_op0;
10612 0 : res_op0 = captures[1];
10613 0 : tree res_op1;
10614 0 : {
10615 0 : tree _o1[2], _r1;
10616 0 : _o1[0] = captures[2];
10617 0 : _o1[1] = captures[5];
10618 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10619 0 : if (EXPR_P (_r1))
10620 0 : goto next_after_fail1779;
10621 0 : res_op1 = _r1;
10622 : }
10623 0 : tree res_op2;
10624 0 : {
10625 0 : tree _o1[2], _r1;
10626 0 : _o1[0] = captures[3];
10627 0 : _o1[1] = captures[6];
10628 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10629 0 : if (EXPR_P (_r1))
10630 0 : goto next_after_fail1779;
10631 0 : res_op2 = _r1;
10632 : }
10633 0 : tree _r;
10634 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10635 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
10636 0 : return _r;
10637 : }
10638 0 : next_after_fail1779:;
10639 : }
10640 : }
10641 : }
10642 : break;
10643 : }
10644 0 : default:;
10645 : }
10646 0 : {
10647 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10648 0 : if (VECTOR_TYPE_P (type)
10649 0 : && (TREE_CODE_CLASS (UNGE_EXPR) != tcc_comparison
10650 0 : || types_match (type, TREE_TYPE (captures[2]))
10651 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10652 : || (optimize_vectors_before_lowering_p ()
10653 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10654 : )
10655 : {
10656 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1780;
10657 0 : {
10658 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1780;
10659 0 : tree res_op0;
10660 0 : res_op0 = captures[1];
10661 0 : tree res_op1;
10662 0 : {
10663 0 : tree _o1[2], _r1;
10664 0 : _o1[0] = captures[2];
10665 0 : _o1[1] = unshare_expr (captures[4]);
10666 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10667 0 : if (EXPR_P (_r1))
10668 0 : goto next_after_fail1780;
10669 0 : res_op1 = _r1;
10670 : }
10671 0 : tree res_op2;
10672 0 : {
10673 0 : tree _o1[2], _r1;
10674 0 : _o1[0] = captures[3];
10675 0 : _o1[1] = captures[4];
10676 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10677 0 : if (EXPR_P (_r1))
10678 0 : goto next_after_fail1780;
10679 0 : res_op2 = _r1;
10680 : }
10681 0 : tree _r;
10682 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10683 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
10684 0 : return _r;
10685 : }
10686 0 : next_after_fail1780:;
10687 : }
10688 : }
10689 0 : break;
10690 : }
10691 407945 : default:;
10692 : }
10693 407945 : switch (TREE_CODE (_p1))
10694 : {
10695 0 : case VEC_COND_EXPR:
10696 0 : {
10697 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10698 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10699 0 : tree _q32 = TREE_OPERAND (_p1, 2);
10700 0 : {
10701 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10702 0 : if (VECTOR_TYPE_P (type)
10703 0 : && (TREE_CODE_CLASS (UNGE_EXPR) != tcc_comparison
10704 0 : || types_match (type, TREE_TYPE (captures[3]))
10705 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10706 : || (optimize_vectors_before_lowering_p ()
10707 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10708 : )
10709 : {
10710 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1781;
10711 0 : {
10712 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1781;
10713 0 : tree res_op0;
10714 0 : res_op0 = captures[2];
10715 0 : tree res_op1;
10716 0 : {
10717 0 : tree _o1[2], _r1;
10718 0 : _o1[0] = unshare_expr (captures[0]);
10719 0 : _o1[1] = captures[3];
10720 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10721 0 : if (EXPR_P (_r1))
10722 0 : goto next_after_fail1781;
10723 0 : res_op1 = _r1;
10724 : }
10725 0 : tree res_op2;
10726 0 : {
10727 0 : tree _o1[2], _r1;
10728 0 : _o1[0] = captures[0];
10729 0 : _o1[1] = captures[4];
10730 0 : _r1 = fold_build2_loc (loc, UNGE_EXPR, type, _o1[0], _o1[1]);
10731 0 : if (EXPR_P (_r1))
10732 0 : goto next_after_fail1781;
10733 0 : res_op2 = _r1;
10734 : }
10735 0 : tree _r;
10736 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10737 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 899, __FILE__, __LINE__, true);
10738 0 : return _r;
10739 : }
10740 0 : next_after_fail1781:;
10741 : }
10742 : }
10743 0 : break;
10744 : }
10745 407945 : default:;
10746 : }
10747 407945 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10748 : {
10749 30 : {
10750 30 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10751 30 : tree res = generic_simplify_566 (loc, type, _p0, _p1, captures, UNGE_EXPR);
10752 30 : if (res) return res;
10753 : }
10754 : }
10755 407915 : switch (TREE_CODE (_p0))
10756 : {
10757 299 : case FLOAT_EXPR:
10758 299 : {
10759 299 : tree _q20 = TREE_OPERAND (_p0, 0);
10760 299 : switch (TREE_CODE (_p1))
10761 : {
10762 0 : case FLOAT_EXPR:
10763 0 : {
10764 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10765 0 : {
10766 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
10767 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, UNGE_EXPR, GE_EXPR);
10768 0 : if (res) return res;
10769 : }
10770 0 : break;
10771 : }
10772 : default:;
10773 : }
10774 : break;
10775 : }
10776 112 : case NEGATE_EXPR:
10777 112 : {
10778 112 : tree _q20 = TREE_OPERAND (_p0, 0);
10779 112 : switch (TREE_CODE (_p1))
10780 : {
10781 0 : case NEGATE_EXPR:
10782 0 : {
10783 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10784 0 : {
10785 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
10786 0 : tree res = generic_simplify_267 (loc, type, _p0, _p1, captures, UNGE_EXPR, UNLE_EXPR);
10787 0 : if (res) return res;
10788 : }
10789 0 : break;
10790 : }
10791 112 : default:;
10792 : }
10793 112 : if (CONSTANT_CLASS_P (_p1))
10794 : {
10795 112 : {
10796 112 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
10797 112 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, UNGE_EXPR, UNLE_EXPR);
10798 112 : if (res) return res;
10799 : }
10800 : }
10801 : break;
10802 : }
10803 407803 : default:;
10804 : }
10805 407803 : switch (TREE_CODE (_p1))
10806 : {
10807 53841 : case REAL_CST:
10808 53841 : {
10809 53841 : {
10810 53841 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10811 53841 : tree res = generic_simplify_564 (loc, type, _p0, _p1, captures, UNGE_EXPR);
10812 53841 : if (res) return res;
10813 : }
10814 53839 : break;
10815 : }
10816 : default:;
10817 : }
10818 : return NULL_TREE;
10819 : }
10820 :
10821 : tree
10822 632650804 : generic_simplify (location_t loc, enum tree_code code, const tree type ATTRIBUTE_UNUSED, tree _p0, tree _p1)
10823 : {
10824 632650804 : switch (code)
10825 : {
10826 998904 : case BIT_XOR_EXPR:
10827 998904 : return generic_simplify_BIT_XOR_EXPR (loc, code, type, _p0, _p1);
10828 96777583 : case PLUS_EXPR:
10829 96777583 : return generic_simplify_PLUS_EXPR (loc, code, type, _p0, _p1);
10830 78669719 : case POINTER_PLUS_EXPR:
10831 78669719 : return generic_simplify_POINTER_PLUS_EXPR (loc, code, type, _p0, _p1);
10832 32995926 : case MINUS_EXPR:
10833 32995926 : return generic_simplify_MINUS_EXPR (loc, code, type, _p0, _p1);
10834 1849927 : case BIT_IOR_EXPR:
10835 1849927 : return generic_simplify_BIT_IOR_EXPR (loc, code, type, _p0, _p1);
10836 3004415 : case POINTER_DIFF_EXPR:
10837 3004415 : return generic_simplify_POINTER_DIFF_EXPR (loc, code, type, _p0, _p1);
10838 71687131 : case MULT_EXPR:
10839 71687131 : return generic_simplify_MULT_EXPR (loc, code, type, _p0, _p1);
10840 26743476 : case EQ_EXPR:
10841 26743476 : return generic_simplify_EQ_EXPR (loc, code, type, _p0, _p1);
10842 37474601 : case NE_EXPR:
10843 37474601 : return generic_simplify_NE_EXPR (loc, code, type, _p0, _p1);
10844 2227189 : case TRUNC_DIV_EXPR:
10845 2227189 : return generic_simplify_TRUNC_DIV_EXPR (loc, code, type, _p0, _p1);
10846 7100 : case CEIL_DIV_EXPR:
10847 7100 : return generic_simplify_CEIL_DIV_EXPR (loc, code, type, _p0, _p1);
10848 2195490 : case FLOOR_DIV_EXPR:
10849 2195490 : return generic_simplify_FLOOR_DIV_EXPR (loc, code, type, _p0, _p1);
10850 0 : case ROUND_DIV_EXPR:
10851 0 : return generic_simplify_ROUND_DIV_EXPR (loc, code, type, _p0, _p1);
10852 3404722 : case EXACT_DIV_EXPR:
10853 3404722 : return generic_simplify_EXACT_DIV_EXPR (loc, code, type, _p0, _p1);
10854 855478 : case FLOOR_MOD_EXPR:
10855 855478 : return generic_simplify_FLOOR_MOD_EXPR (loc, code, type, _p0, _p1);
10856 6185216 : case RDIV_EXPR:
10857 6185216 : return generic_simplify_RDIV_EXPR (loc, code, type, _p0, _p1);
10858 17409668 : case LT_EXPR:
10859 17409668 : return generic_simplify_LT_EXPR (loc, code, type, _p0, _p1);
10860 9254140 : case LE_EXPR:
10861 9254140 : return generic_simplify_LE_EXPR (loc, code, type, _p0, _p1);
10862 20769690 : case GT_EXPR:
10863 20769690 : return generic_simplify_GT_EXPR (loc, code, type, _p0, _p1);
10864 6620187 : case GE_EXPR:
10865 6620187 : return generic_simplify_GE_EXPR (loc, code, type, _p0, _p1);
10866 4212 : case CEIL_MOD_EXPR:
10867 4212 : return generic_simplify_CEIL_MOD_EXPR (loc, code, type, _p0, _p1);
10868 0 : case ROUND_MOD_EXPR:
10869 0 : return generic_simplify_ROUND_MOD_EXPR (loc, code, type, _p0, _p1);
10870 2056136 : case TRUNC_MOD_EXPR:
10871 2056136 : return generic_simplify_TRUNC_MOD_EXPR (loc, code, type, _p0, _p1);
10872 1249506 : case LSHIFT_EXPR:
10873 1249506 : return generic_simplify_LSHIFT_EXPR (loc, code, type, _p0, _p1);
10874 983595 : case RSHIFT_EXPR:
10875 983595 : return generic_simplify_RSHIFT_EXPR (loc, code, type, _p0, _p1);
10876 6805420 : case BIT_AND_EXPR:
10877 6805420 : return generic_simplify_BIT_AND_EXPR (loc, code, type, _p0, _p1);
10878 80815 : case MIN_EXPR:
10879 80815 : return generic_simplify_MIN_EXPR (loc, code, type, _p0, _p1);
10880 388817 : case MAX_EXPR:
10881 388817 : return generic_simplify_MAX_EXPR (loc, code, type, _p0, _p1);
10882 1887 : case LROTATE_EXPR:
10883 1887 : return generic_simplify_LROTATE_EXPR (loc, code, type, _p0, _p1);
10884 2732 : case RROTATE_EXPR:
10885 2732 : return generic_simplify_RROTATE_EXPR (loc, code, type, _p0, _p1);
10886 575555 : case COMPLEX_EXPR:
10887 575555 : return generic_simplify_COMPLEX_EXPR (loc, code, type, _p0, _p1);
10888 738858 : case UNORDERED_EXPR:
10889 738858 : return generic_simplify_UNORDERED_EXPR (loc, code, type, _p0, _p1);
10890 192777 : case ORDERED_EXPR:
10891 192777 : return generic_simplify_ORDERED_EXPR (loc, code, type, _p0, _p1);
10892 703932 : case UNLT_EXPR:
10893 703932 : return generic_simplify_UNLT_EXPR (loc, code, type, _p0, _p1);
10894 848923 : case UNLE_EXPR:
10895 848923 : return generic_simplify_UNLE_EXPR (loc, code, type, _p0, _p1);
10896 1259390 : case UNGT_EXPR:
10897 1259390 : return generic_simplify_UNGT_EXPR (loc, code, type, _p0, _p1);
10898 407945 : case UNGE_EXPR:
10899 407945 : return generic_simplify_UNGE_EXPR (loc, code, type, _p0, _p1);
10900 350382 : case UNEQ_EXPR:
10901 350382 : return generic_simplify_UNEQ_EXPR (loc, code, type, _p0, _p1);
10902 79 : case LTGT_EXPR:
10903 79 : return generic_simplify_LTGT_EXPR (loc, code, type, _p0, _p1);
10904 3288112 : case TRUTH_ORIF_EXPR:
10905 3288112 : return generic_simplify_TRUTH_ORIF_EXPR (loc, code, type, _p0, _p1);
10906 9333031 : case TRUTH_OR_EXPR:
10907 9333031 : return generic_simplify_TRUTH_OR_EXPR (loc, code, type, _p0, _p1);
10908 : default:;
10909 : }
10910 : return NULL_TREE;
10911 : }
10912 :
10913 : tree
10914 764436 : generic_simplify_BIT_FIELD_REF (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
10915 : {
10916 764436 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10917 764436 : switch (TREE_CODE (_p0))
10918 : {
10919 8 : case BIT_FIELD_REF:
10920 8 : {
10921 8 : tree _q20 = TREE_OPERAND (_p0, 0);
10922 8 : tree _q21 = TREE_OPERAND (_p0, 1);
10923 8 : tree _q22 = TREE_OPERAND (_p0, 2);
10924 8 : {
10925 8 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
10926 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1956;
10927 8 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1956;
10928 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1956;
10929 8 : {
10930 8 : tree res_op0;
10931 8 : res_op0 = captures[0];
10932 8 : tree res_op1;
10933 8 : res_op1 = captures[3];
10934 8 : tree res_op2;
10935 8 : res_op2 = const_binop (PLUS_EXPR, bitsizetype, captures[2], captures[4]);
10936 8 : tree _r;
10937 8 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
10938 8 : if (TREE_SIDE_EFFECTS (captures[1]))
10939 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10940 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1085, __FILE__, __LINE__, true);
10941 8 : return _r;
10942 : }
10943 0 : next_after_fail1956:;
10944 : }
10945 0 : break;
10946 : }
10947 3 : case VIEW_CONVERT_EXPR:
10948 3 : {
10949 3 : tree _q20 = TREE_OPERAND (_p0, 0);
10950 3 : {
10951 3 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
10952 6 : if (! INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
10953 6 : || type_has_mode_precision_p (TREE_TYPE (captures[0]))
10954 : )
10955 : {
10956 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1957;
10957 0 : {
10958 0 : tree res_op0;
10959 0 : res_op0 = captures[0];
10960 0 : tree res_op1;
10961 0 : res_op1 = captures[1];
10962 0 : tree res_op2;
10963 0 : res_op2 = captures[2];
10964 0 : tree _r;
10965 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
10966 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1086, __FILE__, __LINE__, true);
10967 0 : return _r;
10968 : }
10969 0 : next_after_fail1957:;
10970 : }
10971 : }
10972 3 : break;
10973 : }
10974 764428 : default:;
10975 : }
10976 764428 : if (integer_zerop (_p2))
10977 : {
10978 244448 : {
10979 244448 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10980 244448 : if (tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (captures[0])))
10981 : )
10982 : {
10983 2660 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1958;
10984 2660 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1958;
10985 2660 : {
10986 2660 : tree res_op0;
10987 2660 : res_op0 = captures[0];
10988 2660 : tree _r;
10989 2660 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
10990 2660 : if (TREE_SIDE_EFFECTS (captures[1]))
10991 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10992 2660 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1087, __FILE__, __LINE__, true);
10993 2660 : return _r;
10994 : }
10995 241788 : next_after_fail1958:;
10996 : }
10997 : }
10998 : }
10999 761768 : {
11000 761768 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
11001 761768 : if (TREE_CODE (TREE_TYPE (captures[0])) == COMPLEX_TYPE
11002 761768 : && tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
11003 : )
11004 : {
11005 2 : if (integer_zerop (captures[2])
11006 : )
11007 : {
11008 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1959;
11009 0 : {
11010 0 : tree res_op0;
11011 0 : {
11012 0 : tree _o1[1], _r1;
11013 0 : _o1[0] = captures[0];
11014 0 : _r1 = fold_build1_loc (loc, REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
11015 0 : res_op0 = _r1;
11016 : }
11017 0 : tree _r;
11018 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11019 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11020 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11021 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11022 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11023 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1088, __FILE__, __LINE__, true);
11024 0 : return _r;
11025 : }
11026 0 : next_after_fail1959:;
11027 : }
11028 : else
11029 : {
11030 2 : if (tree_int_cst_equal (captures[2], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
11031 : )
11032 : {
11033 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1960;
11034 0 : {
11035 0 : tree res_op0;
11036 0 : {
11037 0 : tree _o1[1], _r1;
11038 0 : _o1[0] = captures[0];
11039 0 : _r1 = fold_build1_loc (loc, IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
11040 0 : res_op0 = _r1;
11041 : }
11042 0 : tree _r;
11043 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11044 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11045 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11046 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11047 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11048 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1089, __FILE__, __LINE__, true);
11049 0 : return _r;
11050 : }
11051 0 : next_after_fail1960:;
11052 : }
11053 : }
11054 : }
11055 : else
11056 : {
11057 1523470 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
11058 20444 : && INTEGRAL_TYPE_P (type)
11059 : && (!
11060 :
11061 : || is_gimple_reg (captures[0]))
11062 781243 : && ((compare_tree_int (captures[1], TYPE_PRECISION (TREE_TYPE (captures[0]))) == 0
11063 0 : && integer_zerop (captures[2]))
11064 : || (BYTES_BIG_ENDIAN == WORDS_BIG_ENDIAN
11065 : && canonicalize_math_after_vectorization_p ()
11066 : && TYPE_PRECISION (TREE_TYPE (captures[0])) % BITS_PER_UNIT == 0
11067 : && TYPE_PRECISION (type) % BITS_PER_UNIT == 0
11068 : && compare_tree_int (captures[2], (BYTES_BIG_ENDIAN
11069 : ? (TYPE_PRECISION (TREE_TYPE (captures[0]))
11070 : - TYPE_PRECISION (type))
11071 : : 0)) == 0))
11072 : )
11073 : {
11074 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1961;
11075 0 : {
11076 0 : tree res_op0;
11077 0 : res_op0 = captures[0];
11078 0 : tree _r;
11079 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
11080 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11081 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11082 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11083 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11084 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1090, __FILE__, __LINE__, true);
11085 0 : return _r;
11086 : }
11087 0 : next_after_fail1961:;
11088 : }
11089 : }
11090 : }
11091 761768 : switch (TREE_CODE (_p0))
11092 : {
11093 1511 : case CONSTRUCTOR:
11094 1511 : {
11095 1511 : {
11096 1511 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
11097 1511 : if (VECTOR_TYPE_P (TREE_TYPE (captures[0]))
11098 1511 : && tree_fits_uhwi_p (TYPE_SIZE (type))
11099 3022 : && ((tree_to_uhwi (TYPE_SIZE (type))
11100 1511 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))
11101 0 : || (VECTOR_TYPE_P (type)
11102 0 : && (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (type)))
11103 0 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))))
11104 : )
11105 : {
11106 1511 : {
11107 1511 : tree ctor = (TREE_CODE (captures[0]) == SSA_NAME
11108 : ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])) : captures[0]);
11109 1511 : tree eltype = TREE_TYPE (TREE_TYPE (ctor));
11110 1511 : unsigned HOST_WIDE_INT width = tree_to_uhwi (TYPE_SIZE (eltype));
11111 1511 : unsigned HOST_WIDE_INT n = tree_to_uhwi (captures[1]);
11112 1511 : unsigned HOST_WIDE_INT idx = tree_to_uhwi (captures[2]);
11113 1511 : if (n != 0
11114 1511 : && (idx % width) == 0
11115 1511 : && (n % width) == 0
11116 3022 : && known_le ((idx + n) / width,
11117 : TYPE_VECTOR_SUBPARTS (TREE_TYPE (ctor)))
11118 : )
11119 : {
11120 1511 : {
11121 1511 : idx = idx / width;
11122 1511 : n = n / width;
11123 1511 : poly_uint64 k = 1;
11124 1511 : if (CONSTRUCTOR_NELTS (ctor) != 0)
11125 : {
11126 1511 : tree cons_elem = TREE_TYPE (CONSTRUCTOR_ELT (ctor, 0)->value);
11127 1511 : if (TREE_CODE (cons_elem) == VECTOR_TYPE)
11128 1511 : k = TYPE_VECTOR_SUBPARTS (cons_elem);
11129 : }
11130 1511 : unsigned HOST_WIDE_INT elt, count, const_k;
11131 1511 : if (multiple_p (idx, k, &elt) && multiple_p (n, k, &count)
11132 : )
11133 : {
11134 6 : if (CONSTRUCTOR_NELTS (ctor) == 0
11135 : )
11136 : {
11137 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1962;
11138 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1962;
11139 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1962;
11140 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1962;
11141 0 : {
11142 0 : tree _r;
11143 0 : _r = build_zero_cst (type);
11144 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1091, __FILE__, __LINE__, true);
11145 1511 : return _r;
11146 : }
11147 : next_after_fail1962:;
11148 : }
11149 : else
11150 : {
11151 6 : if (count == 1
11152 : )
11153 : {
11154 6 : if (elt < CONSTRUCTOR_NELTS (ctor)
11155 : )
11156 : {
11157 6 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1963;
11158 6 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1963;
11159 6 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1963;
11160 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1963;
11161 6 : {
11162 6 : tree res_op0;
11163 6 : res_op0 = CONSTRUCTOR_ELT (ctor, elt)->value;
11164 6 : tree _r;
11165 6 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11166 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1092, __FILE__, __LINE__, true);
11167 6 : return _r;
11168 : }
11169 : next_after_fail1963:;
11170 : }
11171 : else
11172 : {
11173 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1964;
11174 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1964;
11175 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1964;
11176 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1964;
11177 0 : {
11178 0 : tree _r;
11179 0 : _r = build_zero_cst (type);
11180 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1093, __FILE__, __LINE__, true);
11181 0 : return _r;
11182 : }
11183 : next_after_fail1964:;
11184 : }
11185 : }
11186 : else
11187 : {
11188 0 : if (single_use (captures[0])
11189 : )
11190 : {
11191 0 : {
11192 0 : vec<constructor_elt, va_gc> *vals;
11193 0 : vec_alloc (vals, count);
11194 0 : bool constant_p = true;
11195 0 : tree res;
11196 0 : for (unsigned i = 0;
11197 0 : i < count && elt + i < CONSTRUCTOR_NELTS (ctor); ++i)
11198 : {
11199 0 : tree e = CONSTRUCTOR_ELT (ctor, elt + i)->value;
11200 0 : CONSTRUCTOR_APPEND_ELT (vals, NULL_TREE, e);
11201 0 : if (!CONSTANT_CLASS_P (e))
11202 0 : constant_p = false;
11203 : }
11204 0 : tree evtype = (types_match (TREE_TYPE (type),
11205 0 : TREE_TYPE (TREE_TYPE (ctor)))
11206 0 : ? type
11207 0 : : build_vector_type (TREE_TYPE (TREE_TYPE (ctor)),
11208 0 : count * k));
11209 0 : res = (constant_p ? build_vector_from_ctor (evtype, vals)
11210 : : (
11211 :
11212 0 : ? NULL_TREE : build_constructor (evtype, vals)));
11213 0 : if (res
11214 : )
11215 : {
11216 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1965;
11217 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1965;
11218 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1965;
11219 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1965;
11220 0 : {
11221 0 : tree res_op0;
11222 0 : res_op0 = res;
11223 0 : tree _r;
11224 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11225 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1094, __FILE__, __LINE__, true);
11226 0 : return _r;
11227 : }
11228 0 : next_after_fail1965:;
11229 : }
11230 : }
11231 : }
11232 : }
11233 : }
11234 : }
11235 : else
11236 : {
11237 1505 : if (k.is_constant (&const_k)
11238 1505 : && idx + n <= (idx / const_k + 1) * const_k
11239 : )
11240 : {
11241 1505 : if (CONSTRUCTOR_NELTS (ctor) <= idx / const_k
11242 : )
11243 : {
11244 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1966;
11245 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1966;
11246 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1966;
11247 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1966;
11248 0 : {
11249 0 : tree _r;
11250 0 : _r = build_zero_cst (type);
11251 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1095, __FILE__, __LINE__, true);
11252 0 : return _r;
11253 : }
11254 : next_after_fail1966:;
11255 : }
11256 : else
11257 : {
11258 1505 : if (n == const_k
11259 : )
11260 : {
11261 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1967;
11262 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1967;
11263 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1967;
11264 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1967;
11265 0 : {
11266 0 : tree res_op0;
11267 0 : res_op0 = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
11268 0 : tree _r;
11269 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11270 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1096, __FILE__, __LINE__, true);
11271 0 : return _r;
11272 : }
11273 : next_after_fail1967:;
11274 : }
11275 : else
11276 : {
11277 1505 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1968;
11278 1505 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1968;
11279 1505 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1968;
11280 1505 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1968;
11281 1505 : {
11282 1505 : tree res_op0;
11283 1505 : res_op0 = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
11284 1505 : tree res_op1;
11285 1505 : res_op1 = captures[1];
11286 1505 : tree res_op2;
11287 1505 : res_op2 = bitsize_int ((idx % const_k) * width);
11288 1505 : tree _r;
11289 1505 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11290 1505 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1097, __FILE__, __LINE__, true);
11291 1505 : return _r;
11292 : }
11293 : next_after_fail1968:;
11294 : }
11295 : }
11296 : }
11297 : }
11298 : }
11299 : }
11300 : }
11301 : }
11302 : }
11303 0 : break;
11304 : }
11305 0 : case VEC_PERM_EXPR:
11306 0 : {
11307 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11308 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11309 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11310 0 : switch (TREE_CODE (_q22))
11311 : {
11312 0 : case VECTOR_CST:
11313 0 : {
11314 0 : {
11315 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _p2 };
11316 0 : {
11317 0 : tree elem_type = TREE_TYPE (TREE_TYPE (captures[0]));
11318 0 : poly_uint64 elem_size = tree_to_poly_uint64 (TYPE_SIZE (elem_type));
11319 0 : poly_uint64 size = tree_to_poly_uint64 (TYPE_SIZE (type));
11320 0 : unsigned HOST_WIDE_INT nelts, idx;
11321 0 : unsigned HOST_WIDE_INT nelts_op = 0;
11322 0 : if (constant_multiple_p (tree_to_poly_uint64 (captures[5]), elem_size, &idx)
11323 0 : && VECTOR_CST_NELTS (captures[3]).is_constant (&nelts)
11324 0 : && (known_eq (size, elem_size)
11325 0 : || (constant_multiple_p (size, elem_size, &nelts_op)
11326 0 : && pow2p_hwi (nelts_op)))
11327 : )
11328 : {
11329 0 : {
11330 0 : bool ok = true;
11331 0 : if (known_eq (size, elem_size))
11332 0 : idx = TREE_INT_CST_LOW (VECTOR_CST_ELT (captures[3], idx)) % (2 * nelts);
11333 : else
11334 : {
11335 0 : unsigned start
11336 0 : = TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx)) % (2 * nelts);
11337 0 : unsigned end
11338 0 : = (TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + nelts_op - 1))
11339 0 : % (2 * nelts));
11340 0 : if ((start < nelts) != (end < nelts))
11341 : ok = false;
11342 : else
11343 0 : for (unsigned HOST_WIDE_INT i = 1; i != nelts_op; i++)
11344 : {
11345 0 : if ((TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + i))
11346 0 : % (2 * nelts) - 1)
11347 0 : != (TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + i - 1))
11348 0 : % (2 * nelts)))
11349 : {
11350 : ok = false;
11351 : break;
11352 : }
11353 : }
11354 0 : if (start % nelts_op)
11355 : ok = false;
11356 0 : idx = start;
11357 : }
11358 0 : if (ok
11359 : )
11360 : {
11361 0 : if (idx < nelts
11362 : )
11363 : {
11364 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1969;
11365 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1969;
11366 0 : {
11367 0 : tree res_op0;
11368 0 : res_op0 = captures[1];
11369 0 : tree res_op1;
11370 0 : res_op1 = captures[4];
11371 0 : tree res_op2;
11372 0 : res_op2 = bitsize_int (idx * elem_size);
11373 0 : tree _r;
11374 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11375 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11376 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11377 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11378 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11379 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1098, __FILE__, __LINE__, true);
11380 0 : return _r;
11381 : }
11382 0 : next_after_fail1969:;
11383 : }
11384 : else
11385 : {
11386 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1970;
11387 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1970;
11388 0 : {
11389 0 : tree res_op0;
11390 0 : res_op0 = captures[2];
11391 0 : tree res_op1;
11392 0 : res_op1 = captures[4];
11393 0 : tree res_op2;
11394 0 : res_op2 = bitsize_int ((idx - nelts) * elem_size);
11395 0 : tree _r;
11396 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11397 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11398 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11399 0 : if (TREE_SIDE_EFFECTS (captures[5]))
11400 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
11401 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1099, __FILE__, __LINE__, true);
11402 0 : return _r;
11403 : }
11404 0 : next_after_fail1970:;
11405 : }
11406 : }
11407 : }
11408 : }
11409 : }
11410 : }
11411 0 : break;
11412 : }
11413 : default:;
11414 : }
11415 : break;
11416 : }
11417 0 : case BIT_INSERT_EXPR:
11418 0 : {
11419 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11420 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11421 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11422 0 : {
11423 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
11424 0 : {
11425 0 : unsigned HOST_WIDE_INT isize;
11426 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1])))
11427 0 : isize = TYPE_PRECISION (TREE_TYPE (captures[1]));
11428 : else
11429 0 : isize = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (captures[1])));
11430 0 : if ((!INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
11431 0 : || type_has_mode_precision_p (TREE_TYPE (captures[1])))
11432 0 : && wi::leu_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
11433 0 : && wi::leu_p (wi::to_wide (captures[4]) + wi::to_wide (captures[3]),
11434 0 : wi::to_wide (captures[2]) + isize)
11435 : )
11436 : {
11437 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1971;
11438 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1971;
11439 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1971;
11440 0 : {
11441 0 : tree res_op0;
11442 0 : res_op0 = captures[1];
11443 0 : tree res_op1;
11444 0 : res_op1 = captures[3];
11445 0 : tree res_op2;
11446 0 : res_op2 = wide_int_to_tree (bitsizetype,
11447 0 : wi::to_wide (captures[4])
11448 0 : - wi::to_wide (captures[2]));
11449 0 : tree _r;
11450 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11451 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11452 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11453 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1100, __FILE__, __LINE__, true);
11454 0 : return _r;
11455 : }
11456 0 : next_after_fail1971:;
11457 : }
11458 : else
11459 : {
11460 0 : if (wi::eq_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
11461 0 : && compare_tree_int (captures[3], isize) == 0
11462 : )
11463 : {
11464 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1972;
11465 0 : {
11466 0 : tree res_op0;
11467 0 : res_op0 = captures[1];
11468 0 : tree _r;
11469 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
11470 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11471 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11472 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11473 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11474 0 : if (TREE_SIDE_EFFECTS (captures[3]))
11475 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
11476 0 : if (TREE_SIDE_EFFECTS (captures[4]))
11477 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
11478 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1101, __FILE__, __LINE__, true);
11479 0 : return _r;
11480 : }
11481 0 : next_after_fail1972:;
11482 : }
11483 : else
11484 : {
11485 0 : if (wi::geu_p (wi::to_wide (captures[2]),
11486 0 : wi::to_wide (captures[4]) + wi::to_wide (captures[3]))
11487 0 : || wi::geu_p (wi::to_wide (captures[4]),
11488 0 : wi::to_wide (captures[2]) + isize)
11489 : )
11490 : {
11491 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1973;
11492 0 : {
11493 0 : tree res_op0;
11494 0 : res_op0 = captures[0];
11495 0 : tree res_op1;
11496 0 : res_op1 = captures[3];
11497 0 : tree res_op2;
11498 0 : res_op2 = captures[4];
11499 0 : tree _r;
11500 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11501 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11502 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11503 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11504 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11505 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1102, __FILE__, __LINE__, true);
11506 0 : return _r;
11507 : }
11508 0 : next_after_fail1973:;
11509 : }
11510 : }
11511 : }
11512 : }
11513 : }
11514 0 : break;
11515 : }
11516 : default:;
11517 : }
11518 : return NULL_TREE;
11519 : }
11520 : #pragma GCC diagnostic pop
|