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 117850097 : tree_maybe_cmp (tree t, tree *res_ops)
11 : {
12 117850097 : const tree type = TREE_TYPE (t);
13 117850097 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 117850097 : if (TREE_SIDE_EFFECTS (t)) return false;
15 117850097 : switch (TREE_CODE (t))
16 : {
17 471061 : case LT_EXPR:
18 471061 : case LE_EXPR:
19 471061 : case EQ_EXPR:
20 471061 : case NE_EXPR:
21 471061 : case GE_EXPR:
22 471061 : case GT_EXPR:
23 471061 : case UNORDERED_EXPR:
24 471061 : case ORDERED_EXPR:
25 471061 : case UNLT_EXPR:
26 471061 : case UNLE_EXPR:
27 471061 : case UNGT_EXPR:
28 471061 : case UNGE_EXPR:
29 471061 : case UNEQ_EXPR:
30 471061 : case LTGT_EXPR:
31 471061 : {
32 471061 : tree _p0 = TREE_OPERAND (t, 0);
33 471061 : tree _p1 = TREE_OPERAND (t, 1);
34 471061 : {
35 471061 : tree captures[3] ATTRIBUTE_UNUSED = { t, _p0, _p1 };
36 471061 : {
37 471061 : res_ops[0] = captures[0];
38 471061 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 5, __FILE__, __LINE__, false);
39 471061 : return true;
40 : }
41 : }
42 25452557 : break;
43 : }
44 25452557 : CASE_CONVERT:
45 25452557 : {
46 25452557 : tree _p0 = TREE_OPERAND (t, 0);
47 25452557 : switch (TREE_CODE (_p0))
48 : {
49 1441 : case LT_EXPR:
50 1441 : case LE_EXPR:
51 1441 : case EQ_EXPR:
52 1441 : case NE_EXPR:
53 1441 : case GE_EXPR:
54 1441 : case GT_EXPR:
55 1441 : case UNORDERED_EXPR:
56 1441 : case ORDERED_EXPR:
57 1441 : case UNLT_EXPR:
58 1441 : case UNLE_EXPR:
59 1441 : case UNGT_EXPR:
60 1441 : case UNGE_EXPR:
61 1441 : case UNEQ_EXPR:
62 1441 : case LTGT_EXPR:
63 1441 : {
64 1441 : tree _q20 = TREE_OPERAND (_p0, 0);
65 1441 : tree _q21 = TREE_OPERAND (_p0, 1);
66 1441 : {
67 1441 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
68 1441 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
69 : )
70 : {
71 778 : {
72 778 : res_ops[0] = captures[0];
73 778 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 6, __FILE__, __LINE__, false);
74 778 : return true;
75 : }
76 : }
77 : }
78 : break;
79 : }
80 : default:;
81 : }
82 : break;
83 : }
84 191025 : case BIT_XOR_EXPR:
85 191025 : {
86 191025 : tree _p0 = TREE_OPERAND (t, 0);
87 191025 : tree _p1 = TREE_OPERAND (t, 1);
88 191025 : {
89 191025 : tree captures[3] ATTRIBUTE_UNUSED = { t, _p0, _p1 };
90 191025 : if (INTEGRAL_TYPE_P (type)
91 191025 : && TYPE_PRECISION (type) == 1
92 : )
93 : {
94 93225 : {
95 93225 : res_ops[0] = captures[0];
96 93225 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 7, __FILE__, __LINE__, false);
97 93225 : return true;
98 : }
99 : }
100 : }
101 : break;
102 : }
103 : default:;
104 : }
105 : return false;
106 : }
107 :
108 : bool
109 0 : tree_float_value_p (tree t)
110 : {
111 0 : const tree type = TREE_TYPE (t);
112 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
113 0 : if (TREE_SIDE_EFFECTS (t)) return false;
114 0 : {
115 0 : tree captures[1] ATTRIBUTE_UNUSED = { t };
116 0 : if (TYPE_MAIN_VARIANT (TREE_TYPE (captures[0])) == float_type_node
117 : )
118 : {
119 0 : {
120 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 45, __FILE__, __LINE__, false);
121 0 : return true;
122 : }
123 : }
124 : }
125 : return false;
126 : }
127 :
128 : tree
129 0 : generic_simplify_7 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
130 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
131 : {
132 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
133 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail78;
134 0 : {
135 0 : tree res_op0;
136 0 : res_op0 = captures[1];
137 0 : tree res_op1;
138 0 : res_op1 = captures[2];
139 0 : tree _r;
140 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
141 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 55, __FILE__, __LINE__, true);
142 : return _r;
143 : }
144 0 : next_after_fail78:;
145 0 : return NULL_TREE;
146 : }
147 :
148 : tree
149 589 : generic_simplify_13 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
150 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
151 : {
152 589 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
153 589 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail88;
154 589 : {
155 589 : if (! tree_invariant_p (captures[3])) goto next_after_fail88;
156 1 : tree res_op0;
157 1 : {
158 1 : tree _o1[2], _r1;
159 1 : _o1[0] = captures[2];
160 1 : _o1[1] = unshare_expr (captures[3]);
161 1 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
162 1 : res_op0 = _r1;
163 : }
164 1 : tree res_op1;
165 1 : {
166 1 : tree _o1[2], _r1;
167 1 : {
168 1 : tree _o2[1], _r2;
169 1 : _o2[0] = captures[4];
170 1 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
171 1 : if (EXPR_P (_r2))
172 0 : goto next_after_fail88;
173 1 : _o1[0] = _r2;
174 : }
175 1 : _o1[1] = captures[3];
176 1 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
177 1 : if (EXPR_P (_r1))
178 0 : goto next_after_fail88;
179 1 : res_op1 = _r1;
180 : }
181 1 : tree _r;
182 1 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
183 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 61, __FILE__, __LINE__, true);
184 : return _r;
185 : }
186 : next_after_fail88:;
187 : return NULL_TREE;
188 : }
189 :
190 : tree
191 10 : generic_simplify_26 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
192 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
193 : {
194 10 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
195 10 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
196 10 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
197 : )
198 : {
199 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail101;
200 10 : {
201 10 : tree res_op0;
202 10 : {
203 10 : tree _o1[1], _r1;
204 10 : _o1[0] = captures[0];
205 10 : if (TREE_TYPE (_o1[0]) != type)
206 : {
207 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
208 : }
209 : else
210 : _r1 = _o1[0];
211 10 : res_op0 = _r1;
212 : }
213 10 : tree res_op1;
214 10 : {
215 10 : tree _o1[1], _r1;
216 10 : _o1[0] = captures[1];
217 10 : if (TREE_TYPE (_o1[0]) != type)
218 : {
219 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
220 : }
221 : else
222 : _r1 = _o1[0];
223 10 : res_op1 = _r1;
224 : }
225 10 : tree _r;
226 10 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
227 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 74, __FILE__, __LINE__, true);
228 10 : return _r;
229 : }
230 0 : next_after_fail101:;
231 : }
232 : return NULL_TREE;
233 : }
234 :
235 : tree
236 0 : generic_simplify_37 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
237 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
238 : const enum tree_code ARG_UNUSED (op),
239 : const enum tree_code ARG_UNUSED (cmp),
240 : const enum tree_code ARG_UNUSED (icmp))
241 : {
242 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
243 0 : if (INTEGRAL_TYPE_P (type)
244 0 : && invert_tree_comparison (cmp, HONOR_NANS (captures[1])) == icmp
245 0 : && canonicalize_math_after_vectorization_p ()
246 : )
247 : {
248 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail114;
249 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail114;
250 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail114;
251 : {
252 : tree res_op0;
253 : res_op0 = captures[0];
254 : tree res_op1;
255 : res_op1 = captures[3];
256 : tree res_op2;
257 : res_op2 = captures[5];
258 : tree _r;
259 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
260 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 86, __FILE__, __LINE__, true);
261 : return _r;
262 : }
263 0 : next_after_fail114:;
264 : }
265 0 : return NULL_TREE;
266 : }
267 :
268 : tree
269 19 : generic_simplify_44 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
270 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
271 : const enum tree_code ARG_UNUSED (op))
272 : {
273 19 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
274 38 : if (INTEGRAL_TYPE_P (type)
275 19 : && operand_equal_p (captures[2], captures[6], 0)
276 38 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[4])) == 0
277 : )
278 : {
279 0 : {
280 0 : tree t = type;
281 0 : if (!TYPE_OVERFLOW_WRAPS (t))
282 0 : t = unsigned_type_for (t);
283 0 : wide_int c = wi::add (wi::to_wide (captures[3]), wi::to_wide (captures[7]));
284 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail122;
285 0 : if (TREE_SIDE_EFFECTS (captures[7])) goto next_after_fail122;
286 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail122;
287 0 : {
288 0 : tree res_op0;
289 0 : {
290 0 : tree _o1[2], _r1;
291 0 : {
292 0 : tree _o2[1], _r2;
293 0 : _o2[0] = captures[2];
294 0 : if (TREE_TYPE (_o2[0]) != t)
295 : {
296 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, t, _o2[0]);
297 : }
298 : else
299 : _r2 = _o2[0];
300 0 : _o1[0] = _r2;
301 : }
302 0 : _o1[1] = wide_int_to_tree (t, c);
303 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, t, _o1[0], _o1[1]);
304 0 : res_op0 = _r1;
305 : }
306 0 : tree _r;
307 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
308 0 : if (TREE_SIDE_EFFECTS (captures[6]))
309 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[6]), _r);
310 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 88, __FILE__, __LINE__, true);
311 0 : return _r;
312 : }
313 0 : next_after_fail122:;
314 0 : }
315 : }
316 : return NULL_TREE;
317 : }
318 :
319 : tree
320 5339 : generic_simplify_54 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
321 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
322 : {
323 5339 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
324 5339 : if (fold_real_zero_addition_p (type, captures[0], captures[1], 0)
325 : )
326 : {
327 95 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail134;
328 95 : {
329 95 : tree res_op0;
330 95 : res_op0 = captures[0];
331 95 : tree _r;
332 95 : _r = non_lvalue_loc (loc, res_op0);
333 95 : if (TREE_SIDE_EFFECTS (captures[1]))
334 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
335 95 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, true);
336 95 : return _r;
337 : }
338 0 : next_after_fail134:;
339 : }
340 : return NULL_TREE;
341 : }
342 :
343 : tree
344 0 : generic_simplify_59 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
345 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
346 : {
347 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
348 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail140;
349 0 : {
350 0 : tree res_op0;
351 0 : res_op0 = captures[0];
352 0 : tree res_op1;
353 0 : res_op1 = captures[1];
354 0 : tree _r;
355 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
356 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 108, __FILE__, __LINE__, true);
357 : return _r;
358 : }
359 0 : next_after_fail140:;
360 0 : return NULL_TREE;
361 : }
362 :
363 : tree
364 10 : generic_simplify_66 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
365 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
366 : {
367 10 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
368 10 : if (!TYPE_SATURATING (type)
369 : )
370 : {
371 10 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
372 20 : && !FIXED_POINT_TYPE_P (type)
373 : )
374 : {
375 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail155;
376 10 : {
377 10 : tree res_op0;
378 10 : res_op0 = captures[2];
379 10 : tree res_op1;
380 10 : res_op1 = captures[1];
381 10 : tree _r;
382 10 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
383 10 : if (TREE_SIDE_EFFECTS (captures[0]))
384 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
385 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 123, __FILE__, __LINE__, true);
386 10 : return _r;
387 : }
388 0 : next_after_fail155:;
389 : }
390 : }
391 : return NULL_TREE;
392 : }
393 :
394 : tree
395 424667 : generic_simplify_73 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
396 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
397 : const enum tree_code ARG_UNUSED (plusminus))
398 : {
399 424667 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
400 424667 : if (!TYPE_SATURATING (type)
401 424667 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
402 : )
403 : {
404 424127 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
405 : )
406 : {
407 55 : if ((!ANY_INTEGRAL_TYPE_P (type)
408 424086 : || TYPE_OVERFLOW_WRAPS (type)
409 87771 : || (INTEGRAL_TYPE_P (type)
410 87757 : && ((tree_expr_nonzero_p (captures[1])
411 60346 : && (plusminus == MINUS_EXPR
412 60205 : || expr_not_equal_to (captures[1],
413 484332 : wi::minus_one (TYPE_PRECISION (type)),
414 : gimple_match_ctx (captures[0]))))
415 27411 : || expr_not_equal_to (captures[2],
416 : (plusminus == PLUS_EXPR
417 451538 : ? wi::max_value (TYPE_PRECISION (type), SIGNED)
418 1680 : : wi::min_value (TYPE_PRECISION (type), SIGNED)),
419 : gimple_match_ctx (captures[0])))))
420 424127 : && single_use (captures[0])
421 : )
422 : {
423 422573 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail163;
424 422573 : {
425 422573 : tree res_op0;
426 422573 : {
427 422573 : tree _o1[2], _r1;
428 422573 : _o1[0] = captures[2];
429 422573 : _o1[1] = build_one_cst (type);
430 422573 : _r1 = fold_build2_loc (loc, plusminus, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
431 422573 : res_op0 = _r1;
432 : }
433 422573 : tree res_op1;
434 422573 : res_op1 = captures[1];
435 422573 : tree _r;
436 422573 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
437 422573 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 131, __FILE__, __LINE__, true);
438 422573 : return _r;
439 : }
440 0 : next_after_fail163:;
441 : }
442 : }
443 : }
444 : return NULL_TREE;
445 : }
446 :
447 : tree
448 117 : generic_simplify_81 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
449 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
450 : const combined_fn ARG_UNUSED (POPCOUNT))
451 : {
452 117 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
453 234 : if (INTEGRAL_TYPE_P (type)
454 585 : && (wi::bit_and (widest_int::from (tree_nonzero_bits (captures[1]), UNSIGNED),
455 468 : widest_int::from (tree_nonzero_bits (captures[3]), UNSIGNED))
456 351 : == 0)
457 : )
458 : {
459 1 : {
460 1 : tree utype = TREE_TYPE (captures[1]);
461 1 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
462 0 : utype = TREE_TYPE (captures[3]);
463 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail172;
464 1 : {
465 1 : tree res_op0;
466 1 : {
467 1 : tree _o1[2], _r1;
468 1 : {
469 1 : tree _o2[1], _r2;
470 1 : _o2[0] = captures[1];
471 1 : if (TREE_TYPE (_o2[0]) != utype)
472 : {
473 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
474 : }
475 : else
476 : _r2 = _o2[0];
477 1 : _o1[0] = _r2;
478 : }
479 1 : {
480 1 : tree _o2[1], _r2;
481 1 : _o2[0] = captures[3];
482 1 : if (TREE_TYPE (_o2[0]) != utype)
483 : {
484 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
485 : }
486 : else
487 : _r2 = _o2[0];
488 1 : _o1[1] = _r2;
489 : }
490 1 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
491 1 : res_op0 = _r1;
492 : }
493 1 : tree _r;
494 1 : _r = maybe_build_call_expr_loc (loc, POPCOUNT, type, 1, res_op0);
495 1 : if (!_r)
496 0 : goto next_after_fail172;
497 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 140, __FILE__, __LINE__, true);
498 1 : return _r;
499 : }
500 : next_after_fail172:;
501 : }
502 : }
503 : return NULL_TREE;
504 : }
505 :
506 : tree
507 276 : generic_simplify_94 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
508 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
509 : {
510 276 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
511 276 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
512 276 : && tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
513 : )
514 : {
515 276 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail185;
516 276 : {
517 276 : tree res_op0;
518 276 : {
519 276 : tree _o1[2], _r1;
520 276 : {
521 276 : tree _o2[1], _r2;
522 276 : _o2[0] = captures[3];
523 276 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
524 276 : _o1[0] = _r2;
525 : }
526 276 : _o1[1] = captures[0];
527 276 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
528 276 : res_op0 = _r1;
529 : }
530 276 : tree _r;
531 276 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
532 276 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 152, __FILE__, __LINE__, true);
533 276 : return _r;
534 : }
535 0 : next_after_fail185:;
536 : }
537 : return NULL_TREE;
538 : }
539 :
540 : tree
541 10548 : generic_simplify_104 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
542 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
543 : {
544 10548 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
545 10548 : if (!TYPE_SATURATING (type)
546 : )
547 : {
548 10548 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
549 21096 : && !FIXED_POINT_TYPE_P (type)
550 : )
551 : {
552 10548 : if (INTEGRAL_TYPE_P (type)
553 10548 : && TYPE_OVERFLOW_UNDEFINED (type)
554 3263 : && TREE_CODE (captures[1]) != INTEGER_CST
555 11735 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
556 : )
557 : {
558 1187 : {
559 1187 : tree utype = unsigned_type_for (type);
560 1187 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail199;
561 1187 : {
562 1187 : tree res_op0;
563 1187 : {
564 1187 : tree _o1[1], _r1;
565 1187 : {
566 1187 : tree _o2[1], _r2;
567 1187 : _o2[0] = captures[1];
568 1187 : if (TREE_TYPE (_o2[0]) != utype)
569 : {
570 1187 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
571 : }
572 : else
573 : _r2 = _o2[0];
574 1187 : _o1[0] = _r2;
575 : }
576 1187 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
577 1187 : res_op0 = _r1;
578 : }
579 1187 : tree _r;
580 1187 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
581 1187 : if (TREE_SIDE_EFFECTS (captures[2]))
582 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
583 1187 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 166, __FILE__, __LINE__, true);
584 1187 : return _r;
585 : }
586 0 : next_after_fail199:;
587 : }
588 : }
589 : else
590 : {
591 9361 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
592 9361 : || (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
593 2333 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
594 : )
595 : {
596 9101 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail200;
597 9101 : {
598 9101 : tree res_op0;
599 9101 : {
600 9101 : tree _o1[1], _r1;
601 9101 : _o1[0] = captures[1];
602 9101 : if (TREE_TYPE (_o1[0]) != type)
603 : {
604 9101 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
605 : }
606 : else
607 : _r1 = _o1[0];
608 9101 : res_op0 = _r1;
609 : }
610 9101 : tree _r;
611 9101 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
612 9101 : if (TREE_SIDE_EFFECTS (captures[2]))
613 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
614 9101 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 167, __FILE__, __LINE__, true);
615 9101 : return _r;
616 : }
617 0 : next_after_fail200:;
618 : }
619 : }
620 : }
621 : }
622 : return NULL_TREE;
623 : }
624 :
625 : tree
626 0 : generic_simplify_117 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
627 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
628 : {
629 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
630 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail214;
631 0 : {
632 0 : tree res_op0;
633 0 : res_op0 = captures[0];
634 0 : tree res_op1;
635 0 : {
636 0 : tree _o1[1], _r1;
637 0 : _o1[0] = captures[2];
638 0 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
639 0 : res_op1 = _r1;
640 : }
641 0 : tree _r;
642 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
643 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 180, __FILE__, __LINE__, true);
644 : return _r;
645 : }
646 0 : next_after_fail214:;
647 0 : return NULL_TREE;
648 : }
649 :
650 : tree
651 0 : generic_simplify_125 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
652 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
653 : {
654 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
655 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail222;
656 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail222;
657 0 : {
658 0 : tree res_op0;
659 0 : res_op0 = captures[0];
660 0 : tree res_op1;
661 0 : res_op1 = captures[3];
662 0 : tree _r;
663 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
664 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 186, __FILE__, __LINE__, true);
665 : return _r;
666 : }
667 : next_after_fail222:;
668 : return NULL_TREE;
669 : }
670 :
671 : tree
672 18423 : generic_simplify_136 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
673 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
674 : {
675 18423 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
676 18423 : {
677 18423 : bool wascmp;
678 18423 : if ((bitwise_inverted_equal_p (captures[0], captures[2], wascmp)
679 18423 : || bitwise_inverted_equal_p (captures[1], captures[2], wascmp))
680 18423 : && (!wascmp || element_precision (type) == 1)
681 : )
682 : {
683 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail233;
684 0 : {
685 0 : tree _r;
686 0 : _r = build_all_ones_cst (TREE_TYPE (captures[0]));
687 0 : if (TREE_SIDE_EFFECTS (captures[0]))
688 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
689 0 : if (TREE_SIDE_EFFECTS (captures[1]))
690 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
691 0 : if (TREE_SIDE_EFFECTS (captures[2]))
692 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
693 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 193, __FILE__, __LINE__, true);
694 0 : return _r;
695 : }
696 0 : next_after_fail233:;
697 : }
698 : }
699 18423 : return NULL_TREE;
700 : }
701 :
702 : tree
703 82 : generic_simplify_147 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
704 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
705 : const enum tree_code ARG_UNUSED (op))
706 : {
707 82 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
708 82 : if (bitwise_equal_p (captures[4], captures[7])
709 : )
710 : {
711 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail249;
712 16 : {
713 16 : tree res_op0;
714 16 : {
715 16 : tree _o1[2], _r1;
716 16 : {
717 16 : tree _o2[2], _r2;
718 16 : _o2[0] = captures[5];
719 16 : {
720 16 : tree _o3[1], _r3;
721 16 : _o3[0] = captures[6];
722 16 : if (TREE_TYPE (_o3[0]) != TREE_TYPE (_o2[0]))
723 : {
724 16 : _r3 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
725 : }
726 : else
727 : _r3 = _o3[0];
728 16 : _o2[1] = _r3;
729 : }
730 16 : _r2 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
731 16 : _o1[0] = _r2;
732 : }
733 16 : {
734 16 : tree _o2[1], _r2;
735 16 : _o2[0] = captures[4];
736 16 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o1[0]))
737 : {
738 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
739 : }
740 : else
741 : _r2 = _o2[0];
742 16 : _o1[1] = _r2;
743 : }
744 16 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
745 16 : res_op0 = _r1;
746 : }
747 16 : tree _r;
748 16 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
749 16 : if (TREE_SIDE_EFFECTS (captures[7]))
750 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[7]), _r);
751 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 201, __FILE__, __LINE__, true);
752 16 : return _r;
753 : }
754 0 : next_after_fail249:;
755 : }
756 : return NULL_TREE;
757 : }
758 :
759 : tree
760 458 : generic_simplify_158 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
761 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
762 : const enum tree_code ARG_UNUSED (code2),
763 : const enum tree_code ARG_UNUSED (code1))
764 : {
765 458 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
766 458 : if ((TREE_CODE (captures[2]) == INTEGER_CST
767 426 : && TREE_CODE (captures[5]) == INTEGER_CST)
768 458 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
769 3 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2])))
770 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
771 32 : && bitwise_equal_p (captures[2], captures[5]))
772 : )
773 : {
774 428 : {
775 428 : bool one_before = false;
776 428 : bool one_after = false;
777 428 : int cmp = 0;
778 428 : bool allbits = true;
779 428 : if (TREE_CODE (captures[2]) == INTEGER_CST
780 426 : && TREE_CODE (captures[5]) == INTEGER_CST)
781 : {
782 426 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
783 426 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
784 426 : auto t2 = wi::to_wide (captures[5]);
785 426 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
786 426 : if (cmp < 0
787 426 : && t1 == t2 - 1)
788 : one_before = true;
789 426 : if (cmp > 0
790 426 : && t1 == t2 + 1)
791 : one_after = true;
792 : }
793 428 : bool val;
794 428 : switch (code2)
795 : {
796 412 : case EQ_EXPR: val = (cmp == 0); break;
797 0 : case NE_EXPR: val = (cmp != 0); break;
798 2 : case LT_EXPR: val = (cmp < 0); break;
799 0 : case GT_EXPR: val = (cmp > 0); break;
800 14 : case LE_EXPR: val = (cmp <= 0); break;
801 0 : case GE_EXPR: val = (cmp >= 0); break;
802 0 : default: gcc_unreachable ();
803 : }
804 428 : if (code1 == EQ_EXPR && val
805 : )
806 : {
807 7 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail269;
808 7 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail269;
809 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail269;
810 7 : {
811 7 : tree _r;
812 7 : _r = captures[3];
813 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 211, __FILE__, __LINE__, true);
814 7 : return _r;
815 : }
816 : next_after_fail269:;
817 : }
818 : else
819 : {
820 421 : if (code1 == NE_EXPR && val && allbits
821 : )
822 : {
823 7 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail270;
824 7 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail270;
825 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail270;
826 7 : {
827 7 : tree _r;
828 7 : _r = constant_boolean_node (true, type);
829 7 : if (TREE_SIDE_EFFECTS (captures[4]))
830 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
831 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 212, __FILE__, __LINE__, true);
832 7 : return _r;
833 : }
834 : next_after_fail270:;
835 : }
836 : else
837 : {
838 414 : if (code1 == NE_EXPR && !val && allbits
839 : )
840 : {
841 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail271;
842 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail271;
843 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail271;
844 0 : {
845 0 : tree _r;
846 0 : _r = captures[0];
847 0 : if (TREE_SIDE_EFFECTS (captures[4]))
848 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
849 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 213, __FILE__, __LINE__, true);
850 0 : return _r;
851 : }
852 : next_after_fail271:;
853 : }
854 : else
855 : {
856 414 : if (code1 == EQ_EXPR
857 414 : && code2 == GT_EXPR
858 0 : && cmp == 0
859 0 : && allbits
860 414 : && ((VECTOR_BOOLEAN_TYPE_P (type)
861 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
862 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
863 : )
864 : {
865 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail272;
866 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail272;
867 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail272;
868 0 : {
869 0 : tree res_op0;
870 0 : res_op0 = captures[4];
871 0 : tree res_op1;
872 0 : res_op1 = captures[5];
873 0 : tree _r;
874 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
875 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 214, __FILE__, __LINE__, true);
876 0 : return _r;
877 : }
878 : next_after_fail272:;
879 : }
880 : else
881 : {
882 414 : if (code1 == EQ_EXPR
883 414 : && code2 == LT_EXPR
884 2 : && cmp == 0
885 2 : && allbits
886 416 : && ((VECTOR_BOOLEAN_TYPE_P (type)
887 2 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
888 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
889 : )
890 : {
891 2 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail273;
892 2 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail273;
893 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail273;
894 2 : {
895 2 : tree res_op0;
896 2 : res_op0 = captures[4];
897 2 : tree res_op1;
898 2 : res_op1 = captures[5];
899 2 : tree _r;
900 2 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
901 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 215, __FILE__, __LINE__, true);
902 2 : return _r;
903 : }
904 : next_after_fail273:;
905 : }
906 : else
907 : {
908 412 : if (code1 == EQ_EXPR
909 412 : && code2 == GE_EXPR
910 : && one_before
911 0 : && allbits
912 412 : && ((VECTOR_BOOLEAN_TYPE_P (type)
913 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
914 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
915 : )
916 : {
917 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail274;
918 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail274;
919 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail274;
920 0 : {
921 0 : tree res_op0;
922 0 : res_op0 = captures[4];
923 0 : tree res_op1;
924 0 : {
925 0 : tree _o1[1], _r1;
926 0 : _o1[0] = captures[2];
927 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
928 : {
929 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
930 : }
931 : else
932 : _r1 = _o1[0];
933 0 : res_op1 = _r1;
934 : }
935 0 : tree _r;
936 0 : _r = fold_build2_loc (loc, GE_EXPR, type, res_op0, res_op1);
937 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 216, __FILE__, __LINE__, true);
938 0 : return _r;
939 : }
940 : next_after_fail274:;
941 : }
942 : else
943 : {
944 412 : if (code1 == EQ_EXPR
945 412 : && code2 == LE_EXPR
946 : && one_after
947 0 : && allbits
948 412 : && ((VECTOR_BOOLEAN_TYPE_P (type)
949 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
950 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
951 : )
952 : {
953 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail275;
954 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail275;
955 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail275;
956 0 : {
957 0 : tree res_op0;
958 0 : res_op0 = captures[4];
959 0 : tree res_op1;
960 0 : {
961 0 : tree _o1[1], _r1;
962 0 : _o1[0] = captures[2];
963 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
964 : {
965 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
966 : }
967 : else
968 : _r1 = _o1[0];
969 0 : res_op1 = _r1;
970 : }
971 0 : tree _r;
972 0 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
973 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 217, __FILE__, __LINE__, true);
974 0 : return _r;
975 : }
976 : next_after_fail275:;
977 : }
978 : }
979 : }
980 : }
981 : }
982 : }
983 : }
984 : }
985 : }
986 : return NULL_TREE;
987 : }
988 :
989 : tree
990 9 : generic_simplify_203 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
991 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
992 : const combined_fn ARG_UNUSED (LDEXP))
993 : {
994 9 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
995 9 : if (flag_unsafe_math_optimizations
996 : )
997 : {
998 9 : if (real_equal (TREE_REAL_CST_PTR (captures[1]), &dconst1)
999 : )
1000 : {
1001 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail344;
1002 9 : {
1003 9 : tree res_op0;
1004 9 : res_op0 = captures[0];
1005 9 : tree res_op1;
1006 9 : res_op1 = captures[2];
1007 9 : tree _r;
1008 9 : _r = maybe_build_call_expr_loc (loc, LDEXP, type, 2, res_op0, res_op1);
1009 9 : if (!_r)
1010 0 : goto next_after_fail344;
1011 9 : if (TREE_SIDE_EFFECTS (captures[1]))
1012 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1013 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 257, __FILE__, __LINE__, true);
1014 9 : return _r;
1015 : }
1016 : next_after_fail344:;
1017 : }
1018 : }
1019 : return NULL_TREE;
1020 : }
1021 :
1022 : tree
1023 12 : generic_simplify_211 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1024 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1025 : const enum tree_code ARG_UNUSED (cmp))
1026 : {
1027 12 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1028 12 : if (element_precision (captures[0]) >= element_precision (captures[1])
1029 12 : && types_match (captures[1], captures[3])
1030 : )
1031 : {
1032 12 : if (wi::lt_p (wi::to_wide (captures[2]), 0, TYPE_SIGN (TREE_TYPE (captures[2])))
1033 : )
1034 : {
1035 0 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1036 : )
1037 : {
1038 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail352;
1039 0 : {
1040 0 : tree res_op0;
1041 0 : res_op0 = captures[3];
1042 0 : tree res_op1;
1043 0 : res_op1 = captures[1];
1044 0 : tree _r;
1045 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1046 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1047 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1048 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 265, __FILE__, __LINE__, true);
1049 0 : return _r;
1050 : }
1051 0 : next_after_fail352:;
1052 : }
1053 : else
1054 : {
1055 0 : if (tree_expr_nonzero_p (captures[1]) && tree_expr_nonzero_p (captures[3])
1056 : )
1057 : {
1058 0 : {
1059 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[1]));
1060 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail353;
1061 0 : {
1062 0 : tree res_op0;
1063 0 : {
1064 0 : tree _o1[1], _r1;
1065 0 : _o1[0] = captures[3];
1066 0 : if (TREE_TYPE (_o1[0]) != utype)
1067 : {
1068 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1069 : }
1070 : else
1071 : _r1 = _o1[0];
1072 0 : res_op0 = _r1;
1073 : }
1074 0 : tree res_op1;
1075 0 : {
1076 0 : tree _o1[1], _r1;
1077 0 : _o1[0] = captures[1];
1078 0 : if (TREE_TYPE (_o1[0]) != utype)
1079 : {
1080 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1081 : }
1082 : else
1083 : _r1 = _o1[0];
1084 0 : res_op1 = _r1;
1085 : }
1086 0 : tree _r;
1087 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1088 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1089 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1090 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 266, __FILE__, __LINE__, true);
1091 0 : return _r;
1092 : }
1093 0 : next_after_fail353:;
1094 : }
1095 : }
1096 : }
1097 : }
1098 : else
1099 : {
1100 12 : if (wi::gt_p (wi::to_wide (captures[2]), 1, TYPE_SIGN (TREE_TYPE (captures[2])))
1101 : )
1102 : {
1103 12 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1])) || !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1104 : )
1105 : {
1106 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail354;
1107 12 : {
1108 12 : tree res_op0;
1109 12 : res_op0 = captures[1];
1110 12 : tree res_op1;
1111 12 : res_op1 = captures[3];
1112 12 : tree _r;
1113 12 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1114 12 : if (TREE_SIDE_EFFECTS (captures[2]))
1115 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1116 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 267, __FILE__, __LINE__, true);
1117 12 : return _r;
1118 : }
1119 0 : next_after_fail354:;
1120 : }
1121 : else
1122 : {
1123 0 : {
1124 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[1]));
1125 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail355;
1126 0 : {
1127 0 : tree res_op0;
1128 0 : {
1129 0 : tree _o1[1], _r1;
1130 0 : _o1[0] = captures[1];
1131 0 : if (TREE_TYPE (_o1[0]) != utype)
1132 : {
1133 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1134 : }
1135 : else
1136 : _r1 = _o1[0];
1137 0 : res_op0 = _r1;
1138 : }
1139 0 : tree res_op1;
1140 0 : {
1141 0 : tree _o1[1], _r1;
1142 0 : _o1[0] = captures[3];
1143 0 : if (TREE_TYPE (_o1[0]) != utype)
1144 : {
1145 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, utype, _o1[0]);
1146 : }
1147 : else
1148 : _r1 = _o1[0];
1149 0 : res_op1 = _r1;
1150 : }
1151 0 : tree _r;
1152 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1153 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1154 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1155 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 268, __FILE__, __LINE__, true);
1156 0 : return _r;
1157 : }
1158 0 : next_after_fail355:;
1159 : }
1160 : }
1161 : }
1162 : }
1163 : }
1164 : return NULL_TREE;
1165 : }
1166 :
1167 : tree
1168 179 : generic_simplify_242 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1169 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1170 : const enum tree_code ARG_UNUSED (cmp))
1171 : {
1172 179 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1173 179 : {
1174 179 : int cand = wi::ctz (wi::to_wide (captures[2])) - wi::ctz (wi::to_wide (captures[0]));
1175 358 : if (cand < 0
1176 179 : || (!integer_zerop (captures[2])
1177 246 : && wi::lshift (wi::to_wide (captures[0]), cand) != wi::to_wide (captures[2]))
1178 : )
1179 : {
1180 35 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail410;
1181 35 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail410;
1182 35 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail410;
1183 35 : {
1184 35 : tree _r;
1185 35 : _r = constant_boolean_node (cmp == NE_EXPR, type);
1186 35 : if (TREE_SIDE_EFFECTS (captures[1]))
1187 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1188 35 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 321, __FILE__, __LINE__, true);
1189 88 : return _r;
1190 : }
1191 91 : next_after_fail410:;
1192 : }
1193 : else
1194 : {
1195 144 : if (!integer_zerop (captures[2])
1196 144 : && wi::lshift (wi::to_wide (captures[0]), cand) == wi::to_wide (captures[2])
1197 : )
1198 : {
1199 53 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail411;
1200 53 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail411;
1201 53 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail411;
1202 53 : {
1203 53 : tree res_op0;
1204 53 : res_op0 = captures[1];
1205 53 : tree res_op1;
1206 53 : res_op1 = build_int_cst (TREE_TYPE (captures[1]), cand);
1207 53 : tree _r;
1208 53 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1209 53 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 322, __FILE__, __LINE__, true);
1210 53 : return _r;
1211 : }
1212 91 : next_after_fail411:;
1213 : }
1214 : }
1215 : }
1216 91 : return NULL_TREE;
1217 : }
1218 :
1219 : tree
1220 95150 : generic_simplify_251 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1221 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1222 : const enum tree_code ARG_UNUSED (cmp))
1223 : {
1224 95150 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1225 95150 : if (single_use (captures[0])
1226 : )
1227 : {
1228 95150 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail421;
1229 95150 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail421;
1230 95150 : {
1231 95150 : tree res_op0;
1232 95150 : res_op0 = captures[1];
1233 95150 : tree res_op1;
1234 95150 : res_op1 = captures[2];
1235 95150 : tree _r;
1236 95150 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1237 95150 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 332, __FILE__, __LINE__, true);
1238 95150 : return _r;
1239 : }
1240 : next_after_fail421:;
1241 : }
1242 : return NULL_TREE;
1243 : }
1244 :
1245 : tree
1246 803221 : generic_simplify_258 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1247 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1248 : const enum tree_code ARG_UNUSED (cmp),
1249 : const enum tree_code ARG_UNUSED (scmp))
1250 : {
1251 803221 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1252 803221 : if (single_use (captures[0])
1253 803221 : && (TREE_CODE (captures[2]) == INTEGER_CST || TREE_CODE (captures[2]) == VECTOR_CST)
1254 : )
1255 : {
1256 803221 : {
1257 803221 : tree otype = TREE_TYPE (captures[2]);
1258 803221 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail433;
1259 803221 : {
1260 803221 : tree res_op0;
1261 803221 : {
1262 803221 : tree _o1[1], _r1;
1263 803221 : _o1[0] = captures[1];
1264 803221 : if (TREE_TYPE (_o1[0]) != otype)
1265 : {
1266 441 : _r1 = fold_build1_loc (loc, NOP_EXPR, otype, _o1[0]);
1267 : }
1268 : else
1269 : _r1 = _o1[0];
1270 803221 : res_op0 = _r1;
1271 : }
1272 803221 : tree res_op1;
1273 803221 : {
1274 803221 : tree _o1[1], _r1;
1275 803221 : _o1[0] = captures[2];
1276 803221 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1277 803221 : res_op1 = _r1;
1278 : }
1279 803221 : tree _r;
1280 803221 : _r = fold_build2_loc (loc, scmp, type, res_op0, res_op1);
1281 803221 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 343, __FILE__, __LINE__, true);
1282 803221 : return _r;
1283 : }
1284 0 : next_after_fail433:;
1285 : }
1286 : }
1287 : return NULL_TREE;
1288 : }
1289 :
1290 : tree
1291 1263 : generic_simplify_265 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1292 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1293 : const enum tree_code ARG_UNUSED (cmp),
1294 : const enum tree_code ARG_UNUSED (icmp))
1295 : {
1296 1263 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1297 1263 : if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
1298 1263 : && ! DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
1299 : )
1300 : {
1301 1263 : {
1302 1263 : format_helper fmt (REAL_MODE_FORMAT (TYPE_MODE (TREE_TYPE (captures[0]))));
1303 1263 : tree type1 = TREE_TYPE (captures[1]);
1304 1263 : bool type1_signed_p = TYPE_SIGN (type1) == SIGNED;
1305 1263 : bool type1_ok = fmt.can_represent_integral_type_p (type1);
1306 1263 : tree type2 = TREE_TYPE (captures[3]);
1307 1263 : bool type2_signed_p = TYPE_SIGN (type2) == SIGNED;
1308 1263 : bool type2_ok = fmt.can_represent_integral_type_p (type2);
1309 1263 : if (type1_ok && type2_ok
1310 : )
1311 : {
1312 229 : if (cmp == ORDERED_EXPR || cmp == UNORDERED_EXPR
1313 : )
1314 : {
1315 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail472;
1316 0 : {
1317 0 : tree _r;
1318 0 : _r = constant_boolean_node (cmp == ORDERED_EXPR, type);
1319 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1320 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1321 0 : if (TREE_SIDE_EFFECTS (captures[3]))
1322 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
1323 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 381, __FILE__, __LINE__, true);
1324 183 : return _r;
1325 : }
1326 0 : next_after_fail472:;
1327 : }
1328 : else
1329 : {
1330 229 : if (TYPE_PRECISION (type1) > TYPE_PRECISION (type2)
1331 229 : && type1_signed_p >= type2_signed_p
1332 : )
1333 : {
1334 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail473;
1335 0 : {
1336 0 : tree res_op0;
1337 0 : res_op0 = captures[1];
1338 0 : tree res_op1;
1339 0 : {
1340 0 : tree _o1[1], _r1;
1341 0 : _o1[0] = captures[3];
1342 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1343 : {
1344 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1345 : }
1346 : else
1347 : _r1 = _o1[0];
1348 0 : res_op1 = _r1;
1349 : }
1350 0 : tree _r;
1351 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
1352 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 382, __FILE__, __LINE__, true);
1353 0 : return _r;
1354 : }
1355 0 : next_after_fail473:;
1356 : }
1357 : else
1358 : {
1359 229 : if (TYPE_PRECISION (type1) < TYPE_PRECISION (type2)
1360 229 : && type1_signed_p <= type2_signed_p
1361 : )
1362 : {
1363 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail474;
1364 7 : {
1365 7 : tree res_op0;
1366 7 : {
1367 7 : tree _o1[1], _r1;
1368 7 : _o1[0] = captures[1];
1369 7 : if (TREE_TYPE (_o1[0]) != type2)
1370 : {
1371 7 : _r1 = fold_build1_loc (loc, NOP_EXPR, type2, _o1[0]);
1372 : }
1373 : else
1374 : _r1 = _o1[0];
1375 7 : res_op0 = _r1;
1376 : }
1377 7 : tree res_op1;
1378 7 : res_op1 = captures[3];
1379 7 : tree _r;
1380 7 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
1381 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 383, __FILE__, __LINE__, true);
1382 7 : return _r;
1383 : }
1384 0 : next_after_fail474:;
1385 : }
1386 : else
1387 : {
1388 222 : if (TYPE_PRECISION (type1) == TYPE_PRECISION (type2)
1389 222 : && type1_signed_p == type2_signed_p
1390 : )
1391 : {
1392 176 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail475;
1393 176 : {
1394 176 : tree res_op0;
1395 176 : res_op0 = captures[1];
1396 176 : tree res_op1;
1397 176 : {
1398 176 : tree _o1[1], _r1;
1399 176 : _o1[0] = captures[3];
1400 176 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1401 : {
1402 1 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1403 : }
1404 : else
1405 : _r1 = _o1[0];
1406 176 : res_op1 = _r1;
1407 : }
1408 176 : tree _r;
1409 176 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
1410 176 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 384, __FILE__, __LINE__, true);
1411 176 : return _r;
1412 : }
1413 0 : next_after_fail475:;
1414 : }
1415 : }
1416 : }
1417 : }
1418 : }
1419 : }
1420 : }
1421 : return NULL_TREE;
1422 : }
1423 :
1424 : tree
1425 451 : generic_simplify_278 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1426 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1427 : const enum tree_code ARG_UNUSED (cmp))
1428 : {
1429 451 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1430 451 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail511;
1431 451 : {
1432 451 : tree res_op0;
1433 451 : {
1434 451 : tree _o1[2], _r1;
1435 451 : _o1[0] = captures[0];
1436 451 : {
1437 451 : tree _o2[1], _r2;
1438 451 : _o2[0] = captures[1];
1439 451 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
1440 451 : if (EXPR_P (_r2))
1441 443 : goto next_after_fail511;
1442 8 : _o1[1] = _r2;
1443 : }
1444 8 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1445 8 : res_op0 = _r1;
1446 : }
1447 8 : tree res_op1;
1448 8 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
1449 8 : tree _r;
1450 8 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1451 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 412, __FILE__, __LINE__, true);
1452 : return _r;
1453 : }
1454 : next_after_fail511:;
1455 : return NULL_TREE;
1456 : }
1457 :
1458 : tree
1459 39343 : generic_simplify_281 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1460 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1461 : const enum tree_code ARG_UNUSED (cmp))
1462 : {
1463 39343 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1464 39343 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail514;
1465 39343 : {
1466 39343 : tree res_op0;
1467 39343 : {
1468 39343 : tree _o1[2], _r1;
1469 39343 : {
1470 39343 : tree _o2[2], _r2;
1471 39343 : _o2[0] = captures[1];
1472 39343 : _o2[1] = captures[4];
1473 39343 : _r2 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1474 39343 : _o1[0] = _r2;
1475 : }
1476 39343 : _o1[1] = captures[2];
1477 39343 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1478 39343 : res_op0 = _r1;
1479 : }
1480 39343 : tree res_op1;
1481 39343 : res_op1 = build_zero_cst (TREE_TYPE (captures[2]));
1482 39343 : tree _r;
1483 39343 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1484 39343 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 415, __FILE__, __LINE__, true);
1485 : return _r;
1486 : }
1487 0 : next_after_fail514:;
1488 0 : return NULL_TREE;
1489 : }
1490 :
1491 : tree
1492 0 : generic_simplify_288 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1493 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1494 : const enum tree_code ARG_UNUSED (cmp))
1495 : {
1496 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1497 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail521;
1498 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail521;
1499 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail521;
1500 0 : {
1501 0 : tree res_op0;
1502 0 : res_op0 = captures[0];
1503 0 : tree res_op1;
1504 0 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
1505 0 : tree _r;
1506 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1507 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 420, __FILE__, __LINE__, true);
1508 : return _r;
1509 : }
1510 : next_after_fail521:;
1511 : return NULL_TREE;
1512 : }
1513 :
1514 : tree
1515 1104066 : generic_simplify_292 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1516 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1517 : const enum tree_code ARG_UNUSED (cmp))
1518 : {
1519 1104066 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1520 1680928 : if (((POINTER_TYPE_P (TREE_TYPE (captures[0]))
1521 529175 : && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[0])))
1522 490695 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1523 9963 : && !(
1524 : 1
1525 9843 : && TREE_CODE (TREE_TYPE (captures[0])) == REFERENCE_TYPE
1526 120 : && (flag_sanitize & (SANITIZE_NULL | SANITIZE_ALIGNMENT))))
1527 1094235 : || (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1528 574762 : && POINTER_TYPE_P (TREE_TYPE (captures[1]))
1529 2360 : && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[1])))))
1530 1115752 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == TYPE_PRECISION (TREE_TYPE (captures[1]))
1531 : )
1532 : {
1533 10534 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail539;
1534 10534 : {
1535 10534 : tree res_op0;
1536 10534 : res_op0 = captures[0];
1537 10534 : tree res_op1;
1538 10534 : {
1539 10534 : tree _o1[1], _r1;
1540 10534 : _o1[0] = captures[1];
1541 10534 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
1542 : {
1543 10534 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
1544 : }
1545 : else
1546 : _r1 = _o1[0];
1547 10534 : res_op1 = _r1;
1548 : }
1549 10534 : tree _r;
1550 10534 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1551 10534 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 430, __FILE__, __LINE__, true);
1552 10534 : return _r;
1553 : }
1554 0 : next_after_fail539:;
1555 : }
1556 : return NULL_TREE;
1557 : }
1558 :
1559 : tree
1560 590276 : generic_simplify_296 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1561 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1562 : const enum tree_code ARG_UNUSED (cmp),
1563 : const enum tree_code ARG_UNUSED (rcmp))
1564 : {
1565 590276 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1566 1180552 : if (!TREE_OVERFLOW (captures[0]) && !TREE_OVERFLOW (captures[2])
1567 1180552 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
1568 : )
1569 : {
1570 2967 : {
1571 2967 : tree res = int_const_binop (MINUS_EXPR, captures[0], captures[2]);
1572 2967 : if (TREE_OVERFLOW (res)
1573 : )
1574 : {
1575 48 : if (cmp == NE_EXPR
1576 : )
1577 : {
1578 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail548;
1579 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail548;
1580 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail548;
1581 0 : {
1582 0 : tree _r;
1583 0 : _r = constant_boolean_node (true, type);
1584 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1585 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1586 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 439, __FILE__, __LINE__, true);
1587 0 : return _r;
1588 : }
1589 : next_after_fail548:;
1590 : }
1591 : else
1592 : {
1593 48 : if (cmp == EQ_EXPR
1594 : )
1595 : {
1596 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail549;
1597 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail549;
1598 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail549;
1599 0 : {
1600 0 : tree _r;
1601 0 : _r = constant_boolean_node (false, type);
1602 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1603 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1604 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 440, __FILE__, __LINE__, true);
1605 0 : return _r;
1606 : }
1607 : next_after_fail549:;
1608 : }
1609 : else
1610 : {
1611 48 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail550;
1612 48 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail550;
1613 48 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail550;
1614 48 : {
1615 48 : tree _r;
1616 48 : bool less = cmp == LE_EXPR || cmp == LT_EXPR;
1617 48 : bool ovf_high = wi::lt_p (wi::to_wide (captures[0]), 0,
1618 48 : TYPE_SIGN (TREE_TYPE (captures[0]))); _r =
1619 48 : constant_boolean_node (less == ovf_high, type);
1620 48 : if (TREE_SIDE_EFFECTS (captures[1]))
1621 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1622 48 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 441, __FILE__, __LINE__, true);
1623 48 : return _r;
1624 : }
1625 : next_after_fail550:;
1626 : }
1627 : }
1628 : }
1629 : else
1630 : {
1631 2919 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail551;
1632 2919 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail551;
1633 2919 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail551;
1634 2919 : {
1635 2919 : tree res_op0;
1636 2919 : res_op0 = captures[1];
1637 2919 : tree res_op1;
1638 2919 : res_op1 = res;
1639 2919 : tree _r;
1640 2919 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
1641 2919 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 442, __FILE__, __LINE__, true);
1642 2919 : return _r;
1643 : }
1644 : next_after_fail551:;
1645 : }
1646 : }
1647 : }
1648 : else
1649 : {
1650 587309 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
1651 : )
1652 : {
1653 587215 : if (cmp == EQ_EXPR || cmp == NE_EXPR
1654 : )
1655 : {
1656 35939 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail552;
1657 35939 : {
1658 35939 : tree res_op0;
1659 35939 : res_op0 = captures[1];
1660 35939 : tree res_op1;
1661 35939 : {
1662 35939 : tree _o1[2], _r1;
1663 35939 : _o1[0] = captures[0];
1664 35939 : _o1[1] = captures[2];
1665 35939 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1666 35939 : res_op1 = _r1;
1667 : }
1668 35939 : tree _r;
1669 35939 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1670 35939 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 443, __FILE__, __LINE__, true);
1671 35939 : return _r;
1672 : }
1673 0 : next_after_fail552:;
1674 : }
1675 : else
1676 : {
1677 551276 : if (cmp == LE_EXPR || cmp == GT_EXPR
1678 : )
1679 : {
1680 551276 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail553;
1681 551276 : {
1682 551276 : if (! tree_invariant_p (captures[2])) goto next_after_fail553;
1683 551276 : tree res_op0;
1684 551276 : {
1685 551276 : tree _o1[2], _r1;
1686 551276 : _o1[0] = captures[1];
1687 551276 : {
1688 551276 : tree _o2[2], _r2;
1689 551276 : _o2[0] = unshare_expr (captures[2]);
1690 551276 : _o2[1] = captures[0];
1691 551276 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1692 551276 : _o1[1] = _r2;
1693 : }
1694 551276 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1695 551276 : res_op0 = _r1;
1696 : }
1697 551276 : tree res_op1;
1698 551276 : res_op1 = captures[2];
1699 551276 : tree _r;
1700 551276 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1701 551276 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 444, __FILE__, __LINE__, true);
1702 551276 : return _r;
1703 : }
1704 : next_after_fail553:;
1705 : }
1706 : else
1707 : {
1708 0 : if (cmp == LT_EXPR || cmp == GE_EXPR
1709 : )
1710 : {
1711 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail554;
1712 0 : {
1713 0 : if (! tree_invariant_p (captures[2])) goto next_after_fail554;
1714 0 : tree res_op0;
1715 0 : {
1716 0 : tree _o1[2], _r1;
1717 0 : _o1[0] = captures[1];
1718 0 : {
1719 0 : tree _o2[2], _r2;
1720 0 : _o2[0] = unshare_expr (captures[2]);
1721 0 : {
1722 0 : tree _o3[2], _r3;
1723 0 : _o3[0] = captures[0];
1724 0 : _o3[1] = build_one_cst (TREE_TYPE (captures[1]));
1725 0 : _r3 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
1726 0 : _o2[1] = _r3;
1727 : }
1728 0 : _r2 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1729 0 : _o1[1] = _r2;
1730 : }
1731 0 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1732 0 : res_op0 = _r1;
1733 : }
1734 0 : tree res_op1;
1735 0 : res_op1 = captures[2];
1736 0 : tree _r;
1737 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1738 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 445, __FILE__, __LINE__, true);
1739 0 : return _r;
1740 : }
1741 : next_after_fail554:;
1742 : }
1743 : }
1744 : }
1745 : }
1746 : else
1747 : {
1748 94 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[1]))
1749 94 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
1750 : )
1751 : {
1752 94 : if (cmp == EQ_EXPR || cmp == NE_EXPR
1753 : )
1754 : {
1755 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail555;
1756 0 : {
1757 0 : tree res_op0;
1758 0 : res_op0 = captures[1];
1759 0 : tree res_op1;
1760 0 : {
1761 0 : tree _o1[2], _r1;
1762 0 : _o1[0] = captures[0];
1763 0 : _o1[1] = captures[2];
1764 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1765 0 : res_op1 = _r1;
1766 : }
1767 0 : tree _r;
1768 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
1769 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 446, __FILE__, __LINE__, true);
1770 0 : return _r;
1771 : }
1772 0 : next_after_fail555:;
1773 : }
1774 : else
1775 : {
1776 94 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail556;
1777 94 : {
1778 94 : tree res_op0;
1779 94 : {
1780 94 : tree _o1[2], _r1;
1781 94 : _o1[0] = captures[1];
1782 94 : {
1783 94 : tree _o2[2], _r2;
1784 94 : _o2[0] = captures[0];
1785 94 : _o2[1] = build_one_cst (TREE_TYPE (captures[1]));
1786 94 : _r2 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1787 94 : _o1[1] = _r2;
1788 : }
1789 94 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1790 94 : res_op0 = _r1;
1791 : }
1792 94 : tree res_op1;
1793 94 : {
1794 94 : tree _o1[1], _r1;
1795 94 : _o1[0] = captures[2];
1796 94 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1797 94 : res_op1 = _r1;
1798 : }
1799 94 : tree _r;
1800 94 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
1801 94 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 447, __FILE__, __LINE__, true);
1802 94 : return _r;
1803 : }
1804 0 : next_after_fail556:;
1805 : }
1806 : }
1807 : }
1808 : }
1809 : return NULL_TREE;
1810 : }
1811 :
1812 : tree
1813 0 : generic_simplify_335 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1814 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1815 : {
1816 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1817 0 : if (SCALAR_FLOAT_TYPE_P (type)
1818 0 : && ! HONOR_NANS (type)
1819 0 : && ! HONOR_INFINITIES (type)
1820 : )
1821 : {
1822 0 : if (types_match (type, float_type_node)
1823 : )
1824 : {
1825 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail605;
1826 0 : {
1827 0 : tree res_op0;
1828 0 : res_op0 = build_one_cst (type);
1829 0 : tree res_op1;
1830 0 : {
1831 0 : tree _o1[1], _r1;
1832 0 : _o1[0] = captures[0];
1833 0 : if (TREE_TYPE (_o1[0]) != type)
1834 : {
1835 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1836 : }
1837 : else
1838 : _r1 = _o1[0];
1839 0 : res_op1 = _r1;
1840 : }
1841 0 : tree _r;
1842 0 : _r = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_COPYSIGNF, type, 2, res_op0, res_op1);
1843 0 : if (!_r)
1844 0 : goto next_after_fail605;
1845 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 494, __FILE__, __LINE__, true);
1846 0 : return _r;
1847 : }
1848 : next_after_fail605:;
1849 : }
1850 : else
1851 : {
1852 0 : if (types_match (type, double_type_node)
1853 : )
1854 : {
1855 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail606;
1856 0 : {
1857 0 : tree res_op0;
1858 0 : res_op0 = build_one_cst (type);
1859 0 : tree res_op1;
1860 0 : {
1861 0 : tree _o1[1], _r1;
1862 0 : _o1[0] = captures[0];
1863 0 : if (TREE_TYPE (_o1[0]) != type)
1864 : {
1865 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1866 : }
1867 : else
1868 : _r1 = _o1[0];
1869 0 : res_op1 = _r1;
1870 : }
1871 0 : tree _r;
1872 0 : _r = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_COPYSIGN, type, 2, res_op0, res_op1);
1873 0 : if (!_r)
1874 0 : goto next_after_fail606;
1875 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 495, __FILE__, __LINE__, true);
1876 0 : return _r;
1877 : }
1878 : next_after_fail606:;
1879 : }
1880 : else
1881 : {
1882 0 : if (types_match (type, long_double_type_node)
1883 : )
1884 : {
1885 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail607;
1886 0 : {
1887 0 : tree res_op0;
1888 0 : res_op0 = build_one_cst (type);
1889 0 : tree res_op1;
1890 0 : {
1891 0 : tree _o1[1], _r1;
1892 0 : _o1[0] = captures[0];
1893 0 : if (TREE_TYPE (_o1[0]) != type)
1894 : {
1895 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1896 : }
1897 : else
1898 : _r1 = _o1[0];
1899 0 : res_op1 = _r1;
1900 : }
1901 0 : tree _r;
1902 0 : _r = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_COPYSIGNL, type, 2, res_op0, res_op1);
1903 0 : if (!_r)
1904 0 : goto next_after_fail607;
1905 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 496, __FILE__, __LINE__, true);
1906 0 : return _r;
1907 : }
1908 : next_after_fail607:;
1909 : }
1910 : }
1911 : }
1912 : }
1913 : return NULL_TREE;
1914 : }
1915 :
1916 : tree
1917 0 : generic_simplify_355 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1918 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1919 : const enum tree_code ARG_UNUSED (op))
1920 : {
1921 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1922 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail633;
1923 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail633;
1924 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail633;
1925 0 : {
1926 0 : tree _r;
1927 0 : _r = captures[2];
1928 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 522, __FILE__, __LINE__, true);
1929 : return _r;
1930 : }
1931 : next_after_fail633:;
1932 : return NULL_TREE;
1933 : }
1934 :
1935 : tree
1936 0 : generic_simplify_360 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1937 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
1938 : {
1939 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1940 0 : if (INTEGRAL_TYPE_P (type)
1941 : )
1942 : {
1943 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail638;
1944 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail638;
1945 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail638;
1946 0 : {
1947 0 : tree _r;
1948 0 : _r = captures[2];
1949 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 527, __FILE__, __LINE__, true);
1950 0 : return _r;
1951 : }
1952 : next_after_fail638:;
1953 : }
1954 : return NULL_TREE;
1955 : }
1956 :
1957 : tree
1958 0 : generic_simplify_367 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1959 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1960 : const enum tree_code ARG_UNUSED (op))
1961 : {
1962 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1963 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail645;
1964 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail645;
1965 0 : {
1966 0 : tree _r;
1967 0 : _r = captures[2];
1968 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 534, __FILE__, __LINE__, true);
1969 : return _r;
1970 : }
1971 : next_after_fail645:;
1972 : return NULL_TREE;
1973 : }
1974 :
1975 : tree
1976 3 : generic_simplify_373 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1977 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
1978 : const combined_fn ARG_UNUSED (func))
1979 : {
1980 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1981 3 : if (wi::to_widest (captures[4]) == TYPE_PRECISION (TREE_TYPE (captures[3])) - 1
1982 : )
1983 : {
1984 3 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail652;
1985 3 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail652;
1986 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail652;
1987 3 : {
1988 3 : tree _r;
1989 3 : _r = captures[2];
1990 3 : if (TREE_SIDE_EFFECTS (captures[1]))
1991 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1992 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 540, __FILE__, __LINE__, true);
1993 3 : return _r;
1994 : }
1995 : next_after_fail652:;
1996 : }
1997 : return NULL_TREE;
1998 : }
1999 :
2000 : tree
2001 163391 : generic_simplify_381 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2002 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2003 : const enum tree_code ARG_UNUSED (op))
2004 : {
2005 163391 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2006 326782 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2007 326782 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
2008 : )
2009 : {
2010 68883 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail664;
2011 68883 : {
2012 68883 : tree res_op0;
2013 68883 : res_op0 = captures[0];
2014 68883 : tree res_op1;
2015 68883 : res_op1 = captures[2];
2016 68883 : tree _r;
2017 68883 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2018 68883 : if (TREE_SIDE_EFFECTS (captures[1]))
2019 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2020 68883 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 551, __FILE__, __LINE__, true);
2021 68883 : return _r;
2022 : }
2023 0 : next_after_fail664:;
2024 : }
2025 : return NULL_TREE;
2026 : }
2027 :
2028 : tree
2029 5312 : generic_simplify_386 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2030 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2031 : const enum tree_code ARG_UNUSED (cmp),
2032 : const enum tree_code ARG_UNUSED (bitop))
2033 : {
2034 5312 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2035 5312 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2036 : )
2037 : {
2038 5312 : if (bitop == BIT_AND_EXPR || tree_expr_nonnegative_p (captures[1])
2039 : )
2040 : {
2041 5312 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail669;
2042 5312 : {
2043 5312 : tree _r;
2044 5312 : _r = constant_boolean_node (cmp == GE_EXPR || cmp == LE_EXPR, type);
2045 5312 : if (TREE_SIDE_EFFECTS (captures[0]))
2046 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2047 5312 : if (TREE_SIDE_EFFECTS (captures[1]))
2048 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2049 5312 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 556, __FILE__, __LINE__, true);
2050 5312 : return _r;
2051 : }
2052 0 : next_after_fail669:;
2053 : }
2054 : else
2055 : {
2056 0 : if (TREE_CODE (captures[1]) == INTEGER_CST && wi::neg_p (wi::to_wide (captures[1]))
2057 : )
2058 : {
2059 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail670;
2060 0 : {
2061 0 : tree _r;
2062 0 : _r = constant_boolean_node (cmp == LT_EXPR, type);
2063 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2064 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2065 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2066 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2067 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 557, __FILE__, __LINE__, true);
2068 0 : return _r;
2069 : }
2070 0 : next_after_fail670:;
2071 : }
2072 : }
2073 : }
2074 : return NULL_TREE;
2075 : }
2076 :
2077 : tree
2078 2 : generic_simplify_400 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2079 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2080 : const enum tree_code ARG_UNUSED (cmp))
2081 : {
2082 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2083 4 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2084 4 : && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2085 : )
2086 : {
2087 2 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail716;
2088 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail716;
2089 2 : {
2090 2 : tree res_op0;
2091 2 : res_op0 = captures[1];
2092 2 : tree res_op1;
2093 2 : res_op1 = captures[0];
2094 2 : tree _r;
2095 2 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2096 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 586, __FILE__, __LINE__, true);
2097 2 : return _r;
2098 : }
2099 : next_after_fail716:;
2100 : }
2101 : return NULL_TREE;
2102 : }
2103 :
2104 : tree
2105 2476861 : generic_simplify_405 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2106 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2107 : const enum tree_code ARG_UNUSED (op),
2108 : const enum tree_code ARG_UNUSED (rop),
2109 : const enum tree_code ARG_UNUSED (cmp),
2110 : const enum tree_code ARG_UNUSED (rcmp))
2111 : {
2112 2476861 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2113 4953708 : if (!TREE_OVERFLOW (captures[2]) && !TREE_OVERFLOW (captures[3])
2114 4953696 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
2115 : )
2116 : {
2117 889054 : {
2118 889054 : tree res = int_const_binop (rop, captures[3], captures[2]);
2119 889054 : if (TREE_OVERFLOW (res)
2120 : )
2121 : {
2122 13084 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail722;
2123 13084 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail722;
2124 13084 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail722;
2125 13084 : {
2126 13084 : tree _r;
2127 13084 : bool less = cmp == LE_EXPR || cmp == LT_EXPR;
2128 13084 : bool ovf_high = wi::lt_p (wi::to_wide (captures[2]), 0,
2129 13084 : TYPE_SIGN (TREE_TYPE (captures[2])))
2130 13084 : != (op == MINUS_EXPR); _r =
2131 13084 : constant_boolean_node (less == ovf_high, type);
2132 13084 : if (TREE_SIDE_EFFECTS (captures[1]))
2133 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2134 13084 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 592, __FILE__, __LINE__, true);
2135 13084 : return _r;
2136 : }
2137 : next_after_fail722:;
2138 : }
2139 : else
2140 : {
2141 875970 : if (single_use (captures[0])
2142 : )
2143 : {
2144 875970 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail723;
2145 875970 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail723;
2146 875970 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail723;
2147 875970 : {
2148 875970 : tree res_op0;
2149 875970 : res_op0 = captures[1];
2150 875970 : tree res_op1;
2151 875970 : res_op1 = res;
2152 875970 : tree _r;
2153 875970 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2154 875970 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 593, __FILE__, __LINE__, true);
2155 875970 : return _r;
2156 : }
2157 : next_after_fail723:;
2158 : }
2159 : }
2160 : }
2161 : }
2162 : else
2163 : {
2164 1587807 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
2165 : )
2166 : {
2167 1587682 : {
2168 1587682 : wide_int max = wi::max_value (TREE_TYPE (captures[1]));
2169 1587682 : wide_int min = wi::min_value (TREE_TYPE (captures[1]));
2170 1587682 : wide_int c2 = rop == PLUS_EXPR
2171 1587682 : ? wi::add (wi::to_wide (captures[3]), wi::to_wide (captures[2]))
2172 1587682 : : wi::sub (wi::to_wide (captures[3]), wi::to_wide (captures[2]));
2173 1516465 : if (((cmp == LE_EXPR || cmp == GT_EXPR) && wi::eq_p (c2, max))
2174 3088586 : || ((cmp == LT_EXPR || cmp == GE_EXPR) && wi::eq_p (c2, min))
2175 : )
2176 : {
2177 15719 : {
2178 15719 : wide_int c1 = rop == PLUS_EXPR
2179 15719 : ? wi::add (wi::bit_not (c2), wi::to_wide (captures[2]))
2180 31438 : : wi::sub (wi::bit_not (c2), wi::to_wide (captures[2]));
2181 15719 : tree c1_cst = wide_int_to_tree (TREE_TYPE (captures[1]), c1);
2182 15719 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail724;
2183 15719 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail724;
2184 15719 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail724;
2185 15719 : {
2186 15719 : tree res_op0;
2187 15719 : res_op0 = captures[1];
2188 15719 : tree res_op1;
2189 15719 : res_op1 = c1_cst;
2190 15719 : tree _r;
2191 15719 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
2192 15719 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 594, __FILE__, __LINE__, true);
2193 15719 : return _r;
2194 : }
2195 0 : next_after_fail724:;
2196 15719 : }
2197 : }
2198 1587684 : }
2199 : }
2200 : }
2201 : return NULL_TREE;
2202 : }
2203 :
2204 : tree
2205 11 : generic_simplify_422 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2206 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2207 : {
2208 11 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2209 11 : if (wi::ltu_p (wi::to_wide (captures[1]), element_precision (type))
2210 : )
2211 : {
2212 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail749;
2213 11 : {
2214 11 : tree res_op0;
2215 11 : {
2216 11 : tree _o1[1], _r1;
2217 11 : _o1[0] = captures[0];
2218 11 : if (TREE_TYPE (_o1[0]) != type)
2219 : {
2220 8 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
2221 : }
2222 : else
2223 : _r1 = _o1[0];
2224 11 : res_op0 = _r1;
2225 : }
2226 11 : tree res_op1;
2227 11 : {
2228 11 : tree _o1[2], _r1;
2229 11 : _o1[0] = build_minus_one_cst (type);
2230 11 : _o1[1] = captures[1];
2231 11 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2232 11 : res_op1 = _r1;
2233 : }
2234 11 : tree _r;
2235 11 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2236 11 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 615, __FILE__, __LINE__, true);
2237 11 : return _r;
2238 : }
2239 0 : next_after_fail749:;
2240 : }
2241 : return NULL_TREE;
2242 : }
2243 :
2244 : tree
2245 67 : generic_simplify_430 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2246 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2247 : {
2248 67 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2249 67 : if (wi::ltu_p (wi::to_wide (captures[1]), element_precision (type))
2250 : )
2251 : {
2252 67 : if (TYPE_UNSIGNED (type)
2253 : )
2254 : {
2255 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail760;
2256 2 : {
2257 2 : tree res_op0;
2258 2 : {
2259 2 : tree _o1[1], _r1;
2260 2 : _o1[0] = captures[0];
2261 2 : if (TREE_TYPE (_o1[0]) != type)
2262 : {
2263 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2264 : }
2265 : else
2266 : _r1 = _o1[0];
2267 2 : res_op0 = _r1;
2268 : }
2269 2 : tree res_op1;
2270 2 : {
2271 2 : tree _o1[2], _r1;
2272 2 : _o1[0] = build_minus_one_cst (type);
2273 2 : _o1[1] = captures[1];
2274 2 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2275 2 : res_op1 = _r1;
2276 : }
2277 2 : tree _r;
2278 2 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2279 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 624, __FILE__, __LINE__, true);
2280 2 : return _r;
2281 : }
2282 0 : next_after_fail760:;
2283 : }
2284 : else
2285 : {
2286 65 : if (INTEGRAL_TYPE_P (type)
2287 : )
2288 : {
2289 65 : {
2290 65 : int width = element_precision (type) - tree_to_uhwi (captures[1]);
2291 65 : tree stype = NULL_TREE;
2292 130 : if (width <= MAX_FIXED_MODE_SIZE)
2293 65 : stype = build_nonstandard_integer_type (width, 0);
2294 65 : if (stype && (width == 1 || type_has_mode_precision_p (stype))
2295 : )
2296 : {
2297 25 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail761;
2298 25 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail761;
2299 25 : {
2300 25 : tree res_op0;
2301 25 : {
2302 25 : tree _o1[1], _r1;
2303 25 : _o1[0] = captures[0];
2304 25 : if (TREE_TYPE (_o1[0]) != stype)
2305 : {
2306 25 : _r1 = fold_build1_loc (loc, NOP_EXPR, stype, _o1[0]);
2307 : }
2308 : else
2309 : _r1 = _o1[0];
2310 25 : res_op0 = _r1;
2311 : }
2312 25 : tree _r;
2313 25 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2314 25 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 625, __FILE__, __LINE__, true);
2315 25 : return _r;
2316 : }
2317 : next_after_fail761:;
2318 : }
2319 : }
2320 : }
2321 : }
2322 : }
2323 : return NULL_TREE;
2324 : }
2325 :
2326 : tree
2327 881147 : generic_simplify_437 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2328 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
2329 : const enum tree_code ARG_UNUSED (op))
2330 : {
2331 881147 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2332 881147 : if (INTEGRAL_TYPE_P (type)
2333 772909 : && op != MULT_EXPR
2334 772909 : && op != RDIV_EXPR
2335 420200 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2336 359497 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2337 359497 : && type_has_mode_precision_p (TREE_TYPE (captures[2]))
2338 310198 : && type_has_mode_precision_p (TREE_TYPE (captures[4]))
2339 309915 : && type_has_mode_precision_p (type)
2340 309893 : && TYPE_PRECISION (TREE_TYPE (captures[1])) > TYPE_PRECISION (TREE_TYPE (captures[2]))
2341 24266 : && types_match (captures[2], type)
2342 883848 : && (types_match (captures[2], captures[4])
2343 2632 : || poly_int_tree_p (captures[3]))
2344 : )
2345 : {
2346 69 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
2347 : )
2348 : {
2349 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail773;
2350 15 : {
2351 15 : tree res_op0;
2352 15 : res_op0 = captures[2];
2353 15 : tree res_op1;
2354 15 : {
2355 15 : tree _o1[1], _r1;
2356 15 : _o1[0] = captures[4];
2357 15 : if (TREE_TYPE (_o1[0]) != type)
2358 : {
2359 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2360 : }
2361 : else
2362 : _r1 = _o1[0];
2363 15 : res_op1 = _r1;
2364 : }
2365 15 : tree _r;
2366 15 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2367 15 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 637, __FILE__, __LINE__, true);
2368 15 : return _r;
2369 : }
2370 0 : next_after_fail773:;
2371 : }
2372 : else
2373 : {
2374 54 : {
2375 54 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
2376 54 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail774;
2377 54 : {
2378 54 : tree res_op0;
2379 54 : {
2380 54 : tree _o1[2], _r1;
2381 54 : {
2382 54 : tree _o2[1], _r2;
2383 54 : _o2[0] = captures[2];
2384 54 : if (TREE_TYPE (_o2[0]) != utype)
2385 : {
2386 54 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2387 : }
2388 : else
2389 : _r2 = _o2[0];
2390 54 : _o1[0] = _r2;
2391 : }
2392 54 : {
2393 54 : tree _o2[1], _r2;
2394 54 : _o2[0] = captures[4];
2395 54 : if (TREE_TYPE (_o2[0]) != utype)
2396 : {
2397 54 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
2398 : }
2399 : else
2400 : _r2 = _o2[0];
2401 54 : _o1[1] = _r2;
2402 : }
2403 54 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2404 54 : res_op0 = _r1;
2405 : }
2406 54 : tree _r;
2407 54 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2408 54 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 638, __FILE__, __LINE__, true);
2409 54 : return _r;
2410 : }
2411 0 : next_after_fail774:;
2412 : }
2413 : }
2414 : }
2415 : else
2416 : {
2417 868598 : if (FLOAT_TYPE_P (type)
2418 893558 : && DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
2419 12480 : == DECIMAL_FLOAT_TYPE_P (type)
2420 : )
2421 : {
2422 12457 : {
2423 12457 : tree arg0 = strip_float_extensions (captures[2]);
2424 12457 : tree arg1 = strip_float_extensions (captures[4]);
2425 12457 : tree itype = TREE_TYPE (captures[0]);
2426 12457 : tree ty1 = TREE_TYPE (arg0);
2427 12457 : tree ty2 = TREE_TYPE (arg1);
2428 12457 : enum tree_code code = TREE_CODE (itype);
2429 0 : if (FLOAT_TYPE_P (ty1)
2430 12457 : && FLOAT_TYPE_P (ty2)
2431 : )
2432 : {
2433 12457 : {
2434 12457 : tree newtype = type;
2435 12457 : if (TYPE_MODE (ty1) == SDmode
2436 12448 : || TYPE_MODE (ty2) == SDmode
2437 24905 : || TYPE_MODE (type) == SDmode)
2438 9 : newtype = dfloat32_type_node;
2439 12457 : if (TYPE_MODE (ty1) == DDmode
2440 12451 : || TYPE_MODE (ty2) == DDmode
2441 24908 : || TYPE_MODE (type) == DDmode)
2442 6 : newtype = dfloat64_type_node;
2443 12457 : if (TYPE_MODE (ty1) == TDmode
2444 12457 : || TYPE_MODE (ty2) == TDmode
2445 24914 : || TYPE_MODE (type) == TDmode)
2446 15 : newtype = dfloat128_type_node;
2447 12457 : if ((newtype == dfloat32_type_node
2448 12457 : || newtype == dfloat64_type_node
2449 12457 : || newtype == dfloat128_type_node)
2450 15 : && newtype == type
2451 12463 : && types_match (newtype, type)
2452 : )
2453 : {
2454 6 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail775;
2455 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail775;
2456 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail775;
2457 0 : {
2458 0 : tree res_op0;
2459 0 : {
2460 0 : tree _o1[1], _r1;
2461 0 : _o1[0] = captures[2];
2462 0 : if (TREE_TYPE (_o1[0]) != newtype)
2463 : {
2464 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
2465 : }
2466 : else
2467 : _r1 = _o1[0];
2468 0 : res_op0 = _r1;
2469 : }
2470 0 : tree res_op1;
2471 0 : {
2472 0 : tree _o1[1], _r1;
2473 0 : _o1[0] = captures[4];
2474 0 : if (TREE_TYPE (_o1[0]) != newtype)
2475 : {
2476 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
2477 : }
2478 : else
2479 : _r1 = _o1[0];
2480 0 : res_op1 = _r1;
2481 : }
2482 0 : tree _r;
2483 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2484 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 639, __FILE__, __LINE__, true);
2485 0 : return _r;
2486 : }
2487 : next_after_fail775:;
2488 : }
2489 : else
2490 : {
2491 12451 : {
2492 12451 : if (element_precision (ty1) > element_precision (newtype))
2493 4 : newtype = ty1;
2494 12451 : if (element_precision (ty2) > element_precision (newtype))
2495 2 : newtype = ty2;
2496 12451 : if (element_precision (newtype) < element_precision (itype)
2497 12204 : && (!VECTOR_MODE_P (TYPE_MODE (newtype))
2498 0 : || target_supports_op_p (newtype, op, optab_default))
2499 12204 : && (flag_unsafe_math_optimizations
2500 12187 : || (element_precision (newtype) == element_precision (type)
2501 12183 : && real_can_shorten_arithmetic (element_mode (itype),
2502 : element_mode (type))
2503 4416 : && !excess_precision_type (newtype)))
2504 12476 : && !types_match (itype, newtype)
2505 : )
2506 : {
2507 25 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail776;
2508 25 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail776;
2509 17 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail776;
2510 17 : {
2511 17 : tree res_op0;
2512 17 : {
2513 17 : tree _o1[2], _r1;
2514 17 : {
2515 17 : tree _o2[1], _r2;
2516 17 : _o2[0] = captures[2];
2517 17 : if (TREE_TYPE (_o2[0]) != newtype)
2518 : {
2519 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
2520 : }
2521 : else
2522 : _r2 = _o2[0];
2523 17 : _o1[0] = _r2;
2524 : }
2525 17 : {
2526 17 : tree _o2[1], _r2;
2527 17 : _o2[0] = captures[4];
2528 17 : if (TREE_TYPE (_o2[0]) != newtype)
2529 : {
2530 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
2531 : }
2532 : else
2533 : _r2 = _o2[0];
2534 17 : _o1[1] = _r2;
2535 : }
2536 17 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2537 17 : res_op0 = _r1;
2538 : }
2539 17 : tree _r;
2540 17 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2541 17 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 640, __FILE__, __LINE__, true);
2542 17 : return _r;
2543 : }
2544 : next_after_fail776:;
2545 : }
2546 : }
2547 : }
2548 : }
2549 : }
2550 : }
2551 : }
2552 : }
2553 : return NULL_TREE;
2554 : }
2555 :
2556 : tree
2557 104 : generic_simplify_468 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2558 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2559 : {
2560 104 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2561 104 : {
2562 104 : bool wascmp;
2563 104 : if (bitwise_inverted_equal_p (captures[0], captures[2], wascmp)
2564 104 : && (!wascmp || element_precision (type) == 1)
2565 : )
2566 : {
2567 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail816;
2568 0 : {
2569 0 : tree res_op0;
2570 0 : res_op0 = captures[0];
2571 0 : tree res_op1;
2572 0 : res_op1 = captures[1];
2573 0 : tree _r;
2574 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2575 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2576 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2577 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 667, __FILE__, __LINE__, true);
2578 0 : return _r;
2579 : }
2580 0 : next_after_fail816:;
2581 : }
2582 : }
2583 104 : return NULL_TREE;
2584 : }
2585 :
2586 : tree
2587 8 : generic_simplify_475 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2588 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2589 : const enum tree_code ARG_UNUSED (eqne))
2590 : {
2591 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2592 8 : if (eqne == EQ_EXPR
2593 : )
2594 : {
2595 4 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail823;
2596 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail823;
2597 4 : {
2598 4 : tree _r;
2599 4 : _r = constant_boolean_node (false, type);
2600 4 : if (TREE_SIDE_EFFECTS (captures[2]))
2601 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2602 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 673, __FILE__, __LINE__, true);
2603 4 : return _r;
2604 : }
2605 : next_after_fail823:;
2606 : }
2607 : else
2608 : {
2609 4 : if (eqne == NE_EXPR
2610 : )
2611 : {
2612 4 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail824;
2613 4 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail824;
2614 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail824;
2615 4 : {
2616 4 : tree _r;
2617 4 : _r = captures[0];
2618 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 674, __FILE__, __LINE__, true);
2619 4 : return _r;
2620 : }
2621 : next_after_fail824:;
2622 : }
2623 : }
2624 : return NULL_TREE;
2625 : }
2626 :
2627 : tree
2628 3 : generic_simplify_486 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2629 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
2630 : {
2631 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2632 6 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2633 6 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
2634 : )
2635 : {
2636 3 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail868;
2637 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail868;
2638 3 : {
2639 3 : tree res_op0;
2640 3 : res_op0 = captures[3];
2641 3 : tree res_op1;
2642 3 : {
2643 3 : tree _o1[2], _r1;
2644 3 : _o1[0] = captures[1];
2645 3 : _o1[1] = build_int_cst (TREE_TYPE (captures[1]), 1);
2646 3 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2647 3 : res_op1 = _r1;
2648 : }
2649 3 : tree _r;
2650 3 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
2651 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 693, __FILE__, __LINE__, true);
2652 3 : return _r;
2653 : }
2654 : next_after_fail868:;
2655 : }
2656 : return NULL_TREE;
2657 : }
2658 :
2659 : tree
2660 34630 : generic_simplify_493 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2661 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2662 : const enum tree_code ARG_UNUSED (shift))
2663 : {
2664 34630 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2665 34630 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
2666 22392 : && TYPE_PRECISION (type) <= HOST_BITS_PER_WIDE_INT
2667 22392 : && tree_fits_uhwi_p (captures[4])
2668 22392 : && tree_to_uhwi (captures[4]) > 0
2669 57022 : && tree_to_uhwi (captures[4]) < TYPE_PRECISION (type)
2670 : )
2671 : {
2672 22392 : {
2673 22392 : unsigned int shiftc = tree_to_uhwi (captures[4]);
2674 22392 : unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (captures[5]);
2675 22392 : unsigned HOST_WIDE_INT newmask, zerobits = 0;
2676 22392 : tree shift_type = TREE_TYPE (captures[2]);
2677 22392 : unsigned int prec;
2678 22392 : if (shift == LSHIFT_EXPR)
2679 0 : zerobits = ((HOST_WIDE_INT_1U << shiftc) - 1);
2680 22392 : else if (shift == RSHIFT_EXPR
2681 22392 : && type_has_mode_precision_p (shift_type))
2682 : {
2683 22392 : prec = TYPE_PRECISION (TREE_TYPE (captures[2]));
2684 22392 : tree arg00 = captures[3];
2685 22392 : if (captures[2] != captures[3]
2686 22392 : && TYPE_UNSIGNED (TREE_TYPE (captures[3])))
2687 : {
2688 21985 : tree inner_type = TREE_TYPE (captures[3]);
2689 21985 : if (type_has_mode_precision_p (inner_type)
2690 21985 : && TYPE_PRECISION (inner_type) < prec)
2691 : {
2692 34 : prec = TYPE_PRECISION (inner_type);
2693 34 : if (shiftc < prec)
2694 34 : shift_type = inner_type;
2695 : }
2696 : }
2697 22392 : zerobits = HOST_WIDE_INT_M1U;
2698 22392 : if (shiftc < prec)
2699 : {
2700 22392 : zerobits >>= HOST_BITS_PER_WIDE_INT - shiftc;
2701 22392 : zerobits <<= prec - shiftc;
2702 : }
2703 22392 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[2]))
2704 22392 : && prec == TYPE_PRECISION (TREE_TYPE (captures[2])))
2705 : {
2706 73 : if ((mask & zerobits) == 0)
2707 59 : shift_type = unsigned_type_for (TREE_TYPE (captures[2]));
2708 : else
2709 : zerobits = 0;
2710 : }
2711 : }
2712 22378 : if ((mask & zerobits) == mask
2713 : )
2714 : {
2715 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail879;
2716 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail879;
2717 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail879;
2718 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail879;
2719 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail879;
2720 0 : {
2721 0 : tree _r;
2722 0 : _r = build_int_cst (type, 0);
2723 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 695, __FILE__, __LINE__, true);
2724 0 : return _r;
2725 : }
2726 : next_after_fail879:;
2727 : }
2728 : else
2729 : {
2730 22392 : {
2731 22392 : newmask = mask | zerobits;
2732 22392 : if (newmask != mask && (newmask & (newmask + 1)) == 0
2733 : )
2734 : {
2735 : {
2736 65 : for (prec = BITS_PER_UNIT;
2737 122 : prec < HOST_BITS_PER_WIDE_INT; prec <<= 1)
2738 118 : if (newmask == (HOST_WIDE_INT_1U << prec) - 1)
2739 : break;
2740 57 : if (prec < HOST_BITS_PER_WIDE_INT
2741 4 : || newmask == HOST_WIDE_INT_M1U
2742 : )
2743 : {
2744 57 : {
2745 57 : tree newmaskt = build_int_cst_type (TREE_TYPE (captures[5]), newmask);
2746 57 : if (!tree_int_cst_equal (newmaskt, captures[5])
2747 : )
2748 : {
2749 57 : if (shift_type != TREE_TYPE (captures[2])
2750 : )
2751 : {
2752 47 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail880;
2753 47 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail880;
2754 47 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail880;
2755 47 : {
2756 47 : tree res_op0;
2757 47 : {
2758 47 : tree _o1[1], _r1;
2759 47 : {
2760 47 : tree _o2[2], _r2;
2761 47 : {
2762 47 : tree _o3[1], _r3;
2763 47 : _o3[0] = captures[2];
2764 47 : if (TREE_TYPE (_o3[0]) != shift_type)
2765 : {
2766 47 : _r3 = fold_build1_loc (loc, NOP_EXPR, shift_type, _o3[0]);
2767 : }
2768 : else
2769 : _r3 = _o3[0];
2770 47 : _o2[0] = _r3;
2771 : }
2772 47 : _o2[1] = captures[4];
2773 47 : _r2 = fold_build2_loc (loc, shift, shift_type, _o2[0], _o2[1]);
2774 47 : _o1[0] = _r2;
2775 : }
2776 47 : if (TREE_TYPE (_o1[0]) != type)
2777 : {
2778 47 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2779 : }
2780 : else
2781 : _r1 = _o1[0];
2782 47 : res_op0 = _r1;
2783 : }
2784 47 : tree res_op1;
2785 47 : res_op1 = newmaskt;
2786 47 : tree _r;
2787 47 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2788 47 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 696, __FILE__, __LINE__, true);
2789 47 : return _r;
2790 : }
2791 : next_after_fail880:;
2792 : }
2793 : else
2794 : {
2795 10 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail881;
2796 10 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail881;
2797 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail881;
2798 10 : {
2799 10 : tree res_op0;
2800 10 : res_op0 = captures[0];
2801 10 : tree res_op1;
2802 10 : res_op1 = newmaskt;
2803 10 : tree _r;
2804 10 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2805 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 697, __FILE__, __LINE__, true);
2806 10 : return _r;
2807 : }
2808 : next_after_fail881:;
2809 : }
2810 : }
2811 : }
2812 : }
2813 : }
2814 : }
2815 : }
2816 : }
2817 : }
2818 : }
2819 : return NULL_TREE;
2820 : }
2821 :
2822 : tree
2823 108 : generic_simplify_503 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2824 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
2825 : {
2826 108 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2827 108 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail895;
2828 108 : {
2829 108 : tree res_op0;
2830 108 : res_op0 = captures[1];
2831 108 : tree res_op1;
2832 108 : {
2833 108 : tree _o1[1], _r1;
2834 108 : _o1[0] = captures[2];
2835 108 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2836 108 : res_op1 = _r1;
2837 : }
2838 108 : tree _r;
2839 108 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
2840 108 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 707, __FILE__, __LINE__, true);
2841 : return _r;
2842 : }
2843 0 : next_after_fail895:;
2844 0 : return NULL_TREE;
2845 : }
2846 :
2847 : tree
2848 29 : generic_simplify_509 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2849 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
2850 : {
2851 29 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2852 29 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
2853 : )
2854 : {
2855 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail901;
2856 29 : {
2857 29 : tree res_op0;
2858 29 : {
2859 29 : tree _o1[2], _r1;
2860 29 : _o1[0] = captures[0];
2861 29 : {
2862 29 : tree _o2[1], _r2;
2863 29 : _o2[0] = captures[1];
2864 29 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
2865 29 : _o1[1] = _r2;
2866 : }
2867 29 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2868 29 : res_op0 = _r1;
2869 : }
2870 29 : tree _r;
2871 29 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2872 29 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 713, __FILE__, __LINE__, true);
2873 29 : return _r;
2874 : }
2875 0 : next_after_fail901:;
2876 : }
2877 : return NULL_TREE;
2878 : }
2879 :
2880 : tree
2881 16 : generic_simplify_517 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2882 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures))
2883 : {
2884 16 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2885 16 : if (ANY_INTEGRAL_TYPE_P (type) && !TYPE_OVERFLOW_SANITIZED (type)
2886 : )
2887 : {
2888 16 : {
2889 16 : tree ptrdifftype = TREE_TYPE (captures[0]);
2890 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail910;
2891 16 : {
2892 16 : tree res_op0;
2893 16 : {
2894 16 : tree _o1[2], _r1;
2895 16 : _o1[0] = captures[2];
2896 16 : _o1[1] = captures[1];
2897 16 : _r1 = fold_build2_loc (loc, POINTER_DIFF_EXPR, ptrdifftype, _o1[0], _o1[1]);
2898 16 : res_op0 = _r1;
2899 : }
2900 16 : tree _r;
2901 16 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2902 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 720, __FILE__, __LINE__, true);
2903 16 : return _r;
2904 : }
2905 0 : next_after_fail910:;
2906 : }
2907 : }
2908 : return NULL_TREE;
2909 : }
2910 :
2911 : tree
2912 0 : generic_simplify_524 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2913 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2914 : const enum tree_code ARG_UNUSED (minmax))
2915 : {
2916 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2917 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail918;
2918 0 : {
2919 0 : tree _r;
2920 0 : _r = captures[0];
2921 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 728, __FILE__, __LINE__, true);
2922 : return _r;
2923 : }
2924 0 : next_after_fail918:;
2925 0 : return NULL_TREE;
2926 : }
2927 :
2928 : tree
2929 1 : generic_simplify_529 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2930 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2931 : const enum tree_code ARG_UNUSED (minmax))
2932 : {
2933 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2934 1 : if (INTEGRAL_TYPE_P (type)
2935 1 : && TYPE_OVERFLOW_UNDEFINED (type)
2936 2 : && !TYPE_OVERFLOW_SANITIZED (type)
2937 : )
2938 : {
2939 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail923;
2940 1 : {
2941 1 : tree res_op0;
2942 1 : {
2943 1 : tree _o1[2], _r1;
2944 1 : _o1[0] = captures[1];
2945 1 : _o1[1] = captures[4];
2946 1 : _r1 = fold_build2_loc (loc, minmax, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2947 1 : res_op0 = _r1;
2948 : }
2949 1 : tree res_op1;
2950 1 : res_op1 = captures[2];
2951 1 : tree _r;
2952 1 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
2953 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 732, __FILE__, __LINE__, true);
2954 1 : return _r;
2955 : }
2956 0 : next_after_fail923:;
2957 : }
2958 : return NULL_TREE;
2959 : }
2960 :
2961 : tree
2962 2 : generic_simplify_538 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2963 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2964 : const enum tree_code ARG_UNUSED (op),
2965 : const enum tree_code ARG_UNUSED (logic))
2966 : {
2967 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2968 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail946;
2969 2 : {
2970 2 : tree res_op0;
2971 2 : res_op0 = captures[0];
2972 2 : tree res_op1;
2973 2 : res_op1 = captures[1];
2974 2 : tree _r;
2975 2 : _r = fold_build2_loc (loc, logic, type, res_op0, res_op1);
2976 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 743, __FILE__, __LINE__, true);
2977 : return _r;
2978 : }
2979 0 : next_after_fail946:;
2980 0 : return NULL_TREE;
2981 : }
2982 :
2983 : tree
2984 6 : generic_simplify_545 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2985 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
2986 : {
2987 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2988 6 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail953;
2989 6 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail953;
2990 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail953;
2991 6 : {
2992 6 : tree _r;
2993 6 : _r = captures[2];
2994 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 532, __FILE__, __LINE__, true);
2995 : return _r;
2996 : }
2997 : next_after_fail953:;
2998 : return NULL_TREE;
2999 : }
3000 :
3001 : tree
3002 0 : generic_simplify_549 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3003 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3004 : const enum tree_code ARG_UNUSED (cmp))
3005 : {
3006 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3007 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail957;
3008 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail957;
3009 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail957;
3010 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail957;
3011 0 : {
3012 0 : tree _r;
3013 0 : _r = captures[0];
3014 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 538, __FILE__, __LINE__, true);
3015 : return _r;
3016 : }
3017 : next_after_fail957:;
3018 : return NULL_TREE;
3019 : }
3020 :
3021 : tree
3022 0 : generic_simplify_559 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3023 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3024 : const combined_fn ARG_UNUSED (cond_op))
3025 : {
3026 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3027 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail967;
3028 0 : {
3029 0 : tree res_op0;
3030 0 : {
3031 0 : tree _o1[2], _r1;
3032 0 : _o1[0] = captures[2];
3033 0 : _o1[1] = captures[0];
3034 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3035 0 : res_op0 = _r1;
3036 : }
3037 0 : tree res_op1;
3038 0 : res_op1 = captures[3];
3039 0 : tree res_op2;
3040 0 : res_op2 = captures[4];
3041 0 : tree res_op3;
3042 0 : res_op3 = captures[5];
3043 0 : tree res_op4;
3044 0 : res_op4 = captures[6];
3045 0 : tree _r;
3046 0 : _r = maybe_build_call_expr_loc (loc, cond_op, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3047 0 : if (!_r)
3048 0 : goto next_after_fail967;
3049 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 759, __FILE__, __LINE__, true);
3050 : return _r;
3051 : }
3052 : next_after_fail967:;
3053 : return NULL_TREE;
3054 : }
3055 :
3056 : tree
3057 0 : generic_simplify_565 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3058 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3059 : const combined_fn ARG_UNUSED (bswap))
3060 : {
3061 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3062 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail976;
3063 0 : {
3064 0 : tree res_op0;
3065 0 : res_op0 = captures[0];
3066 0 : tree _r;
3067 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
3068 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 768, __FILE__, __LINE__, true);
3069 : return _r;
3070 : }
3071 0 : next_after_fail976:;
3072 0 : return NULL_TREE;
3073 : }
3074 :
3075 : tree
3076 0 : generic_simplify_572 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3077 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3078 : const combined_fn ARG_UNUSED (logs))
3079 : {
3080 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3081 0 : if (flag_unsafe_math_optimizations
3082 : )
3083 : {
3084 0 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
3085 0 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
3086 0 : && ! flag_trapping_math
3087 0 : && ! flag_errno_math
3088 : )
3089 : {
3090 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail983;
3091 0 : {
3092 0 : tree res_op0;
3093 0 : {
3094 0 : tree _o1[1], _r1;
3095 0 : _o1[0] = captures[2];
3096 0 : _r1 = maybe_build_call_expr_loc (loc, logs, TREE_TYPE (_o1[0]), 1, _o1[0]);
3097 0 : if (!_r1)
3098 0 : goto next_after_fail983;
3099 0 : res_op0 = _r1;
3100 : }
3101 0 : tree _r;
3102 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
3103 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3104 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3105 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 775, __FILE__, __LINE__, true);
3106 0 : return _r;
3107 : }
3108 : next_after_fail983:;
3109 : }
3110 : }
3111 : return NULL_TREE;
3112 : }
3113 :
3114 : tree
3115 0 : generic_simplify_581 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3116 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3117 : const combined_fn ARG_UNUSED (froms),
3118 : const combined_fn ARG_UNUSED (tos))
3119 : {
3120 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3121 0 : if (optimize && canonicalize_math_p ()
3122 : )
3123 : {
3124 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail992;
3125 0 : {
3126 0 : tree res_op0;
3127 0 : {
3128 0 : tree _o1[1], _r1;
3129 0 : _o1[0] = captures[0];
3130 0 : _r1 = maybe_build_call_expr_loc (loc, tos, TREE_TYPE (_o1[0]), 1, _o1[0]);
3131 0 : if (!_r1)
3132 0 : goto next_after_fail992;
3133 0 : res_op0 = _r1;
3134 : }
3135 0 : tree _r;
3136 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3137 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 784, __FILE__, __LINE__, true);
3138 0 : return _r;
3139 : }
3140 : next_after_fail992:;
3141 : }
3142 : return NULL_TREE;
3143 : }
3144 :
3145 : tree
3146 0 : generic_simplify_590 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3147 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3148 : const combined_fn ARG_UNUSED (ifn),
3149 : const combined_fn ARG_UNUSED (lfn),
3150 : const combined_fn ARG_UNUSED (llfn))
3151 : {
3152 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3153 0 : if (canonicalize_math_p ()
3154 : )
3155 : {
3156 0 : if (TYPE_PRECISION (long_long_integer_type_node)
3157 0 : == TYPE_PRECISION (long_integer_type_node)
3158 : )
3159 : {
3160 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1001;
3161 0 : {
3162 0 : tree res_op0;
3163 0 : res_op0 = captures[0];
3164 0 : tree _r;
3165 0 : _r = maybe_build_call_expr_loc (loc, lfn, type, 1, res_op0);
3166 0 : if (!_r)
3167 0 : goto next_after_fail1001;
3168 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 793, __FILE__, __LINE__, true);
3169 0 : return _r;
3170 : }
3171 : next_after_fail1001:;
3172 : }
3173 : }
3174 : return NULL_TREE;
3175 : }
3176 :
3177 : tree
3178 0 : generic_simplify_601 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3179 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
3180 : {
3181 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3182 0 : if (canonicalize_math_after_vectorization_p ()
3183 : )
3184 : {
3185 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1012;
3186 : {
3187 : tree res_op0;
3188 : res_op0 = captures[0];
3189 : tree res_op1;
3190 : res_op1 = captures[1];
3191 : tree res_op2;
3192 : res_op2 = captures[2];
3193 : tree _r;
3194 : _r = maybe_build_call_expr_loc (loc, CFN_FMS, type, 3, res_op0, res_op1, res_op2);
3195 : if (!_r)
3196 : goto next_after_fail1012;
3197 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 804, __FILE__, __LINE__, true);
3198 : return _r;
3199 : }
3200 0 : next_after_fail1012:;
3201 : }
3202 0 : return NULL_TREE;
3203 : }
3204 :
3205 : tree
3206 0 : generic_simplify_610 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3207 : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree ARG_UNUSED (_p3), tree ARG_UNUSED (_p4), tree *ARG_UNUSED (captures))
3208 : {
3209 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3210 0 : if (canonicalize_math_after_vectorization_p ()
3211 : )
3212 : {
3213 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1021;
3214 : {
3215 : tree res_op0;
3216 : res_op0 = captures[0];
3217 : tree res_op1;
3218 : res_op1 = captures[1];
3219 : tree res_op2;
3220 : res_op2 = captures[2];
3221 : tree res_op3;
3222 : res_op3 = captures[3];
3223 : tree res_op4;
3224 : res_op4 = captures[4];
3225 : tree _r;
3226 : _r = maybe_build_call_expr_loc (loc, CFN_COND_FMS, type, 5, res_op0, res_op1, res_op2, res_op3, res_op4);
3227 : if (!_r)
3228 : goto next_after_fail1021;
3229 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 813, __FILE__, __LINE__, true);
3230 : return _r;
3231 : }
3232 0 : next_after_fail1021:;
3233 : }
3234 0 : return NULL_TREE;
3235 : }
3236 :
3237 : tree
3238 0 : generic_simplify_621 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3239 : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3240 : const combined_fn ARG_UNUSED (pfun))
3241 : {
3242 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3243 0 : if (INTEGRAL_TYPE_P (type)
3244 : )
3245 : {
3246 0 : {
3247 0 : wide_int nz = tree_nonzero_bits (captures[0]);
3248 0 : if (nz == 1
3249 : )
3250 : {
3251 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1032;
3252 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1032;
3253 0 : {
3254 0 : tree res_op0;
3255 0 : res_op0 = captures[0];
3256 0 : tree _r;
3257 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3258 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 819, __FILE__, __LINE__, true);
3259 0 : return _r;
3260 : }
3261 0 : next_after_fail1032:;
3262 : }
3263 : else
3264 : {
3265 0 : if (wi::popcount (nz) == 1
3266 : )
3267 : {
3268 0 : {
3269 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
3270 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1033;
3271 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1033;
3272 0 : {
3273 0 : tree res_op0;
3274 0 : {
3275 0 : tree _o1[2], _r1;
3276 0 : {
3277 0 : tree _o2[1], _r2;
3278 0 : _o2[0] = captures[0];
3279 0 : if (TREE_TYPE (_o2[0]) != utype)
3280 : {
3281 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
3282 : }
3283 : else
3284 : _r2 = _o2[0];
3285 0 : _o1[0] = _r2;
3286 : }
3287 0 : _o1[1] = build_int_cst (integer_type_node,
3288 0 : wi::ctz (nz));
3289 0 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, utype, _o1[0], _o1[1]);
3290 0 : res_op0 = _r1;
3291 : }
3292 0 : tree _r;
3293 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3294 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 820, __FILE__, __LINE__, true);
3295 0 : return _r;
3296 : }
3297 0 : next_after_fail1033:;
3298 : }
3299 : }
3300 : }
3301 0 : }
3302 : }
3303 : return NULL_TREE;
3304 : }
3305 :
3306 : tree
3307 2715352 : generic_simplify_BIT_NOT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
3308 : {
3309 2715352 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3310 2715352 : switch (TREE_CODE (_p0))
3311 : {
3312 1134 : case BIT_AND_EXPR:
3313 1134 : {
3314 1134 : tree _q20 = TREE_OPERAND (_p0, 0);
3315 1134 : tree _q21 = TREE_OPERAND (_p0, 1);
3316 1134 : switch (TREE_CODE (_q20))
3317 : {
3318 33 : case BIT_NOT_EXPR:
3319 33 : {
3320 33 : tree _q30 = TREE_OPERAND (_q20, 0);
3321 33 : {
3322 33 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q21 };
3323 33 : tree res = generic_simplify_502 (loc, type, _p0, captures);
3324 33 : if (res) return res;
3325 : }
3326 0 : break;
3327 : }
3328 1101 : default:;
3329 : }
3330 1101 : switch (TREE_CODE (_q21))
3331 : {
3332 9 : case BIT_NOT_EXPR:
3333 9 : {
3334 9 : tree _q40 = TREE_OPERAND (_q21, 0);
3335 9 : {
3336 9 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q20 };
3337 9 : tree res = generic_simplify_502 (loc, type, _p0, captures);
3338 9 : if (res) return res;
3339 : }
3340 0 : break;
3341 : }
3342 : default:;
3343 : }
3344 : break;
3345 : }
3346 1209 : case BIT_IOR_EXPR:
3347 1209 : {
3348 1209 : tree _q20 = TREE_OPERAND (_p0, 0);
3349 1209 : tree _q21 = TREE_OPERAND (_p0, 1);
3350 1209 : switch (TREE_CODE (_q20))
3351 : {
3352 68 : case BIT_NOT_EXPR:
3353 68 : {
3354 68 : tree _q30 = TREE_OPERAND (_q20, 0);
3355 68 : {
3356 68 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q21 };
3357 68 : tree res = generic_simplify_503 (loc, type, _p0, captures);
3358 68 : if (res) return res;
3359 : }
3360 0 : break;
3361 : }
3362 1141 : default:;
3363 : }
3364 1141 : switch (TREE_CODE (_q21))
3365 : {
3366 40 : case BIT_NOT_EXPR:
3367 40 : {
3368 40 : tree _q40 = TREE_OPERAND (_q21, 0);
3369 40 : {
3370 40 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q20 };
3371 40 : tree res = generic_simplify_503 (loc, type, _p0, captures);
3372 40 : if (res) return res;
3373 : }
3374 0 : break;
3375 : }
3376 : default:;
3377 : }
3378 : break;
3379 : }
3380 137 : case MINUS_EXPR:
3381 137 : {
3382 137 : tree _q20 = TREE_OPERAND (_p0, 0);
3383 137 : tree _q21 = TREE_OPERAND (_p0, 1);
3384 137 : switch (TREE_CODE (_q20))
3385 : {
3386 1 : case BIT_NOT_EXPR:
3387 1 : {
3388 1 : tree _q30 = TREE_OPERAND (_q20, 0);
3389 1 : {
3390 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
3391 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1072;
3392 1 : {
3393 1 : tree res_op0;
3394 1 : res_op0 = captures[0];
3395 1 : tree res_op1;
3396 1 : res_op1 = captures[1];
3397 1 : tree _r;
3398 1 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
3399 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 850, __FILE__, __LINE__, true);
3400 1 : return _r;
3401 : }
3402 0 : next_after_fail1072:;
3403 : }
3404 0 : break;
3405 : }
3406 136 : default:;
3407 : }
3408 136 : {
3409 136 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3410 136 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1073;
3411 136 : {
3412 136 : tree res_op0;
3413 136 : {
3414 136 : tree _o1[1], _r1;
3415 136 : _o1[0] = captures[1];
3416 136 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3417 136 : res_op0 = _r1;
3418 : }
3419 136 : tree res_op1;
3420 136 : res_op1 = captures[2];
3421 136 : tree _r;
3422 136 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
3423 136 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 851, __FILE__, __LINE__, true);
3424 136 : return _r;
3425 : }
3426 0 : next_after_fail1073:;
3427 : }
3428 0 : if (integer_each_onep (_q21))
3429 : {
3430 0 : {
3431 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
3432 0 : tree res = generic_simplify_504 (loc, type, _p0, captures);
3433 0 : if (res) return res;
3434 : }
3435 : }
3436 : break;
3437 : }
3438 106583 : case PLUS_EXPR:
3439 106583 : {
3440 106583 : tree _q20 = TREE_OPERAND (_p0, 0);
3441 106583 : tree _q21 = TREE_OPERAND (_p0, 1);
3442 106583 : switch (TREE_CODE (_q20))
3443 : {
3444 16 : case BIT_NOT_EXPR:
3445 16 : {
3446 16 : tree _q30 = TREE_OPERAND (_q20, 0);
3447 16 : {
3448 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
3449 16 : tree res = generic_simplify_505 (loc, type, _p0, captures);
3450 16 : if (res) return res;
3451 : }
3452 0 : break;
3453 : }
3454 106567 : default:;
3455 : }
3456 106567 : switch (TREE_CODE (_q21))
3457 : {
3458 1 : case BIT_NOT_EXPR:
3459 1 : {
3460 1 : tree _q40 = TREE_OPERAND (_q21, 0);
3461 1 : {
3462 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
3463 1 : tree res = generic_simplify_505 (loc, type, _p0, captures);
3464 1 : if (res) return res;
3465 : }
3466 0 : break;
3467 : }
3468 79426 : case INTEGER_CST:
3469 79426 : {
3470 79426 : {
3471 79426 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3472 79426 : if ((INTEGRAL_TYPE_P (type)
3473 79426 : && TYPE_UNSIGNED (type))
3474 93384 : || (!TYPE_OVERFLOW_SANITIZED (type)
3475 13950 : && may_negate_without_overflow_p (captures[2]))
3476 : )
3477 : {
3478 79411 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1074;
3479 79411 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1074;
3480 79411 : {
3481 79411 : tree res_op0;
3482 79411 : {
3483 79411 : tree _o1[1], _r1;
3484 79411 : _o1[0] = captures[1];
3485 79411 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3486 79411 : res_op0 = _r1;
3487 : }
3488 79411 : tree res_op1;
3489 79411 : res_op1 = const_unop (NEGATE_EXPR, type, captures[2]);
3490 79411 : tree _r;
3491 79411 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
3492 79411 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 852, __FILE__, __LINE__, true);
3493 79411 : return _r;
3494 : }
3495 15 : next_after_fail1074:;
3496 : }
3497 : }
3498 15 : break;
3499 : }
3500 27155 : default:;
3501 : }
3502 27155 : if (integer_all_onesp (_q21))
3503 : {
3504 0 : {
3505 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
3506 0 : tree res = generic_simplify_506 (loc, type, _p0, captures);
3507 0 : if (res) return res;
3508 : }
3509 : }
3510 : break;
3511 : }
3512 430 : case RSHIFT_EXPR:
3513 430 : {
3514 430 : tree _q20 = TREE_OPERAND (_p0, 0);
3515 430 : tree _q21 = TREE_OPERAND (_p0, 1);
3516 430 : {
3517 430 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3518 430 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[1]))
3519 : )
3520 : {
3521 295 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1075;
3522 295 : {
3523 295 : tree res_op0;
3524 295 : {
3525 295 : tree _o1[1], _r1;
3526 295 : _o1[0] = captures[1];
3527 295 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3528 295 : if (EXPR_P (_r1))
3529 289 : goto next_after_fail1075;
3530 6 : res_op0 = _r1;
3531 : }
3532 6 : tree res_op1;
3533 6 : res_op1 = captures[2];
3534 6 : tree _r;
3535 6 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
3536 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 853, __FILE__, __LINE__, true);
3537 6 : return _r;
3538 : }
3539 409 : next_after_fail1075:;
3540 : }
3541 : else
3542 : {
3543 270 : if (INTEGRAL_TYPE_P (type)
3544 270 : && !wi::neg_p (tree_nonzero_bits (captures[1]))
3545 : )
3546 : {
3547 15 : {
3548 15 : tree stype = signed_type_for (TREE_TYPE (captures[1]));
3549 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1076;
3550 15 : {
3551 15 : tree res_op0;
3552 15 : {
3553 15 : tree _o1[2], _r1;
3554 15 : {
3555 15 : tree _o2[1], _r2;
3556 15 : {
3557 15 : tree _o3[1], _r3;
3558 15 : _o3[0] = captures[1];
3559 15 : if (TREE_TYPE (_o3[0]) != stype)
3560 : {
3561 15 : _r3 = fold_build1_loc (loc, NOP_EXPR, stype, _o3[0]);
3562 : }
3563 : else
3564 : _r3 = _o3[0];
3565 15 : _o2[0] = _r3;
3566 : }
3567 15 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
3568 15 : if (EXPR_P (_r2))
3569 0 : goto next_after_fail1076;
3570 15 : _o1[0] = _r2;
3571 : }
3572 15 : _o1[1] = captures[2];
3573 15 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3574 15 : res_op0 = _r1;
3575 : }
3576 15 : tree _r;
3577 15 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3578 15 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 854, __FILE__, __LINE__, true);
3579 15 : return _r;
3580 : }
3581 409 : next_after_fail1076:;
3582 : }
3583 : }
3584 : }
3585 : }
3586 409 : switch (TREE_CODE (_q20))
3587 : {
3588 72 : CASE_CONVERT:
3589 72 : {
3590 72 : tree _q30 = TREE_OPERAND (_q20, 0);
3591 72 : switch (TREE_CODE (_q30))
3592 : {
3593 2 : case BIT_NOT_EXPR:
3594 2 : {
3595 2 : tree _q40 = TREE_OPERAND (_q30, 0);
3596 2 : {
3597 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q21 };
3598 2 : tree res = generic_simplify_507 (loc, type, _p0, captures);
3599 2 : if (res) return res;
3600 : }
3601 1 : break;
3602 : }
3603 : default:;
3604 : }
3605 : break;
3606 : }
3607 29 : case BIT_NOT_EXPR:
3608 29 : {
3609 29 : tree _q30 = TREE_OPERAND (_q20, 0);
3610 29 : {
3611 29 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q30, _q21 };
3612 29 : tree res = generic_simplify_507 (loc, type, _p0, captures);
3613 29 : if (res) return res;
3614 : }
3615 8 : break;
3616 : }
3617 : default:;
3618 : }
3619 : break;
3620 : }
3621 86 : case BIT_NOT_EXPR:
3622 86 : {
3623 86 : tree _q20 = TREE_OPERAND (_p0, 0);
3624 86 : {
3625 86 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
3626 86 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1077;
3627 86 : {
3628 86 : tree res_op0;
3629 86 : res_op0 = captures[0];
3630 86 : tree _r;
3631 86 : _r = non_lvalue_loc (loc, res_op0);
3632 86 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 855, __FILE__, __LINE__, true);
3633 2715352 : return _r;
3634 : }
3635 0 : next_after_fail1077:;
3636 : }
3637 0 : break;
3638 : }
3639 1036063 : CASE_CONVERT:
3640 1036063 : {
3641 1036063 : tree _q20 = TREE_OPERAND (_p0, 0);
3642 1036063 : switch (TREE_CODE (_q20))
3643 : {
3644 25 : case NEGATE_EXPR:
3645 25 : {
3646 25 : tree _q30 = TREE_OPERAND (_q20, 0);
3647 25 : {
3648 25 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
3649 25 : tree res = generic_simplify_508 (loc, type, _p0, captures);
3650 25 : if (res) return res;
3651 : }
3652 0 : break;
3653 : }
3654 904 : case MINUS_EXPR:
3655 904 : {
3656 904 : tree _q30 = TREE_OPERAND (_q20, 0);
3657 904 : tree _q31 = TREE_OPERAND (_q20, 1);
3658 904 : if (integer_each_onep (_q31))
3659 : {
3660 28 : {
3661 28 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
3662 28 : tree res = generic_simplify_504 (loc, type, _p0, captures);
3663 28 : if (res) return res;
3664 : }
3665 : }
3666 : break;
3667 : }
3668 56734 : case PLUS_EXPR:
3669 56734 : {
3670 56734 : tree _q30 = TREE_OPERAND (_q20, 0);
3671 56734 : tree _q31 = TREE_OPERAND (_q20, 1);
3672 56734 : if (integer_all_onesp (_q31))
3673 : {
3674 3809 : {
3675 3809 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
3676 3809 : tree res = generic_simplify_506 (loc, type, _p0, captures);
3677 3809 : if (res) return res;
3678 : }
3679 : }
3680 : break;
3681 : }
3682 145 : case BIT_XOR_EXPR:
3683 145 : {
3684 145 : tree _q30 = TREE_OPERAND (_q20, 0);
3685 145 : tree _q31 = TREE_OPERAND (_q20, 1);
3686 145 : switch (TREE_CODE (_q31))
3687 : {
3688 7 : case INTEGER_CST:
3689 7 : {
3690 7 : {
3691 7 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
3692 7 : tree res = generic_simplify_509 (loc, type, _p0, captures);
3693 7 : if (res) return res;
3694 : }
3695 0 : break;
3696 : }
3697 138 : default:;
3698 : }
3699 138 : switch (TREE_CODE (_q30))
3700 : {
3701 0 : case BIT_NOT_EXPR:
3702 0 : {
3703 0 : tree _q40 = TREE_OPERAND (_q30, 0);
3704 0 : {
3705 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
3706 0 : tree res = generic_simplify_510 (loc, type, _p0, captures);
3707 0 : if (res) return res;
3708 : }
3709 0 : break;
3710 : }
3711 138 : default:;
3712 : }
3713 138 : switch (TREE_CODE (_q31))
3714 : {
3715 0 : case BIT_NOT_EXPR:
3716 0 : {
3717 0 : tree _q50 = TREE_OPERAND (_q31, 0);
3718 0 : {
3719 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
3720 0 : tree res = generic_simplify_510 (loc, type, _p0, captures);
3721 0 : if (res) return res;
3722 : }
3723 0 : break;
3724 : }
3725 : default:;
3726 : }
3727 : break;
3728 : }
3729 93 : case RSHIFT_EXPR:
3730 93 : {
3731 93 : tree _q30 = TREE_OPERAND (_q20, 0);
3732 93 : tree _q31 = TREE_OPERAND (_q20, 1);
3733 93 : switch (TREE_CODE (_q30))
3734 : {
3735 17 : CASE_CONVERT:
3736 17 : {
3737 17 : tree _q40 = TREE_OPERAND (_q30, 0);
3738 17 : switch (TREE_CODE (_q40))
3739 : {
3740 1 : case BIT_NOT_EXPR:
3741 1 : {
3742 1 : tree _q50 = TREE_OPERAND (_q40, 0);
3743 1 : {
3744 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q31 };
3745 1 : tree res = generic_simplify_511 (loc, type, _p0, captures);
3746 1 : if (res) return res;
3747 : }
3748 0 : break;
3749 : }
3750 : default:;
3751 : }
3752 : break;
3753 : }
3754 3 : case BIT_NOT_EXPR:
3755 3 : {
3756 3 : tree _q40 = TREE_OPERAND (_q30, 0);
3757 3 : {
3758 3 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q40, _q31 };
3759 3 : tree res = generic_simplify_511 (loc, type, _p0, captures);
3760 3 : if (res) return res;
3761 : }
3762 1 : break;
3763 : }
3764 : default:;
3765 : }
3766 : break;
3767 : }
3768 0 : case LROTATE_EXPR:
3769 0 : {
3770 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3771 0 : tree _q31 = TREE_OPERAND (_q20, 1);
3772 0 : switch (TREE_CODE (_q30))
3773 : {
3774 0 : CASE_CONVERT:
3775 0 : {
3776 0 : tree _q40 = TREE_OPERAND (_q30, 0);
3777 0 : switch (TREE_CODE (_q40))
3778 : {
3779 0 : case BIT_NOT_EXPR:
3780 0 : {
3781 0 : tree _q50 = TREE_OPERAND (_q40, 0);
3782 0 : {
3783 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q31 };
3784 0 : tree res = generic_simplify_512 (loc, type, _p0, captures, LROTATE_EXPR);
3785 0 : if (res) return res;
3786 : }
3787 0 : break;
3788 : }
3789 : default:;
3790 : }
3791 : break;
3792 : }
3793 0 : case BIT_NOT_EXPR:
3794 0 : {
3795 0 : tree _q40 = TREE_OPERAND (_q30, 0);
3796 0 : {
3797 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q40, _q31 };
3798 0 : tree res = generic_simplify_512 (loc, type, _p0, captures, LROTATE_EXPR);
3799 0 : if (res) return res;
3800 : }
3801 0 : break;
3802 : }
3803 : default:;
3804 : }
3805 : break;
3806 : }
3807 0 : case RROTATE_EXPR:
3808 0 : {
3809 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3810 0 : tree _q31 = TREE_OPERAND (_q20, 1);
3811 0 : switch (TREE_CODE (_q30))
3812 : {
3813 0 : CASE_CONVERT:
3814 0 : {
3815 0 : tree _q40 = TREE_OPERAND (_q30, 0);
3816 0 : switch (TREE_CODE (_q40))
3817 : {
3818 0 : case BIT_NOT_EXPR:
3819 0 : {
3820 0 : tree _q50 = TREE_OPERAND (_q40, 0);
3821 0 : {
3822 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q31 };
3823 0 : tree res = generic_simplify_512 (loc, type, _p0, captures, RROTATE_EXPR);
3824 0 : if (res) return res;
3825 : }
3826 0 : break;
3827 : }
3828 : default:;
3829 : }
3830 : break;
3831 : }
3832 0 : case BIT_NOT_EXPR:
3833 0 : {
3834 0 : tree _q40 = TREE_OPERAND (_q30, 0);
3835 0 : {
3836 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q40, _q31 };
3837 0 : tree res = generic_simplify_512 (loc, type, _p0, captures, RROTATE_EXPR);
3838 0 : if (res) return res;
3839 : }
3840 0 : break;
3841 : }
3842 : default:;
3843 : }
3844 : break;
3845 : }
3846 : default:;
3847 : }
3848 : break;
3849 : }
3850 120 : case NEGATE_EXPR:
3851 120 : {
3852 120 : tree _q20 = TREE_OPERAND (_p0, 0);
3853 120 : {
3854 120 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
3855 120 : tree res = generic_simplify_508 (loc, type, _p0, captures);
3856 120 : if (res) return res;
3857 : }
3858 0 : break;
3859 : }
3860 1572 : case BIT_XOR_EXPR:
3861 1572 : {
3862 1572 : tree _q20 = TREE_OPERAND (_p0, 0);
3863 1572 : tree _q21 = TREE_OPERAND (_p0, 1);
3864 1572 : switch (TREE_CODE (_q21))
3865 : {
3866 22 : case INTEGER_CST:
3867 22 : {
3868 22 : {
3869 22 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
3870 22 : tree res = generic_simplify_509 (loc, type, _p0, captures);
3871 22 : if (res) return res;
3872 : }
3873 0 : break;
3874 : }
3875 1550 : default:;
3876 : }
3877 1550 : switch (TREE_CODE (_q20))
3878 : {
3879 0 : case BIT_NOT_EXPR:
3880 0 : {
3881 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3882 0 : {
3883 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
3884 0 : tree res = generic_simplify_510 (loc, type, _p0, captures);
3885 0 : if (res) return res;
3886 : }
3887 0 : break;
3888 : }
3889 1550 : default:;
3890 : }
3891 1550 : switch (TREE_CODE (_q21))
3892 : {
3893 0 : case BIT_NOT_EXPR:
3894 0 : {
3895 0 : tree _q40 = TREE_OPERAND (_q21, 0);
3896 0 : {
3897 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
3898 0 : tree res = generic_simplify_510 (loc, type, _p0, captures);
3899 0 : if (res) return res;
3900 : }
3901 0 : break;
3902 : }
3903 1550 : default:;
3904 : }
3905 1550 : if (tree_truth_valued_p (_q20))
3906 : {
3907 31 : if (tree_truth_valued_p (_q21))
3908 : {
3909 7 : {
3910 7 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
3911 14 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3912 14 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == 1
3913 : )
3914 : {
3915 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1078;
3916 0 : {
3917 0 : tree res_op0;
3918 0 : {
3919 0 : tree _o1[2], _r1;
3920 0 : _o1[0] = captures[1];
3921 0 : _o1[1] = captures[2];
3922 0 : _r1 = fold_build2_loc (loc, EQ_EXPR, boolean_type_node, _o1[0], _o1[1]);
3923 0 : res_op0 = _r1;
3924 : }
3925 0 : tree _r;
3926 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3927 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 856, __FILE__, __LINE__, true);
3928 0 : return _r;
3929 : }
3930 0 : next_after_fail1078:;
3931 : }
3932 : }
3933 : }
3934 : }
3935 : break;
3936 : }
3937 0 : case MIN_EXPR:
3938 0 : {
3939 0 : tree _q20 = TREE_OPERAND (_p0, 0);
3940 0 : tree _q21 = TREE_OPERAND (_p0, 1);
3941 0 : switch (TREE_CODE (_q20))
3942 : {
3943 0 : case BIT_NOT_EXPR:
3944 0 : {
3945 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3946 0 : {
3947 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q21 };
3948 0 : tree res = generic_simplify_513 (loc, type, _p0, captures, MIN_EXPR, MAX_EXPR);
3949 0 : if (res) return res;
3950 : }
3951 0 : break;
3952 : }
3953 0 : default:;
3954 : }
3955 0 : switch (TREE_CODE (_q21))
3956 : {
3957 0 : case BIT_NOT_EXPR:
3958 0 : {
3959 0 : tree _q40 = TREE_OPERAND (_q21, 0);
3960 0 : {
3961 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q20 };
3962 0 : tree res = generic_simplify_513 (loc, type, _p0, captures, MIN_EXPR, MAX_EXPR);
3963 0 : if (res) return res;
3964 : }
3965 0 : break;
3966 : }
3967 : default:;
3968 : }
3969 : break;
3970 : }
3971 0 : case MAX_EXPR:
3972 0 : {
3973 0 : tree _q20 = TREE_OPERAND (_p0, 0);
3974 0 : tree _q21 = TREE_OPERAND (_p0, 1);
3975 0 : switch (TREE_CODE (_q20))
3976 : {
3977 0 : case BIT_NOT_EXPR:
3978 0 : {
3979 0 : tree _q30 = TREE_OPERAND (_q20, 0);
3980 0 : {
3981 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q21 };
3982 0 : tree res = generic_simplify_513 (loc, type, _p0, captures, MAX_EXPR, MIN_EXPR);
3983 0 : if (res) return res;
3984 : }
3985 0 : break;
3986 : }
3987 0 : default:;
3988 : }
3989 0 : switch (TREE_CODE (_q21))
3990 : {
3991 0 : case BIT_NOT_EXPR:
3992 0 : {
3993 0 : tree _q40 = TREE_OPERAND (_q21, 0);
3994 0 : {
3995 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q20 };
3996 0 : tree res = generic_simplify_513 (loc, type, _p0, captures, MAX_EXPR, MIN_EXPR);
3997 0 : if (res) return res;
3998 : }
3999 0 : break;
4000 : }
4001 : default:;
4002 : }
4003 : break;
4004 : }
4005 1 : case LROTATE_EXPR:
4006 1 : {
4007 1 : tree _q20 = TREE_OPERAND (_p0, 0);
4008 1 : tree _q21 = TREE_OPERAND (_p0, 1);
4009 1 : switch (TREE_CODE (_q20))
4010 : {
4011 0 : CASE_CONVERT:
4012 0 : {
4013 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4014 0 : switch (TREE_CODE (_q30))
4015 : {
4016 0 : case BIT_NOT_EXPR:
4017 0 : {
4018 0 : tree _q40 = TREE_OPERAND (_q30, 0);
4019 0 : {
4020 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q21 };
4021 0 : tree res = generic_simplify_514 (loc, type, _p0, captures, LROTATE_EXPR);
4022 0 : if (res) return res;
4023 : }
4024 0 : break;
4025 : }
4026 : default:;
4027 : }
4028 : break;
4029 : }
4030 1 : case BIT_NOT_EXPR:
4031 1 : {
4032 1 : tree _q30 = TREE_OPERAND (_q20, 0);
4033 1 : {
4034 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q30, _q21 };
4035 1 : tree res = generic_simplify_514 (loc, type, _p0, captures, LROTATE_EXPR);
4036 1 : if (res) return res;
4037 : }
4038 0 : break;
4039 : }
4040 : default:;
4041 : }
4042 : break;
4043 : }
4044 1 : case RROTATE_EXPR:
4045 1 : {
4046 1 : tree _q20 = TREE_OPERAND (_p0, 0);
4047 1 : tree _q21 = TREE_OPERAND (_p0, 1);
4048 1 : switch (TREE_CODE (_q20))
4049 : {
4050 0 : CASE_CONVERT:
4051 0 : {
4052 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4053 0 : switch (TREE_CODE (_q30))
4054 : {
4055 0 : case BIT_NOT_EXPR:
4056 0 : {
4057 0 : tree _q40 = TREE_OPERAND (_q30, 0);
4058 0 : {
4059 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q21 };
4060 0 : tree res = generic_simplify_514 (loc, type, _p0, captures, RROTATE_EXPR);
4061 0 : if (res) return res;
4062 : }
4063 0 : break;
4064 : }
4065 : default:;
4066 : }
4067 : break;
4068 : }
4069 1 : case BIT_NOT_EXPR:
4070 1 : {
4071 1 : tree _q30 = TREE_OPERAND (_q20, 0);
4072 1 : {
4073 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q30, _q21 };
4074 1 : tree res = generic_simplify_514 (loc, type, _p0, captures, RROTATE_EXPR);
4075 1 : if (res) return res;
4076 : }
4077 0 : break;
4078 : }
4079 : default:;
4080 : }
4081 : break;
4082 : }
4083 32 : case VEC_COND_EXPR:
4084 32 : {
4085 32 : tree _q20 = TREE_OPERAND (_p0, 0);
4086 32 : tree _q21 = TREE_OPERAND (_p0, 1);
4087 32 : tree _q22 = TREE_OPERAND (_p0, 2);
4088 32 : {
4089 32 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4090 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1079;
4091 32 : {
4092 32 : tree res_op0;
4093 32 : res_op0 = captures[1];
4094 32 : tree res_op1;
4095 32 : {
4096 32 : tree _o1[1], _r1;
4097 32 : _o1[0] = captures[2];
4098 32 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, type, _o1[0]);
4099 32 : if (EXPR_P (_r1))
4100 0 : goto next_after_fail1079;
4101 32 : res_op1 = _r1;
4102 : }
4103 32 : tree res_op2;
4104 32 : {
4105 32 : tree _o1[1], _r1;
4106 32 : _o1[0] = captures[3];
4107 32 : _r1 = fold_build1_loc (loc, BIT_NOT_EXPR, type, _o1[0]);
4108 32 : if (EXPR_P (_r1))
4109 0 : goto next_after_fail1079;
4110 32 : res_op2 = _r1;
4111 : }
4112 32 : tree _r;
4113 32 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
4114 32 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 832, __FILE__, __LINE__, true);
4115 32 : return _r;
4116 : }
4117 0 : next_after_fail1079:;
4118 : }
4119 0 : break;
4120 : }
4121 4 : case LT_EXPR:
4122 4 : {
4123 4 : tree _q20 = TREE_OPERAND (_p0, 0);
4124 4 : tree _q21 = TREE_OPERAND (_p0, 1);
4125 4 : {
4126 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4127 4 : tree res = generic_simplify_515 (loc, type, _p0, captures, LT_EXPR, GE_EXPR, UNGE_EXPR);
4128 4 : if (res) return res;
4129 : }
4130 4 : break;
4131 : }
4132 8 : case LE_EXPR:
4133 8 : {
4134 8 : tree _q20 = TREE_OPERAND (_p0, 0);
4135 8 : tree _q21 = TREE_OPERAND (_p0, 1);
4136 8 : {
4137 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4138 8 : tree res = generic_simplify_515 (loc, type, _p0, captures, LE_EXPR, GT_EXPR, UNGT_EXPR);
4139 8 : if (res) return res;
4140 : }
4141 8 : break;
4142 : }
4143 63 : case EQ_EXPR:
4144 63 : {
4145 63 : tree _q20 = TREE_OPERAND (_p0, 0);
4146 63 : tree _q21 = TREE_OPERAND (_p0, 1);
4147 63 : {
4148 63 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4149 63 : tree res = generic_simplify_515 (loc, type, _p0, captures, EQ_EXPR, NE_EXPR, NE_EXPR);
4150 63 : if (res) return res;
4151 : }
4152 56 : break;
4153 : }
4154 112 : case NE_EXPR:
4155 112 : {
4156 112 : tree _q20 = TREE_OPERAND (_p0, 0);
4157 112 : tree _q21 = TREE_OPERAND (_p0, 1);
4158 112 : {
4159 112 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4160 112 : tree res = generic_simplify_515 (loc, type, _p0, captures, NE_EXPR, EQ_EXPR, EQ_EXPR);
4161 112 : if (res) return res;
4162 : }
4163 107 : break;
4164 : }
4165 0 : case GE_EXPR:
4166 0 : {
4167 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4168 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4169 0 : {
4170 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4171 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, GE_EXPR, LT_EXPR, UNLT_EXPR);
4172 0 : if (res) return res;
4173 : }
4174 0 : break;
4175 : }
4176 66 : case GT_EXPR:
4177 66 : {
4178 66 : tree _q20 = TREE_OPERAND (_p0, 0);
4179 66 : tree _q21 = TREE_OPERAND (_p0, 1);
4180 66 : {
4181 66 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4182 66 : tree res = generic_simplify_515 (loc, type, _p0, captures, GT_EXPR, LE_EXPR, UNLE_EXPR);
4183 66 : if (res) return res;
4184 : }
4185 66 : break;
4186 : }
4187 0 : case UNORDERED_EXPR:
4188 0 : {
4189 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4190 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4191 0 : {
4192 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4193 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR);
4194 0 : if (res) return res;
4195 : }
4196 0 : break;
4197 : }
4198 0 : case ORDERED_EXPR:
4199 0 : {
4200 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4201 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4202 0 : {
4203 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4204 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR);
4205 0 : if (res) return res;
4206 : }
4207 0 : break;
4208 : }
4209 0 : case UNLT_EXPR:
4210 0 : {
4211 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4212 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4213 0 : {
4214 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4215 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, UNLT_EXPR, GE_EXPR, GE_EXPR);
4216 0 : if (res) return res;
4217 : }
4218 0 : break;
4219 : }
4220 0 : case UNLE_EXPR:
4221 0 : {
4222 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4223 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4224 0 : {
4225 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4226 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, UNLE_EXPR, GT_EXPR, GT_EXPR);
4227 0 : if (res) return res;
4228 : }
4229 0 : break;
4230 : }
4231 0 : case UNGT_EXPR:
4232 0 : {
4233 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4234 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4235 0 : {
4236 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4237 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, UNGT_EXPR, LE_EXPR, LE_EXPR);
4238 0 : if (res) return res;
4239 : }
4240 0 : break;
4241 : }
4242 0 : case UNGE_EXPR:
4243 0 : {
4244 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4245 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4246 0 : {
4247 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4248 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, UNGE_EXPR, LT_EXPR, LT_EXPR);
4249 0 : if (res) return res;
4250 : }
4251 0 : break;
4252 : }
4253 0 : case UNEQ_EXPR:
4254 0 : {
4255 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4256 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4257 0 : {
4258 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4259 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR);
4260 0 : if (res) return res;
4261 : }
4262 0 : break;
4263 : }
4264 0 : case LTGT_EXPR:
4265 0 : {
4266 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4267 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4268 0 : {
4269 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4270 0 : tree res = generic_simplify_515 (loc, type, _p0, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR);
4271 0 : if (res) return res;
4272 : }
4273 0 : break;
4274 : }
4275 : default:;
4276 : }
4277 : return NULL_TREE;
4278 : }
4279 :
4280 : tree
4281 2167174 : generic_simplify_TRUNC_DIV_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
4282 : {
4283 2167174 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4284 2167174 : if (integer_onep (_p1))
4285 : {
4286 22299 : {
4287 22299 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4288 22299 : tree res = generic_simplify_184 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4289 22299 : if (res) return res;
4290 : }
4291 : }
4292 2144875 : switch (TREE_CODE (_p0))
4293 : {
4294 166414 : CASE_CONVERT:
4295 166414 : {
4296 166414 : tree _q20 = TREE_OPERAND (_p0, 0);
4297 166414 : switch (TREE_CODE (_p1))
4298 : {
4299 39046 : CASE_CONVERT:
4300 39046 : {
4301 39046 : tree _q40 = TREE_OPERAND (_p1, 0);
4302 39046 : switch (TREE_CODE (_q40))
4303 : {
4304 0 : case LSHIFT_EXPR:
4305 0 : {
4306 0 : tree _q50 = TREE_OPERAND (_q40, 0);
4307 0 : tree _q51 = TREE_OPERAND (_q40, 1);
4308 0 : if (integer_onep (_q50))
4309 : {
4310 0 : {
4311 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q50, _q51 };
4312 0 : tree res = generic_simplify_313 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4313 0 : if (res) return res;
4314 : }
4315 : }
4316 : break;
4317 : }
4318 : default:;
4319 : }
4320 : break;
4321 : }
4322 8 : case LSHIFT_EXPR:
4323 8 : {
4324 8 : tree _q40 = TREE_OPERAND (_p1, 0);
4325 8 : tree _q41 = TREE_OPERAND (_p1, 1);
4326 8 : if (integer_onep (_q40))
4327 : {
4328 7 : {
4329 7 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q41 };
4330 7 : tree res = generic_simplify_313 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4331 7 : if (res) return res;
4332 : }
4333 : }
4334 : break;
4335 : }
4336 : default:;
4337 : }
4338 : break;
4339 : }
4340 2144875 : default:;
4341 : }
4342 2144875 : switch (TREE_CODE (_p1))
4343 : {
4344 138469 : CASE_CONVERT:
4345 138469 : {
4346 138469 : tree _q30 = TREE_OPERAND (_p1, 0);
4347 138469 : switch (TREE_CODE (_q30))
4348 : {
4349 7 : case LSHIFT_EXPR:
4350 7 : {
4351 7 : tree _q40 = TREE_OPERAND (_q30, 0);
4352 7 : tree _q41 = TREE_OPERAND (_q30, 1);
4353 7 : if (integer_onep (_q40))
4354 : {
4355 7 : {
4356 7 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q40, _q41 };
4357 7 : tree res = generic_simplify_314 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4358 7 : if (res) return res;
4359 : }
4360 : }
4361 : break;
4362 : }
4363 : default:;
4364 : }
4365 : break;
4366 : }
4367 33 : case LSHIFT_EXPR:
4368 33 : {
4369 33 : tree _q30 = TREE_OPERAND (_p1, 0);
4370 33 : tree _q31 = TREE_OPERAND (_p1, 1);
4371 33 : if (integer_onep (_q30))
4372 : {
4373 16 : {
4374 16 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q31 };
4375 16 : tree res = generic_simplify_314 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4376 16 : if (res) return res;
4377 : }
4378 : }
4379 : break;
4380 : }
4381 2144866 : default:;
4382 : }
4383 2144866 : if (integer_zerop (_p0))
4384 : {
4385 2234 : {
4386 2234 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4387 2234 : tree res = generic_simplify_315 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4388 2234 : if (res) return res;
4389 : }
4390 : }
4391 2143133 : switch (TREE_CODE (_p1))
4392 : {
4393 13446 : case SSA_NAME:
4394 13446 : {
4395 13446 : {
4396 13446 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4397 13446 : tree res = generic_simplify_317 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4398 13446 : if (res) return res;
4399 : }
4400 13446 : break;
4401 : }
4402 2143133 : default:;
4403 : }
4404 2143133 : if (integer_minus_onep (_p1))
4405 : {
4406 2520 : {
4407 2520 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4408 2520 : tree res = generic_simplify_316 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4409 2520 : if (res) return res;
4410 : }
4411 : }
4412 2141511 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
4413 : {
4414 768 : {
4415 768 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4416 768 : tree res = generic_simplify_318 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4417 768 : if (res) return res;
4418 : }
4419 : }
4420 2141400 : switch (TREE_CODE (_p1))
4421 : {
4422 1 : case ABS_EXPR:
4423 1 : {
4424 1 : tree _q30 = TREE_OPERAND (_p1, 0);
4425 1 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
4426 : {
4427 1 : {
4428 1 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4429 1 : tree res = generic_simplify_319 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4430 1 : if (res) return res;
4431 : }
4432 : }
4433 : break;
4434 : }
4435 2141399 : default:;
4436 : }
4437 2141399 : switch (TREE_CODE (_p0))
4438 : {
4439 0 : case ABS_EXPR:
4440 0 : {
4441 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4442 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4443 : {
4444 0 : {
4445 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4446 0 : tree res = generic_simplify_319 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4447 0 : if (res) return res;
4448 : }
4449 : }
4450 : break;
4451 : }
4452 2141399 : default:;
4453 : }
4454 2141399 : switch (TREE_CODE (_p1))
4455 : {
4456 658 : case NEGATE_EXPR:
4457 658 : {
4458 658 : tree _q30 = TREE_OPERAND (_p1, 0);
4459 658 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
4460 : {
4461 1 : {
4462 1 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4463 1 : tree res = generic_simplify_320 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4464 1 : if (res) return res;
4465 : }
4466 : }
4467 : break;
4468 : }
4469 2141398 : default:;
4470 : }
4471 2141398 : switch (TREE_CODE (_p0))
4472 : {
4473 374 : case NEGATE_EXPR:
4474 374 : {
4475 374 : tree _q20 = TREE_OPERAND (_p0, 0);
4476 374 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4477 : {
4478 0 : {
4479 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4480 0 : tree res = generic_simplify_320 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4481 0 : if (res) return res;
4482 : }
4483 : }
4484 : break;
4485 : }
4486 9484 : case TRUNC_DIV_EXPR:
4487 9484 : {
4488 9484 : tree _q20 = TREE_OPERAND (_p0, 0);
4489 9484 : tree _q21 = TREE_OPERAND (_p0, 1);
4490 9484 : switch (TREE_CODE (_q21))
4491 : {
4492 9395 : case INTEGER_CST:
4493 9395 : {
4494 9395 : switch (TREE_CODE (_p1))
4495 : {
4496 9394 : case INTEGER_CST:
4497 9394 : {
4498 9394 : {
4499 9394 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4500 9394 : tree res = generic_simplify_321 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4501 9394 : if (res) return res;
4502 : }
4503 9394 : break;
4504 : }
4505 : default:;
4506 : }
4507 : break;
4508 : }
4509 : default:;
4510 : }
4511 : break;
4512 : }
4513 166373 : CASE_CONVERT:
4514 166373 : {
4515 166373 : tree _q20 = TREE_OPERAND (_p0, 0);
4516 166373 : switch (TREE_CODE (_q20))
4517 : {
4518 0 : case BIT_AND_EXPR:
4519 0 : {
4520 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4521 0 : tree _q31 = TREE_OPERAND (_q20, 1);
4522 0 : switch (TREE_CODE (_q31))
4523 : {
4524 0 : case INTEGER_CST:
4525 0 : {
4526 0 : switch (TREE_CODE (_p1))
4527 : {
4528 0 : case INTEGER_CST:
4529 0 : {
4530 0 : {
4531 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
4532 0 : tree res = generic_simplify_322 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4533 0 : if (res) return res;
4534 : }
4535 0 : break;
4536 : }
4537 : default:;
4538 : }
4539 : break;
4540 : }
4541 : default:;
4542 : }
4543 : break;
4544 : }
4545 : default:;
4546 : }
4547 : break;
4548 : }
4549 47107 : case BIT_AND_EXPR:
4550 47107 : {
4551 47107 : tree _q20 = TREE_OPERAND (_p0, 0);
4552 47107 : tree _q21 = TREE_OPERAND (_p0, 1);
4553 47107 : switch (TREE_CODE (_q21))
4554 : {
4555 47081 : case INTEGER_CST:
4556 47081 : {
4557 47081 : switch (TREE_CODE (_p1))
4558 : {
4559 47077 : case INTEGER_CST:
4560 47077 : {
4561 47077 : {
4562 47077 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
4563 47077 : tree res = generic_simplify_322 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4564 47077 : if (res) return res;
4565 : }
4566 47076 : break;
4567 : }
4568 : default:;
4569 : }
4570 : break;
4571 : }
4572 : default:;
4573 : }
4574 : break;
4575 : }
4576 41641 : case MULT_EXPR:
4577 41641 : {
4578 41641 : tree _q20 = TREE_OPERAND (_p0, 0);
4579 41641 : tree _q21 = TREE_OPERAND (_p0, 1);
4580 41641 : if (integer_pow2p (_q21))
4581 : {
4582 7671 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
4583 : {
4584 7131 : {
4585 7131 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4586 7131 : tree res = generic_simplify_323 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4587 7131 : if (res) return res;
4588 : }
4589 : }
4590 : }
4591 34651 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
4592 : {
4593 163 : {
4594 163 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
4595 163 : tree res = generic_simplify_324 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4596 163 : if (res) return res;
4597 : }
4598 : }
4599 34503 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4600 : {
4601 22 : {
4602 22 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
4603 22 : tree res = generic_simplify_324 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4604 22 : if (res) return res;
4605 : }
4606 : }
4607 34494 : switch (TREE_CODE (_q21))
4608 : {
4609 34162 : case INTEGER_CST:
4610 34162 : {
4611 34162 : switch (TREE_CODE (_p1))
4612 : {
4613 3 : case MULT_EXPR:
4614 3 : {
4615 3 : tree _q50 = TREE_OPERAND (_p1, 0);
4616 3 : tree _q51 = TREE_OPERAND (_p1, 1);
4617 3 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
4618 : {
4619 3 : switch (TREE_CODE (_q51))
4620 : {
4621 3 : case INTEGER_CST:
4622 3 : {
4623 3 : {
4624 3 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
4625 3 : tree res = generic_simplify_325 (loc, type, _p0, _p1, captures, TRUNC_DIV_EXPR);
4626 3 : if (res) return res;
4627 : }
4628 0 : break;
4629 : }
4630 : default:;
4631 : }
4632 : }
4633 : break;
4634 : }
4635 : default:;
4636 : }
4637 : break;
4638 : }
4639 : default:;
4640 : }
4641 : break;
4642 : }
4643 0 : case VEC_COND_EXPR:
4644 0 : {
4645 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4646 0 : tree _q21 = TREE_OPERAND (_p0, 1);
4647 0 : tree _q22 = TREE_OPERAND (_p0, 2);
4648 0 : switch (TREE_CODE (_p1))
4649 : {
4650 0 : case VEC_COND_EXPR:
4651 0 : {
4652 0 : tree _q60 = TREE_OPERAND (_p1, 0);
4653 0 : tree _q61 = TREE_OPERAND (_p1, 1);
4654 0 : tree _q62 = TREE_OPERAND (_p1, 2);
4655 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4656 : {
4657 0 : {
4658 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
4659 0 : if (VECTOR_TYPE_P (type)
4660 0 : && (TREE_CODE_CLASS (TRUNC_DIV_EXPR) != tcc_comparison
4661 : || types_match (type, TREE_TYPE (captures[2]))
4662 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
4663 : || (optimize_vectors_before_lowering_p ()
4664 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
4665 : )
4666 : {
4667 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1585;
4668 0 : {
4669 0 : tree res_op0;
4670 0 : res_op0 = captures[1];
4671 0 : tree res_op1;
4672 0 : {
4673 0 : tree _o1[2], _r1;
4674 0 : _o1[0] = captures[2];
4675 0 : _o1[1] = captures[5];
4676 0 : _r1 = fold_build2_loc (loc, TRUNC_DIV_EXPR, type, _o1[0], _o1[1]);
4677 0 : if (EXPR_P (_r1))
4678 0 : goto next_after_fail1585;
4679 0 : res_op1 = _r1;
4680 : }
4681 0 : tree res_op2;
4682 0 : {
4683 0 : tree _o1[2], _r1;
4684 0 : _o1[0] = captures[3];
4685 0 : _o1[1] = captures[6];
4686 0 : _r1 = fold_build2_loc (loc, TRUNC_DIV_EXPR, type, _o1[0], _o1[1]);
4687 0 : if (EXPR_P (_r1))
4688 0 : goto next_after_fail1585;
4689 0 : res_op2 = _r1;
4690 : }
4691 0 : tree _r;
4692 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
4693 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
4694 0 : return _r;
4695 : }
4696 0 : next_after_fail1585:;
4697 : }
4698 : }
4699 : }
4700 : break;
4701 : }
4702 0 : default:;
4703 : }
4704 0 : {
4705 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
4706 0 : if (VECTOR_TYPE_P (type)
4707 0 : && (TREE_CODE_CLASS (TRUNC_DIV_EXPR) != tcc_comparison
4708 : || types_match (type, TREE_TYPE (captures[2]))
4709 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
4710 : || (optimize_vectors_before_lowering_p ()
4711 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
4712 : )
4713 : {
4714 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1586;
4715 0 : {
4716 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1586;
4717 0 : tree res_op0;
4718 0 : res_op0 = captures[1];
4719 0 : tree res_op1;
4720 0 : {
4721 0 : tree _o1[2], _r1;
4722 0 : _o1[0] = captures[2];
4723 0 : _o1[1] = unshare_expr (captures[4]);
4724 0 : _r1 = fold_build2_loc (loc, TRUNC_DIV_EXPR, type, _o1[0], _o1[1]);
4725 0 : if (EXPR_P (_r1))
4726 0 : goto next_after_fail1586;
4727 0 : res_op1 = _r1;
4728 : }
4729 0 : tree res_op2;
4730 0 : {
4731 0 : tree _o1[2], _r1;
4732 0 : _o1[0] = captures[3];
4733 0 : _o1[1] = captures[4];
4734 0 : _r1 = fold_build2_loc (loc, TRUNC_DIV_EXPR, type, _o1[0], _o1[1]);
4735 0 : if (EXPR_P (_r1))
4736 0 : goto next_after_fail1586;
4737 0 : res_op2 = _r1;
4738 : }
4739 0 : tree _r;
4740 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
4741 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
4742 0 : return _r;
4743 : }
4744 0 : next_after_fail1586:;
4745 : }
4746 : }
4747 0 : break;
4748 : }
4749 2134247 : default:;
4750 : }
4751 2134247 : if (integer_onep (_p0))
4752 : {
4753 1178 : {
4754 1178 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4755 1178 : if (INTEGRAL_TYPE_P (type)
4756 1175 : && TYPE_PRECISION (type) > 1
4757 1175 : && !integer_zerop (captures[1])
4758 1653 : && (!flag_non_call_exceptions || tree_expr_nonzero_p (captures[1]))
4759 : )
4760 : {
4761 418 : if (TYPE_UNSIGNED (type)
4762 : )
4763 : {
4764 54 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1587;
4765 54 : {
4766 54 : tree res_op0;
4767 54 : {
4768 54 : tree _o1[2], _r1;
4769 54 : _o1[0] = captures[1];
4770 54 : _o1[1] = build_one_cst (type);
4771 54 : _r1 = fold_build2_loc (loc, EQ_EXPR, boolean_type_node, _o1[0], _o1[1]);
4772 54 : res_op0 = _r1;
4773 : }
4774 54 : tree _r;
4775 54 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4776 54 : if (TREE_SIDE_EFFECTS (captures[0]))
4777 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4778 54 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 996, __FILE__, __LINE__, true);
4779 54 : return _r;
4780 : }
4781 0 : next_after_fail1587:;
4782 : }
4783 : else
4784 : {
4785 364 : if (fold_before_rtl_expansion_p ()
4786 : )
4787 : {
4788 0 : {
4789 0 : tree utype = unsigned_type_for (type);
4790 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1588;
4791 0 : {
4792 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail1588;
4793 0 : tree res_op0;
4794 0 : {
4795 0 : tree _o1[2], _r1;
4796 0 : {
4797 0 : tree _o2[2], _r2;
4798 0 : {
4799 0 : tree _o3[1], _r3;
4800 0 : _o3[0] = unshare_expr (captures[1]);
4801 0 : if (TREE_TYPE (_o3[0]) != utype)
4802 : {
4803 0 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
4804 : }
4805 : else
4806 : _r3 = _o3[0];
4807 0 : _o2[0] = _r3;
4808 : }
4809 0 : _o2[1] = build_one_cst (utype);
4810 0 : _r2 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
4811 0 : _o1[0] = _r2;
4812 : }
4813 0 : _o1[1] = build_int_cst (utype, 2);
4814 0 : _r1 = fold_build2_loc (loc, LE_EXPR, boolean_type_node, _o1[0], _o1[1]);
4815 0 : res_op0 = _r1;
4816 : }
4817 0 : tree res_op1;
4818 0 : res_op1 = captures[1];
4819 0 : tree res_op2;
4820 0 : res_op2 = build_zero_cst (type);
4821 0 : tree _r;
4822 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
4823 0 : if (TREE_SIDE_EFFECTS (captures[0]))
4824 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4825 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 997, __FILE__, __LINE__, true);
4826 0 : return _r;
4827 : }
4828 1124 : next_after_fail1588:;
4829 : }
4830 : }
4831 : }
4832 : }
4833 : }
4834 : }
4835 2134193 : switch (TREE_CODE (_p1))
4836 : {
4837 0 : case VEC_COND_EXPR:
4838 0 : {
4839 0 : tree _q30 = TREE_OPERAND (_p1, 0);
4840 0 : tree _q31 = TREE_OPERAND (_p1, 1);
4841 0 : tree _q32 = TREE_OPERAND (_p1, 2);
4842 0 : {
4843 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
4844 0 : if (VECTOR_TYPE_P (type)
4845 0 : && (TREE_CODE_CLASS (TRUNC_DIV_EXPR) != tcc_comparison
4846 : || types_match (type, TREE_TYPE (captures[3]))
4847 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
4848 : || (optimize_vectors_before_lowering_p ()
4849 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
4850 : )
4851 : {
4852 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1589;
4853 0 : {
4854 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1589;
4855 0 : tree res_op0;
4856 0 : res_op0 = captures[2];
4857 0 : tree res_op1;
4858 0 : {
4859 0 : tree _o1[2], _r1;
4860 0 : _o1[0] = unshare_expr (captures[0]);
4861 0 : _o1[1] = captures[3];
4862 0 : _r1 = fold_build2_loc (loc, TRUNC_DIV_EXPR, type, _o1[0], _o1[1]);
4863 0 : if (EXPR_P (_r1))
4864 0 : goto next_after_fail1589;
4865 0 : res_op1 = _r1;
4866 : }
4867 0 : tree res_op2;
4868 0 : {
4869 0 : tree _o1[2], _r1;
4870 0 : _o1[0] = captures[0];
4871 0 : _o1[1] = captures[4];
4872 0 : _r1 = fold_build2_loc (loc, TRUNC_DIV_EXPR, type, _o1[0], _o1[1]);
4873 0 : if (EXPR_P (_r1))
4874 0 : goto next_after_fail1589;
4875 0 : res_op2 = _r1;
4876 : }
4877 0 : tree _r;
4878 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
4879 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
4880 0 : return _r;
4881 : }
4882 0 : next_after_fail1589:;
4883 : }
4884 : }
4885 0 : break;
4886 : }
4887 : default:;
4888 : }
4889 : return NULL_TREE;
4890 : }
4891 :
4892 : tree
4893 0 : generic_simplify_ROUND_DIV_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
4894 : {
4895 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4896 0 : if (integer_onep (_p1))
4897 : {
4898 0 : {
4899 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4900 0 : tree res = generic_simplify_184 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4901 0 : if (res) return res;
4902 : }
4903 : }
4904 0 : if (integer_zerop (_p0))
4905 : {
4906 0 : {
4907 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4908 0 : tree res = generic_simplify_315 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4909 0 : if (res) return res;
4910 : }
4911 : }
4912 0 : switch (TREE_CODE (_p1))
4913 : {
4914 0 : case SSA_NAME:
4915 0 : {
4916 0 : {
4917 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4918 0 : tree res = generic_simplify_317 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4919 0 : if (res) return res;
4920 : }
4921 0 : break;
4922 : }
4923 0 : default:;
4924 : }
4925 0 : if (integer_minus_onep (_p1))
4926 : {
4927 0 : {
4928 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4929 0 : tree res = generic_simplify_316 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4930 0 : if (res) return res;
4931 : }
4932 : }
4933 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
4934 : {
4935 0 : {
4936 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4937 0 : tree res = generic_simplify_318 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4938 0 : if (res) return res;
4939 : }
4940 : }
4941 0 : switch (TREE_CODE (_p1))
4942 : {
4943 0 : case ABS_EXPR:
4944 0 : {
4945 0 : tree _q30 = TREE_OPERAND (_p1, 0);
4946 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
4947 : {
4948 0 : {
4949 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4950 0 : tree res = generic_simplify_319 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4951 0 : if (res) return res;
4952 : }
4953 : }
4954 : break;
4955 : }
4956 0 : default:;
4957 : }
4958 0 : switch (TREE_CODE (_p0))
4959 : {
4960 0 : case ABS_EXPR:
4961 0 : {
4962 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4963 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4964 : {
4965 0 : {
4966 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4967 0 : tree res = generic_simplify_319 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4968 0 : if (res) return res;
4969 : }
4970 : }
4971 : break;
4972 : }
4973 0 : default:;
4974 : }
4975 0 : switch (TREE_CODE (_p1))
4976 : {
4977 0 : case NEGATE_EXPR:
4978 0 : {
4979 0 : tree _q30 = TREE_OPERAND (_p1, 0);
4980 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
4981 : {
4982 0 : {
4983 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4984 0 : tree res = generic_simplify_320 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
4985 0 : if (res) return res;
4986 : }
4987 : }
4988 : break;
4989 : }
4990 0 : default:;
4991 : }
4992 0 : switch (TREE_CODE (_p0))
4993 : {
4994 0 : case NEGATE_EXPR:
4995 0 : {
4996 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4997 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
4998 : {
4999 0 : {
5000 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5001 0 : tree res = generic_simplify_320 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
5002 0 : if (res) return res;
5003 : }
5004 : }
5005 : break;
5006 : }
5007 0 : CASE_CONVERT:
5008 0 : {
5009 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5010 0 : switch (TREE_CODE (_q20))
5011 : {
5012 0 : case BIT_AND_EXPR:
5013 0 : {
5014 0 : tree _q30 = TREE_OPERAND (_q20, 0);
5015 0 : tree _q31 = TREE_OPERAND (_q20, 1);
5016 0 : switch (TREE_CODE (_q31))
5017 : {
5018 0 : case INTEGER_CST:
5019 0 : {
5020 0 : switch (TREE_CODE (_p1))
5021 : {
5022 0 : case INTEGER_CST:
5023 0 : {
5024 0 : {
5025 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5026 0 : tree res = generic_simplify_322 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
5027 0 : if (res) return res;
5028 : }
5029 0 : break;
5030 : }
5031 : default:;
5032 : }
5033 : break;
5034 : }
5035 : default:;
5036 : }
5037 : break;
5038 : }
5039 : default:;
5040 : }
5041 : break;
5042 : }
5043 0 : case BIT_AND_EXPR:
5044 0 : {
5045 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5046 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5047 0 : switch (TREE_CODE (_q21))
5048 : {
5049 0 : case INTEGER_CST:
5050 0 : {
5051 0 : switch (TREE_CODE (_p1))
5052 : {
5053 0 : case INTEGER_CST:
5054 0 : {
5055 0 : {
5056 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5057 0 : tree res = generic_simplify_322 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
5058 0 : if (res) return res;
5059 : }
5060 0 : break;
5061 : }
5062 : default:;
5063 : }
5064 : break;
5065 : }
5066 : default:;
5067 : }
5068 : break;
5069 : }
5070 0 : case MULT_EXPR:
5071 0 : {
5072 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5073 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5074 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
5075 : {
5076 0 : {
5077 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
5078 0 : tree res = generic_simplify_324 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
5079 0 : if (res) return res;
5080 : }
5081 : }
5082 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5083 : {
5084 0 : {
5085 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
5086 0 : tree res = generic_simplify_324 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
5087 0 : if (res) return res;
5088 : }
5089 : }
5090 0 : switch (TREE_CODE (_q21))
5091 : {
5092 0 : case INTEGER_CST:
5093 0 : {
5094 0 : switch (TREE_CODE (_p1))
5095 : {
5096 0 : case MULT_EXPR:
5097 0 : {
5098 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5099 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5100 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5101 : {
5102 0 : switch (TREE_CODE (_q51))
5103 : {
5104 0 : case INTEGER_CST:
5105 0 : {
5106 0 : {
5107 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
5108 0 : tree res = generic_simplify_325 (loc, type, _p0, _p1, captures, ROUND_DIV_EXPR);
5109 0 : if (res) return res;
5110 : }
5111 0 : break;
5112 : }
5113 : default:;
5114 : }
5115 : }
5116 : break;
5117 : }
5118 : default:;
5119 : }
5120 : break;
5121 : }
5122 : default:;
5123 : }
5124 : break;
5125 : }
5126 0 : case VEC_COND_EXPR:
5127 0 : {
5128 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5129 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5130 0 : tree _q22 = TREE_OPERAND (_p0, 2);
5131 0 : switch (TREE_CODE (_p1))
5132 : {
5133 0 : case VEC_COND_EXPR:
5134 0 : {
5135 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5136 0 : tree _q61 = TREE_OPERAND (_p1, 1);
5137 0 : tree _q62 = TREE_OPERAND (_p1, 2);
5138 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5139 : {
5140 0 : {
5141 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
5142 0 : if (VECTOR_TYPE_P (type)
5143 0 : && (TREE_CODE_CLASS (ROUND_DIV_EXPR) != tcc_comparison
5144 : || types_match (type, TREE_TYPE (captures[2]))
5145 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
5146 : || (optimize_vectors_before_lowering_p ()
5147 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
5148 : )
5149 : {
5150 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1596;
5151 0 : {
5152 0 : tree res_op0;
5153 0 : res_op0 = captures[1];
5154 0 : tree res_op1;
5155 0 : {
5156 0 : tree _o1[2], _r1;
5157 0 : _o1[0] = captures[2];
5158 0 : _o1[1] = captures[5];
5159 0 : _r1 = fold_build2_loc (loc, ROUND_DIV_EXPR, type, _o1[0], _o1[1]);
5160 0 : if (EXPR_P (_r1))
5161 0 : goto next_after_fail1596;
5162 0 : res_op1 = _r1;
5163 : }
5164 0 : tree res_op2;
5165 0 : {
5166 0 : tree _o1[2], _r1;
5167 0 : _o1[0] = captures[3];
5168 0 : _o1[1] = captures[6];
5169 0 : _r1 = fold_build2_loc (loc, ROUND_DIV_EXPR, type, _o1[0], _o1[1]);
5170 0 : if (EXPR_P (_r1))
5171 0 : goto next_after_fail1596;
5172 0 : res_op2 = _r1;
5173 : }
5174 0 : tree _r;
5175 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5176 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
5177 0 : return _r;
5178 : }
5179 0 : next_after_fail1596:;
5180 : }
5181 : }
5182 : }
5183 : break;
5184 : }
5185 0 : default:;
5186 : }
5187 0 : {
5188 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
5189 0 : if (VECTOR_TYPE_P (type)
5190 0 : && (TREE_CODE_CLASS (ROUND_DIV_EXPR) != tcc_comparison
5191 : || types_match (type, TREE_TYPE (captures[2]))
5192 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
5193 : || (optimize_vectors_before_lowering_p ()
5194 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
5195 : )
5196 : {
5197 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1597;
5198 0 : {
5199 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1597;
5200 0 : tree res_op0;
5201 0 : res_op0 = captures[1];
5202 0 : tree res_op1;
5203 0 : {
5204 0 : tree _o1[2], _r1;
5205 0 : _o1[0] = captures[2];
5206 0 : _o1[1] = unshare_expr (captures[4]);
5207 0 : _r1 = fold_build2_loc (loc, ROUND_DIV_EXPR, type, _o1[0], _o1[1]);
5208 0 : if (EXPR_P (_r1))
5209 0 : goto next_after_fail1597;
5210 0 : res_op1 = _r1;
5211 : }
5212 0 : tree res_op2;
5213 0 : {
5214 0 : tree _o1[2], _r1;
5215 0 : _o1[0] = captures[3];
5216 0 : _o1[1] = captures[4];
5217 0 : _r1 = fold_build2_loc (loc, ROUND_DIV_EXPR, type, _o1[0], _o1[1]);
5218 0 : if (EXPR_P (_r1))
5219 0 : goto next_after_fail1597;
5220 0 : res_op2 = _r1;
5221 : }
5222 0 : tree _r;
5223 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5224 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
5225 0 : return _r;
5226 : }
5227 0 : next_after_fail1597:;
5228 : }
5229 : }
5230 0 : break;
5231 : }
5232 0 : default:;
5233 : }
5234 0 : switch (TREE_CODE (_p1))
5235 : {
5236 0 : case VEC_COND_EXPR:
5237 0 : {
5238 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5239 0 : tree _q31 = TREE_OPERAND (_p1, 1);
5240 0 : tree _q32 = TREE_OPERAND (_p1, 2);
5241 0 : {
5242 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
5243 0 : if (VECTOR_TYPE_P (type)
5244 0 : && (TREE_CODE_CLASS (ROUND_DIV_EXPR) != tcc_comparison
5245 : || types_match (type, TREE_TYPE (captures[3]))
5246 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
5247 : || (optimize_vectors_before_lowering_p ()
5248 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
5249 : )
5250 : {
5251 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1598;
5252 0 : {
5253 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1598;
5254 0 : tree res_op0;
5255 0 : res_op0 = captures[2];
5256 0 : tree res_op1;
5257 0 : {
5258 0 : tree _o1[2], _r1;
5259 0 : _o1[0] = unshare_expr (captures[0]);
5260 0 : _o1[1] = captures[3];
5261 0 : _r1 = fold_build2_loc (loc, ROUND_DIV_EXPR, type, _o1[0], _o1[1]);
5262 0 : if (EXPR_P (_r1))
5263 0 : goto next_after_fail1598;
5264 0 : res_op1 = _r1;
5265 : }
5266 0 : tree res_op2;
5267 0 : {
5268 0 : tree _o1[2], _r1;
5269 0 : _o1[0] = captures[0];
5270 0 : _o1[1] = captures[4];
5271 0 : _r1 = fold_build2_loc (loc, ROUND_DIV_EXPR, type, _o1[0], _o1[1]);
5272 0 : if (EXPR_P (_r1))
5273 0 : goto next_after_fail1598;
5274 0 : res_op2 = _r1;
5275 : }
5276 0 : tree _r;
5277 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5278 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
5279 0 : return _r;
5280 : }
5281 0 : next_after_fail1598:;
5282 : }
5283 : }
5284 0 : break;
5285 : }
5286 : default:;
5287 : }
5288 : return NULL_TREE;
5289 : }
5290 :
5291 : tree
5292 6432017 : generic_simplify_RDIV_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
5293 : {
5294 6432017 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5295 6432017 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
5296 : {
5297 865 : {
5298 865 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5299 9 : if (FLOAT_TYPE_P (type)
5300 865 : && ! HONOR_NANS (type)
5301 867 : && ! HONOR_INFINITIES (type)
5302 : )
5303 : {
5304 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1605;
5305 2 : {
5306 2 : tree _r;
5307 2 : _r = build_one_cst (type);
5308 2 : if (TREE_SIDE_EFFECTS (captures[0]))
5309 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
5310 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 998, __FILE__, __LINE__, true);
5311 2 : return _r;
5312 : }
5313 0 : next_after_fail1605:;
5314 : }
5315 : }
5316 : }
5317 6432015 : switch (TREE_CODE (_p1))
5318 : {
5319 19432 : case NEGATE_EXPR:
5320 19432 : {
5321 19432 : tree _q30 = TREE_OPERAND (_p1, 0);
5322 19432 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5323 : {
5324 0 : {
5325 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5326 0 : tree res = generic_simplify_334 (loc, type, _p0, _p1, captures);
5327 0 : if (res) return res;
5328 : }
5329 : }
5330 : break;
5331 : }
5332 6432015 : default:;
5333 : }
5334 6432015 : switch (TREE_CODE (_p0))
5335 : {
5336 97247 : case NEGATE_EXPR:
5337 97247 : {
5338 97247 : tree _q20 = TREE_OPERAND (_p0, 0);
5339 97247 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5340 : {
5341 2 : {
5342 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5343 2 : tree res = generic_simplify_334 (loc, type, _p0, _p1, captures);
5344 2 : if (res) return res;
5345 : }
5346 : }
5347 : break;
5348 : }
5349 565301 : CASE_CONVERT:
5350 565301 : {
5351 565301 : tree _q20 = TREE_OPERAND (_p0, 0);
5352 565301 : switch (TREE_CODE (_p1))
5353 : {
5354 33453 : CASE_CONVERT:
5355 33453 : {
5356 33453 : tree _q40 = TREE_OPERAND (_p1, 0);
5357 33453 : switch (TREE_CODE (_q40))
5358 : {
5359 0 : case ABS_EXPR:
5360 0 : {
5361 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5362 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5363 : {
5364 0 : {
5365 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5366 0 : tree res = generic_simplify_335 (loc, type, _p0, _p1, captures);
5367 0 : if (res) return res;
5368 : }
5369 : }
5370 : break;
5371 : }
5372 : default:;
5373 : }
5374 : break;
5375 : }
5376 565301 : default:;
5377 : }
5378 565301 : switch (TREE_CODE (_q20))
5379 : {
5380 0 : case ABS_EXPR:
5381 0 : {
5382 0 : tree _q30 = TREE_OPERAND (_q20, 0);
5383 0 : switch (TREE_CODE (_p1))
5384 : {
5385 0 : CASE_CONVERT:
5386 0 : {
5387 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5388 0 : if ((_q50 == _q30 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q30, 0) && types_match (_q50, _q30)))
5389 : {
5390 0 : {
5391 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
5392 0 : tree res = generic_simplify_335 (loc, type, _p0, _p1, captures);
5393 0 : if (res) return res;
5394 : }
5395 : }
5396 : break;
5397 : }
5398 : default:;
5399 : }
5400 : break;
5401 : }
5402 : default:;
5403 : }
5404 : break;
5405 : }
5406 6432015 : default:;
5407 : }
5408 6432015 : switch (TREE_CODE (_p1))
5409 : {
5410 48 : case ABS_EXPR:
5411 48 : {
5412 48 : tree _q30 = TREE_OPERAND (_p1, 0);
5413 48 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5414 : {
5415 0 : {
5416 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5417 0 : tree res = generic_simplify_335 (loc, type, _p0, _p1, captures);
5418 0 : if (res) return res;
5419 : }
5420 : }
5421 : break;
5422 : }
5423 6432015 : default:;
5424 : }
5425 6432015 : switch (TREE_CODE (_p0))
5426 : {
5427 146 : case ABS_EXPR:
5428 146 : {
5429 146 : tree _q20 = TREE_OPERAND (_p0, 0);
5430 146 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5431 : {
5432 0 : {
5433 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5434 0 : tree res = generic_simplify_335 (loc, type, _p0, _p1, captures);
5435 0 : if (res) return res;
5436 : }
5437 : }
5438 : break;
5439 : }
5440 6432015 : default:;
5441 : }
5442 6432015 : if (real_onep (_p1))
5443 : {
5444 116 : {
5445 116 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5446 116 : if (!tree_expr_maybe_signaling_nan_p (captures[0])
5447 : )
5448 : {
5449 116 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1606;
5450 116 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1606;
5451 116 : {
5452 116 : tree res_op0;
5453 116 : res_op0 = captures[0];
5454 116 : tree _r;
5455 116 : _r = non_lvalue_loc (loc, res_op0);
5456 116 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 999, __FILE__, __LINE__, true);
5457 116 : return _r;
5458 : }
5459 : next_after_fail1606:;
5460 : }
5461 : }
5462 : }
5463 6431899 : if (real_minus_onep (_p1))
5464 : {
5465 36 : {
5466 36 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5467 36 : if (!tree_expr_maybe_signaling_nan_p (captures[0])
5468 : )
5469 : {
5470 36 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1607;
5471 36 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1607;
5472 36 : {
5473 36 : tree res_op0;
5474 36 : res_op0 = captures[0];
5475 36 : tree _r;
5476 36 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
5477 36 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1000, __FILE__, __LINE__, true);
5478 36 : return _r;
5479 : }
5480 : next_after_fail1607:;
5481 : }
5482 : }
5483 : }
5484 6431863 : switch (TREE_CODE (_p0))
5485 : {
5486 38442 : case RDIV_EXPR:
5487 38442 : {
5488 38442 : tree _q20 = TREE_OPERAND (_p0, 0);
5489 38442 : tree _q21 = TREE_OPERAND (_p0, 1);
5490 38442 : {
5491 38442 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
5492 38442 : if (flag_reciprocal_math
5493 : )
5494 : {
5495 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1608;
5496 12 : {
5497 12 : tree res_op0;
5498 12 : res_op0 = captures[1];
5499 12 : tree res_op1;
5500 12 : {
5501 12 : tree _o1[2], _r1;
5502 12 : _o1[0] = captures[2];
5503 12 : _o1[1] = captures[3];
5504 12 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5505 12 : res_op1 = _r1;
5506 : }
5507 12 : tree _r;
5508 12 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
5509 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1001, __FILE__, __LINE__, true);
5510 12 : return _r;
5511 : }
5512 0 : next_after_fail1608:;
5513 : }
5514 : }
5515 38430 : break;
5516 : }
5517 6431851 : default:;
5518 : }
5519 6431851 : switch (TREE_CODE (_p1))
5520 : {
5521 984738 : case MULT_EXPR:
5522 984738 : {
5523 984738 : tree _q30 = TREE_OPERAND (_p1, 0);
5524 984738 : tree _q31 = TREE_OPERAND (_p1, 1);
5525 984738 : switch (TREE_CODE (_q31))
5526 : {
5527 386479 : case REAL_CST:
5528 386479 : {
5529 386479 : {
5530 386479 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
5531 386479 : if (flag_reciprocal_math
5532 : )
5533 : {
5534 224 : {
5535 224 : tree tem = const_binop (RDIV_EXPR, type, build_one_cst (type), captures[3]);
5536 224 : if (tem
5537 : )
5538 : {
5539 224 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1609;
5540 224 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1609;
5541 224 : {
5542 224 : tree res_op0;
5543 224 : {
5544 224 : tree _o1[2], _r1;
5545 224 : _o1[0] = captures[0];
5546 224 : _o1[1] = tem;
5547 224 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5548 224 : res_op0 = _r1;
5549 : }
5550 224 : tree res_op1;
5551 224 : res_op1 = captures[2];
5552 224 : tree _r;
5553 224 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
5554 224 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1002, __FILE__, __LINE__, true);
5555 224 : return _r;
5556 : }
5557 386255 : next_after_fail1609:;
5558 : }
5559 : }
5560 : }
5561 : }
5562 386255 : break;
5563 : }
5564 : default:;
5565 : }
5566 : break;
5567 : }
5568 1 : case RDIV_EXPR:
5569 1 : {
5570 1 : tree _q30 = TREE_OPERAND (_p1, 0);
5571 1 : tree _q31 = TREE_OPERAND (_p1, 1);
5572 1 : {
5573 1 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
5574 1 : if (flag_reciprocal_math
5575 : )
5576 : {
5577 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1610;
5578 1 : {
5579 1 : tree res_op0;
5580 1 : {
5581 1 : tree _o1[2], _r1;
5582 1 : _o1[0] = captures[0];
5583 1 : _o1[1] = captures[2];
5584 1 : _r1 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5585 1 : res_op0 = _r1;
5586 : }
5587 1 : tree res_op1;
5588 1 : res_op1 = captures[3];
5589 1 : tree _r;
5590 1 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
5591 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1003, __FILE__, __LINE__, true);
5592 1 : return _r;
5593 : }
5594 0 : next_after_fail1610:;
5595 : }
5596 : }
5597 0 : break;
5598 : }
5599 19432 : case NEGATE_EXPR:
5600 19432 : {
5601 19432 : tree _q30 = TREE_OPERAND (_p1, 0);
5602 19432 : {
5603 19432 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
5604 19432 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1611;
5605 19432 : {
5606 19432 : tree res_op0;
5607 19432 : {
5608 19432 : tree _o1[1], _r1;
5609 19432 : _o1[0] = captures[0];
5610 19432 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
5611 19432 : res_op0 = _r1;
5612 : }
5613 19432 : tree res_op1;
5614 19432 : res_op1 = captures[1];
5615 19432 : tree _r;
5616 19432 : _r = fold_build2_loc (loc, RDIV_EXPR, type, res_op0, res_op1);
5617 19432 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
5618 19432 : return _r;
5619 : }
5620 0 : next_after_fail1611:;
5621 : }
5622 0 : break;
5623 : }
5624 1091395 : case REAL_CST:
5625 1091395 : {
5626 1091395 : {
5627 1091395 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5628 1091395 : if (optimize
5629 : )
5630 : {
5631 1084587 : if (flag_reciprocal_math
5632 1084587 : && !real_zerop (captures[1])
5633 : )
5634 : {
5635 571 : {
5636 571 : tree tem = const_binop (RDIV_EXPR, type, build_one_cst (type), captures[1]);
5637 571 : if (tem
5638 : )
5639 : {
5640 570 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1612;
5641 570 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1612;
5642 570 : {
5643 570 : tree res_op0;
5644 570 : res_op0 = captures[0];
5645 570 : tree res_op1;
5646 570 : res_op1 = tem;
5647 570 : tree _r;
5648 570 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
5649 570 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
5650 570 : return _r;
5651 : }
5652 762456 : next_after_fail1612:;
5653 : }
5654 : }
5655 : }
5656 : else
5657 : {
5658 1084016 : if (REAL_CST != COMPLEX_CST
5659 : )
5660 : {
5661 1084016 : {
5662 1084016 : tree inverse = exact_inverse (type, captures[1]);
5663 1084016 : if (inverse
5664 : )
5665 : {
5666 328369 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1613;
5667 328369 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1613;
5668 328369 : {
5669 328369 : tree res_op0;
5670 328369 : res_op0 = captures[0];
5671 328369 : tree res_op1;
5672 328369 : res_op1 = inverse;
5673 328369 : tree _r;
5674 328369 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
5675 328369 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
5676 328369 : return _r;
5677 : }
5678 762456 : next_after_fail1613:;
5679 : }
5680 : }
5681 : }
5682 : }
5683 : }
5684 : }
5685 762456 : break;
5686 : }
5687 114 : case COMPLEX_CST:
5688 114 : {
5689 114 : {
5690 114 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5691 114 : if (optimize
5692 : )
5693 : {
5694 106 : if (flag_reciprocal_math
5695 106 : && !real_zerop (captures[1])
5696 : )
5697 : {
5698 7 : {
5699 7 : tree tem = const_binop (RDIV_EXPR, type, build_one_cst (type), captures[1]);
5700 7 : if (tem
5701 : )
5702 : {
5703 7 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1614;
5704 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1614;
5705 7 : {
5706 7 : tree res_op0;
5707 7 : res_op0 = captures[0];
5708 7 : tree res_op1;
5709 7 : res_op1 = tem;
5710 7 : tree _r;
5711 7 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
5712 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
5713 7 : return _r;
5714 : }
5715 107 : next_after_fail1614:;
5716 : }
5717 : }
5718 : }
5719 : else
5720 : {
5721 : if (COMPLEX_CST != COMPLEX_CST
5722 : )
5723 : {
5724 : {
5725 : tree inverse = exact_inverse (type, captures[1]);
5726 : if (inverse
5727 : )
5728 : {
5729 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1615;
5730 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1615;
5731 : {
5732 : tree res_op0;
5733 : res_op0 = captures[0];
5734 : tree res_op1;
5735 : res_op1 = inverse;
5736 : tree _r;
5737 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
5738 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
5739 : return _r;
5740 : }
5741 : next_after_fail1615:;
5742 : }
5743 : }
5744 : }
5745 : }
5746 : }
5747 : }
5748 107 : break;
5749 : }
5750 49 : case VECTOR_CST:
5751 49 : {
5752 49 : {
5753 49 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
5754 49 : if (optimize
5755 : )
5756 : {
5757 45 : if (flag_reciprocal_math
5758 45 : && !real_zerop (captures[1])
5759 : )
5760 : {
5761 4 : {
5762 4 : tree tem = const_binop (RDIV_EXPR, type, build_one_cst (type), captures[1]);
5763 4 : if (tem
5764 : )
5765 : {
5766 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1616;
5767 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1616;
5768 0 : {
5769 0 : tree res_op0;
5770 0 : res_op0 = captures[0];
5771 0 : tree res_op1;
5772 0 : res_op1 = tem;
5773 0 : tree _r;
5774 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
5775 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
5776 0 : return _r;
5777 : }
5778 19 : next_after_fail1616:;
5779 : }
5780 : }
5781 : }
5782 : else
5783 : {
5784 41 : if (VECTOR_CST != COMPLEX_CST
5785 : )
5786 : {
5787 41 : {
5788 41 : tree inverse = exact_inverse (type, captures[1]);
5789 41 : if (inverse
5790 : )
5791 : {
5792 30 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1617;
5793 30 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1617;
5794 30 : {
5795 30 : tree res_op0;
5796 30 : res_op0 = captures[0];
5797 30 : tree res_op1;
5798 30 : res_op1 = inverse;
5799 30 : tree _r;
5800 30 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
5801 30 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
5802 30 : return _r;
5803 : }
5804 19 : next_after_fail1617:;
5805 : }
5806 : }
5807 : }
5808 : }
5809 : }
5810 : }
5811 19 : break;
5812 : }
5813 6083218 : default:;
5814 : }
5815 6083218 : switch (TREE_CODE (_p0))
5816 : {
5817 0 : case VEC_COND_EXPR:
5818 0 : {
5819 0 : tree _q20 = TREE_OPERAND (_p0, 0);
5820 0 : tree _q21 = TREE_OPERAND (_p0, 1);
5821 0 : tree _q22 = TREE_OPERAND (_p0, 2);
5822 0 : switch (TREE_CODE (_p1))
5823 : {
5824 0 : case VEC_COND_EXPR:
5825 0 : {
5826 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5827 0 : tree _q61 = TREE_OPERAND (_p1, 1);
5828 0 : tree _q62 = TREE_OPERAND (_p1, 2);
5829 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5830 : {
5831 0 : {
5832 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
5833 0 : if (VECTOR_TYPE_P (type)
5834 0 : && (TREE_CODE_CLASS (RDIV_EXPR) != tcc_comparison
5835 : || types_match (type, TREE_TYPE (captures[2]))
5836 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
5837 : || (optimize_vectors_before_lowering_p ()
5838 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
5839 : )
5840 : {
5841 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1618;
5842 0 : {
5843 0 : tree res_op0;
5844 0 : res_op0 = captures[1];
5845 0 : tree res_op1;
5846 0 : {
5847 0 : tree _o1[2], _r1;
5848 0 : _o1[0] = captures[2];
5849 0 : _o1[1] = captures[5];
5850 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, type, _o1[0], _o1[1]);
5851 0 : if (EXPR_P (_r1))
5852 0 : goto next_after_fail1618;
5853 0 : res_op1 = _r1;
5854 : }
5855 0 : tree res_op2;
5856 0 : {
5857 0 : tree _o1[2], _r1;
5858 0 : _o1[0] = captures[3];
5859 0 : _o1[1] = captures[6];
5860 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, type, _o1[0], _o1[1]);
5861 0 : if (EXPR_P (_r1))
5862 0 : goto next_after_fail1618;
5863 0 : res_op2 = _r1;
5864 : }
5865 0 : tree _r;
5866 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5867 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
5868 0 : return _r;
5869 : }
5870 0 : next_after_fail1618:;
5871 : }
5872 : }
5873 : }
5874 : break;
5875 : }
5876 0 : default:;
5877 : }
5878 0 : {
5879 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
5880 0 : if (VECTOR_TYPE_P (type)
5881 0 : && (TREE_CODE_CLASS (RDIV_EXPR) != tcc_comparison
5882 : || types_match (type, TREE_TYPE (captures[2]))
5883 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
5884 : || (optimize_vectors_before_lowering_p ()
5885 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
5886 : )
5887 : {
5888 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1619;
5889 0 : {
5890 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1619;
5891 0 : tree res_op0;
5892 0 : res_op0 = captures[1];
5893 0 : tree res_op1;
5894 0 : {
5895 0 : tree _o1[2], _r1;
5896 0 : _o1[0] = captures[2];
5897 0 : _o1[1] = unshare_expr (captures[4]);
5898 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, type, _o1[0], _o1[1]);
5899 0 : if (EXPR_P (_r1))
5900 0 : goto next_after_fail1619;
5901 0 : res_op1 = _r1;
5902 : }
5903 0 : tree res_op2;
5904 0 : {
5905 0 : tree _o1[2], _r1;
5906 0 : _o1[0] = captures[3];
5907 0 : _o1[1] = captures[4];
5908 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, type, _o1[0], _o1[1]);
5909 0 : if (EXPR_P (_r1))
5910 0 : goto next_after_fail1619;
5911 0 : res_op2 = _r1;
5912 : }
5913 0 : tree _r;
5914 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5915 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
5916 0 : return _r;
5917 : }
5918 0 : next_after_fail1619:;
5919 : }
5920 : }
5921 0 : break;
5922 : }
5923 6083218 : default:;
5924 : }
5925 6083218 : switch (TREE_CODE (_p1))
5926 : {
5927 0 : case VEC_COND_EXPR:
5928 0 : {
5929 0 : tree _q30 = TREE_OPERAND (_p1, 0);
5930 0 : tree _q31 = TREE_OPERAND (_p1, 1);
5931 0 : tree _q32 = TREE_OPERAND (_p1, 2);
5932 0 : {
5933 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
5934 0 : if (VECTOR_TYPE_P (type)
5935 0 : && (TREE_CODE_CLASS (RDIV_EXPR) != tcc_comparison
5936 : || types_match (type, TREE_TYPE (captures[3]))
5937 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
5938 : || (optimize_vectors_before_lowering_p ()
5939 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
5940 : )
5941 : {
5942 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1620;
5943 0 : {
5944 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1620;
5945 0 : tree res_op0;
5946 0 : res_op0 = captures[2];
5947 0 : tree res_op1;
5948 0 : {
5949 0 : tree _o1[2], _r1;
5950 0 : _o1[0] = unshare_expr (captures[0]);
5951 0 : _o1[1] = captures[3];
5952 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, type, _o1[0], _o1[1]);
5953 0 : if (EXPR_P (_r1))
5954 0 : goto next_after_fail1620;
5955 0 : res_op1 = _r1;
5956 : }
5957 0 : tree res_op2;
5958 0 : {
5959 0 : tree _o1[2], _r1;
5960 0 : _o1[0] = captures[0];
5961 0 : _o1[1] = captures[4];
5962 0 : _r1 = fold_build2_loc (loc, RDIV_EXPR, type, _o1[0], _o1[1]);
5963 0 : if (EXPR_P (_r1))
5964 0 : goto next_after_fail1620;
5965 0 : res_op2 = _r1;
5966 : }
5967 0 : tree _r;
5968 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
5969 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
5970 0 : return _r;
5971 : }
5972 0 : next_after_fail1620:;
5973 : }
5974 : }
5975 0 : break;
5976 : }
5977 813444 : case CALL_EXPR:
5978 813444 : switch (get_call_combined_fn (_p1))
5979 : {
5980 20 : case CFN_BUILT_IN_SQRTF:
5981 20 : if (call_expr_nargs (_p1) == 1)
5982 : {
5983 20 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
5984 20 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
5985 : {
5986 0 : {
5987 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5988 0 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF);
5989 0 : if (res) return res;
5990 : }
5991 : }
5992 20 : switch (TREE_CODE (_q30))
5993 : {
5994 0 : case RDIV_EXPR:
5995 0 : {
5996 0 : tree _q40 = TREE_OPERAND (_q30, 0);
5997 0 : tree _q41 = TREE_OPERAND (_q30, 1);
5998 0 : {
5999 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q40, _q41 };
6000 0 : if (flag_unsafe_math_optimizations
6001 : )
6002 : {
6003 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1621;
6004 0 : {
6005 0 : tree res_op0;
6006 0 : res_op0 = captures[0];
6007 0 : tree res_op1;
6008 0 : {
6009 0 : tree _o1[1], _r1;
6010 0 : {
6011 0 : tree _o2[2], _r2;
6012 0 : _o2[0] = captures[4];
6013 0 : _o2[1] = captures[3];
6014 0 : _r2 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6015 0 : _o1[0] = _r2;
6016 : }
6017 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_SQRTF, TREE_TYPE (_o1[0]), 1, _o1[0]);
6018 0 : if (!_r1)
6019 0 : goto next_after_fail1621;
6020 0 : res_op1 = _r1;
6021 : }
6022 0 : tree _r;
6023 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6024 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
6025 0 : return _r;
6026 : }
6027 0 : next_after_fail1621:;
6028 : }
6029 : }
6030 0 : break;
6031 : }
6032 : default:;
6033 : }
6034 : }
6035 : break;
6036 0 : case CFN_BUILT_IN_SQRTL:
6037 0 : if (call_expr_nargs (_p1) == 1)
6038 : {
6039 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6040 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6041 : {
6042 0 : {
6043 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6044 0 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL);
6045 0 : if (res) return res;
6046 : }
6047 : }
6048 0 : switch (TREE_CODE (_q30))
6049 : {
6050 0 : case RDIV_EXPR:
6051 0 : {
6052 0 : tree _q40 = TREE_OPERAND (_q30, 0);
6053 0 : tree _q41 = TREE_OPERAND (_q30, 1);
6054 0 : {
6055 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q40, _q41 };
6056 0 : if (flag_unsafe_math_optimizations
6057 : )
6058 : {
6059 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1622;
6060 0 : {
6061 0 : tree res_op0;
6062 0 : res_op0 = captures[0];
6063 0 : tree res_op1;
6064 0 : {
6065 0 : tree _o1[1], _r1;
6066 0 : {
6067 0 : tree _o2[2], _r2;
6068 0 : _o2[0] = captures[4];
6069 0 : _o2[1] = captures[3];
6070 0 : _r2 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6071 0 : _o1[0] = _r2;
6072 : }
6073 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_SQRTL, TREE_TYPE (_o1[0]), 1, _o1[0]);
6074 0 : if (!_r1)
6075 0 : goto next_after_fail1622;
6076 0 : res_op1 = _r1;
6077 : }
6078 0 : tree _r;
6079 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6080 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
6081 0 : return _r;
6082 : }
6083 0 : next_after_fail1622:;
6084 : }
6085 : }
6086 0 : break;
6087 : }
6088 : default:;
6089 : }
6090 : }
6091 : break;
6092 27 : case CFN_BUILT_IN_EXP:
6093 27 : if (call_expr_nargs (_p1) == 1)
6094 : {
6095 27 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6096 27 : {
6097 27 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6098 27 : if (flag_unsafe_math_optimizations
6099 : )
6100 : {
6101 27 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1623;
6102 27 : {
6103 27 : tree res_op0;
6104 27 : res_op0 = captures[0];
6105 27 : tree res_op1;
6106 27 : {
6107 27 : tree _o1[1], _r1;
6108 27 : {
6109 27 : tree _o2[1], _r2;
6110 27 : _o2[0] = captures[2];
6111 27 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6112 27 : _o1[0] = _r2;
6113 : }
6114 27 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXP, TREE_TYPE (_o1[0]), 1, _o1[0]);
6115 27 : if (!_r1)
6116 0 : goto next_after_fail1623;
6117 27 : res_op1 = _r1;
6118 : }
6119 27 : tree _r;
6120 27 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6121 27 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6122 27 : return _r;
6123 : }
6124 0 : next_after_fail1623:;
6125 : }
6126 : }
6127 : }
6128 : break;
6129 24 : case CFN_BUILT_IN_EXP10F:
6130 24 : if (call_expr_nargs (_p1) == 1)
6131 : {
6132 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6133 24 : {
6134 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6135 24 : if (flag_unsafe_math_optimizations
6136 : )
6137 : {
6138 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1624;
6139 24 : {
6140 24 : tree res_op0;
6141 24 : res_op0 = captures[0];
6142 24 : tree res_op1;
6143 24 : {
6144 24 : tree _o1[1], _r1;
6145 24 : {
6146 24 : tree _o2[1], _r2;
6147 24 : _o2[0] = captures[2];
6148 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6149 24 : _o1[0] = _r2;
6150 : }
6151 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXP10F, TREE_TYPE (_o1[0]), 1, _o1[0]);
6152 24 : if (!_r1)
6153 0 : goto next_after_fail1624;
6154 24 : res_op1 = _r1;
6155 : }
6156 24 : tree _r;
6157 24 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6158 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6159 24 : return _r;
6160 : }
6161 0 : next_after_fail1624:;
6162 : }
6163 : }
6164 : }
6165 : break;
6166 24 : case CFN_BUILT_IN_EXP10L:
6167 24 : if (call_expr_nargs (_p1) == 1)
6168 : {
6169 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6170 24 : {
6171 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6172 24 : if (flag_unsafe_math_optimizations
6173 : )
6174 : {
6175 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1625;
6176 24 : {
6177 24 : tree res_op0;
6178 24 : res_op0 = captures[0];
6179 24 : tree res_op1;
6180 24 : {
6181 24 : tree _o1[1], _r1;
6182 24 : {
6183 24 : tree _o2[1], _r2;
6184 24 : _o2[0] = captures[2];
6185 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6186 24 : _o1[0] = _r2;
6187 : }
6188 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXP10L, TREE_TYPE (_o1[0]), 1, _o1[0]);
6189 24 : if (!_r1)
6190 0 : goto next_after_fail1625;
6191 24 : res_op1 = _r1;
6192 : }
6193 24 : tree _r;
6194 24 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6195 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6196 24 : return _r;
6197 : }
6198 0 : next_after_fail1625:;
6199 : }
6200 : }
6201 : }
6202 : break;
6203 3 : case CFN_BUILT_IN_CBRT:
6204 3 : if (call_expr_nargs (_p1) == 1)
6205 : {
6206 3 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6207 3 : switch (TREE_CODE (_q30))
6208 : {
6209 2 : case RDIV_EXPR:
6210 2 : {
6211 2 : tree _q40 = TREE_OPERAND (_q30, 0);
6212 2 : tree _q41 = TREE_OPERAND (_q30, 1);
6213 2 : {
6214 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q40, _q41 };
6215 2 : if (flag_unsafe_math_optimizations
6216 : )
6217 : {
6218 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1626;
6219 2 : {
6220 2 : tree res_op0;
6221 2 : res_op0 = captures[0];
6222 2 : tree res_op1;
6223 2 : {
6224 2 : tree _o1[1], _r1;
6225 2 : {
6226 2 : tree _o2[2], _r2;
6227 2 : _o2[0] = captures[4];
6228 2 : _o2[1] = captures[3];
6229 2 : _r2 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6230 2 : _o1[0] = _r2;
6231 : }
6232 2 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_CBRT, TREE_TYPE (_o1[0]), 1, _o1[0]);
6233 2 : if (!_r1)
6234 0 : goto next_after_fail1626;
6235 2 : res_op1 = _r1;
6236 : }
6237 2 : tree _r;
6238 2 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6239 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
6240 2 : return _r;
6241 : }
6242 0 : next_after_fail1626:;
6243 : }
6244 : }
6245 0 : break;
6246 : }
6247 : default:;
6248 : }
6249 : }
6250 : break;
6251 24 : case CFN_BUILT_IN_EXP2:
6252 24 : if (call_expr_nargs (_p1) == 1)
6253 : {
6254 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6255 24 : {
6256 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6257 24 : if (flag_unsafe_math_optimizations
6258 : )
6259 : {
6260 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1627;
6261 24 : {
6262 24 : tree res_op0;
6263 24 : res_op0 = captures[0];
6264 24 : tree res_op1;
6265 24 : {
6266 24 : tree _o1[1], _r1;
6267 24 : {
6268 24 : tree _o2[1], _r2;
6269 24 : _o2[0] = captures[2];
6270 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6271 24 : _o1[0] = _r2;
6272 : }
6273 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXP2, TREE_TYPE (_o1[0]), 1, _o1[0]);
6274 24 : if (!_r1)
6275 0 : goto next_after_fail1627;
6276 24 : res_op1 = _r1;
6277 : }
6278 24 : tree _r;
6279 24 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6280 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6281 24 : return _r;
6282 : }
6283 0 : next_after_fail1627:;
6284 : }
6285 : }
6286 : }
6287 : break;
6288 25 : case CFN_BUILT_IN_EXPF:
6289 25 : if (call_expr_nargs (_p1) == 1)
6290 : {
6291 25 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6292 25 : {
6293 25 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6294 25 : if (flag_unsafe_math_optimizations
6295 : )
6296 : {
6297 25 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1628;
6298 25 : {
6299 25 : tree res_op0;
6300 25 : res_op0 = captures[0];
6301 25 : tree res_op1;
6302 25 : {
6303 25 : tree _o1[1], _r1;
6304 25 : {
6305 25 : tree _o2[1], _r2;
6306 25 : _o2[0] = captures[2];
6307 25 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6308 25 : _o1[0] = _r2;
6309 : }
6310 25 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXPF, TREE_TYPE (_o1[0]), 1, _o1[0]);
6311 25 : if (!_r1)
6312 0 : goto next_after_fail1628;
6313 25 : res_op1 = _r1;
6314 : }
6315 25 : tree _r;
6316 25 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6317 25 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6318 25 : return _r;
6319 : }
6320 0 : next_after_fail1628:;
6321 : }
6322 : }
6323 : }
6324 : break;
6325 25 : case CFN_BUILT_IN_EXPL:
6326 25 : if (call_expr_nargs (_p1) == 1)
6327 : {
6328 25 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6329 25 : {
6330 25 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6331 25 : if (flag_unsafe_math_optimizations
6332 : )
6333 : {
6334 25 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1629;
6335 25 : {
6336 25 : tree res_op0;
6337 25 : res_op0 = captures[0];
6338 25 : tree res_op1;
6339 25 : {
6340 25 : tree _o1[1], _r1;
6341 25 : {
6342 25 : tree _o2[1], _r2;
6343 25 : _o2[0] = captures[2];
6344 25 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6345 25 : _o1[0] = _r2;
6346 : }
6347 25 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXPL, TREE_TYPE (_o1[0]), 1, _o1[0]);
6348 25 : if (!_r1)
6349 0 : goto next_after_fail1629;
6350 25 : res_op1 = _r1;
6351 : }
6352 25 : tree _r;
6353 25 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6354 25 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6355 25 : return _r;
6356 : }
6357 0 : next_after_fail1629:;
6358 : }
6359 : }
6360 : }
6361 : break;
6362 298 : case CFN_BUILT_IN_SQRT:
6363 298 : if (call_expr_nargs (_p1) == 1)
6364 : {
6365 298 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6366 298 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6367 : {
6368 0 : {
6369 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6370 0 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT);
6371 0 : if (res) return res;
6372 : }
6373 : }
6374 298 : switch (TREE_CODE (_q30))
6375 : {
6376 2 : case RDIV_EXPR:
6377 2 : {
6378 2 : tree _q40 = TREE_OPERAND (_q30, 0);
6379 2 : tree _q41 = TREE_OPERAND (_q30, 1);
6380 2 : {
6381 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q40, _q41 };
6382 2 : if (flag_unsafe_math_optimizations
6383 : )
6384 : {
6385 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1630;
6386 2 : {
6387 2 : tree res_op0;
6388 2 : res_op0 = captures[0];
6389 2 : tree res_op1;
6390 2 : {
6391 2 : tree _o1[1], _r1;
6392 2 : {
6393 2 : tree _o2[2], _r2;
6394 2 : _o2[0] = captures[4];
6395 2 : _o2[1] = captures[3];
6396 2 : _r2 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6397 2 : _o1[0] = _r2;
6398 : }
6399 2 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_SQRT, TREE_TYPE (_o1[0]), 1, _o1[0]);
6400 2 : if (!_r1)
6401 0 : goto next_after_fail1630;
6402 2 : res_op1 = _r1;
6403 : }
6404 2 : tree _r;
6405 2 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6406 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
6407 2 : return _r;
6408 : }
6409 0 : next_after_fail1630:;
6410 : }
6411 : }
6412 0 : break;
6413 : }
6414 : default:;
6415 : }
6416 : }
6417 : break;
6418 0 : case CFN_EXP:
6419 0 : if (call_expr_nargs (_p1) == 1)
6420 : {
6421 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6422 0 : {
6423 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6424 0 : if (flag_unsafe_math_optimizations
6425 : )
6426 : {
6427 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1631;
6428 0 : {
6429 0 : tree res_op0;
6430 0 : res_op0 = captures[0];
6431 0 : tree res_op1;
6432 0 : {
6433 0 : tree _o1[1], _r1;
6434 0 : {
6435 0 : tree _o2[1], _r2;
6436 0 : _o2[0] = captures[2];
6437 0 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6438 0 : _o1[0] = _r2;
6439 : }
6440 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_EXP, TREE_TYPE (_o1[0]), 1, _o1[0]);
6441 0 : if (!_r1)
6442 0 : goto next_after_fail1631;
6443 0 : res_op1 = _r1;
6444 : }
6445 0 : tree _r;
6446 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6447 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6448 0 : return _r;
6449 : }
6450 0 : next_after_fail1631:;
6451 : }
6452 : }
6453 : }
6454 : break;
6455 24 : case CFN_BUILT_IN_POW10F:
6456 24 : if (call_expr_nargs (_p1) == 1)
6457 : {
6458 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6459 24 : {
6460 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6461 24 : if (flag_unsafe_math_optimizations
6462 : )
6463 : {
6464 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1632;
6465 24 : {
6466 24 : tree res_op0;
6467 24 : res_op0 = captures[0];
6468 24 : tree res_op1;
6469 24 : {
6470 24 : tree _o1[1], _r1;
6471 24 : {
6472 24 : tree _o2[1], _r2;
6473 24 : _o2[0] = captures[2];
6474 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6475 24 : _o1[0] = _r2;
6476 : }
6477 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_POW10F, TREE_TYPE (_o1[0]), 1, _o1[0]);
6478 24 : if (!_r1)
6479 24 : goto next_after_fail1632;
6480 0 : res_op1 = _r1;
6481 : }
6482 0 : tree _r;
6483 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6484 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6485 0 : return _r;
6486 : }
6487 24 : next_after_fail1632:;
6488 : }
6489 : }
6490 : }
6491 : break;
6492 24 : case CFN_BUILT_IN_POW10L:
6493 24 : if (call_expr_nargs (_p1) == 1)
6494 : {
6495 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6496 24 : {
6497 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6498 24 : if (flag_unsafe_math_optimizations
6499 : )
6500 : {
6501 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1633;
6502 24 : {
6503 24 : tree res_op0;
6504 24 : res_op0 = captures[0];
6505 24 : tree res_op1;
6506 24 : {
6507 24 : tree _o1[1], _r1;
6508 24 : {
6509 24 : tree _o2[1], _r2;
6510 24 : _o2[0] = captures[2];
6511 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6512 24 : _o1[0] = _r2;
6513 : }
6514 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_POW10L, TREE_TYPE (_o1[0]), 1, _o1[0]);
6515 24 : if (!_r1)
6516 24 : goto next_after_fail1633;
6517 0 : res_op1 = _r1;
6518 : }
6519 0 : tree _r;
6520 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6521 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6522 0 : return _r;
6523 : }
6524 24 : next_after_fail1633:;
6525 : }
6526 : }
6527 : }
6528 : break;
6529 0 : case CFN_EXP2:
6530 0 : if (call_expr_nargs (_p1) == 1)
6531 : {
6532 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6533 0 : {
6534 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6535 0 : if (flag_unsafe_math_optimizations
6536 : )
6537 : {
6538 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1634;
6539 0 : {
6540 0 : tree res_op0;
6541 0 : res_op0 = captures[0];
6542 0 : tree res_op1;
6543 0 : {
6544 0 : tree _o1[1], _r1;
6545 0 : {
6546 0 : tree _o2[1], _r2;
6547 0 : _o2[0] = captures[2];
6548 0 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6549 0 : _o1[0] = _r2;
6550 : }
6551 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_EXP2, TREE_TYPE (_o1[0]), 1, _o1[0]);
6552 0 : if (!_r1)
6553 0 : goto next_after_fail1634;
6554 0 : res_op1 = _r1;
6555 : }
6556 0 : tree _r;
6557 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6558 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6559 0 : return _r;
6560 : }
6561 0 : next_after_fail1634:;
6562 : }
6563 : }
6564 : }
6565 : break;
6566 0 : case CFN_SQRT:
6567 0 : if (call_expr_nargs (_p1) == 1)
6568 : {
6569 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6570 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6571 : {
6572 0 : {
6573 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6574 0 : tree res = generic_simplify_336 (loc, type, _p0, _p1, captures, CFN_SQRT);
6575 0 : if (res) return res;
6576 : }
6577 : }
6578 0 : switch (TREE_CODE (_q30))
6579 : {
6580 0 : case RDIV_EXPR:
6581 0 : {
6582 0 : tree _q40 = TREE_OPERAND (_q30, 0);
6583 0 : tree _q41 = TREE_OPERAND (_q30, 1);
6584 0 : {
6585 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q40, _q41 };
6586 0 : if (flag_unsafe_math_optimizations
6587 : )
6588 : {
6589 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1635;
6590 0 : {
6591 0 : tree res_op0;
6592 0 : res_op0 = captures[0];
6593 0 : tree res_op1;
6594 0 : {
6595 0 : tree _o1[1], _r1;
6596 0 : {
6597 0 : tree _o2[2], _r2;
6598 0 : _o2[0] = captures[4];
6599 0 : _o2[1] = captures[3];
6600 0 : _r2 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6601 0 : _o1[0] = _r2;
6602 : }
6603 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_SQRT, TREE_TYPE (_o1[0]), 1, _o1[0]);
6604 0 : if (!_r1)
6605 0 : goto next_after_fail1635;
6606 0 : res_op1 = _r1;
6607 : }
6608 0 : tree _r;
6609 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6610 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
6611 0 : return _r;
6612 : }
6613 0 : next_after_fail1635:;
6614 : }
6615 : }
6616 0 : break;
6617 : }
6618 : default:;
6619 : }
6620 : }
6621 : break;
6622 0 : case CFN_EXP10:
6623 0 : if (call_expr_nargs (_p1) == 1)
6624 : {
6625 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6626 0 : {
6627 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6628 0 : if (flag_unsafe_math_optimizations
6629 : )
6630 : {
6631 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1636;
6632 0 : {
6633 0 : tree res_op0;
6634 0 : res_op0 = captures[0];
6635 0 : tree res_op1;
6636 0 : {
6637 0 : tree _o1[1], _r1;
6638 0 : {
6639 0 : tree _o2[1], _r2;
6640 0 : _o2[0] = captures[2];
6641 0 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6642 0 : _o1[0] = _r2;
6643 : }
6644 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_EXP10, TREE_TYPE (_o1[0]), 1, _o1[0]);
6645 0 : if (!_r1)
6646 0 : goto next_after_fail1636;
6647 0 : res_op1 = _r1;
6648 : }
6649 0 : tree _r;
6650 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6651 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6652 0 : return _r;
6653 : }
6654 0 : next_after_fail1636:;
6655 : }
6656 : }
6657 : }
6658 : break;
6659 0 : case CFN_BUILT_IN_CBRTF:
6660 0 : if (call_expr_nargs (_p1) == 1)
6661 : {
6662 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6663 0 : switch (TREE_CODE (_q30))
6664 : {
6665 0 : case RDIV_EXPR:
6666 0 : {
6667 0 : tree _q40 = TREE_OPERAND (_q30, 0);
6668 0 : tree _q41 = TREE_OPERAND (_q30, 1);
6669 0 : {
6670 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q40, _q41 };
6671 0 : if (flag_unsafe_math_optimizations
6672 : )
6673 : {
6674 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1637;
6675 0 : {
6676 0 : tree res_op0;
6677 0 : res_op0 = captures[0];
6678 0 : tree res_op1;
6679 0 : {
6680 0 : tree _o1[1], _r1;
6681 0 : {
6682 0 : tree _o2[2], _r2;
6683 0 : _o2[0] = captures[4];
6684 0 : _o2[1] = captures[3];
6685 0 : _r2 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6686 0 : _o1[0] = _r2;
6687 : }
6688 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_CBRTF, TREE_TYPE (_o1[0]), 1, _o1[0]);
6689 0 : if (!_r1)
6690 0 : goto next_after_fail1637;
6691 0 : res_op1 = _r1;
6692 : }
6693 0 : tree _r;
6694 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6695 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
6696 0 : return _r;
6697 : }
6698 0 : next_after_fail1637:;
6699 : }
6700 : }
6701 0 : break;
6702 : }
6703 : default:;
6704 : }
6705 : }
6706 : break;
6707 0 : case CFN_BUILT_IN_CBRTL:
6708 0 : if (call_expr_nargs (_p1) == 1)
6709 : {
6710 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6711 0 : switch (TREE_CODE (_q30))
6712 : {
6713 0 : case RDIV_EXPR:
6714 0 : {
6715 0 : tree _q40 = TREE_OPERAND (_q30, 0);
6716 0 : tree _q41 = TREE_OPERAND (_q30, 1);
6717 0 : {
6718 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q40, _q41 };
6719 0 : if (flag_unsafe_math_optimizations
6720 : )
6721 : {
6722 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1638;
6723 0 : {
6724 0 : tree res_op0;
6725 0 : res_op0 = captures[0];
6726 0 : tree res_op1;
6727 0 : {
6728 0 : tree _o1[1], _r1;
6729 0 : {
6730 0 : tree _o2[2], _r2;
6731 0 : _o2[0] = captures[4];
6732 0 : _o2[1] = captures[3];
6733 0 : _r2 = fold_build2_loc (loc, RDIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6734 0 : _o1[0] = _r2;
6735 : }
6736 0 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_CBRTL, TREE_TYPE (_o1[0]), 1, _o1[0]);
6737 0 : if (!_r1)
6738 0 : goto next_after_fail1638;
6739 0 : res_op1 = _r1;
6740 : }
6741 0 : tree _r;
6742 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6743 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
6744 0 : return _r;
6745 : }
6746 0 : next_after_fail1638:;
6747 : }
6748 : }
6749 0 : break;
6750 : }
6751 : default:;
6752 : }
6753 : }
6754 : break;
6755 24 : case CFN_BUILT_IN_EXP10:
6756 24 : if (call_expr_nargs (_p1) == 1)
6757 : {
6758 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6759 24 : {
6760 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6761 24 : if (flag_unsafe_math_optimizations
6762 : )
6763 : {
6764 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1639;
6765 24 : {
6766 24 : tree res_op0;
6767 24 : res_op0 = captures[0];
6768 24 : tree res_op1;
6769 24 : {
6770 24 : tree _o1[1], _r1;
6771 24 : {
6772 24 : tree _o2[1], _r2;
6773 24 : _o2[0] = captures[2];
6774 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6775 24 : _o1[0] = _r2;
6776 : }
6777 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXP10, TREE_TYPE (_o1[0]), 1, _o1[0]);
6778 24 : if (!_r1)
6779 0 : goto next_after_fail1639;
6780 24 : res_op1 = _r1;
6781 : }
6782 24 : tree _r;
6783 24 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6784 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6785 24 : return _r;
6786 : }
6787 0 : next_after_fail1639:;
6788 : }
6789 : }
6790 : }
6791 : break;
6792 24 : case CFN_BUILT_IN_EXP2F:
6793 24 : if (call_expr_nargs (_p1) == 1)
6794 : {
6795 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6796 24 : {
6797 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6798 24 : if (flag_unsafe_math_optimizations
6799 : )
6800 : {
6801 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1640;
6802 24 : {
6803 24 : tree res_op0;
6804 24 : res_op0 = captures[0];
6805 24 : tree res_op1;
6806 24 : {
6807 24 : tree _o1[1], _r1;
6808 24 : {
6809 24 : tree _o2[1], _r2;
6810 24 : _o2[0] = captures[2];
6811 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6812 24 : _o1[0] = _r2;
6813 : }
6814 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXP2F, TREE_TYPE (_o1[0]), 1, _o1[0]);
6815 24 : if (!_r1)
6816 0 : goto next_after_fail1640;
6817 24 : res_op1 = _r1;
6818 : }
6819 24 : tree _r;
6820 24 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6821 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6822 24 : return _r;
6823 : }
6824 0 : next_after_fail1640:;
6825 : }
6826 : }
6827 : }
6828 : break;
6829 24 : case CFN_BUILT_IN_EXP2L:
6830 24 : if (call_expr_nargs (_p1) == 1)
6831 : {
6832 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6833 24 : {
6834 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6835 24 : if (flag_unsafe_math_optimizations
6836 : )
6837 : {
6838 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1641;
6839 24 : {
6840 24 : tree res_op0;
6841 24 : res_op0 = captures[0];
6842 24 : tree res_op1;
6843 24 : {
6844 24 : tree _o1[1], _r1;
6845 24 : {
6846 24 : tree _o2[1], _r2;
6847 24 : _o2[0] = captures[2];
6848 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6849 24 : _o1[0] = _r2;
6850 : }
6851 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_EXP2L, TREE_TYPE (_o1[0]), 1, _o1[0]);
6852 24 : if (!_r1)
6853 0 : goto next_after_fail1641;
6854 24 : res_op1 = _r1;
6855 : }
6856 24 : tree _r;
6857 24 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6858 24 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6859 24 : return _r;
6860 : }
6861 0 : next_after_fail1641:;
6862 : }
6863 : }
6864 : }
6865 : break;
6866 24 : case CFN_BUILT_IN_POW10:
6867 24 : if (call_expr_nargs (_p1) == 1)
6868 : {
6869 24 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
6870 24 : {
6871 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
6872 24 : if (flag_unsafe_math_optimizations
6873 : )
6874 : {
6875 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1642;
6876 24 : {
6877 24 : tree res_op0;
6878 24 : res_op0 = captures[0];
6879 24 : tree res_op1;
6880 24 : {
6881 24 : tree _o1[1], _r1;
6882 24 : {
6883 24 : tree _o2[1], _r2;
6884 24 : _o2[0] = captures[2];
6885 24 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6886 24 : _o1[0] = _r2;
6887 : }
6888 24 : _r1 = maybe_build_call_expr_loc (loc, CFN_BUILT_IN_POW10, TREE_TYPE (_o1[0]), 1, _o1[0]);
6889 24 : if (!_r1)
6890 24 : goto next_after_fail1642;
6891 0 : res_op1 = _r1;
6892 : }
6893 0 : tree _r;
6894 0 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
6895 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1008, __FILE__, __LINE__, true);
6896 0 : return _r;
6897 : }
6898 24 : next_after_fail1642:;
6899 : }
6900 : }
6901 : }
6902 : break;
6903 : default:;
6904 : }
6905 : break;
6906 6082993 : default:;
6907 : }
6908 6082993 : switch (TREE_CODE (_p0))
6909 : {
6910 195470 : case CALL_EXPR:
6911 195470 : switch (get_call_combined_fn (_p0))
6912 : {
6913 1 : case CFN_BUILT_IN_SINHF:
6914 1 : if (call_expr_nargs (_p0) == 1)
6915 : {
6916 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
6917 1 : switch (TREE_CODE (_p1))
6918 : {
6919 1 : case CALL_EXPR:
6920 1 : switch (get_call_combined_fn (_p1))
6921 : {
6922 1 : case CFN_BUILT_IN_COSHF:
6923 1 : if (call_expr_nargs (_p1) == 1)
6924 : {
6925 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
6926 1 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
6927 : {
6928 1 : {
6929 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
6930 1 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SINHF, CFN_BUILT_IN_COSHF, CFN_BUILT_IN_TANHF);
6931 1 : if (res) return res;
6932 : }
6933 : }
6934 : }
6935 : break;
6936 : default:;
6937 : }
6938 : break;
6939 : default:;
6940 : }
6941 : }
6942 : break;
6943 1 : case CFN_BUILT_IN_SINHL:
6944 1 : if (call_expr_nargs (_p0) == 1)
6945 : {
6946 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
6947 1 : switch (TREE_CODE (_p1))
6948 : {
6949 1 : case CALL_EXPR:
6950 1 : switch (get_call_combined_fn (_p1))
6951 : {
6952 1 : case CFN_BUILT_IN_COSHL:
6953 1 : if (call_expr_nargs (_p1) == 1)
6954 : {
6955 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
6956 1 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
6957 : {
6958 1 : {
6959 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
6960 1 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SINHL, CFN_BUILT_IN_COSHL, CFN_BUILT_IN_TANHL);
6961 1 : if (res) return res;
6962 : }
6963 : }
6964 : }
6965 : break;
6966 : default:;
6967 : }
6968 : break;
6969 : default:;
6970 : }
6971 : }
6972 : break;
6973 1 : case CFN_BUILT_IN_TANHF:
6974 1 : if (call_expr_nargs (_p0) == 1)
6975 : {
6976 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
6977 1 : switch (TREE_CODE (_p1))
6978 : {
6979 1 : case CALL_EXPR:
6980 1 : switch (get_call_combined_fn (_p1))
6981 : {
6982 1 : case CFN_BUILT_IN_SINHF:
6983 1 : if (call_expr_nargs (_p1) == 1)
6984 : {
6985 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
6986 1 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
6987 : {
6988 1 : {
6989 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
6990 1 : tree res = generic_simplify_340 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_TANHF, CFN_BUILT_IN_SINHF, CFN_BUILT_IN_COSHF);
6991 1 : if (res) return res;
6992 : }
6993 : }
6994 : }
6995 : break;
6996 : default:;
6997 : }
6998 : break;
6999 : default:;
7000 : }
7001 : }
7002 : break;
7003 1 : case CFN_BUILT_IN_TANHL:
7004 1 : if (call_expr_nargs (_p0) == 1)
7005 : {
7006 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7007 1 : switch (TREE_CODE (_p1))
7008 : {
7009 1 : case CALL_EXPR:
7010 1 : switch (get_call_combined_fn (_p1))
7011 : {
7012 1 : case CFN_BUILT_IN_SINHL:
7013 1 : if (call_expr_nargs (_p1) == 1)
7014 : {
7015 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7016 1 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7017 : {
7018 1 : {
7019 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7020 1 : tree res = generic_simplify_340 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_TANHL, CFN_BUILT_IN_SINHL, CFN_BUILT_IN_COSHL);
7021 1 : if (res) return res;
7022 : }
7023 : }
7024 : }
7025 : break;
7026 : default:;
7027 : }
7028 : break;
7029 : default:;
7030 : }
7031 : }
7032 : break;
7033 2 : case CFN_BUILT_IN_COS:
7034 2 : if (call_expr_nargs (_p0) == 1)
7035 : {
7036 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7037 2 : switch (TREE_CODE (_p1))
7038 : {
7039 2 : case CALL_EXPR:
7040 2 : switch (get_call_combined_fn (_p1))
7041 : {
7042 2 : case CFN_BUILT_IN_SIN:
7043 2 : if (call_expr_nargs (_p1) == 1)
7044 : {
7045 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7046 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7047 : {
7048 2 : {
7049 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7050 2 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_COS, CFN_BUILT_IN_SIN, CFN_BUILT_IN_TAN);
7051 2 : if (res) return res;
7052 : }
7053 : }
7054 : }
7055 : break;
7056 : default:;
7057 : }
7058 : break;
7059 : default:;
7060 : }
7061 : }
7062 : break;
7063 4 : case CFN_BUILT_IN_POW:
7064 4 : if (call_expr_nargs (_p0) == 2)
7065 : {
7066 4 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7067 4 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
7068 4 : switch (TREE_CODE (_q21))
7069 : {
7070 4 : case REAL_CST:
7071 4 : {
7072 4 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7073 : {
7074 4 : {
7075 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7076 4 : tree res = generic_simplify_343 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_POW);
7077 4 : if (res) return res;
7078 : }
7079 : }
7080 : break;
7081 : }
7082 : default:;
7083 : }
7084 : }
7085 : break;
7086 94 : case CFN_BUILT_IN_SIN:
7087 94 : if (call_expr_nargs (_p0) == 1)
7088 : {
7089 94 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7090 94 : switch (TREE_CODE (_p1))
7091 : {
7092 4 : case CALL_EXPR:
7093 4 : switch (get_call_combined_fn (_p1))
7094 : {
7095 2 : case CFN_BUILT_IN_COS:
7096 2 : if (call_expr_nargs (_p1) == 1)
7097 : {
7098 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7099 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7100 : {
7101 2 : {
7102 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7103 2 : tree res = generic_simplify_337 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SIN, CFN_BUILT_IN_COS, CFN_BUILT_IN_TAN);
7104 2 : if (res) return res;
7105 : }
7106 : }
7107 : }
7108 : break;
7109 2 : case CFN_BUILT_IN_TAN:
7110 2 : if (call_expr_nargs (_p1) == 1)
7111 : {
7112 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7113 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7114 : {
7115 2 : {
7116 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7117 2 : tree res = generic_simplify_338 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SIN, CFN_BUILT_IN_TAN, CFN_BUILT_IN_COS);
7118 2 : if (res) return res;
7119 : }
7120 : }
7121 : }
7122 : break;
7123 : default:;
7124 : }
7125 : break;
7126 : default:;
7127 : }
7128 : }
7129 : break;
7130 2 : case CFN_BUILT_IN_TAN:
7131 2 : if (call_expr_nargs (_p0) == 1)
7132 : {
7133 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7134 2 : switch (TREE_CODE (_p1))
7135 : {
7136 2 : case CALL_EXPR:
7137 2 : switch (get_call_combined_fn (_p1))
7138 : {
7139 2 : case CFN_BUILT_IN_SIN:
7140 2 : if (call_expr_nargs (_p1) == 1)
7141 : {
7142 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7143 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7144 : {
7145 2 : {
7146 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7147 2 : tree res = generic_simplify_342 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_TAN, CFN_BUILT_IN_SIN, CFN_BUILT_IN_COS);
7148 2 : if (res) return res;
7149 : }
7150 : }
7151 : }
7152 : break;
7153 : default:;
7154 : }
7155 : break;
7156 : default:;
7157 : }
7158 : }
7159 : break;
7160 2 : case CFN_BUILT_IN_COSF:
7161 2 : if (call_expr_nargs (_p0) == 1)
7162 : {
7163 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7164 2 : switch (TREE_CODE (_p1))
7165 : {
7166 2 : case CALL_EXPR:
7167 2 : switch (get_call_combined_fn (_p1))
7168 : {
7169 2 : case CFN_BUILT_IN_SINF:
7170 2 : if (call_expr_nargs (_p1) == 1)
7171 : {
7172 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7173 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7174 : {
7175 2 : {
7176 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7177 2 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_COSF, CFN_BUILT_IN_SINF, CFN_BUILT_IN_TANF);
7178 2 : if (res) return res;
7179 : }
7180 : }
7181 : }
7182 : break;
7183 : default:;
7184 : }
7185 : break;
7186 : default:;
7187 : }
7188 : }
7189 : break;
7190 2 : case CFN_BUILT_IN_COSL:
7191 2 : if (call_expr_nargs (_p0) == 1)
7192 : {
7193 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7194 2 : switch (TREE_CODE (_p1))
7195 : {
7196 2 : case CALL_EXPR:
7197 2 : switch (get_call_combined_fn (_p1))
7198 : {
7199 2 : case CFN_BUILT_IN_SINL:
7200 2 : if (call_expr_nargs (_p1) == 1)
7201 : {
7202 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7203 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7204 : {
7205 2 : {
7206 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7207 2 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_COSL, CFN_BUILT_IN_SINL, CFN_BUILT_IN_TANL);
7208 2 : if (res) return res;
7209 : }
7210 : }
7211 : }
7212 : break;
7213 : default:;
7214 : }
7215 : break;
7216 : default:;
7217 : }
7218 : }
7219 : break;
7220 1 : case CFN_BUILT_IN_POWF:
7221 1 : if (call_expr_nargs (_p0) == 2)
7222 : {
7223 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7224 1 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
7225 1 : switch (TREE_CODE (_q21))
7226 : {
7227 1 : case REAL_CST:
7228 1 : {
7229 1 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7230 : {
7231 0 : {
7232 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7233 0 : tree res = generic_simplify_343 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_POWF);
7234 0 : if (res) return res;
7235 : }
7236 : }
7237 : break;
7238 : }
7239 : default:;
7240 : }
7241 : }
7242 : break;
7243 0 : case CFN_BUILT_IN_POWL:
7244 0 : if (call_expr_nargs (_p0) == 2)
7245 : {
7246 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7247 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
7248 0 : switch (TREE_CODE (_q21))
7249 : {
7250 0 : case REAL_CST:
7251 0 : {
7252 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7253 : {
7254 0 : {
7255 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7256 0 : tree res = generic_simplify_343 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_POWL);
7257 0 : if (res) return res;
7258 : }
7259 : }
7260 : break;
7261 : }
7262 : default:;
7263 : }
7264 : }
7265 : break;
7266 4 : case CFN_BUILT_IN_SINF:
7267 4 : if (call_expr_nargs (_p0) == 1)
7268 : {
7269 4 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7270 4 : switch (TREE_CODE (_p1))
7271 : {
7272 4 : case CALL_EXPR:
7273 4 : switch (get_call_combined_fn (_p1))
7274 : {
7275 2 : case CFN_BUILT_IN_COSF:
7276 2 : if (call_expr_nargs (_p1) == 1)
7277 : {
7278 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7279 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7280 : {
7281 2 : {
7282 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7283 2 : tree res = generic_simplify_337 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SINF, CFN_BUILT_IN_COSF, CFN_BUILT_IN_TANF);
7284 2 : if (res) return res;
7285 : }
7286 : }
7287 : }
7288 : break;
7289 2 : case CFN_BUILT_IN_TANF:
7290 2 : if (call_expr_nargs (_p1) == 1)
7291 : {
7292 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7293 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7294 : {
7295 2 : {
7296 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7297 2 : tree res = generic_simplify_338 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SINF, CFN_BUILT_IN_TANF, CFN_BUILT_IN_COSF);
7298 2 : if (res) return res;
7299 : }
7300 : }
7301 : }
7302 : break;
7303 : default:;
7304 : }
7305 : break;
7306 : default:;
7307 : }
7308 : }
7309 : break;
7310 143 : case CFN_BUILT_IN_SINH:
7311 143 : if (call_expr_nargs (_p0) == 1)
7312 : {
7313 143 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7314 143 : switch (TREE_CODE (_p1))
7315 : {
7316 3 : case CALL_EXPR:
7317 3 : switch (get_call_combined_fn (_p1))
7318 : {
7319 3 : case CFN_BUILT_IN_COSH:
7320 3 : if (call_expr_nargs (_p1) == 1)
7321 : {
7322 3 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7323 3 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7324 : {
7325 3 : {
7326 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7327 3 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SINH, CFN_BUILT_IN_COSH, CFN_BUILT_IN_TANH);
7328 3 : if (res) return res;
7329 : }
7330 : }
7331 : }
7332 : break;
7333 : default:;
7334 : }
7335 : break;
7336 : default:;
7337 : }
7338 : }
7339 : break;
7340 4 : case CFN_BUILT_IN_SINL:
7341 4 : if (call_expr_nargs (_p0) == 1)
7342 : {
7343 4 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7344 4 : switch (TREE_CODE (_p1))
7345 : {
7346 4 : case CALL_EXPR:
7347 4 : switch (get_call_combined_fn (_p1))
7348 : {
7349 2 : case CFN_BUILT_IN_COSL:
7350 2 : if (call_expr_nargs (_p1) == 1)
7351 : {
7352 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7353 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7354 : {
7355 2 : {
7356 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7357 2 : tree res = generic_simplify_337 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SINL, CFN_BUILT_IN_COSL, CFN_BUILT_IN_TANL);
7358 2 : if (res) return res;
7359 : }
7360 : }
7361 : }
7362 : break;
7363 2 : case CFN_BUILT_IN_TANL:
7364 2 : if (call_expr_nargs (_p1) == 1)
7365 : {
7366 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7367 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7368 : {
7369 2 : {
7370 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7371 2 : tree res = generic_simplify_338 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SINL, CFN_BUILT_IN_TANL, CFN_BUILT_IN_COSL);
7372 2 : if (res) return res;
7373 : }
7374 : }
7375 : }
7376 : break;
7377 : default:;
7378 : }
7379 : break;
7380 : default:;
7381 : }
7382 : }
7383 : break;
7384 2 : case CFN_BUILT_IN_TANF:
7385 2 : if (call_expr_nargs (_p0) == 1)
7386 : {
7387 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7388 2 : switch (TREE_CODE (_p1))
7389 : {
7390 2 : case CALL_EXPR:
7391 2 : switch (get_call_combined_fn (_p1))
7392 : {
7393 2 : case CFN_BUILT_IN_SINF:
7394 2 : if (call_expr_nargs (_p1) == 1)
7395 : {
7396 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7397 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7398 : {
7399 2 : {
7400 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7401 2 : tree res = generic_simplify_342 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_TANF, CFN_BUILT_IN_SINF, CFN_BUILT_IN_COSF);
7402 2 : if (res) return res;
7403 : }
7404 : }
7405 : }
7406 : break;
7407 : default:;
7408 : }
7409 : break;
7410 : default:;
7411 : }
7412 : }
7413 : break;
7414 1 : case CFN_BUILT_IN_TANH:
7415 1 : if (call_expr_nargs (_p0) == 1)
7416 : {
7417 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7418 1 : switch (TREE_CODE (_p1))
7419 : {
7420 1 : case CALL_EXPR:
7421 1 : switch (get_call_combined_fn (_p1))
7422 : {
7423 1 : case CFN_BUILT_IN_SINH:
7424 1 : if (call_expr_nargs (_p1) == 1)
7425 : {
7426 1 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7427 1 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7428 : {
7429 1 : {
7430 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7431 1 : tree res = generic_simplify_340 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_TANH, CFN_BUILT_IN_SINH, CFN_BUILT_IN_COSH);
7432 1 : if (res) return res;
7433 : }
7434 : }
7435 : }
7436 : break;
7437 : default:;
7438 : }
7439 : break;
7440 : default:;
7441 : }
7442 : }
7443 : break;
7444 2 : case CFN_BUILT_IN_TANL:
7445 2 : if (call_expr_nargs (_p0) == 1)
7446 : {
7447 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7448 2 : switch (TREE_CODE (_p1))
7449 : {
7450 2 : case CALL_EXPR:
7451 2 : switch (get_call_combined_fn (_p1))
7452 : {
7453 2 : case CFN_BUILT_IN_SINL:
7454 2 : if (call_expr_nargs (_p1) == 1)
7455 : {
7456 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7457 2 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7458 : {
7459 2 : {
7460 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7461 2 : tree res = generic_simplify_342 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_TANL, CFN_BUILT_IN_SINL, CFN_BUILT_IN_COSL);
7462 2 : if (res) return res;
7463 : }
7464 : }
7465 : }
7466 : break;
7467 : default:;
7468 : }
7469 : break;
7470 : default:;
7471 : }
7472 : }
7473 : break;
7474 0 : case CFN_COS:
7475 0 : if (call_expr_nargs (_p0) == 1)
7476 : {
7477 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7478 0 : switch (TREE_CODE (_p1))
7479 : {
7480 0 : case CALL_EXPR:
7481 0 : switch (get_call_combined_fn (_p1))
7482 : {
7483 0 : case CFN_SIN:
7484 0 : if (call_expr_nargs (_p1) == 1)
7485 : {
7486 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7487 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7488 : {
7489 0 : {
7490 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7491 0 : tree res = generic_simplify_341 (loc, type, _p0, _p1, captures, CFN_COS, CFN_SIN, CFN_TAN);
7492 0 : if (res) return res;
7493 : }
7494 : }
7495 : }
7496 : break;
7497 : default:;
7498 : }
7499 : break;
7500 : default:;
7501 : }
7502 : }
7503 : break;
7504 0 : case CFN_POW:
7505 0 : if (call_expr_nargs (_p0) == 2)
7506 : {
7507 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7508 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
7509 0 : switch (TREE_CODE (_q21))
7510 : {
7511 0 : case REAL_CST:
7512 0 : {
7513 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7514 : {
7515 0 : {
7516 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
7517 0 : tree res = generic_simplify_343 (loc, type, _p0, _p1, captures, CFN_POW);
7518 0 : if (res) return res;
7519 : }
7520 : }
7521 : break;
7522 : }
7523 : default:;
7524 : }
7525 : }
7526 : break;
7527 0 : case CFN_SIN:
7528 0 : if (call_expr_nargs (_p0) == 1)
7529 : {
7530 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7531 0 : switch (TREE_CODE (_p1))
7532 : {
7533 0 : case CALL_EXPR:
7534 0 : switch (get_call_combined_fn (_p1))
7535 : {
7536 0 : case CFN_COS:
7537 0 : if (call_expr_nargs (_p1) == 1)
7538 : {
7539 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7540 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7541 : {
7542 0 : {
7543 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7544 0 : tree res = generic_simplify_337 (loc, type, _p0, _p1, captures, CFN_SIN, CFN_COS, CFN_TAN);
7545 0 : if (res) return res;
7546 : }
7547 : }
7548 : }
7549 : break;
7550 0 : case CFN_TAN:
7551 0 : if (call_expr_nargs (_p1) == 1)
7552 : {
7553 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7554 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7555 : {
7556 0 : {
7557 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7558 0 : tree res = generic_simplify_338 (loc, type, _p0, _p1, captures, CFN_SIN, CFN_TAN, CFN_COS);
7559 0 : if (res) return res;
7560 : }
7561 : }
7562 : }
7563 : break;
7564 : default:;
7565 : }
7566 : break;
7567 : default:;
7568 : }
7569 : }
7570 : break;
7571 0 : case CFN_TAN:
7572 0 : if (call_expr_nargs (_p0) == 1)
7573 : {
7574 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7575 0 : switch (TREE_CODE (_p1))
7576 : {
7577 0 : case CALL_EXPR:
7578 0 : switch (get_call_combined_fn (_p1))
7579 : {
7580 0 : case CFN_SIN:
7581 0 : if (call_expr_nargs (_p1) == 1)
7582 : {
7583 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7584 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7585 : {
7586 0 : {
7587 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7588 0 : tree res = generic_simplify_342 (loc, type, _p0, _p1, captures, CFN_TAN, CFN_SIN, CFN_COS);
7589 0 : if (res) return res;
7590 : }
7591 : }
7592 : }
7593 : break;
7594 : default:;
7595 : }
7596 : break;
7597 : default:;
7598 : }
7599 : }
7600 : break;
7601 0 : case CFN_SINH:
7602 0 : if (call_expr_nargs (_p0) == 1)
7603 : {
7604 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7605 0 : switch (TREE_CODE (_p1))
7606 : {
7607 0 : case CALL_EXPR:
7608 0 : switch (get_call_combined_fn (_p1))
7609 : {
7610 0 : case CFN_COSH:
7611 0 : if (call_expr_nargs (_p1) == 1)
7612 : {
7613 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7614 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7615 : {
7616 0 : {
7617 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7618 0 : tree res = generic_simplify_339 (loc, type, _p0, _p1, captures, CFN_SINH, CFN_COSH, CFN_TANH);
7619 0 : if (res) return res;
7620 : }
7621 : }
7622 : }
7623 : break;
7624 : default:;
7625 : }
7626 : break;
7627 : default:;
7628 : }
7629 : }
7630 : break;
7631 0 : case CFN_TANH:
7632 0 : if (call_expr_nargs (_p0) == 1)
7633 : {
7634 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
7635 0 : switch (TREE_CODE (_p1))
7636 : {
7637 0 : case CALL_EXPR:
7638 0 : switch (get_call_combined_fn (_p1))
7639 : {
7640 0 : case CFN_SINH:
7641 0 : if (call_expr_nargs (_p1) == 1)
7642 : {
7643 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
7644 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7645 : {
7646 0 : {
7647 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
7648 0 : tree res = generic_simplify_340 (loc, type, _p0, _p1, captures, CFN_TANH, CFN_SINH, CFN_COSH);
7649 0 : if (res) return res;
7650 : }
7651 : }
7652 : }
7653 : break;
7654 : default:;
7655 : }
7656 : break;
7657 : default:;
7658 : }
7659 : }
7660 : break;
7661 : default:;
7662 : }
7663 : break;
7664 6082959 : default:;
7665 : }
7666 6082959 : switch (TREE_CODE (_p1))
7667 : {
7668 813189 : case CALL_EXPR:
7669 813189 : switch (get_call_combined_fn (_p1))
7670 : {
7671 22 : case CFN_BUILT_IN_POW:
7672 22 : if (call_expr_nargs (_p1) == 2)
7673 : {
7674 22 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
7675 22 : tree _q31 = CALL_EXPR_ARG (_p1, 1);
7676 22 : {
7677 22 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
7678 22 : tree res = generic_simplify_344 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_POW);
7679 22 : if (res) return res;
7680 : }
7681 : }
7682 : break;
7683 2 : case CFN_BUILT_IN_POWF:
7684 2 : if (call_expr_nargs (_p1) == 2)
7685 : {
7686 2 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
7687 2 : tree _q31 = CALL_EXPR_ARG (_p1, 1);
7688 2 : {
7689 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
7690 2 : tree res = generic_simplify_344 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_POWF);
7691 2 : if (res) return res;
7692 : }
7693 : }
7694 : break;
7695 0 : case CFN_BUILT_IN_POWL:
7696 0 : if (call_expr_nargs (_p1) == 2)
7697 : {
7698 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
7699 0 : tree _q31 = CALL_EXPR_ARG (_p1, 1);
7700 0 : {
7701 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
7702 0 : tree res = generic_simplify_344 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_POWL);
7703 0 : if (res) return res;
7704 : }
7705 : }
7706 : break;
7707 0 : case CFN_POW:
7708 0 : if (call_expr_nargs (_p1) == 2)
7709 : {
7710 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
7711 0 : tree _q31 = CALL_EXPR_ARG (_p1, 1);
7712 0 : {
7713 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
7714 0 : tree res = generic_simplify_344 (loc, type, _p0, _p1, captures, CFN_POW);
7715 0 : if (res) return res;
7716 : }
7717 : }
7718 : break;
7719 : default:;
7720 : }
7721 : break;
7722 : default:;
7723 : }
7724 : return NULL_TREE;
7725 : }
7726 :
7727 : tree
7728 6815838 : generic_simplify_GE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
7729 : {
7730 6815838 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7731 6815838 : switch (TREE_CODE (_p0))
7732 : {
7733 2001 : case RDIV_EXPR:
7734 2001 : {
7735 2001 : tree _q20 = TREE_OPERAND (_p0, 0);
7736 2001 : tree _q21 = TREE_OPERAND (_p0, 1);
7737 2001 : switch (TREE_CODE (_q20))
7738 : {
7739 46 : case REAL_CST:
7740 46 : {
7741 46 : if (real_zerop (_p1))
7742 : {
7743 2 : {
7744 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7745 2 : tree res = generic_simplify_378 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
7746 2 : if (res) return res;
7747 : }
7748 : }
7749 : break;
7750 : }
7751 : default:;
7752 : }
7753 : break;
7754 : }
7755 1167 : case TRUNC_MOD_EXPR:
7756 1167 : {
7757 1167 : tree _q20 = TREE_OPERAND (_p0, 0);
7758 1167 : tree _q21 = TREE_OPERAND (_p0, 1);
7759 1167 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
7760 : {
7761 16 : {
7762 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7763 16 : tree res = generic_simplify_379 (loc, type, _p0, _p1, captures, GE_EXPR, LT_EXPR);
7764 16 : if (res) return res;
7765 : }
7766 : }
7767 : break;
7768 : }
7769 31732 : case MULT_EXPR:
7770 31732 : {
7771 31732 : tree _q20 = TREE_OPERAND (_p0, 0);
7772 31732 : tree _q21 = TREE_OPERAND (_p0, 1);
7773 31732 : switch (TREE_CODE (_p1))
7774 : {
7775 7120 : case MULT_EXPR:
7776 7120 : {
7777 7120 : tree _q50 = TREE_OPERAND (_p1, 0);
7778 7120 : tree _q51 = TREE_OPERAND (_p1, 1);
7779 7120 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7780 : {
7781 4749 : {
7782 4749 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7783 4749 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, GE_EXPR);
7784 4749 : if (res) return res;
7785 : }
7786 : }
7787 2919 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7788 : {
7789 0 : {
7790 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
7791 0 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, GE_EXPR);
7792 0 : if (res) return res;
7793 : }
7794 : }
7795 2919 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7796 : {
7797 0 : {
7798 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
7799 0 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, GE_EXPR);
7800 0 : if (res) return res;
7801 : }
7802 : }
7803 2919 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7804 : {
7805 1 : {
7806 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
7807 1 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, GE_EXPR);
7808 1 : if (res) return res;
7809 : }
7810 : }
7811 : break;
7812 : }
7813 : default:;
7814 : }
7815 : break;
7816 : }
7817 1044211 : CASE_CONVERT:
7818 1044211 : {
7819 1044211 : tree _q20 = TREE_OPERAND (_p0, 0);
7820 1044211 : switch (TREE_CODE (_q20))
7821 : {
7822 157 : case EXACT_DIV_EXPR:
7823 157 : {
7824 157 : tree _q30 = TREE_OPERAND (_q20, 0);
7825 157 : tree _q31 = TREE_OPERAND (_q20, 1);
7826 157 : switch (TREE_CODE (_q31))
7827 : {
7828 157 : case INTEGER_CST:
7829 157 : {
7830 157 : switch (TREE_CODE (_p1))
7831 : {
7832 43 : CASE_CONVERT:
7833 43 : {
7834 43 : tree _q60 = TREE_OPERAND (_p1, 0);
7835 43 : switch (TREE_CODE (_q60))
7836 : {
7837 0 : case EXACT_DIV_EXPR:
7838 0 : {
7839 0 : tree _q70 = TREE_OPERAND (_q60, 0);
7840 0 : tree _q71 = TREE_OPERAND (_q60, 1);
7841 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
7842 : {
7843 0 : {
7844 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q70 };
7845 0 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, GE_EXPR);
7846 0 : if (res) return res;
7847 : }
7848 : }
7849 : break;
7850 : }
7851 : default:;
7852 : }
7853 : break;
7854 : }
7855 : default:;
7856 : }
7857 : break;
7858 : }
7859 : default:;
7860 : }
7861 : break;
7862 : }
7863 : default:;
7864 : }
7865 : break;
7866 : }
7867 8353 : case EXACT_DIV_EXPR:
7868 8353 : {
7869 8353 : tree _q20 = TREE_OPERAND (_p0, 0);
7870 8353 : tree _q21 = TREE_OPERAND (_p0, 1);
7871 8353 : switch (TREE_CODE (_q21))
7872 : {
7873 8353 : case INTEGER_CST:
7874 8353 : {
7875 8353 : switch (TREE_CODE (_p1))
7876 : {
7877 0 : case EXACT_DIV_EXPR:
7878 0 : {
7879 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7880 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7881 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7882 : {
7883 0 : {
7884 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
7885 0 : tree res = generic_simplify_211 (loc, type, _p0, _p1, captures, GE_EXPR);
7886 0 : if (res) return res;
7887 : }
7888 : }
7889 : break;
7890 : }
7891 : default:;
7892 : }
7893 : break;
7894 : }
7895 : default:;
7896 : }
7897 : break;
7898 : }
7899 40772 : case TRUNC_DIV_EXPR:
7900 40772 : {
7901 40772 : tree _q20 = TREE_OPERAND (_p0, 0);
7902 40772 : tree _q21 = TREE_OPERAND (_p0, 1);
7903 40772 : switch (TREE_CODE (_q21))
7904 : {
7905 40236 : case INTEGER_CST:
7906 40236 : {
7907 40236 : switch (TREE_CODE (_p1))
7908 : {
7909 39317 : case INTEGER_CST:
7910 39317 : {
7911 39317 : {
7912 39317 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
7913 39317 : tree res = generic_simplify_220 (loc, type, _p0, _p1, captures, GE_EXPR);
7914 39317 : if (res) return res;
7915 : }
7916 0 : break;
7917 : }
7918 : default:;
7919 : }
7920 : break;
7921 : }
7922 : default:;
7923 : }
7924 : break;
7925 : }
7926 795312 : case PLUS_EXPR:
7927 795312 : {
7928 795312 : tree _q20 = TREE_OPERAND (_p0, 0);
7929 795312 : tree _q21 = TREE_OPERAND (_p0, 1);
7930 795312 : switch (TREE_CODE (_p1))
7931 : {
7932 52023 : case PLUS_EXPR:
7933 52023 : {
7934 52023 : tree _q50 = TREE_OPERAND (_p1, 0);
7935 52023 : tree _q51 = TREE_OPERAND (_p1, 1);
7936 52023 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7937 : {
7938 1461 : {
7939 1461 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7940 1461 : tree res = generic_simplify_381 (loc, type, _p0, _p1, captures, GE_EXPR);
7941 1461 : if (res) return res;
7942 : }
7943 : }
7944 52023 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7945 : {
7946 21 : {
7947 21 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
7948 21 : tree res = generic_simplify_381 (loc, type, _p0, _p1, captures, GE_EXPR);
7949 21 : if (res) return res;
7950 : }
7951 : }
7952 52023 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7953 : {
7954 16 : {
7955 16 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
7956 16 : tree res = generic_simplify_381 (loc, type, _p0, _p1, captures, GE_EXPR);
7957 16 : if (res) return res;
7958 : }
7959 : }
7960 52023 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7961 : {
7962 1002 : {
7963 1002 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
7964 1002 : tree res = generic_simplify_381 (loc, type, _p0, _p1, captures, GE_EXPR);
7965 1002 : if (res) return res;
7966 : }
7967 : }
7968 : break;
7969 : }
7970 795259 : default:;
7971 : }
7972 795259 : switch (TREE_CODE (_q21))
7973 : {
7974 682768 : case INTEGER_CST:
7975 682768 : {
7976 682768 : switch (TREE_CODE (_p1))
7977 : {
7978 15063 : case PLUS_EXPR:
7979 15063 : {
7980 15063 : tree _q50 = TREE_OPERAND (_p1, 0);
7981 15063 : tree _q51 = TREE_OPERAND (_p1, 1);
7982 15063 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7983 : {
7984 1457 : {
7985 1457 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
7986 1457 : tree res = generic_simplify_382 (loc, type, _p0, _p1, captures, GE_EXPR);
7987 1457 : if (res) return res;
7988 : }
7989 : }
7990 : break;
7991 : }
7992 : default:;
7993 : }
7994 : break;
7995 : }
7996 795259 : default:;
7997 : }
7998 795259 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
7999 : {
8000 55313 : {
8001 55313 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8002 55313 : tree res = generic_simplify_383 (loc, type, _p0, _p1, captures, GE_EXPR);
8003 55313 : if (res) return res;
8004 : }
8005 : }
8006 760328 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8007 : {
8008 24573 : {
8009 24573 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
8010 24573 : tree res = generic_simplify_383 (loc, type, _p0, _p1, captures, GE_EXPR);
8011 24573 : if (res) return res;
8012 : }
8013 : }
8014 : break;
8015 : }
8016 121587 : case MINUS_EXPR:
8017 121587 : {
8018 121587 : tree _q20 = TREE_OPERAND (_p0, 0);
8019 121587 : tree _q21 = TREE_OPERAND (_p0, 1);
8020 121587 : switch (TREE_CODE (_p1))
8021 : {
8022 1468 : case MINUS_EXPR:
8023 1468 : {
8024 1468 : tree _q50 = TREE_OPERAND (_p1, 0);
8025 1468 : tree _q51 = TREE_OPERAND (_p1, 1);
8026 1468 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8027 : {
8028 14 : {
8029 14 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
8030 14 : tree res = generic_simplify_384 (loc, type, _p0, _p1, captures, GE_EXPR);
8031 14 : if (res) return res;
8032 : }
8033 : }
8034 1468 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8035 : {
8036 22 : {
8037 22 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
8038 22 : tree res = generic_simplify_385 (loc, type, _p0, _p1, captures, GE_EXPR);
8039 22 : if (res) return res;
8040 : }
8041 : }
8042 : break;
8043 : }
8044 : default:;
8045 : }
8046 : break;
8047 : }
8048 2514 : case POINTER_DIFF_EXPR:
8049 2514 : {
8050 2514 : tree _q20 = TREE_OPERAND (_p0, 0);
8051 2514 : tree _q21 = TREE_OPERAND (_p0, 1);
8052 2514 : switch (TREE_CODE (_p1))
8053 : {
8054 32 : case POINTER_DIFF_EXPR:
8055 32 : {
8056 32 : tree _q50 = TREE_OPERAND (_p1, 0);
8057 32 : tree _q51 = TREE_OPERAND (_p1, 1);
8058 32 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8059 : {
8060 0 : {
8061 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
8062 0 : tree res = generic_simplify_224 (loc, type, _p0, _p1, captures, GE_EXPR);
8063 0 : if (res) return res;
8064 : }
8065 : }
8066 32 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8067 : {
8068 0 : {
8069 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
8070 0 : tree res = generic_simplify_225 (loc, type, _p0, _p1, captures, GE_EXPR);
8071 0 : if (res) return res;
8072 : }
8073 : }
8074 : break;
8075 : }
8076 : default:;
8077 : }
8078 : break;
8079 : }
8080 6733741 : default:;
8081 : }
8082 6733741 : switch (TREE_CODE (_p1))
8083 : {
8084 58873 : case PLUS_EXPR:
8085 58873 : {
8086 58873 : tree _q30 = TREE_OPERAND (_p1, 0);
8087 58873 : tree _q31 = TREE_OPERAND (_p1, 1);
8088 58873 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8089 : {
8090 0 : {
8091 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
8092 0 : tree res = generic_simplify_383 (loc, type, _p0, _p1, captures, LE_EXPR);
8093 0 : if (res) return res;
8094 : }
8095 : }
8096 58873 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
8097 : {
8098 0 : {
8099 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q31, _p0 };
8100 0 : tree res = generic_simplify_383 (loc, type, _p0, _p1, captures, LE_EXPR);
8101 0 : if (res) return res;
8102 : }
8103 : }
8104 : break;
8105 : }
8106 2495 : case MINUS_EXPR:
8107 2495 : {
8108 2495 : tree _q30 = TREE_OPERAND (_p1, 0);
8109 2495 : tree _q31 = TREE_OPERAND (_p1, 1);
8110 2495 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
8111 : {
8112 0 : {
8113 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
8114 0 : tree res = generic_simplify_223 (loc, type, _p0, _p1, captures, GE_EXPR);
8115 0 : if (res) return res;
8116 : }
8117 : }
8118 : break;
8119 : }
8120 6733741 : default:;
8121 : }
8122 6733741 : switch (TREE_CODE (_p0))
8123 : {
8124 121587 : case MINUS_EXPR:
8125 121587 : {
8126 121587 : tree _q20 = TREE_OPERAND (_p0, 0);
8127 121587 : tree _q21 = TREE_OPERAND (_p0, 1);
8128 121587 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8129 : {
8130 2371 : {
8131 2371 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
8132 2371 : tree res = generic_simplify_223 (loc, type, _p0, _p1, captures, LE_EXPR);
8133 2371 : if (res) return res;
8134 : }
8135 : }
8136 : break;
8137 : }
8138 1085 : case BIT_IOR_EXPR:
8139 1085 : {
8140 1085 : tree _q20 = TREE_OPERAND (_p0, 0);
8141 1085 : tree _q21 = TREE_OPERAND (_p0, 1);
8142 1085 : if (tree_expr_nonnegative_p (_q20))
8143 : {
8144 222 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8145 : {
8146 0 : {
8147 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8148 0 : tree res = generic_simplify_386 (loc, type, _p0, _p1, captures, GE_EXPR, BIT_IOR_EXPR);
8149 0 : if (res) return res;
8150 : }
8151 : }
8152 : }
8153 1085 : if (tree_expr_nonnegative_p (_q21))
8154 : {
8155 296 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8156 : {
8157 0 : {
8158 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8159 0 : tree res = generic_simplify_386 (loc, type, _p0, _p1, captures, GE_EXPR, BIT_IOR_EXPR);
8160 0 : if (res) return res;
8161 : }
8162 : }
8163 : }
8164 : break;
8165 : }
8166 6733740 : default:;
8167 : }
8168 6733740 : switch (TREE_CODE (_p1))
8169 : {
8170 200 : case BIT_AND_EXPR:
8171 200 : {
8172 200 : tree _q30 = TREE_OPERAND (_p1, 0);
8173 200 : tree _q31 = TREE_OPERAND (_p1, 1);
8174 200 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
8175 : {
8176 0 : if (tree_expr_nonnegative_p (_q30))
8177 : {
8178 0 : {
8179 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
8180 0 : tree res = generic_simplify_386 (loc, type, _p0, _p1, captures, LE_EXPR, BIT_AND_EXPR);
8181 0 : if (res) return res;
8182 : }
8183 : }
8184 : }
8185 200 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8186 : {
8187 0 : if (tree_expr_nonnegative_p (_q31))
8188 : {
8189 0 : {
8190 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
8191 0 : tree res = generic_simplify_386 (loc, type, _p0, _p1, captures, LE_EXPR, BIT_AND_EXPR);
8192 0 : if (res) return res;
8193 : }
8194 : }
8195 : }
8196 : break;
8197 : }
8198 6733740 : default:;
8199 : }
8200 6733740 : switch (TREE_CODE (_p0))
8201 : {
8202 884 : case MAX_EXPR:
8203 884 : {
8204 884 : tree _q20 = TREE_OPERAND (_p0, 0);
8205 884 : tree _q21 = TREE_OPERAND (_p0, 1);
8206 884 : switch (TREE_CODE (_p1))
8207 : {
8208 0 : case MIN_EXPR:
8209 0 : {
8210 0 : tree _q50 = TREE_OPERAND (_p1, 0);
8211 0 : tree _q51 = TREE_OPERAND (_p1, 1);
8212 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8213 : {
8214 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8215 : {
8216 0 : {
8217 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8218 0 : tree res = generic_simplify_387 (loc, type, _p0, _p1, captures, LE_EXPR);
8219 0 : if (res) return res;
8220 : }
8221 : }
8222 : }
8223 : break;
8224 : }
8225 : default:;
8226 : }
8227 : break;
8228 : }
8229 2993 : case MIN_EXPR:
8230 2993 : {
8231 2993 : tree _q20 = TREE_OPERAND (_p0, 0);
8232 2993 : tree _q21 = TREE_OPERAND (_p0, 1);
8233 2993 : switch (TREE_CODE (_p1))
8234 : {
8235 27 : case MAX_EXPR:
8236 27 : {
8237 27 : tree _q50 = TREE_OPERAND (_p1, 0);
8238 27 : tree _q51 = TREE_OPERAND (_p1, 1);
8239 27 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8240 : {
8241 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8242 : {
8243 0 : {
8244 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8245 0 : tree res = generic_simplify_388 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
8246 0 : if (res) return res;
8247 : }
8248 : }
8249 : }
8250 : break;
8251 : }
8252 2993 : default:;
8253 : }
8254 2993 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8255 : {
8256 0 : {
8257 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8258 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR, LE_EXPR);
8259 0 : if (res) return res;
8260 : }
8261 : }
8262 2993 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8263 : {
8264 1 : {
8265 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8266 1 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR, LE_EXPR);
8267 1 : if (res) return res;
8268 : }
8269 : }
8270 : break;
8271 : }
8272 6733739 : default:;
8273 : }
8274 6733739 : switch (TREE_CODE (_p1))
8275 : {
8276 204 : case MAX_EXPR:
8277 204 : {
8278 204 : tree _q30 = TREE_OPERAND (_p1, 0);
8279 204 : tree _q31 = TREE_OPERAND (_p1, 1);
8280 204 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
8281 : {
8282 0 : {
8283 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
8284 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR, GE_EXPR);
8285 0 : if (res) return res;
8286 : }
8287 : }
8288 204 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8289 : {
8290 0 : {
8291 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
8292 0 : tree res = generic_simplify_233 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR, GE_EXPR);
8293 0 : if (res) return res;
8294 : }
8295 : }
8296 : break;
8297 : }
8298 1748 : case MIN_EXPR:
8299 1748 : {
8300 1748 : tree _q30 = TREE_OPERAND (_p1, 0);
8301 1748 : tree _q31 = TREE_OPERAND (_p1, 1);
8302 1748 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
8303 : {
8304 0 : {
8305 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
8306 0 : tree res = generic_simplify_389 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR);
8307 0 : if (res) return res;
8308 : }
8309 : }
8310 1748 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8311 : {
8312 0 : {
8313 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
8314 0 : tree res = generic_simplify_389 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR);
8315 0 : if (res) return res;
8316 : }
8317 : }
8318 : break;
8319 : }
8320 6733739 : default:;
8321 : }
8322 6733739 : switch (TREE_CODE (_p0))
8323 : {
8324 884 : case MAX_EXPR:
8325 884 : {
8326 884 : tree _q20 = TREE_OPERAND (_p0, 0);
8327 884 : tree _q21 = TREE_OPERAND (_p0, 1);
8328 884 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8329 : {
8330 0 : {
8331 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8332 0 : tree res = generic_simplify_389 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR);
8333 0 : if (res) return res;
8334 : }
8335 : }
8336 884 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8337 : {
8338 2 : {
8339 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8340 2 : tree res = generic_simplify_389 (loc, type, _p0, _p1, captures, MAX_EXPR, LE_EXPR);
8341 2 : if (res) return res;
8342 : }
8343 : }
8344 882 : switch (TREE_CODE (_q21))
8345 : {
8346 778 : case INTEGER_CST:
8347 778 : {
8348 778 : switch (TREE_CODE (_p1))
8349 : {
8350 0 : case INTEGER_CST:
8351 0 : {
8352 0 : {
8353 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8354 0 : tree res = generic_simplify_390 (loc, type, _p0, _p1, captures, MAX_EXPR, GE_EXPR, BIT_IOR_EXPR);
8355 0 : if (res) return res;
8356 : }
8357 0 : break;
8358 : }
8359 : default:;
8360 : }
8361 : break;
8362 : }
8363 : default:;
8364 : }
8365 : break;
8366 : }
8367 2992 : case MIN_EXPR:
8368 2992 : {
8369 2992 : tree _q20 = TREE_OPERAND (_p0, 0);
8370 2992 : tree _q21 = TREE_OPERAND (_p0, 1);
8371 2992 : switch (TREE_CODE (_q21))
8372 : {
8373 996 : case INTEGER_CST:
8374 996 : {
8375 996 : switch (TREE_CODE (_p1))
8376 : {
8377 0 : case INTEGER_CST:
8378 0 : {
8379 0 : {
8380 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8381 0 : tree res = generic_simplify_390 (loc, type, _p0, _p1, captures, MIN_EXPR, GE_EXPR, BIT_AND_EXPR);
8382 0 : if (res) return res;
8383 : }
8384 0 : break;
8385 : }
8386 : default:;
8387 : }
8388 : break;
8389 : }
8390 : default:;
8391 : }
8392 : break;
8393 : }
8394 1044211 : CASE_CONVERT:
8395 1044211 : {
8396 1044211 : tree _q20 = TREE_OPERAND (_p0, 0);
8397 1044211 : switch (TREE_CODE (_q20))
8398 : {
8399 0 : case GE_EXPR:
8400 0 : {
8401 0 : tree _q30 = TREE_OPERAND (_q20, 0);
8402 0 : tree _q31 = TREE_OPERAND (_q20, 1);
8403 0 : if (tree_zero_one_valued_p (_q30))
8404 : {
8405 0 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
8406 : {
8407 0 : {
8408 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
8409 0 : tree res = generic_simplify_391 (loc, type, _p0, _p1, captures, GE_EXPR);
8410 0 : if (res) return res;
8411 : }
8412 : }
8413 : }
8414 : break;
8415 : }
8416 : default:;
8417 : }
8418 : break;
8419 : }
8420 41 : case GE_EXPR:
8421 41 : {
8422 41 : tree _q20 = TREE_OPERAND (_p0, 0);
8423 41 : tree _q21 = TREE_OPERAND (_p0, 1);
8424 41 : if (tree_zero_one_valued_p (_q20))
8425 : {
8426 15 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8427 : {
8428 3 : {
8429 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8430 3 : tree res = generic_simplify_391 (loc, type, _p0, _p1, captures, GE_EXPR);
8431 3 : if (res) return res;
8432 : }
8433 : }
8434 : }
8435 : break;
8436 : }
8437 6 : case VEC_COND_EXPR:
8438 6 : {
8439 6 : tree _q20 = TREE_OPERAND (_p0, 0);
8440 6 : tree _q21 = TREE_OPERAND (_p0, 1);
8441 6 : tree _q22 = TREE_OPERAND (_p0, 2);
8442 6 : switch (TREE_CODE (_p1))
8443 : {
8444 0 : case VEC_COND_EXPR:
8445 0 : {
8446 0 : tree _q60 = TREE_OPERAND (_p1, 0);
8447 0 : tree _q61 = TREE_OPERAND (_p1, 1);
8448 0 : tree _q62 = TREE_OPERAND (_p1, 2);
8449 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
8450 : {
8451 0 : {
8452 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
8453 0 : if (VECTOR_TYPE_P (type)
8454 0 : && (TREE_CODE_CLASS (GE_EXPR) != tcc_comparison
8455 0 : || types_match (type, TREE_TYPE (captures[2]))
8456 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8457 : || (optimize_vectors_before_lowering_p ()
8458 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8459 : )
8460 : {
8461 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1654;
8462 0 : {
8463 0 : tree res_op0;
8464 0 : res_op0 = captures[1];
8465 0 : tree res_op1;
8466 0 : {
8467 0 : tree _o1[2], _r1;
8468 0 : _o1[0] = captures[2];
8469 0 : _o1[1] = captures[5];
8470 0 : _r1 = fold_build2_loc (loc, GE_EXPR, type, _o1[0], _o1[1]);
8471 0 : if (EXPR_P (_r1))
8472 0 : goto next_after_fail1654;
8473 0 : res_op1 = _r1;
8474 : }
8475 0 : tree res_op2;
8476 0 : {
8477 0 : tree _o1[2], _r1;
8478 0 : _o1[0] = captures[3];
8479 0 : _o1[1] = captures[6];
8480 0 : _r1 = fold_build2_loc (loc, GE_EXPR, type, _o1[0], _o1[1]);
8481 0 : if (EXPR_P (_r1))
8482 0 : goto next_after_fail1654;
8483 0 : res_op2 = _r1;
8484 : }
8485 0 : tree _r;
8486 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8487 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
8488 0 : return _r;
8489 : }
8490 0 : next_after_fail1654:;
8491 : }
8492 : }
8493 : }
8494 : break;
8495 : }
8496 6 : default:;
8497 : }
8498 6 : {
8499 6 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
8500 6 : if (VECTOR_TYPE_P (type)
8501 6 : && (TREE_CODE_CLASS (GE_EXPR) != tcc_comparison
8502 6 : || types_match (type, TREE_TYPE (captures[2]))
8503 6 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8504 : || (optimize_vectors_before_lowering_p ()
8505 2 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8506 : )
8507 : {
8508 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1655;
8509 6 : {
8510 6 : if (! tree_invariant_p (captures[4])) goto next_after_fail1655;
8511 5 : tree res_op0;
8512 5 : res_op0 = captures[1];
8513 5 : tree res_op1;
8514 5 : {
8515 5 : tree _o1[2], _r1;
8516 5 : _o1[0] = captures[2];
8517 5 : _o1[1] = unshare_expr (captures[4]);
8518 5 : _r1 = fold_build2_loc (loc, GE_EXPR, type, _o1[0], _o1[1]);
8519 5 : if (EXPR_P (_r1))
8520 1 : goto next_after_fail1655;
8521 4 : res_op1 = _r1;
8522 : }
8523 4 : tree res_op2;
8524 4 : {
8525 4 : tree _o1[2], _r1;
8526 4 : _o1[0] = captures[3];
8527 4 : _o1[1] = captures[4];
8528 4 : _r1 = fold_build2_loc (loc, GE_EXPR, type, _o1[0], _o1[1]);
8529 4 : if (EXPR_P (_r1))
8530 0 : goto next_after_fail1655;
8531 4 : res_op2 = _r1;
8532 : }
8533 4 : tree _r;
8534 4 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8535 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
8536 4 : return _r;
8537 : }
8538 2 : next_after_fail1655:;
8539 : }
8540 : }
8541 2 : break;
8542 : }
8543 6733730 : default:;
8544 : }
8545 6733730 : switch (TREE_CODE (_p1))
8546 : {
8547 0 : case VEC_COND_EXPR:
8548 0 : {
8549 0 : tree _q30 = TREE_OPERAND (_p1, 0);
8550 0 : tree _q31 = TREE_OPERAND (_p1, 1);
8551 0 : tree _q32 = TREE_OPERAND (_p1, 2);
8552 0 : {
8553 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
8554 0 : if (VECTOR_TYPE_P (type)
8555 0 : && (TREE_CODE_CLASS (GE_EXPR) != tcc_comparison
8556 0 : || types_match (type, TREE_TYPE (captures[3]))
8557 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
8558 : || (optimize_vectors_before_lowering_p ()
8559 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
8560 : )
8561 : {
8562 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1656;
8563 0 : {
8564 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1656;
8565 0 : tree res_op0;
8566 0 : res_op0 = captures[2];
8567 0 : tree res_op1;
8568 0 : {
8569 0 : tree _o1[2], _r1;
8570 0 : _o1[0] = unshare_expr (captures[0]);
8571 0 : _o1[1] = captures[3];
8572 0 : _r1 = fold_build2_loc (loc, GE_EXPR, type, _o1[0], _o1[1]);
8573 0 : if (EXPR_P (_r1))
8574 0 : goto next_after_fail1656;
8575 0 : res_op1 = _r1;
8576 : }
8577 0 : tree res_op2;
8578 0 : {
8579 0 : tree _o1[2], _r1;
8580 0 : _o1[0] = captures[0];
8581 0 : _o1[1] = captures[4];
8582 0 : _r1 = fold_build2_loc (loc, GE_EXPR, type, _o1[0], _o1[1]);
8583 0 : if (EXPR_P (_r1))
8584 0 : goto next_after_fail1656;
8585 0 : res_op2 = _r1;
8586 : }
8587 0 : tree _r;
8588 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8589 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
8590 0 : return _r;
8591 : }
8592 0 : next_after_fail1656:;
8593 : }
8594 : }
8595 0 : break;
8596 : }
8597 6733730 : default:;
8598 : }
8599 6733730 : if (uniform_integer_cst_p (_p1))
8600 : {
8601 3411180 : {
8602 3411180 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8603 3411180 : tree res = generic_simplify_392 (loc, type, _p0, _p1, captures, GE_EXPR, GT_EXPR);
8604 3411180 : if (res) return res;
8605 : }
8606 : }
8607 5203732 : switch (TREE_CODE (_p0))
8608 : {
8609 23900 : case MULT_EXPR:
8610 23900 : {
8611 23900 : tree _q20 = TREE_OPERAND (_p0, 0);
8612 23900 : tree _q21 = TREE_OPERAND (_p0, 1);
8613 23900 : switch (TREE_CODE (_q21))
8614 : {
8615 19979 : case INTEGER_CST:
8616 19979 : {
8617 19979 : if (integer_zerop (_p1))
8618 : {
8619 2750 : {
8620 2750 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
8621 2750 : tree res = generic_simplify_253 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
8622 2750 : if (res) return res;
8623 : }
8624 : }
8625 : break;
8626 : }
8627 : default:;
8628 : }
8629 : break;
8630 : }
8631 5203440 : default:;
8632 : }
8633 5203440 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
8634 : {
8635 40140 : {
8636 40140 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8637 40140 : tree res = generic_simplify_255 (loc, type, _p0, _p1, captures, GE_EXPR);
8638 40140 : if (res) return res;
8639 : }
8640 : }
8641 5163337 : switch (TREE_CODE (_p0))
8642 : {
8643 423 : case BIT_NOT_EXPR:
8644 423 : {
8645 423 : tree _q20 = TREE_OPERAND (_p0, 0);
8646 423 : switch (TREE_CODE (_p1))
8647 : {
8648 1 : case BIT_NOT_EXPR:
8649 1 : {
8650 1 : tree _q40 = TREE_OPERAND (_p1, 0);
8651 1 : {
8652 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _p1, _q40 };
8653 1 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, GE_EXPR);
8654 1 : if (res) return res;
8655 : }
8656 0 : break;
8657 : }
8658 422 : default:;
8659 : }
8660 422 : {
8661 422 : tree _p1_pops[1];
8662 422 : if (tree_nop_convert (_p1, _p1_pops))
8663 : {
8664 50 : tree _q40 = _p1_pops[0];
8665 50 : switch (TREE_CODE (_q40))
8666 : {
8667 0 : case BIT_NOT_EXPR:
8668 0 : {
8669 0 : tree _q50 = TREE_OPERAND (_q40, 0);
8670 0 : {
8671 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q50 };
8672 0 : tree res = generic_simplify_259 (loc, type, _p0, _p1, captures, GE_EXPR);
8673 0 : if (res) return res;
8674 : }
8675 0 : break;
8676 : }
8677 : default:;
8678 : }
8679 : }
8680 : }
8681 422 : if (CONSTANT_CLASS_P (_p1))
8682 : {
8683 98 : {
8684 98 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8685 98 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
8686 98 : if (res) return res;
8687 : }
8688 : }
8689 : break;
8690 : }
8691 5163238 : default:;
8692 : }
8693 5163238 : {
8694 5163238 : tree _p0_pops[1];
8695 5163238 : if (tree_nop_convert (_p0, _p0_pops))
8696 : {
8697 239392 : tree _q20 = _p0_pops[0];
8698 239392 : switch (TREE_CODE (_q20))
8699 : {
8700 4 : case BIT_NOT_EXPR:
8701 4 : {
8702 4 : tree _q30 = TREE_OPERAND (_q20, 0);
8703 4 : switch (TREE_CODE (_p1))
8704 : {
8705 0 : case BIT_NOT_EXPR:
8706 0 : {
8707 0 : tree _q50 = TREE_OPERAND (_p1, 0);
8708 0 : {
8709 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _p1, _q50 };
8710 0 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, GE_EXPR);
8711 0 : if (res) return res;
8712 : }
8713 0 : break;
8714 : }
8715 4 : default:;
8716 : }
8717 4 : {
8718 4 : tree _p1_pops[1];
8719 4 : if (tree_nop_convert (_p1, _p1_pops))
8720 : {
8721 0 : tree _q50 = _p1_pops[0];
8722 0 : switch (TREE_CODE (_q50))
8723 : {
8724 0 : case BIT_NOT_EXPR:
8725 0 : {
8726 0 : tree _q60 = TREE_OPERAND (_q50, 0);
8727 0 : {
8728 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q60 };
8729 0 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, GE_EXPR);
8730 0 : if (res) return res;
8731 : }
8732 0 : break;
8733 : }
8734 : default:;
8735 : }
8736 : }
8737 : }
8738 4 : if (CONSTANT_CLASS_P (_p1))
8739 : {
8740 0 : {
8741 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
8742 0 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
8743 0 : if (res) return res;
8744 : }
8745 : }
8746 : break;
8747 : }
8748 : default:;
8749 : }
8750 : }
8751 : }
8752 5163238 : switch (TREE_CODE (_p1))
8753 : {
8754 655925 : case REAL_CST:
8755 655925 : {
8756 655925 : {
8757 655925 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8758 655925 : tree res = generic_simplify_260 (loc, type, _p0, _p1, captures, GE_EXPR);
8759 655925 : if (res) return res;
8760 : }
8761 655842 : break;
8762 : }
8763 5163155 : default:;
8764 : }
8765 5163155 : switch (TREE_CODE (_p0))
8766 : {
8767 677864 : case PLUS_EXPR:
8768 677864 : {
8769 677864 : tree _q20 = TREE_OPERAND (_p0, 0);
8770 677864 : tree _q21 = TREE_OPERAND (_p0, 1);
8771 677864 : switch (TREE_CODE (_q21))
8772 : {
8773 168 : case REAL_CST:
8774 168 : {
8775 168 : switch (TREE_CODE (_p1))
8776 : {
8777 20 : case REAL_CST:
8778 20 : {
8779 20 : {
8780 20 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8781 20 : tree res = generic_simplify_261 (loc, type, _p0, _p1, captures, PLUS_EXPR, GE_EXPR);
8782 20 : if (res) return res;
8783 : }
8784 20 : break;
8785 : }
8786 : default:;
8787 : }
8788 : break;
8789 : }
8790 565478 : case INTEGER_CST:
8791 565478 : {
8792 565478 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
8793 : {
8794 16009 : {
8795 16009 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q20, _q21 };
8796 16009 : tree res = generic_simplify_393 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
8797 16009 : if (res) return res;
8798 : }
8799 : }
8800 : break;
8801 : }
8802 : default:;
8803 : }
8804 : break;
8805 : }
8806 58810 : case MINUS_EXPR:
8807 58810 : {
8808 58810 : tree _q20 = TREE_OPERAND (_p0, 0);
8809 58810 : tree _q21 = TREE_OPERAND (_p0, 1);
8810 58810 : switch (TREE_CODE (_q21))
8811 : {
8812 31 : case REAL_CST:
8813 31 : {
8814 31 : switch (TREE_CODE (_p1))
8815 : {
8816 31 : case REAL_CST:
8817 31 : {
8818 31 : {
8819 31 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8820 31 : tree res = generic_simplify_261 (loc, type, _p0, _p1, captures, MINUS_EXPR, GE_EXPR);
8821 31 : if (res) return res;
8822 : }
8823 31 : break;
8824 : }
8825 : default:;
8826 : }
8827 : break;
8828 : }
8829 58810 : default:;
8830 : }
8831 58810 : switch (TREE_CODE (_q20))
8832 : {
8833 24 : case REAL_CST:
8834 24 : {
8835 24 : switch (TREE_CODE (_p1))
8836 : {
8837 0 : case REAL_CST:
8838 0 : {
8839 0 : {
8840 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8841 0 : tree res = generic_simplify_262 (loc, type, _p0, _p1, captures, GE_EXPR);
8842 0 : if (res) return res;
8843 : }
8844 0 : break;
8845 : }
8846 : default:;
8847 : }
8848 : break;
8849 : }
8850 : default:;
8851 : }
8852 : break;
8853 : }
8854 40529 : case FLOAT_EXPR:
8855 40529 : {
8856 40529 : tree _q20 = TREE_OPERAND (_p0, 0);
8857 40529 : switch (TREE_CODE (_p1))
8858 : {
8859 8 : case FLOAT_EXPR:
8860 8 : {
8861 8 : tree _q40 = TREE_OPERAND (_p1, 0);
8862 8 : {
8863 8 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8864 8 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, GE_EXPR, GE_EXPR);
8865 8 : if (res) return res;
8866 : }
8867 1 : break;
8868 : }
8869 39049 : case REAL_CST:
8870 39049 : {
8871 39049 : {
8872 39049 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8873 39049 : tree res = generic_simplify_266 (loc, type, _p0, _p1, captures, GE_EXPR, GE_EXPR);
8874 39049 : if (res) return res;
8875 : }
8876 19549 : break;
8877 : }
8878 : default:;
8879 : }
8880 : break;
8881 : }
8882 8314 : case EXACT_DIV_EXPR:
8883 8314 : {
8884 8314 : tree _q20 = TREE_OPERAND (_p0, 0);
8885 8314 : tree _q21 = TREE_OPERAND (_p0, 1);
8886 8314 : switch (TREE_CODE (_q21))
8887 : {
8888 8314 : case INTEGER_CST:
8889 8314 : {
8890 8314 : switch (TREE_CODE (_p1))
8891 : {
8892 0 : case INTEGER_CST:
8893 0 : {
8894 0 : {
8895 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
8896 0 : tree res = generic_simplify_394 (loc, type, _p0, _p1, captures, GE_EXPR);
8897 0 : if (res) return res;
8898 : }
8899 0 : break;
8900 : }
8901 : default:;
8902 : }
8903 : break;
8904 : }
8905 : default:;
8906 : }
8907 : break;
8908 : }
8909 632064 : CASE_CONVERT:
8910 632064 : {
8911 632064 : tree _q20 = TREE_OPERAND (_p0, 0);
8912 632064 : switch (TREE_CODE (_q20))
8913 : {
8914 157 : case EXACT_DIV_EXPR:
8915 157 : {
8916 157 : tree _q30 = TREE_OPERAND (_q20, 0);
8917 157 : tree _q31 = TREE_OPERAND (_q20, 1);
8918 157 : switch (TREE_CODE (_q31))
8919 : {
8920 157 : case INTEGER_CST:
8921 157 : {
8922 157 : switch (TREE_CODE (_p1))
8923 : {
8924 0 : case INTEGER_CST:
8925 0 : {
8926 0 : {
8927 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
8928 0 : tree res = generic_simplify_395 (loc, type, _p0, _p1, captures, GE_EXPR, LT_EXPR);
8929 0 : if (res) return res;
8930 : }
8931 0 : break;
8932 : }
8933 : default:;
8934 : }
8935 : break;
8936 : }
8937 : default:;
8938 : }
8939 : break;
8940 : }
8941 632064 : default:;
8942 : }
8943 632064 : switch (TREE_CODE (_p1))
8944 : {
8945 100439 : CASE_CONVERT:
8946 100439 : {
8947 100439 : tree _q40 = TREE_OPERAND (_p1, 0);
8948 100439 : {
8949 100439 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8950 100439 : tree res = generic_simplify_270 (loc, type, _p0, _p1, captures, GE_EXPR);
8951 100439 : if (res) return res;
8952 : }
8953 61733 : break;
8954 : }
8955 593358 : default:;
8956 : }
8957 593358 : {
8958 593358 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
8959 593358 : tree res = generic_simplify_271 (loc, type, _p0, _p1, captures, GE_EXPR);
8960 593358 : if (res) return res;
8961 : }
8962 322068 : switch (TREE_CODE (_q20))
8963 : {
8964 3740 : case ADDR_EXPR:
8965 3740 : {
8966 3740 : switch (TREE_CODE (_p1))
8967 : {
8968 3669 : CASE_CONVERT:
8969 3669 : {
8970 3669 : tree _q40 = TREE_OPERAND (_p1, 0);
8971 3669 : switch (TREE_CODE (_q40))
8972 : {
8973 3669 : case ADDR_EXPR:
8974 3669 : {
8975 3669 : {
8976 3669 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
8977 3669 : tree res = generic_simplify_289 (loc, type, _p0, _p1, captures, GE_EXPR);
8978 3669 : if (res) return res;
8979 : }
8980 257 : break;
8981 : }
8982 : default:;
8983 : }
8984 : break;
8985 : }
8986 7 : case ADDR_EXPR:
8987 7 : {
8988 7 : {
8989 7 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
8990 7 : tree res = generic_simplify_289 (loc, type, _p0, _p1, captures, GE_EXPR);
8991 7 : if (res) return res;
8992 : }
8993 0 : break;
8994 : }
8995 : default:;
8996 : }
8997 : break;
8998 : }
8999 318649 : default:;
9000 : }
9001 318649 : if (uniform_integer_cst_p (_p1))
9002 : {
9003 101762 : {
9004 101762 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9005 101762 : tree res = generic_simplify_396 (loc, type, _p0, _p1, captures, GE_EXPR);
9006 101762 : if (res) return res;
9007 : }
9008 : }
9009 : break;
9010 : }
9011 791 : case NEGATE_EXPR:
9012 791 : {
9013 791 : tree _q20 = TREE_OPERAND (_p0, 0);
9014 791 : switch (TREE_CODE (_p1))
9015 : {
9016 0 : case NEGATE_EXPR:
9017 0 : {
9018 0 : tree _q40 = TREE_OPERAND (_p1, 0);
9019 0 : {
9020 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9021 0 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
9022 0 : if (res) return res;
9023 : }
9024 0 : break;
9025 : }
9026 791 : default:;
9027 : }
9028 791 : if (CONSTANT_CLASS_P (_p1))
9029 : {
9030 254 : {
9031 254 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9032 254 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
9033 254 : if (res) return res;
9034 : }
9035 : }
9036 : break;
9037 : }
9038 7706 : case ADDR_EXPR:
9039 7706 : {
9040 7706 : switch (TREE_CODE (_p1))
9041 : {
9042 0 : CASE_CONVERT:
9043 0 : {
9044 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9045 0 : switch (TREE_CODE (_q30))
9046 : {
9047 0 : case ADDR_EXPR:
9048 0 : {
9049 0 : {
9050 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
9051 0 : tree res = generic_simplify_290 (loc, type, _p0, _p1, captures, GE_EXPR);
9052 0 : if (res) return res;
9053 : }
9054 0 : break;
9055 : }
9056 : default:;
9057 : }
9058 : break;
9059 : }
9060 7308 : case ADDR_EXPR:
9061 7308 : {
9062 7308 : {
9063 7308 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
9064 7308 : tree res = generic_simplify_290 (loc, type, _p0, _p1, captures, GE_EXPR);
9065 7308 : if (res) return res;
9066 : }
9067 116 : break;
9068 : }
9069 : default:;
9070 : }
9071 : break;
9072 : }
9073 239541 : case CALL_EXPR:
9074 239541 : switch (get_call_combined_fn (_p0))
9075 : {
9076 2 : case CFN_BUILT_IN_SQRTF:
9077 2 : if (call_expr_nargs (_p0) == 1)
9078 : {
9079 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9080 2 : switch (TREE_CODE (_p1))
9081 : {
9082 2 : case REAL_CST:
9083 2 : {
9084 2 : {
9085 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9086 2 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, GE_EXPR);
9087 2 : if (res) return res;
9088 : }
9089 0 : break;
9090 : }
9091 0 : case CALL_EXPR:
9092 0 : switch (get_call_combined_fn (_p1))
9093 : {
9094 0 : case CFN_BUILT_IN_SQRTF:
9095 0 : if (call_expr_nargs (_p1) == 1)
9096 : {
9097 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9098 0 : {
9099 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9100 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTF, GE_EXPR);
9101 0 : if (res) return res;
9102 : }
9103 : }
9104 : break;
9105 : default:;
9106 : }
9107 : break;
9108 : default:;
9109 : }
9110 : }
9111 : break;
9112 0 : case CFN_BUILT_IN_SQRTL:
9113 0 : if (call_expr_nargs (_p0) == 1)
9114 : {
9115 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9116 0 : switch (TREE_CODE (_p1))
9117 : {
9118 0 : case REAL_CST:
9119 0 : {
9120 0 : {
9121 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9122 0 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, GE_EXPR);
9123 0 : if (res) return res;
9124 : }
9125 0 : break;
9126 : }
9127 0 : case CALL_EXPR:
9128 0 : switch (get_call_combined_fn (_p1))
9129 : {
9130 0 : case CFN_BUILT_IN_SQRTL:
9131 0 : if (call_expr_nargs (_p1) == 1)
9132 : {
9133 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9134 0 : {
9135 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9136 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRTL, GE_EXPR);
9137 0 : if (res) return res;
9138 : }
9139 : }
9140 : break;
9141 : default:;
9142 : }
9143 : break;
9144 : default:;
9145 : }
9146 : }
9147 : break;
9148 1 : case CFN_BUILT_IN_SQRT:
9149 1 : if (call_expr_nargs (_p0) == 1)
9150 : {
9151 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9152 1 : switch (TREE_CODE (_p1))
9153 : {
9154 1 : case REAL_CST:
9155 1 : {
9156 1 : {
9157 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9158 1 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, GE_EXPR);
9159 1 : if (res) return res;
9160 : }
9161 1 : break;
9162 : }
9163 0 : case CALL_EXPR:
9164 0 : switch (get_call_combined_fn (_p1))
9165 : {
9166 0 : case CFN_BUILT_IN_SQRT:
9167 0 : if (call_expr_nargs (_p1) == 1)
9168 : {
9169 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9170 0 : {
9171 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9172 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_SQRT, GE_EXPR);
9173 0 : if (res) return res;
9174 : }
9175 : }
9176 : break;
9177 : default:;
9178 : }
9179 : break;
9180 : default:;
9181 : }
9182 : }
9183 : break;
9184 0 : case CFN_SQRT:
9185 0 : if (call_expr_nargs (_p0) == 1)
9186 : {
9187 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9188 0 : switch (TREE_CODE (_p1))
9189 : {
9190 0 : case REAL_CST:
9191 0 : {
9192 0 : {
9193 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9194 0 : tree res = generic_simplify_263 (loc, type, _p0, _p1, captures, CFN_SQRT, GE_EXPR);
9195 0 : if (res) return res;
9196 : }
9197 0 : break;
9198 : }
9199 0 : case CALL_EXPR:
9200 0 : switch (get_call_combined_fn (_p1))
9201 : {
9202 0 : case CFN_SQRT:
9203 0 : if (call_expr_nargs (_p1) == 1)
9204 : {
9205 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9206 0 : {
9207 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9208 0 : tree res = generic_simplify_264 (loc, type, _p0, _p1, captures, CFN_SQRT, GE_EXPR);
9209 0 : if (res) return res;
9210 : }
9211 : }
9212 : break;
9213 : default:;
9214 : }
9215 : break;
9216 : default:;
9217 : }
9218 : }
9219 : break;
9220 : default:;
9221 : }
9222 : break;
9223 4796532 : default:;
9224 : }
9225 4796532 : if (uniform_integer_cst_p (_p1))
9226 : {
9227 1599202 : {
9228 1599202 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
9229 1599202 : tree res = generic_simplify_397 (loc, type, _p0, _p1, captures, GE_EXPR);
9230 1599202 : if (res) return res;
9231 : }
9232 : }
9233 4491886 : switch (TREE_CODE (_p0))
9234 : {
9235 307498 : CASE_CONVERT:
9236 307498 : {
9237 307498 : tree _q20 = TREE_OPERAND (_p0, 0);
9238 307498 : switch (TREE_CODE (_q20))
9239 : {
9240 29980 : case PLUS_EXPR:
9241 29980 : {
9242 29980 : tree _q30 = TREE_OPERAND (_q20, 0);
9243 29980 : tree _q31 = TREE_OPERAND (_q20, 1);
9244 29980 : switch (TREE_CODE (_q30))
9245 : {
9246 21474 : CASE_CONVERT:
9247 21474 : {
9248 21474 : tree _q40 = TREE_OPERAND (_q30, 0);
9249 21474 : switch (TREE_CODE (_q31))
9250 : {
9251 21473 : case INTEGER_CST:
9252 21473 : {
9253 21473 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
9254 : {
9255 145 : {
9256 145 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q40, _q31 };
9257 145 : tree res = generic_simplify_398 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
9258 145 : if (res) return res;
9259 : }
9260 : }
9261 : break;
9262 : }
9263 : default:;
9264 : }
9265 : break;
9266 : }
9267 : default:;
9268 : }
9269 : break;
9270 : }
9271 : default:;
9272 : }
9273 : break;
9274 : }
9275 4491814 : default:;
9276 : }
9277 4491814 : switch (TREE_CODE (_p1))
9278 : {
9279 228929 : CASE_CONVERT:
9280 228929 : {
9281 228929 : tree _q30 = TREE_OPERAND (_p1, 0);
9282 228929 : switch (TREE_CODE (_q30))
9283 : {
9284 317 : case PLUS_EXPR:
9285 317 : {
9286 317 : tree _q40 = TREE_OPERAND (_q30, 0);
9287 317 : tree _q41 = TREE_OPERAND (_q30, 1);
9288 317 : switch (TREE_CODE (_q40))
9289 : {
9290 219 : CASE_CONVERT:
9291 219 : {
9292 219 : tree _q50 = TREE_OPERAND (_q40, 0);
9293 219 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9294 : {
9295 0 : switch (TREE_CODE (_q41))
9296 : {
9297 0 : case INTEGER_CST:
9298 0 : {
9299 0 : {
9300 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0, _q41 };
9301 0 : tree res = generic_simplify_398 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR);
9302 0 : if (res) return res;
9303 : }
9304 0 : break;
9305 : }
9306 : default:;
9307 : }
9308 : }
9309 : break;
9310 : }
9311 : default:;
9312 : }
9313 : break;
9314 : }
9315 : default:;
9316 : }
9317 : break;
9318 : }
9319 58873 : case PLUS_EXPR:
9320 58873 : {
9321 58873 : tree _q30 = TREE_OPERAND (_p1, 0);
9322 58873 : tree _q31 = TREE_OPERAND (_p1, 1);
9323 58873 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9324 : {
9325 0 : switch (TREE_CODE (_q31))
9326 : {
9327 0 : case INTEGER_CST:
9328 0 : {
9329 0 : {
9330 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0, _q31 };
9331 0 : tree res = generic_simplify_393 (loc, type, _p0, _p1, captures, LE_EXPR, GT_EXPR);
9332 0 : if (res) return res;
9333 : }
9334 0 : break;
9335 : }
9336 : default:;
9337 : }
9338 : }
9339 : break;
9340 : }
9341 2495 : case MINUS_EXPR:
9342 2495 : {
9343 2495 : tree _q30 = TREE_OPERAND (_p1, 0);
9344 2495 : tree _q31 = TREE_OPERAND (_p1, 1);
9345 2495 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9346 : {
9347 0 : {
9348 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
9349 0 : tree res = generic_simplify_399 (loc, type, _p0, _p1, captures, LE_EXPR);
9350 0 : if (res) return res;
9351 : }
9352 : }
9353 : break;
9354 : }
9355 4491814 : default:;
9356 : }
9357 4491814 : switch (TREE_CODE (_p0))
9358 : {
9359 588423 : case PLUS_EXPR:
9360 588423 : {
9361 588423 : tree _q20 = TREE_OPERAND (_p0, 0);
9362 588423 : tree _q21 = TREE_OPERAND (_p0, 1);
9363 588423 : switch (TREE_CODE (_q20))
9364 : {
9365 141 : case MINUS_EXPR:
9366 141 : {
9367 141 : tree _q30 = TREE_OPERAND (_q20, 0);
9368 141 : tree _q31 = TREE_OPERAND (_q20, 1);
9369 141 : if (integer_minus_onep (_q21))
9370 : {
9371 1 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
9372 : {
9373 1 : {
9374 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
9375 1 : tree res = generic_simplify_400 (loc, type, _p0, _p1, captures, GE_EXPR);
9376 1 : if (res) return res;
9377 : }
9378 : }
9379 : }
9380 : break;
9381 : }
9382 : default:;
9383 : }
9384 : break;
9385 : }
9386 4491813 : default:;
9387 : }
9388 4491813 : switch (TREE_CODE (_p1))
9389 : {
9390 0 : case REALPART_EXPR:
9391 0 : {
9392 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9393 0 : switch (TREE_CODE (_q30))
9394 : {
9395 0 : case CALL_EXPR:
9396 0 : switch (get_call_combined_fn (_q30))
9397 : {
9398 0 : case CFN_SUB_OVERFLOW:
9399 0 : if (call_expr_nargs (_q30) == 2)
9400 : {
9401 0 : tree _q40 = CALL_EXPR_ARG (_q30, 0);
9402 0 : tree _q41 = CALL_EXPR_ARG (_q30, 1);
9403 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
9404 : {
9405 0 : {
9406 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q41 };
9407 0 : tree res = generic_simplify_401 (loc, type, _p0, _p1, captures, LE_EXPR, EQ_EXPR);
9408 0 : if (res) return res;
9409 : }
9410 : }
9411 : }
9412 : break;
9413 : default:;
9414 : }
9415 : break;
9416 : default:;
9417 : }
9418 : break;
9419 : }
9420 4491813 : default:;
9421 : }
9422 4491813 : switch (TREE_CODE (_p0))
9423 : {
9424 0 : case REALPART_EXPR:
9425 0 : {
9426 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9427 0 : switch (TREE_CODE (_q20))
9428 : {
9429 0 : case CALL_EXPR:
9430 0 : switch (get_call_combined_fn (_q20))
9431 : {
9432 0 : case CFN_ADD_OVERFLOW:
9433 0 : if (call_expr_nargs (_q20) == 2)
9434 : {
9435 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
9436 0 : tree _q31 = CALL_EXPR_ARG (_q20, 1);
9437 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
9438 : {
9439 0 : {
9440 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
9441 0 : tree res = generic_simplify_402 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
9442 0 : if (res) return res;
9443 : }
9444 : }
9445 0 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
9446 : {
9447 0 : {
9448 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q31, _q30 };
9449 0 : tree res = generic_simplify_402 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
9450 0 : if (res) return res;
9451 : }
9452 : }
9453 : }
9454 : break;
9455 : default:;
9456 : }
9457 : break;
9458 : default:;
9459 : }
9460 : break;
9461 : }
9462 1448 : case TRUNC_DIV_EXPR:
9463 1448 : {
9464 1448 : tree _q20 = TREE_OPERAND (_p0, 0);
9465 1448 : tree _q21 = TREE_OPERAND (_p0, 1);
9466 1448 : if (integer_all_onesp (_q20))
9467 : {
9468 33 : {
9469 33 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _p1 };
9470 33 : tree res = generic_simplify_403 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
9471 33 : if (res) return res;
9472 : }
9473 : }
9474 : break;
9475 : }
9476 22128 : case MULT_EXPR:
9477 22128 : {
9478 22128 : tree _q20 = TREE_OPERAND (_p0, 0);
9479 22128 : tree _q21 = TREE_OPERAND (_p0, 1);
9480 22128 : switch (TREE_CODE (_q21))
9481 : {
9482 305 : case REAL_CST:
9483 305 : {
9484 305 : switch (TREE_CODE (_p1))
9485 : {
9486 43 : case REAL_CST:
9487 43 : {
9488 43 : {
9489 43 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9490 43 : tree res = generic_simplify_404 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
9491 43 : if (res) return res;
9492 : }
9493 43 : break;
9494 : }
9495 : default:;
9496 : }
9497 : break;
9498 : }
9499 : default:;
9500 : }
9501 : break;
9502 : }
9503 151 : case REAL_CST:
9504 151 : {
9505 151 : switch (TREE_CODE (_p1))
9506 : {
9507 0 : case CALL_EXPR:
9508 0 : switch (get_call_combined_fn (_p1))
9509 : {
9510 0 : case CFN_BUILT_IN_EXP:
9511 0 : if (call_expr_nargs (_p1) == 1)
9512 : {
9513 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9514 0 : {
9515 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9516 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, LE_EXPR);
9517 0 : if (res) return res;
9518 : }
9519 : }
9520 : break;
9521 0 : case CFN_BUILT_IN_LOG:
9522 0 : if (call_expr_nargs (_p1) == 1)
9523 : {
9524 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9525 0 : {
9526 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9527 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, LE_EXPR);
9528 0 : if (res) return res;
9529 : }
9530 : }
9531 : break;
9532 0 : case CFN_BUILT_IN_EXP10F:
9533 0 : if (call_expr_nargs (_p1) == 1)
9534 : {
9535 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9536 0 : {
9537 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9538 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, LE_EXPR);
9539 0 : if (res) return res;
9540 : }
9541 : }
9542 : break;
9543 0 : case CFN_BUILT_IN_EXP10L:
9544 0 : if (call_expr_nargs (_p1) == 1)
9545 : {
9546 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9547 0 : {
9548 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9549 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, LE_EXPR);
9550 0 : if (res) return res;
9551 : }
9552 : }
9553 : break;
9554 0 : case CFN_BUILT_IN_EXP2:
9555 0 : if (call_expr_nargs (_p1) == 1)
9556 : {
9557 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9558 0 : {
9559 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9560 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, LE_EXPR);
9561 0 : if (res) return res;
9562 : }
9563 : }
9564 : break;
9565 0 : case CFN_BUILT_IN_EXPF:
9566 0 : if (call_expr_nargs (_p1) == 1)
9567 : {
9568 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9569 0 : {
9570 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9571 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, LE_EXPR);
9572 0 : if (res) return res;
9573 : }
9574 : }
9575 : break;
9576 0 : case CFN_BUILT_IN_EXPL:
9577 0 : if (call_expr_nargs (_p1) == 1)
9578 : {
9579 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9580 0 : {
9581 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9582 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, LE_EXPR);
9583 0 : if (res) return res;
9584 : }
9585 : }
9586 : break;
9587 0 : case CFN_BUILT_IN_LOG2:
9588 0 : if (call_expr_nargs (_p1) == 1)
9589 : {
9590 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9591 0 : {
9592 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9593 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, LE_EXPR);
9594 0 : if (res) return res;
9595 : }
9596 : }
9597 : break;
9598 0 : case CFN_BUILT_IN_LOGF:
9599 0 : if (call_expr_nargs (_p1) == 1)
9600 : {
9601 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9602 0 : {
9603 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9604 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, LE_EXPR);
9605 0 : if (res) return res;
9606 : }
9607 : }
9608 : break;
9609 0 : case CFN_BUILT_IN_LOGL:
9610 0 : if (call_expr_nargs (_p1) == 1)
9611 : {
9612 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9613 0 : {
9614 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9615 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, LE_EXPR);
9616 0 : if (res) return res;
9617 : }
9618 : }
9619 : break;
9620 0 : case CFN_BUILT_IN_LOG10F:
9621 0 : if (call_expr_nargs (_p1) == 1)
9622 : {
9623 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9624 0 : {
9625 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9626 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, LE_EXPR);
9627 0 : if (res) return res;
9628 : }
9629 : }
9630 : break;
9631 0 : case CFN_BUILT_IN_LOG10L:
9632 0 : if (call_expr_nargs (_p1) == 1)
9633 : {
9634 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9635 0 : {
9636 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9637 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, LE_EXPR);
9638 0 : if (res) return res;
9639 : }
9640 : }
9641 : break;
9642 0 : case CFN_EXP:
9643 0 : if (call_expr_nargs (_p1) == 1)
9644 : {
9645 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9646 0 : {
9647 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9648 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, LE_EXPR);
9649 0 : if (res) return res;
9650 : }
9651 : }
9652 : break;
9653 0 : case CFN_LOG:
9654 0 : if (call_expr_nargs (_p1) == 1)
9655 : {
9656 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9657 0 : {
9658 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9659 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, LE_EXPR);
9660 0 : if (res) return res;
9661 : }
9662 : }
9663 : break;
9664 0 : case CFN_EXP2:
9665 0 : if (call_expr_nargs (_p1) == 1)
9666 : {
9667 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9668 0 : {
9669 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9670 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, LE_EXPR);
9671 0 : if (res) return res;
9672 : }
9673 : }
9674 : break;
9675 0 : case CFN_LOG2:
9676 0 : if (call_expr_nargs (_p1) == 1)
9677 : {
9678 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9679 0 : {
9680 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9681 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, LE_EXPR);
9682 0 : if (res) return res;
9683 : }
9684 : }
9685 : break;
9686 0 : case CFN_EXP10:
9687 0 : if (call_expr_nargs (_p1) == 1)
9688 : {
9689 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9690 0 : {
9691 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9692 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, LE_EXPR);
9693 0 : if (res) return res;
9694 : }
9695 : }
9696 : break;
9697 0 : case CFN_LOG10:
9698 0 : if (call_expr_nargs (_p1) == 1)
9699 : {
9700 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9701 0 : {
9702 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9703 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, LE_EXPR);
9704 0 : if (res) return res;
9705 : }
9706 : }
9707 : break;
9708 0 : case CFN_BUILT_IN_EXP10:
9709 0 : if (call_expr_nargs (_p1) == 1)
9710 : {
9711 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9712 0 : {
9713 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9714 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, LE_EXPR);
9715 0 : if (res) return res;
9716 : }
9717 : }
9718 : break;
9719 0 : case CFN_BUILT_IN_EXP2F:
9720 0 : if (call_expr_nargs (_p1) == 1)
9721 : {
9722 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9723 0 : {
9724 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9725 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, LE_EXPR);
9726 0 : if (res) return res;
9727 : }
9728 : }
9729 : break;
9730 0 : case CFN_BUILT_IN_EXP2L:
9731 0 : if (call_expr_nargs (_p1) == 1)
9732 : {
9733 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9734 0 : {
9735 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9736 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, LE_EXPR);
9737 0 : if (res) return res;
9738 : }
9739 : }
9740 : break;
9741 0 : case CFN_BUILT_IN_LOG10:
9742 0 : if (call_expr_nargs (_p1) == 1)
9743 : {
9744 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9745 0 : {
9746 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9747 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, LE_EXPR);
9748 0 : if (res) return res;
9749 : }
9750 : }
9751 : break;
9752 0 : case CFN_BUILT_IN_LOG2F:
9753 0 : if (call_expr_nargs (_p1) == 1)
9754 : {
9755 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9756 0 : {
9757 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9758 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, LE_EXPR);
9759 0 : if (res) return res;
9760 : }
9761 : }
9762 : break;
9763 0 : case CFN_BUILT_IN_LOG2L:
9764 0 : if (call_expr_nargs (_p1) == 1)
9765 : {
9766 0 : tree _q30 = CALL_EXPR_ARG (_p1, 0);
9767 0 : {
9768 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9769 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, LE_EXPR);
9770 0 : if (res) return res;
9771 : }
9772 : }
9773 : break;
9774 : default:;
9775 : }
9776 : break;
9777 : default:;
9778 : }
9779 : break;
9780 : }
9781 588422 : case PLUS_EXPR:
9782 588422 : {
9783 588422 : tree _q20 = TREE_OPERAND (_p0, 0);
9784 588422 : tree _q21 = TREE_OPERAND (_p0, 1);
9785 588422 : switch (TREE_CODE (_q21))
9786 : {
9787 476036 : case INTEGER_CST:
9788 476036 : {
9789 476036 : switch (TREE_CODE (_p1))
9790 : {
9791 117394 : case INTEGER_CST:
9792 117394 : {
9793 117394 : {
9794 117394 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
9795 117394 : tree res = generic_simplify_405 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, GE_EXPR, LE_EXPR);
9796 117394 : if (res) return res;
9797 : }
9798 55936 : break;
9799 : }
9800 : default:;
9801 : }
9802 : break;
9803 : }
9804 : default:;
9805 : }
9806 : break;
9807 : }
9808 58366 : case MINUS_EXPR:
9809 58366 : {
9810 58366 : tree _q20 = TREE_OPERAND (_p0, 0);
9811 58366 : tree _q21 = TREE_OPERAND (_p0, 1);
9812 58366 : switch (TREE_CODE (_q21))
9813 : {
9814 7 : case INTEGER_CST:
9815 7 : {
9816 7 : switch (TREE_CODE (_p1))
9817 : {
9818 7 : case INTEGER_CST:
9819 7 : {
9820 7 : {
9821 7 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
9822 7 : tree res = generic_simplify_405 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, GE_EXPR, LE_EXPR);
9823 7 : if (res) return res;
9824 : }
9825 0 : break;
9826 : }
9827 : default:;
9828 : }
9829 : break;
9830 : }
9831 58359 : default:;
9832 : }
9833 58359 : switch (TREE_CODE (_q20))
9834 : {
9835 1580 : case INTEGER_CST:
9836 1580 : {
9837 1580 : switch (TREE_CODE (_p1))
9838 : {
9839 543 : case INTEGER_CST:
9840 543 : {
9841 543 : {
9842 543 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9843 543 : tree res = generic_simplify_296 (loc, type, _p0, _p1, captures, GE_EXPR, LE_EXPR);
9844 543 : if (res) return res;
9845 : }
9846 0 : break;
9847 : }
9848 : default:;
9849 : }
9850 : break;
9851 : }
9852 : default:;
9853 : }
9854 : break;
9855 : }
9856 239151 : case CALL_EXPR:
9857 239151 : switch (get_call_combined_fn (_p0))
9858 : {
9859 1 : case CFN_BUILT_IN_CTZ:
9860 1 : if (call_expr_nargs (_p0) == 1)
9861 : {
9862 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9863 1 : switch (TREE_CODE (_p1))
9864 : {
9865 1 : case INTEGER_CST:
9866 1 : {
9867 1 : {
9868 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9869 1 : tree res = generic_simplify_406 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZ);
9870 1 : if (res) return res;
9871 : }
9872 0 : break;
9873 : }
9874 : default:;
9875 : }
9876 : }
9877 : break;
9878 1 : case CFN_BUILT_IN_EXP:
9879 1 : if (call_expr_nargs (_p0) == 1)
9880 : {
9881 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9882 1 : switch (TREE_CODE (_p1))
9883 : {
9884 1 : case REAL_CST:
9885 1 : {
9886 1 : {
9887 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9888 1 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, GE_EXPR);
9889 1 : if (res) return res;
9890 : }
9891 1 : break;
9892 : }
9893 : default:;
9894 : }
9895 : }
9896 : break;
9897 1 : case CFN_BUILT_IN_LOG:
9898 1 : if (call_expr_nargs (_p0) == 1)
9899 : {
9900 1 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9901 1 : switch (TREE_CODE (_p1))
9902 : {
9903 0 : case REAL_CST:
9904 0 : {
9905 0 : {
9906 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9907 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, GE_EXPR);
9908 0 : if (res) return res;
9909 : }
9910 0 : break;
9911 : }
9912 : default:;
9913 : }
9914 : }
9915 : break;
9916 0 : case CFN_BUILT_IN_EXP10F:
9917 0 : if (call_expr_nargs (_p0) == 1)
9918 : {
9919 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9920 0 : switch (TREE_CODE (_p1))
9921 : {
9922 0 : case REAL_CST:
9923 0 : {
9924 0 : {
9925 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9926 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, GE_EXPR);
9927 0 : if (res) return res;
9928 : }
9929 0 : break;
9930 : }
9931 : default:;
9932 : }
9933 : }
9934 : break;
9935 0 : case CFN_BUILT_IN_EXP10L:
9936 0 : if (call_expr_nargs (_p0) == 1)
9937 : {
9938 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9939 0 : switch (TREE_CODE (_p1))
9940 : {
9941 0 : case REAL_CST:
9942 0 : {
9943 0 : {
9944 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9945 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, GE_EXPR);
9946 0 : if (res) return res;
9947 : }
9948 0 : break;
9949 : }
9950 : default:;
9951 : }
9952 : }
9953 : break;
9954 0 : case CFN_BUILT_IN_CTZL:
9955 0 : if (call_expr_nargs (_p0) == 1)
9956 : {
9957 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9958 0 : switch (TREE_CODE (_p1))
9959 : {
9960 0 : case INTEGER_CST:
9961 0 : {
9962 0 : {
9963 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9964 0 : tree res = generic_simplify_406 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZL);
9965 0 : if (res) return res;
9966 : }
9967 0 : break;
9968 : }
9969 : default:;
9970 : }
9971 : }
9972 : break;
9973 0 : case CFN_BUILT_IN_EXP2:
9974 0 : if (call_expr_nargs (_p0) == 1)
9975 : {
9976 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9977 0 : switch (TREE_CODE (_p1))
9978 : {
9979 0 : case REAL_CST:
9980 0 : {
9981 0 : {
9982 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
9983 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, GE_EXPR);
9984 0 : if (res) return res;
9985 : }
9986 0 : break;
9987 : }
9988 : default:;
9989 : }
9990 : }
9991 : break;
9992 0 : case CFN_BUILT_IN_EXPF:
9993 0 : if (call_expr_nargs (_p0) == 1)
9994 : {
9995 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9996 0 : switch (TREE_CODE (_p1))
9997 : {
9998 0 : case REAL_CST:
9999 0 : {
10000 0 : {
10001 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10002 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, GE_EXPR);
10003 0 : if (res) return res;
10004 : }
10005 0 : break;
10006 : }
10007 : default:;
10008 : }
10009 : }
10010 : break;
10011 0 : case CFN_BUILT_IN_EXPL:
10012 0 : if (call_expr_nargs (_p0) == 1)
10013 : {
10014 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10015 0 : switch (TREE_CODE (_p1))
10016 : {
10017 0 : case REAL_CST:
10018 0 : {
10019 0 : {
10020 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10021 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, GE_EXPR);
10022 0 : if (res) return res;
10023 : }
10024 0 : break;
10025 : }
10026 : default:;
10027 : }
10028 : }
10029 : break;
10030 0 : case CFN_BUILT_IN_LOG2:
10031 0 : if (call_expr_nargs (_p0) == 1)
10032 : {
10033 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10034 0 : switch (TREE_CODE (_p1))
10035 : {
10036 0 : case REAL_CST:
10037 0 : {
10038 0 : {
10039 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10040 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, GE_EXPR);
10041 0 : if (res) return res;
10042 : }
10043 0 : break;
10044 : }
10045 : default:;
10046 : }
10047 : }
10048 : break;
10049 0 : case CFN_BUILT_IN_LOGF:
10050 0 : if (call_expr_nargs (_p0) == 1)
10051 : {
10052 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10053 0 : switch (TREE_CODE (_p1))
10054 : {
10055 0 : case REAL_CST:
10056 0 : {
10057 0 : {
10058 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10059 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, GE_EXPR);
10060 0 : if (res) return res;
10061 : }
10062 0 : break;
10063 : }
10064 : default:;
10065 : }
10066 : }
10067 : break;
10068 0 : case CFN_BUILT_IN_LOGL:
10069 0 : if (call_expr_nargs (_p0) == 1)
10070 : {
10071 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10072 0 : switch (TREE_CODE (_p1))
10073 : {
10074 0 : case REAL_CST:
10075 0 : {
10076 0 : {
10077 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10078 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, GE_EXPR);
10079 0 : if (res) return res;
10080 : }
10081 0 : break;
10082 : }
10083 : default:;
10084 : }
10085 : }
10086 : break;
10087 0 : case CFN_BUILT_IN_LOG10F:
10088 0 : if (call_expr_nargs (_p0) == 1)
10089 : {
10090 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10091 0 : switch (TREE_CODE (_p1))
10092 : {
10093 0 : case REAL_CST:
10094 0 : {
10095 0 : {
10096 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10097 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, GE_EXPR);
10098 0 : if (res) return res;
10099 : }
10100 0 : break;
10101 : }
10102 : default:;
10103 : }
10104 : }
10105 : break;
10106 0 : case CFN_BUILT_IN_LOG10L:
10107 0 : if (call_expr_nargs (_p0) == 1)
10108 : {
10109 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10110 0 : switch (TREE_CODE (_p1))
10111 : {
10112 0 : case REAL_CST:
10113 0 : {
10114 0 : {
10115 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10116 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, GE_EXPR);
10117 0 : if (res) return res;
10118 : }
10119 0 : break;
10120 : }
10121 : default:;
10122 : }
10123 : }
10124 : break;
10125 0 : case CFN_BUILT_IN_CTZIMAX:
10126 0 : if (call_expr_nargs (_p0) == 1)
10127 : {
10128 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10129 0 : switch (TREE_CODE (_p1))
10130 : {
10131 0 : case INTEGER_CST:
10132 0 : {
10133 0 : {
10134 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10135 0 : tree res = generic_simplify_406 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZIMAX);
10136 0 : if (res) return res;
10137 : }
10138 0 : break;
10139 : }
10140 : default:;
10141 : }
10142 : }
10143 : break;
10144 0 : case CFN_CTZ:
10145 0 : if (call_expr_nargs (_p0) == 2)
10146 : {
10147 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10148 0 : tree _q21 = CALL_EXPR_ARG (_p0, 1);
10149 0 : switch (TREE_CODE (_p1))
10150 : {
10151 0 : case INTEGER_CST:
10152 0 : {
10153 0 : {
10154 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10155 0 : tree res = generic_simplify_407 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR);
10156 0 : if (res) return res;
10157 : }
10158 0 : break;
10159 : }
10160 : default:;
10161 : }
10162 : }
10163 0 : if (call_expr_nargs (_p0) == 1)
10164 : {
10165 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10166 0 : switch (TREE_CODE (_p1))
10167 : {
10168 0 : case INTEGER_CST:
10169 0 : {
10170 0 : {
10171 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10172 0 : tree res = generic_simplify_406 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR, CFN_CTZ);
10173 0 : if (res) return res;
10174 : }
10175 0 : break;
10176 : }
10177 : default:;
10178 : }
10179 : }
10180 : break;
10181 0 : case CFN_EXP:
10182 0 : if (call_expr_nargs (_p0) == 1)
10183 : {
10184 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10185 0 : switch (TREE_CODE (_p1))
10186 : {
10187 0 : case REAL_CST:
10188 0 : {
10189 0 : {
10190 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10191 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, GE_EXPR);
10192 0 : if (res) return res;
10193 : }
10194 0 : break;
10195 : }
10196 : default:;
10197 : }
10198 : }
10199 : break;
10200 0 : case CFN_LOG:
10201 0 : if (call_expr_nargs (_p0) == 1)
10202 : {
10203 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10204 0 : switch (TREE_CODE (_p1))
10205 : {
10206 0 : case REAL_CST:
10207 0 : {
10208 0 : {
10209 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10210 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_LOG, CFN_EXP, GE_EXPR);
10211 0 : if (res) return res;
10212 : }
10213 0 : break;
10214 : }
10215 : default:;
10216 : }
10217 : }
10218 : break;
10219 0 : case CFN_EXP2:
10220 0 : if (call_expr_nargs (_p0) == 1)
10221 : {
10222 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10223 0 : switch (TREE_CODE (_p1))
10224 : {
10225 0 : case REAL_CST:
10226 0 : {
10227 0 : {
10228 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10229 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, GE_EXPR);
10230 0 : if (res) return res;
10231 : }
10232 0 : break;
10233 : }
10234 : default:;
10235 : }
10236 : }
10237 : break;
10238 0 : case CFN_LOG2:
10239 0 : if (call_expr_nargs (_p0) == 1)
10240 : {
10241 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10242 0 : switch (TREE_CODE (_p1))
10243 : {
10244 0 : case REAL_CST:
10245 0 : {
10246 0 : {
10247 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10248 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_LOG2, CFN_EXP2, GE_EXPR);
10249 0 : if (res) return res;
10250 : }
10251 0 : break;
10252 : }
10253 : default:;
10254 : }
10255 : }
10256 : break;
10257 0 : case CFN_EXP10:
10258 0 : if (call_expr_nargs (_p0) == 1)
10259 : {
10260 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10261 0 : switch (TREE_CODE (_p1))
10262 : {
10263 0 : case REAL_CST:
10264 0 : {
10265 0 : {
10266 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10267 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, GE_EXPR);
10268 0 : if (res) return res;
10269 : }
10270 0 : break;
10271 : }
10272 : default:;
10273 : }
10274 : }
10275 : break;
10276 0 : case CFN_BUILT_IN_CTZLL:
10277 0 : if (call_expr_nargs (_p0) == 1)
10278 : {
10279 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10280 0 : switch (TREE_CODE (_p1))
10281 : {
10282 0 : case INTEGER_CST:
10283 0 : {
10284 0 : {
10285 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10286 0 : tree res = generic_simplify_406 (loc, type, _p0, _p1, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZLL);
10287 0 : if (res) return res;
10288 : }
10289 0 : break;
10290 : }
10291 : default:;
10292 : }
10293 : }
10294 : break;
10295 0 : case CFN_LOG10:
10296 0 : if (call_expr_nargs (_p0) == 1)
10297 : {
10298 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10299 0 : switch (TREE_CODE (_p1))
10300 : {
10301 0 : case REAL_CST:
10302 0 : {
10303 0 : {
10304 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10305 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_LOG10, CFN_EXP10, GE_EXPR);
10306 0 : if (res) return res;
10307 : }
10308 0 : break;
10309 : }
10310 : default:;
10311 : }
10312 : }
10313 : break;
10314 0 : case CFN_BUILT_IN_EXP10:
10315 0 : if (call_expr_nargs (_p0) == 1)
10316 : {
10317 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10318 0 : switch (TREE_CODE (_p1))
10319 : {
10320 0 : case REAL_CST:
10321 0 : {
10322 0 : {
10323 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10324 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, GE_EXPR);
10325 0 : if (res) return res;
10326 : }
10327 0 : break;
10328 : }
10329 : default:;
10330 : }
10331 : }
10332 : break;
10333 0 : case CFN_BUILT_IN_EXP2F:
10334 0 : if (call_expr_nargs (_p0) == 1)
10335 : {
10336 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10337 0 : switch (TREE_CODE (_p1))
10338 : {
10339 0 : case REAL_CST:
10340 0 : {
10341 0 : {
10342 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10343 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, GE_EXPR);
10344 0 : if (res) return res;
10345 : }
10346 0 : break;
10347 : }
10348 : default:;
10349 : }
10350 : }
10351 : break;
10352 0 : case CFN_BUILT_IN_EXP2L:
10353 0 : if (call_expr_nargs (_p0) == 1)
10354 : {
10355 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10356 0 : switch (TREE_CODE (_p1))
10357 : {
10358 0 : case REAL_CST:
10359 0 : {
10360 0 : {
10361 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10362 0 : tree res = generic_simplify_417 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, GE_EXPR);
10363 0 : if (res) return res;
10364 : }
10365 0 : break;
10366 : }
10367 : default:;
10368 : }
10369 : }
10370 : break;
10371 0 : case CFN_BUILT_IN_LOG10:
10372 0 : if (call_expr_nargs (_p0) == 1)
10373 : {
10374 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10375 0 : switch (TREE_CODE (_p1))
10376 : {
10377 0 : case REAL_CST:
10378 0 : {
10379 0 : {
10380 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10381 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, GE_EXPR);
10382 0 : if (res) return res;
10383 : }
10384 0 : break;
10385 : }
10386 : default:;
10387 : }
10388 : }
10389 : break;
10390 0 : case CFN_BUILT_IN_LOG2F:
10391 0 : if (call_expr_nargs (_p0) == 1)
10392 : {
10393 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10394 0 : switch (TREE_CODE (_p1))
10395 : {
10396 0 : case REAL_CST:
10397 0 : {
10398 0 : {
10399 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10400 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, GE_EXPR);
10401 0 : if (res) return res;
10402 : }
10403 0 : break;
10404 : }
10405 : default:;
10406 : }
10407 : }
10408 : break;
10409 0 : case CFN_BUILT_IN_LOG2L:
10410 0 : if (call_expr_nargs (_p0) == 1)
10411 : {
10412 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
10413 0 : switch (TREE_CODE (_p1))
10414 : {
10415 0 : case REAL_CST:
10416 0 : {
10417 0 : {
10418 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
10419 0 : tree res = generic_simplify_416 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, GE_EXPR);
10420 0 : if (res) return res;
10421 : }
10422 0 : break;
10423 : }
10424 : default:;
10425 : }
10426 : }
10427 : break;
10428 : default:;
10429 : }
10430 : break;
10431 : default:;
10432 : }
10433 : return NULL_TREE;
10434 : }
10435 :
10436 : tree
10437 388906 : generic_simplify_MAX_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10438 : {
10439 388906 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10440 388906 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10441 : {
10442 0 : {
10443 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10444 0 : tree res = generic_simplify_524 (loc, type, _p0, _p1, captures, MAX_EXPR);
10445 0 : if (res) return res;
10446 : }
10447 : }
10448 388906 : switch (TREE_CODE (_p0))
10449 : {
10450 111 : case MAX_EXPR:
10451 111 : {
10452 111 : tree _q20 = TREE_OPERAND (_p0, 0);
10453 111 : tree _q21 = TREE_OPERAND (_p0, 1);
10454 111 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10455 : {
10456 0 : {
10457 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10458 0 : tree res = generic_simplify_525 (loc, type, _p0, _p1, captures, MAX_EXPR);
10459 0 : if (res) return res;
10460 : }
10461 : }
10462 111 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10463 : {
10464 0 : {
10465 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10466 0 : tree res = generic_simplify_525 (loc, type, _p0, _p1, captures, MAX_EXPR);
10467 0 : if (res) return res;
10468 : }
10469 : }
10470 : break;
10471 : }
10472 388906 : default:;
10473 : }
10474 388906 : switch (TREE_CODE (_p1))
10475 : {
10476 0 : case MAX_EXPR:
10477 0 : {
10478 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10479 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10480 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10481 : {
10482 0 : {
10483 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
10484 0 : tree res = generic_simplify_526 (loc, type, _p0, _p1, captures, MAX_EXPR);
10485 0 : if (res) return res;
10486 : }
10487 : }
10488 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10489 : {
10490 0 : {
10491 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q30 };
10492 0 : tree res = generic_simplify_526 (loc, type, _p0, _p1, captures, MAX_EXPR);
10493 0 : if (res) return res;
10494 : }
10495 : }
10496 : break;
10497 : }
10498 388906 : default:;
10499 : }
10500 388906 : switch (TREE_CODE (_p0))
10501 : {
10502 3476 : case MIN_EXPR:
10503 3476 : {
10504 3476 : tree _q20 = TREE_OPERAND (_p0, 0);
10505 3476 : tree _q21 = TREE_OPERAND (_p0, 1);
10506 3476 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10507 : {
10508 1 : {
10509 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10510 1 : tree res = generic_simplify_539 (loc, type, _p0, _p1, captures);
10511 1 : if (res) return res;
10512 : }
10513 : }
10514 3475 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10515 : {
10516 1 : {
10517 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10518 1 : tree res = generic_simplify_539 (loc, type, _p0, _p1, captures);
10519 1 : if (res) return res;
10520 : }
10521 : }
10522 : break;
10523 : }
10524 388904 : default:;
10525 : }
10526 388904 : switch (TREE_CODE (_p1))
10527 : {
10528 0 : case MIN_EXPR:
10529 0 : {
10530 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10531 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10532 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10533 : {
10534 0 : {
10535 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
10536 0 : tree res = generic_simplify_539 (loc, type, _p0, _p1, captures);
10537 0 : if (res) return res;
10538 : }
10539 : }
10540 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10541 : {
10542 0 : {
10543 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
10544 0 : tree res = generic_simplify_539 (loc, type, _p0, _p1, captures);
10545 0 : if (res) return res;
10546 : }
10547 : }
10548 : break;
10549 : }
10550 0 : case NEGATE_EXPR:
10551 0 : {
10552 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10553 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10554 : {
10555 0 : {
10556 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10557 0 : tree res = generic_simplify_540 (loc, type, _p0, _p1, captures);
10558 0 : if (res) return res;
10559 : }
10560 : }
10561 : break;
10562 : }
10563 388904 : default:;
10564 : }
10565 388904 : switch (TREE_CODE (_p0))
10566 : {
10567 76 : case NEGATE_EXPR:
10568 76 : {
10569 76 : tree _q20 = TREE_OPERAND (_p0, 0);
10570 76 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10571 : {
10572 2 : {
10573 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10574 2 : tree res = generic_simplify_540 (loc, type, _p0, _p1, captures);
10575 2 : if (res) return res;
10576 : }
10577 : }
10578 : break;
10579 : }
10580 388902 : default:;
10581 : }
10582 388902 : {
10583 388902 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10584 388902 : if (INTEGRAL_TYPE_P (type)
10585 386948 : && TYPE_MAX_VALUE (type)
10586 775850 : && operand_equal_p (captures[1], TYPE_MAX_VALUE (type), OEP_ONLY_CONST)
10587 : )
10588 : {
10589 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1780;
10590 0 : {
10591 0 : tree _r;
10592 0 : _r = captures[1];
10593 0 : if (TREE_SIDE_EFFECTS (captures[0]))
10594 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
10595 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1034, __FILE__, __LINE__, true);
10596 0 : return _r;
10597 : }
10598 0 : next_after_fail1780:;
10599 : }
10600 : else
10601 : {
10602 388902 : if (INTEGRAL_TYPE_P (type)
10603 386948 : && TYPE_MIN_VALUE (type)
10604 775850 : && operand_equal_p (captures[1], TYPE_MIN_VALUE (type), OEP_ONLY_CONST)
10605 : )
10606 : {
10607 30849 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1781;
10608 30849 : {
10609 30849 : tree _r;
10610 30849 : _r = captures[0];
10611 30849 : if (TREE_SIDE_EFFECTS (captures[1]))
10612 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10613 30849 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
10614 30849 : return _r;
10615 : }
10616 0 : next_after_fail1781:;
10617 : }
10618 : }
10619 : }
10620 358053 : switch (TREE_CODE (_p0))
10621 : {
10622 23473 : case PLUS_EXPR:
10623 23473 : {
10624 23473 : tree _q20 = TREE_OPERAND (_p0, 0);
10625 23473 : tree _q21 = TREE_OPERAND (_p0, 1);
10626 23473 : switch (TREE_CODE (_p1))
10627 : {
10628 14 : case PLUS_EXPR:
10629 14 : {
10630 14 : tree _q50 = TREE_OPERAND (_p1, 0);
10631 14 : tree _q51 = TREE_OPERAND (_p1, 1);
10632 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10633 : {
10634 0 : {
10635 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
10636 0 : tree res = generic_simplify_529 (loc, type, _p0, _p1, captures, MAX_EXPR);
10637 0 : if (res) return res;
10638 : }
10639 0 : {
10640 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q50, _q21, _p0, _q20 };
10641 0 : tree res = generic_simplify_529 (loc, type, _p0, _p1, captures, MAX_EXPR);
10642 0 : if (res) return res;
10643 : }
10644 : }
10645 14 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10646 : {
10647 0 : {
10648 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
10649 0 : tree res = generic_simplify_529 (loc, type, _p0, _p1, captures, MAX_EXPR);
10650 0 : if (res) return res;
10651 : }
10652 : }
10653 14 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10654 : {
10655 0 : {
10656 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q51, _q21, _p0, _q20 };
10657 0 : tree res = generic_simplify_529 (loc, type, _p0, _p1, captures, MAX_EXPR);
10658 0 : if (res) return res;
10659 : }
10660 : }
10661 : break;
10662 : }
10663 23473 : default:;
10664 : }
10665 23473 : switch (TREE_CODE (_q21))
10666 : {
10667 23435 : case INTEGER_CST:
10668 23435 : {
10669 23435 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10670 : {
10671 11 : {
10672 11 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
10673 11 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10674 : )
10675 : {
10676 0 : if (tree_int_cst_sgn (captures[2]) > 0
10677 : )
10678 : {
10679 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1782;
10680 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1782;
10681 0 : {
10682 0 : tree _r;
10683 0 : _r = captures[1];
10684 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1036, __FILE__, __LINE__, true);
10685 0 : return _r;
10686 : }
10687 11 : next_after_fail1782:;
10688 : }
10689 : else
10690 : {
10691 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1783;
10692 0 : {
10693 0 : tree _r;
10694 0 : _r = captures[0];
10695 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10696 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10697 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
10698 0 : return _r;
10699 : }
10700 0 : next_after_fail1783:;
10701 : }
10702 : }
10703 : }
10704 : }
10705 : break;
10706 : }
10707 : default:;
10708 : }
10709 : break;
10710 : }
10711 8205 : case MINUS_EXPR:
10712 8205 : {
10713 8205 : tree _q20 = TREE_OPERAND (_p0, 0);
10714 8205 : tree _q21 = TREE_OPERAND (_p0, 1);
10715 8205 : switch (TREE_CODE (_p1))
10716 : {
10717 0 : case MINUS_EXPR:
10718 0 : {
10719 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10720 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10721 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10722 : {
10723 0 : {
10724 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
10725 0 : tree res = generic_simplify_530 (loc, type, _p0, _p1, captures, MAX_EXPR);
10726 0 : if (res) return res;
10727 : }
10728 0 : {
10729 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q50, _q21, _p0, _q20 };
10730 0 : tree res = generic_simplify_530 (loc, type, _p0, _p1, captures, MAX_EXPR);
10731 0 : if (res) return res;
10732 : }
10733 : }
10734 : break;
10735 : }
10736 : default:;
10737 : }
10738 : break;
10739 : }
10740 358053 : default:;
10741 : }
10742 358053 : switch (TREE_CODE (_p1))
10743 : {
10744 110 : case PLUS_EXPR:
10745 110 : {
10746 110 : tree _q30 = TREE_OPERAND (_p1, 0);
10747 110 : tree _q31 = TREE_OPERAND (_p1, 1);
10748 110 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10749 : {
10750 0 : switch (TREE_CODE (_q31))
10751 : {
10752 0 : case INTEGER_CST:
10753 0 : {
10754 0 : {
10755 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
10756 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10757 : )
10758 : {
10759 0 : if (tree_int_cst_sgn (captures[2]) > 0
10760 : )
10761 : {
10762 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1784;
10763 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1784;
10764 0 : {
10765 0 : tree _r;
10766 0 : _r = captures[1];
10767 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1036, __FILE__, __LINE__, true);
10768 0 : return _r;
10769 : }
10770 0 : next_after_fail1784:;
10771 : }
10772 : else
10773 : {
10774 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1785;
10775 0 : {
10776 0 : tree _r;
10777 0 : _r = captures[0];
10778 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10779 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10780 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
10781 0 : return _r;
10782 : }
10783 0 : next_after_fail1785:;
10784 : }
10785 : }
10786 : }
10787 0 : break;
10788 : }
10789 : default:;
10790 : }
10791 : }
10792 : break;
10793 : }
10794 358053 : default:;
10795 : }
10796 358053 : switch (TREE_CODE (_p0))
10797 : {
10798 3474 : case MIN_EXPR:
10799 3474 : {
10800 3474 : tree _q20 = TREE_OPERAND (_p0, 0);
10801 3474 : tree _q21 = TREE_OPERAND (_p0, 1);
10802 3474 : switch (TREE_CODE (_p1))
10803 : {
10804 0 : case MAX_EXPR:
10805 0 : {
10806 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10807 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10808 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10809 : {
10810 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10811 : {
10812 0 : {
10813 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10814 0 : if (!HONOR_NANS (captures[0])
10815 : )
10816 : {
10817 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1786;
10818 0 : {
10819 0 : tree res_op0;
10820 0 : res_op0 = captures[0];
10821 0 : tree res_op1;
10822 0 : res_op1 = captures[1];
10823 0 : tree _r;
10824 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
10825 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 897, __FILE__, __LINE__, true);
10826 0 : return _r;
10827 : }
10828 0 : next_after_fail1786:;
10829 : }
10830 : }
10831 : }
10832 : }
10833 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10834 : {
10835 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10836 : {
10837 0 : {
10838 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10839 0 : if (!HONOR_NANS (captures[0])
10840 : )
10841 : {
10842 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1787;
10843 0 : {
10844 0 : tree res_op0;
10845 0 : res_op0 = captures[0];
10846 0 : tree res_op1;
10847 0 : res_op1 = captures[1];
10848 0 : tree _r;
10849 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
10850 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 897, __FILE__, __LINE__, true);
10851 0 : return _r;
10852 : }
10853 0 : next_after_fail1787:;
10854 : }
10855 : }
10856 : }
10857 : }
10858 : break;
10859 : }
10860 : default:;
10861 : }
10862 : break;
10863 : }
10864 111 : case MAX_EXPR:
10865 111 : {
10866 111 : tree _q20 = TREE_OPERAND (_p0, 0);
10867 111 : tree _q21 = TREE_OPERAND (_p0, 1);
10868 111 : switch (TREE_CODE (_p1))
10869 : {
10870 0 : case MIN_EXPR:
10871 0 : {
10872 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10873 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10874 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10875 : {
10876 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10877 : {
10878 0 : {
10879 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10880 0 : if (!HONOR_NANS (captures[0])
10881 : )
10882 : {
10883 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1788;
10884 0 : {
10885 0 : tree res_op0;
10886 0 : res_op0 = captures[0];
10887 0 : tree res_op1;
10888 0 : res_op1 = captures[1];
10889 0 : tree _r;
10890 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
10891 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 897, __FILE__, __LINE__, true);
10892 0 : return _r;
10893 : }
10894 0 : next_after_fail1788:;
10895 : }
10896 : }
10897 : }
10898 : }
10899 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10900 : {
10901 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10902 : {
10903 0 : {
10904 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10905 0 : if (!HONOR_NANS (captures[0])
10906 : )
10907 : {
10908 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1789;
10909 0 : {
10910 0 : tree res_op0;
10911 0 : res_op0 = captures[0];
10912 0 : tree res_op1;
10913 0 : res_op1 = captures[1];
10914 0 : tree _r;
10915 0 : _r = fold_build2_loc (loc, MAX_EXPR, type, res_op0, res_op1);
10916 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 897, __FILE__, __LINE__, true);
10917 0 : return _r;
10918 : }
10919 0 : next_after_fail1789:;
10920 : }
10921 : }
10922 : }
10923 : }
10924 : break;
10925 : }
10926 : default:;
10927 : }
10928 : break;
10929 : }
10930 0 : case BIT_AND_EXPR:
10931 0 : {
10932 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10933 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10934 0 : switch (TREE_CODE (_q21))
10935 : {
10936 0 : case INTEGER_CST:
10937 0 : {
10938 0 : switch (TREE_CODE (_p1))
10939 : {
10940 0 : case BIT_AND_EXPR:
10941 0 : {
10942 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10943 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10944 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10945 : {
10946 0 : switch (TREE_CODE (_q51))
10947 : {
10948 0 : case INTEGER_CST:
10949 0 : {
10950 0 : {
10951 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
10952 0 : tree res = generic_simplify_531 (loc, type, _p0, _p1, captures, MAX_EXPR);
10953 0 : if (res) return res;
10954 : }
10955 0 : break;
10956 : }
10957 : default:;
10958 : }
10959 : }
10960 : break;
10961 : }
10962 : default:;
10963 : }
10964 : break;
10965 : }
10966 : default:;
10967 : }
10968 : break;
10969 : }
10970 358053 : default:;
10971 : }
10972 358053 : switch (TREE_CODE (_p1))
10973 : {
10974 0 : case BIT_AND_EXPR:
10975 0 : {
10976 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10977 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10978 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10979 : {
10980 0 : switch (TREE_CODE (_q31))
10981 : {
10982 0 : case INTEGER_CST:
10983 0 : {
10984 0 : {
10985 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
10986 0 : tree res = generic_simplify_532 (loc, type, _p0, _p1, captures, MAX_EXPR);
10987 0 : if (res) return res;
10988 : }
10989 0 : break;
10990 : }
10991 : default:;
10992 : }
10993 : }
10994 : break;
10995 : }
10996 358053 : default:;
10997 : }
10998 358053 : switch (TREE_CODE (_p0))
10999 : {
11000 33403 : CASE_CONVERT:
11001 33403 : {
11002 33403 : tree _q20 = TREE_OPERAND (_p0, 0);
11003 33403 : switch (TREE_CODE (_q20))
11004 : {
11005 30 : case ADDR_EXPR:
11006 30 : {
11007 30 : switch (TREE_CODE (_p1))
11008 : {
11009 0 : CASE_CONVERT:
11010 0 : {
11011 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11012 0 : switch (TREE_CODE (_q40))
11013 : {
11014 0 : case ADDR_EXPR:
11015 0 : {
11016 0 : {
11017 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11018 0 : tree res = generic_simplify_533 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11019 0 : if (res) return res;
11020 : }
11021 0 : break;
11022 : }
11023 : default:;
11024 : }
11025 : break;
11026 : }
11027 0 : case ADDR_EXPR:
11028 0 : {
11029 0 : {
11030 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
11031 0 : tree res = generic_simplify_534 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11032 0 : if (res) return res;
11033 : }
11034 0 : break;
11035 : }
11036 : default:;
11037 : }
11038 : break;
11039 : }
11040 : default:;
11041 : }
11042 : break;
11043 : }
11044 10 : case ADDR_EXPR:
11045 10 : {
11046 10 : switch (TREE_CODE (_p1))
11047 : {
11048 0 : CASE_CONVERT:
11049 0 : {
11050 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11051 0 : switch (TREE_CODE (_q30))
11052 : {
11053 0 : case ADDR_EXPR:
11054 0 : {
11055 0 : {
11056 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _q30 };
11057 0 : tree res = generic_simplify_535 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11058 0 : if (res) return res;
11059 : }
11060 0 : break;
11061 : }
11062 : default:;
11063 : }
11064 : break;
11065 : }
11066 10 : case ADDR_EXPR:
11067 10 : {
11068 10 : {
11069 10 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _p1 };
11070 10 : tree res = generic_simplify_536 (loc, type, _p0, _p1, captures, MAX_EXPR, GT_EXPR);
11071 10 : if (res) return res;
11072 : }
11073 10 : break;
11074 : }
11075 : default:;
11076 : }
11077 : break;
11078 : }
11079 74 : case NEGATE_EXPR:
11080 74 : {
11081 74 : tree _q20 = TREE_OPERAND (_p0, 0);
11082 74 : switch (TREE_CODE (_p1))
11083 : {
11084 0 : case NEGATE_EXPR:
11085 0 : {
11086 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11087 0 : {
11088 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11089 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
11090 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
11091 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
11092 : )
11093 : {
11094 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1790;
11095 0 : {
11096 0 : tree res_op0;
11097 0 : {
11098 0 : tree _o1[2], _r1;
11099 0 : _o1[0] = captures[1];
11100 0 : _o1[1] = captures[3];
11101 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11102 0 : res_op0 = _r1;
11103 : }
11104 0 : tree _r;
11105 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
11106 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1033, __FILE__, __LINE__, true);
11107 0 : return _r;
11108 : }
11109 0 : next_after_fail1790:;
11110 : }
11111 : }
11112 0 : break;
11113 : }
11114 : default:;
11115 : }
11116 : break;
11117 : }
11118 0 : case BIT_NOT_EXPR:
11119 0 : {
11120 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11121 0 : switch (TREE_CODE (_p1))
11122 : {
11123 0 : case BIT_NOT_EXPR:
11124 0 : {
11125 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11126 0 : {
11127 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11128 0 : tree res = generic_simplify_537 (loc, type, _p0, _p1, captures, MAX_EXPR, MIN_EXPR);
11129 0 : if (res) return res;
11130 : }
11131 0 : break;
11132 : }
11133 : default:;
11134 : }
11135 : break;
11136 : }
11137 0 : case VEC_COND_EXPR:
11138 0 : {
11139 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11140 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11141 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11142 0 : switch (TREE_CODE (_p1))
11143 : {
11144 0 : case VEC_COND_EXPR:
11145 0 : {
11146 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11147 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11148 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11149 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11150 : {
11151 0 : {
11152 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11153 0 : if (VECTOR_TYPE_P (type)
11154 0 : && (TREE_CODE_CLASS (MAX_EXPR) != tcc_comparison
11155 : || types_match (type, TREE_TYPE (captures[2]))
11156 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11157 : || (optimize_vectors_before_lowering_p ()
11158 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11159 : )
11160 : {
11161 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1791;
11162 0 : {
11163 0 : tree res_op0;
11164 0 : res_op0 = captures[1];
11165 0 : tree res_op1;
11166 0 : {
11167 0 : tree _o1[2], _r1;
11168 0 : _o1[0] = captures[2];
11169 0 : _o1[1] = captures[5];
11170 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, type, _o1[0], _o1[1]);
11171 0 : if (EXPR_P (_r1))
11172 0 : goto next_after_fail1791;
11173 0 : res_op1 = _r1;
11174 : }
11175 0 : tree res_op2;
11176 0 : {
11177 0 : tree _o1[2], _r1;
11178 0 : _o1[0] = captures[3];
11179 0 : _o1[1] = captures[6];
11180 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, type, _o1[0], _o1[1]);
11181 0 : if (EXPR_P (_r1))
11182 0 : goto next_after_fail1791;
11183 0 : res_op2 = _r1;
11184 : }
11185 0 : tree _r;
11186 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11187 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
11188 0 : return _r;
11189 : }
11190 0 : next_after_fail1791:;
11191 : }
11192 : }
11193 : }
11194 : break;
11195 : }
11196 0 : default:;
11197 : }
11198 0 : {
11199 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11200 0 : if (VECTOR_TYPE_P (type)
11201 0 : && (TREE_CODE_CLASS (MAX_EXPR) != tcc_comparison
11202 : || types_match (type, TREE_TYPE (captures[2]))
11203 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11204 : || (optimize_vectors_before_lowering_p ()
11205 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11206 : )
11207 : {
11208 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1792;
11209 0 : {
11210 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1792;
11211 0 : tree res_op0;
11212 0 : res_op0 = captures[1];
11213 0 : tree res_op1;
11214 0 : {
11215 0 : tree _o1[2], _r1;
11216 0 : _o1[0] = captures[2];
11217 0 : _o1[1] = unshare_expr (captures[4]);
11218 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, type, _o1[0], _o1[1]);
11219 0 : if (EXPR_P (_r1))
11220 0 : goto next_after_fail1792;
11221 0 : res_op1 = _r1;
11222 : }
11223 0 : tree res_op2;
11224 0 : {
11225 0 : tree _o1[2], _r1;
11226 0 : _o1[0] = captures[3];
11227 0 : _o1[1] = captures[4];
11228 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, type, _o1[0], _o1[1]);
11229 0 : if (EXPR_P (_r1))
11230 0 : goto next_after_fail1792;
11231 0 : res_op2 = _r1;
11232 : }
11233 0 : tree _r;
11234 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11235 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
11236 0 : return _r;
11237 : }
11238 0 : next_after_fail1792:;
11239 : }
11240 : }
11241 0 : break;
11242 : }
11243 358053 : default:;
11244 : }
11245 358053 : switch (TREE_CODE (_p1))
11246 : {
11247 0 : case VEC_COND_EXPR:
11248 0 : {
11249 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11250 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11251 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11252 0 : {
11253 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11254 0 : if (VECTOR_TYPE_P (type)
11255 0 : && (TREE_CODE_CLASS (MAX_EXPR) != tcc_comparison
11256 : || types_match (type, TREE_TYPE (captures[3]))
11257 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11258 : || (optimize_vectors_before_lowering_p ()
11259 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11260 : )
11261 : {
11262 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1793;
11263 0 : {
11264 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1793;
11265 0 : tree res_op0;
11266 0 : res_op0 = captures[2];
11267 0 : tree res_op1;
11268 0 : {
11269 0 : tree _o1[2], _r1;
11270 0 : _o1[0] = unshare_expr (captures[0]);
11271 0 : _o1[1] = captures[3];
11272 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, type, _o1[0], _o1[1]);
11273 0 : if (EXPR_P (_r1))
11274 0 : goto next_after_fail1793;
11275 0 : res_op1 = _r1;
11276 : }
11277 0 : tree res_op2;
11278 0 : {
11279 0 : tree _o1[2], _r1;
11280 0 : _o1[0] = captures[0];
11281 0 : _o1[1] = captures[4];
11282 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, type, _o1[0], _o1[1]);
11283 0 : if (EXPR_P (_r1))
11284 0 : goto next_after_fail1793;
11285 0 : res_op2 = _r1;
11286 : }
11287 0 : tree _r;
11288 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11289 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
11290 0 : return _r;
11291 : }
11292 0 : next_after_fail1793:;
11293 : }
11294 : }
11295 0 : break;
11296 : }
11297 358053 : default:;
11298 : }
11299 358053 : if (tree_zero_one_valued_p (_p0))
11300 : {
11301 10 : if (tree_zero_one_valued_p (_p1))
11302 : {
11303 0 : {
11304 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11305 0 : tree res = generic_simplify_538 (loc, type, _p0, _p1, captures, MAX_EXPR, BIT_IOR_EXPR);
11306 0 : if (res) return res;
11307 : }
11308 : }
11309 : }
11310 : return NULL_TREE;
11311 : }
11312 :
11313 : tree
11314 1176401 : generic_simplify_UNLE_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11315 : {
11316 1176401 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11317 1176401 : switch (TREE_CODE (_p0))
11318 : {
11319 0 : case VEC_COND_EXPR:
11320 0 : {
11321 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11322 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11323 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11324 0 : switch (TREE_CODE (_p1))
11325 : {
11326 0 : case VEC_COND_EXPR:
11327 0 : {
11328 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11329 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11330 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11331 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11332 : {
11333 0 : {
11334 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11335 0 : if (VECTOR_TYPE_P (type)
11336 0 : && (TREE_CODE_CLASS (UNLE_EXPR) != tcc_comparison
11337 0 : || types_match (type, TREE_TYPE (captures[2]))
11338 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11339 : || (optimize_vectors_before_lowering_p ()
11340 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11341 : )
11342 : {
11343 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1809;
11344 0 : {
11345 0 : tree res_op0;
11346 0 : res_op0 = captures[1];
11347 0 : tree res_op1;
11348 0 : {
11349 0 : tree _o1[2], _r1;
11350 0 : _o1[0] = captures[2];
11351 0 : _o1[1] = captures[5];
11352 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11353 0 : if (EXPR_P (_r1))
11354 0 : goto next_after_fail1809;
11355 0 : res_op1 = _r1;
11356 : }
11357 0 : tree res_op2;
11358 0 : {
11359 0 : tree _o1[2], _r1;
11360 0 : _o1[0] = captures[3];
11361 0 : _o1[1] = captures[6];
11362 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11363 0 : if (EXPR_P (_r1))
11364 0 : goto next_after_fail1809;
11365 0 : res_op2 = _r1;
11366 : }
11367 0 : tree _r;
11368 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11369 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
11370 0 : return _r;
11371 : }
11372 0 : next_after_fail1809:;
11373 : }
11374 : }
11375 : }
11376 : break;
11377 : }
11378 0 : default:;
11379 : }
11380 0 : {
11381 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11382 0 : if (VECTOR_TYPE_P (type)
11383 0 : && (TREE_CODE_CLASS (UNLE_EXPR) != tcc_comparison
11384 0 : || types_match (type, TREE_TYPE (captures[2]))
11385 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11386 : || (optimize_vectors_before_lowering_p ()
11387 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11388 : )
11389 : {
11390 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1810;
11391 0 : {
11392 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1810;
11393 0 : tree res_op0;
11394 0 : res_op0 = captures[1];
11395 0 : tree res_op1;
11396 0 : {
11397 0 : tree _o1[2], _r1;
11398 0 : _o1[0] = captures[2];
11399 0 : _o1[1] = unshare_expr (captures[4]);
11400 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11401 0 : if (EXPR_P (_r1))
11402 0 : goto next_after_fail1810;
11403 0 : res_op1 = _r1;
11404 : }
11405 0 : tree res_op2;
11406 0 : {
11407 0 : tree _o1[2], _r1;
11408 0 : _o1[0] = captures[3];
11409 0 : _o1[1] = captures[4];
11410 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11411 0 : if (EXPR_P (_r1))
11412 0 : goto next_after_fail1810;
11413 0 : res_op2 = _r1;
11414 : }
11415 0 : tree _r;
11416 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11417 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
11418 0 : return _r;
11419 : }
11420 0 : next_after_fail1810:;
11421 : }
11422 : }
11423 0 : break;
11424 : }
11425 1176401 : default:;
11426 : }
11427 1176401 : switch (TREE_CODE (_p1))
11428 : {
11429 0 : case VEC_COND_EXPR:
11430 0 : {
11431 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11432 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11433 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11434 0 : {
11435 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11436 0 : if (VECTOR_TYPE_P (type)
11437 0 : && (TREE_CODE_CLASS (UNLE_EXPR) != tcc_comparison
11438 0 : || types_match (type, TREE_TYPE (captures[3]))
11439 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11440 : || (optimize_vectors_before_lowering_p ()
11441 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11442 : )
11443 : {
11444 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1811;
11445 0 : {
11446 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1811;
11447 0 : tree res_op0;
11448 0 : res_op0 = captures[2];
11449 0 : tree res_op1;
11450 0 : {
11451 0 : tree _o1[2], _r1;
11452 0 : _o1[0] = unshare_expr (captures[0]);
11453 0 : _o1[1] = captures[3];
11454 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11455 0 : if (EXPR_P (_r1))
11456 0 : goto next_after_fail1811;
11457 0 : res_op1 = _r1;
11458 : }
11459 0 : tree res_op2;
11460 0 : {
11461 0 : tree _o1[2], _r1;
11462 0 : _o1[0] = captures[0];
11463 0 : _o1[1] = captures[4];
11464 0 : _r1 = fold_build2_loc (loc, UNLE_EXPR, type, _o1[0], _o1[1]);
11465 0 : if (EXPR_P (_r1))
11466 0 : goto next_after_fail1811;
11467 0 : res_op2 = _r1;
11468 : }
11469 0 : tree _r;
11470 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11471 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
11472 0 : return _r;
11473 : }
11474 0 : next_after_fail1811:;
11475 : }
11476 : }
11477 0 : break;
11478 : }
11479 1176401 : default:;
11480 : }
11481 1176401 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11482 : {
11483 30 : {
11484 30 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11485 30 : tree res = generic_simplify_569 (loc, type, _p0, _p1, captures, UNLE_EXPR);
11486 30 : if (res) return res;
11487 : }
11488 : }
11489 1176371 : switch (TREE_CODE (_p0))
11490 : {
11491 96 : case FLOAT_EXPR:
11492 96 : {
11493 96 : tree _q20 = TREE_OPERAND (_p0, 0);
11494 96 : switch (TREE_CODE (_p1))
11495 : {
11496 0 : case FLOAT_EXPR:
11497 0 : {
11498 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11499 0 : {
11500 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11501 0 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, UNLE_EXPR, LE_EXPR);
11502 0 : if (res) return res;
11503 : }
11504 0 : break;
11505 : }
11506 : default:;
11507 : }
11508 : break;
11509 : }
11510 112 : case NEGATE_EXPR:
11511 112 : {
11512 112 : tree _q20 = TREE_OPERAND (_p0, 0);
11513 112 : switch (TREE_CODE (_p1))
11514 : {
11515 0 : case NEGATE_EXPR:
11516 0 : {
11517 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11518 0 : {
11519 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11520 0 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, UNLE_EXPR, UNGE_EXPR);
11521 0 : if (res) return res;
11522 : }
11523 0 : break;
11524 : }
11525 112 : default:;
11526 : }
11527 112 : if (CONSTANT_CLASS_P (_p1))
11528 : {
11529 112 : {
11530 112 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11531 112 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, UNLE_EXPR, UNGE_EXPR);
11532 112 : if (res) return res;
11533 : }
11534 : }
11535 : break;
11536 : }
11537 1176259 : default:;
11538 : }
11539 1176259 : switch (TREE_CODE (_p1))
11540 : {
11541 797769 : case REAL_CST:
11542 797769 : {
11543 797769 : {
11544 797769 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11545 797769 : tree res = generic_simplify_567 (loc, type, _p0, _p1, captures, UNLE_EXPR);
11546 797769 : if (res) return res;
11547 : }
11548 797767 : break;
11549 : }
11550 : default:;
11551 : }
11552 : return NULL_TREE;
11553 : }
11554 :
11555 : tree
11556 79 : generic_simplify_LTGT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11557 : {
11558 79 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11559 79 : switch (TREE_CODE (_p0))
11560 : {
11561 0 : case VEC_COND_EXPR:
11562 0 : {
11563 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11564 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11565 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11566 0 : switch (TREE_CODE (_p1))
11567 : {
11568 0 : case VEC_COND_EXPR:
11569 0 : {
11570 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11571 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11572 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11573 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11574 : {
11575 0 : {
11576 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11577 0 : if (VECTOR_TYPE_P (type)
11578 0 : && (TREE_CODE_CLASS (LTGT_EXPR) != tcc_comparison
11579 0 : || types_match (type, TREE_TYPE (captures[2]))
11580 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11581 : || (optimize_vectors_before_lowering_p ()
11582 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11583 : )
11584 : {
11585 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1821;
11586 0 : {
11587 0 : tree res_op0;
11588 0 : res_op0 = captures[1];
11589 0 : tree res_op1;
11590 0 : {
11591 0 : tree _o1[2], _r1;
11592 0 : _o1[0] = captures[2];
11593 0 : _o1[1] = captures[5];
11594 0 : _r1 = fold_build2_loc (loc, LTGT_EXPR, type, _o1[0], _o1[1]);
11595 0 : if (EXPR_P (_r1))
11596 0 : goto next_after_fail1821;
11597 0 : res_op1 = _r1;
11598 : }
11599 0 : tree res_op2;
11600 0 : {
11601 0 : tree _o1[2], _r1;
11602 0 : _o1[0] = captures[3];
11603 0 : _o1[1] = captures[6];
11604 0 : _r1 = fold_build2_loc (loc, LTGT_EXPR, type, _o1[0], _o1[1]);
11605 0 : if (EXPR_P (_r1))
11606 0 : goto next_after_fail1821;
11607 0 : res_op2 = _r1;
11608 : }
11609 0 : tree _r;
11610 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11611 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 898, __FILE__, __LINE__, true);
11612 0 : return _r;
11613 : }
11614 0 : next_after_fail1821:;
11615 : }
11616 : }
11617 : }
11618 : break;
11619 : }
11620 0 : default:;
11621 : }
11622 0 : {
11623 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11624 0 : if (VECTOR_TYPE_P (type)
11625 0 : && (TREE_CODE_CLASS (LTGT_EXPR) != tcc_comparison
11626 0 : || types_match (type, TREE_TYPE (captures[2]))
11627 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11628 : || (optimize_vectors_before_lowering_p ()
11629 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11630 : )
11631 : {
11632 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1822;
11633 0 : {
11634 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1822;
11635 0 : tree res_op0;
11636 0 : res_op0 = captures[1];
11637 0 : tree res_op1;
11638 0 : {
11639 0 : tree _o1[2], _r1;
11640 0 : _o1[0] = captures[2];
11641 0 : _o1[1] = unshare_expr (captures[4]);
11642 0 : _r1 = fold_build2_loc (loc, LTGT_EXPR, type, _o1[0], _o1[1]);
11643 0 : if (EXPR_P (_r1))
11644 0 : goto next_after_fail1822;
11645 0 : res_op1 = _r1;
11646 : }
11647 0 : tree res_op2;
11648 0 : {
11649 0 : tree _o1[2], _r1;
11650 0 : _o1[0] = captures[3];
11651 0 : _o1[1] = captures[4];
11652 0 : _r1 = fold_build2_loc (loc, LTGT_EXPR, type, _o1[0], _o1[1]);
11653 0 : if (EXPR_P (_r1))
11654 0 : goto next_after_fail1822;
11655 0 : res_op2 = _r1;
11656 : }
11657 0 : tree _r;
11658 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11659 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
11660 0 : return _r;
11661 : }
11662 0 : next_after_fail1822:;
11663 : }
11664 : }
11665 0 : break;
11666 : }
11667 79 : default:;
11668 : }
11669 79 : switch (TREE_CODE (_p1))
11670 : {
11671 0 : case VEC_COND_EXPR:
11672 0 : {
11673 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11674 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11675 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11676 0 : {
11677 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11678 0 : if (VECTOR_TYPE_P (type)
11679 0 : && (TREE_CODE_CLASS (LTGT_EXPR) != tcc_comparison
11680 0 : || types_match (type, TREE_TYPE (captures[3]))
11681 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11682 : || (optimize_vectors_before_lowering_p ()
11683 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11684 : )
11685 : {
11686 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1823;
11687 0 : {
11688 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1823;
11689 0 : tree res_op0;
11690 0 : res_op0 = captures[2];
11691 0 : tree res_op1;
11692 0 : {
11693 0 : tree _o1[2], _r1;
11694 0 : _o1[0] = unshare_expr (captures[0]);
11695 0 : _o1[1] = captures[3];
11696 0 : _r1 = fold_build2_loc (loc, LTGT_EXPR, type, _o1[0], _o1[1]);
11697 0 : if (EXPR_P (_r1))
11698 0 : goto next_after_fail1823;
11699 0 : res_op1 = _r1;
11700 : }
11701 0 : tree res_op2;
11702 0 : {
11703 0 : tree _o1[2], _r1;
11704 0 : _o1[0] = captures[0];
11705 0 : _o1[1] = captures[4];
11706 0 : _r1 = fold_build2_loc (loc, LTGT_EXPR, type, _o1[0], _o1[1]);
11707 0 : if (EXPR_P (_r1))
11708 0 : goto next_after_fail1823;
11709 0 : res_op2 = _r1;
11710 : }
11711 0 : tree _r;
11712 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11713 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
11714 0 : return _r;
11715 : }
11716 0 : next_after_fail1823:;
11717 : }
11718 : }
11719 0 : break;
11720 : }
11721 79 : default:;
11722 : }
11723 79 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11724 : {
11725 2 : {
11726 2 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11727 2 : if (!flag_trapping_math || !tree_expr_maybe_nan_p (captures[0])
11728 : )
11729 : {
11730 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1824;
11731 0 : {
11732 0 : tree _r;
11733 0 : _r = constant_boolean_node (false, type);
11734 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11735 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11736 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1044, __FILE__, __LINE__, true);
11737 0 : return _r;
11738 : }
11739 0 : next_after_fail1824:;
11740 : }
11741 : }
11742 : }
11743 79 : switch (TREE_CODE (_p0))
11744 : {
11745 0 : case FLOAT_EXPR:
11746 0 : {
11747 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11748 0 : switch (TREE_CODE (_p1))
11749 : {
11750 0 : case FLOAT_EXPR:
11751 0 : {
11752 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11753 0 : {
11754 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
11755 0 : tree res = generic_simplify_265 (loc, type, _p0, _p1, captures, LTGT_EXPR, NE_EXPR);
11756 0 : if (res) return res;
11757 : }
11758 0 : break;
11759 : }
11760 : default:;
11761 : }
11762 : break;
11763 : }
11764 0 : case NEGATE_EXPR:
11765 0 : {
11766 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11767 0 : switch (TREE_CODE (_p1))
11768 : {
11769 0 : case NEGATE_EXPR:
11770 0 : {
11771 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11772 0 : {
11773 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11774 0 : tree res = generic_simplify_268 (loc, type, _p0, _p1, captures, LTGT_EXPR, LTGT_EXPR);
11775 0 : if (res) return res;
11776 : }
11777 0 : break;
11778 : }
11779 0 : default:;
11780 : }
11781 0 : if (CONSTANT_CLASS_P (_p1))
11782 : {
11783 0 : {
11784 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11785 0 : tree res = generic_simplify_269 (loc, type, _p0, _p1, captures, LTGT_EXPR, LTGT_EXPR);
11786 0 : if (res) return res;
11787 : }
11788 : }
11789 : break;
11790 : }
11791 79 : default:;
11792 : }
11793 79 : switch (TREE_CODE (_p1))
11794 : {
11795 2 : case REAL_CST:
11796 2 : {
11797 2 : {
11798 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11799 2 : tree res = generic_simplify_567 (loc, type, _p0, _p1, captures, LTGT_EXPR);
11800 2 : if (res) return res;
11801 : }
11802 2 : break;
11803 : }
11804 : default:;
11805 : }
11806 : return NULL_TREE;
11807 : }
11808 :
11809 : tree
11810 15158 : generic_simplify_BIT_INSERT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
11811 : {
11812 15158 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11813 15158 : switch (TREE_CODE (_p1))
11814 : {
11815 0 : case BIT_FIELD_REF:
11816 0 : {
11817 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11818 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11819 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11820 0 : {
11821 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
11822 0 : if (VECTOR_TYPE_P (type)
11823 0 : && (VECTOR_MODE_P (TYPE_MODE (type))
11824 : || optimize_vectors_before_lowering_p ())
11825 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
11826 0 : TYPE_SIZE (TREE_TYPE (captures[2])), 0)
11827 0 : && types_match (TREE_TYPE (TREE_TYPE (captures[0])), TREE_TYPE (captures[1]))
11828 0 : && TYPE_VECTOR_SUBPARTS (type).is_constant ()
11829 0 : && multiple_p (wi::to_poly_offset (captures[4]),
11830 0 : wi::to_poly_offset (TYPE_SIZE (TREE_TYPE (type))))
11831 : )
11832 : {
11833 0 : {
11834 0 : unsigned HOST_WIDE_INT elsz
11835 0 : = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))));
11836 0 : poly_uint64 relt = exact_div (tree_to_poly_uint64 (captures[4]), elsz);
11837 0 : poly_uint64 ielt = exact_div (tree_to_poly_uint64 (captures[5]), elsz);
11838 0 : unsigned nunits = TYPE_VECTOR_SUBPARTS (type).to_constant ();
11839 0 : vec_perm_builder builder;
11840 0 : builder.new_vector (nunits, nunits, 1);
11841 0 : for (unsigned i = 0; i < nunits; ++i)
11842 0 : builder.quick_push (known_eq (ielt, i) ? nunits + relt : i);
11843 0 : vec_perm_indices sel (builder, 2, nunits);
11844 0 : if (!VECTOR_MODE_P (TYPE_MODE (type))
11845 0 : || can_vec_perm_const_p (TYPE_MODE (type),
11846 0 : TYPE_MODE (type), sel, false)
11847 : )
11848 : {
11849 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1994;
11850 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1994;
11851 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1994;
11852 0 : {
11853 0 : tree res_op0;
11854 0 : res_op0 = captures[0];
11855 0 : tree res_op1;
11856 0 : {
11857 0 : tree _o1[1], _r1;
11858 0 : _o1[0] = captures[2];
11859 0 : if (TREE_TYPE (_o1[0]) != type)
11860 : {
11861 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
11862 : }
11863 : else
11864 : _r1 = _o1[0];
11865 0 : res_op1 = _r1;
11866 : }
11867 0 : tree res_op2;
11868 0 : res_op2 = vec_perm_indices_to_tree (build_vector_type (ssizetype, nunits),
11869 : sel);
11870 0 : tree _r;
11871 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
11872 0 : if (TREE_SIDE_EFFECTS (captures[3]))
11873 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
11874 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1106, __FILE__, __LINE__, true);
11875 0 : return _r;
11876 : }
11877 0 : next_after_fail1994:;
11878 : }
11879 0 : }
11880 : }
11881 : }
11882 0 : break;
11883 : }
11884 15158 : default:;
11885 : }
11886 15158 : switch (TREE_CODE (_p0))
11887 : {
11888 0 : case VEC_PERM_EXPR:
11889 0 : {
11890 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11891 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11892 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11893 0 : switch (TREE_CODE (_q22))
11894 : {
11895 0 : case VECTOR_CST:
11896 0 : {
11897 0 : switch (TREE_CODE (_p2))
11898 : {
11899 0 : case INTEGER_CST:
11900 0 : {
11901 0 : {
11902 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _p2 };
11903 0 : {
11904 0 : bool from0 = false;
11905 0 : bool from1 = false;
11906 0 : tree single_op = NULL_TREE;
11907 0 : unsigned elt_size = vector_element_bits (type);
11908 0 : unsigned HOST_WIDE_INT nelts;
11909 0 : unsigned ins_lane_idx;
11910 0 : vec_perm_indices sel;
11911 0 : if (TYPE_VECTOR_SUBPARTS (type).is_constant (&nelts)
11912 0 : && captures[1] != captures[2]
11913 0 : && tree_to_vec_perm_indices (&sel, captures[1], captures[2], captures[3])
11914 0 : && tree_to_uhwi (TYPE_SIZE (TREE_TYPE (captures[4]))) == elt_size
11915 0 : && multiple_p (tree_to_uhwi (captures[5]), elt_size, &ins_lane_idx))
11916 : {
11917 0 : for (unsigned i = 0; i < nelts; i++)
11918 : {
11919 0 : if (i == ins_lane_idx)
11920 0 : continue;
11921 0 : unsigned HOST_WIDE_INT elt = sel[i].to_constant ();
11922 0 : if (elt < nelts)
11923 : from0 = true;
11924 : else
11925 0 : from1 = true;
11926 : }
11927 0 : if (from0 ^ from1)
11928 : {
11929 0 : single_op = from0 ? captures[1] : captures[2];
11930 0 : vec_perm_indices new_sel;
11931 0 : if (!tree_to_vec_perm_indices (&new_sel, single_op, single_op, captures[3])
11932 0 : || !can_vec_perm_const_p (TYPE_MODE (type),
11933 0 : TYPE_MODE (TREE_TYPE (single_op)),
11934 : new_sel,
11935 : false))
11936 : single_op = NULL_TREE;
11937 0 : }
11938 : }
11939 0 : if (single_op != NULL_TREE
11940 : )
11941 : {
11942 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail1995;
11943 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1995;
11944 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail1995;
11945 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail1995;
11946 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1995;
11947 0 : {
11948 0 : tree res_op0;
11949 0 : {
11950 0 : tree _o1[3], _r1;
11951 0 : _o1[0] = single_op;
11952 0 : _o1[1] = single_op;
11953 0 : _o1[2] = captures[3];
11954 0 : _r1 = fold_build3_loc (loc, VEC_PERM_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1], _o1[2]);
11955 0 : res_op0 = _r1;
11956 : }
11957 0 : tree res_op1;
11958 0 : res_op1 = captures[4];
11959 0 : tree res_op2;
11960 0 : res_op2 = captures[5];
11961 0 : tree _r;
11962 0 : _r = fold_build3_loc (loc, BIT_INSERT_EXPR, type, res_op0, res_op1, res_op2);
11963 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1107, __FILE__, __LINE__, true);
11964 0 : return _r;
11965 : }
11966 0 : next_after_fail1995:;
11967 : }
11968 0 : }
11969 : }
11970 0 : break;
11971 : }
11972 : default:;
11973 : }
11974 : break;
11975 : }
11976 : default:;
11977 : }
11978 : break;
11979 : }
11980 : default:;
11981 : }
11982 : return NULL_TREE;
11983 : }
11984 : #pragma GCC diagnostic pop
|