Branch data Line data Source code
1 : : /* Generated automatically by the program `genmatch' from
2 : : a IL pattern matching and simplification description. */
3 : : #pragma GCC diagnostic push
4 : : #pragma GCC diagnostic ignored "-Wunused-variable"
5 : : #pragma GCC diagnostic ignored "-Wunused-function"
6 : :
7 : : #include "generic-match-auto.h"
8 : :
9 : : bool
10 : 154602352 : tree_truth_valued_p (tree t)
11 : : {
12 : 154602352 : const tree type = TREE_TYPE (t);
13 : 154602352 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 154602352 : if (TREE_SIDE_EFFECTS (t)) return false;
15 : 149757347 : {
16 : 149757347 : tree captures[1] ATTRIBUTE_UNUSED = { t };
17 : 149757347 : if (INTEGRAL_TYPE_P (type) && TYPE_PRECISION (type) == 1
18 : : )
19 : : {
20 : 5581387 : {
21 : 5581387 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 20, __FILE__, __LINE__, false);
22 : 5581387 : return true;
23 : : }
24 : : }
25 : : }
26 : 144175960 : switch (TREE_CODE (t))
27 : : {
28 : 834 : case LT_EXPR:
29 : 834 : {
30 : 834 : tree _p0 = TREE_OPERAND (t, 0);
31 : 834 : tree _p1 = TREE_OPERAND (t, 1);
32 : 834 : {
33 : 834 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
34 : 834 : {
35 : 834 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
36 : 834 : return true;
37 : : }
38 : : }
39 : 707 : break;
40 : : }
41 : 707 : case LE_EXPR:
42 : 707 : {
43 : 707 : tree _p0 = TREE_OPERAND (t, 0);
44 : 707 : tree _p1 = TREE_OPERAND (t, 1);
45 : 707 : {
46 : 707 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
47 : 707 : {
48 : 707 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
49 : 707 : return true;
50 : : }
51 : : }
52 : 11858 : break;
53 : : }
54 : 11858 : case EQ_EXPR:
55 : 11858 : {
56 : 11858 : tree _p0 = TREE_OPERAND (t, 0);
57 : 11858 : tree _p1 = TREE_OPERAND (t, 1);
58 : 11858 : {
59 : 11858 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
60 : 11858 : {
61 : 11858 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
62 : 11858 : return true;
63 : : }
64 : : }
65 : 4278 : break;
66 : : }
67 : 4278 : case NE_EXPR:
68 : 4278 : {
69 : 4278 : tree _p0 = TREE_OPERAND (t, 0);
70 : 4278 : tree _p1 = TREE_OPERAND (t, 1);
71 : 4278 : {
72 : 4278 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
73 : 4278 : {
74 : 4278 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
75 : 4278 : return true;
76 : : }
77 : : }
78 : 390 : break;
79 : : }
80 : 390 : case GE_EXPR:
81 : 390 : {
82 : 390 : tree _p0 = TREE_OPERAND (t, 0);
83 : 390 : tree _p1 = TREE_OPERAND (t, 1);
84 : 390 : {
85 : 390 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
86 : 390 : {
87 : 390 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
88 : 390 : return true;
89 : : }
90 : : }
91 : 101402 : break;
92 : : }
93 : 101402 : case GT_EXPR:
94 : 101402 : {
95 : 101402 : tree _p0 = TREE_OPERAND (t, 0);
96 : 101402 : tree _p1 = TREE_OPERAND (t, 1);
97 : 101402 : {
98 : 101402 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
99 : 101402 : {
100 : 101402 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
101 : 101402 : return true;
102 : : }
103 : : }
104 : 151225 : break;
105 : : }
106 : 151225 : case UNORDERED_EXPR:
107 : 151225 : {
108 : 151225 : tree _p0 = TREE_OPERAND (t, 0);
109 : 151225 : tree _p1 = TREE_OPERAND (t, 1);
110 : 151225 : {
111 : 151225 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
112 : 151225 : {
113 : 151225 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
114 : 151225 : return true;
115 : : }
116 : : }
117 : 16 : break;
118 : : }
119 : 16 : case ORDERED_EXPR:
120 : 16 : {
121 : 16 : tree _p0 = TREE_OPERAND (t, 0);
122 : 16 : tree _p1 = TREE_OPERAND (t, 1);
123 : 16 : {
124 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
125 : 16 : {
126 : 16 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
127 : 16 : return true;
128 : : }
129 : : }
130 : 79 : break;
131 : : }
132 : 79 : case UNLT_EXPR:
133 : 79 : {
134 : 79 : tree _p0 = TREE_OPERAND (t, 0);
135 : 79 : tree _p1 = TREE_OPERAND (t, 1);
136 : 79 : {
137 : 79 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
138 : 79 : {
139 : 79 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
140 : 79 : return true;
141 : : }
142 : : }
143 : 1158 : break;
144 : : }
145 : 1158 : case UNLE_EXPR:
146 : 1158 : {
147 : 1158 : tree _p0 = TREE_OPERAND (t, 0);
148 : 1158 : tree _p1 = TREE_OPERAND (t, 1);
149 : 1158 : {
150 : 1158 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
151 : 1158 : {
152 : 1158 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
153 : 1158 : return true;
154 : : }
155 : : }
156 : 79 : break;
157 : : }
158 : 79 : case UNGT_EXPR:
159 : 79 : {
160 : 79 : tree _p0 = TREE_OPERAND (t, 0);
161 : 79 : tree _p1 = TREE_OPERAND (t, 1);
162 : 79 : {
163 : 79 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
164 : 79 : {
165 : 79 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
166 : 79 : return true;
167 : : }
168 : : }
169 : 79 : break;
170 : : }
171 : 79 : case UNGE_EXPR:
172 : 79 : {
173 : 79 : tree _p0 = TREE_OPERAND (t, 0);
174 : 79 : tree _p1 = TREE_OPERAND (t, 1);
175 : 79 : {
176 : 79 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
177 : 79 : {
178 : 79 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
179 : 79 : return true;
180 : : }
181 : : }
182 : 95 : break;
183 : : }
184 : 95 : case UNEQ_EXPR:
185 : 95 : {
186 : 95 : tree _p0 = TREE_OPERAND (t, 0);
187 : 95 : tree _p1 = TREE_OPERAND (t, 1);
188 : 95 : {
189 : 95 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
190 : 95 : {
191 : 95 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
192 : 95 : return true;
193 : : }
194 : : }
195 : 27 : break;
196 : : }
197 : 27 : case LTGT_EXPR:
198 : 27 : {
199 : 27 : tree _p0 = TREE_OPERAND (t, 0);
200 : 27 : tree _p1 = TREE_OPERAND (t, 1);
201 : 27 : {
202 : 27 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
203 : 27 : {
204 : 27 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
205 : 27 : return true;
206 : : }
207 : : }
208 : 102 : break;
209 : : }
210 : 102 : case TRUTH_AND_EXPR:
211 : 102 : {
212 : 102 : tree _p0 = TREE_OPERAND (t, 0);
213 : 102 : tree _p1 = TREE_OPERAND (t, 1);
214 : 102 : {
215 : 102 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
216 : 102 : {
217 : 102 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
218 : 102 : return true;
219 : : }
220 : : }
221 : 516 : break;
222 : : }
223 : 516 : case TRUTH_ANDIF_EXPR:
224 : 516 : {
225 : 516 : tree _p0 = TREE_OPERAND (t, 0);
226 : 516 : tree _p1 = TREE_OPERAND (t, 1);
227 : 516 : {
228 : 516 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
229 : 516 : {
230 : 516 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
231 : 516 : return true;
232 : : }
233 : : }
234 : 43 : break;
235 : : }
236 : 43 : case TRUTH_OR_EXPR:
237 : 43 : {
238 : 43 : tree _p0 = TREE_OPERAND (t, 0);
239 : 43 : tree _p1 = TREE_OPERAND (t, 1);
240 : 43 : {
241 : 43 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
242 : 43 : {
243 : 43 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
244 : 43 : return true;
245 : : }
246 : : }
247 : 1405 : break;
248 : : }
249 : 1405 : case TRUTH_ORIF_EXPR:
250 : 1405 : {
251 : 1405 : tree _p0 = TREE_OPERAND (t, 0);
252 : 1405 : tree _p1 = TREE_OPERAND (t, 1);
253 : 1405 : {
254 : 1405 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
255 : 1405 : {
256 : 1405 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
257 : 1405 : return true;
258 : : }
259 : : }
260 : 0 : break;
261 : : }
262 : 0 : case TRUTH_XOR_EXPR:
263 : 0 : {
264 : 0 : tree _p0 = TREE_OPERAND (t, 0);
265 : 0 : tree _p1 = TREE_OPERAND (t, 1);
266 : 0 : {
267 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
268 : 0 : {
269 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 21, __FILE__, __LINE__, false);
270 : 0 : return true;
271 : : }
272 : : }
273 : 596229 : break;
274 : : }
275 : 596229 : case TRUTH_NOT_EXPR:
276 : 596229 : {
277 : 596229 : tree _p0 = TREE_OPERAND (t, 0);
278 : 596229 : {
279 : 596229 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
280 : 596229 : {
281 : 596229 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 22, __FILE__, __LINE__, false);
282 : 596229 : return true;
283 : : }
284 : : }
285 : : break;
286 : : }
287 : : default:;
288 : : }
289 : : return false;
290 : : }
291 : :
292 : : bool
293 : 0 : tree_compositional_complex (tree t)
294 : : {
295 : 0 : const tree type = TREE_TYPE (t);
296 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
297 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
298 : 0 : switch (TREE_CODE (t))
299 : : {
300 : 0 : CASE_CONVERT:
301 : 0 : {
302 : 0 : tree _p0 = TREE_OPERAND (t, 0);
303 : 0 : switch (TREE_CODE (_p0))
304 : : {
305 : 0 : case COMPLEX_EXPR:
306 : 0 : {
307 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
308 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
309 : 0 : {
310 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
311 : 0 : {
312 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 93, __FILE__, __LINE__, false);
313 : 0 : return true;
314 : : }
315 : : }
316 : : break;
317 : : }
318 : : default:;
319 : : }
320 : : break;
321 : : }
322 : 0 : case COMPLEX_EXPR:
323 : 0 : {
324 : 0 : tree _p0 = TREE_OPERAND (t, 0);
325 : 0 : tree _p1 = TREE_OPERAND (t, 1);
326 : 0 : {
327 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
328 : 0 : {
329 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 93, __FILE__, __LINE__, false);
330 : 0 : return true;
331 : : }
332 : : }
333 : : break;
334 : : }
335 : : default:;
336 : : }
337 : : return false;
338 : : }
339 : :
340 : : bool
341 : 736893 : tree_vec_same_elem_p (tree t)
342 : : {
343 : 736893 : const tree type = TREE_TYPE (t);
344 : 736893 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
345 : 736893 : if (TREE_SIDE_EFFECTS (t)) return false;
346 : 736893 : switch (TREE_CODE (t))
347 : : {
348 : 0 : case VEC_DUPLICATE_EXPR:
349 : 0 : {
350 : 0 : tree _p0 = TREE_OPERAND (t, 0);
351 : 0 : {
352 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
353 : 0 : {
354 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 96, __FILE__, __LINE__, false);
355 : 0 : return true;
356 : : }
357 : : }
358 : : break;
359 : : }
360 : : case CONSTRUCTOR:
361 : : {
362 : : {
363 : : tree captures[1] ATTRIBUTE_UNUSED = { t };
364 : : if (TREE_CODE (captures[0]) == SSA_NAME
365 : : && uniform_vector_p (gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])))
366 : : )
367 : : {
368 : : {
369 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 97, __FILE__, __LINE__, false);
370 : : return true;
371 : : }
372 : : }
373 : : }
374 : : break;
375 : : }
376 : 736893 : default:;
377 : : }
378 : 736893 : {
379 : 736893 : tree captures[1] ATTRIBUTE_UNUSED = { t };
380 : 736893 : if (uniform_vector_p (captures[0])
381 : : )
382 : : {
383 : 13834 : {
384 : 13834 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 98, __FILE__, __LINE__, false);
385 : 13834 : return true;
386 : : }
387 : : }
388 : : }
389 : : return false;
390 : : }
391 : :
392 : : bool
393 : 0 : tree_cond_expr_convert_p (tree t, tree *res_ops)
394 : : {
395 : 0 : const tree type = TREE_TYPE (t);
396 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
397 : 0 : if (TREE_SIDE_EFFECTS (t)) return false;
398 : 0 : switch (TREE_CODE (t))
399 : : {
400 : 0 : case COND_EXPR:
401 : 0 : {
402 : 0 : tree _p0 = TREE_OPERAND (t, 0);
403 : 0 : tree _p1 = TREE_OPERAND (t, 1);
404 : 0 : tree _p2 = TREE_OPERAND (t, 2);
405 : 0 : switch (TREE_CODE (_p0))
406 : : {
407 : 0 : case LT_EXPR:
408 : 0 : case LE_EXPR:
409 : 0 : case EQ_EXPR:
410 : 0 : case NE_EXPR:
411 : 0 : case GE_EXPR:
412 : 0 : case GT_EXPR:
413 : 0 : {
414 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
415 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
416 : 0 : switch (TREE_CODE (_p1))
417 : : {
418 : 0 : CASE_CONVERT:
419 : 0 : {
420 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
421 : 0 : switch (TREE_CODE (_p2))
422 : : {
423 : 0 : CASE_CONVERT:
424 : 0 : {
425 : 0 : tree _q70 = TREE_OPERAND (_p2, 0);
426 : 0 : {
427 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
428 : 0 : if ((INTEGRAL_TYPE_P (type)
429 : 0 : || (!flag_trapping_math && SCALAR_FLOAT_TYPE_P (type)))
430 : 0 : && ((INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
431 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2])))
432 : 0 : || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
433 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))))
434 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
435 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
436 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
437 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
438 : 0 : TYPE_SIZE (TREE_TYPE (captures[2])))
439 : 0 : && (known_gt (tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (captures[0]))),
440 : : tree_to_poly_uint64 (TYPE_SIZE (type)))
441 : 0 : || (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
442 : 0 : == TYPE_UNSIGNED (TREE_TYPE (captures[2]))))
443 : : && single_use (captures[5])
444 : 0 : && single_use (captures[6])
445 : : )
446 : : {
447 : 0 : {
448 : 0 : res_ops[0] = captures[0];
449 : 0 : res_ops[1] = captures[1];
450 : 0 : res_ops[2] = captures[2];
451 : 0 : res_ops[3] = captures[3];
452 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 102, __FILE__, __LINE__, false);
453 : 0 : return true;
454 : : }
455 : : }
456 : : }
457 : 0 : break;
458 : : }
459 : 0 : case REAL_CST:
460 : 0 : {
461 : 0 : {
462 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _q50, _p2, _p0, _q21, _p1 };
463 : 0 : if (!flag_trapping_math
464 : 0 : && SCALAR_FLOAT_TYPE_P (type)
465 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
466 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
467 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
468 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
469 : : && single_use (captures[5])
470 : 0 : && (flag_unsafe_math_optimizations
471 : 0 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[1])),
472 : 0 : &TREE_REAL_CST (captures[2])))
473 : : )
474 : : {
475 : 0 : {
476 : 0 : res_ops[0] = captures[0];
477 : 0 : res_ops[1] = captures[1];
478 : 0 : res_ops[2] = captures[2];
479 : 0 : res_ops[3] = captures[3];
480 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 103, __FILE__, __LINE__, false);
481 : 0 : return true;
482 : : }
483 : : }
484 : : }
485 : 0 : break;
486 : : }
487 : : default:;
488 : : }
489 : : break;
490 : : }
491 : 0 : case FLOAT_EXPR:
492 : 0 : {
493 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
494 : 0 : switch (TREE_CODE (_p2))
495 : : {
496 : 0 : case FLOAT_EXPR:
497 : 0 : {
498 : 0 : tree _q70 = TREE_OPERAND (_p2, 0);
499 : 0 : {
500 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
501 : 0 : if (SCALAR_FLOAT_TYPE_P (type) && !flag_trapping_math
502 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
503 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
504 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
505 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
506 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
507 : : && single_use (captures[5])
508 : 0 : && single_use (captures[6])
509 : : )
510 : : {
511 : 0 : {
512 : 0 : res_ops[0] = captures[0];
513 : 0 : res_ops[1] = captures[1];
514 : 0 : res_ops[2] = captures[2];
515 : 0 : res_ops[3] = captures[3];
516 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 104, __FILE__, __LINE__, false);
517 : 0 : return true;
518 : : }
519 : : }
520 : : }
521 : 0 : break;
522 : : }
523 : : default:;
524 : : }
525 : : break;
526 : : }
527 : 0 : case FIX_TRUNC_EXPR:
528 : 0 : {
529 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
530 : 0 : switch (TREE_CODE (_p2))
531 : : {
532 : 0 : case FIX_TRUNC_EXPR:
533 : 0 : {
534 : 0 : tree _q70 = TREE_OPERAND (_p2, 0);
535 : 0 : {
536 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
537 : 0 : if (INTEGRAL_TYPE_P (type) && !flag_trapping_math
538 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
539 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
540 : 0 : && !operand_equal_p (TYPE_SIZE (type),
541 : 0 : TYPE_SIZE (TREE_TYPE (captures[0])))
542 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
543 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
544 : : && single_use (captures[5])
545 : 0 : && single_use (captures[6])
546 : : )
547 : : {
548 : 0 : {
549 : 0 : res_ops[0] = captures[0];
550 : 0 : res_ops[1] = captures[1];
551 : 0 : res_ops[2] = captures[2];
552 : 0 : res_ops[3] = captures[3];
553 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 105, __FILE__, __LINE__, false);
554 : 0 : return true;
555 : : }
556 : : }
557 : : }
558 : 0 : break;
559 : : }
560 : : default:;
561 : : }
562 : : break;
563 : : }
564 : 0 : case REAL_CST:
565 : 0 : {
566 : 0 : switch (TREE_CODE (_p2))
567 : : {
568 : 0 : CASE_CONVERT:
569 : 0 : {
570 : 0 : tree _q60 = TREE_OPERAND (_p2, 0);
571 : 0 : {
572 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _p1, _q60, _p0, _q21, _p2 };
573 : 0 : if (!flag_trapping_math
574 : 0 : && SCALAR_FLOAT_TYPE_P (type)
575 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[2]))
576 : 0 : && !operand_equal_p (TYPE_SIZE (type),
577 : 0 : TYPE_SIZE (TREE_TYPE (captures[0])))
578 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
579 : 0 : TYPE_SIZE (TREE_TYPE (captures[2])))
580 : : && single_use (captures[5])
581 : 0 : && (flag_unsafe_math_optimizations
582 : 0 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[2])),
583 : 0 : &TREE_REAL_CST (captures[1])))
584 : : )
585 : : {
586 : 0 : {
587 : 0 : res_ops[0] = captures[0];
588 : 0 : res_ops[1] = captures[1];
589 : 0 : res_ops[2] = captures[2];
590 : 0 : res_ops[3] = captures[3];
591 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 106, __FILE__, __LINE__, false);
592 : 0 : return true;
593 : : }
594 : : }
595 : : }
596 : 0 : break;
597 : : }
598 : : default:;
599 : : }
600 : : break;
601 : : }
602 : : default:;
603 : : }
604 : : break;
605 : : }
606 : : default:;
607 : : }
608 : : break;
609 : : }
610 : : default:;
611 : : }
612 : : return false;
613 : : }
614 : :
615 : : tree
616 : 1 : generic_simplify_2 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
617 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
618 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
619 : : {
620 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
621 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail245;
622 : 1 : {
623 : 1 : tree res_op0;
624 : 1 : res_op0 = captures[0];
625 : 1 : tree _r;
626 : 1 : _r = fold_build1_loc (loc, ABS_EXPR, type, res_op0);
627 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
628 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
629 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 110, __FILE__, __LINE__, true);
630 : : return _r;
631 : : }
632 : 0 : next_after_fail245:;
633 : 0 : return NULL_TREE;
634 : : }
635 : :
636 : : tree
637 : 316 : generic_simplify_4 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
638 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
639 : : const enum tree_code ARG_UNUSED (outer_op),
640 : : const enum tree_code ARG_UNUSED (inner_op))
641 : : {
642 : 316 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
643 : 316 : if (real_zerop (captures[2])
644 : 34 : && real_zerop (captures[3])
645 : 350 : && !HONOR_SIGN_DEPENDENT_ROUNDING (type)
646 : : )
647 : : {
648 : 10 : {
649 : 10 : bool inner_plus = ((inner_op == PLUS_EXPR)
650 : 10 : ^ REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[2])));
651 : 10 : bool outer_plus
652 : 10 : = ((outer_op == PLUS_EXPR)
653 : 10 : ^ REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[3])));
654 : 10 : if (outer_plus && !inner_plus
655 : : )
656 : : {
657 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail247;
658 : 2 : {
659 : 2 : tree res_op0;
660 : 2 : res_op0 = captures[1];
661 : 2 : tree res_op1;
662 : 2 : res_op1 = captures[3];
663 : 2 : tree _r;
664 : 2 : _r = fold_build2_loc (loc, outer_op, type, res_op0, res_op1);
665 : 2 : if (TREE_SIDE_EFFECTS (captures[2]))
666 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
667 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 112, __FILE__, __LINE__, true);
668 : 2 : return _r;
669 : : }
670 : 0 : next_after_fail247:;
671 : : }
672 : : else
673 : : {
674 : 8 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail248;
675 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail248;
676 : 8 : {
677 : 8 : tree _r;
678 : 8 : _r = captures[0];
679 : 8 : if (TREE_SIDE_EFFECTS (captures[3]))
680 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
681 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 113, __FILE__, __LINE__, true);
682 : 8 : return _r;
683 : : }
684 : : next_after_fail248:;
685 : : }
686 : : }
687 : : }
688 : : return NULL_TREE;
689 : : }
690 : :
691 : : tree
692 : 69008 : generic_simplify_7 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
693 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
694 : : const enum tree_code ARG_UNUSED (op))
695 : : {
696 : 69008 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
697 : 69008 : {
698 : 69008 : bool wascmp0, wascmp1;
699 : 69008 : if (bitwise_inverted_equal_p (captures[1], captures[3], wascmp0)
700 : 1178 : && bitwise_inverted_equal_p (captures[0], captures[2], wascmp1)
701 : 69012 : && ((!wascmp0 && !wascmp1)
702 : 0 : || element_precision (type) == 1)
703 : : )
704 : : {
705 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail251;
706 : 4 : {
707 : 4 : tree res_op0;
708 : 4 : res_op0 = captures[0];
709 : 4 : tree res_op1;
710 : 4 : res_op1 = captures[3];
711 : 4 : tree _r;
712 : 4 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
713 : 4 : if (TREE_SIDE_EFFECTS (captures[1]))
714 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
715 : 4 : if (TREE_SIDE_EFFECTS (captures[2]))
716 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
717 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 116, __FILE__, __LINE__, true);
718 : 4 : return _r;
719 : : }
720 : 0 : next_after_fail251:;
721 : : }
722 : : }
723 : 69004 : return NULL_TREE;
724 : : }
725 : :
726 : : tree
727 : 0 : generic_simplify_10 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
728 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
729 : : {
730 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
731 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail254;
732 : 0 : {
733 : 0 : tree res_op0;
734 : 0 : res_op0 = captures[0];
735 : 0 : tree res_op1;
736 : 0 : res_op1 = captures[1];
737 : 0 : tree _r;
738 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
739 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 119, __FILE__, __LINE__, true);
740 : : return _r;
741 : : }
742 : 0 : next_after_fail254:;
743 : 0 : return NULL_TREE;
744 : : }
745 : :
746 : : tree
747 : 46697 : generic_simplify_13 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
748 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
749 : : {
750 : 46697 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
751 : 46697 : if (!TYPE_SATURATING (type)
752 : : )
753 : : {
754 : 46697 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
755 : 93320 : && !FIXED_POINT_TYPE_P (type)
756 : : )
757 : : {
758 : 46623 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail257;
759 : 46623 : {
760 : 46623 : tree res_op0;
761 : 46623 : res_op0 = captures[0];
762 : 46623 : tree _r;
763 : 46623 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
764 : 46623 : if (TREE_SIDE_EFFECTS (captures[1]))
765 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
766 : 46623 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 122, __FILE__, __LINE__, true);
767 : 46623 : return _r;
768 : : }
769 : 0 : next_after_fail257:;
770 : : }
771 : : }
772 : : return NULL_TREE;
773 : : }
774 : :
775 : : tree
776 : 194200 : generic_simplify_14 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
777 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
778 : : {
779 : 194200 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
780 : 194200 : if (!TYPE_SATURATING (type)
781 : : )
782 : : {
783 : 194200 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
784 : 194200 : && !TYPE_OVERFLOW_SANITIZED (type)
785 : : )
786 : : {
787 : 192070 : {
788 : 192070 : tree t1 = type;
789 : 192070 : if (INTEGRAL_TYPE_P (type)
790 : 332534 : && TYPE_OVERFLOW_WRAPS (type) != TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
791 : 2450 : t1 = TYPE_OVERFLOW_WRAPS (type) ? type : TREE_TYPE (captures[1]);
792 : 192070 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail258;
793 : 192070 : {
794 : 192070 : tree res_op0;
795 : 192070 : {
796 : 192070 : tree _o1[2], _r1;
797 : 192070 : {
798 : 192070 : tree _o2[1], _r2;
799 : 192070 : _o2[0] = captures[0];
800 : 192070 : if (TREE_TYPE (_o2[0]) != t1)
801 : : {
802 : 2162 : _r2 = fold_build1_loc (loc, NOP_EXPR, t1, _o2[0]);
803 : : }
804 : : else
805 : : _r2 = _o2[0];
806 : 192070 : _o1[0] = _r2;
807 : : }
808 : 192070 : {
809 : 192070 : tree _o2[1], _r2;
810 : 192070 : _o2[0] = captures[1];
811 : 192070 : if (TREE_TYPE (_o2[0]) != t1)
812 : : {
813 : 1681 : _r2 = fold_build1_loc (loc, NOP_EXPR, t1, _o2[0]);
814 : : }
815 : : else
816 : : _r2 = _o2[0];
817 : 192070 : _o1[1] = _r2;
818 : : }
819 : 192070 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
820 : 192070 : res_op0 = _r1;
821 : : }
822 : 192070 : tree _r;
823 : 192070 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
824 : 192070 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 123, __FILE__, __LINE__, true);
825 : 192070 : return _r;
826 : : }
827 : 0 : next_after_fail258:;
828 : : }
829 : : }
830 : : }
831 : : return NULL_TREE;
832 : : }
833 : :
834 : : tree
835 : 561 : generic_simplify_19 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
836 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
837 : : {
838 : 561 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
839 : 561 : if (!TYPE_SATURATING (type)
840 : : )
841 : : {
842 : 561 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
843 : 1122 : && !FIXED_POINT_TYPE_P (type)
844 : : )
845 : : {
846 : 561 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail271;
847 : 561 : {
848 : 561 : tree res_op0;
849 : 561 : res_op0 = captures[2];
850 : 561 : tree res_op1;
851 : 561 : res_op1 = captures[1];
852 : 561 : tree _r;
853 : 561 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
854 : 561 : if (TREE_SIDE_EFFECTS (captures[0]))
855 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
856 : 561 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 136, __FILE__, __LINE__, true);
857 : 561 : return _r;
858 : : }
859 : 0 : next_after_fail271:;
860 : : }
861 : : }
862 : : return NULL_TREE;
863 : : }
864 : :
865 : : tree
866 : 10 : generic_simplify_20 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
867 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
868 : : {
869 : 10 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
870 : 10 : if (!TYPE_SATURATING (type)
871 : : )
872 : : {
873 : 10 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
874 : 20 : && !FIXED_POINT_TYPE_P (type)
875 : : )
876 : : {
877 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail272;
878 : 10 : {
879 : 10 : tree res_op0;
880 : 10 : res_op0 = captures[2];
881 : 10 : tree res_op1;
882 : 10 : res_op1 = captures[1];
883 : 10 : tree _r;
884 : 10 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
885 : 10 : if (TREE_SIDE_EFFECTS (captures[0]))
886 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
887 : 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 137, __FILE__, __LINE__, true);
888 : 10 : return _r;
889 : : }
890 : 0 : next_after_fail272:;
891 : : }
892 : : }
893 : : return NULL_TREE;
894 : : }
895 : :
896 : : tree
897 : 7 : generic_simplify_21 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
898 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
899 : : {
900 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
901 : 7 : if (!TYPE_SATURATING (type)
902 : : )
903 : : {
904 : 7 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
905 : 14 : && !FIXED_POINT_TYPE_P (type)
906 : : )
907 : : {
908 : 7 : if (TYPE_OVERFLOW_UNDEFINED (type)
909 : 14 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
910 : : )
911 : : {
912 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail273;
913 : 7 : {
914 : 7 : tree res_op0;
915 : 7 : res_op0 = captures[2];
916 : 7 : tree res_op1;
917 : 7 : res_op1 = captures[1];
918 : 7 : tree _r;
919 : 7 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
920 : 7 : if (TREE_SIDE_EFFECTS (captures[0]))
921 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
922 : 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 138, __FILE__, __LINE__, true);
923 : 7 : return _r;
924 : : }
925 : 0 : next_after_fail273:;
926 : : }
927 : : }
928 : : }
929 : : return NULL_TREE;
930 : : }
931 : :
932 : : tree
933 : 6396464 : generic_simplify_22 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
934 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
935 : : const enum tree_code ARG_UNUSED (op))
936 : : {
937 : 6396464 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
938 : 6396464 : if (!TYPE_SATURATING (type)
939 : : )
940 : : {
941 : 6396464 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
942 : 12377213 : && !FIXED_POINT_TYPE_P (type)
943 : : )
944 : : {
945 : 5980749 : if (INTEGRAL_TYPE_P (type)
946 : 5980457 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
947 : 4749862 : && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
948 : 4108913 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
949 : 3563063 : && !TYPE_OVERFLOW_TRAPS (type)
950 : 9543812 : && !TYPE_OVERFLOW_SANITIZED (type)
951 : : )
952 : : {
953 : 3562792 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail274;
954 : 3562792 : {
955 : 3562792 : tree res_op0;
956 : 3562792 : {
957 : 3562792 : tree _o1[2], _r1;
958 : 3562792 : _o1[0] = captures[0];
959 : 3562792 : _o1[1] = captures[1];
960 : 3562792 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
961 : 3562792 : if (EXPR_P (_r1))
962 : 3549521 : goto next_after_fail274;
963 : 13271 : res_op0 = _r1;
964 : : }
965 : 13271 : tree _r;
966 : 13271 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
967 : 13271 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 139, __FILE__, __LINE__, true);
968 : 13271 : return _r;
969 : : }
970 : : next_after_fail274:;
971 : : }
972 : : }
973 : : }
974 : : return NULL_TREE;
975 : : }
976 : :
977 : : tree
978 : 8901 : generic_simplify_26 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
979 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
980 : : const enum tree_code ARG_UNUSED (plusminus))
981 : : {
982 : 8901 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
983 : 8901 : if (!TYPE_SATURATING (type)
984 : 8901 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
985 : : )
986 : : {
987 : 8735 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
988 : : )
989 : : {
990 : 4 : if ((!ANY_INTEGRAL_TYPE_P (type)
991 : 8731 : || TYPE_OVERFLOW_WRAPS (type)
992 : 3079 : || (INTEGRAL_TYPE_P (type)
993 : 3079 : && ((tree_expr_nonzero_p (captures[0])
994 : 132 : && expr_not_equal_to (captures[0],
995 : 8867 : wi::minus_one (TYPE_PRECISION (type))))
996 : : || (plusminus == PLUS_EXPR
997 : 2947 : ? expr_not_equal_to (captures[2],
998 : 8753 : wi::max_value (TYPE_PRECISION (type), SIGNED))
999 : 2929 : : (expr_not_equal_to (captures[2],
1000 : 11664 : wi::min_value (TYPE_PRECISION (type), SIGNED))
1001 : 2875 : && expr_not_equal_to (captures[2],
1002 : 5750 : wi::min_value (TYPE_PRECISION (type), SIGNED)
1003 : 17360 : + 1))))))
1004 : 11682 : && single_use (captures[1])
1005 : : )
1006 : : {
1007 : 8681 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail279;
1008 : 8681 : {
1009 : 8681 : tree res_op0;
1010 : 8681 : {
1011 : 8681 : tree _o1[2], _r1;
1012 : 8681 : _o1[0] = build_one_cst (type);
1013 : 8681 : _o1[1] = captures[2];
1014 : 8681 : _r1 = fold_build2_loc (loc, plusminus, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1015 : 8681 : res_op0 = _r1;
1016 : : }
1017 : 8681 : tree res_op1;
1018 : 8681 : res_op1 = captures[0];
1019 : 8681 : tree _r;
1020 : 8681 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1021 : 8681 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 144, __FILE__, __LINE__, true);
1022 : 8681 : return _r;
1023 : : }
1024 : 0 : next_after_fail279:;
1025 : : }
1026 : : }
1027 : : }
1028 : : return NULL_TREE;
1029 : : }
1030 : :
1031 : : tree
1032 : 3503257 : generic_simplify_28 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1033 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1034 : : {
1035 : 3503257 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1036 : 3503257 : if (!TYPE_SATURATING (type)
1037 : 3503257 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
1038 : : )
1039 : : {
1040 : 3503257 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
1041 : : )
1042 : : {
1043 : 7006514 : if (TREE_CODE (type) == INTEGER_TYPE
1044 : 3503257 : && wi::neg_p (wi::to_wide (captures[3]))
1045 : 10509771 : && wi::to_wide (captures[3]) != wi::min_value (TYPE_PRECISION (type), SIGNED)
1046 : : )
1047 : : {
1048 : 851259 : {
1049 : 851259 : wide_int c0 = wi::to_wide (captures[1]);
1050 : 851259 : wide_int c2 = wi::to_wide (captures[3]);
1051 : 851259 : wide_int c2_abs = wi::abs (c2);
1052 : 851259 : if (wi::multiple_of_p (c2_abs, c0, TYPE_SIGN (type))
1053 : : )
1054 : : {
1055 : 390703 : {
1056 : 390703 : wide_int div_res = wi::sdiv_trunc (c2, c0);
1057 : 390703 : tree div_cst = wide_int_to_tree (type, div_res);
1058 : 390703 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail281;
1059 : 390703 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail281;
1060 : 390703 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail281;
1061 : 390703 : {
1062 : 390703 : tree res_op0;
1063 : 390703 : {
1064 : 390703 : tree _o1[2], _r1;
1065 : 390703 : _o1[0] = captures[2];
1066 : 390703 : _o1[1] = div_cst;
1067 : 390703 : _r1 = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1068 : 390703 : res_op0 = _r1;
1069 : : }
1070 : 390703 : tree res_op1;
1071 : 390703 : res_op1 = captures[1];
1072 : 390703 : tree _r;
1073 : 390703 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
1074 : 390703 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 146, __FILE__, __LINE__, true);
1075 : 390703 : return _r;
1076 : : }
1077 : 0 : next_after_fail281:;
1078 : 390703 : }
1079 : : }
1080 : 851259 : }
1081 : : }
1082 : : }
1083 : : }
1084 : : return NULL_TREE;
1085 : : }
1086 : :
1087 : : tree
1088 : 1 : generic_simplify_34 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1089 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1090 : : const combined_fn ARG_UNUSED (logs))
1091 : : {
1092 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1093 : 1 : if (flag_unsafe_math_optimizations
1094 : : )
1095 : : {
1096 : 1 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
1097 : 1 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
1098 : 1 : && ! flag_trapping_math
1099 : 2 : && ! flag_errno_math
1100 : : )
1101 : : {
1102 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail288;
1103 : 1 : {
1104 : 1 : tree res_op0;
1105 : 1 : {
1106 : 1 : tree _o1[2], _r1;
1107 : 1 : _o1[0] = captures[1];
1108 : 1 : _o1[1] = captures[3];
1109 : 1 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1110 : 1 : res_op0 = _r1;
1111 : : }
1112 : 1 : tree _r;
1113 : 1 : _r = maybe_build_call_expr_loc (loc, logs, type, 1, res_op0);
1114 : 1 : if (!_r)
1115 : 0 : goto next_after_fail288;
1116 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 153, __FILE__, __LINE__, true);
1117 : 1 : return _r;
1118 : : }
1119 : : next_after_fail288:;
1120 : : }
1121 : : }
1122 : : return NULL_TREE;
1123 : : }
1124 : :
1125 : : tree
1126 : 0 : generic_simplify_39 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1127 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1128 : : const enum tree_code ARG_UNUSED (op))
1129 : : {
1130 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1131 : 0 : if (VECTOR_FLOAT_TYPE_P (type)
1132 : 0 : && TYPE_VECTOR_SUBPARTS (type).is_constant ()
1133 : : )
1134 : : {
1135 : 0 : {
1136 : 0 : tree perm_cst = captures[1];
1137 : 0 : vec_perm_builder builder;
1138 : 0 : bool full_perm_p = false;
1139 : 0 : if (tree_to_vec_perm_builder (&builder, perm_cst))
1140 : : {
1141 : 0 : unsigned HOST_WIDE_INT nelts;
1142 : 0 : nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
1143 : 0 : vec_perm_indices sel (builder, 1, nelts);
1144 : 0 : if (sel.encoding ().encoded_full_vector_p ())
1145 : : {
1146 : 0 : auto_sbitmap seen (nelts);
1147 : 0 : bitmap_clear (seen);
1148 : 0 : unsigned HOST_WIDE_INT count = 0, i;
1149 : 0 : for (i = 0; i < nelts; i++)
1150 : : {
1151 : 0 : if (!bitmap_set_bit (seen, sel[i].to_constant ()))
1152 : : break;
1153 : 0 : count++;
1154 : : }
1155 : 0 : full_perm_p = count == nelts;
1156 : 0 : }
1157 : 0 : }
1158 : 0 : if (full_perm_p
1159 : : )
1160 : : {
1161 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail293;
1162 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail293;
1163 : 0 : {
1164 : 0 : tree res_op0;
1165 : 0 : {
1166 : 0 : tree _o1[2], _r1;
1167 : 0 : _o1[0] = captures[0];
1168 : 0 : _o1[1] = captures[2];
1169 : 0 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1170 : 0 : captures[3] = _r1;
1171 : : }
1172 : 0 : res_op0 = unshare_expr (captures[3]);
1173 : 0 : tree res_op1;
1174 : 0 : res_op1 = captures[3];
1175 : 0 : tree res_op2;
1176 : 0 : res_op2 = captures[1];
1177 : 0 : tree _r;
1178 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
1179 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 158, __FILE__, __LINE__, true);
1180 : 0 : return _r;
1181 : : }
1182 : 0 : next_after_fail293:;
1183 : : }
1184 : 0 : }
1185 : : }
1186 : : return NULL_TREE;
1187 : : }
1188 : :
1189 : : tree
1190 : 56499 : generic_simplify_50 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1191 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1192 : : {
1193 : 56499 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1194 : 56499 : if (!TYPE_SATURATING (type)
1195 : : )
1196 : : {
1197 : 56499 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1198 : 112987 : && !FIXED_POINT_TYPE_P (type)
1199 : : )
1200 : : {
1201 : 56488 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail304;
1202 : 56488 : {
1203 : 56488 : tree res_op0;
1204 : 56488 : res_op0 = captures[1];
1205 : 56488 : tree _r;
1206 : 56488 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
1207 : 56488 : if (TREE_SIDE_EFFECTS (captures[0]))
1208 : 15 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
1209 : 56488 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 168, __FILE__, __LINE__, true);
1210 : 56488 : return _r;
1211 : : }
1212 : 0 : next_after_fail304:;
1213 : : }
1214 : : }
1215 : : return NULL_TREE;
1216 : : }
1217 : :
1218 : : tree
1219 : 41 : generic_simplify_56 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1220 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1221 : : {
1222 : 41 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1223 : 41 : if (!TYPE_SATURATING (type)
1224 : : )
1225 : : {
1226 : 41 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1227 : 82 : && !FIXED_POINT_TYPE_P (type)
1228 : : )
1229 : : {
1230 : 82 : if (!TYPE_OVERFLOW_TRAPS (type)
1231 : 41 : && TREE_CODE (type) != COMPLEX_TYPE
1232 : 81 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1233 : : )
1234 : : {
1235 : 40 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail314;
1236 : 40 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail314;
1237 : 40 : {
1238 : 40 : tree res_op0;
1239 : 40 : {
1240 : 40 : tree _o1[1], _r1;
1241 : 40 : _o1[0] = captures[0];
1242 : 40 : if (TREE_TYPE (_o1[0]) != type)
1243 : : {
1244 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1245 : : }
1246 : : else
1247 : : _r1 = _o1[0];
1248 : 40 : res_op0 = _r1;
1249 : : }
1250 : 40 : tree _r;
1251 : 40 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1252 : 40 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 178, __FILE__, __LINE__, true);
1253 : 40 : return _r;
1254 : : }
1255 : : next_after_fail314:;
1256 : : }
1257 : : }
1258 : : }
1259 : : return NULL_TREE;
1260 : : }
1261 : :
1262 : : tree
1263 : 0 : generic_simplify_61 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1264 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1265 : : {
1266 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1267 : 0 : if (VECTOR_TYPE_P (type)
1268 : 0 : && known_eq (TYPE_VECTOR_SUBPARTS (type),
1269 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (captures[3])))
1270 : 0 : && (TYPE_MODE (TREE_TYPE (type))
1271 : 0 : == TYPE_MODE (TREE_TYPE (TREE_TYPE (captures[3]))))
1272 : : )
1273 : : {
1274 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail321;
1275 : 0 : {
1276 : 0 : tree res_op0;
1277 : 0 : res_op0 = captures[0];
1278 : 0 : tree res_op1;
1279 : 0 : {
1280 : 0 : tree _o1[1], _r1;
1281 : 0 : {
1282 : 0 : tree _o2[3], _r2;
1283 : 0 : _o2[0] = captures[2];
1284 : 0 : {
1285 : 0 : tree _o3[1], _r3;
1286 : 0 : _o3[0] = captures[3];
1287 : 0 : _r3 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
1288 : 0 : _o2[1] = _r3;
1289 : : }
1290 : 0 : _o2[2] = captures[4];
1291 : 0 : _r2 = fold_build3_loc (loc, VEC_COND_EXPR, TREE_TYPE (_o2[1]), _o2[0], _o2[1], _o2[2]);
1292 : 0 : _o1[0] = _r2;
1293 : : }
1294 : 0 : if (TREE_TYPE (_o1[0]) != type)
1295 : : {
1296 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
1297 : : }
1298 : : else
1299 : : _r1 = _o1[0];
1300 : 0 : res_op1 = _r1;
1301 : : }
1302 : 0 : tree _r;
1303 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
1304 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 185, __FILE__, __LINE__, true);
1305 : 0 : return _r;
1306 : : }
1307 : 0 : next_after_fail321:;
1308 : : }
1309 : : return NULL_TREE;
1310 : : }
1311 : :
1312 : : tree
1313 : 0 : generic_simplify_70 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1314 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1315 : : {
1316 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1317 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail330;
1318 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail330;
1319 : 0 : {
1320 : 0 : tree _r;
1321 : 0 : _r = captures[2];
1322 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 194, __FILE__, __LINE__, true);
1323 : : return _r;
1324 : : }
1325 : : next_after_fail330:;
1326 : : return NULL_TREE;
1327 : : }
1328 : :
1329 : : tree
1330 : 16 : generic_simplify_74 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1331 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1332 : : {
1333 : 16 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1334 : 32 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1335 : 32 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
1336 : : )
1337 : : {
1338 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail334;
1339 : 0 : {
1340 : 0 : tree res_op0;
1341 : 0 : res_op0 = captures[0];
1342 : 0 : tree res_op1;
1343 : 0 : {
1344 : 0 : tree _o1[2], _r1;
1345 : 0 : _o1[0] = captures[1];
1346 : 0 : _o1[1] = build_one_cst (type);
1347 : 0 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1348 : 0 : res_op1 = _r1;
1349 : : }
1350 : 0 : tree _r;
1351 : 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
1352 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 197, __FILE__, __LINE__, true);
1353 : 0 : return _r;
1354 : : }
1355 : 0 : next_after_fail334:;
1356 : : }
1357 : : return NULL_TREE;
1358 : : }
1359 : :
1360 : : tree
1361 : 8 : generic_simplify_83 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1362 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1363 : : {
1364 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1365 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1366 : 16 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
1367 : : )
1368 : : {
1369 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail347;
1370 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail347;
1371 : 0 : {
1372 : 0 : tree _r;
1373 : 0 : _r = captures[2];
1374 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 205, __FILE__, __LINE__, true);
1375 : 0 : return _r;
1376 : : }
1377 : : next_after_fail347:;
1378 : : }
1379 : : return NULL_TREE;
1380 : : }
1381 : :
1382 : : tree
1383 : 1 : generic_simplify_92 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1384 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1385 : : {
1386 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1387 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail356;
1388 : 1 : {
1389 : 1 : tree res_op0;
1390 : 1 : {
1391 : 1 : tree _o1[2], _r1;
1392 : 1 : _o1[0] = captures[1];
1393 : 1 : _o1[1] = captures[2];
1394 : 1 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1395 : 1 : res_op0 = _r1;
1396 : : }
1397 : 1 : tree _r;
1398 : 1 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1399 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 211, __FILE__, __LINE__, true);
1400 : : return _r;
1401 : : }
1402 : 0 : next_after_fail356:;
1403 : 0 : return NULL_TREE;
1404 : : }
1405 : :
1406 : : tree
1407 : 0 : generic_simplify_100 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1408 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1409 : : const enum tree_code ARG_UNUSED (op))
1410 : : {
1411 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1412 : 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
1413 : 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
1414 : : )
1415 : : {
1416 : 0 : if (single_use (captures[4]) && single_use (captures[5])
1417 : : )
1418 : : {
1419 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail365;
1420 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail365;
1421 : 0 : {
1422 : 0 : tree res_op0;
1423 : 0 : res_op0 = captures[0];
1424 : 0 : tree res_op1;
1425 : 0 : {
1426 : 0 : tree _o1[1], _r1;
1427 : 0 : _o1[0] = captures[6];
1428 : 0 : if (TREE_TYPE (_o1[0]) != type)
1429 : : {
1430 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1431 : : }
1432 : : else
1433 : : _r1 = _o1[0];
1434 : 0 : res_op1 = _r1;
1435 : : }
1436 : 0 : tree _r;
1437 : 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1438 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 216, __FILE__, __LINE__, true);
1439 : 0 : return _r;
1440 : : }
1441 : : next_after_fail365:;
1442 : : }
1443 : : else
1444 : : {
1445 : : if (single_use (captures[0]) && single_use (captures[1])
1446 : : )
1447 : : {
1448 : : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail366;
1449 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail366;
1450 : : {
1451 : : tree res_op0;
1452 : : {
1453 : : tree _o1[1], _r1;
1454 : : _o1[0] = captures[3];
1455 : : if (TREE_TYPE (_o1[0]) != type)
1456 : : {
1457 : : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
1458 : : }
1459 : : else
1460 : : _r1 = _o1[0];
1461 : : res_op0 = _r1;
1462 : : }
1463 : : tree res_op1;
1464 : : res_op1 = captures[4];
1465 : : tree _r;
1466 : : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1467 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 217, __FILE__, __LINE__, true);
1468 : : return _r;
1469 : : }
1470 : : next_after_fail366:;
1471 : : }
1472 : : }
1473 : : }
1474 : : return NULL_TREE;
1475 : : }
1476 : :
1477 : : tree
1478 : 700 : generic_simplify_110 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1479 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1480 : : const enum tree_code ARG_UNUSED (op))
1481 : : {
1482 : 700 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1483 : 700 : if (bitwise_equal_p (captures[4], captures[7])
1484 : : )
1485 : : {
1486 : 40 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail378;
1487 : 40 : {
1488 : 40 : tree res_op0;
1489 : 40 : {
1490 : 40 : tree _o1[2], _r1;
1491 : 40 : {
1492 : 40 : tree _o2[2], _r2;
1493 : 40 : _o2[0] = captures[5];
1494 : 40 : {
1495 : 40 : tree _o3[1], _r3;
1496 : 40 : _o3[0] = captures[6];
1497 : 40 : if (TREE_TYPE (_o3[0]) != TREE_TYPE (_o2[0]))
1498 : : {
1499 : 0 : _r3 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
1500 : : }
1501 : : else
1502 : : _r3 = _o3[0];
1503 : 40 : _o2[1] = _r3;
1504 : : }
1505 : 40 : _r2 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1506 : 40 : _o1[0] = _r2;
1507 : : }
1508 : 40 : {
1509 : 40 : tree _o2[1], _r2;
1510 : 40 : _o2[0] = captures[4];
1511 : 40 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o1[0]))
1512 : : {
1513 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
1514 : : }
1515 : : else
1516 : : _r2 = _o2[0];
1517 : 40 : _o1[1] = _r2;
1518 : : }
1519 : 40 : _r1 = fold_build2_loc (loc, BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1520 : 40 : res_op0 = _r1;
1521 : : }
1522 : 40 : tree _r;
1523 : 40 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
1524 : 40 : if (TREE_SIDE_EFFECTS (captures[7]))
1525 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[7]), _r);
1526 : 40 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 223, __FILE__, __LINE__, true);
1527 : 40 : return _r;
1528 : : }
1529 : 0 : next_after_fail378:;
1530 : : }
1531 : : return NULL_TREE;
1532 : : }
1533 : :
1534 : : tree
1535 : 0 : generic_simplify_122 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1536 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1537 : : const enum tree_code ARG_UNUSED (cmp),
1538 : : const enum tree_code ARG_UNUSED (icmp))
1539 : : {
1540 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1541 : 0 : if (integer_zerop (captures[5])
1542 : 0 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
1543 : : )
1544 : : {
1545 : 0 : if (integer_onep (captures[4])
1546 : : )
1547 : : {
1548 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail393;
1549 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail393;
1550 : 0 : {
1551 : 0 : tree res_op0;
1552 : 0 : {
1553 : 0 : tree _o1[3], _r1;
1554 : 0 : _o1[0] = captures[1];
1555 : 0 : _o1[1] = captures[6];
1556 : 0 : _o1[2] = captures[9];
1557 : 0 : _r1 = fold_build3_loc (loc, VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
1558 : 0 : res_op0 = _r1;
1559 : : }
1560 : 0 : tree res_op1;
1561 : 0 : res_op1 = captures[4];
1562 : 0 : tree _r;
1563 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
1564 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 234, __FILE__, __LINE__, true);
1565 : 0 : return _r;
1566 : : }
1567 : : next_after_fail393:;
1568 : : }
1569 : : else
1570 : : {
1571 : 0 : if (integer_minus_onep (captures[4])
1572 : : )
1573 : : {
1574 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail394;
1575 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail394;
1576 : 0 : {
1577 : 0 : tree res_op0;
1578 : 0 : res_op0 = captures[1];
1579 : 0 : tree res_op1;
1580 : 0 : res_op1 = captures[6];
1581 : 0 : tree res_op2;
1582 : 0 : res_op2 = captures[9];
1583 : 0 : tree _r;
1584 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
1585 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 235, __FILE__, __LINE__, true);
1586 : 0 : return _r;
1587 : : }
1588 : : next_after_fail394:;
1589 : : }
1590 : : }
1591 : : }
1592 : : else
1593 : : {
1594 : 0 : if (integer_zerop (captures[4])
1595 : 0 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
1596 : : )
1597 : : {
1598 : 0 : if (integer_onep (captures[5])
1599 : : )
1600 : : {
1601 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail395;
1602 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail395;
1603 : 0 : {
1604 : 0 : tree res_op0;
1605 : 0 : {
1606 : 0 : tree _o1[3], _r1;
1607 : 0 : _o1[0] = captures[1];
1608 : 0 : _o1[1] = captures[9];
1609 : 0 : _o1[2] = captures[6];
1610 : 0 : _r1 = fold_build3_loc (loc, VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
1611 : 0 : res_op0 = _r1;
1612 : : }
1613 : 0 : tree res_op1;
1614 : 0 : res_op1 = captures[5];
1615 : 0 : tree _r;
1616 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
1617 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 236, __FILE__, __LINE__, true);
1618 : 0 : return _r;
1619 : : }
1620 : : next_after_fail395:;
1621 : : }
1622 : : else
1623 : : {
1624 : 0 : if (integer_minus_onep (captures[5])
1625 : : )
1626 : : {
1627 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail396;
1628 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail396;
1629 : 0 : {
1630 : 0 : tree res_op0;
1631 : 0 : res_op0 = captures[1];
1632 : 0 : tree res_op1;
1633 : 0 : res_op1 = captures[9];
1634 : 0 : tree res_op2;
1635 : 0 : res_op2 = captures[6];
1636 : 0 : tree _r;
1637 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
1638 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 237, __FILE__, __LINE__, true);
1639 : 0 : return _r;
1640 : : }
1641 : : next_after_fail396:;
1642 : : }
1643 : : }
1644 : : }
1645 : : }
1646 : : return NULL_TREE;
1647 : : }
1648 : :
1649 : : tree
1650 : 2 : generic_simplify_142 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1651 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1652 : : {
1653 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1654 : 4 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1655 : 4 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
1656 : : )
1657 : : {
1658 : 2 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail449;
1659 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail449;
1660 : 2 : {
1661 : 2 : tree res_op0;
1662 : 2 : res_op0 = captures[3];
1663 : 2 : tree res_op1;
1664 : 2 : {
1665 : 2 : tree _o1[2], _r1;
1666 : 2 : _o1[0] = captures[1];
1667 : 2 : _o1[1] = build_int_cst (TREE_TYPE (captures[1]), 1);
1668 : 2 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1669 : 2 : res_op1 = _r1;
1670 : : }
1671 : 2 : tree _r;
1672 : 2 : _r = fold_build2_loc (loc, LE_EXPR, type, res_op0, res_op1);
1673 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 243, __FILE__, __LINE__, true);
1674 : 2 : return _r;
1675 : : }
1676 : : next_after_fail449:;
1677 : : }
1678 : : return NULL_TREE;
1679 : : }
1680 : :
1681 : : tree
1682 : 7 : generic_simplify_146 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1683 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1684 : : const enum tree_code ARG_UNUSED (op))
1685 : : {
1686 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1687 : 14 : if (INTEGRAL_TYPE_P (type)
1688 : 7 : && tree_int_cst_sgn (captures[2]) > 0
1689 : 7 : && tree_int_cst_sgn (captures[4]) > 0
1690 : 28 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[3])) == 0
1691 : : )
1692 : : {
1693 : 4 : {
1694 : 4 : tree t = type;
1695 : 4 : if (!TYPE_OVERFLOW_WRAPS (t))
1696 : 4 : t = unsigned_type_for (t);
1697 : 4 : wide_int wone = wi::one (TYPE_PRECISION (t));
1698 : 8 : wide_int c = wi::add (wi::lshift (wone, wi::to_wide (captures[2])),
1699 : 8 : wi::lshift (wone, wi::to_wide (captures[4])));
1700 : 4 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail453;
1701 : 4 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail453;
1702 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail453;
1703 : 4 : {
1704 : 4 : tree res_op0;
1705 : 4 : {
1706 : 4 : tree _o1[2], _r1;
1707 : 4 : {
1708 : 4 : tree _o2[1], _r2;
1709 : 4 : _o2[0] = captures[1];
1710 : 4 : if (TREE_TYPE (_o2[0]) != t)
1711 : : {
1712 : 4 : _r2 = fold_build1_loc (loc, NOP_EXPR, t, _o2[0]);
1713 : : }
1714 : : else
1715 : : _r2 = _o2[0];
1716 : 4 : _o1[0] = _r2;
1717 : : }
1718 : 4 : _o1[1] = wide_int_to_tree (t,c);
1719 : 4 : _r1 = fold_build2_loc (loc, MULT_EXPR, t, _o1[0], _o1[1]);
1720 : 4 : res_op0 = _r1;
1721 : : }
1722 : 4 : tree _r;
1723 : 4 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
1724 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 264, __FILE__, __LINE__, true);
1725 : 4 : return _r;
1726 : : }
1727 : 0 : next_after_fail453:;
1728 : 4 : }
1729 : : }
1730 : : return NULL_TREE;
1731 : : }
1732 : :
1733 : : tree
1734 : 0 : generic_simplify_151 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1735 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1736 : : {
1737 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1738 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail458;
1739 : 0 : {
1740 : 0 : tree res_op0;
1741 : 0 : {
1742 : 0 : tree _o1[2], _r1;
1743 : 0 : _o1[0] = captures[1];
1744 : 0 : _o1[1] = captures[2];
1745 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1746 : 0 : res_op0 = _r1;
1747 : : }
1748 : 0 : tree _r;
1749 : 0 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1750 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 268, __FILE__, __LINE__, true);
1751 : : return _r;
1752 : : }
1753 : 0 : next_after_fail458:;
1754 : 0 : return NULL_TREE;
1755 : : }
1756 : :
1757 : : tree
1758 : 1 : generic_simplify_155 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1759 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1760 : : {
1761 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1762 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail462;
1763 : 1 : {
1764 : 1 : tree res_op0;
1765 : 1 : res_op0 = captures[0];
1766 : 1 : tree _r;
1767 : 1 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1768 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
1769 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1770 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 272, __FILE__, __LINE__, true);
1771 : : return _r;
1772 : : }
1773 : 0 : next_after_fail462:;
1774 : 0 : return NULL_TREE;
1775 : : }
1776 : :
1777 : : tree
1778 : 0 : generic_simplify_160 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1779 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1780 : : {
1781 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1782 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail467;
1783 : 0 : {
1784 : 0 : tree res_op0;
1785 : 0 : res_op0 = captures[0];
1786 : 0 : tree res_op1;
1787 : 0 : res_op1 = captures[1];
1788 : 0 : tree _r;
1789 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
1790 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 277, __FILE__, __LINE__, true);
1791 : : return _r;
1792 : : }
1793 : 0 : next_after_fail467:;
1794 : 0 : return NULL_TREE;
1795 : : }
1796 : :
1797 : : tree
1798 : 731 : generic_simplify_165 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1799 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
1800 : : {
1801 : 731 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1802 : 731 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
1803 : : )
1804 : : {
1805 : 731 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail472;
1806 : 731 : {
1807 : 731 : tree res_op0;
1808 : 731 : {
1809 : 731 : tree _o1[2], _r1;
1810 : 731 : {
1811 : 731 : tree _o2[1], _r2;
1812 : 731 : _o2[0] = captures[2];
1813 : 731 : if (TREE_TYPE (_o2[0]) != type)
1814 : : {
1815 : 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o2[0]);
1816 : : }
1817 : : else
1818 : : _r2 = _o2[0];
1819 : 731 : _o1[0] = _r2;
1820 : : }
1821 : 731 : _o1[1] = captures[3];
1822 : 731 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1823 : 731 : res_op0 = _r1;
1824 : : }
1825 : 731 : tree _r;
1826 : 731 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
1827 : 731 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 282, __FILE__, __LINE__, true);
1828 : 731 : return _r;
1829 : : }
1830 : 0 : next_after_fail472:;
1831 : : }
1832 : : return NULL_TREE;
1833 : : }
1834 : :
1835 : : tree
1836 : 11 : generic_simplify_173 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1837 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1838 : : const combined_fn ARG_UNUSED (PARITY))
1839 : : {
1840 : 11 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1841 : 11 : if (types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[3]))
1842 : : )
1843 : : {
1844 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail481;
1845 : 10 : {
1846 : 10 : tree res_op0;
1847 : 10 : {
1848 : 10 : tree _o1[2], _r1;
1849 : 10 : _o1[0] = captures[1];
1850 : 10 : _o1[1] = captures[3];
1851 : 10 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1852 : 10 : res_op0 = _r1;
1853 : : }
1854 : 10 : tree _r;
1855 : 10 : _r = maybe_build_call_expr_loc (loc, PARITY, type, 1, res_op0);
1856 : 10 : if (!_r)
1857 : 0 : goto next_after_fail481;
1858 : 10 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 290, __FILE__, __LINE__, true);
1859 : 10 : return _r;
1860 : : }
1861 : : next_after_fail481:;
1862 : : }
1863 : : else
1864 : : {
1865 : 2 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1866 : 2 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[3]))
1867 : : )
1868 : : {
1869 : 1 : {
1870 : 1 : tree utype = TREE_TYPE (captures[1]);
1871 : 1 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
1872 : 1 : utype = TREE_TYPE (captures[3]);
1873 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail482;
1874 : 1 : {
1875 : 1 : tree res_op0;
1876 : 1 : {
1877 : 1 : tree _o1[2], _r1;
1878 : 1 : {
1879 : 1 : tree _o2[1], _r2;
1880 : 1 : _o2[0] = captures[1];
1881 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1882 : : {
1883 : 1 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1884 : : }
1885 : : else
1886 : : _r2 = _o2[0];
1887 : 1 : _o1[0] = _r2;
1888 : : }
1889 : 1 : {
1890 : 1 : tree _o2[1], _r2;
1891 : 1 : _o2[0] = captures[3];
1892 : 1 : if (TREE_TYPE (_o2[0]) != utype)
1893 : : {
1894 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
1895 : : }
1896 : : else
1897 : : _r2 = _o2[0];
1898 : 1 : _o1[1] = _r2;
1899 : : }
1900 : 1 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1901 : 1 : res_op0 = _r1;
1902 : : }
1903 : 1 : tree _r;
1904 : 1 : _r = maybe_build_call_expr_loc (loc, PARITY, type, 1, res_op0);
1905 : 1 : if (!_r)
1906 : 1 : goto next_after_fail482;
1907 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 291, __FILE__, __LINE__, true);
1908 : 0 : return _r;
1909 : : }
1910 : : next_after_fail482:;
1911 : : }
1912 : : }
1913 : : }
1914 : : return NULL_TREE;
1915 : : }
1916 : :
1917 : : tree
1918 : 4347 : generic_simplify_191 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
1919 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
1920 : : const enum tree_code ARG_UNUSED (op))
1921 : : {
1922 : 4347 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1923 : 4347 : {
1924 : 4347 : poly_widest_int factor;
1925 : 4347 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
1926 : 4316 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[2]))
1927 : 8663 : && multiple_p (wi::to_poly_widest (captures[3]), wi::to_widest (captures[1]), &factor)
1928 : : )
1929 : : {
1930 : 4267 : {
1931 : 4267 : wi::overflow_type overflow;
1932 : 4267 : wide_int mul;
1933 : 4267 : if (types_match (type, TREE_TYPE (captures[2]))
1934 : 4221 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[2]))
1935 : 0 : && TREE_CODE (captures[2]) == INTEGER_CST
1936 : 0 : && TREE_CODE (captures[3]) == INTEGER_CST
1937 : 4267 : && (mul = wi::mul (wi::to_wide (captures[2]), wi::to_wide (captures[3]),
1938 : 0 : TYPE_SIGN (type), &overflow),
1939 : 0 : !overflow)
1940 : 4267 : && (TYPE_UNSIGNED (type)
1941 : 4267 : || known_eq (factor, 1)
1942 : 0 : || (get_range_pos_neg (captures[0])
1943 : 0 : | (((op == PLUS_EXPR) ^ (tree_int_cst_sgn (captures[2]) < 0))
1944 : 0 : ? 1 : 2)) != 3)
1945 : : )
1946 : : {
1947 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail502;
1948 : 0 : {
1949 : 0 : tree res_op0;
1950 : 0 : {
1951 : 0 : tree _o1[2], _r1;
1952 : 0 : _o1[0] = captures[0];
1953 : 0 : _o1[1] = wide_int_to_tree (type, factor);
1954 : 0 : _r1 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1955 : 0 : res_op0 = _r1;
1956 : : }
1957 : 0 : tree res_op1;
1958 : 0 : res_op1 = wide_int_to_tree (type, mul);
1959 : 0 : tree _r;
1960 : 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
1961 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
1962 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
1963 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
1964 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
1965 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
1966 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
1967 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 305, __FILE__, __LINE__, true);
1968 : 0 : return _r;
1969 : : }
1970 : 0 : next_after_fail502:;
1971 : : }
1972 : : else
1973 : : {
1974 : 4267 : {
1975 : 4267 : tree utype = unsigned_type_for (type);
1976 : 4267 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail503;
1977 : 4267 : {
1978 : 4267 : tree res_op0;
1979 : 4267 : {
1980 : 4267 : tree _o1[2], _r1;
1981 : 4267 : {
1982 : 4267 : tree _o2[2], _r2;
1983 : 4267 : {
1984 : 4267 : tree _o3[1], _r3;
1985 : 4267 : _o3[0] = captures[0];
1986 : 4267 : if (TREE_TYPE (_o3[0]) != utype)
1987 : : {
1988 : 4267 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
1989 : : }
1990 : : else
1991 : : _r3 = _o3[0];
1992 : 4267 : _o2[0] = _r3;
1993 : : }
1994 : 4267 : _o2[1] = wide_int_to_tree (utype, factor);
1995 : 4267 : _r2 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1996 : 4267 : _o1[0] = _r2;
1997 : : }
1998 : 4267 : {
1999 : 4267 : tree _o2[2], _r2;
2000 : 4267 : {
2001 : 4267 : tree _o3[1], _r3;
2002 : 4267 : _o3[0] = captures[3];
2003 : 4267 : if (TREE_TYPE (_o3[0]) != utype)
2004 : : {
2005 : 14 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
2006 : : }
2007 : : else
2008 : : _r3 = _o3[0];
2009 : 4267 : _o2[0] = _r3;
2010 : : }
2011 : 4267 : {
2012 : 4267 : tree _o3[1], _r3;
2013 : 4267 : _o3[0] = captures[2];
2014 : 4267 : if (TREE_TYPE (_o3[0]) != utype)
2015 : : {
2016 : 46 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
2017 : : }
2018 : : else
2019 : : _r3 = _o3[0];
2020 : 4267 : _o2[1] = _r3;
2021 : : }
2022 : 4267 : _r2 = fold_build2_loc (loc, MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2023 : 4267 : _o1[1] = _r2;
2024 : : }
2025 : 4267 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2026 : 4267 : res_op0 = _r1;
2027 : : }
2028 : 4267 : tree _r;
2029 : 4267 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
2030 : 4267 : if (TREE_SIDE_EFFECTS (captures[1]))
2031 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2032 : 4267 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 306, __FILE__, __LINE__, true);
2033 : 4267 : return _r;
2034 : : }
2035 : 0 : next_after_fail503:;
2036 : : }
2037 : : }
2038 : 0 : }
2039 : : }
2040 : 4347 : }
2041 : 80 : return NULL_TREE;
2042 : : }
2043 : :
2044 : : tree
2045 : 0 : generic_simplify_221 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2046 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2047 : : const enum tree_code ARG_UNUSED (cmp1),
2048 : : const enum tree_code ARG_UNUSED (cmp2),
2049 : : const enum tree_code ARG_UNUSED (rcmp))
2050 : : {
2051 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2052 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2053 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[0]))
2054 : 0 : || (VECTOR_TYPE_P (TREE_TYPE (captures[0]))
2055 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[0]), type, rcmp))
2056 : : )
2057 : : {
2058 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail549;
2059 : 0 : {
2060 : 0 : tree res_op0;
2061 : 0 : res_op0 = captures[0];
2062 : 0 : tree res_op1;
2063 : 0 : res_op1 = captures[1];
2064 : 0 : tree _r;
2065 : 0 : _r = fold_build2_loc (loc, rcmp, type, res_op0, res_op1);
2066 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 350, __FILE__, __LINE__, true);
2067 : 0 : return _r;
2068 : : }
2069 : 0 : next_after_fail549:;
2070 : : }
2071 : : return NULL_TREE;
2072 : : }
2073 : :
2074 : : tree
2075 : 0 : generic_simplify_228 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2076 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2077 : : const enum tree_code ARG_UNUSED (cmp),
2078 : : const enum tree_code ARG_UNUSED (icmp))
2079 : : {
2080 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2081 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2082 : : )
2083 : : {
2084 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail560;
2085 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail560;
2086 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail560;
2087 : 0 : {
2088 : 0 : tree res_op0;
2089 : 0 : res_op0 = captures[0];
2090 : 0 : tree res_op1;
2091 : 0 : res_op1 = wide_int_to_tree (TREE_TYPE (captures[0]),
2092 : 0 : wi::exact_log2 (wi::to_wide (captures[1])));
2093 : 0 : tree _r;
2094 : 0 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2095 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 361, __FILE__, __LINE__, true);
2096 : 0 : return _r;
2097 : : }
2098 : : next_after_fail560:;
2099 : : }
2100 : : return NULL_TREE;
2101 : : }
2102 : :
2103 : : tree
2104 : 794 : generic_simplify_230 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2105 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2106 : : const enum tree_code ARG_UNUSED (cmp))
2107 : : {
2108 : 794 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2109 : 794 : if (tree_fits_shwi_p (captures[3])
2110 : 794 : && tree_to_shwi (captures[3]) > 0
2111 : 1574 : && tree_to_shwi (captures[3]) < TYPE_PRECISION (TREE_TYPE (captures[2]))
2112 : : )
2113 : : {
2114 : 780 : {
2115 : 780 : tree t0 = TREE_TYPE (captures[2]);
2116 : 780 : unsigned int prec = TYPE_PRECISION (t0);
2117 : 780 : wide_int c1 = wi::to_wide (captures[3]);
2118 : 780 : wide_int c2 = wi::to_wide (captures[4]);
2119 : 780 : wide_int c3 = wi::to_wide (captures[5]);
2120 : 780 : wide_int sb = wi::set_bit_in_zero (prec - 1, prec);
2121 : 780 : if ((c2 & c3) != c3
2122 : : )
2123 : : {
2124 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail563;
2125 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail563;
2126 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail563;
2127 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail563;
2128 : 0 : {
2129 : 0 : tree _r;
2130 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2131 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2132 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2133 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 364, __FILE__, __LINE__, true);
2134 : 0 : return _r;
2135 : : }
2136 : 0 : next_after_fail563:;
2137 : : }
2138 : : else
2139 : : {
2140 : 780 : if (TYPE_UNSIGNED (t0)
2141 : : )
2142 : : {
2143 : 687 : if ((c3 & wi::arshift (sb, c1 - 1)) != 0
2144 : : )
2145 : : {
2146 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail564;
2147 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail564;
2148 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail564;
2149 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail564;
2150 : 0 : {
2151 : 0 : tree _r;
2152 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2153 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2154 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2155 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 365, __FILE__, __LINE__, true);
2156 : 0 : return _r;
2157 : : }
2158 : 0 : next_after_fail564:;
2159 : : }
2160 : : else
2161 : : {
2162 : 687 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail565;
2163 : 687 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail565;
2164 : 687 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail565;
2165 : 687 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail565;
2166 : 687 : {
2167 : 687 : tree res_op0;
2168 : 687 : {
2169 : 687 : tree _o1[2], _r1;
2170 : 687 : _o1[0] = captures[2];
2171 : 687 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
2172 : 687 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2173 : 687 : res_op0 = _r1;
2174 : : }
2175 : 687 : tree res_op1;
2176 : 687 : res_op1 = wide_int_to_tree (t0, c3 << c1);
2177 : 687 : tree _r;
2178 : 687 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2179 : 687 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 366, __FILE__, __LINE__, true);
2180 : 687 : return _r;
2181 : : }
2182 : 0 : next_after_fail565:;
2183 : : }
2184 : : }
2185 : : else
2186 : : {
2187 : 93 : {
2188 : 93 : wide_int smask = wi::arshift (sb, c1);
2189 : 93 : if ((c2 & smask) == 0
2190 : : )
2191 : : {
2192 : 91 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail566;
2193 : 91 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail566;
2194 : 91 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail566;
2195 : 91 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail566;
2196 : 91 : {
2197 : 91 : tree res_op0;
2198 : 91 : {
2199 : 91 : tree _o1[2], _r1;
2200 : 91 : _o1[0] = captures[2];
2201 : 91 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
2202 : 91 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2203 : 91 : res_op0 = _r1;
2204 : : }
2205 : 91 : tree res_op1;
2206 : 91 : res_op1 = wide_int_to_tree (t0, c3 << c1);
2207 : 91 : tree _r;
2208 : 91 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2209 : 91 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 367, __FILE__, __LINE__, true);
2210 : 91 : return _r;
2211 : : }
2212 : 0 : next_after_fail566:;
2213 : : }
2214 : : else
2215 : : {
2216 : 2 : if ((c3 & smask) == 0
2217 : : )
2218 : : {
2219 : 2 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail567;
2220 : 2 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail567;
2221 : 2 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail567;
2222 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail567;
2223 : 2 : {
2224 : 2 : tree res_op0;
2225 : 2 : {
2226 : 2 : tree _o1[2], _r1;
2227 : 2 : _o1[0] = captures[2];
2228 : 2 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
2229 : 2 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2230 : 2 : res_op0 = _r1;
2231 : : }
2232 : 2 : tree res_op1;
2233 : 2 : res_op1 = wide_int_to_tree (t0, c3 << c1);
2234 : 2 : tree _r;
2235 : 2 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2236 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 368, __FILE__, __LINE__, true);
2237 : 2 : return _r;
2238 : : }
2239 : 0 : next_after_fail567:;
2240 : : }
2241 : : else
2242 : : {
2243 : 0 : if ((c2 & smask) != (c3 & smask)
2244 : : )
2245 : : {
2246 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail568;
2247 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail568;
2248 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail568;
2249 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail568;
2250 : 0 : {
2251 : 0 : tree _r;
2252 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2253 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2254 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2255 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 369, __FILE__, __LINE__, true);
2256 : 0 : return _r;
2257 : : }
2258 : 0 : next_after_fail568:;
2259 : : }
2260 : : else
2261 : : {
2262 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail569;
2263 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail569;
2264 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail569;
2265 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail569;
2266 : 0 : {
2267 : 0 : tree res_op0;
2268 : 0 : {
2269 : 0 : tree _o1[2], _r1;
2270 : 0 : _o1[0] = captures[2];
2271 : 0 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
2272 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2273 : 0 : res_op0 = _r1;
2274 : : }
2275 : 0 : tree res_op1;
2276 : 0 : res_op1 = wide_int_to_tree (t0, (c3 << c1) | sb);
2277 : 0 : tree _r;
2278 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2279 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 370, __FILE__, __LINE__, true);
2280 : 0 : return _r;
2281 : : }
2282 : 0 : next_after_fail569:;
2283 : : }
2284 : : }
2285 : : }
2286 : 93 : }
2287 : : }
2288 : : }
2289 : 780 : }
2290 : : }
2291 : : return NULL_TREE;
2292 : : }
2293 : :
2294 : : tree
2295 : 696 : generic_simplify_261 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2296 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2297 : : const enum tree_code ARG_UNUSED (cmp))
2298 : : {
2299 : 696 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2300 : 696 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
2301 : 1392 : && wi::bit_and_not (wi::to_wide (captures[2]), wi::to_wide (captures[3])) != 0
2302 : : )
2303 : : {
2304 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail660;
2305 : 0 : {
2306 : 0 : tree _r;
2307 : 0 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2308 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2309 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2310 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
2311 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2312 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
2313 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
2314 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 452, __FILE__, __LINE__, true);
2315 : 0 : return _r;
2316 : : }
2317 : 0 : next_after_fail660:;
2318 : : }
2319 : : return NULL_TREE;
2320 : : }
2321 : :
2322 : : tree
2323 : 62 : generic_simplify_264 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2324 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2325 : : const enum tree_code ARG_UNUSED (cmp))
2326 : : {
2327 : 62 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2328 : 62 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail666;
2329 : 62 : {
2330 : 62 : tree res_op0;
2331 : 62 : res_op0 = captures[1];
2332 : 62 : tree res_op1;
2333 : 62 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
2334 : 62 : tree _r;
2335 : 62 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2336 : 62 : if (TREE_SIDE_EFFECTS (captures[0]))
2337 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2338 : 62 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 458, __FILE__, __LINE__, true);
2339 : : return _r;
2340 : : }
2341 : 0 : next_after_fail666:;
2342 : 0 : return NULL_TREE;
2343 : : }
2344 : :
2345 : : tree
2346 : 449 : generic_simplify_267 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2347 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2348 : : const enum tree_code ARG_UNUSED (cmp))
2349 : : {
2350 : 449 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2351 : 449 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail669;
2352 : 449 : {
2353 : 449 : tree res_op0;
2354 : 449 : {
2355 : 449 : tree _o1[2], _r1;
2356 : 449 : _o1[0] = captures[0];
2357 : 449 : {
2358 : 449 : tree _o2[1], _r2;
2359 : 449 : _o2[0] = captures[1];
2360 : 449 : _r2 = fold_build1_loc (loc, BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
2361 : 449 : if (EXPR_P (_r2))
2362 : 441 : goto next_after_fail669;
2363 : 8 : _o1[1] = _r2;
2364 : : }
2365 : 8 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2366 : 8 : res_op0 = _r1;
2367 : : }
2368 : 8 : tree res_op1;
2369 : 8 : res_op1 = build_zero_cst (TREE_TYPE (captures[0]));
2370 : 8 : tree _r;
2371 : 8 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2372 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 461, __FILE__, __LINE__, true);
2373 : : return _r;
2374 : : }
2375 : : next_after_fail669:;
2376 : : return NULL_TREE;
2377 : : }
2378 : :
2379 : : tree
2380 : 115946 : generic_simplify_271 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2381 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2382 : : const enum tree_code ARG_UNUSED (cmp),
2383 : : const enum tree_code ARG_UNUSED (icmp))
2384 : : {
2385 : 115946 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2386 : 115946 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail673;
2387 : 115924 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail673;
2388 : 115924 : {
2389 : 115924 : tree res_op0;
2390 : 115924 : res_op0 = captures[0];
2391 : 115924 : tree res_op1;
2392 : 115924 : res_op1 = build_zero_cst (TREE_TYPE (captures[1]));
2393 : 115924 : tree _r;
2394 : 115924 : _r = fold_build2_loc (loc, icmp, type, res_op0, res_op1);
2395 : 115924 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 465, __FILE__, __LINE__, true);
2396 : : return _r;
2397 : : }
2398 : : next_after_fail673:;
2399 : : return NULL_TREE;
2400 : : }
2401 : :
2402 : : tree
2403 : 4 : generic_simplify_275 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2404 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2405 : : const enum tree_code ARG_UNUSED (cmp),
2406 : : const enum tree_code ARG_UNUSED (ncmp))
2407 : : {
2408 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2409 : 8 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2410 : 4 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2411 : 8 : && types_match (captures[0], captures[2])
2412 : : )
2413 : : {
2414 : 4 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail677;
2415 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail677;
2416 : 4 : {
2417 : 4 : tree res_op0;
2418 : 4 : {
2419 : 4 : tree _o1[2], _r1;
2420 : 4 : _o1[0] = captures[0];
2421 : 4 : _o1[1] = captures[2];
2422 : 4 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2423 : 4 : res_op0 = _r1;
2424 : : }
2425 : 4 : tree res_op1;
2426 : 4 : res_op1 = captures[1];
2427 : 4 : tree _r;
2428 : 4 : _r = fold_build2_loc (loc, ncmp, type, res_op0, res_op1);
2429 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 468, __FILE__, __LINE__, true);
2430 : 4 : return _r;
2431 : : }
2432 : : next_after_fail677:;
2433 : : }
2434 : : return NULL_TREE;
2435 : : }
2436 : :
2437 : : tree
2438 : 946328 : generic_simplify_280 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2439 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2440 : : const enum tree_code ARG_UNUSED (cmp))
2441 : : {
2442 : 946328 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2443 : 1483909 : if (((POINTER_TYPE_P (TREE_TYPE (captures[0]))
2444 : 410627 : && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[0])))
2445 : 370563 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2446 : 7946 : && !(
2447 : : 1
2448 : 7918 : && TREE_CODE (TREE_TYPE (captures[0])) == REFERENCE_TYPE
2449 : 28 : && (flag_sanitize & (SANITIZE_NULL | SANITIZE_ALIGNMENT))))
2450 : 938422 : || (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2451 : 535572 : && POINTER_TYPE_P (TREE_TYPE (captures[1]))
2452 : 1506 : && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[1])))))
2453 : 955254 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == TYPE_PRECISION (TREE_TYPE (captures[1]))
2454 : : )
2455 : : {
2456 : 8680 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail696;
2457 : 8680 : {
2458 : 8680 : tree res_op0;
2459 : 8680 : res_op0 = captures[0];
2460 : 8680 : tree res_op1;
2461 : 8680 : {
2462 : 8680 : tree _o1[1], _r1;
2463 : 8680 : _o1[0] = captures[1];
2464 : 8680 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
2465 : : {
2466 : 8680 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
2467 : : }
2468 : : else
2469 : : _r1 = _o1[0];
2470 : 8680 : res_op1 = _r1;
2471 : : }
2472 : 8680 : tree _r;
2473 : 8680 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2474 : 8680 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 478, __FILE__, __LINE__, true);
2475 : 8680 : return _r;
2476 : : }
2477 : 0 : next_after_fail696:;
2478 : : }
2479 : : return NULL_TREE;
2480 : : }
2481 : :
2482 : : tree
2483 : 1057713 : generic_simplify_283 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2484 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2485 : : const enum tree_code ARG_UNUSED (op),
2486 : : const enum tree_code ARG_UNUSED (rop),
2487 : : const enum tree_code ARG_UNUSED (cmp))
2488 : : {
2489 : 1057713 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2490 : 2115426 : if (!TREE_OVERFLOW (captures[2]) && !TREE_OVERFLOW (captures[3])
2491 : 1057713 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
2492 : 1057401 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[1]))
2493 : 2114978 : && !TYPE_SATURATING (TREE_TYPE (captures[1]))
2494 : : )
2495 : : {
2496 : 1057265 : {
2497 : 1057265 : tree res = int_const_binop (rop, captures[3], captures[2]);
2498 : 1057265 : if (TREE_OVERFLOW (res)
2499 : 1057265 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
2500 : : )
2501 : : {
2502 : 8125 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail703;
2503 : 8125 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail703;
2504 : 8125 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail703;
2505 : 8125 : {
2506 : 8125 : tree _r;
2507 : 8125 : _r = constant_boolean_node (cmp == NE_EXPR, type);
2508 : 8125 : if (TREE_SIDE_EFFECTS (captures[1]))
2509 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2510 : 8125 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 485, __FILE__, __LINE__, true);
2511 : 8125 : return _r;
2512 : : }
2513 : : next_after_fail703:;
2514 : : }
2515 : : else
2516 : : {
2517 : 1049140 : if (single_use (captures[0])
2518 : : )
2519 : : {
2520 : 1049140 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail704;
2521 : 1049140 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail704;
2522 : 1049140 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail704;
2523 : 1049140 : {
2524 : 1049140 : tree res_op0;
2525 : 1049140 : res_op0 = captures[1];
2526 : 1049140 : tree res_op1;
2527 : 1049140 : res_op1 = TREE_OVERFLOW (res)
2528 : 1049140 : ? drop_tree_overflow (res) : res;
2529 : 1049140 : tree _r;
2530 : 1049140 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2531 : 1049140 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 486, __FILE__, __LINE__, true);
2532 : 1049140 : return _r;
2533 : : }
2534 : : next_after_fail704:;
2535 : : }
2536 : : }
2537 : : }
2538 : : }
2539 : : return NULL_TREE;
2540 : : }
2541 : :
2542 : : tree
2543 : 374 : generic_simplify_287 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2544 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2545 : : const enum tree_code ARG_UNUSED (op),
2546 : : const combined_fn ARG_UNUSED (ctz))
2547 : : {
2548 : 374 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2549 : 374 : {
2550 : 374 : tree type0 = TREE_TYPE (captures[1]);
2551 : 374 : int prec = TYPE_PRECISION (type0);
2552 : 374 : bool ok = true;
2553 : 374 : if (sanitize_flags_p (SANITIZE_BUILTIN)
2554 : 374 : && (!cfun
2555 : 64 : || (cfun->curr_properties & PROP_ssa) == 0))
2556 : : ok = false;
2557 : 620 : if (ok && prec <= MAX_FIXED_MODE_SIZE
2558 : : )
2559 : : {
2560 : 310 : if (tree_int_cst_sgn (captures[2]) < 0 || wi::to_widest (captures[2]) >= prec
2561 : : )
2562 : : {
2563 : 36 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail718;
2564 : 36 : {
2565 : 36 : tree _r;
2566 : 36 : _r = constant_boolean_node (op == EQ_EXPR ? false : true, type);
2567 : 36 : if (TREE_SIDE_EFFECTS (captures[1]))
2568 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2569 : 36 : if (TREE_SIDE_EFFECTS (captures[2]))
2570 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
2571 : 36 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 500, __FILE__, __LINE__, true);
2572 : 310 : return _r;
2573 : : }
2574 : 0 : next_after_fail718:;
2575 : : }
2576 : : else
2577 : : {
2578 : 274 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail719;
2579 : 274 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail719;
2580 : 274 : {
2581 : 274 : tree res_op0;
2582 : 274 : {
2583 : 274 : tree _o1[2], _r1;
2584 : 274 : _o1[0] = captures[1];
2585 : 274 : _o1[1] = wide_int_to_tree (type0,
2586 : 274 : wi::mask (tree_to_uhwi (captures[2]) + 1,
2587 : : false, prec));
2588 : 274 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2589 : 274 : res_op0 = _r1;
2590 : : }
2591 : 274 : tree res_op1;
2592 : 274 : res_op1 = wide_int_to_tree (type0,
2593 : 274 : wi::shifted_mask (tree_to_uhwi (captures[2]), 1,
2594 : : false, prec));
2595 : 274 : tree _r;
2596 : 274 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
2597 : 274 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 501, __FILE__, __LINE__, true);
2598 : 274 : return _r;
2599 : : }
2600 : 64 : next_after_fail719:;
2601 : : }
2602 : : }
2603 : : }
2604 : 64 : return NULL_TREE;
2605 : : }
2606 : :
2607 : : tree
2608 : 50729 : generic_simplify_294 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2609 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2610 : : const enum tree_code ARG_UNUSED (cmp))
2611 : : {
2612 : 50729 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2613 : 50729 : if (cmp != NE_EXPR
2614 : 45126 : || ! FLOAT_TYPE_P (TREE_TYPE (captures[0]))
2615 : 60716 : || ! tree_expr_maybe_nan_p (captures[0])
2616 : : )
2617 : : {
2618 : 46556 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail730;
2619 : 46556 : {
2620 : 46556 : tree _r;
2621 : 46556 : _r = constant_boolean_node (false, type);
2622 : 46556 : if (TREE_SIDE_EFFECTS (captures[0]))
2623 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2624 : 46556 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 512, __FILE__, __LINE__, true);
2625 : 46556 : return _r;
2626 : : }
2627 : 0 : next_after_fail730:;
2628 : : }
2629 : : return NULL_TREE;
2630 : : }
2631 : :
2632 : : tree
2633 : 0 : generic_simplify_299 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2634 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2635 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
2636 : : {
2637 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2638 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail735;
2639 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail735;
2640 : 0 : {
2641 : 0 : tree _r;
2642 : 0 : _r = captures[1];
2643 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 517, __FILE__, __LINE__, true);
2644 : : return _r;
2645 : : }
2646 : : next_after_fail735:;
2647 : : return NULL_TREE;
2648 : : }
2649 : :
2650 : : tree
2651 : 13878 : generic_simplify_305 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2652 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2653 : : const enum tree_code ARG_UNUSED (div))
2654 : : {
2655 : 13878 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2656 : 13878 : if (INTEGRAL_TYPE_P (type)
2657 : 13856 : && ssa_name_has_boolean_range (captures[1])
2658 : 13878 : && !flag_non_call_exceptions
2659 : : )
2660 : : {
2661 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail743;
2662 : 0 : {
2663 : 0 : tree _r;
2664 : 0 : _r = captures[0];
2665 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2666 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2667 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 523, __FILE__, __LINE__, true);
2668 : 0 : return _r;
2669 : : }
2670 : 0 : next_after_fail743:;
2671 : : }
2672 : : return NULL_TREE;
2673 : : }
2674 : :
2675 : : tree
2676 : 41761 : generic_simplify_310 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2677 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2678 : : const enum tree_code ARG_UNUSED (div))
2679 : : {
2680 : 41761 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2681 : 41761 : if (integer_pow2p (captures[2])
2682 : 39414 : && tree_int_cst_sgn (captures[2]) > 0
2683 : 39414 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
2684 : 83522 : && wi::to_wide (captures[2]) + wi::to_wide (captures[1]) == 0
2685 : : )
2686 : : {
2687 : 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail749;
2688 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail749;
2689 : 1 : {
2690 : 1 : tree res_op0;
2691 : 1 : {
2692 : 1 : tree _o1[1], _r1;
2693 : 1 : _o1[0] = captures[0];
2694 : 1 : if (TREE_TYPE (_o1[0]) != type)
2695 : : {
2696 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
2697 : : }
2698 : : else
2699 : : _r1 = _o1[0];
2700 : 1 : res_op0 = _r1;
2701 : : }
2702 : 1 : tree res_op1;
2703 : 1 : res_op1 = build_int_cst (integer_type_node,
2704 : 1 : wi::exact_log2 (wi::to_wide (captures[2])));
2705 : 1 : tree _r;
2706 : 1 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
2707 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
2708 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2709 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 529, __FILE__, __LINE__, true);
2710 : 1 : return _r;
2711 : : }
2712 : : next_after_fail749:;
2713 : : }
2714 : : return NULL_TREE;
2715 : : }
2716 : :
2717 : : tree
2718 : 52 : generic_simplify_319 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2719 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2720 : : const enum tree_code ARG_UNUSED (mod))
2721 : : {
2722 : 52 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2723 : 52 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail758;
2724 : 52 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail758;
2725 : 52 : {
2726 : 52 : tree _r;
2727 : 52 : _r = captures[0];
2728 : 52 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 538, __FILE__, __LINE__, true);
2729 : : return _r;
2730 : : }
2731 : : next_after_fail758:;
2732 : : return NULL_TREE;
2733 : : }
2734 : :
2735 : : tree
2736 : 6 : generic_simplify_325 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2737 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2738 : : const combined_fn ARG_UNUSED (SIN),
2739 : : const combined_fn ARG_UNUSED (COS),
2740 : : const combined_fn ARG_UNUSED (TAN))
2741 : : {
2742 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2743 : 6 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
2744 : : )
2745 : : {
2746 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail766;
2747 : 6 : {
2748 : 6 : tree res_op0;
2749 : 6 : res_op0 = captures[1];
2750 : 6 : tree _r;
2751 : 6 : _r = maybe_build_call_expr_loc (loc, TAN, type, 1, res_op0);
2752 : 6 : if (!_r)
2753 : 0 : goto next_after_fail766;
2754 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 546, __FILE__, __LINE__, true);
2755 : 6 : return _r;
2756 : : }
2757 : : next_after_fail766:;
2758 : : }
2759 : : return NULL_TREE;
2760 : : }
2761 : :
2762 : : tree
2763 : 24 : generic_simplify_332 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2764 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2765 : : const combined_fn ARG_UNUSED (POW))
2766 : : {
2767 : 24 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2768 : 24 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
2769 : : )
2770 : : {
2771 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail773;
2772 : 6 : {
2773 : 6 : tree res_op0;
2774 : 6 : res_op0 = captures[0];
2775 : 6 : tree res_op1;
2776 : 6 : {
2777 : 6 : tree _o1[2], _r1;
2778 : 6 : _o1[0] = captures[2];
2779 : 6 : {
2780 : 6 : tree _o2[1], _r2;
2781 : 6 : _o2[0] = captures[3];
2782 : 6 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
2783 : 6 : _o1[1] = _r2;
2784 : : }
2785 : 6 : _r1 = maybe_build_call_expr_loc (loc, POW, TREE_TYPE (_o1[0]), 2, _o1[0], _o1[1]);
2786 : 6 : if (!_r1)
2787 : 0 : goto next_after_fail773;
2788 : 6 : res_op1 = _r1;
2789 : : }
2790 : 6 : tree _r;
2791 : 6 : _r = fold_build2_loc (loc, MULT_EXPR, type, res_op0, res_op1);
2792 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 553, __FILE__, __LINE__, true);
2793 : 6 : return _r;
2794 : : }
2795 : : next_after_fail773:;
2796 : : }
2797 : : return NULL_TREE;
2798 : : }
2799 : :
2800 : : tree
2801 : 3936 : generic_simplify_341 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2802 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2803 : : const enum tree_code ARG_UNUSED (cmp),
2804 : : const enum tree_code ARG_UNUSED (bitop))
2805 : : {
2806 : 3936 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2807 : 3936 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2808 : : )
2809 : : {
2810 : 3936 : if (bitop == BIT_AND_EXPR || tree_expr_nonnegative_p (captures[1])
2811 : : )
2812 : : {
2813 : 3936 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail784;
2814 : 3936 : {
2815 : 3936 : tree _r;
2816 : 3936 : _r = constant_boolean_node (cmp == GE_EXPR || cmp == LE_EXPR, type);
2817 : 3936 : if (TREE_SIDE_EFFECTS (captures[0]))
2818 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2819 : 3936 : if (TREE_SIDE_EFFECTS (captures[1]))
2820 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2821 : 3936 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 564, __FILE__, __LINE__, true);
2822 : 3936 : return _r;
2823 : : }
2824 : 0 : next_after_fail784:;
2825 : : }
2826 : : else
2827 : : {
2828 : 0 : if (TREE_CODE (captures[1]) == INTEGER_CST && wi::neg_p (wi::to_wide (captures[1]))
2829 : : )
2830 : : {
2831 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail785;
2832 : 0 : {
2833 : 0 : tree _r;
2834 : 0 : _r = constant_boolean_node (cmp == LT_EXPR, type);
2835 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
2836 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
2837 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
2838 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
2839 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 565, __FILE__, __LINE__, true);
2840 : 0 : return _r;
2841 : : }
2842 : 0 : next_after_fail785:;
2843 : : }
2844 : : }
2845 : : }
2846 : : return NULL_TREE;
2847 : : }
2848 : :
2849 : : tree
2850 : 2 : generic_simplify_352 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2851 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2852 : : const enum tree_code ARG_UNUSED (cmp))
2853 : : {
2854 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2855 : 4 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2856 : 4 : && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2857 : : )
2858 : : {
2859 : 2 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail828;
2860 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail828;
2861 : 2 : {
2862 : 2 : tree res_op0;
2863 : 2 : res_op0 = captures[1];
2864 : 2 : tree res_op1;
2865 : 2 : res_op1 = captures[0];
2866 : 2 : tree _r;
2867 : 2 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2868 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 591, __FILE__, __LINE__, true);
2869 : 2 : return _r;
2870 : : }
2871 : : next_after_fail828:;
2872 : : }
2873 : : return NULL_TREE;
2874 : : }
2875 : :
2876 : : tree
2877 : 1128 : generic_simplify_356 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2878 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2879 : : const enum tree_code ARG_UNUSED (cmp),
2880 : : const enum tree_code ARG_UNUSED (neg_cmp))
2881 : : {
2882 : 1128 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2883 : 1128 : if (flag_unsafe_math_optimizations
2884 : : )
2885 : : {
2886 : 9 : {
2887 : 9 : tree tem = const_binop (RDIV_EXPR, type, captures[2], captures[1]);
2888 : 9 : if (tem
2889 : 27 : && !(REAL_VALUE_ISINF (TREE_REAL_CST (tem))
2890 : 15 : || (real_zerop (tem) && !real_zerop (captures[1])))
2891 : : )
2892 : : {
2893 : 3 : if (real_less (&dconst0, TREE_REAL_CST_PTR (captures[1]))
2894 : : )
2895 : : {
2896 : 2 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail832;
2897 : 2 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail832;
2898 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail832;
2899 : 2 : {
2900 : 2 : tree res_op0;
2901 : 2 : res_op0 = captures[0];
2902 : 2 : tree res_op1;
2903 : 2 : res_op1 = tem;
2904 : 2 : tree _r;
2905 : 2 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2906 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 595, __FILE__, __LINE__, true);
2907 : 2 : return _r;
2908 : : }
2909 : : next_after_fail832:;
2910 : : }
2911 : : else
2912 : : {
2913 : 1 : if (real_less (TREE_REAL_CST_PTR (captures[1]), &dconst0)
2914 : : )
2915 : : {
2916 : 1 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail833;
2917 : 1 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail833;
2918 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail833;
2919 : 1 : {
2920 : 1 : tree res_op0;
2921 : 1 : res_op0 = captures[0];
2922 : 1 : tree res_op1;
2923 : 1 : res_op1 = tem;
2924 : 1 : tree _r;
2925 : 1 : _r = fold_build2_loc (loc, neg_cmp, type, res_op0, res_op1);
2926 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 596, __FILE__, __LINE__, true);
2927 : 1 : return _r;
2928 : : }
2929 : : next_after_fail833:;
2930 : : }
2931 : : }
2932 : : }
2933 : : }
2934 : : }
2935 : : return NULL_TREE;
2936 : : }
2937 : :
2938 : : tree
2939 : 0 : generic_simplify_363 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2940 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2941 : : const enum tree_code ARG_UNUSED (cmp))
2942 : : {
2943 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2944 : 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2945 : 0 : && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2946 : : )
2947 : : {
2948 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail846;
2949 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail846;
2950 : 0 : {
2951 : 0 : tree res_op0;
2952 : 0 : res_op0 = captures[1];
2953 : 0 : tree res_op1;
2954 : 0 : res_op1 = captures[0];
2955 : 0 : tree _r;
2956 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2957 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 591, __FILE__, __LINE__, true);
2958 : 0 : return _r;
2959 : : }
2960 : : next_after_fail846:;
2961 : : }
2962 : : return NULL_TREE;
2963 : : }
2964 : :
2965 : : tree
2966 : 0 : generic_simplify_367 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
2967 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
2968 : : const combined_fn ARG_UNUSED (logs),
2969 : : const combined_fn ARG_UNUSED (exps),
2970 : : const enum tree_code ARG_UNUSED (cmp))
2971 : : {
2972 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2973 : 0 : if (flag_unsafe_math_optimizations
2974 : : )
2975 : : {
2976 : 0 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
2977 : 0 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
2978 : 0 : && ! flag_trapping_math
2979 : 0 : && ! flag_errno_math
2980 : : )
2981 : : {
2982 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail850;
2983 : 0 : {
2984 : 0 : tree res_op0;
2985 : 0 : res_op0 = captures[1];
2986 : 0 : tree res_op1;
2987 : 0 : {
2988 : 0 : tree _o1[1], _r1;
2989 : 0 : _o1[0] = captures[2];
2990 : 0 : _r1 = maybe_build_call_expr_loc (loc, exps, TREE_TYPE (_o1[0]), 1, _o1[0]);
2991 : 0 : if (!_r1)
2992 : 0 : goto next_after_fail850;
2993 : 0 : if (EXPR_P (_r1))
2994 : 0 : goto next_after_fail850;
2995 : 0 : res_op1 = _r1;
2996 : : }
2997 : 0 : tree _r;
2998 : 0 : _r = fold_build2_loc (loc, cmp, type, res_op0, res_op1);
2999 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 609, __FILE__, __LINE__, true);
3000 : 0 : return _r;
3001 : : }
3002 : : next_after_fail850:;
3003 : : }
3004 : : }
3005 : : return NULL_TREE;
3006 : : }
3007 : :
3008 : : tree
3009 : 11 : generic_simplify_373 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3010 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3011 : : {
3012 : 11 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3013 : 11 : if (wi::ltu_p (wi::to_wide (captures[1]), element_precision (type))
3014 : : )
3015 : : {
3016 : 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail860;
3017 : 11 : {
3018 : 11 : tree res_op0;
3019 : 11 : {
3020 : 11 : tree _o1[1], _r1;
3021 : 11 : _o1[0] = captures[0];
3022 : 11 : if (TREE_TYPE (_o1[0]) != type)
3023 : : {
3024 : 8 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
3025 : : }
3026 : : else
3027 : : _r1 = _o1[0];
3028 : 11 : res_op0 = _r1;
3029 : : }
3030 : 11 : tree res_op1;
3031 : 11 : {
3032 : 11 : tree _o1[2], _r1;
3033 : 11 : _o1[0] = build_minus_one_cst (type);
3034 : 11 : _o1[1] = captures[1];
3035 : 11 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3036 : 11 : res_op1 = _r1;
3037 : : }
3038 : 11 : tree _r;
3039 : 11 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
3040 : 11 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 619, __FILE__, __LINE__, true);
3041 : 11 : return _r;
3042 : : }
3043 : 0 : next_after_fail860:;
3044 : : }
3045 : : return NULL_TREE;
3046 : : }
3047 : :
3048 : : tree
3049 : 67 : generic_simplify_381 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3050 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3051 : : {
3052 : 67 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3053 : 67 : if (wi::ltu_p (wi::to_wide (captures[1]), element_precision (type))
3054 : : )
3055 : : {
3056 : 67 : if (TYPE_UNSIGNED (type)
3057 : : )
3058 : : {
3059 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail871;
3060 : 2 : {
3061 : 2 : tree res_op0;
3062 : 2 : {
3063 : 2 : tree _o1[1], _r1;
3064 : 2 : _o1[0] = captures[0];
3065 : 2 : if (TREE_TYPE (_o1[0]) != type)
3066 : : {
3067 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3068 : : }
3069 : : else
3070 : : _r1 = _o1[0];
3071 : 2 : res_op0 = _r1;
3072 : : }
3073 : 2 : tree res_op1;
3074 : 2 : {
3075 : 2 : tree _o1[2], _r1;
3076 : 2 : _o1[0] = build_minus_one_cst (type);
3077 : 2 : _o1[1] = captures[1];
3078 : 2 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3079 : 2 : res_op1 = _r1;
3080 : : }
3081 : 2 : tree _r;
3082 : 2 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
3083 : 2 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 628, __FILE__, __LINE__, true);
3084 : 2 : return _r;
3085 : : }
3086 : 0 : next_after_fail871:;
3087 : : }
3088 : : else
3089 : : {
3090 : 65 : if (INTEGRAL_TYPE_P (type)
3091 : : )
3092 : : {
3093 : 65 : {
3094 : 65 : int width = element_precision (type) - tree_to_uhwi (captures[1]);
3095 : 65 : tree stype = NULL_TREE;
3096 : 130 : if (width <= MAX_FIXED_MODE_SIZE)
3097 : 65 : stype = build_nonstandard_integer_type (width, 0);
3098 : 65 : if (stype && (width == 1 || type_has_mode_precision_p (stype))
3099 : : )
3100 : : {
3101 : 25 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail872;
3102 : 25 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail872;
3103 : 25 : {
3104 : 25 : tree res_op0;
3105 : 25 : {
3106 : 25 : tree _o1[1], _r1;
3107 : 25 : _o1[0] = captures[0];
3108 : 25 : if (TREE_TYPE (_o1[0]) != stype)
3109 : : {
3110 : 25 : _r1 = fold_build1_loc (loc, NOP_EXPR, stype, _o1[0]);
3111 : : }
3112 : : else
3113 : : _r1 = _o1[0];
3114 : 25 : res_op0 = _r1;
3115 : : }
3116 : 25 : tree _r;
3117 : 25 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3118 : 25 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 629, __FILE__, __LINE__, true);
3119 : 25 : return _r;
3120 : : }
3121 : : next_after_fail872:;
3122 : : }
3123 : : }
3124 : : }
3125 : : }
3126 : : }
3127 : : return NULL_TREE;
3128 : : }
3129 : :
3130 : : tree
3131 : 8334830 : generic_simplify_387 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3132 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
3133 : : const enum tree_code ARG_UNUSED (op))
3134 : : {
3135 : 8334830 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3136 : 8334830 : if (INTEGRAL_TYPE_P (type)
3137 : 7473712 : && op != MULT_EXPR
3138 : 7473712 : && op != RDIV_EXPR
3139 : 3914949 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
3140 : 3545858 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3141 : 3545858 : && type_has_mode_precision_p (TREE_TYPE (captures[2]))
3142 : 3484043 : && type_has_mode_precision_p (TREE_TYPE (captures[4]))
3143 : 3484035 : && type_has_mode_precision_p (type)
3144 : 3476638 : && TYPE_PRECISION (TREE_TYPE (captures[1])) > TYPE_PRECISION (TREE_TYPE (captures[2]))
3145 : 1102338 : && types_match (captures[2], type)
3146 : 8350908 : && (types_match (captures[2], captures[4])
3147 : 16078 : || poly_int_tree_p (captures[3]))
3148 : : )
3149 : : {
3150 : 10926 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
3151 : : )
3152 : : {
3153 : 5962 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail885;
3154 : 5962 : {
3155 : 5962 : tree res_op0;
3156 : 5962 : res_op0 = captures[2];
3157 : 5962 : tree res_op1;
3158 : 5962 : {
3159 : 5962 : tree _o1[1], _r1;
3160 : 5962 : _o1[0] = captures[4];
3161 : 5962 : if (TREE_TYPE (_o1[0]) != type)
3162 : : {
3163 : 5962 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
3164 : : }
3165 : : else
3166 : : _r1 = _o1[0];
3167 : 5962 : res_op1 = _r1;
3168 : : }
3169 : 5962 : tree _r;
3170 : 5962 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
3171 : 5962 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 638, __FILE__, __LINE__, true);
3172 : 5962 : return _r;
3173 : : }
3174 : 0 : next_after_fail885:;
3175 : : }
3176 : : else
3177 : : {
3178 : 4964 : {
3179 : 4964 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
3180 : 4964 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail886;
3181 : 4964 : {
3182 : 4964 : tree res_op0;
3183 : 4964 : {
3184 : 4964 : tree _o1[2], _r1;
3185 : 4964 : {
3186 : 4964 : tree _o2[1], _r2;
3187 : 4964 : _o2[0] = captures[2];
3188 : 4964 : if (TREE_TYPE (_o2[0]) != utype)
3189 : : {
3190 : 4964 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
3191 : : }
3192 : : else
3193 : : _r2 = _o2[0];
3194 : 4964 : _o1[0] = _r2;
3195 : : }
3196 : 4964 : {
3197 : 4964 : tree _o2[1], _r2;
3198 : 4964 : _o2[0] = captures[4];
3199 : 4964 : if (TREE_TYPE (_o2[0]) != utype)
3200 : : {
3201 : 4964 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
3202 : : }
3203 : : else
3204 : : _r2 = _o2[0];
3205 : 4964 : _o1[1] = _r2;
3206 : : }
3207 : 4964 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3208 : 4964 : res_op0 = _r1;
3209 : : }
3210 : 4964 : tree _r;
3211 : 4964 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3212 : 4964 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 639, __FILE__, __LINE__, true);
3213 : 4964 : return _r;
3214 : : }
3215 : 0 : next_after_fail886:;
3216 : : }
3217 : : }
3218 : : }
3219 : : else
3220 : : {
3221 : 8284445 : if (FLOAT_TYPE_P (type)
3222 : 8363363 : && DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
3223 : 39459 : == DECIMAL_FLOAT_TYPE_P (type)
3224 : : )
3225 : : {
3226 : 39433 : {
3227 : 39433 : tree arg0 = strip_float_extensions (captures[2]);
3228 : 39433 : tree arg1 = strip_float_extensions (captures[4]);
3229 : 39433 : tree itype = TREE_TYPE (captures[0]);
3230 : 39433 : tree ty1 = TREE_TYPE (arg0);
3231 : 39433 : tree ty2 = TREE_TYPE (arg1);
3232 : 39433 : enum tree_code code = TREE_CODE (itype);
3233 : 0 : if (FLOAT_TYPE_P (ty1)
3234 : 39433 : && FLOAT_TYPE_P (ty2)
3235 : : )
3236 : : {
3237 : 39433 : {
3238 : 39433 : tree newtype = type;
3239 : 39433 : if (TYPE_MODE (ty1) == SDmode
3240 : 39171 : || TYPE_MODE (ty2) == SDmode
3241 : 78604 : || TYPE_MODE (type) == SDmode)
3242 : 262 : newtype = dfloat32_type_node;
3243 : 39433 : if (TYPE_MODE (ty1) == DDmode
3244 : 39301 : || TYPE_MODE (ty2) == DDmode
3245 : 78607 : || TYPE_MODE (type) == DDmode)
3246 : 259 : newtype = dfloat64_type_node;
3247 : 39433 : if (TYPE_MODE (ty1) == TDmode
3248 : 39433 : || TYPE_MODE (ty2) == TDmode
3249 : 78614 : || TYPE_MODE (type) == TDmode)
3250 : 267 : newtype = dfloat128_type_node;
3251 : 39433 : if ((newtype == dfloat32_type_node
3252 : 39433 : || newtype == dfloat64_type_node
3253 : 39306 : || newtype == dfloat128_type_node)
3254 : 394 : && newtype == type
3255 : 39439 : && types_match (newtype, type)
3256 : : )
3257 : : {
3258 : 6 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail887;
3259 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail887;
3260 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail887;
3261 : 0 : {
3262 : 0 : tree res_op0;
3263 : 0 : {
3264 : 0 : tree _o1[1], _r1;
3265 : 0 : _o1[0] = captures[2];
3266 : 0 : if (TREE_TYPE (_o1[0]) != newtype)
3267 : : {
3268 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
3269 : : }
3270 : : else
3271 : : _r1 = _o1[0];
3272 : 0 : res_op0 = _r1;
3273 : : }
3274 : 0 : tree res_op1;
3275 : 0 : {
3276 : 0 : tree _o1[1], _r1;
3277 : 0 : _o1[0] = captures[4];
3278 : 0 : if (TREE_TYPE (_o1[0]) != newtype)
3279 : : {
3280 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, newtype, _o1[0]);
3281 : : }
3282 : : else
3283 : : _r1 = _o1[0];
3284 : 0 : res_op1 = _r1;
3285 : : }
3286 : 0 : tree _r;
3287 : 0 : _r = fold_build2_loc (loc, op, type, res_op0, res_op1);
3288 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 640, __FILE__, __LINE__, true);
3289 : 0 : return _r;
3290 : : }
3291 : : next_after_fail887:;
3292 : : }
3293 : : else
3294 : : {
3295 : 39427 : {
3296 : 39427 : if (element_precision (ty1) > element_precision (newtype))
3297 : 14 : newtype = ty1;
3298 : 39427 : if (element_precision (ty2) > element_precision (newtype))
3299 : 5546 : newtype = ty2;
3300 : 39427 : if (element_precision (newtype) < element_precision (itype)
3301 : 21449 : && (!VECTOR_MODE_P (TYPE_MODE (newtype))
3302 : 0 : || target_supports_op_p (newtype, op, optab_default))
3303 : 21449 : && (flag_unsafe_math_optimizations
3304 : 21428 : || (element_precision (newtype) == element_precision (type)
3305 : 21404 : && real_can_shorten_arithmetic (element_mode (itype),
3306 : : element_mode (type))
3307 : 9641 : && !excess_precision_type (newtype)))
3308 : 42686 : && !types_match (itype, newtype)
3309 : : )
3310 : : {
3311 : 3259 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail888;
3312 : 3258 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail888;
3313 : 3250 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail888;
3314 : 3250 : {
3315 : 3250 : tree res_op0;
3316 : 3250 : {
3317 : 3250 : tree _o1[2], _r1;
3318 : 3250 : {
3319 : 3250 : tree _o2[1], _r2;
3320 : 3250 : _o2[0] = captures[2];
3321 : 3250 : if (TREE_TYPE (_o2[0]) != newtype)
3322 : : {
3323 : 3 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
3324 : : }
3325 : : else
3326 : : _r2 = _o2[0];
3327 : 3250 : _o1[0] = _r2;
3328 : : }
3329 : 3250 : {
3330 : 3250 : tree _o2[1], _r2;
3331 : 3250 : _o2[0] = captures[4];
3332 : 3250 : if (TREE_TYPE (_o2[0]) != newtype)
3333 : : {
3334 : 3250 : _r2 = fold_build1_loc (loc, NOP_EXPR, newtype, _o2[0]);
3335 : : }
3336 : : else
3337 : : _r2 = _o2[0];
3338 : 3250 : _o1[1] = _r2;
3339 : : }
3340 : 3250 : _r1 = fold_build2_loc (loc, op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3341 : 3250 : res_op0 = _r1;
3342 : : }
3343 : 3250 : tree _r;
3344 : 3250 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3345 : 3250 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 641, __FILE__, __LINE__, true);
3346 : 3250 : return _r;
3347 : : }
3348 : : next_after_fail888:;
3349 : : }
3350 : : }
3351 : : }
3352 : : }
3353 : : }
3354 : : }
3355 : : }
3356 : : }
3357 : : return NULL_TREE;
3358 : : }
3359 : :
3360 : : tree
3361 : 15 : generic_simplify_414 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3362 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3363 : : const enum tree_code ARG_UNUSED (bitop))
3364 : : {
3365 : 15 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3366 : 15 : {
3367 : 15 : tree pmop[2];
3368 : 15 : tree utype = fold_bit_and_mask (TREE_TYPE (captures[1]), captures[4], NEGATE_EXPR, captures[1],
3369 : : bitop, captures[2], captures[3], NULL_TREE, ERROR_MARK,
3370 : : NULL_TREE, NULL_TREE, pmop);
3371 : 15 : if (utype
3372 : : )
3373 : : {
3374 : 7 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail921;
3375 : 7 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail921;
3376 : 7 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail921;
3377 : 7 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail921;
3378 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail921;
3379 : 7 : {
3380 : 7 : tree res_op0;
3381 : 7 : {
3382 : 7 : tree _o1[2], _r1;
3383 : 7 : {
3384 : 7 : tree _o2[1], _r2;
3385 : 7 : {
3386 : 7 : tree _o3[1], _r3;
3387 : 7 : _o3[0] = pmop[0];
3388 : 7 : if (TREE_TYPE (_o3[0]) != utype)
3389 : : {
3390 : 4 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
3391 : : }
3392 : : else
3393 : : _r3 = _o3[0];
3394 : 7 : _o2[0] = _r3;
3395 : : }
3396 : 7 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
3397 : 7 : _o1[0] = _r2;
3398 : : }
3399 : 7 : {
3400 : 7 : tree _o2[1], _r2;
3401 : 7 : _o2[0] = captures[4];
3402 : 7 : if (TREE_TYPE (_o2[0]) != utype)
3403 : : {
3404 : 4 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
3405 : : }
3406 : : else
3407 : : _r2 = _o2[0];
3408 : 7 : _o1[1] = _r2;
3409 : : }
3410 : 7 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3411 : 7 : res_op0 = _r1;
3412 : : }
3413 : 7 : tree _r;
3414 : 7 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
3415 : 7 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 665, __FILE__, __LINE__, true);
3416 : 7 : return _r;
3417 : : }
3418 : 8 : next_after_fail921:;
3419 : : }
3420 : : }
3421 : 8 : return NULL_TREE;
3422 : : }
3423 : :
3424 : : tree
3425 : 8 : generic_simplify_429 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3426 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3427 : : const enum tree_code ARG_UNUSED (eqne))
3428 : : {
3429 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3430 : 8 : if (eqne == EQ_EXPR
3431 : : )
3432 : : {
3433 : 4 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail942;
3434 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail942;
3435 : 4 : {
3436 : 4 : tree _r;
3437 : 4 : _r = constant_boolean_node (false, type);
3438 : 4 : if (TREE_SIDE_EFFECTS (captures[2]))
3439 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
3440 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 682, __FILE__, __LINE__, true);
3441 : 4 : return _r;
3442 : : }
3443 : : next_after_fail942:;
3444 : : }
3445 : : else
3446 : : {
3447 : 4 : if (eqne == NE_EXPR
3448 : : )
3449 : : {
3450 : 4 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail943;
3451 : 4 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail943;
3452 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail943;
3453 : 4 : {
3454 : 4 : tree _r;
3455 : 4 : _r = captures[0];
3456 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 683, __FILE__, __LINE__, true);
3457 : 4 : return _r;
3458 : : }
3459 : : next_after_fail943:;
3460 : : }
3461 : : }
3462 : : return NULL_TREE;
3463 : : }
3464 : :
3465 : : tree
3466 : 0 : generic_simplify_434 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3467 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3468 : : {
3469 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3470 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail967;
3471 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail967;
3472 : 0 : {
3473 : 0 : tree _r;
3474 : 0 : _r = captures[2];
3475 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3476 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3477 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 698, __FILE__, __LINE__, true);
3478 : : return _r;
3479 : : }
3480 : : next_after_fail967:;
3481 : : return NULL_TREE;
3482 : : }
3483 : :
3484 : : tree
3485 : 0 : generic_simplify_436 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3486 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3487 : : {
3488 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3489 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail970;
3490 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail970;
3491 : 0 : {
3492 : 0 : tree _r;
3493 : 0 : _r = captures[2];
3494 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
3495 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3496 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 699, __FILE__, __LINE__, true);
3497 : : return _r;
3498 : : }
3499 : : next_after_fail970:;
3500 : : return NULL_TREE;
3501 : : }
3502 : :
3503 : : tree
3504 : 213 : generic_simplify_438 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3505 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3506 : : const enum tree_code ARG_UNUSED (code2),
3507 : : const enum tree_code ARG_UNUSED (code1))
3508 : : {
3509 : 213 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3510 : 213 : if ((TREE_CODE (captures[2]) == INTEGER_CST
3511 : 6 : && TREE_CODE (captures[5]) == INTEGER_CST)
3512 : 213 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
3513 : 0 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2]))
3514 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, code2))
3515 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
3516 : 207 : && bitwise_equal_p (captures[2], captures[5]))
3517 : : )
3518 : : {
3519 : 6 : {
3520 : 6 : bool one_before = false;
3521 : 6 : bool one_after = false;
3522 : 6 : int cmp = 0;
3523 : 6 : bool allbits = true;
3524 : 6 : if (TREE_CODE (captures[2]) == INTEGER_CST
3525 : 6 : && TREE_CODE (captures[5]) == INTEGER_CST)
3526 : : {
3527 : 6 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
3528 : 6 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
3529 : 6 : auto t2 = wi::to_wide (captures[5]);
3530 : 6 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
3531 : 6 : if (cmp < 0
3532 : 6 : && t1 == t2 - 1)
3533 : : one_before = true;
3534 : 6 : if (cmp > 0
3535 : 6 : && t1 == t2 + 1)
3536 : : one_after = true;
3537 : : }
3538 : 6 : bool val;
3539 : 6 : switch (code2)
3540 : : {
3541 : 0 : case EQ_EXPR: val = (cmp == 0); break;
3542 : 2 : case NE_EXPR: val = (cmp != 0); break;
3543 : 0 : case LT_EXPR: val = (cmp < 0); break;
3544 : 4 : case GT_EXPR: val = (cmp > 0); break;
3545 : 0 : case LE_EXPR: val = (cmp <= 0); break;
3546 : 0 : case GE_EXPR: val = (cmp >= 0); break;
3547 : 0 : default: gcc_unreachable ();
3548 : : }
3549 : 6 : if (code1 == EQ_EXPR && val
3550 : : )
3551 : : {
3552 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail978;
3553 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail978;
3554 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail978;
3555 : 0 : {
3556 : 0 : tree _r;
3557 : 0 : _r = captures[0];
3558 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
3559 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
3560 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 684, __FILE__, __LINE__, true);
3561 : 0 : return _r;
3562 : : }
3563 : : next_after_fail978:;
3564 : : }
3565 : : else
3566 : : {
3567 : 6 : if (code1 == EQ_EXPR && !val
3568 : : )
3569 : : {
3570 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail979;
3571 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail979;
3572 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail979;
3573 : 0 : {
3574 : 0 : tree _r;
3575 : 0 : _r = constant_boolean_node (false, type);
3576 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
3577 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
3578 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 685, __FILE__, __LINE__, true);
3579 : 0 : return _r;
3580 : : }
3581 : : next_after_fail979:;
3582 : : }
3583 : : else
3584 : : {
3585 : 6 : if (code1 == NE_EXPR && !val && allbits
3586 : : )
3587 : : {
3588 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail980;
3589 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail980;
3590 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail980;
3591 : 0 : {
3592 : 0 : tree _r;
3593 : 0 : _r = captures[3];
3594 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 686, __FILE__, __LINE__, true);
3595 : 0 : return _r;
3596 : : }
3597 : : next_after_fail980:;
3598 : : }
3599 : : else
3600 : : {
3601 : 6 : if ((code1 == NE_EXPR
3602 : 6 : && code2 == GE_EXPR
3603 : 0 : && cmp == 0
3604 : 0 : && allbits)
3605 : 6 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3606 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
3607 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3608 : : )
3609 : : {
3610 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail981;
3611 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail981;
3612 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail981;
3613 : 0 : {
3614 : 0 : tree res_op0;
3615 : 0 : res_op0 = captures[4];
3616 : 0 : tree res_op1;
3617 : 0 : {
3618 : 0 : tree _o1[1], _r1;
3619 : 0 : _o1[0] = captures[2];
3620 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3621 : : {
3622 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3623 : : }
3624 : : else
3625 : : _r1 = _o1[0];
3626 : 0 : res_op1 = _r1;
3627 : : }
3628 : 0 : tree _r;
3629 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3630 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 687, __FILE__, __LINE__, true);
3631 : 0 : return _r;
3632 : : }
3633 : : next_after_fail981:;
3634 : : }
3635 : : else
3636 : : {
3637 : 6 : if ((code1 == NE_EXPR
3638 : 6 : && code2 == LE_EXPR
3639 : 0 : && cmp == 0
3640 : 0 : && allbits)
3641 : 6 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3642 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
3643 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3644 : : )
3645 : : {
3646 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail982;
3647 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail982;
3648 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail982;
3649 : 0 : {
3650 : 0 : tree res_op0;
3651 : 0 : res_op0 = captures[4];
3652 : 0 : tree res_op1;
3653 : 0 : {
3654 : 0 : tree _o1[1], _r1;
3655 : 0 : _o1[0] = captures[2];
3656 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3657 : : {
3658 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3659 : : }
3660 : : else
3661 : : _r1 = _o1[0];
3662 : 0 : res_op1 = _r1;
3663 : : }
3664 : 0 : tree _r;
3665 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3666 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 688, __FILE__, __LINE__, true);
3667 : 0 : return _r;
3668 : : }
3669 : : next_after_fail982:;
3670 : : }
3671 : : else
3672 : : {
3673 : 6 : if ((code1 == NE_EXPR
3674 : 6 : && code2 == GT_EXPR
3675 : : && one_after
3676 : 4 : && allbits)
3677 : 6 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3678 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GT_EXPR))
3679 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3680 : : )
3681 : : {
3682 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail983;
3683 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail983;
3684 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail983;
3685 : 0 : {
3686 : 0 : tree res_op0;
3687 : 0 : res_op0 = captures[4];
3688 : 0 : tree res_op1;
3689 : 0 : {
3690 : 0 : tree _o1[1], _r1;
3691 : 0 : _o1[0] = captures[2];
3692 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3693 : : {
3694 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3695 : : }
3696 : : else
3697 : : _r1 = _o1[0];
3698 : 0 : res_op1 = _r1;
3699 : : }
3700 : 0 : tree _r;
3701 : 0 : _r = fold_build2_loc (loc, GT_EXPR, type, res_op0, res_op1);
3702 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 689, __FILE__, __LINE__, true);
3703 : 0 : return _r;
3704 : : }
3705 : : next_after_fail983:;
3706 : : }
3707 : : else
3708 : : {
3709 : 6 : if ((code1 == NE_EXPR
3710 : 6 : && code2 == LT_EXPR
3711 : : && one_before
3712 : 0 : && allbits)
3713 : 6 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3714 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LT_EXPR))
3715 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3716 : : )
3717 : : {
3718 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail984;
3719 : 0 : if (TREE_SIDE_EFFECTS (captures[5])) goto next_after_fail984;
3720 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail984;
3721 : 0 : {
3722 : 0 : tree res_op0;
3723 : 0 : res_op0 = captures[4];
3724 : 0 : tree res_op1;
3725 : 0 : {
3726 : 0 : tree _o1[1], _r1;
3727 : 0 : _o1[0] = captures[2];
3728 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (res_op0))
3729 : : {
3730 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, TREE_TYPE (res_op0), _o1[0]);
3731 : : }
3732 : : else
3733 : : _r1 = _o1[0];
3734 : 0 : res_op1 = _r1;
3735 : : }
3736 : 0 : tree _r;
3737 : 0 : _r = fold_build2_loc (loc, LT_EXPR, type, res_op0, res_op1);
3738 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 690, __FILE__, __LINE__, true);
3739 : 0 : return _r;
3740 : : }
3741 : : next_after_fail984:;
3742 : : }
3743 : : }
3744 : : }
3745 : : }
3746 : : }
3747 : : }
3748 : : }
3749 : : }
3750 : : }
3751 : : return NULL_TREE;
3752 : : }
3753 : :
3754 : : tree
3755 : 51 : generic_simplify_473 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3756 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3757 : : const enum tree_code ARG_UNUSED (op))
3758 : : {
3759 : 51 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3760 : 51 : if (bitwise_equal_p (captures[0], captures[2])
3761 : 1 : && tree_expr_nonzero_p (captures[3])
3762 : 52 : && expr_no_side_effects_p (captures[2])
3763 : : )
3764 : : {
3765 : 1 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1026;
3766 : 1 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1026;
3767 : 1 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1026;
3768 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1026;
3769 : 1 : {
3770 : 1 : tree _r;
3771 : 1 : _r = captures[1];
3772 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 728, __FILE__, __LINE__, true);
3773 : 1 : return _r;
3774 : : }
3775 : : next_after_fail1026:;
3776 : : }
3777 : : return NULL_TREE;
3778 : : }
3779 : :
3780 : : tree
3781 : 0 : generic_simplify_478 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3782 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3783 : : const enum tree_code ARG_UNUSED (op))
3784 : : {
3785 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3786 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1033;
3787 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1033;
3788 : 0 : {
3789 : 0 : tree _r;
3790 : 0 : _r = captures[2];
3791 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 735, __FILE__, __LINE__, true);
3792 : : return _r;
3793 : : }
3794 : : next_after_fail1033:;
3795 : : return NULL_TREE;
3796 : : }
3797 : :
3798 : : tree
3799 : 0 : generic_simplify_486 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3800 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3801 : : const enum tree_code ARG_UNUSED (op))
3802 : : {
3803 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3804 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1044;
3805 : 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1044;
3806 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1044;
3807 : 0 : {
3808 : 0 : tree _r;
3809 : 0 : _r = captures[2];
3810 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 746, __FILE__, __LINE__, true);
3811 : : return _r;
3812 : : }
3813 : : next_after_fail1044:;
3814 : : return NULL_TREE;
3815 : : }
3816 : :
3817 : : tree
3818 : 0 : generic_simplify_490 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3819 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3820 : : const enum tree_code ARG_UNUSED (cmp))
3821 : : {
3822 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3823 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1048;
3824 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1048;
3825 : 0 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail1048;
3826 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1048;
3827 : 0 : {
3828 : 0 : tree _r;
3829 : 0 : _r = captures[3];
3830 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 750, __FILE__, __LINE__, true);
3831 : : return _r;
3832 : : }
3833 : : next_after_fail1048:;
3834 : : return NULL_TREE;
3835 : : }
3836 : :
3837 : : tree
3838 : 3 : generic_simplify_495 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3839 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3840 : : const combined_fn ARG_UNUSED (func))
3841 : : {
3842 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3843 : 3 : if (wi::to_widest (captures[4]) == TYPE_PRECISION (TREE_TYPE (captures[3])) - 1
3844 : : )
3845 : : {
3846 : 3 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1054;
3847 : 3 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail1054;
3848 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1054;
3849 : 3 : {
3850 : 3 : tree _r;
3851 : 3 : _r = captures[2];
3852 : 3 : if (TREE_SIDE_EFFECTS (captures[1]))
3853 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
3854 : 3 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 755, __FILE__, __LINE__, true);
3855 : 3 : return _r;
3856 : : }
3857 : : next_after_fail1054:;
3858 : : }
3859 : : return NULL_TREE;
3860 : : }
3861 : :
3862 : : tree
3863 : 4 : generic_simplify_501 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3864 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures))
3865 : : {
3866 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3867 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1062;
3868 : 4 : {
3869 : 4 : tree _r;
3870 : 4 : _r = captures[1];
3871 : 4 : if (TREE_SIDE_EFFECTS (captures[0]))
3872 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
3873 : 4 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 762, __FILE__, __LINE__, true);
3874 : : return _r;
3875 : : }
3876 : 0 : next_after_fail1062:;
3877 : 0 : return NULL_TREE;
3878 : : }
3879 : :
3880 : : tree
3881 : 20 : generic_simplify_506 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3882 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
3883 : : const enum tree_code ARG_UNUSED (minmax),
3884 : : const enum tree_code ARG_UNUSED (cmp))
3885 : : {
3886 : 20 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3887 : 20 : {
3888 : 20 : poly_int64 off0, off1;
3889 : 20 : tree base0, base1;
3890 : 20 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[3], base0, base1,
3891 : : off0, off1,
3892 : : 1
3893 : : );
3894 : 20 : if (equal == 1
3895 : : )
3896 : : {
3897 : 0 : if (minmax == MIN_EXPR
3898 : : )
3899 : : {
3900 : 0 : if (known_le (off0, off1)
3901 : : )
3902 : : {
3903 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1076;
3904 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1076;
3905 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1076;
3906 : 0 : {
3907 : 0 : tree _r;
3908 : 0 : _r = captures[0];
3909 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 764, __FILE__, __LINE__, true);
3910 : 0 : return _r;
3911 : : }
3912 : 20 : next_after_fail1076:;
3913 : : }
3914 : : else
3915 : : {
3916 : 0 : if (known_gt (off0, off1)
3917 : : )
3918 : : {
3919 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1077;
3920 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1077;
3921 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1077;
3922 : 0 : {
3923 : 0 : tree _r;
3924 : 0 : _r = captures[2];
3925 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 765, __FILE__, __LINE__, true);
3926 : 0 : return _r;
3927 : : }
3928 : 20 : next_after_fail1077:;
3929 : : }
3930 : : }
3931 : : }
3932 : : else
3933 : : {
3934 : 0 : if (known_ge (off0, off1)
3935 : : )
3936 : : {
3937 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1078;
3938 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1078;
3939 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1078;
3940 : 0 : {
3941 : 0 : tree _r;
3942 : 0 : _r = captures[0];
3943 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 766, __FILE__, __LINE__, true);
3944 : 0 : return _r;
3945 : : }
3946 : 20 : next_after_fail1078:;
3947 : : }
3948 : : else
3949 : : {
3950 : 0 : if (known_lt (off0, off1)
3951 : : )
3952 : : {
3953 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail1079;
3954 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1079;
3955 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1079;
3956 : 0 : {
3957 : 0 : tree _r;
3958 : 0 : _r = captures[2];
3959 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 767, __FILE__, __LINE__, true);
3960 : 0 : return _r;
3961 : : }
3962 : 20 : next_after_fail1079:;
3963 : : }
3964 : : }
3965 : : }
3966 : : }
3967 : : }
3968 : 20 : return NULL_TREE;
3969 : : }
3970 : :
3971 : : tree
3972 : 12 : generic_simplify_524 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3973 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3974 : : const enum tree_code ARG_UNUSED (op))
3975 : : {
3976 : 12 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3977 : 12 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1100;
3978 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1100;
3979 : 12 : {
3980 : 12 : tree _r;
3981 : 12 : _r = captures[2];
3982 : 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 735, __FILE__, __LINE__, true);
3983 : : return _r;
3984 : : }
3985 : : next_after_fail1100:;
3986 : : return NULL_TREE;
3987 : : }
3988 : :
3989 : : tree
3990 : 0 : generic_simplify_531 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
3991 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
3992 : : const combined_fn ARG_UNUSED (cond_len_op))
3993 : : {
3994 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3995 : 0 : {
3996 : 0 : tree op_type = TREE_TYPE (captures[3]);
3997 : 0 : if (element_precision (type) == element_precision (op_type)
3998 : : )
3999 : : {
4000 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1107;
4001 : 0 : {
4002 : 0 : tree res_op0;
4003 : 0 : {
4004 : 0 : tree _o1[6], _r1;
4005 : 0 : _o1[0] = captures[0];
4006 : 0 : _o1[1] = captures[1];
4007 : 0 : _o1[2] = captures[2];
4008 : 0 : {
4009 : 0 : tree _o2[1], _r2;
4010 : 0 : _o2[0] = captures[6];
4011 : 0 : if (TREE_TYPE (_o2[0]) != op_type)
4012 : : {
4013 : 0 : _r2 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, op_type, _o2[0]);
4014 : : }
4015 : : else
4016 : : _r2 = _o2[0];
4017 : 0 : _o1[3] = _r2;
4018 : : }
4019 : 0 : _o1[4] = captures[4];
4020 : 0 : _o1[5] = captures[5];
4021 : 0 : _r1 = maybe_build_call_expr_loc (loc, cond_len_op, TREE_TYPE (_o1[1]), 6, _o1[0], _o1[1], _o1[2], _o1[3], _o1[4], _o1[5]);
4022 : 0 : if (!_r1)
4023 : 0 : goto next_after_fail1107;
4024 : 0 : res_op0 = _r1;
4025 : : }
4026 : 0 : tree _r;
4027 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
4028 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4029 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4030 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 790, __FILE__, __LINE__, true);
4031 : 0 : return _r;
4032 : : }
4033 : : next_after_fail1107:;
4034 : : }
4035 : : }
4036 : : return NULL_TREE;
4037 : : }
4038 : :
4039 : : tree
4040 : 60 : generic_simplify_539 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4041 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree *ARG_UNUSED (captures),
4042 : : const enum tree_code ARG_UNUSED (cmp))
4043 : : {
4044 : 60 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4045 : 60 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1115;
4046 : 60 : {
4047 : 60 : tree _r;
4048 : 60 : _r = constant_boolean_node (true, type);
4049 : 60 : if (TREE_SIDE_EFFECTS (captures[0]))
4050 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4051 : 60 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 798, __FILE__, __LINE__, true);
4052 : : return _r;
4053 : : }
4054 : 0 : next_after_fail1115:;
4055 : 0 : return NULL_TREE;
4056 : : }
4057 : :
4058 : : tree
4059 : 0 : generic_simplify_545 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4060 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4061 : : const combined_fn ARG_UNUSED (tans),
4062 : : const combined_fn ARG_UNUSED (atans))
4063 : : {
4064 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4065 : 0 : if (flag_unsafe_math_optimizations
4066 : : )
4067 : : {
4068 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1121;
4069 : 0 : {
4070 : 0 : tree _r;
4071 : 0 : _r = captures[0];
4072 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 804, __FILE__, __LINE__, true);
4073 : 0 : return _r;
4074 : : }
4075 : 0 : next_after_fail1121:;
4076 : : }
4077 : : return NULL_TREE;
4078 : : }
4079 : :
4080 : : tree
4081 : 0 : generic_simplify_551 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4082 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4083 : : const combined_fn ARG_UNUSED (froms),
4084 : : const combined_fn ARG_UNUSED (tos))
4085 : : {
4086 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4087 : 0 : if (optimize && canonicalize_math_p ()
4088 : : )
4089 : : {
4090 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1127;
4091 : 0 : {
4092 : 0 : tree res_op0;
4093 : 0 : {
4094 : 0 : tree _o1[1], _r1;
4095 : 0 : _o1[0] = captures[0];
4096 : 0 : _r1 = maybe_build_call_expr_loc (loc, tos, TREE_TYPE (_o1[0]), 1, _o1[0]);
4097 : 0 : if (!_r1)
4098 : 0 : goto next_after_fail1127;
4099 : 0 : res_op0 = _r1;
4100 : : }
4101 : 0 : tree _r;
4102 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
4103 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 810, __FILE__, __LINE__, true);
4104 : 0 : return _r;
4105 : : }
4106 : : next_after_fail1127:;
4107 : : }
4108 : : return NULL_TREE;
4109 : : }
4110 : :
4111 : : tree
4112 : 0 : generic_simplify_562 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4113 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4114 : : const combined_fn ARG_UNUSED (SIGNBIT))
4115 : : {
4116 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4117 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1138;
4118 : 0 : {
4119 : 0 : tree _r;
4120 : 0 : _r = integer_zero_node;
4121 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
4122 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4123 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 821, __FILE__, __LINE__, true);
4124 : : return _r;
4125 : : }
4126 : 0 : next_after_fail1138:;
4127 : 0 : return NULL_TREE;
4128 : : }
4129 : :
4130 : : tree
4131 : 0 : generic_simplify_568 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4132 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures))
4133 : : {
4134 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4135 : 0 : if (canonicalize_math_after_vectorization_p ()
4136 : : )
4137 : : {
4138 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1144;
4139 : : {
4140 : : tree res_op0;
4141 : : res_op0 = captures[0];
4142 : : tree res_op1;
4143 : : res_op1 = captures[1];
4144 : : tree res_op2;
4145 : : res_op2 = captures[2];
4146 : : tree _r;
4147 : : _r = maybe_build_call_expr_loc (loc, CFN_FNMA, type, 3, res_op0, res_op1, res_op2);
4148 : : if (!_r)
4149 : : goto next_after_fail1144;
4150 : : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 827, __FILE__, __LINE__, true);
4151 : : return _r;
4152 : : }
4153 : 0 : next_after_fail1144:;
4154 : : }
4155 : 0 : return NULL_TREE;
4156 : : }
4157 : :
4158 : : tree
4159 : 0 : generic_simplify_578 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4160 : : tree ARG_UNUSED (_p0), tree *ARG_UNUSED (captures),
4161 : : const enum tree_code ARG_UNUSED (rot),
4162 : : const combined_fn ARG_UNUSED (popcount))
4163 : : {
4164 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4165 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4166 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4167 : 0 : && (
4168 : :
4169 : 0 : || !TREE_SIDE_EFFECTS (captures[3]))
4170 : : )
4171 : : {
4172 : 0 : {
4173 : 0 : tree type0 = TREE_TYPE (captures[0]);
4174 : 0 : tree type1 = TREE_TYPE (captures[1]);
4175 : 0 : unsigned int prec0 = TYPE_PRECISION (type0);
4176 : 0 : unsigned int prec1 = TYPE_PRECISION (type1);
4177 : 0 : if (prec0 == prec1 || (prec0 > prec1 && TYPE_UNSIGNED (type1))
4178 : : )
4179 : : {
4180 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1154;
4181 : 0 : {
4182 : 0 : tree res_op0;
4183 : 0 : {
4184 : 0 : tree _o1[1], _r1;
4185 : 0 : _o1[0] = captures[2];
4186 : 0 : if (TREE_TYPE (_o1[0]) != type0)
4187 : : {
4188 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type0, _o1[0]);
4189 : : }
4190 : : else
4191 : : _r1 = _o1[0];
4192 : 0 : res_op0 = _r1;
4193 : : }
4194 : 0 : tree _r;
4195 : 0 : _r = maybe_build_call_expr_loc (loc, popcount, type, 1, res_op0);
4196 : 0 : if (!_r)
4197 : 0 : goto next_after_fail1154;
4198 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4199 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4200 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 834, __FILE__, __LINE__, true);
4201 : 0 : return _r;
4202 : : }
4203 : : next_after_fail1154:;
4204 : : }
4205 : : }
4206 : : }
4207 : : return NULL_TREE;
4208 : : }
4209 : :
4210 : : tree
4211 : 0 : generic_simplify_589 (location_t ARG_UNUSED (loc), const tree ARG_UNUSED (type),
4212 : : tree ARG_UNUSED (_p0), tree ARG_UNUSED (_p1), tree ARG_UNUSED (_p2), tree *ARG_UNUSED (captures),
4213 : : const enum tree_code ARG_UNUSED (plusminus),
4214 : : const enum tree_code ARG_UNUSED (minusplus))
4215 : : {
4216 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4217 : 0 : if (!VECTOR_INTEGER_TYPE_P (type)
4218 : : && !FLOAT_WORDS_BIG_ENDIAN
4219 : 0 : && (operand_equal_p (captures[0], captures[2], 0)
4220 : 0 : ? operand_equal_p (captures[1], captures[3], 0)
4221 : 0 : : operand_equal_p (captures[0], captures[3], 0) && operand_equal_p (captures[1], captures[2], 0))
4222 : : )
4223 : : {
4224 : 0 : {
4225 : 0 : vec_perm_builder builder;
4226 : 0 : if (tree_to_vec_perm_builder (&builder, captures[4])
4227 : : )
4228 : : {
4229 : 0 : {
4230 : 0 : poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (type);
4231 : 0 : vec_perm_indices sel (builder, 2, nelts);
4232 : 0 : machine_mode vec_mode = TYPE_MODE (type);
4233 : 0 : machine_mode wide_mode;
4234 : 0 : scalar_mode wide_elt_mode;
4235 : 0 : poly_uint64 wide_nunits;
4236 : 0 : scalar_mode inner_mode = GET_MODE_INNER (vec_mode);
4237 : 0 : if (VECTOR_MODE_P (vec_mode)
4238 : 0 : && sel.series_p (0, 2, 0, 2)
4239 : 0 : && sel.series_p (1, 2, nelts + 1, 2)
4240 : 0 : && GET_MODE_2XWIDER_MODE (inner_mode).exists (&wide_elt_mode)
4241 : 0 : && multiple_p (GET_MODE_NUNITS (vec_mode), 2, &wide_nunits)
4242 : 0 : && related_vector_mode (vec_mode, wide_elt_mode,
4243 : 0 : wide_nunits).exists (&wide_mode)
4244 : : )
4245 : : {
4246 : 0 : {
4247 : 0 : tree stype
4248 : 0 : = lang_hooks.types.type_for_mode (GET_MODE_INNER (wide_mode),
4249 : 0 : TYPE_UNSIGNED (type));
4250 : 0 : tree ntype = build_vector_type_for_mode (stype, wide_mode);
4251 : 0 : const struct real_format *fmt_old = FLOAT_MODE_FORMAT (vec_mode);
4252 : 0 : const struct real_format *fmt_new = FLOAT_MODE_FORMAT (wide_mode);
4253 : 0 : if (TYPE_MODE (stype) != BLKmode
4254 : 0 : && VECTOR_TYPE_P (ntype)
4255 : 0 : && fmt_old != NULL
4256 : 0 : && fmt_new != NULL
4257 : : )
4258 : : {
4259 : 0 : {
4260 : 0 : if (known_eq (GET_MODE_NUNITS (wide_mode), 1)
4261 : 0 : && !target_supports_op_p (ntype, NEGATE_EXPR, optab_vector))
4262 : : ntype = stype;
4263 : 0 : if (fmt_new->signbit_rw
4264 : 0 : == fmt_old->signbit_rw + GET_MODE_UNIT_BITSIZE (vec_mode)
4265 : 0 : && fmt_new->signbit_rw == fmt_new->signbit_ro
4266 : 0 : && targetm.can_change_mode_class (TYPE_MODE (ntype),
4267 : 0 : TYPE_MODE (type), ALL_REGS)
4268 : 0 : && ((optimize_vectors_before_lowering_p ()
4269 : 0 : && VECTOR_TYPE_P (ntype))
4270 : 0 : || target_supports_op_p (ntype, NEGATE_EXPR, optab_vector))
4271 : : )
4272 : : {
4273 : 0 : if (plusminus == PLUS_EXPR
4274 : : )
4275 : : {
4276 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1166;
4277 : 0 : {
4278 : 0 : tree res_op0;
4279 : 0 : {
4280 : 0 : tree _o1[1], _r1;
4281 : 0 : {
4282 : 0 : tree _o2[1], _r2;
4283 : 0 : {
4284 : 0 : tree _o3[1], _r3;
4285 : 0 : _o3[0] = captures[3];
4286 : 0 : if (TREE_TYPE (_o3[0]) != ntype)
4287 : : {
4288 : 0 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, ntype, _o3[0]);
4289 : : }
4290 : : else
4291 : : _r3 = _o3[0];
4292 : 0 : _o2[0] = _r3;
4293 : : }
4294 : 0 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
4295 : 0 : _o1[0] = _r2;
4296 : : }
4297 : 0 : if (TREE_TYPE (_o1[0]) != type)
4298 : : {
4299 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
4300 : : }
4301 : : else
4302 : : _r1 = _o1[0];
4303 : 0 : res_op0 = _r1;
4304 : : }
4305 : 0 : tree res_op1;
4306 : 0 : res_op1 = captures[2];
4307 : 0 : tree _r;
4308 : 0 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
4309 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
4310 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4311 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
4312 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4313 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
4314 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
4315 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
4316 : 0 : return _r;
4317 : : }
4318 : 0 : next_after_fail1166:;
4319 : : }
4320 : : else
4321 : : {
4322 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1167;
4323 : 0 : {
4324 : 0 : tree res_op0;
4325 : 0 : res_op0 = captures[0];
4326 : 0 : tree res_op1;
4327 : 0 : {
4328 : 0 : tree _o1[1], _r1;
4329 : 0 : {
4330 : 0 : tree _o2[1], _r2;
4331 : 0 : {
4332 : 0 : tree _o3[1], _r3;
4333 : 0 : _o3[0] = captures[1];
4334 : 0 : if (TREE_TYPE (_o3[0]) != ntype)
4335 : : {
4336 : 0 : _r3 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, ntype, _o3[0]);
4337 : : }
4338 : : else
4339 : : _r3 = _o3[0];
4340 : 0 : _o2[0] = _r3;
4341 : : }
4342 : 0 : _r2 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
4343 : 0 : _o1[0] = _r2;
4344 : : }
4345 : 0 : if (TREE_TYPE (_o1[0]) != type)
4346 : : {
4347 : 0 : _r1 = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, _o1[0]);
4348 : : }
4349 : : else
4350 : : _r1 = _o1[0];
4351 : 0 : res_op1 = _r1;
4352 : : }
4353 : 0 : tree _r;
4354 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
4355 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
4356 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
4357 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
4358 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
4359 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
4360 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
4361 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 843, __FILE__, __LINE__, true);
4362 : 0 : return _r;
4363 : : }
4364 : 0 : next_after_fail1167:;
4365 : : }
4366 : : }
4367 : : }
4368 : : }
4369 : : }
4370 : : }
4371 : 0 : }
4372 : : }
4373 : 0 : }
4374 : : }
4375 : : return NULL_TREE;
4376 : : }
4377 : :
4378 : : tree
4379 : 1330 : generic_simplify_CONJ_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0)
4380 : : {
4381 : 1330 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4382 : 1330 : switch (TREE_CODE (_p0))
4383 : : {
4384 : 0 : CASE_CONVERT:
4385 : 0 : {
4386 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
4387 : 0 : switch (TREE_CODE (_q20))
4388 : : {
4389 : 0 : case CONJ_EXPR:
4390 : 0 : {
4391 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4392 : 0 : {
4393 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4394 : 0 : tree res = generic_simplify_518 (loc, type, _p0, captures);
4395 : 0 : if (res) return res;
4396 : : }
4397 : 0 : break;
4398 : : }
4399 : 0 : case COMPLEX_EXPR:
4400 : 0 : {
4401 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
4402 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
4403 : 0 : {
4404 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
4405 : 0 : {
4406 : 0 : tree itype = TREE_TYPE (type);
4407 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1285;
4408 : 0 : {
4409 : 0 : tree res_op0;
4410 : 0 : {
4411 : 0 : tree _o1[1], _r1;
4412 : 0 : _o1[0] = captures[2];
4413 : 0 : if (TREE_TYPE (_o1[0]) != itype)
4414 : : {
4415 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, itype, _o1[0]);
4416 : : }
4417 : : else
4418 : : _r1 = _o1[0];
4419 : 0 : res_op0 = _r1;
4420 : : }
4421 : 0 : tree res_op1;
4422 : 0 : {
4423 : 0 : tree _o1[1], _r1;
4424 : 0 : {
4425 : 0 : tree _o2[1], _r2;
4426 : 0 : _o2[0] = captures[3];
4427 : 0 : if (TREE_TYPE (_o2[0]) != itype)
4428 : : {
4429 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, itype, _o2[0]);
4430 : : }
4431 : : else
4432 : : _r2 = _o2[0];
4433 : 0 : _o1[0] = _r2;
4434 : : }
4435 : 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4436 : 0 : res_op1 = _r1;
4437 : : }
4438 : 0 : tree _r;
4439 : 0 : _r = fold_build2_loc (loc, COMPLEX_EXPR, type, res_op0, res_op1);
4440 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
4441 : 0 : return _r;
4442 : : }
4443 : 0 : next_after_fail1285:;
4444 : : }
4445 : : }
4446 : 0 : break;
4447 : : }
4448 : : default:;
4449 : : }
4450 : : break;
4451 : : }
4452 : 1 : case CONJ_EXPR:
4453 : 1 : {
4454 : 1 : tree _q20 = TREE_OPERAND (_p0, 0);
4455 : 1 : {
4456 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4457 : 1 : tree res = generic_simplify_518 (loc, type, _p0, captures);
4458 : 1 : if (res) return res;
4459 : : }
4460 : 0 : break;
4461 : : }
4462 : 12 : case COMPLEX_EXPR:
4463 : 12 : {
4464 : 12 : tree _q20 = TREE_OPERAND (_p0, 0);
4465 : 12 : tree _q21 = TREE_OPERAND (_p0, 1);
4466 : 12 : {
4467 : 12 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
4468 : 12 : {
4469 : 12 : tree itype = TREE_TYPE (type);
4470 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1286;
4471 : 12 : {
4472 : 12 : tree res_op0;
4473 : 12 : {
4474 : 12 : tree _o1[1], _r1;
4475 : 12 : _o1[0] = captures[2];
4476 : 12 : if (TREE_TYPE (_o1[0]) != itype)
4477 : : {
4478 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, itype, _o1[0]);
4479 : : }
4480 : : else
4481 : : _r1 = _o1[0];
4482 : 12 : res_op0 = _r1;
4483 : : }
4484 : 12 : tree res_op1;
4485 : 12 : {
4486 : 12 : tree _o1[1], _r1;
4487 : 12 : {
4488 : 12 : tree _o2[1], _r2;
4489 : 12 : _o2[0] = captures[3];
4490 : 12 : if (TREE_TYPE (_o2[0]) != itype)
4491 : : {
4492 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, itype, _o2[0]);
4493 : : }
4494 : : else
4495 : : _r2 = _o2[0];
4496 : 12 : _o1[0] = _r2;
4497 : : }
4498 : 12 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4499 : 12 : res_op1 = _r1;
4500 : : }
4501 : 12 : tree _r;
4502 : 12 : _r = fold_build2_loc (loc, COMPLEX_EXPR, type, res_op0, res_op1);
4503 : 12 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 900, __FILE__, __LINE__, true);
4504 : 12 : return _r;
4505 : : }
4506 : 0 : next_after_fail1286:;
4507 : : }
4508 : : }
4509 : 0 : break;
4510 : : }
4511 : : default:;
4512 : : }
4513 : : return NULL_TREE;
4514 : : }
4515 : :
4516 : : tree
4517 : 31787752 : generic_simplify_MINUS_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
4518 : : {
4519 : 31787752 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4520 : 31787752 : if (integer_zerop (_p1))
4521 : : {
4522 : 2045652 : {
4523 : 2045652 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4524 : 2045652 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1316;
4525 : 2045652 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1316;
4526 : 2045652 : {
4527 : 2045652 : tree res_op0;
4528 : 2045652 : res_op0 = captures[0];
4529 : 2045652 : tree _r;
4530 : 2045652 : _r = non_lvalue_loc (loc, res_op0);
4531 : 2045652 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
4532 : 2045652 : return _r;
4533 : : }
4534 : : next_after_fail1316:;
4535 : : }
4536 : : }
4537 : 29742100 : if (real_zerop (_p1))
4538 : : {
4539 : 1140 : {
4540 : 1140 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
4541 : 1140 : if (fold_real_zero_addition_p (type, captures[0], captures[1], 1)
4542 : : )
4543 : : {
4544 : 752 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1317;
4545 : 752 : {
4546 : 752 : tree res_op0;
4547 : 752 : res_op0 = captures[0];
4548 : 752 : tree _r;
4549 : 752 : _r = non_lvalue_loc (loc, res_op0);
4550 : 752 : if (TREE_SIDE_EFFECTS (captures[1]))
4551 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
4552 : 752 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
4553 : 752 : return _r;
4554 : : }
4555 : 0 : next_after_fail1317:;
4556 : : }
4557 : : }
4558 : : }
4559 : 29741348 : switch (TREE_CODE (_p0))
4560 : : {
4561 : 2189565 : case PLUS_EXPR:
4562 : 2189565 : {
4563 : 2189565 : tree _q20 = TREE_OPERAND (_p0, 0);
4564 : 2189565 : tree _q21 = TREE_OPERAND (_p0, 1);
4565 : 2189565 : switch (TREE_CODE (_q21))
4566 : : {
4567 : 161195 : case REAL_CST:
4568 : 161195 : {
4569 : 161195 : switch (TREE_CODE (_p1))
4570 : : {
4571 : 11 : case REAL_CST:
4572 : 11 : {
4573 : 11 : {
4574 : 11 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4575 : 11 : tree res = generic_simplify_4 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR);
4576 : 11 : if (res) return res;
4577 : : }
4578 : 8 : break;
4579 : : }
4580 : : default:;
4581 : : }
4582 : : break;
4583 : : }
4584 : : default:;
4585 : : }
4586 : : break;
4587 : : }
4588 : 1134373 : case MINUS_EXPR:
4589 : 1134373 : {
4590 : 1134373 : tree _q20 = TREE_OPERAND (_p0, 0);
4591 : 1134373 : tree _q21 = TREE_OPERAND (_p0, 1);
4592 : 1134373 : switch (TREE_CODE (_q21))
4593 : : {
4594 : 101274 : case REAL_CST:
4595 : 101274 : {
4596 : 101274 : switch (TREE_CODE (_p1))
4597 : : {
4598 : 40 : case REAL_CST:
4599 : 40 : {
4600 : 40 : {
4601 : 40 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
4602 : 40 : tree res = generic_simplify_4 (loc, type, _p0, _p1, captures, MINUS_EXPR, MINUS_EXPR);
4603 : 40 : if (res) return res;
4604 : : }
4605 : 38 : break;
4606 : : }
4607 : : default:;
4608 : : }
4609 : : break;
4610 : : }
4611 : : default:;
4612 : : }
4613 : : break;
4614 : : }
4615 : 29741343 : default:;
4616 : : }
4617 : 29741343 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
4618 : : {
4619 : 174480 : {
4620 : 174480 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4621 : 173731 : if (!FLOAT_TYPE_P (type)
4622 : 174481 : || (!tree_expr_maybe_nan_p (captures[0])
4623 : 107 : && !tree_expr_maybe_infinite_p (captures[0])
4624 : 15 : && (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
4625 : 1 : || !HONOR_SIGNED_ZEROS (type)))
4626 : : )
4627 : : {
4628 : 173744 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1318;
4629 : 173744 : {
4630 : 173744 : tree _r;
4631 : 173744 : _r = build_zero_cst (type);
4632 : 173744 : if (TREE_SIDE_EFFECTS (captures[0]))
4633 : 36 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
4634 : 173744 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 922, __FILE__, __LINE__, true);
4635 : 173744 : return _r;
4636 : : }
4637 : 0 : next_after_fail1318:;
4638 : : }
4639 : : }
4640 : : }
4641 : 29567599 : switch (TREE_CODE (_p0))
4642 : : {
4643 : 7934876 : CASE_CONVERT:
4644 : 7934876 : {
4645 : 7934876 : tree _q20 = TREE_OPERAND (_p0, 0);
4646 : 7934876 : switch (TREE_CODE (_p1))
4647 : : {
4648 : 3856663 : CASE_CONVERT:
4649 : 3856663 : {
4650 : 3856663 : tree _q40 = TREE_OPERAND (_p1, 0);
4651 : 3856663 : switch (TREE_CODE (_q40))
4652 : : {
4653 : 102318 : case MULT_EXPR:
4654 : 102318 : {
4655 : 102318 : tree _q50 = TREE_OPERAND (_q40, 0);
4656 : 102318 : tree _q51 = TREE_OPERAND (_q40, 1);
4657 : 102318 : switch (TREE_CODE (_q50))
4658 : : {
4659 : 21 : case TRUNC_DIV_EXPR:
4660 : 21 : {
4661 : 21 : tree _q60 = TREE_OPERAND (_q50, 0);
4662 : 21 : tree _q61 = TREE_OPERAND (_q50, 1);
4663 : 21 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
4664 : : {
4665 : 21 : if ((_q51 == _q61 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q61, 0))
4666 : : {
4667 : 21 : {
4668 : 21 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q61 };
4669 : 21 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4670 : 21 : if (res) return res;
4671 : : }
4672 : : }
4673 : : }
4674 : : break;
4675 : : }
4676 : 102297 : default:;
4677 : : }
4678 : 102297 : switch (TREE_CODE (_q51))
4679 : : {
4680 : 0 : case TRUNC_DIV_EXPR:
4681 : 0 : {
4682 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
4683 : 0 : tree _q71 = TREE_OPERAND (_q51, 1);
4684 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q20, 0))
4685 : : {
4686 : 0 : if ((_q71 == _q50 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q50, 0))
4687 : : {
4688 : 0 : {
4689 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q70, _q71, _q20, _q50 };
4690 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4691 : 0 : if (res) return res;
4692 : : }
4693 : : }
4694 : : }
4695 : : break;
4696 : : }
4697 : : default:;
4698 : : }
4699 : : break;
4700 : : }
4701 : : default:;
4702 : : }
4703 : : break;
4704 : : }
4705 : 152590 : case MULT_EXPR:
4706 : 152590 : {
4707 : 152590 : tree _q40 = TREE_OPERAND (_p1, 0);
4708 : 152590 : tree _q41 = TREE_OPERAND (_p1, 1);
4709 : 152590 : switch (TREE_CODE (_q40))
4710 : : {
4711 : 1847 : case TRUNC_DIV_EXPR:
4712 : 1847 : {
4713 : 1847 : tree _q50 = TREE_OPERAND (_q40, 0);
4714 : 1847 : tree _q51 = TREE_OPERAND (_q40, 1);
4715 : 1847 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
4716 : : {
4717 : 8 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
4718 : : {
4719 : 8 : {
4720 : 8 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _q20, _q51 };
4721 : 8 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4722 : 8 : if (res) return res;
4723 : : }
4724 : : }
4725 : : }
4726 : : break;
4727 : : }
4728 : 152582 : default:;
4729 : : }
4730 : 152582 : switch (TREE_CODE (_q41))
4731 : : {
4732 : 0 : case TRUNC_DIV_EXPR:
4733 : 0 : {
4734 : 0 : tree _q60 = TREE_OPERAND (_q41, 0);
4735 : 0 : tree _q61 = TREE_OPERAND (_q41, 1);
4736 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
4737 : : {
4738 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
4739 : : {
4740 : 0 : {
4741 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q40 };
4742 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4743 : 0 : if (res) return res;
4744 : : }
4745 : : }
4746 : : }
4747 : : break;
4748 : : }
4749 : : default:;
4750 : : }
4751 : : break;
4752 : : }
4753 : : default:;
4754 : : }
4755 : : break;
4756 : : }
4757 : 29567570 : default:;
4758 : : }
4759 : 29567570 : switch (TREE_CODE (_p1))
4760 : : {
4761 : 6995076 : CASE_CONVERT:
4762 : 6995076 : {
4763 : 6995076 : tree _q30 = TREE_OPERAND (_p1, 0);
4764 : 6995076 : switch (TREE_CODE (_q30))
4765 : : {
4766 : 135189 : case MULT_EXPR:
4767 : 135189 : {
4768 : 135189 : tree _q40 = TREE_OPERAND (_q30, 0);
4769 : 135189 : tree _q41 = TREE_OPERAND (_q30, 1);
4770 : 135189 : switch (TREE_CODE (_q40))
4771 : : {
4772 : 12 : case TRUNC_DIV_EXPR:
4773 : 12 : {
4774 : 12 : tree _q50 = TREE_OPERAND (_q40, 0);
4775 : 12 : tree _q51 = TREE_OPERAND (_q40, 1);
4776 : 12 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
4777 : : {
4778 : 2 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
4779 : : {
4780 : 2 : {
4781 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q51 };
4782 : 2 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4783 : 2 : if (res) return res;
4784 : : }
4785 : : }
4786 : : }
4787 : : break;
4788 : : }
4789 : 135187 : default:;
4790 : : }
4791 : 135187 : switch (TREE_CODE (_q41))
4792 : : {
4793 : 0 : case TRUNC_DIV_EXPR:
4794 : 0 : {
4795 : 0 : tree _q60 = TREE_OPERAND (_q41, 0);
4796 : 0 : tree _q61 = TREE_OPERAND (_q41, 1);
4797 : 0 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _p0, 0))
4798 : : {
4799 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
4800 : : {
4801 : 0 : {
4802 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _p0, _q40 };
4803 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4804 : 0 : if (res) return res;
4805 : : }
4806 : : }
4807 : : }
4808 : : break;
4809 : : }
4810 : : default:;
4811 : : }
4812 : : break;
4813 : : }
4814 : : default:;
4815 : : }
4816 : : break;
4817 : : }
4818 : 2113520 : case MULT_EXPR:
4819 : 2113520 : {
4820 : 2113520 : tree _q30 = TREE_OPERAND (_p1, 0);
4821 : 2113520 : tree _q31 = TREE_OPERAND (_p1, 1);
4822 : 2113520 : switch (TREE_CODE (_q30))
4823 : : {
4824 : 2238 : case TRUNC_DIV_EXPR:
4825 : 2238 : {
4826 : 2238 : tree _q40 = TREE_OPERAND (_q30, 0);
4827 : 2238 : tree _q41 = TREE_OPERAND (_q30, 1);
4828 : 2238 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
4829 : : {
4830 : 47 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _q41, 0))
4831 : : {
4832 : 47 : {
4833 : 47 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _p0, _q41 };
4834 : 47 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4835 : 47 : if (res) return res;
4836 : : }
4837 : : }
4838 : : }
4839 : : break;
4840 : : }
4841 : 2113473 : default:;
4842 : : }
4843 : 2113473 : switch (TREE_CODE (_q31))
4844 : : {
4845 : 0 : case TRUNC_DIV_EXPR:
4846 : 0 : {
4847 : 0 : tree _q50 = TREE_OPERAND (_q31, 0);
4848 : 0 : tree _q51 = TREE_OPERAND (_q31, 1);
4849 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
4850 : : {
4851 : 0 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q30, 0))
4852 : : {
4853 : 0 : {
4854 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q30 };
4855 : 0 : tree res = generic_simplify_40 (loc, type, _p0, _p1, captures);
4856 : 0 : if (res) return res;
4857 : : }
4858 : : }
4859 : : }
4860 : : break;
4861 : : }
4862 : : default:;
4863 : : }
4864 : : break;
4865 : : }
4866 : 29567521 : default:;
4867 : : }
4868 : 29567521 : switch (TREE_CODE (_p0))
4869 : : {
4870 : 1888093 : case MULT_EXPR:
4871 : 1888093 : {
4872 : 1888093 : tree _q20 = TREE_OPERAND (_p0, 0);
4873 : 1888093 : tree _q21 = TREE_OPERAND (_p0, 1);
4874 : 1888093 : switch (TREE_CODE (_q21))
4875 : : {
4876 : 599 : case PLUS_EXPR:
4877 : 599 : {
4878 : 599 : tree _q40 = TREE_OPERAND (_q21, 0);
4879 : 599 : tree _q41 = TREE_OPERAND (_q21, 1);
4880 : 599 : switch (TREE_CODE (_q40))
4881 : : {
4882 : 0 : case TRUNC_DIV_EXPR:
4883 : 0 : {
4884 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
4885 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
4886 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
4887 : : {
4888 : 0 : if (integer_onep (_q41))
4889 : : {
4890 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
4891 : : {
4892 : 0 : {
4893 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q40, _q50 };
4894 : 0 : tree res = generic_simplify_41 (loc, type, _p0, _p1, captures);
4895 : 0 : if (res) return res;
4896 : : }
4897 : : }
4898 : : }
4899 : : }
4900 : : break;
4901 : : }
4902 : : default:;
4903 : : }
4904 : : break;
4905 : : }
4906 : 1888093 : default:;
4907 : : }
4908 : 1888093 : switch (TREE_CODE (_q20))
4909 : : {
4910 : 102971 : case PLUS_EXPR:
4911 : 102971 : {
4912 : 102971 : tree _q30 = TREE_OPERAND (_q20, 0);
4913 : 102971 : tree _q31 = TREE_OPERAND (_q20, 1);
4914 : 102971 : switch (TREE_CODE (_q30))
4915 : : {
4916 : 1 : case TRUNC_DIV_EXPR:
4917 : 1 : {
4918 : 1 : tree _q40 = TREE_OPERAND (_q30, 0);
4919 : 1 : tree _q41 = TREE_OPERAND (_q30, 1);
4920 : 1 : if (integer_onep (_q31))
4921 : : {
4922 : 1 : if ((_q21 == _q41 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q41, 0) && types_match (_q21, _q41)))
4923 : : {
4924 : 1 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
4925 : : {
4926 : 1 : {
4927 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q20, _q30, _q40 };
4928 : 1 : tree res = generic_simplify_41 (loc, type, _p0, _p1, captures);
4929 : 1 : if (res) return res;
4930 : : }
4931 : : }
4932 : : }
4933 : : }
4934 : : break;
4935 : : }
4936 : : default:;
4937 : : }
4938 : : break;
4939 : : }
4940 : : default:;
4941 : : }
4942 : : break;
4943 : : }
4944 : 1262 : case LSHIFT_EXPR:
4945 : 1262 : {
4946 : 1262 : tree _q20 = TREE_OPERAND (_p0, 0);
4947 : 1262 : tree _q21 = TREE_OPERAND (_p0, 1);
4948 : 1262 : switch (TREE_CODE (_p1))
4949 : : {
4950 : 0 : case LSHIFT_EXPR:
4951 : 0 : {
4952 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
4953 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
4954 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
4955 : : {
4956 : 0 : {
4957 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
4958 : 0 : tree res = generic_simplify_6 (loc, type, _p0, _p1, captures, MINUS_EXPR);
4959 : 0 : if (res) return res;
4960 : : }
4961 : : }
4962 : : break;
4963 : : }
4964 : : default:;
4965 : : }
4966 : : break;
4967 : : }
4968 : 1187 : case BIT_AND_EXPR:
4969 : 1187 : {
4970 : 1187 : tree _q20 = TREE_OPERAND (_p0, 0);
4971 : 1187 : tree _q21 = TREE_OPERAND (_p0, 1);
4972 : 1187 : switch (TREE_CODE (_q21))
4973 : : {
4974 : 0 : case BIT_NOT_EXPR:
4975 : 0 : {
4976 : 0 : tree _q40 = TREE_OPERAND (_q21, 0);
4977 : 0 : switch (TREE_CODE (_p1))
4978 : : {
4979 : 0 : case BIT_AND_EXPR:
4980 : 0 : {
4981 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
4982 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
4983 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
4984 : : {
4985 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q40, 0) && types_match (_q61, _q40)))
4986 : : {
4987 : 0 : {
4988 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
4989 : 0 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
4990 : 0 : if (res) return res;
4991 : : }
4992 : : }
4993 : : }
4994 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
4995 : : {
4996 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
4997 : : {
4998 : 0 : {
4999 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
5000 : 0 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
5001 : 0 : if (res) return res;
5002 : : }
5003 : : }
5004 : : }
5005 : : break;
5006 : : }
5007 : : default:;
5008 : : }
5009 : : break;
5010 : : }
5011 : 1187 : default:;
5012 : : }
5013 : 1187 : switch (TREE_CODE (_q20))
5014 : : {
5015 : 27 : case BIT_NOT_EXPR:
5016 : 27 : {
5017 : 27 : tree _q30 = TREE_OPERAND (_q20, 0);
5018 : 27 : switch (TREE_CODE (_p1))
5019 : : {
5020 : 21 : case BIT_AND_EXPR:
5021 : 21 : {
5022 : 21 : tree _q60 = TREE_OPERAND (_p1, 0);
5023 : 21 : tree _q61 = TREE_OPERAND (_p1, 1);
5024 : 21 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
5025 : : {
5026 : 0 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
5027 : : {
5028 : 0 : {
5029 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
5030 : 0 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
5031 : 0 : if (res) return res;
5032 : : }
5033 : : }
5034 : : }
5035 : 21 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
5036 : : {
5037 : 21 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
5038 : : {
5039 : 21 : {
5040 : 21 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
5041 : 21 : tree res = generic_simplify_42 (loc, type, _p0, _p1, captures);
5042 : 21 : if (res) return res;
5043 : : }
5044 : : }
5045 : : }
5046 : : break;
5047 : : }
5048 : : default:;
5049 : : }
5050 : : break;
5051 : : }
5052 : 1166 : default:;
5053 : : }
5054 : 1166 : switch (TREE_CODE (_q21))
5055 : : {
5056 : 1126 : case INTEGER_CST:
5057 : 1126 : {
5058 : 1126 : switch (TREE_CODE (_p1))
5059 : : {
5060 : 22 : case BIT_AND_EXPR:
5061 : 22 : {
5062 : 22 : tree _q50 = TREE_OPERAND (_p1, 0);
5063 : 22 : tree _q51 = TREE_OPERAND (_p1, 1);
5064 : 22 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5065 : : {
5066 : 0 : switch (TREE_CODE (_q51))
5067 : : {
5068 : 0 : case INTEGER_CST:
5069 : 0 : {
5070 : 0 : {
5071 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
5072 : 0 : if (~wi::to_wide (captures[2]) == wi::to_wide (captures[4])
5073 : : )
5074 : : {
5075 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1319;
5076 : 0 : {
5077 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1319;
5078 : 0 : tree res_op0;
5079 : 0 : {
5080 : 0 : tree _o1[2], _r1;
5081 : 0 : _o1[0] = captures[1];
5082 : 0 : _o1[1] = unshare_expr (captures[4]);
5083 : 0 : _r1 = fold_build2_loc (loc, BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5084 : 0 : res_op0 = _r1;
5085 : : }
5086 : 0 : tree res_op1;
5087 : 0 : res_op1 = captures[4];
5088 : 0 : tree _r;
5089 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
5090 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
5091 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
5092 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
5093 : 0 : return _r;
5094 : : }
5095 : 0 : next_after_fail1319:;
5096 : : }
5097 : : }
5098 : 0 : break;
5099 : : }
5100 : : default:;
5101 : : }
5102 : : }
5103 : : break;
5104 : : }
5105 : : default:;
5106 : : }
5107 : : break;
5108 : : }
5109 : 1166 : default:;
5110 : : }
5111 : 1166 : switch (TREE_CODE (_p1))
5112 : : {
5113 : 25 : case BIT_AND_EXPR:
5114 : 25 : {
5115 : 25 : tree _q50 = TREE_OPERAND (_p1, 0);
5116 : 25 : tree _q51 = TREE_OPERAND (_p1, 1);
5117 : 25 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5118 : : {
5119 : 0 : switch (TREE_CODE (_q51))
5120 : : {
5121 : 0 : case BIT_NOT_EXPR:
5122 : 0 : {
5123 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
5124 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
5125 : : {
5126 : 0 : {
5127 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
5128 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5129 : 0 : if (res) return res;
5130 : : }
5131 : : }
5132 : : break;
5133 : : }
5134 : : default:;
5135 : : }
5136 : : }
5137 : 25 : switch (TREE_CODE (_q50))
5138 : : {
5139 : 0 : case BIT_NOT_EXPR:
5140 : 0 : {
5141 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
5142 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
5143 : : {
5144 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
5145 : : {
5146 : 0 : {
5147 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
5148 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5149 : 0 : if (res) return res;
5150 : : }
5151 : : }
5152 : : }
5153 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5154 : : {
5155 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5156 : : {
5157 : 0 : {
5158 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
5159 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5160 : 0 : if (res) return res;
5161 : : }
5162 : : }
5163 : : }
5164 : : break;
5165 : : }
5166 : 25 : default:;
5167 : : }
5168 : 25 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
5169 : : {
5170 : 0 : switch (TREE_CODE (_q51))
5171 : : {
5172 : 0 : case BIT_NOT_EXPR:
5173 : 0 : {
5174 : 0 : tree _q70 = TREE_OPERAND (_q51, 0);
5175 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5176 : : {
5177 : 0 : {
5178 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
5179 : 0 : tree res = generic_simplify_43 (loc, type, _p0, _p1, captures);
5180 : 0 : if (res) return res;
5181 : : }
5182 : : }
5183 : : break;
5184 : : }
5185 : : default:;
5186 : : }
5187 : : }
5188 : : break;
5189 : : }
5190 : 2 : case PLUS_EXPR:
5191 : 2 : {
5192 : 2 : tree _q50 = TREE_OPERAND (_p1, 0);
5193 : 2 : tree _q51 = TREE_OPERAND (_p1, 1);
5194 : 2 : switch (TREE_CODE (_q50))
5195 : : {
5196 : 2 : case BIT_IOR_EXPR:
5197 : 2 : {
5198 : 2 : tree _q60 = TREE_OPERAND (_q50, 0);
5199 : 2 : tree _q61 = TREE_OPERAND (_q50, 1);
5200 : 2 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
5201 : : {
5202 : 2 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
5203 : : {
5204 : 2 : if (integer_onep (_q51))
5205 : : {
5206 : 2 : {
5207 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5208 : 2 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5209 : 2 : if (res) return res;
5210 : : }
5211 : : }
5212 : : }
5213 : : }
5214 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
5215 : : {
5216 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
5217 : : {
5218 : 0 : if (integer_onep (_q51))
5219 : : {
5220 : 0 : {
5221 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5222 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5223 : 0 : if (res) return res;
5224 : : }
5225 : : }
5226 : : }
5227 : : }
5228 : : break;
5229 : : }
5230 : 0 : default:;
5231 : : }
5232 : 0 : {
5233 : 0 : tree _q50_pops[1];
5234 : 0 : if (tree_nop_convert (_q50, _q50_pops))
5235 : : {
5236 : 0 : tree _q60 = _q50_pops[0];
5237 : 0 : switch (TREE_CODE (_q60))
5238 : : {
5239 : 0 : case BIT_IOR_EXPR:
5240 : 0 : {
5241 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5242 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5243 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5244 : : {
5245 : 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
5246 : : {
5247 : 0 : if (integer_onep (_q51))
5248 : : {
5249 : 0 : {
5250 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5251 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5252 : 0 : if (res) return res;
5253 : : }
5254 : : }
5255 : : }
5256 : : }
5257 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
5258 : : {
5259 : 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
5260 : : {
5261 : 0 : if (integer_onep (_q51))
5262 : : {
5263 : 0 : {
5264 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
5265 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5266 : 0 : if (res) return res;
5267 : : }
5268 : : }
5269 : : }
5270 : : }
5271 : : break;
5272 : : }
5273 : : default:;
5274 : : }
5275 : : }
5276 : : }
5277 : 0 : break;
5278 : : }
5279 : 1164 : default:;
5280 : : }
5281 : 1164 : {
5282 : 1164 : tree _p1_pops[1];
5283 : 1164 : if (tree_nop_convert (_p1, _p1_pops))
5284 : : {
5285 : 7 : tree _q50 = _p1_pops[0];
5286 : 7 : switch (TREE_CODE (_q50))
5287 : : {
5288 : 0 : case PLUS_EXPR:
5289 : 0 : {
5290 : 0 : tree _q60 = TREE_OPERAND (_q50, 0);
5291 : 0 : tree _q61 = TREE_OPERAND (_q50, 1);
5292 : 0 : switch (TREE_CODE (_q60))
5293 : : {
5294 : 0 : case BIT_IOR_EXPR:
5295 : 0 : {
5296 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5297 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5298 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
5299 : : {
5300 : 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
5301 : : {
5302 : 0 : if (integer_onep (_q61))
5303 : : {
5304 : 0 : {
5305 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5306 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5307 : 0 : if (res) return res;
5308 : : }
5309 : : }
5310 : : }
5311 : : }
5312 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
5313 : : {
5314 : 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
5315 : : {
5316 : 0 : if (integer_onep (_q61))
5317 : : {
5318 : 0 : {
5319 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5320 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5321 : 0 : if (res) return res;
5322 : : }
5323 : : }
5324 : : }
5325 : : }
5326 : : break;
5327 : : }
5328 : 0 : default:;
5329 : : }
5330 : 0 : {
5331 : 0 : tree _q60_pops[1];
5332 : 0 : if (tree_nop_convert (_q60, _q60_pops))
5333 : : {
5334 : 0 : tree _q70 = _q60_pops[0];
5335 : 0 : switch (TREE_CODE (_q70))
5336 : : {
5337 : 0 : case BIT_IOR_EXPR:
5338 : 0 : {
5339 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5340 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5341 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
5342 : : {
5343 : 0 : if ((_q81 == _q21 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q21, 0) && types_match (_q81, _q21)))
5344 : : {
5345 : 0 : if (integer_onep (_q61))
5346 : : {
5347 : 0 : {
5348 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5349 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5350 : 0 : if (res) return res;
5351 : : }
5352 : : }
5353 : : }
5354 : : }
5355 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
5356 : : {
5357 : 0 : if ((_q81 == _q20 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q20, 0) && types_match (_q81, _q20)))
5358 : : {
5359 : 0 : if (integer_onep (_q61))
5360 : : {
5361 : 0 : {
5362 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
5363 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5364 : 0 : if (res) return res;
5365 : : }
5366 : : }
5367 : : }
5368 : : }
5369 : : break;
5370 : : }
5371 : : default:;
5372 : : }
5373 : : }
5374 : : }
5375 : 0 : break;
5376 : : }
5377 : : default:;
5378 : : }
5379 : : }
5380 : : }
5381 : 1164 : break;
5382 : : }
5383 : 2837 : case BIT_NOT_EXPR:
5384 : 2837 : {
5385 : 2837 : tree _q20 = TREE_OPERAND (_p0, 0);
5386 : 2837 : switch (TREE_CODE (_p1))
5387 : : {
5388 : 22 : case BIT_NOT_EXPR:
5389 : 22 : {
5390 : 22 : tree _q40 = TREE_OPERAND (_p1, 0);
5391 : 22 : {
5392 : 22 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
5393 : 22 : if (!TYPE_OVERFLOW_SANITIZED (type)
5394 : : )
5395 : : {
5396 : 9 : {
5397 : 9 : tree utype = unsigned_type_for (type);
5398 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1320;
5399 : 9 : {
5400 : 9 : tree res_op0;
5401 : 9 : {
5402 : 9 : tree _o1[2], _r1;
5403 : 9 : {
5404 : 9 : tree _o2[1], _r2;
5405 : 9 : _o2[0] = captures[1];
5406 : 9 : if (TREE_TYPE (_o2[0]) != utype)
5407 : : {
5408 : 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
5409 : : }
5410 : : else
5411 : : _r2 = _o2[0];
5412 : 9 : _o1[0] = _r2;
5413 : : }
5414 : 9 : {
5415 : 9 : tree _o2[1], _r2;
5416 : 9 : _o2[0] = captures[0];
5417 : 9 : if (TREE_TYPE (_o2[0]) != utype)
5418 : : {
5419 : 9 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
5420 : : }
5421 : : else
5422 : : _r2 = _o2[0];
5423 : 9 : _o1[1] = _r2;
5424 : : }
5425 : 9 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5426 : 9 : res_op0 = _r1;
5427 : : }
5428 : 9 : tree _r;
5429 : 9 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
5430 : 9 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
5431 : 9 : return _r;
5432 : : }
5433 : 0 : next_after_fail1320:;
5434 : : }
5435 : : }
5436 : : }
5437 : 13 : break;
5438 : : }
5439 : : default:;
5440 : : }
5441 : : break;
5442 : : }
5443 : 2187757 : case PLUS_EXPR:
5444 : 2187757 : {
5445 : 2187757 : tree _q20 = TREE_OPERAND (_p0, 0);
5446 : 2187757 : tree _q21 = TREE_OPERAND (_p0, 1);
5447 : 2187757 : switch (TREE_CODE (_p1))
5448 : : {
5449 : 14 : case BIT_IOR_EXPR:
5450 : 14 : {
5451 : 14 : tree _q50 = TREE_OPERAND (_p1, 0);
5452 : 14 : tree _q51 = TREE_OPERAND (_p1, 1);
5453 : 14 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5454 : : {
5455 : 13 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5456 : : {
5457 : 13 : {
5458 : 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5459 : 13 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
5460 : 13 : && !TYPE_SATURATING (type)
5461 : : )
5462 : : {
5463 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1321;
5464 : 0 : {
5465 : 0 : tree res_op0;
5466 : 0 : res_op0 = captures[0];
5467 : 0 : tree res_op1;
5468 : 0 : res_op1 = captures[1];
5469 : 0 : tree _r;
5470 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
5471 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 925, __FILE__, __LINE__, true);
5472 : 0 : return _r;
5473 : : }
5474 : 0 : next_after_fail1321:;
5475 : : }
5476 : : }
5477 : : }
5478 : : }
5479 : : break;
5480 : : }
5481 : 68 : case BIT_AND_EXPR:
5482 : 68 : {
5483 : 68 : tree _q50 = TREE_OPERAND (_p1, 0);
5484 : 68 : tree _q51 = TREE_OPERAND (_p1, 1);
5485 : 68 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5486 : : {
5487 : 25 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5488 : : {
5489 : 13 : {
5490 : 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5491 : 13 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
5492 : 13 : && !TYPE_SATURATING (type)
5493 : : )
5494 : : {
5495 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1322;
5496 : 0 : {
5497 : 0 : tree res_op0;
5498 : 0 : res_op0 = captures[0];
5499 : 0 : tree res_op1;
5500 : 0 : res_op1 = captures[1];
5501 : 0 : tree _r;
5502 : 0 : _r = fold_build2_loc (loc, BIT_IOR_EXPR, type, res_op0, res_op1);
5503 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
5504 : 0 : return _r;
5505 : : }
5506 : 0 : next_after_fail1322:;
5507 : : }
5508 : : }
5509 : : }
5510 : : }
5511 : : break;
5512 : : }
5513 : 2187757 : default:;
5514 : : }
5515 : 2187757 : switch (TREE_CODE (_q20))
5516 : : {
5517 : 593 : case BIT_AND_EXPR:
5518 : 593 : {
5519 : 593 : tree _q30 = TREE_OPERAND (_q20, 0);
5520 : 593 : tree _q31 = TREE_OPERAND (_q20, 1);
5521 : 593 : if (integer_all_onesp (_q21))
5522 : : {
5523 : 1 : switch (TREE_CODE (_p1))
5524 : : {
5525 : 1 : case BIT_IOR_EXPR:
5526 : 1 : {
5527 : 1 : tree _q70 = TREE_OPERAND (_p1, 0);
5528 : 1 : tree _q71 = TREE_OPERAND (_p1, 1);
5529 : 1 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
5530 : : {
5531 : 1 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
5532 : : {
5533 : 1 : {
5534 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
5535 : 1 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5536 : 1 : if (res) return res;
5537 : : }
5538 : : }
5539 : : }
5540 : 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
5541 : : {
5542 : 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
5543 : : {
5544 : 0 : {
5545 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
5546 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5547 : 0 : if (res) return res;
5548 : : }
5549 : : }
5550 : : }
5551 : : break;
5552 : : }
5553 : 0 : default:;
5554 : : }
5555 : 0 : {
5556 : 0 : tree _p1_pops[1];
5557 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5558 : : {
5559 : 0 : tree _q70 = _p1_pops[0];
5560 : 0 : switch (TREE_CODE (_q70))
5561 : : {
5562 : 0 : case BIT_IOR_EXPR:
5563 : 0 : {
5564 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
5565 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
5566 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
5567 : : {
5568 : 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
5569 : : {
5570 : 0 : {
5571 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
5572 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5573 : 0 : if (res) return res;
5574 : : }
5575 : : }
5576 : : }
5577 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
5578 : : {
5579 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
5580 : : {
5581 : 0 : {
5582 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
5583 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5584 : 0 : if (res) return res;
5585 : : }
5586 : : }
5587 : : }
5588 : : break;
5589 : : }
5590 : : default:;
5591 : : }
5592 : : }
5593 : : }
5594 : : }
5595 : : break;
5596 : : }
5597 : 2187756 : default:;
5598 : : }
5599 : 2187756 : {
5600 : 2187756 : tree _q20_pops[1];
5601 : 2187756 : if (tree_nop_convert (_q20, _q20_pops))
5602 : : {
5603 : 547110 : tree _q30 = _q20_pops[0];
5604 : 547110 : switch (TREE_CODE (_q30))
5605 : : {
5606 : 0 : case BIT_AND_EXPR:
5607 : 0 : {
5608 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
5609 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
5610 : 0 : if (integer_all_onesp (_q21))
5611 : : {
5612 : 0 : switch (TREE_CODE (_p1))
5613 : : {
5614 : 0 : case BIT_IOR_EXPR:
5615 : 0 : {
5616 : 0 : tree _q80 = TREE_OPERAND (_p1, 0);
5617 : 0 : tree _q81 = TREE_OPERAND (_p1, 1);
5618 : 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
5619 : : {
5620 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
5621 : : {
5622 : 0 : {
5623 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
5624 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5625 : 0 : if (res) return res;
5626 : : }
5627 : : }
5628 : : }
5629 : 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
5630 : : {
5631 : 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
5632 : : {
5633 : 0 : {
5634 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
5635 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5636 : 0 : if (res) return res;
5637 : : }
5638 : : }
5639 : : }
5640 : : break;
5641 : : }
5642 : 0 : default:;
5643 : : }
5644 : 0 : {
5645 : 0 : tree _p1_pops[1];
5646 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5647 : : {
5648 : 0 : tree _q80 = _p1_pops[0];
5649 : 0 : switch (TREE_CODE (_q80))
5650 : : {
5651 : 0 : case BIT_IOR_EXPR:
5652 : 0 : {
5653 : 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5654 : 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5655 : 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
5656 : : {
5657 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
5658 : : {
5659 : 0 : {
5660 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
5661 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5662 : 0 : if (res) return res;
5663 : : }
5664 : : }
5665 : : }
5666 : 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
5667 : : {
5668 : 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
5669 : : {
5670 : 0 : {
5671 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
5672 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5673 : 0 : if (res) return res;
5674 : : }
5675 : : }
5676 : : }
5677 : : break;
5678 : : }
5679 : : default:;
5680 : : }
5681 : : }
5682 : : }
5683 : : }
5684 : : break;
5685 : : }
5686 : : default:;
5687 : : }
5688 : : }
5689 : : }
5690 : 2187756 : break;
5691 : : }
5692 : 77 : case BIT_IOR_EXPR:
5693 : 77 : {
5694 : 77 : tree _q20 = TREE_OPERAND (_p0, 0);
5695 : 77 : tree _q21 = TREE_OPERAND (_p0, 1);
5696 : 77 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
5697 : : {
5698 : 5 : {
5699 : 5 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
5700 : 5 : tree res = generic_simplify_46 (loc, type, _p0, _p1, captures);
5701 : 5 : if (res) return res;
5702 : : }
5703 : : }
5704 : 72 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
5705 : : {
5706 : 0 : {
5707 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
5708 : 0 : tree res = generic_simplify_46 (loc, type, _p0, _p1, captures);
5709 : 0 : if (res) return res;
5710 : : }
5711 : : }
5712 : 72 : switch (TREE_CODE (_p1))
5713 : : {
5714 : 0 : case BIT_XOR_EXPR:
5715 : 0 : {
5716 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5717 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5718 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5719 : : {
5720 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5721 : : {
5722 : 0 : {
5723 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5724 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1323;
5725 : 0 : {
5726 : 0 : tree res_op0;
5727 : 0 : res_op0 = captures[0];
5728 : 0 : tree res_op1;
5729 : 0 : res_op1 = captures[1];
5730 : 0 : tree _r;
5731 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
5732 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
5733 : 0 : return _r;
5734 : : }
5735 : 0 : next_after_fail1323:;
5736 : : }
5737 : : }
5738 : : }
5739 : : break;
5740 : : }
5741 : 0 : case BIT_AND_EXPR:
5742 : 0 : {
5743 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
5744 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
5745 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
5746 : : {
5747 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
5748 : : {
5749 : 0 : {
5750 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5751 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1324;
5752 : 0 : {
5753 : 0 : tree res_op0;
5754 : 0 : res_op0 = captures[0];
5755 : 0 : tree res_op1;
5756 : 0 : res_op1 = captures[1];
5757 : 0 : tree _r;
5758 : 0 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
5759 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
5760 : 0 : return _r;
5761 : : }
5762 : 0 : next_after_fail1324:;
5763 : : }
5764 : : }
5765 : : }
5766 : : break;
5767 : : }
5768 : : default:;
5769 : : }
5770 : : break;
5771 : : }
5772 : 29567482 : default:;
5773 : : }
5774 : 29567482 : {
5775 : 29567482 : tree _p0_pops[1];
5776 : 29567482 : if (tree_nop_convert (_p0, _p0_pops))
5777 : : {
5778 : 7009978 : tree _q20 = _p0_pops[0];
5779 : 7009978 : switch (TREE_CODE (_q20))
5780 : : {
5781 : 949091 : case PLUS_EXPR:
5782 : 949091 : {
5783 : 949091 : tree _q30 = TREE_OPERAND (_q20, 0);
5784 : 949091 : tree _q31 = TREE_OPERAND (_q20, 1);
5785 : 949091 : switch (TREE_CODE (_q30))
5786 : : {
5787 : 344 : case BIT_AND_EXPR:
5788 : 344 : {
5789 : 344 : tree _q40 = TREE_OPERAND (_q30, 0);
5790 : 344 : tree _q41 = TREE_OPERAND (_q30, 1);
5791 : 344 : if (integer_all_onesp (_q31))
5792 : : {
5793 : 0 : switch (TREE_CODE (_p1))
5794 : : {
5795 : 0 : case BIT_IOR_EXPR:
5796 : 0 : {
5797 : 0 : tree _q80 = TREE_OPERAND (_p1, 0);
5798 : 0 : tree _q81 = TREE_OPERAND (_p1, 1);
5799 : 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
5800 : : {
5801 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
5802 : : {
5803 : 0 : {
5804 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
5805 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5806 : 0 : if (res) return res;
5807 : : }
5808 : : }
5809 : : }
5810 : 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
5811 : : {
5812 : 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
5813 : : {
5814 : 0 : {
5815 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
5816 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5817 : 0 : if (res) return res;
5818 : : }
5819 : : }
5820 : : }
5821 : : break;
5822 : : }
5823 : 0 : default:;
5824 : : }
5825 : 0 : {
5826 : 0 : tree _p1_pops[1];
5827 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5828 : : {
5829 : 0 : tree _q80 = _p1_pops[0];
5830 : 0 : switch (TREE_CODE (_q80))
5831 : : {
5832 : 0 : case BIT_IOR_EXPR:
5833 : 0 : {
5834 : 0 : tree _q90 = TREE_OPERAND (_q80, 0);
5835 : 0 : tree _q91 = TREE_OPERAND (_q80, 1);
5836 : 0 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
5837 : : {
5838 : 0 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
5839 : : {
5840 : 0 : {
5841 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
5842 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5843 : 0 : if (res) return res;
5844 : : }
5845 : : }
5846 : : }
5847 : 0 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
5848 : : {
5849 : 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
5850 : : {
5851 : 0 : {
5852 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
5853 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5854 : 0 : if (res) return res;
5855 : : }
5856 : : }
5857 : : }
5858 : : break;
5859 : : }
5860 : : default:;
5861 : : }
5862 : : }
5863 : : }
5864 : : }
5865 : : break;
5866 : : }
5867 : 949091 : default:;
5868 : : }
5869 : 949091 : {
5870 : 949091 : tree _q30_pops[1];
5871 : 949091 : if (tree_nop_convert (_q30, _q30_pops))
5872 : : {
5873 : 47635 : tree _q40 = _q30_pops[0];
5874 : 47635 : switch (TREE_CODE (_q40))
5875 : : {
5876 : 0 : case BIT_AND_EXPR:
5877 : 0 : {
5878 : 0 : tree _q50 = TREE_OPERAND (_q40, 0);
5879 : 0 : tree _q51 = TREE_OPERAND (_q40, 1);
5880 : 0 : if (integer_all_onesp (_q31))
5881 : : {
5882 : 0 : switch (TREE_CODE (_p1))
5883 : : {
5884 : 0 : case BIT_IOR_EXPR:
5885 : 0 : {
5886 : 0 : tree _q90 = TREE_OPERAND (_p1, 0);
5887 : 0 : tree _q91 = TREE_OPERAND (_p1, 1);
5888 : 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
5889 : : {
5890 : 0 : if ((_q91 == _q51 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q51, 0) && types_match (_q91, _q51)))
5891 : : {
5892 : 0 : {
5893 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5894 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5895 : 0 : if (res) return res;
5896 : : }
5897 : : }
5898 : : }
5899 : 0 : if ((_q90 == _q51 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q51, 0) && types_match (_q90, _q51)))
5900 : : {
5901 : 0 : if ((_q91 == _q50 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q50, 0) && types_match (_q91, _q50)))
5902 : : {
5903 : 0 : {
5904 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
5905 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5906 : 0 : if (res) return res;
5907 : : }
5908 : : }
5909 : : }
5910 : : break;
5911 : : }
5912 : 0 : default:;
5913 : : }
5914 : 0 : {
5915 : 0 : tree _p1_pops[1];
5916 : 0 : if (tree_nop_convert (_p1, _p1_pops))
5917 : : {
5918 : 0 : tree _q90 = _p1_pops[0];
5919 : 0 : switch (TREE_CODE (_q90))
5920 : : {
5921 : 0 : case BIT_IOR_EXPR:
5922 : 0 : {
5923 : 0 : tree _q100 = TREE_OPERAND (_q90, 0);
5924 : 0 : tree _q101 = TREE_OPERAND (_q90, 1);
5925 : 0 : if ((_q100 == _q50 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q50, 0) && types_match (_q100, _q50)))
5926 : : {
5927 : 0 : if ((_q101 == _q51 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q51, 0) && types_match (_q101, _q51)))
5928 : : {
5929 : 0 : {
5930 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
5931 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5932 : 0 : if (res) return res;
5933 : : }
5934 : : }
5935 : : }
5936 : 0 : if ((_q100 == _q51 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q51, 0) && types_match (_q100, _q51)))
5937 : : {
5938 : 0 : if ((_q101 == _q50 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q50, 0) && types_match (_q101, _q50)))
5939 : : {
5940 : 0 : {
5941 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
5942 : 0 : tree res = generic_simplify_45 (loc, type, _p0, _p1, captures);
5943 : 0 : if (res) return res;
5944 : : }
5945 : : }
5946 : : }
5947 : : break;
5948 : : }
5949 : : default:;
5950 : : }
5951 : : }
5952 : : }
5953 : : }
5954 : : break;
5955 : : }
5956 : : default:;
5957 : : }
5958 : : }
5959 : : }
5960 : 949091 : break;
5961 : : }
5962 : 14 : case BIT_AND_EXPR:
5963 : 14 : {
5964 : 14 : tree _q30 = TREE_OPERAND (_q20, 0);
5965 : 14 : tree _q31 = TREE_OPERAND (_q20, 1);
5966 : 14 : switch (TREE_CODE (_p1))
5967 : : {
5968 : 0 : case PLUS_EXPR:
5969 : 0 : {
5970 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
5971 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
5972 : 0 : switch (TREE_CODE (_q60))
5973 : : {
5974 : 0 : case BIT_IOR_EXPR:
5975 : 0 : {
5976 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
5977 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
5978 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
5979 : : {
5980 : 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
5981 : : {
5982 : 0 : if (integer_onep (_q61))
5983 : : {
5984 : 0 : {
5985 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
5986 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
5987 : 0 : if (res) return res;
5988 : : }
5989 : : }
5990 : : }
5991 : : }
5992 : 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
5993 : : {
5994 : 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
5995 : : {
5996 : 0 : if (integer_onep (_q61))
5997 : : {
5998 : 0 : {
5999 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6000 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6001 : 0 : if (res) return res;
6002 : : }
6003 : : }
6004 : : }
6005 : : }
6006 : : break;
6007 : : }
6008 : 0 : default:;
6009 : : }
6010 : 0 : {
6011 : 0 : tree _q60_pops[1];
6012 : 0 : if (tree_nop_convert (_q60, _q60_pops))
6013 : : {
6014 : 0 : tree _q70 = _q60_pops[0];
6015 : 0 : switch (TREE_CODE (_q70))
6016 : : {
6017 : 0 : case BIT_IOR_EXPR:
6018 : 0 : {
6019 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
6020 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
6021 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
6022 : : {
6023 : 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
6024 : : {
6025 : 0 : if (integer_onep (_q61))
6026 : : {
6027 : 0 : {
6028 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6029 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6030 : 0 : if (res) return res;
6031 : : }
6032 : : }
6033 : : }
6034 : : }
6035 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
6036 : : {
6037 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
6038 : : {
6039 : 0 : if (integer_onep (_q61))
6040 : : {
6041 : 0 : {
6042 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
6043 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6044 : 0 : if (res) return res;
6045 : : }
6046 : : }
6047 : : }
6048 : : }
6049 : : break;
6050 : : }
6051 : : default:;
6052 : : }
6053 : : }
6054 : : }
6055 : 0 : break;
6056 : : }
6057 : 14 : default:;
6058 : : }
6059 : 14 : {
6060 : 14 : tree _p1_pops[1];
6061 : 14 : if (tree_nop_convert (_p1, _p1_pops))
6062 : : {
6063 : 14 : tree _q60 = _p1_pops[0];
6064 : 14 : switch (TREE_CODE (_q60))
6065 : : {
6066 : 0 : case PLUS_EXPR:
6067 : 0 : {
6068 : 0 : tree _q70 = TREE_OPERAND (_q60, 0);
6069 : 0 : tree _q71 = TREE_OPERAND (_q60, 1);
6070 : 0 : switch (TREE_CODE (_q70))
6071 : : {
6072 : 0 : case BIT_IOR_EXPR:
6073 : 0 : {
6074 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
6075 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
6076 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
6077 : : {
6078 : 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
6079 : : {
6080 : 0 : if (integer_onep (_q71))
6081 : : {
6082 : 0 : {
6083 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6084 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6085 : 0 : if (res) return res;
6086 : : }
6087 : : }
6088 : : }
6089 : : }
6090 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
6091 : : {
6092 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
6093 : : {
6094 : 0 : if (integer_onep (_q71))
6095 : : {
6096 : 0 : {
6097 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6098 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6099 : 0 : if (res) return res;
6100 : : }
6101 : : }
6102 : : }
6103 : : }
6104 : : break;
6105 : : }
6106 : 0 : default:;
6107 : : }
6108 : 0 : {
6109 : 0 : tree _q70_pops[1];
6110 : 0 : if (tree_nop_convert (_q70, _q70_pops))
6111 : : {
6112 : 0 : tree _q80 = _q70_pops[0];
6113 : 0 : switch (TREE_CODE (_q80))
6114 : : {
6115 : 0 : case BIT_IOR_EXPR:
6116 : 0 : {
6117 : 0 : tree _q90 = TREE_OPERAND (_q80, 0);
6118 : 0 : tree _q91 = TREE_OPERAND (_q80, 1);
6119 : 0 : if ((_q90 == _q30 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q30, 0) && types_match (_q90, _q30)))
6120 : : {
6121 : 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
6122 : : {
6123 : 0 : if (integer_onep (_q71))
6124 : : {
6125 : 0 : {
6126 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6127 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6128 : 0 : if (res) return res;
6129 : : }
6130 : : }
6131 : : }
6132 : : }
6133 : 0 : if ((_q90 == _q31 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q31, 0) && types_match (_q90, _q31)))
6134 : : {
6135 : 0 : if ((_q91 == _q30 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q30, 0) && types_match (_q91, _q30)))
6136 : : {
6137 : 0 : if (integer_onep (_q71))
6138 : : {
6139 : 0 : {
6140 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6141 : 0 : tree res = generic_simplify_44 (loc, type, _p0, _p1, captures);
6142 : 0 : if (res) return res;
6143 : : }
6144 : : }
6145 : : }
6146 : : }
6147 : : break;
6148 : : }
6149 : : default:;
6150 : : }
6151 : : }
6152 : : }
6153 : 0 : break;
6154 : : }
6155 : : default:;
6156 : : }
6157 : : }
6158 : : }
6159 : 14 : break;
6160 : : }
6161 : : default:;
6162 : : }
6163 : : }
6164 : : }
6165 : 29567482 : if (tree_negate_expr_p (_p1))
6166 : : {
6167 : 7258312 : {
6168 : 7258312 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6169 : 7258312 : if (!FIXED_POINT_TYPE_P (type)
6170 : : )
6171 : : {
6172 : 7258312 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1325;
6173 : 7258312 : {
6174 : 7258312 : tree res_op0;
6175 : 7258312 : res_op0 = captures[0];
6176 : 7258312 : tree res_op1;
6177 : 7258312 : {
6178 : 7258312 : tree _o1[1], _r1;
6179 : 7258312 : _o1[0] = captures[1];
6180 : 7258312 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
6181 : 7258312 : res_op1 = _r1;
6182 : : }
6183 : 7258312 : tree _r;
6184 : 7258312 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
6185 : 7258312 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 929, __FILE__, __LINE__, true);
6186 : 7258312 : return _r;
6187 : : }
6188 : 0 : next_after_fail1325:;
6189 : : }
6190 : : }
6191 : : }
6192 : 22309170 : switch (TREE_CODE (_p0))
6193 : : {
6194 : 4637551 : CASE_CONVERT:
6195 : 4637551 : {
6196 : 4637551 : tree _q20 = TREE_OPERAND (_p0, 0);
6197 : 4637551 : switch (TREE_CODE (_p1))
6198 : : {
6199 : 3856642 : CASE_CONVERT:
6200 : 3856642 : {
6201 : 3856642 : tree _q40 = TREE_OPERAND (_p1, 0);
6202 : 3856642 : switch (TREE_CODE (_q40))
6203 : : {
6204 : 15 : case BIT_AND_EXPR:
6205 : 15 : {
6206 : 15 : tree _q50 = TREE_OPERAND (_q40, 0);
6207 : 15 : tree _q51 = TREE_OPERAND (_q40, 1);
6208 : 15 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
6209 : : {
6210 : 0 : {
6211 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q50, _p1, _q40, _q51, _q20 };
6212 : 0 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6213 : 0 : if (res) return res;
6214 : : }
6215 : : }
6216 : 15 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
6217 : : {
6218 : 1 : {
6219 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _q51, _p1, _q40, _q50, _q20 };
6220 : 1 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6221 : 1 : if (res) return res;
6222 : : }
6223 : : }
6224 : : break;
6225 : : }
6226 : : default:;
6227 : : }
6228 : : break;
6229 : : }
6230 : 4849 : case BIT_AND_EXPR:
6231 : 4849 : {
6232 : 4849 : tree _q40 = TREE_OPERAND (_p1, 0);
6233 : 4849 : tree _q41 = TREE_OPERAND (_p1, 1);
6234 : 4849 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _q20, 0))
6235 : : {
6236 : 0 : {
6237 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _p1, _q41, _q20 };
6238 : 0 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6239 : 0 : if (res) return res;
6240 : : }
6241 : : }
6242 : 4849 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q20, 0))
6243 : : {
6244 : 21 : {
6245 : 21 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _p1, _q40, _q20 };
6246 : 21 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6247 : 21 : if (res) return res;
6248 : : }
6249 : : }
6250 : : break;
6251 : : }
6252 : 4637529 : default:;
6253 : : }
6254 : 4637529 : switch (TREE_CODE (_q20))
6255 : : {
6256 : 119409 : case ADDR_EXPR:
6257 : 119409 : {
6258 : 119409 : switch (TREE_CODE (_p1))
6259 : : {
6260 : 112493 : CASE_CONVERT:
6261 : 112493 : {
6262 : 112493 : tree _q40 = TREE_OPERAND (_p1, 0);
6263 : 112493 : switch (TREE_CODE (_q40))
6264 : : {
6265 : 30781 : case POINTER_PLUS_EXPR:
6266 : 30781 : {
6267 : 30781 : tree _q50 = TREE_OPERAND (_q40, 0);
6268 : 30781 : tree _q51 = TREE_OPERAND (_q40, 1);
6269 : 30781 : {
6270 : 30781 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
6271 : 30781 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6272 : : )
6273 : : {
6274 : 30781 : {
6275 : 30781 : poly_int64 diff;
6276 : 30781 : if (ptr_difference_const (captures[0], captures[1], &diff)
6277 : : )
6278 : : {
6279 : 13520 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1326;
6280 : 13520 : {
6281 : 13520 : tree res_op0;
6282 : 13520 : res_op0 = build_int_cst_type (type, diff);
6283 : 13520 : tree res_op1;
6284 : 13520 : {
6285 : 13520 : tree _o1[1], _r1;
6286 : 13520 : _o1[0] = captures[2];
6287 : 13520 : if (TREE_TYPE (_o1[0]) != type)
6288 : : {
6289 : 13520 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
6290 : : }
6291 : : else
6292 : : _r1 = _o1[0];
6293 : 13520 : res_op1 = _r1;
6294 : : }
6295 : 13520 : tree _r;
6296 : 13520 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6297 : 13520 : if (TREE_SIDE_EFFECTS (captures[0]))
6298 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6299 : 13520 : if (TREE_SIDE_EFFECTS (captures[1]))
6300 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6301 : 13520 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 930, __FILE__, __LINE__, true);
6302 : 13520 : return _r;
6303 : : }
6304 : 0 : next_after_fail1326:;
6305 : : }
6306 : : }
6307 : : }
6308 : : }
6309 : 17261 : break;
6310 : : }
6311 : 98973 : default:;
6312 : : }
6313 : 98973 : {
6314 : 98973 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6315 : 98973 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6316 : : )
6317 : : {
6318 : 98973 : {
6319 : 98973 : poly_int64 diff;
6320 : 98973 : if (ptr_difference_const (captures[0], captures[1], &diff)
6321 : : )
6322 : : {
6323 : 57595 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1327;
6324 : 57595 : {
6325 : 57595 : tree _r;
6326 : 57595 : _r = build_int_cst_type (type, diff);
6327 : 57595 : if (TREE_SIDE_EFFECTS (captures[0]))
6328 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6329 : 57595 : if (TREE_SIDE_EFFECTS (captures[1]))
6330 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6331 : 57595 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 931, __FILE__, __LINE__, true);
6332 : 57595 : return _r;
6333 : : }
6334 : 0 : next_after_fail1327:;
6335 : : }
6336 : : }
6337 : : }
6338 : : }
6339 : 41378 : break;
6340 : : }
6341 : : default:;
6342 : : }
6343 : : break;
6344 : : }
6345 : 81849 : case POINTER_PLUS_EXPR:
6346 : 81849 : {
6347 : 81849 : tree _q30 = TREE_OPERAND (_q20, 0);
6348 : 81849 : tree _q31 = TREE_OPERAND (_q20, 1);
6349 : 81849 : switch (TREE_CODE (_p1))
6350 : : {
6351 : 80708 : CASE_CONVERT:
6352 : 80708 : {
6353 : 80708 : tree _q60 = TREE_OPERAND (_p1, 0);
6354 : 80708 : switch (TREE_CODE (_q60))
6355 : : {
6356 : 3345 : case ADDR_EXPR:
6357 : 3345 : {
6358 : 3345 : {
6359 : 3345 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
6360 : 3345 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6361 : : )
6362 : : {
6363 : 3345 : {
6364 : 3345 : poly_int64 diff;
6365 : 3345 : if (ptr_difference_const (captures[0], captures[2], &diff)
6366 : : )
6367 : : {
6368 : 764 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1328;
6369 : 764 : {
6370 : 764 : tree res_op0;
6371 : 764 : {
6372 : 764 : tree _o1[1], _r1;
6373 : 764 : _o1[0] = captures[1];
6374 : 764 : if (TREE_TYPE (_o1[0]) != type)
6375 : : {
6376 : 487 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
6377 : : }
6378 : : else
6379 : : _r1 = _o1[0];
6380 : 764 : res_op0 = _r1;
6381 : : }
6382 : 764 : tree res_op1;
6383 : 764 : res_op1 = build_int_cst_type (type, diff);
6384 : 764 : tree _r;
6385 : 764 : _r = fold_build2_loc (loc, PLUS_EXPR, type, res_op0, res_op1);
6386 : 764 : if (TREE_SIDE_EFFECTS (captures[0]))
6387 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6388 : 764 : if (TREE_SIDE_EFFECTS (captures[2]))
6389 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6390 : 764 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 932, __FILE__, __LINE__, true);
6391 : 764 : return _r;
6392 : : }
6393 : 0 : next_after_fail1328:;
6394 : : }
6395 : : }
6396 : : }
6397 : : }
6398 : 2581 : break;
6399 : : }
6400 : : default:;
6401 : : }
6402 : : break;
6403 : : }
6404 : : default:;
6405 : : }
6406 : : break;
6407 : : }
6408 : 4565650 : default:;
6409 : : }
6410 : 4565650 : switch (TREE_CODE (_p1))
6411 : : {
6412 : 3784762 : CASE_CONVERT:
6413 : 3784762 : {
6414 : 3784762 : tree _q40 = TREE_OPERAND (_p1, 0);
6415 : 3784762 : switch (TREE_CODE (_q40))
6416 : : {
6417 : 52807 : case ADDR_EXPR:
6418 : 52807 : {
6419 : 52807 : {
6420 : 52807 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
6421 : 52807 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
6422 : : )
6423 : : {
6424 : 52786 : {
6425 : 52786 : poly_int64 diff;
6426 : 52786 : if (ptr_difference_const (captures[0], captures[1], &diff)
6427 : : )
6428 : : {
6429 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1329;
6430 : 0 : {
6431 : 0 : tree _r;
6432 : 0 : _r = build_int_cst_type (type, diff);
6433 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
6434 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6435 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
6436 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6437 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 933, __FILE__, __LINE__, true);
6438 : 0 : return _r;
6439 : : }
6440 : 0 : next_after_fail1329:;
6441 : : }
6442 : : }
6443 : : }
6444 : : }
6445 : 52807 : break;
6446 : : }
6447 : : default:;
6448 : : }
6449 : : break;
6450 : : }
6451 : : default:;
6452 : : }
6453 : : break;
6454 : : }
6455 : 22237269 : default:;
6456 : : }
6457 : 22237269 : if (integer_onep (_p0))
6458 : : {
6459 : 103688 : switch (TREE_CODE (_p1))
6460 : : {
6461 : 29124 : case SSA_NAME:
6462 : 29124 : {
6463 : 29124 : {
6464 : 29124 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6465 : 29124 : if (INTEGRAL_TYPE_P (type)
6466 : 29124 : && ssa_name_has_boolean_range (captures[1])
6467 : : )
6468 : : {
6469 : 217 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1330;
6470 : 217 : {
6471 : 217 : tree res_op0;
6472 : 217 : res_op0 = captures[1];
6473 : 217 : tree res_op1;
6474 : 217 : res_op1 = captures[0];
6475 : 217 : tree _r;
6476 : 217 : _r = fold_build2_loc (loc, BIT_XOR_EXPR, type, res_op0, res_op1);
6477 : 217 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 934, __FILE__, __LINE__, true);
6478 : 217 : return _r;
6479 : : }
6480 : 0 : next_after_fail1330:;
6481 : : }
6482 : : }
6483 : 28907 : break;
6484 : : }
6485 : : default:;
6486 : : }
6487 : : }
6488 : 22237052 : switch (TREE_CODE (_p1))
6489 : : {
6490 : 6923194 : CASE_CONVERT:
6491 : 6923194 : {
6492 : 6923194 : tree _q30 = TREE_OPERAND (_p1, 0);
6493 : 6923194 : switch (TREE_CODE (_q30))
6494 : : {
6495 : 14 : case BIT_AND_EXPR:
6496 : 14 : {
6497 : 14 : tree _q40 = TREE_OPERAND (_q30, 0);
6498 : 14 : tree _q41 = TREE_OPERAND (_q30, 1);
6499 : 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
6500 : : {
6501 : 0 : {
6502 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _q30, _q41, _p0 };
6503 : 0 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6504 : 0 : if (res) return res;
6505 : : }
6506 : : }
6507 : 14 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
6508 : : {
6509 : 0 : {
6510 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _q30, _q40, _p0 };
6511 : 0 : tree res = generic_simplify_47 (loc, type, _p0, _p1, captures);
6512 : 0 : if (res) return res;
6513 : : }
6514 : : }
6515 : : break;
6516 : : }
6517 : : default:;
6518 : : }
6519 : : break;
6520 : : }
6521 : 6849 : case BIT_AND_EXPR:
6522 : 6849 : {
6523 : 6849 : tree _q30 = TREE_OPERAND (_p1, 0);
6524 : 6849 : tree _q31 = TREE_OPERAND (_p1, 1);
6525 : 6849 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || operand_equal_p (_q30, _p0, 0))
6526 : : {
6527 : 217 : {
6528 : 217 : tree captures[5] ATTRIBUTE_UNUSED = { _q30, _p1, _p1, _q31, _p0 };
6529 : 217 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6530 : 217 : if (res) return res;
6531 : : }
6532 : : }
6533 : 6632 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _p0, 0))
6534 : : {
6535 : 38 : {
6536 : 38 : tree captures[5] ATTRIBUTE_UNUSED = { _q31, _p1, _p1, _q30, _p0 };
6537 : 38 : tree res = generic_simplify_48 (loc, type, _p0, _p1, captures);
6538 : 38 : if (res) return res;
6539 : : }
6540 : : }
6541 : : break;
6542 : : }
6543 : 22236797 : default:;
6544 : : }
6545 : 22236797 : switch (TREE_CODE (_p0))
6546 : : {
6547 : 1674492 : case PLUS_EXPR:
6548 : 1674492 : {
6549 : 1674492 : tree _q20 = TREE_OPERAND (_p0, 0);
6550 : 1674492 : tree _q21 = TREE_OPERAND (_p0, 1);
6551 : 1674492 : switch (TREE_CODE (_p1))
6552 : : {
6553 : 466466 : case PLUS_EXPR:
6554 : 466466 : {
6555 : 466466 : tree _q50 = TREE_OPERAND (_p1, 0);
6556 : 466466 : tree _q51 = TREE_OPERAND (_p1, 1);
6557 : 466466 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6558 : : {
6559 : 160213 : {
6560 : 160213 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6561 : 320426 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6562 : 320426 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6563 : 39069 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6564 : : )
6565 : : {
6566 : 160207 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1331;
6567 : 160207 : {
6568 : 160207 : tree res_op0;
6569 : 160207 : res_op0 = captures[0];
6570 : 160207 : tree res_op1;
6571 : 160207 : res_op1 = captures[2];
6572 : 160207 : tree _r;
6573 : 160207 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6574 : 160207 : if (TREE_SIDE_EFFECTS (captures[1]))
6575 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6576 : 160207 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 935, __FILE__, __LINE__, true);
6577 : 160207 : return _r;
6578 : : }
6579 : 0 : next_after_fail1331:;
6580 : : }
6581 : : }
6582 : : }
6583 : 306259 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
6584 : : {
6585 : 435 : {
6586 : 435 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6587 : 870 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6588 : 870 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6589 : 322 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6590 : : )
6591 : : {
6592 : 435 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1332;
6593 : 435 : {
6594 : 435 : tree res_op0;
6595 : 435 : res_op0 = captures[0];
6596 : 435 : tree res_op1;
6597 : 435 : res_op1 = captures[2];
6598 : 435 : tree _r;
6599 : 435 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6600 : 435 : if (TREE_SIDE_EFFECTS (captures[1]))
6601 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6602 : 435 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 935, __FILE__, __LINE__, true);
6603 : 435 : return _r;
6604 : : }
6605 : 0 : next_after_fail1332:;
6606 : : }
6607 : : }
6608 : : }
6609 : 305824 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
6610 : : {
6611 : 239 : {
6612 : 239 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
6613 : 478 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6614 : 478 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6615 : 150 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6616 : : )
6617 : : {
6618 : 239 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1333;
6619 : 239 : {
6620 : 239 : tree res_op0;
6621 : 239 : res_op0 = captures[0];
6622 : 239 : tree res_op1;
6623 : 239 : res_op1 = captures[2];
6624 : 239 : tree _r;
6625 : 239 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6626 : 239 : if (TREE_SIDE_EFFECTS (captures[1]))
6627 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6628 : 239 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 935, __FILE__, __LINE__, true);
6629 : 239 : return _r;
6630 : : }
6631 : 0 : next_after_fail1333:;
6632 : : }
6633 : : }
6634 : : }
6635 : 305585 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6636 : : {
6637 : 181016 : {
6638 : 181016 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
6639 : 362032 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6640 : 362032 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6641 : 140524 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6642 : : )
6643 : : {
6644 : 181016 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1334;
6645 : 181016 : {
6646 : 181016 : tree res_op0;
6647 : 181016 : res_op0 = captures[0];
6648 : 181016 : tree res_op1;
6649 : 181016 : res_op1 = captures[2];
6650 : 181016 : tree _r;
6651 : 181016 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6652 : 181016 : if (TREE_SIDE_EFFECTS (captures[1]))
6653 : 2 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6654 : 181016 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 935, __FILE__, __LINE__, true);
6655 : 181016 : return _r;
6656 : : }
6657 : 0 : next_after_fail1334:;
6658 : : }
6659 : : }
6660 : : }
6661 : : break;
6662 : : }
6663 : : default:;
6664 : : }
6665 : : break;
6666 : : }
6667 : 902757 : case MINUS_EXPR:
6668 : 902757 : {
6669 : 902757 : tree _q20 = TREE_OPERAND (_p0, 0);
6670 : 902757 : tree _q21 = TREE_OPERAND (_p0, 1);
6671 : 902757 : switch (TREE_CODE (_p1))
6672 : : {
6673 : 3919 : case MINUS_EXPR:
6674 : 3919 : {
6675 : 3919 : tree _q50 = TREE_OPERAND (_p1, 0);
6676 : 3919 : tree _q51 = TREE_OPERAND (_p1, 1);
6677 : 3919 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6678 : : {
6679 : 3877 : {
6680 : 3877 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
6681 : 7754 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6682 : 7754 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6683 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
6684 : : )
6685 : : {
6686 : 3877 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1335;
6687 : 3877 : {
6688 : 3877 : tree res_op0;
6689 : 3877 : res_op0 = captures[0];
6690 : 3877 : tree res_op1;
6691 : 3877 : res_op1 = captures[2];
6692 : 3877 : tree _r;
6693 : 3877 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6694 : 3877 : if (TREE_SIDE_EFFECTS (captures[1]))
6695 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6696 : 3877 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 936, __FILE__, __LINE__, true);
6697 : 3877 : return _r;
6698 : : }
6699 : 0 : next_after_fail1335:;
6700 : : }
6701 : : }
6702 : : }
6703 : 42 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6704 : : {
6705 : 0 : {
6706 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
6707 : 0 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
6708 : 0 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
6709 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
6710 : : )
6711 : : {
6712 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1336;
6713 : 0 : {
6714 : 0 : tree res_op0;
6715 : 0 : res_op0 = captures[2];
6716 : 0 : tree res_op1;
6717 : 0 : res_op1 = captures[1];
6718 : 0 : tree _r;
6719 : 0 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
6720 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
6721 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
6722 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 937, __FILE__, __LINE__, true);
6723 : 0 : return _r;
6724 : : }
6725 : 0 : next_after_fail1336:;
6726 : : }
6727 : : }
6728 : : }
6729 : : break;
6730 : : }
6731 : : default:;
6732 : : }
6733 : : break;
6734 : : }
6735 : 59 : case POINTER_DIFF_EXPR:
6736 : 59 : {
6737 : 59 : tree _q20 = TREE_OPERAND (_p0, 0);
6738 : 59 : tree _q21 = TREE_OPERAND (_p0, 1);
6739 : 59 : switch (TREE_CODE (_p1))
6740 : : {
6741 : 0 : case POINTER_DIFF_EXPR:
6742 : 0 : {
6743 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
6744 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
6745 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
6746 : : {
6747 : 0 : {
6748 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
6749 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6750 : 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
6751 : : )
6752 : : {
6753 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1337;
6754 : 0 : {
6755 : 0 : tree res_op0;
6756 : 0 : res_op0 = captures[1];
6757 : 0 : tree res_op1;
6758 : 0 : res_op1 = captures[3];
6759 : 0 : tree _r;
6760 : 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
6761 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
6762 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
6763 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 938, __FILE__, __LINE__, true);
6764 : 0 : return _r;
6765 : : }
6766 : 0 : next_after_fail1337:;
6767 : : }
6768 : : }
6769 : : }
6770 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
6771 : : {
6772 : 0 : {
6773 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
6774 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6775 : 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
6776 : : )
6777 : : {
6778 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1338;
6779 : 0 : {
6780 : 0 : tree res_op0;
6781 : 0 : res_op0 = captures[3];
6782 : 0 : tree res_op1;
6783 : 0 : res_op1 = captures[2];
6784 : 0 : tree _r;
6785 : 0 : _r = fold_build2_loc (loc, POINTER_DIFF_EXPR, type, res_op0, res_op1);
6786 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
6787 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
6788 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 939, __FILE__, __LINE__, true);
6789 : 0 : return _r;
6790 : : }
6791 : 0 : next_after_fail1338:;
6792 : : }
6793 : : }
6794 : : }
6795 : : break;
6796 : : }
6797 : : default:;
6798 : : }
6799 : : break;
6800 : : }
6801 : 21891023 : default:;
6802 : : }
6803 : 21891023 : switch (TREE_CODE (_p1))
6804 : : {
6805 : 6923194 : CASE_CONVERT:
6806 : 6923194 : {
6807 : 6923194 : tree _q30 = TREE_OPERAND (_p1, 0);
6808 : 6923194 : switch (TREE_CODE (_q30))
6809 : : {
6810 : 1403 : case NEGATE_EXPR:
6811 : 1403 : {
6812 : 1403 : tree _q40 = TREE_OPERAND (_q30, 0);
6813 : 1403 : {
6814 : 1403 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
6815 : 1403 : tree res = generic_simplify_49 (loc, type, _p0, _p1, captures);
6816 : 1403 : if (res) return res;
6817 : : }
6818 : 1403 : break;
6819 : : }
6820 : : default:;
6821 : : }
6822 : : break;
6823 : : }
6824 : 45 : case NEGATE_EXPR:
6825 : 45 : {
6826 : 45 : tree _q30 = TREE_OPERAND (_p1, 0);
6827 : 45 : {
6828 : 45 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
6829 : 45 : tree res = generic_simplify_49 (loc, type, _p0, _p1, captures);
6830 : 45 : if (res) return res;
6831 : : }
6832 : 40 : break;
6833 : : }
6834 : 21891018 : default:;
6835 : : }
6836 : 21891018 : switch (TREE_CODE (_p0))
6837 : : {
6838 : 1332595 : case PLUS_EXPR:
6839 : 1332595 : {
6840 : 1332595 : tree _q20 = TREE_OPERAND (_p0, 0);
6841 : 1332595 : tree _q21 = TREE_OPERAND (_p0, 1);
6842 : 1332595 : {
6843 : 1332595 : tree _q20_pops[1];
6844 : 1332595 : if (tree_nop_convert (_q20, _q20_pops))
6845 : : {
6846 : 325124 : tree _q30 = _q20_pops[0];
6847 : 325124 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6848 : : {
6849 : 354 : {
6850 : 354 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6851 : 354 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6852 : 354 : if (res) return res;
6853 : : }
6854 : : }
6855 : : }
6856 : : }
6857 : 1332241 : {
6858 : 1332241 : tree _q21_pops[1];
6859 : 1332241 : if (tree_nop_convert (_q21, _q21_pops))
6860 : : {
6861 : 429836 : tree _q40 = _q21_pops[0];
6862 : 429836 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6863 : : {
6864 : 189 : {
6865 : 189 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
6866 : 189 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6867 : 189 : if (res) return res;
6868 : : }
6869 : : }
6870 : : }
6871 : : }
6872 : 1332052 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6873 : : {
6874 : 53648 : {
6875 : 53648 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6876 : 53648 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6877 : 53648 : if (res) return res;
6878 : : }
6879 : : }
6880 : 1278404 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6881 : : {
6882 : 1598 : {
6883 : 1598 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
6884 : 1598 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6885 : 1598 : if (res) return res;
6886 : : }
6887 : : }
6888 : : break;
6889 : : }
6890 : 898880 : case MINUS_EXPR:
6891 : 898880 : {
6892 : 898880 : tree _q20 = TREE_OPERAND (_p0, 0);
6893 : 898880 : tree _q21 = TREE_OPERAND (_p0, 1);
6894 : 898880 : {
6895 : 898880 : tree _q20_pops[1];
6896 : 898880 : if (tree_nop_convert (_q20, _q20_pops))
6897 : : {
6898 : 64695 : tree _q30 = _q20_pops[0];
6899 : 64695 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6900 : : {
6901 : 0 : {
6902 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
6903 : 0 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
6904 : 0 : if (res) return res;
6905 : : }
6906 : : }
6907 : : }
6908 : : }
6909 : 898880 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6910 : : {
6911 : 173 : {
6912 : 173 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6913 : 173 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
6914 : 173 : if (res) return res;
6915 : : }
6916 : : }
6917 : : break;
6918 : : }
6919 : 21835067 : default:;
6920 : : }
6921 : 21835067 : {
6922 : 21835067 : tree _p0_pops[1];
6923 : 21835067 : if (tree_nop_convert (_p0, _p0_pops))
6924 : : {
6925 : 4169248 : tree _q20 = _p0_pops[0];
6926 : 4169248 : switch (TREE_CODE (_q20))
6927 : : {
6928 : 330480 : case PLUS_EXPR:
6929 : 330480 : {
6930 : 330480 : tree _q30 = TREE_OPERAND (_q20, 0);
6931 : 330480 : tree _q31 = TREE_OPERAND (_q20, 1);
6932 : 330480 : {
6933 : 330480 : tree _q30_pops[1];
6934 : 330480 : if (tree_nop_convert (_q30, _q30_pops))
6935 : : {
6936 : 30766 : tree _q40 = _q30_pops[0];
6937 : 30766 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6938 : : {
6939 : 602 : {
6940 : 602 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
6941 : 602 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6942 : 602 : if (res) return res;
6943 : : }
6944 : : }
6945 : : }
6946 : : }
6947 : 329878 : {
6948 : 329878 : tree _q31_pops[1];
6949 : 329878 : if (tree_nop_convert (_q31, _q31_pops))
6950 : : {
6951 : 2147 : tree _q50 = _q31_pops[0];
6952 : 2147 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
6953 : : {
6954 : 52 : {
6955 : 52 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
6956 : 52 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6957 : 52 : if (res) return res;
6958 : : }
6959 : : }
6960 : : }
6961 : : }
6962 : 329826 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
6963 : : {
6964 : 56 : {
6965 : 56 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
6966 : 56 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6967 : 56 : if (res) return res;
6968 : : }
6969 : : }
6970 : 329770 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
6971 : : {
6972 : 0 : {
6973 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
6974 : 0 : tree res = generic_simplify_50 (loc, type, _p0, _p1, captures);
6975 : 0 : if (res) return res;
6976 : : }
6977 : : }
6978 : : break;
6979 : : }
6980 : 869 : case MINUS_EXPR:
6981 : 869 : {
6982 : 869 : tree _q30 = TREE_OPERAND (_q20, 0);
6983 : 869 : tree _q31 = TREE_OPERAND (_q20, 1);
6984 : 869 : {
6985 : 869 : tree _q30_pops[1];
6986 : 869 : if (tree_nop_convert (_q30, _q30_pops))
6987 : : {
6988 : 394 : tree _q40 = _q30_pops[0];
6989 : 394 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
6990 : : {
6991 : 0 : {
6992 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
6993 : 0 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
6994 : 0 : if (res) return res;
6995 : : }
6996 : : }
6997 : : }
6998 : : }
6999 : 869 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7000 : : {
7001 : 0 : {
7002 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
7003 : 0 : tree res = generic_simplify_51 (loc, type, _p0, _p1, captures);
7004 : 0 : if (res) return res;
7005 : : }
7006 : : }
7007 : : break;
7008 : : }
7009 : : default:;
7010 : : }
7011 : : }
7012 : : }
7013 : 21834357 : switch (TREE_CODE (_p1))
7014 : : {
7015 : 1230037 : case PLUS_EXPR:
7016 : 1230037 : {
7017 : 1230037 : tree _q30 = TREE_OPERAND (_p1, 0);
7018 : 1230037 : tree _q31 = TREE_OPERAND (_p1, 1);
7019 : 1230037 : {
7020 : 1230037 : tree _q30_pops[1];
7021 : 1230037 : if (tree_nop_convert (_q30, _q30_pops))
7022 : : {
7023 : 311895 : tree _q40 = _q30_pops[0];
7024 : 311895 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7025 : : {
7026 : 71 : {
7027 : 71 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7028 : 71 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7029 : 71 : if (res) return res;
7030 : : }
7031 : : }
7032 : : }
7033 : : }
7034 : 1229966 : {
7035 : 1229966 : tree _q31_pops[1];
7036 : 1229966 : if (tree_nop_convert (_q31, _q31_pops))
7037 : : {
7038 : 57851 : tree _q50 = _q31_pops[0];
7039 : 57851 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7040 : : {
7041 : 0 : {
7042 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
7043 : 0 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7044 : 0 : if (res) return res;
7045 : : }
7046 : : }
7047 : : }
7048 : : }
7049 : 1229966 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7050 : : {
7051 : 34417 : {
7052 : 34417 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7053 : 34417 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7054 : 34417 : if (res) return res;
7055 : : }
7056 : : }
7057 : 1195549 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
7058 : : {
7059 : 2663 : {
7060 : 2663 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
7061 : 2663 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7062 : 2663 : if (res) return res;
7063 : : }
7064 : : }
7065 : : break;
7066 : : }
7067 : 69577 : case MINUS_EXPR:
7068 : 69577 : {
7069 : 69577 : tree _q30 = TREE_OPERAND (_p1, 0);
7070 : 69577 : tree _q31 = TREE_OPERAND (_p1, 1);
7071 : 69577 : {
7072 : 69577 : tree _q30_pops[1];
7073 : 69577 : if (tree_nop_convert (_q30, _q30_pops))
7074 : : {
7075 : 61 : tree _q40 = _q30_pops[0];
7076 : 61 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7077 : : {
7078 : 0 : {
7079 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7080 : 0 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7081 : 0 : if (res) return res;
7082 : : }
7083 : : }
7084 : : }
7085 : : }
7086 : 69577 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7087 : : {
7088 : 134 : {
7089 : 134 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7090 : 134 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7091 : 134 : if (res) return res;
7092 : : }
7093 : : }
7094 : : break;
7095 : : }
7096 : 21797072 : default:;
7097 : : }
7098 : 21797072 : {
7099 : 21797072 : tree _p1_pops[1];
7100 : 21797072 : if (tree_nop_convert (_p1, _p1_pops))
7101 : : {
7102 : 6252882 : tree _q30 = _p1_pops[0];
7103 : 6252882 : switch (TREE_CODE (_q30))
7104 : : {
7105 : 648902 : case PLUS_EXPR:
7106 : 648902 : {
7107 : 648902 : tree _q40 = TREE_OPERAND (_q30, 0);
7108 : 648902 : tree _q41 = TREE_OPERAND (_q30, 1);
7109 : 648902 : {
7110 : 648902 : tree _q40_pops[1];
7111 : 648902 : if (tree_nop_convert (_q40, _q40_pops))
7112 : : {
7113 : 69991 : tree _q50 = _q40_pops[0];
7114 : 69991 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7115 : : {
7116 : 105 : {
7117 : 105 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7118 : 105 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7119 : 105 : if (res) return res;
7120 : : }
7121 : : }
7122 : : }
7123 : : }
7124 : 648797 : {
7125 : 648797 : tree _q41_pops[1];
7126 : 648797 : if (tree_nop_convert (_q41, _q41_pops))
7127 : : {
7128 : 17499 : tree _q60 = _q41_pops[0];
7129 : 17499 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
7130 : : {
7131 : 0 : {
7132 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
7133 : 0 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7134 : 0 : if (res) return res;
7135 : : }
7136 : : }
7137 : : }
7138 : : }
7139 : 648797 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7140 : : {
7141 : 6 : {
7142 : 6 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7143 : 6 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7144 : 6 : if (res) return res;
7145 : : }
7146 : : }
7147 : 648791 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
7148 : : {
7149 : 4 : {
7150 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
7151 : 4 : tree res = generic_simplify_52 (loc, type, _p0, _p1, captures);
7152 : 4 : if (res) return res;
7153 : : }
7154 : : }
7155 : : break;
7156 : : }
7157 : 7397 : case MINUS_EXPR:
7158 : 7397 : {
7159 : 7397 : tree _q40 = TREE_OPERAND (_q30, 0);
7160 : 7397 : tree _q41 = TREE_OPERAND (_q30, 1);
7161 : 7397 : {
7162 : 7397 : tree _q40_pops[1];
7163 : 7397 : if (tree_nop_convert (_q40, _q40_pops))
7164 : : {
7165 : 6704 : tree _q50 = _q40_pops[0];
7166 : 6704 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7167 : : {
7168 : 0 : {
7169 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7170 : 0 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7171 : 0 : if (res) return res;
7172 : : }
7173 : : }
7174 : : }
7175 : : }
7176 : 7397 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7177 : : {
7178 : 2 : {
7179 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
7180 : 2 : tree res = generic_simplify_53 (loc, type, _p0, _p1, captures);
7181 : 2 : if (res) return res;
7182 : : }
7183 : : }
7184 : : break;
7185 : : }
7186 : : default:;
7187 : : }
7188 : : }
7189 : : }
7190 : 21796955 : switch (TREE_CODE (_p0))
7191 : : {
7192 : 1276817 : case PLUS_EXPR:
7193 : 1276817 : {
7194 : 1276817 : tree _q20 = TREE_OPERAND (_p0, 0);
7195 : 1276817 : tree _q21 = TREE_OPERAND (_p0, 1);
7196 : 1276817 : switch (TREE_CODE (_p1))
7197 : : {
7198 : 0 : case MINUS_EXPR:
7199 : 0 : {
7200 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
7201 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
7202 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7203 : : {
7204 : 0 : {
7205 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
7206 : 0 : tree res = generic_simplify_54 (loc, type, _p0, _p1, captures);
7207 : 0 : if (res) return res;
7208 : : }
7209 : : }
7210 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7211 : : {
7212 : 0 : {
7213 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
7214 : 0 : tree res = generic_simplify_54 (loc, type, _p0, _p1, captures);
7215 : 0 : if (res) return res;
7216 : : }
7217 : : }
7218 : : break;
7219 : : }
7220 : 1276817 : default:;
7221 : : }
7222 : 1276817 : if (CONSTANT_CLASS_P (_q21))
7223 : : {
7224 : 560022 : if (CONSTANT_CLASS_P (_p1))
7225 : : {
7226 : 13 : {
7227 : 13 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7228 : 13 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
7229 : 13 : if (res) return res;
7230 : : }
7231 : : }
7232 : : }
7233 : : break;
7234 : : }
7235 : 898707 : case MINUS_EXPR:
7236 : 898707 : {
7237 : 898707 : tree _q20 = TREE_OPERAND (_p0, 0);
7238 : 898707 : tree _q21 = TREE_OPERAND (_p0, 1);
7239 : 898707 : if (CONSTANT_CLASS_P (_q21))
7240 : : {
7241 : 101246 : if (CONSTANT_CLASS_P (_p1))
7242 : : {
7243 : 12 : {
7244 : 12 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7245 : 12 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
7246 : 12 : if (res) return res;
7247 : : }
7248 : : }
7249 : : }
7250 : 898707 : if (CONSTANT_CLASS_P (_q20))
7251 : : {
7252 : 2859 : if (CONSTANT_CLASS_P (_p1))
7253 : : {
7254 : 1 : {
7255 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
7256 : 1 : tree res = generic_simplify_18 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7257 : 1 : if (res) return res;
7258 : : }
7259 : : }
7260 : : }
7261 : : break;
7262 : : }
7263 : 4550695 : CASE_CONVERT:
7264 : 4550695 : {
7265 : 4550695 : tree _q20 = TREE_OPERAND (_p0, 0);
7266 : 4550695 : switch (TREE_CODE (_p1))
7267 : : {
7268 : 3784706 : CASE_CONVERT:
7269 : 3784706 : {
7270 : 3784706 : tree _q40 = TREE_OPERAND (_p1, 0);
7271 : 3784706 : {
7272 : 3784706 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7273 : 3784706 : tree res = generic_simplify_22 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7274 : 3784706 : if (res) return res;
7275 : : }
7276 : 3771582 : break;
7277 : : }
7278 : 4537571 : default:;
7279 : : }
7280 : 4537571 : switch (TREE_CODE (_q20))
7281 : : {
7282 : 223 : case NEGATE_EXPR:
7283 : 223 : {
7284 : 223 : tree _q30 = TREE_OPERAND (_q20, 0);
7285 : 223 : if (integer_each_onep (_p1))
7286 : : {
7287 : 0 : {
7288 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
7289 : 0 : tree res = generic_simplify_56 (loc, type, _p0, _p1, captures);
7290 : 0 : if (res) return res;
7291 : : }
7292 : : }
7293 : : break;
7294 : : }
7295 : 379591 : case PLUS_EXPR:
7296 : 379591 : {
7297 : 379591 : tree _q30 = TREE_OPERAND (_q20, 0);
7298 : 379591 : tree _q31 = TREE_OPERAND (_q20, 1);
7299 : 379591 : switch (TREE_CODE (_p1))
7300 : : {
7301 : 363534 : CASE_CONVERT:
7302 : 363534 : {
7303 : 363534 : tree _q60 = TREE_OPERAND (_p1, 0);
7304 : 363534 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
7305 : : {
7306 : 5476 : {
7307 : 5476 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7308 : 5476 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7309 : 5476 : if (res) return res;
7310 : : }
7311 : : }
7312 : 358172 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
7313 : : {
7314 : 33 : {
7315 : 33 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
7316 : 33 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7317 : 33 : if (res) return res;
7318 : : }
7319 : : }
7320 : : break;
7321 : : }
7322 : 374196 : default:;
7323 : : }
7324 : 374196 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q30, 0))
7325 : : {
7326 : 3853 : {
7327 : 3853 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7328 : 3853 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7329 : 3853 : if (res) return res;
7330 : : }
7331 : : }
7332 : 370343 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
7333 : : {
7334 : 960 : {
7335 : 960 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
7336 : 960 : tree res = generic_simplify_57 (loc, type, _p0, _p1, captures);
7337 : 960 : if (res) return res;
7338 : : }
7339 : : }
7340 : : break;
7341 : : }
7342 : 81085 : case POINTER_PLUS_EXPR:
7343 : 81085 : {
7344 : 81085 : tree _q30 = TREE_OPERAND (_q20, 0);
7345 : 81085 : tree _q31 = TREE_OPERAND (_q20, 1);
7346 : 81085 : switch (TREE_CODE (_p1))
7347 : : {
7348 : 79944 : CASE_CONVERT:
7349 : 79944 : {
7350 : 79944 : tree _q60 = TREE_OPERAND (_p1, 0);
7351 : 79944 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
7352 : : {
7353 : 8318 : {
7354 : 8318 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7355 : 8318 : if (!TYPE_SATURATING (type)
7356 : : )
7357 : : {
7358 : 8318 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7359 : 16636 : && !FIXED_POINT_TYPE_P (type)
7360 : : )
7361 : : {
7362 : 8318 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7363 : 8318 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7364 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7365 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
7366 : : )
7367 : : {
7368 : 8318 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1339;
7369 : 8318 : {
7370 : 8318 : tree res_op0;
7371 : 8318 : res_op0 = captures[1];
7372 : 8318 : tree _r;
7373 : 8318 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7374 : 8318 : if (TREE_SIDE_EFFECTS (captures[2]))
7375 : 11 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7376 : 8318 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 940, __FILE__, __LINE__, true);
7377 : 8318 : return _r;
7378 : : }
7379 : 0 : next_after_fail1339:;
7380 : : }
7381 : : }
7382 : : }
7383 : : }
7384 : : }
7385 : : break;
7386 : : }
7387 : : default:;
7388 : : }
7389 : : break;
7390 : : }
7391 : 4519045 : default:;
7392 : : }
7393 : 4519045 : switch (TREE_CODE (_p1))
7394 : : {
7395 : 3753184 : CASE_CONVERT:
7396 : 3753184 : {
7397 : 3753184 : tree _q40 = TREE_OPERAND (_p1, 0);
7398 : 3753184 : switch (TREE_CODE (_q40))
7399 : : {
7400 : 470096 : case PLUS_EXPR:
7401 : 470096 : {
7402 : 470096 : tree _q50 = TREE_OPERAND (_q40, 0);
7403 : 470096 : tree _q51 = TREE_OPERAND (_q40, 1);
7404 : 470096 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
7405 : : {
7406 : 1948 : {
7407 : 1948 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
7408 : 1948 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7409 : 1948 : if (res) return res;
7410 : : }
7411 : : }
7412 : 468220 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
7413 : : {
7414 : 18 : {
7415 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q51, _q50, _q20 };
7416 : 18 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7417 : 18 : if (res) return res;
7418 : : }
7419 : : }
7420 : : break;
7421 : : }
7422 : : default:;
7423 : : }
7424 : : break;
7425 : : }
7426 : : default:;
7427 : : }
7428 : : break;
7429 : : }
7430 : 149676 : case NEGATE_EXPR:
7431 : 149676 : {
7432 : 149676 : tree _q20 = TREE_OPERAND (_p0, 0);
7433 : 149676 : if (integer_each_onep (_p1))
7434 : : {
7435 : 41 : {
7436 : 41 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
7437 : 41 : tree res = generic_simplify_56 (loc, type, _p0, _p1, captures);
7438 : 41 : if (res) return res;
7439 : : }
7440 : : }
7441 : : break;
7442 : : }
7443 : 21763370 : default:;
7444 : : }
7445 : 21763370 : {
7446 : 21763370 : tree _p0_pops[1];
7447 : 21763370 : if (tree_nop_convert (_p0, _p0_pops))
7448 : : {
7449 : 4126021 : tree _q20 = _p0_pops[0];
7450 : 4126021 : switch (TREE_CODE (_q20))
7451 : : {
7452 : 312312 : case PLUS_EXPR:
7453 : 312312 : {
7454 : 312312 : tree _q30 = TREE_OPERAND (_q20, 0);
7455 : 312312 : tree _q31 = TREE_OPERAND (_q20, 1);
7456 : 312312 : if (CONSTANT_CLASS_P (_q31))
7457 : : {
7458 : 305773 : if (CONSTANT_CLASS_P (_p1))
7459 : : {
7460 : 0 : {
7461 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
7462 : 0 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR);
7463 : 0 : if (res) return res;
7464 : : }
7465 : : }
7466 : : }
7467 : : break;
7468 : : }
7469 : 869 : case MINUS_EXPR:
7470 : 869 : {
7471 : 869 : tree _q30 = TREE_OPERAND (_q20, 0);
7472 : 869 : tree _q31 = TREE_OPERAND (_q20, 1);
7473 : 869 : if (CONSTANT_CLASS_P (_q31))
7474 : : {
7475 : 0 : if (CONSTANT_CLASS_P (_p1))
7476 : : {
7477 : 0 : {
7478 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
7479 : 0 : tree res = generic_simplify_17 (loc, type, _p0, _p1, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR);
7480 : 0 : if (res) return res;
7481 : : }
7482 : : }
7483 : : }
7484 : 869 : if (CONSTANT_CLASS_P (_q30))
7485 : : {
7486 : 18 : if (CONSTANT_CLASS_P (_p1))
7487 : : {
7488 : 0 : {
7489 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
7490 : 0 : tree res = generic_simplify_18 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7491 : 0 : if (res) return res;
7492 : : }
7493 : : }
7494 : : }
7495 : : break;
7496 : : }
7497 : : default:;
7498 : : }
7499 : : }
7500 : : }
7501 : 21763370 : if (CONSTANT_CLASS_P (_p0))
7502 : : {
7503 : 5526899 : switch (TREE_CODE (_p1))
7504 : : {
7505 : 823 : case MINUS_EXPR:
7506 : 823 : {
7507 : 823 : tree _q30 = TREE_OPERAND (_p1, 0);
7508 : 823 : tree _q31 = TREE_OPERAND (_p1, 1);
7509 : 823 : if (CONSTANT_CLASS_P (_q30))
7510 : : {
7511 : 639 : {
7512 : 639 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
7513 : 639 : tree res = generic_simplify_55 (loc, type, _p0, _p1, captures);
7514 : 639 : if (res) return res;
7515 : : }
7516 : : }
7517 : : break;
7518 : : }
7519 : 5526269 : default:;
7520 : : }
7521 : 5526269 : {
7522 : 5526269 : tree _p1_pops[1];
7523 : 5526269 : if (tree_nop_convert (_p1, _p1_pops))
7524 : : {
7525 : 1748911 : tree _q30 = _p1_pops[0];
7526 : 1748911 : switch (TREE_CODE (_q30))
7527 : : {
7528 : 7192 : case MINUS_EXPR:
7529 : 7192 : {
7530 : 7192 : tree _q40 = TREE_OPERAND (_q30, 0);
7531 : 7192 : tree _q41 = TREE_OPERAND (_q30, 1);
7532 : 7192 : if (CONSTANT_CLASS_P (_q40))
7533 : : {
7534 : 25 : {
7535 : 25 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
7536 : 25 : tree res = generic_simplify_55 (loc, type, _p0, _p1, captures);
7537 : 25 : if (res) return res;
7538 : : }
7539 : : }
7540 : : break;
7541 : : }
7542 : : default:;
7543 : : }
7544 : : }
7545 : : }
7546 : : }
7547 : 21762715 : if (integer_all_onesp (_p0))
7548 : : {
7549 : 1268680 : {
7550 : 1268680 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
7551 : 1268680 : if (!TYPE_SATURATING (type)
7552 : : )
7553 : : {
7554 : 1268680 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7555 : 2537360 : && !FIXED_POINT_TYPE_P (type)
7556 : : )
7557 : : {
7558 : 1268680 : if (TREE_CODE (type) != COMPLEX_TYPE
7559 : : )
7560 : : {
7561 : 1268678 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1340;
7562 : 1268678 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1340;
7563 : 1268678 : {
7564 : 1268678 : tree res_op0;
7565 : 1268678 : res_op0 = captures[0];
7566 : 1268678 : tree _r;
7567 : 1268678 : _r = fold_build1_loc (loc, BIT_NOT_EXPR, type, res_op0);
7568 : 1268678 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
7569 : 1268678 : return _r;
7570 : : }
7571 : : next_after_fail1340:;
7572 : : }
7573 : : }
7574 : : }
7575 : : }
7576 : : }
7577 : 20494037 : switch (TREE_CODE (_p1))
7578 : : {
7579 : 6571349 : CASE_CONVERT:
7580 : 6571349 : {
7581 : 6571349 : tree _q30 = TREE_OPERAND (_p1, 0);
7582 : 6571349 : switch (TREE_CODE (_q30))
7583 : : {
7584 : 658801 : case PLUS_EXPR:
7585 : 658801 : {
7586 : 658801 : tree _q40 = TREE_OPERAND (_q30, 0);
7587 : 658801 : tree _q41 = TREE_OPERAND (_q30, 1);
7588 : 658801 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
7589 : : {
7590 : 0 : {
7591 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _p0 };
7592 : 0 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7593 : 0 : if (res) return res;
7594 : : }
7595 : : }
7596 : 658801 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
7597 : : {
7598 : 8015 : {
7599 : 8015 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _p0 };
7600 : 8015 : tree res = generic_simplify_58 (loc, type, _p0, _p1, captures);
7601 : 8015 : if (res) return res;
7602 : : }
7603 : : }
7604 : : break;
7605 : : }
7606 : : default:;
7607 : : }
7608 : : break;
7609 : : }
7610 : 20486193 : default:;
7611 : : }
7612 : 20486193 : switch (TREE_CODE (_p0))
7613 : : {
7614 : 4517151 : CASE_CONVERT:
7615 : 4517151 : {
7616 : 4517151 : tree _q20 = TREE_OPERAND (_p0, 0);
7617 : 4517151 : switch (TREE_CODE (_p1))
7618 : : {
7619 : 3751290 : CASE_CONVERT:
7620 : 3751290 : {
7621 : 3751290 : tree _q40 = TREE_OPERAND (_p1, 0);
7622 : 3751290 : switch (TREE_CODE (_q40))
7623 : : {
7624 : 356885 : case POINTER_PLUS_EXPR:
7625 : 356885 : {
7626 : 356885 : tree _q50 = TREE_OPERAND (_q40, 0);
7627 : 356885 : tree _q51 = TREE_OPERAND (_q40, 1);
7628 : 356885 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
7629 : : {
7630 : 251 : {
7631 : 251 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
7632 : 251 : if (!TYPE_SATURATING (type)
7633 : : )
7634 : : {
7635 : 251 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7636 : 502 : && !FIXED_POINT_TYPE_P (type)
7637 : : )
7638 : : {
7639 : 251 : if (INTEGRAL_TYPE_P (type)
7640 : 251 : && TYPE_OVERFLOW_UNDEFINED (type)
7641 : 0 : && TREE_CODE (captures[1]) != INTEGER_CST
7642 : 251 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7643 : : )
7644 : : {
7645 : 0 : {
7646 : 0 : tree utype = unsigned_type_for (type);
7647 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1341;
7648 : 0 : {
7649 : 0 : tree res_op0;
7650 : 0 : {
7651 : 0 : tree _o1[1], _r1;
7652 : 0 : {
7653 : 0 : tree _o2[1], _r2;
7654 : 0 : _o2[0] = captures[1];
7655 : 0 : if (TREE_TYPE (_o2[0]) != utype)
7656 : : {
7657 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7658 : : }
7659 : : else
7660 : : _r2 = _o2[0];
7661 : 0 : _o1[0] = _r2;
7662 : : }
7663 : 0 : _r1 = fold_build1_loc (loc, NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
7664 : 0 : res_op0 = _r1;
7665 : : }
7666 : 0 : tree _r;
7667 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7668 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
7669 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7670 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 942, __FILE__, __LINE__, true);
7671 : 0 : return _r;
7672 : : }
7673 : 0 : next_after_fail1341:;
7674 : : }
7675 : : }
7676 : : else
7677 : : {
7678 : 251 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7679 : 251 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7680 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7681 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
7682 : : )
7683 : : {
7684 : 251 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1342;
7685 : 251 : {
7686 : 251 : tree res_op0;
7687 : 251 : {
7688 : 251 : tree _o1[1], _r1;
7689 : 251 : _o1[0] = captures[1];
7690 : 251 : if (TREE_TYPE (_o1[0]) != type)
7691 : : {
7692 : 178 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7693 : : }
7694 : : else
7695 : : _r1 = _o1[0];
7696 : 251 : res_op0 = _r1;
7697 : : }
7698 : 251 : tree _r;
7699 : 251 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
7700 : 251 : if (TREE_SIDE_EFFECTS (captures[2]))
7701 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
7702 : 251 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 943, __FILE__, __LINE__, true);
7703 : 251 : return _r;
7704 : : }
7705 : 0 : next_after_fail1342:;
7706 : : }
7707 : : }
7708 : : }
7709 : : }
7710 : : }
7711 : : }
7712 : : break;
7713 : : }
7714 : : default:;
7715 : : }
7716 : : break;
7717 : : }
7718 : 4516900 : default:;
7719 : : }
7720 : 4516900 : switch (TREE_CODE (_q20))
7721 : : {
7722 : 369383 : case PLUS_EXPR:
7723 : 369383 : {
7724 : 369383 : tree _q30 = TREE_OPERAND (_q20, 0);
7725 : 369383 : tree _q31 = TREE_OPERAND (_q20, 1);
7726 : 369383 : switch (TREE_CODE (_p1))
7727 : : {
7728 : 353454 : CASE_CONVERT:
7729 : 353454 : {
7730 : 353454 : tree _q60 = TREE_OPERAND (_p1, 0);
7731 : 353454 : switch (TREE_CODE (_q60))
7732 : : {
7733 : 191003 : case PLUS_EXPR:
7734 : 191003 : {
7735 : 191003 : tree _q70 = TREE_OPERAND (_q60, 0);
7736 : 191003 : tree _q71 = TREE_OPERAND (_q60, 1);
7737 : 191003 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
7738 : : {
7739 : 5485 : {
7740 : 5485 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
7741 : 5485 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7742 : 5485 : if (res) return res;
7743 : : }
7744 : : }
7745 : 185518 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q30, 0))
7746 : : {
7747 : 70 : {
7748 : 70 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q70, _q30 };
7749 : 70 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7750 : 70 : if (res) return res;
7751 : : }
7752 : : }
7753 : 185448 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q31, 0))
7754 : : {
7755 : 90 : {
7756 : 90 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q71, _q31 };
7757 : 90 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7758 : 90 : if (res) return res;
7759 : : }
7760 : : }
7761 : 185358 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q31, 0))
7762 : : {
7763 : 136792 : {
7764 : 136792 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q70, _q31 };
7765 : 136792 : tree res = generic_simplify_59 (loc, type, _p0, _p1, captures);
7766 : 136792 : if (res) return res;
7767 : : }
7768 : : }
7769 : : break;
7770 : : }
7771 : : default:;
7772 : : }
7773 : : break;
7774 : : }
7775 : : default:;
7776 : : }
7777 : : break;
7778 : : }
7779 : 72767 : case POINTER_PLUS_EXPR:
7780 : 72767 : {
7781 : 72767 : tree _q30 = TREE_OPERAND (_q20, 0);
7782 : 72767 : tree _q31 = TREE_OPERAND (_q20, 1);
7783 : 72767 : switch (TREE_CODE (_p1))
7784 : : {
7785 : 71626 : CASE_CONVERT:
7786 : 71626 : {
7787 : 71626 : tree _q60 = TREE_OPERAND (_p1, 0);
7788 : 71626 : switch (TREE_CODE (_q60))
7789 : : {
7790 : 38070 : case POINTER_PLUS_EXPR:
7791 : 38070 : {
7792 : 38070 : tree _q70 = TREE_OPERAND (_q60, 0);
7793 : 38070 : tree _q71 = TREE_OPERAND (_q60, 1);
7794 : 38070 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
7795 : : {
7796 : 5992 : {
7797 : 5992 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
7798 : 5992 : if (!TYPE_SATURATING (type)
7799 : : )
7800 : : {
7801 : 5992 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
7802 : 11984 : && !FIXED_POINT_TYPE_P (type)
7803 : : )
7804 : : {
7805 : 5992 : if (INTEGRAL_TYPE_P (type)
7806 : 5992 : && TYPE_OVERFLOW_UNDEFINED (type)
7807 : 5992 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7808 : : )
7809 : : {
7810 : 0 : {
7811 : 0 : tree utype = unsigned_type_for (type);
7812 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1343;
7813 : 0 : {
7814 : 0 : tree res_op0;
7815 : 0 : {
7816 : 0 : tree _o1[2], _r1;
7817 : 0 : {
7818 : 0 : tree _o2[1], _r2;
7819 : 0 : _o2[0] = captures[1];
7820 : 0 : if (TREE_TYPE (_o2[0]) != utype)
7821 : : {
7822 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7823 : : }
7824 : : else
7825 : : _r2 = _o2[0];
7826 : 0 : _o1[0] = _r2;
7827 : : }
7828 : 0 : {
7829 : 0 : tree _o2[1], _r2;
7830 : 0 : _o2[0] = captures[2];
7831 : 0 : if (TREE_TYPE (_o2[0]) != utype)
7832 : : {
7833 : 0 : _r2 = fold_build1_loc (loc, NOP_EXPR, utype, _o2[0]);
7834 : : }
7835 : : else
7836 : : _r2 = _o2[0];
7837 : 0 : _o1[1] = _r2;
7838 : : }
7839 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7840 : 0 : res_op0 = _r1;
7841 : : }
7842 : 0 : tree _r;
7843 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
7844 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
7845 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
7846 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 944, __FILE__, __LINE__, true);
7847 : 0 : return _r;
7848 : : }
7849 : 0 : next_after_fail1343:;
7850 : : }
7851 : : }
7852 : : else
7853 : : {
7854 : 5992 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
7855 : 5992 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7856 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
7857 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0
7858 : 0 : && TREE_CODE (captures[2]) == INTEGER_CST
7859 : 0 : && tree_int_cst_sign_bit (captures[2]) == 0)
7860 : : )
7861 : : {
7862 : 5992 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1344;
7863 : 5992 : {
7864 : 5992 : tree res_op0;
7865 : 5992 : {
7866 : 5992 : tree _o1[1], _r1;
7867 : 5992 : _o1[0] = captures[1];
7868 : 5992 : if (TREE_TYPE (_o1[0]) != type)
7869 : : {
7870 : 5924 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7871 : : }
7872 : : else
7873 : : _r1 = _o1[0];
7874 : 5992 : res_op0 = _r1;
7875 : : }
7876 : 5992 : tree res_op1;
7877 : 5992 : {
7878 : 5992 : tree _o1[1], _r1;
7879 : 5992 : _o1[0] = captures[2];
7880 : 5992 : if (TREE_TYPE (_o1[0]) != type)
7881 : : {
7882 : 5939 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
7883 : : }
7884 : : else
7885 : : _r1 = _o1[0];
7886 : 5992 : res_op1 = _r1;
7887 : : }
7888 : 5992 : tree _r;
7889 : 5992 : _r = fold_build2_loc (loc, MINUS_EXPR, type, res_op0, res_op1);
7890 : 5992 : if (TREE_SIDE_EFFECTS (captures[3]))
7891 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
7892 : 5992 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 945, __FILE__, __LINE__, true);
7893 : 5992 : return _r;
7894 : : }
7895 : 0 : next_after_fail1344:;
7896 : : }
7897 : : }
7898 : : }
7899 : : }
7900 : : }
7901 : : }
7902 : : break;
7903 : : }
7904 : : default:;
7905 : : }
7906 : : break;
7907 : : }
7908 : : default:;
7909 : : }
7910 : : break;
7911 : : }
7912 : : default:;
7913 : : }
7914 : : break;
7915 : : }
7916 : 1512124 : case MULT_EXPR:
7917 : 1512124 : {
7918 : 1512124 : tree _q20 = TREE_OPERAND (_p0, 0);
7919 : 1512124 : tree _q21 = TREE_OPERAND (_p0, 1);
7920 : 1512124 : switch (TREE_CODE (_p1))
7921 : : {
7922 : 717377 : case MULT_EXPR:
7923 : 717377 : {
7924 : 717377 : tree _q50 = TREE_OPERAND (_p1, 0);
7925 : 717377 : tree _q51 = TREE_OPERAND (_p1, 1);
7926 : 717377 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
7927 : : {
7928 : 3901 : {
7929 : 3901 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
7930 : 3901 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7931 : 3901 : if (res) return res;
7932 : : }
7933 : : }
7934 : 716170 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
7935 : : {
7936 : 13947 : {
7937 : 13947 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
7938 : 13947 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7939 : 13947 : if (res) return res;
7940 : : }
7941 : : }
7942 : 702223 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
7943 : : {
7944 : 34240 : {
7945 : 34240 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
7946 : 34240 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7947 : 34240 : if (res) return res;
7948 : : }
7949 : : }
7950 : 668065 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7951 : : {
7952 : 202503 : {
7953 : 202503 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
7954 : 202503 : tree res = generic_simplify_25 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7955 : 202503 : if (res) return res;
7956 : : }
7957 : : }
7958 : : break;
7959 : : }
7960 : : default:;
7961 : : }
7962 : : break;
7963 : : }
7964 : 20107665 : default:;
7965 : : }
7966 : 20107665 : switch (TREE_CODE (_p1))
7967 : : {
7968 : 1844853 : case MULT_EXPR:
7969 : 1844853 : {
7970 : 1844853 : tree _q30 = TREE_OPERAND (_p1, 0);
7971 : 1844853 : tree _q31 = TREE_OPERAND (_p1, 1);
7972 : 1844853 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
7973 : : {
7974 : 3673 : {
7975 : 3673 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
7976 : 3673 : tree res = generic_simplify_26 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7977 : 3673 : if (res) return res;
7978 : : }
7979 : : }
7980 : 1841254 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
7981 : : {
7982 : 1324 : {
7983 : 1324 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
7984 : 1324 : tree res = generic_simplify_26 (loc, type, _p0, _p1, captures, MINUS_EXPR);
7985 : 1324 : if (res) return res;
7986 : : }
7987 : : }
7988 : : break;
7989 : : }
7990 : 20102841 : default:;
7991 : : }
7992 : 20102841 : switch (TREE_CODE (_p0))
7993 : : {
7994 : 1265684 : case MULT_EXPR:
7995 : 1265684 : {
7996 : 1265684 : tree _q20 = TREE_OPERAND (_p0, 0);
7997 : 1265684 : tree _q21 = TREE_OPERAND (_p0, 1);
7998 : 1265684 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
7999 : : {
8000 : 35759 : {
8001 : 35759 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8002 : 35759 : tree res = generic_simplify_27 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8003 : 35759 : if (res) return res;
8004 : : }
8005 : : }
8006 : 1230011 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8007 : : {
8008 : 644 : {
8009 : 644 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
8010 : 644 : tree res = generic_simplify_27 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8011 : 644 : if (res) return res;
8012 : : }
8013 : : }
8014 : : break;
8015 : : }
8016 : 20067069 : default:;
8017 : : }
8018 : 20067069 : switch (TREE_CODE (_p1))
8019 : : {
8020 : 1840029 : case MULT_EXPR:
8021 : 1840029 : {
8022 : 1840029 : tree _q30 = TREE_OPERAND (_p1, 0);
8023 : 1840029 : tree _q31 = TREE_OPERAND (_p1, 1);
8024 : 1840029 : switch (TREE_CODE (_q30))
8025 : : {
8026 : 81831 : case MINUS_EXPR:
8027 : 81831 : {
8028 : 81831 : tree _q40 = TREE_OPERAND (_q30, 0);
8029 : 81831 : tree _q41 = TREE_OPERAND (_q30, 1);
8030 : 81831 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
8031 : : {
8032 : 19 : if (tree_zero_one_valued_p (_q31))
8033 : : {
8034 : 0 : {
8035 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
8036 : 0 : tree res = generic_simplify_60 (loc, type, _p0, _p1, captures);
8037 : 0 : if (res) return res;
8038 : : }
8039 : : }
8040 : : }
8041 : : break;
8042 : : }
8043 : 1840029 : default:;
8044 : : }
8045 : 1840029 : if (tree_zero_one_valued_p (_q30))
8046 : : {
8047 : 1144 : switch (TREE_CODE (_q31))
8048 : : {
8049 : 9 : case MINUS_EXPR:
8050 : 9 : {
8051 : 9 : tree _q50 = TREE_OPERAND (_q31, 0);
8052 : 9 : tree _q51 = TREE_OPERAND (_q31, 1);
8053 : 9 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
8054 : : {
8055 : 9 : {
8056 : 9 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q51, _q30 };
8057 : 9 : tree res = generic_simplify_60 (loc, type, _p0, _p1, captures);
8058 : 9 : if (res) return res;
8059 : : }
8060 : : }
8061 : : break;
8062 : : }
8063 : : default:;
8064 : : }
8065 : : }
8066 : : break;
8067 : : }
8068 : 20067067 : default:;
8069 : : }
8070 : 20067067 : switch (TREE_CODE (_p0))
8071 : : {
8072 : 0 : case VEC_COND_EXPR:
8073 : 0 : {
8074 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8075 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8076 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8077 : 0 : switch (TREE_CODE (_p1))
8078 : : {
8079 : 0 : case VEC_COND_EXPR:
8080 : 0 : {
8081 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
8082 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
8083 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
8084 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
8085 : : {
8086 : 0 : {
8087 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
8088 : 0 : if (VECTOR_TYPE_P (type)
8089 : 0 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
8090 : : || types_match (type, TREE_TYPE (captures[2]))
8091 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8092 : : || (optimize_vectors_before_lowering_p ()
8093 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8094 : : )
8095 : : {
8096 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1345;
8097 : 0 : {
8098 : 0 : tree res_op0;
8099 : 0 : res_op0 = captures[1];
8100 : 0 : tree res_op1;
8101 : 0 : {
8102 : 0 : tree _o1[2], _r1;
8103 : 0 : _o1[0] = captures[2];
8104 : 0 : _o1[1] = captures[5];
8105 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8106 : 0 : if (EXPR_P (_r1))
8107 : 0 : goto next_after_fail1345;
8108 : 0 : res_op1 = _r1;
8109 : : }
8110 : 0 : tree res_op2;
8111 : 0 : {
8112 : 0 : tree _o1[2], _r1;
8113 : 0 : _o1[0] = captures[3];
8114 : 0 : _o1[1] = captures[6];
8115 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8116 : 0 : if (EXPR_P (_r1))
8117 : 0 : goto next_after_fail1345;
8118 : 0 : res_op2 = _r1;
8119 : : }
8120 : 0 : tree _r;
8121 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8122 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
8123 : 0 : return _r;
8124 : : }
8125 : 0 : next_after_fail1345:;
8126 : : }
8127 : : }
8128 : : }
8129 : : break;
8130 : : }
8131 : 0 : default:;
8132 : : }
8133 : 0 : {
8134 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
8135 : 0 : if (VECTOR_TYPE_P (type)
8136 : 0 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
8137 : : || types_match (type, TREE_TYPE (captures[2]))
8138 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
8139 : : || (optimize_vectors_before_lowering_p ()
8140 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
8141 : : )
8142 : : {
8143 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1346;
8144 : 0 : {
8145 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1346;
8146 : 0 : tree res_op0;
8147 : 0 : res_op0 = captures[1];
8148 : 0 : tree res_op1;
8149 : 0 : {
8150 : 0 : tree _o1[2], _r1;
8151 : 0 : _o1[0] = captures[2];
8152 : 0 : _o1[1] = unshare_expr (captures[4]);
8153 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8154 : 0 : if (EXPR_P (_r1))
8155 : 0 : goto next_after_fail1346;
8156 : 0 : res_op1 = _r1;
8157 : : }
8158 : 0 : tree res_op2;
8159 : 0 : {
8160 : 0 : tree _o1[2], _r1;
8161 : 0 : _o1[0] = captures[3];
8162 : 0 : _o1[1] = captures[4];
8163 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8164 : 0 : if (EXPR_P (_r1))
8165 : 0 : goto next_after_fail1346;
8166 : 0 : res_op2 = _r1;
8167 : : }
8168 : 0 : tree _r;
8169 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8170 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
8171 : 0 : return _r;
8172 : : }
8173 : 0 : next_after_fail1346:;
8174 : : }
8175 : : }
8176 : 0 : break;
8177 : : }
8178 : 20067067 : default:;
8179 : : }
8180 : 20067067 : if (integer_zerop (_p0))
8181 : : {
8182 : 291035 : {
8183 : 291035 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
8184 : 291035 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1347;
8185 : 291035 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1347;
8186 : 291035 : {
8187 : 291035 : tree res_op0;
8188 : 291035 : res_op0 = captures[0];
8189 : 291035 : tree _r;
8190 : 291035 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
8191 : 291035 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 946, __FILE__, __LINE__, true);
8192 : 291035 : return _r;
8193 : : }
8194 : : next_after_fail1347:;
8195 : : }
8196 : : }
8197 : 19776032 : if (real_zerop (_p0))
8198 : : {
8199 : 130 : {
8200 : 130 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8201 : 130 : if (fold_real_zero_addition_p (type, captures[1], captures[0], 0)
8202 : : )
8203 : : {
8204 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1348;
8205 : 56 : {
8206 : 56 : tree res_op0;
8207 : 56 : res_op0 = captures[1];
8208 : 56 : tree _r;
8209 : 56 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
8210 : 56 : if (TREE_SIDE_EFFECTS (captures[0]))
8211 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
8212 : 56 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 947, __FILE__, __LINE__, true);
8213 : 56 : return _r;
8214 : : }
8215 : 0 : next_after_fail1348:;
8216 : : }
8217 : : }
8218 : : }
8219 : 19775976 : switch (TREE_CODE (_p1))
8220 : : {
8221 : 4 : case VEC_COND_EXPR:
8222 : 4 : {
8223 : 4 : tree _q30 = TREE_OPERAND (_p1, 0);
8224 : 4 : tree _q31 = TREE_OPERAND (_p1, 1);
8225 : 4 : tree _q32 = TREE_OPERAND (_p1, 2);
8226 : 4 : {
8227 : 4 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
8228 : 4 : if (VECTOR_TYPE_P (type)
8229 : 4 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
8230 : : || types_match (type, TREE_TYPE (captures[3]))
8231 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
8232 : : || (optimize_vectors_before_lowering_p ()
8233 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
8234 : : )
8235 : : {
8236 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1349;
8237 : 4 : {
8238 : 4 : if (! tree_invariant_p (captures[0])) goto next_after_fail1349;
8239 : 0 : tree res_op0;
8240 : 0 : res_op0 = captures[2];
8241 : 0 : tree res_op1;
8242 : 0 : {
8243 : 0 : tree _o1[2], _r1;
8244 : 0 : _o1[0] = unshare_expr (captures[0]);
8245 : 0 : _o1[1] = captures[3];
8246 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8247 : 0 : if (EXPR_P (_r1))
8248 : 0 : goto next_after_fail1349;
8249 : 0 : res_op1 = _r1;
8250 : : }
8251 : 0 : tree res_op2;
8252 : 0 : {
8253 : 0 : tree _o1[2], _r1;
8254 : 0 : _o1[0] = captures[0];
8255 : 0 : _o1[1] = captures[4];
8256 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
8257 : 0 : if (EXPR_P (_r1))
8258 : 0 : goto next_after_fail1349;
8259 : 0 : res_op2 = _r1;
8260 : : }
8261 : 0 : tree _r;
8262 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
8263 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 910, __FILE__, __LINE__, true);
8264 : 0 : return _r;
8265 : : }
8266 : 4 : next_after_fail1349:;
8267 : : }
8268 : : }
8269 : 4 : if (integer_each_onep (_q31))
8270 : : {
8271 : 0 : if (integer_zerop (_q32))
8272 : : {
8273 : 0 : {
8274 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
8275 : 0 : tree res = generic_simplify_61 (loc, type, _p0, _p1, captures);
8276 : 0 : if (res) return res;
8277 : : }
8278 : : }
8279 : : }
8280 : : break;
8281 : : }
8282 : 108657 : case VIEW_CONVERT_EXPR:
8283 : 108657 : {
8284 : 108657 : tree _q30 = TREE_OPERAND (_p1, 0);
8285 : 108657 : switch (TREE_CODE (_q30))
8286 : : {
8287 : 0 : case VEC_COND_EXPR:
8288 : 0 : {
8289 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
8290 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
8291 : 0 : tree _q42 = TREE_OPERAND (_q30, 2);
8292 : 0 : if (integer_each_onep (_q41))
8293 : : {
8294 : 0 : if (integer_zerop (_q42))
8295 : : {
8296 : 0 : {
8297 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42 };
8298 : 0 : tree res = generic_simplify_61 (loc, type, _p0, _p1, captures);
8299 : 0 : if (res) return res;
8300 : : }
8301 : : }
8302 : : }
8303 : : break;
8304 : : }
8305 : : default:;
8306 : : }
8307 : : break;
8308 : : }
8309 : 19775976 : default:;
8310 : : }
8311 : 19775976 : switch (TREE_CODE (_p0))
8312 : : {
8313 : 121581 : case RDIV_EXPR:
8314 : 121581 : {
8315 : 121581 : tree _q20 = TREE_OPERAND (_p0, 0);
8316 : 121581 : tree _q21 = TREE_OPERAND (_p0, 1);
8317 : 121581 : switch (TREE_CODE (_p1))
8318 : : {
8319 : 20343 : case RDIV_EXPR:
8320 : 20343 : {
8321 : 20343 : tree _q50 = TREE_OPERAND (_p1, 0);
8322 : 20343 : tree _q51 = TREE_OPERAND (_p1, 1);
8323 : 20343 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8324 : : {
8325 : 20323 : {
8326 : 20323 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
8327 : 20323 : tree res = generic_simplify_33 (loc, type, _p0, _p1, captures, MINUS_EXPR);
8328 : 20323 : if (res) return res;
8329 : : }
8330 : : }
8331 : : break;
8332 : : }
8333 : : default:;
8334 : : }
8335 : : break;
8336 : : }
8337 : 1276817 : case PLUS_EXPR:
8338 : 1276817 : {
8339 : 1276817 : tree _q20 = TREE_OPERAND (_p0, 0);
8340 : 1276817 : tree _q21 = TREE_OPERAND (_p0, 1);
8341 : 1276817 : switch (TREE_CODE (_q20))
8342 : : {
8343 : 45762 : case CALL_EXPR:
8344 : 45762 : switch (get_call_combined_fn (_q20))
8345 : : {
8346 : 4 : case CFN_BUILT_IN_POPCOUNT:
8347 : 4 : if (call_expr_nargs (_q20) == 1)
8348 : : {
8349 : 4 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8350 : 4 : switch (TREE_CODE (_q21))
8351 : : {
8352 : 4 : case CALL_EXPR:
8353 : 4 : switch (get_call_combined_fn (_q21))
8354 : : {
8355 : 4 : case CFN_BUILT_IN_POPCOUNT:
8356 : 4 : if (call_expr_nargs (_q21) == 1)
8357 : : {
8358 : 4 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8359 : 4 : switch (TREE_CODE (_p1))
8360 : : {
8361 : 4 : case CALL_EXPR:
8362 : 4 : switch (get_call_combined_fn (_p1))
8363 : : {
8364 : 4 : case CFN_BUILT_IN_POPCOUNT:
8365 : 4 : if (call_expr_nargs (_p1) == 1)
8366 : : {
8367 : 4 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8368 : 4 : switch (TREE_CODE (_q70))
8369 : : {
8370 : 2 : case BIT_AND_EXPR:
8371 : 2 : {
8372 : 2 : tree _q80 = TREE_OPERAND (_q70, 0);
8373 : 2 : tree _q81 = TREE_OPERAND (_q70, 1);
8374 : 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8375 : : {
8376 : 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8377 : : {
8378 : 1 : {
8379 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8380 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
8381 : 1 : if (res) return res;
8382 : : }
8383 : : }
8384 : : }
8385 : 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8386 : : {
8387 : 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8388 : : {
8389 : 1 : {
8390 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8391 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT);
8392 : 1 : if (res) return res;
8393 : : }
8394 : : }
8395 : : }
8396 : : break;
8397 : : }
8398 : 2 : case BIT_IOR_EXPR:
8399 : 2 : {
8400 : 2 : tree _q80 = TREE_OPERAND (_q70, 0);
8401 : 2 : tree _q81 = TREE_OPERAND (_q70, 1);
8402 : 2 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8403 : : {
8404 : 1 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8405 : : {
8406 : 1 : {
8407 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8408 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
8409 : 1 : if (res) return res;
8410 : : }
8411 : : }
8412 : : }
8413 : 1 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8414 : : {
8415 : 1 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8416 : : {
8417 : 1 : {
8418 : 1 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8419 : 1 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT);
8420 : 1 : if (res) return res;
8421 : : }
8422 : : }
8423 : : }
8424 : : break;
8425 : : }
8426 : : default:;
8427 : : }
8428 : : }
8429 : : break;
8430 : : default:;
8431 : : }
8432 : : break;
8433 : : default:;
8434 : : }
8435 : : }
8436 : : break;
8437 : : default:;
8438 : : }
8439 : : break;
8440 : : default:;
8441 : : }
8442 : : }
8443 : : break;
8444 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
8445 : 0 : if (call_expr_nargs (_q20) == 1)
8446 : : {
8447 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8448 : 0 : switch (TREE_CODE (_q21))
8449 : : {
8450 : 0 : case CALL_EXPR:
8451 : 0 : switch (get_call_combined_fn (_q21))
8452 : : {
8453 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
8454 : 0 : if (call_expr_nargs (_q21) == 1)
8455 : : {
8456 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8457 : 0 : switch (TREE_CODE (_p1))
8458 : : {
8459 : 0 : case CALL_EXPR:
8460 : 0 : switch (get_call_combined_fn (_p1))
8461 : : {
8462 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
8463 : 0 : if (call_expr_nargs (_p1) == 1)
8464 : : {
8465 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8466 : 0 : switch (TREE_CODE (_q70))
8467 : : {
8468 : 0 : case BIT_AND_EXPR:
8469 : 0 : {
8470 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8471 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8472 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8473 : : {
8474 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8475 : : {
8476 : 0 : {
8477 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8478 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8479 : 0 : if (res) return res;
8480 : : }
8481 : : }
8482 : : }
8483 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8484 : : {
8485 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8486 : : {
8487 : 0 : {
8488 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8489 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8490 : 0 : if (res) return res;
8491 : : }
8492 : : }
8493 : : }
8494 : : break;
8495 : : }
8496 : 0 : case BIT_IOR_EXPR:
8497 : 0 : {
8498 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8499 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8500 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8501 : : {
8502 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8503 : : {
8504 : 0 : {
8505 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8506 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8507 : 0 : if (res) return res;
8508 : : }
8509 : : }
8510 : : }
8511 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8512 : : {
8513 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8514 : : {
8515 : 0 : {
8516 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8517 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL);
8518 : 0 : if (res) return res;
8519 : : }
8520 : : }
8521 : : }
8522 : : break;
8523 : : }
8524 : : default:;
8525 : : }
8526 : : }
8527 : : break;
8528 : : default:;
8529 : : }
8530 : : break;
8531 : : default:;
8532 : : }
8533 : : }
8534 : : break;
8535 : : default:;
8536 : : }
8537 : : break;
8538 : : default:;
8539 : : }
8540 : : }
8541 : : break;
8542 : 0 : case CFN_POPCOUNT:
8543 : 0 : if (call_expr_nargs (_q20) == 1)
8544 : : {
8545 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8546 : 0 : switch (TREE_CODE (_q21))
8547 : : {
8548 : 0 : case CALL_EXPR:
8549 : 0 : switch (get_call_combined_fn (_q21))
8550 : : {
8551 : 0 : case CFN_POPCOUNT:
8552 : 0 : if (call_expr_nargs (_q21) == 1)
8553 : : {
8554 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8555 : 0 : switch (TREE_CODE (_p1))
8556 : : {
8557 : 0 : case CALL_EXPR:
8558 : 0 : switch (get_call_combined_fn (_p1))
8559 : : {
8560 : 0 : case CFN_POPCOUNT:
8561 : 0 : if (call_expr_nargs (_p1) == 1)
8562 : : {
8563 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8564 : 0 : switch (TREE_CODE (_q70))
8565 : : {
8566 : 0 : case BIT_AND_EXPR:
8567 : 0 : {
8568 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8569 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8570 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8571 : : {
8572 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8573 : : {
8574 : 0 : {
8575 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8576 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
8577 : 0 : if (res) return res;
8578 : : }
8579 : : }
8580 : : }
8581 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8582 : : {
8583 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8584 : : {
8585 : 0 : {
8586 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8587 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT);
8588 : 0 : if (res) return res;
8589 : : }
8590 : : }
8591 : : }
8592 : : break;
8593 : : }
8594 : 0 : case BIT_IOR_EXPR:
8595 : 0 : {
8596 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8597 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8598 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8599 : : {
8600 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8601 : : {
8602 : 0 : {
8603 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8604 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
8605 : 0 : if (res) return res;
8606 : : }
8607 : : }
8608 : : }
8609 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8610 : : {
8611 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8612 : : {
8613 : 0 : {
8614 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8615 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT);
8616 : 0 : if (res) return res;
8617 : : }
8618 : : }
8619 : : }
8620 : : break;
8621 : : }
8622 : : default:;
8623 : : }
8624 : : }
8625 : : break;
8626 : : default:;
8627 : : }
8628 : : break;
8629 : : default:;
8630 : : }
8631 : : }
8632 : : break;
8633 : : default:;
8634 : : }
8635 : : break;
8636 : : default:;
8637 : : }
8638 : : }
8639 : : break;
8640 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8641 : 0 : if (call_expr_nargs (_q20) == 1)
8642 : : {
8643 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8644 : 0 : switch (TREE_CODE (_q21))
8645 : : {
8646 : 0 : case CALL_EXPR:
8647 : 0 : switch (get_call_combined_fn (_q21))
8648 : : {
8649 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8650 : 0 : if (call_expr_nargs (_q21) == 1)
8651 : : {
8652 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8653 : 0 : switch (TREE_CODE (_p1))
8654 : : {
8655 : 0 : case CALL_EXPR:
8656 : 0 : switch (get_call_combined_fn (_p1))
8657 : : {
8658 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
8659 : 0 : if (call_expr_nargs (_p1) == 1)
8660 : : {
8661 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8662 : 0 : switch (TREE_CODE (_q70))
8663 : : {
8664 : 0 : case BIT_AND_EXPR:
8665 : 0 : {
8666 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8667 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8668 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8669 : : {
8670 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8671 : : {
8672 : 0 : {
8673 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8674 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8675 : 0 : if (res) return res;
8676 : : }
8677 : : }
8678 : : }
8679 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8680 : : {
8681 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8682 : : {
8683 : 0 : {
8684 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8685 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8686 : 0 : if (res) return res;
8687 : : }
8688 : : }
8689 : : }
8690 : : break;
8691 : : }
8692 : 0 : case BIT_IOR_EXPR:
8693 : 0 : {
8694 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8695 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8696 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8697 : : {
8698 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8699 : : {
8700 : 0 : {
8701 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8702 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8703 : 0 : if (res) return res;
8704 : : }
8705 : : }
8706 : : }
8707 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8708 : : {
8709 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8710 : : {
8711 : 0 : {
8712 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8713 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX);
8714 : 0 : if (res) return res;
8715 : : }
8716 : : }
8717 : : }
8718 : : break;
8719 : : }
8720 : : default:;
8721 : : }
8722 : : }
8723 : : break;
8724 : : default:;
8725 : : }
8726 : : break;
8727 : : default:;
8728 : : }
8729 : : }
8730 : : break;
8731 : : default:;
8732 : : }
8733 : : break;
8734 : : default:;
8735 : : }
8736 : : }
8737 : : break;
8738 : 0 : case CFN_BUILT_IN_POPCOUNTL:
8739 : 0 : if (call_expr_nargs (_q20) == 1)
8740 : : {
8741 : 0 : tree _q30 = CALL_EXPR_ARG (_q20, 0);
8742 : 0 : switch (TREE_CODE (_q21))
8743 : : {
8744 : 0 : case CALL_EXPR:
8745 : 0 : switch (get_call_combined_fn (_q21))
8746 : : {
8747 : 0 : case CFN_BUILT_IN_POPCOUNTL:
8748 : 0 : if (call_expr_nargs (_q21) == 1)
8749 : : {
8750 : 0 : tree _q50 = CALL_EXPR_ARG (_q21, 0);
8751 : 0 : switch (TREE_CODE (_p1))
8752 : : {
8753 : 0 : case CALL_EXPR:
8754 : 0 : switch (get_call_combined_fn (_p1))
8755 : : {
8756 : 0 : case CFN_BUILT_IN_POPCOUNTL:
8757 : 0 : if (call_expr_nargs (_p1) == 1)
8758 : : {
8759 : 0 : tree _q70 = CALL_EXPR_ARG (_p1, 0);
8760 : 0 : switch (TREE_CODE (_q70))
8761 : : {
8762 : 0 : case BIT_AND_EXPR:
8763 : 0 : {
8764 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8765 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8766 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8767 : : {
8768 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8769 : : {
8770 : 0 : {
8771 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8772 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
8773 : 0 : if (res) return res;
8774 : : }
8775 : : }
8776 : : }
8777 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8778 : : {
8779 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8780 : : {
8781 : 0 : {
8782 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8783 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL);
8784 : 0 : if (res) return res;
8785 : : }
8786 : : }
8787 : : }
8788 : : break;
8789 : : }
8790 : 0 : case BIT_IOR_EXPR:
8791 : 0 : {
8792 : 0 : tree _q80 = TREE_OPERAND (_q70, 0);
8793 : 0 : tree _q81 = TREE_OPERAND (_q70, 1);
8794 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
8795 : : {
8796 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
8797 : : {
8798 : 0 : {
8799 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8800 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8801 : 0 : if (res) return res;
8802 : : }
8803 : : }
8804 : : }
8805 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
8806 : : {
8807 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
8808 : : {
8809 : 0 : {
8810 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
8811 : 0 : tree res = generic_simplify_63 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL);
8812 : 0 : if (res) return res;
8813 : : }
8814 : : }
8815 : : }
8816 : : break;
8817 : : }
8818 : : default:;
8819 : : }
8820 : : }
8821 : : break;
8822 : : default:;
8823 : : }
8824 : : break;
8825 : : default:;
8826 : : }
8827 : : }
8828 : : break;
8829 : : default:;
8830 : : }
8831 : : break;
8832 : : default:;
8833 : : }
8834 : : }
8835 : : break;
8836 : : default:;
8837 : : }
8838 : : break;
8839 : : default:;
8840 : : }
8841 : : break;
8842 : : }
8843 : 0 : case VEC_PERM_EXPR:
8844 : 0 : {
8845 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
8846 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
8847 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
8848 : 0 : switch (TREE_CODE (_q20))
8849 : : {
8850 : 0 : case MULT_EXPR:
8851 : 0 : {
8852 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
8853 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
8854 : 0 : if (tree_vec_same_elem_p (_q31))
8855 : : {
8856 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8857 : : {
8858 : 0 : {
8859 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q22, _p1 };
8860 : 0 : tree res = generic_simplify_64 (loc, type, _p0, _p1, captures);
8861 : 0 : if (res) return res;
8862 : : }
8863 : : }
8864 : : }
8865 : 0 : if (tree_vec_same_elem_p (_q30))
8866 : : {
8867 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8868 : : {
8869 : 0 : {
8870 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30, _q22, _p1 };
8871 : 0 : tree res = generic_simplify_64 (loc, type, _p0, _p1, captures);
8872 : 0 : if (res) return res;
8873 : : }
8874 : : }
8875 : : }
8876 : : break;
8877 : : }
8878 : : default:;
8879 : : }
8880 : : break;
8881 : : }
8882 : 623054 : case CALL_EXPR:
8883 : 623054 : switch (get_call_combined_fn (_p0))
8884 : : {
8885 : 18 : case CFN_BUILT_IN_LOG:
8886 : 18 : if (call_expr_nargs (_p0) == 1)
8887 : : {
8888 : 18 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8889 : 18 : switch (TREE_CODE (_p1))
8890 : : {
8891 : 0 : case CALL_EXPR:
8892 : 0 : switch (get_call_combined_fn (_p1))
8893 : : {
8894 : 0 : case CFN_BUILT_IN_LOG:
8895 : 0 : if (call_expr_nargs (_p1) == 1)
8896 : : {
8897 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8898 : 0 : {
8899 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8900 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG);
8901 : 0 : if (res) return res;
8902 : : }
8903 : : }
8904 : : break;
8905 : : default:;
8906 : : }
8907 : : break;
8908 : : default:;
8909 : : }
8910 : : }
8911 : : break;
8912 : 2 : case CFN_BUILT_IN_LOG2:
8913 : 2 : if (call_expr_nargs (_p0) == 1)
8914 : : {
8915 : 2 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8916 : 2 : switch (TREE_CODE (_p1))
8917 : : {
8918 : 0 : case CALL_EXPR:
8919 : 0 : switch (get_call_combined_fn (_p1))
8920 : : {
8921 : 0 : case CFN_BUILT_IN_LOG2:
8922 : 0 : if (call_expr_nargs (_p1) == 1)
8923 : : {
8924 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8925 : 0 : {
8926 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8927 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2);
8928 : 0 : if (res) return res;
8929 : : }
8930 : : }
8931 : : break;
8932 : : default:;
8933 : : }
8934 : : break;
8935 : : default:;
8936 : : }
8937 : : }
8938 : : break;
8939 : 0 : case CFN_BUILT_IN_LOGF:
8940 : 0 : if (call_expr_nargs (_p0) == 1)
8941 : : {
8942 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8943 : 0 : switch (TREE_CODE (_p1))
8944 : : {
8945 : 0 : case CALL_EXPR:
8946 : 0 : switch (get_call_combined_fn (_p1))
8947 : : {
8948 : 0 : case CFN_BUILT_IN_LOGF:
8949 : 0 : if (call_expr_nargs (_p1) == 1)
8950 : : {
8951 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8952 : 0 : {
8953 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8954 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGF);
8955 : 0 : if (res) return res;
8956 : : }
8957 : : }
8958 : : break;
8959 : : default:;
8960 : : }
8961 : : break;
8962 : : default:;
8963 : : }
8964 : : }
8965 : : break;
8966 : 0 : case CFN_BUILT_IN_LOGL:
8967 : 0 : if (call_expr_nargs (_p0) == 1)
8968 : : {
8969 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8970 : 0 : switch (TREE_CODE (_p1))
8971 : : {
8972 : 0 : case CALL_EXPR:
8973 : 0 : switch (get_call_combined_fn (_p1))
8974 : : {
8975 : 0 : case CFN_BUILT_IN_LOGL:
8976 : 0 : if (call_expr_nargs (_p1) == 1)
8977 : : {
8978 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
8979 : 0 : {
8980 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
8981 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOGL);
8982 : 0 : if (res) return res;
8983 : : }
8984 : : }
8985 : : break;
8986 : : default:;
8987 : : }
8988 : : break;
8989 : : default:;
8990 : : }
8991 : : }
8992 : : break;
8993 : 0 : case CFN_BUILT_IN_LOG10F:
8994 : 0 : if (call_expr_nargs (_p0) == 1)
8995 : : {
8996 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
8997 : 0 : switch (TREE_CODE (_p1))
8998 : : {
8999 : 0 : case CALL_EXPR:
9000 : 0 : switch (get_call_combined_fn (_p1))
9001 : : {
9002 : 0 : case CFN_BUILT_IN_LOG10F:
9003 : 0 : if (call_expr_nargs (_p1) == 1)
9004 : : {
9005 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9006 : 0 : {
9007 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9008 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10F);
9009 : 0 : if (res) return res;
9010 : : }
9011 : : }
9012 : : break;
9013 : : default:;
9014 : : }
9015 : : break;
9016 : : default:;
9017 : : }
9018 : : }
9019 : : break;
9020 : 0 : case CFN_BUILT_IN_LOG10L:
9021 : 0 : if (call_expr_nargs (_p0) == 1)
9022 : : {
9023 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9024 : 0 : switch (TREE_CODE (_p1))
9025 : : {
9026 : 0 : case CALL_EXPR:
9027 : 0 : switch (get_call_combined_fn (_p1))
9028 : : {
9029 : 0 : case CFN_BUILT_IN_LOG10L:
9030 : 0 : if (call_expr_nargs (_p1) == 1)
9031 : : {
9032 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9033 : 0 : {
9034 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9035 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10L);
9036 : 0 : if (res) return res;
9037 : : }
9038 : : }
9039 : : break;
9040 : : default:;
9041 : : }
9042 : : break;
9043 : : default:;
9044 : : }
9045 : : }
9046 : : break;
9047 : 0 : case CFN_LOG:
9048 : 0 : if (call_expr_nargs (_p0) == 1)
9049 : : {
9050 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9051 : 0 : switch (TREE_CODE (_p1))
9052 : : {
9053 : 0 : case CALL_EXPR:
9054 : 0 : switch (get_call_combined_fn (_p1))
9055 : : {
9056 : 0 : case CFN_LOG:
9057 : 0 : if (call_expr_nargs (_p1) == 1)
9058 : : {
9059 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9060 : 0 : {
9061 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9062 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_LOG);
9063 : 0 : if (res) return res;
9064 : : }
9065 : : }
9066 : : break;
9067 : : default:;
9068 : : }
9069 : : break;
9070 : : default:;
9071 : : }
9072 : : }
9073 : : break;
9074 : 0 : case CFN_LOG2:
9075 : 0 : if (call_expr_nargs (_p0) == 1)
9076 : : {
9077 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9078 : 0 : switch (TREE_CODE (_p1))
9079 : : {
9080 : 0 : case CALL_EXPR:
9081 : 0 : switch (get_call_combined_fn (_p1))
9082 : : {
9083 : 0 : case CFN_LOG2:
9084 : 0 : if (call_expr_nargs (_p1) == 1)
9085 : : {
9086 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9087 : 0 : {
9088 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9089 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_LOG2);
9090 : 0 : if (res) return res;
9091 : : }
9092 : : }
9093 : : break;
9094 : : default:;
9095 : : }
9096 : : break;
9097 : : default:;
9098 : : }
9099 : : }
9100 : : break;
9101 : 0 : case CFN_LOG10:
9102 : 0 : if (call_expr_nargs (_p0) == 1)
9103 : : {
9104 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9105 : 0 : switch (TREE_CODE (_p1))
9106 : : {
9107 : 0 : case CALL_EXPR:
9108 : 0 : switch (get_call_combined_fn (_p1))
9109 : : {
9110 : 0 : case CFN_LOG10:
9111 : 0 : if (call_expr_nargs (_p1) == 1)
9112 : : {
9113 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9114 : 0 : {
9115 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9116 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_LOG10);
9117 : 0 : if (res) return res;
9118 : : }
9119 : : }
9120 : : break;
9121 : : default:;
9122 : : }
9123 : : break;
9124 : : default:;
9125 : : }
9126 : : }
9127 : : break;
9128 : 6 : case CFN_BUILT_IN_LOG10:
9129 : 6 : if (call_expr_nargs (_p0) == 1)
9130 : : {
9131 : 6 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9132 : 6 : switch (TREE_CODE (_p1))
9133 : : {
9134 : 2 : case CALL_EXPR:
9135 : 2 : switch (get_call_combined_fn (_p1))
9136 : : {
9137 : 2 : case CFN_BUILT_IN_LOG10:
9138 : 2 : if (call_expr_nargs (_p1) == 1)
9139 : : {
9140 : 2 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9141 : 2 : {
9142 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9143 : 2 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG10);
9144 : 2 : if (res) return res;
9145 : : }
9146 : : }
9147 : : break;
9148 : : default:;
9149 : : }
9150 : : break;
9151 : : default:;
9152 : : }
9153 : : }
9154 : : break;
9155 : 0 : case CFN_BUILT_IN_LOG2F:
9156 : 0 : if (call_expr_nargs (_p0) == 1)
9157 : : {
9158 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9159 : 0 : switch (TREE_CODE (_p1))
9160 : : {
9161 : 0 : case CALL_EXPR:
9162 : 0 : switch (get_call_combined_fn (_p1))
9163 : : {
9164 : 0 : case CFN_BUILT_IN_LOG2F:
9165 : 0 : if (call_expr_nargs (_p1) == 1)
9166 : : {
9167 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9168 : 0 : {
9169 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9170 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2F);
9171 : 0 : if (res) return res;
9172 : : }
9173 : : }
9174 : : break;
9175 : : default:;
9176 : : }
9177 : : break;
9178 : : default:;
9179 : : }
9180 : : }
9181 : : break;
9182 : 0 : case CFN_BUILT_IN_LOG2L:
9183 : 0 : if (call_expr_nargs (_p0) == 1)
9184 : : {
9185 : 0 : tree _q20 = CALL_EXPR_ARG (_p0, 0);
9186 : 0 : switch (TREE_CODE (_p1))
9187 : : {
9188 : 0 : case CALL_EXPR:
9189 : 0 : switch (get_call_combined_fn (_p1))
9190 : : {
9191 : 0 : case CFN_BUILT_IN_LOG2L:
9192 : 0 : if (call_expr_nargs (_p1) == 1)
9193 : : {
9194 : 0 : tree _q40 = CALL_EXPR_ARG (_p1, 0);
9195 : 0 : {
9196 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
9197 : 0 : tree res = generic_simplify_62 (loc, type, _p0, _p1, captures, CFN_BUILT_IN_LOG2L);
9198 : 0 : if (res) return res;
9199 : : }
9200 : : }
9201 : : break;
9202 : : default:;
9203 : : }
9204 : : break;
9205 : : default:;
9206 : : }
9207 : : }
9208 : : break;
9209 : : default:;
9210 : : }
9211 : : break;
9212 : 19775959 : default:;
9213 : : }
9214 : 19775959 : switch (TREE_CODE (_p1))
9215 : : {
9216 : 6581 : case BIT_AND_EXPR:
9217 : 6581 : {
9218 : 6581 : tree _q30 = TREE_OPERAND (_p1, 0);
9219 : 6581 : tree _q31 = TREE_OPERAND (_p1, 1);
9220 : 6581 : switch (TREE_CODE (_q30))
9221 : : {
9222 : 80 : case MAX_EXPR:
9223 : 80 : {
9224 : 80 : tree _q40 = TREE_OPERAND (_q30, 0);
9225 : 80 : tree _q41 = TREE_OPERAND (_q30, 1);
9226 : 80 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
9227 : : {
9228 : 80 : switch (TREE_CODE (_q41))
9229 : : {
9230 : 80 : case INTEGER_CST:
9231 : 80 : {
9232 : 80 : switch (TREE_CODE (_q31))
9233 : : {
9234 : 72 : case INTEGER_CST:
9235 : 72 : {
9236 : 72 : {
9237 : 72 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
9238 : 72 : {
9239 : 72 : auto i = wi::neg (wi::to_wide (captures[2]));
9240 : 72 : if (wi::popcount (i) == 1
9241 : 200 : && (wi::to_wide (captures[1])) == (i - 1)
9242 : : )
9243 : : {
9244 : 40 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
9245 : : )
9246 : : {
9247 : 8 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1350;
9248 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1350;
9249 : 8 : {
9250 : 8 : tree res_op0;
9251 : 8 : res_op0 = captures[0];
9252 : 8 : tree res_op1;
9253 : 8 : res_op1 = captures[1];
9254 : 8 : tree _r;
9255 : 8 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
9256 : 8 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 948, __FILE__, __LINE__, true);
9257 : 8 : return _r;
9258 : : }
9259 : 64 : next_after_fail1350:;
9260 : : }
9261 : : else
9262 : : {
9263 : 32 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1351;
9264 : 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1351;
9265 : 32 : {
9266 : 32 : if (! tree_invariant_p (captures[0])) goto next_after_fail1351;
9267 : 0 : if (! tree_invariant_p (captures[1])) goto next_after_fail1351;
9268 : 0 : tree res_op0;
9269 : 0 : {
9270 : 0 : tree _o1[2], _r1;
9271 : 0 : _o1[0] = unshare_expr (captures[0]);
9272 : 0 : _o1[1] = unshare_expr (captures[1]);
9273 : 0 : _r1 = fold_build2_loc (loc, LE_EXPR, boolean_type_node, _o1[0], _o1[1]);
9274 : 0 : res_op0 = _r1;
9275 : : }
9276 : 0 : tree res_op1;
9277 : 0 : res_op1 = unshare_expr (captures[0]);
9278 : 0 : tree res_op2;
9279 : 0 : {
9280 : 0 : tree _o1[2], _r1;
9281 : 0 : _o1[0] = captures[0];
9282 : 0 : _o1[1] = captures[1];
9283 : 0 : _r1 = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9284 : 0 : res_op2 = _r1;
9285 : : }
9286 : 0 : tree _r;
9287 : 0 : _r = fold_build3_loc (loc, COND_EXPR, type, res_op0, res_op1, res_op2);
9288 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 949, __FILE__, __LINE__, true);
9289 : 0 : return _r;
9290 : : }
9291 : 64 : next_after_fail1351:;
9292 : : }
9293 : : }
9294 : 8 : }
9295 : : }
9296 : 64 : break;
9297 : : }
9298 : : default:;
9299 : : }
9300 : : break;
9301 : : }
9302 : : default:;
9303 : : }
9304 : : }
9305 : : break;
9306 : : }
9307 : : default:;
9308 : : }
9309 : : break;
9310 : : }
9311 : 19775951 : default:;
9312 : : }
9313 : 19775951 : switch (TREE_CODE (_p0))
9314 : : {
9315 : 0 : case VEC_PERM_EXPR:
9316 : 0 : {
9317 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
9318 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
9319 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
9320 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
9321 : : {
9322 : 0 : switch (TREE_CODE (_p1))
9323 : : {
9324 : 0 : case VEC_PERM_EXPR:
9325 : 0 : {
9326 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9327 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9328 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9329 : 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
9330 : : {
9331 : 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
9332 : : {
9333 : 0 : {
9334 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
9335 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
9336 : : )
9337 : : {
9338 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1352;
9339 : 0 : {
9340 : 0 : tree res_op0;
9341 : 0 : {
9342 : 0 : tree _o1[2], _r1;
9343 : 0 : _o1[0] = captures[0];
9344 : 0 : _o1[1] = captures[2];
9345 : 0 : _r1 = fold_build2_loc (loc, MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9346 : 0 : captures[3] = _r1;
9347 : : }
9348 : 0 : res_op0 = unshare_expr (captures[3]);
9349 : 0 : tree res_op1;
9350 : 0 : res_op1 = captures[3];
9351 : 0 : tree res_op2;
9352 : 0 : res_op2 = captures[1];
9353 : 0 : tree _r;
9354 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
9355 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 911, __FILE__, __LINE__, true);
9356 : 0 : return _r;
9357 : : }
9358 : 0 : next_after_fail1352:;
9359 : : }
9360 : : }
9361 : : }
9362 : : }
9363 : : break;
9364 : : }
9365 : 0 : default:;
9366 : : }
9367 : 0 : switch (TREE_CODE (_q22))
9368 : : {
9369 : 0 : case VECTOR_CST:
9370 : 0 : {
9371 : 0 : switch (TREE_CODE (_p1))
9372 : : {
9373 : 0 : case VEC_PERM_EXPR:
9374 : 0 : {
9375 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9376 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9377 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9378 : 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
9379 : : {
9380 : 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
9381 : : {
9382 : 0 : switch (TREE_CODE (_q62))
9383 : : {
9384 : 0 : case VECTOR_CST:
9385 : 0 : {
9386 : 0 : {
9387 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
9388 : 0 : tree res = generic_simplify_39 (loc, type, _p0, _p1, captures, MINUS_EXPR);
9389 : 0 : if (res) return res;
9390 : : }
9391 : 0 : break;
9392 : : }
9393 : : default:;
9394 : : }
9395 : : }
9396 : : }
9397 : : break;
9398 : : }
9399 : : default:;
9400 : : }
9401 : : break;
9402 : : }
9403 : : default:;
9404 : : }
9405 : : }
9406 : : break;
9407 : : }
9408 : : default:;
9409 : : }
9410 : : return NULL_TREE;
9411 : : }
9412 : :
9413 : : tree
9414 : 1202718 : generic_simplify_LSHIFT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
9415 : : {
9416 : 1202718 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9417 : 1202718 : switch (TREE_CODE (_p1))
9418 : : {
9419 : 254 : case TRUNC_MOD_EXPR:
9420 : 254 : {
9421 : 254 : tree _q30 = TREE_OPERAND (_p1, 0);
9422 : 254 : tree _q31 = TREE_OPERAND (_p1, 1);
9423 : 254 : {
9424 : 254 : tree _q31_pops[1];
9425 : 254 : if (tree_power_of_two_cand (_q31, _q31_pops))
9426 : : {
9427 : 248 : tree _q50 = _q31_pops[0];
9428 : 248 : {
9429 : 248 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9430 : 248 : tree res = generic_simplify_371 (loc, type, _p0, _p1, captures, LSHIFT_EXPR, TRUNC_MOD_EXPR);
9431 : 248 : if (res) return res;
9432 : : }
9433 : : }
9434 : : }
9435 : 24 : break;
9436 : : }
9437 : 0 : case FLOOR_MOD_EXPR:
9438 : 0 : {
9439 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
9440 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
9441 : 0 : {
9442 : 0 : tree _q31_pops[1];
9443 : 0 : if (tree_power_of_two_cand (_q31, _q31_pops))
9444 : : {
9445 : 0 : tree _q50 = _q31_pops[0];
9446 : 0 : {
9447 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
9448 : 0 : tree res = generic_simplify_371 (loc, type, _p0, _p1, captures, LSHIFT_EXPR, FLOOR_MOD_EXPR);
9449 : 0 : if (res) return res;
9450 : : }
9451 : : }
9452 : : }
9453 : 0 : break;
9454 : : }
9455 : 1202488 : default:;
9456 : : }
9457 : 1202488 : if (uniform_integer_cst_p (_p1))
9458 : : {
9459 : 810387 : {
9460 : 810387 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9461 : 810387 : tree res = generic_simplify_372 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9462 : 810387 : if (res) return res;
9463 : : }
9464 : : }
9465 : 1202023 : switch (TREE_CODE (_p0))
9466 : : {
9467 : 660549 : CASE_CONVERT:
9468 : 660549 : {
9469 : 660549 : tree _q20 = TREE_OPERAND (_p0, 0);
9470 : 660549 : switch (TREE_CODE (_q20))
9471 : : {
9472 : 4 : case LT_EXPR:
9473 : 4 : {
9474 : 4 : tree _q30 = TREE_OPERAND (_q20, 0);
9475 : 4 : tree _q31 = TREE_OPERAND (_q20, 1);
9476 : 4 : if (integer_zerop (_q31))
9477 : : {
9478 : 4 : switch (TREE_CODE (_p1))
9479 : : {
9480 : 4 : case INTEGER_CST:
9481 : 4 : {
9482 : 4 : {
9483 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
9484 : 4 : if (TYPE_SIGN (TREE_TYPE (captures[0])) == SIGNED
9485 : 4 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (TREE_TYPE (captures[0])) - 1)
9486 : : )
9487 : : {
9488 : 0 : {
9489 : 0 : wide_int wone = wi::one (TYPE_PRECISION (type));
9490 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail1780;
9491 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1780;
9492 : 0 : {
9493 : 0 : tree res_op0;
9494 : 0 : {
9495 : 0 : tree _o1[1], _r1;
9496 : 0 : _o1[0] = captures[0];
9497 : 0 : if (TREE_TYPE (_o1[0]) != type)
9498 : : {
9499 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
9500 : : }
9501 : : else
9502 : : _r1 = _o1[0];
9503 : 0 : res_op0 = _r1;
9504 : : }
9505 : 0 : tree res_op1;
9506 : 0 : res_op1 = wide_int_to_tree (type,
9507 : 0 : wi::lshift (wone, wi::to_wide (captures[2])));
9508 : 0 : tree _r;
9509 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
9510 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
9511 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
9512 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1019, __FILE__, __LINE__, true);
9513 : 0 : return _r;
9514 : : }
9515 : 0 : next_after_fail1780:;
9516 : 0 : }
9517 : : }
9518 : : }
9519 : 4 : break;
9520 : : }
9521 : : default:;
9522 : : }
9523 : : }
9524 : : break;
9525 : : }
9526 : 123 : CASE_CONVERT:
9527 : 123 : {
9528 : 123 : tree _q30 = TREE_OPERAND (_q20, 0);
9529 : 123 : switch (TREE_CODE (_q30))
9530 : : {
9531 : 0 : case RSHIFT_EXPR:
9532 : 0 : {
9533 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
9534 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
9535 : 0 : switch (TREE_CODE (_q41))
9536 : : {
9537 : 0 : case INTEGER_CST:
9538 : 0 : {
9539 : 0 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q41, 0) && types_match (_p1, _q41)))
9540 : : {
9541 : 0 : {
9542 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
9543 : 0 : if (wi::ltu_p (wi::to_wide (captures[2]), element_precision (type))
9544 : 0 : && INTEGRAL_TYPE_P (type)
9545 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
9546 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
9547 : 0 : && TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (captures[1]))
9548 : 0 : && (TYPE_PRECISION (TREE_TYPE (captures[0])) >= TYPE_PRECISION (type)
9549 : 0 : || wi::geu_p (wi::to_wide (captures[2]),
9550 : 0 : TYPE_PRECISION (type)
9551 : 0 : - TYPE_PRECISION (TREE_TYPE (captures[0]))))
9552 : : )
9553 : : {
9554 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1781;
9555 : 0 : {
9556 : 0 : tree res_op0;
9557 : 0 : {
9558 : 0 : tree _o1[1], _r1;
9559 : 0 : _o1[0] = captures[1];
9560 : 0 : if (TREE_TYPE (_o1[0]) != type)
9561 : : {
9562 : 0 : _r1 = fold_build1_loc (loc, NOP_EXPR, type, _o1[0]);
9563 : : }
9564 : : else
9565 : : _r1 = _o1[0];
9566 : 0 : res_op0 = _r1;
9567 : : }
9568 : 0 : tree res_op1;
9569 : 0 : {
9570 : 0 : tree _o1[2], _r1;
9571 : 0 : _o1[0] = build_minus_one_cst (type);
9572 : 0 : _o1[1] = captures[2];
9573 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9574 : 0 : res_op1 = _r1;
9575 : : }
9576 : 0 : tree _r;
9577 : 0 : _r = fold_build2_loc (loc, BIT_AND_EXPR, type, res_op0, res_op1);
9578 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1020, __FILE__, __LINE__, true);
9579 : 0 : return _r;
9580 : : }
9581 : 0 : next_after_fail1781:;
9582 : : }
9583 : : }
9584 : : }
9585 : : break;
9586 : : }
9587 : : default:;
9588 : : }
9589 : : break;
9590 : : }
9591 : : default:;
9592 : : }
9593 : : break;
9594 : : }
9595 : : default:;
9596 : : }
9597 : : break;
9598 : : }
9599 : 20742 : case RSHIFT_EXPR:
9600 : 20742 : {
9601 : 20742 : tree _q20 = TREE_OPERAND (_p0, 0);
9602 : 20742 : tree _q21 = TREE_OPERAND (_p0, 1);
9603 : 20742 : switch (TREE_CODE (_q21))
9604 : : {
9605 : 48 : case INTEGER_CST:
9606 : 48 : {
9607 : 48 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9608 : : {
9609 : 3 : {
9610 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9611 : 3 : tree res = generic_simplify_373 (loc, type, _p0, _p1, captures);
9612 : 3 : if (res) return res;
9613 : : }
9614 : : }
9615 : : break;
9616 : : }
9617 : : default:;
9618 : : }
9619 : : break;
9620 : : }
9621 : 1202020 : default:;
9622 : : }
9623 : 1202020 : {
9624 : 1202020 : tree _p0_pops[1];
9625 : 1202020 : if (tree_nop_convert (_p0, _p0_pops))
9626 : : {
9627 : 632587 : tree _q20 = _p0_pops[0];
9628 : 632587 : switch (TREE_CODE (_q20))
9629 : : {
9630 : 73 : case RSHIFT_EXPR:
9631 : 73 : {
9632 : 73 : tree _q30 = TREE_OPERAND (_q20, 0);
9633 : 73 : tree _q31 = TREE_OPERAND (_q20, 1);
9634 : 73 : switch (TREE_CODE (_q31))
9635 : : {
9636 : 67 : case INTEGER_CST:
9637 : 67 : {
9638 : 67 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
9639 : : {
9640 : 8 : {
9641 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
9642 : 8 : tree res = generic_simplify_373 (loc, type, _p0, _p1, captures);
9643 : 8 : if (res) return res;
9644 : : }
9645 : : }
9646 : : break;
9647 : : }
9648 : : default:;
9649 : : }
9650 : : break;
9651 : : }
9652 : : default:;
9653 : : }
9654 : : }
9655 : : }
9656 : 1202012 : if (integer_onep (_p0))
9657 : : {
9658 : 327545 : switch (TREE_CODE (_p1))
9659 : : {
9660 : 51078 : case MINUS_EXPR:
9661 : 51078 : {
9662 : 51078 : tree _q30 = TREE_OPERAND (_p1, 0);
9663 : 51078 : tree _q31 = TREE_OPERAND (_p1, 1);
9664 : 51078 : switch (TREE_CODE (_q30))
9665 : : {
9666 : 51075 : case INTEGER_CST:
9667 : 51075 : {
9668 : 51075 : {
9669 : 51075 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31 };
9670 : 51075 : if (INTEGRAL_TYPE_P (type)
9671 : 51075 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
9672 : 51075 : && single_use (captures[1])
9673 : : )
9674 : : {
9675 : 30750 : if (TYPE_UNSIGNED (type)
9676 : : )
9677 : : {
9678 : 30744 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1782;
9679 : 30744 : {
9680 : 30744 : tree res_op0;
9681 : 30744 : {
9682 : 30744 : tree _o1[2], _r1;
9683 : 30744 : _o1[0] = captures[0];
9684 : 30744 : _o1[1] = captures[2];
9685 : 30744 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9686 : 30744 : res_op0 = _r1;
9687 : : }
9688 : 30744 : tree res_op1;
9689 : 30744 : res_op1 = captures[3];
9690 : 30744 : tree _r;
9691 : 30744 : _r = fold_build2_loc (loc, RSHIFT_EXPR, type, res_op0, res_op1);
9692 : 30744 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1021, __FILE__, __LINE__, true);
9693 : 30744 : return _r;
9694 : : }
9695 : 0 : next_after_fail1782:;
9696 : : }
9697 : : else
9698 : : {
9699 : 6 : {
9700 : 6 : tree utype = unsigned_type_for (type);
9701 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1783;
9702 : 6 : {
9703 : 6 : tree res_op0;
9704 : 6 : {
9705 : 6 : tree _o1[2], _r1;
9706 : 6 : {
9707 : 6 : tree _o2[2], _r2;
9708 : 6 : {
9709 : 6 : tree _o3[1], _r3;
9710 : 6 : _o3[0] = captures[0];
9711 : 6 : if (TREE_TYPE (_o3[0]) != utype)
9712 : : {
9713 : 6 : _r3 = fold_build1_loc (loc, NOP_EXPR, utype, _o3[0]);
9714 : : }
9715 : : else
9716 : : _r3 = _o3[0];
9717 : 6 : _o2[0] = _r3;
9718 : : }
9719 : 6 : _o2[1] = captures[2];
9720 : 6 : _r2 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
9721 : 6 : _o1[0] = _r2;
9722 : : }
9723 : 6 : _o1[1] = captures[3];
9724 : 6 : _r1 = fold_build2_loc (loc, RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9725 : 6 : res_op0 = _r1;
9726 : : }
9727 : 6 : tree _r;
9728 : 6 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
9729 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1022, __FILE__, __LINE__, true);
9730 : 6 : return _r;
9731 : : }
9732 : 0 : next_after_fail1783:;
9733 : : }
9734 : : }
9735 : : }
9736 : : }
9737 : 20325 : break;
9738 : : }
9739 : : default:;
9740 : : }
9741 : : break;
9742 : : }
9743 : : default:;
9744 : : }
9745 : : }
9746 : 1171262 : if (integer_zerop (_p1))
9747 : : {
9748 : 1050 : {
9749 : 1050 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9750 : 1050 : tree res = generic_simplify_374 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9751 : 1050 : if (res) return res;
9752 : : }
9753 : : }
9754 : 1170212 : if (integer_zerop (_p0))
9755 : : {
9756 : 162 : {
9757 : 162 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9758 : 162 : tree res = generic_simplify_375 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9759 : 162 : if (res) return res;
9760 : : }
9761 : : }
9762 : 1170050 : switch (TREE_CODE (_p1))
9763 : : {
9764 : 0 : case VECTOR_CST:
9765 : 0 : {
9766 : 0 : {
9767 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9768 : 0 : tree res = generic_simplify_376 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9769 : 0 : if (res) return res;
9770 : : }
9771 : 0 : break;
9772 : : }
9773 : 0 : case CONSTRUCTOR:
9774 : 0 : {
9775 : 0 : {
9776 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
9777 : 0 : tree res = generic_simplify_377 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9778 : 0 : if (res) return res;
9779 : : }
9780 : 0 : break;
9781 : : }
9782 : 1170050 : default:;
9783 : : }
9784 : 1170050 : switch (TREE_CODE (_p0))
9785 : : {
9786 : 280 : case LSHIFT_EXPR:
9787 : 280 : {
9788 : 280 : tree _q20 = TREE_OPERAND (_p0, 0);
9789 : 280 : tree _q21 = TREE_OPERAND (_p0, 1);
9790 : 280 : switch (TREE_CODE (_q21))
9791 : : {
9792 : 39 : case INTEGER_CST:
9793 : 39 : {
9794 : 39 : switch (TREE_CODE (_p1))
9795 : : {
9796 : 39 : case INTEGER_CST:
9797 : 39 : {
9798 : 39 : {
9799 : 39 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9800 : 39 : tree res = generic_simplify_378 (loc, type, _p0, _p1, captures, LSHIFT_EXPR);
9801 : 39 : if (res) return res;
9802 : : }
9803 : 0 : break;
9804 : : }
9805 : : default:;
9806 : : }
9807 : : break;
9808 : : }
9809 : : default:;
9810 : : }
9811 : : break;
9812 : : }
9813 : 660394 : CASE_CONVERT:
9814 : 660394 : {
9815 : 660394 : tree _q20 = TREE_OPERAND (_p0, 0);
9816 : 660394 : switch (TREE_CODE (_q20))
9817 : : {
9818 : 0 : case BIT_AND_EXPR:
9819 : 0 : {
9820 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
9821 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
9822 : 0 : switch (TREE_CODE (_q31))
9823 : : {
9824 : 0 : case INTEGER_CST:
9825 : 0 : {
9826 : 0 : switch (TREE_CODE (_p1))
9827 : : {
9828 : 0 : case INTEGER_CST:
9829 : 0 : {
9830 : 0 : {
9831 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9832 : 0 : tree res = generic_simplify_379 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, LSHIFT_EXPR);
9833 : 0 : if (res) return res;
9834 : : }
9835 : 0 : break;
9836 : : }
9837 : : default:;
9838 : : }
9839 : : break;
9840 : : }
9841 : : default:;
9842 : : }
9843 : : break;
9844 : : }
9845 : 11 : case BIT_XOR_EXPR:
9846 : 11 : {
9847 : 11 : tree _q30 = TREE_OPERAND (_q20, 0);
9848 : 11 : tree _q31 = TREE_OPERAND (_q20, 1);
9849 : 11 : switch (TREE_CODE (_q31))
9850 : : {
9851 : 0 : case INTEGER_CST:
9852 : 0 : {
9853 : 0 : switch (TREE_CODE (_p1))
9854 : : {
9855 : 0 : case INTEGER_CST:
9856 : 0 : {
9857 : 0 : {
9858 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9859 : 0 : tree res = generic_simplify_379 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, LSHIFT_EXPR);
9860 : 0 : if (res) return res;
9861 : : }
9862 : 0 : break;
9863 : : }
9864 : : default:;
9865 : : }
9866 : : break;
9867 : : }
9868 : : default:;
9869 : : }
9870 : : break;
9871 : : }
9872 : 18 : case BIT_IOR_EXPR:
9873 : 18 : {
9874 : 18 : tree _q30 = TREE_OPERAND (_q20, 0);
9875 : 18 : tree _q31 = TREE_OPERAND (_q20, 1);
9876 : 18 : switch (TREE_CODE (_q31))
9877 : : {
9878 : 11 : case INTEGER_CST:
9879 : 11 : {
9880 : 11 : switch (TREE_CODE (_p1))
9881 : : {
9882 : 11 : case INTEGER_CST:
9883 : 11 : {
9884 : 11 : {
9885 : 11 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
9886 : 11 : tree res = generic_simplify_379 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, LSHIFT_EXPR);
9887 : 11 : if (res) return res;
9888 : : }
9889 : 2 : break;
9890 : : }
9891 : : default:;
9892 : : }
9893 : : break;
9894 : : }
9895 : : default:;
9896 : : }
9897 : : break;
9898 : : }
9899 : : default:;
9900 : : }
9901 : : break;
9902 : : }
9903 : 14858 : case BIT_AND_EXPR:
9904 : 14858 : {
9905 : 14858 : tree _q20 = TREE_OPERAND (_p0, 0);
9906 : 14858 : tree _q21 = TREE_OPERAND (_p0, 1);
9907 : 14858 : switch (TREE_CODE (_q21))
9908 : : {
9909 : 14763 : case INTEGER_CST:
9910 : 14763 : {
9911 : 14763 : switch (TREE_CODE (_p1))
9912 : : {
9913 : 14624 : case INTEGER_CST:
9914 : 14624 : {
9915 : 14624 : {
9916 : 14624 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9917 : 14624 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, BIT_AND_EXPR, LSHIFT_EXPR);
9918 : 14624 : if (res) return res;
9919 : : }
9920 : 7 : break;
9921 : : }
9922 : : default:;
9923 : : }
9924 : : break;
9925 : : }
9926 : : default:;
9927 : : }
9928 : : break;
9929 : : }
9930 : 69 : case BIT_XOR_EXPR:
9931 : 69 : {
9932 : 69 : tree _q20 = TREE_OPERAND (_p0, 0);
9933 : 69 : tree _q21 = TREE_OPERAND (_p0, 1);
9934 : 69 : switch (TREE_CODE (_q21))
9935 : : {
9936 : 0 : case INTEGER_CST:
9937 : 0 : {
9938 : 0 : switch (TREE_CODE (_p1))
9939 : : {
9940 : 0 : case INTEGER_CST:
9941 : 0 : {
9942 : 0 : {
9943 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9944 : 0 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, BIT_XOR_EXPR, LSHIFT_EXPR);
9945 : 0 : if (res) return res;
9946 : : }
9947 : 0 : break;
9948 : : }
9949 : : default:;
9950 : : }
9951 : : break;
9952 : : }
9953 : : default:;
9954 : : }
9955 : : break;
9956 : : }
9957 : 78 : case BIT_IOR_EXPR:
9958 : 78 : {
9959 : 78 : tree _q20 = TREE_OPERAND (_p0, 0);
9960 : 78 : tree _q21 = TREE_OPERAND (_p0, 1);
9961 : 78 : switch (TREE_CODE (_q21))
9962 : : {
9963 : 2 : case INTEGER_CST:
9964 : 2 : {
9965 : 2 : switch (TREE_CODE (_p1))
9966 : : {
9967 : 2 : case INTEGER_CST:
9968 : 2 : {
9969 : 2 : {
9970 : 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
9971 : 2 : tree res = generic_simplify_380 (loc, type, _p0, _p1, captures, BIT_IOR_EXPR, LSHIFT_EXPR);
9972 : 2 : if (res) return res;
9973 : : }
9974 : 0 : break;
9975 : : }
9976 : : default:;
9977 : : }
9978 : : break;
9979 : : }
9980 : : default:;
9981 : : }
9982 : : break;
9983 : : }
9984 : 1 : case VEC_COND_EXPR:
9985 : 1 : {
9986 : 1 : tree _q20 = TREE_OPERAND (_p0, 0);
9987 : 1 : tree _q21 = TREE_OPERAND (_p0, 1);
9988 : 1 : tree _q22 = TREE_OPERAND (_p0, 2);
9989 : 1 : switch (TREE_CODE (_p1))
9990 : : {
9991 : 0 : case VEC_COND_EXPR:
9992 : 0 : {
9993 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
9994 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
9995 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
9996 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
9997 : : {
9998 : 0 : {
9999 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10000 : 0 : if (VECTOR_TYPE_P (type)
10001 : 0 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
10002 : : || types_match (type, TREE_TYPE (captures[2]))
10003 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10004 : : || (optimize_vectors_before_lowering_p ()
10005 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10006 : : )
10007 : : {
10008 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1784;
10009 : 0 : {
10010 : 0 : tree res_op0;
10011 : 0 : res_op0 = captures[1];
10012 : 0 : tree res_op1;
10013 : 0 : {
10014 : 0 : tree _o1[2], _r1;
10015 : 0 : _o1[0] = captures[2];
10016 : 0 : _o1[1] = captures[5];
10017 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10018 : 0 : if (EXPR_P (_r1))
10019 : 0 : goto next_after_fail1784;
10020 : 0 : res_op1 = _r1;
10021 : : }
10022 : 0 : tree res_op2;
10023 : 0 : {
10024 : 0 : tree _o1[2], _r1;
10025 : 0 : _o1[0] = captures[3];
10026 : 0 : _o1[1] = captures[6];
10027 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10028 : 0 : if (EXPR_P (_r1))
10029 : 0 : goto next_after_fail1784;
10030 : 0 : res_op2 = _r1;
10031 : : }
10032 : 0 : tree _r;
10033 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10034 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
10035 : 0 : return _r;
10036 : : }
10037 : 0 : next_after_fail1784:;
10038 : : }
10039 : : }
10040 : : }
10041 : : break;
10042 : : }
10043 : 1 : default:;
10044 : : }
10045 : 1 : {
10046 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10047 : 1 : if (VECTOR_TYPE_P (type)
10048 : 1 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
10049 : : || types_match (type, TREE_TYPE (captures[2]))
10050 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10051 : : || (optimize_vectors_before_lowering_p ()
10052 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10053 : : )
10054 : : {
10055 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1785;
10056 : 1 : {
10057 : 1 : if (! tree_invariant_p (captures[4])) goto next_after_fail1785;
10058 : 0 : tree res_op0;
10059 : 0 : res_op0 = captures[1];
10060 : 0 : tree res_op1;
10061 : 0 : {
10062 : 0 : tree _o1[2], _r1;
10063 : 0 : _o1[0] = captures[2];
10064 : 0 : _o1[1] = unshare_expr (captures[4]);
10065 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10066 : 0 : if (EXPR_P (_r1))
10067 : 0 : goto next_after_fail1785;
10068 : 0 : res_op1 = _r1;
10069 : : }
10070 : 0 : tree res_op2;
10071 : 0 : {
10072 : 0 : tree _o1[2], _r1;
10073 : 0 : _o1[0] = captures[3];
10074 : 0 : _o1[1] = captures[4];
10075 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10076 : 0 : if (EXPR_P (_r1))
10077 : 0 : goto next_after_fail1785;
10078 : 0 : res_op2 = _r1;
10079 : : }
10080 : 0 : tree _r;
10081 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10082 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
10083 : 0 : return _r;
10084 : : }
10085 : 1 : next_after_fail1785:;
10086 : : }
10087 : : }
10088 : 1 : break;
10089 : : }
10090 : 1155383 : default:;
10091 : : }
10092 : 1155383 : switch (TREE_CODE (_p1))
10093 : : {
10094 : 3 : case VEC_COND_EXPR:
10095 : 3 : {
10096 : 3 : tree _q30 = TREE_OPERAND (_p1, 0);
10097 : 3 : tree _q31 = TREE_OPERAND (_p1, 1);
10098 : 3 : tree _q32 = TREE_OPERAND (_p1, 2);
10099 : 3 : {
10100 : 3 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10101 : 3 : if (VECTOR_TYPE_P (type)
10102 : 3 : && (TREE_CODE_CLASS (LSHIFT_EXPR) != tcc_comparison
10103 : : || types_match (type, TREE_TYPE (captures[3]))
10104 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10105 : : || (optimize_vectors_before_lowering_p ()
10106 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10107 : : )
10108 : : {
10109 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1786;
10110 : 3 : {
10111 : 3 : if (! tree_invariant_p (captures[0])) goto next_after_fail1786;
10112 : 1 : tree res_op0;
10113 : 1 : res_op0 = captures[2];
10114 : 1 : tree res_op1;
10115 : 1 : {
10116 : 1 : tree _o1[2], _r1;
10117 : 1 : _o1[0] = unshare_expr (captures[0]);
10118 : 1 : _o1[1] = captures[3];
10119 : 1 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10120 : 1 : if (EXPR_P (_r1))
10121 : 0 : goto next_after_fail1786;
10122 : 1 : res_op1 = _r1;
10123 : : }
10124 : 1 : tree res_op2;
10125 : 1 : {
10126 : 1 : tree _o1[2], _r1;
10127 : 1 : _o1[0] = captures[0];
10128 : 1 : _o1[1] = captures[4];
10129 : 1 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10130 : 1 : if (EXPR_P (_r1))
10131 : 0 : goto next_after_fail1786;
10132 : 1 : res_op2 = _r1;
10133 : : }
10134 : 1 : tree _r;
10135 : 1 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10136 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 910, __FILE__, __LINE__, true);
10137 : 1 : return _r;
10138 : : }
10139 : 2 : next_after_fail1786:;
10140 : : }
10141 : : }
10142 : 2 : break;
10143 : : }
10144 : 1155382 : default:;
10145 : : }
10146 : 1155382 : switch (TREE_CODE (_p0))
10147 : : {
10148 : 0 : case VEC_PERM_EXPR:
10149 : 0 : {
10150 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10151 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10152 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10153 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
10154 : : {
10155 : 0 : switch (TREE_CODE (_p1))
10156 : : {
10157 : 0 : case VEC_PERM_EXPR:
10158 : 0 : {
10159 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10160 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10161 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10162 : 0 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
10163 : : {
10164 : 0 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
10165 : : {
10166 : 0 : {
10167 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
10168 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
10169 : : )
10170 : : {
10171 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1787;
10172 : 0 : {
10173 : 0 : tree res_op0;
10174 : 0 : {
10175 : 0 : tree _o1[2], _r1;
10176 : 0 : _o1[0] = captures[0];
10177 : 0 : _o1[1] = captures[2];
10178 : 0 : _r1 = fold_build2_loc (loc, LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10179 : 0 : captures[3] = _r1;
10180 : : }
10181 : 0 : res_op0 = unshare_expr (captures[3]);
10182 : 0 : tree res_op1;
10183 : 0 : res_op1 = captures[3];
10184 : 0 : tree res_op2;
10185 : 0 : res_op2 = captures[1];
10186 : 0 : tree _r;
10187 : 0 : _r = fold_build3_loc (loc, VEC_PERM_EXPR, type, res_op0, res_op1, res_op2);
10188 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 911, __FILE__, __LINE__, true);
10189 : 0 : return _r;
10190 : : }
10191 : 0 : next_after_fail1787:;
10192 : : }
10193 : : }
10194 : : }
10195 : : }
10196 : : break;
10197 : : }
10198 : : default:;
10199 : : }
10200 : : }
10201 : : break;
10202 : : }
10203 : : default:;
10204 : : }
10205 : : return NULL_TREE;
10206 : : }
10207 : :
10208 : : tree
10209 : 84113 : generic_simplify_MIN_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10210 : : {
10211 : 84113 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10212 : 84113 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
10213 : : {
10214 : 0 : {
10215 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10216 : 0 : tree res = generic_simplify_498 (loc, type, _p0, _p1, captures, MIN_EXPR);
10217 : 0 : if (res) return res;
10218 : : }
10219 : : }
10220 : 84113 : switch (TREE_CODE (_p0))
10221 : : {
10222 : 4 : case MIN_EXPR:
10223 : 4 : {
10224 : 4 : tree _q20 = TREE_OPERAND (_p0, 0);
10225 : 4 : tree _q21 = TREE_OPERAND (_p0, 1);
10226 : 4 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10227 : : {
10228 : 0 : {
10229 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
10230 : 0 : tree res = generic_simplify_499 (loc, type, _p0, _p1, captures, MIN_EXPR);
10231 : 0 : if (res) return res;
10232 : : }
10233 : : }
10234 : 4 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10235 : : {
10236 : 0 : {
10237 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
10238 : 0 : tree res = generic_simplify_499 (loc, type, _p0, _p1, captures, MIN_EXPR);
10239 : 0 : if (res) return res;
10240 : : }
10241 : : }
10242 : : break;
10243 : : }
10244 : 84113 : default:;
10245 : : }
10246 : 84113 : switch (TREE_CODE (_p1))
10247 : : {
10248 : 0 : case MIN_EXPR:
10249 : 0 : {
10250 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10251 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10252 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10253 : : {
10254 : 0 : {
10255 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
10256 : 0 : tree res = generic_simplify_500 (loc, type, _p0, _p1, captures, MIN_EXPR);
10257 : 0 : if (res) return res;
10258 : : }
10259 : : }
10260 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10261 : : {
10262 : 0 : {
10263 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q30 };
10264 : 0 : tree res = generic_simplify_500 (loc, type, _p0, _p1, captures, MIN_EXPR);
10265 : 0 : if (res) return res;
10266 : : }
10267 : : }
10268 : : break;
10269 : : }
10270 : 84113 : default:;
10271 : : }
10272 : 84113 : switch (TREE_CODE (_p0))
10273 : : {
10274 : 4 : case MAX_EXPR:
10275 : 4 : {
10276 : 4 : tree _q20 = TREE_OPERAND (_p0, 0);
10277 : 4 : tree _q21 = TREE_OPERAND (_p0, 1);
10278 : 4 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
10279 : : {
10280 : 3 : {
10281 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10282 : 3 : tree res = generic_simplify_501 (loc, type, _p0, _p1, captures);
10283 : 3 : if (res) return res;
10284 : : }
10285 : : }
10286 : 1 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10287 : : {
10288 : 1 : {
10289 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10290 : 1 : tree res = generic_simplify_501 (loc, type, _p0, _p1, captures);
10291 : 1 : if (res) return res;
10292 : : }
10293 : : }
10294 : : break;
10295 : : }
10296 : 84109 : default:;
10297 : : }
10298 : 84109 : switch (TREE_CODE (_p1))
10299 : : {
10300 : 0 : case MAX_EXPR:
10301 : 0 : {
10302 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10303 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10304 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
10305 : : {
10306 : 0 : {
10307 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
10308 : 0 : tree res = generic_simplify_501 (loc, type, _p0, _p1, captures);
10309 : 0 : if (res) return res;
10310 : : }
10311 : : }
10312 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10313 : : {
10314 : 0 : {
10315 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
10316 : 0 : tree res = generic_simplify_501 (loc, type, _p0, _p1, captures);
10317 : 0 : if (res) return res;
10318 : : }
10319 : : }
10320 : : break;
10321 : : }
10322 : 0 : case NEGATE_EXPR:
10323 : 0 : {
10324 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10325 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10326 : : {
10327 : 0 : {
10328 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10329 : 0 : tree res = generic_simplify_502 (loc, type, _p0, _p1, captures);
10330 : 0 : if (res) return res;
10331 : : }
10332 : : }
10333 : : break;
10334 : : }
10335 : 84109 : default:;
10336 : : }
10337 : 84109 : switch (TREE_CODE (_p0))
10338 : : {
10339 : 2 : case NEGATE_EXPR:
10340 : 2 : {
10341 : 2 : tree _q20 = TREE_OPERAND (_p0, 0);
10342 : 2 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10343 : : {
10344 : 2 : {
10345 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10346 : 2 : tree res = generic_simplify_502 (loc, type, _p0, _p1, captures);
10347 : 2 : if (res) return res;
10348 : : }
10349 : : }
10350 : : break;
10351 : : }
10352 : 84107 : default:;
10353 : : }
10354 : 84107 : {
10355 : 84107 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10356 : 84107 : if (INTEGRAL_TYPE_P (type)
10357 : 82321 : && TYPE_MIN_VALUE (type)
10358 : 166428 : && operand_equal_p (captures[1], TYPE_MIN_VALUE (type), OEP_ONLY_CONST)
10359 : : )
10360 : : {
10361 : 540 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1851;
10362 : 540 : {
10363 : 540 : tree _r;
10364 : 540 : _r = captures[1];
10365 : 540 : if (TREE_SIDE_EFFECTS (captures[0]))
10366 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
10367 : 540 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
10368 : 540 : return _r;
10369 : : }
10370 : 0 : next_after_fail1851:;
10371 : : }
10372 : : else
10373 : : {
10374 : 83567 : if (INTEGRAL_TYPE_P (type)
10375 : 81781 : && TYPE_MAX_VALUE (type)
10376 : 165348 : && operand_equal_p (captures[1], TYPE_MAX_VALUE (type), OEP_ONLY_CONST)
10377 : : )
10378 : : {
10379 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1852;
10380 : 1 : {
10381 : 1 : tree _r;
10382 : 1 : _r = captures[0];
10383 : 1 : if (TREE_SIDE_EFFECTS (captures[1]))
10384 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
10385 : 1 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
10386 : 1 : return _r;
10387 : : }
10388 : 0 : next_after_fail1852:;
10389 : : }
10390 : : }
10391 : : }
10392 : 83566 : switch (TREE_CODE (_p1))
10393 : : {
10394 : 22 : case PLUS_EXPR:
10395 : 22 : {
10396 : 22 : tree _q30 = TREE_OPERAND (_p1, 0);
10397 : 22 : tree _q31 = TREE_OPERAND (_p1, 1);
10398 : 22 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10399 : : {
10400 : 0 : switch (TREE_CODE (_q31))
10401 : : {
10402 : 0 : case INTEGER_CST:
10403 : 0 : {
10404 : 0 : {
10405 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
10406 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10407 : : )
10408 : : {
10409 : 0 : if (tree_int_cst_sgn (captures[2]) > 0
10410 : : )
10411 : : {
10412 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1853;
10413 : 0 : {
10414 : 0 : tree _r;
10415 : 0 : _r = captures[0];
10416 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10417 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10418 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1039, __FILE__, __LINE__, true);
10419 : 0 : return _r;
10420 : : }
10421 : 0 : next_after_fail1853:;
10422 : : }
10423 : : else
10424 : : {
10425 : 0 : if (TREE_SIDE_EFFECTS (_p1)) goto next_after_fail1854;
10426 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1854;
10427 : 0 : {
10428 : 0 : tree _r;
10429 : 0 : _r = captures[1];
10430 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1040, __FILE__, __LINE__, true);
10431 : 0 : return _r;
10432 : : }
10433 : 0 : next_after_fail1854:;
10434 : : }
10435 : : }
10436 : : }
10437 : 0 : break;
10438 : : }
10439 : : default:;
10440 : : }
10441 : : }
10442 : : break;
10443 : : }
10444 : 83566 : default:;
10445 : : }
10446 : 83566 : switch (TREE_CODE (_p0))
10447 : : {
10448 : 5571 : case PLUS_EXPR:
10449 : 5571 : {
10450 : 5571 : tree _q20 = TREE_OPERAND (_p0, 0);
10451 : 5571 : tree _q21 = TREE_OPERAND (_p0, 1);
10452 : 5571 : switch (TREE_CODE (_q21))
10453 : : {
10454 : 5442 : case INTEGER_CST:
10455 : 5442 : {
10456 : 5442 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10457 : : {
10458 : 0 : {
10459 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
10460 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
10461 : : )
10462 : : {
10463 : 0 : if (tree_int_cst_sgn (captures[2]) > 0
10464 : : )
10465 : : {
10466 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1855;
10467 : 0 : {
10468 : 0 : tree _r;
10469 : 0 : _r = captures[0];
10470 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
10471 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
10472 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1039, __FILE__, __LINE__, true);
10473 : 0 : return _r;
10474 : : }
10475 : 0 : next_after_fail1855:;
10476 : : }
10477 : : else
10478 : : {
10479 : 0 : if (TREE_SIDE_EFFECTS (_p0)) goto next_after_fail1856;
10480 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1856;
10481 : 0 : {
10482 : 0 : tree _r;
10483 : 0 : _r = captures[1];
10484 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1040, __FILE__, __LINE__, true);
10485 : 0 : return _r;
10486 : : }
10487 : 0 : next_after_fail1856:;
10488 : : }
10489 : : }
10490 : : }
10491 : : }
10492 : : break;
10493 : : }
10494 : : default:;
10495 : : }
10496 : : break;
10497 : : }
10498 : 4 : case MIN_EXPR:
10499 : 4 : {
10500 : 4 : tree _q20 = TREE_OPERAND (_p0, 0);
10501 : 4 : tree _q21 = TREE_OPERAND (_p0, 1);
10502 : 4 : switch (TREE_CODE (_p1))
10503 : : {
10504 : 0 : case MAX_EXPR:
10505 : 0 : {
10506 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10507 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10508 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10509 : : {
10510 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10511 : : {
10512 : 0 : {
10513 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10514 : 0 : if (!HONOR_NANS (captures[0])
10515 : : )
10516 : : {
10517 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1857;
10518 : 0 : {
10519 : 0 : tree res_op0;
10520 : 0 : res_op0 = captures[0];
10521 : 0 : tree res_op1;
10522 : 0 : res_op1 = captures[1];
10523 : 0 : tree _r;
10524 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10525 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
10526 : 0 : return _r;
10527 : : }
10528 : 0 : next_after_fail1857:;
10529 : : }
10530 : : }
10531 : : }
10532 : : }
10533 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10534 : : {
10535 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10536 : : {
10537 : 0 : {
10538 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10539 : 0 : if (!HONOR_NANS (captures[0])
10540 : : )
10541 : : {
10542 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1858;
10543 : 0 : {
10544 : 0 : tree res_op0;
10545 : 0 : res_op0 = captures[0];
10546 : 0 : tree res_op1;
10547 : 0 : res_op1 = captures[1];
10548 : 0 : tree _r;
10549 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10550 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
10551 : 0 : return _r;
10552 : : }
10553 : 0 : next_after_fail1858:;
10554 : : }
10555 : : }
10556 : : }
10557 : : }
10558 : : break;
10559 : : }
10560 : : default:;
10561 : : }
10562 : : break;
10563 : : }
10564 : 0 : case MAX_EXPR:
10565 : 0 : {
10566 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10567 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10568 : 0 : switch (TREE_CODE (_p1))
10569 : : {
10570 : 0 : case MIN_EXPR:
10571 : 0 : {
10572 : 0 : tree _q50 = TREE_OPERAND (_p1, 0);
10573 : 0 : tree _q51 = TREE_OPERAND (_p1, 1);
10574 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10575 : : {
10576 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10577 : : {
10578 : 0 : {
10579 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10580 : 0 : if (!HONOR_NANS (captures[0])
10581 : : )
10582 : : {
10583 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1859;
10584 : 0 : {
10585 : 0 : tree res_op0;
10586 : 0 : res_op0 = captures[0];
10587 : 0 : tree res_op1;
10588 : 0 : res_op1 = captures[1];
10589 : 0 : tree _r;
10590 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10591 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
10592 : 0 : return _r;
10593 : : }
10594 : 0 : next_after_fail1859:;
10595 : : }
10596 : : }
10597 : : }
10598 : : }
10599 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10600 : : {
10601 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10602 : : {
10603 : 0 : {
10604 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10605 : 0 : if (!HONOR_NANS (captures[0])
10606 : : )
10607 : : {
10608 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1860;
10609 : 0 : {
10610 : 0 : tree res_op0;
10611 : 0 : res_op0 = captures[0];
10612 : 0 : tree res_op1;
10613 : 0 : res_op1 = captures[1];
10614 : 0 : tree _r;
10615 : 0 : _r = fold_build2_loc (loc, MIN_EXPR, type, res_op0, res_op1);
10616 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
10617 : 0 : return _r;
10618 : : }
10619 : 0 : next_after_fail1860:;
10620 : : }
10621 : : }
10622 : : }
10623 : : }
10624 : : break;
10625 : : }
10626 : : default:;
10627 : : }
10628 : : break;
10629 : : }
10630 : 506 : CASE_CONVERT:
10631 : 506 : {
10632 : 506 : tree _q20 = TREE_OPERAND (_p0, 0);
10633 : 506 : switch (TREE_CODE (_q20))
10634 : : {
10635 : 2 : case ADDR_EXPR:
10636 : 2 : {
10637 : 2 : switch (TREE_CODE (_p1))
10638 : : {
10639 : 2 : CASE_CONVERT:
10640 : 2 : {
10641 : 2 : tree _q40 = TREE_OPERAND (_p1, 0);
10642 : 2 : switch (TREE_CODE (_q40))
10643 : : {
10644 : 2 : case ADDR_EXPR:
10645 : 2 : {
10646 : 2 : {
10647 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10648 : 2 : tree res = generic_simplify_503 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10649 : 2 : if (res) return res;
10650 : : }
10651 : 2 : break;
10652 : : }
10653 : : default:;
10654 : : }
10655 : : break;
10656 : : }
10657 : 0 : case ADDR_EXPR:
10658 : 0 : {
10659 : 0 : {
10660 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
10661 : 0 : tree res = generic_simplify_504 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10662 : 0 : if (res) return res;
10663 : : }
10664 : 0 : break;
10665 : : }
10666 : : default:;
10667 : : }
10668 : : break;
10669 : : }
10670 : : default:;
10671 : : }
10672 : : break;
10673 : : }
10674 : 10 : case ADDR_EXPR:
10675 : 10 : {
10676 : 10 : switch (TREE_CODE (_p1))
10677 : : {
10678 : 0 : CASE_CONVERT:
10679 : 0 : {
10680 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10681 : 0 : switch (TREE_CODE (_q30))
10682 : : {
10683 : 0 : case ADDR_EXPR:
10684 : 0 : {
10685 : 0 : {
10686 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _q30 };
10687 : 0 : tree res = generic_simplify_505 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10688 : 0 : if (res) return res;
10689 : : }
10690 : 0 : break;
10691 : : }
10692 : : default:;
10693 : : }
10694 : : break;
10695 : : }
10696 : 10 : case ADDR_EXPR:
10697 : 10 : {
10698 : 10 : {
10699 : 10 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _p1, _p1 };
10700 : 10 : tree res = generic_simplify_506 (loc, type, _p0, _p1, captures, MIN_EXPR, LT_EXPR);
10701 : 10 : if (res) return res;
10702 : : }
10703 : 10 : break;
10704 : : }
10705 : : default:;
10706 : : }
10707 : : break;
10708 : : }
10709 : 0 : case NEGATE_EXPR:
10710 : 0 : {
10711 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10712 : 0 : switch (TREE_CODE (_p1))
10713 : : {
10714 : 0 : case NEGATE_EXPR:
10715 : 0 : {
10716 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10717 : 0 : {
10718 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10719 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
10720 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
10721 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
10722 : : )
10723 : : {
10724 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1861;
10725 : 0 : {
10726 : 0 : tree res_op0;
10727 : 0 : {
10728 : 0 : tree _o1[2], _r1;
10729 : 0 : _o1[0] = captures[1];
10730 : 0 : _o1[1] = captures[3];
10731 : 0 : _r1 = fold_build2_loc (loc, MAX_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10732 : 0 : res_op0 = _r1;
10733 : : }
10734 : 0 : tree _r;
10735 : 0 : _r = fold_build1_loc (loc, NEGATE_EXPR, type, res_op0);
10736 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1041, __FILE__, __LINE__, true);
10737 : 0 : return _r;
10738 : : }
10739 : 0 : next_after_fail1861:;
10740 : : }
10741 : : }
10742 : 0 : break;
10743 : : }
10744 : : default:;
10745 : : }
10746 : : break;
10747 : : }
10748 : 0 : case BIT_NOT_EXPR:
10749 : 0 : {
10750 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10751 : 0 : switch (TREE_CODE (_p1))
10752 : : {
10753 : 0 : case BIT_NOT_EXPR:
10754 : 0 : {
10755 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
10756 : 0 : {
10757 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10758 : 0 : tree res = generic_simplify_507 (loc, type, _p0, _p1, captures, MIN_EXPR, MAX_EXPR);
10759 : 0 : if (res) return res;
10760 : : }
10761 : 0 : break;
10762 : : }
10763 : : default:;
10764 : : }
10765 : : break;
10766 : : }
10767 : 0 : case VEC_COND_EXPR:
10768 : 0 : {
10769 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10770 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10771 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10772 : 0 : switch (TREE_CODE (_p1))
10773 : : {
10774 : 0 : case VEC_COND_EXPR:
10775 : 0 : {
10776 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10777 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10778 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10779 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10780 : : {
10781 : 0 : {
10782 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10783 : 0 : if (VECTOR_TYPE_P (type)
10784 : 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10785 : : || types_match (type, TREE_TYPE (captures[2]))
10786 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10787 : : || (optimize_vectors_before_lowering_p ()
10788 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10789 : : )
10790 : : {
10791 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1862;
10792 : 0 : {
10793 : 0 : tree res_op0;
10794 : 0 : res_op0 = captures[1];
10795 : 0 : tree res_op1;
10796 : 0 : {
10797 : 0 : tree _o1[2], _r1;
10798 : 0 : _o1[0] = captures[2];
10799 : 0 : _o1[1] = captures[5];
10800 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10801 : 0 : if (EXPR_P (_r1))
10802 : 0 : goto next_after_fail1862;
10803 : 0 : res_op1 = _r1;
10804 : : }
10805 : 0 : tree res_op2;
10806 : 0 : {
10807 : 0 : tree _o1[2], _r1;
10808 : 0 : _o1[0] = captures[3];
10809 : 0 : _o1[1] = captures[6];
10810 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10811 : 0 : if (EXPR_P (_r1))
10812 : 0 : goto next_after_fail1862;
10813 : 0 : res_op2 = _r1;
10814 : : }
10815 : 0 : tree _r;
10816 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10817 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
10818 : 0 : return _r;
10819 : : }
10820 : 0 : next_after_fail1862:;
10821 : : }
10822 : : }
10823 : : }
10824 : : break;
10825 : : }
10826 : 0 : default:;
10827 : : }
10828 : 0 : {
10829 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
10830 : 0 : if (VECTOR_TYPE_P (type)
10831 : 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10832 : : || types_match (type, TREE_TYPE (captures[2]))
10833 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10834 : : || (optimize_vectors_before_lowering_p ()
10835 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10836 : : )
10837 : : {
10838 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1863;
10839 : 0 : {
10840 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1863;
10841 : 0 : tree res_op0;
10842 : 0 : res_op0 = captures[1];
10843 : 0 : tree res_op1;
10844 : 0 : {
10845 : 0 : tree _o1[2], _r1;
10846 : 0 : _o1[0] = captures[2];
10847 : 0 : _o1[1] = unshare_expr (captures[4]);
10848 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10849 : 0 : if (EXPR_P (_r1))
10850 : 0 : goto next_after_fail1863;
10851 : 0 : res_op1 = _r1;
10852 : : }
10853 : 0 : tree res_op2;
10854 : 0 : {
10855 : 0 : tree _o1[2], _r1;
10856 : 0 : _o1[0] = captures[3];
10857 : 0 : _o1[1] = captures[4];
10858 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10859 : 0 : if (EXPR_P (_r1))
10860 : 0 : goto next_after_fail1863;
10861 : 0 : res_op2 = _r1;
10862 : : }
10863 : 0 : tree _r;
10864 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10865 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
10866 : 0 : return _r;
10867 : : }
10868 : 0 : next_after_fail1863:;
10869 : : }
10870 : : }
10871 : 0 : break;
10872 : : }
10873 : 83566 : default:;
10874 : : }
10875 : 83566 : switch (TREE_CODE (_p1))
10876 : : {
10877 : 0 : case VEC_COND_EXPR:
10878 : 0 : {
10879 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
10880 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
10881 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
10882 : 0 : {
10883 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
10884 : 0 : if (VECTOR_TYPE_P (type)
10885 : 0 : && (TREE_CODE_CLASS (MIN_EXPR) != tcc_comparison
10886 : : || types_match (type, TREE_TYPE (captures[3]))
10887 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
10888 : : || (optimize_vectors_before_lowering_p ()
10889 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
10890 : : )
10891 : : {
10892 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1864;
10893 : 0 : {
10894 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1864;
10895 : 0 : tree res_op0;
10896 : 0 : res_op0 = captures[2];
10897 : 0 : tree res_op1;
10898 : 0 : {
10899 : 0 : tree _o1[2], _r1;
10900 : 0 : _o1[0] = unshare_expr (captures[0]);
10901 : 0 : _o1[1] = captures[3];
10902 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10903 : 0 : if (EXPR_P (_r1))
10904 : 0 : goto next_after_fail1864;
10905 : 0 : res_op1 = _r1;
10906 : : }
10907 : 0 : tree res_op2;
10908 : 0 : {
10909 : 0 : tree _o1[2], _r1;
10910 : 0 : _o1[0] = captures[0];
10911 : 0 : _o1[1] = captures[4];
10912 : 0 : _r1 = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10913 : 0 : if (EXPR_P (_r1))
10914 : 0 : goto next_after_fail1864;
10915 : 0 : res_op2 = _r1;
10916 : : }
10917 : 0 : tree _r;
10918 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10919 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 910, __FILE__, __LINE__, true);
10920 : 0 : return _r;
10921 : : }
10922 : 0 : next_after_fail1864:;
10923 : : }
10924 : : }
10925 : 0 : break;
10926 : : }
10927 : 83566 : default:;
10928 : : }
10929 : 83566 : if (tree_zero_one_valued_p (_p0))
10930 : : {
10931 : 12 : if (tree_zero_one_valued_p (_p1))
10932 : : {
10933 : 2 : {
10934 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
10935 : 2 : tree res = generic_simplify_508 (loc, type, _p0, _p1, captures, MIN_EXPR, BIT_AND_EXPR);
10936 : 2 : if (res) return res;
10937 : : }
10938 : : }
10939 : : }
10940 : : return NULL_TREE;
10941 : : }
10942 : :
10943 : : tree
10944 : 870541 : generic_simplify_UNORDERED_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
10945 : : {
10946 : 870541 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10947 : 870541 : switch (TREE_CODE (_p0))
10948 : : {
10949 : 0 : case VEC_COND_EXPR:
10950 : 0 : {
10951 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
10952 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
10953 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
10954 : 0 : switch (TREE_CODE (_p1))
10955 : : {
10956 : 0 : case VEC_COND_EXPR:
10957 : 0 : {
10958 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
10959 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
10960 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
10961 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10962 : : {
10963 : 0 : {
10964 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
10965 : 0 : if (VECTOR_TYPE_P (type)
10966 : 0 : && (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
10967 : 0 : || types_match (type, TREE_TYPE (captures[2]))
10968 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
10969 : : || (optimize_vectors_before_lowering_p ()
10970 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
10971 : : )
10972 : : {
10973 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1881;
10974 : 0 : {
10975 : 0 : tree res_op0;
10976 : 0 : res_op0 = captures[1];
10977 : 0 : tree res_op1;
10978 : 0 : {
10979 : 0 : tree _o1[2], _r1;
10980 : 0 : _o1[0] = captures[2];
10981 : 0 : _o1[1] = captures[5];
10982 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
10983 : 0 : if (EXPR_P (_r1))
10984 : 0 : goto next_after_fail1881;
10985 : 0 : res_op1 = _r1;
10986 : : }
10987 : 0 : tree res_op2;
10988 : 0 : {
10989 : 0 : tree _o1[2], _r1;
10990 : 0 : _o1[0] = captures[3];
10991 : 0 : _o1[1] = captures[6];
10992 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
10993 : 0 : if (EXPR_P (_r1))
10994 : 0 : goto next_after_fail1881;
10995 : 0 : res_op2 = _r1;
10996 : : }
10997 : 0 : tree _r;
10998 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
10999 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
11000 : 0 : return _r;
11001 : : }
11002 : 0 : next_after_fail1881:;
11003 : : }
11004 : : }
11005 : : }
11006 : : break;
11007 : : }
11008 : 0 : default:;
11009 : : }
11010 : 0 : {
11011 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11012 : 0 : if (VECTOR_TYPE_P (type)
11013 : 0 : && (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
11014 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11015 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11016 : : || (optimize_vectors_before_lowering_p ()
11017 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11018 : : )
11019 : : {
11020 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1882;
11021 : 0 : {
11022 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1882;
11023 : 0 : tree res_op0;
11024 : 0 : res_op0 = captures[1];
11025 : 0 : tree res_op1;
11026 : 0 : {
11027 : 0 : tree _o1[2], _r1;
11028 : 0 : _o1[0] = captures[2];
11029 : 0 : _o1[1] = unshare_expr (captures[4]);
11030 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11031 : 0 : if (EXPR_P (_r1))
11032 : 0 : goto next_after_fail1882;
11033 : 0 : res_op1 = _r1;
11034 : : }
11035 : 0 : tree res_op2;
11036 : 0 : {
11037 : 0 : tree _o1[2], _r1;
11038 : 0 : _o1[0] = captures[3];
11039 : 0 : _o1[1] = captures[4];
11040 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11041 : 0 : if (EXPR_P (_r1))
11042 : 0 : goto next_after_fail1882;
11043 : 0 : res_op2 = _r1;
11044 : : }
11045 : 0 : tree _r;
11046 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11047 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
11048 : 0 : return _r;
11049 : : }
11050 : 0 : next_after_fail1882:;
11051 : : }
11052 : : }
11053 : 0 : break;
11054 : : }
11055 : 870541 : default:;
11056 : : }
11057 : 870541 : switch (TREE_CODE (_p1))
11058 : : {
11059 : 0 : case VEC_COND_EXPR:
11060 : 0 : {
11061 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11062 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11063 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11064 : 0 : {
11065 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11066 : 0 : if (VECTOR_TYPE_P (type)
11067 : 0 : && (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
11068 : 0 : || types_match (type, TREE_TYPE (captures[3]))
11069 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11070 : : || (optimize_vectors_before_lowering_p ()
11071 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11072 : : )
11073 : : {
11074 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1883;
11075 : 0 : {
11076 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1883;
11077 : 0 : tree res_op0;
11078 : 0 : res_op0 = captures[2];
11079 : 0 : tree res_op1;
11080 : 0 : {
11081 : 0 : tree _o1[2], _r1;
11082 : 0 : _o1[0] = unshare_expr (captures[0]);
11083 : 0 : _o1[1] = captures[3];
11084 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11085 : 0 : if (EXPR_P (_r1))
11086 : 0 : goto next_after_fail1883;
11087 : 0 : res_op1 = _r1;
11088 : : }
11089 : 0 : tree res_op2;
11090 : 0 : {
11091 : 0 : tree _o1[2], _r1;
11092 : 0 : _o1[0] = captures[0];
11093 : 0 : _o1[1] = captures[4];
11094 : 0 : _r1 = fold_build2_loc (loc, UNORDERED_EXPR, type, _o1[0], _o1[1]);
11095 : 0 : if (EXPR_P (_r1))
11096 : 0 : goto next_after_fail1883;
11097 : 0 : res_op2 = _r1;
11098 : : }
11099 : 0 : tree _r;
11100 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11101 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 910, __FILE__, __LINE__, true);
11102 : 0 : return _r;
11103 : : }
11104 : 0 : next_after_fail1883:;
11105 : : }
11106 : : }
11107 : 0 : break;
11108 : : }
11109 : 870541 : default:;
11110 : : }
11111 : 870541 : switch (TREE_CODE (_p0))
11112 : : {
11113 : 0 : case FLOAT_EXPR:
11114 : 0 : {
11115 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11116 : 0 : switch (TREE_CODE (_p1))
11117 : : {
11118 : 0 : case FLOAT_EXPR:
11119 : 0 : {
11120 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11121 : 0 : {
11122 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
11123 : 0 : tree res = generic_simplify_254 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, UNORDERED_EXPR);
11124 : 0 : if (res) return res;
11125 : : }
11126 : 0 : break;
11127 : : }
11128 : : default:;
11129 : : }
11130 : : break;
11131 : : }
11132 : 18 : case NEGATE_EXPR:
11133 : 18 : {
11134 : 18 : tree _q20 = TREE_OPERAND (_p0, 0);
11135 : 18 : switch (TREE_CODE (_p1))
11136 : : {
11137 : 18 : case NEGATE_EXPR:
11138 : 18 : {
11139 : 18 : tree _q40 = TREE_OPERAND (_p1, 0);
11140 : 18 : {
11141 : 18 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11142 : 18 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, UNORDERED_EXPR);
11143 : 18 : if (res) return res;
11144 : : }
11145 : 0 : break;
11146 : : }
11147 : 0 : default:;
11148 : : }
11149 : 0 : if (CONSTANT_CLASS_P (_p1))
11150 : : {
11151 : 0 : {
11152 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11153 : 0 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, UNORDERED_EXPR, UNORDERED_EXPR);
11154 : 0 : if (res) return res;
11155 : : }
11156 : : }
11157 : : break;
11158 : : }
11159 : 870523 : default:;
11160 : : }
11161 : 870523 : switch (TREE_CODE (_p1))
11162 : : {
11163 : 519 : case REAL_CST:
11164 : 519 : {
11165 : 519 : {
11166 : 519 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11167 : 519 : tree res = generic_simplify_537 (loc, type, _p0, _p1, captures, UNORDERED_EXPR);
11168 : 519 : if (res) return res;
11169 : : }
11170 : 519 : break;
11171 : : }
11172 : 870523 : default:;
11173 : : }
11174 : 870523 : {
11175 : 870523 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11176 : 870523 : if (tree_expr_nan_p (captures[0]) || tree_expr_nan_p (captures[1])
11177 : : )
11178 : : {
11179 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1884;
11180 : 0 : {
11181 : 0 : tree _r;
11182 : 0 : _r = constant_boolean_node (true, type);
11183 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
11184 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11185 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11186 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11187 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1048, __FILE__, __LINE__, true);
11188 : 0 : return _r;
11189 : : }
11190 : 0 : next_after_fail1884:;
11191 : : }
11192 : : else
11193 : : {
11194 : 870523 : if (!tree_expr_maybe_nan_p (captures[0]) && !tree_expr_maybe_nan_p (captures[1])
11195 : : )
11196 : : {
11197 : 35 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1885;
11198 : 35 : {
11199 : 35 : tree _r;
11200 : 35 : _r = constant_boolean_node (false, type);
11201 : 35 : if (TREE_SIDE_EFFECTS (captures[0]))
11202 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
11203 : 35 : if (TREE_SIDE_EFFECTS (captures[1]))
11204 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11205 : 35 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1049, __FILE__, __LINE__, true);
11206 : 35 : return _r;
11207 : : }
11208 : 0 : next_after_fail1885:;
11209 : : }
11210 : : }
11211 : : }
11212 : 870488 : return NULL_TREE;
11213 : : }
11214 : :
11215 : : tree
11216 : 1797470 : generic_simplify_UNGT_EXPR (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1)
11217 : : {
11218 : 1797470 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11219 : 1797470 : switch (TREE_CODE (_p0))
11220 : : {
11221 : 0 : case VEC_COND_EXPR:
11222 : 0 : {
11223 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11224 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11225 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11226 : 0 : switch (TREE_CODE (_p1))
11227 : : {
11228 : 0 : case VEC_COND_EXPR:
11229 : 0 : {
11230 : 0 : tree _q60 = TREE_OPERAND (_p1, 0);
11231 : 0 : tree _q61 = TREE_OPERAND (_p1, 1);
11232 : 0 : tree _q62 = TREE_OPERAND (_p1, 2);
11233 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11234 : : {
11235 : 0 : {
11236 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
11237 : 0 : if (VECTOR_TYPE_P (type)
11238 : 0 : && (TREE_CODE_CLASS (UNGT_EXPR) != tcc_comparison
11239 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11240 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11241 : : || (optimize_vectors_before_lowering_p ()
11242 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11243 : : )
11244 : : {
11245 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1897;
11246 : 0 : {
11247 : 0 : tree res_op0;
11248 : 0 : res_op0 = captures[1];
11249 : 0 : tree res_op1;
11250 : 0 : {
11251 : 0 : tree _o1[2], _r1;
11252 : 0 : _o1[0] = captures[2];
11253 : 0 : _o1[1] = captures[5];
11254 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11255 : 0 : if (EXPR_P (_r1))
11256 : 0 : goto next_after_fail1897;
11257 : 0 : res_op1 = _r1;
11258 : : }
11259 : 0 : tree res_op2;
11260 : 0 : {
11261 : 0 : tree _o1[2], _r1;
11262 : 0 : _o1[0] = captures[3];
11263 : 0 : _o1[1] = captures[6];
11264 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11265 : 0 : if (EXPR_P (_r1))
11266 : 0 : goto next_after_fail1897;
11267 : 0 : res_op2 = _r1;
11268 : : }
11269 : 0 : tree _r;
11270 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11271 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
11272 : 0 : return _r;
11273 : : }
11274 : 0 : next_after_fail1897:;
11275 : : }
11276 : : }
11277 : : }
11278 : : break;
11279 : : }
11280 : 0 : default:;
11281 : : }
11282 : 0 : {
11283 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
11284 : 0 : if (VECTOR_TYPE_P (type)
11285 : 0 : && (TREE_CODE_CLASS (UNGT_EXPR) != tcc_comparison
11286 : 0 : || types_match (type, TREE_TYPE (captures[2]))
11287 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
11288 : : || (optimize_vectors_before_lowering_p ()
11289 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
11290 : : )
11291 : : {
11292 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1898;
11293 : 0 : {
11294 : 0 : if (! tree_invariant_p (captures[4])) goto next_after_fail1898;
11295 : 0 : tree res_op0;
11296 : 0 : res_op0 = captures[1];
11297 : 0 : tree res_op1;
11298 : 0 : {
11299 : 0 : tree _o1[2], _r1;
11300 : 0 : _o1[0] = captures[2];
11301 : 0 : _o1[1] = unshare_expr (captures[4]);
11302 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11303 : 0 : if (EXPR_P (_r1))
11304 : 0 : goto next_after_fail1898;
11305 : 0 : res_op1 = _r1;
11306 : : }
11307 : 0 : tree res_op2;
11308 : 0 : {
11309 : 0 : tree _o1[2], _r1;
11310 : 0 : _o1[0] = captures[3];
11311 : 0 : _o1[1] = captures[4];
11312 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11313 : 0 : if (EXPR_P (_r1))
11314 : 0 : goto next_after_fail1898;
11315 : 0 : res_op2 = _r1;
11316 : : }
11317 : 0 : tree _r;
11318 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11319 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
11320 : 0 : return _r;
11321 : : }
11322 : 0 : next_after_fail1898:;
11323 : : }
11324 : : }
11325 : 0 : break;
11326 : : }
11327 : 1797470 : default:;
11328 : : }
11329 : 1797470 : switch (TREE_CODE (_p1))
11330 : : {
11331 : 0 : case VEC_COND_EXPR:
11332 : 0 : {
11333 : 0 : tree _q30 = TREE_OPERAND (_p1, 0);
11334 : 0 : tree _q31 = TREE_OPERAND (_p1, 1);
11335 : 0 : tree _q32 = TREE_OPERAND (_p1, 2);
11336 : 0 : {
11337 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
11338 : 0 : if (VECTOR_TYPE_P (type)
11339 : 0 : && (TREE_CODE_CLASS (UNGT_EXPR) != tcc_comparison
11340 : 0 : || types_match (type, TREE_TYPE (captures[3]))
11341 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
11342 : : || (optimize_vectors_before_lowering_p ()
11343 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
11344 : : )
11345 : : {
11346 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1899;
11347 : 0 : {
11348 : 0 : if (! tree_invariant_p (captures[0])) goto next_after_fail1899;
11349 : 0 : tree res_op0;
11350 : 0 : res_op0 = captures[2];
11351 : 0 : tree res_op1;
11352 : 0 : {
11353 : 0 : tree _o1[2], _r1;
11354 : 0 : _o1[0] = unshare_expr (captures[0]);
11355 : 0 : _o1[1] = captures[3];
11356 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11357 : 0 : if (EXPR_P (_r1))
11358 : 0 : goto next_after_fail1899;
11359 : 0 : res_op1 = _r1;
11360 : : }
11361 : 0 : tree res_op2;
11362 : 0 : {
11363 : 0 : tree _o1[2], _r1;
11364 : 0 : _o1[0] = captures[0];
11365 : 0 : _o1[1] = captures[4];
11366 : 0 : _r1 = fold_build2_loc (loc, UNGT_EXPR, type, _o1[0], _o1[1]);
11367 : 0 : if (EXPR_P (_r1))
11368 : 0 : goto next_after_fail1899;
11369 : 0 : res_op2 = _r1;
11370 : : }
11371 : 0 : tree _r;
11372 : 0 : _r = fold_build3_loc (loc, VEC_COND_EXPR, type, res_op0, res_op1, res_op2);
11373 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 910, __FILE__, __LINE__, true);
11374 : 0 : return _r;
11375 : : }
11376 : 0 : next_after_fail1899:;
11377 : : }
11378 : : }
11379 : 0 : break;
11380 : : }
11381 : 1797470 : default:;
11382 : : }
11383 : 1797470 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11384 : : {
11385 : 0 : {
11386 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11387 : 0 : tree res = generic_simplify_538 (loc, type, _p0, _p1, captures, UNGT_EXPR);
11388 : 0 : if (res) return res;
11389 : : }
11390 : : }
11391 : 1797470 : switch (TREE_CODE (_p0))
11392 : : {
11393 : 338 : case FLOAT_EXPR:
11394 : 338 : {
11395 : 338 : tree _q20 = TREE_OPERAND (_p0, 0);
11396 : 338 : switch (TREE_CODE (_p1))
11397 : : {
11398 : 0 : case FLOAT_EXPR:
11399 : 0 : {
11400 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11401 : 0 : {
11402 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
11403 : 0 : tree res = generic_simplify_254 (loc, type, _p0, _p1, captures, UNGT_EXPR, GT_EXPR);
11404 : 0 : if (res) return res;
11405 : : }
11406 : 0 : break;
11407 : : }
11408 : : default:;
11409 : : }
11410 : : break;
11411 : : }
11412 : 0 : case NEGATE_EXPR:
11413 : 0 : {
11414 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11415 : 0 : switch (TREE_CODE (_p1))
11416 : : {
11417 : 0 : case NEGATE_EXPR:
11418 : 0 : {
11419 : 0 : tree _q40 = TREE_OPERAND (_p1, 0);
11420 : 0 : {
11421 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
11422 : 0 : tree res = generic_simplify_257 (loc, type, _p0, _p1, captures, UNGT_EXPR, UNLT_EXPR);
11423 : 0 : if (res) return res;
11424 : : }
11425 : 0 : break;
11426 : : }
11427 : 0 : default:;
11428 : : }
11429 : 0 : if (CONSTANT_CLASS_P (_p1))
11430 : : {
11431 : 0 : {
11432 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
11433 : 0 : tree res = generic_simplify_258 (loc, type, _p0, _p1, captures, UNGT_EXPR, UNLT_EXPR);
11434 : 0 : if (res) return res;
11435 : : }
11436 : : }
11437 : : break;
11438 : : }
11439 : 1797470 : default:;
11440 : : }
11441 : 1797470 : switch (TREE_CODE (_p1))
11442 : : {
11443 : 1380874 : case REAL_CST:
11444 : 1380874 : {
11445 : 1380874 : {
11446 : 1380874 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11447 : 1380874 : tree res = generic_simplify_537 (loc, type, _p0, _p1, captures, UNGT_EXPR);
11448 : 1380874 : if (res) return res;
11449 : : }
11450 : 1380872 : break;
11451 : : }
11452 : : default:;
11453 : : }
11454 : : return NULL_TREE;
11455 : : }
11456 : :
11457 : : tree
11458 : 567186269 : generic_simplify (location_t loc, enum tree_code code, const tree type ATTRIBUTE_UNUSED, tree _p0, tree _p1)
11459 : : {
11460 : 567186269 : switch (code)
11461 : : {
11462 : 94420724 : case PLUS_EXPR:
11463 : 94420724 : return generic_simplify_PLUS_EXPR (loc, code, type, _p0, _p1);
11464 : 36067681 : case POINTER_PLUS_EXPR:
11465 : 36067681 : return generic_simplify_POINTER_PLUS_EXPR (loc, code, type, _p0, _p1);
11466 : 31787752 : case MINUS_EXPR:
11467 : 31787752 : return generic_simplify_MINUS_EXPR (loc, code, type, _p0, _p1);
11468 : 1818380 : case BIT_IOR_EXPR:
11469 : 1818380 : return generic_simplify_BIT_IOR_EXPR (loc, code, type, _p0, _p1);
11470 : 708195 : case BIT_XOR_EXPR:
11471 : 708195 : return generic_simplify_BIT_XOR_EXPR (loc, code, type, _p0, _p1);
11472 : 2786171 : case POINTER_DIFF_EXPR:
11473 : 2786171 : return generic_simplify_POINTER_DIFF_EXPR (loc, code, type, _p0, _p1);
11474 : 69279799 : case MULT_EXPR:
11475 : 69279799 : return generic_simplify_MULT_EXPR (loc, code, type, _p0, _p1);
11476 : 25852950 : case EQ_EXPR:
11477 : 25852950 : return generic_simplify_EQ_EXPR (loc, code, type, _p0, _p1);
11478 : 33834043 : case NE_EXPR:
11479 : 33834043 : return generic_simplify_NE_EXPR (loc, code, type, _p0, _p1);
11480 : 2161610 : case TRUNC_DIV_EXPR:
11481 : 2161610 : return generic_simplify_TRUNC_DIV_EXPR (loc, code, type, _p0, _p1);
11482 : 7274 : case CEIL_DIV_EXPR:
11483 : 7274 : return generic_simplify_CEIL_DIV_EXPR (loc, code, type, _p0, _p1);
11484 : 2225177 : case FLOOR_DIV_EXPR:
11485 : 2225177 : return generic_simplify_FLOOR_DIV_EXPR (loc, code, type, _p0, _p1);
11486 : 0 : case ROUND_DIV_EXPR:
11487 : 0 : return generic_simplify_ROUND_DIV_EXPR (loc, code, type, _p0, _p1);
11488 : 3496979 : case EXACT_DIV_EXPR:
11489 : 3496979 : return generic_simplify_EXACT_DIV_EXPR (loc, code, type, _p0, _p1);
11490 : 921274 : case FLOOR_MOD_EXPR:
11491 : 921274 : return generic_simplify_FLOOR_MOD_EXPR (loc, code, type, _p0, _p1);
11492 : 6749490 : case RDIV_EXPR:
11493 : 6749490 : return generic_simplify_RDIV_EXPR (loc, code, type, _p0, _p1);
11494 : 16702429 : case LT_EXPR:
11495 : 16702429 : return generic_simplify_LT_EXPR (loc, code, type, _p0, _p1);
11496 : 8705460 : case LE_EXPR:
11497 : 8705460 : return generic_simplify_LE_EXPR (loc, code, type, _p0, _p1);
11498 : 19330533 : case GT_EXPR:
11499 : 19330533 : return generic_simplify_GT_EXPR (loc, code, type, _p0, _p1);
11500 : 6203207 : case GE_EXPR:
11501 : 6203207 : return generic_simplify_GE_EXPR (loc, code, type, _p0, _p1);
11502 : 4320 : case CEIL_MOD_EXPR:
11503 : 4320 : return generic_simplify_CEIL_MOD_EXPR (loc, code, type, _p0, _p1);
11504 : 0 : case ROUND_MOD_EXPR:
11505 : 0 : return generic_simplify_ROUND_MOD_EXPR (loc, code, type, _p0, _p1);
11506 : 1828142 : case TRUNC_MOD_EXPR:
11507 : 1828142 : return generic_simplify_TRUNC_MOD_EXPR (loc, code, type, _p0, _p1);
11508 : 1202718 : case LSHIFT_EXPR:
11509 : 1202718 : return generic_simplify_LSHIFT_EXPR (loc, code, type, _p0, _p1);
11510 : 899515 : case RSHIFT_EXPR:
11511 : 899515 : return generic_simplify_RSHIFT_EXPR (loc, code, type, _p0, _p1);
11512 : 6667196 : case BIT_AND_EXPR:
11513 : 6667196 : return generic_simplify_BIT_AND_EXPR (loc, code, type, _p0, _p1);
11514 : 84113 : case MIN_EXPR:
11515 : 84113 : return generic_simplify_MIN_EXPR (loc, code, type, _p0, _p1);
11516 : 359137 : case MAX_EXPR:
11517 : 359137 : return generic_simplify_MAX_EXPR (loc, code, type, _p0, _p1);
11518 : 1826 : case LROTATE_EXPR:
11519 : 1826 : return generic_simplify_LROTATE_EXPR (loc, code, type, _p0, _p1);
11520 : 2686 : case RROTATE_EXPR:
11521 : 2686 : return generic_simplify_RROTATE_EXPR (loc, code, type, _p0, _p1);
11522 : 839007 : case COMPLEX_EXPR:
11523 : 839007 : return generic_simplify_COMPLEX_EXPR (loc, code, type, _p0, _p1);
11524 : 870541 : case UNORDERED_EXPR:
11525 : 870541 : return generic_simplify_UNORDERED_EXPR (loc, code, type, _p0, _p1);
11526 : 222835 : case ORDERED_EXPR:
11527 : 222835 : return generic_simplify_ORDERED_EXPR (loc, code, type, _p0, _p1);
11528 : 836086 : case UNLT_EXPR:
11529 : 836086 : return generic_simplify_UNLT_EXPR (loc, code, type, _p0, _p1);
11530 : 992461 : case UNLE_EXPR:
11531 : 992461 : return generic_simplify_UNLE_EXPR (loc, code, type, _p0, _p1);
11532 : 1797470 : case UNGT_EXPR:
11533 : 1797470 : return generic_simplify_UNGT_EXPR (loc, code, type, _p0, _p1);
11534 : 474083 : case UNGE_EXPR:
11535 : 474083 : return generic_simplify_UNGE_EXPR (loc, code, type, _p0, _p1);
11536 : 416492 : case UNEQ_EXPR:
11537 : 416492 : return generic_simplify_UNEQ_EXPR (loc, code, type, _p0, _p1);
11538 : 85 : case LTGT_EXPR:
11539 : 85 : return generic_simplify_LTGT_EXPR (loc, code, type, _p0, _p1);
11540 : 3142453 : case TRUTH_ORIF_EXPR:
11541 : 3142453 : return generic_simplify_TRUTH_ORIF_EXPR (loc, code, type, _p0, _p1);
11542 : 9827030 : case TRUTH_OR_EXPR:
11543 : 9827030 : return generic_simplify_TRUTH_OR_EXPR (loc, code, type, _p0, _p1);
11544 : : default:;
11545 : : }
11546 : : return NULL_TREE;
11547 : : }
11548 : :
11549 : : tree
11550 : 629978 : generic_simplify_BIT_FIELD_REF (location_t ARG_UNUSED (loc), enum tree_code ARG_UNUSED (code), const tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
11551 : : {
11552 : 629978 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11553 : 629978 : switch (TREE_CODE (_p0))
11554 : : {
11555 : 0 : case BIT_FIELD_REF:
11556 : 0 : {
11557 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11558 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11559 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11560 : 0 : {
11561 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
11562 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2072;
11563 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail2072;
11564 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2072;
11565 : 0 : {
11566 : 0 : tree res_op0;
11567 : 0 : res_op0 = captures[0];
11568 : 0 : tree res_op1;
11569 : 0 : res_op1 = captures[3];
11570 : 0 : tree res_op2;
11571 : 0 : res_op2 = const_binop (PLUS_EXPR, bitsizetype, captures[2], captures[4]);
11572 : 0 : tree _r;
11573 : 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11574 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11575 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11576 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1092, __FILE__, __LINE__, true);
11577 : 0 : return _r;
11578 : : }
11579 : 0 : next_after_fail2072:;
11580 : : }
11581 : 0 : break;
11582 : : }
11583 : 4 : case VIEW_CONVERT_EXPR:
11584 : 4 : {
11585 : 4 : tree _q20 = TREE_OPERAND (_p0, 0);
11586 : 4 : {
11587 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
11588 : 8 : if (! INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
11589 : 8 : || type_has_mode_precision_p (TREE_TYPE (captures[0]))
11590 : : )
11591 : : {
11592 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2073;
11593 : 0 : {
11594 : 0 : tree res_op0;
11595 : 0 : res_op0 = captures[0];
11596 : 0 : tree res_op1;
11597 : 0 : res_op1 = captures[1];
11598 : 0 : tree res_op2;
11599 : 0 : res_op2 = captures[2];
11600 : 0 : tree _r;
11601 : 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11602 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1093, __FILE__, __LINE__, true);
11603 : 0 : return _r;
11604 : : }
11605 : 0 : next_after_fail2073:;
11606 : : }
11607 : : }
11608 : 4 : break;
11609 : : }
11610 : 629978 : default:;
11611 : : }
11612 : 629978 : if (integer_zerop (_p2))
11613 : : {
11614 : 202014 : {
11615 : 202014 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11616 : 202014 : if (tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (captures[0])))
11617 : : )
11618 : : {
11619 : 2343 : if (TREE_SIDE_EFFECTS (_p2)) goto next_after_fail2074;
11620 : 2343 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2074;
11621 : 2343 : {
11622 : 2343 : tree res_op0;
11623 : 2343 : res_op0 = captures[0];
11624 : 2343 : tree _r;
11625 : 2343 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11626 : 2343 : if (TREE_SIDE_EFFECTS (captures[1]))
11627 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11628 : 2343 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1094, __FILE__, __LINE__, true);
11629 : 2343 : return _r;
11630 : : }
11631 : 199671 : next_after_fail2074:;
11632 : : }
11633 : : }
11634 : : }
11635 : 627635 : {
11636 : 627635 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
11637 : 627635 : if (TREE_CODE (TREE_TYPE (captures[0])) == COMPLEX_TYPE
11638 : 627635 : && tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
11639 : : )
11640 : : {
11641 : 2 : if (integer_zerop (captures[2])
11642 : : )
11643 : : {
11644 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2075;
11645 : 0 : {
11646 : 0 : tree res_op0;
11647 : 0 : {
11648 : 0 : tree _o1[1], _r1;
11649 : 0 : _o1[0] = captures[0];
11650 : 0 : _r1 = fold_build1_loc (loc, REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
11651 : 0 : res_op0 = _r1;
11652 : : }
11653 : 0 : tree _r;
11654 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11655 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11656 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11657 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11658 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11659 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1095, __FILE__, __LINE__, true);
11660 : 0 : return _r;
11661 : : }
11662 : 0 : next_after_fail2075:;
11663 : : }
11664 : : else
11665 : : {
11666 : 2 : if (tree_int_cst_equal (captures[2], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
11667 : : )
11668 : : {
11669 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2076;
11670 : 0 : {
11671 : 0 : tree res_op0;
11672 : 0 : {
11673 : 0 : tree _o1[1], _r1;
11674 : 0 : _o1[0] = captures[0];
11675 : 0 : _r1 = fold_build1_loc (loc, IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
11676 : 0 : res_op0 = _r1;
11677 : : }
11678 : 0 : tree _r;
11679 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11680 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11681 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11682 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11683 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11684 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1096, __FILE__, __LINE__, true);
11685 : 0 : return _r;
11686 : : }
11687 : 0 : next_after_fail2076:;
11688 : : }
11689 : : }
11690 : : }
11691 : : else
11692 : : {
11693 : 1255204 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
11694 : 20401 : && INTEGRAL_TYPE_P (type)
11695 : : && (!
11696 : :
11697 : : || is_gimple_reg (captures[0]))
11698 : 647072 : && ((compare_tree_int (captures[1], TYPE_PRECISION (TREE_TYPE (captures[0]))) == 0
11699 : 0 : && integer_zerop (captures[2]))
11700 : : || (BYTES_BIG_ENDIAN == WORDS_BIG_ENDIAN
11701 : : && canonicalize_math_after_vectorization_p ()
11702 : : && TYPE_PRECISION (TREE_TYPE (captures[0])) % BITS_PER_UNIT == 0
11703 : : && TYPE_PRECISION (type) % BITS_PER_UNIT == 0
11704 : : && compare_tree_int (captures[2], (BYTES_BIG_ENDIAN
11705 : : ? (TYPE_PRECISION (TREE_TYPE (captures[0]))
11706 : : - TYPE_PRECISION (type))
11707 : : : 0)) == 0))
11708 : : )
11709 : : {
11710 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2077;
11711 : 0 : {
11712 : 0 : tree res_op0;
11713 : 0 : res_op0 = captures[0];
11714 : 0 : tree _r;
11715 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
11716 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
11717 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
11718 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
11719 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
11720 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1097, __FILE__, __LINE__, true);
11721 : 0 : return _r;
11722 : : }
11723 : 0 : next_after_fail2077:;
11724 : : }
11725 : : }
11726 : : }
11727 : 627635 : switch (TREE_CODE (_p0))
11728 : : {
11729 : 907 : case CONSTRUCTOR:
11730 : 907 : {
11731 : 907 : {
11732 : 907 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
11733 : 907 : if (VECTOR_TYPE_P (TREE_TYPE (captures[0]))
11734 : 907 : && tree_fits_uhwi_p (TYPE_SIZE (type))
11735 : 1814 : && ((tree_to_uhwi (TYPE_SIZE (type))
11736 : 907 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))
11737 : 0 : || (VECTOR_TYPE_P (type)
11738 : 0 : && (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (type)))
11739 : 0 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))))
11740 : : )
11741 : : {
11742 : 907 : {
11743 : 907 : tree ctor = (TREE_CODE (captures[0]) == SSA_NAME
11744 : : ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])) : captures[0]);
11745 : 907 : tree eltype = TREE_TYPE (TREE_TYPE (ctor));
11746 : 907 : unsigned HOST_WIDE_INT width = tree_to_uhwi (TYPE_SIZE (eltype));
11747 : 907 : unsigned HOST_WIDE_INT n = tree_to_uhwi (captures[1]);
11748 : 907 : unsigned HOST_WIDE_INT idx = tree_to_uhwi (captures[2]);
11749 : 907 : if (n != 0
11750 : 907 : && (idx % width) == 0
11751 : 907 : && (n % width) == 0
11752 : 1814 : && known_le ((idx + n) / width,
11753 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (ctor)))
11754 : : )
11755 : : {
11756 : 907 : {
11757 : 907 : idx = idx / width;
11758 : 907 : n = n / width;
11759 : 907 : poly_uint64 k = 1;
11760 : 907 : if (CONSTRUCTOR_NELTS (ctor) != 0)
11761 : : {
11762 : 907 : tree cons_elem = TREE_TYPE (CONSTRUCTOR_ELT (ctor, 0)->value);
11763 : 907 : if (TREE_CODE (cons_elem) == VECTOR_TYPE)
11764 : 907 : k = TYPE_VECTOR_SUBPARTS (cons_elem);
11765 : : }
11766 : 907 : unsigned HOST_WIDE_INT elt, count, const_k;
11767 : 907 : if (multiple_p (idx, k, &elt) && multiple_p (n, k, &count)
11768 : : )
11769 : : {
11770 : 6 : if (CONSTRUCTOR_NELTS (ctor) == 0
11771 : : )
11772 : : {
11773 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2078;
11774 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2078;
11775 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2078;
11776 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2078;
11777 : 0 : {
11778 : 0 : tree _r;
11779 : 0 : _r = build_zero_cst (type);
11780 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1098, __FILE__, __LINE__, true);
11781 : 907 : return _r;
11782 : : }
11783 : : next_after_fail2078:;
11784 : : }
11785 : : else
11786 : : {
11787 : 6 : if (count == 1
11788 : : )
11789 : : {
11790 : 6 : if (elt < CONSTRUCTOR_NELTS (ctor)
11791 : : )
11792 : : {
11793 : 6 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2079;
11794 : 6 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2079;
11795 : 6 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2079;
11796 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2079;
11797 : 6 : {
11798 : 6 : tree res_op0;
11799 : 6 : res_op0 = CONSTRUCTOR_ELT (ctor, elt)->value;
11800 : 6 : tree _r;
11801 : 6 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11802 : 6 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1099, __FILE__, __LINE__, true);
11803 : 6 : return _r;
11804 : : }
11805 : : next_after_fail2079:;
11806 : : }
11807 : : else
11808 : : {
11809 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2080;
11810 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2080;
11811 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2080;
11812 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2080;
11813 : 0 : {
11814 : 0 : tree _r;
11815 : 0 : _r = build_zero_cst (type);
11816 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1100, __FILE__, __LINE__, true);
11817 : 0 : return _r;
11818 : : }
11819 : : next_after_fail2080:;
11820 : : }
11821 : : }
11822 : : else
11823 : : {
11824 : 0 : if (single_use (captures[0])
11825 : : )
11826 : : {
11827 : 0 : {
11828 : 0 : vec<constructor_elt, va_gc> *vals;
11829 : 0 : vec_alloc (vals, count);
11830 : 0 : bool constant_p = true;
11831 : 0 : tree res;
11832 : 0 : for (unsigned i = 0;
11833 : 0 : i < count && elt + i < CONSTRUCTOR_NELTS (ctor); ++i)
11834 : : {
11835 : 0 : tree e = CONSTRUCTOR_ELT (ctor, elt + i)->value;
11836 : 0 : CONSTRUCTOR_APPEND_ELT (vals, NULL_TREE, e);
11837 : 0 : if (!CONSTANT_CLASS_P (e))
11838 : 0 : constant_p = false;
11839 : : }
11840 : 0 : tree evtype = (types_match (TREE_TYPE (type),
11841 : 0 : TREE_TYPE (TREE_TYPE (ctor)))
11842 : 0 : ? type
11843 : 0 : : build_vector_type (TREE_TYPE (TREE_TYPE (ctor)),
11844 : 0 : count * k));
11845 : 0 : res = (constant_p ? build_vector_from_ctor (evtype, vals)
11846 : : : (
11847 : :
11848 : 0 : ? NULL_TREE : build_constructor (evtype, vals)));
11849 : 0 : if (res
11850 : : )
11851 : : {
11852 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2081;
11853 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2081;
11854 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2081;
11855 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2081;
11856 : 0 : {
11857 : 0 : tree res_op0;
11858 : 0 : res_op0 = res;
11859 : 0 : tree _r;
11860 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11861 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1101, __FILE__, __LINE__, true);
11862 : 0 : return _r;
11863 : : }
11864 : 0 : next_after_fail2081:;
11865 : : }
11866 : : }
11867 : : }
11868 : : }
11869 : : }
11870 : : }
11871 : : else
11872 : : {
11873 : 901 : if (k.is_constant (&const_k)
11874 : 901 : && idx + n <= (idx / const_k + 1) * const_k
11875 : : )
11876 : : {
11877 : 901 : if (CONSTRUCTOR_NELTS (ctor) <= idx / const_k
11878 : : )
11879 : : {
11880 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2082;
11881 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2082;
11882 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2082;
11883 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2082;
11884 : 0 : {
11885 : 0 : tree _r;
11886 : 0 : _r = build_zero_cst (type);
11887 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1102, __FILE__, __LINE__, true);
11888 : 0 : return _r;
11889 : : }
11890 : : next_after_fail2082:;
11891 : : }
11892 : : else
11893 : : {
11894 : 901 : if (n == const_k
11895 : : )
11896 : : {
11897 : 0 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2083;
11898 : 0 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2083;
11899 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2083;
11900 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2083;
11901 : 0 : {
11902 : 0 : tree res_op0;
11903 : 0 : res_op0 = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
11904 : 0 : tree _r;
11905 : 0 : _r = fold_build1_loc (loc, VIEW_CONVERT_EXPR, type, res_op0);
11906 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1103, __FILE__, __LINE__, true);
11907 : 0 : return _r;
11908 : : }
11909 : : next_after_fail2083:;
11910 : : }
11911 : : else
11912 : : {
11913 : 901 : if (TREE_SIDE_EFFECTS (captures[0])) goto next_after_fail2084;
11914 : 901 : if (TREE_SIDE_EFFECTS (captures[1])) goto next_after_fail2084;
11915 : 901 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2084;
11916 : 901 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2084;
11917 : 901 : {
11918 : 901 : tree res_op0;
11919 : 901 : res_op0 = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
11920 : 901 : tree res_op1;
11921 : 901 : res_op1 = captures[1];
11922 : 901 : tree res_op2;
11923 : 901 : res_op2 = bitsize_int ((idx % const_k) * width);
11924 : 901 : tree _r;
11925 : 901 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
11926 : 901 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1104, __FILE__, __LINE__, true);
11927 : 901 : return _r;
11928 : : }
11929 : : next_after_fail2084:;
11930 : : }
11931 : : }
11932 : : }
11933 : : }
11934 : : }
11935 : : }
11936 : : }
11937 : : }
11938 : : }
11939 : 0 : break;
11940 : : }
11941 : 0 : case VEC_PERM_EXPR:
11942 : 0 : {
11943 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
11944 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
11945 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
11946 : 0 : switch (TREE_CODE (_q22))
11947 : : {
11948 : 0 : case VECTOR_CST:
11949 : 0 : {
11950 : 0 : {
11951 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _p2 };
11952 : 0 : {
11953 : 0 : tree elem_type = TREE_TYPE (TREE_TYPE (captures[0]));
11954 : 0 : poly_uint64 elem_size = tree_to_poly_uint64 (TYPE_SIZE (elem_type));
11955 : 0 : poly_uint64 size = tree_to_poly_uint64 (TYPE_SIZE (type));
11956 : 0 : unsigned HOST_WIDE_INT nelts, idx;
11957 : 0 : unsigned HOST_WIDE_INT nelts_op = 0;
11958 : 0 : if (constant_multiple_p (tree_to_poly_uint64 (captures[5]), elem_size, &idx)
11959 : 0 : && VECTOR_CST_NELTS (captures[3]).is_constant (&nelts)
11960 : 0 : && (known_eq (size, elem_size)
11961 : 0 : || (constant_multiple_p (size, elem_size, &nelts_op)
11962 : 0 : && pow2p_hwi (nelts_op)))
11963 : : )
11964 : : {
11965 : 0 : {
11966 : 0 : bool ok = true;
11967 : 0 : if (known_eq (size, elem_size))
11968 : 0 : idx = TREE_INT_CST_LOW (VECTOR_CST_ELT (captures[3], idx)) % (2 * nelts);
11969 : : else
11970 : : {
11971 : 0 : unsigned start
11972 : 0 : = TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx)) % (2 * nelts);
11973 : 0 : unsigned end
11974 : 0 : = (TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + nelts_op - 1))
11975 : 0 : % (2 * nelts));
11976 : 0 : if ((start < nelts) != (end < nelts))
11977 : : ok = false;
11978 : : else
11979 : 0 : for (unsigned HOST_WIDE_INT i = 1; i != nelts_op; i++)
11980 : : {
11981 : 0 : if ((TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + i))
11982 : 0 : % (2 * nelts) - 1)
11983 : 0 : != (TREE_INT_CST_LOW (vector_cst_elt (captures[3], idx + i - 1))
11984 : 0 : % (2 * nelts)))
11985 : : {
11986 : : ok = false;
11987 : : break;
11988 : : }
11989 : : }
11990 : 0 : if (start % nelts_op)
11991 : : ok = false;
11992 : 0 : idx = start;
11993 : : }
11994 : 0 : if (ok
11995 : : )
11996 : : {
11997 : 0 : if (idx < nelts
11998 : : )
11999 : : {
12000 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail2085;
12001 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2085;
12002 : 0 : {
12003 : 0 : tree res_op0;
12004 : 0 : res_op0 = captures[1];
12005 : 0 : tree res_op1;
12006 : 0 : res_op1 = captures[4];
12007 : 0 : tree res_op2;
12008 : 0 : res_op2 = bitsize_int (idx * elem_size);
12009 : 0 : tree _r;
12010 : 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12011 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12012 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12013 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12014 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12015 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1105, __FILE__, __LINE__, true);
12016 : 0 : return _r;
12017 : : }
12018 : 0 : next_after_fail2085:;
12019 : : }
12020 : : else
12021 : : {
12022 : 0 : if (TREE_SIDE_EFFECTS (captures[3])) goto next_after_fail2086;
12023 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2086;
12024 : 0 : {
12025 : 0 : tree res_op0;
12026 : 0 : res_op0 = captures[2];
12027 : 0 : tree res_op1;
12028 : 0 : res_op1 = captures[4];
12029 : 0 : tree res_op2;
12030 : 0 : res_op2 = bitsize_int ((idx - nelts) * elem_size);
12031 : 0 : tree _r;
12032 : 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12033 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12034 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12035 : 0 : if (TREE_SIDE_EFFECTS (captures[5]))
12036 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[5]), _r);
12037 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1106, __FILE__, __LINE__, true);
12038 : 0 : return _r;
12039 : : }
12040 : 0 : next_after_fail2086:;
12041 : : }
12042 : : }
12043 : : }
12044 : : }
12045 : : }
12046 : : }
12047 : 0 : break;
12048 : : }
12049 : : default:;
12050 : : }
12051 : : break;
12052 : : }
12053 : 0 : case BIT_INSERT_EXPR:
12054 : 0 : {
12055 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
12056 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
12057 : 0 : tree _q22 = TREE_OPERAND (_p0, 2);
12058 : 0 : {
12059 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
12060 : 0 : {
12061 : 0 : unsigned HOST_WIDE_INT isize;
12062 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1])))
12063 : 0 : isize = TYPE_PRECISION (TREE_TYPE (captures[1]));
12064 : : else
12065 : 0 : isize = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (captures[1])));
12066 : 0 : if ((!INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
12067 : 0 : || type_has_mode_precision_p (TREE_TYPE (captures[1])))
12068 : 0 : && wi::leu_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
12069 : 0 : && wi::leu_p (wi::to_wide (captures[4]) + wi::to_wide (captures[3]),
12070 : 0 : wi::to_wide (captures[2]) + isize)
12071 : : )
12072 : : {
12073 : 0 : if (TREE_SIDE_EFFECTS (captures[2])) goto next_after_fail2087;
12074 : 0 : if (TREE_SIDE_EFFECTS (captures[4])) goto next_after_fail2087;
12075 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2087;
12076 : 0 : {
12077 : 0 : tree res_op0;
12078 : 0 : res_op0 = captures[1];
12079 : 0 : tree res_op1;
12080 : 0 : res_op1 = captures[3];
12081 : 0 : tree res_op2;
12082 : 0 : res_op2 = wide_int_to_tree (bitsizetype,
12083 : 0 : wi::to_wide (captures[4])
12084 : 0 : - wi::to_wide (captures[2]));
12085 : 0 : tree _r;
12086 : 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12087 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
12088 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
12089 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1107, __FILE__, __LINE__, true);
12090 : 0 : return _r;
12091 : : }
12092 : 0 : next_after_fail2087:;
12093 : : }
12094 : : else
12095 : : {
12096 : 0 : if (wi::eq_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
12097 : 0 : && compare_tree_int (captures[3], isize) == 0
12098 : : )
12099 : : {
12100 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2088;
12101 : 0 : {
12102 : 0 : tree res_op0;
12103 : 0 : res_op0 = captures[1];
12104 : 0 : tree _r;
12105 : 0 : _r = fold_build1_loc (loc, NOP_EXPR, type, res_op0);
12106 : 0 : if (TREE_SIDE_EFFECTS (captures[0]))
12107 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[0]), _r);
12108 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12109 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12110 : 0 : if (TREE_SIDE_EFFECTS (captures[3]))
12111 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[3]), _r);
12112 : 0 : if (TREE_SIDE_EFFECTS (captures[4]))
12113 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[4]), _r);
12114 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1108, __FILE__, __LINE__, true);
12115 : 0 : return _r;
12116 : : }
12117 : 0 : next_after_fail2088:;
12118 : : }
12119 : : else
12120 : : {
12121 : 0 : if (wi::geu_p (wi::to_wide (captures[2]),
12122 : 0 : wi::to_wide (captures[4]) + wi::to_wide (captures[3]))
12123 : 0 : || wi::geu_p (wi::to_wide (captures[4]),
12124 : 0 : wi::to_wide (captures[2]) + isize)
12125 : : )
12126 : : {
12127 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2089;
12128 : 0 : {
12129 : 0 : tree res_op0;
12130 : 0 : res_op0 = captures[0];
12131 : 0 : tree res_op1;
12132 : 0 : res_op1 = captures[3];
12133 : 0 : tree res_op2;
12134 : 0 : res_op2 = captures[4];
12135 : 0 : tree _r;
12136 : 0 : _r = fold_build3_loc (loc, BIT_FIELD_REF, type, res_op0, res_op1, res_op2);
12137 : 0 : if (TREE_SIDE_EFFECTS (captures[1]))
12138 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[1]), _r);
12139 : 0 : if (TREE_SIDE_EFFECTS (captures[2]))
12140 : 0 : _r = build2_loc (loc, COMPOUND_EXPR, type, fold_ignored_result (captures[2]), _r);
12141 : 0 : if (UNLIKELY (debug_dump)) generic_dump_logs ("match.pd", 1109, __FILE__, __LINE__, true);
12142 : 0 : return _r;
12143 : : }
12144 : 0 : next_after_fail2089:;
12145 : : }
12146 : : }
12147 : : }
12148 : : }
12149 : : }
12150 : 0 : break;
12151 : : }
12152 : : default:;
12153 : : }
12154 : : return NULL_TREE;
12155 : : }
12156 : : #pragma GCC diagnostic pop
|