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 "gimple-match-auto.h"
8 : :
9 : : bool
10 : 439380527 : gimple_bit_xor_cst (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
11 : : {
12 : 439380527 : const tree type = TREE_TYPE (t);
13 : 439380527 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 439380527 : switch (TREE_CODE (t))
15 : : {
16 : 419276020 : case SSA_NAME:
17 : 419276020 : if (gimple *_d1 = get_def (valueize, t))
18 : : {
19 : 155088043 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20 : 173136249 : switch (gimple_assign_rhs_code (_a1))
21 : : {
22 : 329601 : case BIT_XOR_EXPR:
23 : 329601 : {
24 : 329601 : tree _p0 = gimple_assign_rhs1 (_a1);
25 : 329601 : _p0 = do_valueize (valueize, _p0);
26 : 329601 : tree _p1 = gimple_assign_rhs2 (_a1);
27 : 329601 : _p1 = do_valueize (valueize, _p1);
28 : 329601 : if (tree_swap_operands_p (_p0, _p1))
29 : 17354 : std::swap (_p0, _p1);
30 : 329601 : if (uniform_integer_cst_p (_p1))
31 : : {
32 : 33501 : {
33 : 33501 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
34 : 33501 : {
35 : 33501 : res_ops[0] = captures[0];
36 : 33501 : res_ops[1] = captures[1];
37 : 33501 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 4, __FILE__, __LINE__, false);
38 : 33501 : return true;
39 : : }
40 : : }
41 : : }
42 : 439380527 : break;
43 : : }
44 : : default:;
45 : : }
46 : : }
47 : : break;
48 : : default:;
49 : : }
50 : : return false;
51 : : }
52 : :
53 : : bool
54 : 355945189 : gimple_with_possible_nonzero_bits_1 (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
55 : : {
56 : 355945189 : const tree type = TREE_TYPE (t);
57 : 355945189 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
58 : 355945189 : switch (TREE_CODE (t))
59 : : {
60 : 130456411 : case INTEGER_CST:
61 : 130456411 : {
62 : 130456411 : {
63 : 130456411 : tree captures[1] ATTRIBUTE_UNUSED = { t };
64 : 130456411 : {
65 : 130456411 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 33, __FILE__, __LINE__, false);
66 : 130456411 : return true;
67 : : }
68 : : }
69 : 0 : break;
70 : : }
71 : 0 : case POLY_INT_CST:
72 : 0 : {
73 : 0 : {
74 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { t };
75 : 0 : {
76 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 34, __FILE__, __LINE__, false);
77 : 0 : return true;
78 : : }
79 : : }
80 : 221958068 : break;
81 : : }
82 : 221958068 : case SSA_NAME:
83 : 221958068 : {
84 : 221958068 : {
85 : 221958068 : tree captures[1] ATTRIBUTE_UNUSED = { t };
86 : 221958068 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
87 : : )
88 : : {
89 : 215502254 : {
90 : 215502254 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 35, __FILE__, __LINE__, false);
91 : 215502254 : return true;
92 : : }
93 : : }
94 : : }
95 : : break;
96 : : }
97 : : default:;
98 : : }
99 : : return false;
100 : : }
101 : :
102 : : bool
103 : 575068 : gimple_usadd_overflow_mask (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
104 : : {
105 : 575068 : const tree type = TREE_TYPE (t);
106 : 575068 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
107 : 575068 : switch (TREE_CODE (t))
108 : : {
109 : 571012 : case SSA_NAME:
110 : 571012 : if (gimple *_d1 = get_def (valueize, t))
111 : : {
112 : 571012 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
113 : 604850 : switch (gimple_assign_rhs_code (_a1))
114 : : {
115 : 2333 : case NEGATE_EXPR:
116 : 2333 : {
117 : 2333 : tree _p0 = gimple_assign_rhs1 (_a1);
118 : 2333 : _p0 = do_valueize (valueize, _p0);
119 : 2333 : switch (TREE_CODE (_p0))
120 : : {
121 : 2333 : case SSA_NAME:
122 : 2333 : if (gimple *_d2 = get_def (valueize, _p0))
123 : : {
124 : 2333 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
125 : 2384 : switch (gimple_assign_rhs_code (_a2))
126 : : {
127 : 176 : CASE_CONVERT:
128 : 176 : {
129 : 176 : tree _q20 = gimple_assign_rhs1 (_a2);
130 : 176 : _q20 = do_valueize (valueize, _q20);
131 : 176 : switch (TREE_CODE (_q20))
132 : : {
133 : 176 : case SSA_NAME:
134 : 176 : if (gimple *_d3 = get_def (valueize, _q20))
135 : : {
136 : 176 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
137 : 138 : switch (gimple_assign_rhs_code (_a3))
138 : : {
139 : 30 : case GT_EXPR:
140 : 30 : {
141 : 30 : tree _q30 = gimple_assign_rhs1 (_a3);
142 : 30 : _q30 = do_valueize (valueize, _q30);
143 : 30 : tree _q31 = gimple_assign_rhs2 (_a3);
144 : 30 : _q31 = do_valueize (valueize, _q31);
145 : 30 : switch (TREE_CODE (_q31))
146 : : {
147 : 30 : case SSA_NAME:
148 : 30 : if (gimple *_d4 = get_def (valueize, _q31))
149 : : {
150 : 30 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
151 : 30 : switch (gimple_assign_rhs_code (_a4))
152 : : {
153 : 30 : case PLUS_EXPR:
154 : 30 : {
155 : 30 : tree _q50 = gimple_assign_rhs1 (_a4);
156 : 30 : _q50 = do_valueize (valueize, _q50);
157 : 30 : tree _q51 = gimple_assign_rhs2 (_a4);
158 : 30 : _q51 = do_valueize (valueize, _q51);
159 : 30 : if (tree_swap_operands_p (_q50, _q51))
160 : 0 : std::swap (_q50, _q51);
161 : 30 : if ((_q50 == _q30 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q30, 0) && types_match (_q50, _q30)))
162 : : {
163 : 28 : {
164 : 28 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q51 };
165 : 28 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
166 : : )
167 : : {
168 : 28 : if (types_match (type, captures[0], captures[1])
169 : : )
170 : : {
171 : 28 : {
172 : 28 : res_ops[0] = captures[0];
173 : 28 : res_ops[1] = captures[1];
174 : 28 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 42, __FILE__, __LINE__, false);
175 : 28 : return true;
176 : : }
177 : : }
178 : : }
179 : : }
180 : : }
181 : 2 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q30, 0) && types_match (_q51, _q30)))
182 : : {
183 : 2 : {
184 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q50 };
185 : 2 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
186 : : )
187 : : {
188 : 2 : if (types_match (type, captures[0], captures[1])
189 : : )
190 : : {
191 : 2 : {
192 : 2 : res_ops[0] = captures[0];
193 : 2 : res_ops[1] = captures[1];
194 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 42, __FILE__, __LINE__, false);
195 : 2 : return true;
196 : : }
197 : : }
198 : : }
199 : : }
200 : : }
201 : 575068 : break;
202 : : }
203 : : default:;
204 : : }
205 : : }
206 : : break;
207 : : default:;
208 : : }
209 : : break;
210 : : }
211 : 3 : case LT_EXPR:
212 : 3 : {
213 : 3 : tree _q30 = gimple_assign_rhs1 (_a3);
214 : 3 : _q30 = do_valueize (valueize, _q30);
215 : 3 : tree _q31 = gimple_assign_rhs2 (_a3);
216 : 3 : _q31 = do_valueize (valueize, _q31);
217 : 3 : switch (TREE_CODE (_q30))
218 : : {
219 : 3 : case SSA_NAME:
220 : 3 : if (gimple *_d4 = get_def (valueize, _q30))
221 : : {
222 : 3 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
223 : 6 : switch (gimple_assign_rhs_code (_a4))
224 : : {
225 : 0 : case PLUS_EXPR:
226 : 0 : {
227 : 0 : tree _q40 = gimple_assign_rhs1 (_a4);
228 : 0 : _q40 = do_valueize (valueize, _q40);
229 : 0 : tree _q41 = gimple_assign_rhs2 (_a4);
230 : 0 : _q41 = do_valueize (valueize, _q41);
231 : 0 : if (tree_swap_operands_p (_q40, _q41))
232 : 0 : std::swap (_q40, _q41);
233 : 0 : if ((_q31 == _q40 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q40, 0) && types_match (_q31, _q40)))
234 : : {
235 : 0 : {
236 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q41 };
237 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
238 : : )
239 : : {
240 : 0 : if (types_match (type, captures[0], captures[1])
241 : : )
242 : : {
243 : 0 : {
244 : 0 : res_ops[0] = captures[0];
245 : 0 : res_ops[1] = captures[1];
246 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 43, __FILE__, __LINE__, false);
247 : 0 : return true;
248 : : }
249 : : }
250 : : }
251 : : }
252 : : }
253 : 0 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q41, 0) && types_match (_q31, _q41)))
254 : : {
255 : 0 : {
256 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q41, _q40 };
257 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
258 : : )
259 : : {
260 : 0 : if (types_match (type, captures[0], captures[1])
261 : : )
262 : : {
263 : 0 : {
264 : 0 : res_ops[0] = captures[0];
265 : 0 : res_ops[1] = captures[1];
266 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 43, __FILE__, __LINE__, false);
267 : 0 : return true;
268 : : }
269 : : }
270 : : }
271 : : }
272 : : }
273 : 575068 : break;
274 : : }
275 : : default:;
276 : : }
277 : : }
278 : : break;
279 : : default:;
280 : : }
281 : : break;
282 : : }
283 : : default:;
284 : : }
285 : : }
286 : : break;
287 : : default:;
288 : : }
289 : : break;
290 : : }
291 : : default:;
292 : : }
293 : : }
294 : : break;
295 : : default:;
296 : : }
297 : : break;
298 : : }
299 : : default:;
300 : : }
301 : : }
302 : : break;
303 : : default:;
304 : : }
305 : : return false;
306 : : }
307 : :
308 : : bool
309 : 1476 : gimple_compositional_complex (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
310 : : {
311 : 1476 : const tree type = TREE_TYPE (t);
312 : 1476 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
313 : 1476 : switch (TREE_CODE (t))
314 : : {
315 : 839 : case SSA_NAME:
316 : 839 : if (gimple *_d1 = get_def (valueize, t))
317 : : {
318 : 521 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
319 : 859 : switch (gimple_assign_rhs_code (_a1))
320 : : {
321 : 0 : CASE_CONVERT:
322 : 0 : {
323 : 0 : tree _p0 = gimple_assign_rhs1 (_a1);
324 : 0 : _p0 = do_valueize (valueize, _p0);
325 : 0 : switch (TREE_CODE (_p0))
326 : : {
327 : 0 : case SSA_NAME:
328 : 0 : if (gimple *_d2 = get_def (valueize, _p0))
329 : : {
330 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
331 : 0 : switch (gimple_assign_rhs_code (_a2))
332 : : {
333 : 0 : case COMPLEX_EXPR:
334 : 0 : {
335 : 0 : tree _q20 = gimple_assign_rhs1 (_a2);
336 : 0 : _q20 = do_valueize (valueize, _q20);
337 : 0 : tree _q21 = gimple_assign_rhs2 (_a2);
338 : 0 : _q21 = do_valueize (valueize, _q21);
339 : 0 : {
340 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
341 : 0 : {
342 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 87, __FILE__, __LINE__, false);
343 : 0 : return true;
344 : : }
345 : : }
346 : : break;
347 : : }
348 : : default:;
349 : : }
350 : : }
351 : : break;
352 : : default:;
353 : : }
354 : : break;
355 : : }
356 : 105 : case COMPLEX_EXPR:
357 : 105 : {
358 : 105 : tree _p0 = gimple_assign_rhs1 (_a1);
359 : 105 : _p0 = do_valueize (valueize, _p0);
360 : 105 : tree _p1 = gimple_assign_rhs2 (_a1);
361 : 105 : _p1 = do_valueize (valueize, _p1);
362 : 105 : {
363 : 105 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
364 : 105 : {
365 : 105 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 87, __FILE__, __LINE__, false);
366 : 105 : return true;
367 : : }
368 : : }
369 : : break;
370 : : }
371 : : default:;
372 : : }
373 : : }
374 : : break;
375 : : default:;
376 : : }
377 : : return false;
378 : : }
379 : :
380 : : bool
381 : 2080 : gimple_double_value_p (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
382 : : {
383 : 2080 : const tree type = TREE_TYPE (t);
384 : 2080 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
385 : 2080 : {
386 : 2080 : tree captures[1] ATTRIBUTE_UNUSED = { t };
387 : 2080 : if (TYPE_MAIN_VARIANT (TREE_TYPE (captures[0])) == double_type_node
388 : : )
389 : : {
390 : 750 : {
391 : 750 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 96, __FILE__, __LINE__, false);
392 : 750 : return true;
393 : : }
394 : : }
395 : : }
396 : : return false;
397 : : }
398 : :
399 : : bool
400 : 3412 : gimple_float_value_p (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
401 : : {
402 : 3412 : const tree type = TREE_TYPE (t);
403 : 3412 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
404 : 3412 : {
405 : 3412 : tree captures[1] ATTRIBUTE_UNUSED = { t };
406 : 3412 : if (TYPE_MAIN_VARIANT (TREE_TYPE (captures[0])) == float_type_node
407 : : )
408 : : {
409 : 2701 : {
410 : 2701 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 97, __FILE__, __LINE__, false);
411 : 2701 : return true;
412 : : }
413 : : }
414 : : }
415 : : return false;
416 : : }
417 : :
418 : : bool
419 : 731029 : gimple_vec_same_elem_p (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
420 : : {
421 : 731029 : const tree type = TREE_TYPE (t);
422 : 731029 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
423 : 731029 : switch (TREE_CODE (t))
424 : : {
425 : 712949 : case SSA_NAME:
426 : 712949 : if (gimple *_d1 = get_def (valueize, t))
427 : : {
428 : 605628 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
429 : 1043772 : switch (gimple_assign_rhs_code (_a1))
430 : : {
431 : 0 : case VEC_DUPLICATE_EXPR:
432 : 0 : {
433 : 0 : tree _p0 = gimple_assign_rhs1 (_a1);
434 : 0 : _p0 = do_valueize (valueize, _p0);
435 : 0 : {
436 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
437 : 0 : {
438 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 99, __FILE__, __LINE__, false);
439 : 0 : return true;
440 : : }
441 : : }
442 : 2893 : break;
443 : : }
444 : 2893 : case CONSTRUCTOR:
445 : 2893 : {
446 : 2893 : {
447 : 2893 : tree captures[1] ATTRIBUTE_UNUSED = { t };
448 : 2893 : if (TREE_CODE (captures[0]) == SSA_NAME
449 : 2893 : && uniform_vector_p (gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])))
450 : : )
451 : : {
452 : 554 : {
453 : 554 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 100, __FILE__, __LINE__, false);
454 : 554 : return true;
455 : : }
456 : : }
457 : : }
458 : : break;
459 : : }
460 : : default:;
461 : : }
462 : : }
463 : : break;
464 : 730475 : default:;
465 : : }
466 : 730475 : {
467 : 730475 : tree captures[1] ATTRIBUTE_UNUSED = { t };
468 : 730475 : if (uniform_vector_p (captures[0])
469 : : )
470 : : {
471 : 13725 : {
472 : 13725 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 101, __FILE__, __LINE__, false);
473 : 13725 : return true;
474 : : }
475 : : }
476 : : }
477 : : return false;
478 : : }
479 : :
480 : : bool
481 : 20173871 : gimple_cond_expr_convert_p (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
482 : : {
483 : 20173871 : const tree type = TREE_TYPE (t);
484 : 20173871 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
485 : 20173871 : switch (TREE_CODE (t))
486 : : {
487 : 15692420 : case SSA_NAME:
488 : 15692420 : if (gimple *_d1 = get_def (valueize, t))
489 : : {
490 : 15692420 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
491 : 18220194 : switch (gimple_assign_rhs_code (_a1))
492 : : {
493 : 101593 : case COND_EXPR:
494 : 101593 : {
495 : 101593 : tree _p0 = gimple_assign_rhs1 (_a1);
496 : 101593 : _p0 = do_valueize (valueize, _p0);
497 : 101593 : tree _p1 = gimple_assign_rhs2 (_a1);
498 : 101593 : _p1 = do_valueize (valueize, _p1);
499 : 101593 : tree _p2 = gimple_assign_rhs3 (_a1);
500 : 101593 : _p2 = do_valueize (valueize, _p2);
501 : 101593 : switch (TREE_CODE (_p0))
502 : : {
503 : 101593 : case SSA_NAME:
504 : 101593 : if (gimple *_d2 = get_def (valueize, _p0))
505 : : {
506 : 101593 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
507 : 102712 : switch (gimple_assign_rhs_code (_a2))
508 : : {
509 : 82357 : case LT_EXPR:
510 : 82357 : case LE_EXPR:
511 : 82357 : case EQ_EXPR:
512 : 82357 : case NE_EXPR:
513 : 82357 : case GE_EXPR:
514 : 82357 : case GT_EXPR:
515 : 82357 : {
516 : 82357 : tree _q20 = gimple_assign_rhs1 (_a2);
517 : 82357 : _q20 = do_valueize (valueize, _q20);
518 : 82357 : tree _q21 = gimple_assign_rhs2 (_a2);
519 : 82357 : _q21 = do_valueize (valueize, _q21);
520 : 82357 : switch (TREE_CODE (_p1))
521 : : {
522 : 60989 : case SSA_NAME:
523 : 60989 : if (gimple *_d3 = get_def (valueize, _p1))
524 : : {
525 : 60989 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
526 : 57396 : switch (gimple_assign_rhs_code (_a3))
527 : : {
528 : 11203 : CASE_CONVERT:
529 : 11203 : {
530 : 11203 : tree _q50 = gimple_assign_rhs1 (_a3);
531 : 11203 : _q50 = do_valueize (valueize, _q50);
532 : 11203 : switch (TREE_CODE (_p2))
533 : : {
534 : 5772 : case SSA_NAME:
535 : 5772 : if (gimple *_d4 = get_def (valueize, _p2))
536 : : {
537 : 5772 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
538 : 5883 : switch (gimple_assign_rhs_code (_a4))
539 : : {
540 : 1621 : CASE_CONVERT:
541 : 1621 : {
542 : 1621 : tree _q70 = gimple_assign_rhs1 (_a4);
543 : 1621 : _q70 = do_valueize (valueize, _q70);
544 : 1621 : {
545 : 1621 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
546 : 1621 : if ((INTEGRAL_TYPE_P (type)
547 : 14 : || (!flag_trapping_math && SCALAR_FLOAT_TYPE_P (type)))
548 : 1607 : && ((INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
549 : 1607 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2])))
550 : 0 : || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
551 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))))
552 : 1607 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
553 : 211 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
554 : 211 : TYPE_SIZE (TREE_TYPE (captures[1])))
555 : 99 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
556 : 99 : TYPE_SIZE (TREE_TYPE (captures[2])))
557 : 95 : && (known_gt (tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (captures[0]))),
558 : : tree_to_poly_uint64 (TYPE_SIZE (type)))
559 : 24 : || (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
560 : 24 : == TYPE_UNSIGNED (TREE_TYPE (captures[2]))))
561 : 86 : && single_use (captures[5])
562 : 1695 : && single_use (captures[6])
563 : : )
564 : : {
565 : 59 : {
566 : 59 : res_ops[0] = captures[0];
567 : 59 : res_ops[1] = captures[1];
568 : 59 : res_ops[2] = captures[2];
569 : 59 : res_ops[3] = captures[3];
570 : 59 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 105, __FILE__, __LINE__, false);
571 : 59 : return true;
572 : : }
573 : : }
574 : : }
575 : 1562 : break;
576 : : }
577 : : default:;
578 : : }
579 : : }
580 : : break;
581 : 0 : case REAL_CST:
582 : 0 : {
583 : 0 : {
584 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _q50, _p2, _p0, _q21, _p1 };
585 : 0 : if (!flag_trapping_math
586 : 0 : && SCALAR_FLOAT_TYPE_P (type)
587 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
588 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
589 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
590 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
591 : 0 : && single_use (captures[5])
592 : 0 : && (flag_unsafe_math_optimizations
593 : 0 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[1])),
594 : 0 : &TREE_REAL_CST (captures[2])))
595 : : )
596 : : {
597 : 0 : {
598 : 0 : res_ops[0] = captures[0];
599 : 0 : res_ops[1] = captures[1];
600 : 0 : res_ops[2] = captures[2];
601 : 0 : res_ops[3] = captures[3];
602 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 106, __FILE__, __LINE__, false);
603 : 0 : return true;
604 : : }
605 : : }
606 : : }
607 : 0 : break;
608 : : }
609 : : default:;
610 : : }
611 : : break;
612 : : }
613 : 15 : case FLOAT_EXPR:
614 : 15 : {
615 : 15 : tree _q50 = gimple_assign_rhs1 (_a3);
616 : 15 : _q50 = do_valueize (valueize, _q50);
617 : 15 : switch (TREE_CODE (_p2))
618 : : {
619 : 15 : case SSA_NAME:
620 : 15 : if (gimple *_d4 = get_def (valueize, _p2))
621 : : {
622 : 15 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
623 : 9 : switch (gimple_assign_rhs_code (_a4))
624 : : {
625 : 9 : case FLOAT_EXPR:
626 : 9 : {
627 : 9 : tree _q70 = gimple_assign_rhs1 (_a4);
628 : 9 : _q70 = do_valueize (valueize, _q70);
629 : 9 : {
630 : 9 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
631 : 9 : if (SCALAR_FLOAT_TYPE_P (type) && !flag_trapping_math
632 : 9 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
633 : 9 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
634 : 9 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
635 : 8 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
636 : 8 : TYPE_SIZE (TREE_TYPE (captures[1])))
637 : 8 : && single_use (captures[5])
638 : 17 : && single_use (captures[6])
639 : : )
640 : : {
641 : 8 : {
642 : 8 : res_ops[0] = captures[0];
643 : 8 : res_ops[1] = captures[1];
644 : 8 : res_ops[2] = captures[2];
645 : 8 : res_ops[3] = captures[3];
646 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 107, __FILE__, __LINE__, false);
647 : 8 : return true;
648 : : }
649 : : }
650 : : }
651 : 1 : break;
652 : : }
653 : : default:;
654 : : }
655 : : }
656 : : break;
657 : : default:;
658 : : }
659 : : break;
660 : : }
661 : 8 : case FIX_TRUNC_EXPR:
662 : 8 : {
663 : 8 : tree _q50 = gimple_assign_rhs1 (_a3);
664 : 8 : _q50 = do_valueize (valueize, _q50);
665 : 8 : switch (TREE_CODE (_p2))
666 : : {
667 : 6 : case SSA_NAME:
668 : 6 : if (gimple *_d4 = get_def (valueize, _p2))
669 : : {
670 : 6 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
671 : 6 : switch (gimple_assign_rhs_code (_a4))
672 : : {
673 : 0 : case FIX_TRUNC_EXPR:
674 : 0 : {
675 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
676 : 0 : _q70 = do_valueize (valueize, _q70);
677 : 0 : {
678 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
679 : 0 : if (INTEGRAL_TYPE_P (type) && !flag_trapping_math
680 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
681 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
682 : 0 : && !operand_equal_p (TYPE_SIZE (type),
683 : 0 : TYPE_SIZE (TREE_TYPE (captures[0])))
684 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
685 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
686 : 0 : && single_use (captures[5])
687 : 0 : && single_use (captures[6])
688 : : )
689 : : {
690 : 0 : {
691 : 0 : res_ops[0] = captures[0];
692 : 0 : res_ops[1] = captures[1];
693 : 0 : res_ops[2] = captures[2];
694 : 0 : res_ops[3] = captures[3];
695 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 108, __FILE__, __LINE__, false);
696 : 0 : return true;
697 : : }
698 : : }
699 : : }
700 : 0 : break;
701 : : }
702 : : default:;
703 : : }
704 : : }
705 : : break;
706 : : default:;
707 : : }
708 : : break;
709 : : }
710 : : default:;
711 : : }
712 : : }
713 : : break;
714 : 842 : case REAL_CST:
715 : 842 : {
716 : 842 : switch (TREE_CODE (_p2))
717 : : {
718 : 160 : case SSA_NAME:
719 : 160 : if (gimple *_d3 = get_def (valueize, _p2))
720 : : {
721 : 160 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
722 : 116 : switch (gimple_assign_rhs_code (_a3))
723 : : {
724 : 20 : CASE_CONVERT:
725 : 20 : {
726 : 20 : tree _q60 = gimple_assign_rhs1 (_a3);
727 : 20 : _q60 = do_valueize (valueize, _q60);
728 : 20 : {
729 : 20 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _p1, _q60, _p0, _q21, _p2 };
730 : 20 : if (!flag_trapping_math
731 : 19 : && SCALAR_FLOAT_TYPE_P (type)
732 : 19 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[2]))
733 : 19 : && !operand_equal_p (TYPE_SIZE (type),
734 : 19 : TYPE_SIZE (TREE_TYPE (captures[0])))
735 : 13 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
736 : 13 : TYPE_SIZE (TREE_TYPE (captures[2])))
737 : 13 : && single_use (captures[5])
738 : 30 : && (flag_unsafe_math_optimizations
739 : 10 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[2])),
740 : 10 : &TREE_REAL_CST (captures[1])))
741 : : )
742 : : {
743 : 8 : {
744 : 8 : res_ops[0] = captures[0];
745 : 8 : res_ops[1] = captures[1];
746 : 8 : res_ops[2] = captures[2];
747 : 8 : res_ops[3] = captures[3];
748 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 109, __FILE__, __LINE__, false);
749 : 8 : return true;
750 : : }
751 : : }
752 : : }
753 : 12 : break;
754 : : }
755 : : default:;
756 : : }
757 : : }
758 : : break;
759 : : default:;
760 : : }
761 : : break;
762 : : }
763 : : default:;
764 : : }
765 : : break;
766 : : }
767 : : default:;
768 : : }
769 : : }
770 : : break;
771 : 0 : case LT_EXPR:
772 : 0 : case LE_EXPR:
773 : 0 : case EQ_EXPR:
774 : 0 : case NE_EXPR:
775 : 0 : case GE_EXPR:
776 : 0 : case GT_EXPR:
777 : 0 : {
778 : 0 : tree _q20 = TREE_OPERAND (_p0, 0);
779 : 0 : if ((TREE_CODE (_q20) == SSA_NAME
780 : 0 : || is_gimple_min_invariant (_q20)))
781 : : {
782 : 0 : _q20 = do_valueize (valueize, _q20);
783 : 0 : tree _q21 = TREE_OPERAND (_p0, 1);
784 : 0 : if ((TREE_CODE (_q21) == SSA_NAME
785 : 0 : || is_gimple_min_invariant (_q21)))
786 : : {
787 : 0 : _q21 = do_valueize (valueize, _q21);
788 : 0 : switch (TREE_CODE (_p1))
789 : : {
790 : 0 : case SSA_NAME:
791 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
792 : : {
793 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
794 : 0 : switch (gimple_assign_rhs_code (_a2))
795 : : {
796 : 0 : CASE_CONVERT:
797 : 0 : {
798 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
799 : 0 : _q50 = do_valueize (valueize, _q50);
800 : 0 : switch (TREE_CODE (_p2))
801 : : {
802 : 0 : case SSA_NAME:
803 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
804 : : {
805 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
806 : 0 : switch (gimple_assign_rhs_code (_a3))
807 : : {
808 : 0 : CASE_CONVERT:
809 : 0 : {
810 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
811 : 0 : _q70 = do_valueize (valueize, _q70);
812 : 0 : {
813 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
814 : 0 : if ((INTEGRAL_TYPE_P (type)
815 : 0 : || (!flag_trapping_math && SCALAR_FLOAT_TYPE_P (type)))
816 : 0 : && ((INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
817 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2])))
818 : 0 : || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
819 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))))
820 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
821 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
822 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
823 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
824 : 0 : TYPE_SIZE (TREE_TYPE (captures[2])))
825 : 0 : && (known_gt (tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (captures[0]))),
826 : : tree_to_poly_uint64 (TYPE_SIZE (type)))
827 : 0 : || (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
828 : 0 : == TYPE_UNSIGNED (TREE_TYPE (captures[2]))))
829 : 0 : && single_use (captures[5])
830 : 0 : && single_use (captures[6])
831 : : )
832 : : {
833 : 0 : {
834 : 0 : res_ops[0] = captures[0];
835 : 0 : res_ops[1] = captures[1];
836 : 0 : res_ops[2] = captures[2];
837 : 0 : res_ops[3] = captures[3];
838 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 105, __FILE__, __LINE__, false);
839 : 0 : return true;
840 : : }
841 : : }
842 : : }
843 : 0 : break;
844 : : }
845 : : default:;
846 : : }
847 : : }
848 : : break;
849 : 0 : case REAL_CST:
850 : 0 : {
851 : 0 : {
852 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _q50, _p2, _p0, _q21, _p1 };
853 : 0 : if (!flag_trapping_math
854 : 0 : && SCALAR_FLOAT_TYPE_P (type)
855 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
856 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
857 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
858 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
859 : 0 : && single_use (captures[5])
860 : 0 : && (flag_unsafe_math_optimizations
861 : 0 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[1])),
862 : 0 : &TREE_REAL_CST (captures[2])))
863 : : )
864 : : {
865 : 0 : {
866 : 0 : res_ops[0] = captures[0];
867 : 0 : res_ops[1] = captures[1];
868 : 0 : res_ops[2] = captures[2];
869 : 0 : res_ops[3] = captures[3];
870 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 106, __FILE__, __LINE__, false);
871 : 0 : return true;
872 : : }
873 : : }
874 : : }
875 : 0 : break;
876 : : }
877 : : default:;
878 : : }
879 : : break;
880 : : }
881 : 0 : case FLOAT_EXPR:
882 : 0 : {
883 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
884 : 0 : _q50 = do_valueize (valueize, _q50);
885 : 0 : switch (TREE_CODE (_p2))
886 : : {
887 : 0 : case SSA_NAME:
888 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
889 : : {
890 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
891 : 0 : switch (gimple_assign_rhs_code (_a3))
892 : : {
893 : 0 : case FLOAT_EXPR:
894 : 0 : {
895 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
896 : 0 : _q70 = do_valueize (valueize, _q70);
897 : 0 : {
898 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
899 : 0 : if (SCALAR_FLOAT_TYPE_P (type) && !flag_trapping_math
900 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
901 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
902 : 0 : && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (captures[0])))
903 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
904 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
905 : 0 : && single_use (captures[5])
906 : 0 : && single_use (captures[6])
907 : : )
908 : : {
909 : 0 : {
910 : 0 : res_ops[0] = captures[0];
911 : 0 : res_ops[1] = captures[1];
912 : 0 : res_ops[2] = captures[2];
913 : 0 : res_ops[3] = captures[3];
914 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 107, __FILE__, __LINE__, false);
915 : 0 : return true;
916 : : }
917 : : }
918 : : }
919 : 0 : break;
920 : : }
921 : : default:;
922 : : }
923 : : }
924 : : break;
925 : : default:;
926 : : }
927 : : break;
928 : : }
929 : 0 : case FIX_TRUNC_EXPR:
930 : 0 : {
931 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
932 : 0 : _q50 = do_valueize (valueize, _q50);
933 : 0 : switch (TREE_CODE (_p2))
934 : : {
935 : 0 : case SSA_NAME:
936 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
937 : : {
938 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
939 : 0 : switch (gimple_assign_rhs_code (_a3))
940 : : {
941 : 0 : case FIX_TRUNC_EXPR:
942 : 0 : {
943 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
944 : 0 : _q70 = do_valueize (valueize, _q70);
945 : 0 : {
946 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q50, _q70, _p0, _q21, _p1, _p2 };
947 : 0 : if (INTEGRAL_TYPE_P (type) && !flag_trapping_math
948 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[1]))
949 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
950 : 0 : && !operand_equal_p (TYPE_SIZE (type),
951 : 0 : TYPE_SIZE (TREE_TYPE (captures[0])))
952 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
953 : 0 : TYPE_SIZE (TREE_TYPE (captures[1])))
954 : 0 : && single_use (captures[5])
955 : 0 : && single_use (captures[6])
956 : : )
957 : : {
958 : 0 : {
959 : 0 : res_ops[0] = captures[0];
960 : 0 : res_ops[1] = captures[1];
961 : 0 : res_ops[2] = captures[2];
962 : 0 : res_ops[3] = captures[3];
963 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 108, __FILE__, __LINE__, false);
964 : 0 : return true;
965 : : }
966 : : }
967 : : }
968 : 0 : break;
969 : : }
970 : : default:;
971 : : }
972 : : }
973 : : break;
974 : : default:;
975 : : }
976 : : break;
977 : : }
978 : : default:;
979 : : }
980 : : }
981 : : break;
982 : 0 : case REAL_CST:
983 : 0 : {
984 : 0 : switch (TREE_CODE (_p2))
985 : : {
986 : 0 : case SSA_NAME:
987 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
988 : : {
989 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
990 : 0 : switch (gimple_assign_rhs_code (_a2))
991 : : {
992 : 0 : CASE_CONVERT:
993 : 0 : {
994 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
995 : 0 : _q60 = do_valueize (valueize, _q60);
996 : 0 : {
997 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _p1, _q60, _p0, _q21, _p2 };
998 : 0 : if (!flag_trapping_math
999 : 0 : && SCALAR_FLOAT_TYPE_P (type)
1000 : 0 : && SCALAR_FLOAT_TYPE_P (TREE_TYPE (captures[2]))
1001 : 0 : && !operand_equal_p (TYPE_SIZE (type),
1002 : 0 : TYPE_SIZE (TREE_TYPE (captures[0])))
1003 : 0 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
1004 : 0 : TYPE_SIZE (TREE_TYPE (captures[2])))
1005 : 0 : && single_use (captures[5])
1006 : 0 : && (flag_unsafe_math_optimizations
1007 : 0 : || exact_real_truncate (TYPE_MODE (TREE_TYPE (captures[2])),
1008 : 0 : &TREE_REAL_CST (captures[1])))
1009 : : )
1010 : : {
1011 : 0 : {
1012 : 0 : res_ops[0] = captures[0];
1013 : 0 : res_ops[1] = captures[1];
1014 : 0 : res_ops[2] = captures[2];
1015 : 0 : res_ops[3] = captures[3];
1016 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 109, __FILE__, __LINE__, false);
1017 : 0 : return true;
1018 : : }
1019 : : }
1020 : : }
1021 : 0 : break;
1022 : : }
1023 : : default:;
1024 : : }
1025 : : }
1026 : : break;
1027 : : default:;
1028 : : }
1029 : : break;
1030 : : }
1031 : : default:;
1032 : : }
1033 : : }
1034 : : }
1035 : : break;
1036 : : }
1037 : : default:;
1038 : : }
1039 : : break;
1040 : : }
1041 : : default:;
1042 : : }
1043 : : }
1044 : : break;
1045 : : default:;
1046 : : }
1047 : : return false;
1048 : : }
1049 : :
1050 : : bool
1051 : 1 : gimple_simplify_7 (gimple_match_op *res_op, gimple_seq *seq,
1052 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1053 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1054 : : {
1055 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1056 : 1 : gimple_seq *lseq = seq;
1057 : 1 : if (lseq
1058 : 1 : && (!single_use (captures[0])))
1059 : 0 : lseq = NULL;
1060 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail585;
1061 : 1 : {
1062 : 1 : res_op->set_op (BIT_IOR_EXPR, type, 2);
1063 : 1 : res_op->ops[0] = captures[1];
1064 : 1 : res_op->ops[1] = captures[2];
1065 : 1 : res_op->resimplify (lseq, valueize);
1066 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 118, __FILE__, __LINE__, true);
1067 : : return true;
1068 : : }
1069 : 0 : next_after_fail585:;
1070 : 0 : return false;
1071 : : }
1072 : :
1073 : : bool
1074 : 19 : gimple_simplify_9 (gimple_match_op *res_op, gimple_seq *seq,
1075 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1076 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1077 : : const enum tree_code ARG_UNUSED (bit_op))
1078 : : {
1079 : 19 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1080 : 19 : if (bit_op == BIT_AND_EXPR
1081 : : )
1082 : : {
1083 : 19 : gimple_seq *lseq = seq;
1084 : 19 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail588;
1085 : 19 : {
1086 : 19 : tree tem;
1087 : 19 : tem = build_zero_cst (type);
1088 : 19 : res_op->set_value (tem);
1089 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 119, __FILE__, __LINE__, true);
1090 : 19 : return true;
1091 : : }
1092 : 0 : next_after_fail588:;
1093 : : }
1094 : : else
1095 : : {
1096 : 0 : gimple_seq *lseq = seq;
1097 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail589;
1098 : 0 : {
1099 : 0 : tree tem;
1100 : 0 : tem = build_minus_one_cst (type);
1101 : 0 : res_op->set_value (tem);
1102 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 120, __FILE__, __LINE__, true);
1103 : 0 : return true;
1104 : : }
1105 : 0 : next_after_fail589:;
1106 : : }
1107 : : return false;
1108 : : }
1109 : :
1110 : : bool
1111 : 6 : gimple_simplify_11 (gimple_match_op *res_op, gimple_seq *seq,
1112 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1113 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1114 : : const enum tree_code ARG_UNUSED (bit_op))
1115 : : {
1116 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1117 : 6 : if (bit_op == BIT_AND_EXPR
1118 : : )
1119 : : {
1120 : 2 : gimple_seq *lseq = seq;
1121 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail592;
1122 : 2 : {
1123 : 2 : tree tem;
1124 : 2 : tem = build_zero_cst (type);
1125 : 2 : res_op->set_value (tem);
1126 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 121, __FILE__, __LINE__, true);
1127 : 2 : return true;
1128 : : }
1129 : 0 : next_after_fail592:;
1130 : : }
1131 : : else
1132 : : {
1133 : 4 : gimple_seq *lseq = seq;
1134 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail593;
1135 : 4 : {
1136 : 4 : tree tem;
1137 : 4 : tem = build_minus_one_cst (type);
1138 : 4 : res_op->set_value (tem);
1139 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 122, __FILE__, __LINE__, true);
1140 : 4 : return true;
1141 : : }
1142 : 0 : next_after_fail593:;
1143 : : }
1144 : : return false;
1145 : : }
1146 : :
1147 : : bool
1148 : 1837 : gimple_simplify_13 (gimple_match_op *res_op, gimple_seq *seq,
1149 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1150 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1151 : : {
1152 : 1837 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1153 : 1837 : gimple_seq *lseq = seq;
1154 : 1837 : if (lseq
1155 : 733 : && (!single_use (captures[0])
1156 : 692 : || !single_use (captures[1])))
1157 : 1203 : lseq = NULL;
1158 : 1837 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail595;
1159 : 1837 : {
1160 : 1837 : res_op->set_op (BIT_XOR_EXPR, type, 2);
1161 : 1837 : {
1162 : 1837 : tree _o1[2], _r1;
1163 : 1837 : _o1[0] = captures[2];
1164 : 1837 : _o1[1] = captures[3];
1165 : 1837 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1166 : 1837 : tem_op.resimplify (lseq, valueize);
1167 : 1837 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1168 : 1837 : if (!_r1) goto next_after_fail595;
1169 : 640 : res_op->ops[0] = _r1;
1170 : : }
1171 : 640 : {
1172 : 640 : tree _o1[2], _r1;
1173 : 640 : _o1[0] = captures[4];
1174 : 640 : _o1[1] = captures[3];
1175 : 640 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1176 : 640 : tem_op.resimplify (NULL, valueize);
1177 : 640 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
1178 : 640 : if (!_r1) goto next_after_fail595;
1179 : 2 : res_op->ops[1] = _r1;
1180 : : }
1181 : 2 : res_op->resimplify (lseq, valueize);
1182 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 124, __FILE__, __LINE__, true);
1183 : : return true;
1184 : : }
1185 : : next_after_fail595:;
1186 : : return false;
1187 : : }
1188 : :
1189 : : bool
1190 : 0 : gimple_simplify_15 (gimple_match_op *res_op, gimple_seq *seq,
1191 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1192 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1193 : : {
1194 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1195 : 0 : gimple_seq *lseq = seq;
1196 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail597;
1197 : 0 : {
1198 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
1199 : 0 : res_op->ops[0] = captures[0];
1200 : 0 : res_op->resimplify (lseq, valueize);
1201 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 126, __FILE__, __LINE__, true);
1202 : : return true;
1203 : : }
1204 : 0 : next_after_fail597:;
1205 : 0 : return false;
1206 : : }
1207 : :
1208 : : bool
1209 : 5934 : gimple_simplify_18 (gimple_match_op *res_op, gimple_seq *seq,
1210 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1211 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1212 : : {
1213 : 5934 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1214 : 5934 : if (bitwise_equal_p (captures[0], captures[2])
1215 : : )
1216 : : {
1217 : 154 : gimple_seq *lseq = seq;
1218 : 154 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail600;
1219 : 154 : {
1220 : 154 : res_op->set_op (NOP_EXPR, type, 1);
1221 : 154 : {
1222 : 154 : tree _o1[1], _r1;
1223 : 154 : {
1224 : 154 : tree _o2[2], _r2;
1225 : 154 : _o2[0] = captures[0];
1226 : 154 : {
1227 : 154 : tree _o3[1], _r3;
1228 : 154 : _o3[0] = captures[1];
1229 : 154 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o3[0]) /* XXX */
1230 : 154 : && !useless_type_conversion_p (TREE_TYPE (_o2[0]), TREE_TYPE (_o3[0])))
1231 : : {
1232 : 42 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
1233 : 42 : tem_op.resimplify (lseq, valueize);
1234 : 42 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
1235 : 42 : if (!_r3) goto next_after_fail600;
1236 : : }
1237 : : else
1238 : : _r3 = _o3[0];
1239 : 133 : _o2[1] = _r3;
1240 : : }
1241 : 133 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
1242 : 133 : tem_op.resimplify (lseq, valueize);
1243 : 133 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1244 : 133 : if (!_r2) goto next_after_fail600;
1245 : 77 : _o1[0] = _r2;
1246 : : }
1247 : 77 : (*res_op).set_op (BIT_NOT_EXPR, TREE_TYPE (_o1[0]), 1);
1248 : 77 : (*res_op).ops[0] = _o1[0];
1249 : 77 : (*res_op).resimplify (lseq, valueize);
1250 : : }
1251 : 77 : if (type != res_op->type
1252 : 77 : && !useless_type_conversion_p (type, res_op->type))
1253 : : {
1254 : 21 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail600;
1255 : 21 : res_op->set_op (NOP_EXPR, type, 1);
1256 : 21 : res_op->resimplify (lseq, valueize);
1257 : : }
1258 : 77 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 129, __FILE__, __LINE__, true);
1259 : 77 : return true;
1260 : : }
1261 : : next_after_fail600:;
1262 : : }
1263 : : return false;
1264 : : }
1265 : :
1266 : : bool
1267 : 703 : gimple_simplify_23 (gimple_match_op *res_op, gimple_seq *seq,
1268 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1269 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1270 : : {
1271 : 703 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1272 : 703 : gimple_seq *lseq = seq;
1273 : 703 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail605;
1274 : 703 : {
1275 : 703 : res_op->set_op (NOP_EXPR, type, 1);
1276 : 703 : res_op->ops[0] = captures[0];
1277 : 703 : res_op->resimplify (lseq, valueize);
1278 : 703 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 134, __FILE__, __LINE__, true);
1279 : : return true;
1280 : : }
1281 : 0 : next_after_fail605:;
1282 : 0 : return false;
1283 : : }
1284 : :
1285 : : bool
1286 : 40 : gimple_simplify_26 (gimple_match_op *res_op, gimple_seq *seq,
1287 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1288 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1289 : : {
1290 : 40 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1291 : 40 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
1292 : : )
1293 : : {
1294 : 16 : gimple_seq *lseq = seq;
1295 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail608;
1296 : 16 : {
1297 : 16 : res_op->set_op (BIT_XOR_EXPR, type, 2);
1298 : 16 : {
1299 : 16 : tree _o1[1], _r1;
1300 : 16 : _o1[0] = captures[0];
1301 : 16 : if (type != TREE_TYPE (_o1[0]) /* XXX */
1302 : 16 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
1303 : : {
1304 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
1305 : 0 : tem_op.resimplify (lseq, valueize);
1306 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1307 : 0 : if (!_r1) goto next_after_fail608;
1308 : : }
1309 : : else
1310 : : _r1 = _o1[0];
1311 : 16 : res_op->ops[0] = _r1;
1312 : : }
1313 : 16 : {
1314 : 16 : tree _o1[1], _r1;
1315 : 16 : _o1[0] = captures[1];
1316 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1317 : 16 : tem_op.resimplify (lseq, valueize);
1318 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1319 : 16 : if (!_r1) goto next_after_fail608;
1320 : 16 : res_op->ops[1] = _r1;
1321 : : }
1322 : 16 : res_op->resimplify (lseq, valueize);
1323 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 137, __FILE__, __LINE__, true);
1324 : 16 : return true;
1325 : : }
1326 : : next_after_fail608:;
1327 : : }
1328 : : return false;
1329 : : }
1330 : :
1331 : : bool
1332 : 806 : gimple_simplify_27 (gimple_match_op *res_op, gimple_seq *seq,
1333 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1334 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1335 : : {
1336 : 806 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1337 : 806 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
1338 : : )
1339 : : {
1340 : 806 : gimple_seq *lseq = seq;
1341 : 806 : if (lseq
1342 : 378 : && (!single_use (captures[0])
1343 : 369 : || !single_use (captures[1])))
1344 : 437 : lseq = NULL;
1345 : 806 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail609;
1346 : 806 : {
1347 : 806 : res_op->set_op (BIT_NOT_EXPR, type, 1);
1348 : 806 : {
1349 : 806 : tree _o1[2], _r1;
1350 : 806 : {
1351 : 806 : tree _o2[1], _r2;
1352 : 806 : _o2[0] = captures[2];
1353 : 806 : if (type != TREE_TYPE (_o2[0]) /* XXX */
1354 : 806 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
1355 : : {
1356 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o2[0]);
1357 : 0 : tem_op.resimplify (lseq, valueize);
1358 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1359 : 0 : if (!_r2) goto next_after_fail609;
1360 : : }
1361 : : else
1362 : : _r2 = _o2[0];
1363 : 806 : _o1[0] = _r2;
1364 : : }
1365 : 806 : _o1[1] = captures[3];
1366 : 806 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1367 : 806 : tem_op.resimplify (lseq, valueize);
1368 : 806 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1369 : 806 : if (!_r1) goto next_after_fail609;
1370 : 373 : res_op->ops[0] = _r1;
1371 : : }
1372 : 373 : res_op->resimplify (lseq, valueize);
1373 : 373 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 138, __FILE__, __LINE__, true);
1374 : 373 : return true;
1375 : : }
1376 : : next_after_fail609:;
1377 : : }
1378 : : return false;
1379 : : }
1380 : :
1381 : : bool
1382 : 144215 : gimple_simplify_31 (gimple_match_op *res_op, gimple_seq *seq,
1383 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1384 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1385 : : const enum tree_code ARG_UNUSED (bitop))
1386 : : {
1387 : 144215 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1388 : 144215 : if (((TREE_CODE (captures[3]) == INTEGER_CST
1389 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1390 : 0 : && (int_fits_type_p (captures[3], TREE_TYPE (captures[1]))
1391 : 0 : || tree_nop_conversion_p (TREE_TYPE (captures[1]), type)))
1392 : 144215 : || types_match (captures[1], captures[3]))
1393 : 31086 : && !POINTER_TYPE_P (TREE_TYPE (captures[1]))
1394 : 26090 : && !VECTOR_TYPE_P (TREE_TYPE (captures[1]))
1395 : 26087 : && TREE_CODE (TREE_TYPE (captures[1])) != OFFSET_TYPE
1396 : : && (bitop != BIT_AND_EXPR ||
1397 : : 1
1398 : : )
1399 : 144215 : && (
1400 : 26087 : TYPE_PRECISION (TREE_TYPE (captures[1])) < TYPE_PRECISION (type)
1401 : 22516 : || (
1402 : : 1
1403 : 22516 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (type))
1404 : 20548 : || GET_MODE_CLASS (TYPE_MODE (type)) != MODE_INT
1405 : 20548 : || !type_has_mode_precision_p (type)
1406 : 20108 : || (
1407 : : 1
1408 : 20108 : && TREE_CODE (captures[3]) != INTEGER_CST
1409 : 20108 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
1410 : 0 : && single_use (captures[0])
1411 : 0 : && single_use (captures[2])))
1412 : : )
1413 : : {
1414 : 5979 : gimple_seq *lseq = seq;
1415 : 5979 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail613;
1416 : 5979 : {
1417 : 5979 : res_op->set_op (NOP_EXPR, type, 1);
1418 : 5979 : {
1419 : 5979 : tree _o1[2], _r1;
1420 : 5979 : _o1[0] = captures[1];
1421 : 5979 : {
1422 : 5979 : tree _o2[1], _r2;
1423 : 5979 : _o2[0] = captures[3];
1424 : 5979 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0]) /* XXX */
1425 : 5979 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
1426 : : {
1427 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
1428 : 0 : tem_op.resimplify (lseq, valueize);
1429 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1430 : 0 : if (!_r2) goto next_after_fail613;
1431 : : }
1432 : : else
1433 : : _r2 = _o2[0];
1434 : 5979 : _o1[1] = _r2;
1435 : : }
1436 : 5979 : (*res_op).set_op (bitop, TREE_TYPE (_o1[0]), 2);
1437 : 5979 : (*res_op).ops[0] = _o1[0];
1438 : 5979 : (*res_op).ops[1] = _o1[1];
1439 : 5979 : (*res_op).resimplify (lseq, valueize);
1440 : : }
1441 : 5979 : if (type != res_op->type
1442 : 5979 : && !useless_type_conversion_p (type, res_op->type))
1443 : : {
1444 : 5979 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail613;
1445 : 3495 : res_op->set_op (NOP_EXPR, type, 1);
1446 : 3495 : res_op->resimplify (lseq, valueize);
1447 : : }
1448 : 3495 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 142, __FILE__, __LINE__, true);
1449 : 3495 : return true;
1450 : : }
1451 : : next_after_fail613:;
1452 : : }
1453 : : return false;
1454 : : }
1455 : :
1456 : : bool
1457 : 0 : gimple_simplify_34 (gimple_match_op *res_op, gimple_seq *seq,
1458 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1459 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1460 : : const enum tree_code ARG_UNUSED (op))
1461 : : {
1462 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1463 : 0 : gimple_seq *lseq = seq;
1464 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail618;
1465 : 0 : {
1466 : 0 : tree tem;
1467 : 0 : tem = constant_boolean_node (true, type);
1468 : 0 : res_op->set_value (tem);
1469 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 146, __FILE__, __LINE__, true);
1470 : : return true;
1471 : : }
1472 : 0 : next_after_fail618:;
1473 : 0 : return false;
1474 : : }
1475 : :
1476 : : bool
1477 : 127 : gimple_simplify_36 (gimple_match_op *res_op, gimple_seq *seq,
1478 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1479 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1480 : : const enum tree_code ARG_UNUSED (op),
1481 : : const enum tree_code ARG_UNUSED (cmp),
1482 : : const enum tree_code ARG_UNUSED (icmp))
1483 : : {
1484 : 127 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1485 : 127 : if (invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
1486 : : )
1487 : : {
1488 : 54 : gimple_seq *lseq = seq;
1489 : 54 : if (lseq
1490 : 36 : && (!single_use (captures[0])
1491 : 36 : || !single_use (captures[5])))
1492 : 18 : lseq = NULL;
1493 : 54 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail620;
1494 : 54 : {
1495 : 54 : res_op->set_op (VEC_COND_EXPR, type, 3);
1496 : 54 : res_op->ops[0] = captures[1];
1497 : 54 : res_op->ops[1] = captures[4];
1498 : 54 : res_op->ops[2] = captures[7];
1499 : 54 : res_op->resimplify (lseq, valueize);
1500 : 54 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 148, __FILE__, __LINE__, true);
1501 : 54 : return true;
1502 : : }
1503 : 0 : next_after_fail620:;
1504 : : }
1505 : : return false;
1506 : : }
1507 : :
1508 : : bool
1509 : 1 : gimple_simplify_40 (gimple_match_op *res_op, gimple_seq *seq,
1510 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1511 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1512 : : const enum tree_code ARG_UNUSED (op))
1513 : : {
1514 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1515 : 2 : if (INTEGRAL_TYPE_P (type)
1516 : 3 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[2])) == 0
1517 : : )
1518 : : {
1519 : 1 : {
1520 : 1 : tree t = type;
1521 : 1 : if (!TYPE_OVERFLOW_WRAPS (t))
1522 : 1 : t = unsigned_type_for (t);
1523 : 1 : wide_int c = wi::add (wi::to_wide (captures[3]), 1);
1524 : 1 : gimple_seq *lseq = seq;
1525 : 1 : if (lseq
1526 : 1 : && (!single_use (captures[0])
1527 : 1 : || !single_use (captures[1])))
1528 : 0 : lseq = NULL;
1529 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail624;
1530 : 1 : {
1531 : 1 : res_op->set_op (NOP_EXPR, type, 1);
1532 : 1 : {
1533 : 1 : tree _o1[2], _r1;
1534 : 1 : {
1535 : 1 : tree _o2[1], _r2;
1536 : 1 : _o2[0] = captures[2];
1537 : 1 : if (t != TREE_TYPE (_o2[0]) /* XXX */
1538 : 1 : && !useless_type_conversion_p (t, TREE_TYPE (_o2[0])))
1539 : : {
1540 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t, _o2[0]);
1541 : 1 : tem_op.resimplify (lseq, valueize);
1542 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1543 : 1 : if (!_r2) goto next_after_fail624;
1544 : : }
1545 : : else
1546 : : _r2 = _o2[0];
1547 : 1 : _o1[0] = _r2;
1548 : : }
1549 : 1 : _o1[1] = wide_int_to_tree (t, c);
1550 : 1 : (*res_op).set_op (MULT_EXPR, t, 2);
1551 : 1 : (*res_op).ops[0] = _o1[0];
1552 : 1 : (*res_op).ops[1] = _o1[1];
1553 : 1 : (*res_op).resimplify (lseq, valueize);
1554 : : }
1555 : 1 : if (type != res_op->type
1556 : 1 : && !useless_type_conversion_p (type, res_op->type))
1557 : : {
1558 : 1 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail624;
1559 : 1 : res_op->set_op (NOP_EXPR, type, 1);
1560 : 1 : res_op->resimplify (lseq, valueize);
1561 : : }
1562 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 151, __FILE__, __LINE__, true);
1563 : 1 : return true;
1564 : : }
1565 : 0 : next_after_fail624:;
1566 : 1 : }
1567 : : }
1568 : : return false;
1569 : : }
1570 : :
1571 : : bool
1572 : 323 : gimple_simplify_44 (gimple_match_op *res_op, gimple_seq *seq,
1573 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1574 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1575 : : const enum tree_code ARG_UNUSED (op))
1576 : : {
1577 : 323 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1578 : 646 : if (INTEGRAL_TYPE_P (type)
1579 : 969 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[2])) == 0
1580 : : )
1581 : : {
1582 : 12 : {
1583 : 12 : tree t = type;
1584 : 12 : if (!TYPE_OVERFLOW_WRAPS (t))
1585 : 12 : t = unsigned_type_for (t);
1586 : 12 : wide_int c = wi::add (wi::to_wide (captures[3]), 1);
1587 : 12 : gimple_seq *lseq = seq;
1588 : 12 : if (lseq
1589 : 12 : && (!single_use (captures[0])
1590 : 12 : || !single_use (captures[1])))
1591 : 0 : lseq = NULL;
1592 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail629;
1593 : 12 : {
1594 : 12 : res_op->set_op (NOP_EXPR, type, 1);
1595 : 12 : {
1596 : 12 : tree _o1[2], _r1;
1597 : 12 : {
1598 : 12 : tree _o2[1], _r2;
1599 : 12 : _o2[0] = captures[2];
1600 : 12 : if (t != TREE_TYPE (_o2[0]) /* XXX */
1601 : 12 : && !useless_type_conversion_p (t, TREE_TYPE (_o2[0])))
1602 : : {
1603 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t, _o2[0]);
1604 : 12 : tem_op.resimplify (lseq, valueize);
1605 : 12 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1606 : 12 : if (!_r2) goto next_after_fail629;
1607 : : }
1608 : : else
1609 : : _r2 = _o2[0];
1610 : 12 : _o1[0] = _r2;
1611 : : }
1612 : 12 : _o1[1] = wide_int_to_tree (t, c);
1613 : 12 : (*res_op).set_op (MULT_EXPR, t, 2);
1614 : 12 : (*res_op).ops[0] = _o1[0];
1615 : 12 : (*res_op).ops[1] = _o1[1];
1616 : 12 : (*res_op).resimplify (lseq, valueize);
1617 : : }
1618 : 12 : if (type != res_op->type
1619 : 12 : && !useless_type_conversion_p (type, res_op->type))
1620 : : {
1621 : 12 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail629;
1622 : 12 : res_op->set_op (NOP_EXPR, type, 1);
1623 : 12 : res_op->resimplify (lseq, valueize);
1624 : : }
1625 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 151, __FILE__, __LINE__, true);
1626 : 12 : return true;
1627 : : }
1628 : 0 : next_after_fail629:;
1629 : 12 : }
1630 : : }
1631 : : return false;
1632 : : }
1633 : :
1634 : : bool
1635 : 0 : gimple_simplify_48 (gimple_match_op *res_op, gimple_seq *seq,
1636 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1637 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1638 : : const enum tree_code ARG_UNUSED (cmp),
1639 : : const enum tree_code ARG_UNUSED (icmp),
1640 : : const enum tree_code ARG_UNUSED (ncmp))
1641 : : {
1642 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1643 : 0 : {
1644 : 0 : enum tree_code ic = invert_tree_comparison
1645 : 0 : (cmp, HONOR_NANS (captures[0]));
1646 : 0 : if (ic == icmp
1647 : : )
1648 : : {
1649 : 0 : gimple_seq *lseq = seq;
1650 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail633;
1651 : 0 : {
1652 : 0 : res_op->set_op (icmp, type, 2);
1653 : 0 : res_op->ops[0] = captures[0];
1654 : 0 : res_op->ops[1] = captures[1];
1655 : 0 : res_op->resimplify (lseq, valueize);
1656 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 157, __FILE__, __LINE__, true);
1657 : 0 : return true;
1658 : : }
1659 : 0 : next_after_fail633:;
1660 : : }
1661 : : else
1662 : : {
1663 : 0 : if (ic == ncmp
1664 : : )
1665 : : {
1666 : 0 : gimple_seq *lseq = seq;
1667 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail634;
1668 : 0 : {
1669 : 0 : res_op->set_op (ncmp, type, 2);
1670 : 0 : res_op->ops[0] = captures[0];
1671 : 0 : res_op->ops[1] = captures[1];
1672 : 0 : res_op->resimplify (lseq, valueize);
1673 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 158, __FILE__, __LINE__, true);
1674 : 0 : return true;
1675 : : }
1676 : 0 : next_after_fail634:;
1677 : : }
1678 : : }
1679 : : }
1680 : : return false;
1681 : : }
1682 : :
1683 : : bool
1684 : 0 : gimple_simplify_50 (gimple_match_op *res_op, gimple_seq *seq,
1685 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1686 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1687 : : {
1688 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1689 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1690 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
1691 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[3]))
1692 : : )
1693 : : {
1694 : 0 : gimple_seq *lseq = seq;
1695 : 0 : if (lseq
1696 : 0 : && (!single_use (captures[0])
1697 : 0 : || !single_use (captures[2])))
1698 : 0 : lseq = NULL;
1699 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail636;
1700 : 0 : {
1701 : 0 : res_op->set_op (GE_EXPR, type, 2);
1702 : 0 : {
1703 : 0 : tree _o1[2], _r1;
1704 : 0 : _o1[0] = captures[1];
1705 : 0 : _o1[1] = captures[3];
1706 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1707 : 0 : tem_op.resimplify (lseq, valueize);
1708 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1709 : 0 : if (!_r1) goto next_after_fail636;
1710 : 0 : res_op->ops[0] = _r1;
1711 : : }
1712 : 0 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
1713 : 0 : res_op->resimplify (lseq, valueize);
1714 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 160, __FILE__, __LINE__, true);
1715 : 0 : return true;
1716 : : }
1717 : : next_after_fail636:;
1718 : : }
1719 : : return false;
1720 : : }
1721 : :
1722 : : bool
1723 : 28 : gimple_simplify_55 (gimple_match_op *res_op, gimple_seq *seq,
1724 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1725 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1726 : : {
1727 : 28 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1728 : 28 : if (ANY_INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_UNDEFINED (type)
1729 : : )
1730 : : {
1731 : 12 : gimple_seq *lseq = seq;
1732 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail644;
1733 : 12 : {
1734 : 12 : res_op->set_op (ABS_EXPR, type, 1);
1735 : 12 : res_op->ops[0] = captures[0];
1736 : 12 : res_op->resimplify (lseq, valueize);
1737 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 168, __FILE__, __LINE__, true);
1738 : 12 : return true;
1739 : : }
1740 : 0 : next_after_fail644:;
1741 : : }
1742 : : return false;
1743 : : }
1744 : :
1745 : : bool
1746 : 2738 : gimple_simplify_56 (gimple_match_op *res_op, gimple_seq *seq,
1747 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1748 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1749 : : const enum tree_code ARG_UNUSED (op))
1750 : : {
1751 : 2738 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1752 : 2738 : if (INTEGRAL_TYPE_P (type)
1753 : 2738 : && TYPE_OVERFLOW_WRAPS (type)
1754 : 5326 : && !TYPE_SATURATING (type)
1755 : : )
1756 : : {
1757 : 2588 : gimple_seq *lseq = seq;
1758 : 2588 : if (lseq
1759 : 633 : && (!single_use (captures[0])
1760 : 22 : || !single_use (captures[3])))
1761 : 2580 : lseq = NULL;
1762 : 2588 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail645;
1763 : 2588 : {
1764 : 2588 : res_op->set_op (LSHIFT_EXPR, type, 2);
1765 : 2588 : {
1766 : 2588 : tree _o1[2], _r1;
1767 : 2588 : _o1[0] = captures[1];
1768 : 2588 : _o1[1] = captures[4];
1769 : 2588 : gimple_match_op tem_op (res_op->cond.any_else (), op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1770 : 2588 : tem_op.resimplify (lseq, valueize);
1771 : 2588 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1772 : 2588 : if (!_r1) goto next_after_fail645;
1773 : 47 : res_op->ops[0] = _r1;
1774 : : }
1775 : 47 : res_op->ops[1] = captures[2];
1776 : 47 : res_op->resimplify (lseq, valueize);
1777 : 47 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 169, __FILE__, __LINE__, true);
1778 : 47 : return true;
1779 : : }
1780 : : next_after_fail645:;
1781 : : }
1782 : : return false;
1783 : : }
1784 : :
1785 : : bool
1786 : 65 : gimple_simplify_59 (gimple_match_op *res_op, gimple_seq *seq,
1787 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1788 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1789 : : {
1790 : 65 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1791 : 65 : gimple_seq *lseq = seq;
1792 : 65 : if (lseq
1793 : 65 : && (!single_use (captures[1])))
1794 : 0 : lseq = NULL;
1795 : 65 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail649;
1796 : 65 : {
1797 : 65 : res_op->set_op (BIT_AND_EXPR, type, 2);
1798 : 65 : {
1799 : 65 : tree _o1[2], _r1;
1800 : 65 : _o1[0] = captures[0];
1801 : 65 : _o1[1] = captures[2];
1802 : 65 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1803 : 65 : tem_op.resimplify (lseq, valueize);
1804 : 65 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1805 : 65 : if (!_r1) goto next_after_fail649;
1806 : 65 : res_op->ops[0] = _r1;
1807 : : }
1808 : 65 : {
1809 : 65 : tree _o1[1], _r1;
1810 : 65 : _o1[0] = captures[2];
1811 : 65 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1812 : 65 : tem_op.resimplify (lseq, valueize);
1813 : 65 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1814 : 65 : if (!_r1) goto next_after_fail649;
1815 : 65 : res_op->ops[1] = _r1;
1816 : : }
1817 : 65 : res_op->resimplify (lseq, valueize);
1818 : 65 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 173, __FILE__, __LINE__, true);
1819 : : return true;
1820 : : }
1821 : : next_after_fail649:;
1822 : : return false;
1823 : : }
1824 : :
1825 : : bool
1826 : 719460 : gimple_simplify_63 (gimple_match_op *res_op, gimple_seq *seq,
1827 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1828 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1829 : : {
1830 : 719460 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1831 : 719460 : if (!TYPE_SATURATING (type)
1832 : : )
1833 : : {
1834 : 719460 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
1835 : 719460 : && !TYPE_OVERFLOW_SANITIZED (type)
1836 : : )
1837 : : {
1838 : 716003 : {
1839 : 716003 : tree t1 = type;
1840 : 716003 : if (INTEGRAL_TYPE_P (type)
1841 : 2061352 : && TYPE_OVERFLOW_WRAPS (type) != TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
1842 : 759 : t1 = TYPE_OVERFLOW_WRAPS (type) ? type : TREE_TYPE (captures[1]);
1843 : 716003 : gimple_seq *lseq = seq;
1844 : 716003 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail653;
1845 : 716003 : {
1846 : 716003 : res_op->set_op (NOP_EXPR, type, 1);
1847 : 716003 : {
1848 : 716003 : tree _o1[2], _r1;
1849 : 716003 : {
1850 : 716003 : tree _o2[1], _r2;
1851 : 716003 : _o2[0] = captures[0];
1852 : 716003 : if (t1 != TREE_TYPE (_o2[0]) /* XXX */
1853 : 716003 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
1854 : : {
1855 : 42 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
1856 : 42 : tem_op.resimplify (lseq, valueize);
1857 : 42 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1858 : 42 : if (!_r2) goto next_after_fail653;
1859 : : }
1860 : : else
1861 : : _r2 = _o2[0];
1862 : 715989 : _o1[0] = _r2;
1863 : : }
1864 : 715989 : {
1865 : 715989 : tree _o2[1], _r2;
1866 : 715989 : _o2[0] = captures[1];
1867 : 715989 : if (t1 != TREE_TYPE (_o2[0]) /* XXX */
1868 : 715989 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
1869 : : {
1870 : 905 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
1871 : 905 : tem_op.resimplify (lseq, valueize);
1872 : 905 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1873 : 905 : if (!_r2) goto next_after_fail653;
1874 : : }
1875 : : else
1876 : : _r2 = _o2[0];
1877 : 715414 : _o1[1] = _r2;
1878 : : }
1879 : 715414 : (*res_op).set_op (MINUS_EXPR, TREE_TYPE (_o1[0]), 2);
1880 : 715414 : (*res_op).ops[0] = _o1[0];
1881 : 715414 : (*res_op).ops[1] = _o1[1];
1882 : 715414 : (*res_op).resimplify (lseq, valueize);
1883 : : }
1884 : 715414 : if (type != res_op->type
1885 : 715414 : && !useless_type_conversion_p (type, res_op->type))
1886 : : {
1887 : 28 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail653;
1888 : 28 : res_op->set_op (NOP_EXPR, type, 1);
1889 : 28 : res_op->resimplify (lseq, valueize);
1890 : : }
1891 : 715414 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 177, __FILE__, __LINE__, true);
1892 : 715414 : return true;
1893 : : }
1894 : : next_after_fail653:;
1895 : : }
1896 : : }
1897 : : }
1898 : : return false;
1899 : : }
1900 : :
1901 : : bool
1902 : 57 : gimple_simplify_68 (gimple_match_op *res_op, gimple_seq *seq,
1903 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1904 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1905 : : {
1906 : 57 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1907 : 57 : if (!TYPE_SATURATING (type)
1908 : : )
1909 : : {
1910 : 57 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1911 : 114 : && !FIXED_POINT_TYPE_P (type)
1912 : : )
1913 : : {
1914 : 57 : if (TYPE_OVERFLOW_UNDEFINED (type)
1915 : 114 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
1916 : : )
1917 : : {
1918 : 57 : gimple_seq *lseq = seq;
1919 : 57 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail666;
1920 : 57 : {
1921 : 57 : res_op->set_op (POINTER_DIFF_EXPR, type, 2);
1922 : 57 : res_op->ops[0] = captures[2];
1923 : 57 : res_op->ops[1] = captures[1];
1924 : 57 : res_op->resimplify (lseq, valueize);
1925 : 57 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 190, __FILE__, __LINE__, true);
1926 : 57 : return true;
1927 : : }
1928 : 0 : next_after_fail666:;
1929 : : }
1930 : : }
1931 : : }
1932 : : return false;
1933 : : }
1934 : :
1935 : : bool
1936 : 1416365 : gimple_simplify_70 (gimple_match_op *res_op, gimple_seq *seq,
1937 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1938 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1939 : : const enum tree_code ARG_UNUSED (op))
1940 : : {
1941 : 1416365 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1942 : 1416365 : if (!TYPE_SATURATING (type)
1943 : : )
1944 : : {
1945 : 1416365 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1946 : 2805382 : && !FIXED_POINT_TYPE_P (type)
1947 : : )
1948 : : {
1949 : 1389017 : if (INTEGRAL_TYPE_P (type)
1950 : 1388812 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1951 : 1247704 : && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
1952 : 993866 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
1953 : 953751 : && !TYPE_OVERFLOW_TRAPS (type)
1954 : 2342768 : && !TYPE_OVERFLOW_SANITIZED (type)
1955 : : )
1956 : : {
1957 : 953751 : gimple_seq *lseq = seq;
1958 : 953751 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail668;
1959 : 953751 : {
1960 : 953751 : res_op->set_op (NOP_EXPR, type, 1);
1961 : 953751 : {
1962 : 953751 : tree _o1[2], _r1;
1963 : 953751 : _o1[0] = captures[0];
1964 : 953751 : _o1[1] = captures[1];
1965 : 953751 : (*res_op).set_op (op, TREE_TYPE (_o1[0]), 2);
1966 : 953751 : (*res_op).ops[0] = _o1[0];
1967 : 953751 : (*res_op).ops[1] = _o1[1];
1968 : 953751 : (*res_op).resimplify (NULL, valueize);
1969 : : }
1970 : 953751 : if (type != res_op->type
1971 : 953751 : && !useless_type_conversion_p (type, res_op->type))
1972 : : {
1973 : 953751 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, NULL))) goto next_after_fail668;
1974 : 40079 : res_op->set_op (NOP_EXPR, type, 1);
1975 : 40079 : res_op->resimplify (lseq, valueize);
1976 : : }
1977 : 40079 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 192, __FILE__, __LINE__, true);
1978 : 40079 : return true;
1979 : : }
1980 : : next_after_fail668:;
1981 : : }
1982 : : }
1983 : : }
1984 : : return false;
1985 : : }
1986 : :
1987 : : bool
1988 : 7041 : gimple_simplify_71 (gimple_match_op *res_op, gimple_seq *seq,
1989 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1990 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1991 : : {
1992 : 7041 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1993 : 7041 : if (!TYPE_SATURATING (type)
1994 : : )
1995 : : {
1996 : 7041 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
1997 : 14082 : && !FIXED_POINT_TYPE_P (type)
1998 : : )
1999 : : {
2000 : 7041 : if (!TYPE_OVERFLOW_TRAPS (type)
2001 : : )
2002 : : {
2003 : 7041 : gimple_seq *lseq = seq;
2004 : 7041 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail669;
2005 : 7041 : {
2006 : 7041 : res_op->set_op (NOP_EXPR, type, 1);
2007 : 7041 : res_op->ops[0] = build_all_ones_cst (TREE_TYPE (captures[0]));
2008 : 7041 : res_op->resimplify (lseq, valueize);
2009 : 7041 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 193, __FILE__, __LINE__, true);
2010 : 7041 : return true;
2011 : : }
2012 : 0 : next_after_fail669:;
2013 : : }
2014 : : }
2015 : : }
2016 : : return false;
2017 : : }
2018 : :
2019 : : bool
2020 : 51476 : gimple_simplify_74 (gimple_match_op *res_op, gimple_seq *seq,
2021 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2022 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2023 : : const enum tree_code ARG_UNUSED (plusminus))
2024 : : {
2025 : 51476 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2026 : 51476 : if (!TYPE_SATURATING (type)
2027 : 51476 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
2028 : : )
2029 : : {
2030 : 43255 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
2031 : : )
2032 : : {
2033 : 123 : if ((!ANY_INTEGRAL_TYPE_P (type)
2034 : 43240 : || TYPE_OVERFLOW_WRAPS (type)
2035 : 26292 : || (INTEGRAL_TYPE_P (type)
2036 : 26192 : && ((tree_expr_nonzero_p (captures[0])
2037 : 1109 : && expr_not_equal_to (captures[0],
2038 : 44364 : wi::minus_one (TYPE_PRECISION (type))))
2039 : 7041 : || (plusminus == PLUS_EXPR
2040 : 25716 : ? expr_not_equal_to (captures[2],
2041 : 50296 : wi::max_value (TYPE_PRECISION (type), SIGNED))
2042 : 18675 : : (expr_not_equal_to (captures[2],
2043 : 61930 : wi::min_value (TYPE_PRECISION (type), SIGNED))
2044 : 937 : && expr_not_equal_to (captures[2],
2045 : 1874 : wi::min_value (TYPE_PRECISION (type), SIGNED)
2046 : 46066 : + 1))))))
2047 : 89366 : && single_use (captures[1])
2048 : : )
2049 : : {
2050 : 4601 : gimple_seq *lseq = seq;
2051 : 4601 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail673;
2052 : 4601 : {
2053 : 4601 : res_op->set_op (MULT_EXPR, type, 2);
2054 : 4601 : {
2055 : 4601 : tree _o1[2], _r1;
2056 : 4601 : _o1[0] = build_one_cst (type);
2057 : 4601 : _o1[1] = captures[2];
2058 : 4601 : gimple_match_op tem_op (res_op->cond.any_else (), plusminus, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2059 : 4601 : tem_op.resimplify (lseq, valueize);
2060 : 4601 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2061 : 4601 : if (!_r1) goto next_after_fail673;
2062 : 2063 : res_op->ops[0] = _r1;
2063 : : }
2064 : 2063 : res_op->ops[1] = captures[0];
2065 : 2063 : res_op->resimplify (lseq, valueize);
2066 : 2063 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 197, __FILE__, __LINE__, true);
2067 : 2063 : return true;
2068 : : }
2069 : : next_after_fail673:;
2070 : : }
2071 : : }
2072 : : }
2073 : : return false;
2074 : : }
2075 : :
2076 : : bool
2077 : 1104847 : gimple_simplify_76 (gimple_match_op *res_op, gimple_seq *seq,
2078 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2079 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2080 : : {
2081 : 1104847 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2082 : 1104847 : if (!TYPE_SATURATING (type)
2083 : 1104847 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
2084 : : )
2085 : : {
2086 : 1104847 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
2087 : : )
2088 : : {
2089 : 2209694 : if (TREE_CODE (type) == INTEGER_TYPE
2090 : 1104847 : && wi::neg_p (wi::to_wide (captures[3]))
2091 : 3314541 : && wi::to_wide (captures[3]) != wi::min_value (TYPE_PRECISION (type), SIGNED)
2092 : : )
2093 : : {
2094 : 428079 : {
2095 : 428079 : wide_int c0 = wi::to_wide (captures[1]);
2096 : 428079 : wide_int c2 = wi::to_wide (captures[3]);
2097 : 428079 : wide_int c2_abs = wi::abs (c2);
2098 : 428079 : if (wi::multiple_of_p (c2_abs, c0, TYPE_SIGN (type))
2099 : : )
2100 : : {
2101 : 80117 : {
2102 : 80117 : wide_int div_res = wi::sdiv_trunc (c2, c0);
2103 : 80117 : tree div_cst = wide_int_to_tree (type, div_res);
2104 : 80117 : gimple_seq *lseq = seq;
2105 : 80117 : if (lseq
2106 : 20095 : && (!single_use (captures[0])))
2107 : 67559 : lseq = NULL;
2108 : 80117 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail675;
2109 : 80117 : {
2110 : 80117 : res_op->set_op (MULT_EXPR, type, 2);
2111 : 80117 : {
2112 : 80117 : tree _o1[2], _r1;
2113 : 80117 : _o1[0] = captures[2];
2114 : 80117 : _o1[1] = div_cst;
2115 : 80117 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2116 : 80117 : tem_op.resimplify (lseq, valueize);
2117 : 80117 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2118 : 80117 : if (!_r1) goto next_after_fail675;
2119 : 26193 : res_op->ops[0] = _r1;
2120 : : }
2121 : 26193 : res_op->ops[1] = captures[1];
2122 : 26193 : res_op->resimplify (lseq, valueize);
2123 : 26193 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 199, __FILE__, __LINE__, true);
2124 : 26193 : return true;
2125 : : }
2126 : 53924 : next_after_fail675:;
2127 : 80117 : }
2128 : : }
2129 : 428079 : }
2130 : : }
2131 : : }
2132 : : }
2133 : : return false;
2134 : : }
2135 : :
2136 : : bool
2137 : 18 : gimple_simplify_81 (gimple_match_op *res_op, gimple_seq *seq,
2138 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2139 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2140 : : const combined_fn ARG_UNUSED (logs))
2141 : : {
2142 : 18 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2143 : 18 : if (flag_unsafe_math_optimizations
2144 : : )
2145 : : {
2146 : 18 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
2147 : 18 : && ! HONOR_NANS (type) && ! HONOR_INFINITIES (type)
2148 : 18 : && ! flag_trapping_math
2149 : 36 : && ! flag_errno_math
2150 : : )
2151 : : {
2152 : 18 : gimple_seq *lseq = seq;
2153 : 18 : if (lseq
2154 : 9 : && (!single_use (captures[0])
2155 : 9 : || !single_use (captures[2])))
2156 : 9 : lseq = NULL;
2157 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail680;
2158 : 18 : {
2159 : 18 : res_op->set_op (logs, type, 1);
2160 : 18 : {
2161 : 18 : tree _o1[2], _r1;
2162 : 18 : _o1[0] = captures[1];
2163 : 18 : _o1[1] = captures[3];
2164 : 18 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2165 : 18 : tem_op.resimplify (lseq, valueize);
2166 : 18 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2167 : 18 : if (!_r1) goto next_after_fail680;
2168 : 9 : res_op->ops[0] = _r1;
2169 : : }
2170 : 9 : res_op->resimplify (lseq, valueize);
2171 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 204, __FILE__, __LINE__, true);
2172 : 9 : return true;
2173 : : }
2174 : : next_after_fail680:;
2175 : : }
2176 : : }
2177 : : return false;
2178 : : }
2179 : :
2180 : : bool
2181 : 32 : gimple_simplify_83 (gimple_match_op *res_op, gimple_seq *seq,
2182 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2183 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2184 : : const combined_fn ARG_UNUSED (POPCOUNT))
2185 : : {
2186 : 32 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2187 : 32 : gimple_seq *lseq = seq;
2188 : 32 : if (lseq
2189 : 16 : && (!single_use (captures[0])
2190 : 16 : || !single_use (captures[1])
2191 : 16 : || !single_use (captures[4])
2192 : 16 : || !single_use (captures[5])))
2193 : 16 : lseq = NULL;
2194 : 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail682;
2195 : 32 : {
2196 : 32 : res_op->set_op (PLUS_EXPR, type, 2);
2197 : 32 : {
2198 : 32 : tree _o1[1], _r1;
2199 : 32 : _o1[0] = captures[2];
2200 : 32 : gimple_match_op tem_op (res_op->cond.any_else (), POPCOUNT, type, _o1[0]);
2201 : 32 : tem_op.resimplify (lseq, valueize);
2202 : 32 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2203 : 32 : if (!_r1) goto next_after_fail682;
2204 : 16 : res_op->ops[0] = _r1;
2205 : : }
2206 : 16 : {
2207 : 16 : tree _o1[1], _r1;
2208 : 16 : _o1[0] = captures[3];
2209 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), POPCOUNT, type, _o1[0]);
2210 : 16 : tem_op.resimplify (lseq, valueize);
2211 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2212 : 16 : if (!_r1) goto next_after_fail682;
2213 : 16 : res_op->ops[1] = _r1;
2214 : : }
2215 : 16 : res_op->resimplify (lseq, valueize);
2216 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 206, __FILE__, __LINE__, true);
2217 : : return true;
2218 : : }
2219 : : next_after_fail682:;
2220 : : return false;
2221 : : }
2222 : :
2223 : : bool
2224 : 473 : gimple_simplify_86 (gimple_match_op *res_op, gimple_seq *seq,
2225 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2226 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2227 : : const enum tree_code ARG_UNUSED (op))
2228 : : {
2229 : 473 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2230 : 473 : if (VECTOR_FLOAT_TYPE_P (type)
2231 : 808 : && TYPE_VECTOR_SUBPARTS (type).is_constant ()
2232 : : )
2233 : : {
2234 : 335 : {
2235 : 335 : tree perm_cst = captures[1];
2236 : 335 : vec_perm_builder builder;
2237 : 335 : bool full_perm_p = false;
2238 : 335 : if (tree_to_vec_perm_builder (&builder, perm_cst))
2239 : : {
2240 : 335 : unsigned HOST_WIDE_INT nelts;
2241 : 335 : nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
2242 : 335 : vec_perm_indices sel (builder, 1, nelts);
2243 : 335 : if (sel.encoding ().encoded_full_vector_p ())
2244 : : {
2245 : 107 : auto_sbitmap seen (nelts);
2246 : 107 : bitmap_clear (seen);
2247 : 107 : unsigned HOST_WIDE_INT count = 0, i;
2248 : 452 : for (i = 0; i < nelts; i++)
2249 : : {
2250 : 286 : if (!bitmap_set_bit (seen, sel[i].to_constant ()))
2251 : : break;
2252 : 238 : count++;
2253 : : }
2254 : 107 : full_perm_p = count == nelts;
2255 : 107 : }
2256 : 335 : }
2257 : 335 : if (full_perm_p
2258 : : )
2259 : : {
2260 : 59 : gimple_seq *lseq = seq;
2261 : 59 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail685;
2262 : 59 : {
2263 : 59 : res_op->set_op (VEC_PERM_EXPR, type, 3);
2264 : 59 : {
2265 : 59 : tree _o1[2], _r1;
2266 : 59 : _o1[0] = captures[0];
2267 : 59 : _o1[1] = captures[2];
2268 : 59 : gimple_match_op tem_op (res_op->cond.any_else (), op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2269 : 59 : tem_op.resimplify (lseq, valueize);
2270 : 59 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2271 : 59 : if (!_r1) goto next_after_fail685;
2272 : 25 : captures[3] = _r1;
2273 : : }
2274 : 25 : res_op->ops[0] = captures[3];
2275 : 25 : res_op->ops[1] = captures[3];
2276 : 25 : res_op->ops[2] = captures[1];
2277 : 25 : res_op->resimplify (lseq, valueize);
2278 : 25 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 209, __FILE__, __LINE__, true);
2279 : 25 : return true;
2280 : : }
2281 : 310 : next_after_fail685:;
2282 : : }
2283 : 335 : }
2284 : : }
2285 : : return false;
2286 : : }
2287 : :
2288 : : bool
2289 : 20 : gimple_simplify_92 (gimple_match_op *res_op, gimple_seq *seq,
2290 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2291 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2292 : : {
2293 : 20 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2294 : 20 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
2295 : 20 : && !TYPE_SATURATING (type) && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
2296 : 20 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[2]))
2297 : 40 : && !TYPE_SATURATING (TREE_TYPE (captures[2]))
2298 : : )
2299 : : {
2300 : 20 : gimple_seq *lseq = seq;
2301 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail691;
2302 : 20 : {
2303 : 20 : res_op->set_op (BIT_NOT_EXPR, type, 1);
2304 : 20 : {
2305 : 20 : tree _r1;
2306 : 20 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
2307 : 20 : {
2308 : 20 : tree _o2[2], _r2;
2309 : 20 : _o2[0] = captures[0];
2310 : 20 : _o2[1] = captures[1];
2311 : 20 : tem_op.set_op (BIT_XOR_EXPR, TREE_TYPE (_o2[0]), 2);
2312 : 20 : tem_op.ops[0] = _o2[0];
2313 : 20 : tem_op.ops[1] = _o2[1];
2314 : 20 : tem_op.resimplify (lseq, valueize);
2315 : : }
2316 : 20 : if (type != tem_op.type
2317 : 20 : && !useless_type_conversion_p (type, tem_op.type))
2318 : : {
2319 : 11 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2320 : 16 : if (!_r1) goto next_after_fail691;
2321 : 6 : tem_op.set_op (NOP_EXPR, type, 1);
2322 : 6 : tem_op.ops[0] = _r1;
2323 : 6 : tem_op.resimplify (lseq, valueize);
2324 : : }
2325 : 15 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2326 : 15 : if (!_r1) goto next_after_fail691;
2327 : 10 : res_op->ops[0] = _r1;
2328 : : }
2329 : 10 : res_op->resimplify (lseq, valueize);
2330 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 215, __FILE__, __LINE__, true);
2331 : 10 : return true;
2332 : : }
2333 : : next_after_fail691:;
2334 : : }
2335 : : return false;
2336 : : }
2337 : :
2338 : : bool
2339 : 1922 : gimple_simplify_97 (gimple_match_op *res_op, gimple_seq *seq,
2340 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2341 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2342 : : {
2343 : 1922 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2344 : 1922 : if (!TYPE_SATURATING (type)
2345 : : )
2346 : : {
2347 : 1922 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
2348 : 1922 : && !TYPE_OVERFLOW_SANITIZED (type)
2349 : : )
2350 : : {
2351 : 128 : {
2352 : 128 : tree t1 = type;
2353 : 128 : if (INTEGRAL_TYPE_P (type)
2354 : 256 : && TYPE_OVERFLOW_WRAPS (type) != TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
2355 : 128 : t1 = TYPE_OVERFLOW_WRAPS (type) ? type : TREE_TYPE (captures[1]);
2356 : 128 : gimple_seq *lseq = seq;
2357 : 128 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail696;
2358 : 128 : {
2359 : 128 : res_op->set_op (NOP_EXPR, type, 1);
2360 : 128 : {
2361 : 128 : tree _o1[2], _r1;
2362 : 128 : {
2363 : 128 : tree _o2[1], _r2;
2364 : 128 : _o2[0] = captures[0];
2365 : 128 : if (t1 != TREE_TYPE (_o2[0]) /* XXX */
2366 : 128 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
2367 : : {
2368 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
2369 : 6 : tem_op.resimplify (lseq, valueize);
2370 : 6 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2371 : 6 : if (!_r2) goto next_after_fail696;
2372 : : }
2373 : : else
2374 : : _r2 = _o2[0];
2375 : 128 : _o1[0] = _r2;
2376 : : }
2377 : 128 : {
2378 : 128 : tree _o2[1], _r2;
2379 : 128 : _o2[0] = captures[1];
2380 : 128 : if (t1 != TREE_TYPE (_o2[0]) /* XXX */
2381 : 128 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
2382 : : {
2383 : 122 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
2384 : 122 : tem_op.resimplify (lseq, valueize);
2385 : 122 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2386 : 122 : if (!_r2) goto next_after_fail696;
2387 : : }
2388 : : else
2389 : : _r2 = _o2[0];
2390 : 42 : _o1[1] = _r2;
2391 : : }
2392 : 42 : (*res_op).set_op (PLUS_EXPR, TREE_TYPE (_o1[0]), 2);
2393 : 42 : (*res_op).ops[0] = _o1[0];
2394 : 42 : (*res_op).ops[1] = _o1[1];
2395 : 42 : (*res_op).resimplify (lseq, valueize);
2396 : : }
2397 : 42 : if (type != res_op->type
2398 : 42 : && !useless_type_conversion_p (type, res_op->type))
2399 : : {
2400 : 6 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail696;
2401 : 6 : res_op->set_op (NOP_EXPR, type, 1);
2402 : 6 : res_op->resimplify (lseq, valueize);
2403 : : }
2404 : 42 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 219, __FILE__, __LINE__, true);
2405 : 42 : return true;
2406 : : }
2407 : : next_after_fail696:;
2408 : : }
2409 : : }
2410 : : }
2411 : : return false;
2412 : : }
2413 : :
2414 : : bool
2415 : 1670 : gimple_simplify_103 (gimple_match_op *res_op, gimple_seq *seq,
2416 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2417 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2418 : : {
2419 : 1670 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2420 : 1670 : if (!TYPE_SATURATING (type)
2421 : : )
2422 : : {
2423 : 1670 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
2424 : 2834 : && !FIXED_POINT_TYPE_P (type)
2425 : : )
2426 : : {
2427 : 1164 : if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type)
2428 : : )
2429 : : {
2430 : 284 : if (!CONSTANT_CLASS_P (captures[2])
2431 : : )
2432 : : {
2433 : 284 : gimple_seq *lseq = seq;
2434 : 284 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail704;
2435 : 284 : {
2436 : 284 : res_op->set_op (PLUS_EXPR, type, 2);
2437 : 284 : {
2438 : 284 : tree _o1[1], _r1;
2439 : 284 : _o1[0] = captures[2];
2440 : 284 : if (type != TREE_TYPE (_o1[0]) /* XXX */
2441 : 284 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2442 : : {
2443 : 225 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
2444 : 225 : tem_op.resimplify (lseq, valueize);
2445 : 225 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2446 : 225 : if (!_r1) goto next_after_fail704;
2447 : : }
2448 : : else
2449 : : _r1 = _o1[0];
2450 : 231 : res_op->ops[0] = _r1;
2451 : : }
2452 : 231 : {
2453 : 231 : tree _o1[2], _r1;
2454 : 231 : _o1[0] = captures[0];
2455 : 231 : {
2456 : 231 : tree _o2[1], _r2;
2457 : 231 : _o2[0] = captures[1];
2458 : 231 : if (type != TREE_TYPE (_o2[0]) /* XXX */
2459 : 231 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
2460 : : {
2461 : 172 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o2[0]);
2462 : 172 : tem_op.resimplify (lseq, valueize);
2463 : 172 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2464 : 172 : if (!_r2) goto next_after_fail704;
2465 : : }
2466 : : else
2467 : : _r2 = _o2[0];
2468 : 231 : _o1[1] = _r2;
2469 : : }
2470 : 231 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2471 : 231 : tem_op.resimplify (NULL, valueize);
2472 : 231 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
2473 : 231 : if (!_r1) goto next_after_fail704;
2474 : 231 : res_op->ops[1] = _r1;
2475 : : }
2476 : 231 : res_op->resimplify (lseq, valueize);
2477 : 231 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 227, __FILE__, __LINE__, true);
2478 : 231 : return true;
2479 : : }
2480 : : next_after_fail704:;
2481 : : }
2482 : : }
2483 : : else
2484 : : {
2485 : 1760 : if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2486 : 1760 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
2487 : : )
2488 : : {
2489 : 158 : gimple_seq *lseq = seq;
2490 : 158 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail705;
2491 : 158 : {
2492 : 158 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
2493 : 158 : {
2494 : 158 : tree _o1[2], _r1;
2495 : 158 : _o1[0] = captures[2];
2496 : 158 : {
2497 : 158 : tree _o2[2], _r2;
2498 : 158 : {
2499 : 158 : tree _o3[1], _r3;
2500 : 158 : _o3[0] = captures[0];
2501 : 158 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o3[0]) /* XXX */
2502 : 158 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o3[0])))
2503 : : {
2504 : 158 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, TREE_TYPE (_o1[0]), _o3[0]);
2505 : 158 : tem_op.resimplify (lseq, valueize);
2506 : 158 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2507 : 158 : if (!_r3) goto next_after_fail705;
2508 : : }
2509 : : else
2510 : : _r3 = _o3[0];
2511 : 158 : _o2[0] = _r3;
2512 : : }
2513 : 158 : _o2[1] = captures[1];
2514 : 158 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2515 : 158 : tem_op.resimplify (NULL, valueize);
2516 : 158 : _r2 = maybe_push_res_to_seq (&tem_op, NULL);
2517 : 158 : if (!_r2) goto next_after_fail705;
2518 : 158 : _o1[1] = _r2;
2519 : : }
2520 : 158 : (*res_op).set_op (PLUS_EXPR, TREE_TYPE (_o1[0]), 2);
2521 : 158 : (*res_op).ops[0] = _o1[0];
2522 : 158 : (*res_op).ops[1] = _o1[1];
2523 : 158 : (*res_op).resimplify (lseq, valueize);
2524 : : }
2525 : 158 : if (type != res_op->type
2526 : 158 : && !useless_type_conversion_p (type, res_op->type))
2527 : : {
2528 : 158 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail705;
2529 : 98 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
2530 : 98 : res_op->resimplify (lseq, valueize);
2531 : : }
2532 : 98 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 228, __FILE__, __LINE__, true);
2533 : 98 : return true;
2534 : : }
2535 : : next_after_fail705:;
2536 : : }
2537 : : else
2538 : : {
2539 : 722 : if (types_match (type, captures[2]) && !TYPE_OVERFLOW_SANITIZED (type)
2540 : : )
2541 : : {
2542 : 722 : {
2543 : 722 : tree cst = const_binop (MINUS_EXPR, type, captures[0], captures[1]);
2544 : 722 : if (cst && !TREE_OVERFLOW (cst)
2545 : : )
2546 : : {
2547 : 722 : gimple_seq *lseq = seq;
2548 : 722 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail706;
2549 : 722 : {
2550 : 722 : res_op->set_op (PLUS_EXPR, type, 2);
2551 : 722 : res_op->ops[0] = cst;
2552 : 722 : res_op->ops[1] = captures[2];
2553 : 722 : res_op->resimplify (lseq, valueize);
2554 : 722 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 229, __FILE__, __LINE__, true);
2555 : 722 : return true;
2556 : : }
2557 : 0 : next_after_fail706:;
2558 : : }
2559 : : }
2560 : : }
2561 : : }
2562 : : }
2563 : : }
2564 : : }
2565 : : return false;
2566 : : }
2567 : :
2568 : : bool
2569 : 0 : gimple_simplify_111 (gimple_match_op *res_op, gimple_seq *seq,
2570 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2571 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2572 : : const enum tree_code ARG_UNUSED (log1),
2573 : : const enum tree_code ARG_UNUSED (log2),
2574 : : const combined_fn ARG_UNUSED (popcount))
2575 : : {
2576 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2577 : 0 : gimple_seq *lseq = seq;
2578 : 0 : if (lseq
2579 : 0 : && (!single_use (captures[0])
2580 : 0 : || !single_use (captures[1])
2581 : 0 : || !single_use (captures[3])
2582 : 0 : || !single_use (captures[5])
2583 : 0 : || !single_use (captures[6])))
2584 : 0 : lseq = NULL;
2585 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail716;
2586 : 0 : {
2587 : 0 : res_op->set_op (popcount, type, 1);
2588 : 0 : {
2589 : 0 : tree _o1[2], _r1;
2590 : 0 : _o1[0] = captures[2];
2591 : 0 : _o1[1] = captures[4];
2592 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), log2, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2593 : 0 : tem_op.resimplify (lseq, valueize);
2594 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2595 : 0 : if (!_r1) goto next_after_fail716;
2596 : 0 : res_op->ops[0] = _r1;
2597 : : }
2598 : 0 : res_op->resimplify (lseq, valueize);
2599 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 239, __FILE__, __LINE__, true);
2600 : : return true;
2601 : : }
2602 : : next_after_fail716:;
2603 : : return false;
2604 : : }
2605 : :
2606 : : bool
2607 : 23 : gimple_simplify_115 (gimple_match_op *res_op, gimple_seq *seq,
2608 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2609 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2610 : : {
2611 : 23 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2612 : 23 : gimple_seq *lseq = seq;
2613 : 23 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail720;
2614 : 23 : {
2615 : 23 : res_op->set_op (BIT_IOR_EXPR, type, 2);
2616 : 23 : res_op->ops[0] = captures[0];
2617 : 23 : res_op->ops[1] = captures[1];
2618 : 23 : res_op->resimplify (lseq, valueize);
2619 : 23 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 243, __FILE__, __LINE__, true);
2620 : : return true;
2621 : : }
2622 : 0 : next_after_fail720:;
2623 : 0 : return false;
2624 : : }
2625 : :
2626 : : bool
2627 : 38608 : gimple_simplify_117 (gimple_match_op *res_op, gimple_seq *seq,
2628 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2629 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2630 : : {
2631 : 38608 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2632 : 38608 : {
2633 : 38608 : bool wascmp;
2634 : 38608 : if (bitwise_inverted_equal_p (captures[0], captures[2], wascmp)
2635 : 38608 : && (!wascmp || element_precision (type) == 1)
2636 : : )
2637 : : {
2638 : 9 : gimple_seq *lseq = seq;
2639 : 9 : if (lseq
2640 : 5 : && (!single_use (captures[1])))
2641 : 4 : lseq = NULL;
2642 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail722;
2643 : 9 : {
2644 : 9 : res_op->set_op (BIT_IOR_EXPR, type, 2);
2645 : 9 : res_op->ops[0] = captures[0];
2646 : 9 : {
2647 : 9 : tree _o1[1], _r1;
2648 : 9 : _o1[0] = captures[3];
2649 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2650 : 9 : tem_op.resimplify (lseq, valueize);
2651 : 9 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2652 : 9 : if (!_r1) goto next_after_fail722;
2653 : 5 : res_op->ops[1] = _r1;
2654 : : }
2655 : 5 : res_op->resimplify (lseq, valueize);
2656 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 245, __FILE__, __LINE__, true);
2657 : 5 : return true;
2658 : : }
2659 : 38603 : next_after_fail722:;
2660 : : }
2661 : : }
2662 : 38603 : return false;
2663 : : }
2664 : :
2665 : : bool
2666 : 1091 : gimple_simplify_122 (gimple_match_op *res_op, gimple_seq *seq,
2667 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2668 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2669 : : const enum tree_code ARG_UNUSED (op))
2670 : : {
2671 : 1091 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2672 : 1091 : gimple_seq *lseq = seq;
2673 : 1091 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail727;
2674 : 1091 : {
2675 : 1091 : tree tem;
2676 : 1091 : tem = captures[0];
2677 : 1091 : res_op->set_value (tem);
2678 : 1091 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 249, __FILE__, __LINE__, true);
2679 : : return true;
2680 : : }
2681 : 0 : next_after_fail727:;
2682 : 0 : return false;
2683 : : }
2684 : :
2685 : : bool
2686 : 0 : gimple_simplify_125 (gimple_match_op *res_op, gimple_seq *seq,
2687 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2688 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2689 : : {
2690 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2691 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2692 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
2693 : : )
2694 : : {
2695 : 0 : gimple_seq *lseq = seq;
2696 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail730;
2697 : 0 : {
2698 : 0 : tree tem;
2699 : 0 : tem = captures[2];
2700 : 0 : res_op->set_value (tem);
2701 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 251, __FILE__, __LINE__, true);
2702 : 0 : return true;
2703 : : }
2704 : 0 : next_after_fail730:;
2705 : : }
2706 : : return false;
2707 : : }
2708 : :
2709 : : bool
2710 : 356 : gimple_simplify_129 (gimple_match_op *res_op, gimple_seq *seq,
2711 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2712 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2713 : : const enum tree_code ARG_UNUSED (bitop))
2714 : : {
2715 : 356 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2716 : 356 : gimple_seq *lseq = seq;
2717 : 356 : if (lseq
2718 : 140 : && (!single_use (captures[1])))
2719 : 318 : lseq = NULL;
2720 : 356 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail734;
2721 : 356 : {
2722 : 356 : res_op->set_op (bitop, type, 2);
2723 : 356 : res_op->ops[0] = captures[0];
2724 : 356 : {
2725 : 356 : tree _o1[1], _r1;
2726 : 356 : _o1[0] = captures[2];
2727 : 356 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2728 : 356 : tem_op.resimplify (lseq, valueize);
2729 : 356 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2730 : 356 : if (!_r1) goto next_after_fail734;
2731 : 50 : res_op->ops[1] = _r1;
2732 : : }
2733 : 50 : res_op->resimplify (lseq, valueize);
2734 : 50 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 253, __FILE__, __LINE__, true);
2735 : : return true;
2736 : : }
2737 : : next_after_fail734:;
2738 : : return false;
2739 : : }
2740 : :
2741 : : bool
2742 : 3363 : gimple_simplify_136 (gimple_match_op *res_op, gimple_seq *seq,
2743 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2744 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2745 : : const enum tree_code ARG_UNUSED (op),
2746 : : const enum tree_code ARG_UNUSED (rop))
2747 : : {
2748 : 3363 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2749 : 3363 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
2750 : 3363 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
2751 : : )
2752 : : {
2753 : 3205 : gimple_seq *lseq = seq;
2754 : 3205 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail741;
2755 : 3205 : {
2756 : 3205 : res_op->set_op (BIT_NOT_EXPR, type, 1);
2757 : 3205 : {
2758 : 3205 : tree _o1[2], _r1;
2759 : 3205 : {
2760 : 3205 : tree _o2[1], _r2;
2761 : 3205 : _o2[0] = captures[0];
2762 : 3205 : if (type != TREE_TYPE (_o2[0]) /* XXX */
2763 : 3205 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
2764 : : {
2765 : 203 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
2766 : 203 : tem_op.resimplify (lseq, valueize);
2767 : 203 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2768 : 203 : if (!_r2) goto next_after_fail741;
2769 : : }
2770 : : else
2771 : : _r2 = _o2[0];
2772 : 3114 : _o1[0] = _r2;
2773 : : }
2774 : 3114 : {
2775 : 3114 : tree _o2[1], _r2;
2776 : 3114 : _o2[0] = captures[1];
2777 : 3114 : if (type != TREE_TYPE (_o2[0]) /* XXX */
2778 : 3114 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
2779 : : {
2780 : 171 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
2781 : 171 : tem_op.resimplify (lseq, valueize);
2782 : 171 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2783 : 171 : if (!_r2) goto next_after_fail741;
2784 : : }
2785 : : else
2786 : : _r2 = _o2[0];
2787 : 3094 : _o1[1] = _r2;
2788 : : }
2789 : 3094 : gimple_match_op tem_op (res_op->cond.any_else (), rop, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2790 : 3094 : tem_op.resimplify (lseq, valueize);
2791 : 3094 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2792 : 3094 : if (!_r1) goto next_after_fail741;
2793 : 1083 : res_op->ops[0] = _r1;
2794 : : }
2795 : 1083 : res_op->resimplify (lseq, valueize);
2796 : 1083 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 258, __FILE__, __LINE__, true);
2797 : 1083 : return true;
2798 : : }
2799 : : next_after_fail741:;
2800 : : }
2801 : : return false;
2802 : : }
2803 : :
2804 : : bool
2805 : 0 : gimple_simplify_142 (gimple_match_op *res_op, gimple_seq *seq,
2806 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2807 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2808 : : const enum tree_code ARG_UNUSED (op))
2809 : : {
2810 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2811 : 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
2812 : 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
2813 : : )
2814 : : {
2815 : 0 : if (single_use (captures[4]) && single_use (captures[5])
2816 : : )
2817 : : {
2818 : 0 : gimple_seq *lseq = seq;
2819 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail750;
2820 : 0 : {
2821 : 0 : res_op->set_op (op, type, 2);
2822 : 0 : res_op->ops[0] = captures[0];
2823 : 0 : {
2824 : 0 : tree _o1[1], _r1;
2825 : 0 : _o1[0] = captures[6];
2826 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
2827 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2828 : : {
2829 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
2830 : 0 : tem_op.resimplify (lseq, valueize);
2831 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2832 : 0 : if (!_r1) goto next_after_fail750;
2833 : : }
2834 : : else
2835 : : _r1 = _o1[0];
2836 : 0 : res_op->ops[1] = _r1;
2837 : : }
2838 : 0 : res_op->resimplify (lseq, valueize);
2839 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 260, __FILE__, __LINE__, true);
2840 : 0 : return true;
2841 : : }
2842 : : next_after_fail750:;
2843 : : }
2844 : : else
2845 : : {
2846 : 0 : if (single_use (captures[0]) && single_use (captures[1])
2847 : : )
2848 : : {
2849 : 0 : gimple_seq *lseq = seq;
2850 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail751;
2851 : 0 : {
2852 : 0 : res_op->set_op (op, type, 2);
2853 : 0 : {
2854 : 0 : tree _o1[1], _r1;
2855 : 0 : _o1[0] = captures[3];
2856 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
2857 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2858 : : {
2859 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
2860 : 0 : tem_op.resimplify (lseq, valueize);
2861 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2862 : 0 : if (!_r1) goto next_after_fail751;
2863 : : }
2864 : : else
2865 : : _r1 = _o1[0];
2866 : 0 : res_op->ops[0] = _r1;
2867 : : }
2868 : 0 : res_op->ops[1] = captures[4];
2869 : 0 : res_op->resimplify (lseq, valueize);
2870 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 261, __FILE__, __LINE__, true);
2871 : 0 : return true;
2872 : : }
2873 : : next_after_fail751:;
2874 : : }
2875 : : }
2876 : : }
2877 : : return false;
2878 : : }
2879 : :
2880 : : bool
2881 : 223708 : gimple_simplify_148 (gimple_match_op *res_op, gimple_seq *seq,
2882 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2883 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2884 : : const enum tree_code ARG_UNUSED (op))
2885 : : {
2886 : 223708 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2887 : 223708 : if (bitwise_equal_p (captures[4], captures[7])
2888 : : )
2889 : : {
2890 : 128 : gimple_seq *lseq = seq;
2891 : 128 : if (lseq
2892 : 77 : && (!single_use (captures[0])
2893 : 77 : || !single_use (captures[1])
2894 : 77 : || !single_use (captures[2])
2895 : 49 : || !single_use (captures[3])))
2896 : 79 : lseq = NULL;
2897 : 128 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail757;
2898 : 128 : {
2899 : 128 : res_op->set_op (NOP_EXPR, type, 1);
2900 : 128 : {
2901 : 128 : tree _o1[2], _r1;
2902 : 128 : {
2903 : 128 : tree _o2[2], _r2;
2904 : 128 : _o2[0] = captures[5];
2905 : 128 : {
2906 : 128 : tree _o3[1], _r3;
2907 : 128 : _o3[0] = captures[6];
2908 : 128 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o3[0]) /* XXX */
2909 : 128 : && !useless_type_conversion_p (TREE_TYPE (_o2[0]), TREE_TYPE (_o3[0])))
2910 : : {
2911 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
2912 : 0 : tem_op.resimplify (lseq, valueize);
2913 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2914 : 0 : if (!_r3) goto next_after_fail757;
2915 : : }
2916 : : else
2917 : : _r3 = _o3[0];
2918 : 128 : _o2[1] = _r3;
2919 : : }
2920 : 128 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2921 : 128 : tem_op.resimplify (lseq, valueize);
2922 : 128 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2923 : 128 : if (!_r2) goto next_after_fail757;
2924 : 49 : _o1[0] = _r2;
2925 : : }
2926 : 49 : {
2927 : 49 : tree _o2[1], _r2;
2928 : 49 : _o2[0] = captures[4];
2929 : 49 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0]) /* XXX */
2930 : 49 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
2931 : : {
2932 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
2933 : 0 : tem_op.resimplify (lseq, valueize);
2934 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2935 : 0 : if (!_r2) goto next_after_fail757;
2936 : : }
2937 : : else
2938 : : _r2 = _o2[0];
2939 : 49 : _o1[1] = _r2;
2940 : : }
2941 : 49 : (*res_op).set_op (BIT_IOR_EXPR, TREE_TYPE (_o1[0]), 2);
2942 : 49 : (*res_op).ops[0] = _o1[0];
2943 : 49 : (*res_op).ops[1] = _o1[1];
2944 : 49 : (*res_op).resimplify (lseq, valueize);
2945 : : }
2946 : 49 : if (type != res_op->type
2947 : 49 : && !useless_type_conversion_p (type, res_op->type))
2948 : : {
2949 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail757;
2950 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2951 : 0 : res_op->resimplify (lseq, valueize);
2952 : : }
2953 : 49 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 266, __FILE__, __LINE__, true);
2954 : 49 : return true;
2955 : : }
2956 : : next_after_fail757:;
2957 : : }
2958 : : return false;
2959 : : }
2960 : :
2961 : : bool
2962 : 7 : gimple_simplify_155 (gimple_match_op *res_op, gimple_seq *seq,
2963 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2964 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2965 : : const enum tree_code ARG_UNUSED (cmp),
2966 : : const enum tree_code ARG_UNUSED (icmp))
2967 : : {
2968 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2969 : 7 : if (integer_zerop (captures[5])
2970 : 7 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
2971 : : )
2972 : : {
2973 : 0 : if (integer_onep (captures[4])
2974 : : )
2975 : : {
2976 : 0 : gimple_seq *lseq = seq;
2977 : 0 : if (lseq
2978 : 0 : && (!single_use (captures[0])
2979 : 0 : || !single_use (captures[7])))
2980 : 0 : lseq = NULL;
2981 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail765;
2982 : 0 : {
2983 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
2984 : 0 : {
2985 : 0 : tree _o1[3], _r1;
2986 : 0 : _o1[0] = captures[1];
2987 : 0 : _o1[1] = captures[6];
2988 : 0 : _o1[2] = captures[9];
2989 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
2990 : 0 : tem_op.resimplify (lseq, valueize);
2991 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2992 : 0 : if (!_r1) goto next_after_fail765;
2993 : 0 : res_op->ops[0] = _r1;
2994 : : }
2995 : 0 : res_op->ops[1] = captures[4];
2996 : 0 : res_op->resimplify (lseq, valueize);
2997 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 270, __FILE__, __LINE__, true);
2998 : 0 : return true;
2999 : : }
3000 : : next_after_fail765:;
3001 : : }
3002 : : else
3003 : : {
3004 : 0 : if (integer_minus_onep (captures[4])
3005 : : )
3006 : : {
3007 : 0 : gimple_seq *lseq = seq;
3008 : 0 : if (lseq
3009 : 0 : && (!single_use (captures[0])
3010 : 0 : || !single_use (captures[7])))
3011 : 0 : lseq = NULL;
3012 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail766;
3013 : 0 : {
3014 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
3015 : 0 : res_op->ops[0] = captures[1];
3016 : 0 : res_op->ops[1] = captures[6];
3017 : 0 : res_op->ops[2] = captures[9];
3018 : 0 : res_op->resimplify (lseq, valueize);
3019 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 271, __FILE__, __LINE__, true);
3020 : 0 : return true;
3021 : : }
3022 : 0 : next_after_fail766:;
3023 : : }
3024 : : }
3025 : : }
3026 : : else
3027 : : {
3028 : 7 : if (integer_zerop (captures[4])
3029 : 7 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
3030 : : )
3031 : : {
3032 : 0 : if (integer_onep (captures[5])
3033 : : )
3034 : : {
3035 : 0 : gimple_seq *lseq = seq;
3036 : 0 : if (lseq
3037 : 0 : && (!single_use (captures[0])
3038 : 0 : || !single_use (captures[7])))
3039 : 0 : lseq = NULL;
3040 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail767;
3041 : 0 : {
3042 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
3043 : 0 : {
3044 : 0 : tree _o1[3], _r1;
3045 : 0 : _o1[0] = captures[1];
3046 : 0 : _o1[1] = captures[9];
3047 : 0 : _o1[2] = captures[6];
3048 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
3049 : 0 : tem_op.resimplify (lseq, valueize);
3050 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3051 : 0 : if (!_r1) goto next_after_fail767;
3052 : 0 : res_op->ops[0] = _r1;
3053 : : }
3054 : 0 : res_op->ops[1] = captures[5];
3055 : 0 : res_op->resimplify (lseq, valueize);
3056 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 272, __FILE__, __LINE__, true);
3057 : 0 : return true;
3058 : : }
3059 : : next_after_fail767:;
3060 : : }
3061 : : else
3062 : : {
3063 : 0 : if (integer_minus_onep (captures[5])
3064 : : )
3065 : : {
3066 : 0 : gimple_seq *lseq = seq;
3067 : 0 : if (lseq
3068 : 0 : && (!single_use (captures[0])
3069 : 0 : || !single_use (captures[7])))
3070 : 0 : lseq = NULL;
3071 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail768;
3072 : 0 : {
3073 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
3074 : 0 : res_op->ops[0] = captures[1];
3075 : 0 : res_op->ops[1] = captures[9];
3076 : 0 : res_op->ops[2] = captures[6];
3077 : 0 : res_op->resimplify (lseq, valueize);
3078 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 273, __FILE__, __LINE__, true);
3079 : 0 : return true;
3080 : : }
3081 : 0 : next_after_fail768:;
3082 : : }
3083 : : }
3084 : : }
3085 : : }
3086 : : return false;
3087 : : }
3088 : :
3089 : : bool
3090 : 4 : gimple_simplify_163 (gimple_match_op *res_op, gimple_seq *seq,
3091 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3092 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3093 : : const enum tree_code ARG_UNUSED (cmp))
3094 : : {
3095 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3096 : 4 : gimple_seq *lseq = seq;
3097 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail794;
3098 : 4 : {
3099 : 4 : res_op->set_op (BIT_IOR_EXPR, type, 2);
3100 : 4 : {
3101 : 4 : tree _o1[2], _r1;
3102 : 4 : _o1[0] = build_zero_cst (TREE_TYPE (captures[0]));
3103 : 4 : _o1[1] = captures[3];
3104 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), cmp, type, _o1[0], _o1[1]);
3105 : 4 : tem_op.resimplify (lseq, valueize);
3106 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3107 : 4 : if (!_r1) goto next_after_fail794;
3108 : 4 : res_op->ops[0] = _r1;
3109 : : }
3110 : 4 : res_op->ops[1] = captures[4];
3111 : 4 : res_op->resimplify (lseq, valueize);
3112 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 292, __FILE__, __LINE__, true);
3113 : : return true;
3114 : : }
3115 : : next_after_fail794:;
3116 : : return false;
3117 : : }
3118 : :
3119 : : bool
3120 : 4 : gimple_simplify_164 (gimple_match_op *res_op, gimple_seq *seq,
3121 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3122 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3123 : : const enum tree_code ARG_UNUSED (cmp))
3124 : : {
3125 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3126 : 4 : gimple_seq *lseq = seq;
3127 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail795;
3128 : 4 : {
3129 : 4 : res_op->set_op (BIT_IOR_EXPR, type, 2);
3130 : 4 : {
3131 : 4 : tree _o1[2], _r1;
3132 : 4 : _o1[0] = build_zero_cst (TREE_TYPE (captures[0]));
3133 : 4 : _o1[1] = captures[2];
3134 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), cmp, type, _o1[0], _o1[1]);
3135 : 4 : tem_op.resimplify (lseq, valueize);
3136 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3137 : 4 : if (!_r1) goto next_after_fail795;
3138 : 4 : res_op->ops[0] = _r1;
3139 : : }
3140 : 4 : res_op->ops[1] = captures[3];
3141 : 4 : res_op->resimplify (lseq, valueize);
3142 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 293, __FILE__, __LINE__, true);
3143 : : return true;
3144 : : }
3145 : : next_after_fail795:;
3146 : : return false;
3147 : : }
3148 : :
3149 : : bool
3150 : 0 : gimple_simplify_165 (gimple_match_op *res_op, gimple_seq *seq,
3151 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3152 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3153 : : {
3154 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3155 : 0 : gimple_seq *lseq = seq;
3156 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail796;
3157 : 0 : {
3158 : 0 : tree tem;
3159 : 0 : tem = captures[2];
3160 : 0 : res_op->set_value (tem);
3161 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 275, __FILE__, __LINE__, true);
3162 : : return true;
3163 : : }
3164 : 0 : next_after_fail796:;
3165 : 0 : return false;
3166 : : }
3167 : :
3168 : : bool
3169 : 0 : gimple_simplify_166 (gimple_match_op *res_op, gimple_seq *seq,
3170 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3171 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3172 : : {
3173 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3174 : 0 : gimple_seq *lseq = seq;
3175 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail797;
3176 : 0 : {
3177 : 0 : tree tem;
3178 : 0 : tem = constant_boolean_node (true, type);
3179 : 0 : res_op->set_value (tem);
3180 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 294, __FILE__, __LINE__, true);
3181 : : return true;
3182 : : }
3183 : 0 : next_after_fail797:;
3184 : 0 : return false;
3185 : : }
3186 : :
3187 : : bool
3188 : 7 : gimple_simplify_167 (gimple_match_op *res_op, gimple_seq *seq,
3189 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3190 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3191 : : {
3192 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3193 : 7 : gimple_seq *lseq = seq;
3194 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail798;
3195 : 7 : {
3196 : 7 : tree tem;
3197 : 7 : tem = captures[2];
3198 : 7 : res_op->set_value (tem);
3199 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 276, __FILE__, __LINE__, true);
3200 : : return true;
3201 : : }
3202 : 0 : next_after_fail798:;
3203 : 0 : return false;
3204 : : }
3205 : :
3206 : : bool
3207 : 229 : gimple_simplify_169 (gimple_match_op *res_op, gimple_seq *seq,
3208 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3209 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3210 : : const enum tree_code ARG_UNUSED (code2),
3211 : : const enum tree_code ARG_UNUSED (code1))
3212 : : {
3213 : 229 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3214 : 229 : if ((TREE_CODE (captures[2]) == INTEGER_CST
3215 : 199 : && TREE_CODE (captures[5]) == INTEGER_CST)
3216 : 369 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
3217 : 14 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3218 : 14 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
3219 : 170 : && bitwise_equal_p (captures[2], captures[5]))
3220 : : )
3221 : : {
3222 : 59 : {
3223 : 59 : bool one_before = false;
3224 : 59 : bool one_after = false;
3225 : 59 : int cmp = 0;
3226 : 59 : bool allbits = true;
3227 : 59 : if (TREE_CODE (captures[2]) == INTEGER_CST
3228 : 59 : && TREE_CODE (captures[5]) == INTEGER_CST)
3229 : : {
3230 : 59 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
3231 : 59 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
3232 : 59 : auto t2 = wi::to_wide (captures[5]);
3233 : 59 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
3234 : 59 : if (cmp < 0
3235 : 59 : && t1 == t2 - 1)
3236 : : one_before = true;
3237 : 59 : if (cmp > 0
3238 : 59 : && t1 == t2 + 1)
3239 : : one_after = true;
3240 : : }
3241 : 59 : bool val;
3242 : 59 : switch (code2)
3243 : : {
3244 : 0 : case EQ_EXPR: val = (cmp == 0); break;
3245 : 0 : case NE_EXPR: val = (cmp != 0); break;
3246 : 0 : case LT_EXPR: val = (cmp < 0); break;
3247 : 56 : case GT_EXPR: val = (cmp > 0); break;
3248 : 3 : case LE_EXPR: val = (cmp <= 0); break;
3249 : 0 : case GE_EXPR: val = (cmp >= 0); break;
3250 : 0 : default: gcc_unreachable ();
3251 : : }
3252 : 59 : if (code1 == EQ_EXPR && val
3253 : : )
3254 : : {
3255 : 5 : gimple_seq *lseq = seq;
3256 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail801;
3257 : 5 : {
3258 : 5 : tree tem;
3259 : 5 : tem = captures[3];
3260 : 5 : res_op->set_value (tem);
3261 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 278, __FILE__, __LINE__, true);
3262 : 5 : return true;
3263 : : }
3264 : 0 : next_after_fail801:;
3265 : : }
3266 : : else
3267 : : {
3268 : 54 : if (code1 == NE_EXPR && val && allbits
3269 : : )
3270 : : {
3271 : 0 : gimple_seq *lseq = seq;
3272 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail802;
3273 : 0 : {
3274 : 0 : tree tem;
3275 : 0 : tem = constant_boolean_node (true, type);
3276 : 0 : res_op->set_value (tem);
3277 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 279, __FILE__, __LINE__, true);
3278 : 0 : return true;
3279 : : }
3280 : 0 : next_after_fail802:;
3281 : 0 : }
3282 : : else
3283 : : {
3284 : 54 : if (code1 == NE_EXPR && !val && allbits
3285 : : )
3286 : : {
3287 : 0 : gimple_seq *lseq = seq;
3288 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail803;
3289 : 0 : {
3290 : 0 : tree tem;
3291 : 0 : tem = captures[0];
3292 : 0 : res_op->set_value (tem);
3293 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 280, __FILE__, __LINE__, true);
3294 : 0 : return true;
3295 : : }
3296 : 0 : next_after_fail803:;
3297 : 0 : }
3298 : : else
3299 : : {
3300 : 54 : if (code1 == EQ_EXPR
3301 : 54 : && code2 == GT_EXPR
3302 : 54 : && cmp == 0
3303 : 54 : && allbits
3304 : 54 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3305 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
3306 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3307 : : )
3308 : : {
3309 : 0 : gimple_seq *lseq = seq;
3310 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail804;
3311 : 0 : {
3312 : 0 : res_op->set_op (GE_EXPR, type, 2);
3313 : 0 : res_op->ops[0] = captures[4];
3314 : 0 : res_op->ops[1] = captures[5];
3315 : 0 : res_op->resimplify (lseq, valueize);
3316 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 281, __FILE__, __LINE__, true);
3317 : 0 : return true;
3318 : : }
3319 : 0 : next_after_fail804:;
3320 : : }
3321 : : else
3322 : : {
3323 : 54 : if (code1 == EQ_EXPR
3324 : 54 : && code2 == LT_EXPR
3325 : 0 : && cmp == 0
3326 : 0 : && allbits
3327 : 54 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3328 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
3329 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3330 : : )
3331 : : {
3332 : 0 : gimple_seq *lseq = seq;
3333 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail805;
3334 : 0 : {
3335 : 0 : res_op->set_op (LE_EXPR, type, 2);
3336 : 0 : res_op->ops[0] = captures[4];
3337 : 0 : res_op->ops[1] = captures[5];
3338 : 0 : res_op->resimplify (lseq, valueize);
3339 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 282, __FILE__, __LINE__, true);
3340 : 0 : return true;
3341 : : }
3342 : 0 : next_after_fail805:;
3343 : : }
3344 : : else
3345 : : {
3346 : 54 : if (code1 == EQ_EXPR
3347 : 54 : && code2 == GE_EXPR
3348 : : && one_before
3349 : 0 : && allbits
3350 : 54 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3351 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
3352 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3353 : : )
3354 : : {
3355 : 0 : gimple_seq *lseq = seq;
3356 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail806;
3357 : 0 : {
3358 : 0 : res_op->set_op (GE_EXPR, type, 2);
3359 : 0 : res_op->ops[0] = captures[4];
3360 : 0 : {
3361 : 0 : tree _o1[1], _r1;
3362 : 0 : _o1[0] = captures[2];
3363 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0]) /* XXX */
3364 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
3365 : : {
3366 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
3367 : 0 : tem_op.resimplify (lseq, valueize);
3368 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3369 : 0 : if (!_r1) goto next_after_fail806;
3370 : : }
3371 : : else
3372 : : _r1 = _o1[0];
3373 : 0 : res_op->ops[1] = _r1;
3374 : : }
3375 : 0 : res_op->resimplify (lseq, valueize);
3376 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 283, __FILE__, __LINE__, true);
3377 : 0 : return true;
3378 : : }
3379 : : next_after_fail806:;
3380 : : }
3381 : : else
3382 : : {
3383 : 54 : if (code1 == EQ_EXPR
3384 : 54 : && code2 == LE_EXPR
3385 : : && one_after
3386 : 0 : && allbits
3387 : 54 : && ((VECTOR_BOOLEAN_TYPE_P (type)
3388 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
3389 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
3390 : : )
3391 : : {
3392 : 0 : gimple_seq *lseq = seq;
3393 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail807;
3394 : 0 : {
3395 : 0 : res_op->set_op (LE_EXPR, type, 2);
3396 : 0 : res_op->ops[0] = captures[4];
3397 : 0 : {
3398 : 0 : tree _o1[1], _r1;
3399 : 0 : _o1[0] = captures[2];
3400 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0]) /* XXX */
3401 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
3402 : : {
3403 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
3404 : 0 : tem_op.resimplify (lseq, valueize);
3405 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3406 : 0 : if (!_r1) goto next_after_fail807;
3407 : : }
3408 : : else
3409 : : _r1 = _o1[0];
3410 : 0 : res_op->ops[1] = _r1;
3411 : : }
3412 : 0 : res_op->resimplify (lseq, valueize);
3413 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 284, __FILE__, __LINE__, true);
3414 : 0 : return true;
3415 : : }
3416 : : next_after_fail807:;
3417 : : }
3418 : : }
3419 : : }
3420 : : }
3421 : : }
3422 : : }
3423 : : }
3424 : : }
3425 : : }
3426 : : return false;
3427 : : }
3428 : :
3429 : : bool
3430 : 0 : gimple_simplify_184 (gimple_match_op *res_op, gimple_seq *seq,
3431 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3432 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3433 : : {
3434 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3435 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
3436 : : )
3437 : : {
3438 : 0 : gimple_seq *lseq = seq;
3439 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail830;
3440 : 0 : {
3441 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
3442 : 0 : {
3443 : 0 : tree _o1[1], _r1;
3444 : 0 : _o1[0] = captures[0];
3445 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3446 : 0 : tem_op.resimplify (lseq, valueize);
3447 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3448 : 0 : if (!_r1) goto next_after_fail830;
3449 : 0 : res_op->ops[0] = _r1;
3450 : : }
3451 : 0 : res_op->resimplify (lseq, valueize);
3452 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 304, __FILE__, __LINE__, true);
3453 : 0 : return true;
3454 : : }
3455 : : next_after_fail830:;
3456 : : }
3457 : : return false;
3458 : : }
3459 : :
3460 : : bool
3461 : 0 : gimple_simplify_188 (gimple_match_op *res_op, gimple_seq *seq,
3462 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3463 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3464 : : {
3465 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3466 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
3467 : : )
3468 : : {
3469 : 0 : gimple_seq *lseq = seq;
3470 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail834;
3471 : 0 : {
3472 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
3473 : 0 : {
3474 : 0 : tree _o1[1], _r1;
3475 : 0 : _o1[0] = captures[0];
3476 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3477 : 0 : tem_op.resimplify (lseq, valueize);
3478 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3479 : 0 : if (!_r1) goto next_after_fail834;
3480 : 0 : res_op->ops[0] = _r1;
3481 : : }
3482 : 0 : res_op->resimplify (lseq, valueize);
3483 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 305, __FILE__, __LINE__, true);
3484 : 0 : return true;
3485 : : }
3486 : : next_after_fail834:;
3487 : : }
3488 : : return false;
3489 : : }
3490 : :
3491 : : bool
3492 : 0 : gimple_simplify_191 (gimple_match_op *res_op, gimple_seq *seq,
3493 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3494 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3495 : : {
3496 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3497 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
3498 : : )
3499 : : {
3500 : 0 : gimple_seq *lseq = seq;
3501 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail837;
3502 : 0 : {
3503 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
3504 : 0 : {
3505 : 0 : tree _o1[1], _r1;
3506 : 0 : _o1[0] = captures[0];
3507 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3508 : 0 : tem_op.resimplify (lseq, valueize);
3509 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3510 : 0 : if (!_r1) goto next_after_fail837;
3511 : 0 : res_op->ops[0] = _r1;
3512 : : }
3513 : 0 : res_op->resimplify (lseq, valueize);
3514 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 304, __FILE__, __LINE__, true);
3515 : 0 : return true;
3516 : : }
3517 : : next_after_fail837:;
3518 : : }
3519 : : return false;
3520 : : }
3521 : :
3522 : : bool
3523 : 0 : gimple_simplify_195 (gimple_match_op *res_op, gimple_seq *seq,
3524 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3525 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3526 : : {
3527 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3528 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
3529 : : )
3530 : : {
3531 : 0 : gimple_seq *lseq = seq;
3532 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail841;
3533 : 0 : {
3534 : 0 : res_op->set_op (NOP_EXPR, type, 1);
3535 : 0 : {
3536 : 0 : tree _o1[1], _r1;
3537 : 0 : _o1[0] = captures[0];
3538 : 0 : (*res_op).set_op (ABS_EXPR, TREE_TYPE (_o1[0]), 1);
3539 : 0 : (*res_op).ops[0] = _o1[0];
3540 : 0 : (*res_op).resimplify (lseq, valueize);
3541 : : }
3542 : 0 : if (type != res_op->type
3543 : 0 : && !useless_type_conversion_p (type, res_op->type))
3544 : : {
3545 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail841;
3546 : 0 : res_op->set_op (NOP_EXPR, type, 1);
3547 : 0 : res_op->resimplify (lseq, valueize);
3548 : : }
3549 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 305, __FILE__, __LINE__, true);
3550 : 0 : return true;
3551 : : }
3552 : : next_after_fail841:;
3553 : : }
3554 : : return false;
3555 : : }
3556 : :
3557 : : bool
3558 : 0 : gimple_simplify_199 (gimple_match_op *res_op, gimple_seq *seq,
3559 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3560 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3561 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
3562 : : {
3563 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3564 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
3565 : : )
3566 : : {
3567 : 0 : gimple_seq *lseq = seq;
3568 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail845;
3569 : 0 : {
3570 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
3571 : 0 : {
3572 : 0 : tree _o1[1], _r1;
3573 : 0 : _o1[0] = captures[0];
3574 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3575 : 0 : tem_op.resimplify (lseq, valueize);
3576 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3577 : 0 : if (!_r1) goto next_after_fail845;
3578 : 0 : res_op->ops[0] = _r1;
3579 : : }
3580 : 0 : res_op->resimplify (lseq, valueize);
3581 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 307, __FILE__, __LINE__, true);
3582 : 0 : return true;
3583 : : }
3584 : : next_after_fail845:;
3585 : : }
3586 : : return false;
3587 : : }
3588 : :
3589 : : bool
3590 : 2 : gimple_simplify_204 (gimple_match_op *res_op, gimple_seq *seq,
3591 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3592 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3593 : : {
3594 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3595 : 2 : if (INTEGRAL_TYPE_P (type)
3596 : 2 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3597 : 4 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3598 : : )
3599 : : {
3600 : 2 : if (TYPE_UNSIGNED (type)
3601 : : )
3602 : : {
3603 : 2 : gimple_seq *lseq = seq;
3604 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail850;
3605 : 2 : {
3606 : 2 : res_op->set_op (ABSU_EXPR, type, 1);
3607 : 2 : res_op->ops[0] = captures[0];
3608 : 2 : res_op->resimplify (lseq, valueize);
3609 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 310, __FILE__, __LINE__, true);
3610 : 2 : return true;
3611 : : }
3612 : 0 : next_after_fail850:;
3613 : : }
3614 : : else
3615 : : {
3616 : 0 : gimple_seq *lseq = seq;
3617 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail851;
3618 : 0 : {
3619 : 0 : res_op->set_op (ABS_EXPR, type, 1);
3620 : 0 : res_op->ops[0] = captures[0];
3621 : 0 : res_op->resimplify (lseq, valueize);
3622 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 311, __FILE__, __LINE__, true);
3623 : 0 : return true;
3624 : : }
3625 : 0 : next_after_fail851:;
3626 : : }
3627 : : }
3628 : : return false;
3629 : : }
3630 : :
3631 : : bool
3632 : 962 : gimple_simplify_208 (gimple_match_op *res_op, gimple_seq *seq,
3633 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3634 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3635 : : const enum tree_code ARG_UNUSED (cmp))
3636 : : {
3637 : 962 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3638 : 962 : if (!canonicalize_math_p ()
3639 : : )
3640 : : {
3641 : 303 : if (INTEGRAL_TYPE_P (type)
3642 : 303 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3643 : : )
3644 : : {
3645 : 303 : gimple_seq *lseq = seq;
3646 : 303 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail856;
3647 : 303 : {
3648 : 303 : res_op->set_op (COND_EXPR, type, 3);
3649 : 303 : res_op->ops[0] = captures[0];
3650 : 303 : res_op->ops[1] = captures[3];
3651 : 303 : res_op->ops[2] = build_zero_cst (type);
3652 : 303 : res_op->resimplify (lseq, valueize);
3653 : 303 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 313, __FILE__, __LINE__, true);
3654 : 303 : return true;
3655 : : }
3656 : 0 : next_after_fail856:;
3657 : : }
3658 : : }
3659 : : return false;
3660 : : }
3661 : :
3662 : : bool
3663 : 7511 : gimple_simplify_212 (gimple_match_op *res_op, gimple_seq *seq,
3664 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3665 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3666 : : {
3667 : 7511 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3668 : 7511 : {
3669 : 7511 : poly_widest_int factor;
3670 : 7511 : if (multiple_p (wi::to_poly_widest (captures[2]), wi::to_widest (captures[1]), &factor)
3671 : : )
3672 : : {
3673 : 1186 : gimple_seq *lseq = seq;
3674 : 1186 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail860;
3675 : 1186 : {
3676 : 1186 : res_op->set_op (MULT_EXPR, type, 2);
3677 : 1186 : {
3678 : 1186 : tree _o1[1], _r1;
3679 : 1186 : _o1[0] = captures[0];
3680 : 1186 : if (type != TREE_TYPE (_o1[0]) /* XXX */
3681 : 1186 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
3682 : : {
3683 : 1164 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
3684 : 1164 : tem_op.resimplify (lseq, valueize);
3685 : 1164 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3686 : 1164 : if (!_r1) goto next_after_fail860;
3687 : : }
3688 : : else
3689 : : _r1 = _o1[0];
3690 : 969 : res_op->ops[0] = _r1;
3691 : : }
3692 : 969 : res_op->ops[1] = wide_int_to_tree (type, factor);
3693 : 969 : res_op->resimplify (lseq, valueize);
3694 : 969 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 317, __FILE__, __LINE__, true);
3695 : 969 : return true;
3696 : : }
3697 : 6542 : next_after_fail860:;
3698 : : }
3699 : 7511 : }
3700 : 6542 : return false;
3701 : : }
3702 : :
3703 : : bool
3704 : 0 : gimple_simplify_216 (gimple_match_op *res_op, gimple_seq *seq,
3705 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3706 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3707 : : const combined_fn ARG_UNUSED (POW))
3708 : : {
3709 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3710 : 0 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
3711 : : )
3712 : : {
3713 : 0 : if (!TREE_OVERFLOW (captures[2])
3714 : : )
3715 : : {
3716 : 0 : gimple_seq *lseq = seq;
3717 : 0 : if (lseq
3718 : 0 : && (!single_use (captures[1])))
3719 : 0 : lseq = NULL;
3720 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail865;
3721 : 0 : {
3722 : 0 : res_op->set_op (POW, type, 2);
3723 : 0 : res_op->ops[0] = captures[0];
3724 : 0 : {
3725 : 0 : tree _o1[2], _r1;
3726 : 0 : _o1[0] = captures[2];
3727 : 0 : _o1[1] = build_one_cst (type);
3728 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3729 : 0 : tem_op.resimplify (lseq, valueize);
3730 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3731 : 0 : if (!_r1) goto next_after_fail865;
3732 : 0 : res_op->ops[1] = _r1;
3733 : : }
3734 : 0 : res_op->resimplify (lseq, valueize);
3735 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 322, __FILE__, __LINE__, true);
3736 : 0 : return true;
3737 : : }
3738 : : next_after_fail865:;
3739 : : }
3740 : : }
3741 : : return false;
3742 : : }
3743 : :
3744 : : bool
3745 : 0 : gimple_simplify_219 (gimple_match_op *res_op, gimple_seq *seq,
3746 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3747 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3748 : : const combined_fn ARG_UNUSED (TAN),
3749 : : const combined_fn ARG_UNUSED (COS),
3750 : : const combined_fn ARG_UNUSED (SIN))
3751 : : {
3752 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3753 : 0 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
3754 : : )
3755 : : {
3756 : 0 : gimple_seq *lseq = seq;
3757 : 0 : if (lseq
3758 : 0 : && (!single_use (captures[0])
3759 : 0 : || !single_use (captures[2])))
3760 : 0 : lseq = NULL;
3761 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail868;
3762 : 0 : {
3763 : 0 : res_op->set_op (SIN, type, 1);
3764 : 0 : res_op->ops[0] = captures[1];
3765 : 0 : res_op->resimplify (lseq, valueize);
3766 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 325, __FILE__, __LINE__, true);
3767 : 0 : return true;
3768 : : }
3769 : 0 : next_after_fail868:;
3770 : : }
3771 : : return false;
3772 : : }
3773 : :
3774 : : bool
3775 : 628 : gimple_simplify_222 (gimple_match_op *res_op, gimple_seq *seq,
3776 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3777 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3778 : : const enum tree_code ARG_UNUSED (cmp))
3779 : : {
3780 : 628 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3781 : 1256 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3782 : 1248 : && !TYPE_OVERFLOW_WRAPS (TREE_TYPE(captures[0]))
3783 : : )
3784 : : {
3785 : 68 : gimple_seq *lseq = seq;
3786 : 68 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail871;
3787 : 68 : {
3788 : 68 : res_op->set_op (cmp, type, 2);
3789 : 68 : res_op->ops[0] = captures[0];
3790 : 68 : res_op->ops[1] = build_zero_cst (TREE_TYPE(captures[0]));
3791 : 68 : res_op->resimplify (lseq, valueize);
3792 : 68 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 328, __FILE__, __LINE__, true);
3793 : 68 : return true;
3794 : : }
3795 : 0 : next_after_fail871:;
3796 : : }
3797 : : return false;
3798 : : }
3799 : :
3800 : : bool
3801 : 1820 : gimple_simplify_225 (gimple_match_op *res_op, gimple_seq *seq,
3802 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3803 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3804 : : {
3805 : 1820 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3806 : 3640 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3807 : 3640 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == 1
3808 : : )
3809 : : {
3810 : 1820 : gimple_seq *lseq = seq;
3811 : 1820 : if (lseq
3812 : 639 : && (!single_use (captures[0])))
3813 : 1202 : lseq = NULL;
3814 : 1820 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail874;
3815 : 1820 : {
3816 : 1820 : res_op->set_op (NOP_EXPR, type, 1);
3817 : 1820 : {
3818 : 1820 : tree _o1[2], _r1;
3819 : 1820 : _o1[0] = captures[1];
3820 : 1820 : _o1[1] = captures[2];
3821 : 1820 : (*res_op).set_op (BIT_XOR_EXPR, TREE_TYPE (_o1[0]), 2);
3822 : 1820 : (*res_op).ops[0] = _o1[0];
3823 : 1820 : (*res_op).ops[1] = _o1[1];
3824 : 1820 : (*res_op).resimplify (lseq, valueize);
3825 : : }
3826 : 1820 : if (type != res_op->type
3827 : 1820 : && !useless_type_conversion_p (type, res_op->type))
3828 : : {
3829 : 12 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail874;
3830 : 12 : res_op->set_op (NOP_EXPR, type, 1);
3831 : 12 : res_op->resimplify (lseq, valueize);
3832 : : }
3833 : 1820 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 331, __FILE__, __LINE__, true);
3834 : 1820 : return true;
3835 : : }
3836 : : next_after_fail874:;
3837 : : }
3838 : : return false;
3839 : : }
3840 : :
3841 : : bool
3842 : 4251 : gimple_simplify_228 (gimple_match_op *res_op, gimple_seq *seq,
3843 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3844 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3845 : : const enum tree_code ARG_UNUSED (cmp))
3846 : : {
3847 : 4251 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3848 : 4251 : if (element_precision (captures[0]) >= element_precision (captures[1])
3849 : 4251 : && types_match (captures[1], captures[3])
3850 : : )
3851 : : {
3852 : 4251 : if (wi::lt_p (wi::to_wide (captures[2]), 0, TYPE_SIGN (TREE_TYPE (captures[2])))
3853 : : )
3854 : : {
3855 : 2 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3856 : : )
3857 : : {
3858 : 2 : gimple_seq *lseq = seq;
3859 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail877;
3860 : 2 : {
3861 : 2 : res_op->set_op (cmp, type, 2);
3862 : 2 : res_op->ops[0] = captures[3];
3863 : 2 : res_op->ops[1] = captures[1];
3864 : 2 : res_op->resimplify (lseq, valueize);
3865 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 334, __FILE__, __LINE__, true);
3866 : 2 : return true;
3867 : : }
3868 : 0 : next_after_fail877:;
3869 : : }
3870 : : else
3871 : : {
3872 : 0 : if (tree_expr_nonzero_p (captures[1]) && tree_expr_nonzero_p (captures[3])
3873 : : )
3874 : : {
3875 : 0 : {
3876 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[1]));
3877 : 0 : gimple_seq *lseq = seq;
3878 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail878;
3879 : 0 : {
3880 : 0 : res_op->set_op (cmp, type, 2);
3881 : 0 : {
3882 : 0 : tree _o1[1], _r1;
3883 : 0 : _o1[0] = captures[3];
3884 : 0 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
3885 : 0 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
3886 : : {
3887 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
3888 : 0 : tem_op.resimplify (lseq, valueize);
3889 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3890 : 0 : if (!_r1) goto next_after_fail878;
3891 : : }
3892 : : else
3893 : : _r1 = _o1[0];
3894 : 0 : res_op->ops[0] = _r1;
3895 : : }
3896 : 0 : {
3897 : 0 : tree _o1[1], _r1;
3898 : 0 : _o1[0] = captures[1];
3899 : 0 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
3900 : 0 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
3901 : : {
3902 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
3903 : 0 : tem_op.resimplify (lseq, valueize);
3904 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3905 : 0 : if (!_r1) goto next_after_fail878;
3906 : : }
3907 : : else
3908 : : _r1 = _o1[0];
3909 : 0 : res_op->ops[1] = _r1;
3910 : : }
3911 : 0 : res_op->resimplify (lseq, valueize);
3912 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 335, __FILE__, __LINE__, true);
3913 : 0 : return true;
3914 : : }
3915 : : next_after_fail878:;
3916 : : }
3917 : : }
3918 : : }
3919 : : }
3920 : : else
3921 : : {
3922 : 4249 : if (wi::gt_p (wi::to_wide (captures[2]), 1, TYPE_SIGN (TREE_TYPE (captures[2])))
3923 : : )
3924 : : {
3925 : 4249 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1])) || !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3926 : : )
3927 : : {
3928 : 2738 : gimple_seq *lseq = seq;
3929 : 2738 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail879;
3930 : 2738 : {
3931 : 2738 : res_op->set_op (cmp, type, 2);
3932 : 2738 : res_op->ops[0] = captures[1];
3933 : 2738 : res_op->ops[1] = captures[3];
3934 : 2738 : res_op->resimplify (lseq, valueize);
3935 : 2738 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 336, __FILE__, __LINE__, true);
3936 : 2738 : return true;
3937 : : }
3938 : 0 : next_after_fail879:;
3939 : : }
3940 : : else
3941 : : {
3942 : 1511 : {
3943 : 1511 : tree utype = unsigned_type_for (TREE_TYPE (captures[1]));
3944 : 1511 : gimple_seq *lseq = seq;
3945 : 1511 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail880;
3946 : 1511 : {
3947 : 1511 : res_op->set_op (cmp, type, 2);
3948 : 1511 : {
3949 : 1511 : tree _o1[1], _r1;
3950 : 1511 : _o1[0] = captures[1];
3951 : 1511 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
3952 : 1511 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
3953 : : {
3954 : 1511 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
3955 : 1511 : tem_op.resimplify (lseq, valueize);
3956 : 1511 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3957 : 1511 : if (!_r1) goto next_after_fail880;
3958 : : }
3959 : : else
3960 : : _r1 = _o1[0];
3961 : 861 : res_op->ops[0] = _r1;
3962 : : }
3963 : 861 : {
3964 : 861 : tree _o1[1], _r1;
3965 : 861 : _o1[0] = captures[3];
3966 : 861 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
3967 : 861 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
3968 : : {
3969 : 861 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
3970 : 861 : tem_op.resimplify (lseq, valueize);
3971 : 861 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3972 : 861 : if (!_r1) goto next_after_fail880;
3973 : : }
3974 : : else
3975 : : _r1 = _o1[0];
3976 : 861 : res_op->ops[1] = _r1;
3977 : : }
3978 : 861 : res_op->resimplify (lseq, valueize);
3979 : 861 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 337, __FILE__, __LINE__, true);
3980 : 861 : return true;
3981 : : }
3982 : : next_after_fail880:;
3983 : : }
3984 : : }
3985 : : }
3986 : : }
3987 : : }
3988 : : return false;
3989 : : }
3990 : :
3991 : : bool
3992 : 324369279 : gimple_simplify_242 (gimple_match_op *res_op, gimple_seq *seq,
3993 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3994 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3995 : : const enum tree_code ARG_UNUSED (cmp))
3996 : : {
3997 : 324369279 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3998 : 648741994 : if (wi::bit_and_not (get_known_nonzero_bits (captures[1]),
3999 : 973107837 : get_nonzero_bits (captures[0])) != 0
4000 : : )
4001 : : {
4002 : 13403 : gimple_seq *lseq = seq;
4003 : 13403 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail907;
4004 : 13403 : {
4005 : 13403 : tree tem;
4006 : 13403 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4007 : 13403 : res_op->set_value (tem);
4008 : 13403 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 362, __FILE__, __LINE__, true);
4009 : 13403 : return true;
4010 : : }
4011 : 0 : next_after_fail907:;
4012 : : }
4013 : : return false;
4014 : : }
4015 : :
4016 : : bool
4017 : 1434 : gimple_simplify_246 (gimple_match_op *res_op, gimple_seq *seq,
4018 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4019 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4020 : : const enum tree_code ARG_UNUSED (cmp))
4021 : : {
4022 : 1434 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4023 : 1434 : if (wi::gt_p (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
4024 : 1434 : TYPE_SIGN (TREE_TYPE (captures[0])))
4025 : : )
4026 : : {
4027 : 2 : gimple_seq *lseq = seq;
4028 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail912;
4029 : 2 : {
4030 : 2 : tree tem;
4031 : 2 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4032 : 2 : res_op->set_value (tem);
4033 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 367, __FILE__, __LINE__, true);
4034 : 2 : return true;
4035 : : }
4036 : 0 : next_after_fail912:;
4037 : : }
4038 : : else
4039 : : {
4040 : 1432 : if (wi::lt_p (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
4041 : 1432 : TYPE_SIGN (TREE_TYPE (captures[0])))
4042 : : )
4043 : : {
4044 : 1432 : gimple_seq *lseq = seq;
4045 : 1432 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail913;
4046 : 1432 : {
4047 : 1432 : res_op->set_op (cmp, type, 2);
4048 : 1432 : res_op->ops[0] = captures[0];
4049 : 1432 : res_op->ops[1] = captures[2];
4050 : 1432 : res_op->resimplify (lseq, valueize);
4051 : 1432 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 368, __FILE__, __LINE__, true);
4052 : 1432 : return true;
4053 : : }
4054 : 0 : next_after_fail913:;
4055 : : }
4056 : : }
4057 : : return false;
4058 : : }
4059 : :
4060 : : bool
4061 : 8 : gimple_simplify_250 (gimple_match_op *res_op, gimple_seq *seq,
4062 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4063 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4064 : : const enum tree_code ARG_UNUSED (cmp),
4065 : : const enum tree_code ARG_UNUSED (icmp))
4066 : : {
4067 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4068 : 8 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4069 : : )
4070 : : {
4071 : 8 : gimple_seq *lseq = seq;
4072 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail919;
4073 : 8 : {
4074 : 8 : res_op->set_op (icmp, type, 2);
4075 : 8 : res_op->ops[0] = captures[0];
4076 : 8 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[0]),
4077 : 8 : wi::exact_log2 (wi::to_wide (captures[1])));
4078 : 8 : res_op->resimplify (lseq, valueize);
4079 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 374, __FILE__, __LINE__, true);
4080 : 8 : return true;
4081 : : }
4082 : 0 : next_after_fail919:;
4083 : : }
4084 : : return false;
4085 : : }
4086 : :
4087 : : bool
4088 : 13183 : gimple_simplify_252 (gimple_match_op *res_op, gimple_seq *seq,
4089 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4090 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4091 : : const enum tree_code ARG_UNUSED (cmp))
4092 : : {
4093 : 13183 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4094 : 13183 : if (tree_fits_shwi_p (captures[3])
4095 : 13183 : && tree_to_shwi (captures[3]) > 0
4096 : 26338 : && tree_to_shwi (captures[3]) < TYPE_PRECISION (TREE_TYPE (captures[2]))
4097 : : )
4098 : : {
4099 : 13151 : {
4100 : 13151 : tree t0 = TREE_TYPE (captures[2]);
4101 : 13151 : unsigned int prec = TYPE_PRECISION (t0);
4102 : 13151 : wide_int c1 = wi::to_wide (captures[3]);
4103 : 13151 : wide_int c2 = wi::to_wide (captures[4]);
4104 : 13151 : wide_int c3 = wi::to_wide (captures[5]);
4105 : 13151 : wide_int sb = wi::set_bit_in_zero (prec - 1, prec);
4106 : 13151 : if ((c2 & c3) != c3
4107 : : )
4108 : : {
4109 : 0 : gimple_seq *lseq = seq;
4110 : 0 : if (lseq
4111 : : && (!single_use (captures[0])
4112 : : || !single_use (captures[1])))
4113 : 0 : lseq = NULL;
4114 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail922;
4115 : 0 : {
4116 : 0 : tree tem;
4117 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4118 : 0 : res_op->set_value (tem);
4119 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 377, __FILE__, __LINE__, true);
4120 : 0 : return true;
4121 : : }
4122 : 0 : next_after_fail922:;
4123 : : }
4124 : : else
4125 : : {
4126 : 13151 : if (TYPE_UNSIGNED (t0)
4127 : : )
4128 : : {
4129 : 11955 : if ((c3 & wi::arshift (sb, c1 - 1)) != 0
4130 : : )
4131 : : {
4132 : 0 : gimple_seq *lseq = seq;
4133 : 0 : if (lseq
4134 : : && (!single_use (captures[0])
4135 : : || !single_use (captures[1])))
4136 : 0 : lseq = NULL;
4137 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail923;
4138 : 0 : {
4139 : 0 : tree tem;
4140 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4141 : 0 : res_op->set_value (tem);
4142 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 378, __FILE__, __LINE__, true);
4143 : 0 : return true;
4144 : : }
4145 : 0 : next_after_fail923:;
4146 : : }
4147 : : else
4148 : : {
4149 : 11955 : gimple_seq *lseq = seq;
4150 : 11955 : if (lseq
4151 : 4059 : && (!single_use (captures[0])
4152 : 972 : || !single_use (captures[1])))
4153 : 11478 : lseq = NULL;
4154 : 11955 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail924;
4155 : 11955 : {
4156 : 11955 : res_op->set_op (cmp, type, 2);
4157 : 11955 : {
4158 : 11955 : tree _o1[2], _r1;
4159 : 11955 : _o1[0] = captures[2];
4160 : 11955 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
4161 : 11955 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4162 : 11955 : tem_op.resimplify (lseq, valueize);
4163 : 11955 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4164 : 11955 : if (!_r1) goto next_after_fail924;
4165 : 477 : res_op->ops[0] = _r1;
4166 : : }
4167 : 477 : res_op->ops[1] = wide_int_to_tree (t0, c3 << c1);
4168 : 477 : res_op->resimplify (lseq, valueize);
4169 : 477 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 379, __FILE__, __LINE__, true);
4170 : 477 : return true;
4171 : : }
4172 : 12563 : next_after_fail924:;
4173 : : }
4174 : : }
4175 : : else
4176 : : {
4177 : 1196 : {
4178 : 1196 : wide_int smask = wi::arshift (sb, c1);
4179 : 1196 : if ((c2 & smask) == 0
4180 : : )
4181 : : {
4182 : 1149 : gimple_seq *lseq = seq;
4183 : 1149 : if (lseq
4184 : 315 : && (!single_use (captures[0])
4185 : 150 : || !single_use (captures[1])))
4186 : 1047 : lseq = NULL;
4187 : 1149 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail925;
4188 : 1149 : {
4189 : 1149 : res_op->set_op (cmp, type, 2);
4190 : 1149 : {
4191 : 1149 : tree _o1[2], _r1;
4192 : 1149 : _o1[0] = captures[2];
4193 : 1149 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
4194 : 1149 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4195 : 1149 : tem_op.resimplify (lseq, valueize);
4196 : 1149 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4197 : 1149 : if (!_r1) goto next_after_fail925;
4198 : 102 : res_op->ops[0] = _r1;
4199 : : }
4200 : 102 : res_op->ops[1] = wide_int_to_tree (t0, c3 << c1);
4201 : 102 : res_op->resimplify (lseq, valueize);
4202 : 102 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 380, __FILE__, __LINE__, true);
4203 : 102 : return true;
4204 : : }
4205 : 1085 : next_after_fail925:;
4206 : : }
4207 : : else
4208 : : {
4209 : 47 : if ((c3 & smask) == 0
4210 : : )
4211 : : {
4212 : 29 : gimple_seq *lseq = seq;
4213 : 29 : if (lseq
4214 : 7 : && (!single_use (captures[0])
4215 : 5 : || !single_use (captures[1])))
4216 : 26 : lseq = NULL;
4217 : 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail926;
4218 : 29 : {
4219 : 29 : res_op->set_op (cmp, type, 2);
4220 : 29 : {
4221 : 29 : tree _o1[2], _r1;
4222 : 29 : _o1[0] = captures[2];
4223 : 29 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
4224 : 29 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4225 : 29 : tem_op.resimplify (lseq, valueize);
4226 : 29 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4227 : 29 : if (!_r1) goto next_after_fail926;
4228 : 3 : res_op->ops[0] = _r1;
4229 : : }
4230 : 3 : res_op->ops[1] = wide_int_to_tree (t0, c3 << c1);
4231 : 3 : res_op->resimplify (lseq, valueize);
4232 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 381, __FILE__, __LINE__, true);
4233 : 3 : return true;
4234 : : }
4235 : 1085 : next_after_fail926:;
4236 : : }
4237 : : else
4238 : : {
4239 : 18 : if ((c2 & smask) != (c3 & smask)
4240 : : )
4241 : : {
4242 : 2 : gimple_seq *lseq = seq;
4243 : 2 : if (lseq
4244 : : && (!single_use (captures[0])
4245 : : || !single_use (captures[1])))
4246 : 2 : lseq = NULL;
4247 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail927;
4248 : 2 : {
4249 : 2 : tree tem;
4250 : 2 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4251 : 2 : res_op->set_value (tem);
4252 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 382, __FILE__, __LINE__, true);
4253 : 2 : return true;
4254 : : }
4255 : 0 : next_after_fail927:;
4256 : : }
4257 : : else
4258 : : {
4259 : 16 : gimple_seq *lseq = seq;
4260 : 16 : if (lseq
4261 : 12 : && (!single_use (captures[0])
4262 : 8 : || !single_use (captures[1])))
4263 : 12 : lseq = NULL;
4264 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail928;
4265 : 16 : {
4266 : 16 : res_op->set_op (cmp, type, 2);
4267 : 16 : {
4268 : 16 : tree _o1[2], _r1;
4269 : 16 : _o1[0] = captures[2];
4270 : 16 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
4271 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4272 : 16 : tem_op.resimplify (lseq, valueize);
4273 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4274 : 16 : if (!_r1) goto next_after_fail928;
4275 : 4 : res_op->ops[0] = _r1;
4276 : : }
4277 : 4 : res_op->ops[1] = wide_int_to_tree (t0, (c3 << c1) | sb);
4278 : 4 : res_op->resimplify (lseq, valueize);
4279 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 383, __FILE__, __LINE__, true);
4280 : 4 : return true;
4281 : : }
4282 : 1085 : next_after_fail928:;
4283 : : }
4284 : : }
4285 : : }
4286 : 1196 : }
4287 : : }
4288 : : }
4289 : 13151 : }
4290 : : }
4291 : : return false;
4292 : : }
4293 : :
4294 : : bool
4295 : 1076 : gimple_simplify_274 (gimple_match_op *res_op, gimple_seq *seq,
4296 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4297 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4298 : : const combined_fn ARG_UNUSED (sq),
4299 : : const enum tree_code ARG_UNUSED (cmp))
4300 : : {
4301 : 1076 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4302 : 1076 : if (flag_unsafe_math_optimizations && ! flag_errno_math
4303 : : )
4304 : : {
4305 : 211 : if (REAL_VALUE_NEGATIVE (TREE_REAL_CST (captures[1]))
4306 : : )
4307 : : {
4308 : 0 : if (cmp == EQ_EXPR || cmp == LT_EXPR || cmp == LE_EXPR
4309 : : )
4310 : : {
4311 : 0 : gimple_seq *lseq = seq;
4312 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail971;
4313 : 0 : {
4314 : 0 : tree tem;
4315 : 0 : tem = constant_boolean_node (false, type);
4316 : 0 : res_op->set_value (tem);
4317 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 424, __FILE__, __LINE__, true);
4318 : 0 : return true;
4319 : : }
4320 : 0 : next_after_fail971:;
4321 : 0 : }
4322 : : else
4323 : : {
4324 : 0 : if (cmp == NE_EXPR || !HONOR_NANS (captures[0])
4325 : : )
4326 : : {
4327 : 0 : gimple_seq *lseq = seq;
4328 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail972;
4329 : 0 : {
4330 : 0 : tree tem;
4331 : 0 : tem = constant_boolean_node (true, type);
4332 : 0 : res_op->set_value (tem);
4333 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 425, __FILE__, __LINE__, true);
4334 : 0 : return true;
4335 : : }
4336 : 0 : next_after_fail972:;
4337 : : }
4338 : : else
4339 : : {
4340 : 0 : gimple_seq *lseq = seq;
4341 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail973;
4342 : 0 : {
4343 : 0 : res_op->set_op (GE_EXPR, type, 2);
4344 : 0 : res_op->ops[0] = captures[0];
4345 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), dconst0);
4346 : 0 : res_op->resimplify (lseq, valueize);
4347 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 426, __FILE__, __LINE__, true);
4348 : 0 : return true;
4349 : : }
4350 : 0 : next_after_fail973:;
4351 : : }
4352 : : }
4353 : : }
4354 : : else
4355 : : {
4356 : 211 : if (real_equal (TREE_REAL_CST_PTR (captures[1]), &dconst0)
4357 : : )
4358 : : {
4359 : 180 : if (cmp == LT_EXPR
4360 : : )
4361 : : {
4362 : 18 : gimple_seq *lseq = seq;
4363 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail974;
4364 : 18 : {
4365 : 18 : tree tem;
4366 : 18 : tem = constant_boolean_node (false, type);
4367 : 18 : res_op->set_value (tem);
4368 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 427, __FILE__, __LINE__, true);
4369 : 18 : return true;
4370 : : }
4371 : 0 : next_after_fail974:;
4372 : : }
4373 : : else
4374 : : {
4375 : 162 : if (cmp == GE_EXPR && !HONOR_NANS (captures[0])
4376 : : )
4377 : : {
4378 : 18 : gimple_seq *lseq = seq;
4379 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail975;
4380 : 18 : {
4381 : 18 : tree tem;
4382 : 18 : tem = constant_boolean_node (true, type);
4383 : 18 : res_op->set_value (tem);
4384 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 428, __FILE__, __LINE__, true);
4385 : 18 : return true;
4386 : : }
4387 : 0 : next_after_fail975:;
4388 : : }
4389 : : else
4390 : : {
4391 : 144 : if (cmp == LE_EXPR
4392 : : )
4393 : : {
4394 : 36 : gimple_seq *lseq = seq;
4395 : 36 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail976;
4396 : 36 : {
4397 : 36 : res_op->set_op (EQ_EXPR, type, 2);
4398 : 36 : res_op->ops[0] = captures[0];
4399 : 36 : res_op->ops[1] = captures[1];
4400 : 36 : res_op->resimplify (lseq, valueize);
4401 : 36 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 429, __FILE__, __LINE__, true);
4402 : 36 : return true;
4403 : : }
4404 : 0 : next_after_fail976:;
4405 : : }
4406 : : else
4407 : : {
4408 : 108 : gimple_seq *lseq = seq;
4409 : 108 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail977;
4410 : 108 : {
4411 : 108 : res_op->set_op (cmp, type, 2);
4412 : 108 : res_op->ops[0] = captures[0];
4413 : 108 : res_op->ops[1] = captures[1];
4414 : 108 : res_op->resimplify (lseq, valueize);
4415 : 108 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 430, __FILE__, __LINE__, true);
4416 : 108 : return true;
4417 : : }
4418 : 0 : next_after_fail977:;
4419 : : }
4420 : : }
4421 : : }
4422 : : }
4423 : : else
4424 : : {
4425 : 31 : if ((cmp == LT_EXPR
4426 : : || cmp == LE_EXPR
4427 : : || cmp == GT_EXPR
4428 : 31 : || cmp == GE_EXPR)
4429 : 31 : && !REAL_VALUE_ISNAN (TREE_REAL_CST (captures[1]))
4430 : 62 : && !HONOR_SIGN_DEPENDENT_ROUNDING (TREE_TYPE (captures[0]))
4431 : : )
4432 : : {
4433 : 31 : {
4434 : 31 : REAL_VALUE_TYPE c2;
4435 : 31 : enum tree_code ncmp = cmp;
4436 : 31 : const real_format *fmt
4437 : 31 : = REAL_MODE_FORMAT (TYPE_MODE (TREE_TYPE (captures[0])));
4438 : 62 : real_arithmetic (&c2, MULT_EXPR,
4439 : 31 : &TREE_REAL_CST (captures[1]), &TREE_REAL_CST (captures[1]));
4440 : 31 : real_convert (&c2, fmt, &c2);
4441 : 31 : if (!REAL_VALUE_ISINF (c2))
4442 : : {
4443 : 17 : tree c3 = fold_const_call (CFN_SQRT, TREE_TYPE (captures[0]),
4444 : 17 : build_real (TREE_TYPE (captures[0]), c2));
4445 : 17 : if (c3 == NULL_TREE || TREE_CODE (c3) != REAL_CST)
4446 : : ncmp = ERROR_MARK;
4447 : 17 : else if ((cmp == LT_EXPR || cmp == GE_EXPR)
4448 : 17 : && real_less (&TREE_REAL_CST (c3), &TREE_REAL_CST (captures[1])))
4449 : 0 : ncmp = cmp == LT_EXPR ? LE_EXPR : GT_EXPR;
4450 : 17 : else if ((cmp == LE_EXPR || cmp == GT_EXPR)
4451 : 20 : && real_less (&TREE_REAL_CST (captures[1]), &TREE_REAL_CST (c3)))
4452 : 0 : ncmp = cmp == LE_EXPR ? LT_EXPR : GE_EXPR;
4453 : : else
4454 : : {
4455 : 17 : REAL_VALUE_TYPE c2alt, tow;
4456 : 17 : if (cmp == LT_EXPR || cmp == GE_EXPR)
4457 : 14 : tow = dconst0;
4458 : : else
4459 : 3 : tow = dconstinf;
4460 : 17 : real_nextafter (&c2alt, fmt, &c2, &tow);
4461 : 17 : real_convert (&c2alt, fmt, &c2alt);
4462 : 17 : if (REAL_VALUE_ISINF (c2alt))
4463 : : ncmp = ERROR_MARK;
4464 : : else
4465 : : {
4466 : 17 : c3 = fold_const_call (CFN_SQRT, TREE_TYPE (captures[0]),
4467 : 17 : build_real (TREE_TYPE (captures[0]), c2alt));
4468 : 17 : if (c3 == NULL_TREE || TREE_CODE (c3) != REAL_CST)
4469 : : ncmp = ERROR_MARK;
4470 : 17 : else if (real_equal (&TREE_REAL_CST (c3),
4471 : 17 : &TREE_REAL_CST (captures[1])))
4472 : 17 : c2 = c2alt;
4473 : : }
4474 : : }
4475 : : }
4476 : 31 : if (cmp == GT_EXPR || cmp == GE_EXPR
4477 : : )
4478 : : {
4479 : 3 : if (REAL_VALUE_ISINF (c2)
4480 : : )
4481 : : {
4482 : 0 : if (HONOR_INFINITIES (captures[0])
4483 : : )
4484 : : {
4485 : 0 : gimple_seq *lseq = seq;
4486 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail978;
4487 : 0 : {
4488 : 0 : res_op->set_op (EQ_EXPR, type, 2);
4489 : 0 : res_op->ops[0] = captures[0];
4490 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), c2);
4491 : 0 : res_op->resimplify (lseq, valueize);
4492 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 431, __FILE__, __LINE__, true);
4493 : 3 : return true;
4494 : : }
4495 : 0 : next_after_fail978:;
4496 : : }
4497 : : else
4498 : : {
4499 : 0 : gimple_seq *lseq = seq;
4500 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail979;
4501 : 0 : {
4502 : 0 : tree tem;
4503 : 0 : tem = constant_boolean_node (false, type);
4504 : 0 : res_op->set_value (tem);
4505 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 432, __FILE__, __LINE__, true);
4506 : 0 : return true;
4507 : : }
4508 : 0 : next_after_fail979:;
4509 : : }
4510 : : }
4511 : : else
4512 : : {
4513 : 3 : if (ncmp != ERROR_MARK
4514 : : )
4515 : : {
4516 : 3 : if (ncmp == GE_EXPR
4517 : : )
4518 : : {
4519 : 0 : gimple_seq *lseq = seq;
4520 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail980;
4521 : 0 : {
4522 : 0 : res_op->set_op (GE_EXPR, type, 2);
4523 : 0 : res_op->ops[0] = captures[0];
4524 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), c2);
4525 : 0 : res_op->resimplify (lseq, valueize);
4526 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 433, __FILE__, __LINE__, true);
4527 : 0 : return true;
4528 : : }
4529 : 0 : next_after_fail980:;
4530 : : }
4531 : : else
4532 : : {
4533 : 3 : gimple_seq *lseq = seq;
4534 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail981;
4535 : 3 : {
4536 : 3 : res_op->set_op (GT_EXPR, type, 2);
4537 : 3 : res_op->ops[0] = captures[0];
4538 : 3 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), c2);
4539 : 3 : res_op->resimplify (lseq, valueize);
4540 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 434, __FILE__, __LINE__, true);
4541 : 3 : return true;
4542 : : }
4543 : 0 : next_after_fail981:;
4544 : : }
4545 : : }
4546 : : }
4547 : : }
4548 : : else
4549 : : {
4550 : 28 : if (REAL_VALUE_ISINF (c2)
4551 : : )
4552 : : {
4553 : 14 : if (! HONOR_NANS (captures[0]) && ! HONOR_INFINITIES (captures[0])
4554 : : )
4555 : : {
4556 : 0 : gimple_seq *lseq = seq;
4557 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail982;
4558 : 0 : {
4559 : 0 : tree tem;
4560 : 0 : tem = constant_boolean_node (true, type);
4561 : 0 : res_op->set_value (tem);
4562 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 435, __FILE__, __LINE__, true);
4563 : 0 : return true;
4564 : : }
4565 : 0 : next_after_fail982:;
4566 : : }
4567 : : else
4568 : : {
4569 : 14 : if (! HONOR_NANS (captures[0])
4570 : : )
4571 : : {
4572 : 0 : gimple_seq *lseq = seq;
4573 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail983;
4574 : 0 : {
4575 : 0 : res_op->set_op (NE_EXPR, type, 2);
4576 : 0 : res_op->ops[0] = captures[0];
4577 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), c2);
4578 : 0 : res_op->resimplify (lseq, valueize);
4579 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 436, __FILE__, __LINE__, true);
4580 : 0 : return true;
4581 : : }
4582 : 0 : next_after_fail983:;
4583 : : }
4584 : : else
4585 : : {
4586 : 14 : if (! HONOR_INFINITIES (captures[0])
4587 : : )
4588 : : {
4589 : 0 : gimple_seq *lseq = seq;
4590 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail984;
4591 : 0 : {
4592 : 0 : res_op->set_op (GE_EXPR, type, 2);
4593 : 0 : res_op->ops[0] = captures[0];
4594 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), dconst0);
4595 : 0 : res_op->resimplify (lseq, valueize);
4596 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 437, __FILE__, __LINE__, true);
4597 : 0 : return true;
4598 : : }
4599 : 0 : next_after_fail984:;
4600 : : }
4601 : : else
4602 : : {
4603 : : if (0
4604 : : )
4605 : : {
4606 : : gimple_seq *lseq = seq;
4607 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail985;
4608 : : {
4609 : : res_op->set_op (TRUTH_ANDIF_EXPR, type, 2);
4610 : : {
4611 : : tree _o1[2], _r1;
4612 : : _o1[0] = captures[0];
4613 : : _o1[1] = build_real (TREE_TYPE (captures[0]), dconst0);
4614 : : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
4615 : : tem_op.resimplify (lseq, valueize);
4616 : : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4617 : : if (!_r1) goto next_after_fail985;
4618 : : res_op->ops[0] = _r1;
4619 : : }
4620 : : {
4621 : : tree _o1[2], _r1;
4622 : : _o1[0] = captures[0];
4623 : : _o1[1] = build_real (TREE_TYPE (captures[0]), c2);
4624 : : gimple_match_op tem_op (res_op->cond.any_else (), NE_EXPR, type, _o1[0], _o1[1]);
4625 : : tem_op.resimplify (lseq, valueize);
4626 : : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4627 : : if (!_r1) goto next_after_fail985;
4628 : : res_op->ops[1] = _r1;
4629 : : }
4630 : : res_op->resimplify (lseq, valueize);
4631 : : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 438, __FILE__, __LINE__, true);
4632 : : return true;
4633 : : }
4634 : : next_after_fail985:;
4635 : : }
4636 : : }
4637 : : }
4638 : : }
4639 : : }
4640 : : else
4641 : : {
4642 : 14 : if (ncmp != ERROR_MARK && ! HONOR_NANS (captures[0])
4643 : : )
4644 : : {
4645 : 0 : if (ncmp == LT_EXPR
4646 : : )
4647 : : {
4648 : 0 : gimple_seq *lseq = seq;
4649 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail986;
4650 : 0 : {
4651 : 0 : res_op->set_op (LT_EXPR, type, 2);
4652 : 0 : res_op->ops[0] = captures[0];
4653 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), c2);
4654 : 0 : res_op->resimplify (lseq, valueize);
4655 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 439, __FILE__, __LINE__, true);
4656 : 0 : return true;
4657 : : }
4658 : 0 : next_after_fail986:;
4659 : : }
4660 : : else
4661 : : {
4662 : 0 : gimple_seq *lseq = seq;
4663 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail987;
4664 : 0 : {
4665 : 0 : res_op->set_op (LE_EXPR, type, 2);
4666 : 0 : res_op->ops[0] = captures[0];
4667 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), c2);
4668 : 0 : res_op->resimplify (lseq, valueize);
4669 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 440, __FILE__, __LINE__, true);
4670 : 0 : return true;
4671 : : }
4672 : 0 : next_after_fail987:;
4673 : : }
4674 : : }
4675 : : else
4676 : : {
4677 : : if (ncmp != ERROR_MARK &&
4678 : :
4679 : : )
4680 : : {
4681 : : if (ncmp == LT_EXPR
4682 : : )
4683 : : {
4684 : : gimple_seq *lseq = seq;
4685 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail988;
4686 : : {
4687 : : res_op->set_op (TRUTH_ANDIF_EXPR, type, 2);
4688 : : {
4689 : : tree _o1[2], _r1;
4690 : : _o1[0] = captures[0];
4691 : : _o1[1] = build_real (TREE_TYPE (captures[0]), dconst0);
4692 : : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
4693 : : tem_op.resimplify (lseq, valueize);
4694 : : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4695 : : if (!_r1) goto next_after_fail988;
4696 : : res_op->ops[0] = _r1;
4697 : : }
4698 : : {
4699 : : tree _o1[2], _r1;
4700 : : _o1[0] = captures[0];
4701 : : _o1[1] = build_real (TREE_TYPE (captures[0]), c2);
4702 : : gimple_match_op tem_op (res_op->cond.any_else (), LT_EXPR, type, _o1[0], _o1[1]);
4703 : : tem_op.resimplify (lseq, valueize);
4704 : : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4705 : : if (!_r1) goto next_after_fail988;
4706 : : res_op->ops[1] = _r1;
4707 : : }
4708 : : res_op->resimplify (lseq, valueize);
4709 : : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 441, __FILE__, __LINE__, true);
4710 : : return true;
4711 : : }
4712 : : next_after_fail988:;
4713 : : }
4714 : : else
4715 : : {
4716 : : gimple_seq *lseq = seq;
4717 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail989;
4718 : : {
4719 : : res_op->set_op (TRUTH_ANDIF_EXPR, type, 2);
4720 : : {
4721 : : tree _o1[2], _r1;
4722 : : _o1[0] = captures[0];
4723 : : _o1[1] = build_real (TREE_TYPE (captures[0]), dconst0);
4724 : : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
4725 : : tem_op.resimplify (lseq, valueize);
4726 : : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4727 : : if (!_r1) goto next_after_fail989;
4728 : : res_op->ops[0] = _r1;
4729 : : }
4730 : : {
4731 : : tree _o1[2], _r1;
4732 : : _o1[0] = captures[0];
4733 : : _o1[1] = build_real (TREE_TYPE (captures[0]), c2);
4734 : : gimple_match_op tem_op (res_op->cond.any_else (), LE_EXPR, type, _o1[0], _o1[1]);
4735 : : tem_op.resimplify (lseq, valueize);
4736 : : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4737 : : if (!_r1) goto next_after_fail989;
4738 : : res_op->ops[1] = _r1;
4739 : : }
4740 : : res_op->resimplify (lseq, valueize);
4741 : : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 442, __FILE__, __LINE__, true);
4742 : : return true;
4743 : : }
4744 : : next_after_fail989:;
4745 : : }
4746 : : }
4747 : : }
4748 : : }
4749 : : }
4750 : : }
4751 : : }
4752 : : }
4753 : : }
4754 : : }
4755 : : return false;
4756 : : }
4757 : :
4758 : : bool
4759 : 0 : gimple_simplify_305 (gimple_match_op *res_op, gimple_seq *seq,
4760 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4761 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4762 : : const enum tree_code ARG_UNUSED (cmp))
4763 : : {
4764 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4765 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
4766 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4767 : 0 : && TYPE_UNSIGNED (TREE_TYPE (captures[2]))
4768 : 0 : && (TYPE_PRECISION (TREE_TYPE (captures[1]))
4769 : 0 : >= 2 * TYPE_PRECISION (TREE_TYPE (captures[2])))
4770 : 0 : && tree_fits_uhwi_p (captures[4])
4771 : 0 : && tree_to_uhwi (captures[4]) == TYPE_PRECISION (TREE_TYPE (captures[2]))
4772 : 0 : && types_match (captures[2], captures[3])
4773 : 0 : && type_has_mode_precision_p (TREE_TYPE (captures[2]))
4774 : 0 : && (optab_handler (umulv4_optab, TYPE_MODE (TREE_TYPE (captures[2])))
4775 : : != CODE_FOR_nothing)
4776 : : )
4777 : : {
4778 : 0 : {
4779 : 0 : tree t = TREE_TYPE (captures[2]), cpx = build_complex_type (t);
4780 : 0 : gimple_seq *lseq = seq;
4781 : 0 : if (lseq
4782 : 0 : && (!single_use (captures[0])))
4783 : 0 : lseq = NULL;
4784 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1062;
4785 : 0 : {
4786 : 0 : res_op->set_op (cmp, type, 2);
4787 : 0 : {
4788 : 0 : tree _o1[1], _r1;
4789 : 0 : {
4790 : 0 : tree _o2[2], _r2;
4791 : 0 : _o2[0] = captures[2];
4792 : 0 : _o2[1] = captures[3];
4793 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_MUL_OVERFLOW, cpx, _o2[0], _o2[1]);
4794 : 0 : tem_op.resimplify (lseq, valueize);
4795 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
4796 : 0 : if (!_r2) goto next_after_fail1062;
4797 : 0 : _o1[0] = _r2;
4798 : : }
4799 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
4800 : 0 : tem_op.resimplify (lseq, valueize);
4801 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4802 : 0 : if (!_r1) goto next_after_fail1062;
4803 : 0 : res_op->ops[0] = _r1;
4804 : : }
4805 : 0 : res_op->ops[1] = build_zero_cst (t);
4806 : 0 : res_op->resimplify (lseq, valueize);
4807 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 498, __FILE__, __LINE__, true);
4808 : 0 : return true;
4809 : : }
4810 : : next_after_fail1062:;
4811 : : }
4812 : : }
4813 : : return false;
4814 : : }
4815 : :
4816 : : bool
4817 : 7140 : gimple_simplify_308 (gimple_match_op *res_op, gimple_seq *seq,
4818 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4819 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4820 : : const enum tree_code ARG_UNUSED (op),
4821 : : const enum tree_code ARG_UNUSED (cmp),
4822 : : const combined_fn ARG_UNUSED (clz))
4823 : : {
4824 : 7140 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4825 : 7140 : if (!sanitize_flags_p (SANITIZE_BUILTIN)
4826 : 7140 : || (cfun && (cfun->curr_properties & PROP_ssa) != 0)
4827 : : )
4828 : : {
4829 : 7140 : if (integer_zerop (captures[2]) && single_use (captures[0])
4830 : : )
4831 : : {
4832 : 38 : {
4833 : 38 : tree stype = signed_type_for (TREE_TYPE (captures[1]));
4834 : 38 : gimple_seq *lseq = seq;
4835 : 38 : if (lseq
4836 : 18 : && (!single_use (captures[0])))
4837 : 20 : lseq = NULL;
4838 : 38 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1074;
4839 : 38 : {
4840 : 38 : res_op->set_op (cmp, type, 2);
4841 : 38 : {
4842 : 38 : tree _o1[1], _r1;
4843 : 38 : _o1[0] = captures[1];
4844 : 38 : if (stype != TREE_TYPE (_o1[0]) /* XXX */
4845 : 38 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
4846 : : {
4847 : 38 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
4848 : 38 : tem_op.resimplify (lseq, valueize);
4849 : 38 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4850 : 38 : if (!_r1) goto next_after_fail1074;
4851 : : }
4852 : : else
4853 : : _r1 = _o1[0];
4854 : 18 : res_op->ops[0] = _r1;
4855 : : }
4856 : 18 : res_op->ops[1] = build_zero_cst (stype);
4857 : 18 : res_op->resimplify (lseq, valueize);
4858 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 510, __FILE__, __LINE__, true);
4859 : 18 : return true;
4860 : : }
4861 : : next_after_fail1074:;
4862 : : }
4863 : : }
4864 : : else
4865 : : {
4866 : 7102 : if (wi::to_wide (captures[2]) == TYPE_PRECISION (TREE_TYPE (captures[1])) - 1
4867 : : )
4868 : : {
4869 : 2904 : gimple_seq *lseq = seq;
4870 : 2904 : if (lseq
4871 : 1039 : && (!single_use (captures[0])))
4872 : 2880 : lseq = NULL;
4873 : 2904 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1075;
4874 : 2904 : {
4875 : 2904 : res_op->set_op (op, type, 2);
4876 : 2904 : res_op->ops[0] = captures[1];
4877 : 2904 : res_op->ops[1] = build_one_cst (TREE_TYPE (captures[1]));
4878 : 2904 : res_op->resimplify (lseq, valueize);
4879 : 2904 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 511, __FILE__, __LINE__, true);
4880 : 2904 : return true;
4881 : : }
4882 : 0 : next_after_fail1075:;
4883 : : }
4884 : : }
4885 : : }
4886 : : return false;
4887 : : }
4888 : :
4889 : : bool
4890 : 3831 : gimple_simplify_314 (gimple_match_op *res_op, gimple_seq *seq,
4891 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4892 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4893 : : const enum tree_code ARG_UNUSED (cmp))
4894 : : {
4895 : 3831 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4896 : 7662 : if (VECTOR_MODE_P (TYPE_MODE (TREE_TYPE (captures[0])))
4897 : 10716 : && can_compare_p (cmp == EQ_EXPR ? EQ : NE, TYPE_MODE (TREE_TYPE (captures[0])),
4898 : : ccp_jump)
4899 : : )
4900 : : {
4901 : 29 : gimple_seq *lseq = seq;
4902 : 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1086;
4903 : 29 : {
4904 : 29 : res_op->set_op (cmp, type, 2);
4905 : 29 : res_op->ops[0] = captures[0];
4906 : 29 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[0]));
4907 : 29 : res_op->resimplify (lseq, valueize);
4908 : 29 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 522, __FILE__, __LINE__, true);
4909 : 29 : return true;
4910 : : }
4911 : 0 : next_after_fail1086:;
4912 : : }
4913 : : return false;
4914 : : }
4915 : :
4916 : : bool
4917 : 473703 : gimple_simplify_318 (gimple_match_op *res_op, gimple_seq *seq,
4918 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4919 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4920 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
4921 : : {
4922 : 473703 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4923 : 473703 : if (REAL_VALUE_NEGATIVE (TREE_REAL_CST (captures[0]))
4924 : : )
4925 : : {
4926 : 121 : gimple_seq *lseq = seq;
4927 : 121 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1091;
4928 : 121 : {
4929 : 121 : res_op->set_op (COPYSIGN_ALL, type, 2);
4930 : 121 : {
4931 : 121 : tree _o1[1], _r1;
4932 : 121 : _o1[0] = captures[0];
4933 : 121 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4934 : 121 : tem_op.resimplify (lseq, valueize);
4935 : 121 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4936 : 121 : if (!_r1) goto next_after_fail1091;
4937 : 121 : res_op->ops[0] = _r1;
4938 : : }
4939 : 121 : res_op->ops[1] = captures[1];
4940 : 121 : res_op->resimplify (lseq, valueize);
4941 : 121 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 527, __FILE__, __LINE__, true);
4942 : 121 : return true;
4943 : : }
4944 : : next_after_fail1091:;
4945 : : }
4946 : : return false;
4947 : : }
4948 : :
4949 : : bool
4950 : 6 : gimple_simplify_321 (gimple_match_op *res_op, gimple_seq *seq,
4951 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4952 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4953 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
4954 : : {
4955 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4956 : 6 : gimple_seq *lseq = seq;
4957 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1095;
4958 : 6 : {
4959 : 6 : tree tem;
4960 : 6 : tem = captures[0];
4961 : 6 : res_op->set_value (tem);
4962 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 531, __FILE__, __LINE__, true);
4963 : : return true;
4964 : : }
4965 : 0 : next_after_fail1095:;
4966 : 0 : return false;
4967 : : }
4968 : :
4969 : : bool
4970 : 397 : gimple_simplify_325 (gimple_match_op *res_op, gimple_seq *seq,
4971 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4972 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4973 : : const enum tree_code ARG_UNUSED (div))
4974 : : {
4975 : 397 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4976 : 491 : if ((TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (captures[0]))
4977 : 312 : && (!VECTOR_TYPE_P (type)
4978 : 0 : || target_supports_op_p (type, RSHIFT_EXPR, optab_vector)
4979 : 0 : || target_supports_op_p (type, RSHIFT_EXPR, optab_scalar))
4980 : 709 : && (useless_type_conversion_p (type, TREE_TYPE (captures[2]))
4981 : 262 : || (element_precision (type) >= element_precision (TREE_TYPE (captures[2]))
4982 : 262 : && (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
4983 : 460 : || (element_precision (type)
4984 : 230 : == element_precision (TREE_TYPE (captures[2])))
4985 : 216 : || (INTEGRAL_TYPE_P (type)
4986 : 432 : && (tree_nonzero_bits (captures[0])
4987 : 1045 : & wi::mask (element_precision (TREE_TYPE (captures[2])) - 1,
4988 : : true,
4989 : 829 : element_precision (type))) == 0))))
4990 : : )
4991 : : {
4992 : 112 : if (!VECTOR_TYPE_P (type)
4993 : 112 : && useless_type_conversion_p (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
4994 : 162 : && element_precision (TREE_TYPE (captures[1])) < element_precision (type)
4995 : : )
4996 : : {
4997 : 0 : gimple_seq *lseq = seq;
4998 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1100;
4999 : 0 : {
5000 : 0 : res_op->set_op (NOP_EXPR, type, 1);
5001 : 0 : {
5002 : 0 : tree _o1[2], _r1;
5003 : 0 : _o1[0] = captures[1];
5004 : 0 : _o1[1] = captures[3];
5005 : 0 : (*res_op).set_op (RSHIFT_EXPR, TREE_TYPE (_o1[0]), 2);
5006 : 0 : (*res_op).ops[0] = _o1[0];
5007 : 0 : (*res_op).ops[1] = _o1[1];
5008 : 0 : (*res_op).resimplify (lseq, valueize);
5009 : : }
5010 : 0 : if (type != res_op->type
5011 : 0 : && !useless_type_conversion_p (type, res_op->type))
5012 : : {
5013 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1100;
5014 : 0 : res_op->set_op (NOP_EXPR, type, 1);
5015 : 0 : res_op->resimplify (lseq, valueize);
5016 : : }
5017 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 534, __FILE__, __LINE__, true);
5018 : 0 : return true;
5019 : : }
5020 : : next_after_fail1100:;
5021 : : }
5022 : : else
5023 : : {
5024 : 112 : gimple_seq *lseq = seq;
5025 : 112 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1101;
5026 : 112 : {
5027 : 112 : res_op->set_op (RSHIFT_EXPR, type, 2);
5028 : 112 : res_op->ops[0] = captures[0];
5029 : 112 : res_op->ops[1] = captures[3];
5030 : 112 : res_op->resimplify (lseq, valueize);
5031 : 112 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 535, __FILE__, __LINE__, true);
5032 : 112 : return true;
5033 : : }
5034 : 0 : next_after_fail1101:;
5035 : : }
5036 : : }
5037 : : return false;
5038 : : }
5039 : :
5040 : : bool
5041 : 6217 : gimple_simplify_336 (gimple_match_op *res_op, gimple_seq *seq,
5042 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5043 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5044 : : const enum tree_code ARG_UNUSED (div))
5045 : : {
5046 : 6217 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5047 : 6217 : if (ANY_INTEGRAL_TYPE_P (type)
5048 : : )
5049 : : {
5050 : 6217 : if (TYPE_OVERFLOW_UNDEFINED (type) && !TYPE_OVERFLOW_SANITIZED (type)
5051 : : )
5052 : : {
5053 : 4445 : gimple_seq *lseq = seq;
5054 : 4445 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1113;
5055 : 4445 : {
5056 : 4445 : tree tem;
5057 : 4445 : tem = captures[0];
5058 : 4445 : res_op->set_value (tem);
5059 : 4445 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 547, __FILE__, __LINE__, true);
5060 : 4445 : return true;
5061 : : }
5062 : 0 : next_after_fail1113:;
5063 : : }
5064 : : else
5065 : : {
5066 : 1772 : {
5067 : 1772 : int_range_max vr0, vr1;
5068 : 1772 : if (INTEGRAL_TYPE_P (type)
5069 : 3512 : && get_range_query (cfun)->range_of_expr (vr0, captures[0])
5070 : 3512 : && get_range_query (cfun)->range_of_expr (vr1, captures[1])
5071 : 3528 : && range_op_handler (MULT_EXPR).overflow_free_p (vr0, vr1)
5072 : : )
5073 : : {
5074 : 40 : gimple_seq *lseq = seq;
5075 : 40 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1114;
5076 : 40 : {
5077 : 40 : tree tem;
5078 : 40 : tem = captures[0];
5079 : 40 : res_op->set_value (tem);
5080 : 40 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 548, __FILE__, __LINE__, true);
5081 : 40 : return true;
5082 : : }
5083 : 0 : next_after_fail1114:;
5084 : : }
5085 : 1772 : }
5086 : : }
5087 : : }
5088 : : return false;
5089 : : }
5090 : :
5091 : : bool
5092 : 25126 : gimple_simplify_342 (gimple_match_op *res_op, gimple_seq *seq,
5093 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5094 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5095 : : const enum tree_code ARG_UNUSED (mod))
5096 : : {
5097 : 25126 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5098 : 25126 : if (!integer_zerop (captures[1])
5099 : : )
5100 : : {
5101 : 24757 : gimple_seq *lseq = seq;
5102 : 24757 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1122;
5103 : 24757 : {
5104 : 24757 : tree tem;
5105 : 24757 : tem = captures[0];
5106 : 24757 : res_op->set_value (tem);
5107 : 24757 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 556, __FILE__, __LINE__, true);
5108 : 24757 : return true;
5109 : : }
5110 : 0 : next_after_fail1122:;
5111 : : }
5112 : : return false;
5113 : : }
5114 : :
5115 : : bool
5116 : 310 : gimple_simplify_344 (gimple_match_op *res_op, gimple_seq *seq,
5117 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5118 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5119 : : const enum tree_code ARG_UNUSED (mod))
5120 : : {
5121 : 310 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5122 : 310 : if (!TYPE_UNSIGNED (type)
5123 : : )
5124 : : {
5125 : 30 : gimple_seq *lseq = seq;
5126 : 30 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1124;
5127 : 30 : {
5128 : 30 : tree tem;
5129 : 30 : tem = build_zero_cst (type);
5130 : 30 : res_op->set_value (tem);
5131 : 30 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 558, __FILE__, __LINE__, true);
5132 : 30 : return true;
5133 : : }
5134 : 0 : next_after_fail1124:;
5135 : : }
5136 : : return false;
5137 : : }
5138 : :
5139 : : bool
5140 : 49 : gimple_simplify_350 (gimple_match_op *res_op, gimple_seq *seq,
5141 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5142 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
5143 : : {
5144 : 49 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5145 : 49 : if (SCALAR_FLOAT_TYPE_P (type)
5146 : 49 : && ! HONOR_NANS (type)
5147 : 65 : && ! HONOR_INFINITIES (type)
5148 : : )
5149 : : {
5150 : 16 : if (types_match (type, float_type_node)
5151 : : )
5152 : : {
5153 : 4 : gimple_seq *lseq = seq;
5154 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1130;
5155 : 4 : {
5156 : 4 : res_op->set_op (CFN_BUILT_IN_COPYSIGNF, type, 2);
5157 : 4 : res_op->ops[0] = build_one_cst (type);
5158 : 4 : {
5159 : 4 : tree _o1[1], _r1;
5160 : 4 : _o1[0] = captures[0];
5161 : 4 : if (type != TREE_TYPE (_o1[0]) /* XXX */
5162 : 4 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
5163 : : {
5164 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
5165 : 0 : tem_op.resimplify (lseq, valueize);
5166 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5167 : 0 : if (!_r1) goto next_after_fail1130;
5168 : : }
5169 : : else
5170 : : _r1 = _o1[0];
5171 : 4 : res_op->ops[1] = _r1;
5172 : : }
5173 : 4 : res_op->resimplify (lseq, valueize);
5174 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 564, __FILE__, __LINE__, true);
5175 : 4 : return true;
5176 : : }
5177 : : next_after_fail1130:;
5178 : : }
5179 : : else
5180 : : {
5181 : 12 : if (types_match (type, double_type_node)
5182 : : )
5183 : : {
5184 : 8 : gimple_seq *lseq = seq;
5185 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1131;
5186 : 8 : {
5187 : 8 : res_op->set_op (CFN_BUILT_IN_COPYSIGN, type, 2);
5188 : 8 : res_op->ops[0] = build_one_cst (type);
5189 : 8 : {
5190 : 8 : tree _o1[1], _r1;
5191 : 8 : _o1[0] = captures[0];
5192 : 8 : if (type != TREE_TYPE (_o1[0]) /* XXX */
5193 : 8 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
5194 : : {
5195 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
5196 : 2 : tem_op.resimplify (lseq, valueize);
5197 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5198 : 2 : if (!_r1) goto next_after_fail1131;
5199 : : }
5200 : : else
5201 : : _r1 = _o1[0];
5202 : 7 : res_op->ops[1] = _r1;
5203 : : }
5204 : 7 : res_op->resimplify (lseq, valueize);
5205 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 565, __FILE__, __LINE__, true);
5206 : 7 : return true;
5207 : : }
5208 : : next_after_fail1131:;
5209 : : }
5210 : : else
5211 : : {
5212 : 4 : if (types_match (type, long_double_type_node)
5213 : : )
5214 : : {
5215 : 4 : gimple_seq *lseq = seq;
5216 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1132;
5217 : 4 : {
5218 : 4 : res_op->set_op (CFN_BUILT_IN_COPYSIGNL, type, 2);
5219 : 4 : res_op->ops[0] = build_one_cst (type);
5220 : 4 : {
5221 : 4 : tree _o1[1], _r1;
5222 : 4 : _o1[0] = captures[0];
5223 : 4 : if (type != TREE_TYPE (_o1[0]) /* XXX */
5224 : 4 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
5225 : : {
5226 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
5227 : 0 : tem_op.resimplify (lseq, valueize);
5228 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5229 : 0 : if (!_r1) goto next_after_fail1132;
5230 : : }
5231 : : else
5232 : : _r1 = _o1[0];
5233 : 4 : res_op->ops[1] = _r1;
5234 : : }
5235 : 4 : res_op->resimplify (lseq, valueize);
5236 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 566, __FILE__, __LINE__, true);
5237 : 4 : return true;
5238 : : }
5239 : : next_after_fail1132:;
5240 : : }
5241 : : }
5242 : : }
5243 : : }
5244 : : return false;
5245 : : }
5246 : :
5247 : : bool
5248 : 3270 : gimple_simplify_367 (gimple_match_op *res_op, gimple_seq *seq,
5249 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5250 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5251 : : const enum tree_code ARG_UNUSED (op))
5252 : : {
5253 : 3270 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5254 : 6540 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5255 : 6540 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
5256 : : )
5257 : : {
5258 : 993 : gimple_seq *lseq = seq;
5259 : 993 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1151;
5260 : 993 : {
5261 : 993 : res_op->set_op (op, type, 2);
5262 : 993 : res_op->ops[0] = captures[2];
5263 : 993 : res_op->ops[1] = captures[1];
5264 : 993 : res_op->resimplify (lseq, valueize);
5265 : 993 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 585, __FILE__, __LINE__, true);
5266 : 993 : return true;
5267 : : }
5268 : 0 : next_after_fail1151:;
5269 : : }
5270 : : return false;
5271 : : }
5272 : :
5273 : : bool
5274 : 50738 : gimple_simplify_373 (gimple_match_op *res_op, gimple_seq *seq,
5275 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5276 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5277 : : const enum tree_code ARG_UNUSED (cmp))
5278 : : {
5279 : 50738 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5280 : 50738 : if (wi::gt_p (wi::to_wide (captures[1]), 0, TYPE_SIGN (TREE_TYPE (captures[1])))
5281 : : )
5282 : : {
5283 : 50738 : {
5284 : 50738 : wi::overflow_type ovf;
5285 : 50738 : wide_int prod = wi::mul (wi::to_wide (captures[2]), wi::to_wide (captures[1]),
5286 : 101476 : TYPE_SIGN (TREE_TYPE (captures[1])), &ovf);
5287 : 50738 : if (ovf
5288 : : )
5289 : : {
5290 : 1 : gimple_seq *lseq = seq;
5291 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1158;
5292 : 1 : {
5293 : 1 : tree tem;
5294 : 1 : tem = constant_boolean_node (wi::lt_p (wi::to_wide (captures[2]), 0,
5295 : 1 : TYPE_SIGN (TREE_TYPE (captures[2])))
5296 : 1 : != (cmp == LT_EXPR || cmp == LE_EXPR), type);
5297 : 1 : res_op->set_value (tem);
5298 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 592, __FILE__, __LINE__, true);
5299 : 1 : return true;
5300 : : }
5301 : 0 : next_after_fail1158:;
5302 : : }
5303 : : else
5304 : : {
5305 : 50737 : gimple_seq *lseq = seq;
5306 : 50737 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1159;
5307 : 50737 : {
5308 : 50737 : res_op->set_op (cmp, type, 2);
5309 : 50737 : res_op->ops[0] = captures[0];
5310 : 50737 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[0]), prod);
5311 : 50737 : res_op->resimplify (lseq, valueize);
5312 : 50737 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 593, __FILE__, __LINE__, true);
5313 : 50737 : return true;
5314 : : }
5315 : 0 : next_after_fail1159:;
5316 : : }
5317 : 50738 : }
5318 : : }
5319 : : return false;
5320 : : }
5321 : :
5322 : : bool
5323 : 0 : gimple_simplify_380 (gimple_match_op *res_op, gimple_seq *seq,
5324 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5325 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5326 : : const enum tree_code ARG_UNUSED (cmp),
5327 : : const enum tree_code ARG_UNUSED (out))
5328 : : {
5329 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5330 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
5331 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
5332 : : )
5333 : : {
5334 : 0 : gimple_seq *lseq = seq;
5335 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1197;
5336 : 0 : {
5337 : 0 : res_op->set_op (out, type, 2);
5338 : 0 : {
5339 : 0 : tree _o1[1], _r1;
5340 : 0 : _o1[0] = captures[0];
5341 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
5342 : 0 : tem_op.resimplify (lseq, valueize);
5343 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5344 : 0 : if (!_r1) goto next_after_fail1197;
5345 : 0 : res_op->ops[0] = _r1;
5346 : : }
5347 : 0 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
5348 : 0 : res_op->resimplify (lseq, valueize);
5349 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 614, __FILE__, __LINE__, true);
5350 : 0 : return true;
5351 : : }
5352 : : next_after_fail1197:;
5353 : : }
5354 : : return false;
5355 : : }
5356 : :
5357 : : bool
5358 : 1399863 : gimple_simplify_384 (gimple_match_op *res_op, gimple_seq *seq,
5359 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5360 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5361 : : const enum tree_code ARG_UNUSED (op),
5362 : : const enum tree_code ARG_UNUSED (rop),
5363 : : const enum tree_code ARG_UNUSED (cmp),
5364 : : const enum tree_code ARG_UNUSED (rcmp))
5365 : : {
5366 : 1399863 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5367 : 2799726 : if (!TREE_OVERFLOW (captures[2]) && !TREE_OVERFLOW (captures[3])
5368 : 2799726 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
5369 : : )
5370 : : {
5371 : 450621 : {
5372 : 450621 : tree res = int_const_binop (rop, captures[3], captures[2]);
5373 : 450621 : if (TREE_OVERFLOW (res)
5374 : : )
5375 : : {
5376 : 8 : gimple_seq *lseq = seq;
5377 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1202;
5378 : 8 : {
5379 : 8 : tree tem;
5380 : 8 : fold_overflow_warning (("assuming signed overflow does not occur "
5381 : : "when simplifying conditional to constant"),
5382 : : WARN_STRICT_OVERFLOW_CONDITIONAL);
5383 : 8 : bool less = cmp == LE_EXPR || cmp == LT_EXPR;
5384 : 8 : bool ovf_high = wi::lt_p (wi::to_wide (captures[2]), 0,
5385 : 8 : TYPE_SIGN (TREE_TYPE (captures[2])))
5386 : 8 : != (op == MINUS_EXPR); tem =
5387 : 8 : constant_boolean_node (less == ovf_high, type);
5388 : 8 : res_op->set_value (tem);
5389 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 619, __FILE__, __LINE__, true);
5390 : 8 : return true;
5391 : : }
5392 : 0 : next_after_fail1202:;
5393 : : }
5394 : : else
5395 : : {
5396 : 450613 : if (single_use (captures[0])
5397 : : )
5398 : : {
5399 : 34995 : {
5400 : 34995 : fold_overflow_warning (("assuming signed overflow does not occur "
5401 : : "when changing X +- C1 cmp C2 to "
5402 : : "X cmp C2 -+ C1"),
5403 : : WARN_STRICT_OVERFLOW_COMPARISON);
5404 : 34995 : gimple_seq *lseq = seq;
5405 : 34995 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1203;
5406 : 34995 : {
5407 : 34995 : res_op->set_op (cmp, type, 2);
5408 : 34995 : res_op->ops[0] = captures[1];
5409 : 34995 : res_op->ops[1] = res;
5410 : 34995 : res_op->resimplify (lseq, valueize);
5411 : 34995 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 620, __FILE__, __LINE__, true);
5412 : 34995 : return true;
5413 : : }
5414 : 0 : next_after_fail1203:;
5415 : : }
5416 : : }
5417 : : }
5418 : : }
5419 : : }
5420 : : else
5421 : : {
5422 : 949242 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
5423 : : )
5424 : : {
5425 : 949186 : {
5426 : 949186 : wide_int max = wi::max_value (TREE_TYPE (captures[1]));
5427 : 949186 : wide_int min = wi::min_value (TREE_TYPE (captures[1]));
5428 : 949186 : wide_int c2 = rop == PLUS_EXPR
5429 : 949186 : ? wi::add (wi::to_wide (captures[3]), wi::to_wide (captures[2]))
5430 : 949186 : : wi::sub (wi::to_wide (captures[3]), wi::to_wide (captures[2]));
5431 : 823278 : if (((cmp == LE_EXPR || cmp == GT_EXPR) && wi::eq_p (c2, max))
5432 : 1772197 : || ((cmp == LT_EXPR || cmp == GE_EXPR) && wi::eq_p (c2, min))
5433 : : )
5434 : : {
5435 : 329 : {
5436 : 329 : wide_int c1 = rop == PLUS_EXPR
5437 : 329 : ? wi::add (wi::bit_not (c2), wi::to_wide (captures[2]))
5438 : 658 : : wi::sub (wi::bit_not (c2), wi::to_wide (captures[2]));
5439 : 329 : tree c1_cst = wide_int_to_tree (TREE_TYPE (captures[1]), c1);
5440 : 329 : gimple_seq *lseq = seq;
5441 : 329 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1204;
5442 : 329 : {
5443 : 329 : res_op->set_op (rcmp, type, 2);
5444 : 329 : res_op->ops[0] = captures[1];
5445 : 329 : res_op->ops[1] = c1_cst;
5446 : 329 : res_op->resimplify (lseq, valueize);
5447 : 329 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 621, __FILE__, __LINE__, true);
5448 : 329 : return true;
5449 : : }
5450 : 0 : next_after_fail1204:;
5451 : 329 : }
5452 : : }
5453 : 949186 : }
5454 : : }
5455 : : }
5456 : : return false;
5457 : : }
5458 : :
5459 : : bool
5460 : 13 : gimple_simplify_392 (gimple_match_op *res_op, gimple_seq *seq,
5461 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5462 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5463 : : const enum tree_code ARG_UNUSED (cmp),
5464 : : const enum tree_code ARG_UNUSED (out))
5465 : : {
5466 : 13 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5467 : 13 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
5468 : 13 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
5469 : : )
5470 : : {
5471 : 7 : gimple_seq *lseq = seq;
5472 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1216;
5473 : 7 : {
5474 : 7 : res_op->set_op (out, type, 2);
5475 : 7 : {
5476 : 7 : tree _o1[1], _r1;
5477 : 7 : _o1[0] = captures[0];
5478 : 7 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
5479 : 7 : tem_op.resimplify (lseq, valueize);
5480 : 7 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5481 : 7 : if (!_r1) goto next_after_fail1216;
5482 : 2 : res_op->ops[0] = _r1;
5483 : : }
5484 : 2 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
5485 : 2 : res_op->resimplify (lseq, valueize);
5486 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 615, __FILE__, __LINE__, true);
5487 : 2 : return true;
5488 : : }
5489 : : next_after_fail1216:;
5490 : : }
5491 : : return false;
5492 : : }
5493 : :
5494 : : bool
5495 : 971 : gimple_simplify_397 (gimple_match_op *res_op, gimple_seq *seq,
5496 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5497 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
5498 : : {
5499 : 971 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5500 : 1942 : if (INTEGRAL_TYPE_P (type)
5501 : 971 : && !TYPE_UNSIGNED (type)
5502 : 884 : && !TYPE_OVERFLOW_TRAPS (type)
5503 : 884 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
5504 : 2826 : && (expr_not_equal_to (captures[0], wi::to_wide (TYPE_MIN_VALUE (type)))
5505 : 1851 : || expr_not_equal_to (captures[1], wi::minus_one (TYPE_PRECISION
5506 : : (TREE_TYPE (captures[1])))))
5507 : : )
5508 : : {
5509 : 18 : gimple_seq *lseq = seq;
5510 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1225;
5511 : 18 : {
5512 : 18 : res_op->set_op (TRUNC_MOD_EXPR, type, 2);
5513 : 18 : res_op->ops[0] = captures[0];
5514 : 18 : {
5515 : 18 : tree _o1[1], _r1;
5516 : 18 : _o1[0] = captures[1];
5517 : 18 : if (type != TREE_TYPE (_o1[0]) /* XXX */
5518 : 18 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
5519 : : {
5520 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
5521 : 0 : tem_op.resimplify (lseq, valueize);
5522 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5523 : 0 : if (!_r1) goto next_after_fail1225;
5524 : : }
5525 : : else
5526 : : _r1 = _o1[0];
5527 : 18 : res_op->ops[1] = _r1;
5528 : : }
5529 : 18 : res_op->resimplify (lseq, valueize);
5530 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 638, __FILE__, __LINE__, true);
5531 : 18 : return true;
5532 : : }
5533 : : next_after_fail1225:;
5534 : : }
5535 : : return false;
5536 : : }
5537 : :
5538 : : bool
5539 : 22356 : gimple_simplify_402 (gimple_match_op *res_op, gimple_seq *seq,
5540 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5541 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5542 : : const enum tree_code ARG_UNUSED (shiftrotate))
5543 : : {
5544 : 22356 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5545 : 22356 : gimple_seq *lseq = seq;
5546 : 22356 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1230;
5547 : 22356 : {
5548 : 22356 : tree tem;
5549 : 22356 : tem = captures[0];
5550 : 22356 : res_op->set_value (tem);
5551 : 22356 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 643, __FILE__, __LINE__, true);
5552 : : return true;
5553 : : }
5554 : 0 : next_after_fail1230:;
5555 : 0 : return false;
5556 : : }
5557 : :
5558 : : bool
5559 : 3246 : gimple_simplify_404 (gimple_match_op *res_op, gimple_seq *seq,
5560 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5561 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5562 : : const enum tree_code ARG_UNUSED (shiftrotate))
5563 : : {
5564 : 3246 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5565 : 3246 : {
5566 : 3246 : tree tem = uniform_vector_p (captures[1]);
5567 : 3246 : if (tem
5568 : : )
5569 : : {
5570 : 493 : gimple_seq *lseq = seq;
5571 : 493 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1232;
5572 : 493 : {
5573 : 493 : res_op->set_op (shiftrotate, type, 2);
5574 : 493 : res_op->ops[0] = captures[0];
5575 : 493 : res_op->ops[1] = tem;
5576 : 493 : res_op->resimplify (lseq, valueize);
5577 : 493 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 645, __FILE__, __LINE__, true);
5578 : 493 : return true;
5579 : : }
5580 : 0 : next_after_fail1232:;
5581 : : }
5582 : : }
5583 : : return false;
5584 : : }
5585 : :
5586 : : bool
5587 : 20567 : gimple_simplify_407 (gimple_match_op *res_op, gimple_seq *seq,
5588 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5589 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5590 : : const enum tree_code ARG_UNUSED (op))
5591 : : {
5592 : 20567 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5593 : 20567 : {
5594 : 20567 : unsigned int prec = element_precision (type);
5595 : 20567 : if (wi::ge_p (wi::to_wide (captures[1]), 0, TYPE_SIGN (TREE_TYPE (captures[1])))
5596 : 20567 : && wi::lt_p (wi::to_wide (captures[1]), prec, TYPE_SIGN (TREE_TYPE (captures[1])))
5597 : 20567 : && wi::ge_p (wi::to_wide (captures[2]), 0, TYPE_SIGN (TREE_TYPE (captures[2])))
5598 : 41134 : && wi::lt_p (wi::to_wide (captures[2]), prec, TYPE_SIGN (TREE_TYPE (captures[2])))
5599 : : )
5600 : : {
5601 : 20567 : {
5602 : 20567 : unsigned int low = (tree_to_uhwi (captures[1])
5603 : 20567 : + tree_to_uhwi (captures[2]));
5604 : 20567 : if (low >= prec
5605 : : )
5606 : : {
5607 : 219 : if (op == LROTATE_EXPR || op == RROTATE_EXPR
5608 : : )
5609 : : {
5610 : 19 : gimple_seq *lseq = seq;
5611 : 19 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1235;
5612 : 19 : {
5613 : 19 : res_op->set_op (op, type, 2);
5614 : 19 : res_op->ops[0] = captures[0];
5615 : 19 : res_op->ops[1] = build_int_cst (TREE_TYPE (captures[1]), low % prec);
5616 : 19 : res_op->resimplify (lseq, valueize);
5617 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 647, __FILE__, __LINE__, true);
5618 : 20567 : return true;
5619 : : }
5620 : 0 : next_after_fail1235:;
5621 : : }
5622 : : else
5623 : : {
5624 : 200 : if (TYPE_UNSIGNED (type) || op == LSHIFT_EXPR
5625 : : )
5626 : : {
5627 : 96 : gimple_seq *lseq = seq;
5628 : 96 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1236;
5629 : 96 : {
5630 : 96 : tree tem;
5631 : 96 : tem = build_zero_cst (type);
5632 : 96 : res_op->set_value (tem);
5633 : 96 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 648, __FILE__, __LINE__, true);
5634 : 96 : return true;
5635 : : }
5636 : 0 : next_after_fail1236:;
5637 : : }
5638 : : else
5639 : : {
5640 : 104 : gimple_seq *lseq = seq;
5641 : 104 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1237;
5642 : 104 : {
5643 : 104 : res_op->set_op (op, type, 2);
5644 : 104 : res_op->ops[0] = captures[0];
5645 : 104 : res_op->ops[1] = build_int_cst (TREE_TYPE (captures[1]), prec - 1);
5646 : 104 : res_op->resimplify (lseq, valueize);
5647 : 104 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 649, __FILE__, __LINE__, true);
5648 : 104 : return true;
5649 : : }
5650 : 0 : next_after_fail1237:;
5651 : : }
5652 : : }
5653 : : }
5654 : : else
5655 : : {
5656 : 20348 : gimple_seq *lseq = seq;
5657 : 20348 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1238;
5658 : 20348 : {
5659 : 20348 : res_op->set_op (op, type, 2);
5660 : 20348 : res_op->ops[0] = captures[0];
5661 : 20348 : res_op->ops[1] = build_int_cst (TREE_TYPE (captures[1]), low);
5662 : 20348 : res_op->resimplify (lseq, valueize);
5663 : 20348 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 650, __FILE__, __LINE__, true);
5664 : 20348 : return true;
5665 : : }
5666 : 0 : next_after_fail1238:;
5667 : : }
5668 : : }
5669 : : }
5670 : : }
5671 : 0 : return false;
5672 : : }
5673 : :
5674 : : bool
5675 : 914 : gimple_simplify_417 (gimple_match_op *res_op, gimple_seq *seq,
5676 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5677 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5678 : : const combined_fn ARG_UNUSED (froms),
5679 : : const combined_fn ARG_UNUSED (tos))
5680 : : {
5681 : 914 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5682 : 914 : if (optimize
5683 : 914 : && types_match (type, TREE_TYPE (captures[0]))
5684 : 1828 : && direct_internal_fn_supported_p (as_internal_fn (tos),
5685 : : type, OPTIMIZE_FOR_BOTH)
5686 : : )
5687 : : {
5688 : 78 : gimple_seq *lseq = seq;
5689 : 78 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1254;
5690 : 78 : {
5691 : 78 : res_op->set_op (tos, type, 1);
5692 : 78 : res_op->ops[0] = captures[0];
5693 : 78 : res_op->resimplify (lseq, valueize);
5694 : 78 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 665, __FILE__, __LINE__, true);
5695 : 78 : return true;
5696 : : }
5697 : 0 : next_after_fail1254:;
5698 : : }
5699 : : return false;
5700 : : }
5701 : :
5702 : : bool
5703 : 274954 : gimple_simplify_421 (gimple_match_op *res_op, gimple_seq *seq,
5704 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5705 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5706 : : const enum tree_code ARG_UNUSED (op))
5707 : : {
5708 : 274954 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5709 : 274954 : if (INTEGRAL_TYPE_P (type)
5710 : 170298 : && op != MULT_EXPR
5711 : 170298 : && op != RDIV_EXPR
5712 : 125336 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
5713 : 92270 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5714 : 92270 : && type_has_mode_precision_p (TREE_TYPE (captures[2]))
5715 : 75894 : && type_has_mode_precision_p (TREE_TYPE (captures[4]))
5716 : 74410 : && type_has_mode_precision_p (type)
5717 : 73058 : && TYPE_PRECISION (TREE_TYPE (captures[1])) > TYPE_PRECISION (TREE_TYPE (captures[2]))
5718 : 17440 : && types_match (captures[2], type)
5719 : 278862 : && (types_match (captures[2], captures[4])
5720 : 2375 : || poly_int_tree_p (captures[3]))
5721 : : )
5722 : : {
5723 : 1533 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
5724 : : )
5725 : : {
5726 : 203 : gimple_seq *lseq = seq;
5727 : 203 : if (lseq
5728 : 163 : && (!single_use (captures[0])))
5729 : 198 : lseq = NULL;
5730 : 203 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1258;
5731 : 203 : {
5732 : 203 : res_op->set_op (op, type, 2);
5733 : 203 : res_op->ops[0] = captures[2];
5734 : 203 : {
5735 : 203 : tree _o1[1], _r1;
5736 : 203 : _o1[0] = captures[4];
5737 : 203 : if (type != TREE_TYPE (_o1[0]) /* XXX */
5738 : 203 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
5739 : : {
5740 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
5741 : 0 : tem_op.resimplify (lseq, valueize);
5742 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5743 : 0 : if (!_r1) goto next_after_fail1258;
5744 : : }
5745 : : else
5746 : : _r1 = _o1[0];
5747 : 203 : res_op->ops[1] = _r1;
5748 : : }
5749 : 203 : res_op->resimplify (lseq, valueize);
5750 : 203 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 669, __FILE__, __LINE__, true);
5751 : 203 : return true;
5752 : : }
5753 : : next_after_fail1258:;
5754 : : }
5755 : : else
5756 : : {
5757 : 1330 : {
5758 : 1330 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
5759 : 1330 : gimple_seq *lseq = seq;
5760 : 1330 : if (lseq
5761 : 556 : && (!single_use (captures[0])))
5762 : 1327 : lseq = NULL;
5763 : 1330 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1259;
5764 : 1330 : {
5765 : 1330 : res_op->set_op (NOP_EXPR, type, 1);
5766 : 1330 : {
5767 : 1330 : tree _o1[2], _r1;
5768 : 1330 : {
5769 : 1330 : tree _o2[1], _r2;
5770 : 1330 : _o2[0] = captures[2];
5771 : 1330 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
5772 : 1330 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
5773 : : {
5774 : 1330 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
5775 : 1330 : tem_op.resimplify (lseq, valueize);
5776 : 1330 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5777 : 1330 : if (!_r2) goto next_after_fail1259;
5778 : : }
5779 : : else
5780 : : _r2 = _o2[0];
5781 : 1037 : _o1[0] = _r2;
5782 : : }
5783 : 1037 : {
5784 : 1037 : tree _o2[1], _r2;
5785 : 1037 : _o2[0] = captures[4];
5786 : 1037 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
5787 : 1037 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
5788 : : {
5789 : 1037 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
5790 : 1037 : tem_op.resimplify (lseq, valueize);
5791 : 1037 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5792 : 1037 : if (!_r2) goto next_after_fail1259;
5793 : : }
5794 : : else
5795 : : _r2 = _o2[0];
5796 : 1037 : _o1[1] = _r2;
5797 : : }
5798 : 1037 : (*res_op).set_op (op, TREE_TYPE (_o1[0]), 2);
5799 : 1037 : (*res_op).ops[0] = _o1[0];
5800 : 1037 : (*res_op).ops[1] = _o1[1];
5801 : 1037 : (*res_op).resimplify (lseq, valueize);
5802 : : }
5803 : 1037 : if (type != res_op->type
5804 : 1037 : && !useless_type_conversion_p (type, res_op->type))
5805 : : {
5806 : 1037 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1259;
5807 : 3 : res_op->set_op (NOP_EXPR, type, 1);
5808 : 3 : res_op->resimplify (lseq, valueize);
5809 : : }
5810 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 670, __FILE__, __LINE__, true);
5811 : 3 : return true;
5812 : : }
5813 : : next_after_fail1259:;
5814 : : }
5815 : : }
5816 : : }
5817 : : else
5818 : : {
5819 : 224241 : if (FLOAT_TYPE_P (type)
5820 : 322601 : && DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
5821 : 49180 : == DECIMAL_FLOAT_TYPE_P (type)
5822 : : )
5823 : : {
5824 : 49180 : {
5825 : 49180 : tree arg0 = strip_float_extensions (captures[2]);
5826 : 49180 : tree arg1 = strip_float_extensions (captures[4]);
5827 : 49180 : tree itype = TREE_TYPE (captures[0]);
5828 : 49180 : tree ty1 = TREE_TYPE (arg0);
5829 : 49180 : tree ty2 = TREE_TYPE (arg1);
5830 : 49180 : enum tree_code code = TREE_CODE (itype);
5831 : 0 : if (FLOAT_TYPE_P (ty1)
5832 : 49180 : && FLOAT_TYPE_P (ty2)
5833 : : )
5834 : : {
5835 : 49180 : {
5836 : 49180 : tree newtype = type;
5837 : 49180 : if (TYPE_MODE (ty1) == SDmode
5838 : 49180 : || TYPE_MODE (ty2) == SDmode
5839 : 98360 : || TYPE_MODE (type) == SDmode)
5840 : 0 : newtype = dfloat32_type_node;
5841 : 49180 : if (TYPE_MODE (ty1) == DDmode
5842 : 49180 : || TYPE_MODE (ty2) == DDmode
5843 : 98360 : || TYPE_MODE (type) == DDmode)
5844 : 0 : newtype = dfloat64_type_node;
5845 : 49180 : if (TYPE_MODE (ty1) == TDmode
5846 : 49180 : || TYPE_MODE (ty2) == TDmode
5847 : 98360 : || TYPE_MODE (type) == TDmode)
5848 : 0 : newtype = dfloat128_type_node;
5849 : 49180 : if ((newtype == dfloat32_type_node
5850 : 49180 : || newtype == dfloat64_type_node
5851 : 49180 : || newtype == dfloat128_type_node)
5852 : 0 : && newtype == type
5853 : 49180 : && types_match (newtype, type)
5854 : : )
5855 : : {
5856 : 0 : gimple_seq *lseq = seq;
5857 : 0 : if (lseq
5858 : 0 : && (!single_use (captures[0])))
5859 : 0 : lseq = NULL;
5860 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1260;
5861 : 0 : {
5862 : 0 : res_op->set_op (op, type, 2);
5863 : 0 : {
5864 : 0 : tree _o1[1], _r1;
5865 : 0 : _o1[0] = captures[2];
5866 : 0 : if (newtype != TREE_TYPE (_o1[0]) /* XXX */
5867 : 0 : && !useless_type_conversion_p (newtype, TREE_TYPE (_o1[0])))
5868 : : {
5869 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, newtype, _o1[0]);
5870 : 0 : tem_op.resimplify (lseq, valueize);
5871 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5872 : 0 : if (!_r1) goto next_after_fail1260;
5873 : : }
5874 : : else
5875 : : _r1 = _o1[0];
5876 : 0 : res_op->ops[0] = _r1;
5877 : : }
5878 : 0 : {
5879 : 0 : tree _o1[1], _r1;
5880 : 0 : _o1[0] = captures[4];
5881 : 0 : if (newtype != TREE_TYPE (_o1[0]) /* XXX */
5882 : 0 : && !useless_type_conversion_p (newtype, TREE_TYPE (_o1[0])))
5883 : : {
5884 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, newtype, _o1[0]);
5885 : 0 : tem_op.resimplify (lseq, valueize);
5886 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5887 : 0 : if (!_r1) goto next_after_fail1260;
5888 : : }
5889 : : else
5890 : : _r1 = _o1[0];
5891 : 0 : res_op->ops[1] = _r1;
5892 : : }
5893 : 0 : res_op->resimplify (lseq, valueize);
5894 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 671, __FILE__, __LINE__, true);
5895 : 0 : return true;
5896 : : }
5897 : : next_after_fail1260:;
5898 : : }
5899 : : else
5900 : : {
5901 : 49180 : {
5902 : 49180 : if (element_precision (ty1) > element_precision (newtype))
5903 : 0 : newtype = ty1;
5904 : 49180 : if (element_precision (ty2) > element_precision (newtype))
5905 : 0 : newtype = ty2;
5906 : 49180 : if (element_precision (newtype) < element_precision (itype)
5907 : 49158 : && (!VECTOR_MODE_P (TYPE_MODE (newtype))
5908 : 0 : || target_supports_op_p (newtype, op, optab_default))
5909 : 49158 : && (flag_unsafe_math_optimizations
5910 : 49156 : || (element_precision (newtype) == element_precision (type)
5911 : 49156 : && real_can_shorten_arithmetic (element_mode (itype),
5912 : : element_mode (type))
5913 : 5736 : && !excess_precision_type (newtype)))
5914 : 49204 : && !types_match (itype, newtype)
5915 : : )
5916 : : {
5917 : 24 : gimple_seq *lseq = seq;
5918 : 24 : if (lseq
5919 : 13 : && (!single_use (captures[0])))
5920 : 19 : lseq = NULL;
5921 : 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1261;
5922 : 24 : {
5923 : 24 : res_op->set_op (NOP_EXPR, type, 1);
5924 : 24 : {
5925 : 24 : tree _o1[2], _r1;
5926 : 24 : {
5927 : 24 : tree _o2[1], _r2;
5928 : 24 : _o2[0] = captures[2];
5929 : 24 : if (newtype != TREE_TYPE (_o2[0]) /* XXX */
5930 : 24 : && !useless_type_conversion_p (newtype, TREE_TYPE (_o2[0])))
5931 : : {
5932 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, newtype, _o2[0]);
5933 : 0 : tem_op.resimplify (lseq, valueize);
5934 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5935 : 0 : if (!_r2) goto next_after_fail1261;
5936 : : }
5937 : : else
5938 : : _r2 = _o2[0];
5939 : 24 : _o1[0] = _r2;
5940 : : }
5941 : 24 : {
5942 : 24 : tree _o2[1], _r2;
5943 : 24 : _o2[0] = captures[4];
5944 : 24 : if (newtype != TREE_TYPE (_o2[0]) /* XXX */
5945 : 24 : && !useless_type_conversion_p (newtype, TREE_TYPE (_o2[0])))
5946 : : {
5947 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, newtype, _o2[0]);
5948 : 0 : tem_op.resimplify (lseq, valueize);
5949 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5950 : 0 : if (!_r2) goto next_after_fail1261;
5951 : : }
5952 : : else
5953 : : _r2 = _o2[0];
5954 : 24 : _o1[1] = _r2;
5955 : : }
5956 : 24 : (*res_op).set_op (op, TREE_TYPE (_o1[0]), 2);
5957 : 24 : (*res_op).ops[0] = _o1[0];
5958 : 24 : (*res_op).ops[1] = _o1[1];
5959 : 24 : (*res_op).resimplify (lseq, valueize);
5960 : : }
5961 : 24 : if (type != res_op->type
5962 : 24 : && !useless_type_conversion_p (type, res_op->type))
5963 : : {
5964 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1261;
5965 : 0 : res_op->set_op (NOP_EXPR, type, 1);
5966 : 0 : res_op->resimplify (lseq, valueize);
5967 : : }
5968 : 24 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 672, __FILE__, __LINE__, true);
5969 : 24 : return true;
5970 : : }
5971 : : next_after_fail1261:;
5972 : : }
5973 : : }
5974 : : }
5975 : : }
5976 : : }
5977 : : }
5978 : : }
5979 : : }
5980 : : return false;
5981 : : }
5982 : :
5983 : : bool
5984 : 124403 : gimple_simplify_440 (gimple_match_op *res_op, gimple_seq *seq,
5985 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5986 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
5987 : : {
5988 : 124403 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5989 : 124403 : if (! TYPE_UNSIGNED (type)
5990 : 19178 : && ! HONOR_SIGN_DEPENDENT_ROUNDING (type)
5991 : 143581 : && single_use (captures[0])
5992 : : )
5993 : : {
5994 : 11601 : gimple_seq *lseq = seq;
5995 : 11601 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1290;
5996 : 11601 : {
5997 : 11601 : res_op->set_op (MULT_EXPR, type, 2);
5998 : 11601 : res_op->ops[0] = captures[1];
5999 : 11601 : {
6000 : 11601 : tree _o1[1], _r1;
6001 : 11601 : _o1[0] = captures[2];
6002 : 11601 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
6003 : 11601 : tem_op.resimplify (lseq, valueize);
6004 : 11601 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6005 : 11601 : if (!_r1) goto next_after_fail1290;
6006 : 11341 : res_op->ops[1] = _r1;
6007 : : }
6008 : 11341 : res_op->resimplify (lseq, valueize);
6009 : 11341 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 689, __FILE__, __LINE__, true);
6010 : 11341 : return true;
6011 : : }
6012 : : next_after_fail1290:;
6013 : : }
6014 : : return false;
6015 : : }
6016 : :
6017 : : bool
6018 : 19 : gimple_simplify_448 (gimple_match_op *res_op, gimple_seq *seq,
6019 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6020 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6021 : : {
6022 : 19 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6023 : 19 : gimple_seq *lseq = seq;
6024 : 19 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1299;
6025 : 19 : {
6026 : 19 : res_op->set_op (BIT_AND_EXPR, type, 2);
6027 : 19 : res_op->ops[0] = captures[0];
6028 : 19 : res_op->ops[1] = captures[1];
6029 : 19 : res_op->resimplify (lseq, valueize);
6030 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 698, __FILE__, __LINE__, true);
6031 : : return true;
6032 : : }
6033 : 0 : next_after_fail1299:;
6034 : 0 : return false;
6035 : : }
6036 : :
6037 : : bool
6038 : 12485 : gimple_simplify_453 (gimple_match_op *res_op, gimple_seq *seq,
6039 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6040 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6041 : : const enum tree_code ARG_UNUSED (bitop),
6042 : : const enum tree_code ARG_UNUSED (op))
6043 : : {
6044 : 12485 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6045 : 12485 : {
6046 : 12485 : tree pmop[2];
6047 : 12485 : tree utype = fold_bit_and_mask (TREE_TYPE (captures[1]), captures[5], op, captures[1], bitop,
6048 : : captures[2], captures[3], captures[4], ERROR_MARK, NULL_TREE,
6049 : : NULL_TREE, pmop);
6050 : 12485 : if (utype
6051 : : )
6052 : : {
6053 : 8934 : gimple_seq *lseq = seq;
6054 : 8934 : if (lseq
6055 : 3207 : && (!single_use (captures[0])
6056 : 2941 : || !single_use (captures[1])))
6057 : 8912 : lseq = NULL;
6058 : 8934 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1304;
6059 : 8934 : {
6060 : 8934 : res_op->set_op (NOP_EXPR, type, 1);
6061 : 8934 : {
6062 : 8934 : tree _o1[2], _r1;
6063 : 8934 : {
6064 : 8934 : tree _o2[2], _r2;
6065 : 8934 : {
6066 : 8934 : tree _o3[1], _r3;
6067 : 8934 : _o3[0] = pmop[0];
6068 : 8934 : if (utype != TREE_TYPE (_o3[0]) /* XXX */
6069 : 8934 : && !useless_type_conversion_p (utype, TREE_TYPE (_o3[0])))
6070 : : {
6071 : 341 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o3[0]);
6072 : 341 : tem_op.resimplify (lseq, valueize);
6073 : 341 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6074 : 341 : if (!_r3) goto next_after_fail1304;
6075 : : }
6076 : : else
6077 : : _r3 = _o3[0];
6078 : 8610 : _o2[0] = _r3;
6079 : : }
6080 : 8610 : {
6081 : 8610 : tree _o3[1], _r3;
6082 : 8610 : _o3[0] = pmop[1];
6083 : 8610 : if (utype != TREE_TYPE (_o3[0]) /* XXX */
6084 : 8610 : && !useless_type_conversion_p (utype, TREE_TYPE (_o3[0])))
6085 : : {
6086 : 17 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o3[0]);
6087 : 17 : tem_op.resimplify (lseq, valueize);
6088 : 17 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6089 : 17 : if (!_r3) goto next_after_fail1304;
6090 : : }
6091 : : else
6092 : : _r3 = _o3[0];
6093 : 8610 : _o2[1] = _r3;
6094 : : }
6095 : 8610 : gimple_match_op tem_op (res_op->cond.any_else (), op, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6096 : 8610 : tem_op.resimplify (lseq, valueize);
6097 : 8610 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6098 : 8610 : if (!_r2) goto next_after_fail1304;
6099 : 36 : _o1[0] = _r2;
6100 : : }
6101 : 36 : {
6102 : 36 : tree _o2[1], _r2;
6103 : 36 : _o2[0] = captures[5];
6104 : 36 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
6105 : 36 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
6106 : : {
6107 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
6108 : 9 : tem_op.resimplify (lseq, valueize);
6109 : 9 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6110 : 9 : if (!_r2) goto next_after_fail1304;
6111 : : }
6112 : : else
6113 : : _r2 = _o2[0];
6114 : 36 : _o1[1] = _r2;
6115 : : }
6116 : 36 : (*res_op).set_op (BIT_AND_EXPR, TREE_TYPE (_o1[0]), 2);
6117 : 36 : (*res_op).ops[0] = _o1[0];
6118 : 36 : (*res_op).ops[1] = _o1[1];
6119 : 36 : (*res_op).resimplify (lseq, valueize);
6120 : : }
6121 : 36 : if (type != res_op->type
6122 : 36 : && !useless_type_conversion_p (type, res_op->type))
6123 : : {
6124 : 9 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1304;
6125 : 9 : res_op->set_op (NOP_EXPR, type, 1);
6126 : 9 : res_op->resimplify (lseq, valueize);
6127 : : }
6128 : 36 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 702, __FILE__, __LINE__, true);
6129 : 36 : return true;
6130 : : }
6131 : 12449 : next_after_fail1304:;
6132 : : }
6133 : : }
6134 : 12449 : return false;
6135 : : }
6136 : :
6137 : : bool
6138 : 0 : gimple_simplify_465 (gimple_match_op *res_op, gimple_seq *seq,
6139 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6140 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6141 : : const enum tree_code ARG_UNUSED (cmp))
6142 : : {
6143 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6144 : 0 : if (!canonicalize_math_p ()
6145 : : )
6146 : : {
6147 : 0 : if (INTEGRAL_TYPE_P (type)
6148 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6149 : : )
6150 : : {
6151 : 0 : gimple_seq *lseq = seq;
6152 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1316;
6153 : 0 : {
6154 : 0 : res_op->set_op (COND_EXPR, type, 3);
6155 : 0 : res_op->ops[0] = captures[0];
6156 : 0 : res_op->ops[1] = captures[3];
6157 : 0 : res_op->ops[2] = build_zero_cst (type);
6158 : 0 : res_op->resimplify (lseq, valueize);
6159 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 713, __FILE__, __LINE__, true);
6160 : 0 : return true;
6161 : : }
6162 : 0 : next_after_fail1316:;
6163 : : }
6164 : : }
6165 : : return false;
6166 : : }
6167 : :
6168 : : bool
6169 : 14 : gimple_simplify_472 (gimple_match_op *res_op, gimple_seq *seq,
6170 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6171 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6172 : : const enum tree_code ARG_UNUSED (eqne))
6173 : : {
6174 : 14 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6175 : 14 : if (eqne == EQ_EXPR
6176 : : )
6177 : : {
6178 : 6 : gimple_seq *lseq = seq;
6179 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1329;
6180 : 6 : {
6181 : 6 : tree tem;
6182 : 6 : tem = constant_boolean_node (false, type);
6183 : 6 : res_op->set_value (tem);
6184 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 723, __FILE__, __LINE__, true);
6185 : 6 : return true;
6186 : : }
6187 : 0 : next_after_fail1329:;
6188 : : }
6189 : : else
6190 : : {
6191 : 8 : if (eqne == NE_EXPR
6192 : : )
6193 : : {
6194 : 8 : gimple_seq *lseq = seq;
6195 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1330;
6196 : 8 : {
6197 : 8 : tree tem;
6198 : 8 : tem = captures[0];
6199 : 8 : res_op->set_value (tem);
6200 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 724, __FILE__, __LINE__, true);
6201 : 8 : return true;
6202 : : }
6203 : 0 : next_after_fail1330:;
6204 : : }
6205 : : }
6206 : : return false;
6207 : : }
6208 : :
6209 : : bool
6210 : 714319 : gimple_simplify_475 (gimple_match_op *res_op, gimple_seq *seq,
6211 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6212 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6213 : : const enum tree_code ARG_UNUSED (code2),
6214 : : const enum tree_code ARG_UNUSED (code1))
6215 : : {
6216 : 714319 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6217 : 714319 : if ((TREE_CODE (captures[2]) == INTEGER_CST
6218 : 517085 : && TREE_CODE (captures[4]) == INTEGER_CST)
6219 : 1203517 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
6220 : 44802 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2]))
6221 : 106 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, code2))
6222 : 44696 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
6223 : 663544 : && operand_equal_p (captures[2], captures[4]))
6224 : : )
6225 : : {
6226 : 28198 : {
6227 : 28198 : int cmp = 0;
6228 : 28198 : if (TREE_CODE (captures[2]) == INTEGER_CST
6229 : 27887 : && TREE_CODE (captures[4]) == INTEGER_CST)
6230 : 27887 : cmp = tree_int_cst_compare (captures[2], captures[4]);
6231 : 28198 : if ((code1 == LT_EXPR || code1 == LE_EXPR)
6232 : 18229 : && (code2 == LT_EXPR || code2 == LE_EXPR)
6233 : : )
6234 : : {
6235 : 77 : if ((cmp < 0) || (cmp == 0 && code1 == LT_EXPR)
6236 : : )
6237 : : {
6238 : 34 : gimple_seq *lseq = seq;
6239 : 34 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1345;
6240 : 34 : {
6241 : 34 : tree tem;
6242 : 34 : tem = captures[0];
6243 : 34 : res_op->set_value (tem);
6244 : 34 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 732, __FILE__, __LINE__, true);
6245 : 34 : return true;
6246 : : }
6247 : 0 : next_after_fail1345:;
6248 : 0 : }
6249 : : else
6250 : : {
6251 : 43 : gimple_seq *lseq = seq;
6252 : 43 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1346;
6253 : 43 : {
6254 : 43 : tree tem;
6255 : 43 : tem = captures[3];
6256 : 43 : res_op->set_value (tem);
6257 : 43 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 733, __FILE__, __LINE__, true);
6258 : 43 : return true;
6259 : : }
6260 : 0 : next_after_fail1346:;
6261 : : }
6262 : : }
6263 : : else
6264 : : {
6265 : 28121 : if ((code1 == GT_EXPR || code1 == GE_EXPR)
6266 : 9969 : && (code2 == GT_EXPR || code2 == GE_EXPR)
6267 : : )
6268 : : {
6269 : 188 : if ((cmp > 0) || (cmp == 0 && code1 == GT_EXPR)
6270 : : )
6271 : : {
6272 : 120 : gimple_seq *lseq = seq;
6273 : 120 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1347;
6274 : 120 : {
6275 : 120 : tree tem;
6276 : 120 : tem = captures[0];
6277 : 120 : res_op->set_value (tem);
6278 : 120 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 734, __FILE__, __LINE__, true);
6279 : 120 : return true;
6280 : : }
6281 : 0 : next_after_fail1347:;
6282 : 0 : }
6283 : : else
6284 : : {
6285 : 68 : gimple_seq *lseq = seq;
6286 : 68 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1348;
6287 : 68 : {
6288 : 68 : tree tem;
6289 : 68 : tem = captures[3];
6290 : 68 : res_op->set_value (tem);
6291 : 68 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 735, __FILE__, __LINE__, true);
6292 : 68 : return true;
6293 : : }
6294 : 0 : next_after_fail1348:;
6295 : : }
6296 : : }
6297 : : else
6298 : : {
6299 : 27933 : if (cmp == 0
6300 : 381 : && ((code1 == LE_EXPR && code2 == GE_EXPR)
6301 : 351 : || (code1 == GE_EXPR && code2 == LE_EXPR))
6302 : : )
6303 : : {
6304 : 101 : gimple_seq *lseq = seq;
6305 : 101 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1349;
6306 : 101 : {
6307 : 101 : res_op->set_op (EQ_EXPR, type, 2);
6308 : 101 : res_op->ops[0] = captures[1];
6309 : 101 : res_op->ops[1] = captures[2];
6310 : 101 : res_op->resimplify (lseq, valueize);
6311 : 101 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 736, __FILE__, __LINE__, true);
6312 : 101 : return true;
6313 : : }
6314 : 0 : next_after_fail1349:;
6315 : 0 : }
6316 : : else
6317 : : {
6318 : 27832 : if (cmp <= 0
6319 : 9927 : && (code1 == LT_EXPR || code1 == LE_EXPR)
6320 : 223 : && (code2 == GT_EXPR || code2 == GE_EXPR)
6321 : : )
6322 : : {
6323 : 223 : gimple_seq *lseq = seq;
6324 : 223 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1350;
6325 : 223 : {
6326 : 223 : tree tem;
6327 : 223 : tem = constant_boolean_node (false, type);
6328 : 223 : res_op->set_value (tem);
6329 : 223 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 737, __FILE__, __LINE__, true);
6330 : 223 : return true;
6331 : : }
6332 : 0 : next_after_fail1350:;
6333 : 0 : }
6334 : : else
6335 : : {
6336 : 9704 : if (cmp >= 0
6337 : 17962 : && (code1 == GT_EXPR || code1 == GE_EXPR)
6338 : 63 : && (code2 == LT_EXPR || code2 == LE_EXPR)
6339 : : )
6340 : : {
6341 : 63 : gimple_seq *lseq = seq;
6342 : 63 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1351;
6343 : 63 : {
6344 : 63 : tree tem;
6345 : 63 : tem = constant_boolean_node (false, type);
6346 : 63 : res_op->set_value (tem);
6347 : 63 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 738, __FILE__, __LINE__, true);
6348 : 63 : return true;
6349 : : }
6350 : 0 : next_after_fail1351:;
6351 : : }
6352 : : }
6353 : : }
6354 : : }
6355 : : }
6356 : : }
6357 : : }
6358 : : return false;
6359 : : }
6360 : :
6361 : : bool
6362 : 1272 : gimple_simplify_485 (gimple_match_op *res_op, gimple_seq *seq,
6363 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6364 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6365 : : {
6366 : 1272 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6367 : 2544 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
6368 : 2528 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
6369 : : )
6370 : : {
6371 : 1254 : gimple_seq *lseq = seq;
6372 : 1254 : if (lseq
6373 : 269 : && (!single_use (captures[0])
6374 : 95 : || !single_use (captures[2])))
6375 : 1159 : lseq = NULL;
6376 : 1254 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1375;
6377 : 1254 : {
6378 : 1254 : res_op->set_op (GT_EXPR, type, 2);
6379 : 1254 : res_op->ops[0] = captures[3];
6380 : 1254 : {
6381 : 1254 : tree _o1[2], _r1;
6382 : 1254 : _o1[0] = captures[1];
6383 : 1254 : _o1[1] = build_int_cst (TREE_TYPE (captures[1]), 1);
6384 : 1254 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6385 : 1254 : tem_op.resimplify (lseq, valueize);
6386 : 1254 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6387 : 1254 : if (!_r1) goto next_after_fail1375;
6388 : 95 : res_op->ops[1] = _r1;
6389 : : }
6390 : 95 : res_op->resimplify (lseq, valueize);
6391 : 95 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 741, __FILE__, __LINE__, true);
6392 : 95 : return true;
6393 : : }
6394 : : next_after_fail1375:;
6395 : : }
6396 : : return false;
6397 : : }
6398 : :
6399 : : bool
6400 : 186456 : gimple_simplify_488 (gimple_match_op *res_op, gimple_seq *seq,
6401 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6402 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6403 : : const enum tree_code ARG_UNUSED (shift))
6404 : : {
6405 : 186456 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6406 : 186456 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
6407 : 186456 : && TYPE_PRECISION (type) <= HOST_BITS_PER_WIDE_INT
6408 : 176871 : && tree_fits_uhwi_p (captures[4])
6409 : 176787 : && tree_to_uhwi (captures[4]) > 0
6410 : 363236 : && tree_to_uhwi (captures[4]) < TYPE_PRECISION (type)
6411 : : )
6412 : : {
6413 : 176776 : {
6414 : 176776 : unsigned int shiftc = tree_to_uhwi (captures[4]);
6415 : 176776 : unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (captures[5]);
6416 : 176776 : unsigned HOST_WIDE_INT newmask, zerobits = 0;
6417 : 176776 : tree shift_type = TREE_TYPE (captures[2]);
6418 : 176776 : unsigned int prec;
6419 : 176776 : if (shift == LSHIFT_EXPR)
6420 : 26199 : zerobits = ((HOST_WIDE_INT_1U << shiftc) - 1);
6421 : 150577 : else if (shift == RSHIFT_EXPR
6422 : 150577 : && type_has_mode_precision_p (shift_type))
6423 : : {
6424 : 150577 : prec = TYPE_PRECISION (TREE_TYPE (captures[2]));
6425 : 150577 : tree arg00 = captures[3];
6426 : 150577 : if (captures[2] != captures[3]
6427 : 150577 : && TYPE_UNSIGNED (TREE_TYPE (captures[3])))
6428 : : {
6429 : 0 : tree inner_type = TREE_TYPE (captures[3]);
6430 : 0 : if (type_has_mode_precision_p (inner_type)
6431 : 0 : && TYPE_PRECISION (inner_type) < prec)
6432 : : {
6433 : 0 : prec = TYPE_PRECISION (inner_type);
6434 : 0 : if (shiftc < prec)
6435 : 0 : shift_type = inner_type;
6436 : : }
6437 : : }
6438 : 150577 : zerobits = HOST_WIDE_INT_M1U;
6439 : 150577 : if (shiftc < prec)
6440 : : {
6441 : 150577 : zerobits >>= HOST_BITS_PER_WIDE_INT - shiftc;
6442 : 150577 : zerobits <<= prec - shiftc;
6443 : : }
6444 : 150577 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[2]))
6445 : 150577 : && prec == TYPE_PRECISION (TREE_TYPE (captures[2])))
6446 : : {
6447 : 15991 : if ((mask & zerobits) == 0)
6448 : 14439 : shift_type = unsigned_type_for (TREE_TYPE (captures[2]));
6449 : : else
6450 : : zerobits = 0;
6451 : : }
6452 : : }
6453 : 175224 : if ((mask & zerobits) == mask
6454 : : )
6455 : : {
6456 : 163 : gimple_seq *lseq = seq;
6457 : 163 : if (lseq
6458 : : && (!single_use (captures[0])
6459 : : || !single_use (captures[1])))
6460 : 163 : lseq = NULL;
6461 : 163 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1380;
6462 : 163 : {
6463 : 163 : tree tem;
6464 : 163 : tem = build_int_cst (type, 0);
6465 : 163 : res_op->set_value (tem);
6466 : 163 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 715, __FILE__, __LINE__, true);
6467 : 163 : return true;
6468 : : }
6469 : 0 : next_after_fail1380:;
6470 : : }
6471 : : else
6472 : : {
6473 : 176613 : {
6474 : 176613 : newmask = mask | zerobits;
6475 : 176613 : if (newmask != mask && (newmask & (newmask + 1)) == 0
6476 : : )
6477 : : {
6478 : : {
6479 : 31146 : for (prec = BITS_PER_UNIT;
6480 : 41838 : prec < HOST_BITS_PER_WIDE_INT; prec <<= 1)
6481 : 31632 : if (newmask == (HOST_WIDE_INT_1U << prec) - 1)
6482 : : break;
6483 : 10692 : if (prec < HOST_BITS_PER_WIDE_INT
6484 : 10206 : || newmask == HOST_WIDE_INT_M1U
6485 : : )
6486 : : {
6487 : 1073 : {
6488 : 1073 : tree newmaskt = build_int_cst_type (TREE_TYPE (captures[5]), newmask);
6489 : 1073 : if (!tree_int_cst_equal (newmaskt, captures[5])
6490 : : )
6491 : : {
6492 : 1073 : if (shift_type != TREE_TYPE (captures[2])
6493 : : )
6494 : : {
6495 : 122 : gimple_seq *lseq = seq;
6496 : 122 : if (lseq
6497 : 44 : && (!single_use (captures[0])
6498 : 17 : || !single_use (captures[1])))
6499 : 105 : lseq = NULL;
6500 : 122 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1381;
6501 : 122 : {
6502 : 122 : res_op->set_op (BIT_AND_EXPR, type, 2);
6503 : 122 : {
6504 : 122 : tree _r1;
6505 : 122 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
6506 : 122 : {
6507 : 122 : tree _o2[2], _r2;
6508 : 122 : {
6509 : 122 : tree _o3[1], _r3;
6510 : 122 : _o3[0] = captures[2];
6511 : 122 : if (shift_type != TREE_TYPE (_o3[0]) /* XXX */
6512 : 122 : && !useless_type_conversion_p (shift_type, TREE_TYPE (_o3[0])))
6513 : : {
6514 : 122 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, shift_type, _o3[0]);
6515 : 122 : tem_op.resimplify (lseq, valueize);
6516 : 122 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6517 : 122 : if (!_r3) goto next_after_fail1381;
6518 : : }
6519 : : else
6520 : : _r3 = _o3[0];
6521 : 29 : _o2[0] = _r3;
6522 : : }
6523 : 29 : _o2[1] = captures[4];
6524 : 29 : tem_op.set_op (shift, shift_type, 2);
6525 : 29 : tem_op.ops[0] = _o2[0];
6526 : 29 : tem_op.ops[1] = _o2[1];
6527 : 29 : tem_op.resimplify (lseq, valueize);
6528 : : }
6529 : 29 : if (type != tem_op.type
6530 : 29 : && !useless_type_conversion_p (type, tem_op.type))
6531 : : {
6532 : 29 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6533 : 29 : if (!_r1) goto next_after_fail1381;
6534 : 17 : tem_op.set_op (NOP_EXPR, type, 1);
6535 : 17 : tem_op.ops[0] = _r1;
6536 : 17 : tem_op.resimplify (lseq, valueize);
6537 : : }
6538 : 17 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6539 : 17 : if (!_r1) goto next_after_fail1381;
6540 : 17 : res_op->ops[0] = _r1;
6541 : : }
6542 : 17 : res_op->ops[1] = newmaskt;
6543 : 17 : res_op->resimplify (lseq, valueize);
6544 : 17 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 716, __FILE__, __LINE__, true);
6545 : 17 : return true;
6546 : : }
6547 : : next_after_fail1381:;
6548 : : }
6549 : : else
6550 : : {
6551 : 951 : gimple_seq *lseq = seq;
6552 : 951 : if (lseq
6553 : 75 : && (!single_use (captures[0])
6554 : 75 : || !single_use (captures[1])))
6555 : 876 : lseq = NULL;
6556 : 951 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1382;
6557 : 951 : {
6558 : 951 : res_op->set_op (BIT_AND_EXPR, type, 2);
6559 : 951 : res_op->ops[0] = captures[0];
6560 : 951 : res_op->ops[1] = newmaskt;
6561 : 951 : res_op->resimplify (lseq, valueize);
6562 : 951 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 717, __FILE__, __LINE__, true);
6563 : 951 : return true;
6564 : : }
6565 : 0 : next_after_fail1382:;
6566 : : }
6567 : : }
6568 : : }
6569 : : }
6570 : : }
6571 : : }
6572 : : }
6573 : : }
6574 : : }
6575 : : }
6576 : : return false;
6577 : : }
6578 : :
6579 : : bool
6580 : 39147 : gimple_simplify_505 (gimple_match_op *res_op, gimple_seq *seq,
6581 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6582 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6583 : : {
6584 : 39147 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6585 : 39147 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[2]))
6586 : 39147 : && (element_precision (TREE_TYPE (captures[2]))
6587 : 0 : <= element_precision (TREE_TYPE (captures[3]))
6588 : 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[3])))
6589 : : )
6590 : : {
6591 : 0 : {
6592 : 0 : tree shift_type = TREE_TYPE (captures[2]);
6593 : 0 : gimple_seq *lseq = seq;
6594 : 0 : if (lseq
6595 : 0 : && (!single_use (captures[0])
6596 : 0 : || !single_use (captures[1])))
6597 : 0 : lseq = NULL;
6598 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1402;
6599 : 0 : {
6600 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6601 : 0 : {
6602 : 0 : tree _o1[2], _r1;
6603 : 0 : {
6604 : 0 : tree _o2[1], _r2;
6605 : 0 : _o2[0] = captures[3];
6606 : 0 : if (shift_type != TREE_TYPE (_o2[0]) /* XXX */
6607 : 0 : && !useless_type_conversion_p (shift_type, TREE_TYPE (_o2[0])))
6608 : : {
6609 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, shift_type, _o2[0]);
6610 : 0 : tem_op.resimplify (lseq, valueize);
6611 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6612 : 0 : if (!_r2) goto next_after_fail1402;
6613 : : }
6614 : : else
6615 : : _r2 = _o2[0];
6616 : 0 : _o1[0] = _r2;
6617 : : }
6618 : 0 : _o1[1] = captures[4];
6619 : 0 : (*res_op).set_op (RSHIFT_EXPR, TREE_TYPE (_o1[0]), 2);
6620 : 0 : (*res_op).ops[0] = _o1[0];
6621 : 0 : (*res_op).ops[1] = _o1[1];
6622 : 0 : (*res_op).resimplify (lseq, valueize);
6623 : : }
6624 : 0 : if (type != res_op->type
6625 : 0 : && !useless_type_conversion_p (type, res_op->type))
6626 : : {
6627 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1402;
6628 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6629 : 0 : res_op->resimplify (lseq, valueize);
6630 : : }
6631 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 755, __FILE__, __LINE__, true);
6632 : 0 : return true;
6633 : : }
6634 : : next_after_fail1402:;
6635 : : }
6636 : : }
6637 : : return false;
6638 : : }
6639 : :
6640 : : bool
6641 : 51 : gimple_simplify_511 (gimple_match_op *res_op, gimple_seq *seq,
6642 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6643 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6644 : : {
6645 : 51 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6646 : 51 : if (INTEGRAL_TYPE_P (type)
6647 : : )
6648 : : {
6649 : 51 : {
6650 : 51 : tree itype = TREE_TYPE (captures[2]);
6651 : 51 : gimple_seq *lseq = seq;
6652 : 51 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1409;
6653 : 51 : {
6654 : 51 : res_op->set_op (NOP_EXPR, type, 1);
6655 : 51 : {
6656 : 51 : tree _o1[2], _r1;
6657 : 51 : _o1[0] = captures[2];
6658 : 51 : {
6659 : 51 : tree _o2[1], _r2;
6660 : 51 : _o2[0] = captures[0];
6661 : 51 : if (COMPARISON_CLASS_P (_o2[0]))
6662 : : {
6663 : 51 : if (!seq) return false;
6664 : 51 : _o2[0] = gimple_build (seq, TREE_CODE (_o2[0]), TREE_TYPE (_o2[0]), TREE_OPERAND (_o2[0], 0), TREE_OPERAND (_o2[0], 1));
6665 : : }
6666 : 51 : if (itype != TREE_TYPE (_o2[0]) /* XXX */
6667 : 51 : && !useless_type_conversion_p (itype, TREE_TYPE (_o2[0])))
6668 : : {
6669 : 51 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, itype, _o2[0]);
6670 : 51 : tem_op.resimplify (lseq, valueize);
6671 : 51 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6672 : 51 : if (!_r2) goto next_after_fail1409;
6673 : : }
6674 : : else
6675 : : _r2 = _o2[0];
6676 : 51 : _o1[1] = _r2;
6677 : : }
6678 : 51 : (*res_op).set_op (MINUS_EXPR, TREE_TYPE (_o1[0]), 2);
6679 : 51 : (*res_op).ops[0] = _o1[0];
6680 : 51 : (*res_op).ops[1] = _o1[1];
6681 : 51 : (*res_op).resimplify (lseq, valueize);
6682 : : }
6683 : 51 : if (type != res_op->type
6684 : 51 : && !useless_type_conversion_p (type, res_op->type))
6685 : : {
6686 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1409;
6687 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6688 : 0 : res_op->resimplify (lseq, valueize);
6689 : : }
6690 : 51 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 763, __FILE__, __LINE__, true);
6691 : 51 : return true;
6692 : : }
6693 : : next_after_fail1409:;
6694 : : }
6695 : : }
6696 : : return false;
6697 : : }
6698 : :
6699 : : bool
6700 : 616 : gimple_simplify_522 (gimple_match_op *res_op, gimple_seq *seq,
6701 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6702 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6703 : : {
6704 : 616 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6705 : 616 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
6706 : 616 : && bitwise_equal_p (captures[0], captures[2])
6707 : : )
6708 : : {
6709 : 427 : gimple_seq *lseq = seq;
6710 : 427 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1420;
6711 : 427 : {
6712 : 427 : res_op->set_op (NOP_EXPR, type, 1);
6713 : 427 : {
6714 : 427 : tree _o1[2], _r1;
6715 : 427 : _o1[0] = captures[0];
6716 : 427 : _o1[1] = captures[1];
6717 : 427 : (*res_op).set_op (EQ_EXPR, boolean_type_node, 2);
6718 : 427 : (*res_op).ops[0] = _o1[0];
6719 : 427 : (*res_op).ops[1] = _o1[1];
6720 : 427 : (*res_op).resimplify (lseq, valueize);
6721 : : }
6722 : 427 : if (type != res_op->type
6723 : 427 : && !useless_type_conversion_p (type, res_op->type))
6724 : : {
6725 : 426 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1420;
6726 : 426 : res_op->set_op (NOP_EXPR, type, 1);
6727 : 426 : res_op->resimplify (lseq, valueize);
6728 : : }
6729 : 427 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 774, __FILE__, __LINE__, true);
6730 : 427 : return true;
6731 : : }
6732 : : next_after_fail1420:;
6733 : : }
6734 : : return false;
6735 : : }
6736 : :
6737 : : bool
6738 : 2841 : gimple_simplify_530 (gimple_match_op *res_op, gimple_seq *seq,
6739 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6740 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6741 : : const enum tree_code ARG_UNUSED (cmp),
6742 : : const enum tree_code ARG_UNUSED (minmax))
6743 : : {
6744 : 2841 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6745 : 2841 : {
6746 : 2841 : tree_code code = minmax_from_comparison (cmp, captures[0], captures[1], captures[0], captures[4]);
6747 : 2841 : if ((cmp == LT_EXPR || cmp == LE_EXPR)
6748 : 2058 : && code == MIN_EXPR
6749 : 4754 : && integer_nonzerop (fold_build2 (LE_EXPR, boolean_type_node, captures[3], captures[4]))
6750 : : )
6751 : : {
6752 : 77 : gimple_seq *lseq = seq;
6753 : 77 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1476;
6754 : 77 : {
6755 : 77 : res_op->set_op (MIN_EXPR, type, 2);
6756 : 77 : res_op->ops[0] = captures[2];
6757 : 77 : res_op->ops[1] = captures[4];
6758 : 77 : res_op->resimplify (lseq, valueize);
6759 : 77 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 794, __FILE__, __LINE__, true);
6760 : 77 : return true;
6761 : : }
6762 : 0 : next_after_fail1476:;
6763 : : }
6764 : : else
6765 : : {
6766 : 2764 : if ((cmp == GT_EXPR || cmp == GE_EXPR)
6767 : 783 : && code == MAX_EXPR
6768 : 3031 : && integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node, captures[3], captures[4]))
6769 : : )
6770 : : {
6771 : 97 : gimple_seq *lseq = seq;
6772 : 97 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1477;
6773 : 97 : {
6774 : 97 : res_op->set_op (MAX_EXPR, type, 2);
6775 : 97 : res_op->ops[0] = captures[2];
6776 : 97 : res_op->ops[1] = captures[4];
6777 : 97 : res_op->resimplify (lseq, valueize);
6778 : 97 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 795, __FILE__, __LINE__, true);
6779 : 97 : return true;
6780 : : }
6781 : 0 : next_after_fail1477:;
6782 : : }
6783 : : }
6784 : : }
6785 : : return false;
6786 : : }
6787 : :
6788 : : bool
6789 : 3 : gimple_simplify_532 (gimple_match_op *res_op, gimple_seq *seq,
6790 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6791 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6792 : : {
6793 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6794 : 3 : gimple_seq *lseq = seq;
6795 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1480;
6796 : 3 : {
6797 : 3 : tree tem;
6798 : 3 : tem = captures[2];
6799 : 3 : res_op->set_value (tem);
6800 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 798, __FILE__, __LINE__, true);
6801 : : return true;
6802 : : }
6803 : 0 : next_after_fail1480:;
6804 : 0 : return false;
6805 : : }
6806 : :
6807 : : bool
6808 : 1 : gimple_simplify_533 (gimple_match_op *res_op, gimple_seq *seq,
6809 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6810 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6811 : : {
6812 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6813 : 1 : gimple_seq *lseq = seq;
6814 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1481;
6815 : 1 : {
6816 : 1 : tree tem;
6817 : 1 : tem = captures[2];
6818 : 1 : res_op->set_value (tem);
6819 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 799, __FILE__, __LINE__, true);
6820 : : return true;
6821 : : }
6822 : 0 : next_after_fail1481:;
6823 : 0 : return false;
6824 : : }
6825 : :
6826 : : bool
6827 : 1 : gimple_simplify_535 (gimple_match_op *res_op, gimple_seq *seq,
6828 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6829 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6830 : : const enum tree_code ARG_UNUSED (op))
6831 : : {
6832 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6833 : 1 : if (ANY_INTEGRAL_TYPE_P (type)
6834 : : )
6835 : : {
6836 : 1 : gimple_seq *lseq = seq;
6837 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1483;
6838 : 1 : {
6839 : 1 : tree tem;
6840 : 1 : tem = captures[2];
6841 : 1 : res_op->set_value (tem);
6842 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 801, __FILE__, __LINE__, true);
6843 : 1 : return true;
6844 : : }
6845 : 0 : next_after_fail1483:;
6846 : : }
6847 : : return false;
6848 : : }
6849 : :
6850 : : bool
6851 : 0 : gimple_simplify_537 (gimple_match_op *res_op, gimple_seq *seq,
6852 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6853 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6854 : : const enum tree_code ARG_UNUSED (op))
6855 : : {
6856 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6857 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
6858 : : )
6859 : : {
6860 : 0 : gimple_seq *lseq = seq;
6861 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1485;
6862 : 0 : {
6863 : 0 : tree tem;
6864 : 0 : tem = captures[2];
6865 : 0 : res_op->set_value (tem);
6866 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 801, __FILE__, __LINE__, true);
6867 : 0 : return true;
6868 : : }
6869 : 0 : next_after_fail1485:;
6870 : : }
6871 : : return false;
6872 : : }
6873 : :
6874 : : bool
6875 : 1 : gimple_simplify_539 (gimple_match_op *res_op, gimple_seq *seq,
6876 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6877 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6878 : : {
6879 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6880 : 1 : if (wi::to_wide (uniform_integer_cst_p (captures[3])) == 2
6881 : : )
6882 : : {
6883 : 1 : gimple_seq *lseq = seq;
6884 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1487;
6885 : 1 : {
6886 : 1 : tree tem;
6887 : 1 : tem = captures[2];
6888 : 1 : res_op->set_value (tem);
6889 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 802, __FILE__, __LINE__, true);
6890 : 1 : return true;
6891 : : }
6892 : 0 : next_after_fail1487:;
6893 : : }
6894 : : return false;
6895 : : }
6896 : :
6897 : : bool
6898 : 0 : gimple_simplify_541 (gimple_match_op *res_op, gimple_seq *seq,
6899 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6900 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6901 : : {
6902 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6903 : 0 : if (wi::to_wide (uniform_integer_cst_p (captures[3])) == 2
6904 : : )
6905 : : {
6906 : 0 : gimple_seq *lseq = seq;
6907 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1489;
6908 : 0 : {
6909 : 0 : tree tem;
6910 : 0 : tem = captures[2];
6911 : 0 : res_op->set_value (tem);
6912 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 802, __FILE__, __LINE__, true);
6913 : 0 : return true;
6914 : : }
6915 : 0 : next_after_fail1489:;
6916 : : }
6917 : : return false;
6918 : : }
6919 : :
6920 : : bool
6921 : 3 : gimple_simplify_545 (gimple_match_op *res_op, gimple_seq *seq,
6922 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6923 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6924 : : {
6925 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6926 : 3 : if (wi::abs (wi::to_wide (captures[1])) == wi::to_wide (captures[3])
6927 : : )
6928 : : {
6929 : 3 : if (ABS_EXPR != ABSU_EXPR && wi::only_sign_bit_p (wi::to_wide (captures[1]))
6930 : : )
6931 : : {
6932 : 2 : {
6933 : 2 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
6934 : 2 : gimple_seq *lseq = seq;
6935 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1493;
6936 : 2 : {
6937 : 2 : res_op->set_op (NOP_EXPR, type, 1);
6938 : 2 : {
6939 : 2 : tree _o1[1], _r1;
6940 : 2 : _o1[0] = captures[0];
6941 : 2 : (*res_op).set_op (ABSU_EXPR, utype, 1);
6942 : 2 : (*res_op).ops[0] = _o1[0];
6943 : 2 : (*res_op).resimplify (lseq, valueize);
6944 : : }
6945 : 2 : if (type != res_op->type
6946 : 2 : && !useless_type_conversion_p (type, res_op->type))
6947 : : {
6948 : 2 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1493;
6949 : 2 : res_op->set_op (NOP_EXPR, type, 1);
6950 : 2 : res_op->resimplify (lseq, valueize);
6951 : : }
6952 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 805, __FILE__, __LINE__, true);
6953 : 2 : return true;
6954 : : }
6955 : : next_after_fail1493:;
6956 : : }
6957 : : }
6958 : : else
6959 : : {
6960 : 1 : gimple_seq *lseq = seq;
6961 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1494;
6962 : 1 : {
6963 : 1 : tree tem;
6964 : 1 : tem = captures[2];
6965 : 1 : res_op->set_value (tem);
6966 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 806, __FILE__, __LINE__, true);
6967 : 1 : return true;
6968 : : }
6969 : 0 : next_after_fail1494:;
6970 : : }
6971 : : }
6972 : : return false;
6973 : : }
6974 : :
6975 : : bool
6976 : 0 : gimple_simplify_552 (gimple_match_op *res_op, gimple_seq *seq,
6977 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6978 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6979 : : const enum tree_code ARG_UNUSED (cmp))
6980 : : {
6981 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6982 : 0 : if (!HONOR_SIGNED_ZEROS (type)
6983 : : )
6984 : : {
6985 : 0 : gimple_seq *lseq = seq;
6986 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1502;
6987 : 0 : {
6988 : 0 : tree tem;
6989 : 0 : tem = captures[3];
6990 : 0 : res_op->set_value (tem);
6991 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 812, __FILE__, __LINE__, true);
6992 : 0 : return true;
6993 : : }
6994 : 0 : next_after_fail1502:;
6995 : : }
6996 : : return false;
6997 : : }
6998 : :
6999 : : bool
7000 : 1164 : gimple_simplify_561 (gimple_match_op *res_op, gimple_seq *seq,
7001 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7002 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7003 : : {
7004 : 1164 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7005 : 1164 : if (!POINTER_TYPE_P (type) && integer_pow2p (captures[2])
7006 : : )
7007 : : {
7008 : 14 : {
7009 : 14 : int shift = (wi::exact_log2 (wi::to_wide (captures[2]))
7010 : 14 : - wi::exact_log2 (wi::to_wide (captures[1])));
7011 : 14 : if (shift > 0
7012 : : )
7013 : : {
7014 : 0 : gimple_seq *lseq = seq;
7015 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1511;
7016 : 0 : {
7017 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
7018 : 0 : {
7019 : 0 : tree _o1[2], _r1;
7020 : 0 : {
7021 : 0 : tree _o2[1], _r2;
7022 : 0 : _o2[0] = captures[0];
7023 : 0 : if (type != TREE_TYPE (_o2[0]) /* XXX */
7024 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
7025 : : {
7026 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
7027 : 0 : tem_op.resimplify (lseq, valueize);
7028 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7029 : 0 : if (!_r2) goto next_after_fail1511;
7030 : : }
7031 : : else
7032 : : _r2 = _o2[0];
7033 : 0 : _o1[0] = _r2;
7034 : : }
7035 : 0 : _o1[1] = build_int_cst (integer_type_node, shift);
7036 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7037 : 0 : tem_op.resimplify (lseq, valueize);
7038 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7039 : 0 : if (!_r1) goto next_after_fail1511;
7040 : 0 : res_op->ops[0] = _r1;
7041 : : }
7042 : 0 : res_op->ops[1] = captures[2];
7043 : 0 : res_op->resimplify (lseq, valueize);
7044 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 818, __FILE__, __LINE__, true);
7045 : 0 : return true;
7046 : : }
7047 : : next_after_fail1511:;
7048 : : }
7049 : : else
7050 : : {
7051 : 14 : gimple_seq *lseq = seq;
7052 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1512;
7053 : 14 : {
7054 : 14 : res_op->set_op (BIT_AND_EXPR, type, 2);
7055 : 14 : {
7056 : 14 : tree _r1;
7057 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
7058 : 14 : {
7059 : 14 : tree _o2[2], _r2;
7060 : 14 : _o2[0] = captures[0];
7061 : 14 : _o2[1] = build_int_cst (integer_type_node, -shift);
7062 : 14 : tem_op.set_op (RSHIFT_EXPR, TREE_TYPE (_o2[0]), 2);
7063 : 14 : tem_op.ops[0] = _o2[0];
7064 : 14 : tem_op.ops[1] = _o2[1];
7065 : 14 : tem_op.resimplify (lseq, valueize);
7066 : : }
7067 : 14 : if (type != tem_op.type
7068 : 14 : && !useless_type_conversion_p (type, tem_op.type))
7069 : : {
7070 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7071 : 28 : if (!_r1) goto next_after_fail1512;
7072 : 14 : tem_op.set_op (NOP_EXPR, type, 1);
7073 : 14 : tem_op.ops[0] = _r1;
7074 : 14 : tem_op.resimplify (lseq, valueize);
7075 : : }
7076 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7077 : 14 : if (!_r1) goto next_after_fail1512;
7078 : 0 : res_op->ops[0] = _r1;
7079 : : }
7080 : 0 : res_op->ops[1] = captures[2];
7081 : 0 : res_op->resimplify (lseq, valueize);
7082 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 819, __FILE__, __LINE__, true);
7083 : 0 : return true;
7084 : : }
7085 : : next_after_fail1512:;
7086 : : }
7087 : : }
7088 : : }
7089 : : return false;
7090 : : }
7091 : :
7092 : : bool
7093 : 8 : gimple_simplify_577 (gimple_match_op *res_op, gimple_seq *seq,
7094 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7095 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7096 : : const enum tree_code ARG_UNUSED (cmp))
7097 : : {
7098 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7099 : 8 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
7100 : 8 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
7101 : 16 : && element_precision (captures[1])
7102 : 8 : <= element_precision (captures[0])
7103 : 16 : && bitwise_equal_p (captures[1], captures[2])
7104 : : )
7105 : : {
7106 : 16 : if ((ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
7107 : 6 : && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
7108 : 12 : || TYPE_UNSIGNED (TREE_TYPE (captures[2]))
7109 : : )
7110 : : {
7111 : 6 : {
7112 : 6 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
7113 : 6 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
7114 : 6 : if (types_match (captures[0], stype)
7115 : : )
7116 : : {
7117 : 6 : gimple_seq *lseq = seq;
7118 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1545;
7119 : 6 : {
7120 : 6 : res_op->set_op (NOP_EXPR, type, 1);
7121 : 6 : {
7122 : 6 : tree _o1[1], _r1;
7123 : 6 : {
7124 : 6 : tree _o2[1], _r2;
7125 : 6 : _o2[0] = captures[0];
7126 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
7127 : 6 : tem_op.resimplify (lseq, valueize);
7128 : 6 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7129 : 6 : if (!_r2) goto next_after_fail1545;
7130 : 6 : _o1[0] = _r2;
7131 : : }
7132 : 6 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
7133 : 6 : (*res_op).ops[0] = _o1[0];
7134 : 6 : (*res_op).resimplify (lseq, valueize);
7135 : : }
7136 : 6 : if (type != res_op->type
7137 : 6 : && !useless_type_conversion_p (type, res_op->type))
7138 : : {
7139 : 4 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1545;
7140 : 4 : res_op->set_op (NOP_EXPR, type, 1);
7141 : 4 : res_op->resimplify (lseq, valueize);
7142 : : }
7143 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 828, __FILE__, __LINE__, true);
7144 : 6 : return true;
7145 : : }
7146 : : next_after_fail1545:;
7147 : : }
7148 : : else
7149 : : {
7150 : 0 : gimple_seq *lseq = seq;
7151 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1546;
7152 : 0 : {
7153 : 0 : res_op->set_op (NOP_EXPR, type, 1);
7154 : 0 : {
7155 : 0 : tree _o1[1], _r1;
7156 : 0 : {
7157 : 0 : tree _o2[1], _r2;
7158 : 0 : {
7159 : 0 : tree _o3[1], _r3;
7160 : 0 : _o3[0] = captures[2];
7161 : 0 : if (stype != TREE_TYPE (_o3[0]) /* XXX */
7162 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o3[0])))
7163 : : {
7164 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o3[0]);
7165 : 0 : tem_op.resimplify (lseq, valueize);
7166 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
7167 : 0 : if (!_r3) goto next_after_fail1546;
7168 : : }
7169 : : else
7170 : : _r3 = _o3[0];
7171 : 0 : _o2[0] = _r3;
7172 : : }
7173 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
7174 : 0 : tem_op.resimplify (lseq, valueize);
7175 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7176 : 0 : if (!_r2) goto next_after_fail1546;
7177 : 0 : _o1[0] = _r2;
7178 : : }
7179 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
7180 : 0 : (*res_op).ops[0] = _o1[0];
7181 : 0 : (*res_op).resimplify (lseq, valueize);
7182 : : }
7183 : 0 : if (type != res_op->type
7184 : 0 : && !useless_type_conversion_p (type, res_op->type))
7185 : : {
7186 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1546;
7187 : 0 : res_op->set_op (NOP_EXPR, type, 1);
7188 : 0 : res_op->resimplify (lseq, valueize);
7189 : : }
7190 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 829, __FILE__, __LINE__, true);
7191 : 0 : return true;
7192 : : }
7193 : : next_after_fail1546:;
7194 : : }
7195 : : }
7196 : : }
7197 : : else
7198 : : {
7199 : 2 : gimple_seq *lseq = seq;
7200 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1547;
7201 : 2 : {
7202 : 2 : res_op->set_op (NOP_EXPR, type, 1);
7203 : 2 : {
7204 : 2 : tree _o1[1], _r1;
7205 : 2 : {
7206 : 2 : tree _o2[1], _r2;
7207 : 2 : _o2[0] = captures[2];
7208 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
7209 : 2 : tem_op.resimplify (lseq, valueize);
7210 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7211 : 2 : if (!_r2) goto next_after_fail1547;
7212 : 2 : _o1[0] = _r2;
7213 : : }
7214 : 2 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
7215 : 2 : (*res_op).ops[0] = _o1[0];
7216 : 2 : (*res_op).resimplify (lseq, valueize);
7217 : : }
7218 : 2 : if (type != res_op->type
7219 : 2 : && !useless_type_conversion_p (type, res_op->type))
7220 : : {
7221 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1547;
7222 : 0 : res_op->set_op (NOP_EXPR, type, 1);
7223 : 0 : res_op->resimplify (lseq, valueize);
7224 : : }
7225 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 830, __FILE__, __LINE__, true);
7226 : 2 : return true;
7227 : : }
7228 : : next_after_fail1547:;
7229 : : }
7230 : : }
7231 : : return false;
7232 : : }
7233 : :
7234 : : bool
7235 : 161 : gimple_simplify_603 (gimple_match_op *res_op, gimple_seq *seq,
7236 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7237 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7238 : : {
7239 : 161 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7240 : 161 : gimple_seq *lseq = seq;
7241 : 161 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1588;
7242 : 161 : {
7243 : 161 : tree tem;
7244 : 161 : tem = captures[1];
7245 : 161 : res_op->set_value (tem);
7246 : 161 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 853, __FILE__, __LINE__, true);
7247 : : return true;
7248 : : }
7249 : 0 : next_after_fail1588:;
7250 : 0 : return false;
7251 : : }
7252 : :
7253 : : bool
7254 : 286 : gimple_simplify_605 (gimple_match_op *res_op, gimple_seq *seq,
7255 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7256 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7257 : : const combined_fn ARG_UNUSED (minmax))
7258 : : {
7259 : 286 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7260 : 286 : if (!tree_expr_maybe_signaling_nan_p (captures[0])
7261 : : )
7262 : : {
7263 : 170 : gimple_seq *lseq = seq;
7264 : 170 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1590;
7265 : 170 : {
7266 : 170 : tree tem;
7267 : 170 : tem = captures[0];
7268 : 170 : res_op->set_value (tem);
7269 : 170 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 855, __FILE__, __LINE__, true);
7270 : 170 : return true;
7271 : : }
7272 : 0 : next_after_fail1590:;
7273 : : }
7274 : : return false;
7275 : : }
7276 : :
7277 : : bool
7278 : 200 : gimple_simplify_610 (gimple_match_op *res_op, gimple_seq *seq,
7279 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7280 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7281 : : const enum tree_code ARG_UNUSED (rotate),
7282 : : const enum tree_code ARG_UNUSED (orotate))
7283 : : {
7284 : 200 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7285 : 200 : {
7286 : 200 : auto prec = element_precision (TREE_TYPE (captures[0]));
7287 : 200 : if (prec == wi::to_wide (captures[2])
7288 : : )
7289 : : {
7290 : 140 : if (expr_not_equal_to (captures[3], wi::uhwi (prec,
7291 : 140 : TYPE_PRECISION (TREE_TYPE (captures[3]))))
7292 : : )
7293 : : {
7294 : 4 : gimple_seq *lseq = seq;
7295 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1595;
7296 : 4 : {
7297 : 4 : res_op->set_op (orotate, type, 2);
7298 : 4 : res_op->ops[0] = captures[0];
7299 : 4 : res_op->ops[1] = captures[3];
7300 : 4 : res_op->resimplify (lseq, valueize);
7301 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 860, __FILE__, __LINE__, true);
7302 : 14 : return true;
7303 : : }
7304 : 0 : next_after_fail1595:;
7305 : : }
7306 : : else
7307 : : {
7308 : 136 : if (single_use (captures[1])
7309 : 134 : && pow2p_hwi (prec)
7310 : 134 : && cfun
7311 : 270 : && ((cfun->curr_properties & PROP_last_full_fold) != 0
7312 : 126 : || !flag_tree_vrp
7313 : 124 : || optimize_debug)
7314 : : )
7315 : : {
7316 : 10 : gimple_seq *lseq = seq;
7317 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1596;
7318 : 10 : {
7319 : 10 : res_op->set_op (orotate, type, 2);
7320 : 10 : res_op->ops[0] = captures[0];
7321 : 10 : {
7322 : 10 : tree _o1[2], _r1;
7323 : 10 : _o1[0] = captures[3];
7324 : 10 : _o1[1] = build_int_cst (TREE_TYPE (captures[3]), prec - 1);
7325 : 10 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7326 : 10 : tem_op.resimplify (lseq, valueize);
7327 : 10 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7328 : 10 : if (!_r1) goto next_after_fail1596;
7329 : 10 : res_op->ops[1] = _r1;
7330 : : }
7331 : 10 : res_op->resimplify (lseq, valueize);
7332 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 861, __FILE__, __LINE__, true);
7333 : 10 : return true;
7334 : : }
7335 : 186 : next_after_fail1596:;
7336 : : }
7337 : : }
7338 : : }
7339 : : }
7340 : 186 : return false;
7341 : : }
7342 : :
7343 : : bool
7344 : 0 : gimple_simplify_628 (gimple_match_op *res_op, gimple_seq *seq,
7345 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7346 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7347 : : const combined_fn ARG_UNUSED (cond_op))
7348 : : {
7349 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7350 : 0 : {
7351 : 0 : tree op_type = TREE_TYPE (captures[4]);
7352 : 0 : if (element_precision (type) == element_precision (op_type)
7353 : : )
7354 : : {
7355 : 0 : gimple_seq *lseq = seq;
7356 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1616;
7357 : 0 : {
7358 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
7359 : 0 : {
7360 : 0 : tree _o1[5], _r1;
7361 : 0 : _o1[0] = captures[0];
7362 : 0 : _o1[1] = captures[1];
7363 : 0 : _o1[2] = captures[2];
7364 : 0 : _o1[3] = captures[3];
7365 : 0 : {
7366 : 0 : tree _o2[1], _r2;
7367 : 0 : _o2[0] = captures[5];
7368 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
7369 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
7370 : : {
7371 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
7372 : 0 : tem_op.resimplify (lseq, valueize);
7373 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7374 : 0 : if (!_r2) goto next_after_fail1616;
7375 : : }
7376 : : else
7377 : : _r2 = _o2[0];
7378 : 0 : _o1[4] = _r2;
7379 : : }
7380 : 0 : (*res_op).set_op (cond_op, TREE_TYPE (_o1[1]), 5);
7381 : 0 : (*res_op).ops[0] = _o1[0];
7382 : 0 : (*res_op).ops[1] = _o1[1];
7383 : 0 : (*res_op).ops[2] = _o1[2];
7384 : 0 : (*res_op).ops[3] = _o1[3];
7385 : 0 : (*res_op).ops[4] = _o1[4];
7386 : 0 : (*res_op).resimplify (lseq, valueize);
7387 : : }
7388 : 0 : if (type != res_op->type
7389 : 0 : && !useless_type_conversion_p (type, res_op->type))
7390 : : {
7391 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1616;
7392 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
7393 : 0 : res_op->resimplify (lseq, valueize);
7394 : : }
7395 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 876, __FILE__, __LINE__, true);
7396 : 0 : return true;
7397 : : }
7398 : : next_after_fail1616:;
7399 : : }
7400 : : }
7401 : : return false;
7402 : : }
7403 : :
7404 : : bool
7405 : 822523 : gimple_simplify_636 (gimple_match_op *res_op, gimple_seq *seq,
7406 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7407 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7408 : : const enum tree_code ARG_UNUSED (cmp))
7409 : : {
7410 : 822523 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7411 : 822523 : if (REAL_VALUE_ISNAN (TREE_REAL_CST (captures[1]))
7412 : 822523 : && (cmp != LTGT_EXPR || ! flag_trapping_math)
7413 : : )
7414 : : {
7415 : 1 : gimple_seq *lseq = seq;
7416 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1624;
7417 : 1 : {
7418 : 1 : tree tem;
7419 : 2 : tem = constant_boolean_node (cmp == ORDERED_EXPR || cmp == LTGT_EXPR
7420 : 1 : ? false : true, type);
7421 : 1 : res_op->set_value (tem);
7422 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 884, __FILE__, __LINE__, true);
7423 : 1 : return true;
7424 : : }
7425 : 0 : next_after_fail1624:;
7426 : : }
7427 : : return false;
7428 : : }
7429 : :
7430 : : bool
7431 : 17349 : gimple_simplify_639 (gimple_match_op *res_op, gimple_seq *seq,
7432 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7433 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7434 : : const combined_fn ARG_UNUSED (ovf))
7435 : : {
7436 : 17349 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7437 : 34698 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
7438 : 17227 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
7439 : 17227 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
7440 : 32843 : && (!TYPE_UNSIGNED (TREE_TYPE (captures[0])) || TYPE_UNSIGNED (TREE_TYPE (captures[1])))
7441 : : )
7442 : : {
7443 : 14521 : gimple_seq *lseq = seq;
7444 : 14521 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1627;
7445 : 14521 : {
7446 : 14521 : res_op->set_op (ovf, type, 2);
7447 : 14521 : res_op->ops[0] = captures[1];
7448 : 14521 : res_op->ops[1] = captures[2];
7449 : 14521 : res_op->resimplify (lseq, valueize);
7450 : 14521 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 887, __FILE__, __LINE__, true);
7451 : 14521 : return true;
7452 : : }
7453 : 0 : next_after_fail1627:;
7454 : : }
7455 : : return false;
7456 : : }
7457 : :
7458 : : bool
7459 : 692 : gimple_simplify_648 (gimple_match_op *res_op, gimple_seq *seq,
7460 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7461 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7462 : : const combined_fn ARG_UNUSED (fns))
7463 : : {
7464 : 692 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7465 : 692 : gimple_seq *lseq = seq;
7466 : 692 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1636;
7467 : 692 : {
7468 : 692 : tree tem;
7469 : 692 : tem = captures[0];
7470 : 692 : res_op->set_value (tem);
7471 : 692 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 896, __FILE__, __LINE__, true);
7472 : : return true;
7473 : : }
7474 : 0 : next_after_fail1636:;
7475 : 0 : return false;
7476 : : }
7477 : :
7478 : : bool
7479 : 504 : gimple_simplify_654 (gimple_match_op *res_op, gimple_seq *seq,
7480 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7481 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7482 : : const combined_fn ARG_UNUSED (froms),
7483 : : const combined_fn ARG_UNUSED (tos))
7484 : : {
7485 : 504 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7486 : 504 : if (optimize && canonicalize_math_p ()
7487 : : )
7488 : : {
7489 : 504 : gimple_seq *lseq = seq;
7490 : 504 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1642;
7491 : 504 : {
7492 : 504 : res_op->set_op (tos, type, 1);
7493 : 504 : res_op->ops[0] = captures[0];
7494 : 504 : res_op->resimplify (lseq, valueize);
7495 : 504 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 902, __FILE__, __LINE__, true);
7496 : 504 : return true;
7497 : : }
7498 : 0 : next_after_fail1642:;
7499 : : }
7500 : : return false;
7501 : : }
7502 : :
7503 : : bool
7504 : 1035 : gimple_simplify_661 (gimple_match_op *res_op, gimple_seq *seq,
7505 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7506 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7507 : : const combined_fn ARG_UNUSED (SIGNBIT))
7508 : : {
7509 : 1035 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7510 : 1035 : gimple_seq *lseq = seq;
7511 : 1035 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1649;
7512 : 1035 : {
7513 : 1035 : tree tem;
7514 : 1035 : tem = integer_zero_node;
7515 : 1035 : res_op->set_value (tem);
7516 : 1035 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
7517 : : return true;
7518 : : }
7519 : 0 : next_after_fail1649:;
7520 : 0 : return false;
7521 : : }
7522 : :
7523 : : bool
7524 : 0 : gimple_simplify_666 (gimple_match_op *res_op, gimple_seq *seq,
7525 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7526 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7527 : : {
7528 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7529 : 0 : if (canonicalize_math_after_vectorization_p ()
7530 : : )
7531 : : {
7532 : 0 : gimple_seq *lseq = seq;
7533 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1654;
7534 : 0 : {
7535 : 0 : res_op->set_op (CFN_FNMS, type, 3);
7536 : 0 : res_op->ops[0] = captures[0];
7537 : 0 : res_op->ops[1] = captures[1];
7538 : 0 : res_op->ops[2] = captures[2];
7539 : 0 : res_op->resimplify (lseq, valueize);
7540 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 914, __FILE__, __LINE__, true);
7541 : 0 : return true;
7542 : : }
7543 : 0 : next_after_fail1654:;
7544 : : }
7545 : : return false;
7546 : : }
7547 : :
7548 : : bool
7549 : 1 : gimple_simplify_674 (gimple_match_op *res_op, gimple_seq *seq,
7550 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7551 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7552 : : const combined_fn ARG_UNUSED (ctz))
7553 : : {
7554 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7555 : 1 : {
7556 : 1 : tree t = TREE_TYPE (captures[0]);
7557 : 1 : gimple_seq *lseq = seq;
7558 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1662;
7559 : 1 : {
7560 : 1 : res_op->set_op (ctz, type, 1);
7561 : 1 : {
7562 : 1 : tree _o1[1], _r1;
7563 : 1 : _o1[0] = captures[1];
7564 : 1 : if (t != TREE_TYPE (_o1[0]) /* XXX */
7565 : 1 : && !useless_type_conversion_p (t, TREE_TYPE (_o1[0])))
7566 : : {
7567 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t, _o1[0]);
7568 : 0 : tem_op.resimplify (lseq, valueize);
7569 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7570 : 0 : if (!_r1) goto next_after_fail1662;
7571 : : }
7572 : : else
7573 : : _r1 = _o1[0];
7574 : 1 : res_op->ops[0] = _r1;
7575 : : }
7576 : 1 : res_op->resimplify (lseq, valueize);
7577 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
7578 : : return true;
7579 : : }
7580 : : next_after_fail1662:;
7581 : : }
7582 : : return false;
7583 : : }
7584 : :
7585 : : bool
7586 : 6 : gimple_simplify_683 (gimple_match_op *res_op, gimple_seq *seq,
7587 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7588 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7589 : : const combined_fn ARG_UNUSED (PARITY))
7590 : : {
7591 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7592 : 6 : gimple_seq *lseq = seq;
7593 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1676;
7594 : 6 : {
7595 : 6 : res_op->set_op (PARITY, type, 1);
7596 : 6 : res_op->ops[0] = captures[0];
7597 : 6 : res_op->resimplify (lseq, valueize);
7598 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 931, __FILE__, __LINE__, true);
7599 : : return true;
7600 : : }
7601 : 0 : next_after_fail1676:;
7602 : 0 : return false;
7603 : : }
7604 : :
7605 : : bool
7606 : 281 : gimple_simplify_686 (gimple_match_op *res_op, gimple_seq *seq,
7607 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7608 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7609 : : const combined_fn ARG_UNUSED (PARITY))
7610 : : {
7611 : 281 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7612 : 562 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
7613 : 281 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
7614 : 281 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
7615 : 416 : && (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
7616 : 24 : || ((TYPE_PRECISION (TREE_TYPE (captures[0]))
7617 : 24 : - TYPE_PRECISION (TREE_TYPE (captures[1]))) & 1) == 0)
7618 : : )
7619 : : {
7620 : 135 : {
7621 : 135 : combined_fn cfn = CFN_LAST;
7622 : 135 : tree type0 = TREE_TYPE (captures[1]);
7623 : 135 : if (TREE_CODE (type0) == BITINT_TYPE)
7624 : : {
7625 : 8 : if (TYPE_PRECISION (type0) > MAX_FIXED_MODE_SIZE)
7626 : : cfn = CFN_PARITY;
7627 : : else
7628 : 0 : type0
7629 : 0 : = build_nonstandard_integer_type (TYPE_PRECISION (type0),
7630 : : 1);
7631 : : }
7632 : 135 : type0 = unsigned_type_for (type0);
7633 : 135 : if (cfn == CFN_LAST
7634 : 135 : && direct_internal_fn_supported_p (IFN_PARITY, type0,
7635 : : OPTIMIZE_FOR_BOTH))
7636 : : cfn = CFN_PARITY;
7637 : 81 : if (cfn == CFN_LAST
7638 : 77 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > BITS_PER_WORD
7639 : 81 : && !direct_internal_fn_supported_p (IFN_PARITY,
7640 : 0 : TREE_TYPE (captures[0]),
7641 : : OPTIMIZE_FOR_BOTH))
7642 : : {
7643 : 0 : if (TYPE_PRECISION (type0)
7644 : 0 : == TYPE_PRECISION (unsigned_type_node))
7645 : : cfn = CFN_BUILT_IN_PARITY;
7646 : 0 : else if (TYPE_PRECISION (type0)
7647 : 0 : == TYPE_PRECISION (long_long_unsigned_type_node))
7648 : : cfn = CFN_BUILT_IN_PARITYLL;
7649 : : }
7650 : 135 : if (cfn == CFN_PARITY
7651 : : )
7652 : : {
7653 : 58 : gimple_seq *lseq = seq;
7654 : 58 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1679;
7655 : 58 : {
7656 : 58 : res_op->set_op (CFN_PARITY, type, 1);
7657 : 58 : {
7658 : 58 : tree _o1[1], _r1;
7659 : 58 : _o1[0] = captures[1];
7660 : 58 : if (type0 != TREE_TYPE (_o1[0]) /* XXX */
7661 : 58 : && !useless_type_conversion_p (type0, TREE_TYPE (_o1[0])))
7662 : : {
7663 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type0, _o1[0]);
7664 : 2 : tem_op.resimplify (lseq, valueize);
7665 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7666 : 2 : if (!_r1) goto next_after_fail1679;
7667 : : }
7668 : : else
7669 : : _r1 = _o1[0];
7670 : 57 : res_op->ops[0] = _r1;
7671 : : }
7672 : 57 : res_op->resimplify (lseq, valueize);
7673 : 57 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 934, __FILE__, __LINE__, true);
7674 : 57 : return true;
7675 : : }
7676 : : next_after_fail1679:;
7677 : : }
7678 : : else
7679 : : {
7680 : 77 : if (cfn == CFN_BUILT_IN_PARITY
7681 : : )
7682 : : {
7683 : 0 : gimple_seq *lseq = seq;
7684 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1680;
7685 : 0 : {
7686 : 0 : res_op->set_op (CFN_BUILT_IN_PARITY, type, 1);
7687 : 0 : {
7688 : 0 : tree _o1[1], _r1;
7689 : 0 : _o1[0] = captures[1];
7690 : 0 : if (type0 != TREE_TYPE (_o1[0]) /* XXX */
7691 : 0 : && !useless_type_conversion_p (type0, TREE_TYPE (_o1[0])))
7692 : : {
7693 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type0, _o1[0]);
7694 : 0 : tem_op.resimplify (lseq, valueize);
7695 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7696 : 0 : if (!_r1) goto next_after_fail1680;
7697 : : }
7698 : : else
7699 : : _r1 = _o1[0];
7700 : 0 : res_op->ops[0] = _r1;
7701 : : }
7702 : 0 : res_op->resimplify (lseq, valueize);
7703 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 935, __FILE__, __LINE__, true);
7704 : 0 : return true;
7705 : : }
7706 : : next_after_fail1680:;
7707 : : }
7708 : : else
7709 : : {
7710 : 77 : if (cfn == CFN_BUILT_IN_PARITYLL
7711 : : )
7712 : : {
7713 : 0 : gimple_seq *lseq = seq;
7714 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1681;
7715 : 0 : {
7716 : 0 : res_op->set_op (CFN_BUILT_IN_PARITYLL, type, 1);
7717 : 0 : {
7718 : 0 : tree _o1[1], _r1;
7719 : 0 : _o1[0] = captures[1];
7720 : 0 : if (type0 != TREE_TYPE (_o1[0]) /* XXX */
7721 : 0 : && !useless_type_conversion_p (type0, TREE_TYPE (_o1[0])))
7722 : : {
7723 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type0, _o1[0]);
7724 : 0 : tem_op.resimplify (lseq, valueize);
7725 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7726 : 0 : if (!_r1) goto next_after_fail1681;
7727 : : }
7728 : : else
7729 : : _r1 = _o1[0];
7730 : 0 : res_op->ops[0] = _r1;
7731 : : }
7732 : 0 : res_op->resimplify (lseq, valueize);
7733 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 936, __FILE__, __LINE__, true);
7734 : 0 : return true;
7735 : : }
7736 : : next_after_fail1681:;
7737 : : }
7738 : : }
7739 : : }
7740 : : }
7741 : : }
7742 : : return false;
7743 : : }
7744 : :
7745 : : bool
7746 : 2009 : gimple_simplify_CFN_BUILT_IN_COSHF (gimple_match_op *res_op, gimple_seq *seq,
7747 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7748 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
7749 : : {
7750 : 2009 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7751 : 2009 : switch (TREE_CODE (_p0))
7752 : : {
7753 : 1920 : case SSA_NAME:
7754 : 1920 : if (gimple *_d1 = get_def (valueize, _p0))
7755 : : {
7756 : 925 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7757 : 674 : switch (gimple_assign_rhs_code (_a1))
7758 : : {
7759 : 14 : case NEGATE_EXPR:
7760 : 14 : {
7761 : 14 : tree _q20 = gimple_assign_rhs1 (_a1);
7762 : 14 : _q20 = do_valueize (valueize, _q20);
7763 : 14 : {
7764 : 14 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
7765 : 14 : const combined_fn coss = CFN_BUILT_IN_COSHF;
7766 : 14 : gimple_seq *lseq = seq;
7767 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1730;
7768 : 14 : {
7769 : 14 : res_op->set_op (coss, type, 1);
7770 : 14 : res_op->ops[0] = captures[0];
7771 : 14 : res_op->resimplify (lseq, valueize);
7772 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 968, __FILE__, __LINE__, true);
7773 : 14 : return true;
7774 : : }
7775 : 0 : next_after_fail1730:;
7776 : : }
7777 : 0 : break;
7778 : : }
7779 : 0 : case ABS_EXPR:
7780 : 0 : {
7781 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
7782 : 0 : _q20 = do_valueize (valueize, _q20);
7783 : 0 : {
7784 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
7785 : 0 : const combined_fn coss = CFN_BUILT_IN_COSHF;
7786 : 0 : gimple_seq *lseq = seq;
7787 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1731;
7788 : 0 : {
7789 : 0 : res_op->set_op (coss, type, 1);
7790 : 0 : res_op->ops[0] = captures[0];
7791 : 0 : res_op->resimplify (lseq, valueize);
7792 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 968, __FILE__, __LINE__, true);
7793 : 0 : return true;
7794 : : }
7795 : 0 : next_after_fail1731:;
7796 : : }
7797 : 0 : break;
7798 : : }
7799 : : default:;
7800 : : }
7801 : 406 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
7802 : 21 : switch (gimple_call_combined_fn (_c1))
7803 : : {
7804 : 0 : case CFN_BUILT_IN_COPYSIGN:
7805 : 0 : if (gimple_call_num_args (_c1) == 2)
7806 : : {
7807 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
7808 : 0 : _q20 = do_valueize (valueize, _q20);
7809 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
7810 : 0 : _q21 = do_valueize (valueize, _q21);
7811 : 0 : {
7812 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7813 : 0 : if (gimple_simplify_426 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_BUILT_IN_COSHF))
7814 : 0 : return true;
7815 : : }
7816 : : }
7817 : : break;
7818 : 0 : case CFN_BUILT_IN_COPYSIGNF:
7819 : 0 : if (gimple_call_num_args (_c1) == 2)
7820 : : {
7821 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
7822 : 0 : _q20 = do_valueize (valueize, _q20);
7823 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
7824 : 0 : _q21 = do_valueize (valueize, _q21);
7825 : 0 : {
7826 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7827 : 0 : if (gimple_simplify_426 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_BUILT_IN_COSHF))
7828 : 0 : return true;
7829 : : }
7830 : : }
7831 : : break;
7832 : 0 : case CFN_BUILT_IN_COPYSIGNL:
7833 : 0 : if (gimple_call_num_args (_c1) == 2)
7834 : : {
7835 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
7836 : 0 : _q20 = do_valueize (valueize, _q20);
7837 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
7838 : 0 : _q21 = do_valueize (valueize, _q21);
7839 : 0 : {
7840 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7841 : 0 : if (gimple_simplify_426 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_BUILT_IN_COSHF))
7842 : 0 : return true;
7843 : : }
7844 : : }
7845 : : break;
7846 : 21 : case CFN_BUILT_IN_ATANHF:
7847 : 21 : if (gimple_call_num_args (_c1) == 1)
7848 : : {
7849 : 21 : tree _q20 = gimple_call_arg (_c1, 0);
7850 : 21 : _q20 = do_valueize (valueize, _q20);
7851 : 21 : {
7852 : 21 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
7853 : 21 : if (gimple_simplify_428 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COSHF, CFN_BUILT_IN_ATANHF, CFN_BUILT_IN_SQRTF))
7854 : 1 : return true;
7855 : : }
7856 : : }
7857 : : break;
7858 : 0 : case CFN_COPYSIGN:
7859 : 0 : if (gimple_call_num_args (_c1) == 2)
7860 : : {
7861 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
7862 : 0 : _q20 = do_valueize (valueize, _q20);
7863 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
7864 : 0 : _q21 = do_valueize (valueize, _q21);
7865 : 0 : {
7866 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7867 : 0 : if (gimple_simplify_426 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_BUILT_IN_COSHF))
7868 : 0 : return true;
7869 : : }
7870 : : }
7871 : : break;
7872 : : default:;
7873 : : }
7874 : : }
7875 : : break;
7876 : : default:;
7877 : : }
7878 : : return false;
7879 : : }
7880 : :
7881 : : bool
7882 : 351 : gimple_simplify_CFN_BUILT_IN_CCOSL (gimple_match_op *res_op, gimple_seq *seq,
7883 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7884 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
7885 : : {
7886 : 351 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7887 : 351 : switch (TREE_CODE (_p0))
7888 : : {
7889 : 330 : case SSA_NAME:
7890 : 330 : if (gimple *_d1 = get_def (valueize, _p0))
7891 : : {
7892 : 203 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7893 : 189 : switch (gimple_assign_rhs_code (_a1))
7894 : : {
7895 : 18 : case NEGATE_EXPR:
7896 : 18 : {
7897 : 18 : tree _q20 = gimple_assign_rhs1 (_a1);
7898 : 18 : _q20 = do_valueize (valueize, _q20);
7899 : 18 : {
7900 : 18 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
7901 : 18 : gimple_seq *lseq = seq;
7902 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1753;
7903 : 18 : {
7904 : 18 : res_op->set_op (CFN_BUILT_IN_CCOSL, type, 1);
7905 : 18 : res_op->ops[0] = captures[0];
7906 : 18 : res_op->resimplify (lseq, valueize);
7907 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 980, __FILE__, __LINE__, true);
7908 : 18 : return true;
7909 : : }
7910 : 0 : next_after_fail1753:;
7911 : : }
7912 : 0 : break;
7913 : : }
7914 : : default:;
7915 : : }
7916 : : }
7917 : : break;
7918 : : default:;
7919 : : }
7920 : : return false;
7921 : : }
7922 : :
7923 : : bool
7924 : 8168 : gimple_simplify_CFN_BUILT_IN_CABSF (gimple_match_op *res_op, gimple_seq *seq,
7925 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7926 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
7927 : : {
7928 : 8168 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7929 : 8168 : switch (TREE_CODE (_p0))
7930 : : {
7931 : 8114 : case SSA_NAME:
7932 : 8114 : if (gimple *_d1 = get_def (valueize, _p0))
7933 : : {
7934 : 4496 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7935 : 4810 : switch (gimple_assign_rhs_code (_a1))
7936 : : {
7937 : 2 : case CONJ_EXPR:
7938 : 2 : {
7939 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
7940 : 2 : _q20 = do_valueize (valueize, _q20);
7941 : 2 : {
7942 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
7943 : 2 : gimple_seq *lseq = seq;
7944 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1757;
7945 : 2 : {
7946 : 2 : res_op->set_op (CFN_BUILT_IN_CABSF, type, 1);
7947 : 2 : res_op->ops[0] = captures[0];
7948 : 2 : res_op->resimplify (lseq, valueize);
7949 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 981, __FILE__, __LINE__, true);
7950 : 2 : return true;
7951 : : }
7952 : 0 : next_after_fail1757:;
7953 : : }
7954 : 0 : break;
7955 : : }
7956 : 18 : case NEGATE_EXPR:
7957 : 18 : {
7958 : 18 : tree _q20 = gimple_assign_rhs1 (_a1);
7959 : 18 : _q20 = do_valueize (valueize, _q20);
7960 : 18 : {
7961 : 18 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
7962 : 18 : gimple_seq *lseq = seq;
7963 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1758;
7964 : 18 : {
7965 : 18 : res_op->set_op (CFN_BUILT_IN_CABSF, type, 1);
7966 : 18 : res_op->ops[0] = captures[0];
7967 : 18 : res_op->resimplify (lseq, valueize);
7968 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 981, __FILE__, __LINE__, true);
7969 : 18 : return true;
7970 : : }
7971 : 0 : next_after_fail1758:;
7972 : : }
7973 : 0 : break;
7974 : : }
7975 : 1985 : case COMPLEX_EXPR:
7976 : 1985 : {
7977 : 1985 : tree _q20 = gimple_assign_rhs1 (_a1);
7978 : 1985 : _q20 = do_valueize (valueize, _q20);
7979 : 1985 : tree _q21 = gimple_assign_rhs2 (_a1);
7980 : 1985 : _q21 = do_valueize (valueize, _q21);
7981 : 1985 : if (real_zerop (_q21))
7982 : : {
7983 : 14 : {
7984 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
7985 : 14 : gimple_seq *lseq = seq;
7986 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1759;
7987 : 14 : {
7988 : 14 : res_op->set_op (ABS_EXPR, type, 1);
7989 : 14 : res_op->ops[0] = captures[0];
7990 : 14 : res_op->resimplify (lseq, valueize);
7991 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 982, __FILE__, __LINE__, true);
7992 : 14 : return true;
7993 : : }
7994 : 0 : next_after_fail1759:;
7995 : : }
7996 : : }
7997 : 1971 : if (real_zerop (_q20))
7998 : : {
7999 : 0 : {
8000 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8001 : 0 : gimple_seq *lseq = seq;
8002 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1760;
8003 : 0 : {
8004 : 0 : res_op->set_op (ABS_EXPR, type, 1);
8005 : 0 : res_op->ops[0] = captures[0];
8006 : 0 : res_op->resimplify (lseq, valueize);
8007 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 982, __FILE__, __LINE__, true);
8008 : 0 : return true;
8009 : : }
8010 : 0 : next_after_fail1760:;
8011 : : }
8012 : : }
8013 : 1971 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
8014 : : {
8015 : 6 : {
8016 : 6 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8017 : 6 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
8018 : : )
8019 : : {
8020 : 6 : gimple_seq *lseq = seq;
8021 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1761;
8022 : 6 : {
8023 : 6 : res_op->set_op (MULT_EXPR, type, 2);
8024 : 6 : {
8025 : 6 : tree _o1[1], _r1;
8026 : 6 : _o1[0] = captures[0];
8027 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
8028 : 6 : tem_op.resimplify (lseq, valueize);
8029 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8030 : 6 : if (!_r1) goto next_after_fail1761;
8031 : 4 : res_op->ops[0] = _r1;
8032 : : }
8033 : 4 : res_op->ops[1] = build_real_truncate (type, dconst_sqrt2 ());
8034 : 4 : res_op->resimplify (lseq, valueize);
8035 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 983, __FILE__, __LINE__, true);
8036 : 4 : return true;
8037 : : }
8038 : : next_after_fail1761:;
8039 : : }
8040 : : }
8041 : : }
8042 : : break;
8043 : : }
8044 : : default:;
8045 : : }
8046 : : }
8047 : : break;
8048 : : default:;
8049 : : }
8050 : : return false;
8051 : : }
8052 : :
8053 : : bool
8054 : 641677 : gimple_simplify_FIX_TRUNC_EXPR (gimple_match_op *res_op, gimple_seq *seq,
8055 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
8056 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
8057 : : {
8058 : 641677 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8059 : 641677 : {
8060 : 641677 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8061 : 641677 : if ((
8062 : : 1
8063 : 641677 : && useless_type_conversion_p (type, TREE_TYPE (captures[0])))
8064 : : || (
8065 : :
8066 : : && type == TREE_TYPE (captures[0]))
8067 : : )
8068 : : {
8069 : 0 : gimple_seq *lseq = seq;
8070 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1807;
8071 : 0 : {
8072 : 0 : tree tem;
8073 : 0 : tem = captures[0];
8074 : 0 : res_op->set_value (tem);
8075 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 957, __FILE__, __LINE__, true);
8076 : 0 : return true;
8077 : : }
8078 : 0 : next_after_fail1807:;
8079 : : }
8080 : : }
8081 : 641677 : switch (TREE_CODE (_p0))
8082 : : {
8083 : 621310 : case SSA_NAME:
8084 : 621310 : if (gimple *_d1 = get_def (valueize, _p0))
8085 : : {
8086 : 454266 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
8087 : 672105 : switch (gimple_assign_rhs_code (_a1))
8088 : : {
8089 : 3396 : CASE_CONVERT:
8090 : 3396 : {
8091 : 3396 : tree _q20 = gimple_assign_rhs1 (_a1);
8092 : 3396 : _q20 = do_valueize (valueize, _q20);
8093 : 3396 : {
8094 : 3396 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
8095 : 3396 : {
8096 : 3396 : tree inside_type = TREE_TYPE (captures[1]);
8097 : 3396 : tree inter_type = TREE_TYPE (captures[0]);
8098 : 3396 : int inside_int = INTEGRAL_TYPE_P (inside_type);
8099 : 3396 : int inside_ptr = POINTER_TYPE_P (inside_type);
8100 : 3396 : int inside_float = FLOAT_TYPE_P (inside_type);
8101 : 3396 : int inside_vec = VECTOR_TYPE_P (inside_type);
8102 : 3396 : unsigned int inside_prec = element_precision (inside_type);
8103 : 3396 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
8104 : 3396 : int inter_int = INTEGRAL_TYPE_P (inter_type);
8105 : 3396 : int inter_ptr = POINTER_TYPE_P (inter_type);
8106 : 3396 : int inter_float = FLOAT_TYPE_P (inter_type);
8107 : 3396 : int inter_vec = VECTOR_TYPE_P (inter_type);
8108 : 3396 : unsigned int inter_prec = element_precision (inter_type);
8109 : 3396 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
8110 : 3396 : int final_int = INTEGRAL_TYPE_P (type);
8111 : 3396 : int final_ptr = POINTER_TYPE_P (type);
8112 : 3396 : int final_float = FLOAT_TYPE_P (type);
8113 : 3396 : int final_vec = VECTOR_TYPE_P (type);
8114 : 3396 : unsigned int final_prec = element_precision (type);
8115 : 3396 : int final_unsignedp = TYPE_UNSIGNED (type);
8116 : 3396 : if (((
8117 : : 1
8118 : 3396 : && useless_type_conversion_p (type, inside_type))
8119 : : || (
8120 : :
8121 : : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
8122 : 0 : && (((inter_int || inter_ptr) && final_int)
8123 : 0 : || (inter_float && final_float))
8124 : 3396 : && inter_prec >= final_prec
8125 : : )
8126 : : {
8127 : 0 : gimple_seq *lseq = seq;
8128 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1808;
8129 : 0 : {
8130 : 0 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8131 : 0 : res_op->ops[0] = captures[1];
8132 : 0 : res_op->resimplify (lseq, valueize);
8133 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 958, __FILE__, __LINE__, true);
8134 : 0 : return true;
8135 : : }
8136 : 0 : next_after_fail1808:;
8137 : : }
8138 : : else
8139 : : {
8140 : 3396 : if (((inter_int && inside_int) || (inter_float && inside_float))
8141 : 3396 : && (final_int || final_float)
8142 : 3396 : && inter_prec >= inside_prec
8143 : 317 : && (inter_float || inter_unsignedp == inside_unsignedp)
8144 : : )
8145 : : {
8146 : 317 : gimple_seq *lseq = seq;
8147 : 317 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1809;
8148 : 317 : {
8149 : 317 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8150 : 317 : res_op->ops[0] = captures[1];
8151 : 317 : res_op->resimplify (lseq, valueize);
8152 : 317 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 959, __FILE__, __LINE__, true);
8153 : 317 : return true;
8154 : : }
8155 : 0 : next_after_fail1809:;
8156 : 0 : }
8157 : : else
8158 : : {
8159 : 3079 : if (inside_int && inter_int && final_int
8160 : 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
8161 : 0 : && inside_unsignedp && !inter_unsignedp)
8162 : 0 : || final_prec == inter_prec
8163 : 0 : || (inside_prec < inter_prec && inter_prec > final_prec
8164 : 0 : && !inside_unsignedp && inter_unsignedp))
8165 : : )
8166 : : {
8167 : 0 : gimple_seq *lseq = seq;
8168 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1810;
8169 : 0 : {
8170 : 0 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8171 : 0 : res_op->ops[0] = captures[1];
8172 : 0 : res_op->resimplify (lseq, valueize);
8173 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 960, __FILE__, __LINE__, true);
8174 : 0 : return true;
8175 : : }
8176 : 0 : next_after_fail1810:;
8177 : 0 : }
8178 : : else
8179 : : {
8180 : 3079 : if (! inside_float && ! inter_float && ! final_float
8181 : : && ! inside_vec && ! inter_vec && ! final_vec
8182 : 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
8183 : 0 : && ! (inside_int && inter_int
8184 : 0 : && inter_unsignedp != inside_unsignedp
8185 : 0 : && inter_prec < final_prec)
8186 : 0 : && ((inter_unsignedp && inter_prec > inside_prec)
8187 : 0 : == (final_unsignedp && final_prec > inter_prec))
8188 : 0 : && ! (inside_ptr && inter_prec != final_prec)
8189 : 0 : && ! (final_ptr && inside_prec != inter_prec)
8190 : : )
8191 : : {
8192 : 0 : gimple_seq *lseq = seq;
8193 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1811;
8194 : 0 : {
8195 : 0 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8196 : 0 : res_op->ops[0] = captures[1];
8197 : 0 : res_op->resimplify (lseq, valueize);
8198 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 961, __FILE__, __LINE__, true);
8199 : 0 : return true;
8200 : : }
8201 : 0 : next_after_fail1811:;
8202 : 0 : }
8203 : : else
8204 : : {
8205 : 3079 : if (inside_int && inter_int && final_int
8206 : 0 : && final_prec <= inside_prec
8207 : 0 : && inter_prec >= inside_prec
8208 : : )
8209 : : {
8210 : 0 : gimple_seq *lseq = seq;
8211 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1812;
8212 : 0 : {
8213 : 0 : res_op->set_op (NOP_EXPR, type, 1);
8214 : 0 : res_op->ops[0] = captures[1];
8215 : 0 : res_op->resimplify (lseq, valueize);
8216 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 962, __FILE__, __LINE__, true);
8217 : 0 : return true;
8218 : : }
8219 : 0 : next_after_fail1812:;
8220 : 0 : }
8221 : : else
8222 : : {
8223 : 3079 : if (1
8224 : 3079 : && final_int && inter_int && inside_int
8225 : 0 : && final_prec >= inside_prec
8226 : 0 : && inside_prec > inter_prec
8227 : 0 : && inter_unsignedp
8228 : : )
8229 : : {
8230 : 0 : gimple_seq *lseq = seq;
8231 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1813;
8232 : 0 : {
8233 : 0 : res_op->set_op (NOP_EXPR, type, 1);
8234 : 0 : {
8235 : 0 : tree _o1[2], _r1;
8236 : 0 : _o1[0] = captures[1];
8237 : 0 : _o1[1] = wide_int_to_tree
8238 : 0 : (inside_type,
8239 : 0 : wi::mask (inter_prec, false,
8240 : 0 : TYPE_PRECISION (inside_type)));
8241 : 0 : (*res_op).set_op (BIT_AND_EXPR, TREE_TYPE (_o1[0]), 2);
8242 : 0 : (*res_op).ops[0] = _o1[0];
8243 : 0 : (*res_op).ops[1] = _o1[1];
8244 : 0 : (*res_op).resimplify (lseq, valueize);
8245 : : }
8246 : 0 : if (type != res_op->type
8247 : 0 : && !useless_type_conversion_p (type, res_op->type))
8248 : : {
8249 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1813;
8250 : 0 : res_op->set_op (NOP_EXPR, type, 1);
8251 : 0 : res_op->resimplify (lseq, valueize);
8252 : : }
8253 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 963, __FILE__, __LINE__, true);
8254 : 0 : return true;
8255 : : }
8256 : 3079 : next_after_fail1813:;
8257 : : }
8258 : : else
8259 : : {
8260 : 3079 : if (1
8261 : 3079 : && inside_int && inter_float && final_int &&
8262 : 3079 : (unsigned) significand_size (TYPE_MODE (inter_type))
8263 : 0 : >= inside_prec - !inside_unsignedp
8264 : : )
8265 : : {
8266 : 0 : gimple_seq *lseq = seq;
8267 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1814;
8268 : 0 : {
8269 : 0 : res_op->set_op (NOP_EXPR, type, 1);
8270 : 0 : res_op->ops[0] = captures[1];
8271 : 0 : res_op->resimplify (lseq, valueize);
8272 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 964, __FILE__, __LINE__, true);
8273 : 0 : return true;
8274 : : }
8275 : 0 : next_after_fail1814:;
8276 : : }
8277 : : }
8278 : : }
8279 : : }
8280 : : }
8281 : : }
8282 : : }
8283 : : }
8284 : : }
8285 : 3079 : break;
8286 : : }
8287 : 3833 : case FLOAT_EXPR:
8288 : 3833 : {
8289 : 3833 : tree _q20 = gimple_assign_rhs1 (_a1);
8290 : 3833 : _q20 = do_valueize (valueize, _q20);
8291 : 3833 : {
8292 : 3833 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
8293 : 3833 : {
8294 : 3833 : tree inside_type = TREE_TYPE (captures[1]);
8295 : 3833 : tree inter_type = TREE_TYPE (captures[0]);
8296 : 3833 : int inside_int = INTEGRAL_TYPE_P (inside_type);
8297 : 3833 : int inside_ptr = POINTER_TYPE_P (inside_type);
8298 : 3833 : int inside_float = FLOAT_TYPE_P (inside_type);
8299 : 3833 : int inside_vec = VECTOR_TYPE_P (inside_type);
8300 : 3833 : unsigned int inside_prec = element_precision (inside_type);
8301 : 3833 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
8302 : 3833 : int inter_int = INTEGRAL_TYPE_P (inter_type);
8303 : 3833 : int inter_ptr = POINTER_TYPE_P (inter_type);
8304 : 3833 : int inter_float = FLOAT_TYPE_P (inter_type);
8305 : 3833 : int inter_vec = VECTOR_TYPE_P (inter_type);
8306 : 3833 : unsigned int inter_prec = element_precision (inter_type);
8307 : 3833 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
8308 : 3833 : int final_int = INTEGRAL_TYPE_P (type);
8309 : 3833 : int final_ptr = POINTER_TYPE_P (type);
8310 : 3833 : int final_float = FLOAT_TYPE_P (type);
8311 : 3833 : int final_vec = VECTOR_TYPE_P (type);
8312 : 3833 : unsigned int final_prec = element_precision (type);
8313 : 3833 : int final_unsignedp = TYPE_UNSIGNED (type);
8314 : 3833 : if (((
8315 : : 1
8316 : 3833 : && useless_type_conversion_p (type, inside_type))
8317 : : || (
8318 : :
8319 : : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
8320 : 2441 : && (((inter_int || inter_ptr) && final_int)
8321 : 2441 : || (inter_float && final_float))
8322 : 3833 : && inter_prec >= final_prec
8323 : : )
8324 : : {
8325 : 0 : gimple_seq *lseq = seq;
8326 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1815;
8327 : 0 : {
8328 : 0 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8329 : 0 : res_op->ops[0] = captures[1];
8330 : 0 : res_op->resimplify (lseq, valueize);
8331 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 958, __FILE__, __LINE__, true);
8332 : 0 : return true;
8333 : : }
8334 : 0 : next_after_fail1815:;
8335 : : }
8336 : : else
8337 : : {
8338 : 3833 : if (((inter_int && inside_int) || (inter_float && inside_float))
8339 : 0 : && (final_int || final_float)
8340 : 0 : && inter_prec >= inside_prec
8341 : 0 : && (inter_float || inter_unsignedp == inside_unsignedp)
8342 : : )
8343 : : {
8344 : 0 : gimple_seq *lseq = seq;
8345 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1816;
8346 : 0 : {
8347 : 0 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8348 : 0 : res_op->ops[0] = captures[1];
8349 : 0 : res_op->resimplify (lseq, valueize);
8350 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 959, __FILE__, __LINE__, true);
8351 : 0 : return true;
8352 : : }
8353 : 0 : next_after_fail1816:;
8354 : 0 : }
8355 : : else
8356 : : {
8357 : 3833 : if (inside_int && inter_int && final_int
8358 : 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
8359 : 0 : && inside_unsignedp && !inter_unsignedp)
8360 : 0 : || final_prec == inter_prec
8361 : 0 : || (inside_prec < inter_prec && inter_prec > final_prec
8362 : 0 : && !inside_unsignedp && inter_unsignedp))
8363 : : )
8364 : : {
8365 : 0 : gimple_seq *lseq = seq;
8366 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1817;
8367 : 0 : {
8368 : 0 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8369 : 0 : res_op->ops[0] = captures[1];
8370 : 0 : res_op->resimplify (lseq, valueize);
8371 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 960, __FILE__, __LINE__, true);
8372 : 0 : return true;
8373 : : }
8374 : 0 : next_after_fail1817:;
8375 : 0 : }
8376 : : else
8377 : : {
8378 : 3833 : if (! inside_float && ! inter_float && ! final_float
8379 : : && ! inside_vec && ! inter_vec && ! final_vec
8380 : 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
8381 : 0 : && ! (inside_int && inter_int
8382 : 0 : && inter_unsignedp != inside_unsignedp
8383 : 0 : && inter_prec < final_prec)
8384 : 0 : && ((inter_unsignedp && inter_prec > inside_prec)
8385 : 0 : == (final_unsignedp && final_prec > inter_prec))
8386 : 0 : && ! (inside_ptr && inter_prec != final_prec)
8387 : 0 : && ! (final_ptr && inside_prec != inter_prec)
8388 : : )
8389 : : {
8390 : 0 : gimple_seq *lseq = seq;
8391 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1818;
8392 : 0 : {
8393 : 0 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
8394 : 0 : res_op->ops[0] = captures[1];
8395 : 0 : res_op->resimplify (lseq, valueize);
8396 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 961, __FILE__, __LINE__, true);
8397 : 0 : return true;
8398 : : }
8399 : 0 : next_after_fail1818:;
8400 : 0 : }
8401 : : else
8402 : : {
8403 : 3833 : if (inside_int && inter_int && final_int
8404 : 0 : && final_prec <= inside_prec
8405 : 0 : && inter_prec >= inside_prec
8406 : : )
8407 : : {
8408 : 0 : gimple_seq *lseq = seq;
8409 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1819;
8410 : 0 : {
8411 : 0 : res_op->set_op (NOP_EXPR, type, 1);
8412 : 0 : res_op->ops[0] = captures[1];
8413 : 0 : res_op->resimplify (lseq, valueize);
8414 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 962, __FILE__, __LINE__, true);
8415 : 0 : return true;
8416 : : }
8417 : 0 : next_after_fail1819:;
8418 : 0 : }
8419 : : else
8420 : : {
8421 : 3833 : if (1
8422 : 3833 : && final_int && inter_int && inside_int
8423 : 0 : && final_prec >= inside_prec
8424 : 0 : && inside_prec > inter_prec
8425 : 0 : && inter_unsignedp
8426 : : )
8427 : : {
8428 : 0 : gimple_seq *lseq = seq;
8429 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1820;
8430 : 0 : {
8431 : 0 : res_op->set_op (NOP_EXPR, type, 1);
8432 : 0 : {
8433 : 0 : tree _o1[2], _r1;
8434 : 0 : _o1[0] = captures[1];
8435 : 0 : _o1[1] = wide_int_to_tree
8436 : 0 : (inside_type,
8437 : 0 : wi::mask (inter_prec, false,
8438 : 0 : TYPE_PRECISION (inside_type)));
8439 : 0 : (*res_op).set_op (BIT_AND_EXPR, TREE_TYPE (_o1[0]), 2);
8440 : 0 : (*res_op).ops[0] = _o1[0];
8441 : 0 : (*res_op).ops[1] = _o1[1];
8442 : 0 : (*res_op).resimplify (lseq, valueize);
8443 : : }
8444 : 0 : if (type != res_op->type
8445 : 0 : && !useless_type_conversion_p (type, res_op->type))
8446 : : {
8447 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1820;
8448 : 0 : res_op->set_op (NOP_EXPR, type, 1);
8449 : 0 : res_op->resimplify (lseq, valueize);
8450 : : }
8451 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 963, __FILE__, __LINE__, true);
8452 : 0 : return true;
8453 : : }
8454 : 3191 : next_after_fail1820:;
8455 : : }
8456 : : else
8457 : : {
8458 : 3833 : if (1
8459 : 3833 : && inside_int && inter_float && final_int &&
8460 : 6987 : (unsigned) significand_size (TYPE_MODE (inter_type))
8461 : 3796 : >= inside_prec - !inside_unsignedp
8462 : : )
8463 : : {
8464 : 642 : gimple_seq *lseq = seq;
8465 : 642 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1821;
8466 : 642 : {
8467 : 642 : res_op->set_op (NOP_EXPR, type, 1);
8468 : 642 : res_op->ops[0] = captures[1];
8469 : 642 : res_op->resimplify (lseq, valueize);
8470 : 642 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 964, __FILE__, __LINE__, true);
8471 : 642 : return true;
8472 : : }
8473 : 0 : next_after_fail1821:;
8474 : : }
8475 : : }
8476 : : }
8477 : : }
8478 : : }
8479 : : }
8480 : : }
8481 : : }
8482 : : }
8483 : 3191 : break;
8484 : : }
8485 : : default:;
8486 : : }
8487 : : }
8488 : : break;
8489 : : default:;
8490 : : }
8491 : : return false;
8492 : : }
8493 : :
8494 : : bool
8495 : 4568 : gimple_simplify_CFN_BUILT_IN_LOGF (gimple_match_op *res_op, gimple_seq *seq,
8496 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
8497 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
8498 : : {
8499 : 4568 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8500 : 4568 : switch (TREE_CODE (_p0))
8501 : : {
8502 : 4123 : case SSA_NAME:
8503 : 4123 : if (gimple *_d1 = get_def (valueize, _p0))
8504 : : {
8505 : 2133 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
8506 : 1793 : switch (gimple_assign_rhs_code (_a1))
8507 : : {
8508 : 40 : case RDIV_EXPR:
8509 : 40 : {
8510 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
8511 : 40 : _q20 = do_valueize (valueize, _q20);
8512 : 40 : tree _q21 = gimple_assign_rhs2 (_a1);
8513 : 40 : _q21 = do_valueize (valueize, _q21);
8514 : 40 : switch (TREE_CODE (_q20))
8515 : : {
8516 : 4 : case REAL_CST:
8517 : 4 : {
8518 : 4 : {
8519 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8520 : 4 : if (gimple_simplify_642 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF))
8521 : 2 : return true;
8522 : : }
8523 : 2 : break;
8524 : : }
8525 : 38 : default:;
8526 : : }
8527 : 38 : if (real_onep (_q20))
8528 : : {
8529 : 1 : {
8530 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8531 : 1 : if (gimple_simplify_641 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF))
8532 : 0 : return true;
8533 : : }
8534 : : }
8535 : : break;
8536 : : }
8537 : : default:;
8538 : : }
8539 : 559 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
8540 : 91 : switch (gimple_call_combined_fn (_c1))
8541 : : {
8542 : 14 : case CFN_BUILT_IN_SQRTF:
8543 : 14 : if (gimple_call_num_args (_c1) == 1)
8544 : : {
8545 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
8546 : 14 : _q20 = do_valueize (valueize, _q20);
8547 : 14 : {
8548 : 14 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8549 : 14 : if (flag_unsafe_math_optimizations
8550 : : )
8551 : : {
8552 : 14 : if (SCALAR_FLOAT_TYPE_P (type)
8553 : : )
8554 : : {
8555 : 14 : {
8556 : 14 : tree x;
8557 : 14 : switch (CFN_BUILT_IN_SQRTF)
8558 : : {
8559 : 14 : CASE_CFN_SQRT:
8560 : 14 : x = build_real (type, dconsthalf);
8561 : 14 : break;
8562 : : CASE_CFN_CBRT:
8563 : : x = build_real_truncate (type, dconst_third ());
8564 : : break;
8565 : : default:
8566 : : gcc_unreachable ();
8567 : : }
8568 : 14 : gimple_seq *lseq = seq;
8569 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1852;
8570 : 14 : {
8571 : 14 : res_op->set_op (MULT_EXPR, type, 2);
8572 : 14 : res_op->ops[0] = x;
8573 : 14 : {
8574 : 14 : tree _o1[1], _r1;
8575 : 14 : _o1[0] = captures[0];
8576 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGF, TREE_TYPE (_o1[0]), _o1[0]);
8577 : 14 : tem_op.resimplify (lseq, valueize);
8578 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8579 : 14 : if (!_r1) goto next_after_fail1852;
8580 : 7 : res_op->ops[1] = _r1;
8581 : : }
8582 : 7 : res_op->resimplify (lseq, valueize);
8583 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1011, __FILE__, __LINE__, true);
8584 : 7 : return true;
8585 : : }
8586 : : next_after_fail1852:;
8587 : : }
8588 : : }
8589 : : }
8590 : : }
8591 : : }
8592 : : break;
8593 : 12 : case CFN_BUILT_IN_EXP10F:
8594 : 12 : if (gimple_call_num_args (_c1) == 1)
8595 : : {
8596 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
8597 : 12 : _q20 = do_valueize (valueize, _q20);
8598 : 12 : {
8599 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8600 : 12 : if (flag_unsafe_math_optimizations
8601 : : )
8602 : : {
8603 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
8604 : : )
8605 : : {
8606 : 12 : {
8607 : 12 : tree x;
8608 : 12 : switch (CFN_BUILT_IN_EXP10F)
8609 : : {
8610 : : CASE_CFN_EXP:
8611 : : x = build_real_truncate (type, dconst_e ());
8612 : : break;
8613 : : CASE_CFN_EXP2:
8614 : : x = build_real (type, dconst2);
8615 : : break;
8616 : 12 : CASE_CFN_EXP10:
8617 : 12 : CASE_CFN_POW10:
8618 : 12 : {
8619 : 12 : REAL_VALUE_TYPE dconst10;
8620 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
8621 : 12 : x = build_real (type, dconst10);
8622 : : }
8623 : 12 : break;
8624 : : default:
8625 : : gcc_unreachable ();
8626 : : }
8627 : 12 : gimple_seq *lseq = seq;
8628 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1853;
8629 : 12 : {
8630 : 12 : res_op->set_op (MULT_EXPR, type, 2);
8631 : 12 : {
8632 : 12 : tree _o1[1], _r1;
8633 : 12 : _o1[0] = x;
8634 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGF, TREE_TYPE (_o1[0]), _o1[0]);
8635 : 12 : tem_op.resimplify (lseq, valueize);
8636 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8637 : 12 : if (!_r1) goto next_after_fail1853;
8638 : 12 : res_op->ops[0] = _r1;
8639 : : }
8640 : 12 : res_op->ops[1] = captures[0];
8641 : 12 : res_op->resimplify (lseq, valueize);
8642 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1012, __FILE__, __LINE__, true);
8643 : 12 : return true;
8644 : : }
8645 : : next_after_fail1853:;
8646 : : }
8647 : : }
8648 : : }
8649 : : }
8650 : : }
8651 : : break;
8652 : 7 : case CFN_BUILT_IN_EXPF:
8653 : 7 : if (gimple_call_num_args (_c1) == 1)
8654 : : {
8655 : 7 : tree _q20 = gimple_call_arg (_c1, 0);
8656 : 7 : _q20 = do_valueize (valueize, _q20);
8657 : 7 : {
8658 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8659 : 7 : if (flag_unsafe_math_optimizations
8660 : : )
8661 : : {
8662 : 7 : gimple_seq *lseq = seq;
8663 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1854;
8664 : 7 : {
8665 : 7 : tree tem;
8666 : 7 : tem = captures[0];
8667 : 7 : res_op->set_value (tem);
8668 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1013, __FILE__, __LINE__, true);
8669 : 7 : return true;
8670 : : }
8671 : 0 : next_after_fail1854:;
8672 : : }
8673 : : }
8674 : : }
8675 : : break;
8676 : 14 : case CFN_BUILT_IN_POWF:
8677 : 14 : if (gimple_call_num_args (_c1) == 2)
8678 : : {
8679 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
8680 : 14 : _q20 = do_valueize (valueize, _q20);
8681 : 14 : tree _q21 = gimple_call_arg (_c1, 1);
8682 : 14 : _q21 = do_valueize (valueize, _q21);
8683 : 14 : {
8684 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8685 : 14 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_POWF))
8686 : 7 : return true;
8687 : : }
8688 : : }
8689 : : break;
8690 : 12 : case CFN_BUILT_IN_POW10F:
8691 : 12 : if (gimple_call_num_args (_c1) == 1)
8692 : : {
8693 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
8694 : 12 : _q20 = do_valueize (valueize, _q20);
8695 : 12 : {
8696 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8697 : 12 : if (flag_unsafe_math_optimizations
8698 : : )
8699 : : {
8700 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
8701 : : )
8702 : : {
8703 : 12 : {
8704 : 12 : tree x;
8705 : 12 : switch (CFN_BUILT_IN_POW10F)
8706 : : {
8707 : : CASE_CFN_EXP:
8708 : : x = build_real_truncate (type, dconst_e ());
8709 : : break;
8710 : : CASE_CFN_EXP2:
8711 : : x = build_real (type, dconst2);
8712 : : break;
8713 : 12 : CASE_CFN_EXP10:
8714 : 12 : CASE_CFN_POW10:
8715 : 12 : {
8716 : 12 : REAL_VALUE_TYPE dconst10;
8717 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
8718 : 12 : x = build_real (type, dconst10);
8719 : : }
8720 : 12 : break;
8721 : : default:
8722 : : gcc_unreachable ();
8723 : : }
8724 : 12 : gimple_seq *lseq = seq;
8725 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1855;
8726 : 12 : {
8727 : 12 : res_op->set_op (MULT_EXPR, type, 2);
8728 : 12 : {
8729 : 12 : tree _o1[1], _r1;
8730 : 12 : _o1[0] = x;
8731 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGF, TREE_TYPE (_o1[0]), _o1[0]);
8732 : 12 : tem_op.resimplify (lseq, valueize);
8733 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8734 : 12 : if (!_r1) goto next_after_fail1855;
8735 : 12 : res_op->ops[0] = _r1;
8736 : : }
8737 : 12 : res_op->ops[1] = captures[0];
8738 : 12 : res_op->resimplify (lseq, valueize);
8739 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1012, __FILE__, __LINE__, true);
8740 : 12 : return true;
8741 : : }
8742 : : next_after_fail1855:;
8743 : : }
8744 : : }
8745 : : }
8746 : : }
8747 : : }
8748 : : break;
8749 : 12 : case CFN_BUILT_IN_CBRTF:
8750 : 12 : if (gimple_call_num_args (_c1) == 1)
8751 : : {
8752 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
8753 : 12 : _q20 = do_valueize (valueize, _q20);
8754 : 12 : {
8755 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8756 : 12 : if (flag_unsafe_math_optimizations
8757 : : )
8758 : : {
8759 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
8760 : : )
8761 : : {
8762 : 12 : {
8763 : 12 : tree x;
8764 : 12 : switch (CFN_BUILT_IN_CBRTF)
8765 : : {
8766 : : CASE_CFN_SQRT:
8767 : : x = build_real (type, dconsthalf);
8768 : : break;
8769 : 12 : CASE_CFN_CBRT:
8770 : 12 : x = build_real_truncate (type, dconst_third ());
8771 : 12 : break;
8772 : : default:
8773 : : gcc_unreachable ();
8774 : : }
8775 : 12 : gimple_seq *lseq = seq;
8776 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1856;
8777 : 12 : {
8778 : 12 : res_op->set_op (MULT_EXPR, type, 2);
8779 : 12 : res_op->ops[0] = x;
8780 : 12 : {
8781 : 12 : tree _o1[1], _r1;
8782 : 12 : _o1[0] = captures[0];
8783 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGF, TREE_TYPE (_o1[0]), _o1[0]);
8784 : 12 : tem_op.resimplify (lseq, valueize);
8785 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8786 : 12 : if (!_r1) goto next_after_fail1856;
8787 : 6 : res_op->ops[1] = _r1;
8788 : : }
8789 : 6 : res_op->resimplify (lseq, valueize);
8790 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1011, __FILE__, __LINE__, true);
8791 : 6 : return true;
8792 : : }
8793 : : next_after_fail1856:;
8794 : : }
8795 : : }
8796 : : }
8797 : : }
8798 : : }
8799 : : break;
8800 : 12 : case CFN_BUILT_IN_EXP2F:
8801 : 12 : if (gimple_call_num_args (_c1) == 1)
8802 : : {
8803 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
8804 : 12 : _q20 = do_valueize (valueize, _q20);
8805 : 12 : {
8806 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8807 : 12 : if (flag_unsafe_math_optimizations
8808 : : )
8809 : : {
8810 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
8811 : : )
8812 : : {
8813 : 12 : {
8814 : 12 : tree x;
8815 : 12 : switch (CFN_BUILT_IN_EXP2F)
8816 : : {
8817 : : CASE_CFN_EXP:
8818 : : x = build_real_truncate (type, dconst_e ());
8819 : : break;
8820 : 12 : CASE_CFN_EXP2:
8821 : 12 : x = build_real (type, dconst2);
8822 : 12 : break;
8823 : : CASE_CFN_EXP10:
8824 : : CASE_CFN_POW10:
8825 : : {
8826 : : REAL_VALUE_TYPE dconst10;
8827 : : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
8828 : : x = build_real (type, dconst10);
8829 : : }
8830 : : break;
8831 : : default:
8832 : : gcc_unreachable ();
8833 : : }
8834 : 12 : gimple_seq *lseq = seq;
8835 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1857;
8836 : 12 : {
8837 : 12 : res_op->set_op (MULT_EXPR, type, 2);
8838 : 12 : {
8839 : 12 : tree _o1[1], _r1;
8840 : 12 : _o1[0] = x;
8841 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGF, TREE_TYPE (_o1[0]), _o1[0]);
8842 : 12 : tem_op.resimplify (lseq, valueize);
8843 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8844 : 12 : if (!_r1) goto next_after_fail1857;
8845 : 12 : res_op->ops[0] = _r1;
8846 : : }
8847 : 12 : res_op->ops[1] = captures[0];
8848 : 12 : res_op->resimplify (lseq, valueize);
8849 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1012, __FILE__, __LINE__, true);
8850 : 12 : return true;
8851 : : }
8852 : : next_after_fail1857:;
8853 : : }
8854 : : }
8855 : : }
8856 : : }
8857 : : }
8858 : : break;
8859 : : default:;
8860 : : }
8861 : : }
8862 : : break;
8863 : : default:;
8864 : : }
8865 : : return false;
8866 : : }
8867 : :
8868 : : bool
8869 : 0 : gimple_simplify_CFN_LOG2 (gimple_match_op *res_op, gimple_seq *seq,
8870 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
8871 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
8872 : : {
8873 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8874 : 0 : switch (TREE_CODE (_p0))
8875 : : {
8876 : 0 : case SSA_NAME:
8877 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
8878 : : {
8879 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
8880 : 0 : switch (gimple_assign_rhs_code (_a1))
8881 : : {
8882 : 0 : case RDIV_EXPR:
8883 : 0 : {
8884 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
8885 : 0 : _q20 = do_valueize (valueize, _q20);
8886 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
8887 : 0 : _q21 = do_valueize (valueize, _q21);
8888 : 0 : switch (TREE_CODE (_q20))
8889 : : {
8890 : 0 : case REAL_CST:
8891 : 0 : {
8892 : 0 : {
8893 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8894 : 0 : if (gimple_simplify_642 (res_op, seq, valueize, type, captures, CFN_LOG2))
8895 : 0 : return true;
8896 : : }
8897 : 0 : break;
8898 : : }
8899 : 0 : default:;
8900 : : }
8901 : 0 : if (real_onep (_q20))
8902 : : {
8903 : 0 : {
8904 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8905 : 0 : if (gimple_simplify_641 (res_op, seq, valueize, type, captures, CFN_LOG2))
8906 : 0 : return true;
8907 : : }
8908 : : }
8909 : : break;
8910 : : }
8911 : : default:;
8912 : : }
8913 : 0 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
8914 : 0 : switch (gimple_call_combined_fn (_c1))
8915 : : {
8916 : 0 : case CFN_EXP:
8917 : 0 : if (gimple_call_num_args (_c1) == 1)
8918 : : {
8919 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8920 : 0 : _q20 = do_valueize (valueize, _q20);
8921 : 0 : {
8922 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8923 : 0 : if (flag_unsafe_math_optimizations
8924 : : )
8925 : : {
8926 : 0 : if (SCALAR_FLOAT_TYPE_P (type)
8927 : : )
8928 : : {
8929 : 0 : {
8930 : 0 : tree x;
8931 : 0 : switch (CFN_EXP)
8932 : : {
8933 : 0 : CASE_CFN_EXP:
8934 : 0 : x = build_real_truncate (type, dconst_e ());
8935 : 0 : break;
8936 : : CASE_CFN_EXP2:
8937 : : x = build_real (type, dconst2);
8938 : : break;
8939 : : CASE_CFN_EXP10:
8940 : : CASE_CFN_POW10:
8941 : : {
8942 : : REAL_VALUE_TYPE dconst10;
8943 : : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
8944 : : x = build_real (type, dconst10);
8945 : : }
8946 : : break;
8947 : : default:
8948 : : gcc_unreachable ();
8949 : : }
8950 : 0 : gimple_seq *lseq = seq;
8951 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1892;
8952 : 0 : {
8953 : 0 : res_op->set_op (MULT_EXPR, type, 2);
8954 : 0 : {
8955 : 0 : tree _o1[1], _r1;
8956 : 0 : _o1[0] = x;
8957 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
8958 : 0 : tem_op.resimplify (lseq, valueize);
8959 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8960 : 0 : if (!_r1) goto next_after_fail1892;
8961 : 0 : res_op->ops[0] = _r1;
8962 : : }
8963 : 0 : res_op->ops[1] = captures[0];
8964 : 0 : res_op->resimplify (lseq, valueize);
8965 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1012, __FILE__, __LINE__, true);
8966 : 0 : return true;
8967 : : }
8968 : : next_after_fail1892:;
8969 : : }
8970 : : }
8971 : : }
8972 : : }
8973 : : }
8974 : : break;
8975 : 0 : case CFN_POW:
8976 : 0 : if (gimple_call_num_args (_c1) == 2)
8977 : : {
8978 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8979 : 0 : _q20 = do_valueize (valueize, _q20);
8980 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8981 : 0 : _q21 = do_valueize (valueize, _q21);
8982 : 0 : {
8983 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8984 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, CFN_LOG2, CFN_POW))
8985 : 0 : return true;
8986 : : }
8987 : : }
8988 : : break;
8989 : 0 : case CFN_EXP2:
8990 : 0 : if (gimple_call_num_args (_c1) == 1)
8991 : : {
8992 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8993 : 0 : _q20 = do_valueize (valueize, _q20);
8994 : 0 : {
8995 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8996 : 0 : if (flag_unsafe_math_optimizations
8997 : : )
8998 : : {
8999 : 0 : gimple_seq *lseq = seq;
9000 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1893;
9001 : 0 : {
9002 : 0 : tree tem;
9003 : 0 : tem = captures[0];
9004 : 0 : res_op->set_value (tem);
9005 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1013, __FILE__, __LINE__, true);
9006 : 0 : return true;
9007 : : }
9008 : 0 : next_after_fail1893:;
9009 : : }
9010 : : }
9011 : : }
9012 : : break;
9013 : 0 : case CFN_SQRT:
9014 : 0 : if (gimple_call_num_args (_c1) == 1)
9015 : : {
9016 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9017 : 0 : _q20 = do_valueize (valueize, _q20);
9018 : 0 : {
9019 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9020 : 0 : if (flag_unsafe_math_optimizations
9021 : : )
9022 : : {
9023 : 0 : if (SCALAR_FLOAT_TYPE_P (type)
9024 : : )
9025 : : {
9026 : 0 : {
9027 : 0 : tree x;
9028 : 0 : switch (CFN_SQRT)
9029 : : {
9030 : 0 : CASE_CFN_SQRT:
9031 : 0 : x = build_real (type, dconsthalf);
9032 : 0 : break;
9033 : : CASE_CFN_CBRT:
9034 : : x = build_real_truncate (type, dconst_third ());
9035 : : break;
9036 : : default:
9037 : : gcc_unreachable ();
9038 : : }
9039 : 0 : gimple_seq *lseq = seq;
9040 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1894;
9041 : 0 : {
9042 : 0 : res_op->set_op (MULT_EXPR, type, 2);
9043 : 0 : res_op->ops[0] = x;
9044 : 0 : {
9045 : 0 : tree _o1[1], _r1;
9046 : 0 : _o1[0] = captures[0];
9047 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
9048 : 0 : tem_op.resimplify (lseq, valueize);
9049 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9050 : 0 : if (!_r1) goto next_after_fail1894;
9051 : 0 : res_op->ops[1] = _r1;
9052 : : }
9053 : 0 : res_op->resimplify (lseq, valueize);
9054 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1011, __FILE__, __LINE__, true);
9055 : 0 : return true;
9056 : : }
9057 : : next_after_fail1894:;
9058 : : }
9059 : : }
9060 : : }
9061 : : }
9062 : : }
9063 : : break;
9064 : 0 : case CFN_EXP10:
9065 : 0 : if (gimple_call_num_args (_c1) == 1)
9066 : : {
9067 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9068 : 0 : _q20 = do_valueize (valueize, _q20);
9069 : 0 : {
9070 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9071 : 0 : if (flag_unsafe_math_optimizations
9072 : : )
9073 : : {
9074 : 0 : if (SCALAR_FLOAT_TYPE_P (type)
9075 : : )
9076 : : {
9077 : 0 : {
9078 : 0 : tree x;
9079 : 0 : switch (CFN_EXP10)
9080 : : {
9081 : : CASE_CFN_EXP:
9082 : : x = build_real_truncate (type, dconst_e ());
9083 : : break;
9084 : : CASE_CFN_EXP2:
9085 : : x = build_real (type, dconst2);
9086 : : break;
9087 : 0 : CASE_CFN_EXP10:
9088 : 0 : CASE_CFN_POW10:
9089 : 0 : {
9090 : 0 : REAL_VALUE_TYPE dconst10;
9091 : 0 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
9092 : 0 : x = build_real (type, dconst10);
9093 : : }
9094 : 0 : break;
9095 : : default:
9096 : : gcc_unreachable ();
9097 : : }
9098 : 0 : gimple_seq *lseq = seq;
9099 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1895;
9100 : 0 : {
9101 : 0 : res_op->set_op (MULT_EXPR, type, 2);
9102 : 0 : {
9103 : 0 : tree _o1[1], _r1;
9104 : 0 : _o1[0] = x;
9105 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
9106 : 0 : tem_op.resimplify (lseq, valueize);
9107 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9108 : 0 : if (!_r1) goto next_after_fail1895;
9109 : 0 : res_op->ops[0] = _r1;
9110 : : }
9111 : 0 : res_op->ops[1] = captures[0];
9112 : 0 : res_op->resimplify (lseq, valueize);
9113 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1012, __FILE__, __LINE__, true);
9114 : 0 : return true;
9115 : : }
9116 : : next_after_fail1895:;
9117 : : }
9118 : : }
9119 : : }
9120 : : }
9121 : : }
9122 : : break;
9123 : : default:;
9124 : : }
9125 : : }
9126 : : break;
9127 : : default:;
9128 : : }
9129 : : return false;
9130 : : }
9131 : :
9132 : : bool
9133 : 6094 : gimple_simplify_CFN_BUILT_IN_EXPF (gimple_match_op *res_op, gimple_seq *seq,
9134 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9135 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9136 : : {
9137 : 6094 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9138 : 6094 : switch (TREE_CODE (_p0))
9139 : : {
9140 : 5910 : case SSA_NAME:
9141 : 5910 : if (gimple *_d1 = get_def (valueize, _p0))
9142 : : {
9143 : 3187 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9144 : 131 : switch (gimple_call_combined_fn (_c1))
9145 : : {
9146 : 7 : case CFN_BUILT_IN_LOGF:
9147 : 7 : if (gimple_call_num_args (_c1) == 1)
9148 : : {
9149 : 7 : tree _q20 = gimple_call_arg (_c1, 0);
9150 : 7 : _q20 = do_valueize (valueize, _q20);
9151 : 7 : {
9152 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9153 : 7 : if (flag_unsafe_math_optimizations
9154 : : )
9155 : : {
9156 : 7 : gimple_seq *lseq = seq;
9157 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1918;
9158 : 7 : {
9159 : 7 : tree tem;
9160 : 7 : tem = captures[0];
9161 : 7 : res_op->set_value (tem);
9162 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1014, __FILE__, __LINE__, true);
9163 : 7 : return true;
9164 : : }
9165 : 0 : next_after_fail1918:;
9166 : : }
9167 : : }
9168 : : }
9169 : : break;
9170 : : default:;
9171 : : }
9172 : : }
9173 : : break;
9174 : : default:;
9175 : : }
9176 : : return false;
9177 : : }
9178 : :
9179 : : bool
9180 : 5767 : gimple_simplify_CFN_BUILT_IN_EXPL (gimple_match_op *res_op, gimple_seq *seq,
9181 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9182 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9183 : : {
9184 : 5767 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9185 : 5767 : switch (TREE_CODE (_p0))
9186 : : {
9187 : 5605 : case SSA_NAME:
9188 : 5605 : if (gimple *_d1 = get_def (valueize, _p0))
9189 : : {
9190 : 3074 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9191 : 87 : switch (gimple_call_combined_fn (_c1))
9192 : : {
9193 : 7 : case CFN_BUILT_IN_LOGL:
9194 : 7 : if (gimple_call_num_args (_c1) == 1)
9195 : : {
9196 : 7 : tree _q20 = gimple_call_arg (_c1, 0);
9197 : 7 : _q20 = do_valueize (valueize, _q20);
9198 : 7 : {
9199 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9200 : 7 : if (flag_unsafe_math_optimizations
9201 : : )
9202 : : {
9203 : 7 : gimple_seq *lseq = seq;
9204 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1920;
9205 : 7 : {
9206 : 7 : tree tem;
9207 : 7 : tem = captures[0];
9208 : 7 : res_op->set_value (tem);
9209 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1014, __FILE__, __LINE__, true);
9210 : 7 : return true;
9211 : : }
9212 : 0 : next_after_fail1920:;
9213 : : }
9214 : : }
9215 : : }
9216 : : break;
9217 : : default:;
9218 : : }
9219 : : }
9220 : : break;
9221 : : default:;
9222 : : }
9223 : : return false;
9224 : : }
9225 : :
9226 : : bool
9227 : 1587 : gimple_simplify_CFN_BUILT_IN_EXP2 (gimple_match_op *res_op, gimple_seq *seq,
9228 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9229 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9230 : : {
9231 : 1587 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9232 : 1587 : switch (TREE_CODE (_p0))
9233 : : {
9234 : 591 : case SSA_NAME:
9235 : 591 : if (gimple *_d1 = get_def (valueize, _p0))
9236 : : {
9237 : 372 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9238 : 27 : switch (gimple_call_combined_fn (_c1))
9239 : : {
9240 : 6 : case CFN_BUILT_IN_LOG2:
9241 : 6 : if (gimple_call_num_args (_c1) == 1)
9242 : : {
9243 : 6 : tree _q20 = gimple_call_arg (_c1, 0);
9244 : 6 : _q20 = do_valueize (valueize, _q20);
9245 : 6 : {
9246 : 6 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9247 : 6 : if (flag_unsafe_math_optimizations
9248 : : )
9249 : : {
9250 : 6 : gimple_seq *lseq = seq;
9251 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1923;
9252 : 6 : {
9253 : 6 : tree tem;
9254 : 6 : tem = captures[0];
9255 : 6 : res_op->set_value (tem);
9256 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1014, __FILE__, __LINE__, true);
9257 : 6 : return true;
9258 : : }
9259 : 0 : next_after_fail1923:;
9260 : : }
9261 : : }
9262 : : }
9263 : : break;
9264 : : default:;
9265 : : }
9266 : : }
9267 : : break;
9268 : : default:;
9269 : : }
9270 : : return false;
9271 : : }
9272 : :
9273 : : bool
9274 : 0 : gimple_simplify_CFN_EXP2 (gimple_match_op *res_op, gimple_seq *seq,
9275 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9276 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9277 : : {
9278 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9279 : 0 : switch (TREE_CODE (_p0))
9280 : : {
9281 : 0 : case SSA_NAME:
9282 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9283 : : {
9284 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9285 : 0 : switch (gimple_call_combined_fn (_c1))
9286 : : {
9287 : 0 : case CFN_LOG2:
9288 : 0 : if (gimple_call_num_args (_c1) == 1)
9289 : : {
9290 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9291 : 0 : _q20 = do_valueize (valueize, _q20);
9292 : 0 : {
9293 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9294 : 0 : if (flag_unsafe_math_optimizations
9295 : : )
9296 : : {
9297 : 0 : gimple_seq *lseq = seq;
9298 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1925;
9299 : 0 : {
9300 : 0 : tree tem;
9301 : 0 : tem = captures[0];
9302 : 0 : res_op->set_value (tem);
9303 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1014, __FILE__, __LINE__, true);
9304 : 0 : return true;
9305 : : }
9306 : 0 : next_after_fail1925:;
9307 : : }
9308 : : }
9309 : : }
9310 : : break;
9311 : : default:;
9312 : : }
9313 : : }
9314 : : break;
9315 : : default:;
9316 : : }
9317 : : return false;
9318 : : }
9319 : :
9320 : : bool
9321 : 0 : gimple_simplify_CFN_EXP10 (gimple_match_op *res_op, gimple_seq *seq,
9322 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9323 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9324 : : {
9325 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9326 : 0 : switch (TREE_CODE (_p0))
9327 : : {
9328 : 0 : case SSA_NAME:
9329 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9330 : : {
9331 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9332 : 0 : switch (gimple_call_combined_fn (_c1))
9333 : : {
9334 : 0 : case CFN_LOG10:
9335 : 0 : if (gimple_call_num_args (_c1) == 1)
9336 : : {
9337 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9338 : 0 : _q20 = do_valueize (valueize, _q20);
9339 : 0 : {
9340 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9341 : 0 : if (flag_unsafe_math_optimizations
9342 : : )
9343 : : {
9344 : 0 : gimple_seq *lseq = seq;
9345 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1929;
9346 : 0 : {
9347 : 0 : tree tem;
9348 : 0 : tem = captures[0];
9349 : 0 : res_op->set_value (tem);
9350 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1014, __FILE__, __LINE__, true);
9351 : 0 : return true;
9352 : : }
9353 : 0 : next_after_fail1929:;
9354 : : }
9355 : : }
9356 : : }
9357 : : break;
9358 : : default:;
9359 : : }
9360 : : }
9361 : : break;
9362 : : default:;
9363 : : }
9364 : : return false;
9365 : : }
9366 : :
9367 : : bool
9368 : 11525 : gimple_simplify_CFN_BUILT_IN_SQRTL (gimple_match_op *res_op, gimple_seq *seq,
9369 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9370 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9371 : : {
9372 : 11525 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9373 : 11525 : switch (TREE_CODE (_p0))
9374 : : {
9375 : 11165 : case SSA_NAME:
9376 : 11165 : if (gimple *_d1 = get_def (valueize, _p0))
9377 : : {
9378 : 5050 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9379 : 112 : switch (gimple_call_combined_fn (_c1))
9380 : : {
9381 : 12 : case CFN_BUILT_IN_SQRTL:
9382 : 12 : if (gimple_call_num_args (_c1) == 1)
9383 : : {
9384 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9385 : 12 : _q20 = do_valueize (valueize, _q20);
9386 : 12 : {
9387 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9388 : 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
9389 : : )
9390 : : {
9391 : 12 : gimple_seq *lseq = seq;
9392 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1947;
9393 : 12 : {
9394 : 12 : res_op->set_op (CFN_BUILT_IN_POWL, type, 2);
9395 : 12 : res_op->ops[0] = captures[0];
9396 : 12 : res_op->ops[1] = build_real (type, dconst_quarter ());
9397 : 12 : res_op->resimplify (lseq, valueize);
9398 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1015, __FILE__, __LINE__, true);
9399 : 12 : return true;
9400 : : }
9401 : 0 : next_after_fail1947:;
9402 : : }
9403 : : }
9404 : : }
9405 : : break;
9406 : 12 : case CFN_BUILT_IN_EXP10L:
9407 : 12 : if (gimple_call_num_args (_c1) == 1)
9408 : : {
9409 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9410 : 12 : _q20 = do_valueize (valueize, _q20);
9411 : 12 : {
9412 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9413 : 12 : if (flag_unsafe_math_optimizations
9414 : : )
9415 : : {
9416 : 12 : gimple_seq *lseq = seq;
9417 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1948;
9418 : 12 : {
9419 : 12 : res_op->set_op (CFN_BUILT_IN_EXP10L, type, 1);
9420 : 12 : {
9421 : 12 : tree _o1[2], _r1;
9422 : 12 : _o1[0] = captures[0];
9423 : 12 : _o1[1] = build_real (type, dconsthalf);
9424 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9425 : 12 : tem_op.resimplify (lseq, valueize);
9426 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9427 : 12 : if (!_r1) goto next_after_fail1948;
9428 : 6 : res_op->ops[0] = _r1;
9429 : : }
9430 : 6 : res_op->resimplify (lseq, valueize);
9431 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1016, __FILE__, __LINE__, true);
9432 : 6 : return true;
9433 : : }
9434 : : next_after_fail1948:;
9435 : : }
9436 : : }
9437 : : }
9438 : : break;
9439 : 14 : case CFN_BUILT_IN_EXPL:
9440 : 14 : if (gimple_call_num_args (_c1) == 1)
9441 : : {
9442 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
9443 : 14 : _q20 = do_valueize (valueize, _q20);
9444 : 14 : {
9445 : 14 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9446 : 14 : if (flag_unsafe_math_optimizations
9447 : : )
9448 : : {
9449 : 14 : gimple_seq *lseq = seq;
9450 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1949;
9451 : 14 : {
9452 : 14 : res_op->set_op (CFN_BUILT_IN_EXPL, type, 1);
9453 : 14 : {
9454 : 14 : tree _o1[2], _r1;
9455 : 14 : _o1[0] = captures[0];
9456 : 14 : _o1[1] = build_real (type, dconsthalf);
9457 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9458 : 14 : tem_op.resimplify (lseq, valueize);
9459 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9460 : 14 : if (!_r1) goto next_after_fail1949;
9461 : 7 : res_op->ops[0] = _r1;
9462 : : }
9463 : 7 : res_op->resimplify (lseq, valueize);
9464 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1016, __FILE__, __LINE__, true);
9465 : 7 : return true;
9466 : : }
9467 : : next_after_fail1949:;
9468 : : }
9469 : : }
9470 : : }
9471 : : break;
9472 : 14 : case CFN_BUILT_IN_POWL:
9473 : 14 : if (gimple_call_num_args (_c1) == 2)
9474 : : {
9475 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
9476 : 14 : _q20 = do_valueize (valueize, _q20);
9477 : 14 : tree _q21 = gimple_call_arg (_c1, 1);
9478 : 14 : _q21 = do_valueize (valueize, _q21);
9479 : 14 : {
9480 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9481 : 14 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
9482 : : )
9483 : : {
9484 : 14 : gimple_seq *lseq = seq;
9485 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1950;
9486 : 14 : {
9487 : 14 : res_op->set_op (CFN_BUILT_IN_POWL, type, 2);
9488 : 14 : {
9489 : 14 : tree _o1[1], _r1;
9490 : 14 : _o1[0] = captures[0];
9491 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
9492 : 14 : tem_op.resimplify (lseq, valueize);
9493 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9494 : 14 : if (!_r1) goto next_after_fail1950;
9495 : 13 : res_op->ops[0] = _r1;
9496 : : }
9497 : 13 : {
9498 : 13 : tree _o1[2], _r1;
9499 : 13 : _o1[0] = captures[1];
9500 : 13 : _o1[1] = build_real (type, dconsthalf);
9501 : 13 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9502 : 13 : tem_op.resimplify (lseq, valueize);
9503 : 13 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9504 : 13 : if (!_r1) goto next_after_fail1950;
9505 : 7 : res_op->ops[1] = _r1;
9506 : : }
9507 : 7 : res_op->resimplify (lseq, valueize);
9508 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1017, __FILE__, __LINE__, true);
9509 : 7 : return true;
9510 : : }
9511 : 7 : next_after_fail1950:;
9512 : : }
9513 : : }
9514 : : }
9515 : : break;
9516 : 12 : case CFN_BUILT_IN_POW10L:
9517 : 12 : if (gimple_call_num_args (_c1) == 1)
9518 : : {
9519 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9520 : 12 : _q20 = do_valueize (valueize, _q20);
9521 : 12 : {
9522 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9523 : 12 : if (flag_unsafe_math_optimizations
9524 : : )
9525 : : {
9526 : 12 : gimple_seq *lseq = seq;
9527 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1951;
9528 : 12 : {
9529 : 12 : res_op->set_op (CFN_BUILT_IN_POW10L, type, 1);
9530 : 12 : {
9531 : 12 : tree _o1[2], _r1;
9532 : 12 : _o1[0] = captures[0];
9533 : 12 : _o1[1] = build_real (type, dconsthalf);
9534 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9535 : 12 : tem_op.resimplify (lseq, valueize);
9536 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9537 : 12 : if (!_r1) goto next_after_fail1951;
9538 : 6 : res_op->ops[0] = _r1;
9539 : : }
9540 : 6 : res_op->resimplify (lseq, valueize);
9541 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1016, __FILE__, __LINE__, true);
9542 : 6 : return true;
9543 : : }
9544 : : next_after_fail1951:;
9545 : : }
9546 : : }
9547 : : }
9548 : : break;
9549 : 12 : case CFN_BUILT_IN_CBRTL:
9550 : 12 : if (gimple_call_num_args (_c1) == 1)
9551 : : {
9552 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9553 : 12 : _q20 = do_valueize (valueize, _q20);
9554 : 12 : {
9555 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9556 : 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
9557 : : )
9558 : : {
9559 : 12 : gimple_seq *lseq = seq;
9560 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1952;
9561 : 12 : {
9562 : 12 : res_op->set_op (CFN_BUILT_IN_POWL, type, 2);
9563 : 12 : res_op->ops[0] = captures[0];
9564 : 12 : res_op->ops[1] = build_real_truncate (type, dconst_sixth ());
9565 : 12 : res_op->resimplify (lseq, valueize);
9566 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1018, __FILE__, __LINE__, true);
9567 : 12 : return true;
9568 : : }
9569 : 0 : next_after_fail1952:;
9570 : : }
9571 : : }
9572 : : }
9573 : : break;
9574 : 12 : case CFN_BUILT_IN_EXP2L:
9575 : 12 : if (gimple_call_num_args (_c1) == 1)
9576 : : {
9577 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9578 : 12 : _q20 = do_valueize (valueize, _q20);
9579 : 12 : {
9580 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9581 : 12 : if (flag_unsafe_math_optimizations
9582 : : )
9583 : : {
9584 : 12 : gimple_seq *lseq = seq;
9585 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1953;
9586 : 12 : {
9587 : 12 : res_op->set_op (CFN_BUILT_IN_EXP2L, type, 1);
9588 : 12 : {
9589 : 12 : tree _o1[2], _r1;
9590 : 12 : _o1[0] = captures[0];
9591 : 12 : _o1[1] = build_real (type, dconsthalf);
9592 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9593 : 12 : tem_op.resimplify (lseq, valueize);
9594 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9595 : 12 : if (!_r1) goto next_after_fail1953;
9596 : 6 : res_op->ops[0] = _r1;
9597 : : }
9598 : 6 : res_op->resimplify (lseq, valueize);
9599 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1016, __FILE__, __LINE__, true);
9600 : 6 : return true;
9601 : : }
9602 : : next_after_fail1953:;
9603 : : }
9604 : : }
9605 : : }
9606 : : break;
9607 : : default:;
9608 : : }
9609 : : }
9610 : : break;
9611 : : default:;
9612 : : }
9613 : : return false;
9614 : : }
9615 : :
9616 : : bool
9617 : 7 : gimple_simplify_CFN_SINH (gimple_match_op *res_op, gimple_seq *seq,
9618 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9619 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9620 : : {
9621 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9622 : 7 : switch (TREE_CODE (_p0))
9623 : : {
9624 : 7 : case SSA_NAME:
9625 : 7 : if (gimple *_d1 = get_def (valueize, _p0))
9626 : : {
9627 : 4 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9628 : 0 : switch (gimple_call_combined_fn (_c1))
9629 : : {
9630 : 0 : case CFN_ATANH:
9631 : 0 : if (gimple_call_num_args (_c1) == 1)
9632 : : {
9633 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9634 : 0 : _q20 = do_valueize (valueize, _q20);
9635 : 0 : {
9636 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
9637 : 0 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_SINH, CFN_ATANH, CFN_SQRT))
9638 : 0 : return true;
9639 : : }
9640 : : }
9641 : : break;
9642 : : default:;
9643 : : }
9644 : : }
9645 : : break;
9646 : : default:;
9647 : : }
9648 : : return false;
9649 : : }
9650 : :
9651 : : bool
9652 : 0 : gimple_simplify_CFN_BUILT_IN_TRUNCF32X (gimple_match_op *res_op, gimple_seq *seq,
9653 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9654 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9655 : : {
9656 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9657 : 0 : switch (TREE_CODE (_p0))
9658 : : {
9659 : 0 : case SSA_NAME:
9660 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9661 : : {
9662 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9663 : 0 : switch (gimple_call_combined_fn (_c1))
9664 : : {
9665 : 0 : case CFN_BUILT_IN_TRUNCF32X:
9666 : 0 : if (gimple_call_num_args (_c1) == 1)
9667 : : {
9668 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9669 : 0 : _q20 = do_valueize (valueize, _q20);
9670 : 0 : {
9671 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9672 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF32X))
9673 : 0 : return true;
9674 : : }
9675 : : }
9676 : : break;
9677 : : default:;
9678 : : }
9679 : : }
9680 : : break;
9681 : 0 : default:;
9682 : : }
9683 : 0 : if (integer_valued_real_p (_p0))
9684 : : {
9685 : 0 : {
9686 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9687 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF32X))
9688 : 0 : return true;
9689 : : }
9690 : : }
9691 : : return false;
9692 : : }
9693 : :
9694 : : bool
9695 : 154 : gimple_simplify_CFN_BUILT_IN_FLOORF16 (gimple_match_op *res_op, gimple_seq *seq,
9696 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9697 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9698 : : {
9699 : 154 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9700 : 154 : switch (TREE_CODE (_p0))
9701 : : {
9702 : 152 : case SSA_NAME:
9703 : 152 : if (gimple *_d1 = get_def (valueize, _p0))
9704 : : {
9705 : 100 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9706 : 0 : switch (gimple_call_combined_fn (_c1))
9707 : : {
9708 : 0 : case CFN_BUILT_IN_FLOORF16:
9709 : 0 : if (gimple_call_num_args (_c1) == 1)
9710 : : {
9711 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9712 : 0 : _q20 = do_valueize (valueize, _q20);
9713 : 0 : {
9714 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9715 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF16))
9716 : 0 : return true;
9717 : : }
9718 : : }
9719 : : break;
9720 : : default:;
9721 : : }
9722 : : }
9723 : : break;
9724 : 154 : default:;
9725 : : }
9726 : 154 : if (integer_valued_real_p (_p0))
9727 : : {
9728 : 0 : {
9729 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9730 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF16))
9731 : 0 : return true;
9732 : : }
9733 : : }
9734 : 154 : if (tree_expr_nonnegative_p (_p0))
9735 : : {
9736 : 0 : {
9737 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9738 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF16, CFN_BUILT_IN_TRUNCF16))
9739 : 0 : return true;
9740 : : }
9741 : : }
9742 : : return false;
9743 : : }
9744 : :
9745 : : bool
9746 : 0 : gimple_simplify_CFN_BUILT_IN_FLOORF128X (gimple_match_op *res_op, gimple_seq *seq,
9747 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9748 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9749 : : {
9750 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9751 : 0 : switch (TREE_CODE (_p0))
9752 : : {
9753 : 0 : case SSA_NAME:
9754 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9755 : : {
9756 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9757 : 0 : switch (gimple_call_combined_fn (_c1))
9758 : : {
9759 : 0 : case CFN_BUILT_IN_FLOORF128X:
9760 : 0 : if (gimple_call_num_args (_c1) == 1)
9761 : : {
9762 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9763 : 0 : _q20 = do_valueize (valueize, _q20);
9764 : 0 : {
9765 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9766 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF128X))
9767 : 0 : return true;
9768 : : }
9769 : : }
9770 : : break;
9771 : : default:;
9772 : : }
9773 : : }
9774 : : break;
9775 : 0 : default:;
9776 : : }
9777 : 0 : if (integer_valued_real_p (_p0))
9778 : : {
9779 : 0 : {
9780 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9781 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF128X))
9782 : 0 : return true;
9783 : : }
9784 : : }
9785 : 0 : if (tree_expr_nonnegative_p (_p0))
9786 : : {
9787 : 0 : {
9788 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9789 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF128X, CFN_BUILT_IN_TRUNCF128X))
9790 : 0 : return true;
9791 : : }
9792 : : }
9793 : : return false;
9794 : : }
9795 : :
9796 : : bool
9797 : 0 : gimple_simplify_CFN_BUILT_IN_CEILF32X (gimple_match_op *res_op, gimple_seq *seq,
9798 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9799 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9800 : : {
9801 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9802 : 0 : switch (TREE_CODE (_p0))
9803 : : {
9804 : 0 : case SSA_NAME:
9805 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9806 : : {
9807 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9808 : 0 : switch (gimple_call_combined_fn (_c1))
9809 : : {
9810 : 0 : case CFN_BUILT_IN_CEILF32X:
9811 : 0 : if (gimple_call_num_args (_c1) == 1)
9812 : : {
9813 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9814 : 0 : _q20 = do_valueize (valueize, _q20);
9815 : 0 : {
9816 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9817 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEILF32X))
9818 : 0 : return true;
9819 : : }
9820 : : }
9821 : : break;
9822 : : default:;
9823 : : }
9824 : : }
9825 : : break;
9826 : 0 : default:;
9827 : : }
9828 : 0 : if (integer_valued_real_p (_p0))
9829 : : {
9830 : 0 : {
9831 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9832 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEILF32X))
9833 : 0 : return true;
9834 : : }
9835 : : }
9836 : : return false;
9837 : : }
9838 : :
9839 : : bool
9840 : 0 : gimple_simplify_CFN_BUILT_IN_ROUNDF32 (gimple_match_op *res_op, gimple_seq *seq,
9841 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9842 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9843 : : {
9844 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9845 : 0 : switch (TREE_CODE (_p0))
9846 : : {
9847 : 0 : case SSA_NAME:
9848 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9849 : : {
9850 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9851 : 0 : switch (gimple_call_combined_fn (_c1))
9852 : : {
9853 : 0 : case CFN_BUILT_IN_ROUNDF32:
9854 : 0 : if (gimple_call_num_args (_c1) == 1)
9855 : : {
9856 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9857 : 0 : _q20 = do_valueize (valueize, _q20);
9858 : 0 : {
9859 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9860 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF32))
9861 : 0 : return true;
9862 : : }
9863 : : }
9864 : : break;
9865 : : default:;
9866 : : }
9867 : : }
9868 : : break;
9869 : 0 : default:;
9870 : : }
9871 : 0 : if (integer_valued_real_p (_p0))
9872 : : {
9873 : 0 : {
9874 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9875 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF32))
9876 : 0 : return true;
9877 : : }
9878 : : }
9879 : : return false;
9880 : : }
9881 : :
9882 : : bool
9883 : 72 : gimple_simplify_CFN_ROUND (gimple_match_op *res_op, gimple_seq *seq,
9884 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9885 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9886 : : {
9887 : 72 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9888 : 72 : switch (TREE_CODE (_p0))
9889 : : {
9890 : 72 : case SSA_NAME:
9891 : 72 : if (gimple *_d1 = get_def (valueize, _p0))
9892 : : {
9893 : 39 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9894 : 0 : switch (gimple_call_combined_fn (_c1))
9895 : : {
9896 : 0 : case CFN_ROUND:
9897 : 0 : if (gimple_call_num_args (_c1) == 1)
9898 : : {
9899 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9900 : 0 : _q20 = do_valueize (valueize, _q20);
9901 : 0 : {
9902 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9903 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_ROUND))
9904 : 0 : return true;
9905 : : }
9906 : : }
9907 : : break;
9908 : : default:;
9909 : : }
9910 : : }
9911 : : break;
9912 : 72 : default:;
9913 : : }
9914 : 72 : if (integer_valued_real_p (_p0))
9915 : : {
9916 : 0 : {
9917 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9918 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_ROUND))
9919 : 0 : return true;
9920 : : }
9921 : : }
9922 : : return false;
9923 : : }
9924 : :
9925 : : bool
9926 : 0 : gimple_simplify_CFN_BUILT_IN_NEARBYINTF32X (gimple_match_op *res_op, gimple_seq *seq,
9927 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9928 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9929 : : {
9930 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9931 : 0 : switch (TREE_CODE (_p0))
9932 : : {
9933 : 0 : case SSA_NAME:
9934 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9935 : : {
9936 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9937 : 0 : switch (gimple_call_combined_fn (_c1))
9938 : : {
9939 : 0 : case CFN_BUILT_IN_NEARBYINTF32X:
9940 : 0 : if (gimple_call_num_args (_c1) == 1)
9941 : : {
9942 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9943 : 0 : _q20 = do_valueize (valueize, _q20);
9944 : 0 : {
9945 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9946 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTF32X))
9947 : 0 : return true;
9948 : : }
9949 : : }
9950 : : break;
9951 : : default:;
9952 : : }
9953 : : }
9954 : : break;
9955 : 0 : default:;
9956 : : }
9957 : 0 : if (integer_valued_real_p (_p0))
9958 : : {
9959 : 0 : {
9960 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9961 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTF32X))
9962 : 0 : return true;
9963 : : }
9964 : : }
9965 : : return false;
9966 : : }
9967 : :
9968 : : bool
9969 : 154 : gimple_simplify_CFN_BUILT_IN_RINTF16 (gimple_match_op *res_op, gimple_seq *seq,
9970 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9971 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9972 : : {
9973 : 154 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9974 : 154 : switch (TREE_CODE (_p0))
9975 : : {
9976 : 152 : case SSA_NAME:
9977 : 152 : if (gimple *_d1 = get_def (valueize, _p0))
9978 : : {
9979 : 100 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9980 : 0 : switch (gimple_call_combined_fn (_c1))
9981 : : {
9982 : 0 : case CFN_BUILT_IN_RINTF16:
9983 : 0 : if (gimple_call_num_args (_c1) == 1)
9984 : : {
9985 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9986 : 0 : _q20 = do_valueize (valueize, _q20);
9987 : 0 : {
9988 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9989 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF16))
9990 : 0 : return true;
9991 : : }
9992 : : }
9993 : : break;
9994 : : default:;
9995 : : }
9996 : : }
9997 : : break;
9998 : 154 : default:;
9999 : : }
10000 : 154 : if (integer_valued_real_p (_p0))
10001 : : {
10002 : 0 : {
10003 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10004 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF16))
10005 : 0 : return true;
10006 : : }
10007 : : }
10008 : : return false;
10009 : : }
10010 : :
10011 : : bool
10012 : 0 : gimple_simplify_CFN_BUILT_IN_RINTF128X (gimple_match_op *res_op, gimple_seq *seq,
10013 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10014 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10015 : : {
10016 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10017 : 0 : switch (TREE_CODE (_p0))
10018 : : {
10019 : 0 : case SSA_NAME:
10020 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
10021 : : {
10022 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10023 : 0 : switch (gimple_call_combined_fn (_c1))
10024 : : {
10025 : 0 : case CFN_BUILT_IN_RINTF128X:
10026 : 0 : if (gimple_call_num_args (_c1) == 1)
10027 : : {
10028 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10029 : 0 : _q20 = do_valueize (valueize, _q20);
10030 : 0 : {
10031 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10032 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF128X))
10033 : 0 : return true;
10034 : : }
10035 : : }
10036 : : break;
10037 : : default:;
10038 : : }
10039 : : }
10040 : : break;
10041 : 0 : default:;
10042 : : }
10043 : 0 : if (integer_valued_real_p (_p0))
10044 : : {
10045 : 0 : {
10046 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10047 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF128X))
10048 : 0 : return true;
10049 : : }
10050 : : }
10051 : : return false;
10052 : : }
10053 : :
10054 : : bool
10055 : 1147 : gimple_simplify_CFN_BUILT_IN_LCEILL (gimple_match_op *res_op, gimple_seq *seq,
10056 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10057 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10058 : : {
10059 : 1147 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10060 : 1147 : switch (TREE_CODE (_p0))
10061 : : {
10062 : 1081 : case SSA_NAME:
10063 : 1081 : if (gimple *_d1 = get_def (valueize, _p0))
10064 : : {
10065 : 686 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10066 : 366 : switch (gimple_assign_rhs_code (_a1))
10067 : : {
10068 : 336 : CASE_CONVERT:
10069 : 336 : {
10070 : 336 : tree _q20 = gimple_assign_rhs1 (_a1);
10071 : 336 : _q20 = do_valueize (valueize, _q20);
10072 : 336 : if (gimple_double_value_p (_q20, valueize))
10073 : : {
10074 : 120 : {
10075 : 120 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10076 : 120 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LCEILL, CFN_BUILT_IN_LCEIL))
10077 : 120 : return true;
10078 : : }
10079 : : }
10080 : 216 : if (gimple_float_value_p (_q20, valueize))
10081 : : {
10082 : 216 : {
10083 : 216 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10084 : 216 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LCEILL, CFN_BUILT_IN_LCEILF))
10085 : 216 : return true;
10086 : : }
10087 : : }
10088 : : break;
10089 : : }
10090 : : default:;
10091 : : }
10092 : : }
10093 : : break;
10094 : 811 : default:;
10095 : : }
10096 : 811 : if (integer_valued_real_p (_p0))
10097 : : {
10098 : 20 : {
10099 : 20 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10100 : 20 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LCEILL))
10101 : 20 : return true;
10102 : : }
10103 : : }
10104 : : return false;
10105 : : }
10106 : :
10107 : : bool
10108 : 253 : gimple_simplify_CFN_BUILT_IN_LLROUNDL (gimple_match_op *res_op, gimple_seq *seq,
10109 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10110 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10111 : : {
10112 : 253 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10113 : 253 : switch (TREE_CODE (_p0))
10114 : : {
10115 : 219 : case SSA_NAME:
10116 : 219 : if (gimple *_d1 = get_def (valueize, _p0))
10117 : : {
10118 : 83 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10119 : 0 : switch (gimple_assign_rhs_code (_a1))
10120 : : {
10121 : 0 : CASE_CONVERT:
10122 : 0 : {
10123 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10124 : 0 : _q20 = do_valueize (valueize, _q20);
10125 : 0 : if (gimple_double_value_p (_q20, valueize))
10126 : : {
10127 : 0 : {
10128 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10129 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLROUNDL, CFN_BUILT_IN_LLROUND))
10130 : 0 : return true;
10131 : : }
10132 : : }
10133 : 0 : if (gimple_float_value_p (_q20, valueize))
10134 : : {
10135 : 0 : {
10136 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10137 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLROUNDL, CFN_BUILT_IN_LLROUNDF))
10138 : 0 : return true;
10139 : : }
10140 : : }
10141 : : break;
10142 : : }
10143 : : default:;
10144 : : }
10145 : : }
10146 : : break;
10147 : 253 : default:;
10148 : : }
10149 : 253 : if (integer_valued_real_p (_p0))
10150 : : {
10151 : 21 : {
10152 : 21 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10153 : 21 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLROUNDL))
10154 : 21 : return true;
10155 : : }
10156 : : }
10157 : 232 : {
10158 : 232 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10159 : 232 : if (gimple_simplify_659 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IROUNDL, CFN_BUILT_IN_LROUNDL, CFN_BUILT_IN_LLROUNDL))
10160 : 190 : return true;
10161 : : }
10162 : 42 : return false;
10163 : : }
10164 : :
10165 : : bool
10166 : 1413 : gimple_simplify_CFN_BUILT_IN_LCEIL (gimple_match_op *res_op, gimple_seq *seq,
10167 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10168 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10169 : : {
10170 : 1413 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10171 : 1413 : switch (TREE_CODE (_p0))
10172 : : {
10173 : 1298 : case SSA_NAME:
10174 : 1298 : if (gimple *_d1 = get_def (valueize, _p0))
10175 : : {
10176 : 835 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10177 : 264 : switch (gimple_assign_rhs_code (_a1))
10178 : : {
10179 : 234 : CASE_CONVERT:
10180 : 234 : {
10181 : 234 : tree _q20 = gimple_assign_rhs1 (_a1);
10182 : 234 : _q20 = do_valueize (valueize, _q20);
10183 : 234 : if (gimple_float_value_p (_q20, valueize))
10184 : : {
10185 : 168 : {
10186 : 168 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10187 : 168 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LCEIL, CFN_BUILT_IN_LCEILF))
10188 : 168 : return true;
10189 : : }
10190 : : }
10191 : : break;
10192 : : }
10193 : : default:;
10194 : : }
10195 : : }
10196 : : break;
10197 : 1245 : default:;
10198 : : }
10199 : 1245 : if (integer_valued_real_p (_p0))
10200 : : {
10201 : 20 : {
10202 : 20 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10203 : 20 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LCEIL))
10204 : 20 : return true;
10205 : : }
10206 : : }
10207 : : return false;
10208 : : }
10209 : :
10210 : : bool
10211 : 3477 : gimple_simplify_CFN_BUILT_IN_LRINT (gimple_match_op *res_op, gimple_seq *seq,
10212 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10213 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10214 : : {
10215 : 3477 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10216 : 3477 : switch (TREE_CODE (_p0))
10217 : : {
10218 : 3229 : case SSA_NAME:
10219 : 3229 : if (gimple *_d1 = get_def (valueize, _p0))
10220 : : {
10221 : 1959 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10222 : 2276 : switch (gimple_assign_rhs_code (_a1))
10223 : : {
10224 : 260 : CASE_CONVERT:
10225 : 260 : {
10226 : 260 : tree _q20 = gimple_assign_rhs1 (_a1);
10227 : 260 : _q20 = do_valueize (valueize, _q20);
10228 : 260 : if (gimple_float_value_p (_q20, valueize))
10229 : : {
10230 : 194 : {
10231 : 194 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10232 : 194 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LRINT, CFN_BUILT_IN_LRINTF))
10233 : 194 : return true;
10234 : : }
10235 : : }
10236 : : break;
10237 : : }
10238 : : default:;
10239 : : }
10240 : : }
10241 : : break;
10242 : 3283 : default:;
10243 : : }
10244 : 3283 : if (integer_valued_real_p (_p0))
10245 : : {
10246 : 62 : {
10247 : 62 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10248 : 62 : if (gimple_simplify_660 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LRINT))
10249 : 20 : return true;
10250 : : }
10251 : : }
10252 : : return false;
10253 : : }
10254 : :
10255 : : bool
10256 : 0 : gimple_simplify_CFN_LLFLOOR (gimple_match_op *res_op, gimple_seq *seq,
10257 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10258 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10259 : : {
10260 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10261 : 0 : if (tree_expr_nonnegative_p (_p0))
10262 : : {
10263 : 0 : {
10264 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10265 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_LLFLOOR))
10266 : 0 : return true;
10267 : : }
10268 : : }
10269 : 0 : if (integer_valued_real_p (_p0))
10270 : : {
10271 : 0 : {
10272 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10273 : 0 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_LLFLOOR))
10274 : 0 : return true;
10275 : : }
10276 : : }
10277 : 0 : {
10278 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10279 : 0 : if (gimple_simplify_659 (res_op, seq, valueize, type, captures, CFN_IFLOOR, CFN_LFLOOR, CFN_LLFLOOR))
10280 : 0 : return true;
10281 : : }
10282 : 0 : return false;
10283 : : }
10284 : :
10285 : : bool
10286 : 0 : gimple_simplify_CFN_LLROUND (gimple_match_op *res_op, gimple_seq *seq,
10287 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10288 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10289 : : {
10290 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10291 : 0 : if (integer_valued_real_p (_p0))
10292 : : {
10293 : 0 : {
10294 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10295 : 0 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_LLROUND))
10296 : 0 : return true;
10297 : : }
10298 : : }
10299 : 0 : {
10300 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10301 : 0 : if (gimple_simplify_659 (res_op, seq, valueize, type, captures, CFN_IROUND, CFN_LROUND, CFN_LLROUND))
10302 : 0 : return true;
10303 : : }
10304 : 0 : return false;
10305 : : }
10306 : :
10307 : : bool
10308 : 1003 : gimple_simplify_CFN_BUILT_IN_CPROJF (gimple_match_op *res_op, gimple_seq *seq,
10309 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10310 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10311 : : {
10312 : 1003 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10313 : 1003 : {
10314 : 1003 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10315 : 1003 : if (!HONOR_INFINITIES (type)
10316 : : )
10317 : : {
10318 : 21 : gimple_seq *lseq = seq;
10319 : 21 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1983;
10320 : 21 : {
10321 : 21 : tree tem;
10322 : 21 : tem = captures[0];
10323 : 21 : res_op->set_value (tem);
10324 : 21 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1024, __FILE__, __LINE__, true);
10325 : 21 : return true;
10326 : : }
10327 : 0 : next_after_fail1983:;
10328 : : }
10329 : : }
10330 : 982 : switch (TREE_CODE (_p0))
10331 : : {
10332 : 925 : case SSA_NAME:
10333 : 925 : if (gimple *_d1 = get_def (valueize, _p0))
10334 : : {
10335 : 542 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10336 : 736 : switch (gimple_assign_rhs_code (_a1))
10337 : : {
10338 : 336 : case COMPLEX_EXPR:
10339 : 336 : {
10340 : 336 : tree _q20 = gimple_assign_rhs1 (_a1);
10341 : 336 : _q20 = do_valueize (valueize, _q20);
10342 : 336 : tree _q21 = gimple_assign_rhs2 (_a1);
10343 : 336 : _q21 = do_valueize (valueize, _q21);
10344 : 336 : switch (TREE_CODE (_q20))
10345 : : {
10346 : 56 : case REAL_CST:
10347 : 56 : {
10348 : 56 : if (tree_expr_nonnegative_p (_q21))
10349 : : {
10350 : 56 : {
10351 : 56 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10352 : 56 : if (real_isinf (TREE_REAL_CST_PTR (captures[0]))
10353 : : )
10354 : : {
10355 : 56 : gimple_seq *lseq = seq;
10356 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1984;
10357 : 56 : {
10358 : 56 : tree tem;
10359 : 56 : tem = build_complex_inf (type, false);
10360 : 56 : res_op->set_value (tem);
10361 : 56 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1025, __FILE__, __LINE__, true);
10362 : 56 : return true;
10363 : : }
10364 : 0 : next_after_fail1984:;
10365 : : }
10366 : : }
10367 : : }
10368 : : break;
10369 : : }
10370 : 280 : default:;
10371 : : }
10372 : 280 : switch (TREE_CODE (_q21))
10373 : : {
10374 : 224 : case REAL_CST:
10375 : 224 : {
10376 : 224 : {
10377 : 224 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10378 : 224 : if (real_isinf (TREE_REAL_CST_PTR (captures[1]))
10379 : : )
10380 : : {
10381 : 224 : gimple_seq *lseq = seq;
10382 : 224 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1985;
10383 : 224 : {
10384 : 224 : tree tem;
10385 : 224 : tem = build_complex_inf (type, TREE_REAL_CST_PTR (captures[1])->sign);
10386 : 224 : res_op->set_value (tem);
10387 : 224 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1026, __FILE__, __LINE__, true);
10388 : 224 : return true;
10389 : : }
10390 : 0 : next_after_fail1985:;
10391 : : }
10392 : : }
10393 : 0 : break;
10394 : : }
10395 : : default:;
10396 : : }
10397 : : break;
10398 : : }
10399 : : default:;
10400 : : }
10401 : : }
10402 : : break;
10403 : : default:;
10404 : : }
10405 : : return false;
10406 : : }
10407 : :
10408 : : bool
10409 : 5742 : gimple_simplify_CFN_BUILT_IN_POPCOUNT (gimple_match_op *res_op, gimple_seq *seq,
10410 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10411 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10412 : : {
10413 : 5742 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10414 : 5742 : switch (TREE_CODE (_p0))
10415 : : {
10416 : 5635 : case SSA_NAME:
10417 : 5635 : if (gimple *_d1 = get_def (valueize, _p0))
10418 : : {
10419 : 3064 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10420 : 2294 : switch (gimple_assign_rhs_code (_a1))
10421 : : {
10422 : 1648 : CASE_CONVERT:
10423 : 1648 : {
10424 : 1648 : tree _q20 = gimple_assign_rhs1 (_a1);
10425 : 1648 : _q20 = do_valueize (valueize, _q20);
10426 : 1648 : switch (TREE_CODE (_q20))
10427 : : {
10428 : 1648 : case SSA_NAME:
10429 : 1648 : if (gimple *_d2 = get_def (valueize, _q20))
10430 : : {
10431 : 1617 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10432 : 2308 : switch (gimple_assign_rhs_code (_a2))
10433 : : {
10434 : 0 : case LROTATE_EXPR:
10435 : 0 : {
10436 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
10437 : 0 : _q30 = do_valueize (valueize, _q30);
10438 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
10439 : 0 : _q31 = do_valueize (valueize, _q31);
10440 : 0 : {
10441 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
10442 : 0 : if (gimple_simplify_678 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_POPCOUNT))
10443 : 0 : return true;
10444 : : }
10445 : 0 : break;
10446 : : }
10447 : 0 : case RROTATE_EXPR:
10448 : 0 : {
10449 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
10450 : 0 : _q30 = do_valueize (valueize, _q30);
10451 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
10452 : 0 : _q31 = do_valueize (valueize, _q31);
10453 : 0 : {
10454 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
10455 : 0 : if (gimple_simplify_678 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_POPCOUNT))
10456 : 0 : return true;
10457 : : }
10458 : 0 : break;
10459 : : }
10460 : : default:;
10461 : : }
10462 : 268 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
10463 : 16 : switch (gimple_call_combined_fn (_c2))
10464 : : {
10465 : 0 : case CFN_BUILT_IN_BSWAP128:
10466 : 0 : if (gimple_call_num_args (_c2) == 1)
10467 : : {
10468 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10469 : 0 : _q30 = do_valueize (valueize, _q30);
10470 : 0 : {
10471 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10472 : 0 : if (gimple_simplify_677 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_POPCOUNT))
10473 : 0 : return true;
10474 : : }
10475 : : }
10476 : : break;
10477 : 16 : case CFN_BUILT_IN_BSWAP16:
10478 : 16 : if (gimple_call_num_args (_c2) == 1)
10479 : : {
10480 : 16 : tree _q30 = gimple_call_arg (_c2, 0);
10481 : 16 : _q30 = do_valueize (valueize, _q30);
10482 : 16 : {
10483 : 16 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10484 : 16 : if (gimple_simplify_677 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_POPCOUNT))
10485 : 8 : return true;
10486 : : }
10487 : : }
10488 : : break;
10489 : 0 : case CFN_BUILT_IN_BSWAP32:
10490 : 0 : if (gimple_call_num_args (_c2) == 1)
10491 : : {
10492 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10493 : 0 : _q30 = do_valueize (valueize, _q30);
10494 : 0 : {
10495 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10496 : 0 : if (gimple_simplify_677 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_POPCOUNT))
10497 : 0 : return true;
10498 : : }
10499 : : }
10500 : : break;
10501 : 0 : case CFN_BUILT_IN_BSWAP64:
10502 : 0 : if (gimple_call_num_args (_c2) == 1)
10503 : : {
10504 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10505 : 0 : _q30 = do_valueize (valueize, _q30);
10506 : 0 : {
10507 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10508 : 0 : if (gimple_simplify_677 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_POPCOUNT))
10509 : 0 : return true;
10510 : : }
10511 : : }
10512 : : break;
10513 : : default:;
10514 : : }
10515 : : }
10516 : : break;
10517 : 1640 : default:;
10518 : : }
10519 : 1640 : {
10520 : 1640 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
10521 : 1640 : if (gimple_simplify_679 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POPCOUNT))
10522 : 18 : return true;
10523 : : }
10524 : 1622 : break;
10525 : : }
10526 : 0 : case LROTATE_EXPR:
10527 : 0 : {
10528 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10529 : 0 : _q20 = do_valueize (valueize, _q20);
10530 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10531 : 0 : _q21 = do_valueize (valueize, _q21);
10532 : 0 : {
10533 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
10534 : 0 : if (gimple_simplify_681 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_POPCOUNT))
10535 : 0 : return true;
10536 : : }
10537 : 0 : break;
10538 : : }
10539 : 2 : case RROTATE_EXPR:
10540 : 2 : {
10541 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
10542 : 2 : _q20 = do_valueize (valueize, _q20);
10543 : 2 : tree _q21 = gimple_assign_rhs2 (_a1);
10544 : 2 : _q21 = do_valueize (valueize, _q21);
10545 : 2 : {
10546 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
10547 : 2 : if (gimple_simplify_681 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_POPCOUNT))
10548 : 2 : return true;
10549 : : }
10550 : 0 : break;
10551 : : }
10552 : : default:;
10553 : : }
10554 : 994 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10555 : 48 : switch (gimple_call_combined_fn (_c1))
10556 : : {
10557 : 0 : case CFN_BUILT_IN_BSWAP128:
10558 : 0 : if (gimple_call_num_args (_c1) == 1)
10559 : : {
10560 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10561 : 0 : _q20 = do_valueize (valueize, _q20);
10562 : 0 : {
10563 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10564 : 0 : if (gimple_simplify_680 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_POPCOUNT))
10565 : 0 : return true;
10566 : : }
10567 : : }
10568 : : break;
10569 : 0 : case CFN_BUILT_IN_BSWAP16:
10570 : 0 : if (gimple_call_num_args (_c1) == 1)
10571 : : {
10572 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10573 : 0 : _q20 = do_valueize (valueize, _q20);
10574 : 0 : {
10575 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10576 : 0 : if (gimple_simplify_680 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_POPCOUNT))
10577 : 0 : return true;
10578 : : }
10579 : : }
10580 : : break;
10581 : 4 : case CFN_BUILT_IN_BSWAP32:
10582 : 4 : if (gimple_call_num_args (_c1) == 1)
10583 : : {
10584 : 4 : tree _q20 = gimple_call_arg (_c1, 0);
10585 : 4 : _q20 = do_valueize (valueize, _q20);
10586 : 4 : {
10587 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10588 : 4 : if (gimple_simplify_680 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_POPCOUNT))
10589 : 4 : return true;
10590 : : }
10591 : : }
10592 : : break;
10593 : 0 : case CFN_BUILT_IN_BSWAP64:
10594 : 0 : if (gimple_call_num_args (_c1) == 1)
10595 : : {
10596 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10597 : 0 : _q20 = do_valueize (valueize, _q20);
10598 : 0 : {
10599 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10600 : 0 : if (gimple_simplify_680 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_POPCOUNT))
10601 : 0 : return true;
10602 : : }
10603 : : }
10604 : : break;
10605 : : default:;
10606 : : }
10607 : : }
10608 : : break;
10609 : 5710 : default:;
10610 : : }
10611 : 5710 : {
10612 : 5710 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10613 : 5710 : if (gimple_simplify_682 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POPCOUNT))
10614 : 8 : return true;
10615 : : }
10616 : 5702 : return false;
10617 : : }
10618 : :
10619 : : bool
10620 : 0 : gimple_simplify_CFN_BUILT_IN_PARITYIMAX (gimple_match_op *res_op, gimple_seq *seq,
10621 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10622 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10623 : : {
10624 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10625 : 0 : switch (TREE_CODE (_p0))
10626 : : {
10627 : 0 : case SSA_NAME:
10628 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
10629 : : {
10630 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10631 : 0 : switch (gimple_assign_rhs_code (_a1))
10632 : : {
10633 : 0 : case BIT_NOT_EXPR:
10634 : 0 : {
10635 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10636 : 0 : _q20 = do_valueize (valueize, _q20);
10637 : 0 : {
10638 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10639 : 0 : if (gimple_simplify_683 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYIMAX))
10640 : 0 : return true;
10641 : : }
10642 : 0 : break;
10643 : : }
10644 : 0 : CASE_CONVERT:
10645 : 0 : {
10646 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10647 : 0 : _q20 = do_valueize (valueize, _q20);
10648 : 0 : switch (TREE_CODE (_q20))
10649 : : {
10650 : 0 : case SSA_NAME:
10651 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
10652 : : {
10653 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10654 : 0 : switch (gimple_assign_rhs_code (_a2))
10655 : : {
10656 : 0 : case LROTATE_EXPR:
10657 : 0 : {
10658 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
10659 : 0 : _q30 = do_valueize (valueize, _q30);
10660 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
10661 : 0 : _q31 = do_valueize (valueize, _q31);
10662 : 0 : {
10663 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
10664 : 0 : if (gimple_simplify_685 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_PARITYIMAX))
10665 : 0 : return true;
10666 : : }
10667 : 0 : break;
10668 : : }
10669 : 0 : case RROTATE_EXPR:
10670 : 0 : {
10671 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
10672 : 0 : _q30 = do_valueize (valueize, _q30);
10673 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
10674 : 0 : _q31 = do_valueize (valueize, _q31);
10675 : 0 : {
10676 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
10677 : 0 : if (gimple_simplify_685 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_PARITYIMAX))
10678 : 0 : return true;
10679 : : }
10680 : 0 : break;
10681 : : }
10682 : : default:;
10683 : : }
10684 : 0 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
10685 : 0 : switch (gimple_call_combined_fn (_c2))
10686 : : {
10687 : 0 : case CFN_BUILT_IN_BSWAP128:
10688 : 0 : if (gimple_call_num_args (_c2) == 1)
10689 : : {
10690 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10691 : 0 : _q30 = do_valueize (valueize, _q30);
10692 : 0 : {
10693 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10694 : 0 : if (gimple_simplify_684 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_PARITYIMAX))
10695 : 0 : return true;
10696 : : }
10697 : : }
10698 : : break;
10699 : 0 : case CFN_BUILT_IN_BSWAP16:
10700 : 0 : if (gimple_call_num_args (_c2) == 1)
10701 : : {
10702 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10703 : 0 : _q30 = do_valueize (valueize, _q30);
10704 : 0 : {
10705 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10706 : 0 : if (gimple_simplify_684 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_PARITYIMAX))
10707 : 0 : return true;
10708 : : }
10709 : : }
10710 : : break;
10711 : 0 : case CFN_BUILT_IN_BSWAP32:
10712 : 0 : if (gimple_call_num_args (_c2) == 1)
10713 : : {
10714 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10715 : 0 : _q30 = do_valueize (valueize, _q30);
10716 : 0 : {
10717 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10718 : 0 : if (gimple_simplify_684 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_PARITYIMAX))
10719 : 0 : return true;
10720 : : }
10721 : : }
10722 : : break;
10723 : 0 : case CFN_BUILT_IN_BSWAP64:
10724 : 0 : if (gimple_call_num_args (_c2) == 1)
10725 : : {
10726 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10727 : 0 : _q30 = do_valueize (valueize, _q30);
10728 : 0 : {
10729 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10730 : 0 : if (gimple_simplify_684 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_PARITYIMAX))
10731 : 0 : return true;
10732 : : }
10733 : : }
10734 : : break;
10735 : : default:;
10736 : : }
10737 : : }
10738 : : break;
10739 : 0 : default:;
10740 : : }
10741 : 0 : {
10742 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
10743 : 0 : if (gimple_simplify_686 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYIMAX))
10744 : 0 : return true;
10745 : : }
10746 : 0 : break;
10747 : : }
10748 : 0 : case LROTATE_EXPR:
10749 : 0 : {
10750 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10751 : 0 : _q20 = do_valueize (valueize, _q20);
10752 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10753 : 0 : _q21 = do_valueize (valueize, _q21);
10754 : 0 : {
10755 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
10756 : 0 : if (gimple_simplify_688 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_PARITYIMAX))
10757 : 0 : return true;
10758 : : }
10759 : 0 : break;
10760 : : }
10761 : 0 : case RROTATE_EXPR:
10762 : 0 : {
10763 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10764 : 0 : _q20 = do_valueize (valueize, _q20);
10765 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10766 : 0 : _q21 = do_valueize (valueize, _q21);
10767 : 0 : {
10768 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
10769 : 0 : if (gimple_simplify_688 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_PARITYIMAX))
10770 : 0 : return true;
10771 : : }
10772 : 0 : break;
10773 : : }
10774 : : default:;
10775 : : }
10776 : 0 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10777 : 0 : switch (gimple_call_combined_fn (_c1))
10778 : : {
10779 : 0 : case CFN_BUILT_IN_BSWAP128:
10780 : 0 : if (gimple_call_num_args (_c1) == 1)
10781 : : {
10782 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10783 : 0 : _q20 = do_valueize (valueize, _q20);
10784 : 0 : {
10785 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10786 : 0 : if (gimple_simplify_687 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_PARITYIMAX))
10787 : 0 : return true;
10788 : : }
10789 : : }
10790 : : break;
10791 : 0 : case CFN_BUILT_IN_BSWAP16:
10792 : 0 : if (gimple_call_num_args (_c1) == 1)
10793 : : {
10794 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10795 : 0 : _q20 = do_valueize (valueize, _q20);
10796 : 0 : {
10797 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10798 : 0 : if (gimple_simplify_687 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_PARITYIMAX))
10799 : 0 : return true;
10800 : : }
10801 : : }
10802 : : break;
10803 : 0 : case CFN_BUILT_IN_BSWAP32:
10804 : 0 : if (gimple_call_num_args (_c1) == 1)
10805 : : {
10806 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10807 : 0 : _q20 = do_valueize (valueize, _q20);
10808 : 0 : {
10809 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10810 : 0 : if (gimple_simplify_687 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_PARITYIMAX))
10811 : 0 : return true;
10812 : : }
10813 : : }
10814 : : break;
10815 : 0 : case CFN_BUILT_IN_BSWAP64:
10816 : 0 : if (gimple_call_num_args (_c1) == 1)
10817 : : {
10818 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10819 : 0 : _q20 = do_valueize (valueize, _q20);
10820 : 0 : {
10821 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10822 : 0 : if (gimple_simplify_687 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_PARITYIMAX))
10823 : 0 : return true;
10824 : : }
10825 : : }
10826 : : break;
10827 : : default:;
10828 : : }
10829 : : }
10830 : : break;
10831 : 0 : default:;
10832 : : }
10833 : 0 : {
10834 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10835 : 0 : if (gimple_simplify_682 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYIMAX))
10836 : 0 : return true;
10837 : : }
10838 : 0 : return false;
10839 : : }
10840 : :
10841 : : bool
10842 : 77388964 : gimple_simplify_EQ_EXPR (gimple_match_op *res_op, gimple_seq *seq,
10843 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10844 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
10845 : : {
10846 : 77388964 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10847 : 77388964 : switch (TREE_CODE (_p1))
10848 : : {
10849 : 12530717 : case SSA_NAME:
10850 : 12530717 : if (gimple *_d1 = get_def (valueize, _p1))
10851 : : {
10852 : 4195772 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10853 : 6130036 : switch (gimple_assign_rhs_code (_a1))
10854 : : {
10855 : 516 : case NEGATE_EXPR:
10856 : 516 : {
10857 : 516 : tree _q30 = gimple_assign_rhs1 (_a1);
10858 : 516 : _q30 = do_valueize (valueize, _q30);
10859 : 516 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10860 : : {
10861 : 99 : {
10862 : 99 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10863 : 99 : if (gimple_simplify_222 (res_op, seq, valueize, type, captures, EQ_EXPR))
10864 : 0 : return true;
10865 : : }
10866 : : }
10867 : : break;
10868 : : }
10869 : : default:;
10870 : : }
10871 : : }
10872 : : break;
10873 : 77388964 : default:;
10874 : : }
10875 : 77388964 : switch (TREE_CODE (_p0))
10876 : : {
10877 : 76563149 : case SSA_NAME:
10878 : 76563149 : if (gimple *_d1 = get_def (valueize, _p0))
10879 : : {
10880 : 26326938 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10881 : 31932743 : switch (gimple_assign_rhs_code (_a1))
10882 : : {
10883 : 6607 : case NEGATE_EXPR:
10884 : 6607 : {
10885 : 6607 : tree _q20 = gimple_assign_rhs1 (_a1);
10886 : 6607 : _q20 = do_valueize (valueize, _q20);
10887 : 6607 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10888 : : {
10889 : 158 : {
10890 : 158 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10891 : 158 : if (gimple_simplify_222 (res_op, seq, valueize, type, captures, EQ_EXPR))
10892 : 21 : return true;
10893 : : }
10894 : : }
10895 : : break;
10896 : : }
10897 : 0 : case CEIL_MOD_EXPR:
10898 : 0 : {
10899 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10900 : 0 : _q20 = do_valueize (valueize, _q20);
10901 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10902 : 0 : _q21 = do_valueize (valueize, _q21);
10903 : 0 : if (integer_pow2p (_q21))
10904 : : {
10905 : 0 : if (integer_zerop (_p1))
10906 : : {
10907 : 0 : {
10908 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10909 : 0 : if (gimple_simplify_223 (res_op, seq, valueize, type, captures, EQ_EXPR, CEIL_MOD_EXPR))
10910 : 0 : return true;
10911 : : }
10912 : : }
10913 : : }
10914 : : break;
10915 : : }
10916 : 402 : case FLOOR_MOD_EXPR:
10917 : 402 : {
10918 : 402 : tree _q20 = gimple_assign_rhs1 (_a1);
10919 : 402 : _q20 = do_valueize (valueize, _q20);
10920 : 402 : tree _q21 = gimple_assign_rhs2 (_a1);
10921 : 402 : _q21 = do_valueize (valueize, _q21);
10922 : 402 : if (integer_pow2p (_q21))
10923 : : {
10924 : 4 : if (integer_zerop (_p1))
10925 : : {
10926 : 2 : {
10927 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10928 : 2 : if (gimple_simplify_223 (res_op, seq, valueize, type, captures, EQ_EXPR, FLOOR_MOD_EXPR))
10929 : 0 : return true;
10930 : : }
10931 : : }
10932 : : }
10933 : : break;
10934 : : }
10935 : 0 : case ROUND_MOD_EXPR:
10936 : 0 : {
10937 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10938 : 0 : _q20 = do_valueize (valueize, _q20);
10939 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10940 : 0 : _q21 = do_valueize (valueize, _q21);
10941 : 0 : if (integer_pow2p (_q21))
10942 : : {
10943 : 0 : if (integer_zerop (_p1))
10944 : : {
10945 : 0 : {
10946 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10947 : 0 : if (gimple_simplify_223 (res_op, seq, valueize, type, captures, EQ_EXPR, ROUND_MOD_EXPR))
10948 : 0 : return true;
10949 : : }
10950 : : }
10951 : : }
10952 : : break;
10953 : : }
10954 : 53700 : case TRUNC_MOD_EXPR:
10955 : 53700 : {
10956 : 53700 : tree _q20 = gimple_assign_rhs1 (_a1);
10957 : 53700 : _q20 = do_valueize (valueize, _q20);
10958 : 53700 : tree _q21 = gimple_assign_rhs2 (_a1);
10959 : 53700 : _q21 = do_valueize (valueize, _q21);
10960 : 53700 : if (integer_pow2p (_q21))
10961 : : {
10962 : 3400 : if (integer_zerop (_p1))
10963 : : {
10964 : 499 : {
10965 : 499 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10966 : 499 : if (gimple_simplify_223 (res_op, seq, valueize, type, captures, EQ_EXPR, TRUNC_MOD_EXPR))
10967 : 145 : return true;
10968 : : }
10969 : : }
10970 : : }
10971 : : break;
10972 : : }
10973 : 4316 : case LSHIFT_EXPR:
10974 : 4316 : {
10975 : 4316 : tree _q20 = gimple_assign_rhs1 (_a1);
10976 : 4316 : _q20 = do_valueize (valueize, _q20);
10977 : 4316 : tree _q21 = gimple_assign_rhs2 (_a1);
10978 : 4316 : _q21 = do_valueize (valueize, _q21);
10979 : 4316 : if (gimple_zero_one_valued_p (_q20, valueize))
10980 : : {
10981 : 561 : switch (TREE_CODE (_q21))
10982 : : {
10983 : 55 : case INTEGER_CST:
10984 : 55 : {
10985 : 55 : if (integer_zerop (_p1))
10986 : : {
10987 : 22 : {
10988 : 22 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10989 : 22 : if (tree_fits_shwi_p (captures[1])
10990 : 22 : && tree_to_shwi (captures[1]) > 0
10991 : 44 : && tree_to_shwi (captures[1]) < TYPE_PRECISION (TREE_TYPE (captures[0]))
10992 : : )
10993 : : {
10994 : 22 : gimple_seq *lseq = seq;
10995 : 22 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2329;
10996 : 22 : {
10997 : 22 : res_op->set_op (EQ_EXPR, type, 2);
10998 : 22 : res_op->ops[0] = captures[0];
10999 : 22 : res_op->ops[1] = captures[2];
11000 : 22 : res_op->resimplify (lseq, valueize);
11001 : 22 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1123, __FILE__, __LINE__, true);
11002 : 22 : return true;
11003 : : }
11004 : 0 : next_after_fail2329:;
11005 : : }
11006 : : }
11007 : : }
11008 : : break;
11009 : : }
11010 : : default:;
11011 : : }
11012 : : }
11013 : : break;
11014 : : }
11015 : 1189977 : case BIT_AND_EXPR:
11016 : 1189977 : {
11017 : 1189977 : tree _q20 = gimple_assign_rhs1 (_a1);
11018 : 1189977 : _q20 = do_valueize (valueize, _q20);
11019 : 1189977 : tree _q21 = gimple_assign_rhs2 (_a1);
11020 : 1189977 : _q21 = do_valueize (valueize, _q21);
11021 : 1189977 : if (tree_swap_operands_p (_q20, _q21))
11022 : 5769 : std::swap (_q20, _q21);
11023 : 1189977 : if (gimple_truth_valued_p (_q20, valueize))
11024 : : {
11025 : 453 : if (gimple_truth_valued_p (_q21, valueize))
11026 : : {
11027 : 417 : switch (TREE_CODE (_p1))
11028 : : {
11029 : 10 : case SSA_NAME:
11030 : 10 : if (gimple *_d2 = get_def (valueize, _p1))
11031 : : {
11032 : 10 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11033 : 10 : switch (gimple_assign_rhs_code (_a2))
11034 : : {
11035 : 2 : case BIT_XOR_EXPR:
11036 : 2 : {
11037 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
11038 : 2 : _q50 = do_valueize (valueize, _q50);
11039 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
11040 : 2 : _q51 = do_valueize (valueize, _q51);
11041 : 2 : if (tree_swap_operands_p (_q50, _q51))
11042 : 0 : std::swap (_q50, _q51);
11043 : 2 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11044 : : {
11045 : 2 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11046 : : {
11047 : 2 : {
11048 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11049 : 2 : gimple_seq *lseq = seq;
11050 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2330;
11051 : 2 : {
11052 : 2 : res_op->set_op (BIT_NOT_EXPR, type, 1);
11053 : 2 : {
11054 : 2 : tree _o1[2], _r1;
11055 : 2 : _o1[0] = captures[0];
11056 : 2 : _o1[1] = captures[1];
11057 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11058 : 2 : tem_op.resimplify (lseq, valueize);
11059 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11060 : 2 : if (!_r1) goto next_after_fail2330;
11061 : 1 : res_op->ops[0] = _r1;
11062 : : }
11063 : 1 : res_op->resimplify (lseq, valueize);
11064 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1032, __FILE__, __LINE__, true);
11065 : 1 : return true;
11066 : : }
11067 : 1 : next_after_fail2330:;
11068 : : }
11069 : : }
11070 : : }
11071 : 1 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11072 : : {
11073 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11074 : : {
11075 : 0 : {
11076 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11077 : 0 : gimple_seq *lseq = seq;
11078 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2331;
11079 : 0 : {
11080 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
11081 : 0 : {
11082 : 0 : tree _o1[2], _r1;
11083 : 0 : _o1[0] = captures[0];
11084 : 0 : _o1[1] = captures[1];
11085 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11086 : 0 : tem_op.resimplify (lseq, valueize);
11087 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11088 : 0 : if (!_r1) goto next_after_fail2331;
11089 : 0 : res_op->ops[0] = _r1;
11090 : : }
11091 : 0 : res_op->resimplify (lseq, valueize);
11092 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1032, __FILE__, __LINE__, true);
11093 : 0 : return true;
11094 : : }
11095 : 0 : next_after_fail2331:;
11096 : : }
11097 : : }
11098 : : }
11099 : 77370081 : break;
11100 : : }
11101 : : default:;
11102 : : }
11103 : : }
11104 : : break;
11105 : : default:;
11106 : : }
11107 : : }
11108 : : }
11109 : 77370081 : break;
11110 : : }
11111 : 1234 : case BIT_XOR_EXPR:
11112 : 1234 : {
11113 : 1234 : tree _q20 = gimple_assign_rhs1 (_a1);
11114 : 1234 : _q20 = do_valueize (valueize, _q20);
11115 : 1234 : tree _q21 = gimple_assign_rhs2 (_a1);
11116 : 1234 : _q21 = do_valueize (valueize, _q21);
11117 : 1234 : if (tree_swap_operands_p (_q20, _q21))
11118 : 160 : std::swap (_q20, _q21);
11119 : 1234 : switch (TREE_CODE (_p1))
11120 : : {
11121 : 510 : case SSA_NAME:
11122 : 510 : if (gimple *_d2 = get_def (valueize, _p1))
11123 : : {
11124 : 503 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11125 : 617 : switch (gimple_assign_rhs_code (_a2))
11126 : : {
11127 : 1 : case BIT_AND_EXPR:
11128 : 1 : {
11129 : 1 : tree _q50 = gimple_assign_rhs1 (_a2);
11130 : 1 : _q50 = do_valueize (valueize, _q50);
11131 : 1 : tree _q51 = gimple_assign_rhs2 (_a2);
11132 : 1 : _q51 = do_valueize (valueize, _q51);
11133 : 1 : if (tree_swap_operands_p (_q50, _q51))
11134 : 0 : std::swap (_q50, _q51);
11135 : 1 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11136 : : {
11137 : 1 : if (gimple_truth_valued_p (_q50, valueize))
11138 : : {
11139 : 1 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11140 : : {
11141 : 1 : if (gimple_truth_valued_p (_q51, valueize))
11142 : : {
11143 : 1 : {
11144 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11145 : 1 : gimple_seq *lseq = seq;
11146 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2332;
11147 : 1 : {
11148 : 1 : res_op->set_op (BIT_NOT_EXPR, type, 1);
11149 : 1 : {
11150 : 1 : tree _o1[2], _r1;
11151 : 1 : _o1[0] = captures[0];
11152 : 1 : _o1[1] = captures[1];
11153 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11154 : 1 : tem_op.resimplify (lseq, valueize);
11155 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11156 : 1 : if (!_r1) goto next_after_fail2332;
11157 : 1 : res_op->ops[0] = _r1;
11158 : : }
11159 : 1 : res_op->resimplify (lseq, valueize);
11160 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1032, __FILE__, __LINE__, true);
11161 : 1 : return true;
11162 : : }
11163 : 0 : next_after_fail2332:;
11164 : : }
11165 : : }
11166 : : }
11167 : : }
11168 : : }
11169 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11170 : : {
11171 : 0 : if (gimple_truth_valued_p (_q50, valueize))
11172 : : {
11173 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11174 : : {
11175 : 0 : if (gimple_truth_valued_p (_q51, valueize))
11176 : : {
11177 : 0 : {
11178 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11179 : 0 : gimple_seq *lseq = seq;
11180 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2333;
11181 : 0 : {
11182 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
11183 : 0 : {
11184 : 0 : tree _o1[2], _r1;
11185 : 0 : _o1[0] = captures[0];
11186 : 0 : _o1[1] = captures[1];
11187 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
11188 : 0 : tem_op.resimplify (lseq, valueize);
11189 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11190 : 0 : if (!_r1) goto next_after_fail2333;
11191 : 0 : res_op->ops[0] = _r1;
11192 : : }
11193 : 0 : res_op->resimplify (lseq, valueize);
11194 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1032, __FILE__, __LINE__, true);
11195 : 0 : return true;
11196 : : }
11197 : 0 : next_after_fail2333:;
11198 : : }
11199 : : }
11200 : : }
11201 : : }
11202 : : }
11203 : 77370081 : break;
11204 : : }
11205 : : default:;
11206 : : }
11207 : : }
11208 : : break;
11209 : : default:;
11210 : : }
11211 : 77370081 : break;
11212 : : }
11213 : 2529 : case BIT_NOT_EXPR:
11214 : 2529 : {
11215 : 2529 : tree _q20 = gimple_assign_rhs1 (_a1);
11216 : 2529 : _q20 = do_valueize (valueize, _q20);
11217 : 2529 : if (gimple_truth_valued_p (_q20, valueize))
11218 : : {
11219 : 1812 : if (gimple_truth_valued_p (_p1, valueize))
11220 : : {
11221 : 1745 : {
11222 : 1745 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
11223 : 1745 : if (gimple_simplify_225 (res_op, seq, valueize, type, captures))
11224 : 1745 : return true;
11225 : : }
11226 : : }
11227 : : }
11228 : : break;
11229 : : }
11230 : 94232 : case MULT_EXPR:
11231 : 94232 : {
11232 : 94232 : tree _q20 = gimple_assign_rhs1 (_a1);
11233 : 94232 : _q20 = do_valueize (valueize, _q20);
11234 : 94232 : tree _q21 = gimple_assign_rhs2 (_a1);
11235 : 94232 : _q21 = do_valueize (valueize, _q21);
11236 : 94232 : if (tree_swap_operands_p (_q20, _q21))
11237 : 533 : std::swap (_q20, _q21);
11238 : 94232 : switch (TREE_CODE (_p1))
11239 : : {
11240 : 53494 : case SSA_NAME:
11241 : 53494 : if (gimple *_d2 = get_def (valueize, _p1))
11242 : : {
11243 : 52234 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11244 : 49970 : switch (gimple_assign_rhs_code (_a2))
11245 : : {
11246 : 645 : case MULT_EXPR:
11247 : 645 : {
11248 : 645 : tree _q50 = gimple_assign_rhs1 (_a2);
11249 : 645 : _q50 = do_valueize (valueize, _q50);
11250 : 645 : tree _q51 = gimple_assign_rhs2 (_a2);
11251 : 645 : _q51 = do_valueize (valueize, _q51);
11252 : 645 : if (tree_swap_operands_p (_q50, _q51))
11253 : 11 : std::swap (_q50, _q51);
11254 : 645 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11255 : : {
11256 : 471 : {
11257 : 471 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
11258 : 471 : if (gimple_simplify_226 (res_op, seq, valueize, type, captures, EQ_EXPR))
11259 : 34 : return true;
11260 : : }
11261 : : }
11262 : 611 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11263 : : {
11264 : 0 : {
11265 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
11266 : 0 : if (gimple_simplify_226 (res_op, seq, valueize, type, captures, EQ_EXPR))
11267 : 0 : return true;
11268 : : }
11269 : : }
11270 : 611 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11271 : : {
11272 : 0 : {
11273 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
11274 : 0 : if (gimple_simplify_226 (res_op, seq, valueize, type, captures, EQ_EXPR))
11275 : 0 : return true;
11276 : : }
11277 : : }
11278 : 611 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11279 : : {
11280 : 88 : {
11281 : 88 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
11282 : 88 : if (gimple_simplify_226 (res_op, seq, valueize, type, captures, EQ_EXPR))
11283 : 4 : return true;
11284 : : }
11285 : : }
11286 : 94194 : break;
11287 : : }
11288 : : default:;
11289 : : }
11290 : : }
11291 : : break;
11292 : 94194 : default:;
11293 : : }
11294 : 94194 : switch (TREE_CODE (_q21))
11295 : : {
11296 : 77293 : case INTEGER_CST:
11297 : 77293 : {
11298 : 77293 : switch (TREE_CODE (_p1))
11299 : : {
11300 : 50489 : case SSA_NAME:
11301 : 50489 : if (gimple *_d2 = get_def (valueize, _p1))
11302 : : {
11303 : 49332 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11304 : 48478 : switch (gimple_assign_rhs_code (_a2))
11305 : : {
11306 : 482 : case MULT_EXPR:
11307 : 482 : {
11308 : 482 : tree _q50 = gimple_assign_rhs1 (_a2);
11309 : 482 : _q50 = do_valueize (valueize, _q50);
11310 : 482 : tree _q51 = gimple_assign_rhs2 (_a2);
11311 : 482 : _q51 = do_valueize (valueize, _q51);
11312 : 482 : if (tree_swap_operands_p (_q50, _q51))
11313 : 0 : std::swap (_q50, _q51);
11314 : 482 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11315 : : {
11316 : 330 : {
11317 : 330 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
11318 : 330 : if (gimple_simplify_227 (res_op, seq, valueize, type, captures, EQ_EXPR))
11319 : 14 : return true;
11320 : : }
11321 : : }
11322 : 77370081 : break;
11323 : : }
11324 : : default:;
11325 : : }
11326 : : }
11327 : : break;
11328 : : default:;
11329 : : }
11330 : : break;
11331 : : }
11332 : : default:;
11333 : : }
11334 : 77370081 : break;
11335 : : }
11336 : 754323 : CASE_CONVERT:
11337 : 754323 : {
11338 : 754323 : tree _q20 = gimple_assign_rhs1 (_a1);
11339 : 754323 : _q20 = do_valueize (valueize, _q20);
11340 : 754323 : switch (TREE_CODE (_q20))
11341 : : {
11342 : 741111 : case SSA_NAME:
11343 : 741111 : if (gimple *_d2 = get_def (valueize, _q20))
11344 : : {
11345 : 729752 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11346 : 869121 : switch (gimple_assign_rhs_code (_a2))
11347 : : {
11348 : 88697 : case EXACT_DIV_EXPR:
11349 : 88697 : {
11350 : 88697 : tree _q30 = gimple_assign_rhs1 (_a2);
11351 : 88697 : _q30 = do_valueize (valueize, _q30);
11352 : 88697 : tree _q31 = gimple_assign_rhs2 (_a2);
11353 : 88697 : _q31 = do_valueize (valueize, _q31);
11354 : 88697 : switch (TREE_CODE (_q31))
11355 : : {
11356 : 88697 : case INTEGER_CST:
11357 : 88697 : {
11358 : 88697 : switch (TREE_CODE (_p1))
11359 : : {
11360 : 1083 : case SSA_NAME:
11361 : 1083 : if (gimple *_d3 = get_def (valueize, _p1))
11362 : : {
11363 : 976 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11364 : 880 : switch (gimple_assign_rhs_code (_a3))
11365 : : {
11366 : 159 : CASE_CONVERT:
11367 : 159 : {
11368 : 159 : tree _q60 = gimple_assign_rhs1 (_a3);
11369 : 159 : _q60 = do_valueize (valueize, _q60);
11370 : 159 : switch (TREE_CODE (_q60))
11371 : : {
11372 : 159 : case SSA_NAME:
11373 : 159 : if (gimple *_d4 = get_def (valueize, _q60))
11374 : : {
11375 : 159 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11376 : 159 : switch (gimple_assign_rhs_code (_a4))
11377 : : {
11378 : 159 : case EXACT_DIV_EXPR:
11379 : 159 : {
11380 : 159 : tree _q70 = gimple_assign_rhs1 (_a4);
11381 : 159 : _q70 = do_valueize (valueize, _q70);
11382 : 159 : tree _q71 = gimple_assign_rhs2 (_a4);
11383 : 159 : _q71 = do_valueize (valueize, _q71);
11384 : 159 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
11385 : : {
11386 : 159 : {
11387 : 159 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q70 };
11388 : 159 : if (gimple_simplify_228 (res_op, seq, valueize, type, captures, EQ_EXPR))
11389 : 159 : return true;
11390 : : }
11391 : : }
11392 : : break;
11393 : : }
11394 : : default:;
11395 : : }
11396 : : }
11397 : : break;
11398 : : default:;
11399 : : }
11400 : : break;
11401 : : }
11402 : : default:;
11403 : : }
11404 : : }
11405 : : break;
11406 : : default:;
11407 : : }
11408 : : break;
11409 : : }
11410 : : default:;
11411 : : }
11412 : : break;
11413 : : }
11414 : : default:;
11415 : : }
11416 : : }
11417 : : break;
11418 : 754164 : default:;
11419 : : }
11420 : 754164 : switch (TREE_CODE (_p1))
11421 : : {
11422 : 177255 : case SSA_NAME:
11423 : 177255 : if (gimple *_d2 = get_def (valueize, _p1))
11424 : : {
11425 : 167540 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11426 : 180028 : switch (gimple_assign_rhs_code (_a2))
11427 : : {
11428 : 29789 : case PLUS_EXPR:
11429 : 29789 : {
11430 : 29789 : tree _q40 = gimple_assign_rhs1 (_a2);
11431 : 29789 : _q40 = do_valueize (valueize, _q40);
11432 : 29789 : tree _q41 = gimple_assign_rhs2 (_a2);
11433 : 29789 : _q41 = do_valueize (valueize, _q41);
11434 : 29789 : if (tree_swap_operands_p (_q40, _q41))
11435 : 33 : std::swap (_q40, _q41);
11436 : 29789 : switch (TREE_CODE (_q41))
11437 : : {
11438 : 550 : case SSA_NAME:
11439 : 550 : if (gimple *_d3 = get_def (valueize, _q41))
11440 : : {
11441 : 530 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11442 : 447 : switch (gimple_assign_rhs_code (_a3))
11443 : : {
11444 : 198 : CASE_CONVERT:
11445 : 198 : {
11446 : 198 : tree _q60 = gimple_assign_rhs1 (_a3);
11447 : 198 : _q60 = do_valueize (valueize, _q60);
11448 : 198 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11449 : : {
11450 : 3 : {
11451 : 3 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q40, _q20 };
11452 : 3 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11453 : 0 : return true;
11454 : : }
11455 : : }
11456 : : break;
11457 : : }
11458 : : default:;
11459 : : }
11460 : : }
11461 : : break;
11462 : 29789 : default:;
11463 : : }
11464 : 29789 : switch (TREE_CODE (_q40))
11465 : : {
11466 : 29789 : case SSA_NAME:
11467 : 29789 : if (gimple *_d3 = get_def (valueize, _q40))
11468 : : {
11469 : 27189 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11470 : 32704 : switch (gimple_assign_rhs_code (_a3))
11471 : : {
11472 : 1299 : CASE_CONVERT:
11473 : 1299 : {
11474 : 1299 : tree _q50 = gimple_assign_rhs1 (_a3);
11475 : 1299 : _q50 = do_valueize (valueize, _q50);
11476 : 1299 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11477 : : {
11478 : 9 : {
11479 : 9 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q41, _q20 };
11480 : 9 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11481 : 8 : return true;
11482 : : }
11483 : : }
11484 : : break;
11485 : : }
11486 : : default:;
11487 : : }
11488 : : }
11489 : : break;
11490 : 29781 : default:;
11491 : : }
11492 : 29781 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
11493 : : {
11494 : 0 : {
11495 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q40, _q20 };
11496 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11497 : 0 : return true;
11498 : : }
11499 : : }
11500 : 29781 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
11501 : : {
11502 : 0 : {
11503 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q41, _q20 };
11504 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11505 : 0 : return true;
11506 : : }
11507 : : }
11508 : 754156 : break;
11509 : : }
11510 : : default:;
11511 : : }
11512 : : }
11513 : : break;
11514 : 754156 : default:;
11515 : : }
11516 : 754156 : {
11517 : 754156 : tree _p1_pops[1];
11518 : 754156 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11519 : : {
11520 : 30823 : tree _q40 = _p1_pops[0];
11521 : 30823 : switch (TREE_CODE (_q40))
11522 : : {
11523 : 13433 : case SSA_NAME:
11524 : 13433 : if (gimple *_d2 = get_def (valueize, _q40))
11525 : : {
11526 : 13318 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11527 : 19522 : switch (gimple_assign_rhs_code (_a2))
11528 : : {
11529 : 818 : case PLUS_EXPR:
11530 : 818 : {
11531 : 818 : tree _q50 = gimple_assign_rhs1 (_a2);
11532 : 818 : _q50 = do_valueize (valueize, _q50);
11533 : 818 : tree _q51 = gimple_assign_rhs2 (_a2);
11534 : 818 : _q51 = do_valueize (valueize, _q51);
11535 : 818 : if (tree_swap_operands_p (_q50, _q51))
11536 : 20 : std::swap (_q50, _q51);
11537 : 818 : switch (TREE_CODE (_q51))
11538 : : {
11539 : 649 : case SSA_NAME:
11540 : 649 : if (gimple *_d3 = get_def (valueize, _q51))
11541 : : {
11542 : 633 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11543 : 631 : switch (gimple_assign_rhs_code (_a3))
11544 : : {
11545 : 309 : CASE_CONVERT:
11546 : 309 : {
11547 : 309 : tree _q70 = gimple_assign_rhs1 (_a3);
11548 : 309 : _q70 = do_valueize (valueize, _q70);
11549 : 309 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
11550 : : {
11551 : 0 : {
11552 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q50, _q20 };
11553 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
11554 : 0 : return true;
11555 : : }
11556 : : }
11557 : : break;
11558 : : }
11559 : : default:;
11560 : : }
11561 : : }
11562 : : break;
11563 : 818 : default:;
11564 : : }
11565 : 818 : switch (TREE_CODE (_q50))
11566 : : {
11567 : 818 : case SSA_NAME:
11568 : 818 : if (gimple *_d3 = get_def (valueize, _q50))
11569 : : {
11570 : 769 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11571 : 763 : switch (gimple_assign_rhs_code (_a3))
11572 : : {
11573 : 58 : CASE_CONVERT:
11574 : 58 : {
11575 : 58 : tree _q60 = gimple_assign_rhs1 (_a3);
11576 : 58 : _q60 = do_valueize (valueize, _q60);
11577 : 58 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11578 : : {
11579 : 0 : {
11580 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q51, _q20 };
11581 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
11582 : 0 : return true;
11583 : : }
11584 : : }
11585 : : break;
11586 : : }
11587 : : default:;
11588 : : }
11589 : : }
11590 : : break;
11591 : 818 : default:;
11592 : : }
11593 : 818 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11594 : : {
11595 : 0 : {
11596 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q50, _q20 };
11597 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
11598 : 0 : return true;
11599 : : }
11600 : : }
11601 : 818 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11602 : : {
11603 : 0 : {
11604 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q51, _q20 };
11605 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
11606 : 0 : return true;
11607 : : }
11608 : : }
11609 : 754156 : break;
11610 : : }
11611 : : default:;
11612 : : }
11613 : : }
11614 : : break;
11615 : : default:;
11616 : : }
11617 : : }
11618 : : }
11619 : 754156 : break;
11620 : : }
11621 : 38616 : case EXACT_DIV_EXPR:
11622 : 38616 : {
11623 : 38616 : tree _q20 = gimple_assign_rhs1 (_a1);
11624 : 38616 : _q20 = do_valueize (valueize, _q20);
11625 : 38616 : tree _q21 = gimple_assign_rhs2 (_a1);
11626 : 38616 : _q21 = do_valueize (valueize, _q21);
11627 : 38616 : switch (TREE_CODE (_q21))
11628 : : {
11629 : 38616 : case INTEGER_CST:
11630 : 38616 : {
11631 : 38616 : switch (TREE_CODE (_p1))
11632 : : {
11633 : 18482 : case SSA_NAME:
11634 : 18482 : if (gimple *_d2 = get_def (valueize, _p1))
11635 : : {
11636 : 16565 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11637 : 11324 : switch (gimple_assign_rhs_code (_a2))
11638 : : {
11639 : 16 : case EXACT_DIV_EXPR:
11640 : 16 : {
11641 : 16 : tree _q50 = gimple_assign_rhs1 (_a2);
11642 : 16 : _q50 = do_valueize (valueize, _q50);
11643 : 16 : tree _q51 = gimple_assign_rhs2 (_a2);
11644 : 16 : _q51 = do_valueize (valueize, _q51);
11645 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11646 : : {
11647 : 16 : {
11648 : 16 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
11649 : 16 : if (gimple_simplify_228 (res_op, seq, valueize, type, captures, EQ_EXPR))
11650 : 16 : return true;
11651 : : }
11652 : : }
11653 : : break;
11654 : : }
11655 : : default:;
11656 : : }
11657 : : }
11658 : : break;
11659 : : default:;
11660 : : }
11661 : : break;
11662 : : }
11663 : : default:;
11664 : : }
11665 : : break;
11666 : : }
11667 : 12937 : case TRUNC_DIV_EXPR:
11668 : 12937 : {
11669 : 12937 : tree _q20 = gimple_assign_rhs1 (_a1);
11670 : 12937 : _q20 = do_valueize (valueize, _q20);
11671 : 12937 : tree _q21 = gimple_assign_rhs2 (_a1);
11672 : 12937 : _q21 = do_valueize (valueize, _q21);
11673 : 12937 : switch (TREE_CODE (_q21))
11674 : : {
11675 : 9655 : case INTEGER_CST:
11676 : 9655 : {
11677 : 9655 : switch (TREE_CODE (_p1))
11678 : : {
11679 : 4857 : case INTEGER_CST:
11680 : 4857 : {
11681 : 4857 : {
11682 : 4857 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
11683 : 4857 : if (gimple_simplify_231 (res_op, seq, valueize, type, captures, EQ_EXPR))
11684 : 248 : return true;
11685 : : }
11686 : 4609 : break;
11687 : : }
11688 : : default:;
11689 : : }
11690 : : break;
11691 : : }
11692 : : default:;
11693 : : }
11694 : : break;
11695 : : }
11696 : 884590 : case PLUS_EXPR:
11697 : 884590 : {
11698 : 884590 : tree _q20 = gimple_assign_rhs1 (_a1);
11699 : 884590 : _q20 = do_valueize (valueize, _q20);
11700 : 884590 : tree _q21 = gimple_assign_rhs2 (_a1);
11701 : 884590 : _q21 = do_valueize (valueize, _q21);
11702 : 884590 : if (tree_swap_operands_p (_q20, _q21))
11703 : 6886 : std::swap (_q20, _q21);
11704 : 884590 : switch (TREE_CODE (_p1))
11705 : : {
11706 : 290159 : case SSA_NAME:
11707 : 290159 : if (gimple *_d2 = get_def (valueize, _p1))
11708 : : {
11709 : 267526 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11710 : 348002 : switch (gimple_assign_rhs_code (_a2))
11711 : : {
11712 : 68044 : case PLUS_EXPR:
11713 : 68044 : {
11714 : 68044 : tree _q50 = gimple_assign_rhs1 (_a2);
11715 : 68044 : _q50 = do_valueize (valueize, _q50);
11716 : 68044 : tree _q51 = gimple_assign_rhs2 (_a2);
11717 : 68044 : _q51 = do_valueize (valueize, _q51);
11718 : 68044 : if (tree_swap_operands_p (_q50, _q51))
11719 : 186 : std::swap (_q50, _q51);
11720 : 68044 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11721 : : {
11722 : 9202 : {
11723 : 9202 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
11724 : 18404 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
11725 : 18175 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
11726 : 7688 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
11727 : : )
11728 : : {
11729 : 8973 : gimple_seq *lseq = seq;
11730 : 8973 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2334;
11731 : 8973 : {
11732 : 8973 : res_op->set_op (EQ_EXPR, type, 2);
11733 : 8973 : res_op->ops[0] = captures[0];
11734 : 8973 : res_op->ops[1] = captures[2];
11735 : 8973 : res_op->resimplify (lseq, valueize);
11736 : 8973 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1068, __FILE__, __LINE__, true);
11737 : 8973 : return true;
11738 : : }
11739 : 0 : next_after_fail2334:;
11740 : : }
11741 : : }
11742 : : }
11743 : 59071 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11744 : : {
11745 : 23 : {
11746 : 23 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
11747 : 46 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
11748 : 46 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
11749 : 17 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
11750 : : )
11751 : : {
11752 : 23 : gimple_seq *lseq = seq;
11753 : 23 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2335;
11754 : 23 : {
11755 : 23 : res_op->set_op (EQ_EXPR, type, 2);
11756 : 23 : res_op->ops[0] = captures[0];
11757 : 23 : res_op->ops[1] = captures[2];
11758 : 23 : res_op->resimplify (lseq, valueize);
11759 : 23 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1068, __FILE__, __LINE__, true);
11760 : 23 : return true;
11761 : : }
11762 : 0 : next_after_fail2335:;
11763 : : }
11764 : : }
11765 : : }
11766 : 59048 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11767 : : {
11768 : 3 : {
11769 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
11770 : 6 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
11771 : 6 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
11772 : 2 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
11773 : : )
11774 : : {
11775 : 3 : gimple_seq *lseq = seq;
11776 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2336;
11777 : 3 : {
11778 : 3 : res_op->set_op (EQ_EXPR, type, 2);
11779 : 3 : res_op->ops[0] = captures[0];
11780 : 3 : res_op->ops[1] = captures[2];
11781 : 3 : res_op->resimplify (lseq, valueize);
11782 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1068, __FILE__, __LINE__, true);
11783 : 3 : return true;
11784 : : }
11785 : 0 : next_after_fail2336:;
11786 : : }
11787 : : }
11788 : : }
11789 : 59045 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11790 : : {
11791 : 157 : {
11792 : 157 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
11793 : 314 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
11794 : 182 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
11795 : 21 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
11796 : : )
11797 : : {
11798 : 25 : gimple_seq *lseq = seq;
11799 : 25 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2337;
11800 : 25 : {
11801 : 25 : res_op->set_op (EQ_EXPR, type, 2);
11802 : 25 : res_op->ops[0] = captures[0];
11803 : 25 : res_op->ops[1] = captures[2];
11804 : 25 : res_op->resimplify (lseq, valueize);
11805 : 25 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1068, __FILE__, __LINE__, true);
11806 : 25 : return true;
11807 : : }
11808 : 0 : next_after_fail2337:;
11809 : : }
11810 : : }
11811 : : }
11812 : 875566 : break;
11813 : : }
11814 : : default:;
11815 : : }
11816 : : }
11817 : : break;
11818 : 875566 : default:;
11819 : : }
11820 : 875566 : switch (TREE_CODE (_q21))
11821 : : {
11822 : 120670 : case SSA_NAME:
11823 : 120670 : if (gimple *_d2 = get_def (valueize, _q21))
11824 : : {
11825 : 118242 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11826 : 105892 : switch (gimple_assign_rhs_code (_a2))
11827 : : {
11828 : 43967 : CASE_CONVERT:
11829 : 43967 : {
11830 : 43967 : tree _q40 = gimple_assign_rhs1 (_a2);
11831 : 43967 : _q40 = do_valueize (valueize, _q40);
11832 : 43967 : switch (TREE_CODE (_p1))
11833 : : {
11834 : 3716 : case SSA_NAME:
11835 : 3716 : if (gimple *_d3 = get_def (valueize, _p1))
11836 : : {
11837 : 3228 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11838 : 2852 : switch (gimple_assign_rhs_code (_a3))
11839 : : {
11840 : 379 : CASE_CONVERT:
11841 : 379 : {
11842 : 379 : tree _q60 = gimple_assign_rhs1 (_a3);
11843 : 379 : _q60 = do_valueize (valueize, _q60);
11844 : 379 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
11845 : : {
11846 : 12 : {
11847 : 12 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40 };
11848 : 12 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11849 : 8 : return true;
11850 : : }
11851 : : }
11852 : : break;
11853 : : }
11854 : : default:;
11855 : : }
11856 : : }
11857 : : break;
11858 : : default:;
11859 : : }
11860 : : break;
11861 : : }
11862 : : default:;
11863 : : }
11864 : : }
11865 : : break;
11866 : 875558 : default:;
11867 : : }
11868 : 875558 : switch (TREE_CODE (_q20))
11869 : : {
11870 : 875558 : case SSA_NAME:
11871 : 875558 : if (gimple *_d2 = get_def (valueize, _q20))
11872 : : {
11873 : 854478 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11874 : 720227 : switch (gimple_assign_rhs_code (_a2))
11875 : : {
11876 : 100236 : CASE_CONVERT:
11877 : 100236 : {
11878 : 100236 : tree _q30 = gimple_assign_rhs1 (_a2);
11879 : 100236 : _q30 = do_valueize (valueize, _q30);
11880 : 100236 : switch (TREE_CODE (_p1))
11881 : : {
11882 : 60931 : case SSA_NAME:
11883 : 60931 : if (gimple *_d3 = get_def (valueize, _p1))
11884 : : {
11885 : 48974 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11886 : 48057 : switch (gimple_assign_rhs_code (_a3))
11887 : : {
11888 : 24466 : CASE_CONVERT:
11889 : 24466 : {
11890 : 24466 : tree _q60 = gimple_assign_rhs1 (_a3);
11891 : 24466 : _q60 = do_valueize (valueize, _q60);
11892 : 24466 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
11893 : : {
11894 : 26 : {
11895 : 26 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q30 };
11896 : 26 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11897 : 13 : return true;
11898 : : }
11899 : : }
11900 : : break;
11901 : : }
11902 : : default:;
11903 : : }
11904 : : }
11905 : : break;
11906 : 100223 : default:;
11907 : : }
11908 : 100223 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
11909 : : {
11910 : 0 : {
11911 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q30 };
11912 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11913 : 0 : return true;
11914 : : }
11915 : : }
11916 : : break;
11917 : : }
11918 : : default:;
11919 : : }
11920 : : }
11921 : : break;
11922 : 875545 : default:;
11923 : : }
11924 : 875545 : switch (TREE_CODE (_q21))
11925 : : {
11926 : 120661 : case SSA_NAME:
11927 : 120661 : if (gimple *_d2 = get_def (valueize, _q21))
11928 : : {
11929 : 118233 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11930 : 105883 : switch (gimple_assign_rhs_code (_a2))
11931 : : {
11932 : 43959 : CASE_CONVERT:
11933 : 43959 : {
11934 : 43959 : tree _q40 = gimple_assign_rhs1 (_a2);
11935 : 43959 : _q40 = do_valueize (valueize, _q40);
11936 : 43959 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
11937 : : {
11938 : 0 : {
11939 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40 };
11940 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11941 : 0 : return true;
11942 : : }
11943 : : }
11944 : : break;
11945 : : }
11946 : : default:;
11947 : : }
11948 : : }
11949 : : break;
11950 : 875545 : default:;
11951 : : }
11952 : 875545 : switch (TREE_CODE (_p1))
11953 : : {
11954 : 281114 : case SSA_NAME:
11955 : 281114 : if (gimple *_d2 = get_def (valueize, _p1))
11956 : : {
11957 : 258481 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11958 : 338957 : switch (gimple_assign_rhs_code (_a2))
11959 : : {
11960 : 40783 : CASE_CONVERT:
11961 : 40783 : {
11962 : 40783 : tree _q50 = gimple_assign_rhs1 (_a2);
11963 : 40783 : _q50 = do_valueize (valueize, _q50);
11964 : 40783 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11965 : : {
11966 : 0 : {
11967 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
11968 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11969 : 0 : return true;
11970 : : }
11971 : : }
11972 : 40783 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11973 : : {
11974 : 0 : {
11975 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q20 };
11976 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11977 : 0 : return true;
11978 : : }
11979 : : }
11980 : : break;
11981 : : }
11982 : : default:;
11983 : : }
11984 : : }
11985 : : break;
11986 : 875545 : default:;
11987 : : }
11988 : 875545 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
11989 : : {
11990 : 58224 : {
11991 : 58224 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
11992 : 58224 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
11993 : 4301 : return true;
11994 : : }
11995 : : }
11996 : 871244 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
11997 : : {
11998 : 227 : {
11999 : 227 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q21, _q20 };
12000 : 227 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
12001 : 178 : return true;
12002 : : }
12003 : : }
12004 : 77370081 : break;
12005 : : }
12006 : 143294 : case POINTER_PLUS_EXPR:
12007 : 143294 : {
12008 : 143294 : tree _q20 = gimple_assign_rhs1 (_a1);
12009 : 143294 : _q20 = do_valueize (valueize, _q20);
12010 : 143294 : tree _q21 = gimple_assign_rhs2 (_a1);
12011 : 143294 : _q21 = do_valueize (valueize, _q21);
12012 : 143294 : switch (TREE_CODE (_p1))
12013 : : {
12014 : 105923 : case SSA_NAME:
12015 : 105923 : if (gimple *_d2 = get_def (valueize, _p1))
12016 : : {
12017 : 104433 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12018 : 133279 : switch (gimple_assign_rhs_code (_a2))
12019 : : {
12020 : 9802 : case POINTER_PLUS_EXPR:
12021 : 9802 : {
12022 : 9802 : tree _q50 = gimple_assign_rhs1 (_a2);
12023 : 9802 : _q50 = do_valueize (valueize, _q50);
12024 : 9802 : tree _q51 = gimple_assign_rhs2 (_a2);
12025 : 9802 : _q51 = do_valueize (valueize, _q51);
12026 : 9802 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12027 : : {
12028 : 1450 : {
12029 : 1450 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
12030 : 1450 : if (gimple_simplify_232 (res_op, seq, valueize, type, captures, EQ_EXPR))
12031 : 1450 : return true;
12032 : : }
12033 : : }
12034 : : break;
12035 : : }
12036 : : default:;
12037 : : }
12038 : : }
12039 : : break;
12040 : 141844 : default:;
12041 : : }
12042 : 141844 : switch (TREE_CODE (_q20))
12043 : : {
12044 : 136735 : case SSA_NAME:
12045 : 136735 : if (gimple *_d2 = get_def (valueize, _q20))
12046 : : {
12047 : 131928 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12048 : 161081 : switch (gimple_assign_rhs_code (_a2))
12049 : : {
12050 : 4052 : CASE_CONVERT:
12051 : 4052 : {
12052 : 4052 : tree _q30 = gimple_assign_rhs1 (_a2);
12053 : 4052 : _q30 = do_valueize (valueize, _q30);
12054 : 4052 : switch (TREE_CODE (_p1))
12055 : : {
12056 : 561 : case SSA_NAME:
12057 : 561 : if (gimple *_d3 = get_def (valueize, _p1))
12058 : : {
12059 : 561 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12060 : 375 : switch (gimple_assign_rhs_code (_a3))
12061 : : {
12062 : 53 : CASE_CONVERT:
12063 : 53 : {
12064 : 53 : tree _q60 = gimple_assign_rhs1 (_a3);
12065 : 53 : _q60 = do_valueize (valueize, _q60);
12066 : 53 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
12067 : : {
12068 : 0 : {
12069 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q21 };
12070 : 0 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
12071 : 0 : return true;
12072 : : }
12073 : : }
12074 : : break;
12075 : : }
12076 : : default:;
12077 : : }
12078 : : }
12079 : : break;
12080 : 4052 : default:;
12081 : : }
12082 : 4052 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
12083 : : {
12084 : 0 : {
12085 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q30, _q21 };
12086 : 0 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
12087 : 0 : return true;
12088 : : }
12089 : : }
12090 : : break;
12091 : : }
12092 : : default:;
12093 : : }
12094 : : }
12095 : : break;
12096 : 141844 : default:;
12097 : : }
12098 : 141844 : switch (TREE_CODE (_p1))
12099 : : {
12100 : 104473 : case SSA_NAME:
12101 : 104473 : if (gimple *_d2 = get_def (valueize, _p1))
12102 : : {
12103 : 102983 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12104 : 131829 : switch (gimple_assign_rhs_code (_a2))
12105 : : {
12106 : 591 : CASE_CONVERT:
12107 : 591 : {
12108 : 591 : tree _q50 = gimple_assign_rhs1 (_a2);
12109 : 591 : _q50 = do_valueize (valueize, _q50);
12110 : 591 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12111 : : {
12112 : 0 : {
12113 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
12114 : 0 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
12115 : 0 : return true;
12116 : : }
12117 : : }
12118 : : break;
12119 : : }
12120 : : default:;
12121 : : }
12122 : : }
12123 : : break;
12124 : 141844 : default:;
12125 : : }
12126 : 141844 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
12127 : : {
12128 : 2813 : {
12129 : 2813 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
12130 : 2813 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
12131 : 907 : return true;
12132 : : }
12133 : : }
12134 : : break;
12135 : : }
12136 : 236685 : case MINUS_EXPR:
12137 : 236685 : {
12138 : 236685 : tree _q20 = gimple_assign_rhs1 (_a1);
12139 : 236685 : _q20 = do_valueize (valueize, _q20);
12140 : 236685 : tree _q21 = gimple_assign_rhs2 (_a1);
12141 : 236685 : _q21 = do_valueize (valueize, _q21);
12142 : 236685 : switch (TREE_CODE (_p1))
12143 : : {
12144 : 44219 : case SSA_NAME:
12145 : 44219 : if (gimple *_d2 = get_def (valueize, _p1))
12146 : : {
12147 : 43016 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12148 : 46547 : switch (gimple_assign_rhs_code (_a2))
12149 : : {
12150 : 1132 : case MINUS_EXPR:
12151 : 1132 : {
12152 : 1132 : tree _q50 = gimple_assign_rhs1 (_a2);
12153 : 1132 : _q50 = do_valueize (valueize, _q50);
12154 : 1132 : tree _q51 = gimple_assign_rhs2 (_a2);
12155 : 1132 : _q51 = do_valueize (valueize, _q51);
12156 : 1132 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12157 : : {
12158 : 264 : {
12159 : 264 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
12160 : 528 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
12161 : 483 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
12162 : 196 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
12163 : : )
12164 : : {
12165 : 219 : gimple_seq *lseq = seq;
12166 : 219 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2338;
12167 : 219 : {
12168 : 219 : res_op->set_op (EQ_EXPR, type, 2);
12169 : 219 : res_op->ops[0] = captures[0];
12170 : 219 : res_op->ops[1] = captures[2];
12171 : 219 : res_op->resimplify (lseq, valueize);
12172 : 219 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1069, __FILE__, __LINE__, true);
12173 : 219 : return true;
12174 : : }
12175 : 0 : next_after_fail2338:;
12176 : : }
12177 : : }
12178 : : }
12179 : 913 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12180 : : {
12181 : 45 : {
12182 : 45 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
12183 : 90 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
12184 : 45 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
12185 : 0 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
12186 : : )
12187 : : {
12188 : 0 : gimple_seq *lseq = seq;
12189 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2339;
12190 : 0 : {
12191 : 0 : res_op->set_op (EQ_EXPR, type, 2);
12192 : 0 : res_op->ops[0] = captures[2];
12193 : 0 : res_op->ops[1] = captures[1];
12194 : 0 : res_op->resimplify (lseq, valueize);
12195 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1070, __FILE__, __LINE__, true);
12196 : 0 : return true;
12197 : : }
12198 : 0 : next_after_fail2339:;
12199 : : }
12200 : : }
12201 : : }
12202 : : break;
12203 : : }
12204 : : default:;
12205 : : }
12206 : : }
12207 : : break;
12208 : 236466 : default:;
12209 : : }
12210 : 236466 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
12211 : : {
12212 : 147 : {
12213 : 147 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
12214 : 147 : if (gimple_simplify_234 (res_op, seq, valueize, type, captures, EQ_EXPR))
12215 : 51 : return true;
12216 : : }
12217 : : }
12218 : : break;
12219 : : }
12220 : 108326 : case POINTER_DIFF_EXPR:
12221 : 108326 : {
12222 : 108326 : tree _q20 = gimple_assign_rhs1 (_a1);
12223 : 108326 : _q20 = do_valueize (valueize, _q20);
12224 : 108326 : tree _q21 = gimple_assign_rhs2 (_a1);
12225 : 108326 : _q21 = do_valueize (valueize, _q21);
12226 : 108326 : switch (TREE_CODE (_p1))
12227 : : {
12228 : 30620 : case SSA_NAME:
12229 : 30620 : if (gimple *_d2 = get_def (valueize, _p1))
12230 : : {
12231 : 30588 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12232 : 30206 : switch (gimple_assign_rhs_code (_a2))
12233 : : {
12234 : 3315 : case POINTER_DIFF_EXPR:
12235 : 3315 : {
12236 : 3315 : tree _q50 = gimple_assign_rhs1 (_a2);
12237 : 3315 : _q50 = do_valueize (valueize, _q50);
12238 : 3315 : tree _q51 = gimple_assign_rhs2 (_a2);
12239 : 3315 : _q51 = do_valueize (valueize, _q51);
12240 : 3315 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12241 : : {
12242 : 314 : {
12243 : 314 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
12244 : 314 : if (gimple_simplify_235 (res_op, seq, valueize, type, captures, EQ_EXPR))
12245 : 314 : return true;
12246 : : }
12247 : : }
12248 : 3001 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12249 : : {
12250 : 0 : {
12251 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
12252 : 0 : if (gimple_simplify_236 (res_op, seq, valueize, type, captures, EQ_EXPR))
12253 : 0 : return true;
12254 : : }
12255 : : }
12256 : : break;
12257 : : }
12258 : : default:;
12259 : : }
12260 : : }
12261 : : break;
12262 : : default:;
12263 : : }
12264 : : break;
12265 : : }
12266 : : default:;
12267 : : }
12268 : : }
12269 : : break;
12270 : 77370081 : default:;
12271 : : }
12272 : 77370081 : {
12273 : 77370081 : tree _p0_pops[1];
12274 : 77370081 : if (gimple_logical_inverted_value (_p0, _p0_pops, valueize))
12275 : : {
12276 : 724 : tree _q20 = _p0_pops[0];
12277 : 724 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
12278 : : {
12279 : 0 : if (gimple_truth_valued_p (_p1, valueize))
12280 : : {
12281 : 0 : {
12282 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
12283 : 0 : if (gimple_simplify_224 (res_op, seq, valueize, type, captures, EQ_EXPR))
12284 : 0 : return true;
12285 : : }
12286 : : }
12287 : : }
12288 : : }
12289 : : }
12290 : 77370081 : {
12291 : 77370081 : tree _p0_pops[1];
12292 : 77370081 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
12293 : : {
12294 : 447383 : tree _q20 = _p0_pops[0];
12295 : 447383 : switch (TREE_CODE (_q20))
12296 : : {
12297 : 434172 : case SSA_NAME:
12298 : 434172 : if (gimple *_d1 = get_def (valueize, _q20))
12299 : : {
12300 : 429484 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12301 : 447639 : switch (gimple_assign_rhs_code (_a1))
12302 : : {
12303 : 37038 : case PLUS_EXPR:
12304 : 37038 : {
12305 : 37038 : tree _q30 = gimple_assign_rhs1 (_a1);
12306 : 37038 : _q30 = do_valueize (valueize, _q30);
12307 : 37038 : tree _q31 = gimple_assign_rhs2 (_a1);
12308 : 37038 : _q31 = do_valueize (valueize, _q31);
12309 : 37038 : if (tree_swap_operands_p (_q30, _q31))
12310 : 190 : std::swap (_q30, _q31);
12311 : 37038 : switch (TREE_CODE (_q31))
12312 : : {
12313 : 11339 : case SSA_NAME:
12314 : 11339 : if (gimple *_d2 = get_def (valueize, _q31))
12315 : : {
12316 : 11264 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12317 : 11228 : switch (gimple_assign_rhs_code (_a2))
12318 : : {
12319 : 1980 : CASE_CONVERT:
12320 : 1980 : {
12321 : 1980 : tree _q50 = gimple_assign_rhs1 (_a2);
12322 : 1980 : _q50 = do_valueize (valueize, _q50);
12323 : 1980 : switch (TREE_CODE (_p1))
12324 : : {
12325 : 682 : case SSA_NAME:
12326 : 682 : if (gimple *_d3 = get_def (valueize, _p1))
12327 : : {
12328 : 647 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12329 : 609 : switch (gimple_assign_rhs_code (_a3))
12330 : : {
12331 : 282 : CASE_CONVERT:
12332 : 282 : {
12333 : 282 : tree _q70 = gimple_assign_rhs1 (_a3);
12334 : 282 : _q70 = do_valueize (valueize, _q70);
12335 : 282 : if ((_q70 == _q50 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q50, 0) && types_match (_q70, _q50)))
12336 : : {
12337 : 0 : {
12338 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50 };
12339 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12340 : 0 : return true;
12341 : : }
12342 : : }
12343 : : break;
12344 : : }
12345 : : default:;
12346 : : }
12347 : : }
12348 : : break;
12349 : : default:;
12350 : : }
12351 : : break;
12352 : : }
12353 : : default:;
12354 : : }
12355 : : }
12356 : : break;
12357 : 37038 : default:;
12358 : : }
12359 : 37038 : switch (TREE_CODE (_q30))
12360 : : {
12361 : 37038 : case SSA_NAME:
12362 : 37038 : if (gimple *_d2 = get_def (valueize, _q30))
12363 : : {
12364 : 34283 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12365 : 32535 : switch (gimple_assign_rhs_code (_a2))
12366 : : {
12367 : 20426 : CASE_CONVERT:
12368 : 20426 : {
12369 : 20426 : tree _q40 = gimple_assign_rhs1 (_a2);
12370 : 20426 : _q40 = do_valueize (valueize, _q40);
12371 : 20426 : switch (TREE_CODE (_p1))
12372 : : {
12373 : 13046 : case SSA_NAME:
12374 : 13046 : if (gimple *_d3 = get_def (valueize, _p1))
12375 : : {
12376 : 12357 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12377 : 22039 : switch (gimple_assign_rhs_code (_a3))
12378 : : {
12379 : 132 : CASE_CONVERT:
12380 : 132 : {
12381 : 132 : tree _q70 = gimple_assign_rhs1 (_a3);
12382 : 132 : _q70 = do_valueize (valueize, _q70);
12383 : 132 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
12384 : : {
12385 : 0 : {
12386 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q40 };
12387 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12388 : 0 : return true;
12389 : : }
12390 : : }
12391 : : break;
12392 : : }
12393 : : default:;
12394 : : }
12395 : : }
12396 : : break;
12397 : 20426 : default:;
12398 : : }
12399 : 20426 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
12400 : : {
12401 : 69 : {
12402 : 69 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q40 };
12403 : 69 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12404 : 10 : return true;
12405 : : }
12406 : : }
12407 : : break;
12408 : : }
12409 : : default:;
12410 : : }
12411 : : }
12412 : : break;
12413 : 37028 : default:;
12414 : : }
12415 : 37028 : switch (TREE_CODE (_q31))
12416 : : {
12417 : 11339 : case SSA_NAME:
12418 : 11339 : if (gimple *_d2 = get_def (valueize, _q31))
12419 : : {
12420 : 11264 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12421 : 11228 : switch (gimple_assign_rhs_code (_a2))
12422 : : {
12423 : 1980 : CASE_CONVERT:
12424 : 1980 : {
12425 : 1980 : tree _q50 = gimple_assign_rhs1 (_a2);
12426 : 1980 : _q50 = do_valueize (valueize, _q50);
12427 : 1980 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
12428 : : {
12429 : 136 : {
12430 : 136 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50 };
12431 : 136 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12432 : 0 : return true;
12433 : : }
12434 : : }
12435 : : break;
12436 : : }
12437 : : default:;
12438 : : }
12439 : : }
12440 : : break;
12441 : 37028 : default:;
12442 : : }
12443 : 37028 : switch (TREE_CODE (_p1))
12444 : : {
12445 : 18372 : case SSA_NAME:
12446 : 18372 : if (gimple *_d2 = get_def (valueize, _p1))
12447 : : {
12448 : 15377 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12449 : 23560 : switch (gimple_assign_rhs_code (_a2))
12450 : : {
12451 : 706 : CASE_CONVERT:
12452 : 706 : {
12453 : 706 : tree _q60 = gimple_assign_rhs1 (_a2);
12454 : 706 : _q60 = do_valueize (valueize, _q60);
12455 : 706 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
12456 : : {
12457 : 0 : {
12458 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
12459 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12460 : 0 : return true;
12461 : : }
12462 : : }
12463 : 706 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
12464 : : {
12465 : 0 : {
12466 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30 };
12467 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12468 : 0 : return true;
12469 : : }
12470 : : }
12471 : : break;
12472 : : }
12473 : : default:;
12474 : : }
12475 : : }
12476 : : break;
12477 : 37028 : default:;
12478 : : }
12479 : 37028 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
12480 : : {
12481 : 0 : {
12482 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
12483 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12484 : 0 : return true;
12485 : : }
12486 : : }
12487 : 37028 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
12488 : : {
12489 : 0 : {
12490 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30 };
12491 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12492 : 0 : return true;
12493 : : }
12494 : : }
12495 : 77370070 : break;
12496 : : }
12497 : 30 : case POINTER_PLUS_EXPR:
12498 : 30 : {
12499 : 30 : tree _q30 = gimple_assign_rhs1 (_a1);
12500 : 30 : _q30 = do_valueize (valueize, _q30);
12501 : 30 : tree _q31 = gimple_assign_rhs2 (_a1);
12502 : 30 : _q31 = do_valueize (valueize, _q31);
12503 : 30 : switch (TREE_CODE (_q30))
12504 : : {
12505 : 30 : case SSA_NAME:
12506 : 30 : if (gimple *_d2 = get_def (valueize, _q30))
12507 : : {
12508 : 30 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12509 : 15 : switch (gimple_assign_rhs_code (_a2))
12510 : : {
12511 : 15 : CASE_CONVERT:
12512 : 15 : {
12513 : 15 : tree _q40 = gimple_assign_rhs1 (_a2);
12514 : 15 : _q40 = do_valueize (valueize, _q40);
12515 : 15 : switch (TREE_CODE (_p1))
12516 : : {
12517 : 0 : case SSA_NAME:
12518 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
12519 : : {
12520 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12521 : 0 : switch (gimple_assign_rhs_code (_a3))
12522 : : {
12523 : 0 : CASE_CONVERT:
12524 : 0 : {
12525 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
12526 : 0 : _q70 = do_valueize (valueize, _q70);
12527 : 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
12528 : : {
12529 : 0 : {
12530 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q31 };
12531 : 0 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
12532 : 0 : return true;
12533 : : }
12534 : : }
12535 : : break;
12536 : : }
12537 : : default:;
12538 : : }
12539 : : }
12540 : : break;
12541 : 15 : default:;
12542 : : }
12543 : 15 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
12544 : : {
12545 : 0 : {
12546 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _q31 };
12547 : 0 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
12548 : 0 : return true;
12549 : : }
12550 : : }
12551 : : break;
12552 : : }
12553 : : default:;
12554 : : }
12555 : : }
12556 : : break;
12557 : 30 : default:;
12558 : : }
12559 : 30 : switch (TREE_CODE (_p1))
12560 : : {
12561 : 6 : case SSA_NAME:
12562 : 6 : if (gimple *_d2 = get_def (valueize, _p1))
12563 : : {
12564 : 6 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12565 : 6 : switch (gimple_assign_rhs_code (_a2))
12566 : : {
12567 : 2 : CASE_CONVERT:
12568 : 2 : {
12569 : 2 : tree _q60 = gimple_assign_rhs1 (_a2);
12570 : 2 : _q60 = do_valueize (valueize, _q60);
12571 : 2 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
12572 : : {
12573 : 2 : {
12574 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
12575 : 2 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
12576 : 1 : return true;
12577 : : }
12578 : : }
12579 : : break;
12580 : : }
12581 : : default:;
12582 : : }
12583 : : }
12584 : : break;
12585 : 29 : default:;
12586 : : }
12587 : 29 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
12588 : : {
12589 : 0 : {
12590 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
12591 : 0 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
12592 : 0 : return true;
12593 : : }
12594 : : }
12595 : : break;
12596 : : }
12597 : : default:;
12598 : : }
12599 : : }
12600 : : break;
12601 : : default:;
12602 : : }
12603 : : }
12604 : : }
12605 : 77370070 : if (gimple_truth_valued_p (_p0, valueize))
12606 : : {
12607 : 254023 : switch (TREE_CODE (_p1))
12608 : : {
12609 : 155524 : case SSA_NAME:
12610 : 155524 : if (gimple *_d1 = get_def (valueize, _p1))
12611 : : {
12612 : 72010 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12613 : 96006 : switch (gimple_assign_rhs_code (_a1))
12614 : : {
12615 : 75 : case BIT_NOT_EXPR:
12616 : 75 : {
12617 : 75 : tree _q30 = gimple_assign_rhs1 (_a1);
12618 : 75 : _q30 = do_valueize (valueize, _q30);
12619 : 75 : if (gimple_truth_valued_p (_q30, valueize))
12620 : : {
12621 : 75 : {
12622 : 75 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
12623 : 75 : if (gimple_simplify_225 (res_op, seq, valueize, type, captures))
12624 : 75 : return true;
12625 : : }
12626 : : }
12627 : : break;
12628 : : }
12629 : : default:;
12630 : : }
12631 : : }
12632 : : break;
12633 : 253948 : default:;
12634 : : }
12635 : 253948 : {
12636 : 253948 : tree _p1_pops[1];
12637 : 253948 : if (gimple_logical_inverted_value (_p1, _p1_pops, valueize))
12638 : : {
12639 : 219 : tree _q30 = _p1_pops[0];
12640 : 219 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
12641 : : {
12642 : 0 : {
12643 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
12644 : 0 : if (gimple_simplify_224 (res_op, seq, valueize, type, captures, EQ_EXPR))
12645 : 0 : return true;
12646 : : }
12647 : : }
12648 : : }
12649 : : }
12650 : : }
12651 : 77369995 : switch (TREE_CODE (_p1))
12652 : : {
12653 : 12517390 : case SSA_NAME:
12654 : 12517390 : if (gimple *_d1 = get_def (valueize, _p1))
12655 : : {
12656 : 4182888 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12657 : 6117634 : switch (gimple_assign_rhs_code (_a1))
12658 : : {
12659 : 180223 : case PLUS_EXPR:
12660 : 180223 : {
12661 : 180223 : tree _q30 = gimple_assign_rhs1 (_a1);
12662 : 180223 : _q30 = do_valueize (valueize, _q30);
12663 : 180223 : tree _q31 = gimple_assign_rhs2 (_a1);
12664 : 180223 : _q31 = do_valueize (valueize, _q31);
12665 : 180223 : if (tree_swap_operands_p (_q30, _q31))
12666 : 2140 : std::swap (_q30, _q31);
12667 : 180223 : switch (TREE_CODE (_q31))
12668 : : {
12669 : 24908 : case SSA_NAME:
12670 : 24908 : if (gimple *_d2 = get_def (valueize, _q31))
12671 : : {
12672 : 23129 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12673 : 22008 : switch (gimple_assign_rhs_code (_a2))
12674 : : {
12675 : 3896 : CASE_CONVERT:
12676 : 3896 : {
12677 : 3896 : tree _q50 = gimple_assign_rhs1 (_a2);
12678 : 3896 : _q50 = do_valueize (valueize, _q50);
12679 : 3896 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
12680 : : {
12681 : 0 : {
12682 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0 };
12683 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
12684 : 0 : return true;
12685 : : }
12686 : : }
12687 : : break;
12688 : : }
12689 : : default:;
12690 : : }
12691 : : }
12692 : : break;
12693 : 180223 : default:;
12694 : : }
12695 : 180223 : switch (TREE_CODE (_q30))
12696 : : {
12697 : 180223 : case SSA_NAME:
12698 : 180223 : if (gimple *_d2 = get_def (valueize, _q30))
12699 : : {
12700 : 168951 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12701 : 145106 : switch (gimple_assign_rhs_code (_a2))
12702 : : {
12703 : 55595 : CASE_CONVERT:
12704 : 55595 : {
12705 : 55595 : tree _q40 = gimple_assign_rhs1 (_a2);
12706 : 55595 : _q40 = do_valueize (valueize, _q40);
12707 : 55595 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
12708 : : {
12709 : 0 : {
12710 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q31, _p0 };
12711 : 0 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
12712 : 0 : return true;
12713 : : }
12714 : : }
12715 : : break;
12716 : : }
12717 : : default:;
12718 : : }
12719 : : }
12720 : : break;
12721 : 180223 : default:;
12722 : : }
12723 : 180223 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
12724 : : {
12725 : 15 : {
12726 : 15 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0 };
12727 : 15 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
12728 : 15 : return true;
12729 : : }
12730 : : }
12731 : 180208 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
12732 : : {
12733 : 130 : {
12734 : 130 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q31, _p0 };
12735 : 130 : if (gimple_simplify_230 (res_op, seq, valueize, type, captures, EQ_EXPR))
12736 : 36 : return true;
12737 : : }
12738 : : }
12739 : 77369944 : break;
12740 : : }
12741 : : default:;
12742 : : }
12743 : : }
12744 : : break;
12745 : 77369944 : default:;
12746 : : }
12747 : 77369944 : {
12748 : 77369944 : tree _p1_pops[1];
12749 : 77369944 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
12750 : : {
12751 : 160359 : tree _q30 = _p1_pops[0];
12752 : 160359 : switch (TREE_CODE (_q30))
12753 : : {
12754 : 137339 : case SSA_NAME:
12755 : 137339 : if (gimple *_d1 = get_def (valueize, _q30))
12756 : : {
12757 : 134809 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12758 : 175603 : switch (gimple_assign_rhs_code (_a1))
12759 : : {
12760 : 47588 : case PLUS_EXPR:
12761 : 47588 : {
12762 : 47588 : tree _q40 = gimple_assign_rhs1 (_a1);
12763 : 47588 : _q40 = do_valueize (valueize, _q40);
12764 : 47588 : tree _q41 = gimple_assign_rhs2 (_a1);
12765 : 47588 : _q41 = do_valueize (valueize, _q41);
12766 : 47588 : if (tree_swap_operands_p (_q40, _q41))
12767 : 130 : std::swap (_q40, _q41);
12768 : 47588 : switch (TREE_CODE (_q41))
12769 : : {
12770 : 2411 : case SSA_NAME:
12771 : 2411 : if (gimple *_d2 = get_def (valueize, _q41))
12772 : : {
12773 : 2365 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12774 : 2350 : switch (gimple_assign_rhs_code (_a2))
12775 : : {
12776 : 923 : CASE_CONVERT:
12777 : 923 : {
12778 : 923 : tree _q60 = gimple_assign_rhs1 (_a2);
12779 : 923 : _q60 = do_valueize (valueize, _q60);
12780 : 923 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
12781 : : {
12782 : 1 : {
12783 : 1 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0 };
12784 : 1 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12785 : 1 : return true;
12786 : : }
12787 : : }
12788 : : break;
12789 : : }
12790 : : default:;
12791 : : }
12792 : : }
12793 : : break;
12794 : 47587 : default:;
12795 : : }
12796 : 47587 : switch (TREE_CODE (_q40))
12797 : : {
12798 : 47587 : case SSA_NAME:
12799 : 47587 : if (gimple *_d2 = get_def (valueize, _q40))
12800 : : {
12801 : 42244 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12802 : 39700 : switch (gimple_assign_rhs_code (_a2))
12803 : : {
12804 : 36510 : CASE_CONVERT:
12805 : 36510 : {
12806 : 36510 : tree _q50 = gimple_assign_rhs1 (_a2);
12807 : 36510 : _q50 = do_valueize (valueize, _q50);
12808 : 36510 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
12809 : : {
12810 : 107 : {
12811 : 107 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q41, _p0 };
12812 : 107 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12813 : 18 : return true;
12814 : : }
12815 : : }
12816 : : break;
12817 : : }
12818 : : default:;
12819 : : }
12820 : : }
12821 : : break;
12822 : 47569 : default:;
12823 : : }
12824 : 47569 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
12825 : : {
12826 : 0 : {
12827 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0 };
12828 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12829 : 0 : return true;
12830 : : }
12831 : : }
12832 : 47569 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
12833 : : {
12834 : 0 : {
12835 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q41, _p0 };
12836 : 0 : if (gimple_simplify_229 (res_op, seq, valueize, type, captures, EQ_EXPR))
12837 : 0 : return true;
12838 : : }
12839 : : }
12840 : 77369925 : break;
12841 : : }
12842 : : default:;
12843 : : }
12844 : : }
12845 : : break;
12846 : : default:;
12847 : : }
12848 : : }
12849 : : }
12850 : 77369925 : switch (TREE_CODE (_p0))
12851 : : {
12852 : 76544110 : case SSA_NAME:
12853 : 76544110 : if (gimple *_d1 = get_def (valueize, _p0))
12854 : : {
12855 : 26307899 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12856 : 31913667 : switch (gimple_assign_rhs_code (_a1))
12857 : : {
12858 : 754141 : CASE_CONVERT:
12859 : 754141 : {
12860 : 754141 : tree _q20 = gimple_assign_rhs1 (_a1);
12861 : 754141 : _q20 = do_valueize (valueize, _q20);
12862 : 754141 : switch (TREE_CODE (_p1))
12863 : : {
12864 : 177232 : case SSA_NAME:
12865 : 177232 : if (gimple *_d2 = get_def (valueize, _p1))
12866 : : {
12867 : 167517 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12868 : 179995 : switch (gimple_assign_rhs_code (_a2))
12869 : : {
12870 : 350 : case POINTER_PLUS_EXPR:
12871 : 350 : {
12872 : 350 : tree _q40 = gimple_assign_rhs1 (_a2);
12873 : 350 : _q40 = do_valueize (valueize, _q40);
12874 : 350 : tree _q41 = gimple_assign_rhs2 (_a2);
12875 : 350 : _q41 = do_valueize (valueize, _q41);
12876 : 350 : switch (TREE_CODE (_q40))
12877 : : {
12878 : 330 : case SSA_NAME:
12879 : 330 : if (gimple *_d3 = get_def (valueize, _q40))
12880 : : {
12881 : 268 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12882 : 243 : switch (gimple_assign_rhs_code (_a3))
12883 : : {
12884 : 63 : CASE_CONVERT:
12885 : 63 : {
12886 : 63 : tree _q50 = gimple_assign_rhs1 (_a3);
12887 : 63 : _q50 = do_valueize (valueize, _q50);
12888 : 63 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12889 : : {
12890 : 0 : {
12891 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q20, _q41 };
12892 : 0 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
12893 : 0 : return true;
12894 : : }
12895 : : }
12896 : : break;
12897 : : }
12898 : : default:;
12899 : : }
12900 : : }
12901 : : break;
12902 : 350 : default:;
12903 : : }
12904 : 350 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
12905 : : {
12906 : 0 : {
12907 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q20, _q41 };
12908 : 0 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
12909 : 0 : return true;
12910 : : }
12911 : : }
12912 : : break;
12913 : : }
12914 : : default:;
12915 : : }
12916 : : }
12917 : : break;
12918 : 754141 : default:;
12919 : : }
12920 : 754141 : {
12921 : 754141 : tree _p1_pops[1];
12922 : 754141 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
12923 : : {
12924 : 30822 : tree _q40 = _p1_pops[0];
12925 : 30822 : switch (TREE_CODE (_q40))
12926 : : {
12927 : 13432 : case SSA_NAME:
12928 : 13432 : if (gimple *_d2 = get_def (valueize, _q40))
12929 : : {
12930 : 13317 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12931 : 19522 : switch (gimple_assign_rhs_code (_a2))
12932 : : {
12933 : 0 : case POINTER_PLUS_EXPR:
12934 : 0 : {
12935 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
12936 : 0 : _q50 = do_valueize (valueize, _q50);
12937 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
12938 : 0 : _q51 = do_valueize (valueize, _q51);
12939 : 0 : switch (TREE_CODE (_q50))
12940 : : {
12941 : 0 : case SSA_NAME:
12942 : 0 : if (gimple *_d3 = get_def (valueize, _q50))
12943 : : {
12944 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12945 : 0 : switch (gimple_assign_rhs_code (_a3))
12946 : : {
12947 : 0 : CASE_CONVERT:
12948 : 0 : {
12949 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
12950 : 0 : _q60 = do_valueize (valueize, _q60);
12951 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
12952 : : {
12953 : 0 : {
12954 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q20, _q51 };
12955 : 0 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
12956 : 0 : return true;
12957 : : }
12958 : : }
12959 : : break;
12960 : : }
12961 : : default:;
12962 : : }
12963 : : }
12964 : : break;
12965 : 0 : default:;
12966 : : }
12967 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12968 : : {
12969 : 0 : {
12970 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q40, _q20, _q51 };
12971 : 0 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
12972 : 0 : return true;
12973 : : }
12974 : : }
12975 : : break;
12976 : : }
12977 : : default:;
12978 : : }
12979 : : }
12980 : : break;
12981 : : default:;
12982 : : }
12983 : : }
12984 : : }
12985 : 754141 : break;
12986 : : }
12987 : : default:;
12988 : : }
12989 : : }
12990 : : break;
12991 : 77369925 : default:;
12992 : : }
12993 : 77369925 : switch (TREE_CODE (_p1))
12994 : : {
12995 : 12517320 : case SSA_NAME:
12996 : 12517320 : if (gimple *_d1 = get_def (valueize, _p1))
12997 : : {
12998 : 4182818 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12999 : 6117564 : switch (gimple_assign_rhs_code (_a1))
13000 : : {
13001 : 112095 : case POINTER_PLUS_EXPR:
13002 : 112095 : {
13003 : 112095 : tree _q30 = gimple_assign_rhs1 (_a1);
13004 : 112095 : _q30 = do_valueize (valueize, _q30);
13005 : 112095 : tree _q31 = gimple_assign_rhs2 (_a1);
13006 : 112095 : _q31 = do_valueize (valueize, _q31);
13007 : 112095 : switch (TREE_CODE (_q30))
13008 : : {
13009 : 111655 : case SSA_NAME:
13010 : 111655 : if (gimple *_d2 = get_def (valueize, _q30))
13011 : : {
13012 : 106720 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13013 : 112408 : switch (gimple_assign_rhs_code (_a2))
13014 : : {
13015 : 215 : CASE_CONVERT:
13016 : 215 : {
13017 : 215 : tree _q40 = gimple_assign_rhs1 (_a2);
13018 : 215 : _q40 = do_valueize (valueize, _q40);
13019 : 215 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
13020 : : {
13021 : 0 : {
13022 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _p0, _q31 };
13023 : 0 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
13024 : 0 : return true;
13025 : : }
13026 : : }
13027 : : break;
13028 : : }
13029 : : default:;
13030 : : }
13031 : : }
13032 : : break;
13033 : 112095 : default:;
13034 : : }
13035 : 112095 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
13036 : : {
13037 : 4187 : {
13038 : 4187 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _p0, _q31 };
13039 : 4187 : if (gimple_simplify_233 (res_op, seq, valueize, type, captures, EQ_EXPR))
13040 : 1428 : return true;
13041 : : }
13042 : : }
13043 : : break;
13044 : : }
13045 : : default:;
13046 : : }
13047 : : }
13048 : : break;
13049 : 77368497 : default:;
13050 : : }
13051 : 77368497 : {
13052 : 77368497 : tree _p1_pops[1];
13053 : 77368497 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
13054 : : {
13055 : 160340 : tree _q30 = _p1_pops[0];
13056 : 160340 : switch (TREE_CODE (_q30))
13057 : : {
13058 : 137320 : case SSA_NAME:
13059 : 137320 : if (gimple *_d1 = get_def (valueize, _q30))
13060 : : {
13061 : 134790 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13062 : 175584 : switch (gimple_assign_rhs_code (_a1))
13063 : : {
13064 : 22 : case POINTER_PLUS_EXPR:
13065 : 22 : {
13066 : 22 : tree _q40 = gimple_assign_rhs1 (_a1);
13067 : 22 : _q40 = do_valueize (valueize, _q40);
13068 : 22 : tree _q41 = gimple_assign_rhs2 (_a1);
13069 : 22 : _q41 = do_valueize (valueize, _q41);
13070 : 22 : switch (TREE_CODE (_q40))
13071 : : {
13072 : 22 : case SSA_NAME:
13073 : 22 : if (gimple *_d2 = get_def (valueize, _q40))
13074 : : {
13075 : 20 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13076 : 40 : switch (gimple_assign_rhs_code (_a2))
13077 : : {
13078 : 0 : CASE_CONVERT:
13079 : 0 : {
13080 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
13081 : 0 : _q50 = do_valueize (valueize, _q50);
13082 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
13083 : : {
13084 : 0 : {
13085 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _p0, _q41 };
13086 : 0 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
13087 : 0 : return true;
13088 : : }
13089 : : }
13090 : : break;
13091 : : }
13092 : : default:;
13093 : : }
13094 : : }
13095 : : break;
13096 : 22 : default:;
13097 : : }
13098 : 22 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
13099 : : {
13100 : 0 : {
13101 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _p0, _q41 };
13102 : 0 : if (gimple_simplify_237 (res_op, seq, valueize, type, captures, EQ_EXPR))
13103 : 0 : return true;
13104 : : }
13105 : : }
13106 : : break;
13107 : : }
13108 : : default:;
13109 : : }
13110 : : }
13111 : : break;
13112 : : default:;
13113 : : }
13114 : : }
13115 : : }
13116 : 77368497 : switch (TREE_CODE (_p0))
13117 : : {
13118 : 76542682 : case SSA_NAME:
13119 : 76542682 : if (gimple *_d1 = get_def (valueize, _p0))
13120 : : {
13121 : 26306557 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13122 : 31912592 : switch (gimple_assign_rhs_code (_a1))
13123 : : {
13124 : 140800 : case POINTER_PLUS_EXPR:
13125 : 140800 : {
13126 : 140800 : tree _q20 = gimple_assign_rhs1 (_a1);
13127 : 140800 : _q20 = do_valueize (valueize, _q20);
13128 : 140800 : tree _q21 = gimple_assign_rhs2 (_a1);
13129 : 140800 : _q21 = do_valueize (valueize, _q21);
13130 : 140800 : switch (TREE_CODE (_p1))
13131 : : {
13132 : 103934 : case SSA_NAME:
13133 : 103934 : if (gimple *_d2 = get_def (valueize, _p1))
13134 : : {
13135 : 102450 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13136 : 131278 : switch (gimple_assign_rhs_code (_a2))
13137 : : {
13138 : 1050 : case ADDR_EXPR:
13139 : 1050 : {
13140 : 1050 : {
13141 : 1050 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
13142 : 1050 : if (gimple_simplify_238 (res_op, seq, valueize, type, captures, EQ_EXPR))
13143 : 74 : return true;
13144 : : }
13145 : 976 : break;
13146 : : }
13147 : : default:;
13148 : : }
13149 : : }
13150 : : break;
13151 : 30504 : case ADDR_EXPR:
13152 : 30504 : {
13153 : 30504 : {
13154 : 30504 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
13155 : 30504 : if (gimple_simplify_238 (res_op, seq, valueize, type, captures, EQ_EXPR))
13156 : 283 : return true;
13157 : : }
13158 : 30221 : break;
13159 : : }
13160 : 140443 : default:;
13161 : : }
13162 : 140443 : switch (TREE_CODE (_q20))
13163 : : {
13164 : 136122 : case SSA_NAME:
13165 : 136122 : if (gimple *_d2 = get_def (valueize, _q20))
13166 : : {
13167 : 131322 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13168 : 160621 : switch (gimple_assign_rhs_code (_a2))
13169 : : {
13170 : 122 : case ADDR_EXPR:
13171 : 122 : {
13172 : 122 : switch (TREE_CODE (_p1))
13173 : : {
13174 : 122 : case SSA_NAME:
13175 : 122 : if (gimple *_d3 = get_def (valueize, _p1))
13176 : : {
13177 : 122 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13178 : 172 : switch (gimple_assign_rhs_code (_a3))
13179 : : {
13180 : 72 : case POINTER_PLUS_EXPR:
13181 : 72 : {
13182 : 72 : tree _q50 = gimple_assign_rhs1 (_a3);
13183 : 72 : _q50 = do_valueize (valueize, _q50);
13184 : 72 : tree _q51 = gimple_assign_rhs2 (_a3);
13185 : 72 : _q51 = do_valueize (valueize, _q51);
13186 : 72 : switch (TREE_CODE (_q50))
13187 : : {
13188 : 72 : case SSA_NAME:
13189 : 72 : if (gimple *_d4 = get_def (valueize, _q50))
13190 : : {
13191 : 40 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
13192 : 16 : switch (gimple_assign_rhs_code (_a4))
13193 : : {
13194 : 8 : case ADDR_EXPR:
13195 : 8 : {
13196 : 8 : {
13197 : 8 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51 };
13198 : 8 : if (gimple_simplify_239 (res_op, seq, valueize, type, captures, EQ_EXPR))
13199 : 4 : return true;
13200 : : }
13201 : 4 : break;
13202 : : }
13203 : : default:;
13204 : : }
13205 : : }
13206 : : break;
13207 : 0 : case ADDR_EXPR:
13208 : 0 : {
13209 : 0 : {
13210 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51 };
13211 : 0 : if (gimple_simplify_239 (res_op, seq, valueize, type, captures, EQ_EXPR))
13212 : 0 : return true;
13213 : : }
13214 : 0 : break;
13215 : : }
13216 : : default:;
13217 : : }
13218 : : break;
13219 : : }
13220 : : default:;
13221 : : }
13222 : : }
13223 : : break;
13224 : : default:;
13225 : : }
13226 : : break;
13227 : : }
13228 : : default:;
13229 : : }
13230 : : }
13231 : : break;
13232 : 4321 : case ADDR_EXPR:
13233 : 4321 : {
13234 : 4321 : switch (TREE_CODE (_p1))
13235 : : {
13236 : 4303 : case SSA_NAME:
13237 : 4303 : if (gimple *_d2 = get_def (valueize, _p1))
13238 : : {
13239 : 4181 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13240 : 7505 : switch (gimple_assign_rhs_code (_a2))
13241 : : {
13242 : 131 : case POINTER_PLUS_EXPR:
13243 : 131 : {
13244 : 131 : tree _q50 = gimple_assign_rhs1 (_a2);
13245 : 131 : _q50 = do_valueize (valueize, _q50);
13246 : 131 : tree _q51 = gimple_assign_rhs2 (_a2);
13247 : 131 : _q51 = do_valueize (valueize, _q51);
13248 : 131 : switch (TREE_CODE (_q50))
13249 : : {
13250 : 127 : case SSA_NAME:
13251 : 127 : if (gimple *_d3 = get_def (valueize, _q50))
13252 : : {
13253 : 127 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13254 : 8 : switch (gimple_assign_rhs_code (_a3))
13255 : : {
13256 : 0 : case ADDR_EXPR:
13257 : 0 : {
13258 : 0 : {
13259 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51 };
13260 : 0 : if (gimple_simplify_239 (res_op, seq, valueize, type, captures, EQ_EXPR))
13261 : 0 : return true;
13262 : : }
13263 : 0 : break;
13264 : : }
13265 : : default:;
13266 : : }
13267 : : }
13268 : : break;
13269 : 4 : case ADDR_EXPR:
13270 : 4 : {
13271 : 4 : {
13272 : 4 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51 };
13273 : 4 : if (gimple_simplify_239 (res_op, seq, valueize, type, captures, EQ_EXPR))
13274 : 4 : return true;
13275 : : }
13276 : 0 : break;
13277 : : }
13278 : : default:;
13279 : : }
13280 : : break;
13281 : : }
13282 : : default:;
13283 : : }
13284 : : }
13285 : : break;
13286 : : default:;
13287 : : }
13288 : : break;
13289 : : }
13290 : : default:;
13291 : : }
13292 : : break;
13293 : : }
13294 : 144036 : case ADDR_EXPR:
13295 : 144036 : {
13296 : 144036 : switch (TREE_CODE (_p1))
13297 : : {
13298 : 125243 : case SSA_NAME:
13299 : 125243 : if (gimple *_d2 = get_def (valueize, _p1))
13300 : : {
13301 : 121606 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13302 : 206796 : switch (gimple_assign_rhs_code (_a2))
13303 : : {
13304 : 164 : case POINTER_PLUS_EXPR:
13305 : 164 : {
13306 : 164 : tree _q30 = gimple_assign_rhs1 (_a2);
13307 : 164 : _q30 = do_valueize (valueize, _q30);
13308 : 164 : tree _q31 = gimple_assign_rhs2 (_a2);
13309 : 164 : _q31 = do_valueize (valueize, _q31);
13310 : 164 : {
13311 : 164 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p0 };
13312 : 164 : if (gimple_simplify_238 (res_op, seq, valueize, type, captures, EQ_EXPR))
13313 : 69 : return true;
13314 : : }
13315 : 95 : break;
13316 : : }
13317 : : default:;
13318 : : }
13319 : : }
13320 : : break;
13321 : : default:;
13322 : : }
13323 : : break;
13324 : : }
13325 : : default:;
13326 : : }
13327 : : }
13328 : : break;
13329 : 88325 : case ADDR_EXPR:
13330 : 88325 : {
13331 : 88325 : switch (TREE_CODE (_p1))
13332 : : {
13333 : 0 : case SSA_NAME:
13334 : 0 : if (gimple *_d1 = get_def (valueize, _p1))
13335 : : {
13336 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13337 : 0 : switch (gimple_assign_rhs_code (_a1))
13338 : : {
13339 : 0 : case POINTER_PLUS_EXPR:
13340 : 0 : {
13341 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
13342 : 0 : _q30 = do_valueize (valueize, _q30);
13343 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
13344 : 0 : _q31 = do_valueize (valueize, _q31);
13345 : 0 : {
13346 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p0 };
13347 : 0 : if (gimple_simplify_238 (res_op, seq, valueize, type, captures, EQ_EXPR))
13348 : 0 : return true;
13349 : : }
13350 : 0 : break;
13351 : : }
13352 : : default:;
13353 : : }
13354 : : }
13355 : : break;
13356 : : default:;
13357 : : }
13358 : : break;
13359 : : }
13360 : 77368063 : default:;
13361 : : }
13362 : 77368063 : switch (TREE_CODE (_p1))
13363 : : {
13364 : 12515741 : case SSA_NAME:
13365 : 12515741 : if (gimple *_d1 = get_def (valueize, _p1))
13366 : : {
13367 : 4181239 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13368 : 6115911 : switch (gimple_assign_rhs_code (_a1))
13369 : : {
13370 : 29940 : case MINUS_EXPR:
13371 : 29940 : {
13372 : 29940 : tree _q30 = gimple_assign_rhs1 (_a1);
13373 : 29940 : _q30 = do_valueize (valueize, _q30);
13374 : 29940 : tree _q31 = gimple_assign_rhs2 (_a1);
13375 : 29940 : _q31 = do_valueize (valueize, _q31);
13376 : 29940 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
13377 : : {
13378 : 54 : {
13379 : 54 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
13380 : 54 : if (gimple_simplify_234 (res_op, seq, valueize, type, captures, EQ_EXPR))
13381 : 14 : return true;
13382 : : }
13383 : : }
13384 : : break;
13385 : : }
13386 : : default:;
13387 : : }
13388 : : }
13389 : : break;
13390 : 77368049 : default:;
13391 : : }
13392 : 77368049 : switch (TREE_CODE (_p0))
13393 : : {
13394 : 76542234 : case SSA_NAME:
13395 : 76542234 : if (gimple *_d1 = get_def (valueize, _p0))
13396 : : {
13397 : 26306109 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13398 : 31912070 : switch (gimple_assign_rhs_code (_a1))
13399 : : {
13400 : 12689 : case TRUNC_DIV_EXPR:
13401 : 12689 : {
13402 : 12689 : tree _q20 = gimple_assign_rhs1 (_a1);
13403 : 12689 : _q20 = do_valueize (valueize, _q20);
13404 : 12689 : tree _q21 = gimple_assign_rhs2 (_a1);
13405 : 12689 : _q21 = do_valueize (valueize, _q21);
13406 : 12689 : if (integer_zerop (_p1))
13407 : : {
13408 : 2628 : {
13409 : 2628 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13410 : 2628 : if (gimple_simplify_240 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR))
13411 : 131 : return true;
13412 : : }
13413 : : }
13414 : : break;
13415 : : }
13416 : 754141 : CASE_CONVERT:
13417 : 754141 : {
13418 : 754141 : tree _q20 = gimple_assign_rhs1 (_a1);
13419 : 754141 : _q20 = do_valueize (valueize, _q20);
13420 : 754141 : switch (TREE_CODE (_p1))
13421 : : {
13422 : 177232 : case SSA_NAME:
13423 : 177232 : if (gimple *_d2 = get_def (valueize, _p1))
13424 : : {
13425 : 167517 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13426 : 179995 : switch (gimple_assign_rhs_code (_a2))
13427 : : {
13428 : 38775 : CASE_CONVERT:
13429 : 38775 : {
13430 : 38775 : tree _q40 = gimple_assign_rhs1 (_a2);
13431 : 38775 : _q40 = do_valueize (valueize, _q40);
13432 : 38775 : switch (TREE_CODE (_q40))
13433 : : {
13434 : 21385 : case SSA_NAME:
13435 : 21385 : if (gimple *_d3 = get_def (valueize, _q40))
13436 : : {
13437 : 21183 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13438 : 29599 : switch (gimple_assign_rhs_code (_a3))
13439 : : {
13440 : 40 : case MINUS_EXPR:
13441 : 40 : {
13442 : 40 : tree _q50 = gimple_assign_rhs1 (_a3);
13443 : 40 : _q50 = do_valueize (valueize, _q50);
13444 : 40 : tree _q51 = gimple_assign_rhs2 (_a3);
13445 : 40 : _q51 = do_valueize (valueize, _q51);
13446 : 40 : switch (TREE_CODE (_q50))
13447 : : {
13448 : 6 : case INTEGER_CST:
13449 : 6 : {
13450 : 6 : switch (TREE_CODE (_q51))
13451 : : {
13452 : 6 : case SSA_NAME:
13453 : 6 : if (gimple *_d4 = get_def (valueize, _q51))
13454 : : {
13455 : 6 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
13456 : 6 : switch (gimple_assign_rhs_code (_a4))
13457 : : {
13458 : 6 : CASE_CONVERT:
13459 : 6 : {
13460 : 6 : tree _q70 = gimple_assign_rhs1 (_a4);
13461 : 6 : _q70 = do_valueize (valueize, _q70);
13462 : 6 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
13463 : : {
13464 : 0 : {
13465 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
13466 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13467 : 0 : return true;
13468 : : }
13469 : : }
13470 : : break;
13471 : : }
13472 : : default:;
13473 : : }
13474 : : }
13475 : : break;
13476 : : default:;
13477 : : }
13478 : : break;
13479 : : }
13480 : : default:;
13481 : : }
13482 : : break;
13483 : : }
13484 : : default:;
13485 : : }
13486 : : }
13487 : : break;
13488 : : default:;
13489 : : }
13490 : : break;
13491 : : }
13492 : : default:;
13493 : : }
13494 : : }
13495 : : break;
13496 : 754141 : default:;
13497 : : }
13498 : 754141 : switch (TREE_CODE (_q20))
13499 : : {
13500 : 740930 : case SSA_NAME:
13501 : 740930 : if (gimple *_d2 = get_def (valueize, _q20))
13502 : : {
13503 : 729571 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13504 : 868948 : switch (gimple_assign_rhs_code (_a2))
13505 : : {
13506 : 8686 : case MINUS_EXPR:
13507 : 8686 : {
13508 : 8686 : tree _q30 = gimple_assign_rhs1 (_a2);
13509 : 8686 : _q30 = do_valueize (valueize, _q30);
13510 : 8686 : tree _q31 = gimple_assign_rhs2 (_a2);
13511 : 8686 : _q31 = do_valueize (valueize, _q31);
13512 : 8686 : switch (TREE_CODE (_q30))
13513 : : {
13514 : 541 : case INTEGER_CST:
13515 : 541 : {
13516 : 541 : switch (TREE_CODE (_q31))
13517 : : {
13518 : 541 : case SSA_NAME:
13519 : 541 : if (gimple *_d3 = get_def (valueize, _q31))
13520 : : {
13521 : 531 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13522 : 199 : switch (gimple_assign_rhs_code (_a3))
13523 : : {
13524 : 110 : CASE_CONVERT:
13525 : 110 : {
13526 : 110 : tree _q50 = gimple_assign_rhs1 (_a3);
13527 : 110 : _q50 = do_valueize (valueize, _q50);
13528 : 110 : switch (TREE_CODE (_p1))
13529 : : {
13530 : 52 : case SSA_NAME:
13531 : 52 : if (gimple *_d4 = get_def (valueize, _p1))
13532 : : {
13533 : 45 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
13534 : 18 : switch (gimple_assign_rhs_code (_a4))
13535 : : {
13536 : 4 : CASE_CONVERT:
13537 : 4 : {
13538 : 4 : tree _q70 = gimple_assign_rhs1 (_a4);
13539 : 4 : _q70 = do_valueize (valueize, _q70);
13540 : 4 : if ((_q70 == _q50 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q50, 0) && types_match (_q70, _q50)))
13541 : : {
13542 : 0 : {
13543 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
13544 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13545 : 0 : return true;
13546 : : }
13547 : : }
13548 : : break;
13549 : : }
13550 : : default:;
13551 : : }
13552 : : }
13553 : : break;
13554 : 110 : default:;
13555 : : }
13556 : 110 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
13557 : : {
13558 : 0 : {
13559 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
13560 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13561 : 0 : return true;
13562 : : }
13563 : : }
13564 : : break;
13565 : : }
13566 : : default:;
13567 : : }
13568 : : }
13569 : : break;
13570 : 541 : default:;
13571 : : }
13572 : 541 : switch (TREE_CODE (_p1))
13573 : : {
13574 : 93 : case SSA_NAME:
13575 : 93 : if (gimple *_d3 = get_def (valueize, _p1))
13576 : : {
13577 : 78 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13578 : 27 : switch (gimple_assign_rhs_code (_a3))
13579 : : {
13580 : 4 : CASE_CONVERT:
13581 : 4 : {
13582 : 4 : tree _q60 = gimple_assign_rhs1 (_a3);
13583 : 4 : _q60 = do_valueize (valueize, _q60);
13584 : 4 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
13585 : : {
13586 : 0 : {
13587 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
13588 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13589 : 0 : return true;
13590 : : }
13591 : : }
13592 : : break;
13593 : : }
13594 : : default:;
13595 : : }
13596 : : }
13597 : : break;
13598 : 541 : default:;
13599 : : }
13600 : 541 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
13601 : : {
13602 : 0 : {
13603 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
13604 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13605 : 0 : return true;
13606 : : }
13607 : : }
13608 : : break;
13609 : : }
13610 : : default:;
13611 : : }
13612 : : break;
13613 : : }
13614 : : default:;
13615 : : }
13616 : : }
13617 : : break;
13618 : 754141 : default:;
13619 : : }
13620 : 754141 : switch (TREE_CODE (_p1))
13621 : : {
13622 : 177232 : case SSA_NAME:
13623 : 177232 : if (gimple *_d2 = get_def (valueize, _p1))
13624 : : {
13625 : 167517 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13626 : 179995 : switch (gimple_assign_rhs_code (_a2))
13627 : : {
13628 : 38775 : CASE_CONVERT:
13629 : 38775 : {
13630 : 38775 : tree _q40 = gimple_assign_rhs1 (_a2);
13631 : 38775 : _q40 = do_valueize (valueize, _q40);
13632 : 38775 : switch (TREE_CODE (_q40))
13633 : : {
13634 : 21385 : case SSA_NAME:
13635 : 21385 : if (gimple *_d3 = get_def (valueize, _q40))
13636 : : {
13637 : 21183 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13638 : 29599 : switch (gimple_assign_rhs_code (_a3))
13639 : : {
13640 : 40 : case MINUS_EXPR:
13641 : 40 : {
13642 : 40 : tree _q50 = gimple_assign_rhs1 (_a3);
13643 : 40 : _q50 = do_valueize (valueize, _q50);
13644 : 40 : tree _q51 = gimple_assign_rhs2 (_a3);
13645 : 40 : _q51 = do_valueize (valueize, _q51);
13646 : 40 : switch (TREE_CODE (_q50))
13647 : : {
13648 : 6 : case INTEGER_CST:
13649 : 6 : {
13650 : 6 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
13651 : : {
13652 : 0 : {
13653 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
13654 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13655 : 0 : return true;
13656 : : }
13657 : : }
13658 : : break;
13659 : : }
13660 : : default:;
13661 : : }
13662 : : break;
13663 : : }
13664 : : default:;
13665 : : }
13666 : : }
13667 : : break;
13668 : : default:;
13669 : : }
13670 : : break;
13671 : : }
13672 : 716 : case MINUS_EXPR:
13673 : 716 : {
13674 : 716 : tree _q40 = gimple_assign_rhs1 (_a2);
13675 : 716 : _q40 = do_valueize (valueize, _q40);
13676 : 716 : tree _q41 = gimple_assign_rhs2 (_a2);
13677 : 716 : _q41 = do_valueize (valueize, _q41);
13678 : 716 : switch (TREE_CODE (_q40))
13679 : : {
13680 : 100 : case INTEGER_CST:
13681 : 100 : {
13682 : 100 : switch (TREE_CODE (_q41))
13683 : : {
13684 : 100 : case SSA_NAME:
13685 : 100 : if (gimple *_d3 = get_def (valueize, _q41))
13686 : : {
13687 : 84 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13688 : 27 : switch (gimple_assign_rhs_code (_a3))
13689 : : {
13690 : 13 : CASE_CONVERT:
13691 : 13 : {
13692 : 13 : tree _q60 = gimple_assign_rhs1 (_a3);
13693 : 13 : _q60 = do_valueize (valueize, _q60);
13694 : 13 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
13695 : : {
13696 : 0 : {
13697 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
13698 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13699 : 0 : return true;
13700 : : }
13701 : : }
13702 : : break;
13703 : : }
13704 : : default:;
13705 : : }
13706 : : }
13707 : : break;
13708 : 100 : default:;
13709 : : }
13710 : 100 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
13711 : : {
13712 : 0 : {
13713 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
13714 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13715 : 0 : return true;
13716 : : }
13717 : : }
13718 : : break;
13719 : : }
13720 : : default:;
13721 : : }
13722 : : break;
13723 : : }
13724 : : default:;
13725 : : }
13726 : : }
13727 : : break;
13728 : : default:;
13729 : : }
13730 : : break;
13731 : : }
13732 : 236415 : case MINUS_EXPR:
13733 : 236415 : {
13734 : 236415 : tree _q20 = gimple_assign_rhs1 (_a1);
13735 : 236415 : _q20 = do_valueize (valueize, _q20);
13736 : 236415 : tree _q21 = gimple_assign_rhs2 (_a1);
13737 : 236415 : _q21 = do_valueize (valueize, _q21);
13738 : 236415 : switch (TREE_CODE (_q20))
13739 : : {
13740 : 8117 : case INTEGER_CST:
13741 : 8117 : {
13742 : 8117 : switch (TREE_CODE (_q21))
13743 : : {
13744 : 8117 : case SSA_NAME:
13745 : 8117 : if (gimple *_d2 = get_def (valueize, _q21))
13746 : : {
13747 : 5618 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13748 : 4559 : switch (gimple_assign_rhs_code (_a2))
13749 : : {
13750 : 3344 : CASE_CONVERT:
13751 : 3344 : {
13752 : 3344 : tree _q40 = gimple_assign_rhs1 (_a2);
13753 : 3344 : _q40 = do_valueize (valueize, _q40);
13754 : 3344 : switch (TREE_CODE (_p1))
13755 : : {
13756 : 721 : case SSA_NAME:
13757 : 721 : if (gimple *_d3 = get_def (valueize, _p1))
13758 : : {
13759 : 718 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13760 : 770 : switch (gimple_assign_rhs_code (_a3))
13761 : : {
13762 : 0 : CASE_CONVERT:
13763 : 0 : {
13764 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
13765 : 0 : _q60 = do_valueize (valueize, _q60);
13766 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
13767 : : {
13768 : 0 : {
13769 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
13770 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13771 : 0 : return true;
13772 : : }
13773 : : }
13774 : : break;
13775 : : }
13776 : : default:;
13777 : : }
13778 : : }
13779 : : break;
13780 : 3344 : default:;
13781 : : }
13782 : 3344 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
13783 : : {
13784 : 0 : {
13785 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
13786 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13787 : 0 : return true;
13788 : : }
13789 : : }
13790 : : break;
13791 : : }
13792 : : default:;
13793 : : }
13794 : : }
13795 : : break;
13796 : 8117 : default:;
13797 : : }
13798 : 8117 : switch (TREE_CODE (_p1))
13799 : : {
13800 : 1711 : case SSA_NAME:
13801 : 1711 : if (gimple *_d2 = get_def (valueize, _p1))
13802 : : {
13803 : 1589 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13804 : 1078 : switch (gimple_assign_rhs_code (_a2))
13805 : : {
13806 : 4 : CASE_CONVERT:
13807 : 4 : {
13808 : 4 : tree _q50 = gimple_assign_rhs1 (_a2);
13809 : 4 : _q50 = do_valueize (valueize, _q50);
13810 : 4 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
13811 : : {
13812 : 0 : {
13813 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
13814 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13815 : 0 : return true;
13816 : : }
13817 : : }
13818 : : break;
13819 : : }
13820 : : default:;
13821 : : }
13822 : : }
13823 : : break;
13824 : 8117 : default:;
13825 : : }
13826 : 8117 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
13827 : : {
13828 : 0 : {
13829 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
13830 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13831 : 0 : return true;
13832 : : }
13833 : : }
13834 : : break;
13835 : : }
13836 : : default:;
13837 : : }
13838 : : break;
13839 : : }
13840 : : default:;
13841 : : }
13842 : : }
13843 : : break;
13844 : 77367918 : default:;
13845 : : }
13846 : 77367918 : switch (TREE_CODE (_p1))
13847 : : {
13848 : 12515727 : case SSA_NAME:
13849 : 12515727 : if (gimple *_d1 = get_def (valueize, _p1))
13850 : : {
13851 : 4181225 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13852 : 6115897 : switch (gimple_assign_rhs_code (_a1))
13853 : : {
13854 : 238361 : CASE_CONVERT:
13855 : 238361 : {
13856 : 238361 : tree _q30 = gimple_assign_rhs1 (_a1);
13857 : 238361 : _q30 = do_valueize (valueize, _q30);
13858 : 238361 : switch (TREE_CODE (_q30))
13859 : : {
13860 : 215341 : case SSA_NAME:
13861 : 215341 : if (gimple *_d2 = get_def (valueize, _q30))
13862 : : {
13863 : 210354 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13864 : 288032 : switch (gimple_assign_rhs_code (_a2))
13865 : : {
13866 : 5166 : case MINUS_EXPR:
13867 : 5166 : {
13868 : 5166 : tree _q40 = gimple_assign_rhs1 (_a2);
13869 : 5166 : _q40 = do_valueize (valueize, _q40);
13870 : 5166 : tree _q41 = gimple_assign_rhs2 (_a2);
13871 : 5166 : _q41 = do_valueize (valueize, _q41);
13872 : 5166 : switch (TREE_CODE (_q40))
13873 : : {
13874 : 107 : case INTEGER_CST:
13875 : 107 : {
13876 : 107 : switch (TREE_CODE (_q41))
13877 : : {
13878 : 107 : case SSA_NAME:
13879 : 107 : if (gimple *_d3 = get_def (valueize, _q41))
13880 : : {
13881 : 96 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13882 : 49 : switch (gimple_assign_rhs_code (_a3))
13883 : : {
13884 : 45 : CASE_CONVERT:
13885 : 45 : {
13886 : 45 : tree _q60 = gimple_assign_rhs1 (_a3);
13887 : 45 : _q60 = do_valueize (valueize, _q60);
13888 : 45 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
13889 : : {
13890 : 0 : {
13891 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
13892 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13893 : 0 : return true;
13894 : : }
13895 : : }
13896 : : break;
13897 : : }
13898 : : default:;
13899 : : }
13900 : : }
13901 : : break;
13902 : 107 : default:;
13903 : : }
13904 : 107 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
13905 : : {
13906 : 0 : {
13907 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
13908 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13909 : 0 : return true;
13910 : : }
13911 : : }
13912 : : break;
13913 : : }
13914 : : default:;
13915 : : }
13916 : : break;
13917 : : }
13918 : : default:;
13919 : : }
13920 : : }
13921 : : break;
13922 : : default:;
13923 : : }
13924 : : break;
13925 : : }
13926 : 29926 : case MINUS_EXPR:
13927 : 29926 : {
13928 : 29926 : tree _q30 = gimple_assign_rhs1 (_a1);
13929 : 29926 : _q30 = do_valueize (valueize, _q30);
13930 : 29926 : tree _q31 = gimple_assign_rhs2 (_a1);
13931 : 29926 : _q31 = do_valueize (valueize, _q31);
13932 : 29926 : switch (TREE_CODE (_q30))
13933 : : {
13934 : 669 : case INTEGER_CST:
13935 : 669 : {
13936 : 669 : switch (TREE_CODE (_q31))
13937 : : {
13938 : 669 : case SSA_NAME:
13939 : 669 : if (gimple *_d2 = get_def (valueize, _q31))
13940 : : {
13941 : 599 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13942 : 313 : switch (gimple_assign_rhs_code (_a2))
13943 : : {
13944 : 265 : CASE_CONVERT:
13945 : 265 : {
13946 : 265 : tree _q50 = gimple_assign_rhs1 (_a2);
13947 : 265 : _q50 = do_valueize (valueize, _q50);
13948 : 265 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
13949 : : {
13950 : 0 : {
13951 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
13952 : 0 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13953 : 0 : return true;
13954 : : }
13955 : : }
13956 : : break;
13957 : : }
13958 : : default:;
13959 : : }
13960 : : }
13961 : : break;
13962 : 669 : default:;
13963 : : }
13964 : 669 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
13965 : : {
13966 : 8 : {
13967 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
13968 : 8 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, EQ_EXPR))
13969 : 8 : return true;
13970 : : }
13971 : : }
13972 : : break;
13973 : : }
13974 : : default:;
13975 : : }
13976 : : break;
13977 : : }
13978 : : default:;
13979 : : }
13980 : : }
13981 : : break;
13982 : 77367910 : default:;
13983 : : }
13984 : 77367910 : switch (TREE_CODE (_p0))
13985 : : {
13986 : 76542095 : case SSA_NAME:
13987 : 76542095 : if (gimple *_d1 = get_def (valueize, _p0))
13988 : : {
13989 : 26305970 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13990 : 31911931 : switch (gimple_assign_rhs_code (_a1))
13991 : : {
13992 : 1215 : case LT_EXPR:
13993 : 1215 : {
13994 : 1215 : tree _q20 = gimple_assign_rhs1 (_a1);
13995 : 1215 : _q20 = do_valueize (valueize, _q20);
13996 : 1215 : tree _q21 = gimple_assign_rhs2 (_a1);
13997 : 1215 : _q21 = do_valueize (valueize, _q21);
13998 : 1215 : switch (TREE_CODE (_p1))
13999 : : {
14000 : 355 : case SSA_NAME:
14001 : 355 : if (gimple *_d2 = get_def (valueize, _p1))
14002 : : {
14003 : 351 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14004 : 313 : switch (gimple_assign_rhs_code (_a2))
14005 : : {
14006 : 38 : case GT_EXPR:
14007 : 38 : {
14008 : 38 : tree _q50 = gimple_assign_rhs1 (_a2);
14009 : 38 : _q50 = do_valueize (valueize, _q50);
14010 : 38 : tree _q51 = gimple_assign_rhs2 (_a2);
14011 : 38 : _q51 = do_valueize (valueize, _q51);
14012 : 38 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14013 : : {
14014 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14015 : : {
14016 : 16 : {
14017 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14018 : 16 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, GT_EXPR, EQ_EXPR))
14019 : 16 : return true;
14020 : : }
14021 : : }
14022 : : }
14023 : : break;
14024 : : }
14025 : 16 : case EQ_EXPR:
14026 : 16 : {
14027 : 16 : tree _q50 = gimple_assign_rhs1 (_a2);
14028 : 16 : _q50 = do_valueize (valueize, _q50);
14029 : 16 : tree _q51 = gimple_assign_rhs2 (_a2);
14030 : 16 : _q51 = do_valueize (valueize, _q51);
14031 : 16 : if (tree_swap_operands_p (_q50, _q51))
14032 : 0 : std::swap (_q50, _q51);
14033 : 16 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14034 : : {
14035 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14036 : : {
14037 : 16 : {
14038 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14039 : 16 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, EQ_EXPR, GT_EXPR))
14040 : 16 : return true;
14041 : : }
14042 : : }
14043 : : }
14044 : 77362175 : break;
14045 : : }
14046 : 35 : case NE_EXPR:
14047 : 35 : {
14048 : 35 : tree _q50 = gimple_assign_rhs1 (_a2);
14049 : 35 : _q50 = do_valueize (valueize, _q50);
14050 : 35 : tree _q51 = gimple_assign_rhs2 (_a2);
14051 : 35 : _q51 = do_valueize (valueize, _q51);
14052 : 35 : if (tree_swap_operands_p (_q50, _q51))
14053 : 0 : std::swap (_q50, _q51);
14054 : 35 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14055 : : {
14056 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14057 : : {
14058 : 16 : {
14059 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14060 : 16 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, NE_EXPR, LE_EXPR))
14061 : 16 : return true;
14062 : : }
14063 : : }
14064 : : }
14065 : 77362175 : break;
14066 : : }
14067 : : default:;
14068 : : }
14069 : : }
14070 : : break;
14071 : : default:;
14072 : : }
14073 : : break;
14074 : : }
14075 : 808 : case LE_EXPR:
14076 : 808 : {
14077 : 808 : tree _q20 = gimple_assign_rhs1 (_a1);
14078 : 808 : _q20 = do_valueize (valueize, _q20);
14079 : 808 : tree _q21 = gimple_assign_rhs2 (_a1);
14080 : 808 : _q21 = do_valueize (valueize, _q21);
14081 : 808 : switch (TREE_CODE (_p1))
14082 : : {
14083 : 435 : case SSA_NAME:
14084 : 435 : if (gimple *_d2 = get_def (valueize, _p1))
14085 : : {
14086 : 435 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14087 : 408 : switch (gimple_assign_rhs_code (_a2))
14088 : : {
14089 : 68 : case GE_EXPR:
14090 : 68 : {
14091 : 68 : tree _q50 = gimple_assign_rhs1 (_a2);
14092 : 68 : _q50 = do_valueize (valueize, _q50);
14093 : 68 : tree _q51 = gimple_assign_rhs2 (_a2);
14094 : 68 : _q51 = do_valueize (valueize, _q51);
14095 : 68 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14096 : : {
14097 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14098 : : {
14099 : 16 : {
14100 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14101 : 16 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, GE_EXPR, EQ_EXPR))
14102 : 16 : return true;
14103 : : }
14104 : : }
14105 : : }
14106 : : break;
14107 : : }
14108 : 16 : case EQ_EXPR:
14109 : 16 : {
14110 : 16 : tree _q50 = gimple_assign_rhs1 (_a2);
14111 : 16 : _q50 = do_valueize (valueize, _q50);
14112 : 16 : tree _q51 = gimple_assign_rhs2 (_a2);
14113 : 16 : _q51 = do_valueize (valueize, _q51);
14114 : 16 : if (tree_swap_operands_p (_q50, _q51))
14115 : 0 : std::swap (_q50, _q51);
14116 : 16 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14117 : : {
14118 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14119 : : {
14120 : 16 : {
14121 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14122 : 16 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, EQ_EXPR, GE_EXPR))
14123 : 16 : return true;
14124 : : }
14125 : : }
14126 : : }
14127 : 77362175 : break;
14128 : : }
14129 : 16 : case NE_EXPR:
14130 : 16 : {
14131 : 16 : tree _q50 = gimple_assign_rhs1 (_a2);
14132 : 16 : _q50 = do_valueize (valueize, _q50);
14133 : 16 : tree _q51 = gimple_assign_rhs2 (_a2);
14134 : 16 : _q51 = do_valueize (valueize, _q51);
14135 : 16 : if (tree_swap_operands_p (_q50, _q51))
14136 : 0 : std::swap (_q50, _q51);
14137 : 16 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14138 : : {
14139 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14140 : : {
14141 : 16 : {
14142 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14143 : 16 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, NE_EXPR, LT_EXPR))
14144 : 16 : return true;
14145 : : }
14146 : : }
14147 : : }
14148 : 77362175 : break;
14149 : : }
14150 : : default:;
14151 : : }
14152 : : }
14153 : : break;
14154 : : default:;
14155 : : }
14156 : : break;
14157 : : }
14158 : 2290 : case GT_EXPR:
14159 : 2290 : {
14160 : 2290 : tree _q20 = gimple_assign_rhs1 (_a1);
14161 : 2290 : _q20 = do_valueize (valueize, _q20);
14162 : 2290 : tree _q21 = gimple_assign_rhs2 (_a1);
14163 : 2290 : _q21 = do_valueize (valueize, _q21);
14164 : 2290 : switch (TREE_CODE (_p1))
14165 : : {
14166 : 1047 : case SSA_NAME:
14167 : 1047 : if (gimple *_d2 = get_def (valueize, _p1))
14168 : : {
14169 : 1039 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14170 : 964 : switch (gimple_assign_rhs_code (_a2))
14171 : : {
14172 : 286 : case GT_EXPR:
14173 : 286 : {
14174 : 286 : tree _q50 = gimple_assign_rhs1 (_a2);
14175 : 286 : _q50 = do_valueize (valueize, _q50);
14176 : 286 : tree _q51 = gimple_assign_rhs2 (_a2);
14177 : 286 : _q51 = do_valueize (valueize, _q51);
14178 : 286 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14179 : : {
14180 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14181 : : {
14182 : 0 : {
14183 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14184 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, GT_EXPR, EQ_EXPR))
14185 : 0 : return true;
14186 : : }
14187 : 0 : {
14188 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14189 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, GT_EXPR, EQ_EXPR))
14190 : 0 : return true;
14191 : : }
14192 : : }
14193 : : }
14194 : : break;
14195 : : }
14196 : 227 : case EQ_EXPR:
14197 : 227 : {
14198 : 227 : tree _q50 = gimple_assign_rhs1 (_a2);
14199 : 227 : _q50 = do_valueize (valueize, _q50);
14200 : 227 : tree _q51 = gimple_assign_rhs2 (_a2);
14201 : 227 : _q51 = do_valueize (valueize, _q51);
14202 : 227 : if (tree_swap_operands_p (_q50, _q51))
14203 : 3 : std::swap (_q50, _q51);
14204 : 227 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14205 : : {
14206 : 3 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14207 : : {
14208 : 3 : {
14209 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14210 : 3 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, EQ_EXPR, GT_EXPR))
14211 : 3 : return true;
14212 : : }
14213 : : }
14214 : : }
14215 : 77362175 : break;
14216 : : }
14217 : 117 : case NE_EXPR:
14218 : 117 : {
14219 : 117 : tree _q50 = gimple_assign_rhs1 (_a2);
14220 : 117 : _q50 = do_valueize (valueize, _q50);
14221 : 117 : tree _q51 = gimple_assign_rhs2 (_a2);
14222 : 117 : _q51 = do_valueize (valueize, _q51);
14223 : 117 : if (tree_swap_operands_p (_q50, _q51))
14224 : 3 : std::swap (_q50, _q51);
14225 : 117 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14226 : : {
14227 : 3 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14228 : : {
14229 : 3 : {
14230 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14231 : 3 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, NE_EXPR, LE_EXPR))
14232 : 3 : return true;
14233 : : }
14234 : : }
14235 : : }
14236 : 77362175 : break;
14237 : : }
14238 : 176 : case LT_EXPR:
14239 : 176 : {
14240 : 176 : tree _q50 = gimple_assign_rhs1 (_a2);
14241 : 176 : _q50 = do_valueize (valueize, _q50);
14242 : 176 : tree _q51 = gimple_assign_rhs2 (_a2);
14243 : 176 : _q51 = do_valueize (valueize, _q51);
14244 : 176 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14245 : : {
14246 : 20 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14247 : : {
14248 : 20 : {
14249 : 20 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14250 : 20 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, GT_EXPR, EQ_EXPR))
14251 : 20 : return true;
14252 : : }
14253 : : }
14254 : : }
14255 : : break;
14256 : : }
14257 : : default:;
14258 : : }
14259 : : }
14260 : : break;
14261 : : default:;
14262 : : }
14263 : : break;
14264 : : }
14265 : 1349 : case GE_EXPR:
14266 : 1349 : {
14267 : 1349 : tree _q20 = gimple_assign_rhs1 (_a1);
14268 : 1349 : _q20 = do_valueize (valueize, _q20);
14269 : 1349 : tree _q21 = gimple_assign_rhs2 (_a1);
14270 : 1349 : _q21 = do_valueize (valueize, _q21);
14271 : 1349 : switch (TREE_CODE (_p1))
14272 : : {
14273 : 1082 : case SSA_NAME:
14274 : 1082 : if (gimple *_d2 = get_def (valueize, _p1))
14275 : : {
14276 : 1066 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14277 : 983 : switch (gimple_assign_rhs_code (_a2))
14278 : : {
14279 : 100 : case GE_EXPR:
14280 : 100 : {
14281 : 100 : tree _q50 = gimple_assign_rhs1 (_a2);
14282 : 100 : _q50 = do_valueize (valueize, _q50);
14283 : 100 : tree _q51 = gimple_assign_rhs2 (_a2);
14284 : 100 : _q51 = do_valueize (valueize, _q51);
14285 : 100 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14286 : : {
14287 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14288 : : {
14289 : 0 : {
14290 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14291 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, GE_EXPR, EQ_EXPR))
14292 : 0 : return true;
14293 : : }
14294 : 0 : {
14295 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14296 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, GE_EXPR, EQ_EXPR))
14297 : 0 : return true;
14298 : : }
14299 : : }
14300 : : }
14301 : : break;
14302 : : }
14303 : 349 : case EQ_EXPR:
14304 : 349 : {
14305 : 349 : tree _q50 = gimple_assign_rhs1 (_a2);
14306 : 349 : _q50 = do_valueize (valueize, _q50);
14307 : 349 : tree _q51 = gimple_assign_rhs2 (_a2);
14308 : 349 : _q51 = do_valueize (valueize, _q51);
14309 : 349 : if (tree_swap_operands_p (_q50, _q51))
14310 : 20 : std::swap (_q50, _q51);
14311 : 349 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14312 : : {
14313 : 20 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14314 : : {
14315 : 20 : {
14316 : 20 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14317 : 20 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, EQ_EXPR, GE_EXPR))
14318 : 20 : return true;
14319 : : }
14320 : : }
14321 : : }
14322 : 77362175 : break;
14323 : : }
14324 : 209 : case NE_EXPR:
14325 : 209 : {
14326 : 209 : tree _q50 = gimple_assign_rhs1 (_a2);
14327 : 209 : _q50 = do_valueize (valueize, _q50);
14328 : 209 : tree _q51 = gimple_assign_rhs2 (_a2);
14329 : 209 : _q51 = do_valueize (valueize, _q51);
14330 : 209 : if (tree_swap_operands_p (_q50, _q51))
14331 : 20 : std::swap (_q50, _q51);
14332 : 209 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14333 : : {
14334 : 20 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14335 : : {
14336 : 20 : {
14337 : 20 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14338 : 20 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, NE_EXPR, LT_EXPR))
14339 : 20 : return true;
14340 : : }
14341 : : }
14342 : : }
14343 : 77362175 : break;
14344 : : }
14345 : 42 : case LE_EXPR:
14346 : 42 : {
14347 : 42 : tree _q50 = gimple_assign_rhs1 (_a2);
14348 : 42 : _q50 = do_valueize (valueize, _q50);
14349 : 42 : tree _q51 = gimple_assign_rhs2 (_a2);
14350 : 42 : _q51 = do_valueize (valueize, _q51);
14351 : 42 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14352 : : {
14353 : 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14354 : : {
14355 : 14 : {
14356 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14357 : 14 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, GE_EXPR, EQ_EXPR))
14358 : 14 : return true;
14359 : : }
14360 : : }
14361 : : }
14362 : : break;
14363 : : }
14364 : : default:;
14365 : : }
14366 : : }
14367 : : break;
14368 : : default:;
14369 : : }
14370 : : break;
14371 : : }
14372 : 18001 : case EQ_EXPR:
14373 : 18001 : {
14374 : 18001 : tree _q20 = gimple_assign_rhs1 (_a1);
14375 : 18001 : _q20 = do_valueize (valueize, _q20);
14376 : 18001 : tree _q21 = gimple_assign_rhs2 (_a1);
14377 : 18001 : _q21 = do_valueize (valueize, _q21);
14378 : 18001 : if (tree_swap_operands_p (_q20, _q21))
14379 : 557 : std::swap (_q20, _q21);
14380 : 18001 : switch (TREE_CODE (_p1))
14381 : : {
14382 : 16113 : case SSA_NAME:
14383 : 16113 : if (gimple *_d2 = get_def (valueize, _p1))
14384 : : {
14385 : 15913 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14386 : 11940 : switch (gimple_assign_rhs_code (_a2))
14387 : : {
14388 : 0 : case LT_EXPR:
14389 : 0 : {
14390 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
14391 : 0 : _q50 = do_valueize (valueize, _q50);
14392 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
14393 : 0 : _q51 = do_valueize (valueize, _q51);
14394 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14395 : : {
14396 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14397 : : {
14398 : 0 : {
14399 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14400 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, EQ_EXPR, GT_EXPR))
14401 : 0 : return true;
14402 : : }
14403 : : }
14404 : : }
14405 : : break;
14406 : : }
14407 : 0 : case LE_EXPR:
14408 : 0 : {
14409 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
14410 : 0 : _q50 = do_valueize (valueize, _q50);
14411 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
14412 : 0 : _q51 = do_valueize (valueize, _q51);
14413 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14414 : : {
14415 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14416 : : {
14417 : 0 : {
14418 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14419 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, EQ_EXPR, GE_EXPR))
14420 : 0 : return true;
14421 : : }
14422 : : }
14423 : : }
14424 : : break;
14425 : : }
14426 : 308 : case GT_EXPR:
14427 : 308 : {
14428 : 308 : tree _q50 = gimple_assign_rhs1 (_a2);
14429 : 308 : _q50 = do_valueize (valueize, _q50);
14430 : 308 : tree _q51 = gimple_assign_rhs2 (_a2);
14431 : 308 : _q51 = do_valueize (valueize, _q51);
14432 : 308 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14433 : : {
14434 : 17 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14435 : : {
14436 : 17 : {
14437 : 17 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14438 : 17 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, EQ_EXPR, GT_EXPR))
14439 : 17 : return true;
14440 : : }
14441 : : }
14442 : : }
14443 : : break;
14444 : : }
14445 : 566 : case GE_EXPR:
14446 : 566 : {
14447 : 566 : tree _q50 = gimple_assign_rhs1 (_a2);
14448 : 566 : _q50 = do_valueize (valueize, _q50);
14449 : 566 : tree _q51 = gimple_assign_rhs2 (_a2);
14450 : 566 : _q51 = do_valueize (valueize, _q51);
14451 : 566 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14452 : : {
14453 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14454 : : {
14455 : 0 : {
14456 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14457 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, EQ_EXPR, GE_EXPR))
14458 : 0 : return true;
14459 : : }
14460 : : }
14461 : : }
14462 : : break;
14463 : : }
14464 : : default:;
14465 : : }
14466 : : }
14467 : : break;
14468 : : default:;
14469 : : }
14470 : 77362175 : break;
14471 : : }
14472 : 8952 : case NE_EXPR:
14473 : 8952 : {
14474 : 8952 : tree _q20 = gimple_assign_rhs1 (_a1);
14475 : 8952 : _q20 = do_valueize (valueize, _q20);
14476 : 8952 : tree _q21 = gimple_assign_rhs2 (_a1);
14477 : 8952 : _q21 = do_valueize (valueize, _q21);
14478 : 8952 : if (tree_swap_operands_p (_q20, _q21))
14479 : 93 : std::swap (_q20, _q21);
14480 : 8952 : switch (TREE_CODE (_p1))
14481 : : {
14482 : 829 : case SSA_NAME:
14483 : 829 : if (gimple *_d2 = get_def (valueize, _p1))
14484 : : {
14485 : 806 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14486 : 782 : switch (gimple_assign_rhs_code (_a2))
14487 : : {
14488 : 0 : case LT_EXPR:
14489 : 0 : {
14490 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
14491 : 0 : _q50 = do_valueize (valueize, _q50);
14492 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
14493 : 0 : _q51 = do_valueize (valueize, _q51);
14494 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14495 : : {
14496 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14497 : : {
14498 : 0 : {
14499 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14500 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, NE_EXPR, LE_EXPR))
14501 : 0 : return true;
14502 : : }
14503 : : }
14504 : : }
14505 : : break;
14506 : : }
14507 : 0 : case LE_EXPR:
14508 : 0 : {
14509 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
14510 : 0 : _q50 = do_valueize (valueize, _q50);
14511 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
14512 : 0 : _q51 = do_valueize (valueize, _q51);
14513 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14514 : : {
14515 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14516 : : {
14517 : 0 : {
14518 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14519 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, NE_EXPR, LT_EXPR))
14520 : 0 : return true;
14521 : : }
14522 : : }
14523 : : }
14524 : : break;
14525 : : }
14526 : 68 : case GT_EXPR:
14527 : 68 : {
14528 : 68 : tree _q50 = gimple_assign_rhs1 (_a2);
14529 : 68 : _q50 = do_valueize (valueize, _q50);
14530 : 68 : tree _q51 = gimple_assign_rhs2 (_a2);
14531 : 68 : _q51 = do_valueize (valueize, _q51);
14532 : 68 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14533 : : {
14534 : 17 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14535 : : {
14536 : 17 : {
14537 : 17 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14538 : 17 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LT_EXPR, NE_EXPR, LE_EXPR))
14539 : 17 : return true;
14540 : : }
14541 : : }
14542 : : }
14543 : : break;
14544 : : }
14545 : 6 : case GE_EXPR:
14546 : 6 : {
14547 : 6 : tree _q50 = gimple_assign_rhs1 (_a2);
14548 : 6 : _q50 = do_valueize (valueize, _q50);
14549 : 6 : tree _q51 = gimple_assign_rhs2 (_a2);
14550 : 6 : _q51 = do_valueize (valueize, _q51);
14551 : 6 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14552 : : {
14553 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14554 : : {
14555 : 0 : {
14556 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14557 : 0 : if (gimple_simplify_243 (res_op, seq, valueize, type, captures, LE_EXPR, NE_EXPR, LT_EXPR))
14558 : 0 : return true;
14559 : : }
14560 : : }
14561 : : }
14562 : : break;
14563 : : }
14564 : : default:;
14565 : : }
14566 : : }
14567 : : break;
14568 : : default:;
14569 : : }
14570 : 77362175 : break;
14571 : : }
14572 : 57975 : case MIN_EXPR:
14573 : 57975 : {
14574 : 57975 : tree _q20 = gimple_assign_rhs1 (_a1);
14575 : 57975 : _q20 = do_valueize (valueize, _q20);
14576 : 57975 : tree _q21 = gimple_assign_rhs2 (_a1);
14577 : 57975 : _q21 = do_valueize (valueize, _q21);
14578 : 57975 : if (tree_swap_operands_p (_q20, _q21))
14579 : 7417 : std::swap (_q20, _q21);
14580 : 57975 : switch (TREE_CODE (_p1))
14581 : : {
14582 : 4506 : case SSA_NAME:
14583 : 4506 : if (gimple *_d2 = get_def (valueize, _p1))
14584 : : {
14585 : 4494 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14586 : 4790 : switch (gimple_assign_rhs_code (_a2))
14587 : : {
14588 : 0 : case MAX_EXPR:
14589 : 0 : {
14590 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
14591 : 0 : _q50 = do_valueize (valueize, _q50);
14592 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
14593 : 0 : _q51 = do_valueize (valueize, _q51);
14594 : 0 : if (tree_swap_operands_p (_q50, _q51))
14595 : 0 : std::swap (_q50, _q51);
14596 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14597 : : {
14598 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14599 : : {
14600 : 0 : {
14601 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14602 : 0 : if (!HONOR_NANS (captures[0])
14603 : : )
14604 : : {
14605 : 0 : gimple_seq *lseq = seq;
14606 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2340;
14607 : 0 : {
14608 : 0 : res_op->set_op (EQ_EXPR, type, 2);
14609 : 0 : res_op->ops[0] = captures[0];
14610 : 0 : res_op->ops[1] = captures[1];
14611 : 0 : res_op->resimplify (lseq, valueize);
14612 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1034, __FILE__, __LINE__, true);
14613 : 0 : return true;
14614 : : }
14615 : 0 : next_after_fail2340:;
14616 : : }
14617 : : }
14618 : : }
14619 : : }
14620 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14621 : : {
14622 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14623 : : {
14624 : 0 : {
14625 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14626 : 0 : if (!HONOR_NANS (captures[0])
14627 : : )
14628 : : {
14629 : 0 : gimple_seq *lseq = seq;
14630 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2341;
14631 : 0 : {
14632 : 0 : res_op->set_op (EQ_EXPR, type, 2);
14633 : 0 : res_op->ops[0] = captures[0];
14634 : 0 : res_op->ops[1] = captures[1];
14635 : 0 : res_op->resimplify (lseq, valueize);
14636 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1034, __FILE__, __LINE__, true);
14637 : 0 : return true;
14638 : : }
14639 : 0 : next_after_fail2341:;
14640 : : }
14641 : : }
14642 : : }
14643 : : }
14644 : 57975 : break;
14645 : : }
14646 : : default:;
14647 : : }
14648 : : }
14649 : : break;
14650 : 57975 : default:;
14651 : : }
14652 : 57975 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
14653 : : {
14654 : 50 : {
14655 : 50 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14656 : 50 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MIN_EXPR, EQ_EXPR, LE_EXPR))
14657 : 50 : return true;
14658 : : }
14659 : : }
14660 : 57925 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
14661 : : {
14662 : 206 : {
14663 : 206 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14664 : 206 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MIN_EXPR, EQ_EXPR, LE_EXPR))
14665 : 206 : return true;
14666 : : }
14667 : : }
14668 : 77362175 : break;
14669 : : }
14670 : 6661 : case MAX_EXPR:
14671 : 6661 : {
14672 : 6661 : tree _q20 = gimple_assign_rhs1 (_a1);
14673 : 6661 : _q20 = do_valueize (valueize, _q20);
14674 : 6661 : tree _q21 = gimple_assign_rhs2 (_a1);
14675 : 6661 : _q21 = do_valueize (valueize, _q21);
14676 : 6661 : if (tree_swap_operands_p (_q20, _q21))
14677 : 91 : std::swap (_q20, _q21);
14678 : 6661 : switch (TREE_CODE (_p1))
14679 : : {
14680 : 447 : case SSA_NAME:
14681 : 447 : if (gimple *_d2 = get_def (valueize, _p1))
14682 : : {
14683 : 425 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14684 : 531 : switch (gimple_assign_rhs_code (_a2))
14685 : : {
14686 : 2 : case MIN_EXPR:
14687 : 2 : {
14688 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
14689 : 2 : _q50 = do_valueize (valueize, _q50);
14690 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
14691 : 2 : _q51 = do_valueize (valueize, _q51);
14692 : 2 : if (tree_swap_operands_p (_q50, _q51))
14693 : 0 : std::swap (_q50, _q51);
14694 : 2 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14695 : : {
14696 : 2 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14697 : : {
14698 : 2 : {
14699 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14700 : 2 : if (!HONOR_NANS (captures[0])
14701 : : )
14702 : : {
14703 : 2 : gimple_seq *lseq = seq;
14704 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2342;
14705 : 2 : {
14706 : 2 : res_op->set_op (EQ_EXPR, type, 2);
14707 : 2 : res_op->ops[0] = captures[0];
14708 : 2 : res_op->ops[1] = captures[1];
14709 : 2 : res_op->resimplify (lseq, valueize);
14710 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1034, __FILE__, __LINE__, true);
14711 : 2 : return true;
14712 : : }
14713 : 0 : next_after_fail2342:;
14714 : : }
14715 : : }
14716 : : }
14717 : : }
14718 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14719 : : {
14720 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14721 : : {
14722 : 0 : {
14723 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14724 : 0 : if (!HONOR_NANS (captures[0])
14725 : : )
14726 : : {
14727 : 0 : gimple_seq *lseq = seq;
14728 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2343;
14729 : 0 : {
14730 : 0 : res_op->set_op (EQ_EXPR, type, 2);
14731 : 0 : res_op->ops[0] = captures[0];
14732 : 0 : res_op->ops[1] = captures[1];
14733 : 0 : res_op->resimplify (lseq, valueize);
14734 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1034, __FILE__, __LINE__, true);
14735 : 0 : return true;
14736 : : }
14737 : 0 : next_after_fail2343:;
14738 : : }
14739 : : }
14740 : : }
14741 : : }
14742 : 6659 : break;
14743 : : }
14744 : : default:;
14745 : : }
14746 : : }
14747 : : break;
14748 : 6659 : default:;
14749 : : }
14750 : 6659 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
14751 : : {
14752 : 0 : {
14753 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14754 : 0 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MAX_EXPR, EQ_EXPR, GE_EXPR))
14755 : 0 : return true;
14756 : : }
14757 : : }
14758 : 6659 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
14759 : : {
14760 : 5272 : {
14761 : 5272 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14762 : 5272 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MAX_EXPR, EQ_EXPR, GE_EXPR))
14763 : 5267 : return true;
14764 : : }
14765 : : }
14766 : 77362175 : break;
14767 : : }
14768 : : default:;
14769 : : }
14770 : : }
14771 : : break;
14772 : 77362175 : default:;
14773 : : }
14774 : 77362175 : if (gimple_with_possible_nonzero_bits (_p0, valueize))
14775 : : {
14776 : 75873424 : if (gimple_with_known_nonzero_bits (_p1, valueize))
14777 : : {
14778 : 65193730 : {
14779 : 65193730 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
14780 : 65193730 : if (gimple_simplify_242 (res_op, seq, valueize, type, captures, EQ_EXPR))
14781 : 8631 : return true;
14782 : : }
14783 : : }
14784 : : }
14785 : 77353544 : if (gimple_with_known_nonzero_bits (_p0, valueize))
14786 : : {
14787 : 56631520 : if (gimple_with_possible_nonzero_bits (_p1, valueize))
14788 : : {
14789 : 56631520 : {
14790 : 56631520 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
14791 : 56631520 : if (gimple_simplify_242 (res_op, seq, valueize, type, captures, EQ_EXPR))
14792 : 780 : return true;
14793 : : }
14794 : : }
14795 : : }
14796 : 77352764 : switch (TREE_CODE (_p1))
14797 : : {
14798 : 12515398 : case SSA_NAME:
14799 : 12515398 : if (gimple *_d1 = get_def (valueize, _p1))
14800 : : {
14801 : 4180920 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14802 : 6115571 : switch (gimple_assign_rhs_code (_a1))
14803 : : {
14804 : 1621 : case MIN_EXPR:
14805 : 1621 : {
14806 : 1621 : tree _q30 = gimple_assign_rhs1 (_a1);
14807 : 1621 : _q30 = do_valueize (valueize, _q30);
14808 : 1621 : tree _q31 = gimple_assign_rhs2 (_a1);
14809 : 1621 : _q31 = do_valueize (valueize, _q31);
14810 : 1621 : if (tree_swap_operands_p (_q30, _q31))
14811 : 286 : std::swap (_q30, _q31);
14812 : 1621 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
14813 : : {
14814 : 23 : {
14815 : 23 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
14816 : 23 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MIN_EXPR, EQ_EXPR, LE_EXPR))
14817 : 23 : return true;
14818 : : }
14819 : : }
14820 : 1598 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
14821 : : {
14822 : 30 : {
14823 : 30 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
14824 : 30 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MIN_EXPR, EQ_EXPR, LE_EXPR))
14825 : 30 : return true;
14826 : : }
14827 : : }
14828 : 77352697 : break;
14829 : : }
14830 : 464 : case MAX_EXPR:
14831 : 464 : {
14832 : 464 : tree _q30 = gimple_assign_rhs1 (_a1);
14833 : 464 : _q30 = do_valueize (valueize, _q30);
14834 : 464 : tree _q31 = gimple_assign_rhs2 (_a1);
14835 : 464 : _q31 = do_valueize (valueize, _q31);
14836 : 464 : if (tree_swap_operands_p (_q30, _q31))
14837 : 4 : std::swap (_q30, _q31);
14838 : 464 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
14839 : : {
14840 : 0 : {
14841 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
14842 : 0 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MAX_EXPR, EQ_EXPR, GE_EXPR))
14843 : 0 : return true;
14844 : : }
14845 : : }
14846 : 464 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
14847 : : {
14848 : 14 : {
14849 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
14850 : 14 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, MAX_EXPR, EQ_EXPR, GE_EXPR))
14851 : 14 : return true;
14852 : : }
14853 : : }
14854 : 77352697 : break;
14855 : : }
14856 : : default:;
14857 : : }
14858 : : }
14859 : : break;
14860 : 77352697 : default:;
14861 : : }
14862 : 77352697 : switch (TREE_CODE (_p0))
14863 : : {
14864 : 76526882 : case SSA_NAME:
14865 : 76526882 : if (gimple *_d1 = get_def (valueize, _p0))
14866 : : {
14867 : 26298441 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14868 : 31904764 : switch (gimple_assign_rhs_code (_a1))
14869 : : {
14870 : 57713 : case MIN_EXPR:
14871 : 57713 : {
14872 : 57713 : tree _q20 = gimple_assign_rhs1 (_a1);
14873 : 57713 : _q20 = do_valueize (valueize, _q20);
14874 : 57713 : tree _q21 = gimple_assign_rhs2 (_a1);
14875 : 57713 : _q21 = do_valueize (valueize, _q21);
14876 : 57713 : if (tree_swap_operands_p (_q20, _q21))
14877 : 7380 : std::swap (_q20, _q21);
14878 : 57713 : switch (TREE_CODE (_q21))
14879 : : {
14880 : 5021 : case INTEGER_CST:
14881 : 5021 : {
14882 : 5021 : switch (TREE_CODE (_p1))
14883 : : {
14884 : 4807 : case INTEGER_CST:
14885 : 4807 : {
14886 : 4807 : {
14887 : 4807 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14888 : 4807 : if (gimple_simplify_245 (res_op, seq, valueize, type, captures, EQ_EXPR))
14889 : 4807 : return true;
14890 : : }
14891 : 0 : break;
14892 : : }
14893 : : default:;
14894 : : }
14895 : : break;
14896 : : }
14897 : : default:;
14898 : : }
14899 : 77347134 : break;
14900 : : }
14901 : 1392 : case MAX_EXPR:
14902 : 1392 : {
14903 : 1392 : tree _q20 = gimple_assign_rhs1 (_a1);
14904 : 1392 : _q20 = do_valueize (valueize, _q20);
14905 : 1392 : tree _q21 = gimple_assign_rhs2 (_a1);
14906 : 1392 : _q21 = do_valueize (valueize, _q21);
14907 : 1392 : if (tree_swap_operands_p (_q20, _q21))
14908 : 91 : std::swap (_q20, _q21);
14909 : 1392 : switch (TREE_CODE (_q21))
14910 : : {
14911 : 608 : case INTEGER_CST:
14912 : 608 : {
14913 : 608 : switch (TREE_CODE (_p1))
14914 : : {
14915 : 179 : case INTEGER_CST:
14916 : 179 : {
14917 : 179 : {
14918 : 179 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14919 : 179 : if (gimple_simplify_246 (res_op, seq, valueize, type, captures, EQ_EXPR))
14920 : 179 : return true;
14921 : : }
14922 : 0 : break;
14923 : : }
14924 : : default:;
14925 : : }
14926 : : break;
14927 : : }
14928 : 1213 : default:;
14929 : : }
14930 : 1213 : if (integer_zerop (_p1))
14931 : : {
14932 : 120 : {
14933 : 120 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14934 : 120 : if (gimple_simplify_247 (res_op, seq, valueize, type, captures, EQ_EXPR))
14935 : 30 : return true;
14936 : : }
14937 : : }
14938 : 77347134 : break;
14939 : : }
14940 : 1189962 : case BIT_AND_EXPR:
14941 : 1189962 : {
14942 : 1189962 : tree _q20 = gimple_assign_rhs1 (_a1);
14943 : 1189962 : _q20 = do_valueize (valueize, _q20);
14944 : 1189962 : tree _q21 = gimple_assign_rhs2 (_a1);
14945 : 1189962 : _q21 = do_valueize (valueize, _q21);
14946 : 1189962 : if (tree_swap_operands_p (_q20, _q21))
14947 : 5768 : std::swap (_q20, _q21);
14948 : 1189962 : switch (TREE_CODE (_q20))
14949 : : {
14950 : 1189962 : case SSA_NAME:
14951 : 1189962 : if (gimple *_d2 = get_def (valueize, _q20))
14952 : : {
14953 : 1143733 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14954 : 1643838 : switch (gimple_assign_rhs_code (_a2))
14955 : : {
14956 : 1730 : case LSHIFT_EXPR:
14957 : 1730 : {
14958 : 1730 : tree _q30 = gimple_assign_rhs1 (_a2);
14959 : 1730 : _q30 = do_valueize (valueize, _q30);
14960 : 1730 : tree _q31 = gimple_assign_rhs2 (_a2);
14961 : 1730 : _q31 = do_valueize (valueize, _q31);
14962 : 1730 : if (integer_pow2p (_q30))
14963 : : {
14964 : 1263 : if (integer_pow2p (_q21))
14965 : : {
14966 : 1 : if (integer_zerop (_p1))
14967 : : {
14968 : 1 : {
14969 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q21 };
14970 : 1 : if (gimple_simplify_248 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR))
14971 : 1 : return true;
14972 : : }
14973 : : }
14974 : : }
14975 : : }
14976 : 1729 : switch (TREE_CODE (_q31))
14977 : : {
14978 : 423 : case INTEGER_CST:
14979 : 423 : {
14980 : 423 : switch (TREE_CODE (_q21))
14981 : : {
14982 : 423 : case INTEGER_CST:
14983 : 423 : {
14984 : 423 : switch (TREE_CODE (_p1))
14985 : : {
14986 : 423 : case INTEGER_CST:
14987 : 423 : {
14988 : 423 : {
14989 : 423 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1 };
14990 : 423 : if (gimple_simplify_249 (res_op, seq, valueize, type, captures, EQ_EXPR))
14991 : 15 : return true;
14992 : : }
14993 : 408 : break;
14994 : : }
14995 : : default:;
14996 : : }
14997 : : break;
14998 : : }
14999 : : default:;
15000 : : }
15001 : : break;
15002 : : }
15003 : 1714 : default:;
15004 : : }
15005 : 1714 : if (integer_onep (_q30))
15006 : : {
15007 : 1264 : if (integer_pow2p (_q21))
15008 : : {
15009 : 0 : if (integer_zerop (_p1))
15010 : : {
15011 : 0 : {
15012 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q21 };
15013 : 0 : if (gimple_simplify_250 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR))
15014 : 0 : return true;
15015 : : }
15016 : : }
15017 : : }
15018 : : }
15019 : : break;
15020 : : }
15021 : 22203 : case RSHIFT_EXPR:
15022 : 22203 : {
15023 : 22203 : tree _q30 = gimple_assign_rhs1 (_a2);
15024 : 22203 : _q30 = do_valueize (valueize, _q30);
15025 : 22203 : tree _q31 = gimple_assign_rhs2 (_a2);
15026 : 22203 : _q31 = do_valueize (valueize, _q31);
15027 : 22203 : if (integer_pow2p (_q30))
15028 : : {
15029 : 10 : if (integer_pow2p (_q21))
15030 : : {
15031 : 10 : if (integer_zerop (_p1))
15032 : : {
15033 : 10 : {
15034 : 10 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q21 };
15035 : 10 : if (gimple_simplify_251 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR))
15036 : 10 : return true;
15037 : : }
15038 : : }
15039 : : }
15040 : : }
15041 : 22193 : switch (TREE_CODE (_q31))
15042 : : {
15043 : 5758 : case INTEGER_CST:
15044 : 5758 : {
15045 : 5758 : switch (TREE_CODE (_q21))
15046 : : {
15047 : 5716 : case INTEGER_CST:
15048 : 5716 : {
15049 : 5716 : switch (TREE_CODE (_p1))
15050 : : {
15051 : 5716 : case INTEGER_CST:
15052 : 5716 : {
15053 : 5716 : {
15054 : 5716 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1 };
15055 : 5716 : if (gimple_simplify_252 (res_op, seq, valueize, type, captures, EQ_EXPR))
15056 : 432 : return true;
15057 : : }
15058 : 5284 : break;
15059 : : }
15060 : : default:;
15061 : : }
15062 : : break;
15063 : : }
15064 : : default:;
15065 : : }
15066 : : break;
15067 : : }
15068 : : default:;
15069 : : }
15070 : : break;
15071 : : }
15072 : : default:;
15073 : : }
15074 : : }
15075 : : break;
15076 : 1189504 : default:;
15077 : : }
15078 : 1189504 : {
15079 : 1189504 : tree _q20_pops[1];
15080 : 1189504 : if (gimple_nop_convert (_q20, _q20_pops, valueize))
15081 : : {
15082 : 15770 : tree _q30 = _q20_pops[0];
15083 : 15770 : switch (TREE_CODE (_q30))
15084 : : {
15085 : 15648 : case SSA_NAME:
15086 : 15648 : if (gimple *_d2 = get_def (valueize, _q30))
15087 : : {
15088 : 15313 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15089 : 14780 : switch (gimple_assign_rhs_code (_a2))
15090 : : {
15091 : 1381 : case LSHIFT_EXPR:
15092 : 1381 : {
15093 : 1381 : tree _q40 = gimple_assign_rhs1 (_a2);
15094 : 1381 : _q40 = do_valueize (valueize, _q40);
15095 : 1381 : tree _q41 = gimple_assign_rhs2 (_a2);
15096 : 1381 : _q41 = do_valueize (valueize, _q41);
15097 : 1381 : if (integer_onep (_q40))
15098 : : {
15099 : 1381 : if (integer_pow2p (_q21))
15100 : : {
15101 : 2 : if (integer_zerop (_p1))
15102 : : {
15103 : 2 : {
15104 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q41, _q21 };
15105 : 2 : if (gimple_simplify_250 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR))
15106 : 2 : return true;
15107 : : }
15108 : : }
15109 : : }
15110 : : }
15111 : : break;
15112 : : }
15113 : : default:;
15114 : : }
15115 : : }
15116 : : break;
15117 : : default:;
15118 : : }
15119 : : }
15120 : : }
15121 : 1189502 : break;
15122 : : }
15123 : 4292 : case LSHIFT_EXPR:
15124 : 4292 : {
15125 : 4292 : tree _q20 = gimple_assign_rhs1 (_a1);
15126 : 4292 : _q20 = do_valueize (valueize, _q20);
15127 : 4292 : tree _q21 = gimple_assign_rhs2 (_a1);
15128 : 4292 : _q21 = do_valueize (valueize, _q21);
15129 : 4292 : switch (TREE_CODE (_q20))
15130 : : {
15131 : 586 : case INTEGER_CST:
15132 : 586 : {
15133 : 586 : switch (TREE_CODE (_p1))
15134 : : {
15135 : 147 : case INTEGER_CST:
15136 : 147 : {
15137 : 147 : {
15138 : 147 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15139 : 147 : if (gimple_simplify_253 (res_op, seq, valueize, type, captures, EQ_EXPR))
15140 : 75 : return true;
15141 : : }
15142 : 72 : break;
15143 : : }
15144 : : default:;
15145 : : }
15146 : : break;
15147 : : }
15148 : : default:;
15149 : : }
15150 : : break;
15151 : : }
15152 : 0 : case LROTATE_EXPR:
15153 : 0 : {
15154 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
15155 : 0 : _q20 = do_valueize (valueize, _q20);
15156 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
15157 : 0 : _q21 = do_valueize (valueize, _q21);
15158 : 0 : switch (TREE_CODE (_p1))
15159 : : {
15160 : 0 : case SSA_NAME:
15161 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15162 : : {
15163 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15164 : 0 : switch (gimple_assign_rhs_code (_a2))
15165 : : {
15166 : 0 : case LROTATE_EXPR:
15167 : 0 : {
15168 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
15169 : 0 : _q50 = do_valueize (valueize, _q50);
15170 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
15171 : 0 : _q51 = do_valueize (valueize, _q51);
15172 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
15173 : : {
15174 : 0 : {
15175 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
15176 : 0 : if (gimple_simplify_254 (res_op, seq, valueize, type, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR))
15177 : 0 : return true;
15178 : : }
15179 : : }
15180 : : break;
15181 : : }
15182 : : default:;
15183 : : }
15184 : : }
15185 : : break;
15186 : 0 : default:;
15187 : : }
15188 : 0 : switch (TREE_CODE (_q21))
15189 : : {
15190 : 0 : case INTEGER_CST:
15191 : 0 : {
15192 : 0 : switch (TREE_CODE (_p1))
15193 : : {
15194 : 0 : case INTEGER_CST:
15195 : 0 : {
15196 : 0 : {
15197 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15198 : 0 : if (gimple_simplify_255 (res_op, seq, valueize, type, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR))
15199 : 0 : return true;
15200 : : }
15201 : 0 : break;
15202 : : }
15203 : : default:;
15204 : : }
15205 : : break;
15206 : : }
15207 : 0 : default:;
15208 : : }
15209 : 0 : switch (TREE_CODE (_p1))
15210 : : {
15211 : 0 : case INTEGER_CST:
15212 : 0 : {
15213 : 0 : {
15214 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15215 : 0 : if (gimple_simplify_256 (res_op, seq, valueize, type, captures, LROTATE_EXPR, RROTATE_EXPR, EQ_EXPR))
15216 : 0 : return true;
15217 : : }
15218 : 0 : break;
15219 : : }
15220 : : default:;
15221 : : }
15222 : : break;
15223 : : }
15224 : 44 : case RROTATE_EXPR:
15225 : 44 : {
15226 : 44 : tree _q20 = gimple_assign_rhs1 (_a1);
15227 : 44 : _q20 = do_valueize (valueize, _q20);
15228 : 44 : tree _q21 = gimple_assign_rhs2 (_a1);
15229 : 44 : _q21 = do_valueize (valueize, _q21);
15230 : 44 : switch (TREE_CODE (_p1))
15231 : : {
15232 : 38 : case SSA_NAME:
15233 : 38 : if (gimple *_d2 = get_def (valueize, _p1))
15234 : : {
15235 : 38 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15236 : 74 : switch (gimple_assign_rhs_code (_a2))
15237 : : {
15238 : 2 : case RROTATE_EXPR:
15239 : 2 : {
15240 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
15241 : 2 : _q50 = do_valueize (valueize, _q50);
15242 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
15243 : 2 : _q51 = do_valueize (valueize, _q51);
15244 : 2 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
15245 : : {
15246 : 2 : {
15247 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
15248 : 2 : if (gimple_simplify_254 (res_op, seq, valueize, type, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR))
15249 : 2 : return true;
15250 : : }
15251 : : }
15252 : : break;
15253 : : }
15254 : : default:;
15255 : : }
15256 : : }
15257 : : break;
15258 : 42 : default:;
15259 : : }
15260 : 42 : switch (TREE_CODE (_q21))
15261 : : {
15262 : 42 : case INTEGER_CST:
15263 : 42 : {
15264 : 42 : switch (TREE_CODE (_p1))
15265 : : {
15266 : 6 : case INTEGER_CST:
15267 : 6 : {
15268 : 6 : {
15269 : 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15270 : 6 : if (gimple_simplify_255 (res_op, seq, valueize, type, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR))
15271 : 6 : return true;
15272 : : }
15273 : 0 : break;
15274 : : }
15275 : : default:;
15276 : : }
15277 : : break;
15278 : : }
15279 : 36 : default:;
15280 : : }
15281 : 36 : switch (TREE_CODE (_p1))
15282 : : {
15283 : 0 : case INTEGER_CST:
15284 : 0 : {
15285 : 0 : {
15286 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15287 : 0 : if (gimple_simplify_256 (res_op, seq, valueize, type, captures, RROTATE_EXPR, LROTATE_EXPR, EQ_EXPR))
15288 : 0 : return true;
15289 : : }
15290 : 0 : break;
15291 : : }
15292 : : default:;
15293 : : }
15294 : : break;
15295 : : }
15296 : 94126 : case MULT_EXPR:
15297 : 94126 : {
15298 : 94126 : tree _q20 = gimple_assign_rhs1 (_a1);
15299 : 94126 : _q20 = do_valueize (valueize, _q20);
15300 : 94126 : tree _q21 = gimple_assign_rhs2 (_a1);
15301 : 94126 : _q21 = do_valueize (valueize, _q21);
15302 : 94126 : if (tree_swap_operands_p (_q20, _q21))
15303 : 532 : std::swap (_q20, _q21);
15304 : 94126 : switch (TREE_CODE (_q20))
15305 : : {
15306 : 93966 : case SSA_NAME:
15307 : 93966 : if (gimple *_d2 = get_def (valueize, _q20))
15308 : : {
15309 : 93567 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15310 : 96525 : switch (gimple_assign_rhs_code (_a2))
15311 : : {
15312 : 517 : case TRUNC_DIV_EXPR:
15313 : 517 : {
15314 : 517 : tree _q30 = gimple_assign_rhs1 (_a2);
15315 : 517 : _q30 = do_valueize (valueize, _q30);
15316 : 517 : tree _q31 = gimple_assign_rhs2 (_a2);
15317 : 517 : _q31 = do_valueize (valueize, _q31);
15318 : 517 : if ((_q21 == _q31 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q31, 0) && types_match (_q21, _q31)))
15319 : : {
15320 : 21 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
15321 : : {
15322 : 17 : {
15323 : 17 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
15324 : 17 : if (gimple_simplify_257 (res_op, seq, valueize, type, captures))
15325 : 4 : return true;
15326 : : }
15327 : : }
15328 : : }
15329 : : break;
15330 : : }
15331 : : default:;
15332 : : }
15333 : : }
15334 : : break;
15335 : 94122 : default:;
15336 : : }
15337 : 94122 : switch (TREE_CODE (_q21))
15338 : : {
15339 : 6760 : case SSA_NAME:
15340 : 6760 : if (gimple *_d2 = get_def (valueize, _q21))
15341 : : {
15342 : 6666 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15343 : 5995 : switch (gimple_assign_rhs_code (_a2))
15344 : : {
15345 : 6 : case TRUNC_DIV_EXPR:
15346 : 6 : {
15347 : 6 : tree _q40 = gimple_assign_rhs1 (_a2);
15348 : 6 : _q40 = do_valueize (valueize, _q40);
15349 : 6 : tree _q41 = gimple_assign_rhs2 (_a2);
15350 : 6 : _q41 = do_valueize (valueize, _q41);
15351 : 6 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
15352 : : {
15353 : 3 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
15354 : : {
15355 : 0 : {
15356 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q40, _q20 };
15357 : 0 : if (gimple_simplify_257 (res_op, seq, valueize, type, captures))
15358 : 0 : return true;
15359 : : }
15360 : : }
15361 : : }
15362 : : break;
15363 : : }
15364 : : default:;
15365 : : }
15366 : : }
15367 : : break;
15368 : : default:;
15369 : : }
15370 : 77347134 : break;
15371 : : }
15372 : : default:;
15373 : : }
15374 : : }
15375 : : break;
15376 : 77347134 : default:;
15377 : : }
15378 : 77347134 : switch (TREE_CODE (_p1))
15379 : : {
15380 : 12515325 : case SSA_NAME:
15381 : 12515325 : if (gimple *_d1 = get_def (valueize, _p1))
15382 : : {
15383 : 4180847 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15384 : 6115502 : switch (gimple_assign_rhs_code (_a1))
15385 : : {
15386 : 101922 : case MULT_EXPR:
15387 : 101922 : {
15388 : 101922 : tree _q30 = gimple_assign_rhs1 (_a1);
15389 : 101922 : _q30 = do_valueize (valueize, _q30);
15390 : 101922 : tree _q31 = gimple_assign_rhs2 (_a1);
15391 : 101922 : _q31 = do_valueize (valueize, _q31);
15392 : 101922 : if (tree_swap_operands_p (_q30, _q31))
15393 : 65 : std::swap (_q30, _q31);
15394 : 101922 : switch (TREE_CODE (_q30))
15395 : : {
15396 : 101922 : case SSA_NAME:
15397 : 101922 : if (gimple *_d2 = get_def (valueize, _q30))
15398 : : {
15399 : 101154 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15400 : 102600 : switch (gimple_assign_rhs_code (_a2))
15401 : : {
15402 : 68 : case TRUNC_DIV_EXPR:
15403 : 68 : {
15404 : 68 : tree _q40 = gimple_assign_rhs1 (_a2);
15405 : 68 : _q40 = do_valueize (valueize, _q40);
15406 : 68 : tree _q41 = gimple_assign_rhs2 (_a2);
15407 : 68 : _q41 = do_valueize (valueize, _q41);
15408 : 68 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
15409 : : {
15410 : 36 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q41, 0) && types_match (_q31, _q41)))
15411 : : {
15412 : 36 : {
15413 : 36 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q41 };
15414 : 36 : if (gimple_simplify_257 (res_op, seq, valueize, type, captures))
15415 : 0 : return true;
15416 : : }
15417 : : }
15418 : : }
15419 : : break;
15420 : : }
15421 : : default:;
15422 : : }
15423 : : }
15424 : : break;
15425 : 101922 : default:;
15426 : : }
15427 : 101922 : switch (TREE_CODE (_q31))
15428 : : {
15429 : 3544 : case SSA_NAME:
15430 : 3544 : if (gimple *_d2 = get_def (valueize, _q31))
15431 : : {
15432 : 3509 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15433 : 3190 : switch (gimple_assign_rhs_code (_a2))
15434 : : {
15435 : 43 : case TRUNC_DIV_EXPR:
15436 : 43 : {
15437 : 43 : tree _q50 = gimple_assign_rhs1 (_a2);
15438 : 43 : _q50 = do_valueize (valueize, _q50);
15439 : 43 : tree _q51 = gimple_assign_rhs2 (_a2);
15440 : 43 : _q51 = do_valueize (valueize, _q51);
15441 : 43 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
15442 : : {
15443 : 43 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q30, 0) && types_match (_q51, _q30)))
15444 : : {
15445 : 43 : {
15446 : 43 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _p0, _q30 };
15447 : 43 : if (gimple_simplify_257 (res_op, seq, valueize, type, captures))
15448 : 2 : return true;
15449 : : }
15450 : : }
15451 : : }
15452 : : break;
15453 : : }
15454 : : default:;
15455 : : }
15456 : : }
15457 : : break;
15458 : : default:;
15459 : : }
15460 : 77347132 : break;
15461 : : }
15462 : : default:;
15463 : : }
15464 : : }
15465 : : break;
15466 : 77347132 : default:;
15467 : : }
15468 : 77347132 : switch (TREE_CODE (_p0))
15469 : : {
15470 : 76521317 : case SSA_NAME:
15471 : 76521317 : if (gimple *_d1 = get_def (valueize, _p0))
15472 : : {
15473 : 26292876 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15474 : 31899197 : switch (gimple_assign_rhs_code (_a1))
15475 : : {
15476 : 196 : case VEC_COND_EXPR:
15477 : 196 : {
15478 : 196 : tree _q20 = gimple_assign_rhs1 (_a1);
15479 : 196 : _q20 = do_valueize (valueize, _q20);
15480 : 196 : tree _q21 = gimple_assign_rhs2 (_a1);
15481 : 196 : _q21 = do_valueize (valueize, _q21);
15482 : 196 : tree _q22 = gimple_assign_rhs3 (_a1);
15483 : 196 : _q22 = do_valueize (valueize, _q22);
15484 : 196 : switch (TREE_CODE (_p1))
15485 : : {
15486 : 147 : case SSA_NAME:
15487 : 147 : if (gimple *_d2 = get_def (valueize, _p1))
15488 : : {
15489 : 147 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15490 : 200 : switch (gimple_assign_rhs_code (_a2))
15491 : : {
15492 : 94 : case VEC_COND_EXPR:
15493 : 94 : {
15494 : 94 : tree _q60 = gimple_assign_rhs1 (_a2);
15495 : 94 : _q60 = do_valueize (valueize, _q60);
15496 : 94 : tree _q61 = gimple_assign_rhs2 (_a2);
15497 : 94 : _q61 = do_valueize (valueize, _q61);
15498 : 94 : tree _q62 = gimple_assign_rhs3 (_a2);
15499 : 94 : _q62 = do_valueize (valueize, _q62);
15500 : 94 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
15501 : : {
15502 : 0 : {
15503 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
15504 : 0 : if (VECTOR_TYPE_P (type)
15505 : 0 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
15506 : 0 : || types_match (type, TREE_TYPE (captures[2]))
15507 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
15508 : : || (optimize_vectors_before_lowering_p ()
15509 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
15510 : : )
15511 : : {
15512 : 0 : gimple_seq *lseq = seq;
15513 : 0 : if (lseq
15514 : 0 : && (!single_use (captures[0])
15515 : 0 : || !single_use (captures[4])))
15516 : 0 : lseq = NULL;
15517 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2344;
15518 : 0 : {
15519 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
15520 : 0 : res_op->ops[0] = captures[1];
15521 : 0 : {
15522 : 0 : tree _o1[2], _r1;
15523 : 0 : _o1[0] = captures[2];
15524 : 0 : _o1[1] = captures[5];
15525 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o1[0], _o1[1]);
15526 : 0 : tem_op.resimplify (NULL, valueize);
15527 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
15528 : 0 : if (!_r1) goto next_after_fail2344;
15529 : 0 : res_op->ops[1] = _r1;
15530 : : }
15531 : 0 : {
15532 : 0 : tree _o1[2], _r1;
15533 : 0 : _o1[0] = captures[3];
15534 : 0 : _o1[1] = captures[6];
15535 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o1[0], _o1[1]);
15536 : 0 : tem_op.resimplify (NULL, valueize);
15537 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
15538 : 0 : if (!_r1) goto next_after_fail2344;
15539 : 0 : res_op->ops[2] = _r1;
15540 : : }
15541 : 0 : res_op->resimplify (lseq, valueize);
15542 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
15543 : 0 : return true;
15544 : : }
15545 : 0 : next_after_fail2344:;
15546 : : }
15547 : : }
15548 : : }
15549 : : break;
15550 : : }
15551 : : default:;
15552 : : }
15553 : : }
15554 : : break;
15555 : 196 : default:;
15556 : : }
15557 : 196 : {
15558 : 196 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
15559 : 196 : if (VECTOR_TYPE_P (type)
15560 : 196 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
15561 : 196 : || types_match (type, TREE_TYPE (captures[2]))
15562 : 196 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
15563 : : || (optimize_vectors_before_lowering_p ()
15564 : 86 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
15565 : : )
15566 : : {
15567 : 196 : gimple_seq *lseq = seq;
15568 : 196 : if (lseq
15569 : 70 : && (!single_use (captures[0])))
15570 : 134 : lseq = NULL;
15571 : 196 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2345;
15572 : 196 : {
15573 : 196 : res_op->set_op (VEC_COND_EXPR, type, 3);
15574 : 196 : res_op->ops[0] = captures[1];
15575 : 196 : {
15576 : 196 : tree _o1[2], _r1;
15577 : 196 : _o1[0] = captures[2];
15578 : 196 : _o1[1] = captures[4];
15579 : 196 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o1[0], _o1[1]);
15580 : 196 : tem_op.resimplify (NULL, valueize);
15581 : 196 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
15582 : 196 : if (!_r1) goto next_after_fail2345;
15583 : 57 : res_op->ops[1] = _r1;
15584 : : }
15585 : 57 : {
15586 : 57 : tree _o1[2], _r1;
15587 : 57 : _o1[0] = captures[3];
15588 : 57 : _o1[1] = captures[4];
15589 : 57 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o1[0], _o1[1]);
15590 : 57 : tem_op.resimplify (NULL, valueize);
15591 : 57 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
15592 : 57 : if (!_r1) goto next_after_fail2345;
15593 : 46 : res_op->ops[2] = _r1;
15594 : : }
15595 : 46 : res_op->resimplify (lseq, valueize);
15596 : 46 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
15597 : 46 : return true;
15598 : : }
15599 : 150 : next_after_fail2345:;
15600 : : }
15601 : : }
15602 : 150 : break;
15603 : : }
15604 : : default:;
15605 : : }
15606 : 8448375 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
15607 : 4924035 : switch (gimple_call_combined_fn (_c1))
15608 : : {
15609 : 0 : case CFN_BUILT_IN_BSWAP128:
15610 : 0 : if (gimple_call_num_args (_c1) == 1)
15611 : : {
15612 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15613 : 0 : _q20 = do_valueize (valueize, _q20);
15614 : 0 : switch (TREE_CODE (_p1))
15615 : : {
15616 : 0 : case SSA_NAME:
15617 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15618 : : {
15619 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15620 : 0 : switch (gimple_call_combined_fn (_c2))
15621 : : {
15622 : 0 : case CFN_BUILT_IN_BSWAP128:
15623 : 0 : if (gimple_call_num_args (_c2) == 1)
15624 : : {
15625 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
15626 : 0 : _q40 = do_valueize (valueize, _q40);
15627 : 0 : {
15628 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
15629 : 0 : if (gimple_simplify_258 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP128))
15630 : 0 : return true;
15631 : : }
15632 : : }
15633 : : break;
15634 : : default:;
15635 : : }
15636 : : }
15637 : : break;
15638 : 0 : case INTEGER_CST:
15639 : 0 : {
15640 : 0 : {
15641 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
15642 : 0 : if (gimple_simplify_259 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP128))
15643 : 0 : return true;
15644 : : }
15645 : 0 : break;
15646 : : }
15647 : : default:;
15648 : : }
15649 : : }
15650 : : break;
15651 : 51 : case CFN_BUILT_IN_BSWAP16:
15652 : 51 : if (gimple_call_num_args (_c1) == 1)
15653 : : {
15654 : 51 : tree _q20 = gimple_call_arg (_c1, 0);
15655 : 51 : _q20 = do_valueize (valueize, _q20);
15656 : 51 : switch (TREE_CODE (_p1))
15657 : : {
15658 : 21 : case SSA_NAME:
15659 : 21 : if (gimple *_d2 = get_def (valueize, _p1))
15660 : : {
15661 : 21 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15662 : 21 : switch (gimple_call_combined_fn (_c2))
15663 : : {
15664 : 21 : case CFN_BUILT_IN_BSWAP16:
15665 : 21 : if (gimple_call_num_args (_c2) == 1)
15666 : : {
15667 : 21 : tree _q40 = gimple_call_arg (_c2, 0);
15668 : 21 : _q40 = do_valueize (valueize, _q40);
15669 : 21 : {
15670 : 21 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
15671 : 21 : if (gimple_simplify_258 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP16))
15672 : 21 : return true;
15673 : : }
15674 : : }
15675 : : break;
15676 : : default:;
15677 : : }
15678 : : }
15679 : : break;
15680 : 30 : case INTEGER_CST:
15681 : 30 : {
15682 : 30 : {
15683 : 30 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
15684 : 30 : if (gimple_simplify_259 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP16))
15685 : 30 : return true;
15686 : : }
15687 : 0 : break;
15688 : : }
15689 : : default:;
15690 : : }
15691 : : }
15692 : : break;
15693 : 73 : case CFN_BUILT_IN_BSWAP32:
15694 : 73 : if (gimple_call_num_args (_c1) == 1)
15695 : : {
15696 : 73 : tree _q20 = gimple_call_arg (_c1, 0);
15697 : 73 : _q20 = do_valueize (valueize, _q20);
15698 : 73 : switch (TREE_CODE (_p1))
15699 : : {
15700 : 14 : case SSA_NAME:
15701 : 14 : if (gimple *_d2 = get_def (valueize, _p1))
15702 : : {
15703 : 14 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15704 : 14 : switch (gimple_call_combined_fn (_c2))
15705 : : {
15706 : 14 : case CFN_BUILT_IN_BSWAP32:
15707 : 14 : if (gimple_call_num_args (_c2) == 1)
15708 : : {
15709 : 14 : tree _q40 = gimple_call_arg (_c2, 0);
15710 : 14 : _q40 = do_valueize (valueize, _q40);
15711 : 14 : {
15712 : 14 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
15713 : 14 : if (gimple_simplify_258 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP32))
15714 : 14 : return true;
15715 : : }
15716 : : }
15717 : : break;
15718 : : default:;
15719 : : }
15720 : : }
15721 : : break;
15722 : 59 : case INTEGER_CST:
15723 : 59 : {
15724 : 59 : {
15725 : 59 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
15726 : 59 : if (gimple_simplify_259 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP32))
15727 : 59 : return true;
15728 : : }
15729 : 0 : break;
15730 : : }
15731 : : default:;
15732 : : }
15733 : : }
15734 : : break;
15735 : 24 : case CFN_BUILT_IN_BSWAP64:
15736 : 24 : if (gimple_call_num_args (_c1) == 1)
15737 : : {
15738 : 24 : tree _q20 = gimple_call_arg (_c1, 0);
15739 : 24 : _q20 = do_valueize (valueize, _q20);
15740 : 24 : switch (TREE_CODE (_p1))
15741 : : {
15742 : 0 : case SSA_NAME:
15743 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15744 : : {
15745 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15746 : 0 : switch (gimple_call_combined_fn (_c2))
15747 : : {
15748 : 0 : case CFN_BUILT_IN_BSWAP64:
15749 : 0 : if (gimple_call_num_args (_c2) == 1)
15750 : : {
15751 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
15752 : 0 : _q40 = do_valueize (valueize, _q40);
15753 : 0 : {
15754 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
15755 : 0 : if (gimple_simplify_258 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP64))
15756 : 0 : return true;
15757 : : }
15758 : : }
15759 : : break;
15760 : : default:;
15761 : : }
15762 : : }
15763 : : break;
15764 : 24 : case INTEGER_CST:
15765 : 24 : {
15766 : 24 : {
15767 : 24 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
15768 : 24 : if (gimple_simplify_259 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_BSWAP64))
15769 : 24 : return true;
15770 : : }
15771 : 0 : break;
15772 : : }
15773 : : default:;
15774 : : }
15775 : : }
15776 : : break;
15777 : : default:;
15778 : : }
15779 : : }
15780 : : break;
15781 : 77346938 : default:;
15782 : : }
15783 : 77346938 : switch (TREE_CODE (_p1))
15784 : : {
15785 : 12515288 : case SSA_NAME:
15786 : 12515288 : if (gimple *_d1 = get_def (valueize, _p1))
15787 : : {
15788 : 4180810 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15789 : 6115500 : switch (gimple_assign_rhs_code (_a1))
15790 : : {
15791 : 271 : case VEC_COND_EXPR:
15792 : 271 : {
15793 : 271 : tree _q30 = gimple_assign_rhs1 (_a1);
15794 : 271 : _q30 = do_valueize (valueize, _q30);
15795 : 271 : tree _q31 = gimple_assign_rhs2 (_a1);
15796 : 271 : _q31 = do_valueize (valueize, _q31);
15797 : 271 : tree _q32 = gimple_assign_rhs3 (_a1);
15798 : 271 : _q32 = do_valueize (valueize, _q32);
15799 : 271 : {
15800 : 271 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
15801 : 271 : if (VECTOR_TYPE_P (type)
15802 : 271 : && (TREE_CODE_CLASS (EQ_EXPR) != tcc_comparison
15803 : 271 : || types_match (type, TREE_TYPE (captures[3]))
15804 : 271 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
15805 : : || (optimize_vectors_before_lowering_p ()
15806 : 222 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
15807 : : )
15808 : : {
15809 : 271 : gimple_seq *lseq = seq;
15810 : 271 : if (lseq
15811 : 43 : && (!single_use (captures[1])))
15812 : 228 : lseq = NULL;
15813 : 271 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2346;
15814 : 271 : {
15815 : 271 : res_op->set_op (VEC_COND_EXPR, type, 3);
15816 : 271 : res_op->ops[0] = captures[2];
15817 : 271 : {
15818 : 271 : tree _o1[2], _r1;
15819 : 271 : _o1[0] = captures[0];
15820 : 271 : _o1[1] = captures[3];
15821 : 271 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o1[0], _o1[1]);
15822 : 271 : tem_op.resimplify (NULL, valueize);
15823 : 271 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
15824 : 271 : if (!_r1) goto next_after_fail2346;
15825 : 20 : res_op->ops[1] = _r1;
15826 : : }
15827 : 20 : {
15828 : 20 : tree _o1[2], _r1;
15829 : 20 : _o1[0] = captures[0];
15830 : 20 : _o1[1] = captures[4];
15831 : 20 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o1[0], _o1[1]);
15832 : 20 : tem_op.resimplify (NULL, valueize);
15833 : 20 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
15834 : 20 : if (!_r1) goto next_after_fail2346;
15835 : 0 : res_op->ops[2] = _r1;
15836 : : }
15837 : 0 : res_op->resimplify (lseq, valueize);
15838 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
15839 : 0 : return true;
15840 : : }
15841 : 271 : next_after_fail2346:;
15842 : : }
15843 : : }
15844 : 271 : break;
15845 : : }
15846 : : default:;
15847 : : }
15848 : : }
15849 : : break;
15850 : 77346938 : default:;
15851 : : }
15852 : 77346938 : switch (TREE_CODE (_p0))
15853 : : {
15854 : 76521123 : case SSA_NAME:
15855 : 76521123 : if (gimple *_d1 = get_def (valueize, _p0))
15856 : : {
15857 : 26292682 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15858 : 31899151 : switch (gimple_assign_rhs_code (_a1))
15859 : : {
15860 : 9473 : case COND_EXPR:
15861 : 9473 : {
15862 : 9473 : tree _q20 = gimple_assign_rhs1 (_a1);
15863 : 9473 : _q20 = do_valueize (valueize, _q20);
15864 : 9473 : tree _q21 = gimple_assign_rhs2 (_a1);
15865 : 9473 : _q21 = do_valueize (valueize, _q21);
15866 : 9473 : tree _q22 = gimple_assign_rhs3 (_a1);
15867 : 9473 : _q22 = do_valueize (valueize, _q22);
15868 : 9473 : switch (TREE_CODE (_p1))
15869 : : {
15870 : 8634 : case SSA_NAME:
15871 : 8634 : if (gimple *_d2 = get_def (valueize, _p1))
15872 : : {
15873 : 8630 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15874 : 8689 : switch (gimple_assign_rhs_code (_a2))
15875 : : {
15876 : 57 : case COND_EXPR:
15877 : 57 : {
15878 : 57 : tree _q60 = gimple_assign_rhs1 (_a2);
15879 : 57 : _q60 = do_valueize (valueize, _q60);
15880 : 57 : tree _q61 = gimple_assign_rhs2 (_a2);
15881 : 57 : _q61 = do_valueize (valueize, _q61);
15882 : 57 : tree _q62 = gimple_assign_rhs3 (_a2);
15883 : 57 : _q62 = do_valueize (valueize, _q62);
15884 : 57 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
15885 : : {
15886 : 2 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
15887 : : {
15888 : 2 : {
15889 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
15890 : 2 : const enum tree_code eqne = EQ_EXPR;
15891 : 2 : if (!HONOR_NANS (captures[1])
15892 : 2 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
15893 : 4 : && types_match (type, TREE_TYPE (captures[0]))
15894 : : )
15895 : : {
15896 : 2 : gimple_seq *lseq = seq;
15897 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2347;
15898 : 2 : {
15899 : 2 : res_op->set_op (COND_EXPR, type, 3);
15900 : 2 : {
15901 : 2 : tree _o1[2], _r1;
15902 : 2 : {
15903 : 2 : tree _o2[2], _r2;
15904 : 2 : _o2[0] = captures[0];
15905 : 2 : if (COMPARISON_CLASS_P (_o2[0]))
15906 : : {
15907 : 0 : if (!seq) return false;
15908 : 0 : _o2[0] = gimple_build (seq, TREE_CODE (_o2[0]), TREE_TYPE (_o2[0]), TREE_OPERAND (_o2[0], 0), TREE_OPERAND (_o2[0], 1));
15909 : : }
15910 : 2 : _o2[1] = captures[3];
15911 : 2 : if (COMPARISON_CLASS_P (_o2[1]))
15912 : : {
15913 : 0 : if (!seq) return false;
15914 : 0 : _o2[1] = gimple_build (seq, TREE_CODE (_o2[1]), TREE_TYPE (_o2[1]), TREE_OPERAND (_o2[1], 0), TREE_OPERAND (_o2[1], 1));
15915 : : }
15916 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15917 : 2 : tem_op.resimplify (lseq, valueize);
15918 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15919 : 2 : if (!_r2) goto next_after_fail2347;
15920 : 1 : _o1[0] = _r2;
15921 : : }
15922 : 1 : {
15923 : 1 : tree _o2[2], _r2;
15924 : 1 : _o2[0] = captures[1];
15925 : 1 : _o2[1] = captures[2];
15926 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NE_EXPR, type, _o2[0], _o2[1]);
15927 : 1 : tem_op.resimplify (lseq, valueize);
15928 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15929 : 1 : if (!_r2) goto next_after_fail2347;
15930 : 1 : _o1[1] = _r2;
15931 : : }
15932 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15933 : 1 : tem_op.resimplify (lseq, valueize);
15934 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15935 : 1 : if (!_r1) goto next_after_fail2347;
15936 : 1 : res_op->ops[0] = _r1;
15937 : : }
15938 : 1 : res_op->ops[1] = constant_boolean_node (eqne == NE_EXPR, type);
15939 : 1 : res_op->ops[2] = constant_boolean_node (eqne != NE_EXPR, type);
15940 : 1 : res_op->resimplify (lseq, valueize);
15941 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1124, __FILE__, __LINE__, true);
15942 : 1 : return true;
15943 : : }
15944 : 1 : next_after_fail2347:;
15945 : : }
15946 : : }
15947 : : }
15948 : : }
15949 : 56 : if ((_q61 == _q22 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q22, 0) && types_match (_q61, _q22)))
15950 : : {
15951 : 28 : if ((_q62 == _q21 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q21, 0) && types_match (_q62, _q21)))
15952 : : {
15953 : 28 : {
15954 : 28 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
15955 : 28 : const enum tree_code eqne = EQ_EXPR;
15956 : 28 : if (!HONOR_NANS (captures[1])
15957 : 2 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
15958 : 30 : && types_match (type, TREE_TYPE (captures[0]))
15959 : : )
15960 : : {
15961 : 2 : gimple_seq *lseq = seq;
15962 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2348;
15963 : 2 : {
15964 : 2 : res_op->set_op (COND_EXPR, type, 3);
15965 : 2 : {
15966 : 2 : tree _o1[2], _r1;
15967 : 2 : {
15968 : 2 : tree _o2[2], _r2;
15969 : 2 : _o2[0] = captures[0];
15970 : 2 : if (COMPARISON_CLASS_P (_o2[0]))
15971 : : {
15972 : 0 : if (!seq) return false;
15973 : 0 : _o2[0] = gimple_build (seq, TREE_CODE (_o2[0]), TREE_TYPE (_o2[0]), TREE_OPERAND (_o2[0], 0), TREE_OPERAND (_o2[0], 1));
15974 : : }
15975 : 2 : _o2[1] = captures[3];
15976 : 2 : if (COMPARISON_CLASS_P (_o2[1]))
15977 : : {
15978 : 0 : if (!seq) return false;
15979 : 0 : _o2[1] = gimple_build (seq, TREE_CODE (_o2[1]), TREE_TYPE (_o2[1]), TREE_OPERAND (_o2[1], 0), TREE_OPERAND (_o2[1], 1));
15980 : : }
15981 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15982 : 2 : tem_op.resimplify (lseq, valueize);
15983 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15984 : 2 : if (!_r2) goto next_after_fail2348;
15985 : 1 : _o1[0] = _r2;
15986 : : }
15987 : 1 : {
15988 : 1 : tree _o2[2], _r2;
15989 : 1 : _o2[0] = captures[1];
15990 : 1 : _o2[1] = captures[2];
15991 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o2[0], _o2[1]);
15992 : 1 : tem_op.resimplify (lseq, valueize);
15993 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15994 : 1 : if (!_r2) goto next_after_fail2348;
15995 : 1 : _o1[1] = _r2;
15996 : : }
15997 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15998 : 1 : tem_op.resimplify (lseq, valueize);
15999 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16000 : 1 : if (!_r1) goto next_after_fail2348;
16001 : 1 : res_op->ops[0] = _r1;
16002 : : }
16003 : 1 : res_op->ops[1] = constant_boolean_node (eqne != NE_EXPR, type);
16004 : 1 : res_op->ops[2] = constant_boolean_node (eqne == NE_EXPR, type);
16005 : 1 : res_op->resimplify (lseq, valueize);
16006 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1125, __FILE__, __LINE__, true);
16007 : 1 : return true;
16008 : : }
16009 : 27 : next_after_fail2348:;
16010 : : }
16011 : : }
16012 : : }
16013 : : }
16014 : : break;
16015 : : }
16016 : : default:;
16017 : : }
16018 : : }
16019 : : break;
16020 : : default:;
16021 : : }
16022 : : break;
16023 : : }
16024 : 150 : case VEC_COND_EXPR:
16025 : 150 : {
16026 : 150 : tree _q20 = gimple_assign_rhs1 (_a1);
16027 : 150 : _q20 = do_valueize (valueize, _q20);
16028 : 150 : tree _q21 = gimple_assign_rhs2 (_a1);
16029 : 150 : _q21 = do_valueize (valueize, _q21);
16030 : 150 : tree _q22 = gimple_assign_rhs3 (_a1);
16031 : 150 : _q22 = do_valueize (valueize, _q22);
16032 : 150 : switch (TREE_CODE (_p1))
16033 : : {
16034 : 147 : case SSA_NAME:
16035 : 147 : if (gimple *_d2 = get_def (valueize, _p1))
16036 : : {
16037 : 147 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16038 : 200 : switch (gimple_assign_rhs_code (_a2))
16039 : : {
16040 : 94 : case VEC_COND_EXPR:
16041 : 94 : {
16042 : 94 : tree _q60 = gimple_assign_rhs1 (_a2);
16043 : 94 : _q60 = do_valueize (valueize, _q60);
16044 : 94 : tree _q61 = gimple_assign_rhs2 (_a2);
16045 : 94 : _q61 = do_valueize (valueize, _q61);
16046 : 94 : tree _q62 = gimple_assign_rhs3 (_a2);
16047 : 94 : _q62 = do_valueize (valueize, _q62);
16048 : 94 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
16049 : : {
16050 : 14 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
16051 : : {
16052 : 14 : {
16053 : 14 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
16054 : 14 : const enum tree_code eqne = EQ_EXPR;
16055 : 14 : if (!HONOR_NANS (captures[1])
16056 : 14 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
16057 : 28 : && types_match (type, TREE_TYPE (captures[0]))
16058 : : )
16059 : : {
16060 : 14 : gimple_seq *lseq = seq;
16061 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2349;
16062 : 14 : {
16063 : 14 : res_op->set_op (VEC_COND_EXPR, type, 3);
16064 : 14 : {
16065 : 14 : tree _o1[2], _r1;
16066 : 14 : {
16067 : 14 : tree _o2[2], _r2;
16068 : 14 : _o2[0] = captures[0];
16069 : 14 : _o2[1] = captures[3];
16070 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16071 : 14 : tem_op.resimplify (lseq, valueize);
16072 : 14 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16073 : 14 : if (!_r2) goto next_after_fail2349;
16074 : 4 : _o1[0] = _r2;
16075 : : }
16076 : 4 : {
16077 : 4 : tree _o2[2], _r2;
16078 : 4 : _o2[0] = captures[1];
16079 : 4 : _o2[1] = captures[2];
16080 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), NE_EXPR, type, _o2[0], _o2[1]);
16081 : 4 : tem_op.resimplify (lseq, valueize);
16082 : 4 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16083 : 4 : if (!_r2) goto next_after_fail2349;
16084 : 4 : _o1[1] = _r2;
16085 : : }
16086 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16087 : 4 : tem_op.resimplify (lseq, valueize);
16088 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16089 : 4 : if (!_r1) goto next_after_fail2349;
16090 : 4 : res_op->ops[0] = _r1;
16091 : : }
16092 : 4 : res_op->ops[1] = constant_boolean_node (eqne == NE_EXPR, type);
16093 : 4 : res_op->ops[2] = constant_boolean_node (eqne != NE_EXPR, type);
16094 : 4 : res_op->resimplify (lseq, valueize);
16095 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1124, __FILE__, __LINE__, true);
16096 : 4 : return true;
16097 : : }
16098 : 10 : next_after_fail2349:;
16099 : : }
16100 : : }
16101 : : }
16102 : : }
16103 : 90 : if ((_q61 == _q22 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q22, 0) && types_match (_q61, _q22)))
16104 : : {
16105 : 80 : if ((_q62 == _q21 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q21, 0) && types_match (_q62, _q21)))
16106 : : {
16107 : 80 : {
16108 : 80 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _q60 };
16109 : 80 : const enum tree_code eqne = EQ_EXPR;
16110 : 80 : if (!HONOR_NANS (captures[1])
16111 : 6 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
16112 : 86 : && types_match (type, TREE_TYPE (captures[0]))
16113 : : )
16114 : : {
16115 : 6 : gimple_seq *lseq = seq;
16116 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2350;
16117 : 6 : {
16118 : 6 : res_op->set_op (VEC_COND_EXPR, type, 3);
16119 : 6 : {
16120 : 6 : tree _o1[2], _r1;
16121 : 6 : {
16122 : 6 : tree _o2[2], _r2;
16123 : 6 : _o2[0] = captures[0];
16124 : 6 : _o2[1] = captures[3];
16125 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16126 : 6 : tem_op.resimplify (lseq, valueize);
16127 : 6 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16128 : 6 : if (!_r2) goto next_after_fail2350;
16129 : 3 : _o1[0] = _r2;
16130 : : }
16131 : 3 : {
16132 : 3 : tree _o2[2], _r2;
16133 : 3 : _o2[0] = captures[1];
16134 : 3 : _o2[1] = captures[2];
16135 : 3 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, type, _o2[0], _o2[1]);
16136 : 3 : tem_op.resimplify (lseq, valueize);
16137 : 3 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16138 : 3 : if (!_r2) goto next_after_fail2350;
16139 : 3 : _o1[1] = _r2;
16140 : : }
16141 : 3 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16142 : 3 : tem_op.resimplify (lseq, valueize);
16143 : 3 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16144 : 3 : if (!_r1) goto next_after_fail2350;
16145 : 3 : res_op->ops[0] = _r1;
16146 : : }
16147 : 3 : res_op->ops[1] = constant_boolean_node (eqne != NE_EXPR, type);
16148 : 3 : res_op->ops[2] = constant_boolean_node (eqne == NE_EXPR, type);
16149 : 3 : res_op->resimplify (lseq, valueize);
16150 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1125, __FILE__, __LINE__, true);
16151 : 3 : return true;
16152 : : }
16153 : 77 : next_after_fail2350:;
16154 : : }
16155 : : }
16156 : : }
16157 : : }
16158 : : break;
16159 : : }
16160 : : default:;
16161 : : }
16162 : : }
16163 : : break;
16164 : : default:;
16165 : : }
16166 : : break;
16167 : : }
16168 : 1167 : case LT_EXPR:
16169 : 1167 : {
16170 : 1167 : tree _q20 = gimple_assign_rhs1 (_a1);
16171 : 1167 : _q20 = do_valueize (valueize, _q20);
16172 : 1167 : tree _q21 = gimple_assign_rhs2 (_a1);
16173 : 1167 : _q21 = do_valueize (valueize, _q21);
16174 : 1167 : if (integer_truep (_p1))
16175 : : {
16176 : 86 : {
16177 : 86 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16178 : 86 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, LT_EXPR, GE_EXPR, UNGE_EXPR))
16179 : 86 : return true;
16180 : : }
16181 : : }
16182 : 1081 : if (integer_zerop (_p1))
16183 : : {
16184 : 774 : {
16185 : 774 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16186 : 774 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, LT_EXPR, GE_EXPR, UNGE_EXPR))
16187 : 209 : return true;
16188 : : }
16189 : : }
16190 : : break;
16191 : : }
16192 : 760 : case LE_EXPR:
16193 : 760 : {
16194 : 760 : tree _q20 = gimple_assign_rhs1 (_a1);
16195 : 760 : _q20 = do_valueize (valueize, _q20);
16196 : 760 : tree _q21 = gimple_assign_rhs2 (_a1);
16197 : 760 : _q21 = do_valueize (valueize, _q21);
16198 : 760 : if (integer_truep (_p1))
16199 : : {
16200 : 122 : {
16201 : 122 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16202 : 122 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, LE_EXPR, GT_EXPR, UNGT_EXPR))
16203 : 122 : return true;
16204 : : }
16205 : : }
16206 : 638 : if (integer_zerop (_p1))
16207 : : {
16208 : 251 : {
16209 : 251 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16210 : 251 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, LE_EXPR, GT_EXPR, UNGT_EXPR))
16211 : 203 : return true;
16212 : : }
16213 : : }
16214 : : break;
16215 : : }
16216 : 17984 : case EQ_EXPR:
16217 : 17984 : {
16218 : 17984 : tree _q20 = gimple_assign_rhs1 (_a1);
16219 : 17984 : _q20 = do_valueize (valueize, _q20);
16220 : 17984 : tree _q21 = gimple_assign_rhs2 (_a1);
16221 : 17984 : _q21 = do_valueize (valueize, _q21);
16222 : 17984 : if (tree_swap_operands_p (_q20, _q21))
16223 : 540 : std::swap (_q20, _q21);
16224 : 17984 : if (integer_truep (_p1))
16225 : : {
16226 : 348 : {
16227 : 348 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16228 : 348 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR, NE_EXPR))
16229 : 348 : return true;
16230 : : }
16231 : : }
16232 : 17636 : if (integer_zerop (_p1))
16233 : : {
16234 : 1540 : {
16235 : 1540 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16236 : 1540 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR, NE_EXPR))
16237 : 1248 : return true;
16238 : : }
16239 : : }
16240 : 77318707 : break;
16241 : : }
16242 : 8935 : case NE_EXPR:
16243 : 8935 : {
16244 : 8935 : tree _q20 = gimple_assign_rhs1 (_a1);
16245 : 8935 : _q20 = do_valueize (valueize, _q20);
16246 : 8935 : tree _q21 = gimple_assign_rhs2 (_a1);
16247 : 8935 : _q21 = do_valueize (valueize, _q21);
16248 : 8935 : if (tree_swap_operands_p (_q20, _q21))
16249 : 76 : std::swap (_q20, _q21);
16250 : 8935 : if (integer_truep (_p1))
16251 : : {
16252 : 516 : {
16253 : 516 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16254 : 516 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, NE_EXPR, EQ_EXPR, EQ_EXPR))
16255 : 516 : return true;
16256 : : }
16257 : : }
16258 : 8419 : if (integer_zerop (_p1))
16259 : : {
16260 : 7607 : {
16261 : 7607 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16262 : 7607 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, NE_EXPR, EQ_EXPR, EQ_EXPR))
16263 : 7368 : return true;
16264 : : }
16265 : : }
16266 : 77318707 : break;
16267 : : }
16268 : 1295 : case GE_EXPR:
16269 : 1295 : {
16270 : 1295 : tree _q20 = gimple_assign_rhs1 (_a1);
16271 : 1295 : _q20 = do_valueize (valueize, _q20);
16272 : 1295 : tree _q21 = gimple_assign_rhs2 (_a1);
16273 : 1295 : _q21 = do_valueize (valueize, _q21);
16274 : 1295 : if (integer_truep (_p1))
16275 : : {
16276 : 151 : {
16277 : 151 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16278 : 151 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, GE_EXPR, LT_EXPR, UNLT_EXPR))
16279 : 151 : return true;
16280 : : }
16281 : : }
16282 : 1144 : if (integer_zerop (_p1))
16283 : : {
16284 : 116 : {
16285 : 116 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16286 : 116 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, GE_EXPR, LT_EXPR, UNLT_EXPR))
16287 : 92 : return true;
16288 : : }
16289 : : }
16290 : : break;
16291 : : }
16292 : 2264 : case GT_EXPR:
16293 : 2264 : {
16294 : 2264 : tree _q20 = gimple_assign_rhs1 (_a1);
16295 : 2264 : _q20 = do_valueize (valueize, _q20);
16296 : 2264 : tree _q21 = gimple_assign_rhs2 (_a1);
16297 : 2264 : _q21 = do_valueize (valueize, _q21);
16298 : 2264 : if (integer_truep (_p1))
16299 : : {
16300 : 101 : {
16301 : 101 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16302 : 101 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, GT_EXPR, LE_EXPR, UNLE_EXPR))
16303 : 101 : return true;
16304 : : }
16305 : : }
16306 : 2163 : if (integer_zerop (_p1))
16307 : : {
16308 : 1142 : {
16309 : 1142 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16310 : 1142 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, GT_EXPR, LE_EXPR, UNLE_EXPR))
16311 : 167 : return true;
16312 : : }
16313 : : }
16314 : : break;
16315 : : }
16316 : 3 : case UNORDERED_EXPR:
16317 : 3 : {
16318 : 3 : tree _q20 = gimple_assign_rhs1 (_a1);
16319 : 3 : _q20 = do_valueize (valueize, _q20);
16320 : 3 : tree _q21 = gimple_assign_rhs2 (_a1);
16321 : 3 : _q21 = do_valueize (valueize, _q21);
16322 : 3 : if (tree_swap_operands_p (_q20, _q21))
16323 : 0 : std::swap (_q20, _q21);
16324 : 3 : if (integer_truep (_p1))
16325 : : {
16326 : 0 : {
16327 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16328 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR))
16329 : 0 : return true;
16330 : : }
16331 : : }
16332 : 3 : if (integer_zerop (_p1))
16333 : : {
16334 : 3 : {
16335 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16336 : 3 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR))
16337 : 3 : return true;
16338 : : }
16339 : : }
16340 : 77318707 : break;
16341 : : }
16342 : 0 : case ORDERED_EXPR:
16343 : 0 : {
16344 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16345 : 0 : _q20 = do_valueize (valueize, _q20);
16346 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16347 : 0 : _q21 = do_valueize (valueize, _q21);
16348 : 0 : if (tree_swap_operands_p (_q20, _q21))
16349 : 0 : std::swap (_q20, _q21);
16350 : 0 : if (integer_truep (_p1))
16351 : : {
16352 : 0 : {
16353 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16354 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR))
16355 : 0 : return true;
16356 : : }
16357 : : }
16358 : 0 : if (integer_zerop (_p1))
16359 : : {
16360 : 0 : {
16361 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16362 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR))
16363 : 0 : return true;
16364 : : }
16365 : : }
16366 : 77318707 : break;
16367 : : }
16368 : 0 : case UNLT_EXPR:
16369 : 0 : {
16370 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16371 : 0 : _q20 = do_valueize (valueize, _q20);
16372 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16373 : 0 : _q21 = do_valueize (valueize, _q21);
16374 : 0 : if (integer_truep (_p1))
16375 : : {
16376 : 0 : {
16377 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16378 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, UNLT_EXPR, GE_EXPR, GE_EXPR))
16379 : 0 : return true;
16380 : : }
16381 : : }
16382 : 0 : if (integer_zerop (_p1))
16383 : : {
16384 : 0 : {
16385 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16386 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, UNLT_EXPR, GE_EXPR, GE_EXPR))
16387 : 0 : return true;
16388 : : }
16389 : : }
16390 : : break;
16391 : : }
16392 : 0 : case UNLE_EXPR:
16393 : 0 : {
16394 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16395 : 0 : _q20 = do_valueize (valueize, _q20);
16396 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16397 : 0 : _q21 = do_valueize (valueize, _q21);
16398 : 0 : if (integer_truep (_p1))
16399 : : {
16400 : 0 : {
16401 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16402 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, UNLE_EXPR, GT_EXPR, GT_EXPR))
16403 : 0 : return true;
16404 : : }
16405 : : }
16406 : 0 : if (integer_zerop (_p1))
16407 : : {
16408 : 0 : {
16409 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16410 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, UNLE_EXPR, GT_EXPR, GT_EXPR))
16411 : 0 : return true;
16412 : : }
16413 : : }
16414 : : break;
16415 : : }
16416 : 0 : case UNGT_EXPR:
16417 : 0 : {
16418 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16419 : 0 : _q20 = do_valueize (valueize, _q20);
16420 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16421 : 0 : _q21 = do_valueize (valueize, _q21);
16422 : 0 : if (integer_truep (_p1))
16423 : : {
16424 : 0 : {
16425 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16426 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, UNGT_EXPR, LE_EXPR, LE_EXPR))
16427 : 0 : return true;
16428 : : }
16429 : : }
16430 : 0 : if (integer_zerop (_p1))
16431 : : {
16432 : 0 : {
16433 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16434 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, UNGT_EXPR, LE_EXPR, LE_EXPR))
16435 : 0 : return true;
16436 : : }
16437 : : }
16438 : : break;
16439 : : }
16440 : 0 : case UNGE_EXPR:
16441 : 0 : {
16442 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16443 : 0 : _q20 = do_valueize (valueize, _q20);
16444 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16445 : 0 : _q21 = do_valueize (valueize, _q21);
16446 : 0 : if (integer_truep (_p1))
16447 : : {
16448 : 0 : {
16449 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16450 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, UNGE_EXPR, LT_EXPR, LT_EXPR))
16451 : 0 : return true;
16452 : : }
16453 : : }
16454 : 0 : if (integer_zerop (_p1))
16455 : : {
16456 : 0 : {
16457 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16458 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, UNGE_EXPR, LT_EXPR, LT_EXPR))
16459 : 0 : return true;
16460 : : }
16461 : : }
16462 : : break;
16463 : : }
16464 : 0 : case UNEQ_EXPR:
16465 : 0 : {
16466 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16467 : 0 : _q20 = do_valueize (valueize, _q20);
16468 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16469 : 0 : _q21 = do_valueize (valueize, _q21);
16470 : 0 : if (tree_swap_operands_p (_q20, _q21))
16471 : 0 : std::swap (_q20, _q21);
16472 : 0 : if (integer_truep (_p1))
16473 : : {
16474 : 0 : {
16475 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16476 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR))
16477 : 0 : return true;
16478 : : }
16479 : : }
16480 : 0 : if (integer_zerop (_p1))
16481 : : {
16482 : 0 : {
16483 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16484 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR))
16485 : 0 : return true;
16486 : : }
16487 : : }
16488 : 77318707 : break;
16489 : : }
16490 : 0 : case LTGT_EXPR:
16491 : 0 : {
16492 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16493 : 0 : _q20 = do_valueize (valueize, _q20);
16494 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16495 : 0 : _q21 = do_valueize (valueize, _q21);
16496 : 0 : if (tree_swap_operands_p (_q20, _q21))
16497 : 0 : std::swap (_q20, _q21);
16498 : 0 : if (integer_truep (_p1))
16499 : : {
16500 : 0 : {
16501 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16502 : 0 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR))
16503 : 0 : return true;
16504 : : }
16505 : : }
16506 : 0 : if (integer_zerop (_p1))
16507 : : {
16508 : 0 : {
16509 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16510 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR))
16511 : 0 : return true;
16512 : : }
16513 : : }
16514 : 77318707 : break;
16515 : : }
16516 : 236325 : case MINUS_EXPR:
16517 : 236325 : {
16518 : 236325 : tree _q20 = gimple_assign_rhs1 (_a1);
16519 : 236325 : _q20 = do_valueize (valueize, _q20);
16520 : 236325 : tree _q21 = gimple_assign_rhs2 (_a1);
16521 : 236325 : _q21 = do_valueize (valueize, _q21);
16522 : 236325 : if (integer_zerop (_p1))
16523 : : {
16524 : 95134 : {
16525 : 95134 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16526 : 95134 : if (gimple_simplify_262 (res_op, seq, valueize, type, captures, EQ_EXPR))
16527 : 12265 : return true;
16528 : : }
16529 : : }
16530 : : break;
16531 : : }
16532 : 108012 : case POINTER_DIFF_EXPR:
16533 : 108012 : {
16534 : 108012 : tree _q20 = gimple_assign_rhs1 (_a1);
16535 : 108012 : _q20 = do_valueize (valueize, _q20);
16536 : 108012 : tree _q21 = gimple_assign_rhs2 (_a1);
16537 : 108012 : _q21 = do_valueize (valueize, _q21);
16538 : 108012 : if (integer_zerop (_p1))
16539 : : {
16540 : 9403 : {
16541 : 9403 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16542 : 9403 : if (gimple_simplify_263 (res_op, seq, valueize, type, captures, EQ_EXPR))
16543 : 3591 : return true;
16544 : : }
16545 : : }
16546 : : break;
16547 : : }
16548 : 94122 : case MULT_EXPR:
16549 : 94122 : {
16550 : 94122 : tree _q20 = gimple_assign_rhs1 (_a1);
16551 : 94122 : _q20 = do_valueize (valueize, _q20);
16552 : 94122 : tree _q21 = gimple_assign_rhs2 (_a1);
16553 : 94122 : _q21 = do_valueize (valueize, _q21);
16554 : 94122 : if (tree_swap_operands_p (_q20, _q21))
16555 : 532 : std::swap (_q20, _q21);
16556 : 94122 : switch (TREE_CODE (_q21))
16557 : : {
16558 : 77227 : case INTEGER_CST:
16559 : 77227 : {
16560 : 77227 : switch (TREE_CODE (_p1))
16561 : : {
16562 : 26752 : case INTEGER_CST:
16563 : 26752 : {
16564 : 26752 : {
16565 : 26752 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
16566 : 26752 : if (gimple_simplify_265 (res_op, seq, valueize, type, captures, EQ_EXPR))
16567 : 1752 : return true;
16568 : : }
16569 : 25000 : break;
16570 : : }
16571 : 75475 : default:;
16572 : : }
16573 : 75475 : if (integer_zerop (_p1))
16574 : : {
16575 : 17018 : {
16576 : 17018 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
16577 : 17018 : if (gimple_simplify_264 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
16578 : 0 : return true;
16579 : : }
16580 : : }
16581 : : break;
16582 : : }
16583 : : default:;
16584 : : }
16585 : 77318707 : break;
16586 : : }
16587 : : default:;
16588 : : }
16589 : : }
16590 : : break;
16591 : 77318707 : default:;
16592 : : }
16593 : 77318707 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
16594 : : {
16595 : 48829 : {
16596 : 48829 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
16597 : 48829 : if (gimple_simplify_266 (res_op, seq, valueize, type, captures, EQ_EXPR))
16598 : 32300 : return true;
16599 : : }
16600 : : }
16601 : 77286407 : switch (TREE_CODE (_p0))
16602 : : {
16603 : 76477030 : case SSA_NAME:
16604 : 76477030 : if (gimple *_d1 = get_def (valueize, _p0))
16605 : : {
16606 : 26250390 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16607 : 31855026 : switch (gimple_assign_rhs_code (_a1))
16608 : : {
16609 : 752476 : CASE_CONVERT:
16610 : 752476 : {
16611 : 752476 : tree _q20 = gimple_assign_rhs1 (_a1);
16612 : 752476 : _q20 = do_valueize (valueize, _q20);
16613 : 752476 : switch (TREE_CODE (_p1))
16614 : : {
16615 : 176526 : case SSA_NAME:
16616 : 176526 : if (gimple *_d2 = get_def (valueize, _p1))
16617 : : {
16618 : 166811 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16619 : 179289 : switch (gimple_assign_rhs_code (_a2))
16620 : : {
16621 : 38077 : CASE_CONVERT:
16622 : 38077 : {
16623 : 38077 : tree _q40 = gimple_assign_rhs1 (_a2);
16624 : 38077 : _q40 = do_valueize (valueize, _q40);
16625 : 38077 : {
16626 : 38077 : tree _q40_pops[1];
16627 : 38077 : if (gimple_maybe_bit_not (_q40, _q40_pops, valueize))
16628 : : {
16629 : 756 : tree _q50 = _q40_pops[0];
16630 : 756 : {
16631 : 756 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
16632 : 756 : if (gimple_simplify_267 (res_op, seq, valueize, type, captures, EQ_EXPR))
16633 : 3 : return true;
16634 : : }
16635 : : }
16636 : : }
16637 : 38074 : break;
16638 : : }
16639 : : default:;
16640 : : }
16641 : : }
16642 : : break;
16643 : 752473 : default:;
16644 : : }
16645 : 752473 : {
16646 : 752473 : tree _q20_pops[1];
16647 : 752473 : if (gimple_maybe_bit_not (_q20, _q20_pops, valueize))
16648 : : {
16649 : 17711 : tree _q30 = _q20_pops[0];
16650 : 17711 : switch (TREE_CODE (_p1))
16651 : : {
16652 : 2640 : case SSA_NAME:
16653 : 2640 : if (gimple *_d2 = get_def (valueize, _p1))
16654 : : {
16655 : 2604 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16656 : 3612 : switch (gimple_assign_rhs_code (_a2))
16657 : : {
16658 : 520 : CASE_CONVERT:
16659 : 520 : {
16660 : 520 : tree _q50 = gimple_assign_rhs1 (_a2);
16661 : 520 : _q50 = do_valueize (valueize, _q50);
16662 : 520 : {
16663 : 520 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
16664 : 520 : if (gimple_simplify_267 (res_op, seq, valueize, type, captures, EQ_EXPR))
16665 : 0 : return true;
16666 : : }
16667 : 520 : break;
16668 : : }
16669 : : default:;
16670 : : }
16671 : : }
16672 : : break;
16673 : : default:;
16674 : : }
16675 : : }
16676 : : }
16677 : 752473 : break;
16678 : : }
16679 : : default:;
16680 : : }
16681 : : }
16682 : : break;
16683 : 77286404 : default:;
16684 : : }
16685 : 77286404 : {
16686 : 77286404 : tree _p1_pops[1];
16687 : 77286404 : if (gimple_maybe_bit_not (_p1, _p1_pops, valueize))
16688 : : {
16689 : 59405198 : tree _q30 = _p1_pops[0];
16690 : 59405198 : {
16691 : 59405198 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
16692 : 59405198 : if (gimple_simplify_267 (res_op, seq, valueize, type, captures, EQ_EXPR))
16693 : 28 : return true;
16694 : : }
16695 : : }
16696 : : }
16697 : 77286376 : switch (TREE_CODE (_p0))
16698 : : {
16699 : 76476999 : case SSA_NAME:
16700 : 76476999 : if (gimple *_d1 = get_def (valueize, _p0))
16701 : : {
16702 : 26250359 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16703 : 31854995 : switch (gimple_assign_rhs_code (_a1))
16704 : : {
16705 : 782 : case BIT_NOT_EXPR:
16706 : 782 : {
16707 : 782 : tree _q20 = gimple_assign_rhs1 (_a1);
16708 : 782 : _q20 = do_valueize (valueize, _q20);
16709 : 782 : switch (TREE_CODE (_p1))
16710 : : {
16711 : 116 : case SSA_NAME:
16712 : 116 : if (gimple *_d2 = get_def (valueize, _p1))
16713 : : {
16714 : 104 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16715 : 92 : switch (gimple_assign_rhs_code (_a2))
16716 : : {
16717 : 2 : case BIT_NOT_EXPR:
16718 : 2 : {
16719 : 2 : tree _q40 = gimple_assign_rhs1 (_a2);
16720 : 2 : _q40 = do_valueize (valueize, _q40);
16721 : 2 : {
16722 : 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _p1, _q40 };
16723 : 2 : if (gimple_simplify_270 (res_op, seq, valueize, type, captures, EQ_EXPR))
16724 : 2 : return true;
16725 : : }
16726 : 0 : break;
16727 : : }
16728 : : default:;
16729 : : }
16730 : : }
16731 : : break;
16732 : 780 : default:;
16733 : : }
16734 : 780 : {
16735 : 780 : tree _p1_pops[1];
16736 : 780 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
16737 : : {
16738 : 4 : tree _q40 = _p1_pops[0];
16739 : 4 : switch (TREE_CODE (_q40))
16740 : : {
16741 : 4 : case SSA_NAME:
16742 : 4 : if (gimple *_d2 = get_def (valueize, _q40))
16743 : : {
16744 : 4 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16745 : 6 : switch (gimple_assign_rhs_code (_a2))
16746 : : {
16747 : 2 : case BIT_NOT_EXPR:
16748 : 2 : {
16749 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
16750 : 2 : _q50 = do_valueize (valueize, _q50);
16751 : 2 : {
16752 : 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q50 };
16753 : 2 : if (gimple_simplify_270 (res_op, seq, valueize, type, captures, EQ_EXPR))
16754 : 2 : return true;
16755 : : }
16756 : 0 : break;
16757 : : }
16758 : : default:;
16759 : : }
16760 : : }
16761 : : break;
16762 : : default:;
16763 : : }
16764 : : }
16765 : : }
16766 : 778 : if (CONSTANT_CLASS_P (_p1))
16767 : : {
16768 : 666 : {
16769 : 666 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
16770 : 666 : if (gimple_simplify_269 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
16771 : 91 : return true;
16772 : : }
16773 : : }
16774 : : break;
16775 : : }
16776 : : default:;
16777 : : }
16778 : : }
16779 : : break;
16780 : 77286281 : default:;
16781 : : }
16782 : 77286281 : {
16783 : 77286281 : tree _p0_pops[1];
16784 : 77286281 : if (gimple_maybe_bit_not (_p0, _p0_pops, valueize))
16785 : : {
16786 : 22894 : tree _q20 = _p0_pops[0];
16787 : 22894 : {
16788 : 22894 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _q20 };
16789 : 22894 : if (gimple_simplify_267 (res_op, seq, valueize, type, captures, EQ_EXPR))
16790 : 0 : return true;
16791 : : }
16792 : : }
16793 : : }
16794 : 77286281 : {
16795 : 77286281 : tree _p0_pops[1];
16796 : 77286281 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
16797 : : {
16798 : 446688 : tree _q20 = _p0_pops[0];
16799 : 446688 : switch (TREE_CODE (_q20))
16800 : : {
16801 : 433815 : case SSA_NAME:
16802 : 433815 : if (gimple *_d1 = get_def (valueize, _q20))
16803 : : {
16804 : 429127 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16805 : 447206 : switch (gimple_assign_rhs_code (_a1))
16806 : : {
16807 : 16 : case BIT_NOT_EXPR:
16808 : 16 : {
16809 : 16 : tree _q30 = gimple_assign_rhs1 (_a1);
16810 : 16 : _q30 = do_valueize (valueize, _q30);
16811 : 16 : switch (TREE_CODE (_p1))
16812 : : {
16813 : 16 : case SSA_NAME:
16814 : 16 : if (gimple *_d2 = get_def (valueize, _p1))
16815 : : {
16816 : 16 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16817 : 16 : switch (gimple_assign_rhs_code (_a2))
16818 : : {
16819 : 16 : case BIT_NOT_EXPR:
16820 : 16 : {
16821 : 16 : tree _q50 = gimple_assign_rhs1 (_a2);
16822 : 16 : _q50 = do_valueize (valueize, _q50);
16823 : 16 : {
16824 : 16 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _p1, _q50 };
16825 : 16 : if (gimple_simplify_268 (res_op, seq, valueize, type, captures, EQ_EXPR))
16826 : 0 : return true;
16827 : : }
16828 : 16 : break;
16829 : : }
16830 : : default:;
16831 : : }
16832 : : }
16833 : : break;
16834 : 16 : default:;
16835 : : }
16836 : 16 : {
16837 : 16 : tree _p1_pops[1];
16838 : 16 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
16839 : : {
16840 : 0 : tree _q50 = _p1_pops[0];
16841 : 0 : switch (TREE_CODE (_q50))
16842 : : {
16843 : 0 : case SSA_NAME:
16844 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
16845 : : {
16846 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16847 : 0 : switch (gimple_assign_rhs_code (_a2))
16848 : : {
16849 : 0 : case BIT_NOT_EXPR:
16850 : 0 : {
16851 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
16852 : 0 : _q60 = do_valueize (valueize, _q60);
16853 : 0 : {
16854 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q60 };
16855 : 0 : if (gimple_simplify_268 (res_op, seq, valueize, type, captures, EQ_EXPR))
16856 : 0 : return true;
16857 : : }
16858 : 0 : break;
16859 : : }
16860 : : default:;
16861 : : }
16862 : : }
16863 : : break;
16864 : : default:;
16865 : : }
16866 : : }
16867 : : }
16868 : 16 : if (CONSTANT_CLASS_P (_p1))
16869 : : {
16870 : 0 : {
16871 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
16872 : 0 : if (gimple_simplify_269 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
16873 : 0 : return true;
16874 : : }
16875 : : }
16876 : : break;
16877 : : }
16878 : : default:;
16879 : : }
16880 : : }
16881 : : break;
16882 : : default:;
16883 : : }
16884 : : }
16885 : : }
16886 : 77286281 : switch (TREE_CODE (_p1))
16887 : : {
16888 : 360485 : case REAL_CST:
16889 : 360485 : {
16890 : 360485 : {
16891 : 360485 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16892 : 360485 : if (gimple_simplify_271 (res_op, seq, valueize, type, captures, EQ_EXPR))
16893 : 91 : return true;
16894 : : }
16895 : 360394 : break;
16896 : : }
16897 : 77286190 : default:;
16898 : : }
16899 : 77286190 : switch (TREE_CODE (_p0))
16900 : : {
16901 : 76476813 : case SSA_NAME:
16902 : 76476813 : if (gimple *_d1 = get_def (valueize, _p0))
16903 : : {
16904 : 26250190 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16905 : 31854882 : switch (gimple_assign_rhs_code (_a1))
16906 : : {
16907 : 870969 : case PLUS_EXPR:
16908 : 870969 : {
16909 : 870969 : tree _q20 = gimple_assign_rhs1 (_a1);
16910 : 870969 : _q20 = do_valueize (valueize, _q20);
16911 : 870969 : tree _q21 = gimple_assign_rhs2 (_a1);
16912 : 870969 : _q21 = do_valueize (valueize, _q21);
16913 : 870969 : if (tree_swap_operands_p (_q20, _q21))
16914 : 6865 : std::swap (_q20, _q21);
16915 : 870969 : switch (TREE_CODE (_q21))
16916 : : {
16917 : 2339 : case REAL_CST:
16918 : 2339 : {
16919 : 2339 : switch (TREE_CODE (_p1))
16920 : : {
16921 : 2093 : case REAL_CST:
16922 : 2093 : {
16923 : 2093 : {
16924 : 2093 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
16925 : 2093 : if (gimple_simplify_272 (res_op, seq, valueize, type, captures, PLUS_EXPR, EQ_EXPR))
16926 : 0 : return true;
16927 : : }
16928 : 2093 : break;
16929 : : }
16930 : : default:;
16931 : : }
16932 : : break;
16933 : : }
16934 : : default:;
16935 : : }
16936 : 76387153 : break;
16937 : : }
16938 : 224060 : case MINUS_EXPR:
16939 : 224060 : {
16940 : 224060 : tree _q20 = gimple_assign_rhs1 (_a1);
16941 : 224060 : _q20 = do_valueize (valueize, _q20);
16942 : 224060 : tree _q21 = gimple_assign_rhs2 (_a1);
16943 : 224060 : _q21 = do_valueize (valueize, _q21);
16944 : 224060 : switch (TREE_CODE (_q21))
16945 : : {
16946 : 176 : case REAL_CST:
16947 : 176 : {
16948 : 176 : switch (TREE_CODE (_p1))
16949 : : {
16950 : 176 : case REAL_CST:
16951 : 176 : {
16952 : 176 : {
16953 : 176 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
16954 : 176 : if (gimple_simplify_272 (res_op, seq, valueize, type, captures, MINUS_EXPR, EQ_EXPR))
16955 : 0 : return true;
16956 : : }
16957 : 176 : break;
16958 : : }
16959 : : default:;
16960 : : }
16961 : : break;
16962 : : }
16963 : 224060 : default:;
16964 : : }
16965 : 224060 : switch (TREE_CODE (_q20))
16966 : : {
16967 : 1344 : case REAL_CST:
16968 : 1344 : {
16969 : 1344 : switch (TREE_CODE (_p1))
16970 : : {
16971 : 1336 : case REAL_CST:
16972 : 1336 : {
16973 : 1336 : {
16974 : 1336 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
16975 : 1336 : if (gimple_simplify_273 (res_op, seq, valueize, type, captures, EQ_EXPR))
16976 : 0 : return true;
16977 : : }
16978 : 1336 : break;
16979 : : }
16980 : : default:;
16981 : : }
16982 : : break;
16983 : : }
16984 : : default:;
16985 : : }
16986 : : break;
16987 : : }
16988 : 3602 : case FLOAT_EXPR:
16989 : 3602 : {
16990 : 3602 : tree _q20 = gimple_assign_rhs1 (_a1);
16991 : 3602 : _q20 = do_valueize (valueize, _q20);
16992 : 3602 : switch (TREE_CODE (_p1))
16993 : : {
16994 : 2979 : case SSA_NAME:
16995 : 2979 : if (gimple *_d2 = get_def (valueize, _p1))
16996 : : {
16997 : 2869 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16998 : 5095 : switch (gimple_assign_rhs_code (_a2))
16999 : : {
17000 : 108 : case FLOAT_EXPR:
17001 : 108 : {
17002 : 108 : tree _q40 = gimple_assign_rhs1 (_a2);
17003 : 108 : _q40 = do_valueize (valueize, _q40);
17004 : 108 : {
17005 : 108 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
17006 : 108 : if (gimple_simplify_276 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
17007 : 0 : return true;
17008 : : }
17009 : 108 : break;
17010 : : }
17011 : : default:;
17012 : : }
17013 : : }
17014 : : break;
17015 : 623 : case REAL_CST:
17016 : 623 : {
17017 : 623 : {
17018 : 623 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17019 : 623 : if (gimple_simplify_277 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
17020 : 104 : return true;
17021 : : }
17022 : 519 : break;
17023 : : }
17024 : : default:;
17025 : : }
17026 : : break;
17027 : : }
17028 : 38592 : case EXACT_DIV_EXPR:
17029 : 38592 : {
17030 : 38592 : tree _q20 = gimple_assign_rhs1 (_a1);
17031 : 38592 : _q20 = do_valueize (valueize, _q20);
17032 : 38592 : tree _q21 = gimple_assign_rhs2 (_a1);
17033 : 38592 : _q21 = do_valueize (valueize, _q21);
17034 : 38592 : switch (TREE_CODE (_p1))
17035 : : {
17036 : 20134 : case INTEGER_CST:
17037 : 20134 : {
17038 : 20134 : {
17039 : 20134 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
17040 : 20134 : if (gimple_simplify_278 (res_op, seq, valueize, type, captures, EQ_EXPR))
17041 : 20134 : return true;
17042 : : }
17043 : 0 : break;
17044 : : }
17045 : : default:;
17046 : : }
17047 : : break;
17048 : : }
17049 : 6578 : case NEGATE_EXPR:
17050 : 6578 : {
17051 : 6578 : tree _q20 = gimple_assign_rhs1 (_a1);
17052 : 6578 : _q20 = do_valueize (valueize, _q20);
17053 : 6578 : switch (TREE_CODE (_p1))
17054 : : {
17055 : 1085 : case SSA_NAME:
17056 : 1085 : if (gimple *_d2 = get_def (valueize, _p1))
17057 : : {
17058 : 1035 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17059 : 954 : switch (gimple_assign_rhs_code (_a2))
17060 : : {
17061 : 40 : case NEGATE_EXPR:
17062 : 40 : {
17063 : 40 : tree _q40 = gimple_assign_rhs1 (_a2);
17064 : 40 : _q40 = do_valueize (valueize, _q40);
17065 : 40 : {
17066 : 40 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
17067 : 40 : if (gimple_simplify_279 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
17068 : 40 : return true;
17069 : : }
17070 : 0 : break;
17071 : : }
17072 : : default:;
17073 : : }
17074 : : }
17075 : : break;
17076 : 6538 : default:;
17077 : : }
17078 : 6538 : if (CONSTANT_CLASS_P (_p1))
17079 : : {
17080 : 5493 : {
17081 : 5493 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17082 : 5493 : if (gimple_simplify_280 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
17083 : 5493 : return true;
17084 : : }
17085 : : }
17086 : : break;
17087 : : }
17088 : 6856 : case ABS_EXPR:
17089 : 6856 : {
17090 : 6856 : tree _q20 = gimple_assign_rhs1 (_a1);
17091 : 6856 : _q20 = do_valueize (valueize, _q20);
17092 : 6856 : if (zerop (_p1))
17093 : : {
17094 : 4349 : {
17095 : 4349 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17096 : 4349 : const enum tree_code eqne = EQ_EXPR;
17097 : 4349 : gimple_seq *lseq = seq;
17098 : 4349 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2351;
17099 : 4349 : {
17100 : 4349 : res_op->set_op (eqne, type, 2);
17101 : 4349 : res_op->ops[0] = captures[0];
17102 : 4349 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[0]));
17103 : 4349 : res_op->resimplify (lseq, valueize);
17104 : 4349 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1126, __FILE__, __LINE__, true);
17105 : 4349 : return true;
17106 : : }
17107 : 0 : next_after_fail2351:;
17108 : : }
17109 : : }
17110 : : break;
17111 : : }
17112 : 6 : case ABSU_EXPR:
17113 : 6 : {
17114 : 6 : tree _q20 = gimple_assign_rhs1 (_a1);
17115 : 6 : _q20 = do_valueize (valueize, _q20);
17116 : 6 : if (zerop (_p1))
17117 : : {
17118 : 2 : {
17119 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17120 : 2 : const enum tree_code eqne = EQ_EXPR;
17121 : 2 : gimple_seq *lseq = seq;
17122 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2352;
17123 : 2 : {
17124 : 2 : res_op->set_op (eqne, type, 2);
17125 : 2 : res_op->ops[0] = captures[0];
17126 : 2 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[0]));
17127 : 2 : res_op->resimplify (lseq, valueize);
17128 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1126, __FILE__, __LINE__, true);
17129 : 2 : return true;
17130 : : }
17131 : 0 : next_after_fail2352:;
17132 : : }
17133 : : }
17134 : : break;
17135 : : }
17136 : 752473 : CASE_CONVERT:
17137 : 752473 : {
17138 : 752473 : tree _q20 = gimple_assign_rhs1 (_a1);
17139 : 752473 : _q20 = do_valueize (valueize, _q20);
17140 : 752473 : switch (TREE_CODE (_p1))
17141 : : {
17142 : 176523 : case SSA_NAME:
17143 : 176523 : if (gimple *_d2 = get_def (valueize, _p1))
17144 : : {
17145 : 166808 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17146 : 179286 : switch (gimple_assign_rhs_code (_a2))
17147 : : {
17148 : 38074 : CASE_CONVERT:
17149 : 38074 : {
17150 : 38074 : tree _q40 = gimple_assign_rhs1 (_a2);
17151 : 38074 : _q40 = do_valueize (valueize, _q40);
17152 : 38074 : {
17153 : 38074 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17154 : 38074 : if (gimple_simplify_281 (res_op, seq, valueize, type, captures, EQ_EXPR))
17155 : 4408 : return true;
17156 : : }
17157 : 33666 : break;
17158 : : }
17159 : : default:;
17160 : : }
17161 : : }
17162 : : break;
17163 : 748065 : default:;
17164 : : }
17165 : 748065 : {
17166 : 748065 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
17167 : 748065 : if (gimple_simplify_282 (res_op, seq, valueize, type, captures, EQ_EXPR))
17168 : 54656 : return true;
17169 : : }
17170 : 693409 : switch (TREE_CODE (_q20))
17171 : : {
17172 : 680536 : case SSA_NAME:
17173 : 680536 : if (gimple *_d2 = get_def (valueize, _q20))
17174 : : {
17175 : 671810 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17176 : 802360 : switch (gimple_assign_rhs_code (_a2))
17177 : : {
17178 : 1118 : case BIT_IOR_EXPR:
17179 : 1118 : {
17180 : 1118 : tree _q30 = gimple_assign_rhs1 (_a2);
17181 : 1118 : _q30 = do_valueize (valueize, _q30);
17182 : 1118 : tree _q31 = gimple_assign_rhs2 (_a2);
17183 : 1118 : _q31 = do_valueize (valueize, _q31);
17184 : 1118 : if (tree_swap_operands_p (_q30, _q31))
17185 : 23 : std::swap (_q30, _q31);
17186 : 1118 : switch (TREE_CODE (_q31))
17187 : : {
17188 : 216 : case INTEGER_CST:
17189 : 216 : {
17190 : 216 : switch (TREE_CODE (_p1))
17191 : : {
17192 : 56 : case INTEGER_CST:
17193 : 56 : {
17194 : 56 : {
17195 : 56 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _p1 };
17196 : 56 : if (gimple_simplify_283 (res_op, seq, valueize, type, captures, EQ_EXPR))
17197 : 0 : return true;
17198 : : }
17199 : 56 : break;
17200 : : }
17201 : : default:;
17202 : : }
17203 : : break;
17204 : : }
17205 : : default:;
17206 : : }
17207 : 76387153 : break;
17208 : : }
17209 : : default:;
17210 : : }
17211 : : }
17212 : : break;
17213 : : default:;
17214 : : }
17215 : : break;
17216 : : }
17217 : 115664 : case BIT_IOR_EXPR:
17218 : 115664 : {
17219 : 115664 : tree _q20 = gimple_assign_rhs1 (_a1);
17220 : 115664 : _q20 = do_valueize (valueize, _q20);
17221 : 115664 : tree _q21 = gimple_assign_rhs2 (_a1);
17222 : 115664 : _q21 = do_valueize (valueize, _q21);
17223 : 115664 : if (tree_swap_operands_p (_q20, _q21))
17224 : 7682 : std::swap (_q20, _q21);
17225 : 115664 : switch (TREE_CODE (_q21))
17226 : : {
17227 : 5529 : case INTEGER_CST:
17228 : 5529 : {
17229 : 5529 : switch (TREE_CODE (_p1))
17230 : : {
17231 : 3818 : case INTEGER_CST:
17232 : 3818 : {
17233 : 3818 : {
17234 : 3818 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
17235 : 3818 : if (gimple_simplify_283 (res_op, seq, valueize, type, captures, EQ_EXPR))
17236 : 4 : return true;
17237 : : }
17238 : 3814 : break;
17239 : : }
17240 : : default:;
17241 : : }
17242 : : break;
17243 : : }
17244 : : default:;
17245 : : }
17246 : 76387153 : break;
17247 : : }
17248 : 1221 : case BIT_XOR_EXPR:
17249 : 1221 : {
17250 : 1221 : tree _q20 = gimple_assign_rhs1 (_a1);
17251 : 1221 : _q20 = do_valueize (valueize, _q20);
17252 : 1221 : tree _q21 = gimple_assign_rhs2 (_a1);
17253 : 1221 : _q21 = do_valueize (valueize, _q21);
17254 : 1221 : if (tree_swap_operands_p (_q20, _q21))
17255 : 154 : std::swap (_q20, _q21);
17256 : 1221 : if (integer_zerop (_p1))
17257 : : {
17258 : 414 : {
17259 : 414 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
17260 : 414 : if (gimple_simplify_285 (res_op, seq, valueize, type, captures, EQ_EXPR))
17261 : 414 : return true;
17262 : : }
17263 : : }
17264 : 807 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
17265 : : {
17266 : 0 : {
17267 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
17268 : 0 : if (gimple_simplify_286 (res_op, seq, valueize, type, captures, EQ_EXPR))
17269 : 0 : return true;
17270 : : }
17271 : : }
17272 : 807 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
17273 : : {
17274 : 14 : {
17275 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
17276 : 14 : if (gimple_simplify_286 (res_op, seq, valueize, type, captures, EQ_EXPR))
17277 : 14 : return true;
17278 : : }
17279 : : }
17280 : 76387153 : break;
17281 : : }
17282 : : default:;
17283 : : }
17284 : 8442482 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
17285 : 4923264 : switch (gimple_call_combined_fn (_c1))
17286 : : {
17287 : 61 : case CFN_BUILT_IN_SQRTF:
17288 : 61 : if (gimple_call_num_args (_c1) == 1)
17289 : : {
17290 : 61 : tree _q20 = gimple_call_arg (_c1, 0);
17291 : 61 : _q20 = do_valueize (valueize, _q20);
17292 : 61 : switch (TREE_CODE (_p1))
17293 : : {
17294 : 2 : case SSA_NAME:
17295 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
17296 : : {
17297 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17298 : 2 : switch (gimple_call_combined_fn (_c2))
17299 : : {
17300 : 2 : case CFN_BUILT_IN_SQRTF:
17301 : 2 : if (gimple_call_num_args (_c2) == 1)
17302 : : {
17303 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17304 : 2 : _q40 = do_valueize (valueize, _q40);
17305 : 2 : {
17306 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
17307 : 2 : if (gimple_simplify_275 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF, EQ_EXPR))
17308 : 2 : return true;
17309 : : }
17310 : : }
17311 : : break;
17312 : : default:;
17313 : : }
17314 : : }
17315 : : break;
17316 : 59 : case REAL_CST:
17317 : 59 : {
17318 : 59 : {
17319 : 59 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17320 : 59 : if (gimple_simplify_274 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF, EQ_EXPR))
17321 : 12 : return true;
17322 : : }
17323 : 47 : break;
17324 : : }
17325 : : default:;
17326 : : }
17327 : : }
17328 : : break;
17329 : 14 : case CFN_BUILT_IN_SQRTL:
17330 : 14 : if (gimple_call_num_args (_c1) == 1)
17331 : : {
17332 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
17333 : 14 : _q20 = do_valueize (valueize, _q20);
17334 : 14 : switch (TREE_CODE (_p1))
17335 : : {
17336 : 2 : case SSA_NAME:
17337 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
17338 : : {
17339 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17340 : 2 : switch (gimple_call_combined_fn (_c2))
17341 : : {
17342 : 2 : case CFN_BUILT_IN_SQRTL:
17343 : 2 : if (gimple_call_num_args (_c2) == 1)
17344 : : {
17345 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17346 : 2 : _q40 = do_valueize (valueize, _q40);
17347 : 2 : {
17348 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
17349 : 2 : if (gimple_simplify_275 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTL, EQ_EXPR))
17350 : 2 : return true;
17351 : : }
17352 : : }
17353 : : break;
17354 : : default:;
17355 : : }
17356 : : }
17357 : : break;
17358 : 12 : case REAL_CST:
17359 : 12 : {
17360 : 12 : {
17361 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17362 : 12 : if (gimple_simplify_274 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTL, EQ_EXPR))
17363 : 12 : return true;
17364 : : }
17365 : 0 : break;
17366 : : }
17367 : : default:;
17368 : : }
17369 : : }
17370 : : break;
17371 : 187 : case CFN_BUILT_IN_SQRT:
17372 : 187 : if (gimple_call_num_args (_c1) == 1)
17373 : : {
17374 : 187 : tree _q20 = gimple_call_arg (_c1, 0);
17375 : 187 : _q20 = do_valueize (valueize, _q20);
17376 : 187 : switch (TREE_CODE (_p1))
17377 : : {
17378 : 2 : case SSA_NAME:
17379 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
17380 : : {
17381 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17382 : 2 : switch (gimple_call_combined_fn (_c2))
17383 : : {
17384 : 2 : case CFN_BUILT_IN_SQRT:
17385 : 2 : if (gimple_call_num_args (_c2) == 1)
17386 : : {
17387 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17388 : 2 : _q40 = do_valueize (valueize, _q40);
17389 : 2 : {
17390 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
17391 : 2 : if (gimple_simplify_275 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRT, EQ_EXPR))
17392 : 2 : return true;
17393 : : }
17394 : : }
17395 : : break;
17396 : : default:;
17397 : : }
17398 : : }
17399 : : break;
17400 : 185 : case REAL_CST:
17401 : 185 : {
17402 : 185 : {
17403 : 185 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17404 : 185 : if (gimple_simplify_274 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRT, EQ_EXPR))
17405 : 12 : return true;
17406 : : }
17407 : 173 : break;
17408 : : }
17409 : : default:;
17410 : : }
17411 : : }
17412 : : break;
17413 : 129 : case CFN_SQRT:
17414 : 129 : if (gimple_call_num_args (_c1) == 1)
17415 : : {
17416 : 129 : tree _q20 = gimple_call_arg (_c1, 0);
17417 : 129 : _q20 = do_valueize (valueize, _q20);
17418 : 129 : switch (TREE_CODE (_p1))
17419 : : {
17420 : 0 : case SSA_NAME:
17421 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
17422 : : {
17423 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17424 : 0 : switch (gimple_call_combined_fn (_c2))
17425 : : {
17426 : 0 : case CFN_SQRT:
17427 : 0 : if (gimple_call_num_args (_c2) == 1)
17428 : : {
17429 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17430 : 0 : _q40 = do_valueize (valueize, _q40);
17431 : 0 : {
17432 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
17433 : 0 : if (gimple_simplify_275 (res_op, seq, valueize, type, captures, CFN_SQRT, EQ_EXPR))
17434 : 0 : return true;
17435 : : }
17436 : : }
17437 : : break;
17438 : : default:;
17439 : : }
17440 : : }
17441 : : break;
17442 : 129 : case REAL_CST:
17443 : 129 : {
17444 : 129 : {
17445 : 129 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
17446 : 129 : if (gimple_simplify_274 (res_op, seq, valueize, type, captures, CFN_SQRT, EQ_EXPR))
17447 : 0 : return true;
17448 : : }
17449 : 129 : break;
17450 : : }
17451 : : default:;
17452 : : }
17453 : : }
17454 : : break;
17455 : : default:;
17456 : : }
17457 : : }
17458 : 76387153 : {
17459 : 76387153 : switch (TREE_CODE (_p1))
17460 : : {
17461 : 12444803 : case SSA_NAME:
17462 : 12444803 : if (gimple *_d1 = get_def (valueize, _p1))
17463 : : {
17464 : 4162251 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17465 : 6095114 : switch (gimple_assign_rhs_code (_a1))
17466 : : {
17467 : 405517 : case ADDR_EXPR:
17468 : 405517 : {
17469 : 405517 : {
17470 : 405517 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
17471 : 405517 : if (gimple_simplify_284 (res_op, seq, valueize, type, captures, EQ_EXPR))
17472 : 0 : return true;
17473 : : }
17474 : 405517 : break;
17475 : : }
17476 : : default:;
17477 : : }
17478 : : }
17479 : : break;
17480 : 4920144 : case ADDR_EXPR:
17481 : 4920144 : {
17482 : 4920144 : {
17483 : 4920144 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
17484 : 4920144 : if (gimple_simplify_284 (res_op, seq, valueize, type, captures, EQ_EXPR))
17485 : 75 : return true;
17486 : : }
17487 : 4920069 : break;
17488 : : }
17489 : : default:;
17490 : : }
17491 : : }
17492 : : break;
17493 : 77196455 : default:;
17494 : : }
17495 : 77196455 : switch (TREE_CODE (_p1))
17496 : : {
17497 : 12494928 : case SSA_NAME:
17498 : 12494928 : if (gimple *_d1 = get_def (valueize, _p1))
17499 : : {
17500 : 4162251 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17501 : 6095114 : switch (gimple_assign_rhs_code (_a1))
17502 : : {
17503 : 382 : case BIT_XOR_EXPR:
17504 : 382 : {
17505 : 382 : tree _q30 = gimple_assign_rhs1 (_a1);
17506 : 382 : _q30 = do_valueize (valueize, _q30);
17507 : 382 : tree _q31 = gimple_assign_rhs2 (_a1);
17508 : 382 : _q31 = do_valueize (valueize, _q31);
17509 : 382 : if (tree_swap_operands_p (_q30, _q31))
17510 : 18 : std::swap (_q30, _q31);
17511 : 382 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
17512 : : {
17513 : 18 : {
17514 : 18 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
17515 : 18 : if (gimple_simplify_286 (res_op, seq, valueize, type, captures, EQ_EXPR))
17516 : 18 : return true;
17517 : : }
17518 : : }
17519 : 364 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
17520 : : {
17521 : 0 : {
17522 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
17523 : 0 : if (gimple_simplify_286 (res_op, seq, valueize, type, captures, EQ_EXPR))
17524 : 0 : return true;
17525 : : }
17526 : : }
17527 : 77196437 : break;
17528 : : }
17529 : : default:;
17530 : : }
17531 : : }
17532 : : break;
17533 : 77196437 : default:;
17534 : : }
17535 : 77196437 : switch (TREE_CODE (_p0))
17536 : : {
17537 : 76387060 : case SSA_NAME:
17538 : 76387060 : if (gimple *_d1 = get_def (valueize, _p0))
17539 : : {
17540 : 26160455 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17541 : 31765264 : switch (gimple_assign_rhs_code (_a1))
17542 : : {
17543 : 1189489 : case BIT_AND_EXPR:
17544 : 1189489 : {
17545 : 1189489 : tree _q20 = gimple_assign_rhs1 (_a1);
17546 : 1189489 : _q20 = do_valueize (valueize, _q20);
17547 : 1189489 : tree _q21 = gimple_assign_rhs2 (_a1);
17548 : 1189489 : _q21 = do_valueize (valueize, _q21);
17549 : 1189489 : if (tree_swap_operands_p (_q20, _q21))
17550 : 5762 : std::swap (_q20, _q21);
17551 : 1189489 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
17552 : : {
17553 : 83 : {
17554 : 83 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
17555 : 83 : if (gimple_simplify_287 (res_op, seq, valueize, type, captures, EQ_EXPR))
17556 : 24 : return true;
17557 : : }
17558 : : }
17559 : 1189465 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
17560 : : {
17561 : 116612 : {
17562 : 116612 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
17563 : 116612 : if (gimple_simplify_287 (res_op, seq, valueize, type, captures, EQ_EXPR))
17564 : 0 : return true;
17565 : : }
17566 : : }
17567 : 77196413 : break;
17568 : : }
17569 : : default:;
17570 : : }
17571 : : }
17572 : : break;
17573 : 77196413 : default:;
17574 : : }
17575 : 77196413 : switch (TREE_CODE (_p1))
17576 : : {
17577 : 12494886 : case SSA_NAME:
17578 : 12494886 : if (gimple *_d1 = get_def (valueize, _p1))
17579 : : {
17580 : 4162210 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17581 : 6095088 : switch (gimple_assign_rhs_code (_a1))
17582 : : {
17583 : 13827 : case BIT_AND_EXPR:
17584 : 13827 : {
17585 : 13827 : tree _q30 = gimple_assign_rhs1 (_a1);
17586 : 13827 : _q30 = do_valueize (valueize, _q30);
17587 : 13827 : tree _q31 = gimple_assign_rhs2 (_a1);
17588 : 13827 : _q31 = do_valueize (valueize, _q31);
17589 : 13827 : if (tree_swap_operands_p (_q30, _q31))
17590 : 188 : std::swap (_q30, _q31);
17591 : 13827 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
17592 : : {
17593 : 657 : {
17594 : 657 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
17595 : 657 : if (gimple_simplify_287 (res_op, seq, valueize, type, captures, EQ_EXPR))
17596 : 14 : return true;
17597 : : }
17598 : : }
17599 : 13813 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
17600 : : {
17601 : 16 : {
17602 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
17603 : 16 : if (gimple_simplify_287 (res_op, seq, valueize, type, captures, EQ_EXPR))
17604 : 0 : return true;
17605 : : }
17606 : : }
17607 : 77196399 : break;
17608 : : }
17609 : : default:;
17610 : : }
17611 : : }
17612 : : break;
17613 : 77196399 : default:;
17614 : : }
17615 : 77196399 : switch (TREE_CODE (_p0))
17616 : : {
17617 : 76387022 : case SSA_NAME:
17618 : 76387022 : if (gimple *_d1 = get_def (valueize, _p0))
17619 : : {
17620 : 26160417 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17621 : 31765240 : switch (gimple_assign_rhs_code (_a1))
17622 : : {
17623 : 693409 : CASE_CONVERT:
17624 : 693409 : {
17625 : 693409 : tree _q20 = gimple_assign_rhs1 (_a1);
17626 : 693409 : _q20 = do_valueize (valueize, _q20);
17627 : 693409 : switch (TREE_CODE (_q20))
17628 : : {
17629 : 680536 : case SSA_NAME:
17630 : 680536 : if (gimple *_d2 = get_def (valueize, _q20))
17631 : : {
17632 : 671810 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17633 : 802360 : switch (gimple_assign_rhs_code (_a2))
17634 : : {
17635 : 4074 : case BIT_AND_EXPR:
17636 : 4074 : {
17637 : 4074 : tree _q30 = gimple_assign_rhs1 (_a2);
17638 : 4074 : _q30 = do_valueize (valueize, _q30);
17639 : 4074 : tree _q31 = gimple_assign_rhs2 (_a2);
17640 : 4074 : _q31 = do_valueize (valueize, _q31);
17641 : 4074 : if (tree_swap_operands_p (_q30, _q31))
17642 : 4 : std::swap (_q30, _q31);
17643 : 4074 : switch (TREE_CODE (_q30))
17644 : : {
17645 : 4074 : case SSA_NAME:
17646 : 4074 : if (gimple *_d3 = get_def (valueize, _q30))
17647 : : {
17648 : 4051 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
17649 : 7374 : switch (gimple_assign_rhs_code (_a3))
17650 : : {
17651 : 16 : CASE_CONVERT:
17652 : 16 : {
17653 : 16 : tree _q40 = gimple_assign_rhs1 (_a3);
17654 : 16 : _q40 = do_valueize (valueize, _q40);
17655 : 16 : switch (TREE_CODE (_q31))
17656 : : {
17657 : 8 : case INTEGER_CST:
17658 : 8 : {
17659 : 8 : switch (TREE_CODE (_p1))
17660 : : {
17661 : 0 : case SSA_NAME:
17662 : 0 : if (gimple *_d4 = get_def (valueize, _p1))
17663 : : {
17664 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
17665 : 0 : switch (gimple_assign_rhs_code (_a4))
17666 : : {
17667 : 0 : CASE_CONVERT:
17668 : 0 : {
17669 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
17670 : 0 : _q70 = do_valueize (valueize, _q70);
17671 : 0 : if ((_q70 == _q40 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q40, 0) && types_match (_q70, _q40)))
17672 : : {
17673 : 0 : {
17674 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q31 };
17675 : 0 : if (gimple_simplify_288 (res_op, seq, valueize, type, captures, EQ_EXPR))
17676 : 0 : return true;
17677 : : }
17678 : : }
17679 : : break;
17680 : : }
17681 : : default:;
17682 : : }
17683 : : }
17684 : : break;
17685 : : default:;
17686 : : }
17687 : : break;
17688 : : }
17689 : : default:;
17690 : : }
17691 : : break;
17692 : : }
17693 : : default:;
17694 : : }
17695 : : }
17696 : : break;
17697 : : default:;
17698 : : }
17699 : 693409 : break;
17700 : : }
17701 : : default:;
17702 : : }
17703 : : }
17704 : : break;
17705 : 693409 : default:;
17706 : : }
17707 : 693409 : switch (TREE_CODE (_p1))
17708 : : {
17709 : 172115 : case SSA_NAME:
17710 : 172115 : if (gimple *_d2 = get_def (valueize, _p1))
17711 : : {
17712 : 162400 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17713 : 174878 : switch (gimple_assign_rhs_code (_a2))
17714 : : {
17715 : 33666 : CASE_CONVERT:
17716 : 33666 : {
17717 : 33666 : tree _q40 = gimple_assign_rhs1 (_a2);
17718 : 33666 : _q40 = do_valueize (valueize, _q40);
17719 : 33666 : switch (TREE_CODE (_q40))
17720 : : {
17721 : 16612 : case SSA_NAME:
17722 : 16612 : if (gimple *_d3 = get_def (valueize, _q40))
17723 : : {
17724 : 16464 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
17725 : 22271 : switch (gimple_assign_rhs_code (_a3))
17726 : : {
17727 : 25 : case BIT_AND_EXPR:
17728 : 25 : {
17729 : 25 : tree _q50 = gimple_assign_rhs1 (_a3);
17730 : 25 : _q50 = do_valueize (valueize, _q50);
17731 : 25 : tree _q51 = gimple_assign_rhs2 (_a3);
17732 : 25 : _q51 = do_valueize (valueize, _q51);
17733 : 25 : if (tree_swap_operands_p (_q50, _q51))
17734 : 0 : std::swap (_q50, _q51);
17735 : 25 : switch (TREE_CODE (_q50))
17736 : : {
17737 : 25 : case SSA_NAME:
17738 : 25 : if (gimple *_d4 = get_def (valueize, _q50))
17739 : : {
17740 : 25 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
17741 : 18 : switch (gimple_assign_rhs_code (_a4))
17742 : : {
17743 : 12 : CASE_CONVERT:
17744 : 12 : {
17745 : 12 : tree _q60 = gimple_assign_rhs1 (_a4);
17746 : 12 : _q60 = do_valueize (valueize, _q60);
17747 : 12 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
17748 : : {
17749 : 0 : switch (TREE_CODE (_q51))
17750 : : {
17751 : 0 : case INTEGER_CST:
17752 : 0 : {
17753 : 0 : {
17754 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q50, _q20, _q51 };
17755 : 0 : if (gimple_simplify_288 (res_op, seq, valueize, type, captures, EQ_EXPR))
17756 : 0 : return true;
17757 : : }
17758 : 0 : break;
17759 : : }
17760 : : default:;
17761 : : }
17762 : : }
17763 : : break;
17764 : : }
17765 : : default:;
17766 : : }
17767 : : }
17768 : : break;
17769 : : default:;
17770 : : }
17771 : 77194145 : break;
17772 : : }
17773 : : default:;
17774 : : }
17775 : : }
17776 : : break;
17777 : : default:;
17778 : : }
17779 : : break;
17780 : : }
17781 : : default:;
17782 : : }
17783 : : }
17784 : : break;
17785 : : default:;
17786 : : }
17787 : : break;
17788 : : }
17789 : 115660 : case BIT_IOR_EXPR:
17790 : 115660 : {
17791 : 115660 : tree _q20 = gimple_assign_rhs1 (_a1);
17792 : 115660 : _q20 = do_valueize (valueize, _q20);
17793 : 115660 : tree _q21 = gimple_assign_rhs2 (_a1);
17794 : 115660 : _q21 = do_valueize (valueize, _q21);
17795 : 115660 : if (tree_swap_operands_p (_q20, _q21))
17796 : 7680 : std::swap (_q20, _q21);
17797 : 115660 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
17798 : : {
17799 : 2287 : {
17800 : 2287 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
17801 : 2287 : if (gimple_simplify_289 (res_op, seq, valueize, type, captures, EQ_EXPR))
17802 : 2254 : return true;
17803 : : }
17804 : : }
17805 : 113406 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
17806 : : {
17807 : 15 : {
17808 : 15 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
17809 : 15 : if (gimple_simplify_289 (res_op, seq, valueize, type, captures, EQ_EXPR))
17810 : 0 : return true;
17811 : : }
17812 : : }
17813 : 77194145 : break;
17814 : : }
17815 : : default:;
17816 : : }
17817 : : }
17818 : : break;
17819 : 77194145 : default:;
17820 : : }
17821 : 77194145 : switch (TREE_CODE (_p1))
17822 : : {
17823 : 12494872 : case SSA_NAME:
17824 : 12494872 : if (gimple *_d1 = get_def (valueize, _p1))
17825 : : {
17826 : 4162196 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17827 : 6095074 : switch (gimple_assign_rhs_code (_a1))
17828 : : {
17829 : 3858 : case BIT_IOR_EXPR:
17830 : 3858 : {
17831 : 3858 : tree _q30 = gimple_assign_rhs1 (_a1);
17832 : 3858 : _q30 = do_valueize (valueize, _q30);
17833 : 3858 : tree _q31 = gimple_assign_rhs2 (_a1);
17834 : 3858 : _q31 = do_valueize (valueize, _q31);
17835 : 3858 : if (tree_swap_operands_p (_q30, _q31))
17836 : 160 : std::swap (_q30, _q31);
17837 : 3858 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
17838 : : {
17839 : 61 : {
17840 : 61 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
17841 : 61 : if (gimple_simplify_289 (res_op, seq, valueize, type, captures, EQ_EXPR))
17842 : 0 : return true;
17843 : : }
17844 : : }
17845 : 3858 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
17846 : : {
17847 : 122 : {
17848 : 122 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _p0 };
17849 : 122 : if (gimple_simplify_289 (res_op, seq, valueize, type, captures, EQ_EXPR))
17850 : 0 : return true;
17851 : : }
17852 : : }
17853 : 77194145 : break;
17854 : : }
17855 : : default:;
17856 : : }
17857 : : }
17858 : : break;
17859 : 77194145 : default:;
17860 : : }
17861 : 77194145 : switch (TREE_CODE (_p0))
17862 : : {
17863 : 76384768 : case SSA_NAME:
17864 : 76384768 : if (gimple *_d1 = get_def (valueize, _p0))
17865 : : {
17866 : 26158163 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17867 : 31762986 : switch (gimple_assign_rhs_code (_a1))
17868 : : {
17869 : 693409 : CASE_CONVERT:
17870 : 693409 : {
17871 : 693409 : tree _q20 = gimple_assign_rhs1 (_a1);
17872 : 693409 : _q20 = do_valueize (valueize, _q20);
17873 : 693409 : switch (TREE_CODE (_q20))
17874 : : {
17875 : 680536 : case SSA_NAME:
17876 : 680536 : if (gimple *_d2 = get_def (valueize, _q20))
17877 : : {
17878 : 671810 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17879 : 802360 : switch (gimple_assign_rhs_code (_a2))
17880 : : {
17881 : 25 : case BIT_XOR_EXPR:
17882 : 25 : {
17883 : 25 : tree _q30 = gimple_assign_rhs1 (_a2);
17884 : 25 : _q30 = do_valueize (valueize, _q30);
17885 : 25 : tree _q31 = gimple_assign_rhs2 (_a2);
17886 : 25 : _q31 = do_valueize (valueize, _q31);
17887 : 25 : if (tree_swap_operands_p (_q30, _q31))
17888 : 4 : std::swap (_q30, _q31);
17889 : 25 : switch (TREE_CODE (_q31))
17890 : : {
17891 : 17 : case INTEGER_CST:
17892 : 17 : {
17893 : 17 : switch (TREE_CODE (_p1))
17894 : : {
17895 : 13 : case INTEGER_CST:
17896 : 13 : {
17897 : 13 : {
17898 : 13 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _p1 };
17899 : 13 : if (gimple_simplify_290 (res_op, seq, valueize, type, captures, EQ_EXPR))
17900 : 0 : return true;
17901 : : }
17902 : 13 : break;
17903 : : }
17904 : : default:;
17905 : : }
17906 : : break;
17907 : : }
17908 : : default:;
17909 : : }
17910 : 77194138 : break;
17911 : : }
17912 : : default:;
17913 : : }
17914 : : }
17915 : : break;
17916 : : default:;
17917 : : }
17918 : : break;
17919 : : }
17920 : 793 : case BIT_XOR_EXPR:
17921 : 793 : {
17922 : 793 : tree _q20 = gimple_assign_rhs1 (_a1);
17923 : 793 : _q20 = do_valueize (valueize, _q20);
17924 : 793 : tree _q21 = gimple_assign_rhs2 (_a1);
17925 : 793 : _q21 = do_valueize (valueize, _q21);
17926 : 793 : if (tree_swap_operands_p (_q20, _q21))
17927 : 60 : std::swap (_q20, _q21);
17928 : 793 : switch (TREE_CODE (_q21))
17929 : : {
17930 : 167 : case INTEGER_CST:
17931 : 167 : {
17932 : 167 : switch (TREE_CODE (_p1))
17933 : : {
17934 : 7 : case INTEGER_CST:
17935 : 7 : {
17936 : 7 : {
17937 : 7 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
17938 : 7 : if (gimple_simplify_290 (res_op, seq, valueize, type, captures, EQ_EXPR))
17939 : 7 : return true;
17940 : : }
17941 : 0 : break;
17942 : : }
17943 : : default:;
17944 : : }
17945 : : break;
17946 : : }
17947 : : default:;
17948 : : }
17949 : 77194138 : break;
17950 : : }
17951 : : default:;
17952 : : }
17953 : : }
17954 : : break;
17955 : 77194138 : default:;
17956 : : }
17957 : 77194138 : {
17958 : 77194138 : tree _p0_pops[1];
17959 : 77194138 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
17960 : : {
17961 : 414864 : tree _q20 = _p0_pops[0];
17962 : 414864 : if (integer_zerop (_p1))
17963 : : {
17964 : 158792 : {
17965 : 158792 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
17966 : 158792 : if (gimple_simplify_291 (res_op, seq, valueize, type, captures, EQ_EXPR))
17967 : 168 : return true;
17968 : : }
17969 : : }
17970 : : }
17971 : : }
17972 : 77193970 : if (integer_zerop (_p1))
17973 : : {
17974 : 40291082 : {
17975 : 40291082 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
17976 : 40291082 : if (gimple_simplify_291 (res_op, seq, valueize, type, captures, EQ_EXPR))
17977 : 50068 : return true;
17978 : : }
17979 : : }
17980 : 77143902 : switch (TREE_CODE (_p0))
17981 : : {
17982 : 76378066 : case SSA_NAME:
17983 : 76378066 : if (gimple *_d1 = get_def (valueize, _p0))
17984 : : {
17985 : 26155112 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17986 : 31760394 : switch (gimple_assign_rhs_code (_a1))
17987 : : {
17988 : 1189465 : case BIT_AND_EXPR:
17989 : 1189465 : {
17990 : 1189465 : tree _q20 = gimple_assign_rhs1 (_a1);
17991 : 1189465 : _q20 = do_valueize (valueize, _q20);
17992 : 1189465 : tree _q21 = gimple_assign_rhs2 (_a1);
17993 : 1189465 : _q21 = do_valueize (valueize, _q21);
17994 : 1189465 : if (tree_swap_operands_p (_q20, _q21))
17995 : 5762 : std::swap (_q20, _q21);
17996 : 1189465 : switch (TREE_CODE (_p1))
17997 : : {
17998 : 13626 : case SSA_NAME:
17999 : 13626 : if (gimple *_d2 = get_def (valueize, _p1))
18000 : : {
18001 : 13389 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18002 : 13619 : switch (gimple_assign_rhs_code (_a2))
18003 : : {
18004 : 2864 : case BIT_AND_EXPR:
18005 : 2864 : {
18006 : 2864 : tree _q50 = gimple_assign_rhs1 (_a2);
18007 : 2864 : _q50 = do_valueize (valueize, _q50);
18008 : 2864 : tree _q51 = gimple_assign_rhs2 (_a2);
18009 : 2864 : _q51 = do_valueize (valueize, _q51);
18010 : 2864 : if (tree_swap_operands_p (_q50, _q51))
18011 : 0 : std::swap (_q50, _q51);
18012 : 2864 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
18013 : : {
18014 : 1832 : {
18015 : 1832 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
18016 : 1832 : if (gimple_simplify_292 (res_op, seq, valueize, type, captures, EQ_EXPR))
18017 : 17 : return true;
18018 : : }
18019 : : }
18020 : 2847 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
18021 : : {
18022 : 0 : {
18023 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
18024 : 0 : if (gimple_simplify_292 (res_op, seq, valueize, type, captures, EQ_EXPR))
18025 : 0 : return true;
18026 : : }
18027 : : }
18028 : 2847 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
18029 : : {
18030 : 0 : {
18031 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
18032 : 0 : if (gimple_simplify_292 (res_op, seq, valueize, type, captures, EQ_EXPR))
18033 : 0 : return true;
18034 : : }
18035 : : }
18036 : 2847 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
18037 : : {
18038 : 0 : {
18039 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
18040 : 0 : if (gimple_simplify_292 (res_op, seq, valueize, type, captures, EQ_EXPR))
18041 : 0 : return true;
18042 : : }
18043 : : }
18044 : 1189448 : break;
18045 : : }
18046 : : default:;
18047 : : }
18048 : : }
18049 : : break;
18050 : 1189448 : default:;
18051 : : }
18052 : 1189448 : if (integer_pow2p (_q21))
18053 : : {
18054 : 425623 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
18055 : : {
18056 : 828 : {
18057 : 828 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
18058 : 828 : if (gimple_simplify_293 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR))
18059 : 828 : return true;
18060 : : }
18061 : : }
18062 : : }
18063 : 1188620 : switch (TREE_CODE (_q20))
18064 : : {
18065 : 1188620 : case SSA_NAME:
18066 : 1188620 : if (gimple *_d2 = get_def (valueize, _q20))
18067 : : {
18068 : 1142432 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18069 : 1642493 : switch (gimple_assign_rhs_code (_a2))
18070 : : {
18071 : 78219 : CASE_CONVERT:
18072 : 78219 : {
18073 : 78219 : tree _q30 = gimple_assign_rhs1 (_a2);
18074 : 78219 : _q30 = do_valueize (valueize, _q30);
18075 : 78219 : if (integer_pow2p (_q21))
18076 : : {
18077 : 6085 : if (integer_zerop (_p1))
18078 : : {
18079 : 6085 : {
18080 : 6085 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q21 };
18081 : 6085 : if (gimple_simplify_294 (res_op, seq, valueize, type, captures, EQ_EXPR, GE_EXPR))
18082 : 20 : return true;
18083 : : }
18084 : : }
18085 : : }
18086 : : break;
18087 : : }
18088 : : default:;
18089 : : }
18090 : : }
18091 : : break;
18092 : 1188600 : default:;
18093 : : }
18094 : 1188600 : if (integer_pow2p (_q21))
18095 : : {
18096 : 424775 : if (integer_zerop (_p1))
18097 : : {
18098 : 424580 : {
18099 : 424580 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q20, _q21 };
18100 : 424580 : if (gimple_simplify_295 (res_op, seq, valueize, type, captures, EQ_EXPR, GE_EXPR))
18101 : 335 : return true;
18102 : : }
18103 : : }
18104 : : }
18105 : 77127169 : break;
18106 : : }
18107 : 1045 : case GE_EXPR:
18108 : 1045 : {
18109 : 1045 : tree _q20 = gimple_assign_rhs1 (_a1);
18110 : 1045 : _q20 = do_valueize (valueize, _q20);
18111 : 1045 : tree _q21 = gimple_assign_rhs2 (_a1);
18112 : 1045 : _q21 = do_valueize (valueize, _q21);
18113 : 1045 : if (integer_zerop (_q21))
18114 : : {
18115 : 4 : switch (TREE_CODE (_p1))
18116 : : {
18117 : 4 : case SSA_NAME:
18118 : 4 : if (gimple *_d2 = get_def (valueize, _p1))
18119 : : {
18120 : 4 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18121 : 4 : switch (gimple_assign_rhs_code (_a2))
18122 : : {
18123 : 2 : case GE_EXPR:
18124 : 2 : {
18125 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
18126 : 2 : _q50 = do_valueize (valueize, _q50);
18127 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
18128 : 2 : _q51 = do_valueize (valueize, _q51);
18129 : 2 : if (integer_zerop (_q51))
18130 : : {
18131 : 2 : {
18132 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
18133 : 2 : if (gimple_simplify_296 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR, GE_EXPR))
18134 : 1 : return true;
18135 : : }
18136 : : }
18137 : : break;
18138 : : }
18139 : 2 : case LT_EXPR:
18140 : 2 : {
18141 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
18142 : 2 : _q50 = do_valueize (valueize, _q50);
18143 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
18144 : 2 : _q51 = do_valueize (valueize, _q51);
18145 : 2 : if (integer_zerop (_q51))
18146 : : {
18147 : 2 : {
18148 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
18149 : 2 : if (gimple_simplify_297 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR))
18150 : 1 : return true;
18151 : : }
18152 : : }
18153 : : break;
18154 : : }
18155 : : default:;
18156 : : }
18157 : : }
18158 : : break;
18159 : : default:;
18160 : : }
18161 : : }
18162 : : break;
18163 : : }
18164 : 865 : case LT_EXPR:
18165 : 865 : {
18166 : 865 : tree _q20 = gimple_assign_rhs1 (_a1);
18167 : 865 : _q20 = do_valueize (valueize, _q20);
18168 : 865 : tree _q21 = gimple_assign_rhs2 (_a1);
18169 : 865 : _q21 = do_valueize (valueize, _q21);
18170 : 865 : if (integer_zerop (_q21))
18171 : : {
18172 : 89 : switch (TREE_CODE (_p1))
18173 : : {
18174 : 57 : case SSA_NAME:
18175 : 57 : if (gimple *_d2 = get_def (valueize, _p1))
18176 : : {
18177 : 57 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18178 : 57 : switch (gimple_assign_rhs_code (_a2))
18179 : : {
18180 : 32 : case LT_EXPR:
18181 : 32 : {
18182 : 32 : tree _q50 = gimple_assign_rhs1 (_a2);
18183 : 32 : _q50 = do_valueize (valueize, _q50);
18184 : 32 : tree _q51 = gimple_assign_rhs2 (_a2);
18185 : 32 : _q51 = do_valueize (valueize, _q51);
18186 : 32 : if (integer_zerop (_q51))
18187 : : {
18188 : 32 : {
18189 : 32 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
18190 : 32 : if (gimple_simplify_296 (res_op, seq, valueize, type, captures, LT_EXPR, EQ_EXPR, GE_EXPR))
18191 : 14 : return true;
18192 : : }
18193 : : }
18194 : : break;
18195 : : }
18196 : 2 : case GE_EXPR:
18197 : 2 : {
18198 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
18199 : 2 : _q50 = do_valueize (valueize, _q50);
18200 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
18201 : 2 : _q51 = do_valueize (valueize, _q51);
18202 : 2 : if (integer_zerop (_q51))
18203 : : {
18204 : 2 : {
18205 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
18206 : 2 : if (gimple_simplify_298 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR))
18207 : 1 : return true;
18208 : : }
18209 : : }
18210 : : break;
18211 : : }
18212 : : default:;
18213 : : }
18214 : : }
18215 : : break;
18216 : : default:;
18217 : : }
18218 : : }
18219 : : break;
18220 : : }
18221 : 692482 : CASE_CONVERT:
18222 : 692482 : {
18223 : 692482 : tree _q20 = gimple_assign_rhs1 (_a1);
18224 : 692482 : _q20 = do_valueize (valueize, _q20);
18225 : 692482 : switch (TREE_CODE (_q20))
18226 : : {
18227 : 679672 : case SSA_NAME:
18228 : 679672 : if (gimple *_d2 = get_def (valueize, _q20))
18229 : : {
18230 : 670946 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18231 : 802084 : switch (gimple_assign_rhs_code (_a2))
18232 : : {
18233 : 184 : case ADDR_EXPR:
18234 : 184 : {
18235 : 184 : switch (TREE_CODE (_p1))
18236 : : {
18237 : 164 : case SSA_NAME:
18238 : 164 : if (gimple *_d3 = get_def (valueize, _p1))
18239 : : {
18240 : 157 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
18241 : 262 : switch (gimple_assign_rhs_code (_a3))
18242 : : {
18243 : 52 : CASE_CONVERT:
18244 : 52 : {
18245 : 52 : tree _q40 = gimple_assign_rhs1 (_a3);
18246 : 52 : _q40 = do_valueize (valueize, _q40);
18247 : 52 : switch (TREE_CODE (_q40))
18248 : : {
18249 : 52 : case SSA_NAME:
18250 : 52 : if (gimple *_d4 = get_def (valueize, _q40))
18251 : : {
18252 : 52 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
18253 : 104 : switch (gimple_assign_rhs_code (_a4))
18254 : : {
18255 : 52 : case ADDR_EXPR:
18256 : 52 : {
18257 : 52 : {
18258 : 52 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
18259 : 52 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18260 : 0 : return true;
18261 : : }
18262 : 52 : break;
18263 : : }
18264 : : default:;
18265 : : }
18266 : : }
18267 : : break;
18268 : 0 : case ADDR_EXPR:
18269 : 0 : {
18270 : 0 : {
18271 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
18272 : 0 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18273 : 0 : return true;
18274 : : }
18275 : 0 : break;
18276 : : }
18277 : : default:;
18278 : : }
18279 : : break;
18280 : : }
18281 : 0 : case ADDR_EXPR:
18282 : 0 : {
18283 : 0 : {
18284 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
18285 : 0 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18286 : 0 : return true;
18287 : : }
18288 : 0 : break;
18289 : : }
18290 : : default:;
18291 : : }
18292 : : }
18293 : : break;
18294 : 0 : case ADDR_EXPR:
18295 : 0 : {
18296 : 0 : {
18297 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
18298 : 0 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18299 : 0 : return true;
18300 : : }
18301 : 0 : break;
18302 : : }
18303 : : default:;
18304 : : }
18305 : : break;
18306 : : }
18307 : : default:;
18308 : : }
18309 : : }
18310 : : break;
18311 : 12810 : case ADDR_EXPR:
18312 : 12810 : {
18313 : 12810 : switch (TREE_CODE (_p1))
18314 : : {
18315 : 12780 : case SSA_NAME:
18316 : 12780 : if (gimple *_d2 = get_def (valueize, _p1))
18317 : : {
18318 : 12706 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18319 : 20240 : switch (gimple_assign_rhs_code (_a2))
18320 : : {
18321 : 4811 : CASE_CONVERT:
18322 : 4811 : {
18323 : 4811 : tree _q40 = gimple_assign_rhs1 (_a2);
18324 : 4811 : _q40 = do_valueize (valueize, _q40);
18325 : 4811 : switch (TREE_CODE (_q40))
18326 : : {
18327 : 4611 : case SSA_NAME:
18328 : 4611 : if (gimple *_d3 = get_def (valueize, _q40))
18329 : : {
18330 : 4586 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
18331 : 9052 : switch (gimple_assign_rhs_code (_a3))
18332 : : {
18333 : 0 : case ADDR_EXPR:
18334 : 0 : {
18335 : 0 : {
18336 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
18337 : 0 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18338 : 0 : return true;
18339 : : }
18340 : 0 : break;
18341 : : }
18342 : : default:;
18343 : : }
18344 : : }
18345 : : break;
18346 : 200 : case ADDR_EXPR:
18347 : 200 : {
18348 : 200 : {
18349 : 200 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
18350 : 200 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18351 : 170 : return true;
18352 : : }
18353 : 30 : break;
18354 : : }
18355 : : default:;
18356 : : }
18357 : : break;
18358 : : }
18359 : 0 : case ADDR_EXPR:
18360 : 0 : {
18361 : 0 : {
18362 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
18363 : 0 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18364 : 0 : return true;
18365 : : }
18366 : 0 : break;
18367 : : }
18368 : : default:;
18369 : : }
18370 : : }
18371 : : break;
18372 : 0 : case ADDR_EXPR:
18373 : 0 : {
18374 : 0 : {
18375 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
18376 : 0 : if (gimple_simplify_299 (res_op, seq, valueize, type, captures, EQ_EXPR))
18377 : 0 : return true;
18378 : : }
18379 : 0 : break;
18380 : : }
18381 : : default:;
18382 : : }
18383 : : break;
18384 : : }
18385 : : default:;
18386 : : }
18387 : : break;
18388 : : }
18389 : 141907 : case ADDR_EXPR:
18390 : 141907 : {
18391 : 141907 : switch (TREE_CODE (_p1))
18392 : : {
18393 : 123114 : case SSA_NAME:
18394 : 123114 : if (gimple *_d2 = get_def (valueize, _p1))
18395 : : {
18396 : 119477 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18397 : 202607 : switch (gimple_assign_rhs_code (_a2))
18398 : : {
18399 : 0 : CASE_CONVERT:
18400 : 0 : {
18401 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
18402 : 0 : _q30 = do_valueize (valueize, _q30);
18403 : 0 : switch (TREE_CODE (_q30))
18404 : : {
18405 : 0 : case SSA_NAME:
18406 : 0 : if (gimple *_d3 = get_def (valueize, _q30))
18407 : : {
18408 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
18409 : 0 : switch (gimple_assign_rhs_code (_a3))
18410 : : {
18411 : 0 : case ADDR_EXPR:
18412 : 0 : {
18413 : 0 : {
18414 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
18415 : 0 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18416 : 0 : return true;
18417 : : }
18418 : 0 : break;
18419 : : }
18420 : : default:;
18421 : : }
18422 : : }
18423 : : break;
18424 : 0 : case ADDR_EXPR:
18425 : 0 : {
18426 : 0 : {
18427 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
18428 : 0 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18429 : 0 : return true;
18430 : : }
18431 : 0 : break;
18432 : : }
18433 : : default:;
18434 : : }
18435 : : break;
18436 : : }
18437 : 1590 : case ADDR_EXPR:
18438 : 1590 : {
18439 : 1590 : {
18440 : 1590 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
18441 : 1590 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18442 : 234 : return true;
18443 : : }
18444 : 1356 : break;
18445 : : }
18446 : : default:;
18447 : : }
18448 : : }
18449 : : break;
18450 : 13943 : case ADDR_EXPR:
18451 : 13943 : {
18452 : 13943 : {
18453 : 13943 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
18454 : 13943 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18455 : 23 : return true;
18456 : : }
18457 : 13920 : break;
18458 : : }
18459 : : default:;
18460 : : }
18461 : : break;
18462 : : }
18463 : : default:;
18464 : : }
18465 : : }
18466 : : break;
18467 : 28361 : case ADDR_EXPR:
18468 : 28361 : {
18469 : 28361 : switch (TREE_CODE (_p1))
18470 : : {
18471 : 0 : case SSA_NAME:
18472 : 0 : if (gimple *_d1 = get_def (valueize, _p1))
18473 : : {
18474 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18475 : 0 : switch (gimple_assign_rhs_code (_a1))
18476 : : {
18477 : 0 : CASE_CONVERT:
18478 : 0 : {
18479 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
18480 : 0 : _q30 = do_valueize (valueize, _q30);
18481 : 0 : switch (TREE_CODE (_q30))
18482 : : {
18483 : 0 : case SSA_NAME:
18484 : 0 : if (gimple *_d2 = get_def (valueize, _q30))
18485 : : {
18486 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18487 : 0 : switch (gimple_assign_rhs_code (_a2))
18488 : : {
18489 : 0 : case ADDR_EXPR:
18490 : 0 : {
18491 : 0 : {
18492 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
18493 : 0 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18494 : 0 : return true;
18495 : : }
18496 : 0 : break;
18497 : : }
18498 : : default:;
18499 : : }
18500 : : }
18501 : : break;
18502 : 0 : case ADDR_EXPR:
18503 : 0 : {
18504 : 0 : {
18505 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
18506 : 0 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18507 : 0 : return true;
18508 : : }
18509 : 0 : break;
18510 : : }
18511 : : default:;
18512 : : }
18513 : : break;
18514 : : }
18515 : 0 : case ADDR_EXPR:
18516 : 0 : {
18517 : 0 : {
18518 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
18519 : 0 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18520 : 0 : return true;
18521 : : }
18522 : 0 : break;
18523 : : }
18524 : : default:;
18525 : : }
18526 : : }
18527 : : break;
18528 : 21971 : case ADDR_EXPR:
18529 : 21971 : {
18530 : 21971 : {
18531 : 21971 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
18532 : 21971 : if (gimple_simplify_300 (res_op, seq, valueize, type, captures, EQ_EXPR))
18533 : 15089 : return true;
18534 : : }
18535 : 6882 : break;
18536 : : }
18537 : : default:;
18538 : : }
18539 : : break;
18540 : : }
18541 : 77127169 : default:;
18542 : : }
18543 : 77127169 : {
18544 : 77127169 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
18545 : 77127169 : if (gimple_simplify_301 (res_op, seq, valueize, type, captures, EQ_EXPR))
18546 : 7159 : return true;
18547 : : }
18548 : 77120010 : switch (TREE_CODE (_p0))
18549 : : {
18550 : 76369263 : case SSA_NAME:
18551 : 76369263 : if (gimple *_d1 = get_def (valueize, _p0))
18552 : : {
18553 : 26150005 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18554 : 31755021 : switch (gimple_assign_rhs_code (_a1))
18555 : : {
18556 : 692312 : CASE_CONVERT:
18557 : 692312 : {
18558 : 692312 : tree _q20 = gimple_assign_rhs1 (_a1);
18559 : 692312 : _q20 = do_valueize (valueize, _q20);
18560 : 692312 : switch (TREE_CODE (_p1))
18561 : : {
18562 : 513913 : case INTEGER_CST:
18563 : 513913 : {
18564 : 513913 : {
18565 : 513913 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
18566 : 513913 : if (gimple_simplify_302 (res_op, seq, valueize, type, captures, EQ_EXPR))
18567 : 15712 : return true;
18568 : : }
18569 : 498201 : break;
18570 : : }
18571 : 676600 : default:;
18572 : : }
18573 : 676600 : switch (TREE_CODE (_q20))
18574 : : {
18575 : 663990 : case SSA_NAME:
18576 : 663990 : if (gimple *_d2 = get_def (valueize, _q20))
18577 : : {
18578 : 655323 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18579 : 778769 : switch (gimple_assign_rhs_code (_a2))
18580 : : {
18581 : 1113 : case NE_EXPR:
18582 : 1113 : {
18583 : 1113 : tree _q30 = gimple_assign_rhs1 (_a2);
18584 : 1113 : _q30 = do_valueize (valueize, _q30);
18585 : 1113 : tree _q31 = gimple_assign_rhs2 (_a2);
18586 : 1113 : _q31 = do_valueize (valueize, _q31);
18587 : 1113 : if (tree_swap_operands_p (_q30, _q31))
18588 : 0 : std::swap (_q30, _q31);
18589 : 1113 : switch (TREE_CODE (_q31))
18590 : : {
18591 : 1109 : case INTEGER_CST:
18592 : 1109 : {
18593 : 1109 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
18594 : : {
18595 : 42 : {
18596 : 42 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
18597 : 42 : if (gimple_simplify_303 (res_op, seq, valueize, type, captures, NE_EXPR, EQ_EXPR))
18598 : 34 : return true;
18599 : : }
18600 : : }
18601 : : break;
18602 : : }
18603 : : default:;
18604 : : }
18605 : 77104230 : break;
18606 : : }
18607 : 1631 : case EQ_EXPR:
18608 : 1631 : {
18609 : 1631 : tree _q30 = gimple_assign_rhs1 (_a2);
18610 : 1631 : _q30 = do_valueize (valueize, _q30);
18611 : 1631 : tree _q31 = gimple_assign_rhs2 (_a2);
18612 : 1631 : _q31 = do_valueize (valueize, _q31);
18613 : 1631 : if (tree_swap_operands_p (_q30, _q31))
18614 : 0 : std::swap (_q30, _q31);
18615 : 1631 : switch (TREE_CODE (_q31))
18616 : : {
18617 : 1598 : case INTEGER_CST:
18618 : 1598 : {
18619 : 1598 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
18620 : : {
18621 : 41 : {
18622 : 41 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
18623 : 41 : if (gimple_simplify_303 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
18624 : 34 : return true;
18625 : : }
18626 : : }
18627 : : break;
18628 : : }
18629 : : default:;
18630 : : }
18631 : 77104230 : break;
18632 : : }
18633 : : default:;
18634 : : }
18635 : : }
18636 : : break;
18637 : : default:;
18638 : : }
18639 : : break;
18640 : : }
18641 : : default:;
18642 : : }
18643 : : }
18644 : : break;
18645 : 77104230 : default:;
18646 : : }
18647 : 77104230 : switch (TREE_CODE (_p1))
18648 : : {
18649 : 12494202 : case SSA_NAME:
18650 : 12494202 : if (gimple *_d1 = get_def (valueize, _p1))
18651 : : {
18652 : 4161607 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18653 : 6094244 : switch (gimple_assign_rhs_code (_a1))
18654 : : {
18655 : 233068 : CASE_CONVERT:
18656 : 233068 : {
18657 : 233068 : tree _q30 = gimple_assign_rhs1 (_a1);
18658 : 233068 : _q30 = do_valueize (valueize, _q30);
18659 : 233068 : switch (TREE_CODE (_q30))
18660 : : {
18661 : 210554 : case SSA_NAME:
18662 : 210554 : if (gimple *_d2 = get_def (valueize, _q30))
18663 : : {
18664 : 205621 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18665 : 280690 : switch (gimple_assign_rhs_code (_a2))
18666 : : {
18667 : 404 : case NE_EXPR:
18668 : 404 : {
18669 : 404 : tree _q40 = gimple_assign_rhs1 (_a2);
18670 : 404 : _q40 = do_valueize (valueize, _q40);
18671 : 404 : tree _q41 = gimple_assign_rhs2 (_a2);
18672 : 404 : _q41 = do_valueize (valueize, _q41);
18673 : 404 : if (tree_swap_operands_p (_q40, _q41))
18674 : 14 : std::swap (_q40, _q41);
18675 : 404 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
18676 : : {
18677 : 81 : switch (TREE_CODE (_q41))
18678 : : {
18679 : 1 : case INTEGER_CST:
18680 : 1 : {
18681 : 1 : {
18682 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
18683 : 1 : if (gimple_simplify_303 (res_op, seq, valueize, type, captures, NE_EXPR, EQ_EXPR))
18684 : 0 : return true;
18685 : : }
18686 : 1 : break;
18687 : : }
18688 : : default:;
18689 : : }
18690 : : }
18691 : 77104227 : break;
18692 : : }
18693 : 82 : case EQ_EXPR:
18694 : 82 : {
18695 : 82 : tree _q40 = gimple_assign_rhs1 (_a2);
18696 : 82 : _q40 = do_valueize (valueize, _q40);
18697 : 82 : tree _q41 = gimple_assign_rhs2 (_a2);
18698 : 82 : _q41 = do_valueize (valueize, _q41);
18699 : 82 : if (tree_swap_operands_p (_q40, _q41))
18700 : 0 : std::swap (_q40, _q41);
18701 : 82 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
18702 : : {
18703 : 3 : switch (TREE_CODE (_q41))
18704 : : {
18705 : 3 : case INTEGER_CST:
18706 : 3 : {
18707 : 3 : {
18708 : 3 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
18709 : 3 : if (gimple_simplify_303 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
18710 : 3 : return true;
18711 : : }
18712 : 0 : break;
18713 : : }
18714 : : default:;
18715 : : }
18716 : : }
18717 : 77104227 : break;
18718 : : }
18719 : : default:;
18720 : : }
18721 : : }
18722 : : break;
18723 : : default:;
18724 : : }
18725 : : break;
18726 : : }
18727 : : default:;
18728 : : }
18729 : : }
18730 : : break;
18731 : 77104227 : default:;
18732 : : }
18733 : 77104227 : if (integer_onep (_p1))
18734 : : {
18735 : 4493512 : {
18736 : 4493512 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
18737 : 4493512 : if (TREE_CODE (TREE_TYPE (captures[0])) == BOOLEAN_TYPE
18738 : 4493512 : && types_match (type, TREE_TYPE (captures[0]))
18739 : : )
18740 : : {
18741 : 67202 : gimple_seq *lseq = seq;
18742 : 67202 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2353;
18743 : 67202 : {
18744 : 67202 : tree tem;
18745 : 67202 : tem = captures[0];
18746 : 67202 : res_op->set_value (tem);
18747 : 67202 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1127, __FILE__, __LINE__, true);
18748 : 67202 : return true;
18749 : : }
18750 : 0 : next_after_fail2353:;
18751 : : }
18752 : : }
18753 : : }
18754 : 77037025 : switch (TREE_CODE (_p0))
18755 : : {
18756 : 76287353 : case SSA_NAME:
18757 : 76287353 : if (gimple *_d1 = get_def (valueize, _p0))
18758 : : {
18759 : 26112538 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18760 : 31719691 : switch (gimple_assign_rhs_code (_a1))
18761 : : {
18762 : 9471 : case COND_EXPR:
18763 : 9471 : {
18764 : 9471 : tree _q20 = gimple_assign_rhs1 (_a1);
18765 : 9471 : _q20 = do_valueize (valueize, _q20);
18766 : 9471 : tree _q21 = gimple_assign_rhs2 (_a1);
18767 : 9471 : _q21 = do_valueize (valueize, _q21);
18768 : 9471 : tree _q22 = gimple_assign_rhs3 (_a1);
18769 : 9471 : _q22 = do_valueize (valueize, _q22);
18770 : 9471 : {
18771 : 9471 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1 };
18772 : 9471 : if (gimple_simplify_304 (res_op, seq, valueize, type, captures, EQ_EXPR))
18773 : 362 : return true;
18774 : : }
18775 : 9109 : break;
18776 : : }
18777 : : default:;
18778 : : }
18779 : : }
18780 : : break;
18781 : 77036663 : default:;
18782 : : }
18783 : 77036663 : switch (TREE_CODE (_p1))
18784 : : {
18785 : 12494199 : case SSA_NAME:
18786 : 12494199 : if (gimple *_d1 = get_def (valueize, _p1))
18787 : : {
18788 : 4161604 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18789 : 6094241 : switch (gimple_assign_rhs_code (_a1))
18790 : : {
18791 : 15114 : case COND_EXPR:
18792 : 15114 : {
18793 : 15114 : tree _q30 = gimple_assign_rhs1 (_a1);
18794 : 15114 : _q30 = do_valueize (valueize, _q30);
18795 : 15114 : tree _q31 = gimple_assign_rhs2 (_a1);
18796 : 15114 : _q31 = do_valueize (valueize, _q31);
18797 : 15114 : tree _q32 = gimple_assign_rhs3 (_a1);
18798 : 15114 : _q32 = do_valueize (valueize, _q32);
18799 : 15114 : {
18800 : 15114 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q32, _p0 };
18801 : 15114 : if (gimple_simplify_304 (res_op, seq, valueize, type, captures, EQ_EXPR))
18802 : 0 : return true;
18803 : : }
18804 : 15114 : break;
18805 : : }
18806 : : default:;
18807 : : }
18808 : : }
18809 : : break;
18810 : 77036663 : default:;
18811 : : }
18812 : 77036663 : switch (TREE_CODE (_p0))
18813 : : {
18814 : 76286991 : case SSA_NAME:
18815 : 76286991 : if (gimple *_d1 = get_def (valueize, _p0))
18816 : : {
18817 : 26112176 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18818 : 31719329 : switch (gimple_assign_rhs_code (_a1))
18819 : : {
18820 : 1187930 : case BIT_AND_EXPR:
18821 : 1187930 : {
18822 : 1187930 : tree _q20 = gimple_assign_rhs1 (_a1);
18823 : 1187930 : _q20 = do_valueize (valueize, _q20);
18824 : 1187930 : tree _q21 = gimple_assign_rhs2 (_a1);
18825 : 1187930 : _q21 = do_valueize (valueize, _q21);
18826 : 1187930 : if (tree_swap_operands_p (_q20, _q21))
18827 : 5762 : std::swap (_q20, _q21);
18828 : 1187930 : switch (TREE_CODE (_q21))
18829 : : {
18830 : 2138 : case VECTOR_CST:
18831 : 2138 : {
18832 : 2138 : if (integer_zerop (_p1))
18833 : : {
18834 : 2133 : {
18835 : 2133 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
18836 : 2133 : const enum tree_code cmp = EQ_EXPR;
18837 : 2133 : const enum tree_code icmp = LE_EXPR;
18838 : 2133 : {
18839 : 2133 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
18840 : 2133 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
18841 : : )
18842 : : {
18843 : 9 : {
18844 : 9 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
18845 : 9 : ? optab_vector : optab_default;
18846 : 9 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
18847 : 9 : if (target_supports_op_p (utype, icmp, optab)
18848 : 9 : || (optimize_vectors_before_lowering_p ()
18849 : 6 : && (!target_supports_op_p (type, cmp, optab)
18850 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
18851 : : )
18852 : : {
18853 : 6 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
18854 : : )
18855 : : {
18856 : 4 : gimple_seq *lseq = seq;
18857 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2354;
18858 : 4 : {
18859 : 4 : res_op->set_op (icmp, type, 2);
18860 : 4 : res_op->ops[0] = captures[1];
18861 : 4 : res_op->ops[1] = csts;
18862 : 4 : res_op->resimplify (lseq, valueize);
18863 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1128, __FILE__, __LINE__, true);
18864 : 4 : return true;
18865 : : }
18866 : 0 : next_after_fail2354:;
18867 : : }
18868 : : else
18869 : : {
18870 : 2 : gimple_seq *lseq = seq;
18871 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2355;
18872 : 2 : {
18873 : 2 : res_op->set_op (icmp, type, 2);
18874 : 2 : {
18875 : 2 : tree _o1[1], _r1;
18876 : 2 : _o1[0] = captures[1];
18877 : 2 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
18878 : 2 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
18879 : : {
18880 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, utype, _o1[0]);
18881 : 2 : tem_op.resimplify (lseq, valueize);
18882 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
18883 : 2 : if (!_r1) goto next_after_fail2355;
18884 : : }
18885 : : else
18886 : : _r1 = _o1[0];
18887 : 0 : res_op->ops[0] = _r1;
18888 : : }
18889 : 0 : res_op->ops[1] = csts;
18890 : 0 : res_op->resimplify (lseq, valueize);
18891 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1129, __FILE__, __LINE__, true);
18892 : 0 : return true;
18893 : : }
18894 : 2129 : next_after_fail2355:;
18895 : : }
18896 : : }
18897 : : }
18898 : : }
18899 : : }
18900 : : }
18901 : : }
18902 : : break;
18903 : : }
18904 : 1119701 : case INTEGER_CST:
18905 : 1119701 : {
18906 : 1119701 : if (integer_zerop (_p1))
18907 : : {
18908 : 637588 : {
18909 : 637588 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
18910 : 637588 : const enum tree_code cmp = EQ_EXPR;
18911 : 637588 : const enum tree_code icmp = LE_EXPR;
18912 : 637588 : {
18913 : 637588 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
18914 : 637588 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
18915 : : )
18916 : : {
18917 : 312 : {
18918 : 312 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
18919 : 312 : ? optab_vector : optab_default;
18920 : 312 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
18921 : 312 : if (target_supports_op_p (utype, icmp, optab)
18922 : 312 : || (optimize_vectors_before_lowering_p ()
18923 : 308 : && (!target_supports_op_p (type, cmp, optab)
18924 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
18925 : : )
18926 : : {
18927 : 308 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
18928 : : )
18929 : : {
18930 : 302 : gimple_seq *lseq = seq;
18931 : 302 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2356;
18932 : 302 : {
18933 : 302 : res_op->set_op (icmp, type, 2);
18934 : 302 : res_op->ops[0] = captures[1];
18935 : 302 : res_op->ops[1] = csts;
18936 : 302 : res_op->resimplify (lseq, valueize);
18937 : 302 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1128, __FILE__, __LINE__, true);
18938 : 302 : return true;
18939 : : }
18940 : 0 : next_after_fail2356:;
18941 : : }
18942 : : else
18943 : : {
18944 : 6 : gimple_seq *lseq = seq;
18945 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2357;
18946 : 6 : {
18947 : 6 : res_op->set_op (icmp, type, 2);
18948 : 6 : {
18949 : 6 : tree _o1[1], _r1;
18950 : 6 : _o1[0] = captures[1];
18951 : 6 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
18952 : 6 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
18953 : : {
18954 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, utype, _o1[0]);
18955 : 6 : tem_op.resimplify (lseq, valueize);
18956 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
18957 : 6 : if (!_r1) goto next_after_fail2357;
18958 : : }
18959 : : else
18960 : : _r1 = _o1[0];
18961 : 6 : res_op->ops[0] = _r1;
18962 : : }
18963 : 6 : res_op->ops[1] = csts;
18964 : 6 : res_op->resimplify (lseq, valueize);
18965 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1129, __FILE__, __LINE__, true);
18966 : 6 : return true;
18967 : : }
18968 : 637280 : next_after_fail2357:;
18969 : : }
18970 : : }
18971 : : }
18972 : : }
18973 : : }
18974 : : }
18975 : : }
18976 : : break;
18977 : : }
18978 : 1187618 : default:;
18979 : : }
18980 : 1187618 : switch (TREE_CODE (_q20))
18981 : : {
18982 : 0 : case VECTOR_CST:
18983 : 0 : {
18984 : 0 : if (integer_zerop (_p1))
18985 : : {
18986 : 0 : {
18987 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
18988 : 0 : const enum tree_code cmp = EQ_EXPR;
18989 : 0 : const enum tree_code icmp = LE_EXPR;
18990 : 0 : {
18991 : 0 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
18992 : 0 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
18993 : : )
18994 : : {
18995 : 0 : {
18996 : 0 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
18997 : 0 : ? optab_vector : optab_default;
18998 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
18999 : 0 : if (target_supports_op_p (utype, icmp, optab)
19000 : 0 : || (optimize_vectors_before_lowering_p ()
19001 : 0 : && (!target_supports_op_p (type, cmp, optab)
19002 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
19003 : : )
19004 : : {
19005 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
19006 : : )
19007 : : {
19008 : 0 : gimple_seq *lseq = seq;
19009 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2358;
19010 : 0 : {
19011 : 0 : res_op->set_op (icmp, type, 2);
19012 : 0 : res_op->ops[0] = captures[1];
19013 : 0 : res_op->ops[1] = csts;
19014 : 0 : res_op->resimplify (lseq, valueize);
19015 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1128, __FILE__, __LINE__, true);
19016 : 0 : return true;
19017 : : }
19018 : 0 : next_after_fail2358:;
19019 : : }
19020 : : else
19021 : : {
19022 : 0 : gimple_seq *lseq = seq;
19023 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2359;
19024 : 0 : {
19025 : 0 : res_op->set_op (icmp, type, 2);
19026 : 0 : {
19027 : 0 : tree _o1[1], _r1;
19028 : 0 : _o1[0] = captures[1];
19029 : 0 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
19030 : 0 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
19031 : : {
19032 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, utype, _o1[0]);
19033 : 0 : tem_op.resimplify (lseq, valueize);
19034 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
19035 : 0 : if (!_r1) goto next_after_fail2359;
19036 : : }
19037 : : else
19038 : : _r1 = _o1[0];
19039 : 0 : res_op->ops[0] = _r1;
19040 : : }
19041 : 0 : res_op->ops[1] = csts;
19042 : 0 : res_op->resimplify (lseq, valueize);
19043 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1129, __FILE__, __LINE__, true);
19044 : 0 : return true;
19045 : : }
19046 : 0 : next_after_fail2359:;
19047 : : }
19048 : : }
19049 : : }
19050 : : }
19051 : : }
19052 : : }
19053 : : }
19054 : : break;
19055 : : }
19056 : 0 : case INTEGER_CST:
19057 : 0 : {
19058 : 0 : if (integer_zerop (_p1))
19059 : : {
19060 : 0 : {
19061 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
19062 : 0 : const enum tree_code cmp = EQ_EXPR;
19063 : 0 : const enum tree_code icmp = LE_EXPR;
19064 : 0 : {
19065 : 0 : tree csts = bitmask_inv_cst_vector_p (captures[2]);
19066 : 0 : if (csts && (VECTOR_TYPE_P (TREE_TYPE (captures[2])) || single_use (captures[0]))
19067 : : )
19068 : : {
19069 : 0 : {
19070 : 0 : auto optab = VECTOR_TYPE_P (TREE_TYPE (captures[2]))
19071 : 0 : ? optab_vector : optab_default;
19072 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
19073 : 0 : if (target_supports_op_p (utype, icmp, optab)
19074 : 0 : || (optimize_vectors_before_lowering_p ()
19075 : 0 : && (!target_supports_op_p (type, cmp, optab)
19076 : 0 : || !target_supports_op_p (type, BIT_AND_EXPR, optab)))
19077 : : )
19078 : : {
19079 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
19080 : : )
19081 : : {
19082 : 0 : gimple_seq *lseq = seq;
19083 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2360;
19084 : 0 : {
19085 : 0 : res_op->set_op (icmp, type, 2);
19086 : 0 : res_op->ops[0] = captures[1];
19087 : 0 : res_op->ops[1] = csts;
19088 : 0 : res_op->resimplify (lseq, valueize);
19089 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1128, __FILE__, __LINE__, true);
19090 : 0 : return true;
19091 : : }
19092 : 0 : next_after_fail2360:;
19093 : : }
19094 : : else
19095 : : {
19096 : 0 : gimple_seq *lseq = seq;
19097 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2361;
19098 : 0 : {
19099 : 0 : res_op->set_op (icmp, type, 2);
19100 : 0 : {
19101 : 0 : tree _o1[1], _r1;
19102 : 0 : _o1[0] = captures[1];
19103 : 0 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
19104 : 0 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
19105 : : {
19106 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, utype, _o1[0]);
19107 : 0 : tem_op.resimplify (lseq, valueize);
19108 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
19109 : 0 : if (!_r1) goto next_after_fail2361;
19110 : : }
19111 : : else
19112 : : _r1 = _o1[0];
19113 : 0 : res_op->ops[0] = _r1;
19114 : : }
19115 : 0 : res_op->ops[1] = csts;
19116 : 0 : res_op->resimplify (lseq, valueize);
19117 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1129, __FILE__, __LINE__, true);
19118 : 0 : return true;
19119 : : }
19120 : 0 : next_after_fail2361:;
19121 : : }
19122 : : }
19123 : : }
19124 : : }
19125 : : }
19126 : : }
19127 : : }
19128 : : break;
19129 : : }
19130 : : default:;
19131 : : }
19132 : 77388964 : break;
19133 : : }
19134 : 48404 : case RSHIFT_EXPR:
19135 : 48404 : {
19136 : 48404 : tree _q20 = gimple_assign_rhs1 (_a1);
19137 : 48404 : _q20 = do_valueize (valueize, _q20);
19138 : 48404 : tree _q21 = gimple_assign_rhs2 (_a1);
19139 : 48404 : _q21 = do_valueize (valueize, _q21);
19140 : 48404 : switch (TREE_CODE (_q20))
19141 : : {
19142 : 47796 : case SSA_NAME:
19143 : 47796 : if (gimple *_d2 = get_def (valueize, _q20))
19144 : : {
19145 : 47079 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19146 : 33617 : switch (gimple_assign_rhs_code (_a2))
19147 : : {
19148 : 589 : case MULT_EXPR:
19149 : 589 : {
19150 : 589 : tree _q30 = gimple_assign_rhs1 (_a2);
19151 : 589 : _q30 = do_valueize (valueize, _q30);
19152 : 589 : tree _q31 = gimple_assign_rhs2 (_a2);
19153 : 589 : _q31 = do_valueize (valueize, _q31);
19154 : 589 : if (tree_swap_operands_p (_q30, _q31))
19155 : 0 : std::swap (_q30, _q31);
19156 : 589 : switch (TREE_CODE (_q30))
19157 : : {
19158 : 589 : case SSA_NAME:
19159 : 589 : if (gimple *_d3 = get_def (valueize, _q30))
19160 : : {
19161 : 589 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
19162 : 544 : switch (gimple_assign_rhs_code (_a3))
19163 : : {
19164 : 538 : CASE_CONVERT:
19165 : 538 : {
19166 : 538 : tree _q40 = gimple_assign_rhs1 (_a3);
19167 : 538 : _q40 = do_valueize (valueize, _q40);
19168 : 538 : switch (TREE_CODE (_q31))
19169 : : {
19170 : 0 : case SSA_NAME:
19171 : 0 : if (gimple *_d4 = get_def (valueize, _q31))
19172 : : {
19173 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
19174 : 0 : switch (gimple_assign_rhs_code (_a4))
19175 : : {
19176 : 0 : CASE_CONVERT:
19177 : 0 : {
19178 : 0 : tree _q60 = gimple_assign_rhs1 (_a4);
19179 : 0 : _q60 = do_valueize (valueize, _q60);
19180 : 0 : switch (TREE_CODE (_q21))
19181 : : {
19182 : 0 : case INTEGER_CST:
19183 : 0 : {
19184 : 0 : if (integer_zerop (_p1))
19185 : : {
19186 : 0 : {
19187 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q60, _q21 };
19188 : 0 : if (gimple_simplify_305 (res_op, seq, valueize, type, captures, EQ_EXPR))
19189 : 0 : return true;
19190 : : }
19191 : : }
19192 : : break;
19193 : : }
19194 : : default:;
19195 : : }
19196 : : break;
19197 : : }
19198 : : default:;
19199 : : }
19200 : : }
19201 : : break;
19202 : : default:;
19203 : : }
19204 : : break;
19205 : : }
19206 : : default:;
19207 : : }
19208 : : }
19209 : : break;
19210 : : default:;
19211 : : }
19212 : 77388964 : break;
19213 : : }
19214 : : default:;
19215 : : }
19216 : : }
19217 : : break;
19218 : : default:;
19219 : : }
19220 : : break;
19221 : : }
19222 : 869528 : case PLUS_EXPR:
19223 : 869528 : {
19224 : 869528 : tree _q20 = gimple_assign_rhs1 (_a1);
19225 : 869528 : _q20 = do_valueize (valueize, _q20);
19226 : 869528 : tree _q21 = gimple_assign_rhs2 (_a1);
19227 : 869528 : _q21 = do_valueize (valueize, _q21);
19228 : 869528 : if (tree_swap_operands_p (_q20, _q21))
19229 : 6865 : std::swap (_q20, _q21);
19230 : 869528 : switch (TREE_CODE (_q21))
19231 : : {
19232 : 746283 : case INTEGER_CST:
19233 : 746283 : {
19234 : 746283 : switch (TREE_CODE (_p1))
19235 : : {
19236 : 486725 : case INTEGER_CST:
19237 : 486725 : {
19238 : 486725 : {
19239 : 486725 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
19240 : 486725 : if (gimple_simplify_306 (res_op, seq, valueize, type, captures, PLUS_EXPR, MINUS_EXPR, EQ_EXPR))
19241 : 39146 : return true;
19242 : : }
19243 : 447579 : break;
19244 : : }
19245 : : default:;
19246 : : }
19247 : : break;
19248 : : }
19249 : : default:;
19250 : : }
19251 : 77388964 : break;
19252 : : }
19253 : 224056 : case MINUS_EXPR:
19254 : 224056 : {
19255 : 224056 : tree _q20 = gimple_assign_rhs1 (_a1);
19256 : 224056 : _q20 = do_valueize (valueize, _q20);
19257 : 224056 : tree _q21 = gimple_assign_rhs2 (_a1);
19258 : 224056 : _q21 = do_valueize (valueize, _q21);
19259 : 224056 : switch (TREE_CODE (_q21))
19260 : : {
19261 : 21696 : case INTEGER_CST:
19262 : 21696 : {
19263 : 21696 : switch (TREE_CODE (_p1))
19264 : : {
19265 : 21313 : case INTEGER_CST:
19266 : 21313 : {
19267 : 21313 : {
19268 : 21313 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
19269 : 21313 : if (gimple_simplify_306 (res_op, seq, valueize, type, captures, MINUS_EXPR, PLUS_EXPR, EQ_EXPR))
19270 : 22 : return true;
19271 : : }
19272 : 21291 : break;
19273 : : }
19274 : : default:;
19275 : : }
19276 : : break;
19277 : : }
19278 : 224034 : default:;
19279 : : }
19280 : 224034 : switch (TREE_CODE (_q20))
19281 : : {
19282 : 2960 : case INTEGER_CST:
19283 : 2960 : {
19284 : 2960 : switch (TREE_CODE (_p1))
19285 : : {
19286 : 1249 : case INTEGER_CST:
19287 : 1249 : {
19288 : 1249 : {
19289 : 1249 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19290 : 1249 : if (gimple_simplify_307 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR))
19291 : 1249 : return true;
19292 : : }
19293 : 0 : break;
19294 : : }
19295 : : default:;
19296 : : }
19297 : : break;
19298 : : }
19299 : : default:;
19300 : : }
19301 : : break;
19302 : : }
19303 : : default:;
19304 : : }
19305 : 8437827 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
19306 : 4920235 : switch (gimple_call_combined_fn (_c1))
19307 : : {
19308 : 2685 : case CFN_BUILT_IN_CLZ:
19309 : 2685 : if (gimple_call_num_args (_c1) == 1)
19310 : : {
19311 : 2685 : tree _q20 = gimple_call_arg (_c1, 0);
19312 : 2685 : _q20 = do_valueize (valueize, _q20);
19313 : 2685 : switch (TREE_CODE (_p1))
19314 : : {
19315 : 2685 : case INTEGER_CST:
19316 : 2685 : {
19317 : 2685 : {
19318 : 2685 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19319 : 2685 : if (gimple_simplify_308 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZ))
19320 : 6 : return true;
19321 : : }
19322 : 2679 : break;
19323 : : }
19324 : : default:;
19325 : : }
19326 : : }
19327 : : break;
19328 : 12 : case CFN_BUILT_IN_CTZ:
19329 : 12 : if (gimple_call_num_args (_c1) == 1)
19330 : : {
19331 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
19332 : 12 : _q20 = do_valueize (valueize, _q20);
19333 : 12 : switch (TREE_CODE (_p1))
19334 : : {
19335 : 12 : case INTEGER_CST:
19336 : 12 : {
19337 : 12 : {
19338 : 12 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19339 : 12 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_CTZ))
19340 : 6 : return true;
19341 : : }
19342 : 6 : break;
19343 : : }
19344 : : default:;
19345 : : }
19346 : : }
19347 : : break;
19348 : 0 : case CFN_BUILT_IN_FFS:
19349 : 0 : if (gimple_call_num_args (_c1) == 1)
19350 : : {
19351 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19352 : 0 : _q20 = do_valueize (valueize, _q20);
19353 : 0 : switch (TREE_CODE (_p1))
19354 : : {
19355 : 0 : case INTEGER_CST:
19356 : 0 : {
19357 : 0 : {
19358 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19359 : 0 : if (gimple_simplify_313 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_FFS))
19360 : 0 : return true;
19361 : : }
19362 : 0 : break;
19363 : : }
19364 : : default:;
19365 : : }
19366 : : }
19367 : : break;
19368 : 777 : case CFN_REDUC_IOR:
19369 : 777 : if (gimple_call_num_args (_c1) == 1)
19370 : : {
19371 : 777 : tree _q20 = gimple_call_arg (_c1, 0);
19372 : 777 : _q20 = do_valueize (valueize, _q20);
19373 : 777 : if (integer_zerop (_p1))
19374 : : {
19375 : 777 : {
19376 : 777 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
19377 : 777 : if (gimple_simplify_314 (res_op, seq, valueize, type, captures, EQ_EXPR))
19378 : 5 : return true;
19379 : : }
19380 : : }
19381 : : }
19382 : : break;
19383 : 0 : case CFN_BUILT_IN_FFSIMAX:
19384 : 0 : if (gimple_call_num_args (_c1) == 1)
19385 : : {
19386 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19387 : 0 : _q20 = do_valueize (valueize, _q20);
19388 : 0 : switch (TREE_CODE (_p1))
19389 : : {
19390 : 0 : case INTEGER_CST:
19391 : 0 : {
19392 : 0 : {
19393 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19394 : 0 : if (gimple_simplify_313 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_FFSIMAX))
19395 : 0 : return true;
19396 : : }
19397 : 0 : break;
19398 : : }
19399 : : default:;
19400 : : }
19401 : : }
19402 : : break;
19403 : 542 : case CFN_BUILT_IN_POPCOUNT:
19404 : 542 : if (gimple_call_num_args (_c1) == 1)
19405 : : {
19406 : 542 : tree _q20 = gimple_call_arg (_c1, 0);
19407 : 542 : _q20 = do_valueize (valueize, _q20);
19408 : 542 : if (integer_zerop (_p1))
19409 : : {
19410 : 0 : {
19411 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
19412 : 0 : if (gimple_simplify_312 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNT))
19413 : 0 : return true;
19414 : : }
19415 : : }
19416 : : }
19417 : : break;
19418 : 194 : case CFN_BUILT_IN_CLZL:
19419 : 194 : if (gimple_call_num_args (_c1) == 1)
19420 : : {
19421 : 194 : tree _q20 = gimple_call_arg (_c1, 0);
19422 : 194 : _q20 = do_valueize (valueize, _q20);
19423 : 194 : switch (TREE_CODE (_p1))
19424 : : {
19425 : 191 : case INTEGER_CST:
19426 : 191 : {
19427 : 191 : {
19428 : 191 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19429 : 191 : if (gimple_simplify_308 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZL))
19430 : 7 : return true;
19431 : : }
19432 : 184 : break;
19433 : : }
19434 : : default:;
19435 : : }
19436 : : }
19437 : : break;
19438 : 14 : case CFN_BUILT_IN_CTZL:
19439 : 14 : if (gimple_call_num_args (_c1) == 1)
19440 : : {
19441 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
19442 : 14 : _q20 = do_valueize (valueize, _q20);
19443 : 14 : switch (TREE_CODE (_p1))
19444 : : {
19445 : 14 : case INTEGER_CST:
19446 : 14 : {
19447 : 14 : {
19448 : 14 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19449 : 14 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_CTZL))
19450 : 8 : return true;
19451 : : }
19452 : 6 : break;
19453 : : }
19454 : : default:;
19455 : : }
19456 : : }
19457 : : break;
19458 : 0 : case CFN_BUILT_IN_FFSL:
19459 : 0 : if (gimple_call_num_args (_c1) == 1)
19460 : : {
19461 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19462 : 0 : _q20 = do_valueize (valueize, _q20);
19463 : 0 : switch (TREE_CODE (_p1))
19464 : : {
19465 : 0 : case INTEGER_CST:
19466 : 0 : {
19467 : 0 : {
19468 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19469 : 0 : if (gimple_simplify_313 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_FFSL))
19470 : 0 : return true;
19471 : : }
19472 : 0 : break;
19473 : : }
19474 : : default:;
19475 : : }
19476 : : }
19477 : : break;
19478 : 100 : case CFN_BUILT_IN_POPCOUNTLL:
19479 : 100 : if (gimple_call_num_args (_c1) == 1)
19480 : : {
19481 : 100 : tree _q20 = gimple_call_arg (_c1, 0);
19482 : 100 : _q20 = do_valueize (valueize, _q20);
19483 : 100 : if (integer_zerop (_p1))
19484 : : {
19485 : 0 : {
19486 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
19487 : 0 : if (gimple_simplify_312 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTLL))
19488 : 0 : return true;
19489 : : }
19490 : : }
19491 : : }
19492 : : break;
19493 : 0 : case CFN_BUILT_IN_CTZIMAX:
19494 : 0 : if (gimple_call_num_args (_c1) == 1)
19495 : : {
19496 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19497 : 0 : _q20 = do_valueize (valueize, _q20);
19498 : 0 : switch (TREE_CODE (_p1))
19499 : : {
19500 : 0 : case INTEGER_CST:
19501 : 0 : {
19502 : 0 : {
19503 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19504 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_CTZIMAX))
19505 : 0 : return true;
19506 : : }
19507 : 0 : break;
19508 : : }
19509 : : default:;
19510 : : }
19511 : : }
19512 : : break;
19513 : 0 : case CFN_POPCOUNT:
19514 : 0 : if (gimple_call_num_args (_c1) == 1)
19515 : : {
19516 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19517 : 0 : _q20 = do_valueize (valueize, _q20);
19518 : 0 : if (integer_zerop (_p1))
19519 : : {
19520 : 0 : {
19521 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
19522 : 0 : if (gimple_simplify_312 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR, CFN_POPCOUNT))
19523 : 0 : return true;
19524 : : }
19525 : : }
19526 : : }
19527 : : break;
19528 : 0 : case CFN_CLZ:
19529 : 0 : if (gimple_call_num_args (_c1) == 1)
19530 : : {
19531 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19532 : 0 : _q20 = do_valueize (valueize, _q20);
19533 : 0 : switch (TREE_CODE (_p1))
19534 : : {
19535 : 0 : case INTEGER_CST:
19536 : 0 : {
19537 : 0 : {
19538 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19539 : 0 : if (gimple_simplify_308 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR, CFN_CLZ))
19540 : 0 : return true;
19541 : : }
19542 : 0 : break;
19543 : : }
19544 : : default:;
19545 : : }
19546 : : }
19547 : 0 : if (gimple_call_num_args (_c1) == 2)
19548 : : {
19549 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19550 : 0 : _q20 = do_valueize (valueize, _q20);
19551 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
19552 : 0 : _q21 = do_valueize (valueize, _q21);
19553 : 0 : switch (TREE_CODE (_p1))
19554 : : {
19555 : 0 : case INTEGER_CST:
19556 : 0 : {
19557 : 0 : {
19558 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
19559 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR))
19560 : 0 : return true;
19561 : : }
19562 : 0 : break;
19563 : : }
19564 : : default:;
19565 : : }
19566 : : }
19567 : : break;
19568 : 6 : case CFN_CTZ:
19569 : 6 : if (gimple_call_num_args (_c1) == 1)
19570 : : {
19571 : 6 : tree _q20 = gimple_call_arg (_c1, 0);
19572 : 6 : _q20 = do_valueize (valueize, _q20);
19573 : 6 : switch (TREE_CODE (_p1))
19574 : : {
19575 : 6 : case INTEGER_CST:
19576 : 6 : {
19577 : 6 : {
19578 : 6 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19579 : 6 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_CTZ))
19580 : 2 : return true;
19581 : : }
19582 : 4 : break;
19583 : : }
19584 : : default:;
19585 : : }
19586 : : }
19587 : 4 : if (gimple_call_num_args (_c1) == 2)
19588 : : {
19589 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19590 : 0 : _q20 = do_valueize (valueize, _q20);
19591 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
19592 : 0 : _q21 = do_valueize (valueize, _q21);
19593 : 0 : switch (TREE_CODE (_p1))
19594 : : {
19595 : 0 : case INTEGER_CST:
19596 : 0 : {
19597 : 0 : {
19598 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
19599 : 0 : if (gimple_simplify_311 (res_op, seq, valueize, type, captures, EQ_EXPR))
19600 : 0 : return true;
19601 : : }
19602 : 0 : break;
19603 : : }
19604 : : default:;
19605 : : }
19606 : : }
19607 : : break;
19608 : 0 : case CFN_FFS:
19609 : 0 : if (gimple_call_num_args (_c1) == 1)
19610 : : {
19611 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19612 : 0 : _q20 = do_valueize (valueize, _q20);
19613 : 0 : switch (TREE_CODE (_p1))
19614 : : {
19615 : 0 : case INTEGER_CST:
19616 : 0 : {
19617 : 0 : {
19618 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19619 : 0 : if (gimple_simplify_313 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_FFS))
19620 : 0 : return true;
19621 : : }
19622 : 0 : break;
19623 : : }
19624 : : default:;
19625 : : }
19626 : : }
19627 : : break;
19628 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
19629 : 0 : if (gimple_call_num_args (_c1) == 1)
19630 : : {
19631 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19632 : 0 : _q20 = do_valueize (valueize, _q20);
19633 : 0 : if (integer_zerop (_p1))
19634 : : {
19635 : 0 : {
19636 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
19637 : 0 : if (gimple_simplify_312 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTIMAX))
19638 : 0 : return true;
19639 : : }
19640 : : }
19641 : : }
19642 : : break;
19643 : 0 : case CFN_BUILT_IN_CLZIMAX:
19644 : 0 : if (gimple_call_num_args (_c1) == 1)
19645 : : {
19646 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19647 : 0 : _q20 = do_valueize (valueize, _q20);
19648 : 0 : switch (TREE_CODE (_p1))
19649 : : {
19650 : 0 : case INTEGER_CST:
19651 : 0 : {
19652 : 0 : {
19653 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19654 : 0 : if (gimple_simplify_308 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZIMAX))
19655 : 0 : return true;
19656 : : }
19657 : 0 : break;
19658 : : }
19659 : : default:;
19660 : : }
19661 : : }
19662 : : break;
19663 : 35 : case CFN_BUILT_IN_POPCOUNTL:
19664 : 35 : if (gimple_call_num_args (_c1) == 1)
19665 : : {
19666 : 35 : tree _q20 = gimple_call_arg (_c1, 0);
19667 : 35 : _q20 = do_valueize (valueize, _q20);
19668 : 35 : if (integer_zerop (_p1))
19669 : : {
19670 : 0 : {
19671 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
19672 : 0 : if (gimple_simplify_312 (res_op, seq, valueize, type, captures, EQ_EXPR, EQ_EXPR, CFN_BUILT_IN_POPCOUNTL))
19673 : 0 : return true;
19674 : : }
19675 : : }
19676 : : }
19677 : : break;
19678 : 494 : case CFN_BUILT_IN_CLZLL:
19679 : 494 : if (gimple_call_num_args (_c1) == 1)
19680 : : {
19681 : 494 : tree _q20 = gimple_call_arg (_c1, 0);
19682 : 494 : _q20 = do_valueize (valueize, _q20);
19683 : 494 : switch (TREE_CODE (_p1))
19684 : : {
19685 : 494 : case INTEGER_CST:
19686 : 494 : {
19687 : 494 : {
19688 : 494 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19689 : 494 : if (gimple_simplify_308 (res_op, seq, valueize, type, captures, EQ_EXPR, LT_EXPR, CFN_BUILT_IN_CLZLL))
19690 : 18 : return true;
19691 : : }
19692 : 476 : break;
19693 : : }
19694 : : default:;
19695 : : }
19696 : : }
19697 : : break;
19698 : 0 : case CFN_BUILT_IN_CTZLL:
19699 : 0 : if (gimple_call_num_args (_c1) == 1)
19700 : : {
19701 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19702 : 0 : _q20 = do_valueize (valueize, _q20);
19703 : 0 : switch (TREE_CODE (_p1))
19704 : : {
19705 : 0 : case INTEGER_CST:
19706 : 0 : {
19707 : 0 : {
19708 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19709 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_CTZLL))
19710 : 0 : return true;
19711 : : }
19712 : 0 : break;
19713 : : }
19714 : : default:;
19715 : : }
19716 : : }
19717 : : break;
19718 : 0 : case CFN_BUILT_IN_FFSLL:
19719 : 0 : if (gimple_call_num_args (_c1) == 1)
19720 : : {
19721 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
19722 : 0 : _q20 = do_valueize (valueize, _q20);
19723 : 0 : switch (TREE_CODE (_p1))
19724 : : {
19725 : 0 : case INTEGER_CST:
19726 : 0 : {
19727 : 0 : {
19728 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19729 : 0 : if (gimple_simplify_313 (res_op, seq, valueize, type, captures, EQ_EXPR, CFN_BUILT_IN_FFSLL))
19730 : 0 : return true;
19731 : : }
19732 : 0 : break;
19733 : : }
19734 : : default:;
19735 : : }
19736 : : }
19737 : : break;
19738 : : default:;
19739 : : }
19740 : : }
19741 : : break;
19742 : : default:;
19743 : : }
19744 : : return false;
19745 : : }
19746 : :
19747 : : bool
19748 : 500 : gimple_simplify_CEIL_MOD_EXPR (gimple_match_op *res_op, gimple_seq *seq,
19749 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
19750 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
19751 : : {
19752 : 500 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
19753 : 500 : if (integer_zerop (_p0))
19754 : : {
19755 : 0 : {
19756 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
19757 : 0 : if (gimple_simplify_342 (res_op, seq, valueize, type, captures, CEIL_MOD_EXPR))
19758 : 0 : return true;
19759 : : }
19760 : : }
19761 : 500 : if (integer_onep (_p1))
19762 : : {
19763 : 0 : {
19764 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
19765 : 0 : if (gimple_simplify_343 (res_op, seq, valueize, type, captures, CEIL_MOD_EXPR))
19766 : 0 : return true;
19767 : : }
19768 : : }
19769 : 500 : if (integer_minus_onep (_p1))
19770 : : {
19771 : 0 : {
19772 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
19773 : 0 : if (gimple_simplify_344 (res_op, seq, valueize, type, captures, CEIL_MOD_EXPR))
19774 : 0 : return true;
19775 : : }
19776 : : }
19777 : 500 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
19778 : : {
19779 : 0 : {
19780 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
19781 : 0 : if (gimple_simplify_345 (res_op, seq, valueize, type, captures, CEIL_MOD_EXPR))
19782 : 0 : return true;
19783 : : }
19784 : : }
19785 : 500 : switch (TREE_CODE (_p0))
19786 : : {
19787 : 408 : case SSA_NAME:
19788 : 408 : if (gimple *_d1 = get_def (valueize, _p0))
19789 : : {
19790 : 300 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19791 : 96 : switch (gimple_assign_rhs_code (_a1))
19792 : : {
19793 : 0 : case CEIL_MOD_EXPR:
19794 : 0 : {
19795 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
19796 : 0 : _q20 = do_valueize (valueize, _q20);
19797 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
19798 : 0 : _q21 = do_valueize (valueize, _q21);
19799 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
19800 : : {
19801 : 0 : {
19802 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
19803 : 0 : if (gimple_simplify_346 (res_op, seq, valueize, type, captures, CEIL_MOD_EXPR))
19804 : 0 : return true;
19805 : : }
19806 : : }
19807 : : break;
19808 : : }
19809 : 0 : case MULT_EXPR:
19810 : 0 : {
19811 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
19812 : 0 : _q20 = do_valueize (valueize, _q20);
19813 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
19814 : 0 : _q21 = do_valueize (valueize, _q21);
19815 : 0 : if (tree_swap_operands_p (_q20, _q21))
19816 : 0 : std::swap (_q20, _q21);
19817 : 0 : switch (TREE_CODE (_q21))
19818 : : {
19819 : 0 : case INTEGER_CST:
19820 : 0 : {
19821 : 0 : switch (TREE_CODE (_p1))
19822 : : {
19823 : 0 : case INTEGER_CST:
19824 : 0 : {
19825 : 0 : {
19826 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19827 : 0 : if (gimple_simplify_347 (res_op, seq, valueize, type, captures, CEIL_MOD_EXPR))
19828 : 0 : return true;
19829 : : }
19830 : 0 : break;
19831 : : }
19832 : : default:;
19833 : : }
19834 : : break;
19835 : : }
19836 : : default:;
19837 : : }
19838 : 500 : break;
19839 : : }
19840 : 0 : case VEC_COND_EXPR:
19841 : 0 : {
19842 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
19843 : 0 : _q20 = do_valueize (valueize, _q20);
19844 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
19845 : 0 : _q21 = do_valueize (valueize, _q21);
19846 : 0 : tree _q22 = gimple_assign_rhs3 (_a1);
19847 : 0 : _q22 = do_valueize (valueize, _q22);
19848 : 0 : switch (TREE_CODE (_p1))
19849 : : {
19850 : 0 : case SSA_NAME:
19851 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
19852 : : {
19853 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19854 : 0 : switch (gimple_assign_rhs_code (_a2))
19855 : : {
19856 : 0 : case VEC_COND_EXPR:
19857 : 0 : {
19858 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
19859 : 0 : _q60 = do_valueize (valueize, _q60);
19860 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
19861 : 0 : _q61 = do_valueize (valueize, _q61);
19862 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
19863 : 0 : _q62 = do_valueize (valueize, _q62);
19864 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
19865 : : {
19866 : 0 : {
19867 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
19868 : 0 : if (VECTOR_TYPE_P (type)
19869 : 0 : && (TREE_CODE_CLASS (CEIL_MOD_EXPR) != tcc_comparison
19870 : : || types_match (type, TREE_TYPE (captures[2]))
19871 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
19872 : : || (optimize_vectors_before_lowering_p ()
19873 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
19874 : : )
19875 : : {
19876 : 0 : gimple_seq *lseq = seq;
19877 : 0 : if (lseq
19878 : 0 : && (!single_use (captures[0])
19879 : 0 : || !single_use (captures[4])))
19880 : 0 : lseq = NULL;
19881 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2514;
19882 : 0 : {
19883 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
19884 : 0 : res_op->ops[0] = captures[1];
19885 : 0 : {
19886 : 0 : tree _o1[2], _r1;
19887 : 0 : _o1[0] = captures[2];
19888 : 0 : _o1[1] = captures[5];
19889 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
19890 : 0 : tem_op.resimplify (NULL, valueize);
19891 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19892 : 0 : if (!_r1) goto next_after_fail2514;
19893 : 0 : res_op->ops[1] = _r1;
19894 : : }
19895 : 0 : {
19896 : 0 : tree _o1[2], _r1;
19897 : 0 : _o1[0] = captures[3];
19898 : 0 : _o1[1] = captures[6];
19899 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
19900 : 0 : tem_op.resimplify (NULL, valueize);
19901 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19902 : 0 : if (!_r1) goto next_after_fail2514;
19903 : 0 : res_op->ops[2] = _r1;
19904 : : }
19905 : 0 : res_op->resimplify (lseq, valueize);
19906 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
19907 : 0 : return true;
19908 : : }
19909 : 0 : next_after_fail2514:;
19910 : : }
19911 : : }
19912 : : }
19913 : : break;
19914 : : }
19915 : : default:;
19916 : : }
19917 : : }
19918 : : break;
19919 : 0 : default:;
19920 : : }
19921 : 0 : {
19922 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
19923 : 0 : if (VECTOR_TYPE_P (type)
19924 : 0 : && (TREE_CODE_CLASS (CEIL_MOD_EXPR) != tcc_comparison
19925 : : || types_match (type, TREE_TYPE (captures[2]))
19926 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
19927 : : || (optimize_vectors_before_lowering_p ()
19928 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
19929 : : )
19930 : : {
19931 : 0 : gimple_seq *lseq = seq;
19932 : 0 : if (lseq
19933 : 0 : && (!single_use (captures[0])))
19934 : 0 : lseq = NULL;
19935 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2515;
19936 : 0 : {
19937 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
19938 : 0 : res_op->ops[0] = captures[1];
19939 : 0 : {
19940 : 0 : tree _o1[2], _r1;
19941 : 0 : _o1[0] = captures[2];
19942 : 0 : _o1[1] = captures[4];
19943 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
19944 : 0 : tem_op.resimplify (NULL, valueize);
19945 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19946 : 0 : if (!_r1) goto next_after_fail2515;
19947 : 0 : res_op->ops[1] = _r1;
19948 : : }
19949 : 0 : {
19950 : 0 : tree _o1[2], _r1;
19951 : 0 : _o1[0] = captures[3];
19952 : 0 : _o1[1] = captures[4];
19953 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
19954 : 0 : tem_op.resimplify (NULL, valueize);
19955 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19956 : 0 : if (!_r1) goto next_after_fail2515;
19957 : 0 : res_op->ops[2] = _r1;
19958 : : }
19959 : 0 : res_op->resimplify (lseq, valueize);
19960 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
19961 : 0 : return true;
19962 : : }
19963 : 0 : next_after_fail2515:;
19964 : : }
19965 : : }
19966 : 0 : break;
19967 : : }
19968 : : default:;
19969 : : }
19970 : : }
19971 : : break;
19972 : 500 : default:;
19973 : : }
19974 : 500 : switch (TREE_CODE (_p1))
19975 : : {
19976 : 396 : case SSA_NAME:
19977 : 396 : if (gimple *_d1 = get_def (valueize, _p1))
19978 : : {
19979 : 300 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19980 : 252 : switch (gimple_assign_rhs_code (_a1))
19981 : : {
19982 : 0 : case VEC_COND_EXPR:
19983 : 0 : {
19984 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
19985 : 0 : _q30 = do_valueize (valueize, _q30);
19986 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
19987 : 0 : _q31 = do_valueize (valueize, _q31);
19988 : 0 : tree _q32 = gimple_assign_rhs3 (_a1);
19989 : 0 : _q32 = do_valueize (valueize, _q32);
19990 : 0 : {
19991 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
19992 : 0 : if (VECTOR_TYPE_P (type)
19993 : 0 : && (TREE_CODE_CLASS (CEIL_MOD_EXPR) != tcc_comparison
19994 : : || types_match (type, TREE_TYPE (captures[3]))
19995 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
19996 : : || (optimize_vectors_before_lowering_p ()
19997 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
19998 : : )
19999 : : {
20000 : 0 : gimple_seq *lseq = seq;
20001 : 0 : if (lseq
20002 : 0 : && (!single_use (captures[1])))
20003 : 0 : lseq = NULL;
20004 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2516;
20005 : 0 : {
20006 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
20007 : 0 : res_op->ops[0] = captures[2];
20008 : 0 : {
20009 : 0 : tree _o1[2], _r1;
20010 : 0 : _o1[0] = captures[0];
20011 : 0 : _o1[1] = captures[3];
20012 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20013 : 0 : tem_op.resimplify (NULL, valueize);
20014 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20015 : 0 : if (!_r1) goto next_after_fail2516;
20016 : 0 : res_op->ops[1] = _r1;
20017 : : }
20018 : 0 : {
20019 : 0 : tree _o1[2], _r1;
20020 : 0 : _o1[0] = captures[0];
20021 : 0 : _o1[1] = captures[4];
20022 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CEIL_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20023 : 0 : tem_op.resimplify (NULL, valueize);
20024 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20025 : 0 : if (!_r1) goto next_after_fail2516;
20026 : 0 : res_op->ops[2] = _r1;
20027 : : }
20028 : 0 : res_op->resimplify (lseq, valueize);
20029 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
20030 : 0 : return true;
20031 : : }
20032 : 0 : next_after_fail2516:;
20033 : : }
20034 : : }
20035 : 0 : break;
20036 : : }
20037 : : default:;
20038 : : }
20039 : : }
20040 : : break;
20041 : : default:;
20042 : : }
20043 : : return false;
20044 : : }
20045 : :
20046 : : bool
20047 : 0 : gimple_simplify_ROUND_MOD_EXPR (gimple_match_op *res_op, gimple_seq *seq,
20048 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
20049 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
20050 : : {
20051 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
20052 : 0 : if (integer_zerop (_p0))
20053 : : {
20054 : 0 : {
20055 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
20056 : 0 : if (gimple_simplify_342 (res_op, seq, valueize, type, captures, ROUND_MOD_EXPR))
20057 : 0 : return true;
20058 : : }
20059 : : }
20060 : 0 : if (integer_onep (_p1))
20061 : : {
20062 : 0 : {
20063 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
20064 : 0 : if (gimple_simplify_343 (res_op, seq, valueize, type, captures, ROUND_MOD_EXPR))
20065 : 0 : return true;
20066 : : }
20067 : : }
20068 : 0 : if (integer_minus_onep (_p1))
20069 : : {
20070 : 0 : {
20071 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
20072 : 0 : if (gimple_simplify_344 (res_op, seq, valueize, type, captures, ROUND_MOD_EXPR))
20073 : 0 : return true;
20074 : : }
20075 : : }
20076 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
20077 : : {
20078 : 0 : {
20079 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
20080 : 0 : if (gimple_simplify_345 (res_op, seq, valueize, type, captures, ROUND_MOD_EXPR))
20081 : 0 : return true;
20082 : : }
20083 : : }
20084 : 0 : switch (TREE_CODE (_p0))
20085 : : {
20086 : 0 : case SSA_NAME:
20087 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
20088 : : {
20089 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20090 : 0 : switch (gimple_assign_rhs_code (_a1))
20091 : : {
20092 : 0 : case ROUND_MOD_EXPR:
20093 : 0 : {
20094 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
20095 : 0 : _q20 = do_valueize (valueize, _q20);
20096 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
20097 : 0 : _q21 = do_valueize (valueize, _q21);
20098 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
20099 : : {
20100 : 0 : {
20101 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
20102 : 0 : if (gimple_simplify_346 (res_op, seq, valueize, type, captures, ROUND_MOD_EXPR))
20103 : 0 : return true;
20104 : : }
20105 : : }
20106 : : break;
20107 : : }
20108 : 0 : case MULT_EXPR:
20109 : 0 : {
20110 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
20111 : 0 : _q20 = do_valueize (valueize, _q20);
20112 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
20113 : 0 : _q21 = do_valueize (valueize, _q21);
20114 : 0 : if (tree_swap_operands_p (_q20, _q21))
20115 : 0 : std::swap (_q20, _q21);
20116 : 0 : switch (TREE_CODE (_q21))
20117 : : {
20118 : 0 : case INTEGER_CST:
20119 : 0 : {
20120 : 0 : switch (TREE_CODE (_p1))
20121 : : {
20122 : 0 : case INTEGER_CST:
20123 : 0 : {
20124 : 0 : {
20125 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
20126 : 0 : if (gimple_simplify_347 (res_op, seq, valueize, type, captures, ROUND_MOD_EXPR))
20127 : 0 : return true;
20128 : : }
20129 : 0 : break;
20130 : : }
20131 : : default:;
20132 : : }
20133 : : break;
20134 : : }
20135 : : default:;
20136 : : }
20137 : 0 : break;
20138 : : }
20139 : 0 : case VEC_COND_EXPR:
20140 : 0 : {
20141 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
20142 : 0 : _q20 = do_valueize (valueize, _q20);
20143 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
20144 : 0 : _q21 = do_valueize (valueize, _q21);
20145 : 0 : tree _q22 = gimple_assign_rhs3 (_a1);
20146 : 0 : _q22 = do_valueize (valueize, _q22);
20147 : 0 : switch (TREE_CODE (_p1))
20148 : : {
20149 : 0 : case SSA_NAME:
20150 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
20151 : : {
20152 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20153 : 0 : switch (gimple_assign_rhs_code (_a2))
20154 : : {
20155 : 0 : case VEC_COND_EXPR:
20156 : 0 : {
20157 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
20158 : 0 : _q60 = do_valueize (valueize, _q60);
20159 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
20160 : 0 : _q61 = do_valueize (valueize, _q61);
20161 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
20162 : 0 : _q62 = do_valueize (valueize, _q62);
20163 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
20164 : : {
20165 : 0 : {
20166 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
20167 : 0 : if (VECTOR_TYPE_P (type)
20168 : 0 : && (TREE_CODE_CLASS (ROUND_MOD_EXPR) != tcc_comparison
20169 : : || types_match (type, TREE_TYPE (captures[2]))
20170 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
20171 : : || (optimize_vectors_before_lowering_p ()
20172 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
20173 : : )
20174 : : {
20175 : 0 : gimple_seq *lseq = seq;
20176 : 0 : if (lseq
20177 : 0 : && (!single_use (captures[0])
20178 : 0 : || !single_use (captures[4])))
20179 : 0 : lseq = NULL;
20180 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2517;
20181 : 0 : {
20182 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
20183 : 0 : res_op->ops[0] = captures[1];
20184 : 0 : {
20185 : 0 : tree _o1[2], _r1;
20186 : 0 : _o1[0] = captures[2];
20187 : 0 : _o1[1] = captures[5];
20188 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20189 : 0 : tem_op.resimplify (NULL, valueize);
20190 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20191 : 0 : if (!_r1) goto next_after_fail2517;
20192 : 0 : res_op->ops[1] = _r1;
20193 : : }
20194 : 0 : {
20195 : 0 : tree _o1[2], _r1;
20196 : 0 : _o1[0] = captures[3];
20197 : 0 : _o1[1] = captures[6];
20198 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20199 : 0 : tem_op.resimplify (NULL, valueize);
20200 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20201 : 0 : if (!_r1) goto next_after_fail2517;
20202 : 0 : res_op->ops[2] = _r1;
20203 : : }
20204 : 0 : res_op->resimplify (lseq, valueize);
20205 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
20206 : 0 : return true;
20207 : : }
20208 : 0 : next_after_fail2517:;
20209 : : }
20210 : : }
20211 : : }
20212 : : break;
20213 : : }
20214 : : default:;
20215 : : }
20216 : : }
20217 : : break;
20218 : 0 : default:;
20219 : : }
20220 : 0 : {
20221 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
20222 : 0 : if (VECTOR_TYPE_P (type)
20223 : 0 : && (TREE_CODE_CLASS (ROUND_MOD_EXPR) != tcc_comparison
20224 : : || types_match (type, TREE_TYPE (captures[2]))
20225 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
20226 : : || (optimize_vectors_before_lowering_p ()
20227 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
20228 : : )
20229 : : {
20230 : 0 : gimple_seq *lseq = seq;
20231 : 0 : if (lseq
20232 : 0 : && (!single_use (captures[0])))
20233 : 0 : lseq = NULL;
20234 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2518;
20235 : 0 : {
20236 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
20237 : 0 : res_op->ops[0] = captures[1];
20238 : 0 : {
20239 : 0 : tree _o1[2], _r1;
20240 : 0 : _o1[0] = captures[2];
20241 : 0 : _o1[1] = captures[4];
20242 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20243 : 0 : tem_op.resimplify (NULL, valueize);
20244 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20245 : 0 : if (!_r1) goto next_after_fail2518;
20246 : 0 : res_op->ops[1] = _r1;
20247 : : }
20248 : 0 : {
20249 : 0 : tree _o1[2], _r1;
20250 : 0 : _o1[0] = captures[3];
20251 : 0 : _o1[1] = captures[4];
20252 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20253 : 0 : tem_op.resimplify (NULL, valueize);
20254 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20255 : 0 : if (!_r1) goto next_after_fail2518;
20256 : 0 : res_op->ops[2] = _r1;
20257 : : }
20258 : 0 : res_op->resimplify (lseq, valueize);
20259 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
20260 : 0 : return true;
20261 : : }
20262 : 0 : next_after_fail2518:;
20263 : : }
20264 : : }
20265 : 0 : break;
20266 : : }
20267 : : default:;
20268 : : }
20269 : : }
20270 : : break;
20271 : 0 : default:;
20272 : : }
20273 : 0 : switch (TREE_CODE (_p1))
20274 : : {
20275 : 0 : case SSA_NAME:
20276 : 0 : if (gimple *_d1 = get_def (valueize, _p1))
20277 : : {
20278 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20279 : 0 : switch (gimple_assign_rhs_code (_a1))
20280 : : {
20281 : 0 : case VEC_COND_EXPR:
20282 : 0 : {
20283 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
20284 : 0 : _q30 = do_valueize (valueize, _q30);
20285 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
20286 : 0 : _q31 = do_valueize (valueize, _q31);
20287 : 0 : tree _q32 = gimple_assign_rhs3 (_a1);
20288 : 0 : _q32 = do_valueize (valueize, _q32);
20289 : 0 : {
20290 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
20291 : 0 : if (VECTOR_TYPE_P (type)
20292 : 0 : && (TREE_CODE_CLASS (ROUND_MOD_EXPR) != tcc_comparison
20293 : : || types_match (type, TREE_TYPE (captures[3]))
20294 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
20295 : : || (optimize_vectors_before_lowering_p ()
20296 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
20297 : : )
20298 : : {
20299 : 0 : gimple_seq *lseq = seq;
20300 : 0 : if (lseq
20301 : 0 : && (!single_use (captures[1])))
20302 : 0 : lseq = NULL;
20303 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2519;
20304 : 0 : {
20305 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
20306 : 0 : res_op->ops[0] = captures[2];
20307 : 0 : {
20308 : 0 : tree _o1[2], _r1;
20309 : 0 : _o1[0] = captures[0];
20310 : 0 : _o1[1] = captures[3];
20311 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20312 : 0 : tem_op.resimplify (NULL, valueize);
20313 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20314 : 0 : if (!_r1) goto next_after_fail2519;
20315 : 0 : res_op->ops[1] = _r1;
20316 : : }
20317 : 0 : {
20318 : 0 : tree _o1[2], _r1;
20319 : 0 : _o1[0] = captures[0];
20320 : 0 : _o1[1] = captures[4];
20321 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ROUND_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20322 : 0 : tem_op.resimplify (NULL, valueize);
20323 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20324 : 0 : if (!_r1) goto next_after_fail2519;
20325 : 0 : res_op->ops[2] = _r1;
20326 : : }
20327 : 0 : res_op->resimplify (lseq, valueize);
20328 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
20329 : 0 : return true;
20330 : : }
20331 : 0 : next_after_fail2519:;
20332 : : }
20333 : : }
20334 : 0 : break;
20335 : : }
20336 : : default:;
20337 : : }
20338 : : }
20339 : : break;
20340 : : default:;
20341 : : }
20342 : : return false;
20343 : : }
20344 : :
20345 : : bool
20346 : 1722921 : gimple_simplify_TRUNC_MOD_EXPR (gimple_match_op *res_op, gimple_seq *seq,
20347 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
20348 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
20349 : : {
20350 : 1722921 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
20351 : 1722921 : if (integer_zerop (_p0))
20352 : : {
20353 : 25117 : {
20354 : 25117 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
20355 : 25117 : if (gimple_simplify_342 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20356 : 24748 : return true;
20357 : : }
20358 : : }
20359 : 1698173 : if (integer_onep (_p1))
20360 : : {
20361 : 2125 : {
20362 : 2125 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
20363 : 2125 : if (gimple_simplify_343 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20364 : 2125 : return true;
20365 : : }
20366 : : }
20367 : 1696048 : if (integer_minus_onep (_p1))
20368 : : {
20369 : 310 : {
20370 : 310 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
20371 : 310 : if (gimple_simplify_344 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20372 : 30 : return true;
20373 : : }
20374 : : }
20375 : 1696018 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
20376 : : {
20377 : 410 : {
20378 : 410 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
20379 : 410 : if (gimple_simplify_345 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20380 : 41 : return true;
20381 : : }
20382 : : }
20383 : 1695977 : switch (TREE_CODE (_p0))
20384 : : {
20385 : 1581630 : case SSA_NAME:
20386 : 1581630 : if (gimple *_d1 = get_def (valueize, _p0))
20387 : : {
20388 : 780136 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20389 : 692832 : switch (gimple_assign_rhs_code (_a1))
20390 : : {
20391 : 5111 : case TRUNC_MOD_EXPR:
20392 : 5111 : {
20393 : 5111 : tree _q20 = gimple_assign_rhs1 (_a1);
20394 : 5111 : _q20 = do_valueize (valueize, _q20);
20395 : 5111 : tree _q21 = gimple_assign_rhs2 (_a1);
20396 : 5111 : _q21 = do_valueize (valueize, _q21);
20397 : 5111 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
20398 : : {
20399 : 81 : {
20400 : 81 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
20401 : 81 : if (gimple_simplify_346 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20402 : 81 : return true;
20403 : : }
20404 : : }
20405 : : break;
20406 : : }
20407 : 31038 : case MULT_EXPR:
20408 : 31038 : {
20409 : 31038 : tree _q20 = gimple_assign_rhs1 (_a1);
20410 : 31038 : _q20 = do_valueize (valueize, _q20);
20411 : 31038 : tree _q21 = gimple_assign_rhs2 (_a1);
20412 : 31038 : _q21 = do_valueize (valueize, _q21);
20413 : 31038 : if (tree_swap_operands_p (_q20, _q21))
20414 : 654 : std::swap (_q20, _q21);
20415 : 31038 : switch (TREE_CODE (_q21))
20416 : : {
20417 : 16482 : case INTEGER_CST:
20418 : 16482 : {
20419 : 16482 : switch (TREE_CODE (_p1))
20420 : : {
20421 : 10976 : case INTEGER_CST:
20422 : 10976 : {
20423 : 10976 : {
20424 : 10976 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
20425 : 10976 : if (gimple_simplify_347 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20426 : 34 : return true;
20427 : : }
20428 : 10942 : break;
20429 : : }
20430 : : default:;
20431 : : }
20432 : : break;
20433 : : }
20434 : : default:;
20435 : : }
20436 : 1695862 : break;
20437 : : }
20438 : : default:;
20439 : : }
20440 : : }
20441 : : break;
20442 : 1695862 : default:;
20443 : : }
20444 : 1695862 : switch (TREE_CODE (_p1))
20445 : : {
20446 : 1008272 : case SSA_NAME:
20447 : 1008272 : if (gimple *_d1 = get_def (valueize, _p1))
20448 : : {
20449 : 790706 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20450 : 1210499 : switch (gimple_assign_rhs_code (_a1))
20451 : : {
20452 : 143544 : CASE_CONVERT:
20453 : 143544 : {
20454 : 143544 : tree _q30 = gimple_assign_rhs1 (_a1);
20455 : 143544 : _q30 = do_valueize (valueize, _q30);
20456 : 143544 : switch (TREE_CODE (_q30))
20457 : : {
20458 : 143544 : case SSA_NAME:
20459 : 143544 : if (gimple *_d2 = get_def (valueize, _q30))
20460 : : {
20461 : 142488 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20462 : 99619 : switch (gimple_assign_rhs_code (_a2))
20463 : : {
20464 : 2 : case NEGATE_EXPR:
20465 : 2 : {
20466 : 2 : tree _q40 = gimple_assign_rhs1 (_a2);
20467 : 2 : _q40 = do_valueize (valueize, _q40);
20468 : 2 : {
20469 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
20470 : 2 : if (gimple_simplify_397 (res_op, seq, valueize, type, captures))
20471 : 0 : return true;
20472 : : }
20473 : 2 : break;
20474 : : }
20475 : : default:;
20476 : : }
20477 : : }
20478 : : break;
20479 : 143544 : default:;
20480 : : }
20481 : 143544 : {
20482 : 143544 : tree _q30_pops[1];
20483 : 143544 : if (gimple_power_of_two_cand (_q30, _q30_pops, valueize))
20484 : : {
20485 : 108 : tree _q40 = _q30_pops[0];
20486 : 108 : {
20487 : 108 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q40 };
20488 : 108 : if (gimple_simplify_348 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20489 : 0 : return true;
20490 : : }
20491 : : }
20492 : : }
20493 : 143544 : break;
20494 : : }
20495 : 969 : case NEGATE_EXPR:
20496 : 969 : {
20497 : 969 : tree _q30 = gimple_assign_rhs1 (_a1);
20498 : 969 : _q30 = do_valueize (valueize, _q30);
20499 : 969 : {
20500 : 969 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
20501 : 969 : if (gimple_simplify_397 (res_op, seq, valueize, type, captures))
20502 : 18 : return true;
20503 : : }
20504 : 951 : break;
20505 : : }
20506 : : default:;
20507 : : }
20508 : : }
20509 : : break;
20510 : 674708 : case INTEGER_CST:
20511 : 674708 : {
20512 : 674708 : {
20513 : 674708 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
20514 : 674708 : if (TYPE_SIGN (type) == SIGNED
20515 : 374617 : && !TREE_OVERFLOW (captures[1])
20516 : 675285 : && wi::neg_p (wi::to_wide (captures[1]))
20517 : 916 : && !TYPE_OVERFLOW_TRAPS (type)
20518 : 675624 : && !sign_bit_p (captures[1], captures[1])
20519 : : )
20520 : : {
20521 : 339 : gimple_seq *lseq = seq;
20522 : 339 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2520;
20523 : 339 : {
20524 : 339 : res_op->set_op (TRUNC_MOD_EXPR, type, 2);
20525 : 339 : res_op->ops[0] = captures[0];
20526 : 339 : {
20527 : 339 : tree _o1[1], _r1;
20528 : 339 : _o1[0] = captures[1];
20529 : 339 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
20530 : 339 : tem_op.resimplify (lseq, valueize);
20531 : 339 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
20532 : 339 : if (!_r1) goto next_after_fail2520;
20533 : 339 : res_op->ops[1] = _r1;
20534 : : }
20535 : 339 : res_op->resimplify (lseq, valueize);
20536 : 339 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1150, __FILE__, __LINE__, true);
20537 : 339 : return true;
20538 : : }
20539 : 674369 : next_after_fail2520:;
20540 : : }
20541 : : }
20542 : 674369 : break;
20543 : : }
20544 : 1695505 : default:;
20545 : : }
20546 : 1695505 : {
20547 : 1695505 : tree _p1_pops[1];
20548 : 1695505 : if (gimple_power_of_two_cand (_p1, _p1_pops, valueize))
20549 : : {
20550 : 674476 : tree _q30 = _p1_pops[0];
20551 : 674476 : {
20552 : 674476 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
20553 : 674476 : if (gimple_simplify_348 (res_op, seq, valueize, type, captures, TRUNC_MOD_EXPR))
20554 : 1733 : return true;
20555 : : }
20556 : : }
20557 : : }
20558 : 1693772 : switch (TREE_CODE (_p0))
20559 : : {
20560 : 1579425 : case SSA_NAME:
20561 : 1579425 : if (gimple *_d1 = get_def (valueize, _p0))
20562 : : {
20563 : 778991 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20564 : 691478 : switch (gimple_assign_rhs_code (_a1))
20565 : : {
20566 : 4 : case VEC_COND_EXPR:
20567 : 4 : {
20568 : 4 : tree _q20 = gimple_assign_rhs1 (_a1);
20569 : 4 : _q20 = do_valueize (valueize, _q20);
20570 : 4 : tree _q21 = gimple_assign_rhs2 (_a1);
20571 : 4 : _q21 = do_valueize (valueize, _q21);
20572 : 4 : tree _q22 = gimple_assign_rhs3 (_a1);
20573 : 4 : _q22 = do_valueize (valueize, _q22);
20574 : 4 : switch (TREE_CODE (_p1))
20575 : : {
20576 : 0 : case SSA_NAME:
20577 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
20578 : : {
20579 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20580 : 0 : switch (gimple_assign_rhs_code (_a2))
20581 : : {
20582 : 0 : case VEC_COND_EXPR:
20583 : 0 : {
20584 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
20585 : 0 : _q60 = do_valueize (valueize, _q60);
20586 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
20587 : 0 : _q61 = do_valueize (valueize, _q61);
20588 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
20589 : 0 : _q62 = do_valueize (valueize, _q62);
20590 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
20591 : : {
20592 : 0 : {
20593 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
20594 : 0 : if (VECTOR_TYPE_P (type)
20595 : 0 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
20596 : : || types_match (type, TREE_TYPE (captures[2]))
20597 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
20598 : : || (optimize_vectors_before_lowering_p ()
20599 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
20600 : : )
20601 : : {
20602 : 0 : gimple_seq *lseq = seq;
20603 : 0 : if (lseq
20604 : 0 : && (!single_use (captures[0])
20605 : 0 : || !single_use (captures[4])))
20606 : 0 : lseq = NULL;
20607 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2521;
20608 : 0 : {
20609 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
20610 : 0 : res_op->ops[0] = captures[1];
20611 : 0 : {
20612 : 0 : tree _o1[2], _r1;
20613 : 0 : _o1[0] = captures[2];
20614 : 0 : _o1[1] = captures[5];
20615 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20616 : 0 : tem_op.resimplify (NULL, valueize);
20617 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20618 : 0 : if (!_r1) goto next_after_fail2521;
20619 : 0 : res_op->ops[1] = _r1;
20620 : : }
20621 : 0 : {
20622 : 0 : tree _o1[2], _r1;
20623 : 0 : _o1[0] = captures[3];
20624 : 0 : _o1[1] = captures[6];
20625 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20626 : 0 : tem_op.resimplify (NULL, valueize);
20627 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20628 : 0 : if (!_r1) goto next_after_fail2521;
20629 : 0 : res_op->ops[2] = _r1;
20630 : : }
20631 : 0 : res_op->resimplify (lseq, valueize);
20632 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
20633 : 0 : return true;
20634 : : }
20635 : 0 : next_after_fail2521:;
20636 : : }
20637 : : }
20638 : : }
20639 : : break;
20640 : : }
20641 : : default:;
20642 : : }
20643 : : }
20644 : : break;
20645 : 4 : default:;
20646 : : }
20647 : 4 : {
20648 : 4 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
20649 : 4 : if (VECTOR_TYPE_P (type)
20650 : 4 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
20651 : : || types_match (type, TREE_TYPE (captures[2]))
20652 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
20653 : : || (optimize_vectors_before_lowering_p ()
20654 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
20655 : : )
20656 : : {
20657 : 4 : gimple_seq *lseq = seq;
20658 : 4 : if (lseq
20659 : 3 : && (!single_use (captures[0])))
20660 : 1 : lseq = NULL;
20661 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2522;
20662 : 4 : {
20663 : 4 : res_op->set_op (VEC_COND_EXPR, type, 3);
20664 : 4 : res_op->ops[0] = captures[1];
20665 : 4 : {
20666 : 4 : tree _o1[2], _r1;
20667 : 4 : _o1[0] = captures[2];
20668 : 4 : _o1[1] = captures[4];
20669 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20670 : 4 : tem_op.resimplify (NULL, valueize);
20671 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20672 : 4 : if (!_r1) goto next_after_fail2522;
20673 : 4 : res_op->ops[1] = _r1;
20674 : : }
20675 : 4 : {
20676 : 4 : tree _o1[2], _r1;
20677 : 4 : _o1[0] = captures[3];
20678 : 4 : _o1[1] = captures[4];
20679 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20680 : 4 : tem_op.resimplify (NULL, valueize);
20681 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20682 : 4 : if (!_r1) goto next_after_fail2522;
20683 : 4 : res_op->ops[2] = _r1;
20684 : : }
20685 : 4 : res_op->resimplify (lseq, valueize);
20686 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
20687 : 4 : return true;
20688 : : }
20689 : 0 : next_after_fail2522:;
20690 : : }
20691 : : }
20692 : 0 : break;
20693 : : }
20694 : : default:;
20695 : : }
20696 : : }
20697 : : break;
20698 : 1693768 : default:;
20699 : : }
20700 : 1693768 : switch (TREE_CODE (_p1))
20701 : : {
20702 : 1008234 : case SSA_NAME:
20703 : 1008234 : if (gimple *_d1 = get_def (valueize, _p1))
20704 : : {
20705 : 790668 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20706 : 1210461 : switch (gimple_assign_rhs_code (_a1))
20707 : : {
20708 : 23 : case VEC_COND_EXPR:
20709 : 23 : {
20710 : 23 : tree _q30 = gimple_assign_rhs1 (_a1);
20711 : 23 : _q30 = do_valueize (valueize, _q30);
20712 : 23 : tree _q31 = gimple_assign_rhs2 (_a1);
20713 : 23 : _q31 = do_valueize (valueize, _q31);
20714 : 23 : tree _q32 = gimple_assign_rhs3 (_a1);
20715 : 23 : _q32 = do_valueize (valueize, _q32);
20716 : 23 : {
20717 : 23 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
20718 : 23 : if (VECTOR_TYPE_P (type)
20719 : 23 : && (TREE_CODE_CLASS (TRUNC_MOD_EXPR) != tcc_comparison
20720 : : || types_match (type, TREE_TYPE (captures[3]))
20721 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
20722 : : || (optimize_vectors_before_lowering_p ()
20723 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
20724 : : )
20725 : : {
20726 : 23 : gimple_seq *lseq = seq;
20727 : 23 : if (lseq
20728 : 11 : && (!single_use (captures[1])))
20729 : 12 : lseq = NULL;
20730 : 23 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2523;
20731 : 23 : {
20732 : 23 : res_op->set_op (VEC_COND_EXPR, type, 3);
20733 : 23 : res_op->ops[0] = captures[2];
20734 : 23 : {
20735 : 23 : tree _o1[2], _r1;
20736 : 23 : _o1[0] = captures[0];
20737 : 23 : _o1[1] = captures[3];
20738 : 23 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20739 : 23 : tem_op.resimplify (NULL, valueize);
20740 : 23 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20741 : 23 : if (!_r1) goto next_after_fail2523;
20742 : 23 : res_op->ops[1] = _r1;
20743 : : }
20744 : 23 : {
20745 : 23 : tree _o1[2], _r1;
20746 : 23 : _o1[0] = captures[0];
20747 : 23 : _o1[1] = captures[4];
20748 : 23 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20749 : 23 : tem_op.resimplify (NULL, valueize);
20750 : 23 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
20751 : 23 : if (!_r1) goto next_after_fail2523;
20752 : 0 : res_op->ops[2] = _r1;
20753 : : }
20754 : 0 : res_op->resimplify (lseq, valueize);
20755 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
20756 : 0 : return true;
20757 : : }
20758 : 23 : next_after_fail2523:;
20759 : : }
20760 : : }
20761 : 23 : break;
20762 : : }
20763 : : default:;
20764 : : }
20765 : : }
20766 : : break;
20767 : : default:;
20768 : : }
20769 : : return false;
20770 : : }
20771 : :
20772 : : bool
20773 : 3724219 : gimple_simplify_RSHIFT_EXPR (gimple_match_op *res_op, gimple_seq *seq,
20774 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
20775 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
20776 : : {
20777 : 3724219 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
20778 : 3724219 : switch (TREE_CODE (_p1))
20779 : : {
20780 : 319600 : case SSA_NAME:
20781 : 319600 : if (gimple *_d1 = get_def (valueize, _p1))
20782 : : {
20783 : 223675 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20784 : 202438 : switch (gimple_assign_rhs_code (_a1))
20785 : : {
20786 : 244 : case TRUNC_MOD_EXPR:
20787 : 244 : {
20788 : 244 : tree _q30 = gimple_assign_rhs1 (_a1);
20789 : 244 : _q30 = do_valueize (valueize, _q30);
20790 : 244 : tree _q31 = gimple_assign_rhs2 (_a1);
20791 : 244 : _q31 = do_valueize (valueize, _q31);
20792 : 244 : {
20793 : 244 : tree _q31_pops[1];
20794 : 244 : if (gimple_power_of_two_cand (_q31, _q31_pops, valueize))
20795 : : {
20796 : 226 : tree _q50 = _q31_pops[0];
20797 : 226 : {
20798 : 226 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
20799 : 226 : if (gimple_simplify_398 (res_op, seq, valueize, type, captures, RSHIFT_EXPR, TRUNC_MOD_EXPR))
20800 : 108 : return true;
20801 : : }
20802 : : }
20803 : : }
20804 : 136 : break;
20805 : : }
20806 : 0 : case FLOOR_MOD_EXPR:
20807 : 0 : {
20808 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
20809 : 0 : _q30 = do_valueize (valueize, _q30);
20810 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
20811 : 0 : _q31 = do_valueize (valueize, _q31);
20812 : 0 : {
20813 : 0 : tree _q31_pops[1];
20814 : 0 : if (gimple_power_of_two_cand (_q31, _q31_pops, valueize))
20815 : : {
20816 : 0 : tree _q50 = _q31_pops[0];
20817 : 0 : {
20818 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q50 };
20819 : 0 : if (gimple_simplify_398 (res_op, seq, valueize, type, captures, RSHIFT_EXPR, FLOOR_MOD_EXPR))
20820 : 0 : return true;
20821 : : }
20822 : : }
20823 : : }
20824 : 0 : break;
20825 : : }
20826 : : default:;
20827 : : }
20828 : : }
20829 : : break;
20830 : 3724111 : default:;
20831 : : }
20832 : 3724111 : switch (TREE_CODE (_p0))
20833 : : {
20834 : 3594679 : case SSA_NAME:
20835 : 3594679 : if (gimple *_d1 = get_def (valueize, _p0))
20836 : : {
20837 : 2227398 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20838 : 1923464 : switch (gimple_assign_rhs_code (_a1))
20839 : : {
20840 : 394157 : case PLUS_EXPR:
20841 : 394157 : {
20842 : 394157 : tree _q20 = gimple_assign_rhs1 (_a1);
20843 : 394157 : _q20 = do_valueize (valueize, _q20);
20844 : 394157 : tree _q21 = gimple_assign_rhs2 (_a1);
20845 : 394157 : _q21 = do_valueize (valueize, _q21);
20846 : 394157 : if (tree_swap_operands_p (_q20, _q21))
20847 : 12005 : std::swap (_q20, _q21);
20848 : 394157 : switch (TREE_CODE (_q21))
20849 : : {
20850 : 210963 : case INTEGER_CST:
20851 : 210963 : {
20852 : 210963 : switch (TREE_CODE (_p1))
20853 : : {
20854 : 209077 : case INTEGER_CST:
20855 : 209077 : {
20856 : 209077 : {
20857 : 209077 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
20858 : 209077 : {
20859 : 209077 : wide_int c = wi::to_wide (captures[2]);
20860 : 209077 : wide_int n = wi::to_wide (captures[3]);
20861 : 209077 : bool shift = RSHIFT_EXPR == RSHIFT_EXPR;
20862 : 209077 : int_range_max vr0, vr1, vr3;
20863 : 209077 : if (INTEGRAL_TYPE_P (type)
20864 : 418154 : && get_range_query (cfun)->range_of_expr (vr0, captures[1])
20865 : : )
20866 : : {
20867 : 418154 : if ((shift ? wi::ctz (
20868 : 209077 : c
20869 : 209077 : ) >= n.to_shwi ()
20870 : : : wi::multiple_of_p (
20871 : : c
20872 : : , n, TYPE_SIGN (type)))
20873 : 33404 : && get_range_query (cfun)->range_of_expr (vr1, captures[2])
20874 : 16702 : && range_op_handler (PLUS_EXPR).overflow_free_p (vr0, vr1)
20875 : 16106 : && get_range_query (cfun)->range_of_expr (vr3, captures[0])
20876 : 8053 : && !vr3.undefined_p ()
20877 : 217130 : && (TYPE_UNSIGNED (type)
20878 : 7204 : || (vr0.nonnegative_p () && vr3.nonnegative_p ())
20879 : 6743 : || (vr0.nonpositive_p () && vr3.nonpositive_p ()))
20880 : : )
20881 : : {
20882 : 1312 : gimple_seq *lseq = seq;
20883 : 1312 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2532;
20884 : 1312 : {
20885 : 1312 : res_op->set_op (PLUS_EXPR, type, 2);
20886 : 1312 : {
20887 : 1312 : tree _o1[2], _r1;
20888 : 1312 : _o1[0] = captures[1];
20889 : 1312 : _o1[1] = captures[3];
20890 : 1312 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20891 : 1312 : tem_op.resimplify (lseq, valueize);
20892 : 1312 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
20893 : 1312 : if (!_r1) goto next_after_fail2532;
20894 : 554 : res_op->ops[0] = _r1;
20895 : : }
20896 : 554 : res_op->ops[1] = wide_int_to_tree (type,
20897 : 554 : (shift ? wi::rshift (
20898 : : c
20899 : 554 : , n, TYPE_SIGN (type))
20900 : : : wi::div_trunc (
20901 : : c
20902 : : , n, TYPE_SIGN (type)))
20903 : : );
20904 : 554 : res_op->resimplify (lseq, valueize);
20905 : 554 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1135, __FILE__, __LINE__, true);
20906 : 554 : return true;
20907 : : }
20908 : 208102 : next_after_fail2532:;
20909 : : }
20910 : : else
20911 : : {
20912 : 207750 : if (!vr0.undefined_p () && TYPE_UNSIGNED (type) && c.sign_mask () < 0
20913 : 59062 : &&
20914 : 59062 : (shift ? wi::ctz (
20915 : 266827 : -c
20916 : 59062 : ) >= n.to_shwi ()
20917 : : : wi::multiple_of_p (
20918 : : -c
20919 : : , n, TYPE_SIGN (type)))
20920 : 423471 : && wi::geu_p (vr0.lower_bound (), -c)
20921 : : )
20922 : : {
20923 : 844 : gimple_seq *lseq = seq;
20924 : 844 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2533;
20925 : 844 : {
20926 : 844 : res_op->set_op (PLUS_EXPR, type, 2);
20927 : 844 : {
20928 : 844 : tree _o1[2], _r1;
20929 : 844 : _o1[0] = captures[1];
20930 : 844 : _o1[1] = captures[3];
20931 : 844 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
20932 : 844 : tem_op.resimplify (lseq, valueize);
20933 : 844 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
20934 : 844 : if (!_r1) goto next_after_fail2533;
20935 : 421 : res_op->ops[0] = _r1;
20936 : : }
20937 : 421 : res_op->ops[1] = wide_int_to_tree (type, -
20938 : 421 : (shift ? wi::rshift (
20939 : 421 : -c
20940 : 421 : , n, TYPE_SIGN (type))
20941 : : : wi::div_trunc (
20942 : : -c
20943 : 421 : , n, TYPE_SIGN (type)))
20944 : : );
20945 : 421 : res_op->resimplify (lseq, valueize);
20946 : 421 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1136, __FILE__, __LINE__, true);
20947 : 421 : return true;
20948 : : }
20949 : 208102 : next_after_fail2533:;
20950 : : }
20951 : : }
20952 : : }
20953 : 209077 : }
20954 : : }
20955 : 208102 : break;
20956 : : }
20957 : : default:;
20958 : : }
20959 : : break;
20960 : : }
20961 : : default:;
20962 : : }
20963 : 3723136 : break;
20964 : : }
20965 : : default:;
20966 : : }
20967 : : }
20968 : : break;
20969 : 3723136 : default:;
20970 : : }
20971 : 3723136 : if (uniform_integer_cst_p (_p1))
20972 : : {
20973 : 3395151 : {
20974 : 3395151 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
20975 : 3395151 : if (gimple_simplify_399 (res_op, seq, valueize, type, captures, RSHIFT_EXPR))
20976 : 75 : return true;
20977 : : }
20978 : : }
20979 : 3723061 : switch (TREE_CODE (_p0))
20980 : : {
20981 : 3593637 : case SSA_NAME:
20982 : 3593637 : if (gimple *_d1 = get_def (valueize, _p0))
20983 : : {
20984 : 2226371 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20985 : 1922385 : switch (gimple_assign_rhs_code (_a1))
20986 : : {
20987 : 2583 : case NEGATE_EXPR:
20988 : 2583 : {
20989 : 2583 : tree _q20 = gimple_assign_rhs1 (_a1);
20990 : 2583 : _q20 = do_valueize (valueize, _q20);
20991 : 2583 : switch (TREE_CODE (_p1))
20992 : : {
20993 : 2484 : case INTEGER_CST:
20994 : 2484 : {
20995 : 2484 : {
20996 : 2484 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
20997 : 2484 : if (!TYPE_UNSIGNED (type)
20998 : 2484 : && TYPE_OVERFLOW_UNDEFINED (type)
20999 : : )
21000 : : {
21001 : 744 : {
21002 : 744 : tree stype = TREE_TYPE (captures[2]);
21003 : 744 : tree bt = truth_type_for (type);
21004 : 744 : tree zeros = build_zero_cst (type);
21005 : 744 : tree INTEGER_CST = NULL_TREE;
21006 : 744 : if (INTEGRAL_TYPE_P (type)
21007 : : && canonicalize_math_after_vectorization_p ()
21008 : 959 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
21009 : : )
21010 : : {
21011 : 84 : gimple_seq *lseq = seq;
21012 : 84 : if (lseq
21013 : 42 : && (!single_use (captures[0])))
21014 : 42 : lseq = NULL;
21015 : 84 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2534;
21016 : 84 : {
21017 : 84 : res_op->set_op (NEGATE_EXPR, type, 1);
21018 : 84 : {
21019 : 84 : tree _r1;
21020 : 84 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
21021 : 84 : {
21022 : 84 : tree _o2[2], _r2;
21023 : 84 : _o2[0] = captures[1];
21024 : 84 : _o2[1] = zeros;
21025 : 84 : tem_op.set_op (GT_EXPR, boolean_type_node, 2);
21026 : 84 : tem_op.ops[0] = _o2[0];
21027 : 84 : tem_op.ops[1] = _o2[1];
21028 : 84 : tem_op.resimplify (lseq, valueize);
21029 : : }
21030 : 84 : if (type != tem_op.type
21031 : 84 : && !useless_type_conversion_p (type, tem_op.type))
21032 : : {
21033 : 84 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
21034 : 84 : if (!_r1) goto next_after_fail2534;
21035 : 42 : tem_op.set_op (NOP_EXPR, type, 1);
21036 : 42 : tem_op.ops[0] = _r1;
21037 : 42 : tem_op.resimplify (lseq, valueize);
21038 : : }
21039 : 42 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
21040 : 42 : if (!_r1) goto next_after_fail2534;
21041 : 42 : res_op->ops[0] = _r1;
21042 : : }
21043 : 42 : res_op->resimplify (lseq, valueize);
21044 : 42 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1155, __FILE__, __LINE__, true);
21045 : 42 : return true;
21046 : : }
21047 : 2440 : next_after_fail2534:;
21048 : : }
21049 : : else
21050 : : {
21051 : 116 : if (VECTOR_INTEGER_TYPE_P (type)
21052 : 116 : && TYPE_MODE (bt) == TYPE_MODE (type)
21053 : 116 : && expand_vec_cmp_expr_p (type, bt, GT_EXPR)
21054 : 116 : && (INTEGER_CST = uniform_integer_cst_p (captures[2])) != NULL
21055 : 776 : && wi::eq_p (wi::to_wide (INTEGER_CST), element_precision (type) - 1)
21056 : : )
21057 : : {
21058 : 7 : gimple_seq *lseq = seq;
21059 : 7 : if (lseq
21060 : 2 : && (!single_use (captures[0])))
21061 : 5 : lseq = NULL;
21062 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2535;
21063 : 7 : {
21064 : 7 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
21065 : 7 : {
21066 : 7 : tree _o1[2], _r1;
21067 : 7 : _o1[0] = captures[1];
21068 : 7 : _o1[1] = zeros;
21069 : 7 : (*res_op).set_op (GT_EXPR, bt, 2);
21070 : 7 : (*res_op).ops[0] = _o1[0];
21071 : 7 : (*res_op).ops[1] = _o1[1];
21072 : 7 : (*res_op).resimplify (lseq, valueize);
21073 : : }
21074 : 7 : if (type != res_op->type
21075 : 7 : && !useless_type_conversion_p (type, res_op->type))
21076 : : {
21077 : 7 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2535;
21078 : 2 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
21079 : 2 : res_op->resimplify (lseq, valueize);
21080 : : }
21081 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1156, __FILE__, __LINE__, true);
21082 : 2 : return true;
21083 : : }
21084 : 2440 : next_after_fail2535:;
21085 : : }
21086 : : }
21087 : : }
21088 : : }
21089 : : }
21090 : 2440 : break;
21091 : : }
21092 : 0 : case VECTOR_CST:
21093 : 0 : {
21094 : 0 : {
21095 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21096 : 0 : if (!TYPE_UNSIGNED (type)
21097 : 0 : && TYPE_OVERFLOW_UNDEFINED (type)
21098 : : )
21099 : : {
21100 : 0 : {
21101 : 0 : tree stype = TREE_TYPE (captures[2]);
21102 : 0 : tree bt = truth_type_for (type);
21103 : 0 : tree zeros = build_zero_cst (type);
21104 : 0 : tree VECTOR_CST = NULL_TREE;
21105 : 0 : if (INTEGRAL_TYPE_P (type)
21106 : : && canonicalize_math_after_vectorization_p ()
21107 : 0 : && wi::eq_p (wi::to_wide (captures[2]), TYPE_PRECISION (type) - 1)
21108 : : )
21109 : : {
21110 : 0 : gimple_seq *lseq = seq;
21111 : 0 : if (lseq
21112 : 0 : && (!single_use (captures[0])))
21113 : 0 : lseq = NULL;
21114 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2536;
21115 : 0 : {
21116 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
21117 : 0 : {
21118 : 0 : tree _r1;
21119 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
21120 : 0 : {
21121 : 0 : tree _o2[2], _r2;
21122 : 0 : _o2[0] = captures[1];
21123 : 0 : _o2[1] = zeros;
21124 : 0 : tem_op.set_op (GT_EXPR, boolean_type_node, 2);
21125 : 0 : tem_op.ops[0] = _o2[0];
21126 : 0 : tem_op.ops[1] = _o2[1];
21127 : 0 : tem_op.resimplify (lseq, valueize);
21128 : : }
21129 : 0 : if (type != tem_op.type
21130 : 0 : && !useless_type_conversion_p (type, tem_op.type))
21131 : : {
21132 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
21133 : 0 : if (!_r1) goto next_after_fail2536;
21134 : 0 : tem_op.set_op (NOP_EXPR, type, 1);
21135 : 0 : tem_op.ops[0] = _r1;
21136 : 0 : tem_op.resimplify (lseq, valueize);
21137 : : }
21138 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
21139 : 0 : if (!_r1) goto next_after_fail2536;
21140 : 0 : res_op->ops[0] = _r1;
21141 : : }
21142 : 0 : res_op->resimplify (lseq, valueize);
21143 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1155, __FILE__, __LINE__, true);
21144 : 0 : return true;
21145 : : }
21146 : 0 : next_after_fail2536:;
21147 : : }
21148 : : else
21149 : : {
21150 : 0 : if (VECTOR_INTEGER_TYPE_P (type)
21151 : 0 : && TYPE_MODE (bt) == TYPE_MODE (type)
21152 : 0 : && expand_vec_cmp_expr_p (type, bt, GT_EXPR)
21153 : 0 : && (VECTOR_CST = uniform_integer_cst_p (captures[2])) != NULL
21154 : 0 : && wi::eq_p (wi::to_wide (VECTOR_CST), element_precision (type) - 1)
21155 : : )
21156 : : {
21157 : 0 : gimple_seq *lseq = seq;
21158 : 0 : if (lseq
21159 : 0 : && (!single_use (captures[0])))
21160 : 0 : lseq = NULL;
21161 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2537;
21162 : 0 : {
21163 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
21164 : 0 : {
21165 : 0 : tree _o1[2], _r1;
21166 : 0 : _o1[0] = captures[1];
21167 : 0 : _o1[1] = zeros;
21168 : 0 : (*res_op).set_op (GT_EXPR, bt, 2);
21169 : 0 : (*res_op).ops[0] = _o1[0];
21170 : 0 : (*res_op).ops[1] = _o1[1];
21171 : 0 : (*res_op).resimplify (lseq, valueize);
21172 : : }
21173 : 0 : if (type != res_op->type
21174 : 0 : && !useless_type_conversion_p (type, res_op->type))
21175 : : {
21176 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2537;
21177 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
21178 : 0 : res_op->resimplify (lseq, valueize);
21179 : : }
21180 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1156, __FILE__, __LINE__, true);
21181 : 0 : return true;
21182 : : }
21183 : 0 : next_after_fail2537:;
21184 : : }
21185 : : }
21186 : : }
21187 : : }
21188 : : }
21189 : 0 : break;
21190 : : }
21191 : : default:;
21192 : : }
21193 : : break;
21194 : : }
21195 : 393182 : case PLUS_EXPR:
21196 : 393182 : {
21197 : 393182 : tree _q20 = gimple_assign_rhs1 (_a1);
21198 : 393182 : _q20 = do_valueize (valueize, _q20);
21199 : 393182 : tree _q21 = gimple_assign_rhs2 (_a1);
21200 : 393182 : _q21 = do_valueize (valueize, _q21);
21201 : 393182 : if (tree_swap_operands_p (_q20, _q21))
21202 : 11983 : std::swap (_q20, _q21);
21203 : 393182 : if (integer_onep (_p1))
21204 : : {
21205 : 50464 : {
21206 : 50464 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
21207 : 50464 : if (gimple_simplify_410 (res_op, seq, valueize, type, captures))
21208 : 0 : return true;
21209 : : }
21210 : 50464 : {
21211 : 50464 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
21212 : 50464 : if (gimple_simplify_410 (res_op, seq, valueize, type, captures))
21213 : 0 : return true;
21214 : : }
21215 : : }
21216 : 3722312 : break;
21217 : : }
21218 : 20366 : case LSHIFT_EXPR:
21219 : 20366 : {
21220 : 20366 : tree _q20 = gimple_assign_rhs1 (_a1);
21221 : 20366 : _q20 = do_valueize (valueize, _q20);
21222 : 20366 : tree _q21 = gimple_assign_rhs2 (_a1);
21223 : 20366 : _q21 = do_valueize (valueize, _q21);
21224 : 20366 : switch (TREE_CODE (_q21))
21225 : : {
21226 : 12357 : case INTEGER_CST:
21227 : 12357 : {
21228 : 12357 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q21, 0))
21229 : : {
21230 : 3740 : {
21231 : 3740 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q21 };
21232 : 3740 : if (gimple_simplify_411 (res_op, seq, valueize, type, captures))
21233 : 705 : return true;
21234 : : }
21235 : : }
21236 : : break;
21237 : : }
21238 : : default:;
21239 : : }
21240 : : break;
21241 : : }
21242 : : default:;
21243 : : }
21244 : : }
21245 : : break;
21246 : 3722312 : default:;
21247 : : }
21248 : 3722312 : {
21249 : 3722312 : tree _p0_pops[1];
21250 : 3722312 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
21251 : : {
21252 : 134202 : tree _q20 = _p0_pops[0];
21253 : 134202 : switch (TREE_CODE (_q20))
21254 : : {
21255 : 134094 : case SSA_NAME:
21256 : 134094 : if (gimple *_d1 = get_def (valueize, _q20))
21257 : : {
21258 : 129099 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
21259 : 86894 : switch (gimple_assign_rhs_code (_a1))
21260 : : {
21261 : 459 : case LSHIFT_EXPR:
21262 : 459 : {
21263 : 459 : tree _q30 = gimple_assign_rhs1 (_a1);
21264 : 459 : _q30 = do_valueize (valueize, _q30);
21265 : 459 : tree _q31 = gimple_assign_rhs2 (_a1);
21266 : 459 : _q31 = do_valueize (valueize, _q31);
21267 : 459 : switch (TREE_CODE (_q31))
21268 : : {
21269 : 18 : case INTEGER_CST:
21270 : 18 : {
21271 : 18 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
21272 : : {
21273 : 13 : {
21274 : 13 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p1, _q31 };
21275 : 13 : if (gimple_simplify_411 (res_op, seq, valueize, type, captures))
21276 : 4 : return true;
21277 : : }
21278 : : }
21279 : : break;
21280 : : }
21281 : : default:;
21282 : : }
21283 : : break;
21284 : : }
21285 : : default:;
21286 : : }
21287 : : }
21288 : : break;
21289 : : default:;
21290 : : }
21291 : : }
21292 : : }
21293 : 3722308 : if (integer_all_onesp (_p0))
21294 : : {
21295 : 7960 : {
21296 : 7960 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
21297 : 7960 : if (!TYPE_UNSIGNED (type)
21298 : : )
21299 : : {
21300 : 39 : gimple_seq *lseq = seq;
21301 : 39 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2538;
21302 : 39 : {
21303 : 39 : tree tem;
21304 : 39 : tem = captures[0];
21305 : 39 : res_op->set_value (tem);
21306 : 39 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1157, __FILE__, __LINE__, true);
21307 : 39 : return true;
21308 : : }
21309 : 0 : next_after_fail2538:;
21310 : : }
21311 : : }
21312 : : }
21313 : 3722269 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
21314 : : {
21315 : 15 : {
21316 : 15 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
21317 : 15 : gimple_seq *lseq = seq;
21318 : 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2539;
21319 : 15 : {
21320 : 15 : tree tem;
21321 : 15 : tem = build_zero_cst (type);
21322 : 15 : res_op->set_value (tem);
21323 : 15 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1158, __FILE__, __LINE__, true);
21324 : 15 : return true;
21325 : : }
21326 : 0 : next_after_fail2539:;
21327 : : }
21328 : : }
21329 : 3722254 : if (integer_zerop (_p1))
21330 : : {
21331 : 11903 : {
21332 : 11903 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
21333 : 11903 : if (gimple_simplify_402 (res_op, seq, valueize, type, captures, RSHIFT_EXPR))
21334 : 11903 : return true;
21335 : : }
21336 : : }
21337 : 3710351 : if (integer_zerop (_p0))
21338 : : {
21339 : 1974 : {
21340 : 1974 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
21341 : 1974 : if (gimple_simplify_403 (res_op, seq, valueize, type, captures, RSHIFT_EXPR))
21342 : 1974 : return true;
21343 : : }
21344 : : }
21345 : 3708377 : switch (TREE_CODE (_p1))
21346 : : {
21347 : 317476 : case SSA_NAME:
21348 : 317476 : if (gimple *_d1 = get_def (valueize, _p1))
21349 : : {
21350 : 222714 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
21351 : 201645 : switch (gimple_assign_rhs_code (_a1))
21352 : : {
21353 : 96 : case CONSTRUCTOR:
21354 : 96 : {
21355 : 96 : {
21356 : 96 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
21357 : 96 : if (gimple_simplify_405 (res_op, seq, valueize, type, captures, RSHIFT_EXPR))
21358 : 0 : return true;
21359 : : }
21360 : 96 : break;
21361 : : }
21362 : : default:;
21363 : : }
21364 : : }
21365 : 317476 : {
21366 : 317476 : {
21367 : 317476 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
21368 : 317476 : if (gimple_simplify_406 (res_op, seq, valueize, type, captures, RSHIFT_EXPR))
21369 : 6 : return true;
21370 : : }
21371 : : }
21372 : 317470 : break;
21373 : 2923 : case VECTOR_CST:
21374 : 2923 : {
21375 : 2923 : {
21376 : 2923 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
21377 : 2923 : if (gimple_simplify_404 (res_op, seq, valueize, type, captures, RSHIFT_EXPR))
21378 : 320 : return true;
21379 : : }
21380 : 2603 : break;
21381 : : }
21382 : 3708051 : default:;
21383 : : }
21384 : 3708051 : switch (TREE_CODE (_p0))
21385 : : {
21386 : 3580647 : case SSA_NAME:
21387 : 3580647 : if (gimple *_d1 = get_def (valueize, _p0))
21388 : : {
21389 : 2216271 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
21390 : 1912922 : switch (gimple_assign_rhs_code (_a1))
21391 : : {
21392 : 23296 : case RSHIFT_EXPR:
21393 : 23296 : {
21394 : 23296 : tree _q20 = gimple_assign_rhs1 (_a1);
21395 : 23296 : _q20 = do_valueize (valueize, _q20);
21396 : 23296 : tree _q21 = gimple_assign_rhs2 (_a1);
21397 : 23296 : _q21 = do_valueize (valueize, _q21);
21398 : 23296 : switch (TREE_CODE (_q21))
21399 : : {
21400 : 19878 : case INTEGER_CST:
21401 : 19878 : {
21402 : 19878 : switch (TREE_CODE (_p1))
21403 : : {
21404 : 19230 : case INTEGER_CST:
21405 : 19230 : {
21406 : 19230 : {
21407 : 19230 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
21408 : 19230 : if (gimple_simplify_407 (res_op, seq, valueize, type, captures, RSHIFT_EXPR))
21409 : 19230 : return true;
21410 : : }
21411 : 0 : break;
21412 : : }
21413 : : default:;
21414 : : }
21415 : : break;
21416 : : }
21417 : : default:;
21418 : : }
21419 : : break;
21420 : : }
21421 : 238000 : CASE_CONVERT:
21422 : 238000 : {
21423 : 238000 : tree _q20 = gimple_assign_rhs1 (_a1);
21424 : 238000 : _q20 = do_valueize (valueize, _q20);
21425 : 238000 : switch (TREE_CODE (_q20))
21426 : : {
21427 : 237892 : case SSA_NAME:
21428 : 237892 : if (gimple *_d2 = get_def (valueize, _q20))
21429 : : {
21430 : 227727 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
21431 : 182092 : switch (gimple_assign_rhs_code (_a2))
21432 : : {
21433 : 5610 : case BIT_AND_EXPR:
21434 : 5610 : {
21435 : 5610 : tree _q30 = gimple_assign_rhs1 (_a2);
21436 : 5610 : _q30 = do_valueize (valueize, _q30);
21437 : 5610 : tree _q31 = gimple_assign_rhs2 (_a2);
21438 : 5610 : _q31 = do_valueize (valueize, _q31);
21439 : 5610 : if (tree_swap_operands_p (_q30, _q31))
21440 : 63 : std::swap (_q30, _q31);
21441 : 5610 : switch (TREE_CODE (_q31))
21442 : : {
21443 : 4909 : case INTEGER_CST:
21444 : 4909 : {
21445 : 4909 : switch (TREE_CODE (_p1))
21446 : : {
21447 : 1068 : case INTEGER_CST:
21448 : 1068 : {
21449 : 1068 : {
21450 : 1068 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
21451 : 1068 : if (gimple_simplify_408 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, RSHIFT_EXPR))
21452 : 0 : return true;
21453 : : }
21454 : 1068 : break;
21455 : : }
21456 : : default:;
21457 : : }
21458 : : break;
21459 : : }
21460 : : default:;
21461 : : }
21462 : 3687726 : break;
21463 : : }
21464 : 432 : case BIT_XOR_EXPR:
21465 : 432 : {
21466 : 432 : tree _q30 = gimple_assign_rhs1 (_a2);
21467 : 432 : _q30 = do_valueize (valueize, _q30);
21468 : 432 : tree _q31 = gimple_assign_rhs2 (_a2);
21469 : 432 : _q31 = do_valueize (valueize, _q31);
21470 : 432 : if (tree_swap_operands_p (_q30, _q31))
21471 : 17 : std::swap (_q30, _q31);
21472 : 432 : switch (TREE_CODE (_q31))
21473 : : {
21474 : 57 : case INTEGER_CST:
21475 : 57 : {
21476 : 57 : switch (TREE_CODE (_p1))
21477 : : {
21478 : 57 : case INTEGER_CST:
21479 : 57 : {
21480 : 57 : {
21481 : 57 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
21482 : 57 : if (gimple_simplify_408 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, RSHIFT_EXPR))
21483 : 1 : return true;
21484 : : }
21485 : 56 : break;
21486 : : }
21487 : : default:;
21488 : : }
21489 : : break;
21490 : : }
21491 : : default:;
21492 : : }
21493 : 3687726 : break;
21494 : : }
21495 : 1043 : case BIT_IOR_EXPR:
21496 : 1043 : {
21497 : 1043 : tree _q30 = gimple_assign_rhs1 (_a2);
21498 : 1043 : _q30 = do_valueize (valueize, _q30);
21499 : 1043 : tree _q31 = gimple_assign_rhs2 (_a2);
21500 : 1043 : _q31 = do_valueize (valueize, _q31);
21501 : 1043 : if (tree_swap_operands_p (_q30, _q31))
21502 : 108 : std::swap (_q30, _q31);
21503 : 1043 : switch (TREE_CODE (_q31))
21504 : : {
21505 : 45 : case INTEGER_CST:
21506 : 45 : {
21507 : 45 : switch (TREE_CODE (_p1))
21508 : : {
21509 : 45 : case INTEGER_CST:
21510 : 45 : {
21511 : 45 : {
21512 : 45 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _p1 };
21513 : 45 : if (gimple_simplify_408 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, RSHIFT_EXPR))
21514 : 3 : return true;
21515 : : }
21516 : 42 : break;
21517 : : }
21518 : : default:;
21519 : : }
21520 : : break;
21521 : : }
21522 : : default:;
21523 : : }
21524 : 3687726 : break;
21525 : : }
21526 : : default:;
21527 : : }
21528 : 110796 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
21529 : 5479 : switch (gimple_call_combined_fn (_c2))
21530 : : {
21531 : 0 : case CFN_BUILT_IN_BSWAP128:
21532 : 0 : if (gimple_call_num_args (_c2) == 1)
21533 : : {
21534 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
21535 : 0 : _q30 = do_valueize (valueize, _q30);
21536 : 0 : switch (TREE_CODE (_p1))
21537 : : {
21538 : 0 : case INTEGER_CST:
21539 : 0 : {
21540 : 0 : {
21541 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
21542 : 0 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128))
21543 : 0 : return true;
21544 : : }
21545 : 0 : break;
21546 : : }
21547 : : default:;
21548 : : }
21549 : : }
21550 : : break;
21551 : 17 : case CFN_BUILT_IN_BSWAP16:
21552 : 17 : if (gimple_call_num_args (_c2) == 1)
21553 : : {
21554 : 17 : tree _q30 = gimple_call_arg (_c2, 0);
21555 : 17 : _q30 = do_valueize (valueize, _q30);
21556 : 17 : switch (TREE_CODE (_p1))
21557 : : {
21558 : 2 : case INTEGER_CST:
21559 : 2 : {
21560 : 2 : {
21561 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
21562 : 2 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16))
21563 : 1 : return true;
21564 : : }
21565 : 1 : break;
21566 : : }
21567 : : default:;
21568 : : }
21569 : : }
21570 : : break;
21571 : 0 : case CFN_BUILT_IN_BSWAP32:
21572 : 0 : if (gimple_call_num_args (_c2) == 1)
21573 : : {
21574 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
21575 : 0 : _q30 = do_valueize (valueize, _q30);
21576 : 0 : switch (TREE_CODE (_p1))
21577 : : {
21578 : 0 : case INTEGER_CST:
21579 : 0 : {
21580 : 0 : {
21581 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
21582 : 0 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32))
21583 : 0 : return true;
21584 : : }
21585 : 0 : break;
21586 : : }
21587 : : default:;
21588 : : }
21589 : : }
21590 : : break;
21591 : 0 : case CFN_BUILT_IN_BSWAP64:
21592 : 0 : if (gimple_call_num_args (_c2) == 1)
21593 : : {
21594 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
21595 : 0 : _q30 = do_valueize (valueize, _q30);
21596 : 0 : switch (TREE_CODE (_p1))
21597 : : {
21598 : 0 : case INTEGER_CST:
21599 : 0 : {
21600 : 0 : {
21601 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
21602 : 0 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64))
21603 : 0 : return true;
21604 : : }
21605 : 0 : break;
21606 : : }
21607 : : default:;
21608 : : }
21609 : : }
21610 : : break;
21611 : : default:;
21612 : : }
21613 : : }
21614 : : break;
21615 : : default:;
21616 : : }
21617 : : break;
21618 : : }
21619 : 36663 : case BIT_AND_EXPR:
21620 : 36663 : {
21621 : 36663 : tree _q20 = gimple_assign_rhs1 (_a1);
21622 : 36663 : _q20 = do_valueize (valueize, _q20);
21623 : 36663 : tree _q21 = gimple_assign_rhs2 (_a1);
21624 : 36663 : _q21 = do_valueize (valueize, _q21);
21625 : 36663 : if (tree_swap_operands_p (_q20, _q21))
21626 : 1071 : std::swap (_q20, _q21);
21627 : 36663 : switch (TREE_CODE (_q21))
21628 : : {
21629 : 22184 : case INTEGER_CST:
21630 : 22184 : {
21631 : 22184 : switch (TREE_CODE (_p1))
21632 : : {
21633 : 21227 : case INTEGER_CST:
21634 : 21227 : {
21635 : 21227 : {
21636 : 21227 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
21637 : 21227 : if (gimple_simplify_409 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, RSHIFT_EXPR))
21638 : 697 : return true;
21639 : : }
21640 : 20530 : break;
21641 : : }
21642 : : default:;
21643 : : }
21644 : : break;
21645 : : }
21646 : : default:;
21647 : : }
21648 : 3687726 : break;
21649 : : }
21650 : 21277 : case BIT_XOR_EXPR:
21651 : 21277 : {
21652 : 21277 : tree _q20 = gimple_assign_rhs1 (_a1);
21653 : 21277 : _q20 = do_valueize (valueize, _q20);
21654 : 21277 : tree _q21 = gimple_assign_rhs2 (_a1);
21655 : 21277 : _q21 = do_valueize (valueize, _q21);
21656 : 21277 : if (tree_swap_operands_p (_q20, _q21))
21657 : 1602 : std::swap (_q20, _q21);
21658 : 21277 : switch (TREE_CODE (_q21))
21659 : : {
21660 : 1648 : case INTEGER_CST:
21661 : 1648 : {
21662 : 1648 : switch (TREE_CODE (_p1))
21663 : : {
21664 : 1560 : case INTEGER_CST:
21665 : 1560 : {
21666 : 1560 : {
21667 : 1560 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
21668 : 1560 : if (gimple_simplify_409 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, RSHIFT_EXPR))
21669 : 87 : return true;
21670 : : }
21671 : 1473 : break;
21672 : : }
21673 : : default:;
21674 : : }
21675 : : break;
21676 : : }
21677 : : default:;
21678 : : }
21679 : 3687726 : break;
21680 : : }
21681 : 134765 : case BIT_IOR_EXPR:
21682 : 134765 : {
21683 : 134765 : tree _q20 = gimple_assign_rhs1 (_a1);
21684 : 134765 : _q20 = do_valueize (valueize, _q20);
21685 : 134765 : tree _q21 = gimple_assign_rhs2 (_a1);
21686 : 134765 : _q21 = do_valueize (valueize, _q21);
21687 : 134765 : if (tree_swap_operands_p (_q20, _q21))
21688 : 9044 : std::swap (_q20, _q21);
21689 : 134765 : switch (TREE_CODE (_q21))
21690 : : {
21691 : 2257 : case INTEGER_CST:
21692 : 2257 : {
21693 : 2257 : switch (TREE_CODE (_p1))
21694 : : {
21695 : 989 : case INTEGER_CST:
21696 : 989 : {
21697 : 989 : {
21698 : 989 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _p1 };
21699 : 989 : if (gimple_simplify_409 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, RSHIFT_EXPR))
21700 : 66 : return true;
21701 : : }
21702 : 923 : break;
21703 : : }
21704 : : default:;
21705 : : }
21706 : : break;
21707 : : }
21708 : : default:;
21709 : : }
21710 : 3687726 : break;
21711 : : }
21712 : 264 : case VEC_COND_EXPR:
21713 : 264 : {
21714 : 264 : tree _q20 = gimple_assign_rhs1 (_a1);
21715 : 264 : _q20 = do_valueize (valueize, _q20);
21716 : 264 : tree _q21 = gimple_assign_rhs2 (_a1);
21717 : 264 : _q21 = do_valueize (valueize, _q21);
21718 : 264 : tree _q22 = gimple_assign_rhs3 (_a1);
21719 : 264 : _q22 = do_valueize (valueize, _q22);
21720 : 264 : switch (TREE_CODE (_p1))
21721 : : {
21722 : 24 : case SSA_NAME:
21723 : 24 : if (gimple *_d2 = get_def (valueize, _p1))
21724 : : {
21725 : 24 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
21726 : 24 : switch (gimple_assign_rhs_code (_a2))
21727 : : {
21728 : 0 : case VEC_COND_EXPR:
21729 : 0 : {
21730 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
21731 : 0 : _q60 = do_valueize (valueize, _q60);
21732 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
21733 : 0 : _q61 = do_valueize (valueize, _q61);
21734 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
21735 : 0 : _q62 = do_valueize (valueize, _q62);
21736 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
21737 : : {
21738 : 0 : {
21739 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
21740 : 0 : if (VECTOR_TYPE_P (type)
21741 : 0 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
21742 : : || types_match (type, TREE_TYPE (captures[2]))
21743 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
21744 : : || (optimize_vectors_before_lowering_p ()
21745 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
21746 : : )
21747 : : {
21748 : 0 : gimple_seq *lseq = seq;
21749 : 0 : if (lseq
21750 : 0 : && (!single_use (captures[0])
21751 : 0 : || !single_use (captures[4])))
21752 : 0 : lseq = NULL;
21753 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2540;
21754 : 0 : {
21755 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
21756 : 0 : res_op->ops[0] = captures[1];
21757 : 0 : {
21758 : 0 : tree _o1[2], _r1;
21759 : 0 : _o1[0] = captures[2];
21760 : 0 : _o1[1] = captures[5];
21761 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
21762 : 0 : tem_op.resimplify (NULL, valueize);
21763 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
21764 : 0 : if (!_r1) goto next_after_fail2540;
21765 : 0 : res_op->ops[1] = _r1;
21766 : : }
21767 : 0 : {
21768 : 0 : tree _o1[2], _r1;
21769 : 0 : _o1[0] = captures[3];
21770 : 0 : _o1[1] = captures[6];
21771 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
21772 : 0 : tem_op.resimplify (NULL, valueize);
21773 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
21774 : 0 : if (!_r1) goto next_after_fail2540;
21775 : 0 : res_op->ops[2] = _r1;
21776 : : }
21777 : 0 : res_op->resimplify (lseq, valueize);
21778 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
21779 : 0 : return true;
21780 : : }
21781 : 0 : next_after_fail2540:;
21782 : : }
21783 : : }
21784 : : }
21785 : : break;
21786 : : }
21787 : : default:;
21788 : : }
21789 : : }
21790 : : break;
21791 : 264 : default:;
21792 : : }
21793 : 264 : {
21794 : 264 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
21795 : 264 : if (VECTOR_TYPE_P (type)
21796 : 264 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
21797 : : || types_match (type, TREE_TYPE (captures[2]))
21798 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
21799 : : || (optimize_vectors_before_lowering_p ()
21800 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
21801 : : )
21802 : : {
21803 : 264 : gimple_seq *lseq = seq;
21804 : 264 : if (lseq
21805 : 12 : && (!single_use (captures[0])))
21806 : 252 : lseq = NULL;
21807 : 264 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2541;
21808 : 264 : {
21809 : 264 : res_op->set_op (VEC_COND_EXPR, type, 3);
21810 : 264 : res_op->ops[0] = captures[1];
21811 : 264 : {
21812 : 264 : tree _o1[2], _r1;
21813 : 264 : _o1[0] = captures[2];
21814 : 264 : _o1[1] = captures[4];
21815 : 264 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
21816 : 264 : tem_op.resimplify (NULL, valueize);
21817 : 264 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
21818 : 264 : if (!_r1) goto next_after_fail2541;
21819 : 240 : res_op->ops[1] = _r1;
21820 : : }
21821 : 240 : {
21822 : 240 : tree _o1[2], _r1;
21823 : 240 : _o1[0] = captures[3];
21824 : 240 : _o1[1] = captures[4];
21825 : 240 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
21826 : 240 : tem_op.resimplify (NULL, valueize);
21827 : 240 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
21828 : 240 : if (!_r1) goto next_after_fail2541;
21829 : 240 : res_op->ops[2] = _r1;
21830 : : }
21831 : 240 : res_op->resimplify (lseq, valueize);
21832 : 240 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
21833 : 240 : return true;
21834 : : }
21835 : 24 : next_after_fail2541:;
21836 : : }
21837 : : }
21838 : 24 : break;
21839 : : }
21840 : : default:;
21841 : : }
21842 : 637052 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
21843 : 23515 : switch (gimple_call_combined_fn (_c1))
21844 : : {
21845 : 0 : case CFN_BUILT_IN_BSWAP128:
21846 : 0 : if (gimple_call_num_args (_c1) == 1)
21847 : : {
21848 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21849 : 0 : _q20 = do_valueize (valueize, _q20);
21850 : 0 : switch (TREE_CODE (_p1))
21851 : : {
21852 : 0 : case INTEGER_CST:
21853 : 0 : {
21854 : 0 : {
21855 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21856 : 0 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128))
21857 : 0 : return true;
21858 : : }
21859 : 0 : break;
21860 : : }
21861 : : default:;
21862 : : }
21863 : : }
21864 : : break;
21865 : 0 : case CFN_BUILT_IN_BSWAP16:
21866 : 0 : if (gimple_call_num_args (_c1) == 1)
21867 : : {
21868 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21869 : 0 : _q20 = do_valueize (valueize, _q20);
21870 : 0 : switch (TREE_CODE (_p1))
21871 : : {
21872 : 0 : case INTEGER_CST:
21873 : 0 : {
21874 : 0 : {
21875 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21876 : 0 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16))
21877 : 0 : return true;
21878 : : }
21879 : 0 : break;
21880 : : }
21881 : : default:;
21882 : : }
21883 : : }
21884 : : break;
21885 : 79 : case CFN_BUILT_IN_BSWAP32:
21886 : 79 : if (gimple_call_num_args (_c1) == 1)
21887 : : {
21888 : 79 : tree _q20 = gimple_call_arg (_c1, 0);
21889 : 79 : _q20 = do_valueize (valueize, _q20);
21890 : 79 : switch (TREE_CODE (_p1))
21891 : : {
21892 : 64 : case INTEGER_CST:
21893 : 64 : {
21894 : 64 : {
21895 : 64 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21896 : 64 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32))
21897 : 0 : return true;
21898 : : }
21899 : 64 : break;
21900 : : }
21901 : : default:;
21902 : : }
21903 : : }
21904 : : break;
21905 : 15 : case CFN_BUILT_IN_BSWAP64:
21906 : 15 : if (gimple_call_num_args (_c1) == 1)
21907 : : {
21908 : 15 : tree _q20 = gimple_call_arg (_c1, 0);
21909 : 15 : _q20 = do_valueize (valueize, _q20);
21910 : 15 : switch (TREE_CODE (_p1))
21911 : : {
21912 : 0 : case INTEGER_CST:
21913 : 0 : {
21914 : 0 : {
21915 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21916 : 0 : if (gimple_simplify_412 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64))
21917 : 0 : return true;
21918 : : }
21919 : 0 : break;
21920 : : }
21921 : : default:;
21922 : : }
21923 : : }
21924 : : break;
21925 : : default:;
21926 : : }
21927 : : }
21928 : : break;
21929 : 3687726 : default:;
21930 : : }
21931 : 3687726 : if (integer_onep (_p0))
21932 : : {
21933 : 211 : {
21934 : 211 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
21935 : 211 : if (INTEGRAL_TYPE_P (type)
21936 : : )
21937 : : {
21938 : 187 : gimple_seq *lseq = seq;
21939 : 187 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2542;
21940 : 187 : {
21941 : 187 : res_op->set_op (NOP_EXPR, type, 1);
21942 : 187 : {
21943 : 187 : tree _o1[2], _r1;
21944 : 187 : _o1[0] = captures[0];
21945 : 187 : _o1[1] = build_zero_cst (TREE_TYPE (captures[0]));
21946 : 187 : (*res_op).set_op (EQ_EXPR, boolean_type_node, 2);
21947 : 187 : (*res_op).ops[0] = _o1[0];
21948 : 187 : (*res_op).ops[1] = _o1[1];
21949 : 187 : (*res_op).resimplify (lseq, valueize);
21950 : : }
21951 : 187 : if (type != res_op->type
21952 : 187 : && !useless_type_conversion_p (type, res_op->type))
21953 : : {
21954 : 187 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2542;
21955 : 108 : res_op->set_op (NOP_EXPR, type, 1);
21956 : 108 : res_op->resimplify (lseq, valueize);
21957 : : }
21958 : 108 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1159, __FILE__, __LINE__, true);
21959 : 108 : return true;
21960 : : }
21961 : : next_after_fail2542:;
21962 : : }
21963 : : }
21964 : : }
21965 : 3687618 : switch (TREE_CODE (_p1))
21966 : : {
21967 : 317369 : case SSA_NAME:
21968 : 317369 : if (gimple *_d1 = get_def (valueize, _p1))
21969 : : {
21970 : 222685 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
21971 : 201622 : switch (gimple_assign_rhs_code (_a1))
21972 : : {
21973 : 159 : case VEC_COND_EXPR:
21974 : 159 : {
21975 : 159 : tree _q30 = gimple_assign_rhs1 (_a1);
21976 : 159 : _q30 = do_valueize (valueize, _q30);
21977 : 159 : tree _q31 = gimple_assign_rhs2 (_a1);
21978 : 159 : _q31 = do_valueize (valueize, _q31);
21979 : 159 : tree _q32 = gimple_assign_rhs3 (_a1);
21980 : 159 : _q32 = do_valueize (valueize, _q32);
21981 : 159 : {
21982 : 159 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
21983 : 159 : if (VECTOR_TYPE_P (type)
21984 : 159 : && (TREE_CODE_CLASS (RSHIFT_EXPR) != tcc_comparison
21985 : : || types_match (type, TREE_TYPE (captures[3]))
21986 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
21987 : : || (optimize_vectors_before_lowering_p ()
21988 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
21989 : : )
21990 : : {
21991 : 159 : gimple_seq *lseq = seq;
21992 : 159 : if (lseq
21993 : 69 : && (!single_use (captures[1])))
21994 : 90 : lseq = NULL;
21995 : 159 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2543;
21996 : 159 : {
21997 : 159 : res_op->set_op (VEC_COND_EXPR, type, 3);
21998 : 159 : res_op->ops[0] = captures[2];
21999 : 159 : {
22000 : 159 : tree _o1[2], _r1;
22001 : 159 : _o1[0] = captures[0];
22002 : 159 : _o1[1] = captures[3];
22003 : 159 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
22004 : 159 : tem_op.resimplify (NULL, valueize);
22005 : 159 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
22006 : 159 : if (!_r1) goto next_after_fail2543;
22007 : 0 : res_op->ops[1] = _r1;
22008 : : }
22009 : 0 : {
22010 : 0 : tree _o1[2], _r1;
22011 : 0 : _o1[0] = captures[0];
22012 : 0 : _o1[1] = captures[4];
22013 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
22014 : 0 : tem_op.resimplify (NULL, valueize);
22015 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
22016 : 0 : if (!_r1) goto next_after_fail2543;
22017 : 0 : res_op->ops[2] = _r1;
22018 : : }
22019 : 0 : res_op->resimplify (lseq, valueize);
22020 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
22021 : 0 : return true;
22022 : : }
22023 : 159 : next_after_fail2543:;
22024 : : }
22025 : : }
22026 : 159 : break;
22027 : : }
22028 : : default:;
22029 : : }
22030 : : }
22031 : : break;
22032 : 3687618 : default:;
22033 : : }
22034 : 3687618 : switch (TREE_CODE (_p0))
22035 : : {
22036 : 3560322 : case SSA_NAME:
22037 : 3560322 : if (gimple *_d1 = get_def (valueize, _p0))
22038 : : {
22039 : 2195946 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
22040 : 1892597 : switch (gimple_assign_rhs_code (_a1))
22041 : : {
22042 : 195149 : case MULT_EXPR:
22043 : 195149 : {
22044 : 195149 : tree _q20 = gimple_assign_rhs1 (_a1);
22045 : 195149 : _q20 = do_valueize (valueize, _q20);
22046 : 195149 : tree _q21 = gimple_assign_rhs2 (_a1);
22047 : 195149 : _q21 = do_valueize (valueize, _q21);
22048 : 195149 : if (tree_swap_operands_p (_q20, _q21))
22049 : 4994 : std::swap (_q20, _q21);
22050 : 195149 : switch (TREE_CODE (_q20))
22051 : : {
22052 : 195149 : case SSA_NAME:
22053 : 195149 : if (gimple *_d2 = get_def (valueize, _q20))
22054 : : {
22055 : 188275 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
22056 : 182851 : switch (gimple_assign_rhs_code (_a2))
22057 : : {
22058 : 59186 : case BIT_AND_EXPR:
22059 : 59186 : {
22060 : 59186 : tree _q30 = gimple_assign_rhs1 (_a2);
22061 : 59186 : _q30 = do_valueize (valueize, _q30);
22062 : 59186 : tree _q31 = gimple_assign_rhs2 (_a2);
22063 : 59186 : _q31 = do_valueize (valueize, _q31);
22064 : 59186 : if (tree_swap_operands_p (_q30, _q31))
22065 : 125 : std::swap (_q30, _q31);
22066 : 59186 : switch (TREE_CODE (_q30))
22067 : : {
22068 : 59186 : case SSA_NAME:
22069 : 59186 : if (gimple *_d3 = get_def (valueize, _q30))
22070 : : {
22071 : 58942 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
22072 : 84590 : switch (gimple_assign_rhs_code (_a3))
22073 : : {
22074 : 7301 : case PLUS_EXPR:
22075 : 7301 : {
22076 : 7301 : tree _q40 = gimple_assign_rhs1 (_a3);
22077 : 7301 : _q40 = do_valueize (valueize, _q40);
22078 : 7301 : tree _q41 = gimple_assign_rhs2 (_a3);
22079 : 7301 : _q41 = do_valueize (valueize, _q41);
22080 : 7301 : if (tree_swap_operands_p (_q40, _q41))
22081 : 425 : std::swap (_q40, _q41);
22082 : 7301 : switch (TREE_CODE (_q40))
22083 : : {
22084 : 7301 : case SSA_NAME:
22085 : 7301 : if (gimple *_d4 = get_def (valueize, _q40))
22086 : : {
22087 : 7293 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
22088 : 10602 : switch (gimple_assign_rhs_code (_a4))
22089 : : {
22090 : 1063 : case RSHIFT_EXPR:
22091 : 1063 : {
22092 : 1063 : tree _q50 = gimple_assign_rhs1 (_a4);
22093 : 1063 : _q50 = do_valueize (valueize, _q50);
22094 : 1063 : tree _q51 = gimple_assign_rhs2 (_a4);
22095 : 1063 : _q51 = do_valueize (valueize, _q51);
22096 : 1063 : switch (TREE_CODE (_q51))
22097 : : {
22098 : 1063 : case INTEGER_CST:
22099 : 1063 : {
22100 : 1063 : if ((_q41 == _q50 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q50, 0) && types_match (_q41, _q50)))
22101 : : {
22102 : 259 : switch (TREE_CODE (_q41))
22103 : : {
22104 : 259 : case SSA_NAME:
22105 : 259 : if (gimple *_d5 = get_def (valueize, _q41))
22106 : : {
22107 : 216 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
22108 : 220 : switch (gimple_assign_rhs_code (_a5))
22109 : : {
22110 : 212 : case PLUS_EXPR:
22111 : 212 : {
22112 : 212 : tree _q90 = gimple_assign_rhs1 (_a5);
22113 : 212 : _q90 = do_valueize (valueize, _q90);
22114 : 212 : tree _q91 = gimple_assign_rhs2 (_a5);
22115 : 212 : _q91 = do_valueize (valueize, _q91);
22116 : 212 : if (tree_swap_operands_p (_q90, _q91))
22117 : 14 : std::swap (_q90, _q91);
22118 : 212 : switch (TREE_CODE (_q90))
22119 : : {
22120 : 212 : case SSA_NAME:
22121 : 212 : if (gimple *_d6 = get_def (valueize, _q90))
22122 : : {
22123 : 212 : if (gassign *_a6 = dyn_cast <gassign *> (_d6))
22124 : 212 : switch (gimple_assign_rhs_code (_a6))
22125 : : {
22126 : 212 : case BIT_AND_EXPR:
22127 : 212 : {
22128 : 212 : tree _q100 = gimple_assign_rhs1 (_a6);
22129 : 212 : _q100 = do_valueize (valueize, _q100);
22130 : 212 : tree _q101 = gimple_assign_rhs2 (_a6);
22131 : 212 : _q101 = do_valueize (valueize, _q101);
22132 : 212 : if (tree_swap_operands_p (_q100, _q101))
22133 : 0 : std::swap (_q100, _q101);
22134 : 212 : switch (TREE_CODE (_q101))
22135 : : {
22136 : 212 : case INTEGER_CST:
22137 : 212 : {
22138 : 212 : switch (TREE_CODE (_q91))
22139 : : {
22140 : 212 : case SSA_NAME:
22141 : 212 : if (gimple *_d7 = get_def (valueize, _q91))
22142 : : {
22143 : 212 : if (gassign *_a7 = dyn_cast <gassign *> (_d7))
22144 : 212 : switch (gimple_assign_rhs_code (_a7))
22145 : : {
22146 : 212 : case BIT_AND_EXPR:
22147 : 212 : {
22148 : 212 : tree _q130 = gimple_assign_rhs1 (_a7);
22149 : 212 : _q130 = do_valueize (valueize, _q130);
22150 : 212 : tree _q131 = gimple_assign_rhs2 (_a7);
22151 : 212 : _q131 = do_valueize (valueize, _q131);
22152 : 212 : if (tree_swap_operands_p (_q130, _q131))
22153 : 0 : std::swap (_q130, _q131);
22154 : 212 : switch (TREE_CODE (_q130))
22155 : : {
22156 : 212 : case SSA_NAME:
22157 : 212 : if (gimple *_d8 = get_def (valueize, _q130))
22158 : : {
22159 : 212 : if (gassign *_a8 = dyn_cast <gassign *> (_d8))
22160 : 212 : switch (gimple_assign_rhs_code (_a8))
22161 : : {
22162 : 212 : case RSHIFT_EXPR:
22163 : 212 : {
22164 : 212 : tree _q140 = gimple_assign_rhs1 (_a8);
22165 : 212 : _q140 = do_valueize (valueize, _q140);
22166 : 212 : tree _q141 = gimple_assign_rhs2 (_a8);
22167 : 212 : _q141 = do_valueize (valueize, _q141);
22168 : 212 : if ((_q140 == _q100 && ! TREE_SIDE_EFFECTS (_q140)) || (operand_equal_p (_q140, _q100, 0) && types_match (_q140, _q100)))
22169 : : {
22170 : 212 : switch (TREE_CODE (_q140))
22171 : : {
22172 : 212 : case SSA_NAME:
22173 : 212 : if (gimple *_d9 = get_def (valueize, _q140))
22174 : : {
22175 : 212 : if (gassign *_a9 = dyn_cast <gassign *> (_d9))
22176 : 172 : switch (gimple_assign_rhs_code (_a9))
22177 : : {
22178 : 172 : case MINUS_EXPR:
22179 : 172 : {
22180 : 172 : tree _q160 = gimple_assign_rhs1 (_a9);
22181 : 172 : _q160 = do_valueize (valueize, _q160);
22182 : 172 : tree _q161 = gimple_assign_rhs2 (_a9);
22183 : 172 : _q161 = do_valueize (valueize, _q161);
22184 : 172 : switch (TREE_CODE (_q161))
22185 : : {
22186 : 172 : case SSA_NAME:
22187 : 172 : if (gimple *_d10 = get_def (valueize, _q161))
22188 : : {
22189 : 172 : if (gassign *_a10 = dyn_cast <gassign *> (_d10))
22190 : 172 : switch (gimple_assign_rhs_code (_a10))
22191 : : {
22192 : 172 : case BIT_AND_EXPR:
22193 : 172 : {
22194 : 172 : tree _q180 = gimple_assign_rhs1 (_a10);
22195 : 172 : _q180 = do_valueize (valueize, _q180);
22196 : 172 : tree _q181 = gimple_assign_rhs2 (_a10);
22197 : 172 : _q181 = do_valueize (valueize, _q181);
22198 : 172 : if (tree_swap_operands_p (_q180, _q181))
22199 : 0 : std::swap (_q180, _q181);
22200 : 172 : switch (TREE_CODE (_q180))
22201 : : {
22202 : 172 : case SSA_NAME:
22203 : 172 : if (gimple *_d11 = get_def (valueize, _q180))
22204 : : {
22205 : 172 : if (gassign *_a11 = dyn_cast <gassign *> (_d11))
22206 : 172 : switch (gimple_assign_rhs_code (_a11))
22207 : : {
22208 : 172 : case RSHIFT_EXPR:
22209 : 172 : {
22210 : 172 : tree _q190 = gimple_assign_rhs1 (_a11);
22211 : 172 : _q190 = do_valueize (valueize, _q190);
22212 : 172 : tree _q191 = gimple_assign_rhs2 (_a11);
22213 : 172 : _q191 = do_valueize (valueize, _q191);
22214 : 172 : if ((_q190 == _q160 && ! TREE_SIDE_EFFECTS (_q190)) || (operand_equal_p (_q190, _q160, 0) && types_match (_q190, _q160)))
22215 : : {
22216 : 172 : switch (TREE_CODE (_q191))
22217 : : {
22218 : 172 : case INTEGER_CST:
22219 : 172 : {
22220 : 172 : switch (TREE_CODE (_q181))
22221 : : {
22222 : 172 : case INTEGER_CST:
22223 : 172 : {
22224 : 172 : switch (TREE_CODE (_q141))
22225 : : {
22226 : 172 : case INTEGER_CST:
22227 : 172 : {
22228 : 172 : switch (TREE_CODE (_q131))
22229 : : {
22230 : 172 : case INTEGER_CST:
22231 : 172 : {
22232 : 172 : switch (TREE_CODE (_q31))
22233 : : {
22234 : 172 : case INTEGER_CST:
22235 : 172 : {
22236 : 172 : switch (TREE_CODE (_q21))
22237 : : {
22238 : 172 : case INTEGER_CST:
22239 : 172 : {
22240 : 172 : switch (TREE_CODE (_p1))
22241 : : {
22242 : 172 : case INTEGER_CST:
22243 : 172 : {
22244 : 172 : {
22245 : 172 : tree captures[12] ATTRIBUTE_UNUSED = { _q50, _q51, _q100, _q101, _q160, _q191, _q181, _q141, _q131, _q31, _q21, _p1 };
22246 : 172 : if (gimple_simplify_413 (res_op, seq, valueize, type, captures))
22247 : 0 : return true;
22248 : : }
22249 : 172 : break;
22250 : : }
22251 : : default:;
22252 : : }
22253 : : break;
22254 : : }
22255 : : default:;
22256 : : }
22257 : : break;
22258 : : }
22259 : : default:;
22260 : : }
22261 : : break;
22262 : : }
22263 : : default:;
22264 : : }
22265 : : break;
22266 : : }
22267 : : default:;
22268 : : }
22269 : : break;
22270 : : }
22271 : : default:;
22272 : : }
22273 : : break;
22274 : : }
22275 : : default:;
22276 : : }
22277 : : }
22278 : : break;
22279 : : }
22280 : : default:;
22281 : : }
22282 : : }
22283 : : break;
22284 : : default:;
22285 : : }
22286 : 212 : break;
22287 : : }
22288 : : default:;
22289 : : }
22290 : : }
22291 : : break;
22292 : : default:;
22293 : : }
22294 : : break;
22295 : : }
22296 : : default:;
22297 : : }
22298 : : }
22299 : : break;
22300 : : default:;
22301 : : }
22302 : : }
22303 : : break;
22304 : : }
22305 : : default:;
22306 : : }
22307 : : }
22308 : : break;
22309 : : default:;
22310 : : }
22311 : 212 : break;
22312 : : }
22313 : : default:;
22314 : : }
22315 : : }
22316 : : break;
22317 : : default:;
22318 : : }
22319 : : break;
22320 : : }
22321 : 212 : default:;
22322 : : }
22323 : 212 : switch (TREE_CODE (_q100))
22324 : : {
22325 : 212 : case SSA_NAME:
22326 : 212 : if (gimple *_d7 = get_def (valueize, _q100))
22327 : : {
22328 : 212 : if (gassign *_a7 = dyn_cast <gassign *> (_d7))
22329 : 172 : switch (gimple_assign_rhs_code (_a7))
22330 : : {
22331 : 0 : case RSHIFT_EXPR:
22332 : 0 : {
22333 : 0 : tree _q110 = gimple_assign_rhs1 (_a7);
22334 : 0 : _q110 = do_valueize (valueize, _q110);
22335 : 0 : tree _q111 = gimple_assign_rhs2 (_a7);
22336 : 0 : _q111 = do_valueize (valueize, _q111);
22337 : 0 : switch (TREE_CODE (_q110))
22338 : : {
22339 : 0 : case SSA_NAME:
22340 : 0 : if (gimple *_d8 = get_def (valueize, _q110))
22341 : : {
22342 : 0 : if (gassign *_a8 = dyn_cast <gassign *> (_d8))
22343 : 0 : switch (gimple_assign_rhs_code (_a8))
22344 : : {
22345 : 0 : case MINUS_EXPR:
22346 : 0 : {
22347 : 0 : tree _q120 = gimple_assign_rhs1 (_a8);
22348 : 0 : _q120 = do_valueize (valueize, _q120);
22349 : 0 : tree _q121 = gimple_assign_rhs2 (_a8);
22350 : 0 : _q121 = do_valueize (valueize, _q121);
22351 : 0 : switch (TREE_CODE (_q121))
22352 : : {
22353 : 0 : case SSA_NAME:
22354 : 0 : if (gimple *_d9 = get_def (valueize, _q121))
22355 : : {
22356 : 0 : if (gassign *_a9 = dyn_cast <gassign *> (_d9))
22357 : 0 : switch (gimple_assign_rhs_code (_a9))
22358 : : {
22359 : 0 : case BIT_AND_EXPR:
22360 : 0 : {
22361 : 0 : tree _q140 = gimple_assign_rhs1 (_a9);
22362 : 0 : _q140 = do_valueize (valueize, _q140);
22363 : 0 : tree _q141 = gimple_assign_rhs2 (_a9);
22364 : 0 : _q141 = do_valueize (valueize, _q141);
22365 : 0 : if (tree_swap_operands_p (_q140, _q141))
22366 : 0 : std::swap (_q140, _q141);
22367 : 0 : switch (TREE_CODE (_q140))
22368 : : {
22369 : 0 : case SSA_NAME:
22370 : 0 : if (gimple *_d10 = get_def (valueize, _q140))
22371 : : {
22372 : 0 : if (gassign *_a10 = dyn_cast <gassign *> (_d10))
22373 : 0 : switch (gimple_assign_rhs_code (_a10))
22374 : : {
22375 : 0 : case RSHIFT_EXPR:
22376 : 0 : {
22377 : 0 : tree _q150 = gimple_assign_rhs1 (_a10);
22378 : 0 : _q150 = do_valueize (valueize, _q150);
22379 : 0 : tree _q151 = gimple_assign_rhs2 (_a10);
22380 : 0 : _q151 = do_valueize (valueize, _q151);
22381 : 0 : if ((_q150 == _q120 && ! TREE_SIDE_EFFECTS (_q150)) || (operand_equal_p (_q150, _q120, 0) && types_match (_q150, _q120)))
22382 : : {
22383 : 0 : switch (TREE_CODE (_q151))
22384 : : {
22385 : 0 : case INTEGER_CST:
22386 : 0 : {
22387 : 0 : switch (TREE_CODE (_q141))
22388 : : {
22389 : 0 : case INTEGER_CST:
22390 : 0 : {
22391 : 0 : switch (TREE_CODE (_q111))
22392 : : {
22393 : 0 : case INTEGER_CST:
22394 : 0 : {
22395 : 0 : switch (TREE_CODE (_q101))
22396 : : {
22397 : 0 : case INTEGER_CST:
22398 : 0 : {
22399 : 0 : switch (TREE_CODE (_q91))
22400 : : {
22401 : 0 : case SSA_NAME:
22402 : 0 : if (gimple *_d11 = get_def (valueize, _q91))
22403 : : {
22404 : 0 : if (gassign *_a11 = dyn_cast <gassign *> (_d11))
22405 : 0 : switch (gimple_assign_rhs_code (_a11))
22406 : : {
22407 : 0 : case BIT_AND_EXPR:
22408 : 0 : {
22409 : 0 : tree _q210 = gimple_assign_rhs1 (_a11);
22410 : 0 : _q210 = do_valueize (valueize, _q210);
22411 : 0 : tree _q211 = gimple_assign_rhs2 (_a11);
22412 : 0 : _q211 = do_valueize (valueize, _q211);
22413 : 0 : if (tree_swap_operands_p (_q210, _q211))
22414 : 0 : std::swap (_q210, _q211);
22415 : 0 : if ((_q210 == _q110 && ! TREE_SIDE_EFFECTS (_q210)) || (operand_equal_p (_q210, _q110, 0) && types_match (_q210, _q110)))
22416 : : {
22417 : 0 : switch (TREE_CODE (_q211))
22418 : : {
22419 : 0 : case INTEGER_CST:
22420 : 0 : {
22421 : 0 : switch (TREE_CODE (_q31))
22422 : : {
22423 : 0 : case INTEGER_CST:
22424 : 0 : {
22425 : 0 : switch (TREE_CODE (_q21))
22426 : : {
22427 : 0 : case INTEGER_CST:
22428 : 0 : {
22429 : 0 : switch (TREE_CODE (_p1))
22430 : : {
22431 : 0 : case INTEGER_CST:
22432 : 0 : {
22433 : 0 : {
22434 : 0 : tree captures[12] ATTRIBUTE_UNUSED = { _q50, _q51, _q110, _q211, _q120, _q151, _q141, _q111, _q101, _q31, _q21, _p1 };
22435 : 0 : if (gimple_simplify_413 (res_op, seq, valueize, type, captures))
22436 : 0 : return true;
22437 : : }
22438 : 0 : break;
22439 : : }
22440 : : default:;
22441 : : }
22442 : : break;
22443 : : }
22444 : : default:;
22445 : : }
22446 : : break;
22447 : : }
22448 : : default:;
22449 : : }
22450 : : break;
22451 : : }
22452 : : default:;
22453 : : }
22454 : : }
22455 : 3724219 : break;
22456 : : }
22457 : : default:;
22458 : : }
22459 : : }
22460 : : break;
22461 : : default:;
22462 : : }
22463 : : break;
22464 : : }
22465 : : default:;
22466 : : }
22467 : : break;
22468 : : }
22469 : : default:;
22470 : : }
22471 : : break;
22472 : : }
22473 : : default:;
22474 : : }
22475 : : break;
22476 : : }
22477 : : default:;
22478 : : }
22479 : : }
22480 : : break;
22481 : : }
22482 : : default:;
22483 : : }
22484 : : }
22485 : : break;
22486 : : default:;
22487 : : }
22488 : 3724219 : break;
22489 : : }
22490 : : default:;
22491 : : }
22492 : : }
22493 : : break;
22494 : : default:;
22495 : : }
22496 : : break;
22497 : : }
22498 : : default:;
22499 : : }
22500 : : }
22501 : : break;
22502 : : default:;
22503 : : }
22504 : : break;
22505 : : }
22506 : : default:;
22507 : : }
22508 : : }
22509 : : break;
22510 : : default:;
22511 : : }
22512 : 3724219 : break;
22513 : : }
22514 : : default:;
22515 : : }
22516 : : }
22517 : : break;
22518 : : default:;
22519 : : }
22520 : 3724219 : break;
22521 : : }
22522 : : default:;
22523 : : }
22524 : : }
22525 : : break;
22526 : : default:;
22527 : : }
22528 : : }
22529 : : break;
22530 : : }
22531 : : default:;
22532 : : }
22533 : : break;
22534 : : }
22535 : 1650 : case PLUS_EXPR:
22536 : 1650 : {
22537 : 1650 : tree _q50 = gimple_assign_rhs1 (_a4);
22538 : 1650 : _q50 = do_valueize (valueize, _q50);
22539 : 1650 : tree _q51 = gimple_assign_rhs2 (_a4);
22540 : 1650 : _q51 = do_valueize (valueize, _q51);
22541 : 1650 : if (tree_swap_operands_p (_q50, _q51))
22542 : 30 : std::swap (_q50, _q51);
22543 : 1650 : switch (TREE_CODE (_q50))
22544 : : {
22545 : 1650 : case SSA_NAME:
22546 : 1650 : if (gimple *_d5 = get_def (valueize, _q50))
22547 : : {
22548 : 1650 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
22549 : 1674 : switch (gimple_assign_rhs_code (_a5))
22550 : : {
22551 : 0 : case BIT_AND_EXPR:
22552 : 0 : {
22553 : 0 : tree _q60 = gimple_assign_rhs1 (_a5);
22554 : 0 : _q60 = do_valueize (valueize, _q60);
22555 : 0 : tree _q61 = gimple_assign_rhs2 (_a5);
22556 : 0 : _q61 = do_valueize (valueize, _q61);
22557 : 0 : if (tree_swap_operands_p (_q60, _q61))
22558 : 0 : std::swap (_q60, _q61);
22559 : 0 : switch (TREE_CODE (_q61))
22560 : : {
22561 : 0 : case INTEGER_CST:
22562 : 0 : {
22563 : 0 : switch (TREE_CODE (_q51))
22564 : : {
22565 : 0 : case SSA_NAME:
22566 : 0 : if (gimple *_d6 = get_def (valueize, _q51))
22567 : : {
22568 : 0 : if (gassign *_a6 = dyn_cast <gassign *> (_d6))
22569 : 0 : switch (gimple_assign_rhs_code (_a6))
22570 : : {
22571 : 0 : case BIT_AND_EXPR:
22572 : 0 : {
22573 : 0 : tree _q90 = gimple_assign_rhs1 (_a6);
22574 : 0 : _q90 = do_valueize (valueize, _q90);
22575 : 0 : tree _q91 = gimple_assign_rhs2 (_a6);
22576 : 0 : _q91 = do_valueize (valueize, _q91);
22577 : 0 : if (tree_swap_operands_p (_q90, _q91))
22578 : 0 : std::swap (_q90, _q91);
22579 : 0 : switch (TREE_CODE (_q90))
22580 : : {
22581 : 0 : case SSA_NAME:
22582 : 0 : if (gimple *_d7 = get_def (valueize, _q90))
22583 : : {
22584 : 0 : if (gassign *_a7 = dyn_cast <gassign *> (_d7))
22585 : 0 : switch (gimple_assign_rhs_code (_a7))
22586 : : {
22587 : 0 : case RSHIFT_EXPR:
22588 : 0 : {
22589 : 0 : tree _q100 = gimple_assign_rhs1 (_a7);
22590 : 0 : _q100 = do_valueize (valueize, _q100);
22591 : 0 : tree _q101 = gimple_assign_rhs2 (_a7);
22592 : 0 : _q101 = do_valueize (valueize, _q101);
22593 : 0 : if ((_q100 == _q60 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q60, 0) && types_match (_q100, _q60)))
22594 : : {
22595 : 0 : switch (TREE_CODE (_q100))
22596 : : {
22597 : 0 : case SSA_NAME:
22598 : 0 : if (gimple *_d8 = get_def (valueize, _q100))
22599 : : {
22600 : 0 : if (gassign *_a8 = dyn_cast <gassign *> (_d8))
22601 : 0 : switch (gimple_assign_rhs_code (_a8))
22602 : : {
22603 : 0 : case MINUS_EXPR:
22604 : 0 : {
22605 : 0 : tree _q120 = gimple_assign_rhs1 (_a8);
22606 : 0 : _q120 = do_valueize (valueize, _q120);
22607 : 0 : tree _q121 = gimple_assign_rhs2 (_a8);
22608 : 0 : _q121 = do_valueize (valueize, _q121);
22609 : 0 : switch (TREE_CODE (_q121))
22610 : : {
22611 : 0 : case SSA_NAME:
22612 : 0 : if (gimple *_d9 = get_def (valueize, _q121))
22613 : : {
22614 : 0 : if (gassign *_a9 = dyn_cast <gassign *> (_d9))
22615 : 0 : switch (gimple_assign_rhs_code (_a9))
22616 : : {
22617 : 0 : case BIT_AND_EXPR:
22618 : 0 : {
22619 : 0 : tree _q140 = gimple_assign_rhs1 (_a9);
22620 : 0 : _q140 = do_valueize (valueize, _q140);
22621 : 0 : tree _q141 = gimple_assign_rhs2 (_a9);
22622 : 0 : _q141 = do_valueize (valueize, _q141);
22623 : 0 : if (tree_swap_operands_p (_q140, _q141))
22624 : 0 : std::swap (_q140, _q141);
22625 : 0 : switch (TREE_CODE (_q140))
22626 : : {
22627 : 0 : case SSA_NAME:
22628 : 0 : if (gimple *_d10 = get_def (valueize, _q140))
22629 : : {
22630 : 0 : if (gassign *_a10 = dyn_cast <gassign *> (_d10))
22631 : 0 : switch (gimple_assign_rhs_code (_a10))
22632 : : {
22633 : 0 : case RSHIFT_EXPR:
22634 : 0 : {
22635 : 0 : tree _q150 = gimple_assign_rhs1 (_a10);
22636 : 0 : _q150 = do_valueize (valueize, _q150);
22637 : 0 : tree _q151 = gimple_assign_rhs2 (_a10);
22638 : 0 : _q151 = do_valueize (valueize, _q151);
22639 : 0 : if ((_q150 == _q120 && ! TREE_SIDE_EFFECTS (_q150)) || (operand_equal_p (_q150, _q120, 0) && types_match (_q150, _q120)))
22640 : : {
22641 : 0 : switch (TREE_CODE (_q151))
22642 : : {
22643 : 0 : case INTEGER_CST:
22644 : 0 : {
22645 : 0 : switch (TREE_CODE (_q141))
22646 : : {
22647 : 0 : case INTEGER_CST:
22648 : 0 : {
22649 : 0 : switch (TREE_CODE (_q101))
22650 : : {
22651 : 0 : case INTEGER_CST:
22652 : 0 : {
22653 : 0 : switch (TREE_CODE (_q91))
22654 : : {
22655 : 0 : case INTEGER_CST:
22656 : 0 : {
22657 : 0 : switch (TREE_CODE (_q41))
22658 : : {
22659 : 0 : case SSA_NAME:
22660 : 0 : if (gimple *_d11 = get_def (valueize, _q41))
22661 : : {
22662 : 0 : if (gassign *_a11 = dyn_cast <gassign *> (_d11))
22663 : 0 : switch (gimple_assign_rhs_code (_a11))
22664 : : {
22665 : 0 : case RSHIFT_EXPR:
22666 : 0 : {
22667 : 0 : tree _q210 = gimple_assign_rhs1 (_a11);
22668 : 0 : _q210 = do_valueize (valueize, _q210);
22669 : 0 : tree _q211 = gimple_assign_rhs2 (_a11);
22670 : 0 : _q211 = do_valueize (valueize, _q211);
22671 : 0 : if ((_q210 == _q40 && ! TREE_SIDE_EFFECTS (_q210)) || (operand_equal_p (_q210, _q40, 0) && types_match (_q210, _q40)))
22672 : : {
22673 : 0 : switch (TREE_CODE (_q211))
22674 : : {
22675 : 0 : case INTEGER_CST:
22676 : 0 : {
22677 : 0 : switch (TREE_CODE (_q31))
22678 : : {
22679 : 0 : case INTEGER_CST:
22680 : 0 : {
22681 : 0 : switch (TREE_CODE (_q21))
22682 : : {
22683 : 0 : case INTEGER_CST:
22684 : 0 : {
22685 : 0 : switch (TREE_CODE (_p1))
22686 : : {
22687 : 0 : case INTEGER_CST:
22688 : 0 : {
22689 : 0 : {
22690 : 0 : tree captures[12] ATTRIBUTE_UNUSED = { _q40, _q211, _q60, _q61, _q120, _q151, _q141, _q101, _q91, _q31, _q21, _p1 };
22691 : 0 : if (gimple_simplify_413 (res_op, seq, valueize, type, captures))
22692 : 0 : return true;
22693 : : }
22694 : 0 : break;
22695 : : }
22696 : : default:;
22697 : : }
22698 : : break;
22699 : : }
22700 : : default:;
22701 : : }
22702 : : break;
22703 : : }
22704 : : default:;
22705 : : }
22706 : : break;
22707 : : }
22708 : : default:;
22709 : : }
22710 : : }
22711 : : break;
22712 : : }
22713 : : default:;
22714 : : }
22715 : : }
22716 : : break;
22717 : : default:;
22718 : : }
22719 : : break;
22720 : : }
22721 : : default:;
22722 : : }
22723 : : break;
22724 : : }
22725 : : default:;
22726 : : }
22727 : : break;
22728 : : }
22729 : : default:;
22730 : : }
22731 : : break;
22732 : : }
22733 : : default:;
22734 : : }
22735 : : }
22736 : : break;
22737 : : }
22738 : : default:;
22739 : : }
22740 : : }
22741 : : break;
22742 : : default:;
22743 : : }
22744 : 0 : break;
22745 : : }
22746 : : default:;
22747 : : }
22748 : : }
22749 : : break;
22750 : : default:;
22751 : : }
22752 : : break;
22753 : : }
22754 : : default:;
22755 : : }
22756 : : }
22757 : : break;
22758 : : default:;
22759 : : }
22760 : : }
22761 : : break;
22762 : : }
22763 : : default:;
22764 : : }
22765 : : }
22766 : : break;
22767 : : default:;
22768 : : }
22769 : 0 : break;
22770 : : }
22771 : : default:;
22772 : : }
22773 : : }
22774 : : break;
22775 : : default:;
22776 : : }
22777 : : break;
22778 : : }
22779 : 0 : default:;
22780 : : }
22781 : 0 : switch (TREE_CODE (_q60))
22782 : : {
22783 : 0 : case SSA_NAME:
22784 : 0 : if (gimple *_d6 = get_def (valueize, _q60))
22785 : : {
22786 : 0 : if (gassign *_a6 = dyn_cast <gassign *> (_d6))
22787 : 0 : switch (gimple_assign_rhs_code (_a6))
22788 : : {
22789 : 0 : case RSHIFT_EXPR:
22790 : 0 : {
22791 : 0 : tree _q70 = gimple_assign_rhs1 (_a6);
22792 : 0 : _q70 = do_valueize (valueize, _q70);
22793 : 0 : tree _q71 = gimple_assign_rhs2 (_a6);
22794 : 0 : _q71 = do_valueize (valueize, _q71);
22795 : 0 : switch (TREE_CODE (_q70))
22796 : : {
22797 : 0 : case SSA_NAME:
22798 : 0 : if (gimple *_d7 = get_def (valueize, _q70))
22799 : : {
22800 : 0 : if (gassign *_a7 = dyn_cast <gassign *> (_d7))
22801 : 0 : switch (gimple_assign_rhs_code (_a7))
22802 : : {
22803 : 0 : case MINUS_EXPR:
22804 : 0 : {
22805 : 0 : tree _q80 = gimple_assign_rhs1 (_a7);
22806 : 0 : _q80 = do_valueize (valueize, _q80);
22807 : 0 : tree _q81 = gimple_assign_rhs2 (_a7);
22808 : 0 : _q81 = do_valueize (valueize, _q81);
22809 : 0 : switch (TREE_CODE (_q81))
22810 : : {
22811 : 0 : case SSA_NAME:
22812 : 0 : if (gimple *_d8 = get_def (valueize, _q81))
22813 : : {
22814 : 0 : if (gassign *_a8 = dyn_cast <gassign *> (_d8))
22815 : 0 : switch (gimple_assign_rhs_code (_a8))
22816 : : {
22817 : 0 : case BIT_AND_EXPR:
22818 : 0 : {
22819 : 0 : tree _q100 = gimple_assign_rhs1 (_a8);
22820 : 0 : _q100 = do_valueize (valueize, _q100);
22821 : 0 : tree _q101 = gimple_assign_rhs2 (_a8);
22822 : 0 : _q101 = do_valueize (valueize, _q101);
22823 : 0 : if (tree_swap_operands_p (_q100, _q101))
22824 : 0 : std::swap (_q100, _q101);
22825 : 0 : switch (TREE_CODE (_q100))
22826 : : {
22827 : 0 : case SSA_NAME:
22828 : 0 : if (gimple *_d9 = get_def (valueize, _q100))
22829 : : {
22830 : 0 : if (gassign *_a9 = dyn_cast <gassign *> (_d9))
22831 : 0 : switch (gimple_assign_rhs_code (_a9))
22832 : : {
22833 : 0 : case RSHIFT_EXPR:
22834 : 0 : {
22835 : 0 : tree _q110 = gimple_assign_rhs1 (_a9);
22836 : 0 : _q110 = do_valueize (valueize, _q110);
22837 : 0 : tree _q111 = gimple_assign_rhs2 (_a9);
22838 : 0 : _q111 = do_valueize (valueize, _q111);
22839 : 0 : if ((_q110 == _q80 && ! TREE_SIDE_EFFECTS (_q110)) || (operand_equal_p (_q110, _q80, 0) && types_match (_q110, _q80)))
22840 : : {
22841 : 0 : switch (TREE_CODE (_q111))
22842 : : {
22843 : 0 : case INTEGER_CST:
22844 : 0 : {
22845 : 0 : switch (TREE_CODE (_q101))
22846 : : {
22847 : 0 : case INTEGER_CST:
22848 : 0 : {
22849 : 0 : switch (TREE_CODE (_q71))
22850 : : {
22851 : 0 : case INTEGER_CST:
22852 : 0 : {
22853 : 0 : switch (TREE_CODE (_q61))
22854 : : {
22855 : 0 : case INTEGER_CST:
22856 : 0 : {
22857 : 0 : switch (TREE_CODE (_q51))
22858 : : {
22859 : 0 : case SSA_NAME:
22860 : 0 : if (gimple *_d10 = get_def (valueize, _q51))
22861 : : {
22862 : 0 : if (gassign *_a10 = dyn_cast <gassign *> (_d10))
22863 : 0 : switch (gimple_assign_rhs_code (_a10))
22864 : : {
22865 : 0 : case BIT_AND_EXPR:
22866 : 0 : {
22867 : 0 : tree _q170 = gimple_assign_rhs1 (_a10);
22868 : 0 : _q170 = do_valueize (valueize, _q170);
22869 : 0 : tree _q171 = gimple_assign_rhs2 (_a10);
22870 : 0 : _q171 = do_valueize (valueize, _q171);
22871 : 0 : if (tree_swap_operands_p (_q170, _q171))
22872 : 0 : std::swap (_q170, _q171);
22873 : 0 : if ((_q170 == _q70 && ! TREE_SIDE_EFFECTS (_q170)) || (operand_equal_p (_q170, _q70, 0) && types_match (_q170, _q70)))
22874 : : {
22875 : 0 : switch (TREE_CODE (_q171))
22876 : : {
22877 : 0 : case INTEGER_CST:
22878 : 0 : {
22879 : 0 : switch (TREE_CODE (_q41))
22880 : : {
22881 : 0 : case SSA_NAME:
22882 : 0 : if (gimple *_d11 = get_def (valueize, _q41))
22883 : : {
22884 : 0 : if (gassign *_a11 = dyn_cast <gassign *> (_d11))
22885 : 0 : switch (gimple_assign_rhs_code (_a11))
22886 : : {
22887 : 0 : case RSHIFT_EXPR:
22888 : 0 : {
22889 : 0 : tree _q200 = gimple_assign_rhs1 (_a11);
22890 : 0 : _q200 = do_valueize (valueize, _q200);
22891 : 0 : tree _q201 = gimple_assign_rhs2 (_a11);
22892 : 0 : _q201 = do_valueize (valueize, _q201);
22893 : 0 : if ((_q200 == _q40 && ! TREE_SIDE_EFFECTS (_q200)) || (operand_equal_p (_q200, _q40, 0) && types_match (_q200, _q40)))
22894 : : {
22895 : 0 : switch (TREE_CODE (_q201))
22896 : : {
22897 : 0 : case INTEGER_CST:
22898 : 0 : {
22899 : 0 : switch (TREE_CODE (_q31))
22900 : : {
22901 : 0 : case INTEGER_CST:
22902 : 0 : {
22903 : 0 : switch (TREE_CODE (_q21))
22904 : : {
22905 : 0 : case INTEGER_CST:
22906 : 0 : {
22907 : 0 : switch (TREE_CODE (_p1))
22908 : : {
22909 : 0 : case INTEGER_CST:
22910 : 0 : {
22911 : 0 : {
22912 : 0 : tree captures[12] ATTRIBUTE_UNUSED = { _q40, _q201, _q70, _q171, _q80, _q111, _q101, _q71, _q61, _q31, _q21, _p1 };
22913 : 0 : if (gimple_simplify_413 (res_op, seq, valueize, type, captures))
22914 : 0 : return true;
22915 : : }
22916 : 0 : break;
22917 : : }
22918 : : default:;
22919 : : }
22920 : : break;
22921 : : }
22922 : : default:;
22923 : : }
22924 : : break;
22925 : : }
22926 : : default:;
22927 : : }
22928 : : break;
22929 : : }
22930 : : default:;
22931 : : }
22932 : : }
22933 : : break;
22934 : : }
22935 : : default:;
22936 : : }
22937 : : }
22938 : : break;
22939 : : default:;
22940 : : }
22941 : : break;
22942 : : }
22943 : : default:;
22944 : : }
22945 : : }
22946 : 3724219 : break;
22947 : : }
22948 : : default:;
22949 : : }
22950 : : }
22951 : : break;
22952 : : default:;
22953 : : }
22954 : : break;
22955 : : }
22956 : : default:;
22957 : : }
22958 : : break;
22959 : : }
22960 : : default:;
22961 : : }
22962 : : break;
22963 : : }
22964 : : default:;
22965 : : }
22966 : : break;
22967 : : }
22968 : : default:;
22969 : : }
22970 : : }
22971 : : break;
22972 : : }
22973 : : default:;
22974 : : }
22975 : : }
22976 : : break;
22977 : : default:;
22978 : : }
22979 : 3724219 : break;
22980 : : }
22981 : : default:;
22982 : : }
22983 : : }
22984 : : break;
22985 : : default:;
22986 : : }
22987 : : break;
22988 : : }
22989 : : default:;
22990 : : }
22991 : : }
22992 : : break;
22993 : : default:;
22994 : : }
22995 : : break;
22996 : : }
22997 : : default:;
22998 : : }
22999 : : }
23000 : : break;
23001 : : default:;
23002 : : }
23003 : 3724219 : break;
23004 : : }
23005 : : default:;
23006 : : }
23007 : : }
23008 : : break;
23009 : : default:;
23010 : : }
23011 : 3724219 : break;
23012 : : }
23013 : : default:;
23014 : : }
23015 : : }
23016 : : break;
23017 : : default:;
23018 : : }
23019 : 3724219 : break;
23020 : : }
23021 : : default:;
23022 : : }
23023 : : }
23024 : : break;
23025 : : default:;
23026 : : }
23027 : 3724219 : break;
23028 : : }
23029 : : default:;
23030 : : }
23031 : : }
23032 : : break;
23033 : : default:;
23034 : : }
23035 : 3724219 : break;
23036 : : }
23037 : 576 : case VEC_PERM_EXPR:
23038 : 576 : {
23039 : 576 : tree _q20 = gimple_assign_rhs1 (_a1);
23040 : 576 : _q20 = do_valueize (valueize, _q20);
23041 : 576 : tree _q21 = gimple_assign_rhs2 (_a1);
23042 : 576 : _q21 = do_valueize (valueize, _q21);
23043 : 576 : tree _q22 = gimple_assign_rhs3 (_a1);
23044 : 576 : _q22 = do_valueize (valueize, _q22);
23045 : 576 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
23046 : : {
23047 : 158 : switch (TREE_CODE (_p1))
23048 : : {
23049 : 62 : case SSA_NAME:
23050 : 62 : if (gimple *_d2 = get_def (valueize, _p1))
23051 : : {
23052 : 54 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23053 : 42 : switch (gimple_assign_rhs_code (_a2))
23054 : : {
23055 : 2 : case VEC_PERM_EXPR:
23056 : 2 : {
23057 : 2 : tree _q60 = gimple_assign_rhs1 (_a2);
23058 : 2 : _q60 = do_valueize (valueize, _q60);
23059 : 2 : tree _q61 = gimple_assign_rhs2 (_a2);
23060 : 2 : _q61 = do_valueize (valueize, _q61);
23061 : 2 : tree _q62 = gimple_assign_rhs3 (_a2);
23062 : 2 : _q62 = do_valueize (valueize, _q62);
23063 : 2 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
23064 : : {
23065 : 2 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
23066 : : {
23067 : 2 : {
23068 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
23069 : 2 : if (VECTOR_INTEGER_TYPE_P (type)
23070 : : )
23071 : : {
23072 : 2 : gimple_seq *lseq = seq;
23073 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2544;
23074 : 2 : {
23075 : 2 : res_op->set_op (VEC_PERM_EXPR, type, 3);
23076 : 2 : {
23077 : 2 : tree _o1[2], _r1;
23078 : 2 : _o1[0] = captures[0];
23079 : 2 : _o1[1] = captures[2];
23080 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23081 : 2 : tem_op.resimplify (lseq, valueize);
23082 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23083 : 2 : if (!_r1) goto next_after_fail2544;
23084 : 1 : captures[3] = _r1;
23085 : : }
23086 : 1 : res_op->ops[0] = captures[3];
23087 : 1 : res_op->ops[1] = captures[3];
23088 : 1 : res_op->ops[2] = captures[1];
23089 : 1 : res_op->resimplify (lseq, valueize);
23090 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1039, __FILE__, __LINE__, true);
23091 : 1 : return true;
23092 : : }
23093 : : next_after_fail2544:;
23094 : : }
23095 : : }
23096 : : }
23097 : : }
23098 : : break;
23099 : : }
23100 : : default:;
23101 : : }
23102 : : }
23103 : : break;
23104 : : default:;
23105 : : }
23106 : : }
23107 : : break;
23108 : : }
23109 : : default:;
23110 : : }
23111 : : }
23112 : : break;
23113 : : default:;
23114 : : }
23115 : : return false;
23116 : : }
23117 : :
23118 : : bool
23119 : 0 : gimple_simplify_CFN_BUILT_IN_FMINF64X (gimple_match_op *res_op, gimple_seq *seq,
23120 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23121 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23122 : : {
23123 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23124 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23125 : : {
23126 : 0 : {
23127 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23128 : 0 : if (gimple_simplify_605 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64X))
23129 : 0 : return true;
23130 : : }
23131 : : }
23132 : 0 : switch (TREE_CODE (_p1))
23133 : : {
23134 : 0 : case REAL_CST:
23135 : 0 : {
23136 : 0 : {
23137 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23138 : 0 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64X))
23139 : 0 : return true;
23140 : : }
23141 : 0 : break;
23142 : : }
23143 : 0 : default:;
23144 : : }
23145 : 0 : switch (TREE_CODE (_p0))
23146 : : {
23147 : 0 : case REAL_CST:
23148 : 0 : {
23149 : 0 : {
23150 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23151 : 0 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64X))
23152 : 0 : return true;
23153 : : }
23154 : 0 : break;
23155 : : }
23156 : 0 : default:;
23157 : : }
23158 : 0 : {
23159 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23160 : 0 : if (gimple_simplify_607 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64X))
23161 : 0 : return true;
23162 : : }
23163 : 0 : switch (TREE_CODE (_p0))
23164 : : {
23165 : 0 : case SSA_NAME:
23166 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23167 : : {
23168 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23169 : 0 : switch (gimple_assign_rhs_code (_a1))
23170 : : {
23171 : 0 : case NEGATE_EXPR:
23172 : 0 : {
23173 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23174 : 0 : _q20 = do_valueize (valueize, _q20);
23175 : 0 : switch (TREE_CODE (_p1))
23176 : : {
23177 : 0 : case SSA_NAME:
23178 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23179 : : {
23180 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23181 : 0 : switch (gimple_assign_rhs_code (_a2))
23182 : : {
23183 : 0 : case NEGATE_EXPR:
23184 : 0 : {
23185 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23186 : 0 : _q40 = do_valueize (valueize, _q40);
23187 : 0 : {
23188 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23189 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23190 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23191 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23192 : : )
23193 : : {
23194 : 0 : gimple_seq *lseq = seq;
23195 : 0 : if (lseq
23196 : 0 : && (!single_use (captures[0])
23197 : 0 : || !single_use (captures[2])))
23198 : 0 : lseq = NULL;
23199 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2735;
23200 : 0 : {
23201 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23202 : 0 : {
23203 : 0 : tree _o1[2], _r1;
23204 : 0 : _o1[0] = captures[1];
23205 : 0 : _o1[1] = captures[3];
23206 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF64X, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23207 : 0 : tem_op.resimplify (lseq, valueize);
23208 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23209 : 0 : if (!_r1) goto next_after_fail2735;
23210 : 0 : res_op->ops[0] = _r1;
23211 : : }
23212 : 0 : res_op->resimplify (lseq, valueize);
23213 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1194, __FILE__, __LINE__, true);
23214 : 0 : return true;
23215 : : }
23216 : 0 : next_after_fail2735:;
23217 : : }
23218 : : }
23219 : 0 : break;
23220 : : }
23221 : : default:;
23222 : : }
23223 : : }
23224 : : break;
23225 : : default:;
23226 : : }
23227 : : break;
23228 : : }
23229 : : default:;
23230 : : }
23231 : : }
23232 : : break;
23233 : : default:;
23234 : : }
23235 : : return false;
23236 : : }
23237 : :
23238 : : bool
23239 : 2332 : gimple_simplify_CFN_BUILT_IN_FMAX (gimple_match_op *res_op, gimple_seq *seq,
23240 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23241 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23242 : : {
23243 : 2332 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23244 : 2332 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23245 : : {
23246 : 56 : {
23247 : 56 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23248 : 56 : if (gimple_simplify_605 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAX))
23249 : 28 : return true;
23250 : : }
23251 : : }
23252 : 2304 : switch (TREE_CODE (_p1))
23253 : : {
23254 : 929 : case REAL_CST:
23255 : 929 : {
23256 : 929 : {
23257 : 929 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23258 : 929 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAX))
23259 : 38 : return true;
23260 : : }
23261 : 891 : break;
23262 : : }
23263 : 2266 : default:;
23264 : : }
23265 : 2266 : switch (TREE_CODE (_p0))
23266 : : {
23267 : 514 : case REAL_CST:
23268 : 514 : {
23269 : 514 : {
23270 : 514 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23271 : 514 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAX))
23272 : 60 : return true;
23273 : : }
23274 : 454 : break;
23275 : : }
23276 : 2206 : default:;
23277 : : }
23278 : 2206 : {
23279 : 2206 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23280 : 2206 : if (gimple_simplify_608 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAX))
23281 : 30 : return true;
23282 : : }
23283 : 2176 : switch (TREE_CODE (_p0))
23284 : : {
23285 : 1557 : case SSA_NAME:
23286 : 1557 : if (gimple *_d1 = get_def (valueize, _p0))
23287 : : {
23288 : 862 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23289 : 691 : switch (gimple_assign_rhs_code (_a1))
23290 : : {
23291 : 42 : case NEGATE_EXPR:
23292 : 42 : {
23293 : 42 : tree _q20 = gimple_assign_rhs1 (_a1);
23294 : 42 : _q20 = do_valueize (valueize, _q20);
23295 : 42 : switch (TREE_CODE (_p1))
23296 : : {
23297 : 2 : case SSA_NAME:
23298 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
23299 : : {
23300 : 2 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23301 : 2 : switch (gimple_assign_rhs_code (_a2))
23302 : : {
23303 : 2 : case NEGATE_EXPR:
23304 : 2 : {
23305 : 2 : tree _q40 = gimple_assign_rhs1 (_a2);
23306 : 2 : _q40 = do_valueize (valueize, _q40);
23307 : 2 : {
23308 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23309 : 2 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23310 : 2 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23311 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23312 : : )
23313 : : {
23314 : 2 : gimple_seq *lseq = seq;
23315 : 2 : if (lseq
23316 : 1 : && (!single_use (captures[0])
23317 : 1 : || !single_use (captures[2])))
23318 : 1 : lseq = NULL;
23319 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2739;
23320 : 2 : {
23321 : 2 : res_op->set_op (NEGATE_EXPR, type, 1);
23322 : 2 : {
23323 : 2 : tree _o1[2], _r1;
23324 : 2 : _o1[0] = captures[1];
23325 : 2 : _o1[1] = captures[3];
23326 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMIN, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23327 : 2 : tem_op.resimplify (lseq, valueize);
23328 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23329 : 2 : if (!_r1) goto next_after_fail2739;
23330 : 1 : res_op->ops[0] = _r1;
23331 : : }
23332 : 1 : res_op->resimplify (lseq, valueize);
23333 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1194, __FILE__, __LINE__, true);
23334 : 1 : return true;
23335 : : }
23336 : 1 : next_after_fail2739:;
23337 : : }
23338 : : }
23339 : 1 : break;
23340 : : }
23341 : : default:;
23342 : : }
23343 : : }
23344 : : break;
23345 : : default:;
23346 : : }
23347 : : break;
23348 : : }
23349 : : default:;
23350 : : }
23351 : : }
23352 : : break;
23353 : : default:;
23354 : : }
23355 : : return false;
23356 : : }
23357 : :
23358 : : bool
23359 : 0 : gimple_simplify_CFN_BUILT_IN_FMAXF64 (gimple_match_op *res_op, gimple_seq *seq,
23360 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23361 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23362 : : {
23363 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23364 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23365 : : {
23366 : 0 : {
23367 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23368 : 0 : if (gimple_simplify_605 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
23369 : 0 : return true;
23370 : : }
23371 : : }
23372 : 0 : switch (TREE_CODE (_p1))
23373 : : {
23374 : 0 : case REAL_CST:
23375 : 0 : {
23376 : 0 : {
23377 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23378 : 0 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
23379 : 0 : return true;
23380 : : }
23381 : 0 : break;
23382 : : }
23383 : 0 : default:;
23384 : : }
23385 : 0 : switch (TREE_CODE (_p0))
23386 : : {
23387 : 0 : case REAL_CST:
23388 : 0 : {
23389 : 0 : {
23390 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23391 : 0 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
23392 : 0 : return true;
23393 : : }
23394 : 0 : break;
23395 : : }
23396 : 0 : default:;
23397 : : }
23398 : 0 : {
23399 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23400 : 0 : if (gimple_simplify_608 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
23401 : 0 : return true;
23402 : : }
23403 : 0 : switch (TREE_CODE (_p0))
23404 : : {
23405 : 0 : case SSA_NAME:
23406 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23407 : : {
23408 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23409 : 0 : switch (gimple_assign_rhs_code (_a1))
23410 : : {
23411 : 0 : case NEGATE_EXPR:
23412 : 0 : {
23413 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23414 : 0 : _q20 = do_valueize (valueize, _q20);
23415 : 0 : switch (TREE_CODE (_p1))
23416 : : {
23417 : 0 : case SSA_NAME:
23418 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23419 : : {
23420 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23421 : 0 : switch (gimple_assign_rhs_code (_a2))
23422 : : {
23423 : 0 : case NEGATE_EXPR:
23424 : 0 : {
23425 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23426 : 0 : _q40 = do_valueize (valueize, _q40);
23427 : 0 : {
23428 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23429 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23430 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23431 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23432 : : )
23433 : : {
23434 : 0 : gimple_seq *lseq = seq;
23435 : 0 : if (lseq
23436 : 0 : && (!single_use (captures[0])
23437 : 0 : || !single_use (captures[2])))
23438 : 0 : lseq = NULL;
23439 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2743;
23440 : 0 : {
23441 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23442 : 0 : {
23443 : 0 : tree _o1[2], _r1;
23444 : 0 : _o1[0] = captures[1];
23445 : 0 : _o1[1] = captures[3];
23446 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMINF64, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23447 : 0 : tem_op.resimplify (lseq, valueize);
23448 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23449 : 0 : if (!_r1) goto next_after_fail2743;
23450 : 0 : res_op->ops[0] = _r1;
23451 : : }
23452 : 0 : res_op->resimplify (lseq, valueize);
23453 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1194, __FILE__, __LINE__, true);
23454 : 0 : return true;
23455 : : }
23456 : 0 : next_after_fail2743:;
23457 : : }
23458 : : }
23459 : 0 : break;
23460 : : }
23461 : : default:;
23462 : : }
23463 : : }
23464 : : break;
23465 : : default:;
23466 : : }
23467 : : break;
23468 : : }
23469 : : default:;
23470 : : }
23471 : : }
23472 : : break;
23473 : : default:;
23474 : : }
23475 : : return false;
23476 : : }
23477 : :
23478 : : bool
23479 : 0 : gimple_simplify_CFN_FMAX (gimple_match_op *res_op, gimple_seq *seq,
23480 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23481 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23482 : : {
23483 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23484 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23485 : : {
23486 : 0 : {
23487 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23488 : 0 : if (gimple_simplify_605 (res_op, seq, valueize, type, captures, CFN_FMAX))
23489 : 0 : return true;
23490 : : }
23491 : : }
23492 : 0 : switch (TREE_CODE (_p1))
23493 : : {
23494 : 0 : case REAL_CST:
23495 : 0 : {
23496 : 0 : {
23497 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23498 : 0 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_FMAX))
23499 : 0 : return true;
23500 : : }
23501 : 0 : break;
23502 : : }
23503 : 0 : default:;
23504 : : }
23505 : 0 : switch (TREE_CODE (_p0))
23506 : : {
23507 : 0 : case REAL_CST:
23508 : 0 : {
23509 : 0 : {
23510 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23511 : 0 : if (gimple_simplify_606 (res_op, seq, valueize, type, captures, CFN_FMAX))
23512 : 0 : return true;
23513 : : }
23514 : 0 : break;
23515 : : }
23516 : 0 : default:;
23517 : : }
23518 : 0 : {
23519 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23520 : 0 : if (gimple_simplify_608 (res_op, seq, valueize, type, captures, CFN_FMAX))
23521 : 0 : return true;
23522 : : }
23523 : 0 : switch (TREE_CODE (_p0))
23524 : : {
23525 : 0 : case SSA_NAME:
23526 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23527 : : {
23528 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23529 : 0 : switch (gimple_assign_rhs_code (_a1))
23530 : : {
23531 : 0 : case NEGATE_EXPR:
23532 : 0 : {
23533 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23534 : 0 : _q20 = do_valueize (valueize, _q20);
23535 : 0 : switch (TREE_CODE (_p1))
23536 : : {
23537 : 0 : case SSA_NAME:
23538 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23539 : : {
23540 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23541 : 0 : switch (gimple_assign_rhs_code (_a2))
23542 : : {
23543 : 0 : case NEGATE_EXPR:
23544 : 0 : {
23545 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23546 : 0 : _q40 = do_valueize (valueize, _q40);
23547 : 0 : {
23548 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23549 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23550 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23551 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23552 : : )
23553 : : {
23554 : 0 : gimple_seq *lseq = seq;
23555 : 0 : if (lseq
23556 : 0 : && (!single_use (captures[0])
23557 : 0 : || !single_use (captures[2])))
23558 : 0 : lseq = NULL;
23559 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2748;
23560 : 0 : {
23561 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23562 : 0 : {
23563 : 0 : tree _o1[2], _r1;
23564 : 0 : _o1[0] = captures[1];
23565 : 0 : _o1[1] = captures[3];
23566 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_FMIN, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23567 : 0 : tem_op.resimplify (lseq, valueize);
23568 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23569 : 0 : if (!_r1) goto next_after_fail2748;
23570 : 0 : res_op->ops[0] = _r1;
23571 : : }
23572 : 0 : res_op->resimplify (lseq, valueize);
23573 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1194, __FILE__, __LINE__, true);
23574 : 0 : return true;
23575 : : }
23576 : 0 : next_after_fail2748:;
23577 : : }
23578 : : }
23579 : 0 : break;
23580 : : }
23581 : : default:;
23582 : : }
23583 : : }
23584 : : break;
23585 : : default:;
23586 : : }
23587 : : break;
23588 : : }
23589 : : default:;
23590 : : }
23591 : : }
23592 : : break;
23593 : : default:;
23594 : : }
23595 : : return false;
23596 : : }
23597 : :
23598 : : bool
23599 : 119952 : gimple_simplify_ORDERED_EXPR (gimple_match_op *res_op, gimple_seq *seq,
23600 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23601 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23602 : : {
23603 : 119952 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23604 : 119952 : switch (TREE_CODE (_p0))
23605 : : {
23606 : 111401 : case SSA_NAME:
23607 : 111401 : if (gimple *_d1 = get_def (valueize, _p0))
23608 : : {
23609 : 43441 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23610 : 45433 : switch (gimple_assign_rhs_code (_a1))
23611 : : {
23612 : 0 : case VEC_COND_EXPR:
23613 : 0 : {
23614 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23615 : 0 : _q20 = do_valueize (valueize, _q20);
23616 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
23617 : 0 : _q21 = do_valueize (valueize, _q21);
23618 : 0 : tree _q22 = gimple_assign_rhs3 (_a1);
23619 : 0 : _q22 = do_valueize (valueize, _q22);
23620 : 0 : switch (TREE_CODE (_p1))
23621 : : {
23622 : 0 : case SSA_NAME:
23623 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23624 : : {
23625 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23626 : 0 : switch (gimple_assign_rhs_code (_a2))
23627 : : {
23628 : 0 : case VEC_COND_EXPR:
23629 : 0 : {
23630 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
23631 : 0 : _q60 = do_valueize (valueize, _q60);
23632 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
23633 : 0 : _q61 = do_valueize (valueize, _q61);
23634 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
23635 : 0 : _q62 = do_valueize (valueize, _q62);
23636 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
23637 : : {
23638 : 0 : {
23639 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
23640 : 0 : if (VECTOR_TYPE_P (type)
23641 : 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
23642 : 0 : || types_match (type, TREE_TYPE (captures[2]))
23643 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
23644 : : || (optimize_vectors_before_lowering_p ()
23645 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
23646 : : )
23647 : : {
23648 : 0 : gimple_seq *lseq = seq;
23649 : 0 : if (lseq
23650 : 0 : && (!single_use (captures[0])
23651 : 0 : || !single_use (captures[4])))
23652 : 0 : lseq = NULL;
23653 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2756;
23654 : 0 : {
23655 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
23656 : 0 : res_op->ops[0] = captures[1];
23657 : 0 : {
23658 : 0 : tree _o1[2], _r1;
23659 : 0 : _o1[0] = captures[2];
23660 : 0 : _o1[1] = captures[5];
23661 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
23662 : 0 : tem_op.resimplify (NULL, valueize);
23663 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
23664 : 0 : if (!_r1) goto next_after_fail2756;
23665 : 0 : res_op->ops[1] = _r1;
23666 : : }
23667 : 0 : {
23668 : 0 : tree _o1[2], _r1;
23669 : 0 : _o1[0] = captures[3];
23670 : 0 : _o1[1] = captures[6];
23671 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
23672 : 0 : tem_op.resimplify (NULL, valueize);
23673 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
23674 : 0 : if (!_r1) goto next_after_fail2756;
23675 : 0 : res_op->ops[2] = _r1;
23676 : : }
23677 : 0 : res_op->resimplify (lseq, valueize);
23678 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
23679 : 0 : return true;
23680 : : }
23681 : 0 : next_after_fail2756:;
23682 : : }
23683 : : }
23684 : : }
23685 : : break;
23686 : : }
23687 : : default:;
23688 : : }
23689 : : }
23690 : : break;
23691 : 0 : default:;
23692 : : }
23693 : 0 : {
23694 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
23695 : 0 : if (VECTOR_TYPE_P (type)
23696 : 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
23697 : 0 : || types_match (type, TREE_TYPE (captures[2]))
23698 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
23699 : : || (optimize_vectors_before_lowering_p ()
23700 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
23701 : : )
23702 : : {
23703 : 0 : gimple_seq *lseq = seq;
23704 : 0 : if (lseq
23705 : 0 : && (!single_use (captures[0])))
23706 : 0 : lseq = NULL;
23707 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2757;
23708 : 0 : {
23709 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
23710 : 0 : res_op->ops[0] = captures[1];
23711 : 0 : {
23712 : 0 : tree _o1[2], _r1;
23713 : 0 : _o1[0] = captures[2];
23714 : 0 : _o1[1] = captures[4];
23715 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
23716 : 0 : tem_op.resimplify (NULL, valueize);
23717 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
23718 : 0 : if (!_r1) goto next_after_fail2757;
23719 : 0 : res_op->ops[1] = _r1;
23720 : : }
23721 : 0 : {
23722 : 0 : tree _o1[2], _r1;
23723 : 0 : _o1[0] = captures[3];
23724 : 0 : _o1[1] = captures[4];
23725 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
23726 : 0 : tem_op.resimplify (NULL, valueize);
23727 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
23728 : 0 : if (!_r1) goto next_after_fail2757;
23729 : 0 : res_op->ops[2] = _r1;
23730 : : }
23731 : 0 : res_op->resimplify (lseq, valueize);
23732 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
23733 : 0 : return true;
23734 : : }
23735 : 0 : next_after_fail2757:;
23736 : : }
23737 : : }
23738 : 0 : break;
23739 : : }
23740 : : default:;
23741 : : }
23742 : : }
23743 : : break;
23744 : 119952 : default:;
23745 : : }
23746 : 119952 : switch (TREE_CODE (_p1))
23747 : : {
23748 : 110574 : case SSA_NAME:
23749 : 110574 : if (gimple *_d1 = get_def (valueize, _p1))
23750 : : {
23751 : 43159 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23752 : 45282 : switch (gimple_assign_rhs_code (_a1))
23753 : : {
23754 : 0 : case VEC_COND_EXPR:
23755 : 0 : {
23756 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
23757 : 0 : _q30 = do_valueize (valueize, _q30);
23758 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
23759 : 0 : _q31 = do_valueize (valueize, _q31);
23760 : 0 : tree _q32 = gimple_assign_rhs3 (_a1);
23761 : 0 : _q32 = do_valueize (valueize, _q32);
23762 : 0 : {
23763 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
23764 : 0 : if (VECTOR_TYPE_P (type)
23765 : 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
23766 : 0 : || types_match (type, TREE_TYPE (captures[3]))
23767 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
23768 : : || (optimize_vectors_before_lowering_p ()
23769 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
23770 : : )
23771 : : {
23772 : 0 : gimple_seq *lseq = seq;
23773 : 0 : if (lseq
23774 : 0 : && (!single_use (captures[1])))
23775 : 0 : lseq = NULL;
23776 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2758;
23777 : 0 : {
23778 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
23779 : 0 : res_op->ops[0] = captures[2];
23780 : 0 : {
23781 : 0 : tree _o1[2], _r1;
23782 : 0 : _o1[0] = captures[0];
23783 : 0 : _o1[1] = captures[3];
23784 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
23785 : 0 : tem_op.resimplify (NULL, valueize);
23786 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
23787 : 0 : if (!_r1) goto next_after_fail2758;
23788 : 0 : res_op->ops[1] = _r1;
23789 : : }
23790 : 0 : {
23791 : 0 : tree _o1[2], _r1;
23792 : 0 : _o1[0] = captures[0];
23793 : 0 : _o1[1] = captures[4];
23794 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
23795 : 0 : tem_op.resimplify (NULL, valueize);
23796 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
23797 : 0 : if (!_r1) goto next_after_fail2758;
23798 : 0 : res_op->ops[2] = _r1;
23799 : : }
23800 : 0 : res_op->resimplify (lseq, valueize);
23801 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
23802 : 0 : return true;
23803 : : }
23804 : 0 : next_after_fail2758:;
23805 : : }
23806 : : }
23807 : 0 : break;
23808 : : }
23809 : : default:;
23810 : : }
23811 : : }
23812 : : break;
23813 : 119952 : default:;
23814 : : }
23815 : 119952 : switch (TREE_CODE (_p0))
23816 : : {
23817 : 111401 : case SSA_NAME:
23818 : 111401 : if (gimple *_d1 = get_def (valueize, _p0))
23819 : : {
23820 : 43441 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23821 : 45433 : switch (gimple_assign_rhs_code (_a1))
23822 : : {
23823 : 0 : case FLOAT_EXPR:
23824 : 0 : {
23825 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23826 : 0 : _q20 = do_valueize (valueize, _q20);
23827 : 0 : switch (TREE_CODE (_p1))
23828 : : {
23829 : 0 : case SSA_NAME:
23830 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23831 : : {
23832 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23833 : 0 : switch (gimple_assign_rhs_code (_a2))
23834 : : {
23835 : 0 : case FLOAT_EXPR:
23836 : 0 : {
23837 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23838 : 0 : _q40 = do_valueize (valueize, _q40);
23839 : 0 : {
23840 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
23841 : 0 : if (gimple_simplify_276 (res_op, seq, valueize, type, captures, ORDERED_EXPR, ORDERED_EXPR))
23842 : 0 : return true;
23843 : : }
23844 : 0 : break;
23845 : : }
23846 : : default:;
23847 : : }
23848 : : }
23849 : : break;
23850 : : default:;
23851 : : }
23852 : : break;
23853 : : }
23854 : 240 : case NEGATE_EXPR:
23855 : 240 : {
23856 : 240 : tree _q20 = gimple_assign_rhs1 (_a1);
23857 : 240 : _q20 = do_valueize (valueize, _q20);
23858 : 240 : switch (TREE_CODE (_p1))
23859 : : {
23860 : 240 : case SSA_NAME:
23861 : 240 : if (gimple *_d2 = get_def (valueize, _p1))
23862 : : {
23863 : 240 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23864 : 240 : switch (gimple_assign_rhs_code (_a2))
23865 : : {
23866 : 240 : case NEGATE_EXPR:
23867 : 240 : {
23868 : 240 : tree _q40 = gimple_assign_rhs1 (_a2);
23869 : 240 : _q40 = do_valueize (valueize, _q40);
23870 : 240 : {
23871 : 240 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
23872 : 240 : if (gimple_simplify_279 (res_op, seq, valueize, type, captures, ORDERED_EXPR, ORDERED_EXPR))
23873 : 240 : return true;
23874 : : }
23875 : 0 : break;
23876 : : }
23877 : : default:;
23878 : : }
23879 : : }
23880 : : break;
23881 : 0 : default:;
23882 : : }
23883 : 0 : if (CONSTANT_CLASS_P (_p1))
23884 : : {
23885 : 0 : {
23886 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
23887 : 0 : if (gimple_simplify_280 (res_op, seq, valueize, type, captures, ORDERED_EXPR, ORDERED_EXPR))
23888 : 0 : return true;
23889 : : }
23890 : : }
23891 : : break;
23892 : : }
23893 : : default:;
23894 : : }
23895 : : }
23896 : : break;
23897 : 119712 : default:;
23898 : : }
23899 : 119712 : switch (TREE_CODE (_p1))
23900 : : {
23901 : 947 : case REAL_CST:
23902 : 947 : {
23903 : 947 : {
23904 : 947 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23905 : 947 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, ORDERED_EXPR))
23906 : 0 : return true;
23907 : : }
23908 : 947 : break;
23909 : : }
23910 : 119712 : default:;
23911 : : }
23912 : 119712 : {
23913 : 119712 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23914 : 119712 : if (tree_expr_nan_p (captures[0]) || tree_expr_nan_p (captures[1])
23915 : : )
23916 : : {
23917 : 0 : gimple_seq *lseq = seq;
23918 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2759;
23919 : 0 : {
23920 : 0 : tree tem;
23921 : 0 : tem = constant_boolean_node (false, type);
23922 : 0 : res_op->set_value (tem);
23923 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1203, __FILE__, __LINE__, true);
23924 : 0 : return true;
23925 : : }
23926 : 0 : next_after_fail2759:;
23927 : : }
23928 : : else
23929 : : {
23930 : 119712 : if (!tree_expr_maybe_nan_p (captures[0]) && !tree_expr_maybe_nan_p (captures[1])
23931 : : )
23932 : : {
23933 : 0 : gimple_seq *lseq = seq;
23934 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2760;
23935 : 0 : {
23936 : 0 : tree tem;
23937 : 0 : tem = constant_boolean_node (true, type);
23938 : 0 : res_op->set_value (tem);
23939 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1204, __FILE__, __LINE__, true);
23940 : 0 : return true;
23941 : : }
23942 : 0 : next_after_fail2760:;
23943 : : }
23944 : : }
23945 : : }
23946 : 119712 : return false;
23947 : : }
23948 : :
23949 : : bool
23950 : 1864 : gimple_simplify_LTGT_EXPR (gimple_match_op *res_op, gimple_seq *seq,
23951 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23952 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23953 : : {
23954 : 1864 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23955 : 1864 : switch (TREE_CODE (_p0))
23956 : : {
23957 : 1833 : case SSA_NAME:
23958 : 1833 : if (gimple *_d1 = get_def (valueize, _p0))
23959 : : {
23960 : 1415 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23961 : 1080 : switch (gimple_assign_rhs_code (_a1))
23962 : : {
23963 : 0 : case VEC_COND_EXPR:
23964 : 0 : {
23965 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23966 : 0 : _q20 = do_valueize (valueize, _q20);
23967 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
23968 : 0 : _q21 = do_valueize (valueize, _q21);
23969 : 0 : tree _q22 = gimple_assign_rhs3 (_a1);
23970 : 0 : _q22 = do_valueize (valueize, _q22);
23971 : 0 : switch (TREE_CODE (_p1))
23972 : : {
23973 : 0 : case SSA_NAME:
23974 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23975 : : {
23976 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23977 : 0 : switch (gimple_assign_rhs_code (_a2))
23978 : : {
23979 : 0 : case VEC_COND_EXPR:
23980 : 0 : {
23981 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
23982 : 0 : _q60 = do_valueize (valueize, _q60);
23983 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
23984 : 0 : _q61 = do_valueize (valueize, _q61);
23985 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
23986 : 0 : _q62 = do_valueize (valueize, _q62);
23987 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
23988 : : {
23989 : 0 : {
23990 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
23991 : 0 : if (VECTOR_TYPE_P (type)
23992 : 0 : && (TREE_CODE_CLASS (LTGT_EXPR) != tcc_comparison
23993 : 0 : || types_match (type, TREE_TYPE (captures[2]))
23994 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
23995 : : || (optimize_vectors_before_lowering_p ()
23996 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
23997 : : )
23998 : : {
23999 : 0 : gimple_seq *lseq = seq;
24000 : 0 : if (lseq
24001 : 0 : && (!single_use (captures[0])
24002 : 0 : || !single_use (captures[4])))
24003 : 0 : lseq = NULL;
24004 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2776;
24005 : 0 : {
24006 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
24007 : 0 : res_op->ops[0] = captures[1];
24008 : 0 : {
24009 : 0 : tree _o1[2], _r1;
24010 : 0 : _o1[0] = captures[2];
24011 : 0 : _o1[1] = captures[5];
24012 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LTGT_EXPR, type, _o1[0], _o1[1]);
24013 : 0 : tem_op.resimplify (NULL, valueize);
24014 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24015 : 0 : if (!_r1) goto next_after_fail2776;
24016 : 0 : res_op->ops[1] = _r1;
24017 : : }
24018 : 0 : {
24019 : 0 : tree _o1[2], _r1;
24020 : 0 : _o1[0] = captures[3];
24021 : 0 : _o1[1] = captures[6];
24022 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LTGT_EXPR, type, _o1[0], _o1[1]);
24023 : 0 : tem_op.resimplify (NULL, valueize);
24024 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24025 : 0 : if (!_r1) goto next_after_fail2776;
24026 : 0 : res_op->ops[2] = _r1;
24027 : : }
24028 : 0 : res_op->resimplify (lseq, valueize);
24029 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1035, __FILE__, __LINE__, true);
24030 : 0 : return true;
24031 : : }
24032 : 0 : next_after_fail2776:;
24033 : : }
24034 : : }
24035 : : }
24036 : : break;
24037 : : }
24038 : : default:;
24039 : : }
24040 : : }
24041 : : break;
24042 : 0 : default:;
24043 : : }
24044 : 0 : {
24045 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
24046 : 0 : if (VECTOR_TYPE_P (type)
24047 : 0 : && (TREE_CODE_CLASS (LTGT_EXPR) != tcc_comparison
24048 : 0 : || types_match (type, TREE_TYPE (captures[2]))
24049 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
24050 : : || (optimize_vectors_before_lowering_p ()
24051 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
24052 : : )
24053 : : {
24054 : 0 : gimple_seq *lseq = seq;
24055 : 0 : if (lseq
24056 : 0 : && (!single_use (captures[0])))
24057 : 0 : lseq = NULL;
24058 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2777;
24059 : 0 : {
24060 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
24061 : 0 : res_op->ops[0] = captures[1];
24062 : 0 : {
24063 : 0 : tree _o1[2], _r1;
24064 : 0 : _o1[0] = captures[2];
24065 : 0 : _o1[1] = captures[4];
24066 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LTGT_EXPR, type, _o1[0], _o1[1]);
24067 : 0 : tem_op.resimplify (NULL, valueize);
24068 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24069 : 0 : if (!_r1) goto next_after_fail2777;
24070 : 0 : res_op->ops[1] = _r1;
24071 : : }
24072 : 0 : {
24073 : 0 : tree _o1[2], _r1;
24074 : 0 : _o1[0] = captures[3];
24075 : 0 : _o1[1] = captures[4];
24076 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LTGT_EXPR, type, _o1[0], _o1[1]);
24077 : 0 : tem_op.resimplify (NULL, valueize);
24078 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24079 : 0 : if (!_r1) goto next_after_fail2777;
24080 : 0 : res_op->ops[2] = _r1;
24081 : : }
24082 : 0 : res_op->resimplify (lseq, valueize);
24083 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
24084 : 0 : return true;
24085 : : }
24086 : 0 : next_after_fail2777:;
24087 : : }
24088 : : }
24089 : 0 : break;
24090 : : }
24091 : : default:;
24092 : : }
24093 : : }
24094 : : break;
24095 : 1864 : default:;
24096 : : }
24097 : 1864 : switch (TREE_CODE (_p1))
24098 : : {
24099 : 1833 : case SSA_NAME:
24100 : 1833 : if (gimple *_d1 = get_def (valueize, _p1))
24101 : : {
24102 : 1412 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24103 : 1080 : switch (gimple_assign_rhs_code (_a1))
24104 : : {
24105 : 0 : case VEC_COND_EXPR:
24106 : 0 : {
24107 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
24108 : 0 : _q30 = do_valueize (valueize, _q30);
24109 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
24110 : 0 : _q31 = do_valueize (valueize, _q31);
24111 : 0 : tree _q32 = gimple_assign_rhs3 (_a1);
24112 : 0 : _q32 = do_valueize (valueize, _q32);
24113 : 0 : {
24114 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
24115 : 0 : if (VECTOR_TYPE_P (type)
24116 : 0 : && (TREE_CODE_CLASS (LTGT_EXPR) != tcc_comparison
24117 : 0 : || types_match (type, TREE_TYPE (captures[3]))
24118 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
24119 : : || (optimize_vectors_before_lowering_p ()
24120 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
24121 : : )
24122 : : {
24123 : 0 : gimple_seq *lseq = seq;
24124 : 0 : if (lseq
24125 : 0 : && (!single_use (captures[1])))
24126 : 0 : lseq = NULL;
24127 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2778;
24128 : 0 : {
24129 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
24130 : 0 : res_op->ops[0] = captures[2];
24131 : 0 : {
24132 : 0 : tree _o1[2], _r1;
24133 : 0 : _o1[0] = captures[0];
24134 : 0 : _o1[1] = captures[3];
24135 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LTGT_EXPR, type, _o1[0], _o1[1]);
24136 : 0 : tem_op.resimplify (NULL, valueize);
24137 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24138 : 0 : if (!_r1) goto next_after_fail2778;
24139 : 0 : res_op->ops[1] = _r1;
24140 : : }
24141 : 0 : {
24142 : 0 : tree _o1[2], _r1;
24143 : 0 : _o1[0] = captures[0];
24144 : 0 : _o1[1] = captures[4];
24145 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LTGT_EXPR, type, _o1[0], _o1[1]);
24146 : 0 : tem_op.resimplify (NULL, valueize);
24147 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24148 : 0 : if (!_r1) goto next_after_fail2778;
24149 : 0 : res_op->ops[2] = _r1;
24150 : : }
24151 : 0 : res_op->resimplify (lseq, valueize);
24152 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
24153 : 0 : return true;
24154 : : }
24155 : 0 : next_after_fail2778:;
24156 : : }
24157 : : }
24158 : 0 : break;
24159 : : }
24160 : : default:;
24161 : : }
24162 : : }
24163 : : break;
24164 : 1864 : default:;
24165 : : }
24166 : 1864 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
24167 : : {
24168 : 0 : {
24169 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
24170 : 0 : if (!flag_trapping_math || !tree_expr_maybe_nan_p (captures[0])
24171 : : )
24172 : : {
24173 : 0 : gimple_seq *lseq = seq;
24174 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2779;
24175 : 0 : {
24176 : 0 : tree tem;
24177 : 0 : tem = constant_boolean_node (false, type);
24178 : 0 : res_op->set_value (tem);
24179 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1205, __FILE__, __LINE__, true);
24180 : 0 : return true;
24181 : : }
24182 : 0 : next_after_fail2779:;
24183 : : }
24184 : : }
24185 : : }
24186 : 1864 : switch (TREE_CODE (_p0))
24187 : : {
24188 : 1833 : case SSA_NAME:
24189 : 1833 : if (gimple *_d1 = get_def (valueize, _p0))
24190 : : {
24191 : 1415 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24192 : 1080 : switch (gimple_assign_rhs_code (_a1))
24193 : : {
24194 : 0 : case FLOAT_EXPR:
24195 : 0 : {
24196 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24197 : 0 : _q20 = do_valueize (valueize, _q20);
24198 : 0 : switch (TREE_CODE (_p1))
24199 : : {
24200 : 0 : case SSA_NAME:
24201 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
24202 : : {
24203 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24204 : 0 : switch (gimple_assign_rhs_code (_a2))
24205 : : {
24206 : 0 : case FLOAT_EXPR:
24207 : 0 : {
24208 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
24209 : 0 : _q40 = do_valueize (valueize, _q40);
24210 : 0 : {
24211 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
24212 : 0 : if (gimple_simplify_276 (res_op, seq, valueize, type, captures, LTGT_EXPR, NE_EXPR))
24213 : 0 : return true;
24214 : : }
24215 : 0 : break;
24216 : : }
24217 : : default:;
24218 : : }
24219 : : }
24220 : : break;
24221 : : default:;
24222 : : }
24223 : : break;
24224 : : }
24225 : 0 : case NEGATE_EXPR:
24226 : 0 : {
24227 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24228 : 0 : _q20 = do_valueize (valueize, _q20);
24229 : 0 : switch (TREE_CODE (_p1))
24230 : : {
24231 : 0 : case SSA_NAME:
24232 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
24233 : : {
24234 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24235 : 0 : switch (gimple_assign_rhs_code (_a2))
24236 : : {
24237 : 0 : case NEGATE_EXPR:
24238 : 0 : {
24239 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
24240 : 0 : _q40 = do_valueize (valueize, _q40);
24241 : 0 : {
24242 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
24243 : 0 : if (gimple_simplify_279 (res_op, seq, valueize, type, captures, LTGT_EXPR, LTGT_EXPR))
24244 : 0 : return true;
24245 : : }
24246 : 0 : break;
24247 : : }
24248 : : default:;
24249 : : }
24250 : : }
24251 : : break;
24252 : 0 : default:;
24253 : : }
24254 : 0 : if (CONSTANT_CLASS_P (_p1))
24255 : : {
24256 : 0 : {
24257 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
24258 : 0 : if (gimple_simplify_280 (res_op, seq, valueize, type, captures, LTGT_EXPR, LTGT_EXPR))
24259 : 0 : return true;
24260 : : }
24261 : : }
24262 : : break;
24263 : : }
24264 : : default:;
24265 : : }
24266 : : }
24267 : : break;
24268 : 1864 : default:;
24269 : : }
24270 : 1864 : switch (TREE_CODE (_p1))
24271 : : {
24272 : 0 : case REAL_CST:
24273 : 0 : {
24274 : 0 : {
24275 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24276 : 0 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, LTGT_EXPR))
24277 : 0 : return true;
24278 : : }
24279 : 0 : break;
24280 : : }
24281 : : default:;
24282 : : }
24283 : : return false;
24284 : : }
24285 : :
24286 : : bool
24287 : 13691 : gimple_simplify_BIT_INSERT_EXPR (gimple_match_op *res_op, gimple_seq *seq,
24288 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24289 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
24290 : : {
24291 : 13691 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24292 : 13691 : switch (TREE_CODE (_p1))
24293 : : {
24294 : 8584 : case SSA_NAME:
24295 : 8584 : if (gimple *_d1 = get_def (valueize, _p1))
24296 : : {
24297 : 7848 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24298 : 8213 : switch (gimple_assign_rhs_code (_a1))
24299 : : {
24300 : 196 : case BIT_FIELD_REF:
24301 : 196 : {
24302 : 196 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
24303 : 196 : if ((TREE_CODE (_q30) == SSA_NAME
24304 : 196 : || is_gimple_min_invariant (_q30)))
24305 : : {
24306 : 191 : _q30 = do_valueize (valueize, _q30);
24307 : 191 : tree _q31 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 1);
24308 : 191 : if ((TREE_CODE (_q31) == SSA_NAME
24309 : 191 : || is_gimple_min_invariant (_q31)))
24310 : : {
24311 : 191 : _q31 = do_valueize (valueize, _q31);
24312 : 191 : tree _q32 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 2);
24313 : 191 : if ((TREE_CODE (_q32) == SSA_NAME
24314 : 191 : || is_gimple_min_invariant (_q32)))
24315 : : {
24316 : 191 : _q32 = do_valueize (valueize, _q32);
24317 : 191 : {
24318 : 191 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
24319 : 191 : if (VECTOR_TYPE_P (type)
24320 : 99 : && (VECTOR_MODE_P (TYPE_MODE (type))
24321 : : || optimize_vectors_before_lowering_p ())
24322 : 99 : && operand_equal_p (TYPE_SIZE (TREE_TYPE (captures[0])),
24323 : 99 : TYPE_SIZE (TREE_TYPE (captures[2])), 0)
24324 : 69 : && types_match (TREE_TYPE (TREE_TYPE (captures[0])), TREE_TYPE (captures[1]))
24325 : 69 : && TYPE_VECTOR_SUBPARTS (type).is_constant ()
24326 : 260 : && multiple_p (wi::to_poly_offset (captures[4]),
24327 : 213 : wi::to_poly_offset (TYPE_SIZE (TREE_TYPE (type))))
24328 : : )
24329 : : {
24330 : 47 : {
24331 : 47 : unsigned HOST_WIDE_INT elsz
24332 : 47 : = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))));
24333 : 47 : poly_uint64 relt = exact_div (tree_to_poly_uint64 (captures[4]), elsz);
24334 : 47 : poly_uint64 ielt = exact_div (tree_to_poly_uint64 (captures[5]), elsz);
24335 : 47 : unsigned nunits = TYPE_VECTOR_SUBPARTS (type).to_constant ();
24336 : 47 : vec_perm_builder builder;
24337 : 47 : builder.new_vector (nunits, nunits, 1);
24338 : 1063 : for (unsigned i = 0; i < nunits; ++i)
24339 : 1016 : builder.quick_push (known_eq (ielt, i) ? nunits + relt : i);
24340 : 47 : vec_perm_indices sel (builder, 2, nunits);
24341 : 94 : if (!VECTOR_MODE_P (TYPE_MODE (type))
24342 : 94 : || can_vec_perm_const_p (TYPE_MODE (type),
24343 : 47 : TYPE_MODE (type), sel, false)
24344 : : )
24345 : : {
24346 : 33 : gimple_seq *lseq = seq;
24347 : 33 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3006;
24348 : 33 : {
24349 : 33 : res_op->set_op (VEC_PERM_EXPR, type, 3);
24350 : 33 : res_op->ops[0] = captures[0];
24351 : 33 : {
24352 : 33 : tree _o1[1], _r1;
24353 : 33 : _o1[0] = captures[2];
24354 : 33 : if (type != TREE_TYPE (_o1[0]) /* XXX */
24355 : 33 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
24356 : : {
24357 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
24358 : 0 : tem_op.resimplify (lseq, valueize);
24359 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
24360 : 0 : if (!_r1) goto next_after_fail3006;
24361 : : }
24362 : : else
24363 : : _r1 = _o1[0];
24364 : 33 : res_op->ops[1] = _r1;
24365 : : }
24366 : 33 : res_op->ops[2] = vec_perm_indices_to_tree (build_vector_type (ssizetype, nunits),
24367 : : sel);
24368 : 33 : res_op->resimplify (lseq, valueize);
24369 : 33 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1267, __FILE__, __LINE__, true);
24370 : 33 : return true;
24371 : : }
24372 : 14 : next_after_fail3006:;
24373 : : }
24374 : 47 : }
24375 : : }
24376 : : }
24377 : : }
24378 : : }
24379 : : }
24380 : : break;
24381 : : }
24382 : : default:;
24383 : : }
24384 : : }
24385 : : break;
24386 : : default:;
24387 : : }
24388 : : return false;
24389 : : }
24390 : :
24391 : : bool
24392 : 2649 : gimple_simplify_CFN_BUILT_IN_FMAF (gimple_match_op *res_op, gimple_seq *seq,
24393 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24394 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
24395 : : {
24396 : 2649 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24397 : 2649 : switch (TREE_CODE (_p0))
24398 : : {
24399 : 2390 : case SSA_NAME:
24400 : 2390 : if (gimple *_d1 = get_def (valueize, _p0))
24401 : : {
24402 : 1174 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24403 : 1261 : switch (gimple_assign_rhs_code (_a1))
24404 : : {
24405 : 209 : case NEGATE_EXPR:
24406 : 209 : {
24407 : 209 : tree _q20 = gimple_assign_rhs1 (_a1);
24408 : 209 : _q20 = do_valueize (valueize, _q20);
24409 : 209 : {
24410 : 209 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
24411 : 209 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAF))
24412 : 40 : return true;
24413 : : }
24414 : 169 : switch (TREE_CODE (_p2))
24415 : : {
24416 : 169 : case SSA_NAME:
24417 : 169 : if (gimple *_d2 = get_def (valueize, _p2))
24418 : : {
24419 : 169 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24420 : 66 : switch (gimple_assign_rhs_code (_a2))
24421 : : {
24422 : 66 : case NEGATE_EXPR:
24423 : 66 : {
24424 : 66 : tree _q50 = gimple_assign_rhs1 (_a2);
24425 : 66 : _q50 = do_valueize (valueize, _q50);
24426 : 66 : {
24427 : 66 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q50 };
24428 : 66 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAF))
24429 : 0 : return true;
24430 : : }
24431 : 66 : break;
24432 : : }
24433 : : default:;
24434 : : }
24435 : : }
24436 : : break;
24437 : : default:;
24438 : : }
24439 : : break;
24440 : : }
24441 : : default:;
24442 : : }
24443 : : }
24444 : : break;
24445 : 2609 : default:;
24446 : : }
24447 : 2609 : switch (TREE_CODE (_p1))
24448 : : {
24449 : 1442 : case SSA_NAME:
24450 : 1442 : if (gimple *_d1 = get_def (valueize, _p1))
24451 : : {
24452 : 786 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24453 : 687 : switch (gimple_assign_rhs_code (_a1))
24454 : : {
24455 : 183 : case NEGATE_EXPR:
24456 : 183 : {
24457 : 183 : tree _q30 = gimple_assign_rhs1 (_a1);
24458 : 183 : _q30 = do_valueize (valueize, _q30);
24459 : 183 : {
24460 : 183 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _p2 };
24461 : 183 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAF))
24462 : 0 : return true;
24463 : : }
24464 : 183 : break;
24465 : : }
24466 : : default:;
24467 : : }
24468 : : }
24469 : : break;
24470 : 2609 : default:;
24471 : : }
24472 : 2609 : switch (TREE_CODE (_p2))
24473 : : {
24474 : 2378 : case SSA_NAME:
24475 : 2378 : if (gimple *_d1 = get_def (valueize, _p2))
24476 : : {
24477 : 1364 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24478 : 1342 : switch (gimple_assign_rhs_code (_a1))
24479 : : {
24480 : 308 : case NEGATE_EXPR:
24481 : 308 : {
24482 : 308 : tree _q40 = gimple_assign_rhs1 (_a1);
24483 : 308 : _q40 = do_valueize (valueize, _q40);
24484 : 308 : {
24485 : 308 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q40 };
24486 : 308 : if (gimple_simplify_665 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAF))
24487 : 12 : return true;
24488 : : }
24489 : 296 : break;
24490 : : }
24491 : : default:;
24492 : : }
24493 : : }
24494 : : break;
24495 : 2597 : default:;
24496 : : }
24497 : 2597 : switch (TREE_CODE (_p1))
24498 : : {
24499 : 1430 : case SSA_NAME:
24500 : 1430 : if (gimple *_d1 = get_def (valueize, _p1))
24501 : : {
24502 : 774 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24503 : 687 : switch (gimple_assign_rhs_code (_a1))
24504 : : {
24505 : 183 : case NEGATE_EXPR:
24506 : 183 : {
24507 : 183 : tree _q30 = gimple_assign_rhs1 (_a1);
24508 : 183 : _q30 = do_valueize (valueize, _q30);
24509 : 183 : switch (TREE_CODE (_p2))
24510 : : {
24511 : 183 : case SSA_NAME:
24512 : 183 : if (gimple *_d2 = get_def (valueize, _p2))
24513 : : {
24514 : 177 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24515 : 231 : switch (gimple_assign_rhs_code (_a2))
24516 : : {
24517 : 91 : case NEGATE_EXPR:
24518 : 91 : {
24519 : 91 : tree _q50 = gimple_assign_rhs1 (_a2);
24520 : 91 : _q50 = do_valueize (valueize, _q50);
24521 : 91 : {
24522 : 91 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q50 };
24523 : 91 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAF))
24524 : 0 : return true;
24525 : : }
24526 : 91 : break;
24527 : : }
24528 : : default:;
24529 : : }
24530 : : }
24531 : : break;
24532 : : default:;
24533 : : }
24534 : : break;
24535 : : }
24536 : : default:;
24537 : : }
24538 : : }
24539 : : break;
24540 : : default:;
24541 : : }
24542 : : return false;
24543 : : }
24544 : :
24545 : : bool
24546 : 3180 : gimple_simplify_CFN_BUILT_IN_FMA (gimple_match_op *res_op, gimple_seq *seq,
24547 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24548 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
24549 : : {
24550 : 3180 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24551 : 3180 : switch (TREE_CODE (_p0))
24552 : : {
24553 : 2879 : case SSA_NAME:
24554 : 2879 : if (gimple *_d1 = get_def (valueize, _p0))
24555 : : {
24556 : 1406 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24557 : 1674 : switch (gimple_assign_rhs_code (_a1))
24558 : : {
24559 : 253 : case NEGATE_EXPR:
24560 : 253 : {
24561 : 253 : tree _q20 = gimple_assign_rhs1 (_a1);
24562 : 253 : _q20 = do_valueize (valueize, _q20);
24563 : 253 : {
24564 : 253 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
24565 : 253 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMA))
24566 : 48 : return true;
24567 : : }
24568 : 205 : switch (TREE_CODE (_p2))
24569 : : {
24570 : 205 : case SSA_NAME:
24571 : 205 : if (gimple *_d2 = get_def (valueize, _p2))
24572 : : {
24573 : 205 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24574 : 84 : switch (gimple_assign_rhs_code (_a2))
24575 : : {
24576 : 84 : case NEGATE_EXPR:
24577 : 84 : {
24578 : 84 : tree _q50 = gimple_assign_rhs1 (_a2);
24579 : 84 : _q50 = do_valueize (valueize, _q50);
24580 : 84 : {
24581 : 84 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q50 };
24582 : 84 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMA))
24583 : 0 : return true;
24584 : : }
24585 : 84 : break;
24586 : : }
24587 : : default:;
24588 : : }
24589 : : }
24590 : : break;
24591 : : default:;
24592 : : }
24593 : : break;
24594 : : }
24595 : : default:;
24596 : : }
24597 : : }
24598 : : break;
24599 : 3132 : default:;
24600 : : }
24601 : 3132 : switch (TREE_CODE (_p1))
24602 : : {
24603 : 1729 : case SSA_NAME:
24604 : 1729 : if (gimple *_d1 = get_def (valueize, _p1))
24605 : : {
24606 : 922 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24607 : 872 : switch (gimple_assign_rhs_code (_a1))
24608 : : {
24609 : 183 : case NEGATE_EXPR:
24610 : 183 : {
24611 : 183 : tree _q30 = gimple_assign_rhs1 (_a1);
24612 : 183 : _q30 = do_valueize (valueize, _q30);
24613 : 183 : {
24614 : 183 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _p2 };
24615 : 183 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMA))
24616 : 0 : return true;
24617 : : }
24618 : 183 : break;
24619 : : }
24620 : : default:;
24621 : : }
24622 : : }
24623 : : break;
24624 : 3132 : default:;
24625 : : }
24626 : 3132 : switch (TREE_CODE (_p2))
24627 : : {
24628 : 2830 : case SSA_NAME:
24629 : 2830 : if (gimple *_d1 = get_def (valueize, _p2))
24630 : : {
24631 : 1588 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24632 : 1629 : switch (gimple_assign_rhs_code (_a1))
24633 : : {
24634 : 346 : case NEGATE_EXPR:
24635 : 346 : {
24636 : 346 : tree _q40 = gimple_assign_rhs1 (_a1);
24637 : 346 : _q40 = do_valueize (valueize, _q40);
24638 : 346 : {
24639 : 346 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q40 };
24640 : 346 : if (gimple_simplify_665 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMA))
24641 : 16 : return true;
24642 : : }
24643 : 330 : break;
24644 : : }
24645 : : default:;
24646 : : }
24647 : : }
24648 : : break;
24649 : 3116 : default:;
24650 : : }
24651 : 3116 : switch (TREE_CODE (_p1))
24652 : : {
24653 : 1713 : case SSA_NAME:
24654 : 1713 : if (gimple *_d1 = get_def (valueize, _p1))
24655 : : {
24656 : 906 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24657 : 872 : switch (gimple_assign_rhs_code (_a1))
24658 : : {
24659 : 183 : case NEGATE_EXPR:
24660 : 183 : {
24661 : 183 : tree _q30 = gimple_assign_rhs1 (_a1);
24662 : 183 : _q30 = do_valueize (valueize, _q30);
24663 : 183 : switch (TREE_CODE (_p2))
24664 : : {
24665 : 183 : case SSA_NAME:
24666 : 183 : if (gimple *_d2 = get_def (valueize, _p2))
24667 : : {
24668 : 177 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24669 : 231 : switch (gimple_assign_rhs_code (_a2))
24670 : : {
24671 : 91 : case NEGATE_EXPR:
24672 : 91 : {
24673 : 91 : tree _q50 = gimple_assign_rhs1 (_a2);
24674 : 91 : _q50 = do_valueize (valueize, _q50);
24675 : 91 : {
24676 : 91 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q50 };
24677 : 91 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMA))
24678 : 0 : return true;
24679 : : }
24680 : 91 : break;
24681 : : }
24682 : : default:;
24683 : : }
24684 : : }
24685 : : break;
24686 : : default:;
24687 : : }
24688 : : break;
24689 : : }
24690 : : default:;
24691 : : }
24692 : : }
24693 : : break;
24694 : : default:;
24695 : : }
24696 : : return false;
24697 : : }
24698 : :
24699 : : bool
24700 : 20202 : gimple_simplify_CFN_FMA (gimple_match_op *res_op, gimple_seq *seq,
24701 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24702 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
24703 : : {
24704 : 20202 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24705 : 20202 : switch (TREE_CODE (_p0))
24706 : : {
24707 : 20178 : case SSA_NAME:
24708 : 20178 : if (gimple *_d1 = get_def (valueize, _p0))
24709 : : {
24710 : 19322 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24711 : 30452 : switch (gimple_assign_rhs_code (_a1))
24712 : : {
24713 : 2202 : case NEGATE_EXPR:
24714 : 2202 : {
24715 : 2202 : tree _q20 = gimple_assign_rhs1 (_a1);
24716 : 2202 : _q20 = do_valueize (valueize, _q20);
24717 : 2202 : {
24718 : 2202 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
24719 : 2202 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_FMA))
24720 : 2202 : return true;
24721 : : }
24722 : 0 : switch (TREE_CODE (_p2))
24723 : : {
24724 : 0 : case SSA_NAME:
24725 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
24726 : : {
24727 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24728 : 0 : switch (gimple_assign_rhs_code (_a2))
24729 : : {
24730 : 0 : case NEGATE_EXPR:
24731 : 0 : {
24732 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
24733 : 0 : _q50 = do_valueize (valueize, _q50);
24734 : 0 : {
24735 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q50 };
24736 : 0 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_FMA))
24737 : 0 : return true;
24738 : : }
24739 : 0 : break;
24740 : : }
24741 : : default:;
24742 : : }
24743 : : }
24744 : : break;
24745 : : default:;
24746 : : }
24747 : : break;
24748 : : }
24749 : : default:;
24750 : : }
24751 : : }
24752 : : break;
24753 : 18000 : default:;
24754 : : }
24755 : 18000 : switch (TREE_CODE (_p1))
24756 : : {
24757 : 17832 : case SSA_NAME:
24758 : 17832 : if (gimple *_d1 = get_def (valueize, _p1))
24759 : : {
24760 : 17028 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24761 : 22598 : switch (gimple_assign_rhs_code (_a1))
24762 : : {
24763 : 1969 : case NEGATE_EXPR:
24764 : 1969 : {
24765 : 1969 : tree _q30 = gimple_assign_rhs1 (_a1);
24766 : 1969 : _q30 = do_valueize (valueize, _q30);
24767 : 1969 : {
24768 : 1969 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _p2 };
24769 : 1969 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_FMA))
24770 : 1969 : return true;
24771 : : }
24772 : 0 : break;
24773 : : }
24774 : : default:;
24775 : : }
24776 : : }
24777 : : break;
24778 : 16031 : default:;
24779 : : }
24780 : 16031 : switch (TREE_CODE (_p2))
24781 : : {
24782 : 15940 : case SSA_NAME:
24783 : 15940 : if (gimple *_d1 = get_def (valueize, _p2))
24784 : : {
24785 : 15166 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24786 : 10987 : switch (gimple_assign_rhs_code (_a1))
24787 : : {
24788 : 2221 : case NEGATE_EXPR:
24789 : 2221 : {
24790 : 2221 : tree _q40 = gimple_assign_rhs1 (_a1);
24791 : 2221 : _q40 = do_valueize (valueize, _q40);
24792 : 2221 : {
24793 : 2221 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q40 };
24794 : 2221 : if (gimple_simplify_665 (res_op, seq, valueize, type, captures, CFN_FMA))
24795 : 2221 : return true;
24796 : : }
24797 : 0 : break;
24798 : : }
24799 : : default:;
24800 : : }
24801 : : }
24802 : : break;
24803 : 13810 : default:;
24804 : : }
24805 : 13810 : switch (TREE_CODE (_p1))
24806 : : {
24807 : 13658 : case SSA_NAME:
24808 : 13658 : if (gimple *_d1 = get_def (valueize, _p1))
24809 : : {
24810 : 12877 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24811 : 19235 : switch (gimple_assign_rhs_code (_a1))
24812 : : {
24813 : 0 : case NEGATE_EXPR:
24814 : 0 : {
24815 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
24816 : 0 : _q30 = do_valueize (valueize, _q30);
24817 : 0 : switch (TREE_CODE (_p2))
24818 : : {
24819 : 0 : case SSA_NAME:
24820 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
24821 : : {
24822 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24823 : 0 : switch (gimple_assign_rhs_code (_a2))
24824 : : {
24825 : 0 : case NEGATE_EXPR:
24826 : 0 : {
24827 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
24828 : 0 : _q50 = do_valueize (valueize, _q50);
24829 : 0 : {
24830 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q50 };
24831 : 0 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_FMA))
24832 : 0 : return true;
24833 : : }
24834 : 0 : break;
24835 : : }
24836 : : default:;
24837 : : }
24838 : : }
24839 : : break;
24840 : : default:;
24841 : : }
24842 : : break;
24843 : : }
24844 : : default:;
24845 : : }
24846 : : }
24847 : : break;
24848 : : default:;
24849 : : }
24850 : : return false;
24851 : : }
24852 : :
24853 : : bool
24854 : 4755 : gimple_simplify_CFN_FNMA (gimple_match_op *res_op, gimple_seq *seq,
24855 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24856 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
24857 : : {
24858 : 4755 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24859 : 4755 : switch (TREE_CODE (_p0))
24860 : : {
24861 : 4755 : case SSA_NAME:
24862 : 4755 : if (gimple *_d1 = get_def (valueize, _p0))
24863 : : {
24864 : 4717 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24865 : 7232 : switch (gimple_assign_rhs_code (_a1))
24866 : : {
24867 : 0 : case NEGATE_EXPR:
24868 : 0 : {
24869 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24870 : 0 : _q20 = do_valueize (valueize, _q20);
24871 : 0 : {
24872 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
24873 : 0 : if (gimple_simplify_668 (res_op, seq, valueize, type, captures))
24874 : 0 : return true;
24875 : : }
24876 : 0 : switch (TREE_CODE (_p2))
24877 : : {
24878 : 0 : case SSA_NAME:
24879 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
24880 : : {
24881 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24882 : 0 : switch (gimple_assign_rhs_code (_a2))
24883 : : {
24884 : 0 : case NEGATE_EXPR:
24885 : 0 : {
24886 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
24887 : 0 : _q50 = do_valueize (valueize, _q50);
24888 : 0 : {
24889 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q50 };
24890 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures))
24891 : 0 : return true;
24892 : : }
24893 : 0 : break;
24894 : : }
24895 : : default:;
24896 : : }
24897 : : }
24898 : : break;
24899 : : default:;
24900 : : }
24901 : : break;
24902 : : }
24903 : : default:;
24904 : : }
24905 : : }
24906 : : break;
24907 : 4755 : default:;
24908 : : }
24909 : 4755 : switch (TREE_CODE (_p1))
24910 : : {
24911 : 4744 : case SSA_NAME:
24912 : 4744 : if (gimple *_d1 = get_def (valueize, _p1))
24913 : : {
24914 : 4698 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24915 : 7268 : switch (gimple_assign_rhs_code (_a1))
24916 : : {
24917 : 1 : case NEGATE_EXPR:
24918 : 1 : {
24919 : 1 : tree _q30 = gimple_assign_rhs1 (_a1);
24920 : 1 : _q30 = do_valueize (valueize, _q30);
24921 : 1 : {
24922 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _p2 };
24923 : 1 : if (gimple_simplify_668 (res_op, seq, valueize, type, captures))
24924 : 1 : return true;
24925 : : }
24926 : 0 : break;
24927 : : }
24928 : : default:;
24929 : : }
24930 : : }
24931 : : break;
24932 : 4754 : default:;
24933 : : }
24934 : 4754 : switch (TREE_CODE (_p2))
24935 : : {
24936 : 4716 : case SSA_NAME:
24937 : 4716 : if (gimple *_d1 = get_def (valueize, _p2))
24938 : : {
24939 : 4702 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24940 : 3056 : switch (gimple_assign_rhs_code (_a1))
24941 : : {
24942 : 804 : case NEGATE_EXPR:
24943 : 804 : {
24944 : 804 : tree _q40 = gimple_assign_rhs1 (_a1);
24945 : 804 : _q40 = do_valueize (valueize, _q40);
24946 : 804 : {
24947 : 804 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q40 };
24948 : 804 : if (canonicalize_math_after_vectorization_p ()
24949 : : )
24950 : : {
24951 : 804 : gimple_seq *lseq = seq;
24952 : 804 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3008;
24953 : 804 : {
24954 : 804 : res_op->set_op (CFN_FNMS, type, 3);
24955 : 804 : res_op->ops[0] = captures[0];
24956 : 804 : res_op->ops[1] = captures[1];
24957 : 804 : res_op->ops[2] = captures[2];
24958 : 804 : res_op->resimplify (lseq, valueize);
24959 : 804 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1269, __FILE__, __LINE__, true);
24960 : 804 : return true;
24961 : : }
24962 : 0 : next_after_fail3008:;
24963 : : }
24964 : : }
24965 : 0 : break;
24966 : : }
24967 : : default:;
24968 : : }
24969 : : }
24970 : : break;
24971 : 3950 : default:;
24972 : : }
24973 : 3950 : switch (TREE_CODE (_p1))
24974 : : {
24975 : 3939 : case SSA_NAME:
24976 : 3939 : if (gimple *_d1 = get_def (valueize, _p1))
24977 : : {
24978 : 3916 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24979 : 6003 : switch (gimple_assign_rhs_code (_a1))
24980 : : {
24981 : 0 : case NEGATE_EXPR:
24982 : 0 : {
24983 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
24984 : 0 : _q30 = do_valueize (valueize, _q30);
24985 : 0 : switch (TREE_CODE (_p2))
24986 : : {
24987 : 0 : case SSA_NAME:
24988 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
24989 : : {
24990 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24991 : 0 : switch (gimple_assign_rhs_code (_a2))
24992 : : {
24993 : 0 : case NEGATE_EXPR:
24994 : 0 : {
24995 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
24996 : 0 : _q50 = do_valueize (valueize, _q50);
24997 : 0 : {
24998 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q50 };
24999 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures))
25000 : 0 : return true;
25001 : : }
25002 : 0 : break;
25003 : : }
25004 : : default:;
25005 : : }
25006 : : }
25007 : : break;
25008 : : default:;
25009 : : }
25010 : : break;
25011 : : }
25012 : : default:;
25013 : : }
25014 : : }
25015 : : break;
25016 : : default:;
25017 : : }
25018 : : return false;
25019 : : }
25020 : :
25021 : : bool
25022 : 755925 : gimple_simplify_VEC_PERM_EXPR (gimple_match_op *res_op, gimple_seq *seq,
25023 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
25024 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
25025 : : {
25026 : 755925 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
25027 : 755925 : switch (TREE_CODE (_p0))
25028 : : {
25029 : 737507 : case SSA_NAME:
25030 : 737507 : if (gimple *_d1 = get_def (valueize, _p0))
25031 : : {
25032 : 610824 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25033 : 1052270 : switch (gimple_assign_rhs_code (_a1))
25034 : : {
25035 : 22172 : case PLUS_EXPR:
25036 : 22172 : {
25037 : 22172 : tree _q20 = gimple_assign_rhs1 (_a1);
25038 : 22172 : _q20 = do_valueize (valueize, _q20);
25039 : 22172 : tree _q21 = gimple_assign_rhs2 (_a1);
25040 : 22172 : _q21 = do_valueize (valueize, _q21);
25041 : 22172 : if (tree_swap_operands_p (_q20, _q21))
25042 : 1038 : std::swap (_q20, _q21);
25043 : 22172 : switch (TREE_CODE (_p1))
25044 : : {
25045 : 18224 : case SSA_NAME:
25046 : 18224 : if (gimple *_d2 = get_def (valueize, _p1))
25047 : : {
25048 : 18224 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
25049 : 18380 : switch (gimple_assign_rhs_code (_a2))
25050 : : {
25051 : 3412 : case MINUS_EXPR:
25052 : 3412 : {
25053 : 3412 : tree _q50 = gimple_assign_rhs1 (_a2);
25054 : 3412 : _q50 = do_valueize (valueize, _q50);
25055 : 3412 : tree _q51 = gimple_assign_rhs2 (_a2);
25056 : 3412 : _q51 = do_valueize (valueize, _q51);
25057 : 3412 : switch (TREE_CODE (_p2))
25058 : : {
25059 : 3401 : case VECTOR_CST:
25060 : 3401 : {
25061 : 3401 : {
25062 : 3401 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51, _p2 };
25063 : 3401 : if (gimple_simplify_695 (res_op, seq, valueize, type, captures, PLUS_EXPR, MINUS_EXPR))
25064 : 0 : return true;
25065 : : }
25066 : 3401 : break;
25067 : : }
25068 : : default:;
25069 : : }
25070 : : break;
25071 : : }
25072 : : default:;
25073 : : }
25074 : : }
25075 : : break;
25076 : : default:;
25077 : : }
25078 : 755925 : break;
25079 : : }
25080 : 8931 : case MINUS_EXPR:
25081 : 8931 : {
25082 : 8931 : tree _q20 = gimple_assign_rhs1 (_a1);
25083 : 8931 : _q20 = do_valueize (valueize, _q20);
25084 : 8931 : tree _q21 = gimple_assign_rhs2 (_a1);
25085 : 8931 : _q21 = do_valueize (valueize, _q21);
25086 : 8931 : switch (TREE_CODE (_p1))
25087 : : {
25088 : 7776 : case SSA_NAME:
25089 : 7776 : if (gimple *_d2 = get_def (valueize, _p1))
25090 : : {
25091 : 7776 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
25092 : 7784 : switch (gimple_assign_rhs_code (_a2))
25093 : : {
25094 : 6360 : case PLUS_EXPR:
25095 : 6360 : {
25096 : 6360 : tree _q50 = gimple_assign_rhs1 (_a2);
25097 : 6360 : _q50 = do_valueize (valueize, _q50);
25098 : 6360 : tree _q51 = gimple_assign_rhs2 (_a2);
25099 : 6360 : _q51 = do_valueize (valueize, _q51);
25100 : 6360 : if (tree_swap_operands_p (_q50, _q51))
25101 : 592 : std::swap (_q50, _q51);
25102 : 6360 : switch (TREE_CODE (_p2))
25103 : : {
25104 : 6360 : case VECTOR_CST:
25105 : 6360 : {
25106 : 6360 : {
25107 : 6360 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51, _p2 };
25108 : 6360 : if (gimple_simplify_695 (res_op, seq, valueize, type, captures, MINUS_EXPR, PLUS_EXPR))
25109 : 0 : return true;
25110 : : }
25111 : 6360 : break;
25112 : : }
25113 : : default:;
25114 : : }
25115 : 755925 : break;
25116 : : }
25117 : : default:;
25118 : : }
25119 : : }
25120 : : break;
25121 : : default:;
25122 : : }
25123 : : break;
25124 : : }
25125 : : default:;
25126 : : }
25127 : : }
25128 : : break;
25129 : 755925 : default:;
25130 : : }
25131 : 755925 : switch (TREE_CODE (_p2))
25132 : : {
25133 : 743870 : case VECTOR_CST:
25134 : 743870 : {
25135 : 743870 : {
25136 : 743870 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
25137 : 743870 : {
25138 : 743870 : tree op0 = captures[0], op1 = captures[1], op2 = captures[2];
25139 : 743870 : machine_mode result_mode = TYPE_MODE (type);
25140 : 743870 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (op0));
25141 : 743870 : vec_perm_builder builder;
25142 : 743870 : if (tree_to_vec_perm_builder (&builder, op2)
25143 : : )
25144 : : {
25145 : 743858 : {
25146 : 743858 : poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (type);
25147 : 743858 : bool single_arg = (op0 == op1);
25148 : 1309368 : vec_perm_indices sel (builder, single_arg ? 1 : 2, nelts);
25149 : 743858 : if (sel.series_p (0, 1, 0, 1)
25150 : : )
25151 : : {
25152 : 261 : gimple_seq *lseq = seq;
25153 : 261 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3010;
25154 : 261 : {
25155 : 261 : tree tem;
25156 : 261 : tem = op0;
25157 : 261 : res_op->set_value (tem);
25158 : 261 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1271, __FILE__, __LINE__, true);
25159 : 261 : return true;
25160 : : }
25161 : 0 : next_after_fail3010:;
25162 : : }
25163 : : else
25164 : : {
25165 : 743597 : if (sel.series_p (0, 1, nelts, 1)
25166 : : )
25167 : : {
25168 : 16 : gimple_seq *lseq = seq;
25169 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3011;
25170 : 16 : {
25171 : 16 : tree tem;
25172 : 16 : tem = op1;
25173 : 16 : res_op->set_value (tem);
25174 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1272, __FILE__, __LINE__, true);
25175 : 16 : return true;
25176 : : }
25177 : 0 : next_after_fail3011:;
25178 : : }
25179 : : else
25180 : : {
25181 : 743581 : {
25182 : 743581 : if (!single_arg)
25183 : : {
25184 : 565442 : if (sel.all_from_input_p (0))
25185 : : op1 = op0;
25186 : 561679 : else if (sel.all_from_input_p (1))
25187 : : {
25188 : 1837 : op0 = op1;
25189 : 1837 : sel.rotate_inputs (1);
25190 : : }
25191 : 559842 : else if (known_ge (poly_uint64 (sel[0]), nelts))
25192 : : {
25193 : 13051 : std::swap (op0, op1);
25194 : 13051 : sel.rotate_inputs (1);
25195 : : }
25196 : : }
25197 : 743581 : gassign *def;
25198 : 743581 : tree cop0 = op0, cop1 = op1;
25199 : 743581 : if (TREE_CODE (op0) == SSA_NAME
25200 : 726086 : && (def = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (op0)))
25201 : 1435068 : && gimple_assign_rhs_code (def) == CONSTRUCTOR)
25202 : 5440 : cop0 = gimple_assign_rhs1 (def);
25203 : 743581 : if (TREE_CODE (op1) == SSA_NAME
25204 : 721521 : && (def = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (op1)))
25205 : 1432689 : && gimple_assign_rhs_code (def) == CONSTRUCTOR)
25206 : 10345 : cop1 = gimple_assign_rhs1 (def);
25207 : 743581 : tree t;
25208 : 743581 : if ((TREE_CODE (cop0) == VECTOR_CST
25209 : 728757 : || TREE_CODE (cop0) == CONSTRUCTOR)
25210 : 20264 : && (TREE_CODE (cop1) == VECTOR_CST
25211 : 17737 : || TREE_CODE (cop1) == CONSTRUCTOR)
25212 : 750033 : && (t = fold_vec_perm (type, cop0, cop1, sel))
25213 : : )
25214 : : {
25215 : 1897 : gimple_seq *lseq = seq;
25216 : 1897 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3012;
25217 : 1897 : {
25218 : 1897 : tree tem;
25219 : 1897 : tem = t;
25220 : 1897 : res_op->set_value (tem);
25221 : 1897 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
25222 : 1897 : return true;
25223 : : }
25224 : 0 : next_after_fail3012:;
25225 : : }
25226 : : else
25227 : : {
25228 : 741684 : {
25229 : 741684 : bool changed = (op0 == op1 && !single_arg);
25230 : 741684 : tree ins = NULL_TREE;
25231 : 741684 : unsigned at = 0;
25232 : 741684 : if (op_mode != BLKmode
25233 : 734085 : && (TREE_CODE (cop0) == VECTOR_CST
25234 : 719458 : || TREE_CODE (cop0) == CONSTRUCTOR
25235 : 716402 : || TREE_CODE (cop1) == VECTOR_CST
25236 : 699540 : || TREE_CODE (cop1) == CONSTRUCTOR))
25237 : : {
25238 : 40581 : bool insert_first_p = sel.series_p (1, 1, nelts + 1, 1);
25239 : 40581 : if (insert_first_p)
25240 : : {
25241 : 894 : at = 0;
25242 : 894 : if ((ins = fold_read_from_vector (cop0, sel[0])))
25243 : 205 : op0 = op1;
25244 : : }
25245 : 894 : if (!insert_first_p || (!ins && maybe_eq (nelts, 2u)))
25246 : : {
25247 : 40247 : unsigned int encoded_nelts = sel.encoding ().encoded_nelts ();
25248 : 79845 : for (at = 0; at < encoded_nelts; ++at)
25249 : 79793 : if (maybe_ne (sel[at], at))
25250 : : break;
25251 : 40247 : if (at < encoded_nelts
25252 : 40247 : && (known_eq (at + 1, nelts)
25253 : 38883 : || sel.series_p (at + 1, 1, at + 1, 1)))
25254 : : {
25255 : 2189 : if (known_lt (poly_uint64 (sel[at]), nelts))
25256 : 0 : ins = fold_read_from_vector (cop0, sel[at]);
25257 : : else
25258 : 2189 : ins = fold_read_from_vector (cop1, sel[at] - nelts);
25259 : : }
25260 : : }
25261 : : }
25262 : 741684 : if (!ins && sel.encoding () != builder)
25263 : : {
25264 : 16981 : tree oldop2 = op2;
25265 : 16981 : if (sel.ninputs () == 2
25266 : 16981 : || can_vec_perm_const_p (result_mode, op_mode, sel, false))
25267 : 16255 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel);
25268 : : else
25269 : : {
25270 : 726 : vec_perm_indices sel2 (builder, 2, nelts);
25271 : 726 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false))
25272 : 180 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel2);
25273 : : else
25274 : 546 : op2 = vec_perm_indices_to_tree (TREE_TYPE (op2), sel);
25275 : 726 : }
25276 : 16981 : if (!operand_equal_p (op2, oldop2, 0))
25277 : 16801 : changed = true;
25278 : : }
25279 : 741684 : if (ins
25280 : : )
25281 : : {
25282 : 2096 : gimple_seq *lseq = seq;
25283 : 2096 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3013;
25284 : 2096 : {
25285 : 2096 : res_op->set_op (BIT_INSERT_EXPR, type, 3);
25286 : 2096 : res_op->ops[0] = op0;
25287 : 2096 : res_op->ops[1] = ins;
25288 : 2096 : res_op->ops[2] = bitsize_int (at * vector_element_bits (type));
25289 : 2096 : res_op->resimplify (lseq, valueize);
25290 : 2096 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
25291 : 24827 : return true;
25292 : : }
25293 : 0 : next_after_fail3013:;
25294 : : }
25295 : : else
25296 : : {
25297 : 739588 : if (changed
25298 : : )
25299 : : {
25300 : 20557 : gimple_seq *lseq = seq;
25301 : 20557 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3014;
25302 : 20557 : {
25303 : 20557 : res_op->set_op (VEC_PERM_EXPR, type, 3);
25304 : 20557 : res_op->ops[0] = op0;
25305 : 20557 : res_op->ops[1] = op1;
25306 : 20557 : res_op->ops[2] = op2;
25307 : 20557 : res_op->resimplify (lseq, valueize);
25308 : 20557 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1275, __FILE__, __LINE__, true);
25309 : 20557 : return true;
25310 : : }
25311 : 0 : next_after_fail3014:;
25312 : : }
25313 : : }
25314 : : }
25315 : : }
25316 : : }
25317 : : }
25318 : : }
25319 : 743858 : }
25320 : : }
25321 : 24827 : }
25322 : : }
25323 : 719043 : break;
25324 : : }
25325 : 731098 : default:;
25326 : : }
25327 : 731098 : switch (TREE_CODE (_p0))
25328 : : {
25329 : 713046 : case SSA_NAME:
25330 : 713046 : if (gimple *_d1 = get_def (valueize, _p0))
25331 : : {
25332 : 605728 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25333 : 1043812 : switch (gimple_assign_rhs_code (_a1))
25334 : : {
25335 : 4865 : case VIEW_CONVERT_EXPR:
25336 : 4865 : {
25337 : 4865 : tree _q20 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
25338 : 4865 : if ((TREE_CODE (_q20) == SSA_NAME
25339 : 4865 : || is_gimple_min_invariant (_q20)))
25340 : : {
25341 : 4865 : _q20 = do_valueize (valueize, _q20);
25342 : 4865 : switch (TREE_CODE (_q20))
25343 : : {
25344 : 4865 : case SSA_NAME:
25345 : 4865 : if (gimple *_d2 = get_def (valueize, _q20))
25346 : : {
25347 : 4865 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
25348 : 3109 : switch (gimple_assign_rhs_code (_a2))
25349 : : {
25350 : 161 : case VEC_PERM_EXPR:
25351 : 161 : {
25352 : 161 : tree _q30 = gimple_assign_rhs1 (_a2);
25353 : 161 : _q30 = do_valueize (valueize, _q30);
25354 : 161 : tree _q31 = gimple_assign_rhs2 (_a2);
25355 : 161 : _q31 = do_valueize (valueize, _q31);
25356 : 161 : tree _q32 = gimple_assign_rhs3 (_a2);
25357 : 161 : _q32 = do_valueize (valueize, _q32);
25358 : 161 : switch (TREE_CODE (_q32))
25359 : : {
25360 : 161 : case VECTOR_CST:
25361 : 161 : {
25362 : 161 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
25363 : : {
25364 : 137 : switch (TREE_CODE (_p2))
25365 : : {
25366 : 137 : case VECTOR_CST:
25367 : 137 : {
25368 : 137 : {
25369 : 137 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q32, _p2 };
25370 : 137 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
25371 : : )
25372 : : {
25373 : 137 : {
25374 : 137 : machine_mode result_mode = TYPE_MODE (type);
25375 : 137 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
25376 : 137 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
25377 : 137 : vec_perm_builder builder0;
25378 : 137 : vec_perm_builder builder1;
25379 : 137 : vec_perm_builder builder2 (nelts, nelts, 1);
25380 : 137 : if (tree_to_vec_perm_builder (&builder0, captures[4])
25381 : 137 : && tree_to_vec_perm_builder (&builder1, captures[5])
25382 : 274 : && TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))
25383 : 137 : == TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[1])))
25384 : : )
25385 : : {
25386 : 110 : {
25387 : 110 : vec_perm_indices sel0 (builder0, 2, nelts);
25388 : 110 : vec_perm_indices sel1 (builder1, 2, nelts);
25389 : 550 : for (int i = 0; i < nelts; i++)
25390 : 440 : builder2.quick_push (sel0[sel1[i].to_constant ()]);
25391 : 110 : vec_perm_indices sel2 (builder2, 2, nelts);
25392 : 110 : tree op0 = NULL_TREE;
25393 : 110 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
25394 : 110 : || (single_use (captures[0])
25395 : 0 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
25396 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
25397 : 0 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
25398 : 110 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
25399 : 110 : if (op0
25400 : : )
25401 : : {
25402 : 110 : gimple_seq *lseq = seq;
25403 : 110 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3015;
25404 : 110 : {
25405 : 110 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25406 : 110 : {
25407 : 110 : tree _o1[3], _r1;
25408 : 110 : _o1[0] = captures[2];
25409 : 110 : _o1[1] = captures[3];
25410 : 110 : _o1[2] = op0;
25411 : 110 : (*res_op).set_op (VEC_PERM_EXPR, TREE_TYPE (_o1[0]), 3);
25412 : 110 : (*res_op).ops[0] = _o1[0];
25413 : 110 : (*res_op).ops[1] = _o1[1];
25414 : 110 : (*res_op).ops[2] = _o1[2];
25415 : 110 : (*res_op).resimplify (lseq, valueize);
25416 : : }
25417 : 110 : if (type != res_op->type
25418 : 110 : && !useless_type_conversion_p (type, res_op->type))
25419 : : {
25420 : 110 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3015;
25421 : 13 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25422 : 13 : res_op->resimplify (lseq, valueize);
25423 : : }
25424 : 13 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1276, __FILE__, __LINE__, true);
25425 : 13 : return true;
25426 : : }
25427 : 97 : next_after_fail3015:;
25428 : : }
25429 : 110 : }
25430 : : }
25431 : 137 : }
25432 : : }
25433 : : }
25434 : 124 : break;
25435 : : }
25436 : : default:;
25437 : : }
25438 : : }
25439 : : break;
25440 : : }
25441 : : default:;
25442 : : }
25443 : : break;
25444 : : }
25445 : : default:;
25446 : : }
25447 : : }
25448 : : break;
25449 : : default:;
25450 : : }
25451 : : }
25452 : : break;
25453 : : }
25454 : 65819 : case VEC_PERM_EXPR:
25455 : 65819 : {
25456 : 65819 : tree _q20 = gimple_assign_rhs1 (_a1);
25457 : 65819 : _q20 = do_valueize (valueize, _q20);
25458 : 65819 : tree _q21 = gimple_assign_rhs2 (_a1);
25459 : 65819 : _q21 = do_valueize (valueize, _q21);
25460 : 65819 : tree _q22 = gimple_assign_rhs3 (_a1);
25461 : 65819 : _q22 = do_valueize (valueize, _q22);
25462 : 65819 : switch (TREE_CODE (_q22))
25463 : : {
25464 : 65793 : case VECTOR_CST:
25465 : 65793 : {
25466 : 65793 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
25467 : : {
25468 : 394 : switch (TREE_CODE (_p2))
25469 : : {
25470 : 394 : case VECTOR_CST:
25471 : 394 : {
25472 : 394 : {
25473 : 394 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21, _q22, _p2 };
25474 : 394 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
25475 : : )
25476 : : {
25477 : 394 : {
25478 : 394 : machine_mode result_mode = TYPE_MODE (type);
25479 : 394 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
25480 : 394 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
25481 : 394 : vec_perm_builder builder0;
25482 : 394 : vec_perm_builder builder1;
25483 : 394 : vec_perm_builder builder2 (nelts, nelts, 1);
25484 : 394 : if (tree_to_vec_perm_builder (&builder0, captures[4])
25485 : 394 : && tree_to_vec_perm_builder (&builder1, captures[5])
25486 : 788 : && TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))
25487 : 394 : == TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[1])))
25488 : : )
25489 : : {
25490 : 394 : {
25491 : 394 : vec_perm_indices sel0 (builder0, 2, nelts);
25492 : 394 : vec_perm_indices sel1 (builder1, 2, nelts);
25493 : 3838 : for (int i = 0; i < nelts; i++)
25494 : 3444 : builder2.quick_push (sel0[sel1[i].to_constant ()]);
25495 : 394 : vec_perm_indices sel2 (builder2, 2, nelts);
25496 : 394 : tree op0 = NULL_TREE;
25497 : 394 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
25498 : 394 : || (single_use (captures[0])
25499 : 194 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
25500 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
25501 : 194 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
25502 : 200 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
25503 : 200 : if (op0
25504 : : )
25505 : : {
25506 : 200 : gimple_seq *lseq = seq;
25507 : 200 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3016;
25508 : 200 : {
25509 : 200 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25510 : 200 : {
25511 : 200 : tree _o1[3], _r1;
25512 : 200 : _o1[0] = captures[2];
25513 : 200 : _o1[1] = captures[3];
25514 : 200 : _o1[2] = op0;
25515 : 200 : (*res_op).set_op (VEC_PERM_EXPR, TREE_TYPE (_o1[0]), 3);
25516 : 200 : (*res_op).ops[0] = _o1[0];
25517 : 200 : (*res_op).ops[1] = _o1[1];
25518 : 200 : (*res_op).ops[2] = _o1[2];
25519 : 200 : (*res_op).resimplify (lseq, valueize);
25520 : : }
25521 : 200 : if (type != res_op->type
25522 : 200 : && !useless_type_conversion_p (type, res_op->type))
25523 : : {
25524 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3016;
25525 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25526 : 0 : res_op->resimplify (lseq, valueize);
25527 : : }
25528 : 200 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1276, __FILE__, __LINE__, true);
25529 : 200 : return true;
25530 : : }
25531 : 194 : next_after_fail3016:;
25532 : : }
25533 : 394 : }
25534 : : }
25535 : 394 : }
25536 : : }
25537 : : }
25538 : 194 : break;
25539 : : }
25540 : : default:;
25541 : : }
25542 : : }
25543 : : break;
25544 : : }
25545 : : default:;
25546 : : }
25547 : : break;
25548 : : }
25549 : : default:;
25550 : : }
25551 : : }
25552 : : break;
25553 : 730885 : default:;
25554 : : }
25555 : 730885 : if (gimple_vec_same_elem_p (_p0, valueize))
25556 : : {
25557 : 14260 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
25558 : : {
25559 : 0 : {
25560 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p2 };
25561 : 0 : if (types_match (type, TREE_TYPE (captures[0]))
25562 : : )
25563 : : {
25564 : 0 : gimple_seq *lseq = seq;
25565 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3017;
25566 : 0 : {
25567 : 0 : tree tem;
25568 : 0 : tem = captures[0];
25569 : 0 : res_op->set_value (tem);
25570 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1277, __FILE__, __LINE__, true);
25571 : 0 : return true;
25572 : : }
25573 : 0 : next_after_fail3017:;
25574 : : }
25575 : : else
25576 : : {
25577 : 0 : {
25578 : 0 : tree elem = uniform_vector_p (captures[0]);
25579 : 0 : if (elem
25580 : : )
25581 : : {
25582 : 0 : gimple_seq *lseq = seq;
25583 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3018;
25584 : 0 : {
25585 : 0 : tree tem;
25586 : 0 : tem = build_vector_from_val (type, elem);
25587 : 0 : res_op->set_value (tem);
25588 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1278, __FILE__, __LINE__, true);
25589 : 0 : return true;
25590 : : }
25591 : 0 : next_after_fail3018:;
25592 : : }
25593 : : }
25594 : : }
25595 : : }
25596 : : }
25597 : : }
25598 : 730885 : switch (TREE_CODE (_p1))
25599 : : {
25600 : 708082 : case SSA_NAME:
25601 : 708082 : if (gimple *_d1 = get_def (valueize, _p1))
25602 : : {
25603 : 604422 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25604 : 1049237 : switch (gimple_assign_rhs_code (_a1))
25605 : : {
25606 : 61466 : case VEC_PERM_EXPR:
25607 : 61466 : {
25608 : 61466 : tree _q30 = gimple_assign_rhs1 (_a1);
25609 : 61466 : _q30 = do_valueize (valueize, _q30);
25610 : 61466 : tree _q31 = gimple_assign_rhs2 (_a1);
25611 : 61466 : _q31 = do_valueize (valueize, _q31);
25612 : 61466 : tree _q32 = gimple_assign_rhs3 (_a1);
25613 : 61466 : _q32 = do_valueize (valueize, _q32);
25614 : 61466 : switch (TREE_CODE (_q32))
25615 : : {
25616 : 61466 : case VECTOR_CST:
25617 : 61466 : {
25618 : 61466 : switch (TREE_CODE (_p2))
25619 : : {
25620 : 61466 : case VECTOR_CST:
25621 : 61466 : {
25622 : 61466 : {
25623 : 61466 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
25624 : 61466 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
25625 : : )
25626 : : {
25627 : 61466 : {
25628 : 61466 : machine_mode result_mode = TYPE_MODE (type);
25629 : 61466 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[2]));
25630 : 61466 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
25631 : 61466 : vec_perm_builder builder0;
25632 : 61466 : vec_perm_builder builder1;
25633 : 61466 : vec_perm_builder builder2 (nelts, nelts, 2);
25634 : 61466 : if (tree_to_vec_perm_builder (&builder0, captures[4])
25635 : 61466 : && tree_to_vec_perm_builder (&builder1, captures[5])
25636 : : )
25637 : : {
25638 : 61466 : {
25639 : 61466 : vec_perm_indices sel0 (builder0, 2, nelts);
25640 : 61466 : vec_perm_indices sel1 (builder1, 2, nelts);
25641 : 61466 : bool use_1 = false, use_2 = false;
25642 : 472092 : for (int i = 0; i < nelts; i++)
25643 : : {
25644 : 410626 : if (known_lt ((poly_uint64)sel1[i], sel1.nelts_per_input ()))
25645 : 202114 : builder2.quick_push (sel1[i]);
25646 : : else
25647 : : {
25648 : 208512 : poly_uint64 j = sel0[(sel1[i] - sel1.nelts_per_input ())
25649 : 208512 : .to_constant ()];
25650 : 208512 : if (known_lt (j, sel0.nelts_per_input ()))
25651 : : use_1 = true;
25652 : : else
25653 : : {
25654 : 101511 : use_2 = true;
25655 : 101511 : j -= sel0.nelts_per_input ();
25656 : : }
25657 : 208512 : builder2.quick_push (j + sel1.nelts_per_input ());
25658 : : }
25659 : : }
25660 : 61466 : if (use_1 ^ use_2
25661 : : )
25662 : : {
25663 : 16709 : {
25664 : 16709 : vec_perm_indices sel2 (builder2, 2, nelts);
25665 : 16709 : tree op0 = NULL_TREE;
25666 : 16709 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
25667 : 16709 : || (single_use (captures[1])
25668 : 1984 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
25669 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
25670 : 1984 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
25671 : 14725 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
25672 : 14725 : if (op0
25673 : : )
25674 : : {
25675 : 14725 : if (use_1
25676 : : )
25677 : : {
25678 : 10255 : gimple_seq *lseq = seq;
25679 : 10255 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3019;
25680 : 10255 : {
25681 : 10255 : res_op->set_op (VEC_PERM_EXPR, type, 3);
25682 : 10255 : res_op->ops[0] = captures[0];
25683 : 10255 : res_op->ops[1] = captures[2];
25684 : 10255 : res_op->ops[2] = op0;
25685 : 10255 : res_op->resimplify (lseq, valueize);
25686 : 10255 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1279, __FILE__, __LINE__, true);
25687 : 10255 : return true;
25688 : : }
25689 : 0 : next_after_fail3019:;
25690 : : }
25691 : : else
25692 : : {
25693 : 4470 : if (use_2
25694 : : )
25695 : : {
25696 : 4470 : gimple_seq *lseq = seq;
25697 : 4470 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3020;
25698 : 4470 : {
25699 : 4470 : res_op->set_op (VEC_PERM_EXPR, type, 3);
25700 : 4470 : res_op->ops[0] = captures[0];
25701 : 4470 : res_op->ops[1] = captures[3];
25702 : 4470 : res_op->ops[2] = op0;
25703 : 4470 : res_op->resimplify (lseq, valueize);
25704 : 4470 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1280, __FILE__, __LINE__, true);
25705 : 4470 : return true;
25706 : : }
25707 : 0 : next_after_fail3020:;
25708 : : }
25709 : : }
25710 : : }
25711 : 16709 : }
25712 : : }
25713 : 61466 : }
25714 : : }
25715 : 61466 : }
25716 : : }
25717 : : }
25718 : 46741 : break;
25719 : : }
25720 : : default:;
25721 : : }
25722 : : break;
25723 : : }
25724 : : default:;
25725 : : }
25726 : : break;
25727 : : }
25728 : : default:;
25729 : : }
25730 : : }
25731 : : break;
25732 : 716160 : default:;
25733 : : }
25734 : 716160 : switch (TREE_CODE (_p0))
25735 : : {
25736 : 698160 : case SSA_NAME:
25737 : 698160 : if (gimple *_d1 = get_def (valueize, _p0))
25738 : : {
25739 : 590854 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25740 : 1028796 : switch (gimple_assign_rhs_code (_a1))
25741 : : {
25742 : 51131 : case VEC_PERM_EXPR:
25743 : 51131 : {
25744 : 51131 : tree _q20 = gimple_assign_rhs1 (_a1);
25745 : 51131 : _q20 = do_valueize (valueize, _q20);
25746 : 51131 : tree _q21 = gimple_assign_rhs2 (_a1);
25747 : 51131 : _q21 = do_valueize (valueize, _q21);
25748 : 51131 : tree _q22 = gimple_assign_rhs3 (_a1);
25749 : 51131 : _q22 = do_valueize (valueize, _q22);
25750 : 51131 : switch (TREE_CODE (_q22))
25751 : : {
25752 : 51105 : case VECTOR_CST:
25753 : 51105 : {
25754 : 51105 : switch (TREE_CODE (_p2))
25755 : : {
25756 : 51105 : case VECTOR_CST:
25757 : 51105 : {
25758 : 51105 : {
25759 : 51105 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _p2 };
25760 : 51105 : if (TYPE_VECTOR_SUBPARTS (type).is_constant ()
25761 : : )
25762 : : {
25763 : 51105 : {
25764 : 51105 : machine_mode result_mode = TYPE_MODE (type);
25765 : 51105 : machine_mode op_mode = TYPE_MODE (TREE_TYPE (captures[1]));
25766 : 51105 : int nelts = TYPE_VECTOR_SUBPARTS (type).to_constant ();
25767 : 51105 : vec_perm_builder builder0;
25768 : 51105 : vec_perm_builder builder1;
25769 : 51105 : vec_perm_builder builder2 (nelts, nelts, 2);
25770 : 51105 : if (tree_to_vec_perm_builder (&builder0, captures[3])
25771 : 51105 : && tree_to_vec_perm_builder (&builder1, captures[5])
25772 : : )
25773 : : {
25774 : 51105 : {
25775 : 51105 : vec_perm_indices sel0 (builder0, 2, nelts);
25776 : 51105 : vec_perm_indices sel1 (builder1, 2, nelts);
25777 : 51105 : bool use_1 = false, use_2 = false;
25778 : 407137 : for (int i = 0; i < nelts; i++)
25779 : : {
25780 : 356032 : if (known_ge ((poly_uint64)sel1[i], sel1.nelts_per_input ()))
25781 : 176543 : builder2.quick_push (sel1[i]);
25782 : : else
25783 : : {
25784 : 179489 : poly_uint64 j = sel0[sel1[i].to_constant ()];
25785 : 179489 : if (known_lt (j, sel0.nelts_per_input ()))
25786 : : use_1 = true;
25787 : : else
25788 : : {
25789 : 81773 : use_2 = true;
25790 : 81773 : j -= sel0.nelts_per_input ();
25791 : : }
25792 : 179489 : builder2.quick_push (j);
25793 : : }
25794 : : }
25795 : 51105 : if (use_1 ^ use_2
25796 : : )
25797 : : {
25798 : 18316 : {
25799 : 18316 : vec_perm_indices sel2 (builder2, 2, nelts);
25800 : 18316 : tree op0 = NULL_TREE;
25801 : 18316 : if (can_vec_perm_const_p (result_mode, op_mode, sel2, false)
25802 : 18316 : || (single_use (captures[0])
25803 : 1050 : ? (!can_vec_perm_const_p (result_mode, op_mode, sel0, false)
25804 : 0 : || !can_vec_perm_const_p (result_mode, op_mode, sel1, false))
25805 : 1050 : : !can_vec_perm_const_p (result_mode, op_mode, sel1, false)))
25806 : 17266 : op0 = vec_perm_indices_to_tree (TREE_TYPE (captures[5]), sel2);
25807 : 17266 : if (op0
25808 : : )
25809 : : {
25810 : 17266 : if (use_1
25811 : : )
25812 : : {
25813 : 12499 : gimple_seq *lseq = seq;
25814 : 12499 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3021;
25815 : 12499 : {
25816 : 12499 : res_op->set_op (VEC_PERM_EXPR, type, 3);
25817 : 12499 : res_op->ops[0] = captures[1];
25818 : 12499 : res_op->ops[1] = captures[4];
25819 : 12499 : res_op->ops[2] = op0;
25820 : 12499 : res_op->resimplify (lseq, valueize);
25821 : 12499 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1281, __FILE__, __LINE__, true);
25822 : 12499 : return true;
25823 : : }
25824 : 0 : next_after_fail3021:;
25825 : : }
25826 : : else
25827 : : {
25828 : 4767 : if (use_2
25829 : : )
25830 : : {
25831 : 4767 : gimple_seq *lseq = seq;
25832 : 4767 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3022;
25833 : 4767 : {
25834 : 4767 : res_op->set_op (VEC_PERM_EXPR, type, 3);
25835 : 4767 : res_op->ops[0] = captures[2];
25836 : 4767 : res_op->ops[1] = captures[4];
25837 : 4767 : res_op->ops[2] = op0;
25838 : 4767 : res_op->resimplify (lseq, valueize);
25839 : 4767 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1282, __FILE__, __LINE__, true);
25840 : 4767 : return true;
25841 : : }
25842 : 0 : next_after_fail3022:;
25843 : : }
25844 : : }
25845 : : }
25846 : 18316 : }
25847 : : }
25848 : 51105 : }
25849 : : }
25850 : 51105 : }
25851 : : }
25852 : : }
25853 : 33839 : break;
25854 : : }
25855 : : default:;
25856 : : }
25857 : : break;
25858 : : }
25859 : : default:;
25860 : : }
25861 : : break;
25862 : : }
25863 : : default:;
25864 : : }
25865 : : }
25866 : : break;
25867 : : default:;
25868 : : }
25869 : : return false;
25870 : : }
25871 : : #pragma GCC diagnostic pop
|