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 : 1897151 : gimple_power_of_two_cand (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
11 : : {
12 : 1897151 : const tree type = TREE_TYPE (t);
13 : 1897151 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 1897151 : switch (TREE_CODE (t))
15 : : {
16 : 1192388 : case SSA_NAME:
17 : 1192388 : if (gimple *_d1 = get_def (valueize, t))
18 : : {
19 : 966367 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20 : 1344944 : switch (gimple_assign_rhs_code (_a1))
21 : : {
22 : 259 : case LSHIFT_EXPR:
23 : 259 : {
24 : 259 : tree _p0 = gimple_assign_rhs1 (_a1);
25 : 259 : _p0 = do_valueize (valueize, _p0);
26 : 259 : tree _p1 = gimple_assign_rhs2 (_a1);
27 : 259 : _p1 = do_valueize (valueize, _p1);
28 : 259 : switch (TREE_CODE (_p0))
29 : : {
30 : 215 : case INTEGER_CST:
31 : 215 : {
32 : 215 : {
33 : 215 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
34 : 215 : {
35 : 215 : res_ops[0] = captures[0];
36 : 215 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 13, __FILE__, __LINE__, false);
37 : 215 : return true;
38 : : }
39 : : }
40 : : break;
41 : : }
42 : : default:;
43 : : }
44 : : break;
45 : : }
46 : : default:;
47 : : }
48 : : }
49 : : break;
50 : 690910 : case INTEGER_CST:
51 : 690910 : {
52 : 690910 : {
53 : 690910 : tree captures[1] ATTRIBUTE_UNUSED = { t };
54 : 690910 : {
55 : 690910 : res_ops[0] = captures[0];
56 : 690910 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 14, __FILE__, __LINE__, false);
57 : : return true;
58 : : }
59 : : }
60 : : break;
61 : : }
62 : : default:;
63 : : }
64 : : return false;
65 : : }
66 : :
67 : : bool
68 : 365799303 : gimple_with_possible_nonzero_bits (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
69 : : {
70 : 365799303 : const tree type = TREE_TYPE (t);
71 : 365799303 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
72 : 365799303 : if (gimple_with_possible_nonzero_bits_1 (t, valueize))
73 : : {
74 : 355636035 : {
75 : 355636035 : tree captures[1] ATTRIBUTE_UNUSED = { t };
76 : 355636035 : {
77 : 355636035 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 36, __FILE__, __LINE__, false);
78 : 355636035 : return true;
79 : : }
80 : : }
81 : : }
82 : : return false;
83 : : }
84 : :
85 : : bool
86 : 1423673 : gimple_min_value (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
87 : : {
88 : 1423673 : const tree type = TREE_TYPE (t);
89 : 1423673 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
90 : 1423673 : if (uniform_integer_cst_p (t))
91 : : {
92 : 951119 : {
93 : 951119 : {
94 : 951119 : tree int_cst = uniform_integer_cst_p (t);
95 : 951119 : tree inner_type = TREE_TYPE (int_cst);
96 : 1902238 : if ((INTEGRAL_TYPE_P (inner_type)
97 : 174883 : || POINTER_TYPE_P (inner_type))
98 : 2077059 : && wi::eq_p (wi::to_wide (int_cst), wi::min_value (inner_type))
99 : : )
100 : : {
101 : 315271 : {
102 : 315271 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 40, __FILE__, __LINE__, false);
103 : 315271 : return true;
104 : : }
105 : : }
106 : : }
107 : : }
108 : : }
109 : : return false;
110 : : }
111 : :
112 : : bool
113 : 20515251 : gimple_unsigned_integer_narrow_clip (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
114 : : {
115 : 20515251 : const tree type = TREE_TYPE (t);
116 : 20515251 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
117 : 20515251 : switch (TREE_CODE (t))
118 : : {
119 : 16292806 : case SSA_NAME:
120 : 16292806 : if (gimple *_d1 = get_def (valueize, t))
121 : : {
122 : 16292806 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
123 : 18888237 : switch (gimple_assign_rhs_code (_a1))
124 : : {
125 : 2865144 : CASE_CONVERT:
126 : 2865144 : {
127 : 2865144 : tree _p0 = gimple_assign_rhs1 (_a1);
128 : 2865144 : _p0 = do_valueize (valueize, _p0);
129 : 2865144 : switch (TREE_CODE (_p0))
130 : : {
131 : 2820278 : case SSA_NAME:
132 : 2820278 : if (gimple *_d2 = get_def (valueize, _p0))
133 : : {
134 : 2820278 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
135 : 2672016 : switch (gimple_assign_rhs_code (_a2))
136 : : {
137 : 4410 : case COND_EXPR:
138 : 4410 : {
139 : 4410 : tree _q20 = gimple_assign_rhs1 (_a2);
140 : 4410 : _q20 = do_valueize (valueize, _q20);
141 : 4410 : tree _q21 = gimple_assign_rhs2 (_a2);
142 : 4410 : _q21 = do_valueize (valueize, _q21);
143 : 4410 : tree _q22 = gimple_assign_rhs3 (_a2);
144 : 4410 : _q22 = do_valueize (valueize, _q22);
145 : 4410 : switch (TREE_CODE (_q20))
146 : : {
147 : 4410 : case SSA_NAME:
148 : 4410 : if (gimple *_d3 = get_def (valueize, _q20))
149 : : {
150 : 4410 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
151 : 4406 : switch (gimple_assign_rhs_code (_a3))
152 : : {
153 : 324 : case GT_EXPR:
154 : 324 : {
155 : 324 : tree _q30 = gimple_assign_rhs1 (_a3);
156 : 324 : _q30 = do_valueize (valueize, _q30);
157 : 324 : tree _q31 = gimple_assign_rhs2 (_a3);
158 : 324 : _q31 = do_valueize (valueize, _q31);
159 : 324 : {
160 : 324 : tree _q30_pops[1];
161 : 324 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
162 : : {
163 : 8 : tree _q40 = _q30_pops[0];
164 : 8 : switch (TREE_CODE (_q31))
165 : : {
166 : 8 : case INTEGER_CST:
167 : 8 : {
168 : 8 : switch (TREE_CODE (_q21))
169 : : {
170 : 8 : case SSA_NAME:
171 : 8 : if (gimple *_d4 = get_def (valueize, _q21))
172 : : {
173 : 8 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
174 : 8 : switch (gimple_assign_rhs_code (_a4))
175 : : {
176 : 8 : case RSHIFT_EXPR:
177 : 8 : {
178 : 8 : tree _q70 = gimple_assign_rhs1 (_a4);
179 : 8 : _q70 = do_valueize (valueize, _q70);
180 : 8 : tree _q71 = gimple_assign_rhs2 (_a4);
181 : 8 : _q71 = do_valueize (valueize, _q71);
182 : 8 : {
183 : 8 : tree _q70_pops[1];
184 : 8 : if (gimple_nop_convert (_q70, _q70_pops, valueize))
185 : : {
186 : 8 : tree _q80 = _q70_pops[0];
187 : 8 : switch (TREE_CODE (_q80))
188 : : {
189 : 8 : case SSA_NAME:
190 : 8 : if (gimple *_d5 = get_def (valueize, _q80))
191 : : {
192 : 8 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
193 : 8 : switch (gimple_assign_rhs_code (_a5))
194 : : {
195 : 8 : case NEGATE_EXPR:
196 : 8 : {
197 : 8 : tree _q90 = gimple_assign_rhs1 (_a5);
198 : 8 : _q90 = do_valueize (valueize, _q90);
199 : 8 : {
200 : 8 : tree _q90_pops[1];
201 : 8 : if (gimple_nop_convert (_q90, _q90_pops, valueize))
202 : : {
203 : 8 : tree _q100 = _q90_pops[0];
204 : 8 : if ((_q100 == _q40 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q40, 0) && types_match (_q100, _q40)))
205 : : {
206 : 8 : switch (TREE_CODE (_q71))
207 : : {
208 : 8 : case INTEGER_CST:
209 : 8 : {
210 : 8 : if ((_q22 == _q40 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q40, 0) && types_match (_q22, _q40)))
211 : : {
212 : 8 : {
213 : 8 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q31, _q21, _q71 };
214 : 8 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
215 : : )
216 : : {
217 : 8 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
218 : : )
219 : : {
220 : 8 : {
221 : 8 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
222 : 8 : unsigned otype_precision = TYPE_PRECISION (type);
223 : 8 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
224 : 8 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
225 : 8 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
226 : 8 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
227 : 8 : itype_precision);
228 : 8 : int cmp = 0;
229 : 8 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
230 : 8 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
231 : 16 : int_cst_1) && (cmp >= 0)
232 : : )
233 : : {
234 : 8 : {
235 : 8 : res_ops[0] = captures[0];
236 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
237 : 8 : return true;
238 : : }
239 : : }
240 : 8 : }
241 : : }
242 : : }
243 : : }
244 : : }
245 : : break;
246 : : }
247 : : default:;
248 : : }
249 : : }
250 : : }
251 : : }
252 : 0 : break;
253 : : }
254 : : default:;
255 : : }
256 : : }
257 : : break;
258 : : default:;
259 : : }
260 : : }
261 : : }
262 : 0 : break;
263 : : }
264 : : default:;
265 : : }
266 : : }
267 : : break;
268 : : default:;
269 : : }
270 : : break;
271 : : }
272 : : default:;
273 : : }
274 : : }
275 : : }
276 : 316 : switch (TREE_CODE (_q31))
277 : : {
278 : 132 : case INTEGER_CST:
279 : 132 : {
280 : 132 : switch (TREE_CODE (_q21))
281 : : {
282 : 86 : case SSA_NAME:
283 : 86 : if (gimple *_d4 = get_def (valueize, _q21))
284 : : {
285 : 86 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
286 : 86 : switch (gimple_assign_rhs_code (_a4))
287 : : {
288 : 0 : case RSHIFT_EXPR:
289 : 0 : {
290 : 0 : tree _q60 = gimple_assign_rhs1 (_a4);
291 : 0 : _q60 = do_valueize (valueize, _q60);
292 : 0 : tree _q61 = gimple_assign_rhs2 (_a4);
293 : 0 : _q61 = do_valueize (valueize, _q61);
294 : 0 : switch (TREE_CODE (_q60))
295 : : {
296 : 0 : case SSA_NAME:
297 : 0 : if (gimple *_d5 = get_def (valueize, _q60))
298 : : {
299 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
300 : 0 : switch (gimple_assign_rhs_code (_a5))
301 : : {
302 : 0 : case NEGATE_EXPR:
303 : 0 : {
304 : 0 : tree _q70 = gimple_assign_rhs1 (_a5);
305 : 0 : _q70 = do_valueize (valueize, _q70);
306 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
307 : : {
308 : 0 : switch (TREE_CODE (_q61))
309 : : {
310 : 0 : case INTEGER_CST:
311 : 0 : {
312 : 0 : if ((_q22 == _q30 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q30, 0) && types_match (_q22, _q30)))
313 : : {
314 : 0 : {
315 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q21, _q61 };
316 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
317 : : )
318 : : {
319 : 0 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
320 : : )
321 : : {
322 : 0 : {
323 : 0 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
324 : 0 : unsigned otype_precision = TYPE_PRECISION (type);
325 : 0 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
326 : 0 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
327 : 0 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
328 : 0 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
329 : 0 : itype_precision);
330 : 0 : int cmp = 0;
331 : 0 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
332 : 0 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
333 : 0 : int_cst_1) && (cmp >= 0)
334 : : )
335 : : {
336 : 0 : {
337 : 0 : res_ops[0] = captures[0];
338 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
339 : 0 : return true;
340 : : }
341 : : }
342 : 0 : }
343 : : }
344 : : }
345 : : }
346 : : }
347 : : break;
348 : : }
349 : : default:;
350 : : }
351 : : }
352 : : break;
353 : : }
354 : : default:;
355 : : }
356 : : }
357 : : break;
358 : : default:;
359 : : }
360 : : break;
361 : : }
362 : : default:;
363 : : }
364 : : }
365 : : break;
366 : : default:;
367 : : }
368 : : break;
369 : : }
370 : : default:;
371 : : }
372 : : break;
373 : : }
374 : : default:;
375 : : }
376 : : }
377 : : break;
378 : 0 : case GT_EXPR:
379 : 0 : {
380 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
381 : 0 : if ((TREE_CODE (_q30) == SSA_NAME
382 : 0 : || is_gimple_min_invariant (_q30)))
383 : : {
384 : 0 : _q30 = do_valueize (valueize, _q30);
385 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
386 : 0 : if ((TREE_CODE (_q31) == SSA_NAME
387 : 0 : || is_gimple_min_invariant (_q31)))
388 : : {
389 : 0 : _q31 = do_valueize (valueize, _q31);
390 : 0 : {
391 : 0 : tree _q30_pops[1];
392 : 0 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
393 : : {
394 : 0 : tree _q40 = _q30_pops[0];
395 : 0 : switch (TREE_CODE (_q31))
396 : : {
397 : 0 : case INTEGER_CST:
398 : 0 : {
399 : 0 : switch (TREE_CODE (_q21))
400 : : {
401 : 0 : case SSA_NAME:
402 : 0 : if (gimple *_d3 = get_def (valueize, _q21))
403 : : {
404 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
405 : 0 : switch (gimple_assign_rhs_code (_a3))
406 : : {
407 : 0 : case RSHIFT_EXPR:
408 : 0 : {
409 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
410 : 0 : _q70 = do_valueize (valueize, _q70);
411 : 0 : tree _q71 = gimple_assign_rhs2 (_a3);
412 : 0 : _q71 = do_valueize (valueize, _q71);
413 : 0 : {
414 : 0 : tree _q70_pops[1];
415 : 0 : if (gimple_nop_convert (_q70, _q70_pops, valueize))
416 : : {
417 : 0 : tree _q80 = _q70_pops[0];
418 : 0 : switch (TREE_CODE (_q80))
419 : : {
420 : 0 : case SSA_NAME:
421 : 0 : if (gimple *_d4 = get_def (valueize, _q80))
422 : : {
423 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
424 : 0 : switch (gimple_assign_rhs_code (_a4))
425 : : {
426 : 0 : case NEGATE_EXPR:
427 : 0 : {
428 : 0 : tree _q90 = gimple_assign_rhs1 (_a4);
429 : 0 : _q90 = do_valueize (valueize, _q90);
430 : 0 : {
431 : 0 : tree _q90_pops[1];
432 : 0 : if (gimple_nop_convert (_q90, _q90_pops, valueize))
433 : : {
434 : 0 : tree _q100 = _q90_pops[0];
435 : 0 : if ((_q100 == _q40 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q40, 0) && types_match (_q100, _q40)))
436 : : {
437 : 0 : switch (TREE_CODE (_q71))
438 : : {
439 : 0 : case INTEGER_CST:
440 : 0 : {
441 : 0 : if ((_q22 == _q40 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q40, 0) && types_match (_q22, _q40)))
442 : : {
443 : 0 : {
444 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q31, _q21, _q71 };
445 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
446 : : )
447 : : {
448 : 0 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
449 : : )
450 : : {
451 : 0 : {
452 : 0 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
453 : 0 : unsigned otype_precision = TYPE_PRECISION (type);
454 : 0 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
455 : 0 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
456 : 0 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
457 : 0 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
458 : 0 : itype_precision);
459 : 0 : int cmp = 0;
460 : 0 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
461 : 0 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
462 : 0 : int_cst_1) && (cmp >= 0)
463 : : )
464 : : {
465 : 0 : {
466 : 0 : res_ops[0] = captures[0];
467 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
468 : 0 : return true;
469 : : }
470 : : }
471 : 0 : }
472 : : }
473 : : }
474 : : }
475 : : }
476 : : break;
477 : : }
478 : : default:;
479 : : }
480 : : }
481 : : }
482 : : }
483 : 0 : break;
484 : : }
485 : : default:;
486 : : }
487 : : }
488 : : break;
489 : : default:;
490 : : }
491 : : }
492 : : }
493 : 0 : break;
494 : : }
495 : : default:;
496 : : }
497 : : }
498 : : break;
499 : : default:;
500 : : }
501 : : break;
502 : : }
503 : : default:;
504 : : }
505 : : }
506 : : }
507 : 0 : switch (TREE_CODE (_q31))
508 : : {
509 : 0 : case INTEGER_CST:
510 : 0 : {
511 : 0 : switch (TREE_CODE (_q21))
512 : : {
513 : 0 : case SSA_NAME:
514 : 0 : if (gimple *_d3 = get_def (valueize, _q21))
515 : : {
516 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
517 : 0 : switch (gimple_assign_rhs_code (_a3))
518 : : {
519 : 0 : case RSHIFT_EXPR:
520 : 0 : {
521 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
522 : 0 : _q60 = do_valueize (valueize, _q60);
523 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
524 : 0 : _q61 = do_valueize (valueize, _q61);
525 : 0 : switch (TREE_CODE (_q60))
526 : : {
527 : 0 : case SSA_NAME:
528 : 0 : if (gimple *_d4 = get_def (valueize, _q60))
529 : : {
530 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
531 : 0 : switch (gimple_assign_rhs_code (_a4))
532 : : {
533 : 0 : case NEGATE_EXPR:
534 : 0 : {
535 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
536 : 0 : _q70 = do_valueize (valueize, _q70);
537 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
538 : : {
539 : 0 : switch (TREE_CODE (_q61))
540 : : {
541 : 0 : case INTEGER_CST:
542 : 0 : {
543 : 0 : if ((_q22 == _q30 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q30, 0) && types_match (_q22, _q30)))
544 : : {
545 : 0 : {
546 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q21, _q61 };
547 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
548 : : )
549 : : {
550 : 0 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
551 : : )
552 : : {
553 : 0 : {
554 : 0 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
555 : 0 : unsigned otype_precision = TYPE_PRECISION (type);
556 : 0 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
557 : 0 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
558 : 0 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
559 : 0 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
560 : 0 : itype_precision);
561 : 0 : int cmp = 0;
562 : 0 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
563 : 0 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
564 : 0 : int_cst_1) && (cmp >= 0)
565 : : )
566 : : {
567 : 0 : {
568 : 0 : res_ops[0] = captures[0];
569 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
570 : 0 : return true;
571 : : }
572 : : }
573 : 0 : }
574 : : }
575 : : }
576 : : }
577 : : }
578 : : break;
579 : : }
580 : : default:;
581 : : }
582 : : }
583 : : break;
584 : : }
585 : : default:;
586 : : }
587 : : }
588 : : break;
589 : : default:;
590 : : }
591 : : break;
592 : : }
593 : : default:;
594 : : }
595 : : }
596 : : break;
597 : : default:;
598 : : }
599 : : break;
600 : : }
601 : : default:;
602 : : }
603 : : }
604 : : }
605 : : break;
606 : : }
607 : : default:;
608 : : }
609 : : break;
610 : : }
611 : : default:;
612 : : }
613 : 787438 : else if (gphi *_a2 = dyn_cast <gphi *> (_d2))
614 : : {
615 : 499968 : basic_block _b2 = gimple_bb (_a2);
616 : 499968 : tree _q21, _q22;
617 : 499968 : gcond *_cond_2 = match_cond_with_binary_phi (_a2, &_q21, &_q22);
618 : 499968 : if (_cond_2)
619 : : {
620 : 33317 : tree _cond_lhs_2 = gimple_cond_lhs (_cond_2);
621 : 33317 : tree _cond_rhs_2 = gimple_cond_rhs (_cond_2);
622 : 33317 : tree _q20 = build2 (gimple_cond_code (_cond_2), boolean_type_node, _cond_lhs_2, _cond_rhs_2);
623 : 33317 : switch (TREE_CODE (_q20))
624 : : {
625 : 0 : case SSA_NAME:
626 : 0 : if (gimple *_d3 = get_def (valueize, _q20))
627 : : {
628 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
629 : 0 : switch (gimple_assign_rhs_code (_a3))
630 : : {
631 : 0 : case GT_EXPR:
632 : 0 : {
633 : 0 : tree _q30 = gimple_assign_rhs1 (_a3);
634 : 0 : _q30 = do_valueize (valueize, _q30);
635 : 0 : tree _q31 = gimple_assign_rhs2 (_a3);
636 : 0 : _q31 = do_valueize (valueize, _q31);
637 : 0 : {
638 : 0 : tree _q30_pops[1];
639 : 0 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
640 : : {
641 : 0 : tree _q40 = _q30_pops[0];
642 : 0 : switch (TREE_CODE (_q31))
643 : : {
644 : 0 : case INTEGER_CST:
645 : 0 : {
646 : 0 : switch (TREE_CODE (_q21))
647 : : {
648 : 0 : case SSA_NAME:
649 : 0 : if (gimple *_d4 = get_def (valueize, _q21))
650 : : {
651 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
652 : 0 : switch (gimple_assign_rhs_code (_a4))
653 : : {
654 : 0 : case RSHIFT_EXPR:
655 : 0 : {
656 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
657 : 0 : _q70 = do_valueize (valueize, _q70);
658 : 0 : tree _q71 = gimple_assign_rhs2 (_a4);
659 : 0 : _q71 = do_valueize (valueize, _q71);
660 : 0 : {
661 : 0 : tree _q70_pops[1];
662 : 0 : if (gimple_nop_convert (_q70, _q70_pops, valueize))
663 : : {
664 : 0 : tree _q80 = _q70_pops[0];
665 : 0 : switch (TREE_CODE (_q80))
666 : : {
667 : 0 : case SSA_NAME:
668 : 0 : if (gimple *_d5 = get_def (valueize, _q80))
669 : : {
670 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
671 : 0 : switch (gimple_assign_rhs_code (_a5))
672 : : {
673 : 0 : case NEGATE_EXPR:
674 : 0 : {
675 : 0 : tree _q90 = gimple_assign_rhs1 (_a5);
676 : 0 : _q90 = do_valueize (valueize, _q90);
677 : 0 : {
678 : 0 : tree _q90_pops[1];
679 : 0 : if (gimple_nop_convert (_q90, _q90_pops, valueize))
680 : : {
681 : 0 : tree _q100 = _q90_pops[0];
682 : 0 : if ((_q100 == _q40 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q40, 0) && types_match (_q100, _q40)))
683 : : {
684 : 0 : switch (TREE_CODE (_q71))
685 : : {
686 : 0 : case INTEGER_CST:
687 : 0 : {
688 : 0 : if ((_q22 == _q40 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q40, 0) && types_match (_q22, _q40)))
689 : : {
690 : 0 : {
691 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q31, _q21, _q71 };
692 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
693 : : )
694 : : {
695 : 0 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
696 : : )
697 : : {
698 : 0 : {
699 : 0 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
700 : 0 : unsigned otype_precision = TYPE_PRECISION (type);
701 : 0 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
702 : 0 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
703 : 0 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
704 : 0 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
705 : 0 : itype_precision);
706 : 0 : int cmp = 0;
707 : 0 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
708 : 0 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
709 : 0 : int_cst_1) && (cmp >= 0)
710 : : )
711 : : {
712 : 0 : {
713 : 0 : res_ops[0] = captures[0];
714 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
715 : 0 : return true;
716 : : }
717 : : }
718 : 0 : }
719 : : }
720 : : }
721 : : }
722 : : }
723 : : break;
724 : : }
725 : : default:;
726 : : }
727 : : }
728 : : }
729 : : }
730 : 0 : break;
731 : : }
732 : : default:;
733 : : }
734 : : }
735 : : break;
736 : : default:;
737 : : }
738 : : }
739 : : }
740 : 0 : break;
741 : : }
742 : : default:;
743 : : }
744 : : }
745 : : break;
746 : : default:;
747 : : }
748 : : break;
749 : : }
750 : : default:;
751 : : }
752 : : }
753 : : }
754 : 0 : switch (TREE_CODE (_q31))
755 : : {
756 : 0 : case INTEGER_CST:
757 : 0 : {
758 : 0 : switch (TREE_CODE (_q21))
759 : : {
760 : 0 : case SSA_NAME:
761 : 0 : if (gimple *_d4 = get_def (valueize, _q21))
762 : : {
763 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
764 : 0 : switch (gimple_assign_rhs_code (_a4))
765 : : {
766 : 0 : case RSHIFT_EXPR:
767 : 0 : {
768 : 0 : tree _q60 = gimple_assign_rhs1 (_a4);
769 : 0 : _q60 = do_valueize (valueize, _q60);
770 : 0 : tree _q61 = gimple_assign_rhs2 (_a4);
771 : 0 : _q61 = do_valueize (valueize, _q61);
772 : 0 : switch (TREE_CODE (_q60))
773 : : {
774 : 0 : case SSA_NAME:
775 : 0 : if (gimple *_d5 = get_def (valueize, _q60))
776 : : {
777 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
778 : 0 : switch (gimple_assign_rhs_code (_a5))
779 : : {
780 : 0 : case NEGATE_EXPR:
781 : 0 : {
782 : 0 : tree _q70 = gimple_assign_rhs1 (_a5);
783 : 0 : _q70 = do_valueize (valueize, _q70);
784 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
785 : : {
786 : 0 : switch (TREE_CODE (_q61))
787 : : {
788 : 0 : case INTEGER_CST:
789 : 0 : {
790 : 0 : if ((_q22 == _q30 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q30, 0) && types_match (_q22, _q30)))
791 : : {
792 : 0 : {
793 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q21, _q61 };
794 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
795 : : )
796 : : {
797 : 0 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
798 : : )
799 : : {
800 : 0 : {
801 : 0 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
802 : 0 : unsigned otype_precision = TYPE_PRECISION (type);
803 : 0 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
804 : 0 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
805 : 0 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
806 : 0 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
807 : 0 : itype_precision);
808 : 0 : int cmp = 0;
809 : 0 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
810 : 0 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
811 : 0 : int_cst_1) && (cmp >= 0)
812 : : )
813 : : {
814 : 0 : {
815 : 0 : res_ops[0] = captures[0];
816 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
817 : 0 : return true;
818 : : }
819 : : }
820 : 0 : }
821 : : }
822 : : }
823 : : }
824 : : }
825 : : break;
826 : : }
827 : : default:;
828 : : }
829 : : }
830 : : break;
831 : : }
832 : : default:;
833 : : }
834 : : }
835 : : break;
836 : : default:;
837 : : }
838 : : break;
839 : : }
840 : : default:;
841 : : }
842 : : }
843 : : break;
844 : : default:;
845 : : }
846 : : break;
847 : : }
848 : : default:;
849 : : }
850 : : break;
851 : : }
852 : : default:;
853 : : }
854 : : }
855 : : break;
856 : 6105 : case GT_EXPR:
857 : 6105 : {
858 : 6105 : tree _q30 = TREE_OPERAND (_q20, 0);
859 : 6105 : if ((TREE_CODE (_q30) == SSA_NAME
860 : 6105 : || is_gimple_min_invariant (_q30)))
861 : : {
862 : 6105 : _q30 = do_valueize (valueize, _q30);
863 : 6105 : tree _q31 = TREE_OPERAND (_q20, 1);
864 : 6105 : if ((TREE_CODE (_q31) == SSA_NAME
865 : 6105 : || is_gimple_min_invariant (_q31)))
866 : : {
867 : 6105 : _q31 = do_valueize (valueize, _q31);
868 : 6105 : {
869 : 6105 : tree _q30_pops[1];
870 : 6105 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
871 : : {
872 : 1616 : tree _q40 = _q30_pops[0];
873 : 1616 : switch (TREE_CODE (_q31))
874 : : {
875 : 137 : case INTEGER_CST:
876 : 137 : {
877 : 137 : switch (TREE_CODE (_q21))
878 : : {
879 : 137 : case SSA_NAME:
880 : 137 : if (gimple *_d3 = get_def (valueize, _q21))
881 : : {
882 : 137 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
883 : 223 : switch (gimple_assign_rhs_code (_a3))
884 : : {
885 : 49 : case RSHIFT_EXPR:
886 : 49 : {
887 : 49 : tree _q70 = gimple_assign_rhs1 (_a3);
888 : 49 : _q70 = do_valueize (valueize, _q70);
889 : 49 : tree _q71 = gimple_assign_rhs2 (_a3);
890 : 49 : _q71 = do_valueize (valueize, _q71);
891 : 49 : {
892 : 49 : tree _q70_pops[1];
893 : 49 : if (gimple_nop_convert (_q70, _q70_pops, valueize))
894 : : {
895 : 0 : tree _q80 = _q70_pops[0];
896 : 0 : switch (TREE_CODE (_q80))
897 : : {
898 : 0 : case SSA_NAME:
899 : 0 : if (gimple *_d4 = get_def (valueize, _q80))
900 : : {
901 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
902 : 0 : switch (gimple_assign_rhs_code (_a4))
903 : : {
904 : 0 : case NEGATE_EXPR:
905 : 0 : {
906 : 0 : tree _q90 = gimple_assign_rhs1 (_a4);
907 : 0 : _q90 = do_valueize (valueize, _q90);
908 : 0 : {
909 : 0 : tree _q90_pops[1];
910 : 0 : if (gimple_nop_convert (_q90, _q90_pops, valueize))
911 : : {
912 : 0 : tree _q100 = _q90_pops[0];
913 : 0 : if ((_q100 == _q40 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q40, 0) && types_match (_q100, _q40)))
914 : : {
915 : 0 : switch (TREE_CODE (_q71))
916 : : {
917 : 0 : case INTEGER_CST:
918 : 0 : {
919 : 0 : if ((_q22 == _q40 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q40, 0) && types_match (_q22, _q40)))
920 : : {
921 : 0 : {
922 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q31, _q21, _q71 };
923 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
924 : : )
925 : : {
926 : 0 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
927 : : )
928 : : {
929 : 0 : {
930 : 0 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
931 : 0 : unsigned otype_precision = TYPE_PRECISION (type);
932 : 0 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
933 : 0 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
934 : 0 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
935 : 0 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
936 : 0 : itype_precision);
937 : 0 : int cmp = 0;
938 : 0 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
939 : 0 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
940 : 0 : int_cst_1) && (cmp >= 0)
941 : : )
942 : : {
943 : 0 : {
944 : 0 : res_ops[0] = captures[0];
945 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
946 : 0 : return true;
947 : : }
948 : : }
949 : 0 : }
950 : : }
951 : : }
952 : : }
953 : : }
954 : : break;
955 : : }
956 : : default:;
957 : : }
958 : : }
959 : : }
960 : : }
961 : 0 : break;
962 : : }
963 : : default:;
964 : : }
965 : : }
966 : : break;
967 : : default:;
968 : : }
969 : : }
970 : : }
971 : 49 : break;
972 : : }
973 : : default:;
974 : : }
975 : : }
976 : : break;
977 : : default:;
978 : : }
979 : : break;
980 : : }
981 : : default:;
982 : : }
983 : : }
984 : : }
985 : 6105 : switch (TREE_CODE (_q31))
986 : : {
987 : 3649 : case INTEGER_CST:
988 : 3649 : {
989 : 3649 : switch (TREE_CODE (_q21))
990 : : {
991 : 3620 : case SSA_NAME:
992 : 3620 : if (gimple *_d3 = get_def (valueize, _q21))
993 : : {
994 : 3620 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
995 : 3823 : switch (gimple_assign_rhs_code (_a3))
996 : : {
997 : 280 : case RSHIFT_EXPR:
998 : 280 : {
999 : 280 : tree _q60 = gimple_assign_rhs1 (_a3);
1000 : 280 : _q60 = do_valueize (valueize, _q60);
1001 : 280 : tree _q61 = gimple_assign_rhs2 (_a3);
1002 : 280 : _q61 = do_valueize (valueize, _q61);
1003 : 280 : switch (TREE_CODE (_q60))
1004 : : {
1005 : 280 : case SSA_NAME:
1006 : 280 : if (gimple *_d4 = get_def (valueize, _q60))
1007 : : {
1008 : 500059 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
1009 : 103 : switch (gimple_assign_rhs_code (_a4))
1010 : : {
1011 : 49 : case NEGATE_EXPR:
1012 : 49 : {
1013 : 49 : tree _q70 = gimple_assign_rhs1 (_a4);
1014 : 49 : _q70 = do_valueize (valueize, _q70);
1015 : 49 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
1016 : : {
1017 : 0 : switch (TREE_CODE (_q61))
1018 : : {
1019 : 0 : case INTEGER_CST:
1020 : 0 : {
1021 : 0 : if ((_q22 == _q30 && ! TREE_SIDE_EFFECTS (_q22)) || (operand_equal_p (_q22, _q30, 0) && types_match (_q22, _q30)))
1022 : : {
1023 : 0 : {
1024 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q21, _q61 };
1025 : 0 : if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)
1026 : : )
1027 : : {
1028 : 0 : if (! TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1029 : : )
1030 : : {
1031 : 0 : {
1032 : 0 : unsigned itype_precision = TYPE_PRECISION (TREE_TYPE (captures[0]));
1033 : 0 : unsigned otype_precision = TYPE_PRECISION (type);
1034 : 0 : wide_int trunc_max = wi::mask (otype_precision, false, itype_precision);
1035 : 0 : wide_int int_cst_1 = wi::to_wide (captures[1], itype_precision);
1036 : 0 : wide_int int_cst_2 = wi::to_wide (captures[3], itype_precision);
1037 : 0 : wide_int shift_amount = wi::uhwi (itype_precision - 1,
1038 : 0 : itype_precision);
1039 : 0 : int cmp = 0;
1040 : 0 : cmp = wi::cmp (int_cst_2, shift_amount, TYPE_SIGN (TREE_TYPE (captures[0])));
1041 : 0 : if (otype_precision < itype_precision && wi::eq_p (trunc_max,
1042 : 0 : int_cst_1) && (cmp >= 0)
1043 : : )
1044 : : {
1045 : 0 : {
1046 : 0 : res_ops[0] = captures[0];
1047 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 68, __FILE__, __LINE__, false);
1048 : 0 : return true;
1049 : : }
1050 : : }
1051 : 0 : }
1052 : : }
1053 : : }
1054 : : }
1055 : : }
1056 : : break;
1057 : : }
1058 : : default:;
1059 : : }
1060 : : }
1061 : : break;
1062 : : }
1063 : : default:;
1064 : : }
1065 : : }
1066 : : break;
1067 : : default:;
1068 : : }
1069 : : break;
1070 : : }
1071 : : default:;
1072 : : }
1073 : : }
1074 : : break;
1075 : : default:;
1076 : : }
1077 : : break;
1078 : : }
1079 : : default:;
1080 : : }
1081 : : }
1082 : : }
1083 : : break;
1084 : : }
1085 : : default:;
1086 : : }
1087 : : }
1088 : : }
1089 : : }
1090 : : break;
1091 : : default:;
1092 : : }
1093 : : break;
1094 : : }
1095 : : default:;
1096 : : }
1097 : : }
1098 : : break;
1099 : : default:;
1100 : : }
1101 : : return false;
1102 : : }
1103 : :
1104 : : bool
1105 : 20280 : gimple_bitwise_induction_p (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
1106 : : {
1107 : 20280 : const tree type = TREE_TYPE (t);
1108 : 20280 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1109 : 20280 : switch (TREE_CODE (t))
1110 : : {
1111 : 20280 : case SSA_NAME:
1112 : 20280 : if (gimple *_d1 = get_def (valueize, t))
1113 : : {
1114 : 20280 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
1115 : 9771 : switch (gimple_assign_rhs_code (_a1))
1116 : : {
1117 : 1405 : case BIT_AND_EXPR:
1118 : 1405 : case BIT_IOR_EXPR:
1119 : 1405 : case BIT_XOR_EXPR:
1120 : 1405 : {
1121 : 1405 : tree _p0 = gimple_assign_rhs1 (_a1);
1122 : 1405 : _p0 = do_valueize (valueize, _p0);
1123 : 1405 : tree _p1 = gimple_assign_rhs2 (_a1);
1124 : 1405 : _p1 = do_valueize (valueize, _p1);
1125 : 1405 : if (tree_swap_operands_p (_p0, _p1))
1126 : 4 : std::swap (_p0, _p1);
1127 : 1405 : {
1128 : 1405 : tree _p0_pops[1];
1129 : 1405 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
1130 : : {
1131 : 36 : tree _q20 = _p0_pops[0];
1132 : 36 : switch (TREE_CODE (_q20))
1133 : : {
1134 : 36 : case SSA_NAME:
1135 : 36 : if (gimple *_d2 = get_def (valueize, _q20))
1136 : : {
1137 : 36 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1138 : 46 : switch (gimple_assign_rhs_code (_a2))
1139 : : {
1140 : 0 : case BIT_NOT_EXPR:
1141 : 0 : {
1142 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
1143 : 0 : _q30 = do_valueize (valueize, _q30);
1144 : 0 : switch (TREE_CODE (_q30))
1145 : : {
1146 : 0 : case SSA_NAME:
1147 : 0 : if (gimple *_d3 = get_def (valueize, _q30))
1148 : : {
1149 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1150 : 0 : switch (gimple_assign_rhs_code (_a3))
1151 : : {
1152 : 0 : CASE_CONVERT:
1153 : 0 : {
1154 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
1155 : 0 : _q40 = do_valueize (valueize, _q40);
1156 : 0 : switch (TREE_CODE (_q40))
1157 : : {
1158 : 0 : case SSA_NAME:
1159 : 0 : if (gimple *_d4 = get_def (valueize, _q40))
1160 : : {
1161 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
1162 : 0 : switch (gimple_assign_rhs_code (_a4))
1163 : : {
1164 : 0 : case LSHIFT_EXPR:
1165 : 0 : {
1166 : 0 : tree _q50 = gimple_assign_rhs1 (_a4);
1167 : 0 : _q50 = do_valueize (valueize, _q50);
1168 : 0 : tree _q51 = gimple_assign_rhs2 (_a4);
1169 : 0 : _q51 = do_valueize (valueize, _q51);
1170 : 0 : if (integer_onep (_q50))
1171 : : {
1172 : 0 : {
1173 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q51, _p1, _q50 };
1174 : 0 : {
1175 : 0 : res_ops[0] = captures[0];
1176 : 0 : res_ops[1] = captures[1];
1177 : 0 : res_ops[2] = captures[2];
1178 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1179 : 0 : return true;
1180 : : }
1181 : : }
1182 : : }
1183 : : break;
1184 : : }
1185 : : default:;
1186 : : }
1187 : : }
1188 : : break;
1189 : : default:;
1190 : : }
1191 : : break;
1192 : : }
1193 : 0 : case LSHIFT_EXPR:
1194 : 0 : {
1195 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
1196 : 0 : _q40 = do_valueize (valueize, _q40);
1197 : 0 : tree _q41 = gimple_assign_rhs2 (_a3);
1198 : 0 : _q41 = do_valueize (valueize, _q41);
1199 : 0 : if (integer_onep (_q40))
1200 : : {
1201 : 0 : {
1202 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _p1, _q40 };
1203 : 0 : {
1204 : 0 : res_ops[0] = captures[0];
1205 : 0 : res_ops[1] = captures[1];
1206 : 0 : res_ops[2] = captures[2];
1207 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1208 : 0 : return true;
1209 : : }
1210 : : }
1211 : : }
1212 : : break;
1213 : : }
1214 : : default:;
1215 : : }
1216 : : }
1217 : : break;
1218 : : default:;
1219 : : }
1220 : : break;
1221 : : }
1222 : 0 : CASE_CONVERT:
1223 : 0 : {
1224 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
1225 : 0 : _q30 = do_valueize (valueize, _q30);
1226 : 0 : switch (TREE_CODE (_q30))
1227 : : {
1228 : 0 : case SSA_NAME:
1229 : 0 : if (gimple *_d3 = get_def (valueize, _q30))
1230 : : {
1231 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1232 : 0 : switch (gimple_assign_rhs_code (_a3))
1233 : : {
1234 : 0 : case LSHIFT_EXPR:
1235 : 0 : {
1236 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
1237 : 0 : _q40 = do_valueize (valueize, _q40);
1238 : 0 : tree _q41 = gimple_assign_rhs2 (_a3);
1239 : 0 : _q41 = do_valueize (valueize, _q41);
1240 : 0 : if (integer_onep (_q40))
1241 : : {
1242 : 0 : {
1243 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _p1, _q40 };
1244 : 0 : {
1245 : 0 : res_ops[0] = captures[0];
1246 : 0 : res_ops[1] = captures[1];
1247 : 0 : res_ops[2] = captures[2];
1248 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1249 : 0 : return true;
1250 : : }
1251 : : }
1252 : : }
1253 : : break;
1254 : : }
1255 : : default:;
1256 : : }
1257 : : }
1258 : : break;
1259 : : default:;
1260 : : }
1261 : : break;
1262 : : }
1263 : 17 : case LSHIFT_EXPR:
1264 : 17 : {
1265 : 17 : tree _q30 = gimple_assign_rhs1 (_a2);
1266 : 17 : _q30 = do_valueize (valueize, _q30);
1267 : 17 : tree _q31 = gimple_assign_rhs2 (_a2);
1268 : 17 : _q31 = do_valueize (valueize, _q31);
1269 : 17 : if (integer_onep (_q30))
1270 : : {
1271 : 5 : {
1272 : 5 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q31, _p1, _q30 };
1273 : 5 : {
1274 : 5 : res_ops[0] = captures[0];
1275 : 5 : res_ops[1] = captures[1];
1276 : 5 : res_ops[2] = captures[2];
1277 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1278 : 5 : return true;
1279 : : }
1280 : : }
1281 : : }
1282 : : break;
1283 : : }
1284 : : default:;
1285 : : }
1286 : : }
1287 : : break;
1288 : : default:;
1289 : : }
1290 : : }
1291 : : }
1292 : 1400 : {
1293 : 1400 : tree _p1_pops[1];
1294 : 1400 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
1295 : : {
1296 : 3 : tree _q30 = _p1_pops[0];
1297 : 3 : switch (TREE_CODE (_q30))
1298 : : {
1299 : 3 : case SSA_NAME:
1300 : 3 : if (gimple *_d2 = get_def (valueize, _q30))
1301 : : {
1302 : 3 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1303 : 3 : switch (gimple_assign_rhs_code (_a2))
1304 : : {
1305 : 0 : case BIT_NOT_EXPR:
1306 : 0 : {
1307 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
1308 : 0 : _q40 = do_valueize (valueize, _q40);
1309 : 0 : switch (TREE_CODE (_q40))
1310 : : {
1311 : 0 : case SSA_NAME:
1312 : 0 : if (gimple *_d3 = get_def (valueize, _q40))
1313 : : {
1314 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1315 : 0 : switch (gimple_assign_rhs_code (_a3))
1316 : : {
1317 : 0 : CASE_CONVERT:
1318 : 0 : {
1319 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
1320 : 0 : _q50 = do_valueize (valueize, _q50);
1321 : 0 : switch (TREE_CODE (_q50))
1322 : : {
1323 : 0 : case SSA_NAME:
1324 : 0 : if (gimple *_d4 = get_def (valueize, _q50))
1325 : : {
1326 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
1327 : 0 : switch (gimple_assign_rhs_code (_a4))
1328 : : {
1329 : 0 : case LSHIFT_EXPR:
1330 : 0 : {
1331 : 0 : tree _q60 = gimple_assign_rhs1 (_a4);
1332 : 0 : _q60 = do_valueize (valueize, _q60);
1333 : 0 : tree _q61 = gimple_assign_rhs2 (_a4);
1334 : 0 : _q61 = do_valueize (valueize, _q61);
1335 : 0 : if (integer_onep (_q60))
1336 : : {
1337 : 0 : {
1338 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q61, _p0, _q60 };
1339 : 0 : {
1340 : 0 : res_ops[0] = captures[0];
1341 : 0 : res_ops[1] = captures[1];
1342 : 0 : res_ops[2] = captures[2];
1343 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1344 : 0 : return true;
1345 : : }
1346 : : }
1347 : : }
1348 : : break;
1349 : : }
1350 : : default:;
1351 : : }
1352 : : }
1353 : : break;
1354 : : default:;
1355 : : }
1356 : : break;
1357 : : }
1358 : 0 : case LSHIFT_EXPR:
1359 : 0 : {
1360 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
1361 : 0 : _q50 = do_valueize (valueize, _q50);
1362 : 0 : tree _q51 = gimple_assign_rhs2 (_a3);
1363 : 0 : _q51 = do_valueize (valueize, _q51);
1364 : 0 : if (integer_onep (_q50))
1365 : : {
1366 : 0 : {
1367 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q51, _p0, _q50 };
1368 : 0 : {
1369 : 0 : res_ops[0] = captures[0];
1370 : 0 : res_ops[1] = captures[1];
1371 : 0 : res_ops[2] = captures[2];
1372 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1373 : 0 : return true;
1374 : : }
1375 : : }
1376 : : }
1377 : : break;
1378 : : }
1379 : : default:;
1380 : : }
1381 : : }
1382 : : break;
1383 : : default:;
1384 : : }
1385 : : break;
1386 : : }
1387 : 0 : CASE_CONVERT:
1388 : 0 : {
1389 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
1390 : 0 : _q40 = do_valueize (valueize, _q40);
1391 : 0 : switch (TREE_CODE (_q40))
1392 : : {
1393 : 0 : case SSA_NAME:
1394 : 0 : if (gimple *_d3 = get_def (valueize, _q40))
1395 : : {
1396 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1397 : 0 : switch (gimple_assign_rhs_code (_a3))
1398 : : {
1399 : 0 : case LSHIFT_EXPR:
1400 : 0 : {
1401 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
1402 : 0 : _q50 = do_valueize (valueize, _q50);
1403 : 0 : tree _q51 = gimple_assign_rhs2 (_a3);
1404 : 0 : _q51 = do_valueize (valueize, _q51);
1405 : 0 : if (integer_onep (_q50))
1406 : : {
1407 : 0 : {
1408 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q51, _p0, _q50 };
1409 : 0 : {
1410 : 0 : res_ops[0] = captures[0];
1411 : 0 : res_ops[1] = captures[1];
1412 : 0 : res_ops[2] = captures[2];
1413 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1414 : 0 : return true;
1415 : : }
1416 : : }
1417 : : }
1418 : : break;
1419 : : }
1420 : : default:;
1421 : : }
1422 : : }
1423 : : break;
1424 : : default:;
1425 : : }
1426 : : break;
1427 : : }
1428 : 3 : case LSHIFT_EXPR:
1429 : 3 : {
1430 : 3 : tree _q40 = gimple_assign_rhs1 (_a2);
1431 : 3 : _q40 = do_valueize (valueize, _q40);
1432 : 3 : tree _q41 = gimple_assign_rhs2 (_a2);
1433 : 3 : _q41 = do_valueize (valueize, _q41);
1434 : 3 : if (integer_onep (_q40))
1435 : : {
1436 : 3 : {
1437 : 3 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q41, _p0, _q40 };
1438 : 3 : {
1439 : 3 : res_ops[0] = captures[0];
1440 : 3 : res_ops[1] = captures[1];
1441 : 3 : res_ops[2] = captures[2];
1442 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1443 : 3 : return true;
1444 : : }
1445 : : }
1446 : : }
1447 : : break;
1448 : : }
1449 : : default:;
1450 : : }
1451 : : }
1452 : : break;
1453 : : default:;
1454 : : }
1455 : : }
1456 : : }
1457 : 1397 : switch (TREE_CODE (_p0))
1458 : : {
1459 : 1397 : case SSA_NAME:
1460 : 1397 : if (gimple *_d2 = get_def (valueize, _p0))
1461 : : {
1462 : 1397 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1463 : 1374 : switch (gimple_assign_rhs_code (_a2))
1464 : : {
1465 : 27 : case BIT_NOT_EXPR:
1466 : 27 : {
1467 : 27 : tree _q20 = gimple_assign_rhs1 (_a2);
1468 : 27 : _q20 = do_valueize (valueize, _q20);
1469 : 27 : switch (TREE_CODE (_q20))
1470 : : {
1471 : 27 : case SSA_NAME:
1472 : 27 : if (gimple *_d3 = get_def (valueize, _q20))
1473 : : {
1474 : 27 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1475 : 27 : switch (gimple_assign_rhs_code (_a3))
1476 : : {
1477 : 8 : CASE_CONVERT:
1478 : 8 : {
1479 : 8 : tree _q30 = gimple_assign_rhs1 (_a3);
1480 : 8 : _q30 = do_valueize (valueize, _q30);
1481 : 8 : switch (TREE_CODE (_q30))
1482 : : {
1483 : 8 : case SSA_NAME:
1484 : 8 : if (gimple *_d4 = get_def (valueize, _q30))
1485 : : {
1486 : 8 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
1487 : 8 : switch (gimple_assign_rhs_code (_a4))
1488 : : {
1489 : 8 : case LSHIFT_EXPR:
1490 : 8 : {
1491 : 8 : tree _q40 = gimple_assign_rhs1 (_a4);
1492 : 8 : _q40 = do_valueize (valueize, _q40);
1493 : 8 : tree _q41 = gimple_assign_rhs2 (_a4);
1494 : 8 : _q41 = do_valueize (valueize, _q41);
1495 : 8 : if (integer_onep (_q40))
1496 : : {
1497 : 8 : {
1498 : 8 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q41, _p1, _q40 };
1499 : 8 : {
1500 : 8 : res_ops[0] = captures[0];
1501 : 8 : res_ops[1] = captures[1];
1502 : 8 : res_ops[2] = captures[2];
1503 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1504 : 8 : return true;
1505 : : }
1506 : : }
1507 : : }
1508 : : break;
1509 : : }
1510 : : default:;
1511 : : }
1512 : : }
1513 : : break;
1514 : : default:;
1515 : : }
1516 : : break;
1517 : : }
1518 : 19 : case LSHIFT_EXPR:
1519 : 19 : {
1520 : 19 : tree _q30 = gimple_assign_rhs1 (_a3);
1521 : 19 : _q30 = do_valueize (valueize, _q30);
1522 : 19 : tree _q31 = gimple_assign_rhs2 (_a3);
1523 : 19 : _q31 = do_valueize (valueize, _q31);
1524 : 19 : if (integer_onep (_q30))
1525 : : {
1526 : 19 : {
1527 : 19 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _p1, _q30 };
1528 : 19 : {
1529 : 19 : res_ops[0] = captures[0];
1530 : 19 : res_ops[1] = captures[1];
1531 : 19 : res_ops[2] = captures[2];
1532 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1533 : 19 : return true;
1534 : : }
1535 : : }
1536 : : }
1537 : : break;
1538 : : }
1539 : : default:;
1540 : : }
1541 : : }
1542 : : break;
1543 : : default:;
1544 : : }
1545 : : break;
1546 : : }
1547 : : default:;
1548 : : }
1549 : : }
1550 : : break;
1551 : 1370 : default:;
1552 : : }
1553 : 1370 : switch (TREE_CODE (_p1))
1554 : : {
1555 : 1333 : case SSA_NAME:
1556 : 1333 : if (gimple *_d2 = get_def (valueize, _p1))
1557 : : {
1558 : 1333 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1559 : 396 : switch (gimple_assign_rhs_code (_a2))
1560 : : {
1561 : 0 : case BIT_NOT_EXPR:
1562 : 0 : {
1563 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
1564 : 0 : _q30 = do_valueize (valueize, _q30);
1565 : 0 : switch (TREE_CODE (_q30))
1566 : : {
1567 : 0 : case SSA_NAME:
1568 : 0 : if (gimple *_d3 = get_def (valueize, _q30))
1569 : : {
1570 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1571 : 0 : switch (gimple_assign_rhs_code (_a3))
1572 : : {
1573 : 0 : CASE_CONVERT:
1574 : 0 : {
1575 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
1576 : 0 : _q40 = do_valueize (valueize, _q40);
1577 : 0 : switch (TREE_CODE (_q40))
1578 : : {
1579 : 0 : case SSA_NAME:
1580 : 0 : if (gimple *_d4 = get_def (valueize, _q40))
1581 : : {
1582 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
1583 : 0 : switch (gimple_assign_rhs_code (_a4))
1584 : : {
1585 : 0 : case LSHIFT_EXPR:
1586 : 0 : {
1587 : 0 : tree _q50 = gimple_assign_rhs1 (_a4);
1588 : 0 : _q50 = do_valueize (valueize, _q50);
1589 : 0 : tree _q51 = gimple_assign_rhs2 (_a4);
1590 : 0 : _q51 = do_valueize (valueize, _q51);
1591 : 0 : if (integer_onep (_q50))
1592 : : {
1593 : 0 : {
1594 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q51, _p0, _q50 };
1595 : 0 : {
1596 : 0 : res_ops[0] = captures[0];
1597 : 0 : res_ops[1] = captures[1];
1598 : 0 : res_ops[2] = captures[2];
1599 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1600 : 0 : return true;
1601 : : }
1602 : : }
1603 : : }
1604 : : break;
1605 : : }
1606 : : default:;
1607 : : }
1608 : : }
1609 : : break;
1610 : : default:;
1611 : : }
1612 : : break;
1613 : : }
1614 : 0 : case LSHIFT_EXPR:
1615 : 0 : {
1616 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
1617 : 0 : _q40 = do_valueize (valueize, _q40);
1618 : 0 : tree _q41 = gimple_assign_rhs2 (_a3);
1619 : 0 : _q41 = do_valueize (valueize, _q41);
1620 : 0 : if (integer_onep (_q40))
1621 : : {
1622 : 0 : {
1623 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q41, _p0, _q40 };
1624 : 0 : {
1625 : 0 : res_ops[0] = captures[0];
1626 : 0 : res_ops[1] = captures[1];
1627 : 0 : res_ops[2] = captures[2];
1628 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1629 : 0 : return true;
1630 : : }
1631 : : }
1632 : : }
1633 : : break;
1634 : : }
1635 : : default:;
1636 : : }
1637 : : }
1638 : : break;
1639 : : default:;
1640 : : }
1641 : : break;
1642 : : }
1643 : : default:;
1644 : : }
1645 : : }
1646 : : break;
1647 : 1370 : default:;
1648 : : }
1649 : 1370 : switch (TREE_CODE (_p0))
1650 : : {
1651 : 1370 : case SSA_NAME:
1652 : 1370 : if (gimple *_d2 = get_def (valueize, _p0))
1653 : : {
1654 : 1370 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1655 : 1347 : switch (gimple_assign_rhs_code (_a2))
1656 : : {
1657 : 739 : CASE_CONVERT:
1658 : 739 : {
1659 : 739 : tree _q20 = gimple_assign_rhs1 (_a2);
1660 : 739 : _q20 = do_valueize (valueize, _q20);
1661 : 739 : switch (TREE_CODE (_q20))
1662 : : {
1663 : 739 : case SSA_NAME:
1664 : 739 : if (gimple *_d3 = get_def (valueize, _q20))
1665 : : {
1666 : 739 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1667 : 772 : switch (gimple_assign_rhs_code (_a3))
1668 : : {
1669 : 248 : case LSHIFT_EXPR:
1670 : 248 : {
1671 : 248 : tree _q30 = gimple_assign_rhs1 (_a3);
1672 : 248 : _q30 = do_valueize (valueize, _q30);
1673 : 248 : tree _q31 = gimple_assign_rhs2 (_a3);
1674 : 248 : _q31 = do_valueize (valueize, _q31);
1675 : 248 : if (integer_onep (_q30))
1676 : : {
1677 : 22 : {
1678 : 22 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _p1, _q30 };
1679 : 22 : {
1680 : 22 : res_ops[0] = captures[0];
1681 : 22 : res_ops[1] = captures[1];
1682 : 22 : res_ops[2] = captures[2];
1683 : 22 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1684 : 22 : return true;
1685 : : }
1686 : : }
1687 : : }
1688 : : break;
1689 : : }
1690 : : default:;
1691 : : }
1692 : : }
1693 : : break;
1694 : : default:;
1695 : : }
1696 : : break;
1697 : : }
1698 : : default:;
1699 : : }
1700 : : }
1701 : : break;
1702 : 1348 : default:;
1703 : : }
1704 : 1348 : switch (TREE_CODE (_p1))
1705 : : {
1706 : 1311 : case SSA_NAME:
1707 : 1311 : if (gimple *_d2 = get_def (valueize, _p1))
1708 : : {
1709 : 1311 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1710 : 396 : switch (gimple_assign_rhs_code (_a2))
1711 : : {
1712 : 68 : CASE_CONVERT:
1713 : 68 : {
1714 : 68 : tree _q30 = gimple_assign_rhs1 (_a2);
1715 : 68 : _q30 = do_valueize (valueize, _q30);
1716 : 68 : switch (TREE_CODE (_q30))
1717 : : {
1718 : 68 : case SSA_NAME:
1719 : 68 : if (gimple *_d3 = get_def (valueize, _q30))
1720 : : {
1721 : 68 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1722 : 102 : switch (gimple_assign_rhs_code (_a3))
1723 : : {
1724 : 9 : case LSHIFT_EXPR:
1725 : 9 : {
1726 : 9 : tree _q40 = gimple_assign_rhs1 (_a3);
1727 : 9 : _q40 = do_valueize (valueize, _q40);
1728 : 9 : tree _q41 = gimple_assign_rhs2 (_a3);
1729 : 9 : _q41 = do_valueize (valueize, _q41);
1730 : 9 : if (integer_onep (_q40))
1731 : : {
1732 : 0 : {
1733 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q41, _p0, _q40 };
1734 : 0 : {
1735 : 0 : res_ops[0] = captures[0];
1736 : 0 : res_ops[1] = captures[1];
1737 : 0 : res_ops[2] = captures[2];
1738 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1739 : 0 : return true;
1740 : : }
1741 : : }
1742 : : }
1743 : : break;
1744 : : }
1745 : : default:;
1746 : : }
1747 : : }
1748 : : break;
1749 : : default:;
1750 : : }
1751 : : break;
1752 : : }
1753 : : default:;
1754 : : }
1755 : : }
1756 : : break;
1757 : 1348 : default:;
1758 : : }
1759 : 1348 : switch (TREE_CODE (_p0))
1760 : : {
1761 : 1348 : case SSA_NAME:
1762 : 1348 : if (gimple *_d2 = get_def (valueize, _p0))
1763 : : {
1764 : 1348 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1765 : 1325 : switch (gimple_assign_rhs_code (_a2))
1766 : : {
1767 : 109 : case LSHIFT_EXPR:
1768 : 109 : {
1769 : 109 : tree _q20 = gimple_assign_rhs1 (_a2);
1770 : 109 : _q20 = do_valueize (valueize, _q20);
1771 : 109 : tree _q21 = gimple_assign_rhs2 (_a2);
1772 : 109 : _q21 = do_valueize (valueize, _q21);
1773 : 109 : if (integer_onep (_q20))
1774 : : {
1775 : 30 : {
1776 : 30 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _p1, _q20 };
1777 : 30 : {
1778 : 30 : res_ops[0] = captures[0];
1779 : 30 : res_ops[1] = captures[1];
1780 : 30 : res_ops[2] = captures[2];
1781 : 30 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1782 : 30 : return true;
1783 : : }
1784 : : }
1785 : : }
1786 : : break;
1787 : : }
1788 : : default:;
1789 : : }
1790 : : }
1791 : : break;
1792 : 1318 : default:;
1793 : : }
1794 : 1318 : switch (TREE_CODE (_p1))
1795 : : {
1796 : 1281 : case SSA_NAME:
1797 : 1281 : if (gimple *_d2 = get_def (valueize, _p1))
1798 : : {
1799 : 1281 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1800 : 396 : switch (gimple_assign_rhs_code (_a2))
1801 : : {
1802 : 3 : case LSHIFT_EXPR:
1803 : 3 : {
1804 : 3 : tree _q30 = gimple_assign_rhs1 (_a2);
1805 : 3 : _q30 = do_valueize (valueize, _q30);
1806 : 3 : tree _q31 = gimple_assign_rhs2 (_a2);
1807 : 3 : _q31 = do_valueize (valueize, _q31);
1808 : 3 : if (integer_onep (_q30))
1809 : : {
1810 : 0 : {
1811 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q31, _p0, _q30 };
1812 : 0 : {
1813 : 0 : res_ops[0] = captures[0];
1814 : 0 : res_ops[1] = captures[1];
1815 : 0 : res_ops[2] = captures[2];
1816 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 116, __FILE__, __LINE__, false);
1817 : 0 : return true;
1818 : : }
1819 : : }
1820 : : }
1821 : : break;
1822 : : }
1823 : : default:;
1824 : : }
1825 : : }
1826 : : break;
1827 : : default:;
1828 : : }
1829 : 20280 : break;
1830 : : }
1831 : 12 : case BIT_NOT_EXPR:
1832 : 12 : {
1833 : 12 : tree _p0 = gimple_assign_rhs1 (_a1);
1834 : 12 : _p0 = do_valueize (valueize, _p0);
1835 : 12 : switch (TREE_CODE (_p0))
1836 : : {
1837 : 12 : case SSA_NAME:
1838 : 12 : if (gimple *_d2 = get_def (valueize, _p0))
1839 : : {
1840 : 12 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1841 : 12 : switch (gimple_assign_rhs_code (_a2))
1842 : : {
1843 : 12 : case BIT_XOR_EXPR:
1844 : 12 : {
1845 : 12 : tree _q20 = gimple_assign_rhs1 (_a2);
1846 : 12 : _q20 = do_valueize (valueize, _q20);
1847 : 12 : tree _q21 = gimple_assign_rhs2 (_a2);
1848 : 12 : _q21 = do_valueize (valueize, _q21);
1849 : 12 : if (tree_swap_operands_p (_q20, _q21))
1850 : 0 : std::swap (_q20, _q21);
1851 : 12 : switch (TREE_CODE (_q20))
1852 : : {
1853 : 12 : case SSA_NAME:
1854 : 12 : if (gimple *_d3 = get_def (valueize, _q20))
1855 : : {
1856 : 12 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1857 : 12 : switch (gimple_assign_rhs_code (_a3))
1858 : : {
1859 : 4 : CASE_CONVERT:
1860 : 4 : {
1861 : 4 : tree _q30 = gimple_assign_rhs1 (_a3);
1862 : 4 : _q30 = do_valueize (valueize, _q30);
1863 : 4 : switch (TREE_CODE (_q30))
1864 : : {
1865 : 4 : case SSA_NAME:
1866 : 4 : if (gimple *_d4 = get_def (valueize, _q30))
1867 : : {
1868 : 4 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
1869 : 4 : switch (gimple_assign_rhs_code (_a4))
1870 : : {
1871 : 4 : case LSHIFT_EXPR:
1872 : 4 : {
1873 : 4 : tree _q40 = gimple_assign_rhs1 (_a4);
1874 : 4 : _q40 = do_valueize (valueize, _q40);
1875 : 4 : tree _q41 = gimple_assign_rhs2 (_a4);
1876 : 4 : _q41 = do_valueize (valueize, _q41);
1877 : 4 : if (integer_onep (_q40))
1878 : : {
1879 : 4 : {
1880 : 4 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q41, _q21, _q40 };
1881 : 4 : {
1882 : 4 : res_ops[0] = captures[0];
1883 : 4 : res_ops[1] = captures[1];
1884 : 4 : res_ops[2] = captures[2];
1885 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 117, __FILE__, __LINE__, false);
1886 : 4 : return true;
1887 : : }
1888 : : }
1889 : : }
1890 : : break;
1891 : : }
1892 : : default:;
1893 : : }
1894 : : }
1895 : : break;
1896 : : default:;
1897 : : }
1898 : : break;
1899 : : }
1900 : 8 : case LSHIFT_EXPR:
1901 : 8 : {
1902 : 8 : tree _q30 = gimple_assign_rhs1 (_a3);
1903 : 8 : _q30 = do_valueize (valueize, _q30);
1904 : 8 : tree _q31 = gimple_assign_rhs2 (_a3);
1905 : 8 : _q31 = do_valueize (valueize, _q31);
1906 : 8 : if (integer_onep (_q30))
1907 : : {
1908 : 8 : {
1909 : 8 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _q21, _q30 };
1910 : 8 : {
1911 : 8 : res_ops[0] = captures[0];
1912 : 8 : res_ops[1] = captures[1];
1913 : 8 : res_ops[2] = captures[2];
1914 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 117, __FILE__, __LINE__, false);
1915 : 8 : return true;
1916 : : }
1917 : : }
1918 : : }
1919 : : break;
1920 : : }
1921 : : default:;
1922 : : }
1923 : : }
1924 : : break;
1925 : : default:;
1926 : : }
1927 : 0 : break;
1928 : : }
1929 : : default:;
1930 : : }
1931 : : }
1932 : : break;
1933 : 0 : default:;
1934 : : }
1935 : 0 : {
1936 : 0 : tree _p0_pops[1];
1937 : 0 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
1938 : : {
1939 : 0 : tree _q20 = _p0_pops[0];
1940 : 0 : switch (TREE_CODE (_q20))
1941 : : {
1942 : 0 : case SSA_NAME:
1943 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
1944 : : {
1945 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
1946 : 0 : switch (gimple_assign_rhs_code (_a2))
1947 : : {
1948 : 0 : case BIT_XOR_EXPR:
1949 : 0 : {
1950 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
1951 : 0 : _q30 = do_valueize (valueize, _q30);
1952 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
1953 : 0 : _q31 = do_valueize (valueize, _q31);
1954 : 0 : if (tree_swap_operands_p (_q30, _q31))
1955 : 0 : std::swap (_q30, _q31);
1956 : 0 : switch (TREE_CODE (_q30))
1957 : : {
1958 : 0 : case SSA_NAME:
1959 : 0 : if (gimple *_d3 = get_def (valueize, _q30))
1960 : : {
1961 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
1962 : 0 : switch (gimple_assign_rhs_code (_a3))
1963 : : {
1964 : 0 : CASE_CONVERT:
1965 : 0 : {
1966 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
1967 : 0 : _q40 = do_valueize (valueize, _q40);
1968 : 0 : switch (TREE_CODE (_q40))
1969 : : {
1970 : 0 : case SSA_NAME:
1971 : 0 : if (gimple *_d4 = get_def (valueize, _q40))
1972 : : {
1973 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
1974 : 0 : switch (gimple_assign_rhs_code (_a4))
1975 : : {
1976 : 0 : case LSHIFT_EXPR:
1977 : 0 : {
1978 : 0 : tree _q50 = gimple_assign_rhs1 (_a4);
1979 : 0 : _q50 = do_valueize (valueize, _q50);
1980 : 0 : tree _q51 = gimple_assign_rhs2 (_a4);
1981 : 0 : _q51 = do_valueize (valueize, _q51);
1982 : 0 : if (integer_onep (_q50))
1983 : : {
1984 : 0 : {
1985 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q51, _q31, _q50 };
1986 : 0 : {
1987 : 0 : res_ops[0] = captures[0];
1988 : 0 : res_ops[1] = captures[1];
1989 : 0 : res_ops[2] = captures[2];
1990 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 117, __FILE__, __LINE__, false);
1991 : 0 : return true;
1992 : : }
1993 : : }
1994 : : }
1995 : : break;
1996 : : }
1997 : : default:;
1998 : : }
1999 : : }
2000 : : break;
2001 : : default:;
2002 : : }
2003 : : break;
2004 : : }
2005 : 0 : case LSHIFT_EXPR:
2006 : 0 : {
2007 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
2008 : 0 : _q40 = do_valueize (valueize, _q40);
2009 : 0 : tree _q41 = gimple_assign_rhs2 (_a3);
2010 : 0 : _q41 = do_valueize (valueize, _q41);
2011 : 0 : if (integer_onep (_q40))
2012 : : {
2013 : 0 : {
2014 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q41, _q31, _q40 };
2015 : 0 : {
2016 : 0 : res_ops[0] = captures[0];
2017 : 0 : res_ops[1] = captures[1];
2018 : 0 : res_ops[2] = captures[2];
2019 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 117, __FILE__, __LINE__, false);
2020 : 0 : return true;
2021 : : }
2022 : : }
2023 : : }
2024 : : break;
2025 : : }
2026 : : default:;
2027 : : }
2028 : : }
2029 : : break;
2030 : : default:;
2031 : : }
2032 : 0 : break;
2033 : : }
2034 : : default:;
2035 : : }
2036 : : }
2037 : : break;
2038 : : default:;
2039 : : }
2040 : : }
2041 : : }
2042 : 0 : break;
2043 : : }
2044 : : default:;
2045 : : }
2046 : : }
2047 : : break;
2048 : : default:;
2049 : : }
2050 : : return false;
2051 : : }
2052 : :
2053 : : bool
2054 : 144867 : gimple_simplify_32 (gimple_match_op *res_op, gimple_seq *seq,
2055 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2056 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2057 : : const enum tree_code ARG_UNUSED (bitop))
2058 : : {
2059 : 144867 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2060 : 144867 : if (((TREE_CODE (captures[3]) == INTEGER_CST
2061 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2062 : 0 : && (int_fits_type_p (captures[3], TREE_TYPE (captures[1]))
2063 : 0 : || tree_nop_conversion_p (TREE_TYPE (captures[1]), type)))
2064 : 144867 : || types_match (captures[1], captures[3]))
2065 : 31648 : && !POINTER_TYPE_P (TREE_TYPE (captures[1]))
2066 : 26601 : && !VECTOR_TYPE_P (TREE_TYPE (captures[1]))
2067 : 26598 : && TREE_CODE (TREE_TYPE (captures[1])) != OFFSET_TYPE
2068 : : && (bitop != BIT_AND_EXPR ||
2069 : : 1
2070 : : )
2071 : 144867 : && (
2072 : 26598 : TYPE_PRECISION (TREE_TYPE (captures[1])) < TYPE_PRECISION (type)
2073 : 22859 : || (
2074 : : 1
2075 : 22859 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (type))
2076 : 20855 : || GET_MODE_CLASS (TYPE_MODE (type)) != MODE_INT
2077 : 20855 : || !type_has_mode_precision_p (type)
2078 : 20415 : || (
2079 : : 1
2080 : 20415 : && TREE_CODE (captures[3]) != INTEGER_CST
2081 : 20415 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
2082 : 0 : && single_use (captures[0])
2083 : 0 : && single_use (captures[2])))
2084 : : )
2085 : : {
2086 : 6183 : gimple_seq *lseq = seq;
2087 : 6183 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail651;
2088 : 6183 : {
2089 : 6183 : res_op->set_op (NOP_EXPR, type, 1);
2090 : 6183 : {
2091 : 6183 : tree _o1[2], _r1;
2092 : 6183 : _o1[0] = captures[1];
2093 : 6183 : {
2094 : 6183 : tree _o2[1], _r2;
2095 : 6183 : _o2[0] = captures[3];
2096 : 6183 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0]) /* XXX */
2097 : 6183 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
2098 : : {
2099 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
2100 : 0 : tem_op.resimplify (lseq, valueize);
2101 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2102 : 0 : if (!_r2) goto next_after_fail651;
2103 : : }
2104 : : else
2105 : : _r2 = _o2[0];
2106 : 6183 : _o1[1] = _r2;
2107 : : }
2108 : 6183 : (*res_op).set_op (bitop, TREE_TYPE (_o1[0]), 2);
2109 : 6183 : (*res_op).ops[0] = _o1[0];
2110 : 6183 : (*res_op).ops[1] = _o1[1];
2111 : 6183 : (*res_op).resimplify (lseq, valueize);
2112 : : }
2113 : 6183 : if (type != res_op->type
2114 : 6183 : && !useless_type_conversion_p (type, res_op->type))
2115 : : {
2116 : 6183 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail651;
2117 : 3595 : res_op->set_op (NOP_EXPR, type, 1);
2118 : 3595 : res_op->resimplify (lseq, valueize);
2119 : : }
2120 : 3595 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 149, __FILE__, __LINE__, true);
2121 : 3595 : return true;
2122 : : }
2123 : : next_after_fail651:;
2124 : : }
2125 : : return false;
2126 : : }
2127 : :
2128 : : bool
2129 : 0 : gimple_simplify_35 (gimple_match_op *res_op, gimple_seq *seq,
2130 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2131 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2132 : : const enum tree_code ARG_UNUSED (op))
2133 : : {
2134 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2135 : 0 : gimple_seq *lseq = seq;
2136 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail656;
2137 : 0 : {
2138 : 0 : tree tem;
2139 : 0 : tem = constant_boolean_node (true, type);
2140 : 0 : res_op->set_value (tem);
2141 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 153, __FILE__, __LINE__, true);
2142 : : return true;
2143 : : }
2144 : 0 : next_after_fail656:;
2145 : 0 : return false;
2146 : : }
2147 : :
2148 : : bool
2149 : 281 : gimple_simplify_38 (gimple_match_op *res_op, gimple_seq *seq,
2150 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2151 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2152 : : {
2153 : 281 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2154 : 281 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
2155 : : )
2156 : : {
2157 : 281 : gimple_seq *lseq = seq;
2158 : 281 : if (lseq
2159 : 71 : && (!single_use (captures[0])
2160 : 5 : || !single_use (captures[1])))
2161 : 276 : lseq = NULL;
2162 : 281 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail659;
2163 : 281 : {
2164 : 281 : res_op->set_op (BIT_NOT_EXPR, type, 1);
2165 : 281 : {
2166 : 281 : tree _o1[2], _r1;
2167 : 281 : {
2168 : 281 : tree _o2[1], _r2;
2169 : 281 : _o2[0] = captures[2];
2170 : 281 : if (type != TREE_TYPE (_o2[0]) /* XXX */
2171 : 281 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
2172 : : {
2173 : 281 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o2[0]);
2174 : 281 : tem_op.resimplify (lseq, valueize);
2175 : 281 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2176 : 281 : if (!_r2) goto next_after_fail659;
2177 : : }
2178 : : else
2179 : : _r2 = _o2[0];
2180 : 21 : _o1[0] = _r2;
2181 : : }
2182 : 21 : _o1[1] = captures[3];
2183 : 21 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2184 : 21 : tem_op.resimplify (lseq, valueize);
2185 : 21 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2186 : 21 : if (!_r1) goto next_after_fail659;
2187 : 5 : res_op->ops[0] = _r1;
2188 : : }
2189 : 5 : res_op->resimplify (lseq, valueize);
2190 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 145, __FILE__, __LINE__, true);
2191 : 5 : return true;
2192 : : }
2193 : : next_after_fail659:;
2194 : : }
2195 : : return false;
2196 : : }
2197 : :
2198 : : bool
2199 : 1 : gimple_simplify_41 (gimple_match_op *res_op, gimple_seq *seq,
2200 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2201 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2202 : : const enum tree_code ARG_UNUSED (op))
2203 : : {
2204 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2205 : 2 : if (INTEGRAL_TYPE_P (type)
2206 : 3 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[2])) == 0
2207 : : )
2208 : : {
2209 : 1 : {
2210 : 1 : tree t = type;
2211 : 1 : if (!TYPE_OVERFLOW_WRAPS (t))
2212 : 1 : t = unsigned_type_for (t);
2213 : 1 : wide_int c = wi::add (wi::to_wide (captures[3]), 1);
2214 : 1 : gimple_seq *lseq = seq;
2215 : 1 : if (lseq
2216 : 1 : && (!single_use (captures[0])
2217 : 1 : || !single_use (captures[1])))
2218 : 0 : lseq = NULL;
2219 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail662;
2220 : 1 : {
2221 : 1 : res_op->set_op (NOP_EXPR, type, 1);
2222 : 1 : {
2223 : 1 : tree _o1[2], _r1;
2224 : 1 : {
2225 : 1 : tree _o2[1], _r2;
2226 : 1 : _o2[0] = captures[2];
2227 : 1 : if (t != TREE_TYPE (_o2[0]) /* XXX */
2228 : 1 : && !useless_type_conversion_p (t, TREE_TYPE (_o2[0])))
2229 : : {
2230 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t, _o2[0]);
2231 : 1 : tem_op.resimplify (lseq, valueize);
2232 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2233 : 1 : if (!_r2) goto next_after_fail662;
2234 : : }
2235 : : else
2236 : : _r2 = _o2[0];
2237 : 1 : _o1[0] = _r2;
2238 : : }
2239 : 1 : _o1[1] = wide_int_to_tree (t, c);
2240 : 1 : (*res_op).set_op (MULT_EXPR, t, 2);
2241 : 1 : (*res_op).ops[0] = _o1[0];
2242 : 1 : (*res_op).ops[1] = _o1[1];
2243 : 1 : (*res_op).resimplify (lseq, valueize);
2244 : : }
2245 : 1 : if (type != res_op->type
2246 : 1 : && !useless_type_conversion_p (type, res_op->type))
2247 : : {
2248 : 1 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail662;
2249 : 1 : res_op->set_op (NOP_EXPR, type, 1);
2250 : 1 : res_op->resimplify (lseq, valueize);
2251 : : }
2252 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 158, __FILE__, __LINE__, true);
2253 : 1 : return true;
2254 : : }
2255 : 0 : next_after_fail662:;
2256 : 1 : }
2257 : : }
2258 : : return false;
2259 : : }
2260 : :
2261 : : bool
2262 : 0 : gimple_simplify_44 (gimple_match_op *res_op, gimple_seq *seq,
2263 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2264 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2265 : : const enum tree_code ARG_UNUSED (op))
2266 : : {
2267 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2268 : 0 : if (INTEGRAL_TYPE_P (type)
2269 : 0 : && tree_int_cst_sgn (captures[5]) > 0
2270 : 0 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[4])) == 0
2271 : : )
2272 : : {
2273 : 0 : {
2274 : 0 : tree t = type;
2275 : 0 : if (!TYPE_OVERFLOW_WRAPS (t))
2276 : 0 : t = unsigned_type_for (t);
2277 : 0 : wide_int wone = wi::one (TYPE_PRECISION (type));
2278 : 0 : wide_int c = wi::add (wi::to_wide (captures[3]),
2279 : 0 : wi::lshift (wone, wi::to_wide (captures[5])));
2280 : 0 : gimple_seq *lseq = seq;
2281 : 0 : if (lseq
2282 : 0 : && (!single_use (captures[0])
2283 : 0 : || !single_use (captures[1])
2284 : 0 : || !single_use (captures[4])))
2285 : 0 : lseq = NULL;
2286 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail666;
2287 : 0 : {
2288 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2289 : 0 : {
2290 : 0 : tree _o1[2], _r1;
2291 : 0 : {
2292 : 0 : tree _o2[1], _r2;
2293 : 0 : _o2[0] = captures[2];
2294 : 0 : if (t != TREE_TYPE (_o2[0]) /* XXX */
2295 : 0 : && !useless_type_conversion_p (t, TREE_TYPE (_o2[0])))
2296 : : {
2297 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t, _o2[0]);
2298 : 0 : tem_op.resimplify (lseq, valueize);
2299 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2300 : 0 : if (!_r2) goto next_after_fail666;
2301 : : }
2302 : : else
2303 : : _r2 = _o2[0];
2304 : 0 : _o1[0] = _r2;
2305 : : }
2306 : 0 : _o1[1] = wide_int_to_tree (t, c);
2307 : 0 : (*res_op).set_op (MULT_EXPR, t, 2);
2308 : 0 : (*res_op).ops[0] = _o1[0];
2309 : 0 : (*res_op).ops[1] = _o1[1];
2310 : 0 : (*res_op).resimplify (lseq, valueize);
2311 : : }
2312 : 0 : if (type != res_op->type
2313 : 0 : && !useless_type_conversion_p (type, res_op->type))
2314 : : {
2315 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail666;
2316 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2317 : 0 : res_op->resimplify (lseq, valueize);
2318 : : }
2319 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 157, __FILE__, __LINE__, true);
2320 : 0 : return true;
2321 : : }
2322 : 0 : next_after_fail666:;
2323 : 0 : }
2324 : : }
2325 : : return false;
2326 : : }
2327 : :
2328 : : bool
2329 : 18 : gimple_simplify_47 (gimple_match_op *res_op, gimple_seq *seq,
2330 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2331 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2332 : : const enum tree_code ARG_UNUSED (op))
2333 : : {
2334 : 18 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2335 : 36 : if (INTEGRAL_TYPE_P (type)
2336 : 18 : && tree_int_cst_sgn (captures[2]) > 0
2337 : 18 : && tree_int_cst_sgn (captures[4]) > 0
2338 : 72 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[3])) == 0
2339 : : )
2340 : : {
2341 : 15 : {
2342 : 15 : tree t = type;
2343 : 15 : if (!TYPE_OVERFLOW_WRAPS (t))
2344 : 3 : t = unsigned_type_for (t);
2345 : 15 : wide_int wone = wi::one (TYPE_PRECISION (t));
2346 : 30 : wide_int c = wi::add (wi::lshift (wone, wi::to_wide (captures[2])),
2347 : 30 : wi::lshift (wone, wi::to_wide (captures[4])));
2348 : 15 : gimple_seq *lseq = seq;
2349 : 15 : if (lseq
2350 : 11 : && (!single_use (captures[0])
2351 : 11 : || !single_use (captures[3])))
2352 : 4 : lseq = NULL;
2353 : 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail669;
2354 : 15 : {
2355 : 15 : res_op->set_op (NOP_EXPR, type, 1);
2356 : 15 : {
2357 : 15 : tree _o1[2], _r1;
2358 : 15 : {
2359 : 15 : tree _o2[1], _r2;
2360 : 15 : _o2[0] = captures[1];
2361 : 15 : if (t != TREE_TYPE (_o2[0]) /* XXX */
2362 : 15 : && !useless_type_conversion_p (t, TREE_TYPE (_o2[0])))
2363 : : {
2364 : 3 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t, _o2[0]);
2365 : 3 : tem_op.resimplify (lseq, valueize);
2366 : 3 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2367 : 3 : if (!_r2) goto next_after_fail669;
2368 : : }
2369 : : else
2370 : : _r2 = _o2[0];
2371 : 15 : _o1[0] = _r2;
2372 : : }
2373 : 15 : _o1[1] = wide_int_to_tree (t,c);
2374 : 15 : (*res_op).set_op (MULT_EXPR, t, 2);
2375 : 15 : (*res_op).ops[0] = _o1[0];
2376 : 15 : (*res_op).ops[1] = _o1[1];
2377 : 15 : (*res_op).resimplify (lseq, valueize);
2378 : : }
2379 : 15 : if (type != res_op->type
2380 : 15 : && !useless_type_conversion_p (type, res_op->type))
2381 : : {
2382 : 3 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail669;
2383 : 3 : res_op->set_op (NOP_EXPR, type, 1);
2384 : 3 : res_op->resimplify (lseq, valueize);
2385 : : }
2386 : 15 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 162, __FILE__, __LINE__, true);
2387 : 15 : return true;
2388 : : }
2389 : 0 : next_after_fail669:;
2390 : 15 : }
2391 : : }
2392 : : return false;
2393 : : }
2394 : :
2395 : : bool
2396 : 76 : gimple_simplify_50 (gimple_match_op *res_op, gimple_seq *seq,
2397 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2398 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2399 : : const enum tree_code ARG_UNUSED (cmp))
2400 : : {
2401 : 76 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2402 : 152 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2403 : 76 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
2404 : 152 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[3]))
2405 : : )
2406 : : {
2407 : 76 : gimple_seq *lseq = seq;
2408 : 76 : if (lseq
2409 : 32 : && (!single_use (captures[0])
2410 : 2 : || !single_use (captures[2])))
2411 : 75 : lseq = NULL;
2412 : 76 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail673;
2413 : 76 : {
2414 : 76 : res_op->set_op (LT_EXPR, type, 2);
2415 : 76 : {
2416 : 76 : tree _o1[2], _r1;
2417 : 76 : _o1[0] = captures[1];
2418 : 76 : _o1[1] = captures[3];
2419 : 76 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2420 : 76 : tem_op.resimplify (lseq, valueize);
2421 : 76 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2422 : 76 : if (!_r1) goto next_after_fail673;
2423 : 6 : res_op->ops[0] = _r1;
2424 : : }
2425 : 6 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
2426 : 6 : res_op->resimplify (lseq, valueize);
2427 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 166, __FILE__, __LINE__, true);
2428 : 6 : return true;
2429 : : }
2430 : : next_after_fail673:;
2431 : : }
2432 : : return false;
2433 : : }
2434 : :
2435 : : bool
2436 : 176 : gimple_simplify_53 (gimple_match_op *res_op, gimple_seq *seq,
2437 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2438 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2439 : : {
2440 : 176 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2441 : 176 : if (canonicalize_math_after_vectorization_p ()
2442 : 128 : && vectorized_internal_fn_supported_p (IFN_COND_NOT, type)
2443 : 0 : && is_truth_type_for (type, TREE_TYPE (captures[0]))
2444 : : )
2445 : : {
2446 : 0 : if (integer_all_onesp (captures[1]) && integer_zerop (captures[2])
2447 : : )
2448 : : {
2449 : 0 : gimple_seq *lseq = seq;
2450 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail677;
2451 : 0 : {
2452 : 0 : res_op->set_op (CFN_COND_NOT, type, 3);
2453 : 0 : res_op->ops[0] = captures[0];
2454 : 0 : res_op->ops[1] = captures[3];
2455 : 0 : res_op->ops[2] = captures[3];
2456 : 0 : res_op->resimplify (lseq, valueize);
2457 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 170, __FILE__, __LINE__, true);
2458 : 0 : return true;
2459 : : }
2460 : 0 : next_after_fail677:;
2461 : : }
2462 : : }
2463 : : else
2464 : : {
2465 : 176 : if (integer_all_onesp (captures[2]) && integer_zerop (captures[1])
2466 : : )
2467 : : {
2468 : 0 : gimple_seq *lseq = seq;
2469 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail678;
2470 : 0 : {
2471 : 0 : res_op->set_op (CFN_COND_NOT, type, 3);
2472 : 0 : {
2473 : 0 : tree _o1[1], _r1;
2474 : 0 : _o1[0] = captures[0];
2475 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2476 : 0 : tem_op.resimplify (lseq, valueize);
2477 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2478 : 0 : if (!_r1) goto next_after_fail678;
2479 : 0 : res_op->ops[0] = _r1;
2480 : : }
2481 : 0 : res_op->ops[1] = captures[3];
2482 : 0 : res_op->ops[2] = captures[3];
2483 : 0 : res_op->resimplify (lseq, valueize);
2484 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 171, __FILE__, __LINE__, true);
2485 : 0 : return true;
2486 : : }
2487 : : next_after_fail678:;
2488 : : }
2489 : : }
2490 : : return false;
2491 : : }
2492 : :
2493 : : bool
2494 : 28 : gimple_simplify_56 (gimple_match_op *res_op, gimple_seq *seq,
2495 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2496 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2497 : : {
2498 : 28 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2499 : 28 : if (ANY_INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_UNDEFINED (type)
2500 : : )
2501 : : {
2502 : 12 : gimple_seq *lseq = seq;
2503 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail682;
2504 : 12 : {
2505 : 12 : res_op->set_op (ABS_EXPR, type, 1);
2506 : 12 : res_op->ops[0] = captures[0];
2507 : 12 : res_op->resimplify (lseq, valueize);
2508 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 175, __FILE__, __LINE__, true);
2509 : 12 : return true;
2510 : : }
2511 : 0 : next_after_fail682:;
2512 : : }
2513 : : return false;
2514 : : }
2515 : :
2516 : : bool
2517 : 40345 : gimple_simplify_59 (gimple_match_op *res_op, gimple_seq *seq,
2518 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2519 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2520 : : {
2521 : 40345 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2522 : 26 : if (ANY_INTEGRAL_TYPE_P (type)
2523 : 40345 : && TYPE_OVERFLOW_WRAPS (type)
2524 : 47830 : && !integer_all_onesp (captures[1])
2525 : : )
2526 : : {
2527 : 7407 : gimple_seq *lseq = seq;
2528 : 7407 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail685;
2529 : 7407 : {
2530 : 7407 : res_op->set_op (PLUS_EXPR, type, 2);
2531 : 7407 : {
2532 : 7407 : tree _o1[2], _r1;
2533 : 7407 : _o1[0] = captures[1];
2534 : 7407 : _o1[1] = captures[0];
2535 : 7407 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2536 : 7407 : tem_op.resimplify (lseq, valueize);
2537 : 7407 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2538 : 7407 : if (!_r1) goto next_after_fail685;
2539 : 5787 : res_op->ops[0] = _r1;
2540 : : }
2541 : 5787 : res_op->ops[1] = build_minus_one_cst (type);
2542 : 5787 : res_op->resimplify (lseq, valueize);
2543 : 5787 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 178, __FILE__, __LINE__, true);
2544 : 5787 : return true;
2545 : : }
2546 : : next_after_fail685:;
2547 : : }
2548 : : else
2549 : : {
2550 : 65876 : if (INTEGRAL_TYPE_P (type)
2551 : 32933 : && TREE_CODE (captures[1]) == INTEGER_CST
2552 : 98809 : && wi::to_wide (captures[1]) != wi::min_value (TYPE_PRECISION (type),
2553 : : SIGNED)
2554 : : )
2555 : : {
2556 : 371 : gimple_seq *lseq = seq;
2557 : 371 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail686;
2558 : 371 : {
2559 : 371 : res_op->set_op (MINUS_EXPR, type, 2);
2560 : 371 : {
2561 : 371 : tree _o1[2], _r1;
2562 : 371 : _o1[0] = captures[1];
2563 : 371 : _o1[1] = build_minus_one_cst (type);
2564 : 371 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2565 : 371 : tem_op.resimplify (lseq, valueize);
2566 : 371 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2567 : 371 : if (!_r1) goto next_after_fail686;
2568 : 371 : res_op->ops[0] = _r1;
2569 : : }
2570 : 371 : res_op->ops[1] = captures[0];
2571 : 371 : res_op->resimplify (lseq, valueize);
2572 : 371 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 179, __FILE__, __LINE__, true);
2573 : 371 : return true;
2574 : : }
2575 : : next_after_fail686:;
2576 : : }
2577 : : }
2578 : : return false;
2579 : : }
2580 : :
2581 : : bool
2582 : 9 : gimple_simplify_62 (gimple_match_op *res_op, gimple_seq *seq,
2583 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2584 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2585 : : {
2586 : 9 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2587 : 9 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
2588 : 9 : && !TYPE_SATURATING (type) && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
2589 : 9 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[0]))
2590 : 18 : && !TYPE_SATURATING (TREE_TYPE (captures[0]))
2591 : : )
2592 : : {
2593 : 9 : gimple_seq *lseq = seq;
2594 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail689;
2595 : 9 : {
2596 : 9 : res_op->set_op (BIT_NOT_EXPR, type, 1);
2597 : 9 : {
2598 : 9 : tree _r1;
2599 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
2600 : 9 : {
2601 : 9 : tree _o2[2], _r2;
2602 : 9 : _o2[0] = captures[1];
2603 : 9 : _o2[1] = captures[2];
2604 : 9 : tem_op.set_op (BIT_XOR_EXPR, TREE_TYPE (_o2[0]), 2);
2605 : 9 : tem_op.ops[0] = _o2[0];
2606 : 9 : tem_op.ops[1] = _o2[1];
2607 : 9 : tem_op.resimplify (lseq, valueize);
2608 : : }
2609 : 9 : if (type != tem_op.type
2610 : 9 : && !useless_type_conversion_p (type, tem_op.type))
2611 : : {
2612 : 7 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2613 : 8 : if (!_r1) goto next_after_fail689;
2614 : 4 : tem_op.set_op (NOP_EXPR, type, 1);
2615 : 4 : tem_op.ops[0] = _r1;
2616 : 4 : tem_op.resimplify (lseq, valueize);
2617 : : }
2618 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2619 : 6 : if (!_r1) goto next_after_fail689;
2620 : 5 : res_op->ops[0] = _r1;
2621 : : }
2622 : 5 : res_op->resimplify (lseq, valueize);
2623 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 182, __FILE__, __LINE__, true);
2624 : 5 : return true;
2625 : : }
2626 : : next_after_fail689:;
2627 : : }
2628 : : return false;
2629 : : }
2630 : :
2631 : : bool
2632 : 38561 : gimple_simplify_66 (gimple_match_op *res_op, gimple_seq *seq,
2633 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2634 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2635 : : const enum tree_code ARG_UNUSED (outer_op))
2636 : : {
2637 : 38561 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2638 : 38561 : if (!TYPE_SATURATING (type)
2639 : : )
2640 : : {
2641 : 38561 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
2642 : 75940 : && !FIXED_POINT_TYPE_P (type)
2643 : : )
2644 : : {
2645 : 37379 : if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type)
2646 : : )
2647 : : {
2648 : 22637 : if (!CONSTANT_CLASS_P (captures[1])
2649 : : )
2650 : : {
2651 : 22637 : gimple_seq *lseq = seq;
2652 : 22637 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail699;
2653 : 22637 : {
2654 : 22637 : res_op->set_op (MINUS_EXPR, type, 2);
2655 : 22637 : {
2656 : 22637 : tree _o1[2], _r1;
2657 : 22637 : {
2658 : 22637 : tree _o2[1], _r2;
2659 : 22637 : _o2[0] = captures[0];
2660 : 22637 : if (type != TREE_TYPE (_o2[0]) /* XXX */
2661 : 22637 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
2662 : : {
2663 : 2585 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o2[0]);
2664 : 2585 : tem_op.resimplify (lseq, valueize);
2665 : 2585 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2666 : 2585 : if (!_r2) goto next_after_fail699;
2667 : : }
2668 : : else
2669 : : _r2 = _o2[0];
2670 : 22637 : _o1[0] = _r2;
2671 : : }
2672 : 22637 : _o1[1] = captures[2];
2673 : 22637 : gimple_match_op tem_op (res_op->cond.any_else (), outer_op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2674 : 22637 : tem_op.resimplify (NULL, valueize);
2675 : 22637 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
2676 : 22637 : if (!_r1) goto next_after_fail699;
2677 : 22637 : res_op->ops[0] = _r1;
2678 : : }
2679 : 22637 : {
2680 : 22637 : tree _o1[1], _r1;
2681 : 22637 : _o1[0] = captures[1];
2682 : 22637 : if (type != TREE_TYPE (_o1[0]) /* XXX */
2683 : 22637 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2684 : : {
2685 : 2585 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
2686 : 2585 : tem_op.resimplify (lseq, valueize);
2687 : 2585 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2688 : 2585 : if (!_r1) goto next_after_fail699;
2689 : : }
2690 : : else
2691 : : _r1 = _o1[0];
2692 : 21870 : res_op->ops[1] = _r1;
2693 : : }
2694 : 21870 : res_op->resimplify (lseq, valueize);
2695 : 21870 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 192, __FILE__, __LINE__, true);
2696 : 21870 : return true;
2697 : : }
2698 : : next_after_fail699:;
2699 : : }
2700 : : }
2701 : : else
2702 : : {
2703 : 29484 : if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2704 : 29484 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
2705 : : )
2706 : : {
2707 : 412 : gimple_seq *lseq = seq;
2708 : 412 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail700;
2709 : 412 : {
2710 : 412 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
2711 : 412 : {
2712 : 412 : tree _o1[2], _r1;
2713 : 412 : {
2714 : 412 : tree _o2[2], _r2;
2715 : 412 : _o2[0] = captures[0];
2716 : 412 : {
2717 : 412 : tree _o3[1], _r3;
2718 : 412 : _o3[0] = captures[2];
2719 : 412 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o3[0]) /* XXX */
2720 : 412 : && !useless_type_conversion_p (TREE_TYPE (_o2[0]), TREE_TYPE (_o3[0])))
2721 : : {
2722 : 412 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
2723 : 412 : tem_op.resimplify (lseq, valueize);
2724 : 412 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2725 : 412 : if (!_r3) goto next_after_fail700;
2726 : : }
2727 : : else
2728 : : _r3 = _o3[0];
2729 : 412 : _o2[1] = _r3;
2730 : : }
2731 : 412 : gimple_match_op tem_op (res_op->cond.any_else (), outer_op, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2732 : 412 : tem_op.resimplify (NULL, valueize);
2733 : 412 : _r2 = maybe_push_res_to_seq (&tem_op, NULL);
2734 : 412 : if (!_r2) goto next_after_fail700;
2735 : 412 : _o1[0] = _r2;
2736 : : }
2737 : 412 : _o1[1] = captures[1];
2738 : 412 : (*res_op).set_op (MINUS_EXPR, TREE_TYPE (_o1[0]), 2);
2739 : 412 : (*res_op).ops[0] = _o1[0];
2740 : 412 : (*res_op).ops[1] = _o1[1];
2741 : 412 : (*res_op).resimplify (lseq, valueize);
2742 : : }
2743 : 412 : if (type != res_op->type
2744 : 412 : && !useless_type_conversion_p (type, res_op->type))
2745 : : {
2746 : 412 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail700;
2747 : 132 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
2748 : 132 : res_op->resimplify (lseq, valueize);
2749 : : }
2750 : 132 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 193, __FILE__, __LINE__, true);
2751 : 132 : return true;
2752 : : }
2753 : : next_after_fail700:;
2754 : : }
2755 : : else
2756 : : {
2757 : 14330 : if (types_match (type, captures[1]) && !TYPE_OVERFLOW_SANITIZED (type)
2758 : : )
2759 : : {
2760 : 14323 : {
2761 : 14323 : tree cst = const_binop (outer_op, type, captures[0], captures[2]);
2762 : 14323 : if (cst && !TREE_OVERFLOW (cst)
2763 : : )
2764 : : {
2765 : 14125 : gimple_seq *lseq = seq;
2766 : 14125 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail701;
2767 : 14125 : {
2768 : 14125 : res_op->set_op (MINUS_EXPR, type, 2);
2769 : 14125 : res_op->ops[0] = cst;
2770 : 14125 : res_op->ops[1] = captures[1];
2771 : 14125 : res_op->resimplify (lseq, valueize);
2772 : 14125 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 194, __FILE__, __LINE__, true);
2773 : 14125 : return true;
2774 : : }
2775 : 0 : next_after_fail701:;
2776 : : }
2777 : : }
2778 : : }
2779 : : }
2780 : : }
2781 : : }
2782 : : }
2783 : : return false;
2784 : : }
2785 : :
2786 : : bool
2787 : 1469061 : gimple_simplify_71 (gimple_match_op *res_op, gimple_seq *seq,
2788 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2789 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2790 : : const enum tree_code ARG_UNUSED (op))
2791 : : {
2792 : 1469061 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2793 : 1469061 : if (!TYPE_SATURATING (type)
2794 : : )
2795 : : {
2796 : 1469061 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
2797 : 2910773 : && !FIXED_POINT_TYPE_P (type)
2798 : : )
2799 : : {
2800 : 1441712 : if (INTEGRAL_TYPE_P (type)
2801 : 1441526 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2802 : 1287623 : && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
2803 : 1021993 : && types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
2804 : 982429 : && !TYPE_OVERFLOW_TRAPS (type)
2805 : 2424141 : && !TYPE_OVERFLOW_SANITIZED (type)
2806 : : )
2807 : : {
2808 : 982429 : gimple_seq *lseq = seq;
2809 : 982429 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail706;
2810 : 982429 : {
2811 : 982429 : res_op->set_op (NOP_EXPR, type, 1);
2812 : 982429 : {
2813 : 982429 : tree _o1[2], _r1;
2814 : 982429 : _o1[0] = captures[0];
2815 : 982429 : _o1[1] = captures[1];
2816 : 982429 : (*res_op).set_op (op, TREE_TYPE (_o1[0]), 2);
2817 : 982429 : (*res_op).ops[0] = _o1[0];
2818 : 982429 : (*res_op).ops[1] = _o1[1];
2819 : 982429 : (*res_op).resimplify (NULL, valueize);
2820 : : }
2821 : 982429 : if (type != res_op->type
2822 : 982429 : && !useless_type_conversion_p (type, res_op->type))
2823 : : {
2824 : 982429 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, NULL))) goto next_after_fail706;
2825 : 40555 : res_op->set_op (NOP_EXPR, type, 1);
2826 : 40555 : res_op->resimplify (lseq, valueize);
2827 : : }
2828 : 40555 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 199, __FILE__, __LINE__, true);
2829 : 40555 : return true;
2830 : : }
2831 : : next_after_fail706:;
2832 : : }
2833 : : }
2834 : : }
2835 : : return false;
2836 : : }
2837 : :
2838 : : bool
2839 : 366 : gimple_simplify_73 (gimple_match_op *res_op, gimple_seq *seq,
2840 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2841 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2842 : : {
2843 : 366 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2844 : 366 : if (!TYPE_SATURATING (type)
2845 : : )
2846 : : {
2847 : 366 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
2848 : 732 : && !FIXED_POINT_TYPE_P (type)
2849 : : )
2850 : : {
2851 : 366 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
2852 : : )
2853 : : {
2854 : 223 : gimple_seq *lseq = seq;
2855 : 223 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail708;
2856 : 223 : {
2857 : 223 : res_op->set_op (NEGATE_EXPR, type, 1);
2858 : 223 : {
2859 : 223 : tree _o1[1], _r1;
2860 : 223 : _o1[0] = captures[0];
2861 : 223 : if (type != TREE_TYPE (_o1[0]) /* XXX */
2862 : 223 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2863 : : {
2864 : 129 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
2865 : 129 : tem_op.resimplify (lseq, valueize);
2866 : 129 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2867 : 129 : if (!_r1) goto next_after_fail708;
2868 : : }
2869 : : else
2870 : : _r1 = _o1[0];
2871 : 152 : res_op->ops[0] = _r1;
2872 : : }
2873 : 152 : res_op->resimplify (lseq, valueize);
2874 : 152 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 201, __FILE__, __LINE__, true);
2875 : 152 : return true;
2876 : : }
2877 : : next_after_fail708:;
2878 : : }
2879 : : }
2880 : : }
2881 : : return false;
2882 : : }
2883 : :
2884 : : bool
2885 : 51743 : gimple_simplify_75 (gimple_match_op *res_op, gimple_seq *seq,
2886 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2887 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2888 : : const enum tree_code ARG_UNUSED (plusminus))
2889 : : {
2890 : 51743 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2891 : 51743 : if (!TYPE_SATURATING (type)
2892 : 51743 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
2893 : : )
2894 : : {
2895 : 43522 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
2896 : : )
2897 : : {
2898 : 126 : if ((!ANY_INTEGRAL_TYPE_P (type)
2899 : 43504 : || TYPE_OVERFLOW_WRAPS (type)
2900 : 26449 : || (INTEGRAL_TYPE_P (type)
2901 : 26349 : && ((tree_expr_nonzero_p (captures[0])
2902 : 1280 : && expr_not_equal_to (captures[0],
2903 : 44802 : wi::minus_one (TYPE_PRECISION (type))))
2904 : 7265 : || (plusminus == PLUS_EXPR
2905 : 25718 : ? expr_not_equal_to (captures[2],
2906 : 50787 : wi::max_value (TYPE_PRECISION (type), SIGNED))
2907 : 18453 : : (expr_not_equal_to (captures[2],
2908 : 61975 : wi::min_value (TYPE_PRECISION (type), SIGNED))
2909 : 836 : && expr_not_equal_to (captures[2],
2910 : 1672 : wi::min_value (TYPE_PRECISION (type), SIGNED)
2911 : 46030 : + 1))))))
2912 : 89856 : && single_use (captures[1])
2913 : : )
2914 : : {
2915 : 4620 : gimple_seq *lseq = seq;
2916 : 4620 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail711;
2917 : 4620 : {
2918 : 4620 : res_op->set_op (MULT_EXPR, type, 2);
2919 : 4620 : {
2920 : 4620 : tree _o1[2], _r1;
2921 : 4620 : _o1[0] = build_one_cst (type);
2922 : 4620 : _o1[1] = captures[2];
2923 : 4620 : gimple_match_op tem_op (res_op->cond.any_else (), plusminus, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2924 : 4620 : tem_op.resimplify (lseq, valueize);
2925 : 4620 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2926 : 4620 : if (!_r1) goto next_after_fail711;
2927 : 2055 : res_op->ops[0] = _r1;
2928 : : }
2929 : 2055 : res_op->ops[1] = captures[0];
2930 : 2055 : res_op->resimplify (lseq, valueize);
2931 : 2055 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 204, __FILE__, __LINE__, true);
2932 : 2055 : return true;
2933 : : }
2934 : : next_after_fail711:;
2935 : : }
2936 : : }
2937 : : }
2938 : : return false;
2939 : : }
2940 : :
2941 : : bool
2942 : 209270 : gimple_simplify_76 (gimple_match_op *res_op, gimple_seq *seq,
2943 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2944 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2945 : : const enum tree_code ARG_UNUSED (plusminus))
2946 : : {
2947 : 209270 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2948 : 209270 : if (!TYPE_SATURATING (type)
2949 : 209270 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
2950 : : )
2951 : : {
2952 : 204888 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
2953 : : )
2954 : : {
2955 : 41 : if ((!ANY_INTEGRAL_TYPE_P (type)
2956 : 204861 : || TYPE_OVERFLOW_WRAPS (type)
2957 : 90627 : || (INTEGRAL_TYPE_P (type)
2958 : 90625 : && ((tree_expr_nonzero_p (captures[1])
2959 : 49336 : && (plusminus == MINUS_EXPR
2960 : 44084 : || expr_not_equal_to (captures[1],
2961 : 248972 : wi::minus_one (TYPE_PRECISION (type)))))
2962 : 41512 : || expr_not_equal_to (captures[2],
2963 : : (plusminus == PLUS_EXPR
2964 : 246400 : ? wi::max_value (TYPE_PRECISION (type), SIGNED)
2965 : 38630 : : wi::min_value (TYPE_PRECISION (type), SIGNED))))))
2966 : 383641 : && single_use (captures[0])
2967 : : )
2968 : : {
2969 : 76721 : gimple_seq *lseq = seq;
2970 : 76721 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail712;
2971 : 76721 : {
2972 : 76721 : res_op->set_op (MULT_EXPR, type, 2);
2973 : 76721 : {
2974 : 76721 : tree _o1[2], _r1;
2975 : 76721 : _o1[0] = captures[2];
2976 : 76721 : _o1[1] = build_one_cst (type);
2977 : 76721 : gimple_match_op tem_op (res_op->cond.any_else (), plusminus, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2978 : 76721 : tem_op.resimplify (lseq, valueize);
2979 : 76721 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2980 : 76721 : if (!_r1) goto next_after_fail712;
2981 : 21520 : res_op->ops[0] = _r1;
2982 : : }
2983 : 21520 : res_op->ops[1] = captures[1];
2984 : 21520 : res_op->resimplify (lseq, valueize);
2985 : 21520 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 205, __FILE__, __LINE__, true);
2986 : 21520 : return true;
2987 : : }
2988 : : next_after_fail712:;
2989 : : }
2990 : : }
2991 : : }
2992 : : return false;
2993 : : }
2994 : :
2995 : : bool
2996 : 92 : gimple_simplify_79 (gimple_match_op *res_op, gimple_seq *seq,
2997 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2998 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2999 : : const enum tree_code ARG_UNUSED (div),
3000 : : const enum tree_code ARG_UNUSED (mod))
3001 : : {
3002 : 92 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3003 : 92 : gimple_seq *lseq = seq;
3004 : 92 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail715;
3005 : 92 : {
3006 : 92 : tree tem;
3007 : 92 : tem = captures[0];
3008 : 92 : res_op->set_value (tem);
3009 : 92 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 208, __FILE__, __LINE__, true);
3010 : : return true;
3011 : : }
3012 : 0 : next_after_fail715:;
3013 : 0 : return false;
3014 : : }
3015 : :
3016 : : bool
3017 : 1207 : gimple_simplify_82 (gimple_match_op *res_op, gimple_seq *seq,
3018 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3019 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3020 : : const enum tree_code ARG_UNUSED (op))
3021 : : {
3022 : 1207 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3023 : 1207 : if (flag_unsafe_math_optimizations
3024 : : )
3025 : : {
3026 : 6 : gimple_seq *lseq = seq;
3027 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail719;
3028 : 6 : {
3029 : 6 : res_op->set_op (RDIV_EXPR, type, 2);
3030 : 6 : {
3031 : 6 : tree _o1[2], _r1;
3032 : 6 : _o1[0] = captures[0];
3033 : 6 : _o1[1] = captures[2];
3034 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3035 : 6 : tem_op.resimplify (lseq, valueize);
3036 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3037 : 6 : if (!_r1) goto next_after_fail719;
3038 : 4 : res_op->ops[0] = _r1;
3039 : : }
3040 : 4 : res_op->ops[1] = captures[1];
3041 : 4 : res_op->resimplify (lseq, valueize);
3042 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 212, __FILE__, __LINE__, true);
3043 : 4 : return true;
3044 : : }
3045 : : next_after_fail719:;
3046 : : }
3047 : : return false;
3048 : : }
3049 : :
3050 : : bool
3051 : 596 : gimple_simplify_84 (gimple_match_op *res_op, gimple_seq *seq,
3052 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3053 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3054 : : const combined_fn ARG_UNUSED (POPCOUNT))
3055 : : {
3056 : 596 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3057 : 1192 : if (INTEGRAL_TYPE_P (type)
3058 : 2980 : && (wi::bit_and (widest_int::from (tree_nonzero_bits (captures[1]), UNSIGNED),
3059 : 2384 : widest_int::from (tree_nonzero_bits (captures[3]), UNSIGNED))
3060 : 1788 : == 0)
3061 : : )
3062 : : {
3063 : 3 : {
3064 : 3 : tree utype = TREE_TYPE (captures[1]);
3065 : 3 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
3066 : 2 : utype = TREE_TYPE (captures[3]);
3067 : 3 : gimple_seq *lseq = seq;
3068 : 3 : if (lseq
3069 : 2 : && (!single_use (captures[0])
3070 : 2 : || !single_use (captures[2])))
3071 : 1 : lseq = NULL;
3072 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail721;
3073 : 3 : {
3074 : 3 : res_op->set_op (POPCOUNT, type, 1);
3075 : 3 : {
3076 : 3 : tree _o1[2], _r1;
3077 : 3 : {
3078 : 3 : tree _o2[1], _r2;
3079 : 3 : _o2[0] = captures[1];
3080 : 3 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
3081 : 3 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
3082 : : {
3083 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
3084 : 2 : tem_op.resimplify (lseq, valueize);
3085 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3086 : 2 : if (!_r2) goto next_after_fail721;
3087 : : }
3088 : : else
3089 : : _r2 = _o2[0];
3090 : 2 : _o1[0] = _r2;
3091 : : }
3092 : 2 : {
3093 : 2 : tree _o2[1], _r2;
3094 : 2 : _o2[0] = captures[3];
3095 : 2 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
3096 : 2 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
3097 : : {
3098 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
3099 : 1 : tem_op.resimplify (lseq, valueize);
3100 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3101 : 1 : if (!_r2) goto next_after_fail721;
3102 : : }
3103 : : else
3104 : : _r2 = _o2[0];
3105 : 2 : _o1[1] = _r2;
3106 : : }
3107 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3108 : 2 : tem_op.resimplify (lseq, valueize);
3109 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3110 : 2 : if (!_r1) goto next_after_fail721;
3111 : 2 : res_op->ops[0] = _r1;
3112 : : }
3113 : 2 : res_op->resimplify (lseq, valueize);
3114 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 214, __FILE__, __LINE__, true);
3115 : 2 : return true;
3116 : : }
3117 : : next_after_fail721:;
3118 : : }
3119 : : }
3120 : : return false;
3121 : : }
3122 : :
3123 : : bool
3124 : 1402 : gimple_simplify_90 (gimple_match_op *res_op, gimple_seq *seq,
3125 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3126 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3127 : : {
3128 : 1402 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3129 : 1402 : if (INTEGRAL_TYPE_P (type)
3130 : 1402 : || (VECTOR_INTEGER_TYPE_P (type)
3131 : : && ((optimize_vectors_before_lowering_p ()
3132 : 0 : && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST)
3133 : 0 : || target_supports_op_p (type, TRUNC_MOD_EXPR,
3134 : : optab_vector)))
3135 : : )
3136 : : {
3137 : 1402 : gimple_seq *lseq = seq;
3138 : 1402 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail727;
3139 : 1402 : {
3140 : 1402 : res_op->set_op (NOP_EXPR, type, 1);
3141 : 1402 : {
3142 : 1402 : tree _o1[2], _r1;
3143 : 1402 : _o1[0] = captures[0];
3144 : 1402 : _o1[1] = captures[1];
3145 : 1402 : (*res_op).set_op (TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), 2);
3146 : 1402 : (*res_op).ops[0] = _o1[0];
3147 : 1402 : (*res_op).ops[1] = _o1[1];
3148 : 1402 : (*res_op).resimplify (lseq, valueize);
3149 : : }
3150 : 1402 : if (type != res_op->type
3151 : 1402 : && !useless_type_conversion_p (type, res_op->type))
3152 : : {
3153 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail727;
3154 : 0 : res_op->set_op (NOP_EXPR, type, 1);
3155 : 0 : res_op->resimplify (lseq, valueize);
3156 : : }
3157 : 1402 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 220, __FILE__, __LINE__, true);
3158 : 1402 : return true;
3159 : : }
3160 : : next_after_fail727:;
3161 : : }
3162 : : return false;
3163 : : }
3164 : :
3165 : : bool
3166 : 20 : gimple_simplify_94 (gimple_match_op *res_op, gimple_seq *seq,
3167 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3168 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3169 : : {
3170 : 20 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3171 : 20 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
3172 : 20 : && !TYPE_SATURATING (type) && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
3173 : 20 : && !TYPE_OVERFLOW_TRAPS (TREE_TYPE (captures[2]))
3174 : 40 : && !TYPE_SATURATING (TREE_TYPE (captures[2]))
3175 : : )
3176 : : {
3177 : 20 : gimple_seq *lseq = seq;
3178 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail731;
3179 : 20 : {
3180 : 20 : res_op->set_op (BIT_NOT_EXPR, type, 1);
3181 : 20 : {
3182 : 20 : tree _r1;
3183 : 20 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
3184 : 20 : {
3185 : 20 : tree _o2[2], _r2;
3186 : 20 : _o2[0] = captures[0];
3187 : 20 : _o2[1] = captures[1];
3188 : 20 : tem_op.set_op (BIT_XOR_EXPR, TREE_TYPE (_o2[0]), 2);
3189 : 20 : tem_op.ops[0] = _o2[0];
3190 : 20 : tem_op.ops[1] = _o2[1];
3191 : 20 : tem_op.resimplify (lseq, valueize);
3192 : : }
3193 : 20 : if (type != tem_op.type
3194 : 20 : && !useless_type_conversion_p (type, tem_op.type))
3195 : : {
3196 : 11 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3197 : 16 : if (!_r1) goto next_after_fail731;
3198 : 6 : tem_op.set_op (NOP_EXPR, type, 1);
3199 : 6 : tem_op.ops[0] = _r1;
3200 : 6 : tem_op.resimplify (lseq, valueize);
3201 : : }
3202 : 15 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3203 : 15 : if (!_r1) goto next_after_fail731;
3204 : 10 : res_op->ops[0] = _r1;
3205 : : }
3206 : 10 : res_op->resimplify (lseq, valueize);
3207 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 224, __FILE__, __LINE__, true);
3208 : 10 : return true;
3209 : : }
3210 : : next_after_fail731:;
3211 : : }
3212 : : return false;
3213 : : }
3214 : :
3215 : : bool
3216 : 2854 : gimple_simplify_98 (gimple_match_op *res_op, gimple_seq *seq,
3217 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3218 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3219 : : {
3220 : 2854 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3221 : 2854 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
3222 : 2854 : && tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
3223 : : )
3224 : : {
3225 : 2854 : gimple_seq *lseq = seq;
3226 : 2854 : if (lseq
3227 : 2066 : && (!single_use (captures[1])
3228 : 1760 : || !single_use (captures[2])))
3229 : 1094 : lseq = NULL;
3230 : 2854 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail735;
3231 : 2854 : {
3232 : 2854 : res_op->set_op (NOP_EXPR, type, 1);
3233 : 2854 : {
3234 : 2854 : tree _o1[2], _r1;
3235 : 2854 : {
3236 : 2854 : tree _o2[1], _r2;
3237 : 2854 : _o2[0] = captures[3];
3238 : 2854 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
3239 : 2854 : tem_op.resimplify (lseq, valueize);
3240 : 2854 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3241 : 2854 : if (!_r2) goto next_after_fail735;
3242 : 2562 : _o1[0] = _r2;
3243 : : }
3244 : 2562 : _o1[1] = captures[0];
3245 : 2562 : (*res_op).set_op (BIT_AND_EXPR, TREE_TYPE (_o1[0]), 2);
3246 : 2562 : (*res_op).ops[0] = _o1[0];
3247 : 2562 : (*res_op).ops[1] = _o1[1];
3248 : 2562 : (*res_op).resimplify (lseq, valueize);
3249 : : }
3250 : 2562 : if (type != res_op->type
3251 : 2562 : && !useless_type_conversion_p (type, res_op->type))
3252 : : {
3253 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail735;
3254 : 0 : res_op->set_op (NOP_EXPR, type, 1);
3255 : 0 : res_op->resimplify (lseq, valueize);
3256 : : }
3257 : 2562 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 227, __FILE__, __LINE__, true);
3258 : 2562 : return true;
3259 : : }
3260 : : next_after_fail735:;
3261 : : }
3262 : : return false;
3263 : : }
3264 : :
3265 : : bool
3266 : 3184 : gimple_simplify_103 (gimple_match_op *res_op, gimple_seq *seq,
3267 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3268 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3269 : : {
3270 : 3184 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3271 : 3184 : if (!TYPE_SATURATING (type)
3272 : : )
3273 : : {
3274 : 3184 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
3275 : 5754 : && !FIXED_POINT_TYPE_P (type)
3276 : : )
3277 : : {
3278 : 2570 : gimple_seq *lseq = seq;
3279 : 2570 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail742;
3280 : 2570 : {
3281 : 2570 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
3282 : 2570 : res_op->ops[0] = captures[1];
3283 : 2570 : res_op->resimplify (lseq, valueize);
3284 : 2570 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 234, __FILE__, __LINE__, true);
3285 : 2570 : return true;
3286 : : }
3287 : 0 : next_after_fail742:;
3288 : : }
3289 : : }
3290 : : return false;
3291 : : }
3292 : :
3293 : : bool
3294 : 1684 : gimple_simplify_105 (gimple_match_op *res_op, gimple_seq *seq,
3295 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3296 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3297 : : {
3298 : 1684 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3299 : 1684 : if (!TYPE_SATURATING (type)
3300 : : )
3301 : : {
3302 : 1684 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
3303 : 2862 : && !FIXED_POINT_TYPE_P (type)
3304 : : )
3305 : : {
3306 : 1178 : if (!ANY_INTEGRAL_TYPE_P (type) || TYPE_OVERFLOW_WRAPS (type)
3307 : : )
3308 : : {
3309 : 295 : if (!CONSTANT_CLASS_P (captures[2])
3310 : : )
3311 : : {
3312 : 295 : gimple_seq *lseq = seq;
3313 : 295 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail744;
3314 : 295 : {
3315 : 295 : res_op->set_op (PLUS_EXPR, type, 2);
3316 : 295 : {
3317 : 295 : tree _o1[1], _r1;
3318 : 295 : _o1[0] = captures[2];
3319 : 295 : if (type != TREE_TYPE (_o1[0]) /* XXX */
3320 : 295 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
3321 : : {
3322 : 232 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
3323 : 232 : tem_op.resimplify (lseq, valueize);
3324 : 232 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3325 : 232 : if (!_r1) goto next_after_fail744;
3326 : : }
3327 : : else
3328 : : _r1 = _o1[0];
3329 : 242 : res_op->ops[0] = _r1;
3330 : : }
3331 : 242 : {
3332 : 242 : tree _o1[2], _r1;
3333 : 242 : _o1[0] = captures[0];
3334 : 242 : {
3335 : 242 : tree _o2[1], _r2;
3336 : 242 : _o2[0] = captures[1];
3337 : 242 : if (type != TREE_TYPE (_o2[0]) /* XXX */
3338 : 242 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
3339 : : {
3340 : 179 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o2[0]);
3341 : 179 : tem_op.resimplify (lseq, valueize);
3342 : 179 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3343 : 179 : if (!_r2) goto next_after_fail744;
3344 : : }
3345 : : else
3346 : : _r2 = _o2[0];
3347 : 242 : _o1[1] = _r2;
3348 : : }
3349 : 242 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3350 : 242 : tem_op.resimplify (NULL, valueize);
3351 : 242 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
3352 : 242 : if (!_r1) goto next_after_fail744;
3353 : 242 : res_op->ops[1] = _r1;
3354 : : }
3355 : 242 : res_op->resimplify (lseq, valueize);
3356 : 242 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 236, __FILE__, __LINE__, true);
3357 : 242 : return true;
3358 : : }
3359 : : next_after_fail744:;
3360 : : }
3361 : : }
3362 : : else
3363 : : {
3364 : 1766 : if (!ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
3365 : 1766 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2]))
3366 : : )
3367 : : {
3368 : 158 : gimple_seq *lseq = seq;
3369 : 158 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail745;
3370 : 158 : {
3371 : 158 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
3372 : 158 : {
3373 : 158 : tree _o1[2], _r1;
3374 : 158 : _o1[0] = captures[2];
3375 : 158 : {
3376 : 158 : tree _o2[2], _r2;
3377 : 158 : {
3378 : 158 : tree _o3[1], _r3;
3379 : 158 : _o3[0] = captures[0];
3380 : 158 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o3[0]) /* XXX */
3381 : 158 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o3[0])))
3382 : : {
3383 : 158 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, TREE_TYPE (_o1[0]), _o3[0]);
3384 : 158 : tem_op.resimplify (lseq, valueize);
3385 : 158 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
3386 : 158 : if (!_r3) goto next_after_fail745;
3387 : : }
3388 : : else
3389 : : _r3 = _o3[0];
3390 : 158 : _o2[0] = _r3;
3391 : : }
3392 : 158 : _o2[1] = captures[1];
3393 : 158 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3394 : 158 : tem_op.resimplify (NULL, valueize);
3395 : 158 : _r2 = maybe_push_res_to_seq (&tem_op, NULL);
3396 : 158 : if (!_r2) goto next_after_fail745;
3397 : 158 : _o1[1] = _r2;
3398 : : }
3399 : 158 : (*res_op).set_op (PLUS_EXPR, TREE_TYPE (_o1[0]), 2);
3400 : 158 : (*res_op).ops[0] = _o1[0];
3401 : 158 : (*res_op).ops[1] = _o1[1];
3402 : 158 : (*res_op).resimplify (lseq, valueize);
3403 : : }
3404 : 158 : if (type != res_op->type
3405 : 158 : && !useless_type_conversion_p (type, res_op->type))
3406 : : {
3407 : 158 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail745;
3408 : 98 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
3409 : 98 : res_op->resimplify (lseq, valueize);
3410 : : }
3411 : 98 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 237, __FILE__, __LINE__, true);
3412 : 98 : return true;
3413 : : }
3414 : : next_after_fail745:;
3415 : : }
3416 : : else
3417 : : {
3418 : 725 : if (types_match (type, captures[2]) && !TYPE_OVERFLOW_SANITIZED (type)
3419 : : )
3420 : : {
3421 : 725 : {
3422 : 725 : tree cst = const_binop (MINUS_EXPR, type, captures[0], captures[1]);
3423 : 725 : if (cst && !TREE_OVERFLOW (cst)
3424 : : )
3425 : : {
3426 : 725 : gimple_seq *lseq = seq;
3427 : 725 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail746;
3428 : 725 : {
3429 : 725 : res_op->set_op (PLUS_EXPR, type, 2);
3430 : 725 : res_op->ops[0] = cst;
3431 : 725 : res_op->ops[1] = captures[2];
3432 : 725 : res_op->resimplify (lseq, valueize);
3433 : 725 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 238, __FILE__, __LINE__, true);
3434 : 725 : return true;
3435 : : }
3436 : 0 : next_after_fail746:;
3437 : : }
3438 : : }
3439 : : }
3440 : : }
3441 : : }
3442 : : }
3443 : : }
3444 : : return false;
3445 : : }
3446 : :
3447 : : bool
3448 : 0 : gimple_simplify_113 (gimple_match_op *res_op, gimple_seq *seq,
3449 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3450 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3451 : : const enum tree_code ARG_UNUSED (log1),
3452 : : const enum tree_code ARG_UNUSED (log2),
3453 : : const combined_fn ARG_UNUSED (popcount))
3454 : : {
3455 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3456 : 0 : gimple_seq *lseq = seq;
3457 : 0 : if (lseq
3458 : 0 : && (!single_use (captures[0])
3459 : 0 : || !single_use (captures[1])
3460 : 0 : || !single_use (captures[3])
3461 : 0 : || !single_use (captures[5])
3462 : 0 : || !single_use (captures[6])))
3463 : 0 : lseq = NULL;
3464 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail756;
3465 : 0 : {
3466 : 0 : res_op->set_op (popcount, type, 1);
3467 : 0 : {
3468 : 0 : tree _o1[2], _r1;
3469 : 0 : _o1[0] = captures[2];
3470 : 0 : _o1[1] = captures[4];
3471 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), log2, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3472 : 0 : tem_op.resimplify (lseq, valueize);
3473 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3474 : 0 : if (!_r1) goto next_after_fail756;
3475 : 0 : res_op->ops[0] = _r1;
3476 : : }
3477 : 0 : res_op->resimplify (lseq, valueize);
3478 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 248, __FILE__, __LINE__, true);
3479 : : return true;
3480 : : }
3481 : : next_after_fail756:;
3482 : : return false;
3483 : : }
3484 : :
3485 : : bool
3486 : 18 : gimple_simplify_117 (gimple_match_op *res_op, gimple_seq *seq,
3487 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3488 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3489 : : {
3490 : 18 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3491 : 18 : gimple_seq *lseq = seq;
3492 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail760;
3493 : 18 : {
3494 : 18 : res_op->set_op (BIT_IOR_EXPR, type, 2);
3495 : 18 : res_op->ops[0] = captures[0];
3496 : 18 : res_op->ops[1] = captures[1];
3497 : 18 : res_op->resimplify (lseq, valueize);
3498 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 252, __FILE__, __LINE__, true);
3499 : : return true;
3500 : : }
3501 : 0 : next_after_fail760:;
3502 : 0 : return false;
3503 : : }
3504 : :
3505 : : bool
3506 : 39432 : gimple_simplify_119 (gimple_match_op *res_op, gimple_seq *seq,
3507 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3508 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3509 : : {
3510 : 39432 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3511 : 39432 : {
3512 : 39432 : bool wascmp;
3513 : 39432 : if (bitwise_inverted_equal_p (captures[0], captures[2], wascmp)
3514 : 39432 : && (!wascmp || element_precision (type) == 1)
3515 : : )
3516 : : {
3517 : 9 : gimple_seq *lseq = seq;
3518 : 9 : if (lseq
3519 : 5 : && (!single_use (captures[1])))
3520 : 4 : lseq = NULL;
3521 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail762;
3522 : 9 : {
3523 : 9 : res_op->set_op (BIT_IOR_EXPR, type, 2);
3524 : 9 : res_op->ops[0] = captures[0];
3525 : 9 : {
3526 : 9 : tree _o1[1], _r1;
3527 : 9 : _o1[0] = captures[3];
3528 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3529 : 9 : tem_op.resimplify (lseq, valueize);
3530 : 9 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3531 : 9 : if (!_r1) goto next_after_fail762;
3532 : 5 : res_op->ops[1] = _r1;
3533 : : }
3534 : 5 : res_op->resimplify (lseq, valueize);
3535 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 254, __FILE__, __LINE__, true);
3536 : 5 : return true;
3537 : : }
3538 : 39427 : next_after_fail762:;
3539 : : }
3540 : : }
3541 : 39427 : return false;
3542 : : }
3543 : :
3544 : : bool
3545 : 1051 : gimple_simplify_124 (gimple_match_op *res_op, gimple_seq *seq,
3546 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3547 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3548 : : const enum tree_code ARG_UNUSED (op))
3549 : : {
3550 : 1051 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3551 : 1051 : gimple_seq *lseq = seq;
3552 : 1051 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail767;
3553 : 1051 : {
3554 : 1051 : tree tem;
3555 : 1051 : tem = captures[0];
3556 : 1051 : res_op->set_value (tem);
3557 : 1051 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 258, __FILE__, __LINE__, true);
3558 : : return true;
3559 : : }
3560 : 0 : next_after_fail767:;
3561 : 0 : return false;
3562 : : }
3563 : :
3564 : : bool
3565 : 0 : gimple_simplify_127 (gimple_match_op *res_op, gimple_seq *seq,
3566 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3567 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3568 : : {
3569 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3570 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3571 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
3572 : : )
3573 : : {
3574 : 0 : gimple_seq *lseq = seq;
3575 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail770;
3576 : 0 : {
3577 : 0 : tree tem;
3578 : 0 : tem = captures[2];
3579 : 0 : res_op->set_value (tem);
3580 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 260, __FILE__, __LINE__, true);
3581 : 0 : return true;
3582 : : }
3583 : 0 : next_after_fail770:;
3584 : : }
3585 : : return false;
3586 : : }
3587 : :
3588 : : bool
3589 : 354 : gimple_simplify_131 (gimple_match_op *res_op, gimple_seq *seq,
3590 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3591 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3592 : : const enum tree_code ARG_UNUSED (bitop))
3593 : : {
3594 : 354 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3595 : 354 : gimple_seq *lseq = seq;
3596 : 354 : if (lseq
3597 : 140 : && (!single_use (captures[1])))
3598 : 316 : lseq = NULL;
3599 : 354 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail774;
3600 : 354 : {
3601 : 354 : res_op->set_op (bitop, type, 2);
3602 : 354 : res_op->ops[0] = captures[0];
3603 : 354 : {
3604 : 354 : tree _o1[1], _r1;
3605 : 354 : _o1[0] = captures[2];
3606 : 354 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3607 : 354 : tem_op.resimplify (lseq, valueize);
3608 : 354 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3609 : 354 : if (!_r1) goto next_after_fail774;
3610 : 50 : res_op->ops[1] = _r1;
3611 : : }
3612 : 50 : res_op->resimplify (lseq, valueize);
3613 : 50 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 262, __FILE__, __LINE__, true);
3614 : : return true;
3615 : : }
3616 : : next_after_fail774:;
3617 : : return false;
3618 : : }
3619 : :
3620 : : bool
3621 : 3358 : gimple_simplify_138 (gimple_match_op *res_op, gimple_seq *seq,
3622 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3623 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3624 : : const enum tree_code ARG_UNUSED (op),
3625 : : const enum tree_code ARG_UNUSED (rop))
3626 : : {
3627 : 3358 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3628 : 3358 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
3629 : 3358 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
3630 : : )
3631 : : {
3632 : 3200 : gimple_seq *lseq = seq;
3633 : 3200 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail781;
3634 : 3200 : {
3635 : 3200 : res_op->set_op (BIT_NOT_EXPR, type, 1);
3636 : 3200 : {
3637 : 3200 : tree _o1[2], _r1;
3638 : 3200 : {
3639 : 3200 : tree _o2[1], _r2;
3640 : 3200 : _o2[0] = captures[0];
3641 : 3200 : if (type != TREE_TYPE (_o2[0]) /* XXX */
3642 : 3200 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
3643 : : {
3644 : 203 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
3645 : 203 : tem_op.resimplify (lseq, valueize);
3646 : 203 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3647 : 203 : if (!_r2) goto next_after_fail781;
3648 : : }
3649 : : else
3650 : : _r2 = _o2[0];
3651 : 3109 : _o1[0] = _r2;
3652 : : }
3653 : 3109 : {
3654 : 3109 : tree _o2[1], _r2;
3655 : 3109 : _o2[0] = captures[1];
3656 : 3109 : if (type != TREE_TYPE (_o2[0]) /* XXX */
3657 : 3109 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
3658 : : {
3659 : 171 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
3660 : 171 : tem_op.resimplify (lseq, valueize);
3661 : 171 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3662 : 171 : if (!_r2) goto next_after_fail781;
3663 : : }
3664 : : else
3665 : : _r2 = _o2[0];
3666 : 3089 : _o1[1] = _r2;
3667 : : }
3668 : 3089 : gimple_match_op tem_op (res_op->cond.any_else (), rop, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3669 : 3089 : tem_op.resimplify (lseq, valueize);
3670 : 3089 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3671 : 3089 : if (!_r1) goto next_after_fail781;
3672 : 1083 : res_op->ops[0] = _r1;
3673 : : }
3674 : 1083 : res_op->resimplify (lseq, valueize);
3675 : 1083 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 267, __FILE__, __LINE__, true);
3676 : 1083 : return true;
3677 : : }
3678 : : next_after_fail781:;
3679 : : }
3680 : : return false;
3681 : : }
3682 : :
3683 : : bool
3684 : 0 : gimple_simplify_144 (gimple_match_op *res_op, gimple_seq *seq,
3685 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3686 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3687 : : const enum tree_code ARG_UNUSED (op))
3688 : : {
3689 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3690 : 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
3691 : 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
3692 : : )
3693 : : {
3694 : 0 : if (single_use (captures[4]) && single_use (captures[5])
3695 : : )
3696 : : {
3697 : 0 : gimple_seq *lseq = seq;
3698 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail790;
3699 : 0 : {
3700 : 0 : res_op->set_op (op, type, 2);
3701 : 0 : res_op->ops[0] = captures[0];
3702 : 0 : {
3703 : 0 : tree _o1[1], _r1;
3704 : 0 : _o1[0] = captures[6];
3705 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
3706 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
3707 : : {
3708 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
3709 : 0 : tem_op.resimplify (lseq, valueize);
3710 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3711 : 0 : if (!_r1) goto next_after_fail790;
3712 : : }
3713 : : else
3714 : : _r1 = _o1[0];
3715 : 0 : res_op->ops[1] = _r1;
3716 : : }
3717 : 0 : res_op->resimplify (lseq, valueize);
3718 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 269, __FILE__, __LINE__, true);
3719 : 0 : return true;
3720 : : }
3721 : : next_after_fail790:;
3722 : : }
3723 : : else
3724 : : {
3725 : 0 : if (single_use (captures[0]) && single_use (captures[1])
3726 : : )
3727 : : {
3728 : 0 : gimple_seq *lseq = seq;
3729 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail791;
3730 : 0 : {
3731 : 0 : res_op->set_op (op, type, 2);
3732 : 0 : {
3733 : 0 : tree _o1[1], _r1;
3734 : 0 : _o1[0] = captures[3];
3735 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
3736 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
3737 : : {
3738 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
3739 : 0 : tem_op.resimplify (lseq, valueize);
3740 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3741 : 0 : if (!_r1) goto next_after_fail791;
3742 : : }
3743 : : else
3744 : : _r1 = _o1[0];
3745 : 0 : res_op->ops[0] = _r1;
3746 : : }
3747 : 0 : res_op->ops[1] = captures[4];
3748 : 0 : res_op->resimplify (lseq, valueize);
3749 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 270, __FILE__, __LINE__, true);
3750 : 0 : return true;
3751 : : }
3752 : : next_after_fail791:;
3753 : : }
3754 : : }
3755 : : }
3756 : : return false;
3757 : : }
3758 : :
3759 : : bool
3760 : 224056 : gimple_simplify_150 (gimple_match_op *res_op, gimple_seq *seq,
3761 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3762 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3763 : : const enum tree_code ARG_UNUSED (op))
3764 : : {
3765 : 224056 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3766 : 224056 : if (bitwise_equal_p (captures[4], captures[7])
3767 : : )
3768 : : {
3769 : 128 : gimple_seq *lseq = seq;
3770 : 128 : if (lseq
3771 : 77 : && (!single_use (captures[0])
3772 : 77 : || !single_use (captures[1])
3773 : 77 : || !single_use (captures[2])
3774 : 49 : || !single_use (captures[3])))
3775 : 79 : lseq = NULL;
3776 : 128 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail797;
3777 : 128 : {
3778 : 128 : res_op->set_op (NOP_EXPR, type, 1);
3779 : 128 : {
3780 : 128 : tree _o1[2], _r1;
3781 : 128 : {
3782 : 128 : tree _o2[2], _r2;
3783 : 128 : _o2[0] = captures[5];
3784 : 128 : {
3785 : 128 : tree _o3[1], _r3;
3786 : 128 : _o3[0] = captures[6];
3787 : 128 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o3[0]) /* XXX */
3788 : 128 : && !useless_type_conversion_p (TREE_TYPE (_o2[0]), TREE_TYPE (_o3[0])))
3789 : : {
3790 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
3791 : 0 : tem_op.resimplify (lseq, valueize);
3792 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
3793 : 0 : if (!_r3) goto next_after_fail797;
3794 : : }
3795 : : else
3796 : : _r3 = _o3[0];
3797 : 128 : _o2[1] = _r3;
3798 : : }
3799 : 128 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3800 : 128 : tem_op.resimplify (lseq, valueize);
3801 : 128 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3802 : 128 : if (!_r2) goto next_after_fail797;
3803 : 49 : _o1[0] = _r2;
3804 : : }
3805 : 49 : {
3806 : 49 : tree _o2[1], _r2;
3807 : 49 : _o2[0] = captures[4];
3808 : 49 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0]) /* XXX */
3809 : 49 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
3810 : : {
3811 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
3812 : 0 : tem_op.resimplify (lseq, valueize);
3813 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3814 : 0 : if (!_r2) goto next_after_fail797;
3815 : : }
3816 : : else
3817 : : _r2 = _o2[0];
3818 : 49 : _o1[1] = _r2;
3819 : : }
3820 : 49 : (*res_op).set_op (BIT_IOR_EXPR, TREE_TYPE (_o1[0]), 2);
3821 : 49 : (*res_op).ops[0] = _o1[0];
3822 : 49 : (*res_op).ops[1] = _o1[1];
3823 : 49 : (*res_op).resimplify (lseq, valueize);
3824 : : }
3825 : 49 : if (type != res_op->type
3826 : 49 : && !useless_type_conversion_p (type, res_op->type))
3827 : : {
3828 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail797;
3829 : 0 : res_op->set_op (NOP_EXPR, type, 1);
3830 : 0 : res_op->resimplify (lseq, valueize);
3831 : : }
3832 : 49 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 275, __FILE__, __LINE__, true);
3833 : 49 : return true;
3834 : : }
3835 : : next_after_fail797:;
3836 : : }
3837 : : return false;
3838 : : }
3839 : :
3840 : : bool
3841 : 7 : gimple_simplify_157 (gimple_match_op *res_op, gimple_seq *seq,
3842 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3843 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3844 : : const enum tree_code ARG_UNUSED (cmp),
3845 : : const enum tree_code ARG_UNUSED (icmp))
3846 : : {
3847 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3848 : 7 : if (integer_zerop (captures[5])
3849 : 7 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
3850 : : )
3851 : : {
3852 : 0 : if (integer_onep (captures[4])
3853 : : )
3854 : : {
3855 : 0 : gimple_seq *lseq = seq;
3856 : 0 : if (lseq
3857 : 0 : && (!single_use (captures[0])
3858 : 0 : || !single_use (captures[7])))
3859 : 0 : lseq = NULL;
3860 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail805;
3861 : 0 : {
3862 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
3863 : 0 : {
3864 : 0 : tree _o1[3], _r1;
3865 : 0 : _o1[0] = captures[1];
3866 : 0 : _o1[1] = captures[6];
3867 : 0 : _o1[2] = captures[9];
3868 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
3869 : 0 : tem_op.resimplify (lseq, valueize);
3870 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3871 : 0 : if (!_r1) goto next_after_fail805;
3872 : 0 : res_op->ops[0] = _r1;
3873 : : }
3874 : 0 : res_op->ops[1] = captures[4];
3875 : 0 : res_op->resimplify (lseq, valueize);
3876 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 279, __FILE__, __LINE__, true);
3877 : 0 : return true;
3878 : : }
3879 : : next_after_fail805:;
3880 : : }
3881 : : else
3882 : : {
3883 : 0 : if (integer_minus_onep (captures[4])
3884 : : )
3885 : : {
3886 : 0 : gimple_seq *lseq = seq;
3887 : 0 : if (lseq
3888 : 0 : && (!single_use (captures[0])
3889 : 0 : || !single_use (captures[7])))
3890 : 0 : lseq = NULL;
3891 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail806;
3892 : 0 : {
3893 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
3894 : 0 : res_op->ops[0] = captures[1];
3895 : 0 : res_op->ops[1] = captures[6];
3896 : 0 : res_op->ops[2] = captures[9];
3897 : 0 : res_op->resimplify (lseq, valueize);
3898 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 280, __FILE__, __LINE__, true);
3899 : 0 : return true;
3900 : : }
3901 : 0 : next_after_fail806:;
3902 : : }
3903 : : }
3904 : : }
3905 : : else
3906 : : {
3907 : 7 : if (integer_zerop (captures[4])
3908 : 7 : && invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
3909 : : )
3910 : : {
3911 : 0 : if (integer_onep (captures[5])
3912 : : )
3913 : : {
3914 : 0 : gimple_seq *lseq = seq;
3915 : 0 : if (lseq
3916 : 0 : && (!single_use (captures[0])
3917 : 0 : || !single_use (captures[7])))
3918 : 0 : lseq = NULL;
3919 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail807;
3920 : 0 : {
3921 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
3922 : 0 : {
3923 : 0 : tree _o1[3], _r1;
3924 : 0 : _o1[0] = captures[1];
3925 : 0 : _o1[1] = captures[9];
3926 : 0 : _o1[2] = captures[6];
3927 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
3928 : 0 : tem_op.resimplify (lseq, valueize);
3929 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3930 : 0 : if (!_r1) goto next_after_fail807;
3931 : 0 : res_op->ops[0] = _r1;
3932 : : }
3933 : 0 : res_op->ops[1] = captures[5];
3934 : 0 : res_op->resimplify (lseq, valueize);
3935 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 281, __FILE__, __LINE__, true);
3936 : 0 : return true;
3937 : : }
3938 : : next_after_fail807:;
3939 : : }
3940 : : else
3941 : : {
3942 : 0 : if (integer_minus_onep (captures[5])
3943 : : )
3944 : : {
3945 : 0 : gimple_seq *lseq = seq;
3946 : 0 : if (lseq
3947 : 0 : && (!single_use (captures[0])
3948 : 0 : || !single_use (captures[7])))
3949 : 0 : lseq = NULL;
3950 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail808;
3951 : 0 : {
3952 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
3953 : 0 : res_op->ops[0] = captures[1];
3954 : 0 : res_op->ops[1] = captures[9];
3955 : 0 : res_op->ops[2] = captures[6];
3956 : 0 : res_op->resimplify (lseq, valueize);
3957 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 282, __FILE__, __LINE__, true);
3958 : 0 : return true;
3959 : : }
3960 : 0 : next_after_fail808:;
3961 : : }
3962 : : }
3963 : : }
3964 : : }
3965 : : return false;
3966 : : }
3967 : :
3968 : : bool
3969 : 4 : gimple_simplify_166 (gimple_match_op *res_op, gimple_seq *seq,
3970 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3971 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3972 : : const enum tree_code ARG_UNUSED (cmp))
3973 : : {
3974 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3975 : 4 : gimple_seq *lseq = seq;
3976 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail835;
3977 : 4 : {
3978 : 4 : res_op->set_op (BIT_IOR_EXPR, type, 2);
3979 : 4 : {
3980 : 4 : tree _o1[2], _r1;
3981 : 4 : _o1[0] = build_zero_cst (TREE_TYPE (captures[0]));
3982 : 4 : _o1[1] = captures[2];
3983 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), cmp, type, _o1[0], _o1[1]);
3984 : 4 : tem_op.resimplify (lseq, valueize);
3985 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3986 : 4 : if (!_r1) goto next_after_fail835;
3987 : 4 : res_op->ops[0] = _r1;
3988 : : }
3989 : 4 : res_op->ops[1] = captures[3];
3990 : 4 : res_op->resimplify (lseq, valueize);
3991 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 302, __FILE__, __LINE__, true);
3992 : : return true;
3993 : : }
3994 : : next_after_fail835:;
3995 : : return false;
3996 : : }
3997 : :
3998 : : bool
3999 : 7 : gimple_simplify_169 (gimple_match_op *res_op, gimple_seq *seq,
4000 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4001 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
4002 : : {
4003 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4004 : 7 : gimple_seq *lseq = seq;
4005 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail838;
4006 : 7 : {
4007 : 7 : tree tem;
4008 : 7 : tem = captures[2];
4009 : 7 : res_op->set_value (tem);
4010 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 285, __FILE__, __LINE__, true);
4011 : : return true;
4012 : : }
4013 : 0 : next_after_fail838:;
4014 : 0 : return false;
4015 : : }
4016 : :
4017 : : bool
4018 : 331 : gimple_simplify_171 (gimple_match_op *res_op, gimple_seq *seq,
4019 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4020 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4021 : : const enum tree_code ARG_UNUSED (code2),
4022 : : const enum tree_code ARG_UNUSED (code1))
4023 : : {
4024 : 331 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4025 : 331 : if ((TREE_CODE (captures[2]) == INTEGER_CST
4026 : 301 : && TREE_CODE (captures[5]) == INTEGER_CST)
4027 : 600 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
4028 : 14 : || (VECTOR_TYPE_P (TREE_TYPE (captures[2])))
4029 : 14 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
4030 : 299 : && bitwise_equal_p (captures[2], captures[5]))
4031 : : )
4032 : : {
4033 : 32 : {
4034 : 32 : bool one_before = false;
4035 : 32 : bool one_after = false;
4036 : 32 : int cmp = 0;
4037 : 32 : bool allbits = true;
4038 : 32 : if (TREE_CODE (captures[2]) == INTEGER_CST
4039 : 32 : && TREE_CODE (captures[5]) == INTEGER_CST)
4040 : : {
4041 : 32 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
4042 : 32 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
4043 : 32 : auto t2 = wi::to_wide (captures[5]);
4044 : 32 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
4045 : 32 : if (cmp < 0
4046 : 32 : && t1 == t2 - 1)
4047 : : one_before = true;
4048 : 32 : if (cmp > 0
4049 : 32 : && t1 == t2 + 1)
4050 : : one_after = true;
4051 : : }
4052 : 32 : bool val;
4053 : 32 : switch (code2)
4054 : : {
4055 : 0 : case EQ_EXPR: val = (cmp == 0); break;
4056 : 0 : case NE_EXPR: val = (cmp != 0); break;
4057 : 0 : case LT_EXPR: val = (cmp < 0); break;
4058 : 29 : case GT_EXPR: val = (cmp > 0); break;
4059 : 3 : case LE_EXPR: val = (cmp <= 0); break;
4060 : 0 : case GE_EXPR: val = (cmp >= 0); break;
4061 : 0 : default: gcc_unreachable ();
4062 : : }
4063 : 32 : if (code1 == EQ_EXPR && val
4064 : : )
4065 : : {
4066 : 5 : gimple_seq *lseq = seq;
4067 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail841;
4068 : 5 : {
4069 : 5 : tree tem;
4070 : 5 : tem = captures[3];
4071 : 5 : res_op->set_value (tem);
4072 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 287, __FILE__, __LINE__, true);
4073 : 5 : return true;
4074 : : }
4075 : 0 : next_after_fail841:;
4076 : : }
4077 : : else
4078 : : {
4079 : 27 : if (code1 == NE_EXPR && val && allbits
4080 : : )
4081 : : {
4082 : 0 : gimple_seq *lseq = seq;
4083 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail842;
4084 : 0 : {
4085 : 0 : tree tem;
4086 : 0 : tem = constant_boolean_node (true, type);
4087 : 0 : res_op->set_value (tem);
4088 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 288, __FILE__, __LINE__, true);
4089 : 0 : return true;
4090 : : }
4091 : 0 : next_after_fail842:;
4092 : 0 : }
4093 : : else
4094 : : {
4095 : 27 : if (code1 == NE_EXPR && !val && allbits
4096 : : )
4097 : : {
4098 : 0 : gimple_seq *lseq = seq;
4099 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail843;
4100 : 0 : {
4101 : 0 : tree tem;
4102 : 0 : tem = captures[0];
4103 : 0 : res_op->set_value (tem);
4104 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 289, __FILE__, __LINE__, true);
4105 : 0 : return true;
4106 : : }
4107 : 0 : next_after_fail843:;
4108 : 0 : }
4109 : : else
4110 : : {
4111 : 27 : if (code1 == EQ_EXPR
4112 : 27 : && code2 == GT_EXPR
4113 : 27 : && cmp == 0
4114 : 27 : && allbits
4115 : 27 : && ((VECTOR_BOOLEAN_TYPE_P (type)
4116 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
4117 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
4118 : : )
4119 : : {
4120 : 0 : gimple_seq *lseq = seq;
4121 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail844;
4122 : 0 : {
4123 : 0 : res_op->set_op (GE_EXPR, type, 2);
4124 : 0 : res_op->ops[0] = captures[4];
4125 : 0 : res_op->ops[1] = captures[5];
4126 : 0 : res_op->resimplify (lseq, valueize);
4127 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 290, __FILE__, __LINE__, true);
4128 : 0 : return true;
4129 : : }
4130 : 0 : next_after_fail844:;
4131 : : }
4132 : : else
4133 : : {
4134 : 27 : if (code1 == EQ_EXPR
4135 : 27 : && code2 == LT_EXPR
4136 : 0 : && cmp == 0
4137 : 0 : && allbits
4138 : 27 : && ((VECTOR_BOOLEAN_TYPE_P (type)
4139 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
4140 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
4141 : : )
4142 : : {
4143 : 0 : gimple_seq *lseq = seq;
4144 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail845;
4145 : 0 : {
4146 : 0 : res_op->set_op (LE_EXPR, type, 2);
4147 : 0 : res_op->ops[0] = captures[4];
4148 : 0 : res_op->ops[1] = captures[5];
4149 : 0 : res_op->resimplify (lseq, valueize);
4150 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 291, __FILE__, __LINE__, true);
4151 : 0 : return true;
4152 : : }
4153 : 0 : next_after_fail845:;
4154 : : }
4155 : : else
4156 : : {
4157 : 27 : if (code1 == EQ_EXPR
4158 : 27 : && code2 == GE_EXPR
4159 : : && one_before
4160 : 0 : && allbits
4161 : 27 : && ((VECTOR_BOOLEAN_TYPE_P (type)
4162 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, GE_EXPR))
4163 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
4164 : : )
4165 : : {
4166 : 0 : gimple_seq *lseq = seq;
4167 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail846;
4168 : 0 : {
4169 : 0 : res_op->set_op (GE_EXPR, type, 2);
4170 : 0 : res_op->ops[0] = captures[4];
4171 : 0 : {
4172 : 0 : tree _o1[1], _r1;
4173 : 0 : _o1[0] = captures[2];
4174 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0]) /* XXX */
4175 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
4176 : : {
4177 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
4178 : 0 : tem_op.resimplify (lseq, valueize);
4179 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4180 : 0 : if (!_r1) goto next_after_fail846;
4181 : : }
4182 : : else
4183 : : _r1 = _o1[0];
4184 : 0 : res_op->ops[1] = _r1;
4185 : : }
4186 : 0 : res_op->resimplify (lseq, valueize);
4187 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 292, __FILE__, __LINE__, true);
4188 : 0 : return true;
4189 : : }
4190 : : next_after_fail846:;
4191 : : }
4192 : : else
4193 : : {
4194 : 27 : if (code1 == EQ_EXPR
4195 : 27 : && code2 == LE_EXPR
4196 : : && one_after
4197 : 0 : && allbits
4198 : 27 : && ((VECTOR_BOOLEAN_TYPE_P (type)
4199 : 0 : && expand_vec_cmp_expr_p (TREE_TYPE (captures[2]), type, LE_EXPR))
4200 : 0 : || !VECTOR_TYPE_P (TREE_TYPE (captures[2])))
4201 : : )
4202 : : {
4203 : 0 : gimple_seq *lseq = seq;
4204 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail847;
4205 : 0 : {
4206 : 0 : res_op->set_op (LE_EXPR, type, 2);
4207 : 0 : res_op->ops[0] = captures[4];
4208 : 0 : {
4209 : 0 : tree _o1[1], _r1;
4210 : 0 : _o1[0] = captures[2];
4211 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0]) /* XXX */
4212 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
4213 : : {
4214 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
4215 : 0 : tem_op.resimplify (lseq, valueize);
4216 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4217 : 0 : if (!_r1) goto next_after_fail847;
4218 : : }
4219 : : else
4220 : : _r1 = _o1[0];
4221 : 0 : res_op->ops[1] = _r1;
4222 : : }
4223 : 0 : res_op->resimplify (lseq, valueize);
4224 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 293, __FILE__, __LINE__, true);
4225 : 0 : return true;
4226 : : }
4227 : : next_after_fail847:;
4228 : : }
4229 : : }
4230 : : }
4231 : : }
4232 : : }
4233 : : }
4234 : : }
4235 : : }
4236 : : }
4237 : : return false;
4238 : : }
4239 : :
4240 : : bool
4241 : 0 : gimple_simplify_193 (gimple_match_op *res_op, gimple_seq *seq,
4242 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4243 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
4244 : : {
4245 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4246 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
4247 : : )
4248 : : {
4249 : 0 : gimple_seq *lseq = seq;
4250 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail877;
4251 : 0 : {
4252 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4253 : 0 : {
4254 : 0 : tree _o1[1], _r1;
4255 : 0 : _o1[0] = captures[0];
4256 : 0 : (*res_op).set_op (ABS_EXPR, TREE_TYPE (_o1[0]), 1);
4257 : 0 : (*res_op).ops[0] = _o1[0];
4258 : 0 : (*res_op).resimplify (lseq, valueize);
4259 : : }
4260 : 0 : if (type != res_op->type
4261 : 0 : && !useless_type_conversion_p (type, res_op->type))
4262 : : {
4263 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail877;
4264 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4265 : 0 : res_op->resimplify (lseq, valueize);
4266 : : }
4267 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 316, __FILE__, __LINE__, true);
4268 : 0 : return true;
4269 : : }
4270 : : next_after_fail877:;
4271 : : }
4272 : : return false;
4273 : : }
4274 : :
4275 : : bool
4276 : 0 : gimple_simplify_199 (gimple_match_op *res_op, gimple_seq *seq,
4277 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4278 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
4279 : : {
4280 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4281 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
4282 : : )
4283 : : {
4284 : 0 : gimple_seq *lseq = seq;
4285 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail883;
4286 : 0 : {
4287 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
4288 : 0 : {
4289 : 0 : tree _o1[1], _r1;
4290 : 0 : _o1[0] = captures[0];
4291 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4292 : 0 : tem_op.resimplify (lseq, valueize);
4293 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4294 : 0 : if (!_r1) goto next_after_fail883;
4295 : 0 : res_op->ops[0] = _r1;
4296 : : }
4297 : 0 : res_op->resimplify (lseq, valueize);
4298 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 316, __FILE__, __LINE__, true);
4299 : 0 : return true;
4300 : : }
4301 : : next_after_fail883:;
4302 : : }
4303 : : return false;
4304 : : }
4305 : :
4306 : : bool
4307 : 2 : gimple_simplify_205 (gimple_match_op *res_op, gimple_seq *seq,
4308 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4309 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4310 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
4311 : : {
4312 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4313 : 2 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
4314 : : )
4315 : : {
4316 : 2 : gimple_seq *lseq = seq;
4317 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail889;
4318 : 2 : {
4319 : 2 : res_op->set_op (ABS_EXPR, type, 1);
4320 : 2 : res_op->ops[0] = captures[0];
4321 : 2 : res_op->resimplify (lseq, valueize);
4322 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 318, __FILE__, __LINE__, true);
4323 : 2 : return true;
4324 : : }
4325 : 0 : next_after_fail889:;
4326 : : }
4327 : : return false;
4328 : : }
4329 : :
4330 : : bool
4331 : 2 : gimple_simplify_210 (gimple_match_op *res_op, gimple_seq *seq,
4332 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4333 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4334 : : const combined_fn ARG_UNUSED (copysigns))
4335 : : {
4336 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4337 : 2 : gimple_seq *lseq = seq;
4338 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail894;
4339 : 2 : {
4340 : 2 : res_op->set_op (MULT_EXPR, type, 2);
4341 : 2 : res_op->ops[0] = captures[1];
4342 : 2 : res_op->ops[1] = captures[1];
4343 : 2 : res_op->resimplify (lseq, valueize);
4344 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 321, __FILE__, __LINE__, true);
4345 : : return true;
4346 : : }
4347 : 0 : next_after_fail894:;
4348 : 0 : return false;
4349 : : }
4350 : :
4351 : : bool
4352 : 20897 : gimple_simplify_215 (gimple_match_op *res_op, gimple_seq *seq,
4353 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4354 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4355 : : const enum tree_code ARG_UNUSED (cmp))
4356 : : {
4357 : 20897 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4358 : 20897 : if (!canonicalize_math_p ()
4359 : : )
4360 : : {
4361 : 8687 : if (INTEGRAL_TYPE_P (type)
4362 : 8687 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4363 : : )
4364 : : {
4365 : 8687 : gimple_seq *lseq = seq;
4366 : 8687 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail901;
4367 : 8687 : {
4368 : 8687 : res_op->set_op (COND_EXPR, type, 3);
4369 : 8687 : res_op->ops[0] = captures[0];
4370 : 8687 : res_op->ops[1] = captures[3];
4371 : 8687 : res_op->ops[2] = build_zero_cst (type);
4372 : 8687 : res_op->resimplify (lseq, valueize);
4373 : 8687 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 325, __FILE__, __LINE__, true);
4374 : 8687 : return true;
4375 : : }
4376 : 0 : next_after_fail901:;
4377 : : }
4378 : : }
4379 : : return false;
4380 : : }
4381 : :
4382 : : bool
4383 : 75677 : gimple_simplify_219 (gimple_match_op *res_op, gimple_seq *seq,
4384 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4385 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
4386 : : {
4387 : 75677 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4388 : 75677 : gimple_seq *lseq = seq;
4389 : 75677 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail905;
4390 : 75677 : {
4391 : 75677 : res_op->set_op (NOP_EXPR, type, 1);
4392 : 75677 : res_op->ops[0] = captures[0];
4393 : 75677 : res_op->resimplify (lseq, valueize);
4394 : 75677 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 328, __FILE__, __LINE__, true);
4395 : : return true;
4396 : : }
4397 : 0 : next_after_fail905:;
4398 : 0 : return false;
4399 : : }
4400 : :
4401 : : bool
4402 : 33282 : gimple_simplify_222 (gimple_match_op *res_op, gimple_seq *seq,
4403 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4404 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
4405 : : {
4406 : 33282 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4407 : 33282 : if (TREE_CODE (captures[3]) != INTEGER_CST
4408 : 33205 : && single_use (captures[0])
4409 : 42069 : && !integer_zerop (captures[2]) && !integer_minus_onep (captures[2])
4410 : : )
4411 : : {
4412 : 8786 : gimple_seq *lseq = seq;
4413 : 8786 : if (lseq
4414 : 2749 : && (!single_use (captures[0])))
4415 : 6037 : lseq = NULL;
4416 : 8786 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail909;
4417 : 8786 : {
4418 : 8786 : res_op->set_op (MULT_EXPR, type, 2);
4419 : 8786 : {
4420 : 8786 : tree _o1[2], _r1;
4421 : 8786 : _o1[0] = captures[1];
4422 : 8786 : _o1[1] = captures[3];
4423 : 8786 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4424 : 8786 : tem_op.resimplify (lseq, valueize);
4425 : 8786 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4426 : 8786 : if (!_r1) goto next_after_fail909;
4427 : 3731 : res_op->ops[0] = _r1;
4428 : : }
4429 : 3731 : res_op->ops[1] = captures[2];
4430 : 3731 : res_op->resimplify (lseq, valueize);
4431 : 3731 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 332, __FILE__, __LINE__, true);
4432 : 3731 : return true;
4433 : : }
4434 : : next_after_fail909:;
4435 : : }
4436 : : return false;
4437 : : }
4438 : :
4439 : : bool
4440 : 32 : gimple_simplify_228 (gimple_match_op *res_op, gimple_seq *seq,
4441 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4442 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4443 : : const combined_fn ARG_UNUSED (POW))
4444 : : {
4445 : 32 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4446 : 32 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
4447 : : )
4448 : : {
4449 : 0 : gimple_seq *lseq = seq;
4450 : 0 : if (lseq
4451 : 0 : && (!single_use (captures[0])
4452 : 0 : || !single_use (captures[3])))
4453 : 0 : lseq = NULL;
4454 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail915;
4455 : 0 : {
4456 : 0 : res_op->set_op (POW, type, 2);
4457 : 0 : res_op->ops[0] = captures[1];
4458 : 0 : {
4459 : 0 : tree _o1[2], _r1;
4460 : 0 : _o1[0] = captures[2];
4461 : 0 : _o1[1] = captures[4];
4462 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4463 : 0 : tem_op.resimplify (lseq, valueize);
4464 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4465 : 0 : if (!_r1) goto next_after_fail915;
4466 : 0 : res_op->ops[1] = _r1;
4467 : : }
4468 : 0 : res_op->resimplify (lseq, valueize);
4469 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 338, __FILE__, __LINE__, true);
4470 : 0 : return true;
4471 : : }
4472 : : next_after_fail915:;
4473 : : }
4474 : : return false;
4475 : : }
4476 : :
4477 : : bool
4478 : 1056 : gimple_simplify_233 (gimple_match_op *res_op, gimple_seq *seq,
4479 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4480 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4481 : : const enum tree_code ARG_UNUSED (op))
4482 : : {
4483 : 1056 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4484 : 2112 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
4485 : 2112 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
4486 : 1027 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
4487 : 1056 : && (CONSTANT_CLASS_P (captures[2]) || (single_use (captures[1]) && single_use (captures[0])))
4488 : 264 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
4489 : 2376 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
4490 : : )
4491 : : {
4492 : 237 : gimple_seq *lseq = seq;
4493 : 237 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail920;
4494 : 237 : {
4495 : 237 : res_op->set_op (op, type, 2);
4496 : 237 : res_op->ops[0] = captures[2];
4497 : 237 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[2]));
4498 : 237 : res_op->resimplify (lseq, valueize);
4499 : 237 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 343, __FILE__, __LINE__, true);
4500 : 237 : return true;
4501 : : }
4502 : 0 : next_after_fail920:;
4503 : : }
4504 : : return false;
4505 : : }
4506 : :
4507 : : bool
4508 : 1972 : gimple_simplify_238 (gimple_match_op *res_op, gimple_seq *seq,
4509 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4510 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4511 : : const enum tree_code ARG_UNUSED (cmp))
4512 : : {
4513 : 1972 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4514 : 3944 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4515 : 1972 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0]))
4516 : 3944 : && (TREE_INT_CST_LOW (captures[1]) & 1) != 0
4517 : : )
4518 : : {
4519 : 20 : gimple_seq *lseq = seq;
4520 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail925;
4521 : 20 : {
4522 : 20 : res_op->set_op (cmp, type, 2);
4523 : 20 : res_op->ops[0] = captures[0];
4524 : 20 : res_op->ops[1] = captures[2];
4525 : 20 : res_op->resimplify (lseq, valueize);
4526 : 20 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 348, __FILE__, __LINE__, true);
4527 : 20 : return true;
4528 : : }
4529 : 0 : next_after_fail925:;
4530 : : }
4531 : : return false;
4532 : : }
4533 : :
4534 : : bool
4535 : 36884 : gimple_simplify_244 (gimple_match_op *res_op, gimple_seq *seq,
4536 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4537 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4538 : : const enum tree_code ARG_UNUSED (op))
4539 : : {
4540 : 36884 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4541 : 73768 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4542 : 73594 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
4543 : 26377 : || ((op == EQ_EXPR || op == NE_EXPR)
4544 : 8631 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0]))))
4545 : 92732 : && (CONSTANT_CLASS_P (captures[2]) || single_use (captures[1]))
4546 : : )
4547 : : {
4548 : 1739 : gimple_seq *lseq = seq;
4549 : 1739 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail947;
4550 : 1739 : {
4551 : 1739 : res_op->set_op (op, type, 2);
4552 : 1739 : res_op->ops[0] = captures[2];
4553 : 1739 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[2]));
4554 : 1739 : res_op->resimplify (lseq, valueize);
4555 : 1739 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 369, __FILE__, __LINE__, true);
4556 : 1739 : return true;
4557 : : }
4558 : 0 : next_after_fail947:;
4559 : : }
4560 : : return false;
4561 : : }
4562 : :
4563 : : bool
4564 : 100393 : gimple_simplify_248 (gimple_match_op *res_op, gimple_seq *seq,
4565 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4566 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4567 : : const enum tree_code ARG_UNUSED (neeq))
4568 : : {
4569 : 100393 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4570 : 100393 : {
4571 : 100393 : poly_int64 diff; tree inner_type = TREE_TYPE (captures[1]);
4572 : 100393 : if (ptr_difference_const (captures[2], captures[0], &diff)
4573 : : )
4574 : : {
4575 : 4344 : gimple_seq *lseq = seq;
4576 : 4344 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail951;
4577 : 4344 : {
4578 : 4344 : res_op->set_op (neeq, type, 2);
4579 : 4344 : res_op->ops[0] = build_int_cst_type (inner_type, diff);
4580 : 4344 : res_op->ops[1] = captures[1];
4581 : 4344 : res_op->resimplify (lseq, valueize);
4582 : 4344 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 372, __FILE__, __LINE__, true);
4583 : 4344 : return true;
4584 : : }
4585 : 0 : next_after_fail951:;
4586 : : }
4587 : : }
4588 : 96049 : return false;
4589 : : }
4590 : :
4591 : : bool
4592 : 17 : gimple_simplify_251 (gimple_match_op *res_op, gimple_seq *seq,
4593 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4594 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4595 : : const enum tree_code ARG_UNUSED (cmp))
4596 : : {
4597 : 17 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4598 : 17 : if (TREE_INT_CST_LOW (captures[1]) & 1
4599 : : )
4600 : : {
4601 : 15 : gimple_seq *lseq = seq;
4602 : 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail954;
4603 : 15 : {
4604 : 15 : tree tem;
4605 : 15 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4606 : 15 : res_op->set_value (tem);
4607 : 15 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 375, __FILE__, __LINE__, true);
4608 : 15 : return true;
4609 : : }
4610 : 0 : next_after_fail954:;
4611 : : }
4612 : : return false;
4613 : : }
4614 : :
4615 : : bool
4616 : 8402 : gimple_simplify_255 (gimple_match_op *res_op, gimple_seq *seq,
4617 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4618 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4619 : : const enum tree_code ARG_UNUSED (cmp))
4620 : : {
4621 : 8402 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4622 : 8402 : if (wi::lt_p (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
4623 : 8402 : TYPE_SIGN (TREE_TYPE (captures[0])))
4624 : : )
4625 : : {
4626 : 0 : gimple_seq *lseq = seq;
4627 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail958;
4628 : 0 : {
4629 : 0 : tree tem;
4630 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4631 : 0 : res_op->set_value (tem);
4632 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 379, __FILE__, __LINE__, true);
4633 : 0 : return true;
4634 : : }
4635 : 0 : next_after_fail958:;
4636 : : }
4637 : : else
4638 : : {
4639 : 8402 : if (wi::gt_p (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
4640 : 8402 : TYPE_SIGN (TREE_TYPE (captures[0])))
4641 : : )
4642 : : {
4643 : 8402 : gimple_seq *lseq = seq;
4644 : 8402 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail959;
4645 : 8402 : {
4646 : 8402 : res_op->set_op (cmp, type, 2);
4647 : 8402 : res_op->ops[0] = captures[0];
4648 : 8402 : res_op->ops[1] = captures[2];
4649 : 8402 : res_op->resimplify (lseq, valueize);
4650 : 8402 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 380, __FILE__, __LINE__, true);
4651 : 8402 : return true;
4652 : : }
4653 : 0 : next_after_fail959:;
4654 : : }
4655 : : }
4656 : : return false;
4657 : : }
4658 : :
4659 : : bool
4660 : 8 : gimple_simplify_260 (gimple_match_op *res_op, gimple_seq *seq,
4661 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4662 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4663 : : const enum tree_code ARG_UNUSED (cmp),
4664 : : const enum tree_code ARG_UNUSED (icmp))
4665 : : {
4666 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4667 : 8 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4668 : : )
4669 : : {
4670 : 8 : gimple_seq *lseq = seq;
4671 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail967;
4672 : 8 : {
4673 : 8 : res_op->set_op (icmp, type, 2);
4674 : 8 : res_op->ops[0] = captures[0];
4675 : 8 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[0]),
4676 : 8 : wi::exact_log2 (wi::to_wide (captures[1])));
4677 : 8 : res_op->resimplify (lseq, valueize);
4678 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 388, __FILE__, __LINE__, true);
4679 : 8 : return true;
4680 : : }
4681 : 0 : next_after_fail967:;
4682 : : }
4683 : : return false;
4684 : : }
4685 : :
4686 : : bool
4687 : 16681 : gimple_simplify_262 (gimple_match_op *res_op, gimple_seq *seq,
4688 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4689 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4690 : : const enum tree_code ARG_UNUSED (cmp))
4691 : : {
4692 : 16681 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4693 : 16681 : if (tree_fits_shwi_p (captures[3])
4694 : 16681 : && tree_to_shwi (captures[3]) > 0
4695 : 33334 : && tree_to_shwi (captures[3]) < TYPE_PRECISION (TREE_TYPE (captures[2]))
4696 : : )
4697 : : {
4698 : 16649 : {
4699 : 16649 : tree t0 = TREE_TYPE (captures[2]);
4700 : 16649 : unsigned int prec = TYPE_PRECISION (t0);
4701 : 16649 : wide_int c1 = wi::to_wide (captures[3]);
4702 : 16649 : wide_int c2 = wi::to_wide (captures[4]);
4703 : 16649 : wide_int c3 = wi::to_wide (captures[5]);
4704 : 16649 : wide_int sb = wi::set_bit_in_zero (prec - 1, prec);
4705 : 16649 : if ((c2 & c3) != c3
4706 : : )
4707 : : {
4708 : 0 : gimple_seq *lseq = seq;
4709 : 0 : if (lseq
4710 : : && (!single_use (captures[0])
4711 : : || !single_use (captures[1])))
4712 : 0 : lseq = NULL;
4713 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail970;
4714 : 0 : {
4715 : 0 : tree tem;
4716 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4717 : 0 : res_op->set_value (tem);
4718 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 391, __FILE__, __LINE__, true);
4719 : 0 : return true;
4720 : : }
4721 : 0 : next_after_fail970:;
4722 : : }
4723 : : else
4724 : : {
4725 : 16649 : if (TYPE_UNSIGNED (t0)
4726 : : )
4727 : : {
4728 : 14949 : if ((c3 & wi::arshift (sb, c1 - 1)) != 0
4729 : : )
4730 : : {
4731 : 0 : gimple_seq *lseq = seq;
4732 : 0 : if (lseq
4733 : : && (!single_use (captures[0])
4734 : : || !single_use (captures[1])))
4735 : 0 : lseq = NULL;
4736 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail971;
4737 : 0 : {
4738 : 0 : tree tem;
4739 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4740 : 0 : res_op->set_value (tem);
4741 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 392, __FILE__, __LINE__, true);
4742 : 0 : return true;
4743 : : }
4744 : 0 : next_after_fail971:;
4745 : : }
4746 : : else
4747 : : {
4748 : 14949 : gimple_seq *lseq = seq;
4749 : 14949 : if (lseq
4750 : 4768 : && (!single_use (captures[0])
4751 : 1420 : || !single_use (captures[1])))
4752 : 14111 : lseq = NULL;
4753 : 14949 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail972;
4754 : 14949 : {
4755 : 14949 : res_op->set_op (cmp, type, 2);
4756 : 14949 : {
4757 : 14949 : tree _o1[2], _r1;
4758 : 14949 : _o1[0] = captures[2];
4759 : 14949 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
4760 : 14949 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4761 : 14949 : tem_op.resimplify (lseq, valueize);
4762 : 14949 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4763 : 14949 : if (!_r1) goto next_after_fail972;
4764 : 838 : res_op->ops[0] = _r1;
4765 : : }
4766 : 838 : res_op->ops[1] = wide_int_to_tree (t0, c3 << c1);
4767 : 838 : res_op->resimplify (lseq, valueize);
4768 : 838 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 393, __FILE__, __LINE__, true);
4769 : 838 : return true;
4770 : : }
4771 : 15644 : next_after_fail972:;
4772 : : }
4773 : : }
4774 : : else
4775 : : {
4776 : 1700 : {
4777 : 1700 : wide_int smask = wi::arshift (sb, c1);
4778 : 1700 : if ((c2 & smask) == 0
4779 : : )
4780 : : {
4781 : 1653 : gimple_seq *lseq = seq;
4782 : 1653 : if (lseq
4783 : 455 : && (!single_use (captures[0])
4784 : 206 : || !single_use (captures[1])))
4785 : 1495 : lseq = NULL;
4786 : 1653 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail973;
4787 : 1653 : {
4788 : 1653 : res_op->set_op (cmp, type, 2);
4789 : 1653 : {
4790 : 1653 : tree _o1[2], _r1;
4791 : 1653 : _o1[0] = captures[2];
4792 : 1653 : _o1[1] = wide_int_to_tree (t0, c2 << c1);
4793 : 1653 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4794 : 1653 : tem_op.resimplify (lseq, valueize);
4795 : 1653 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4796 : 1653 : if (!_r1) goto next_after_fail973;
4797 : 158 : res_op->ops[0] = _r1;
4798 : : }
4799 : 158 : res_op->ops[1] = wide_int_to_tree (t0, c3 << c1);
4800 : 158 : res_op->resimplify (lseq, valueize);
4801 : 158 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 394, __FILE__, __LINE__, true);
4802 : 158 : return true;
4803 : : }
4804 : 1533 : next_after_fail973:;
4805 : : }
4806 : : else
4807 : : {
4808 : 47 : if ((c3 & smask) == 0
4809 : : )
4810 : : {
4811 : 29 : gimple_seq *lseq = seq;
4812 : 29 : if (lseq
4813 : 7 : && (!single_use (captures[0])
4814 : 5 : || !single_use (captures[1])))
4815 : 26 : lseq = NULL;
4816 : 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail974;
4817 : 29 : {
4818 : 29 : res_op->set_op (cmp, type, 2);
4819 : 29 : {
4820 : 29 : tree _o1[2], _r1;
4821 : 29 : _o1[0] = captures[2];
4822 : 29 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
4823 : 29 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4824 : 29 : tem_op.resimplify (lseq, valueize);
4825 : 29 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4826 : 29 : if (!_r1) goto next_after_fail974;
4827 : 3 : res_op->ops[0] = _r1;
4828 : : }
4829 : 3 : res_op->ops[1] = wide_int_to_tree (t0, c3 << c1);
4830 : 3 : res_op->resimplify (lseq, valueize);
4831 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 395, __FILE__, __LINE__, true);
4832 : 3 : return true;
4833 : : }
4834 : 1533 : next_after_fail974:;
4835 : : }
4836 : : else
4837 : : {
4838 : 18 : if ((c2 & smask) != (c3 & smask)
4839 : : )
4840 : : {
4841 : 2 : gimple_seq *lseq = seq;
4842 : 2 : if (lseq
4843 : : && (!single_use (captures[0])
4844 : : || !single_use (captures[1])))
4845 : 2 : lseq = NULL;
4846 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail975;
4847 : 2 : {
4848 : 2 : tree tem;
4849 : 2 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4850 : 2 : res_op->set_value (tem);
4851 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 396, __FILE__, __LINE__, true);
4852 : 2 : return true;
4853 : : }
4854 : 0 : next_after_fail975:;
4855 : : }
4856 : : else
4857 : : {
4858 : 16 : gimple_seq *lseq = seq;
4859 : 16 : if (lseq
4860 : 12 : && (!single_use (captures[0])
4861 : 8 : || !single_use (captures[1])))
4862 : 12 : lseq = NULL;
4863 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail976;
4864 : 16 : {
4865 : 16 : res_op->set_op (cmp, type, 2);
4866 : 16 : {
4867 : 16 : tree _o1[2], _r1;
4868 : 16 : _o1[0] = captures[2];
4869 : 16 : _o1[1] = wide_int_to_tree (t0, (c2 << c1) | sb);
4870 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4871 : 16 : tem_op.resimplify (lseq, valueize);
4872 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4873 : 16 : if (!_r1) goto next_after_fail976;
4874 : 4 : res_op->ops[0] = _r1;
4875 : : }
4876 : 4 : res_op->ops[1] = wide_int_to_tree (t0, (c3 << c1) | sb);
4877 : 4 : res_op->resimplify (lseq, valueize);
4878 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 397, __FILE__, __LINE__, true);
4879 : 4 : return true;
4880 : : }
4881 : 1533 : next_after_fail976:;
4882 : : }
4883 : : }
4884 : : }
4885 : 1700 : }
4886 : : }
4887 : : }
4888 : 16649 : }
4889 : : }
4890 : : return false;
4891 : : }
4892 : :
4893 : : bool
4894 : 2258 : gimple_simplify_283 (gimple_match_op *res_op, gimple_seq *seq,
4895 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4896 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4897 : : const enum tree_code ARG_UNUSED (cmp))
4898 : : {
4899 : 2258 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4900 : 2258 : if (flag_associative_math
4901 : : )
4902 : : {
4903 : 9 : {
4904 : 9 : tree tem = const_binop (MINUS_EXPR, TREE_TYPE (captures[1]), captures[0], captures[2]);
4905 : 9 : if (tem && !TREE_OVERFLOW (tem)
4906 : : )
4907 : : {
4908 : 9 : gimple_seq *lseq = seq;
4909 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1018;
4910 : 9 : {
4911 : 9 : res_op->set_op (cmp, type, 2);
4912 : 9 : res_op->ops[0] = tem;
4913 : 9 : res_op->ops[1] = captures[1];
4914 : 9 : res_op->resimplify (lseq, valueize);
4915 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 437, __FILE__, __LINE__, true);
4916 : 9 : return true;
4917 : : }
4918 : 0 : next_after_fail1018:;
4919 : : }
4920 : : }
4921 : : }
4922 : : return false;
4923 : : }
4924 : :
4925 : : bool
4926 : 46750 : gimple_simplify_288 (gimple_match_op *res_op, gimple_seq *seq,
4927 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4928 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4929 : : const enum tree_code ARG_UNUSED (cmp))
4930 : : {
4931 : 46750 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4932 : 46750 : if (!integer_zerop (captures[1])
4933 : : )
4934 : : {
4935 : 46750 : if (wi::to_wide (captures[2]) == 0
4936 : : )
4937 : : {
4938 : 24733 : gimple_seq *lseq = seq;
4939 : 24733 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1048;
4940 : 24733 : {
4941 : 24733 : res_op->set_op (cmp, type, 2);
4942 : 24733 : res_op->ops[0] = captures[0];
4943 : 24733 : res_op->ops[1] = captures[2];
4944 : 24733 : res_op->resimplify (lseq, valueize);
4945 : 24733 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 467, __FILE__, __LINE__, true);
4946 : 24733 : return true;
4947 : : }
4948 : 0 : next_after_fail1048:;
4949 : : }
4950 : : else
4951 : : {
4952 : 22017 : if (TREE_CODE (captures[1]) == INTEGER_CST
4953 : : )
4954 : : {
4955 : 22017 : {
4956 : 22017 : wi::overflow_type ovf;
4957 : 22017 : wide_int prod = wi::mul (wi::to_wide (captures[2]), wi::to_wide (captures[1]),
4958 : 44034 : TYPE_SIGN (TREE_TYPE (captures[1])), &ovf);
4959 : 22017 : if (ovf
4960 : : )
4961 : : {
4962 : 1 : gimple_seq *lseq = seq;
4963 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1049;
4964 : 1 : {
4965 : 1 : tree tem;
4966 : 1 : tem = constant_boolean_node (cmp == NE_EXPR, type);
4967 : 1 : res_op->set_value (tem);
4968 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 468, __FILE__, __LINE__, true);
4969 : 1 : return true;
4970 : : }
4971 : 0 : next_after_fail1049:;
4972 : : }
4973 : : else
4974 : : {
4975 : 22016 : gimple_seq *lseq = seq;
4976 : 22016 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1050;
4977 : 22016 : {
4978 : 22016 : res_op->set_op (cmp, type, 2);
4979 : 22016 : res_op->ops[0] = captures[0];
4980 : 22016 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[0]), prod);
4981 : 22016 : res_op->resimplify (lseq, valueize);
4982 : 22016 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 469, __FILE__, __LINE__, true);
4983 : 22016 : return true;
4984 : : }
4985 : 0 : next_after_fail1050:;
4986 : : }
4987 : 22017 : }
4988 : : }
4989 : : }
4990 : : }
4991 : : return false;
4992 : : }
4993 : :
4994 : : bool
4995 : 727309 : gimple_simplify_291 (gimple_match_op *res_op, gimple_seq *seq,
4996 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4997 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4998 : : const enum tree_code ARG_UNUSED (cmp))
4999 : : {
5000 : 727309 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5001 : 1454610 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
5002 : 713798 : && !(targetm.have_canonicalize_funcptr_for_compare ()
5003 : 0 : && ((POINTER_TYPE_P (TREE_TYPE (captures[1]))
5004 : 0 : && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[1]))))
5005 : 0 : || (POINTER_TYPE_P (TREE_TYPE (captures[3]))
5006 : 0 : && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (TREE_TYPE (captures[3]))))))
5007 : 1441107 : && single_use (captures[0])
5008 : : )
5009 : : {
5010 : 485912 : if (TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (TREE_TYPE (captures[0]))
5011 : 386259 : && (TREE_CODE (captures[3]) == INTEGER_CST
5012 : 386259 : || captures[2] != captures[3])
5013 : 386259 : && (TYPE_UNSIGNED (TREE_TYPE (captures[1])) == TYPE_UNSIGNED (TREE_TYPE (captures[0]))
5014 : : || cmp == NE_EXPR
5015 : 335542 : || cmp == EQ_EXPR)
5016 : 71513 : && !POINTER_TYPE_P (TREE_TYPE (captures[1]))
5017 : 493714 : && (TREE_CODE (TREE_TYPE (captures[1])) != BOOLEAN_TYPE
5018 : 33 : || TREE_CODE (TREE_TYPE (captures[3])) == BOOLEAN_TYPE)
5019 : : )
5020 : : {
5021 : 7802 : if (TREE_CODE (captures[2]) == INTEGER_CST
5022 : : )
5023 : : {
5024 : 0 : gimple_seq *lseq = seq;
5025 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1053;
5026 : 0 : {
5027 : 0 : res_op->set_op (cmp, type, 2);
5028 : 0 : res_op->ops[0] = captures[1];
5029 : 0 : res_op->ops[1] = force_fit_type (TREE_TYPE (captures[1]),
5030 : 0 : wide_int::from (wi::to_wide (captures[2]),
5031 : 0 : MAX (TYPE_PRECISION (TREE_TYPE (captures[2])),
5032 : : TYPE_PRECISION (TREE_TYPE (captures[1]))),
5033 : 0 : TYPE_SIGN (TREE_TYPE (captures[2]))),
5034 : 0 : 0, TREE_OVERFLOW (captures[2]));
5035 : 0 : res_op->resimplify (lseq, valueize);
5036 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 472, __FILE__, __LINE__, true);
5037 : 0 : return true;
5038 : : }
5039 : 0 : next_after_fail1053:;
5040 : : }
5041 : : else
5042 : : {
5043 : 7802 : gimple_seq *lseq = seq;
5044 : 7802 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1054;
5045 : 7802 : {
5046 : 7802 : res_op->set_op (cmp, type, 2);
5047 : 7802 : res_op->ops[0] = captures[1];
5048 : 7802 : {
5049 : 7802 : tree _o1[1], _r1;
5050 : 7802 : _o1[0] = captures[2];
5051 : 7802 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0]) /* XXX */
5052 : 7802 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
5053 : : {
5054 : 7802 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
5055 : 7802 : tem_op.resimplify (lseq, valueize);
5056 : 7802 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5057 : 7802 : if (!_r1) goto next_after_fail1054;
5058 : : }
5059 : : else
5060 : : _r1 = _o1[0];
5061 : 7518 : res_op->ops[1] = _r1;
5062 : : }
5063 : 7518 : res_op->resimplify (lseq, valueize);
5064 : 7518 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 473, __FILE__, __LINE__, true);
5065 : 7518 : return true;
5066 : : }
5067 : : next_after_fail1054:;
5068 : : }
5069 : : }
5070 : : else
5071 : : {
5072 : 478110 : if (TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
5073 : : )
5074 : : {
5075 : 78282 : if ((cmp == EQ_EXPR || cmp == NE_EXPR
5076 : 49247 : || TYPE_UNSIGNED (TREE_TYPE (captures[0])) == TYPE_UNSIGNED (TREE_TYPE (captures[1]))
5077 : 40648 : || (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
5078 : 40116 : && TYPE_UNSIGNED (TREE_TYPE (captures[1]))))
5079 : 126997 : && (types_match (TREE_TYPE (captures[3]), TREE_TYPE (captures[1]))
5080 : 69289 : || ((TYPE_PRECISION (TREE_TYPE (captures[1]))
5081 : 69289 : >= TYPE_PRECISION (TREE_TYPE (captures[3])))
5082 : 41136 : && (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
5083 : 41136 : == TYPE_UNSIGNED (TREE_TYPE (captures[3]))))
5084 : 69024 : || (TREE_CODE (captures[2]) == INTEGER_CST
5085 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5086 : 0 : && int_fits_type_p (captures[2], TREE_TYPE (captures[1]))))
5087 : : )
5088 : : {
5089 : 8726 : gimple_seq *lseq = seq;
5090 : 8726 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1055;
5091 : 8726 : {
5092 : 8726 : res_op->set_op (cmp, type, 2);
5093 : 8726 : res_op->ops[0] = captures[1];
5094 : 8726 : {
5095 : 8726 : tree _o1[1], _r1;
5096 : 8726 : _o1[0] = captures[3];
5097 : 8726 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0]) /* XXX */
5098 : 8726 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
5099 : : {
5100 : 265 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
5101 : 265 : tem_op.resimplify (lseq, valueize);
5102 : 265 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5103 : 265 : if (!_r1) goto next_after_fail1055;
5104 : : }
5105 : : else
5106 : : _r1 = _o1[0];
5107 : 8534 : res_op->ops[1] = _r1;
5108 : : }
5109 : 8534 : res_op->resimplify (lseq, valueize);
5110 : 8534 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 474, __FILE__, __LINE__, true);
5111 : 8534 : return true;
5112 : : }
5113 : : next_after_fail1055:;
5114 : : }
5115 : : else
5116 : : {
5117 : 69556 : if (TREE_CODE (captures[2]) == INTEGER_CST
5118 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5119 : 69556 : && !int_fits_type_p (captures[2], TREE_TYPE (captures[1]))
5120 : : )
5121 : : {
5122 : 0 : {
5123 : 0 : tree min = lower_bound_in_type (TREE_TYPE (captures[3]), TREE_TYPE (captures[1]));
5124 : 0 : tree max = upper_bound_in_type (TREE_TYPE (captures[3]), TREE_TYPE (captures[1]));
5125 : 0 : bool above = integer_nonzerop (const_binop (LT_EXPR, type, max, captures[2]));
5126 : 0 : bool below = integer_nonzerop (const_binop (LT_EXPR, type, captures[2], min));
5127 : 0 : if (above || below
5128 : : )
5129 : : {
5130 : 0 : if (cmp == EQ_EXPR || cmp == NE_EXPR
5131 : : )
5132 : : {
5133 : 0 : gimple_seq *lseq = seq;
5134 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1056;
5135 : 0 : {
5136 : 0 : tree tem;
5137 : 0 : tem = constant_boolean_node (cmp == EQ_EXPR ? false : true, type);
5138 : 0 : res_op->set_value (tem);
5139 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 475, __FILE__, __LINE__, true);
5140 : 0 : return true;
5141 : : }
5142 : 0 : next_after_fail1056:;
5143 : : }
5144 : : else
5145 : : {
5146 : 0 : if (cmp == LT_EXPR || cmp == LE_EXPR
5147 : : )
5148 : : {
5149 : 0 : gimple_seq *lseq = seq;
5150 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1057;
5151 : 0 : {
5152 : 0 : tree tem;
5153 : 0 : tem = constant_boolean_node (above ? true : false, type);
5154 : 0 : res_op->set_value (tem);
5155 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 476, __FILE__, __LINE__, true);
5156 : 0 : return true;
5157 : : }
5158 : 0 : next_after_fail1057:;
5159 : : }
5160 : : else
5161 : : {
5162 : 0 : if (cmp == GT_EXPR || cmp == GE_EXPR
5163 : : )
5164 : : {
5165 : 0 : gimple_seq *lseq = seq;
5166 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1058;
5167 : 0 : {
5168 : 0 : tree tem;
5169 : 0 : tem = constant_boolean_node (above ? false : true, type);
5170 : 0 : res_op->set_value (tem);
5171 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 477, __FILE__, __LINE__, true);
5172 : 0 : return true;
5173 : : }
5174 : 0 : next_after_fail1058:;
5175 : : }
5176 : : }
5177 : : }
5178 : : }
5179 : : }
5180 : : }
5181 : : }
5182 : : }
5183 : : }
5184 : : }
5185 : : else
5186 : : {
5187 : 480831 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
5188 : 3954 : && (DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
5189 : 1977 : == DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[1])))
5190 : 245351 : && (DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
5191 : 1977 : == DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[3])))
5192 : : )
5193 : : {
5194 : 1977 : {
5195 : 1977 : tree type1 = TREE_TYPE (captures[3]);
5196 : 1977 : if (TREE_CODE (captures[3]) == REAL_CST && !DECIMAL_FLOAT_TYPE_P (type1))
5197 : : {
5198 : 0 : REAL_VALUE_TYPE orig = TREE_REAL_CST (captures[3]);
5199 : 0 : if (TYPE_PRECISION (type1) > TYPE_PRECISION (float_type_node)
5200 : 0 : && exact_real_truncate (TYPE_MODE (float_type_node), &orig))
5201 : 0 : type1 = float_type_node;
5202 : 0 : if (TYPE_PRECISION (type1) > TYPE_PRECISION (double_type_node)
5203 : 0 : && exact_real_truncate (TYPE_MODE (double_type_node), &orig))
5204 : 0 : type1 = double_type_node;
5205 : : }
5206 : 1977 : tree newtype
5207 : 1977 : = (element_precision (TREE_TYPE (captures[1])) > element_precision (type1)
5208 : 1977 : ? TREE_TYPE (captures[1]) : type1);
5209 : 1977 : if (element_precision (TREE_TYPE (captures[0])) > element_precision (newtype)
5210 : 1977 : && (!VECTOR_TYPE_P (type) || is_truth_type_for (newtype, type))
5211 : : )
5212 : : {
5213 : 562 : gimple_seq *lseq = seq;
5214 : 562 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1059;
5215 : 562 : {
5216 : 562 : res_op->set_op (cmp, type, 2);
5217 : 562 : {
5218 : 562 : tree _o1[1], _r1;
5219 : 562 : _o1[0] = captures[1];
5220 : 562 : if (newtype != TREE_TYPE (_o1[0]) /* XXX */
5221 : 562 : && !useless_type_conversion_p (newtype, TREE_TYPE (_o1[0])))
5222 : : {
5223 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, newtype, _o1[0]);
5224 : 4 : tem_op.resimplify (lseq, valueize);
5225 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5226 : 4 : if (!_r1) goto next_after_fail1059;
5227 : : }
5228 : : else
5229 : : _r1 = _o1[0];
5230 : 562 : res_op->ops[0] = _r1;
5231 : : }
5232 : 562 : {
5233 : 562 : tree _o1[1], _r1;
5234 : 562 : _o1[0] = captures[3];
5235 : 562 : if (newtype != TREE_TYPE (_o1[0]) /* XXX */
5236 : 562 : && !useless_type_conversion_p (newtype, TREE_TYPE (_o1[0])))
5237 : : {
5238 : 7 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, newtype, _o1[0]);
5239 : 7 : tem_op.resimplify (lseq, valueize);
5240 : 7 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5241 : 7 : if (!_r1) goto next_after_fail1059;
5242 : : }
5243 : : else
5244 : : _r1 = _o1[0];
5245 : 558 : res_op->ops[1] = _r1;
5246 : : }
5247 : 558 : res_op->resimplify (lseq, valueize);
5248 : 558 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 478, __FILE__, __LINE__, true);
5249 : 558 : return true;
5250 : : }
5251 : : next_after_fail1059:;
5252 : : }
5253 : : }
5254 : : }
5255 : : }
5256 : : return false;
5257 : : }
5258 : :
5259 : : bool
5260 : 1195 : gimple_simplify_309 (gimple_match_op *res_op, gimple_seq *seq,
5261 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5262 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5263 : : const enum tree_code ARG_UNUSED (cmp))
5264 : : {
5265 : 1195 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5266 : 1195 : {
5267 : 1195 : poly_int64 off0, off1;
5268 : 1195 : tree base0, base1;
5269 : 1195 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[2], base0, base1,
5270 : : off0, off1,
5271 : :
5272 : : );
5273 : 1195 : if (equal == 1
5274 : : )
5275 : : {
5276 : 184 : if (cmp == EQ_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
5277 : : )
5278 : : {
5279 : 48 : gimple_seq *lseq = seq;
5280 : 48 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1086;
5281 : 48 : {
5282 : 48 : tree tem;
5283 : 48 : tem = constant_boolean_node (known_eq (off0, off1), type);
5284 : 48 : res_op->set_value (tem);
5285 : 48 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 496, __FILE__, __LINE__, true);
5286 : 333 : return true;
5287 : : }
5288 : 0 : next_after_fail1086:;
5289 : : }
5290 : : else
5291 : : {
5292 : 75 : if (cmp == NE_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
5293 : : )
5294 : : {
5295 : 75 : gimple_seq *lseq = seq;
5296 : 75 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1087;
5297 : 75 : {
5298 : 75 : tree tem;
5299 : 75 : tem = constant_boolean_node (known_ne (off0, off1), type);
5300 : 75 : res_op->set_value (tem);
5301 : 75 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 497, __FILE__, __LINE__, true);
5302 : 75 : return true;
5303 : : }
5304 : 0 : next_after_fail1087:;
5305 : : }
5306 : : else
5307 : : {
5308 : 20 : if (cmp == LT_EXPR && (known_lt (off0, off1) || known_ge (off0, off1))
5309 : : )
5310 : : {
5311 : 20 : gimple_seq *lseq = seq;
5312 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1088;
5313 : 20 : {
5314 : 20 : tree tem;
5315 : 20 : tem = constant_boolean_node (known_lt (off0, off1), type);
5316 : 20 : res_op->set_value (tem);
5317 : 20 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 498, __FILE__, __LINE__, true);
5318 : 20 : return true;
5319 : : }
5320 : 0 : next_after_fail1088:;
5321 : : }
5322 : : else
5323 : : {
5324 : 11 : if (cmp == LE_EXPR && (known_le (off0, off1) || known_gt (off0, off1))
5325 : : )
5326 : : {
5327 : 11 : gimple_seq *lseq = seq;
5328 : 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1089;
5329 : 11 : {
5330 : 11 : tree tem;
5331 : 11 : tem = constant_boolean_node (known_le (off0, off1), type);
5332 : 11 : res_op->set_value (tem);
5333 : 11 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 499, __FILE__, __LINE__, true);
5334 : 11 : return true;
5335 : : }
5336 : 0 : next_after_fail1089:;
5337 : : }
5338 : : else
5339 : : {
5340 : 14 : if (cmp == GE_EXPR && (known_ge (off0, off1) || known_lt (off0, off1))
5341 : : )
5342 : : {
5343 : 14 : gimple_seq *lseq = seq;
5344 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1090;
5345 : 14 : {
5346 : 14 : tree tem;
5347 : 14 : tem = constant_boolean_node (known_ge (off0, off1), type);
5348 : 14 : res_op->set_value (tem);
5349 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 500, __FILE__, __LINE__, true);
5350 : 14 : return true;
5351 : : }
5352 : 0 : next_after_fail1090:;
5353 : : }
5354 : : else
5355 : : {
5356 : 16 : if (cmp == GT_EXPR && (known_gt (off0, off1) || known_le (off0, off1))
5357 : : )
5358 : : {
5359 : 16 : gimple_seq *lseq = seq;
5360 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1091;
5361 : 16 : {
5362 : 16 : tree tem;
5363 : 16 : tem = constant_boolean_node (known_gt (off0, off1), type);
5364 : 16 : res_op->set_value (tem);
5365 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 501, __FILE__, __LINE__, true);
5366 : 16 : return true;
5367 : : }
5368 : 0 : next_after_fail1091:;
5369 : : }
5370 : : }
5371 : : }
5372 : : }
5373 : : }
5374 : : }
5375 : : }
5376 : : else
5377 : : {
5378 : 1011 : if (equal == 0
5379 : : )
5380 : : {
5381 : 149 : if (cmp == EQ_EXPR
5382 : : )
5383 : : {
5384 : 122 : gimple_seq *lseq = seq;
5385 : 122 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1092;
5386 : 122 : {
5387 : 122 : tree tem;
5388 : 122 : tem = constant_boolean_node (false, type);
5389 : 122 : res_op->set_value (tem);
5390 : 122 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 502, __FILE__, __LINE__, true);
5391 : 122 : return true;
5392 : : }
5393 : 0 : next_after_fail1092:;
5394 : : }
5395 : : else
5396 : : {
5397 : 27 : if (cmp == NE_EXPR
5398 : : )
5399 : : {
5400 : 27 : gimple_seq *lseq = seq;
5401 : 27 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1093;
5402 : 27 : {
5403 : 27 : tree tem;
5404 : 27 : tem = constant_boolean_node (true, type);
5405 : 27 : res_op->set_value (tem);
5406 : 27 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 503, __FILE__, __LINE__, true);
5407 : 27 : return true;
5408 : : }
5409 : 0 : next_after_fail1093:;
5410 : : }
5411 : : }
5412 : : }
5413 : : }
5414 : : }
5415 : 862 : return false;
5416 : : }
5417 : :
5418 : : bool
5419 : 0 : gimple_simplify_321 (gimple_match_op *res_op, gimple_seq *seq,
5420 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5421 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5422 : : const enum tree_code ARG_UNUSED (op))
5423 : : {
5424 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5425 : 0 : {
5426 : 0 : HOST_WIDE_INT zero_val = tree_to_shwi (captures[2]);
5427 : 0 : tree type0 = TREE_TYPE (captures[1]);
5428 : 0 : int prec = TYPE_PRECISION (type0);
5429 : 0 : if (prec <= MAX_FIXED_MODE_SIZE
5430 : : )
5431 : : {
5432 : 0 : if (tree_int_cst_sgn (captures[3]) < 0 || wi::to_widest (captures[3]) >= prec
5433 : : )
5434 : : {
5435 : 0 : if (zero_val != wi::to_widest (captures[3])
5436 : : )
5437 : : {
5438 : 0 : gimple_seq *lseq = seq;
5439 : 0 : if (lseq
5440 : : && (!single_use (captures[0])))
5441 : : lseq = NULL;
5442 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1128;
5443 : 0 : {
5444 : 0 : tree tem;
5445 : 0 : tem = constant_boolean_node (op == EQ_EXPR ? false : true, type);
5446 : 0 : res_op->set_value (tem);
5447 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 530, __FILE__, __LINE__, true);
5448 : 0 : return true;
5449 : : }
5450 : 0 : next_after_fail1128:;
5451 : : }
5452 : : }
5453 : : else
5454 : : {
5455 : 0 : if (zero_val < 0 || zero_val >= prec
5456 : : )
5457 : : {
5458 : 0 : gimple_seq *lseq = seq;
5459 : 0 : if (lseq
5460 : 0 : && (!single_use (captures[0])))
5461 : 0 : lseq = NULL;
5462 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1129;
5463 : 0 : {
5464 : 0 : res_op->set_op (op, type, 2);
5465 : 0 : {
5466 : 0 : tree _o1[2], _r1;
5467 : 0 : _o1[0] = captures[1];
5468 : 0 : _o1[1] = wide_int_to_tree (type0,
5469 : 0 : wi::mask (tree_to_uhwi (captures[3]) + 1,
5470 : : false, prec));
5471 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5472 : 0 : tem_op.resimplify (lseq, valueize);
5473 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5474 : 0 : if (!_r1) goto next_after_fail1129;
5475 : 0 : res_op->ops[0] = _r1;
5476 : : }
5477 : 0 : res_op->ops[1] = wide_int_to_tree (type0,
5478 : 0 : wi::shifted_mask (tree_to_uhwi (captures[3]), 1,
5479 : : false, prec));
5480 : 0 : res_op->resimplify (lseq, valueize);
5481 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 531, __FILE__, __LINE__, true);
5482 : 0 : return true;
5483 : : }
5484 : 0 : next_after_fail1129:;
5485 : : }
5486 : : }
5487 : : }
5488 : : }
5489 : 0 : return false;
5490 : : }
5491 : :
5492 : : bool
5493 : 4046 : gimple_simplify_330 (gimple_match_op *res_op, gimple_seq *seq,
5494 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5495 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5496 : : const combined_fn ARG_UNUSED (copysigns))
5497 : : {
5498 : 4046 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5499 : 4046 : if (!REAL_VALUE_NEGATIVE (TREE_REAL_CST (captures[1]))
5500 : : )
5501 : : {
5502 : 188 : gimple_seq *lseq = seq;
5503 : 188 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1141;
5504 : 188 : {
5505 : 188 : res_op->set_op (ABS_EXPR, type, 1);
5506 : 188 : res_op->ops[0] = captures[0];
5507 : 188 : res_op->resimplify (lseq, valueize);
5508 : 188 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 543, __FILE__, __LINE__, true);
5509 : 188 : return true;
5510 : : }
5511 : 0 : next_after_fail1141:;
5512 : : }
5513 : : else
5514 : : {
5515 : 3858 : if (!direct_internal_fn_supported_p (IFN_COPYSIGN, type,
5516 : : OPTIMIZE_FOR_BOTH)
5517 : : )
5518 : : {
5519 : 7 : gimple_seq *lseq = seq;
5520 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1142;
5521 : 7 : {
5522 : 7 : res_op->set_op (NEGATE_EXPR, type, 1);
5523 : 7 : {
5524 : 7 : tree _o1[1], _r1;
5525 : 7 : _o1[0] = captures[0];
5526 : 7 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
5527 : 7 : tem_op.resimplify (lseq, valueize);
5528 : 7 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5529 : 7 : if (!_r1) goto next_after_fail1142;
5530 : 7 : res_op->ops[0] = _r1;
5531 : : }
5532 : 7 : res_op->resimplify (lseq, valueize);
5533 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 544, __FILE__, __LINE__, true);
5534 : 7 : return true;
5535 : : }
5536 : : next_after_fail1142:;
5537 : : }
5538 : : }
5539 : : return false;
5540 : : }
5541 : :
5542 : : bool
5543 : 1158 : gimple_simplify_340 (gimple_match_op *res_op, gimple_seq *seq,
5544 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5545 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5546 : : const enum tree_code ARG_UNUSED (div))
5547 : : {
5548 : 1158 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5549 : 2316 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
5550 : 1158 : && !integer_zerop (captures[0])
5551 : 1184 : && (!flag_non_call_exceptions || tree_expr_nonzero_p (captures[0]))
5552 : : )
5553 : : {
5554 : 22 : gimple_seq *lseq = seq;
5555 : 22 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1154;
5556 : 22 : {
5557 : 22 : tree tem;
5558 : 22 : tem = build_one_cst (type);
5559 : 22 : res_op->set_value (tem);
5560 : 22 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 554, __FILE__, __LINE__, true);
5561 : 22 : return true;
5562 : : }
5563 : 0 : next_after_fail1154:;
5564 : : }
5565 : : return false;
5566 : : }
5567 : :
5568 : : bool
5569 : 2849 : gimple_simplify_344 (gimple_match_op *res_op, gimple_seq *seq,
5570 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5571 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5572 : : const enum tree_code ARG_UNUSED (div))
5573 : : {
5574 : 2849 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5575 : 2849 : if (integer_pow2p (captures[2])
5576 : 20 : && tree_int_cst_sgn (captures[2]) > 0
5577 : 20 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
5578 : 5698 : && wi::to_wide (captures[2]) + wi::to_wide (captures[1]) == 0
5579 : : )
5580 : : {
5581 : 0 : gimple_seq *lseq = seq;
5582 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1159;
5583 : 0 : {
5584 : 0 : res_op->set_op (RSHIFT_EXPR, type, 2);
5585 : 0 : {
5586 : 0 : tree _o1[1], _r1;
5587 : 0 : _o1[0] = captures[0];
5588 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
5589 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
5590 : : {
5591 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
5592 : 0 : tem_op.resimplify (lseq, valueize);
5593 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5594 : 0 : if (!_r1) goto next_after_fail1159;
5595 : : }
5596 : : else
5597 : : _r1 = _o1[0];
5598 : 0 : res_op->ops[0] = _r1;
5599 : : }
5600 : 0 : res_op->ops[1] = build_int_cst (integer_type_node,
5601 : 0 : wi::exact_log2 (wi::to_wide (captures[2])));
5602 : 0 : res_op->resimplify (lseq, valueize);
5603 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 559, __FILE__, __LINE__, true);
5604 : 0 : return true;
5605 : : }
5606 : : next_after_fail1159:;
5607 : : }
5608 : : return false;
5609 : : }
5610 : :
5611 : : bool
5612 : 621 : gimple_simplify_350 (gimple_match_op *res_op, gimple_seq *seq,
5613 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5614 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5615 : : const enum tree_code ARG_UNUSED (div))
5616 : : {
5617 : 621 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5618 : 621 : {
5619 : 621 : int_range_max vr0, vr1, vr2, vr3, vr4;
5620 : 621 : if (INTEGRAL_TYPE_P (type)
5621 : 1242 : && get_range_query (cfun)->range_of_expr (vr1, captures[3])
5622 : 1242 : && get_range_query (cfun)->range_of_expr (vr2, captures[4])
5623 : 621 : && range_op_handler (MULT_EXPR).overflow_free_p (vr1, vr2)
5624 : 1064 : && get_range_query (cfun)->range_of_expr (vr0, captures[1])
5625 : 1064 : && get_range_query (cfun)->range_of_expr (vr3, captures[2])
5626 : 1142 : && range_op_handler (PLUS_EXPR).overflow_free_p (vr0, vr3)
5627 : 1052 : && get_range_query (cfun)->range_of_expr (vr4, captures[0])
5628 : 526 : && !vr4.undefined_p ()
5629 : 1147 : && (TYPE_UNSIGNED (type)
5630 : 525 : || (vr0.nonnegative_p () && vr4.nonnegative_p ())
5631 : 522 : || (vr0.nonpositive_p () && vr4.nonpositive_p ()))
5632 : : )
5633 : : {
5634 : 5 : gimple_seq *lseq = seq;
5635 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1168;
5636 : 5 : {
5637 : 5 : res_op->set_op (PLUS_EXPR, type, 2);
5638 : 5 : {
5639 : 5 : tree _o1[2], _r1;
5640 : 5 : _o1[0] = captures[1];
5641 : 5 : _o1[1] = captures[4];
5642 : 5 : gimple_match_op tem_op (res_op->cond.any_else (), div, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5643 : 5 : tem_op.resimplify (lseq, valueize);
5644 : 5 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5645 : 5 : if (!_r1) goto next_after_fail1168;
5646 : 5 : res_op->ops[0] = _r1;
5647 : : }
5648 : 5 : res_op->ops[1] = captures[3];
5649 : 5 : res_op->resimplify (lseq, valueize);
5650 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 568, __FILE__, __LINE__, true);
5651 : 5 : return true;
5652 : : }
5653 : 616 : next_after_fail1168:;
5654 : : }
5655 : 621 : }
5656 : 616 : return false;
5657 : : }
5658 : :
5659 : : bool
5660 : 690224 : gimple_simplify_359 (gimple_match_op *res_op, gimple_seq *seq,
5661 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5662 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5663 : : const enum tree_code ARG_UNUSED (mod))
5664 : : {
5665 : 690224 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5666 : 1089918 : if ((TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (captures[0]))
5667 : 337105 : && INTEGRAL_TYPE_P (type)
5668 : 337105 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
5669 : 337105 : && (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[1]))
5670 : 108 : || TYPE_UNSIGNED (TREE_TYPE (captures[1]))
5671 : 108 : || !TYPE_UNSIGNED (type))
5672 : 1027221 : && integer_pow2p (captures[2]) && tree_int_cst_sgn (captures[2]) > 0
5673 : : )
5674 : : {
5675 : 1411 : {
5676 : 1411 : tree utype = TREE_TYPE (captures[1]);
5677 : 1411 : if (!TYPE_OVERFLOW_WRAPS (utype))
5678 : 206 : utype = unsigned_type_for (utype);
5679 : 1411 : gimple_seq *lseq = seq;
5680 : 1411 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1177;
5681 : 1411 : {
5682 : 1411 : res_op->set_op (BIT_AND_EXPR, type, 2);
5683 : 1411 : res_op->ops[0] = captures[0];
5684 : 1411 : {
5685 : 1411 : tree _r1;
5686 : 1411 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
5687 : 1411 : {
5688 : 1411 : tree _o2[2], _r2;
5689 : 1411 : {
5690 : 1411 : tree _o3[1], _r3;
5691 : 1411 : _o3[0] = captures[1];
5692 : 1411 : if (utype != TREE_TYPE (_o3[0]) /* XXX */
5693 : 1411 : && !useless_type_conversion_p (utype, TREE_TYPE (_o3[0])))
5694 : : {
5695 : 206 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o3[0]);
5696 : 206 : tem_op.resimplify (lseq, valueize);
5697 : 206 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
5698 : 206 : if (!_r3) goto next_after_fail1177;
5699 : : }
5700 : : else
5701 : : _r3 = _o3[0];
5702 : 1411 : _o2[0] = _r3;
5703 : : }
5704 : 1411 : _o2[1] = build_one_cst (utype);
5705 : 1411 : tem_op.set_op (MINUS_EXPR, TREE_TYPE (_o2[0]), 2);
5706 : 1411 : tem_op.ops[0] = _o2[0];
5707 : 1411 : tem_op.ops[1] = _o2[1];
5708 : 1411 : tem_op.resimplify (lseq, valueize);
5709 : : }
5710 : 1411 : if (type != tem_op.type
5711 : 1411 : && !useless_type_conversion_p (type, tem_op.type))
5712 : : {
5713 : 206 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5714 : 206 : if (!_r1) goto next_after_fail1177;
5715 : 206 : tem_op.set_op (NOP_EXPR, type, 1);
5716 : 206 : tem_op.ops[0] = _r1;
5717 : 206 : tem_op.resimplify (lseq, valueize);
5718 : : }
5719 : 1411 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5720 : 1411 : if (!_r1) goto next_after_fail1177;
5721 : 1411 : res_op->ops[1] = _r1;
5722 : : }
5723 : 1411 : res_op->resimplify (lseq, valueize);
5724 : 1411 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 577, __FILE__, __LINE__, true);
5725 : 1411 : return true;
5726 : : }
5727 : : next_after_fail1177:;
5728 : : }
5729 : : }
5730 : : return false;
5731 : : }
5732 : :
5733 : : bool
5734 : 6 : gimple_simplify_373 (gimple_match_op *res_op, gimple_seq *seq,
5735 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5736 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
5737 : : {
5738 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5739 : 6 : if (INTEGRAL_TYPE_P (type)
5740 : : )
5741 : : {
5742 : 6 : {
5743 : 6 : tree itype = TREE_TYPE (captures[2]);
5744 : 6 : gimple_seq *lseq = seq;
5745 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1193;
5746 : 6 : {
5747 : 6 : res_op->set_op (NOP_EXPR, type, 1);
5748 : 6 : {
5749 : 6 : tree _o1[2], _r1;
5750 : 6 : _o1[0] = captures[2];
5751 : 6 : {
5752 : 6 : tree _o2[1], _r2;
5753 : 6 : _o2[0] = captures[0];
5754 : 6 : if (COMPARISON_CLASS_P (_o2[0]))
5755 : : {
5756 : 0 : if (!seq) return false;
5757 : 0 : _o2[0] = gimple_build (seq, TREE_CODE (_o2[0]), TREE_TYPE (_o2[0]), TREE_OPERAND (_o2[0], 0), TREE_OPERAND (_o2[0], 1));
5758 : : }
5759 : 6 : if (itype != TREE_TYPE (_o2[0]) /* XXX */
5760 : 6 : && !useless_type_conversion_p (itype, TREE_TYPE (_o2[0])))
5761 : : {
5762 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, itype, _o2[0]);
5763 : 6 : tem_op.resimplify (lseq, valueize);
5764 : 6 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5765 : 6 : if (!_r2) goto next_after_fail1193;
5766 : : }
5767 : : else
5768 : : _r2 = _o2[0];
5769 : 6 : _o1[1] = _r2;
5770 : : }
5771 : 6 : (*res_op).set_op (MINUS_EXPR, TREE_TYPE (_o1[0]), 2);
5772 : 6 : (*res_op).ops[0] = _o1[0];
5773 : 6 : (*res_op).ops[1] = _o1[1];
5774 : 6 : (*res_op).resimplify (lseq, valueize);
5775 : : }
5776 : 6 : if (type != res_op->type
5777 : 6 : && !useless_type_conversion_p (type, res_op->type))
5778 : : {
5779 : 6 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1193;
5780 : 6 : res_op->set_op (NOP_EXPR, type, 1);
5781 : 6 : res_op->resimplify (lseq, valueize);
5782 : : }
5783 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 593, __FILE__, __LINE__, true);
5784 : 6 : return true;
5785 : : }
5786 : : next_after_fail1193:;
5787 : : }
5788 : : }
5789 : : return false;
5790 : : }
5791 : :
5792 : : bool
5793 : 45589 : gimple_simplify_385 (gimple_match_op *res_op, gimple_seq *seq,
5794 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5795 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
5796 : : const enum tree_code ARG_UNUSED (cmp))
5797 : : {
5798 : 45589 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5799 : 45589 : {
5800 : 45589 : tree from_type = TREE_TYPE (captures[0]);
5801 : 45589 : tree c1_type = TREE_TYPE (captures[1]), c2_type = TREE_TYPE (captures[2]);
5802 : 45589 : enum tree_code code = ERROR_MARK;
5803 : 45589 : if (integer_zerop (captures[1])
5804 : 27145 : && INTEGRAL_TYPE_P (from_type)
5805 : 25028 : && (cmp == GE_EXPR || cmp == LT_EXPR)
5806 : 1111 : && TYPE_UNSIGNED (from_type)
5807 : 264 : && !TYPE_UNSIGNED (c1_type)
5808 : 264 : && TYPE_PRECISION (from_type) == TYPE_PRECISION (c1_type)
5809 : 264 : && int_fits_type_p (captures[2], from_type)
5810 : 45846 : && (types_match (c2_type, from_type)
5811 : 1 : || (TYPE_PRECISION (c2_type) > TYPE_PRECISION (from_type)
5812 : 0 : && (TYPE_UNSIGNED (from_type)
5813 : 0 : || TYPE_SIGN (c2_type) == TYPE_SIGN (from_type)))))
5814 : : {
5815 : 256 : tree_code ncmp = cmp == GE_EXPR ? LE_EXPR : GT_EXPR;
5816 : 256 : widest_int c1 = wi::mask<widest_int>(TYPE_PRECISION (type) - 1, 0);
5817 : 256 : code = minmax_from_comparison (ncmp, captures[0], c1, wi::to_widest (captures[2]));
5818 : 256 : }
5819 : 256 : if (code == ERROR_MARK
5820 : 45414 : && INTEGRAL_TYPE_P (from_type)
5821 : 43289 : && int_fits_type_p (captures[2], from_type)
5822 : 40386 : && (types_match (c1_type, from_type)
5823 : 2078 : || (TYPE_PRECISION (c1_type) > TYPE_PRECISION (from_type)
5824 : 157 : && (TYPE_UNSIGNED (from_type)
5825 : 70 : || TYPE_SIGN (c1_type) == TYPE_SIGN (from_type))))
5826 : 38702 : && (types_match (c2_type, from_type)
5827 : 1456 : || (TYPE_PRECISION (c2_type) > TYPE_PRECISION (from_type)
5828 : 254 : && (TYPE_UNSIGNED (from_type)
5829 : 136 : || TYPE_SIGN (c2_type) == TYPE_SIGN (from_type)))))
5830 : : {
5831 : 37184 : if (cmp != EQ_EXPR)
5832 : 37152 : code = minmax_from_comparison (cmp, captures[0], captures[1], captures[0], captures[2]);
5833 : 32 : else if (int_fits_type_p (captures[1], from_type))
5834 : : code = EQ_EXPR;
5835 : : }
5836 : 45557 : if (code == MAX_EXPR
5837 : : )
5838 : : {
5839 : 2793 : gimple_seq *lseq = seq;
5840 : 2793 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1205;
5841 : 2793 : {
5842 : 2793 : res_op->set_op (NOP_EXPR, type, 1);
5843 : 2793 : {
5844 : 2793 : tree _o1[2], _r1;
5845 : 2793 : _o1[0] = captures[0];
5846 : 2793 : {
5847 : 2793 : tree _o2[1], _r2;
5848 : 2793 : _o2[0] = captures[2];
5849 : 2793 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0]) /* XXX */
5850 : 2793 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
5851 : : {
5852 : 37 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
5853 : 37 : tem_op.resimplify (lseq, valueize);
5854 : 37 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5855 : 37 : if (!_r2) goto next_after_fail1205;
5856 : : }
5857 : : else
5858 : : _r2 = _o2[0];
5859 : 2793 : _o1[1] = _r2;
5860 : : }
5861 : 2793 : (*res_op).set_op (MAX_EXPR, TREE_TYPE (_o1[0]), 2);
5862 : 2793 : (*res_op).ops[0] = _o1[0];
5863 : 2793 : (*res_op).ops[1] = _o1[1];
5864 : 2793 : (*res_op).resimplify (lseq, valueize);
5865 : : }
5866 : 2793 : if (type != res_op->type
5867 : 2793 : && !useless_type_conversion_p (type, res_op->type))
5868 : : {
5869 : 37 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1205;
5870 : 37 : res_op->set_op (NOP_EXPR, type, 1);
5871 : 37 : res_op->resimplify (lseq, valueize);
5872 : : }
5873 : 2793 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 604, __FILE__, __LINE__, true);
5874 : 2793 : return true;
5875 : : }
5876 : : next_after_fail1205:;
5877 : : }
5878 : : else
5879 : : {
5880 : 42796 : if (code == MIN_EXPR
5881 : : )
5882 : : {
5883 : 441 : gimple_seq *lseq = seq;
5884 : 441 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1206;
5885 : 441 : {
5886 : 441 : res_op->set_op (NOP_EXPR, type, 1);
5887 : 441 : {
5888 : 441 : tree _o1[2], _r1;
5889 : 441 : _o1[0] = captures[0];
5890 : 441 : {
5891 : 441 : tree _o2[1], _r2;
5892 : 441 : _o2[0] = captures[2];
5893 : 441 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0]) /* XXX */
5894 : 441 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
5895 : : {
5896 : 3 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
5897 : 3 : tem_op.resimplify (lseq, valueize);
5898 : 3 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5899 : 3 : if (!_r2) goto next_after_fail1206;
5900 : : }
5901 : : else
5902 : : _r2 = _o2[0];
5903 : 441 : _o1[1] = _r2;
5904 : : }
5905 : 441 : (*res_op).set_op (MIN_EXPR, TREE_TYPE (_o1[0]), 2);
5906 : 441 : (*res_op).ops[0] = _o1[0];
5907 : 441 : (*res_op).ops[1] = _o1[1];
5908 : 441 : (*res_op).resimplify (lseq, valueize);
5909 : : }
5910 : 441 : if (type != res_op->type
5911 : 441 : && !useless_type_conversion_p (type, res_op->type))
5912 : : {
5913 : 3 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1206;
5914 : 3 : res_op->set_op (NOP_EXPR, type, 1);
5915 : 3 : res_op->resimplify (lseq, valueize);
5916 : : }
5917 : 441 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 605, __FILE__, __LINE__, true);
5918 : 441 : return true;
5919 : : }
5920 : : next_after_fail1206:;
5921 : : }
5922 : : else
5923 : : {
5924 : 42355 : if (code == EQ_EXPR
5925 : : )
5926 : : {
5927 : 32 : gimple_seq *lseq = seq;
5928 : 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1207;
5929 : 32 : {
5930 : 32 : res_op->set_op (NOP_EXPR, type, 1);
5931 : 32 : {
5932 : 32 : tree _o1[3], _r1;
5933 : 32 : {
5934 : 32 : tree _o2[2], _r2;
5935 : 32 : _o2[0] = captures[0];
5936 : 32 : {
5937 : 32 : tree _o3[1], _r3;
5938 : 32 : _o3[0] = captures[1];
5939 : 32 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o3[0]) /* XXX */
5940 : 32 : && !useless_type_conversion_p (TREE_TYPE (_o2[0]), TREE_TYPE (_o3[0])))
5941 : : {
5942 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
5943 : 2 : tem_op.resimplify (lseq, valueize);
5944 : 2 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
5945 : 2 : if (!_r3) goto next_after_fail1207;
5946 : : }
5947 : : else
5948 : : _r3 = _o3[0];
5949 : 32 : _o2[1] = _r3;
5950 : : }
5951 : 32 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, boolean_type_node, _o2[0], _o2[1]);
5952 : 32 : tem_op.resimplify (lseq, valueize);
5953 : 32 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5954 : 32 : if (!_r2) goto next_after_fail1207;
5955 : 32 : _o1[0] = _r2;
5956 : : }
5957 : 32 : {
5958 : 32 : tree _o2[1], _r2;
5959 : 32 : _o2[0] = captures[1];
5960 : 32 : if (from_type != TREE_TYPE (_o2[0]) /* XXX */
5961 : 32 : && !useless_type_conversion_p (from_type, TREE_TYPE (_o2[0])))
5962 : : {
5963 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, from_type, _o2[0]);
5964 : 2 : tem_op.resimplify (lseq, valueize);
5965 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5966 : 2 : if (!_r2) goto next_after_fail1207;
5967 : : }
5968 : : else
5969 : : _r2 = _o2[0];
5970 : 32 : _o1[1] = _r2;
5971 : : }
5972 : 32 : {
5973 : 32 : tree _o2[1], _r2;
5974 : 32 : _o2[0] = captures[2];
5975 : 32 : if (from_type != TREE_TYPE (_o2[0]) /* XXX */
5976 : 32 : && !useless_type_conversion_p (from_type, TREE_TYPE (_o2[0])))
5977 : : {
5978 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, from_type, _o2[0]);
5979 : 2 : tem_op.resimplify (lseq, valueize);
5980 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
5981 : 2 : if (!_r2) goto next_after_fail1207;
5982 : : }
5983 : : else
5984 : : _r2 = _o2[0];
5985 : 32 : _o1[2] = _r2;
5986 : : }
5987 : 32 : (*res_op).set_op (COND_EXPR, TREE_TYPE (_o1[1]), 3);
5988 : 32 : (*res_op).ops[0] = _o1[0];
5989 : 32 : (*res_op).ops[1] = _o1[1];
5990 : 32 : (*res_op).ops[2] = _o1[2];
5991 : 32 : (*res_op).resimplify (lseq, valueize);
5992 : : }
5993 : 32 : if (type != res_op->type
5994 : 32 : && !useless_type_conversion_p (type, res_op->type))
5995 : : {
5996 : 2 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1207;
5997 : 2 : res_op->set_op (NOP_EXPR, type, 1);
5998 : 2 : res_op->resimplify (lseq, valueize);
5999 : : }
6000 : 32 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 606, __FILE__, __LINE__, true);
6001 : 32 : return true;
6002 : : }
6003 : : next_after_fail1207:;
6004 : : }
6005 : : }
6006 : : }
6007 : : }
6008 : : return false;
6009 : : }
6010 : :
6011 : : bool
6012 : 1 : gimple_simplify_398 (gimple_match_op *res_op, gimple_seq *seq,
6013 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6014 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6015 : : const enum tree_code ARG_UNUSED (op))
6016 : : {
6017 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6018 : 1 : if (ANY_INTEGRAL_TYPE_P (type)
6019 : : )
6020 : : {
6021 : 1 : gimple_seq *lseq = seq;
6022 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1269;
6023 : 1 : {
6024 : 1 : tree tem;
6025 : 1 : tem = captures[2];
6026 : 1 : res_op->set_value (tem);
6027 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 632, __FILE__, __LINE__, true);
6028 : 1 : return true;
6029 : : }
6030 : 0 : next_after_fail1269:;
6031 : : }
6032 : : return false;
6033 : : }
6034 : :
6035 : : bool
6036 : 0 : gimple_simplify_400 (gimple_match_op *res_op, gimple_seq *seq,
6037 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6038 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6039 : : const enum tree_code ARG_UNUSED (op))
6040 : : {
6041 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6042 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
6043 : : )
6044 : : {
6045 : 0 : gimple_seq *lseq = seq;
6046 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1271;
6047 : 0 : {
6048 : 0 : tree tem;
6049 : 0 : tem = captures[2];
6050 : 0 : res_op->set_value (tem);
6051 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 632, __FILE__, __LINE__, true);
6052 : 0 : return true;
6053 : : }
6054 : 0 : next_after_fail1271:;
6055 : : }
6056 : : return false;
6057 : : }
6058 : :
6059 : : bool
6060 : 1 : gimple_simplify_402 (gimple_match_op *res_op, gimple_seq *seq,
6061 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6062 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6063 : : {
6064 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6065 : 1 : if (wi::to_wide (uniform_integer_cst_p (captures[3])) == 2
6066 : : )
6067 : : {
6068 : 1 : gimple_seq *lseq = seq;
6069 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1273;
6070 : 1 : {
6071 : 1 : tree tem;
6072 : 1 : tem = captures[2];
6073 : 1 : res_op->set_value (tem);
6074 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 633, __FILE__, __LINE__, true);
6075 : 1 : return true;
6076 : : }
6077 : 0 : next_after_fail1273:;
6078 : : }
6079 : : return false;
6080 : : }
6081 : :
6082 : : bool
6083 : 3 : gimple_simplify_408 (gimple_match_op *res_op, gimple_seq *seq,
6084 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6085 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6086 : : {
6087 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6088 : 3 : if (wi::abs (wi::to_wide (captures[1])) == wi::to_wide (captures[3])
6089 : : )
6090 : : {
6091 : 3 : if (ABS_EXPR != ABSU_EXPR && wi::only_sign_bit_p (wi::to_wide (captures[1]))
6092 : : )
6093 : : {
6094 : 2 : {
6095 : 2 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
6096 : 2 : gimple_seq *lseq = seq;
6097 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1279;
6098 : 2 : {
6099 : 2 : res_op->set_op (NOP_EXPR, type, 1);
6100 : 2 : {
6101 : 2 : tree _o1[1], _r1;
6102 : 2 : _o1[0] = captures[0];
6103 : 2 : (*res_op).set_op (ABSU_EXPR, utype, 1);
6104 : 2 : (*res_op).ops[0] = _o1[0];
6105 : 2 : (*res_op).resimplify (lseq, valueize);
6106 : : }
6107 : 2 : if (type != res_op->type
6108 : 2 : && !useless_type_conversion_p (type, res_op->type))
6109 : : {
6110 : 2 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1279;
6111 : 2 : res_op->set_op (NOP_EXPR, type, 1);
6112 : 2 : res_op->resimplify (lseq, valueize);
6113 : : }
6114 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 636, __FILE__, __LINE__, true);
6115 : 2 : return true;
6116 : : }
6117 : : next_after_fail1279:;
6118 : : }
6119 : : }
6120 : : else
6121 : : {
6122 : 1 : gimple_seq *lseq = seq;
6123 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1280;
6124 : 1 : {
6125 : 1 : tree tem;
6126 : 1 : tem = captures[2];
6127 : 1 : res_op->set_value (tem);
6128 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 637, __FILE__, __LINE__, true);
6129 : 1 : return true;
6130 : : }
6131 : 0 : next_after_fail1280:;
6132 : : }
6133 : : }
6134 : : return false;
6135 : : }
6136 : :
6137 : : bool
6138 : 1 : gimple_simplify_422 (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 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6144 : 1 : if (!HONOR_SIGNED_ZEROS (type)
6145 : : )
6146 : : {
6147 : 1 : gimple_seq *lseq = seq;
6148 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1295;
6149 : 1 : {
6150 : 1 : tree tem;
6151 : 1 : tem = captures[0];
6152 : 1 : res_op->set_value (tem);
6153 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 647, __FILE__, __LINE__, true);
6154 : 1 : return true;
6155 : : }
6156 : 0 : next_after_fail1295:;
6157 : : }
6158 : : return false;
6159 : : }
6160 : :
6161 : : bool
6162 : 1319 : gimple_simplify_429 (gimple_match_op *res_op, gimple_seq *seq,
6163 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6164 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6165 : : const enum tree_code ARG_UNUSED (cmp))
6166 : : {
6167 : 1319 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6168 : 1319 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
6169 : 1201 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
6170 : 2402 : && element_precision (captures[1])
6171 : 1201 : <= element_precision (captures[0])
6172 : 2520 : && bitwise_equal_p (captures[1], captures[2])
6173 : : )
6174 : : {
6175 : 996 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
6176 : : )
6177 : : {
6178 : 623 : {
6179 : 623 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
6180 : 623 : if (types_match (captures[0], stype)
6181 : : )
6182 : : {
6183 : 623 : gimple_seq *lseq = seq;
6184 : 623 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1305;
6185 : 623 : {
6186 : 623 : res_op->set_op (ABSU_EXPR, type, 1);
6187 : 623 : res_op->ops[0] = captures[0];
6188 : 623 : res_op->resimplify (lseq, valueize);
6189 : 623 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 651, __FILE__, __LINE__, true);
6190 : 623 : return true;
6191 : : }
6192 : 0 : next_after_fail1305:;
6193 : : }
6194 : : else
6195 : : {
6196 : 0 : gimple_seq *lseq = seq;
6197 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1306;
6198 : 0 : {
6199 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
6200 : 0 : {
6201 : 0 : tree _o1[1], _r1;
6202 : 0 : _o1[0] = captures[2];
6203 : 0 : if (stype != TREE_TYPE (_o1[0]) /* XXX */
6204 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
6205 : : {
6206 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
6207 : 0 : tem_op.resimplify (lseq, valueize);
6208 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6209 : 0 : if (!_r1) goto next_after_fail1306;
6210 : : }
6211 : : else
6212 : : _r1 = _o1[0];
6213 : 0 : res_op->ops[0] = _r1;
6214 : : }
6215 : 0 : res_op->resimplify (lseq, valueize);
6216 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 652, __FILE__, __LINE__, true);
6217 : 0 : return true;
6218 : : }
6219 : : next_after_fail1306:;
6220 : : }
6221 : : }
6222 : : }
6223 : : else
6224 : : {
6225 : 373 : gimple_seq *lseq = seq;
6226 : 373 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1307;
6227 : 373 : {
6228 : 373 : res_op->set_op (ABS_EXPR, type, 1);
6229 : 373 : res_op->ops[0] = captures[2];
6230 : 373 : res_op->resimplify (lseq, valueize);
6231 : 373 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 653, __FILE__, __LINE__, true);
6232 : 373 : return true;
6233 : : }
6234 : 0 : next_after_fail1307:;
6235 : : }
6236 : : }
6237 : : return false;
6238 : : }
6239 : :
6240 : : bool
6241 : 0 : gimple_simplify_436 (gimple_match_op *res_op, gimple_seq *seq,
6242 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6243 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6244 : : const enum tree_code ARG_UNUSED (cmp))
6245 : : {
6246 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6247 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
6248 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
6249 : 0 : && element_precision (captures[1])
6250 : 0 : <= element_precision (captures[0])
6251 : 0 : && bitwise_equal_p (captures[1], captures[2])
6252 : : )
6253 : : {
6254 : 0 : if ((ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
6255 : 0 : && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
6256 : 0 : || TYPE_UNSIGNED (TREE_TYPE (captures[2]))
6257 : : )
6258 : : {
6259 : 0 : {
6260 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
6261 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
6262 : 0 : if (types_match (captures[0], stype)
6263 : : )
6264 : : {
6265 : 0 : gimple_seq *lseq = seq;
6266 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1320;
6267 : 0 : {
6268 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6269 : 0 : {
6270 : 0 : tree _o1[1], _r1;
6271 : 0 : {
6272 : 0 : tree _o2[1], _r2;
6273 : 0 : _o2[0] = captures[0];
6274 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
6275 : 0 : tem_op.resimplify (lseq, valueize);
6276 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6277 : 0 : if (!_r2) goto next_after_fail1320;
6278 : 0 : _o1[0] = _r2;
6279 : : }
6280 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
6281 : 0 : (*res_op).ops[0] = _o1[0];
6282 : 0 : (*res_op).resimplify (lseq, valueize);
6283 : : }
6284 : 0 : if (type != res_op->type
6285 : 0 : && !useless_type_conversion_p (type, res_op->type))
6286 : : {
6287 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1320;
6288 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6289 : 0 : res_op->resimplify (lseq, valueize);
6290 : : }
6291 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 659, __FILE__, __LINE__, true);
6292 : 0 : return true;
6293 : : }
6294 : : next_after_fail1320:;
6295 : : }
6296 : : else
6297 : : {
6298 : 0 : gimple_seq *lseq = seq;
6299 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1321;
6300 : 0 : {
6301 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6302 : 0 : {
6303 : 0 : tree _o1[1], _r1;
6304 : 0 : {
6305 : 0 : tree _o2[1], _r2;
6306 : 0 : {
6307 : 0 : tree _o3[1], _r3;
6308 : 0 : _o3[0] = captures[2];
6309 : 0 : if (stype != TREE_TYPE (_o3[0]) /* XXX */
6310 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o3[0])))
6311 : : {
6312 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o3[0]);
6313 : 0 : tem_op.resimplify (lseq, valueize);
6314 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6315 : 0 : if (!_r3) goto next_after_fail1321;
6316 : : }
6317 : : else
6318 : : _r3 = _o3[0];
6319 : 0 : _o2[0] = _r3;
6320 : : }
6321 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
6322 : 0 : tem_op.resimplify (lseq, valueize);
6323 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6324 : 0 : if (!_r2) goto next_after_fail1321;
6325 : 0 : _o1[0] = _r2;
6326 : : }
6327 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
6328 : 0 : (*res_op).ops[0] = _o1[0];
6329 : 0 : (*res_op).resimplify (lseq, valueize);
6330 : : }
6331 : 0 : if (type != res_op->type
6332 : 0 : && !useless_type_conversion_p (type, res_op->type))
6333 : : {
6334 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1321;
6335 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6336 : 0 : res_op->resimplify (lseq, valueize);
6337 : : }
6338 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 660, __FILE__, __LINE__, true);
6339 : 0 : return true;
6340 : : }
6341 : : next_after_fail1321:;
6342 : : }
6343 : : }
6344 : : }
6345 : : else
6346 : : {
6347 : 0 : gimple_seq *lseq = seq;
6348 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1322;
6349 : 0 : {
6350 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6351 : 0 : {
6352 : 0 : tree _o1[1], _r1;
6353 : 0 : {
6354 : 0 : tree _o2[1], _r2;
6355 : 0 : _o2[0] = captures[2];
6356 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
6357 : 0 : tem_op.resimplify (lseq, valueize);
6358 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6359 : 0 : if (!_r2) goto next_after_fail1322;
6360 : 0 : _o1[0] = _r2;
6361 : : }
6362 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
6363 : 0 : (*res_op).ops[0] = _o1[0];
6364 : 0 : (*res_op).resimplify (lseq, valueize);
6365 : : }
6366 : 0 : if (type != res_op->type
6367 : 0 : && !useless_type_conversion_p (type, res_op->type))
6368 : : {
6369 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1322;
6370 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6371 : 0 : res_op->resimplify (lseq, valueize);
6372 : : }
6373 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 661, __FILE__, __LINE__, true);
6374 : 0 : return true;
6375 : : }
6376 : : next_after_fail1322:;
6377 : : }
6378 : : }
6379 : : return false;
6380 : : }
6381 : :
6382 : : bool
6383 : 3472 : gimple_simplify_448 (gimple_match_op *res_op, gimple_seq *seq,
6384 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6385 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6386 : : const combined_fn ARG_UNUSED (func))
6387 : : {
6388 : 3472 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6389 : 3472 : {
6390 : 3472 : int val;
6391 : 3472 : internal_fn ifn = IFN_LAST;
6392 : 3472 : if (TREE_CODE (TREE_TYPE (captures[2])) == BITINT_TYPE)
6393 : : {
6394 : 0 : if (tree_fits_shwi_p (captures[3]))
6395 : : {
6396 : 0 : HOST_WIDE_INT valw = tree_to_shwi (captures[3]);
6397 : 0 : if ((int) valw == valw)
6398 : : {
6399 : 0 : val = valw;
6400 : 0 : ifn = IFN_CLZ;
6401 : : }
6402 : : }
6403 : : }
6404 : 3472 : else if (direct_internal_fn_supported_p (IFN_CLZ, TREE_TYPE (captures[2]),
6405 : : OPTIMIZE_FOR_BOTH)
6406 : 6897 : && CLZ_DEFINED_VALUE_AT_ZERO
6407 : : (SCALAR_INT_TYPE_MODE (TREE_TYPE (captures[2])), val) == 2)
6408 : 29 : ifn = IFN_CLZ;
6409 : 3472 : if (ifn == IFN_CLZ && wi::to_widest (captures[3]) == val
6410 : : )
6411 : : {
6412 : 29 : gimple_seq *lseq = seq;
6413 : 29 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1344;
6414 : 29 : {
6415 : 29 : res_op->set_op (CFN_CLZ, type, 2);
6416 : 29 : res_op->ops[0] = captures[2];
6417 : 29 : res_op->ops[1] = captures[3];
6418 : 29 : res_op->resimplify (lseq, valueize);
6419 : 29 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 670, __FILE__, __LINE__, true);
6420 : 29 : return true;
6421 : : }
6422 : 0 : next_after_fail1344:;
6423 : : }
6424 : : }
6425 : 3443 : return false;
6426 : : }
6427 : :
6428 : : bool
6429 : 275 : gimple_simplify_457 (gimple_match_op *res_op, gimple_seq *seq,
6430 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6431 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6432 : : const enum tree_code ARG_UNUSED (cmp))
6433 : : {
6434 : 275 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6435 : 436 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
6436 : 275 : && tree_expr_nonzero_p (captures[0])
6437 : 386 : && tree_expr_nonnegative_p (captures[0])
6438 : : )
6439 : : {
6440 : 11 : gimple_seq *lseq = seq;
6441 : 11 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1354;
6442 : 11 : {
6443 : 11 : tree tem;
6444 : 11 : tem = build_one_cst (type);
6445 : 11 : res_op->set_value (tem);
6446 : 11 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 677, __FILE__, __LINE__, true);
6447 : 11 : return true;
6448 : : }
6449 : 0 : next_after_fail1354:;
6450 : : }
6451 : : return false;
6452 : : }
6453 : :
6454 : : bool
6455 : 5019 : gimple_simplify_463 (gimple_match_op *res_op, gimple_seq *seq,
6456 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6457 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6458 : : const enum tree_code ARG_UNUSED (op))
6459 : : {
6460 : 5019 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6461 : 10038 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
6462 : 10038 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
6463 : : )
6464 : : {
6465 : 393 : gimple_seq *lseq = seq;
6466 : 393 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1361;
6467 : 393 : {
6468 : 393 : res_op->set_op (op, type, 2);
6469 : 393 : res_op->ops[0] = captures[0];
6470 : 393 : res_op->ops[1] = captures[2];
6471 : 393 : res_op->resimplify (lseq, valueize);
6472 : 393 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 684, __FILE__, __LINE__, true);
6473 : 393 : return true;
6474 : : }
6475 : 0 : next_after_fail1361:;
6476 : : }
6477 : : return false;
6478 : : }
6479 : :
6480 : : bool
6481 : 1107 : gimple_simplify_467 (gimple_match_op *res_op, gimple_seq *seq,
6482 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6483 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6484 : : const enum tree_code ARG_UNUSED (minmax),
6485 : : const enum tree_code ARG_UNUSED (cmp))
6486 : : {
6487 : 1107 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6488 : 1107 : gimple_seq *lseq = seq;
6489 : 1107 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1366;
6490 : 1107 : {
6491 : 1107 : tree tem;
6492 : 1107 : tem = constant_boolean_node (cmp == GE_EXPR || cmp == LE_EXPR, type);
6493 : 1107 : res_op->set_value (tem);
6494 : 1107 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 689, __FILE__, __LINE__, true);
6495 : : return true;
6496 : : }
6497 : 0 : next_after_fail1366:;
6498 : 0 : return false;
6499 : : }
6500 : :
6501 : : bool
6502 : 30463 : gimple_simplify_471 (gimple_match_op *res_op, gimple_seq *seq,
6503 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6504 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6505 : : const enum tree_code ARG_UNUSED (cmp),
6506 : : const enum tree_code ARG_UNUSED (cmp2))
6507 : : {
6508 : 30463 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6509 : 30463 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[2]))
6510 : 28695 : && TYPE_UNSIGNED (TREE_TYPE (captures[2])) && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
6511 : 59158 : && wi::gt_p (wi::to_wide (captures[1]), 0, TYPE_SIGN (TREE_TYPE (captures[1])))
6512 : : )
6513 : : {
6514 : 28695 : {
6515 : 28695 : tree utype = TREE_TYPE (captures[2]);
6516 : 28695 : wide_int denom = wi::to_wide (captures[1]);
6517 : 28695 : wide_int right = wi::to_wide (captures[2]);
6518 : 28695 : wide_int smax = wi::sdiv_trunc (wi::max_value (TREE_TYPE (captures[0])), denom);
6519 : 28695 : wide_int smin = wi::sdiv_trunc (wi::min_value (TREE_TYPE (captures[0])), denom);
6520 : 28695 : bool small = wi::leu_p (right, smax);
6521 : 28695 : bool large = wi::geu_p (right, smin);
6522 : 28695 : if (small || large
6523 : : )
6524 : : {
6525 : 22145 : gimple_seq *lseq = seq;
6526 : 22145 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1371;
6527 : 22145 : {
6528 : 22145 : res_op->set_op (cmp, type, 2);
6529 : 22145 : {
6530 : 22145 : tree _o1[1], _r1;
6531 : 22145 : _o1[0] = captures[0];
6532 : 22145 : if (utype != TREE_TYPE (_o1[0]) /* XXX */
6533 : 22145 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
6534 : : {
6535 : 22145 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
6536 : 22145 : tem_op.resimplify (lseq, valueize);
6537 : 22145 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6538 : 22145 : if (!_r1) goto next_after_fail1371;
6539 : : }
6540 : : else
6541 : : _r1 = _o1[0];
6542 : 5630 : res_op->ops[0] = _r1;
6543 : : }
6544 : 5630 : {
6545 : 5630 : tree _o1[2], _r1;
6546 : 5630 : _o1[0] = captures[2];
6547 : 5630 : {
6548 : 5630 : tree _o2[1], _r2;
6549 : 5630 : _o2[0] = captures[1];
6550 : 5630 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o2[0]) /* XXX */
6551 : 5630 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o2[0])))
6552 : : {
6553 : 5630 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o2[0]);
6554 : 5630 : tem_op.resimplify (lseq, valueize);
6555 : 5630 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6556 : 5630 : if (!_r2) goto next_after_fail1371;
6557 : : }
6558 : : else
6559 : : _r2 = _o2[0];
6560 : 5630 : _o1[1] = _r2;
6561 : : }
6562 : 5630 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6563 : 5630 : tem_op.resimplify (lseq, valueize);
6564 : 5630 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6565 : 5630 : if (!_r1) goto next_after_fail1371;
6566 : 5630 : res_op->ops[1] = _r1;
6567 : : }
6568 : 5630 : res_op->resimplify (lseq, valueize);
6569 : 5630 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 694, __FILE__, __LINE__, true);
6570 : 5630 : return true;
6571 : : }
6572 : 16515 : next_after_fail1371:;
6573 : : }
6574 : : else
6575 : : {
6576 : 6550 : gimple_seq *lseq = seq;
6577 : 6550 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1372;
6578 : 6550 : {
6579 : 6550 : res_op->set_op (cmp2, type, 2);
6580 : 6550 : res_op->ops[0] = captures[0];
6581 : 6550 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[0]));
6582 : 6550 : res_op->resimplify (lseq, valueize);
6583 : 6550 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 695, __FILE__, __LINE__, true);
6584 : 6550 : return true;
6585 : : }
6586 : 16515 : next_after_fail1372:;
6587 : : }
6588 : 28695 : }
6589 : : }
6590 : : return false;
6591 : : }
6592 : :
6593 : : bool
6594 : 0 : gimple_simplify_483 (gimple_match_op *res_op, gimple_seq *seq,
6595 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6596 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6597 : : const enum tree_code ARG_UNUSED (op),
6598 : : const enum tree_code ARG_UNUSED (cmp))
6599 : : {
6600 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6601 : 0 : {
6602 : 0 : bool ok = true;
6603 : 0 : HOST_WIDE_INT val = 0;
6604 : 0 : if (!tree_fits_shwi_p (captures[3]))
6605 : : ok = false;
6606 : : else
6607 : : {
6608 : 0 : val = tree_to_shwi (captures[3]);
6609 : 0 : if (op == GT_EXPR || op == LE_EXPR)
6610 : : {
6611 : 0 : if (val == HOST_WIDE_INT_MAX)
6612 : : ok = false;
6613 : : else
6614 : 0 : val++;
6615 : : }
6616 : : }
6617 : 0 : HOST_WIDE_INT zero_val = tree_to_shwi (captures[2]);
6618 : 0 : tree type0 = TREE_TYPE (captures[1]);
6619 : 0 : int prec = TYPE_PRECISION (type0);
6620 : 0 : if (prec > MAX_FIXED_MODE_SIZE)
6621 : 0 : ok = false;
6622 : 0 : if (val <= 0
6623 : : )
6624 : : {
6625 : 0 : if (ok && zero_val >= val
6626 : : )
6627 : : {
6628 : 0 : gimple_seq *lseq = seq;
6629 : 0 : if (lseq
6630 : : && (!single_use (captures[0])))
6631 : : lseq = NULL;
6632 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1419;
6633 : 0 : {
6634 : 0 : tree tem;
6635 : 0 : tem = constant_boolean_node (cmp == EQ_EXPR ? true : false, type);
6636 : 0 : res_op->set_value (tem);
6637 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 725, __FILE__, __LINE__, true);
6638 : 0 : return true;
6639 : : }
6640 : 0 : next_after_fail1419:;
6641 : : }
6642 : : }
6643 : : else
6644 : : {
6645 : 0 : if (val >= prec
6646 : : )
6647 : : {
6648 : 0 : if (ok && zero_val < val
6649 : : )
6650 : : {
6651 : 0 : gimple_seq *lseq = seq;
6652 : 0 : if (lseq
6653 : : && (!single_use (captures[0])))
6654 : : lseq = NULL;
6655 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1420;
6656 : 0 : {
6657 : 0 : tree tem;
6658 : 0 : tem = constant_boolean_node (cmp == EQ_EXPR ? false : true, type);
6659 : 0 : res_op->set_value (tem);
6660 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 726, __FILE__, __LINE__, true);
6661 : 0 : return true;
6662 : : }
6663 : 0 : next_after_fail1420:;
6664 : : }
6665 : : }
6666 : : else
6667 : : {
6668 : 0 : if (ok && (zero_val < 0 || zero_val >= prec)
6669 : : )
6670 : : {
6671 : 0 : gimple_seq *lseq = seq;
6672 : 0 : if (lseq
6673 : 0 : && (!single_use (captures[0])))
6674 : 0 : lseq = NULL;
6675 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1421;
6676 : 0 : {
6677 : 0 : res_op->set_op (cmp, type, 2);
6678 : 0 : {
6679 : 0 : tree _o1[2], _r1;
6680 : 0 : _o1[0] = captures[1];
6681 : 0 : _o1[1] = wide_int_to_tree (type0,
6682 : 0 : wi::mask (val, false, prec));
6683 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6684 : 0 : tem_op.resimplify (lseq, valueize);
6685 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6686 : 0 : if (!_r1) goto next_after_fail1421;
6687 : 0 : res_op->ops[0] = _r1;
6688 : : }
6689 : 0 : res_op->ops[1] = build_zero_cst (type0);
6690 : 0 : res_op->resimplify (lseq, valueize);
6691 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 727, __FILE__, __LINE__, true);
6692 : 0 : return true;
6693 : : }
6694 : : next_after_fail1421:;
6695 : : }
6696 : : }
6697 : : }
6698 : : }
6699 : : return false;
6700 : : }
6701 : :
6702 : : bool
6703 : 44 : gimple_simplify_493 (gimple_match_op *res_op, gimple_seq *seq,
6704 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6705 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
6706 : : const enum tree_code ARG_UNUSED (cmp),
6707 : : const enum tree_code ARG_UNUSED (cmp2),
6708 : : const enum tree_code ARG_UNUSED (cmp3),
6709 : : const enum tree_code ARG_UNUSED (bit_op),
6710 : : const combined_fn ARG_UNUSED (ffs))
6711 : : {
6712 : 44 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6713 : 44 : {
6714 : 44 : int prec = TYPE_PRECISION (TREE_TYPE (captures[1]));
6715 : 44 : if (integer_zerop (captures[2])
6716 : : )
6717 : : {
6718 : 0 : gimple_seq *lseq = seq;
6719 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1431;
6720 : 0 : {
6721 : 0 : res_op->set_op (cmp2, type, 2);
6722 : 0 : res_op->ops[0] = captures[1];
6723 : 0 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
6724 : 0 : res_op->resimplify (lseq, valueize);
6725 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 733, __FILE__, __LINE__, true);
6726 : 16 : return true;
6727 : : }
6728 : 0 : next_after_fail1431:;
6729 : : }
6730 : : else
6731 : : {
6732 : 44 : if (tree_int_cst_sgn (captures[2]) < 0
6733 : : )
6734 : : {
6735 : 0 : gimple_seq *lseq = seq;
6736 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1432;
6737 : 0 : {
6738 : 0 : tree tem;
6739 : 0 : tem = constant_boolean_node (cmp == GT_EXPR ? true : false, type);
6740 : 0 : res_op->set_value (tem);
6741 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 734, __FILE__, __LINE__, true);
6742 : 0 : return true;
6743 : : }
6744 : 0 : next_after_fail1432:;
6745 : : }
6746 : : else
6747 : : {
6748 : 44 : if (wi::to_widest (captures[2]) >= prec
6749 : : )
6750 : : {
6751 : 0 : gimple_seq *lseq = seq;
6752 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1433;
6753 : 0 : {
6754 : 0 : tree tem;
6755 : 0 : tem = constant_boolean_node (cmp == GT_EXPR ? false : true, type);
6756 : 0 : res_op->set_value (tem);
6757 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 735, __FILE__, __LINE__, true);
6758 : 0 : return true;
6759 : : }
6760 : 0 : next_after_fail1433:;
6761 : : }
6762 : : else
6763 : : {
6764 : 44 : if (wi::to_widest (captures[2]) == prec - 1
6765 : : )
6766 : : {
6767 : 0 : gimple_seq *lseq = seq;
6768 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1434;
6769 : 0 : {
6770 : 0 : res_op->set_op (cmp3, type, 2);
6771 : 0 : res_op->ops[0] = captures[1];
6772 : 0 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[1]),
6773 : 0 : wi::shifted_mask (prec - 1, 1,
6774 : : false, prec));
6775 : 0 : res_op->resimplify (lseq, valueize);
6776 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 736, __FILE__, __LINE__, true);
6777 : 0 : return true;
6778 : : }
6779 : 0 : next_after_fail1434:;
6780 : : }
6781 : : else
6782 : : {
6783 : 44 : if (single_use (captures[0])
6784 : : )
6785 : : {
6786 : 44 : gimple_seq *lseq = seq;
6787 : 44 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1435;
6788 : 44 : {
6789 : 44 : res_op->set_op (bit_op, type, 2);
6790 : 44 : {
6791 : 44 : tree _o1[2], _r1;
6792 : 44 : _o1[0] = captures[1];
6793 : 44 : _o1[1] = build_zero_cst (TREE_TYPE (captures[1]));
6794 : 44 : gimple_match_op tem_op (res_op->cond.any_else (), cmp2, type, _o1[0], _o1[1]);
6795 : 44 : tem_op.resimplify (lseq, valueize);
6796 : 44 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6797 : 44 : if (!_r1) goto next_after_fail1435;
6798 : 16 : res_op->ops[0] = _r1;
6799 : : }
6800 : 16 : {
6801 : 16 : tree _o1[2], _r1;
6802 : 16 : {
6803 : 16 : tree _o2[2], _r2;
6804 : 16 : _o2[0] = captures[1];
6805 : 16 : _o2[1] = wide_int_to_tree (TREE_TYPE (captures[1]),
6806 : 16 : wi::mask (tree_to_uhwi (captures[2]),
6807 : : false, prec));
6808 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
6809 : 16 : tem_op.resimplify (lseq, valueize);
6810 : 16 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6811 : 16 : if (!_r2) goto next_after_fail1435;
6812 : 16 : _o1[0] = _r2;
6813 : : }
6814 : 16 : _o1[1] = build_zero_cst (TREE_TYPE (captures[1]));
6815 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), cmp3, type, _o1[0], _o1[1]);
6816 : 16 : tem_op.resimplify (lseq, valueize);
6817 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6818 : 16 : if (!_r1) goto next_after_fail1435;
6819 : 16 : res_op->ops[1] = _r1;
6820 : : }
6821 : 16 : res_op->resimplify (lseq, valueize);
6822 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 737, __FILE__, __LINE__, true);
6823 : 16 : return true;
6824 : : }
6825 : 28 : next_after_fail1435:;
6826 : : }
6827 : : }
6828 : : }
6829 : : }
6830 : : }
6831 : : }
6832 : 28 : return false;
6833 : : }
6834 : :
6835 : : bool
6836 : 172 : gimple_simplify_510 (gimple_match_op *res_op, gimple_seq *seq,
6837 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6838 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
6839 : : {
6840 : 172 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6841 : 172 : {
6842 : 172 : unsigned prec = TYPE_PRECISION (type);
6843 : 172 : int shift = (64 - prec) & 63;
6844 : 172 : unsigned HOST_WIDE_INT c1
6845 : : = HOST_WIDE_INT_UC (0x0101010101010101) >> shift;
6846 : 172 : unsigned HOST_WIDE_INT c2
6847 : : = HOST_WIDE_INT_UC (0x0F0F0F0F0F0F0F0F) >> shift;
6848 : 172 : unsigned HOST_WIDE_INT c3
6849 : : = HOST_WIDE_INT_UC (0x3333333333333333) >> shift;
6850 : 172 : unsigned HOST_WIDE_INT c4
6851 : : = HOST_WIDE_INT_UC (0x5555555555555555) >> shift;
6852 : 172 : if (prec >= 16
6853 : 172 : && prec <= 64
6854 : 172 : && pow2p_hwi (prec)
6855 : 172 : && TYPE_UNSIGNED (type)
6856 : 172 : && integer_onep (captures[5])
6857 : 151 : && wi::to_widest (captures[7]) == 2
6858 : 130 : && wi::to_widest (captures[1]) == 4
6859 : 172 : && wi::to_widest (captures[11]) == prec - 8
6860 : 109 : && tree_to_uhwi (captures[10]) == c1
6861 : 109 : && tree_to_uhwi (captures[9]) == c2
6862 : 109 : && tree_to_uhwi (captures[8]) == c3
6863 : 109 : && tree_to_uhwi (captures[3]) == c3
6864 : 281 : && tree_to_uhwi (captures[6]) == c4
6865 : : )
6866 : : {
6867 : 109 : if (direct_internal_fn_supported_p (IFN_POPCOUNT, type,
6868 : : OPTIMIZE_FOR_BOTH)
6869 : : )
6870 : : {
6871 : 0 : gimple_seq *lseq = seq;
6872 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1459;
6873 : 0 : {
6874 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6875 : 0 : {
6876 : 0 : tree _o1[1], _r1;
6877 : 0 : _o1[0] = captures[4];
6878 : 0 : (*res_op).set_op (CFN_POPCOUNT, type, 1);
6879 : 0 : (*res_op).ops[0] = _o1[0];
6880 : 0 : (*res_op).resimplify (lseq, valueize);
6881 : : }
6882 : 0 : if (type != res_op->type
6883 : 0 : && !useless_type_conversion_p (type, res_op->type))
6884 : : {
6885 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1459;
6886 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6887 : 0 : res_op->resimplify (lseq, valueize);
6888 : : }
6889 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 759, __FILE__, __LINE__, true);
6890 : 0 : return true;
6891 : : }
6892 : : next_after_fail1459:;
6893 : : }
6894 : : else
6895 : : {
6896 : 109 : {
6897 : 109 : tree half_type = NULL_TREE;
6898 : 109 : opt_machine_mode m = mode_for_size ((prec + 1) / 2, MODE_INT, 1);
6899 : 109 : int half_prec = 8;
6900 : 109 : if (m.exists ()
6901 : 109 : && m.require () != TYPE_MODE (type))
6902 : : {
6903 : 109 : half_prec = GET_MODE_PRECISION (as_a <scalar_int_mode> (m));
6904 : 109 : half_type = build_nonstandard_integer_type (half_prec, 1);
6905 : : }
6906 : 109 : gcc_assert (half_prec > 2);
6907 : 109 : if (half_type != NULL_TREE
6908 : 109 : && direct_internal_fn_supported_p (IFN_POPCOUNT, half_type,
6909 : : OPTIMIZE_FOR_BOTH)
6910 : : )
6911 : : {
6912 : 0 : gimple_seq *lseq = seq;
6913 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1460;
6914 : 0 : {
6915 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6916 : 0 : {
6917 : 0 : tree _o1[2], _r1;
6918 : 0 : {
6919 : 0 : tree _o2[1], _r2;
6920 : 0 : {
6921 : 0 : tree _o3[1], _r3;
6922 : 0 : _o3[0] = captures[4];
6923 : 0 : if (half_type != TREE_TYPE (_o3[0]) /* XXX */
6924 : 0 : && !useless_type_conversion_p (half_type, TREE_TYPE (_o3[0])))
6925 : : {
6926 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, half_type, _o3[0]);
6927 : 0 : tem_op.resimplify (lseq, valueize);
6928 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6929 : 0 : if (!_r3) goto next_after_fail1460;
6930 : : }
6931 : : else
6932 : : _r3 = _o3[0];
6933 : 0 : _o2[0] = _r3;
6934 : : }
6935 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_POPCOUNT, half_type, _o2[0]);
6936 : 0 : tem_op.resimplify (lseq, valueize);
6937 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6938 : 0 : if (!_r2) goto next_after_fail1460;
6939 : 0 : _o1[0] = _r2;
6940 : : }
6941 : 0 : {
6942 : 0 : tree _o2[1], _r2;
6943 : 0 : {
6944 : 0 : tree _r3;
6945 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
6946 : 0 : {
6947 : 0 : tree _o4[2], _r4;
6948 : 0 : _o4[0] = captures[4];
6949 : 0 : _o4[1] = build_int_cst (integer_type_node, half_prec);
6950 : 0 : tem_op.set_op (RSHIFT_EXPR, TREE_TYPE (_o4[0]), 2);
6951 : 0 : tem_op.ops[0] = _o4[0];
6952 : 0 : tem_op.ops[1] = _o4[1];
6953 : 0 : tem_op.resimplify (lseq, valueize);
6954 : : }
6955 : 0 : if (half_type != tem_op.type
6956 : 0 : && !useless_type_conversion_p (half_type, tem_op.type))
6957 : : {
6958 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6959 : 0 : if (!_r3) goto next_after_fail1460;
6960 : 0 : tem_op.set_op (NOP_EXPR, half_type, 1);
6961 : 0 : tem_op.ops[0] = _r3;
6962 : 0 : tem_op.resimplify (lseq, valueize);
6963 : : }
6964 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6965 : 0 : if (!_r3) goto next_after_fail1460;
6966 : 0 : _o2[0] = _r3;
6967 : : }
6968 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_POPCOUNT, half_type, _o2[0]);
6969 : 0 : tem_op.resimplify (lseq, valueize);
6970 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6971 : 0 : if (!_r2) goto next_after_fail1460;
6972 : 0 : _o1[1] = _r2;
6973 : : }
6974 : 0 : (*res_op).set_op (PLUS_EXPR, TREE_TYPE (_o1[0]), 2);
6975 : 0 : (*res_op).ops[0] = _o1[0];
6976 : 0 : (*res_op).ops[1] = _o1[1];
6977 : 0 : (*res_op).resimplify (lseq, valueize);
6978 : : }
6979 : 0 : if (type != res_op->type
6980 : 0 : && !useless_type_conversion_p (type, res_op->type))
6981 : : {
6982 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1460;
6983 : 0 : res_op->set_op (NOP_EXPR, type, 1);
6984 : 0 : res_op->resimplify (lseq, valueize);
6985 : : }
6986 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 760, __FILE__, __LINE__, true);
6987 : 0 : return true;
6988 : : }
6989 : 109 : next_after_fail1460:;
6990 : : }
6991 : : }
6992 : : }
6993 : : }
6994 : : }
6995 : : return false;
6996 : : }
6997 : :
6998 : : bool
6999 : 589 : gimple_simplify_528 (gimple_match_op *res_op, gimple_seq *seq,
7000 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7001 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7002 : : const combined_fn ARG_UNUSED (pow))
7003 : : {
7004 : 589 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7005 : 589 : if (flag_unsafe_math_optimizations
7006 : : )
7007 : : {
7008 : 7 : if (! HONOR_INFINITIES (type)
7009 : 7 : && ! flag_trapping_math
7010 : 14 : && ! flag_errno_math
7011 : : )
7012 : : {
7013 : 7 : if (! HONOR_NANS (type) && ! HONOR_SIGNED_ZEROS (type)
7014 : : )
7015 : : {
7016 : 7 : gimple_seq *lseq = seq;
7017 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1491;
7018 : 7 : {
7019 : 7 : tree tem;
7020 : 7 : tem = captures[0];
7021 : 7 : res_op->set_value (tem);
7022 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 779, __FILE__, __LINE__, true);
7023 : 7 : return true;
7024 : : }
7025 : 0 : next_after_fail1491:;
7026 : : }
7027 : : }
7028 : : }
7029 : : return false;
7030 : : }
7031 : :
7032 : : bool
7033 : 14 : gimple_simplify_532 (gimple_match_op *res_op, gimple_seq *seq,
7034 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7035 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7036 : : const combined_fn ARG_UNUSED (copysigns),
7037 : : const combined_fn ARG_UNUSED (hypots))
7038 : : {
7039 : 14 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7040 : 14 : gimple_seq *lseq = seq;
7041 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1496;
7042 : 14 : {
7043 : 14 : res_op->set_op (hypots, type, 2);
7044 : 14 : res_op->ops[0] = captures[0];
7045 : 14 : res_op->ops[1] = captures[2];
7046 : 14 : res_op->resimplify (lseq, valueize);
7047 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 784, __FILE__, __LINE__, true);
7048 : : return true;
7049 : : }
7050 : 0 : next_after_fail1496:;
7051 : 0 : return false;
7052 : : }
7053 : :
7054 : : bool
7055 : 514760 : gimple_simplify_536 (gimple_match_op *res_op, gimple_seq *seq,
7056 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7057 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7058 : : {
7059 : 514760 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7060 : 514760 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
7061 : 514760 : && !HONOR_SIGNED_ZEROS (type)
7062 : : )
7063 : : {
7064 : 514134 : gimple_seq *lseq = seq;
7065 : 514134 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1500;
7066 : 514134 : {
7067 : 514134 : res_op->set_op (MINUS_EXPR, type, 2);
7068 : 514134 : {
7069 : 514134 : tree _o1[1], _r1;
7070 : 514134 : _o1[0] = captures[1];
7071 : 514134 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
7072 : 514134 : tem_op.resimplify (lseq, valueize);
7073 : 514134 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7074 : 514134 : if (!_r1) goto next_after_fail1500;
7075 : 508501 : res_op->ops[0] = _r1;
7076 : : }
7077 : 508501 : res_op->ops[1] = captures[0];
7078 : 508501 : res_op->resimplify (lseq, valueize);
7079 : 508501 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 788, __FILE__, __LINE__, true);
7080 : 508501 : return true;
7081 : : }
7082 : : next_after_fail1500:;
7083 : : }
7084 : : return false;
7085 : : }
7086 : :
7087 : : bool
7088 : 126805 : gimple_simplify_540 (gimple_match_op *res_op, gimple_seq *seq,
7089 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7090 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7091 : : {
7092 : 126805 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7093 : 126805 : if (! TYPE_UNSIGNED (type)
7094 : 19766 : && ! HONOR_SIGN_DEPENDENT_ROUNDING (type)
7095 : 146571 : && single_use (captures[0])
7096 : : )
7097 : : {
7098 : 12360 : gimple_seq *lseq = seq;
7099 : 12360 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1504;
7100 : 12360 : {
7101 : 12360 : res_op->set_op (MULT_EXPR, type, 2);
7102 : 12360 : res_op->ops[0] = captures[1];
7103 : 12360 : {
7104 : 12360 : tree _o1[1], _r1;
7105 : 12360 : _o1[0] = captures[2];
7106 : 12360 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
7107 : 12360 : tem_op.resimplify (lseq, valueize);
7108 : 12360 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7109 : 12360 : if (!_r1) goto next_after_fail1504;
7110 : 12100 : res_op->ops[1] = _r1;
7111 : : }
7112 : 12100 : res_op->resimplify (lseq, valueize);
7113 : 12100 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 792, __FILE__, __LINE__, true);
7114 : 12100 : return true;
7115 : : }
7116 : : next_after_fail1504:;
7117 : : }
7118 : : return false;
7119 : : }
7120 : :
7121 : : bool
7122 : 1 : gimple_simplify_545 (gimple_match_op *res_op, gimple_seq *seq,
7123 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7124 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7125 : : {
7126 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7127 : 2 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
7128 : 2 : && TYPE_PRECISION (TREE_TYPE (captures[0])) == 1
7129 : : )
7130 : : {
7131 : 1 : gimple_seq *lseq = seq;
7132 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1510;
7133 : 1 : {
7134 : 1 : res_op->set_op (BIT_AND_EXPR, type, 2);
7135 : 1 : res_op->ops[0] = captures[0];
7136 : 1 : res_op->ops[1] = captures[1];
7137 : 1 : res_op->resimplify (lseq, valueize);
7138 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 798, __FILE__, __LINE__, true);
7139 : 1 : return true;
7140 : : }
7141 : 0 : next_after_fail1510:;
7142 : : }
7143 : : return false;
7144 : : }
7145 : :
7146 : : bool
7147 : 0 : gimple_simplify_550 (gimple_match_op *res_op, gimple_seq *seq,
7148 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7149 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7150 : : {
7151 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7152 : 0 : gimple_seq *lseq = seq;
7153 : 0 : if (lseq
7154 : 0 : && (!single_use (captures[3])
7155 : 0 : || !single_use (captures[4])))
7156 : 0 : lseq = NULL;
7157 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1515;
7158 : 0 : {
7159 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
7160 : 0 : res_op->ops[0] = captures[0];
7161 : 0 : {
7162 : 0 : tree _o1[1], _r1;
7163 : 0 : _o1[0] = captures[5];
7164 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
7165 : 0 : tem_op.resimplify (lseq, valueize);
7166 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7167 : 0 : if (!_r1) goto next_after_fail1515;
7168 : 0 : res_op->ops[1] = _r1;
7169 : : }
7170 : 0 : res_op->resimplify (lseq, valueize);
7171 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 802, __FILE__, __LINE__, true);
7172 : : return true;
7173 : : }
7174 : : next_after_fail1515:;
7175 : : return false;
7176 : : }
7177 : :
7178 : : bool
7179 : 10197 : gimple_simplify_556 (gimple_match_op *res_op, gimple_seq *seq,
7180 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7181 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7182 : : {
7183 : 10197 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7184 : 18556 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
7185 : 28753 : && wi::bit_and_not (get_nonzero_bits (captures[0]), wi::to_wide (captures[2])) == 0
7186 : : )
7187 : : {
7188 : 2 : gimple_seq *lseq = seq;
7189 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1521;
7190 : 2 : {
7191 : 2 : tree tem;
7192 : 2 : tem = captures[0];
7193 : 2 : res_op->set_value (tem);
7194 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 808, __FILE__, __LINE__, true);
7195 : 2 : return true;
7196 : : }
7197 : 0 : next_after_fail1521:;
7198 : : }
7199 : : return false;
7200 : : }
7201 : :
7202 : : bool
7203 : 0 : gimple_simplify_561 (gimple_match_op *res_op, gimple_seq *seq,
7204 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7205 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7206 : : {
7207 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7208 : 0 : gimple_seq *lseq = seq;
7209 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1526;
7210 : 0 : {
7211 : 0 : tree tem;
7212 : 0 : tem = build_zero_cst (type);
7213 : 0 : res_op->set_value (tem);
7214 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 813, __FILE__, __LINE__, true);
7215 : : return true;
7216 : : }
7217 : 0 : next_after_fail1526:;
7218 : 0 : return false;
7219 : : }
7220 : :
7221 : : bool
7222 : 6103638 : gimple_simplify_564 (gimple_match_op *res_op, gimple_seq *seq,
7223 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7224 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7225 : : {
7226 : 6103638 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7227 : 12138807 : if (POINTER_TYPE_P (TREE_TYPE (captures[0]))
7228 : 6104544 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
7229 : : )
7230 : : {
7231 : 69375 : {
7232 : 69375 : unsigned int align;
7233 : 69375 : unsigned HOST_WIDE_INT bitpos;
7234 : 69375 : get_pointer_alignment_1 (captures[0], &align, &bitpos);
7235 : 69375 : if (wi::ltu_p (wi::to_wide (captures[1]), align / BITS_PER_UNIT)
7236 : : )
7237 : : {
7238 : 912 : gimple_seq *lseq = seq;
7239 : 912 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1529;
7240 : 912 : {
7241 : 912 : tree tem;
7242 : 1824 : tem = wide_int_to_tree (type, (wi::to_wide (captures[1])
7243 : 1824 : & (bitpos / BITS_PER_UNIT)));
7244 : 912 : res_op->set_value (tem);
7245 : 912 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 815, __FILE__, __LINE__, true);
7246 : 912 : return true;
7247 : : }
7248 : 0 : next_after_fail1529:;
7249 : : }
7250 : : }
7251 : : }
7252 : : return false;
7253 : : }
7254 : :
7255 : : bool
7256 : 14 : gimple_simplify_570 (gimple_match_op *res_op, gimple_seq *seq,
7257 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7258 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7259 : : const enum tree_code ARG_UNUSED (eqne))
7260 : : {
7261 : 14 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7262 : 14 : if (eqne == EQ_EXPR
7263 : : )
7264 : : {
7265 : 6 : gimple_seq *lseq = seq;
7266 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1541;
7267 : 6 : {
7268 : 6 : tree tem;
7269 : 6 : tem = constant_boolean_node (false, type);
7270 : 6 : res_op->set_value (tem);
7271 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 824, __FILE__, __LINE__, true);
7272 : 6 : return true;
7273 : : }
7274 : 0 : next_after_fail1541:;
7275 : : }
7276 : : else
7277 : : {
7278 : 8 : if (eqne == NE_EXPR
7279 : : )
7280 : : {
7281 : 8 : gimple_seq *lseq = seq;
7282 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1542;
7283 : 8 : {
7284 : 8 : tree tem;
7285 : 8 : tem = captures[0];
7286 : 8 : res_op->set_value (tem);
7287 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 825, __FILE__, __LINE__, true);
7288 : 8 : return true;
7289 : : }
7290 : 0 : next_after_fail1542:;
7291 : : }
7292 : : }
7293 : : return false;
7294 : : }
7295 : :
7296 : : bool
7297 : 49 : gimple_simplify_575 (gimple_match_op *res_op, gimple_seq *seq,
7298 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7299 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7300 : : {
7301 : 49 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7302 : 49 : gimple_seq *lseq = seq;
7303 : 49 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1566;
7304 : 49 : {
7305 : 49 : tree tem;
7306 : 49 : tem = captures[2];
7307 : 49 : res_op->set_value (tem);
7308 : 49 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 840, __FILE__, __LINE__, true);
7309 : : return true;
7310 : : }
7311 : 0 : next_after_fail1566:;
7312 : 0 : return false;
7313 : : }
7314 : :
7315 : : bool
7316 : 2 : gimple_simplify_576 (gimple_match_op *res_op, gimple_seq *seq,
7317 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7318 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7319 : : const enum tree_code ARG_UNUSED (eqne))
7320 : : {
7321 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7322 : 2 : if (eqne == EQ_EXPR
7323 : : )
7324 : : {
7325 : 0 : gimple_seq *lseq = seq;
7326 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1567;
7327 : 0 : {
7328 : 0 : tree tem;
7329 : 0 : tem = constant_boolean_node (false, type);
7330 : 0 : res_op->set_value (tem);
7331 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 824, __FILE__, __LINE__, true);
7332 : 0 : return true;
7333 : : }
7334 : 0 : next_after_fail1567:;
7335 : : }
7336 : : else
7337 : : {
7338 : 2 : if (eqne == NE_EXPR
7339 : : )
7340 : : {
7341 : 2 : gimple_seq *lseq = seq;
7342 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1568;
7343 : 2 : {
7344 : 2 : tree tem;
7345 : 2 : tem = captures[0];
7346 : 2 : res_op->set_value (tem);
7347 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 825, __FILE__, __LINE__, true);
7348 : 2 : return true;
7349 : : }
7350 : 0 : next_after_fail1568:;
7351 : : }
7352 : : }
7353 : : return false;
7354 : : }
7355 : :
7356 : : bool
7357 : 2150 : gimple_simplify_580 (gimple_match_op *res_op, gimple_seq *seq,
7358 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7359 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7360 : : {
7361 : 2150 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7362 : 4300 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
7363 : 4293 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
7364 : : )
7365 : : {
7366 : 2118 : gimple_seq *lseq = seq;
7367 : 2118 : if (lseq
7368 : 728 : && (!single_use (captures[0])
7369 : 256 : || !single_use (captures[2])))
7370 : 1862 : lseq = NULL;
7371 : 2118 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1584;
7372 : 2118 : {
7373 : 2118 : res_op->set_op (GT_EXPR, type, 2);
7374 : 2118 : res_op->ops[0] = captures[3];
7375 : 2118 : {
7376 : 2118 : tree _o1[2], _r1;
7377 : 2118 : _o1[0] = captures[1];
7378 : 2118 : _o1[1] = build_int_cst (TREE_TYPE (captures[1]), 1);
7379 : 2118 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7380 : 2118 : tem_op.resimplify (lseq, valueize);
7381 : 2118 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7382 : 2118 : if (!_r1) goto next_after_fail1584;
7383 : 446 : res_op->ops[1] = _r1;
7384 : : }
7385 : 446 : res_op->resimplify (lseq, valueize);
7386 : 446 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
7387 : 446 : return true;
7388 : : }
7389 : : next_after_fail1584:;
7390 : : }
7391 : : return false;
7392 : : }
7393 : :
7394 : : bool
7395 : 1296 : gimple_simplify_583 (gimple_match_op *res_op, gimple_seq *seq,
7396 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7397 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7398 : : {
7399 : 1296 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7400 : 2592 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
7401 : 2576 : && TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
7402 : : )
7403 : : {
7404 : 1278 : gimple_seq *lseq = seq;
7405 : 1278 : if (lseq
7406 : 228 : && (!single_use (captures[0])
7407 : 48 : || !single_use (captures[2])))
7408 : 1230 : lseq = NULL;
7409 : 1278 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1587;
7410 : 1278 : {
7411 : 1278 : res_op->set_op (GT_EXPR, type, 2);
7412 : 1278 : res_op->ops[0] = captures[3];
7413 : 1278 : {
7414 : 1278 : tree _o1[2], _r1;
7415 : 1278 : _o1[0] = captures[1];
7416 : 1278 : _o1[1] = build_int_cst (TREE_TYPE (captures[1]), 1);
7417 : 1278 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
7418 : 1278 : tem_op.resimplify (lseq, valueize);
7419 : 1278 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7420 : 1278 : if (!_r1) goto next_after_fail1587;
7421 : 48 : res_op->ops[1] = _r1;
7422 : : }
7423 : 48 : res_op->resimplify (lseq, valueize);
7424 : 48 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
7425 : 48 : return true;
7426 : : }
7427 : : next_after_fail1587:;
7428 : : }
7429 : : return false;
7430 : : }
7431 : :
7432 : : bool
7433 : 49 : gimple_simplify_588 (gimple_match_op *res_op, gimple_seq *seq,
7434 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7435 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7436 : : {
7437 : 49 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7438 : 49 : if ((wi::to_wide (captures[2]) & 1) != 0
7439 : : )
7440 : : {
7441 : 30 : gimple_seq *lseq = seq;
7442 : 30 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1597;
7443 : 30 : {
7444 : 30 : tree tem;
7445 : 30 : tem = captures[0];
7446 : 30 : res_op->set_value (tem);
7447 : 30 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 844, __FILE__, __LINE__, true);
7448 : 30 : return true;
7449 : : }
7450 : 0 : next_after_fail1597:;
7451 : : }
7452 : : else
7453 : : {
7454 : 19 : gimple_seq *lseq = seq;
7455 : 19 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1598;
7456 : 19 : {
7457 : 19 : tree tem;
7458 : 19 : tem = build_zero_cst (type);
7459 : 19 : res_op->set_value (tem);
7460 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 845, __FILE__, __LINE__, true);
7461 : 19 : return true;
7462 : : }
7463 : 0 : next_after_fail1598:;
7464 : : }
7465 : : return false;
7466 : : }
7467 : :
7468 : : bool
7469 : 1 : gimple_simplify_591 (gimple_match_op *res_op, gimple_seq *seq,
7470 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7471 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7472 : : {
7473 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7474 : 1 : gimple_seq *lseq = seq;
7475 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1601;
7476 : 1 : {
7477 : 1 : tree tem;
7478 : 1 : tem = constant_boolean_node (false, type);
7479 : 1 : res_op->set_value (tem);
7480 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 847, __FILE__, __LINE__, true);
7481 : : return true;
7482 : : }
7483 : 0 : next_after_fail1601:;
7484 : 0 : return false;
7485 : : }
7486 : :
7487 : : bool
7488 : 0 : gimple_simplify_594 (gimple_match_op *res_op, gimple_seq *seq,
7489 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7490 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7491 : : {
7492 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7493 : 0 : gimple_seq *lseq = seq;
7494 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1604;
7495 : 0 : {
7496 : 0 : res_op->set_op (EQ_EXPR, type, 2);
7497 : 0 : res_op->ops[0] = captures[2];
7498 : 0 : res_op->ops[1] = captures[3];
7499 : 0 : res_op->resimplify (lseq, valueize);
7500 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 849, __FILE__, __LINE__, true);
7501 : : return true;
7502 : : }
7503 : 0 : next_after_fail1604:;
7504 : 0 : return false;
7505 : : }
7506 : :
7507 : : bool
7508 : 2 : gimple_simplify_597 (gimple_match_op *res_op, gimple_seq *seq,
7509 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7510 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7511 : : {
7512 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7513 : 2 : gimple_seq *lseq = seq;
7514 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1607;
7515 : 2 : {
7516 : 2 : tree tem;
7517 : 2 : tem = captures[1];
7518 : 2 : res_op->set_value (tem);
7519 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 850, __FILE__, __LINE__, true);
7520 : : return true;
7521 : : }
7522 : 0 : next_after_fail1607:;
7523 : 0 : return false;
7524 : : }
7525 : :
7526 : : bool
7527 : 1 : gimple_simplify_602 (gimple_match_op *res_op, gimple_seq *seq,
7528 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7529 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7530 : : {
7531 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7532 : 1 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[0]))
7533 : 1 : || !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
7534 : : )
7535 : : {
7536 : 1 : gimple_seq *lseq = seq;
7537 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1613;
7538 : 1 : {
7539 : 1 : res_op->set_op (NOP_EXPR, type, 1);
7540 : 1 : {
7541 : 1 : tree _o1[1], _r1;
7542 : 1 : _o1[0] = captures[0];
7543 : 1 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
7544 : 1 : (*res_op).ops[0] = _o1[0];
7545 : 1 : (*res_op).resimplify (lseq, valueize);
7546 : : }
7547 : 1 : if (type != res_op->type
7548 : 1 : && !useless_type_conversion_p (type, res_op->type))
7549 : : {
7550 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1613;
7551 : 0 : res_op->set_op (NOP_EXPR, type, 1);
7552 : 0 : res_op->resimplify (lseq, valueize);
7553 : : }
7554 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 856, __FILE__, __LINE__, true);
7555 : 1 : return true;
7556 : : }
7557 : : next_after_fail1613:;
7558 : : }
7559 : : return false;
7560 : : }
7561 : :
7562 : : bool
7563 : 1012 : gimple_simplify_607 (gimple_match_op *res_op, gimple_seq *seq,
7564 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7565 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7566 : : {
7567 : 1012 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7568 : 1012 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
7569 : : )
7570 : : {
7571 : 451 : gimple_seq *lseq = seq;
7572 : 451 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1618;
7573 : 451 : {
7574 : 451 : res_op->set_op (NOP_EXPR, type, 1);
7575 : 451 : {
7576 : 451 : tree _o1[2], _r1;
7577 : 451 : _o1[0] = captures[0];
7578 : 451 : {
7579 : 451 : tree _o2[1], _r2;
7580 : 451 : _o2[0] = captures[1];
7581 : 451 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
7582 : 451 : tem_op.resimplify (lseq, valueize);
7583 : 451 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7584 : 451 : if (!_r2) goto next_after_fail1618;
7585 : 451 : _o1[1] = _r2;
7586 : : }
7587 : 451 : (*res_op).set_op (BIT_XOR_EXPR, TREE_TYPE (_o1[0]), 2);
7588 : 451 : (*res_op).ops[0] = _o1[0];
7589 : 451 : (*res_op).ops[1] = _o1[1];
7590 : 451 : (*res_op).resimplify (lseq, valueize);
7591 : : }
7592 : 451 : if (type != res_op->type
7593 : 451 : && !useless_type_conversion_p (type, res_op->type))
7594 : : {
7595 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1618;
7596 : 0 : res_op->set_op (NOP_EXPR, type, 1);
7597 : 0 : res_op->resimplify (lseq, valueize);
7598 : : }
7599 : 451 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 861, __FILE__, __LINE__, true);
7600 : 451 : return true;
7601 : : }
7602 : : next_after_fail1618:;
7603 : : }
7604 : : return false;
7605 : : }
7606 : :
7607 : : bool
7608 : 5693 : gimple_simplify_614 (gimple_match_op *res_op, gimple_seq *seq,
7609 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7610 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7611 : : const enum tree_code ARG_UNUSED (minmax))
7612 : : {
7613 : 5693 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7614 : 5693 : gimple_seq *lseq = seq;
7615 : 5693 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1626;
7616 : 5693 : {
7617 : 5693 : tree tem;
7618 : 5693 : tem = captures[0];
7619 : 5693 : res_op->set_value (tem);
7620 : 5693 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 867, __FILE__, __LINE__, true);
7621 : : return true;
7622 : : }
7623 : 0 : next_after_fail1626:;
7624 : 0 : return false;
7625 : : }
7626 : :
7627 : : bool
7628 : 6 : gimple_simplify_618 (gimple_match_op *res_op, gimple_seq *seq,
7629 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7630 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7631 : : {
7632 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7633 : 6 : if (TREE_CODE (type) != COMPLEX_TYPE
7634 : 6 : && (! ANY_INTEGRAL_TYPE_P (type)
7635 : 6 : || TYPE_OVERFLOW_UNDEFINED (type))
7636 : : )
7637 : : {
7638 : 6 : gimple_seq *lseq = seq;
7639 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1630;
7640 : 6 : {
7641 : 6 : res_op->set_op (NEGATE_EXPR, type, 1);
7642 : 6 : {
7643 : 6 : tree _o1[1], _r1;
7644 : 6 : _o1[0] = captures[0];
7645 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
7646 : 6 : tem_op.resimplify (lseq, valueize);
7647 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7648 : 6 : if (!_r1) goto next_after_fail1630;
7649 : 2 : res_op->ops[0] = _r1;
7650 : : }
7651 : 2 : res_op->resimplify (lseq, valueize);
7652 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 870, __FILE__, __LINE__, true);
7653 : 2 : return true;
7654 : : }
7655 : : next_after_fail1630:;
7656 : : }
7657 : : return false;
7658 : : }
7659 : :
7660 : : bool
7661 : 0 : gimple_simplify_626 (gimple_match_op *res_op, gimple_seq *seq,
7662 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7663 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7664 : : {
7665 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7666 : 0 : if (TREE_CODE (type) != COMPLEX_TYPE
7667 : 0 : && (! ANY_INTEGRAL_TYPE_P (type)
7668 : 0 : || TYPE_OVERFLOW_UNDEFINED (type))
7669 : : )
7670 : : {
7671 : 0 : gimple_seq *lseq = seq;
7672 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1650;
7673 : 0 : {
7674 : 0 : res_op->set_op (ABS_EXPR, type, 1);
7675 : 0 : res_op->ops[0] = captures[0];
7676 : 0 : res_op->resimplify (lseq, valueize);
7677 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 878, __FILE__, __LINE__, true);
7678 : 0 : return true;
7679 : : }
7680 : 0 : next_after_fail1650:;
7681 : : }
7682 : : return false;
7683 : : }
7684 : :
7685 : : bool
7686 : 4 : gimple_simplify_631 (gimple_match_op *res_op, gimple_seq *seq,
7687 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7688 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7689 : : const enum tree_code ARG_UNUSED (rotate))
7690 : : {
7691 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7692 : 4 : gimple_seq *lseq = seq;
7693 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1655;
7694 : 4 : {
7695 : 4 : tree tem;
7696 : 4 : tem = captures[0];
7697 : 4 : res_op->set_value (tem);
7698 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 883, __FILE__, __LINE__, true);
7699 : : return true;
7700 : : }
7701 : 0 : next_after_fail1655:;
7702 : 0 : return false;
7703 : : }
7704 : :
7705 : : bool
7706 : 27 : gimple_simplify_637 (gimple_match_op *res_op, gimple_seq *seq,
7707 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7708 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7709 : : const enum tree_code ARG_UNUSED (bitop),
7710 : : const combined_fn ARG_UNUSED (bswap))
7711 : : {
7712 : 27 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7713 : 27 : gimple_seq *lseq = seq;
7714 : 27 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1664;
7715 : 27 : {
7716 : 27 : res_op->set_op (bitop, type, 2);
7717 : 27 : res_op->ops[0] = captures[0];
7718 : 27 : {
7719 : 27 : tree _o1[1], _r1;
7720 : 27 : _o1[0] = captures[1];
7721 : 27 : gimple_match_op tem_op (res_op->cond.any_else (), bswap, TREE_TYPE (_o1[0]), _o1[0]);
7722 : 27 : tem_op.resimplify (lseq, valueize);
7723 : 27 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7724 : 27 : if (!_r1) goto next_after_fail1664;
7725 : 27 : res_op->ops[1] = _r1;
7726 : : }
7727 : 27 : res_op->resimplify (lseq, valueize);
7728 : 27 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 892, __FILE__, __LINE__, true);
7729 : : return true;
7730 : : }
7731 : : next_after_fail1664:;
7732 : : return false;
7733 : : }
7734 : :
7735 : : bool
7736 : 0 : gimple_simplify_644 (gimple_match_op *res_op, gimple_seq *seq,
7737 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7738 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7739 : : const enum tree_code ARG_UNUSED (cmp))
7740 : : {
7741 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7742 : 0 : gimple_seq *lseq = seq;
7743 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1671;
7744 : 0 : {
7745 : 0 : tree tem;
7746 : 0 : tem = captures[3];
7747 : 0 : res_op->set_value (tem);
7748 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 644, __FILE__, __LINE__, true);
7749 : : return true;
7750 : : }
7751 : 0 : next_after_fail1671:;
7752 : 0 : return false;
7753 : : }
7754 : :
7755 : : bool
7756 : 0 : gimple_simplify_651 (gimple_match_op *res_op, gimple_seq *seq,
7757 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7758 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7759 : : const combined_fn ARG_UNUSED (cond_op))
7760 : : {
7761 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7762 : 0 : {
7763 : 0 : tree op_type = TREE_TYPE (captures[6]);
7764 : 0 : if (inverse_conditions_p (captures[0], captures[2])
7765 : 0 : && element_precision (type) == element_precision (op_type)
7766 : : )
7767 : : {
7768 : 0 : gimple_seq *lseq = seq;
7769 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1678;
7770 : 0 : {
7771 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
7772 : 0 : {
7773 : 0 : tree _o1[5], _r1;
7774 : 0 : _o1[0] = captures[2];
7775 : 0 : _o1[1] = captures[3];
7776 : 0 : _o1[2] = captures[4];
7777 : 0 : _o1[3] = captures[5];
7778 : 0 : {
7779 : 0 : tree _o2[1], _r2;
7780 : 0 : _o2[0] = captures[1];
7781 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
7782 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
7783 : : {
7784 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
7785 : 0 : tem_op.resimplify (lseq, valueize);
7786 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7787 : 0 : if (!_r2) goto next_after_fail1678;
7788 : : }
7789 : : else
7790 : : _r2 = _o2[0];
7791 : 0 : _o1[4] = _r2;
7792 : : }
7793 : 0 : (*res_op).set_op (cond_op, TREE_TYPE (_o1[1]), 5);
7794 : 0 : (*res_op).ops[0] = _o1[0];
7795 : 0 : (*res_op).ops[1] = _o1[1];
7796 : 0 : (*res_op).ops[2] = _o1[2];
7797 : 0 : (*res_op).ops[3] = _o1[3];
7798 : 0 : (*res_op).ops[4] = _o1[4];
7799 : 0 : (*res_op).resimplify (lseq, valueize);
7800 : : }
7801 : 0 : if (type != res_op->type
7802 : 0 : && !useless_type_conversion_p (type, res_op->type))
7803 : : {
7804 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1678;
7805 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
7806 : 0 : res_op->resimplify (lseq, valueize);
7807 : : }
7808 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 901, __FILE__, __LINE__, true);
7809 : 0 : return true;
7810 : : }
7811 : : next_after_fail1678:;
7812 : : }
7813 : : }
7814 : : return false;
7815 : : }
7816 : :
7817 : : bool
7818 : 14 : gimple_simplify_659 (gimple_match_op *res_op, gimple_seq *seq,
7819 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7820 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7821 : : const enum tree_code ARG_UNUSED (cmp))
7822 : : {
7823 : 14 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7824 : 14 : gimple_seq *lseq = seq;
7825 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1686;
7826 : 14 : {
7827 : 14 : res_op->set_op (UNORDERED_EXPR, type, 2);
7828 : 14 : res_op->ops[0] = captures[0];
7829 : 14 : res_op->ops[1] = captures[0];
7830 : 14 : res_op->resimplify (lseq, valueize);
7831 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
7832 : : return true;
7833 : : }
7834 : 0 : next_after_fail1686:;
7835 : 0 : return false;
7836 : : }
7837 : :
7838 : : bool
7839 : 5256 : gimple_simplify_662 (gimple_match_op *res_op, gimple_seq *seq,
7840 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7841 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7842 : : const combined_fn ARG_UNUSED (ovf))
7843 : : {
7844 : 5256 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7845 : 10512 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
7846 : 5256 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
7847 : 5256 : && TYPE_PRECISION (TREE_TYPE (captures[1])) > TYPE_PRECISION (TREE_TYPE (captures[2]))
7848 : 9060 : && (!TYPE_UNSIGNED (TREE_TYPE (captures[1])) || TYPE_UNSIGNED (TREE_TYPE (captures[2])))
7849 : : )
7850 : : {
7851 : 3667 : gimple_seq *lseq = seq;
7852 : 3667 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1689;
7853 : 3667 : {
7854 : 3667 : res_op->set_op (ovf, type, 2);
7855 : 3667 : res_op->ops[0] = captures[0];
7856 : 3667 : res_op->ops[1] = captures[2];
7857 : 3667 : res_op->resimplify (lseq, valueize);
7858 : 3667 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 912, __FILE__, __LINE__, true);
7859 : 3667 : return true;
7860 : : }
7861 : 0 : next_after_fail1689:;
7862 : : }
7863 : : return false;
7864 : : }
7865 : :
7866 : : bool
7867 : 1137 : gimple_simplify_671 (gimple_match_op *res_op, gimple_seq *seq,
7868 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7869 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7870 : : const combined_fn ARG_UNUSED (froms),
7871 : : const combined_fn ARG_UNUSED (tos))
7872 : : {
7873 : 1137 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7874 : 1137 : if (optimize && canonicalize_math_p ()
7875 : 2274 : && targetm.libc_has_function (function_c99_misc, NULL_TREE)
7876 : : )
7877 : : {
7878 : 1137 : gimple_seq *lseq = seq;
7879 : 1137 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1698;
7880 : 1137 : {
7881 : 1137 : res_op->set_op (NOP_EXPR, type, 1);
7882 : 1137 : {
7883 : 1137 : tree _o1[1], _r1;
7884 : 1137 : _o1[0] = captures[0];
7885 : 1137 : (*res_op).set_op (tos, TREE_TYPE (_o1[0]), 1);
7886 : 1137 : (*res_op).ops[0] = _o1[0];
7887 : 1137 : (*res_op).resimplify (lseq, valueize);
7888 : : }
7889 : 1137 : if (type != res_op->type
7890 : 1137 : && !useless_type_conversion_p (type, res_op->type))
7891 : : {
7892 : 1137 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1698;
7893 : 570 : res_op->set_op (NOP_EXPR, type, 1);
7894 : 570 : res_op->resimplify (lseq, valueize);
7895 : : }
7896 : 570 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
7897 : 570 : return true;
7898 : : }
7899 : : next_after_fail1698:;
7900 : : }
7901 : : return false;
7902 : : }
7903 : :
7904 : : bool
7905 : 2515 : gimple_simplify_681 (gimple_match_op *res_op, gimple_seq *seq,
7906 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7907 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7908 : : const combined_fn ARG_UNUSED (ifn),
7909 : : const combined_fn ARG_UNUSED (lfn),
7910 : : const combined_fn ARG_UNUSED (llfn))
7911 : : {
7912 : 2515 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7913 : 2515 : if (canonicalize_math_p ()
7914 : : )
7915 : : {
7916 : 2183 : if (TYPE_PRECISION (long_long_integer_type_node)
7917 : 2183 : == TYPE_PRECISION (long_integer_type_node)
7918 : : )
7919 : : {
7920 : 2183 : gimple_seq *lseq = seq;
7921 : 2183 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1708;
7922 : 2183 : {
7923 : 2183 : res_op->set_op (lfn, type, 1);
7924 : 2183 : res_op->ops[0] = captures[0];
7925 : 2183 : res_op->resimplify (lseq, valueize);
7926 : 2183 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 931, __FILE__, __LINE__, true);
7927 : 2183 : return true;
7928 : : }
7929 : 0 : next_after_fail1708:;
7930 : : }
7931 : : }
7932 : : return false;
7933 : : }
7934 : :
7935 : : bool
7936 : 0 : gimple_simplify_691 (gimple_match_op *res_op, gimple_seq *seq,
7937 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7938 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
7939 : : {
7940 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7941 : 0 : if (canonicalize_math_after_vectorization_p ()
7942 : : )
7943 : : {
7944 : 0 : gimple_seq *lseq = seq;
7945 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1718;
7946 : 0 : {
7947 : 0 : res_op->set_op (CFN_FMS, type, 3);
7948 : 0 : res_op->ops[0] = captures[0];
7949 : 0 : res_op->ops[1] = captures[1];
7950 : 0 : res_op->ops[2] = captures[2];
7951 : 0 : res_op->resimplify (lseq, valueize);
7952 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 941, __FILE__, __LINE__, true);
7953 : 0 : return true;
7954 : : }
7955 : 0 : next_after_fail1718:;
7956 : : }
7957 : : return false;
7958 : : }
7959 : :
7960 : : bool
7961 : 20 : gimple_simplify_699 (gimple_match_op *res_op, gimple_seq *seq,
7962 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
7963 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
7964 : : const combined_fn ARG_UNUSED (bswap),
7965 : : const combined_fn ARG_UNUSED (popcount))
7966 : : {
7967 : 20 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
7968 : 40 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
7969 : 40 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
7970 : : )
7971 : : {
7972 : 20 : {
7973 : 20 : tree type0 = TREE_TYPE (captures[0]);
7974 : 20 : tree type1 = TREE_TYPE (captures[1]);
7975 : 20 : unsigned int prec0 = TYPE_PRECISION (type0);
7976 : 20 : unsigned int prec1 = TYPE_PRECISION (type1);
7977 : 20 : if (prec0 == prec1 || (prec0 > prec1 && TYPE_UNSIGNED (type1))
7978 : : )
7979 : : {
7980 : 20 : gimple_seq *lseq = seq;
7981 : 20 : if (lseq
7982 : 10 : && (!single_use (captures[1])))
7983 : 10 : lseq = NULL;
7984 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1728;
7985 : 20 : {
7986 : 20 : res_op->set_op (popcount, type, 1);
7987 : 20 : {
7988 : 20 : tree _r1;
7989 : 20 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
7990 : 20 : {
7991 : 20 : tree _o2[1], _r2;
7992 : 20 : _o2[0] = captures[2];
7993 : 20 : tem_op.set_op (NOP_EXPR, type1, 1);
7994 : 20 : tem_op.ops[0] = _o2[0];
7995 : 20 : tem_op.resimplify (lseq, valueize);
7996 : : }
7997 : 20 : if (type0 != tem_op.type
7998 : 20 : && !useless_type_conversion_p (type0, tem_op.type))
7999 : : {
8000 : 20 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8001 : 30 : if (!_r1) goto next_after_fail1728;
8002 : 20 : tem_op.set_op (NOP_EXPR, type0, 1);
8003 : 20 : tem_op.ops[0] = _r1;
8004 : 20 : tem_op.resimplify (lseq, valueize);
8005 : : }
8006 : 20 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8007 : 20 : if (!_r1) goto next_after_fail1728;
8008 : 10 : res_op->ops[0] = _r1;
8009 : : }
8010 : 10 : res_op->resimplify (lseq, valueize);
8011 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 948, __FILE__, __LINE__, true);
8012 : 10 : return true;
8013 : : }
8014 : : next_after_fail1728:;
8015 : : }
8016 : : }
8017 : : }
8018 : : return false;
8019 : : }
8020 : :
8021 : : bool
8022 : 9 : gimple_simplify_709 (gimple_match_op *res_op, gimple_seq *seq,
8023 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
8024 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
8025 : : const combined_fn ARG_UNUSED (bswap),
8026 : : const combined_fn ARG_UNUSED (parity))
8027 : : {
8028 : 9 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8029 : 18 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
8030 : 9 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
8031 : 18 : && TYPE_PRECISION (TREE_TYPE (captures[0]))
8032 : 9 : >= TYPE_PRECISION (TREE_TYPE (captures[1]))
8033 : : )
8034 : : {
8035 : 9 : {
8036 : 9 : tree type0 = TREE_TYPE (captures[0]);
8037 : 9 : tree type1 = TREE_TYPE (captures[1]);
8038 : 9 : gimple_seq *lseq = seq;
8039 : 9 : if (lseq
8040 : 3 : && (!single_use (captures[0])
8041 : 3 : || !single_use (captures[1])))
8042 : 6 : lseq = NULL;
8043 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1743;
8044 : 9 : {
8045 : 9 : res_op->set_op (parity, type, 1);
8046 : 9 : {
8047 : 9 : tree _r1;
8048 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), ERROR_MARK, error_mark_node, 1);
8049 : 9 : {
8050 : 9 : tree _o2[1], _r2;
8051 : 9 : _o2[0] = captures[2];
8052 : 9 : tem_op.set_op (NOP_EXPR, type1, 1);
8053 : 9 : tem_op.ops[0] = _o2[0];
8054 : 9 : tem_op.resimplify (lseq, valueize);
8055 : : }
8056 : 9 : if (type0 != tem_op.type
8057 : 9 : && !useless_type_conversion_p (type0, tem_op.type))
8058 : : {
8059 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8060 : 0 : if (!_r1) goto next_after_fail1743;
8061 : 0 : tem_op.set_op (NOP_EXPR, type0, 1);
8062 : 0 : tem_op.ops[0] = _r1;
8063 : 0 : tem_op.resimplify (lseq, valueize);
8064 : : }
8065 : 9 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8066 : 9 : if (!_r1) goto next_after_fail1743;
8067 : 9 : res_op->ops[0] = _r1;
8068 : : }
8069 : 9 : res_op->resimplify (lseq, valueize);
8070 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 956, __FILE__, __LINE__, true);
8071 : 9 : return true;
8072 : : }
8073 : : next_after_fail1743:;
8074 : : }
8075 : : }
8076 : : return false;
8077 : : }
8078 : :
8079 : : bool
8080 : 177 : gimple_simplify_715 (gimple_match_op *res_op, gimple_seq *seq,
8081 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
8082 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
8083 : : const combined_fn ARG_UNUSED (reduc))
8084 : : {
8085 : 177 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8086 : 177 : {
8087 : 177 : int i = single_nonzero_element (captures[1]);
8088 : 177 : if (i >= 0
8089 : : )
8090 : : {
8091 : 33 : {
8092 : 33 : tree elt = vector_cst_elt (captures[1], i);
8093 : 33 : tree elt_type = TREE_TYPE (elt);
8094 : 33 : unsigned int elt_bits = tree_to_uhwi (TYPE_SIZE (elt_type));
8095 : 33 : tree size = bitsize_int (elt_bits);
8096 : 33 : tree pos = bitsize_int (elt_bits * i);
8097 : 33 : gimple_seq *lseq = seq;
8098 : 33 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1751;
8099 : 33 : {
8100 : 33 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
8101 : 33 : {
8102 : 33 : tree _o1[2], _r1;
8103 : 33 : {
8104 : 33 : tree _o2[3], _r2;
8105 : 33 : _o2[0] = captures[0];
8106 : 33 : _o2[1] = size;
8107 : 33 : _o2[2] = pos;
8108 : 33 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_FIELD_REF, elt_type, _o2[0], _o2[1], _o2[2]);
8109 : 33 : tem_op.resimplify (lseq, valueize);
8110 : 33 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
8111 : 33 : if (!_r2) goto next_after_fail1751;
8112 : 33 : _o1[0] = _r2;
8113 : : }
8114 : 33 : _o1[1] = elt;
8115 : 33 : (*res_op).set_op (BIT_AND_EXPR, elt_type, 2);
8116 : 33 : (*res_op).ops[0] = _o1[0];
8117 : 33 : (*res_op).ops[1] = _o1[1];
8118 : 33 : (*res_op).resimplify (lseq, valueize);
8119 : : }
8120 : 33 : if (type != res_op->type
8121 : 33 : && !useless_type_conversion_p (type, res_op->type))
8122 : : {
8123 : 15 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1751;
8124 : 15 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
8125 : 15 : res_op->resimplify (lseq, valueize);
8126 : : }
8127 : 33 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 967, __FILE__, __LINE__, true);
8128 : 33 : return true;
8129 : : }
8130 : : next_after_fail1751:;
8131 : : }
8132 : : }
8133 : : }
8134 : : return false;
8135 : : }
8136 : :
8137 : : bool
8138 : 3585 : gimple_simplify_CFN_BUILT_IN_COS (gimple_match_op *res_op, gimple_seq *seq,
8139 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
8140 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
8141 : : {
8142 : 3585 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8143 : 3585 : switch (TREE_CODE (_p0))
8144 : : {
8145 : 3376 : case SSA_NAME:
8146 : 3376 : if (gimple *_d1 = get_def (valueize, _p0))
8147 : : {
8148 : 1838 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
8149 : 1334 : switch (gimple_assign_rhs_code (_a1))
8150 : : {
8151 : 28 : case NEGATE_EXPR:
8152 : 28 : {
8153 : 28 : tree _q20 = gimple_assign_rhs1 (_a1);
8154 : 28 : _q20 = do_valueize (valueize, _q20);
8155 : 28 : {
8156 : 28 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8157 : 28 : const combined_fn coss = CFN_BUILT_IN_COS;
8158 : 28 : gimple_seq *lseq = seq;
8159 : 28 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1786;
8160 : 28 : {
8161 : 28 : res_op->set_op (coss, type, 1);
8162 : 28 : res_op->ops[0] = captures[0];
8163 : 28 : res_op->resimplify (lseq, valueize);
8164 : 28 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 993, __FILE__, __LINE__, true);
8165 : 28 : return true;
8166 : : }
8167 : 0 : next_after_fail1786:;
8168 : : }
8169 : 0 : break;
8170 : : }
8171 : 6 : case ABS_EXPR:
8172 : 6 : {
8173 : 6 : tree _q20 = gimple_assign_rhs1 (_a1);
8174 : 6 : _q20 = do_valueize (valueize, _q20);
8175 : 6 : {
8176 : 6 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8177 : 6 : const combined_fn coss = CFN_BUILT_IN_COS;
8178 : 6 : gimple_seq *lseq = seq;
8179 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1787;
8180 : 6 : {
8181 : 6 : res_op->set_op (coss, type, 1);
8182 : 6 : res_op->ops[0] = captures[0];
8183 : 6 : res_op->resimplify (lseq, valueize);
8184 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 993, __FILE__, __LINE__, true);
8185 : 6 : return true;
8186 : : }
8187 : 0 : next_after_fail1787:;
8188 : : }
8189 : 0 : break;
8190 : : }
8191 : : default:;
8192 : : }
8193 : 776 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
8194 : 198 : switch (gimple_call_combined_fn (_c1))
8195 : : {
8196 : 12 : case CFN_BUILT_IN_ATAN:
8197 : 12 : if (gimple_call_num_args (_c1) == 1)
8198 : : {
8199 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
8200 : 12 : _q20 = do_valueize (valueize, _q20);
8201 : 12 : {
8202 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
8203 : 12 : if (gimple_simplify_524 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COS, CFN_BUILT_IN_ATAN, CFN_BUILT_IN_SQRT, CFN_BUILT_IN_COPYSIGN))
8204 : 2 : return true;
8205 : : }
8206 : : }
8207 : : break;
8208 : 4 : case CFN_BUILT_IN_COPYSIGN:
8209 : 4 : if (gimple_call_num_args (_c1) == 2)
8210 : : {
8211 : 4 : tree _q20 = gimple_call_arg (_c1, 0);
8212 : 4 : _q20 = do_valueize (valueize, _q20);
8213 : 4 : tree _q21 = gimple_call_arg (_c1, 1);
8214 : 4 : _q21 = do_valueize (valueize, _q21);
8215 : 4 : {
8216 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8217 : 4 : if (gimple_simplify_523 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_BUILT_IN_COS))
8218 : 4 : return true;
8219 : : }
8220 : : }
8221 : : break;
8222 : 0 : case CFN_BUILT_IN_COPYSIGNF:
8223 : 0 : if (gimple_call_num_args (_c1) == 2)
8224 : : {
8225 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8226 : 0 : _q20 = do_valueize (valueize, _q20);
8227 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8228 : 0 : _q21 = do_valueize (valueize, _q21);
8229 : 0 : {
8230 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8231 : 0 : if (gimple_simplify_523 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_BUILT_IN_COS))
8232 : 0 : return true;
8233 : : }
8234 : : }
8235 : : break;
8236 : 0 : case CFN_BUILT_IN_COPYSIGNL:
8237 : 0 : if (gimple_call_num_args (_c1) == 2)
8238 : : {
8239 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8240 : 0 : _q20 = do_valueize (valueize, _q20);
8241 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8242 : 0 : _q21 = do_valueize (valueize, _q21);
8243 : 0 : {
8244 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8245 : 0 : if (gimple_simplify_523 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_BUILT_IN_COS))
8246 : 0 : return true;
8247 : : }
8248 : : }
8249 : : break;
8250 : 4 : case CFN_COPYSIGN:
8251 : 4 : if (gimple_call_num_args (_c1) == 2)
8252 : : {
8253 : 4 : tree _q20 = gimple_call_arg (_c1, 0);
8254 : 4 : _q20 = do_valueize (valueize, _q20);
8255 : 4 : tree _q21 = gimple_call_arg (_c1, 1);
8256 : 4 : _q21 = do_valueize (valueize, _q21);
8257 : 4 : {
8258 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8259 : 4 : if (gimple_simplify_523 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_BUILT_IN_COS))
8260 : 4 : return true;
8261 : : }
8262 : : }
8263 : : break;
8264 : : default:;
8265 : : }
8266 : : }
8267 : : break;
8268 : : default:;
8269 : : }
8270 : : return false;
8271 : : }
8272 : :
8273 : : bool
8274 : 8688074 : gimple_simplify_NEGATE_EXPR (gimple_match_op *res_op, gimple_seq *seq,
8275 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
8276 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
8277 : : {
8278 : 8688074 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
8279 : 8688074 : switch (TREE_CODE (_p0))
8280 : : {
8281 : 8645063 : case SSA_NAME:
8282 : 8645063 : if (gimple *_d1 = get_def (valueize, _p0))
8283 : : {
8284 : 8020040 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
8285 : 8449674 : switch (gimple_assign_rhs_code (_a1))
8286 : : {
8287 : 5407 : case ABS_EXPR:
8288 : 5407 : {
8289 : 5407 : tree _q20 = gimple_assign_rhs1 (_a1);
8290 : 5407 : _q20 = do_valueize (valueize, _q20);
8291 : 5407 : {
8292 : 5407 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8293 : 5407 : if (direct_internal_fn_supported_p (IFN_COPYSIGN, type,
8294 : : OPTIMIZE_FOR_BOTH)
8295 : : )
8296 : : {
8297 : 2576 : gimple_seq *lseq = seq;
8298 : 2576 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1800;
8299 : 2576 : {
8300 : 2576 : res_op->set_op (CFN_COPYSIGN, type, 2);
8301 : 2576 : res_op->ops[0] = captures[0];
8302 : 2576 : res_op->ops[1] = build_minus_one_cst (type);
8303 : 2576 : res_op->resimplify (lseq, valueize);
8304 : 2576 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 994, __FILE__, __LINE__, true);
8305 : 2576 : return true;
8306 : : }
8307 : 0 : next_after_fail1800:;
8308 : : }
8309 : : }
8310 : : break;
8311 : : }
8312 : 871386 : case PLUS_EXPR:
8313 : 871386 : {
8314 : 871386 : tree _q20 = gimple_assign_rhs1 (_a1);
8315 : 871386 : _q20 = do_valueize (valueize, _q20);
8316 : 871386 : tree _q21 = gimple_assign_rhs2 (_a1);
8317 : 871386 : _q21 = do_valueize (valueize, _q21);
8318 : 871386 : if (tree_swap_operands_p (_q20, _q21))
8319 : 39732 : std::swap (_q20, _q21);
8320 : 871386 : if (gimple_negate_expr_p (_q21, valueize))
8321 : : {
8322 : 510534 : {
8323 : 510534 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8324 : 510534 : if (gimple_simplify_536 (res_op, seq, valueize, type, captures))
8325 : 506810 : return true;
8326 : : }
8327 : : }
8328 : 364576 : if (gimple_negate_expr_p (_q20, valueize))
8329 : : {
8330 : 4226 : {
8331 : 4226 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8332 : 4226 : if (gimple_simplify_536 (res_op, seq, valueize, type, captures))
8333 : 1691 : return true;
8334 : : }
8335 : : }
8336 : 7946812 : break;
8337 : : }
8338 : 249236 : case MINUS_EXPR:
8339 : 249236 : {
8340 : 249236 : tree _q20 = gimple_assign_rhs1 (_a1);
8341 : 249236 : _q20 = do_valueize (valueize, _q20);
8342 : 249236 : tree _q21 = gimple_assign_rhs2 (_a1);
8343 : 249236 : _q21 = do_valueize (valueize, _q21);
8344 : 249236 : {
8345 : 249236 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8346 : 249236 : if ((ANY_INTEGRAL_TYPE_P (type) && !TYPE_OVERFLOW_SANITIZED (type))
8347 : 335902 : || (FLOAT_TYPE_P (type)
8348 : 86666 : && !HONOR_SIGN_DEPENDENT_ROUNDING (type)
8349 : 86666 : && !HONOR_SIGNED_ZEROS (type))
8350 : : )
8351 : : {
8352 : 165654 : gimple_seq *lseq = seq;
8353 : 165654 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1801;
8354 : 165654 : {
8355 : 165654 : res_op->set_op (MINUS_EXPR, type, 2);
8356 : 165654 : res_op->ops[0] = captures[1];
8357 : 165654 : res_op->ops[1] = captures[0];
8358 : 165654 : res_op->resimplify (lseq, valueize);
8359 : 165654 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 995, __FILE__, __LINE__, true);
8360 : 165654 : return true;
8361 : : }
8362 : 0 : next_after_fail1801:;
8363 : : }
8364 : : }
8365 : 83582 : break;
8366 : : }
8367 : 7754 : case POINTER_DIFF_EXPR:
8368 : 7754 : {
8369 : 7754 : tree _q20 = gimple_assign_rhs1 (_a1);
8370 : 7754 : _q20 = do_valueize (valueize, _q20);
8371 : 7754 : tree _q21 = gimple_assign_rhs2 (_a1);
8372 : 7754 : _q21 = do_valueize (valueize, _q21);
8373 : 7754 : {
8374 : 7754 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8375 : 7754 : if (gimple_simplify_537 (res_op, seq, valueize, type, captures))
8376 : 7754 : return true;
8377 : : }
8378 : 0 : break;
8379 : : }
8380 : 352913 : case MULT_EXPR:
8381 : 352913 : {
8382 : 352913 : tree _q20 = gimple_assign_rhs1 (_a1);
8383 : 352913 : _q20 = do_valueize (valueize, _q20);
8384 : 352913 : tree _q21 = gimple_assign_rhs2 (_a1);
8385 : 352913 : _q21 = do_valueize (valueize, _q21);
8386 : 352913 : if (tree_swap_operands_p (_q20, _q21))
8387 : 20723 : std::swap (_q20, _q21);
8388 : 352913 : if (gimple_negate_expr_p (_q21, valueize))
8389 : : {
8390 : 122303 : {
8391 : 122303 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8392 : 122303 : if (gimple_simplify_540 (res_op, seq, valueize, type, captures))
8393 : 10388 : return true;
8394 : : }
8395 : : }
8396 : 342525 : if (gimple_negate_expr_p (_q20, valueize))
8397 : : {
8398 : 4502 : {
8399 : 4502 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
8400 : 4502 : if (gimple_simplify_540 (res_op, seq, valueize, type, captures))
8401 : 1712 : return true;
8402 : : }
8403 : : }
8404 : 7946812 : break;
8405 : : }
8406 : 45937 : case RDIV_EXPR:
8407 : 45937 : {
8408 : 45937 : tree _q20 = gimple_assign_rhs1 (_a1);
8409 : 45937 : _q20 = do_valueize (valueize, _q20);
8410 : 45937 : tree _q21 = gimple_assign_rhs2 (_a1);
8411 : 45937 : _q21 = do_valueize (valueize, _q21);
8412 : 45937 : if (gimple_negate_expr_p (_q21, valueize))
8413 : : {
8414 : 119 : {
8415 : 119 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8416 : 119 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
8417 : 119 : && single_use (captures[0])
8418 : : )
8419 : : {
8420 : 1 : gimple_seq *lseq = seq;
8421 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1802;
8422 : 1 : {
8423 : 1 : res_op->set_op (RDIV_EXPR, type, 2);
8424 : 1 : res_op->ops[0] = captures[1];
8425 : 1 : {
8426 : 1 : tree _o1[1], _r1;
8427 : 1 : _o1[0] = captures[2];
8428 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
8429 : 1 : tem_op.resimplify (lseq, valueize);
8430 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8431 : 1 : if (!_r1) goto next_after_fail1802;
8432 : 1 : res_op->ops[1] = _r1;
8433 : : }
8434 : 1 : res_op->resimplify (lseq, valueize);
8435 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 996, __FILE__, __LINE__, true);
8436 : 1 : return true;
8437 : : }
8438 : 118 : next_after_fail1802:;
8439 : : }
8440 : : }
8441 : : }
8442 : 45936 : if (gimple_negate_expr_p (_q20, valueize))
8443 : : {
8444 : 2737 : {
8445 : 2737 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
8446 : 2737 : if (! HONOR_SIGN_DEPENDENT_ROUNDING (type)
8447 : 2737 : && single_use (captures[0])
8448 : : )
8449 : : {
8450 : 229 : gimple_seq *lseq = seq;
8451 : 229 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1803;
8452 : 229 : {
8453 : 229 : res_op->set_op (RDIV_EXPR, type, 2);
8454 : 229 : {
8455 : 229 : tree _o1[1], _r1;
8456 : 229 : _o1[0] = captures[1];
8457 : 229 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
8458 : 229 : tem_op.resimplify (lseq, valueize);
8459 : 229 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8460 : 229 : if (!_r1) goto next_after_fail1803;
8461 : 229 : res_op->ops[0] = _r1;
8462 : : }
8463 : 229 : res_op->ops[1] = captures[2];
8464 : 229 : res_op->resimplify (lseq, valueize);
8465 : 229 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 997, __FILE__, __LINE__, true);
8466 : 229 : return true;
8467 : : }
8468 : 2508 : next_after_fail1803:;
8469 : : }
8470 : : }
8471 : : }
8472 : : break;
8473 : : }
8474 : 2398500 : CASE_CONVERT:
8475 : 2398500 : {
8476 : 2398500 : tree _q20 = gimple_assign_rhs1 (_a1);
8477 : 2398500 : _q20 = do_valueize (valueize, _q20);
8478 : 2398500 : switch (TREE_CODE (_q20))
8479 : : {
8480 : 2388724 : case SSA_NAME:
8481 : 2388724 : if (gimple *_d2 = get_def (valueize, _q20))
8482 : : {
8483 : 2379379 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8484 : 1887431 : switch (gimple_assign_rhs_code (_a2))
8485 : : {
8486 : 71456 : case RSHIFT_EXPR:
8487 : 71456 : {
8488 : 71456 : tree _q30 = gimple_assign_rhs1 (_a2);
8489 : 71456 : _q30 = do_valueize (valueize, _q30);
8490 : 71456 : tree _q31 = gimple_assign_rhs2 (_a2);
8491 : 71456 : _q31 = do_valueize (valueize, _q31);
8492 : 71456 : switch (TREE_CODE (_q31))
8493 : : {
8494 : 71096 : case INTEGER_CST:
8495 : 71096 : {
8496 : 71096 : {
8497 : 71096 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
8498 : 71096 : if (gimple_simplify_541 (res_op, seq, valueize, type, captures))
8499 : 49 : return true;
8500 : : }
8501 : 71047 : break;
8502 : : }
8503 : : default:;
8504 : : }
8505 : : break;
8506 : : }
8507 : 2907 : case NEGATE_EXPR:
8508 : 2907 : {
8509 : 2907 : tree _q30 = gimple_assign_rhs1 (_a2);
8510 : 2907 : _q30 = do_valueize (valueize, _q30);
8511 : 2907 : {
8512 : 2907 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
8513 : 2907 : if (!TYPE_SATURATING (type)
8514 : : )
8515 : : {
8516 : 2907 : if (INTEGRAL_TYPE_P (type)
8517 : 2286 : && (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (captures[0]))
8518 : 1349 : || (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
8519 : 2074 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))))
8520 : 1955 : && !TYPE_OVERFLOW_SANITIZED (type)
8521 : 5899 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[0]))
8522 : : )
8523 : : {
8524 : 1955 : gimple_seq *lseq = seq;
8525 : 1955 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1804;
8526 : 1955 : {
8527 : 1955 : res_op->set_op (NOP_EXPR, type, 1);
8528 : 1955 : res_op->ops[0] = captures[0];
8529 : 1955 : res_op->resimplify (lseq, valueize);
8530 : 1955 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 998, __FILE__, __LINE__, true);
8531 : 1955 : return true;
8532 : : }
8533 : 0 : next_after_fail1804:;
8534 : : }
8535 : : }
8536 : : }
8537 : : break;
8538 : : }
8539 : : default:;
8540 : : }
8541 : : }
8542 : : break;
8543 : 2396496 : default:;
8544 : : }
8545 : 2396496 : {
8546 : 2396496 : tree _q20_pops[1];
8547 : 2396496 : if (gimple_logical_inverted_value (_q20, _q20_pops, valueize))
8548 : : {
8549 : 13830 : tree _q30 = _q20_pops[0];
8550 : 13830 : {
8551 : 13830 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
8552 : 13830 : if (INTEGRAL_TYPE_P (type)
8553 : 13830 : && TREE_CODE (type) != BOOLEAN_TYPE
8554 : 13830 : && TYPE_PRECISION (type) > 1
8555 : 13830 : && TREE_CODE (captures[2]) == SSA_NAME
8556 : 27660 : && ssa_name_has_boolean_range (captures[2])
8557 : : )
8558 : : {
8559 : 672 : gimple_seq *lseq = seq;
8560 : 672 : if (lseq
8561 : 626 : && (!single_use (captures[0])
8562 : 626 : || !single_use (captures[1])))
8563 : 46 : lseq = NULL;
8564 : 672 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1805;
8565 : 672 : {
8566 : 672 : res_op->set_op (PLUS_EXPR, type, 2);
8567 : 672 : {
8568 : 672 : tree _o1[1], _r1;
8569 : 672 : _o1[0] = captures[2];
8570 : 672 : if (type != TREE_TYPE (_o1[0]) /* XXX */
8571 : 672 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
8572 : : {
8573 : 672 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
8574 : 672 : tem_op.resimplify (lseq, valueize);
8575 : 672 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8576 : 672 : if (!_r1) goto next_after_fail1805;
8577 : : }
8578 : : else
8579 : : _r1 = _o1[0];
8580 : 626 : res_op->ops[0] = _r1;
8581 : : }
8582 : 626 : res_op->ops[1] = build_all_ones_cst (type);
8583 : 626 : res_op->resimplify (lseq, valueize);
8584 : 626 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 999, __FILE__, __LINE__, true);
8585 : 626 : return true;
8586 : : }
8587 : 13204 : next_after_fail1805:;
8588 : : }
8589 : : }
8590 : : }
8591 : : }
8592 : 2395870 : if (gimple_negate_expr_p (_q20, valueize))
8593 : : {
8594 : 7640 : {
8595 : 7640 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8596 : 7640 : if (!TYPE_SATURATING (type)
8597 : : )
8598 : : {
8599 : 7640 : if (SCALAR_FLOAT_TYPE_P (type)
8600 : 8261 : && ((DECIMAL_FLOAT_TYPE_P (type)
8601 : 621 : == DECIMAL_FLOAT_TYPE_P (TREE_TYPE (captures[0]))
8602 : 621 : && TYPE_PRECISION (type) >= TYPE_PRECISION (TREE_TYPE (captures[0])))
8603 : 13 : || !HONOR_SIGN_DEPENDENT_ROUNDING (type))
8604 : : )
8605 : : {
8606 : 611 : gimple_seq *lseq = seq;
8607 : 611 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1806;
8608 : 611 : {
8609 : 611 : res_op->set_op (NOP_EXPR, type, 1);
8610 : 611 : {
8611 : 611 : tree _o1[1], _r1;
8612 : 611 : _o1[0] = captures[0];
8613 : 611 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
8614 : 611 : (*res_op).ops[0] = _o1[0];
8615 : 611 : (*res_op).resimplify (lseq, valueize);
8616 : : }
8617 : 611 : if (type != res_op->type
8618 : 611 : && !useless_type_conversion_p (type, res_op->type))
8619 : : {
8620 : 611 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail1806;
8621 : 611 : res_op->set_op (NOP_EXPR, type, 1);
8622 : 611 : res_op->resimplify (lseq, valueize);
8623 : : }
8624 : 611 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1000, __FILE__, __LINE__, true);
8625 : 611 : return true;
8626 : : }
8627 : : next_after_fail1806:;
8628 : : }
8629 : : }
8630 : : }
8631 : : }
8632 : : break;
8633 : : }
8634 : 128404 : case RSHIFT_EXPR:
8635 : 128404 : {
8636 : 128404 : tree _q20 = gimple_assign_rhs1 (_a1);
8637 : 128404 : _q20 = do_valueize (valueize, _q20);
8638 : 128404 : tree _q21 = gimple_assign_rhs2 (_a1);
8639 : 128404 : _q21 = do_valueize (valueize, _q21);
8640 : 128404 : switch (TREE_CODE (_q21))
8641 : : {
8642 : 127649 : case INTEGER_CST:
8643 : 127649 : {
8644 : 127649 : {
8645 : 127649 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8646 : 127649 : if (gimple_simplify_541 (res_op, seq, valueize, type, captures))
8647 : 162 : return true;
8648 : : }
8649 : 127487 : break;
8650 : : }
8651 : : default:;
8652 : : }
8653 : : break;
8654 : : }
8655 : 1991 : case BIT_NOT_EXPR:
8656 : 1991 : {
8657 : 1991 : tree _q20 = gimple_assign_rhs1 (_a1);
8658 : 1991 : _q20 = do_valueize (valueize, _q20);
8659 : 1991 : {
8660 : 1991 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8661 : 1991 : if (gimple_simplify_538 (res_op, seq, valueize, type, captures))
8662 : 1991 : return true;
8663 : : }
8664 : 0 : break;
8665 : : }
8666 : 36496 : case NEGATE_EXPR:
8667 : 36496 : {
8668 : 36496 : tree _q20 = gimple_assign_rhs1 (_a1);
8669 : 36496 : _q20 = do_valueize (valueize, _q20);
8670 : 36496 : {
8671 : 36496 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
8672 : 36496 : if (gimple_simplify_539 (res_op, seq, valueize, type, captures))
8673 : 36496 : return true;
8674 : : }
8675 : 0 : break;
8676 : : }
8677 : 1530 : case VEC_COND_EXPR:
8678 : 1530 : {
8679 : 1530 : tree _q20 = gimple_assign_rhs1 (_a1);
8680 : 1530 : _q20 = do_valueize (valueize, _q20);
8681 : 1530 : tree _q21 = gimple_assign_rhs2 (_a1);
8682 : 1530 : _q21 = do_valueize (valueize, _q21);
8683 : 1530 : tree _q22 = gimple_assign_rhs3 (_a1);
8684 : 1530 : _q22 = do_valueize (valueize, _q22);
8685 : 1530 : {
8686 : 1530 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8687 : 1530 : gimple_seq *lseq = seq;
8688 : 1530 : if (lseq
8689 : 244 : && (!single_use (captures[0])))
8690 : 1288 : lseq = NULL;
8691 : 1530 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1807;
8692 : 1530 : {
8693 : 1530 : res_op->set_op (VEC_COND_EXPR, type, 3);
8694 : 1530 : res_op->ops[0] = captures[1];
8695 : 1530 : {
8696 : 1530 : tree _o1[1], _r1;
8697 : 1530 : _o1[0] = captures[2];
8698 : 1530 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
8699 : 1530 : tem_op.resimplify (NULL, valueize);
8700 : 1530 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
8701 : 1530 : if (!_r1) goto next_after_fail1807;
8702 : 1180 : res_op->ops[1] = _r1;
8703 : : }
8704 : 1180 : {
8705 : 1180 : tree _o1[1], _r1;
8706 : 1180 : _o1[0] = captures[3];
8707 : 1180 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
8708 : 1180 : tem_op.resimplify (NULL, valueize);
8709 : 1180 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
8710 : 1180 : if (!_r1) goto next_after_fail1807;
8711 : 1172 : res_op->ops[2] = _r1;
8712 : : }
8713 : 1172 : res_op->resimplify (lseq, valueize);
8714 : 1172 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 975, __FILE__, __LINE__, true);
8715 : 1172 : return true;
8716 : : }
8717 : 358 : next_after_fail1807:;
8718 : : }
8719 : 358 : break;
8720 : : }
8721 : : default:;
8722 : : }
8723 : 1449300 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
8724 : 162746 : switch (gimple_call_combined_fn (_c1))
8725 : : {
8726 : 171 : case CFN_BUILT_IN_FMA:
8727 : 171 : if (gimple_call_num_args (_c1) == 3)
8728 : : {
8729 : 171 : tree _q20 = gimple_call_arg (_c1, 0);
8730 : 171 : _q20 = do_valueize (valueize, _q20);
8731 : 171 : tree _q21 = gimple_call_arg (_c1, 1);
8732 : 171 : _q21 = do_valueize (valueize, _q21);
8733 : 171 : tree _q22 = gimple_call_arg (_c1, 2);
8734 : 171 : _q22 = do_valueize (valueize, _q22);
8735 : 171 : if (tree_swap_operands_p (_q20, _q21))
8736 : 6 : std::swap (_q20, _q21);
8737 : 171 : {
8738 : 171 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8739 : 171 : if (gimple_simplify_542 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMA))
8740 : 16 : return true;
8741 : : }
8742 : : }
8743 : : break;
8744 : 60 : case CFN_BUILT_IN_FMAF:
8745 : 60 : if (gimple_call_num_args (_c1) == 3)
8746 : : {
8747 : 60 : tree _q20 = gimple_call_arg (_c1, 0);
8748 : 60 : _q20 = do_valueize (valueize, _q20);
8749 : 60 : tree _q21 = gimple_call_arg (_c1, 1);
8750 : 60 : _q21 = do_valueize (valueize, _q21);
8751 : 60 : tree _q22 = gimple_call_arg (_c1, 2);
8752 : 60 : _q22 = do_valueize (valueize, _q22);
8753 : 60 : if (tree_swap_operands_p (_q20, _q21))
8754 : 2 : std::swap (_q20, _q21);
8755 : 60 : {
8756 : 60 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8757 : 60 : if (gimple_simplify_542 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAF))
8758 : 16 : return true;
8759 : : }
8760 : : }
8761 : : break;
8762 : 0 : case CFN_BUILT_IN_FMAL:
8763 : 0 : if (gimple_call_num_args (_c1) == 3)
8764 : : {
8765 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8766 : 0 : _q20 = do_valueize (valueize, _q20);
8767 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8768 : 0 : _q21 = do_valueize (valueize, _q21);
8769 : 0 : tree _q22 = gimple_call_arg (_c1, 2);
8770 : 0 : _q22 = do_valueize (valueize, _q22);
8771 : 0 : if (tree_swap_operands_p (_q20, _q21))
8772 : 0 : std::swap (_q20, _q21);
8773 : 0 : {
8774 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8775 : 0 : if (gimple_simplify_542 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAL))
8776 : 0 : return true;
8777 : : }
8778 : : }
8779 : : break;
8780 : 345 : case CFN_FMA:
8781 : 345 : if (gimple_call_num_args (_c1) == 3)
8782 : : {
8783 : 345 : tree _q20 = gimple_call_arg (_c1, 0);
8784 : 345 : _q20 = do_valueize (valueize, _q20);
8785 : 345 : tree _q21 = gimple_call_arg (_c1, 1);
8786 : 345 : _q21 = do_valueize (valueize, _q21);
8787 : 345 : tree _q22 = gimple_call_arg (_c1, 2);
8788 : 345 : _q22 = do_valueize (valueize, _q22);
8789 : 345 : if (tree_swap_operands_p (_q20, _q21))
8790 : 0 : std::swap (_q20, _q21);
8791 : 345 : {
8792 : 345 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8793 : 345 : if (gimple_simplify_542 (res_op, seq, valueize, type, captures, CFN_FMA))
8794 : 345 : return true;
8795 : : }
8796 : : }
8797 : : break;
8798 : 339 : case CFN_FMS:
8799 : 339 : if (gimple_call_num_args (_c1) == 3)
8800 : : {
8801 : 339 : tree _q20 = gimple_call_arg (_c1, 0);
8802 : 339 : _q20 = do_valueize (valueize, _q20);
8803 : 339 : tree _q21 = gimple_call_arg (_c1, 1);
8804 : 339 : _q21 = do_valueize (valueize, _q21);
8805 : 339 : tree _q22 = gimple_call_arg (_c1, 2);
8806 : 339 : _q22 = do_valueize (valueize, _q22);
8807 : 339 : if (tree_swap_operands_p (_q20, _q21))
8808 : 0 : std::swap (_q20, _q21);
8809 : 339 : {
8810 : 339 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8811 : 339 : if (canonicalize_math_after_vectorization_p ()
8812 : : )
8813 : : {
8814 : 339 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
8815 : : )
8816 : : {
8817 : 336 : gimple_seq *lseq = seq;
8818 : 336 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1808;
8819 : 336 : {
8820 : 336 : res_op->set_op (CFN_FNMA, type, 3);
8821 : 336 : res_op->ops[0] = captures[1];
8822 : 336 : res_op->ops[1] = captures[2];
8823 : 336 : res_op->ops[2] = captures[3];
8824 : 336 : res_op->resimplify (lseq, valueize);
8825 : 336 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1001, __FILE__, __LINE__, true);
8826 : 336 : return true;
8827 : : }
8828 : 0 : next_after_fail1808:;
8829 : : }
8830 : : }
8831 : : }
8832 : : }
8833 : : break;
8834 : 339 : case CFN_FNMA:
8835 : 339 : if (gimple_call_num_args (_c1) == 3)
8836 : : {
8837 : 339 : tree _q20 = gimple_call_arg (_c1, 0);
8838 : 339 : _q20 = do_valueize (valueize, _q20);
8839 : 339 : tree _q21 = gimple_call_arg (_c1, 1);
8840 : 339 : _q21 = do_valueize (valueize, _q21);
8841 : 339 : tree _q22 = gimple_call_arg (_c1, 2);
8842 : 339 : _q22 = do_valueize (valueize, _q22);
8843 : 339 : if (tree_swap_operands_p (_q20, _q21))
8844 : 0 : std::swap (_q20, _q21);
8845 : 339 : {
8846 : 339 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8847 : 339 : if (canonicalize_math_after_vectorization_p ()
8848 : : )
8849 : : {
8850 : 339 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
8851 : : )
8852 : : {
8853 : 336 : gimple_seq *lseq = seq;
8854 : 336 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1809;
8855 : 336 : {
8856 : 336 : res_op->set_op (CFN_FMS, type, 3);
8857 : 336 : res_op->ops[0] = captures[1];
8858 : 336 : res_op->ops[1] = captures[2];
8859 : 336 : res_op->ops[2] = captures[3];
8860 : 336 : res_op->resimplify (lseq, valueize);
8861 : 336 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1002, __FILE__, __LINE__, true);
8862 : 336 : return true;
8863 : : }
8864 : 0 : next_after_fail1809:;
8865 : : }
8866 : : }
8867 : : }
8868 : : }
8869 : : break;
8870 : 339 : case CFN_FNMS:
8871 : 339 : if (gimple_call_num_args (_c1) == 3)
8872 : : {
8873 : 339 : tree _q20 = gimple_call_arg (_c1, 0);
8874 : 339 : _q20 = do_valueize (valueize, _q20);
8875 : 339 : tree _q21 = gimple_call_arg (_c1, 1);
8876 : 339 : _q21 = do_valueize (valueize, _q21);
8877 : 339 : tree _q22 = gimple_call_arg (_c1, 2);
8878 : 339 : _q22 = do_valueize (valueize, _q22);
8879 : 339 : if (tree_swap_operands_p (_q20, _q21))
8880 : 0 : std::swap (_q20, _q21);
8881 : 339 : {
8882 : 339 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
8883 : 339 : if (canonicalize_math_after_vectorization_p ()
8884 : : )
8885 : : {
8886 : 339 : if (!HONOR_SIGN_DEPENDENT_ROUNDING (type) && single_use (captures[0])
8887 : : )
8888 : : {
8889 : 336 : gimple_seq *lseq = seq;
8890 : 336 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1810;
8891 : 336 : {
8892 : 336 : res_op->set_op (CFN_FMA, type, 3);
8893 : 336 : res_op->ops[0] = captures[1];
8894 : 336 : res_op->ops[1] = captures[2];
8895 : 336 : res_op->ops[2] = captures[3];
8896 : 336 : res_op->resimplify (lseq, valueize);
8897 : 336 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1003, __FILE__, __LINE__, true);
8898 : 336 : return true;
8899 : : }
8900 : 0 : next_after_fail1810:;
8901 : : }
8902 : : }
8903 : : }
8904 : : }
8905 : : break;
8906 : : default:;
8907 : : }
8908 : : }
8909 : : break;
8910 : 7946812 : default:;
8911 : : }
8912 : 7946812 : {
8913 : 7946812 : tree _p0_pops[1];
8914 : 7946812 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
8915 : : {
8916 : 1220861 : tree _q20 = _p0_pops[0];
8917 : 1220861 : switch (TREE_CODE (_q20))
8918 : : {
8919 : 1211129 : case SSA_NAME:
8920 : 1211129 : if (gimple *_d1 = get_def (valueize, _q20))
8921 : : {
8922 : 1205904 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
8923 : 1185754 : switch (gimple_assign_rhs_code (_a1))
8924 : : {
8925 : 4295 : case POINTER_DIFF_EXPR:
8926 : 4295 : {
8927 : 4295 : tree _q30 = gimple_assign_rhs1 (_a1);
8928 : 4295 : _q30 = do_valueize (valueize, _q30);
8929 : 4295 : tree _q31 = gimple_assign_rhs2 (_a1);
8930 : 4295 : _q31 = do_valueize (valueize, _q31);
8931 : 4295 : {
8932 : 4295 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
8933 : 4295 : if (gimple_simplify_537 (res_op, seq, valueize, type, captures))
8934 : 462 : return true;
8935 : : }
8936 : 3833 : break;
8937 : : }
8938 : 470 : case BIT_NOT_EXPR:
8939 : 470 : {
8940 : 470 : tree _q30 = gimple_assign_rhs1 (_a1);
8941 : 470 : _q30 = do_valueize (valueize, _q30);
8942 : 470 : {
8943 : 470 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
8944 : 470 : if (gimple_simplify_538 (res_op, seq, valueize, type, captures))
8945 : 184 : return true;
8946 : : }
8947 : 286 : break;
8948 : : }
8949 : 2 : case NEGATE_EXPR:
8950 : 2 : {
8951 : 2 : tree _q30 = gimple_assign_rhs1 (_a1);
8952 : 2 : _q30 = do_valueize (valueize, _q30);
8953 : 2 : {
8954 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
8955 : 2 : if (gimple_simplify_539 (res_op, seq, valueize, type, captures))
8956 : 2 : return true;
8957 : : }
8958 : 0 : break;
8959 : : }
8960 : : default:;
8961 : : }
8962 : : }
8963 : : break;
8964 : : default:;
8965 : : }
8966 : : }
8967 : : }
8968 : 7946164 : {
8969 : 7946164 : tree _p0_pops[1];
8970 : 7946164 : if (gimple_logical_inverted_value (_p0, _p0_pops, valueize))
8971 : : {
8972 : 0 : tree _q20 = _p0_pops[0];
8973 : 0 : {
8974 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
8975 : 0 : if (INTEGRAL_TYPE_P (type)
8976 : 0 : && TREE_CODE (type) != BOOLEAN_TYPE
8977 : 0 : && TYPE_PRECISION (type) > 1
8978 : 0 : && TREE_CODE (captures[2]) == SSA_NAME
8979 : 0 : && ssa_name_has_boolean_range (captures[2])
8980 : : )
8981 : : {
8982 : 0 : gimple_seq *lseq = seq;
8983 : 0 : if (lseq
8984 : 0 : && (!single_use (captures[0])
8985 : : || !single_use (captures[1])))
8986 : 0 : lseq = NULL;
8987 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1811;
8988 : 0 : {
8989 : 0 : res_op->set_op (PLUS_EXPR, type, 2);
8990 : 0 : {
8991 : 0 : tree _o1[1], _r1;
8992 : 0 : _o1[0] = captures[2];
8993 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
8994 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
8995 : : {
8996 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
8997 : 0 : tem_op.resimplify (lseq, valueize);
8998 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
8999 : 0 : if (!_r1) goto next_after_fail1811;
9000 : : }
9001 : : else
9002 : : _r1 = _o1[0];
9003 : 0 : res_op->ops[0] = _r1;
9004 : : }
9005 : 0 : res_op->ops[1] = build_all_ones_cst (type);
9006 : 0 : res_op->resimplify (lseq, valueize);
9007 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 999, __FILE__, __LINE__, true);
9008 : 0 : return true;
9009 : : }
9010 : 0 : next_after_fail1811:;
9011 : : }
9012 : : }
9013 : : }
9014 : : }
9015 : 7946164 : {
9016 : 7946164 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9017 : 7946164 : if (gimple_simplify_522 (res_op, seq, valueize, type, captures))
9018 : 0 : return true;
9019 : : }
9020 : 7946164 : return false;
9021 : : }
9022 : :
9023 : : bool
9024 : 5042 : gimple_simplify_CFN_BUILT_IN_LOGL (gimple_match_op *res_op, gimple_seq *seq,
9025 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9026 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9027 : : {
9028 : 5042 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9029 : 5042 : switch (TREE_CODE (_p0))
9030 : : {
9031 : 4626 : case SSA_NAME:
9032 : 4626 : if (gimple *_d1 = get_def (valueize, _p0))
9033 : : {
9034 : 2558 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9035 : 2057 : switch (gimple_assign_rhs_code (_a1))
9036 : : {
9037 : 40 : case RDIV_EXPR:
9038 : 40 : {
9039 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
9040 : 40 : _q20 = do_valueize (valueize, _q20);
9041 : 40 : tree _q21 = gimple_assign_rhs2 (_a1);
9042 : 40 : _q21 = do_valueize (valueize, _q21);
9043 : 40 : switch (TREE_CODE (_q20))
9044 : : {
9045 : 4 : case REAL_CST:
9046 : 4 : {
9047 : 4 : {
9048 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9049 : 4 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL))
9050 : 2 : return true;
9051 : : }
9052 : 2 : break;
9053 : : }
9054 : 38 : default:;
9055 : : }
9056 : 38 : if (real_onep (_q20))
9057 : : {
9058 : 1 : {
9059 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9060 : 1 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL))
9061 : 0 : return true;
9062 : : }
9063 : : }
9064 : : break;
9065 : : }
9066 : : default:;
9067 : : }
9068 : 551 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9069 : 83 : switch (gimple_call_combined_fn (_c1))
9070 : : {
9071 : 14 : case CFN_BUILT_IN_SQRTL:
9072 : 14 : if (gimple_call_num_args (_c1) == 1)
9073 : : {
9074 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
9075 : 14 : _q20 = do_valueize (valueize, _q20);
9076 : 14 : {
9077 : 14 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9078 : 14 : if (flag_unsafe_math_optimizations
9079 : : )
9080 : : {
9081 : 14 : if (SCALAR_FLOAT_TYPE_P (type)
9082 : : )
9083 : : {
9084 : 14 : {
9085 : 14 : tree x;
9086 : 14 : switch (CFN_BUILT_IN_SQRTL)
9087 : : {
9088 : 14 : CASE_CFN_SQRT:
9089 : 14 : x = build_real (type, dconsthalf);
9090 : 14 : break;
9091 : : CASE_CFN_CBRT:
9092 : : x = build_real_truncate (type, dconst_third ());
9093 : : break;
9094 : : default:
9095 : : gcc_unreachable ();
9096 : : }
9097 : 14 : gimple_seq *lseq = seq;
9098 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1926;
9099 : 14 : {
9100 : 14 : res_op->set_op (MULT_EXPR, type, 2);
9101 : 14 : res_op->ops[0] = x;
9102 : 14 : {
9103 : 14 : tree _o1[1], _r1;
9104 : 14 : _o1[0] = captures[0];
9105 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGL, TREE_TYPE (_o1[0]), _o1[0]);
9106 : 14 : tem_op.resimplify (lseq, valueize);
9107 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9108 : 14 : if (!_r1) goto next_after_fail1926;
9109 : 7 : res_op->ops[1] = _r1;
9110 : : }
9111 : 7 : res_op->resimplify (lseq, valueize);
9112 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1036, __FILE__, __LINE__, true);
9113 : 7 : return true;
9114 : : }
9115 : : next_after_fail1926:;
9116 : : }
9117 : : }
9118 : : }
9119 : : }
9120 : : }
9121 : : break;
9122 : 12 : case CFN_BUILT_IN_EXP10L:
9123 : 12 : if (gimple_call_num_args (_c1) == 1)
9124 : : {
9125 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9126 : 12 : _q20 = do_valueize (valueize, _q20);
9127 : 12 : {
9128 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9129 : 12 : if (flag_unsafe_math_optimizations
9130 : : )
9131 : : {
9132 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9133 : : )
9134 : : {
9135 : 12 : {
9136 : 12 : tree x;
9137 : 12 : switch (CFN_BUILT_IN_EXP10L)
9138 : : {
9139 : : CASE_CFN_EXP:
9140 : : x = build_real_truncate (type, dconst_e ());
9141 : : break;
9142 : : CASE_CFN_EXP2:
9143 : : x = build_real (type, dconst2);
9144 : : break;
9145 : 12 : CASE_CFN_EXP10:
9146 : 12 : CASE_CFN_POW10:
9147 : 12 : {
9148 : 12 : REAL_VALUE_TYPE dconst10;
9149 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
9150 : 12 : x = build_real (type, dconst10);
9151 : : }
9152 : 12 : break;
9153 : : default:
9154 : : gcc_unreachable ();
9155 : : }
9156 : 12 : gimple_seq *lseq = seq;
9157 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1927;
9158 : 12 : {
9159 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9160 : 12 : {
9161 : 12 : tree _o1[1], _r1;
9162 : 12 : _o1[0] = x;
9163 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGL, TREE_TYPE (_o1[0]), _o1[0]);
9164 : 12 : tem_op.resimplify (lseq, valueize);
9165 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9166 : 12 : if (!_r1) goto next_after_fail1927;
9167 : 12 : res_op->ops[0] = _r1;
9168 : : }
9169 : 12 : res_op->ops[1] = captures[0];
9170 : 12 : res_op->resimplify (lseq, valueize);
9171 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
9172 : 12 : return true;
9173 : : }
9174 : : next_after_fail1927:;
9175 : : }
9176 : : }
9177 : : }
9178 : : }
9179 : : }
9180 : : break;
9181 : 7 : case CFN_BUILT_IN_EXPL:
9182 : 7 : if (gimple_call_num_args (_c1) == 1)
9183 : : {
9184 : 7 : tree _q20 = gimple_call_arg (_c1, 0);
9185 : 7 : _q20 = do_valueize (valueize, _q20);
9186 : 7 : {
9187 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9188 : 7 : if (flag_unsafe_math_optimizations
9189 : : )
9190 : : {
9191 : 7 : gimple_seq *lseq = seq;
9192 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1928;
9193 : 7 : {
9194 : 7 : tree tem;
9195 : 7 : tem = captures[0];
9196 : 7 : res_op->set_value (tem);
9197 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
9198 : 7 : return true;
9199 : : }
9200 : 0 : next_after_fail1928:;
9201 : : }
9202 : : }
9203 : : }
9204 : : break;
9205 : 14 : case CFN_BUILT_IN_POWL:
9206 : 14 : if (gimple_call_num_args (_c1) == 2)
9207 : : {
9208 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
9209 : 14 : _q20 = do_valueize (valueize, _q20);
9210 : 14 : tree _q21 = gimple_call_arg (_c1, 1);
9211 : 14 : _q21 = do_valueize (valueize, _q21);
9212 : 14 : {
9213 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9214 : 14 : if (gimple_simplify_665 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_POWL))
9215 : 7 : return true;
9216 : : }
9217 : : }
9218 : : break;
9219 : 12 : case CFN_BUILT_IN_POW10L:
9220 : 12 : if (gimple_call_num_args (_c1) == 1)
9221 : : {
9222 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9223 : 12 : _q20 = do_valueize (valueize, _q20);
9224 : 12 : {
9225 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9226 : 12 : if (flag_unsafe_math_optimizations
9227 : : )
9228 : : {
9229 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9230 : : )
9231 : : {
9232 : 12 : {
9233 : 12 : tree x;
9234 : 12 : switch (CFN_BUILT_IN_POW10L)
9235 : : {
9236 : : CASE_CFN_EXP:
9237 : : x = build_real_truncate (type, dconst_e ());
9238 : : break;
9239 : : CASE_CFN_EXP2:
9240 : : x = build_real (type, dconst2);
9241 : : break;
9242 : 12 : CASE_CFN_EXP10:
9243 : 12 : CASE_CFN_POW10:
9244 : 12 : {
9245 : 12 : REAL_VALUE_TYPE dconst10;
9246 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
9247 : 12 : x = build_real (type, dconst10);
9248 : : }
9249 : 12 : break;
9250 : : default:
9251 : : gcc_unreachable ();
9252 : : }
9253 : 12 : gimple_seq *lseq = seq;
9254 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1929;
9255 : 12 : {
9256 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9257 : 12 : {
9258 : 12 : tree _o1[1], _r1;
9259 : 12 : _o1[0] = x;
9260 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGL, TREE_TYPE (_o1[0]), _o1[0]);
9261 : 12 : tem_op.resimplify (lseq, valueize);
9262 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9263 : 12 : if (!_r1) goto next_after_fail1929;
9264 : 12 : res_op->ops[0] = _r1;
9265 : : }
9266 : 12 : res_op->ops[1] = captures[0];
9267 : 12 : res_op->resimplify (lseq, valueize);
9268 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
9269 : 12 : return true;
9270 : : }
9271 : : next_after_fail1929:;
9272 : : }
9273 : : }
9274 : : }
9275 : : }
9276 : : }
9277 : : break;
9278 : 12 : case CFN_BUILT_IN_CBRTL:
9279 : 12 : if (gimple_call_num_args (_c1) == 1)
9280 : : {
9281 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9282 : 12 : _q20 = do_valueize (valueize, _q20);
9283 : 12 : {
9284 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9285 : 12 : if (flag_unsafe_math_optimizations
9286 : : )
9287 : : {
9288 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9289 : : )
9290 : : {
9291 : 12 : {
9292 : 12 : tree x;
9293 : 12 : switch (CFN_BUILT_IN_CBRTL)
9294 : : {
9295 : : CASE_CFN_SQRT:
9296 : : x = build_real (type, dconsthalf);
9297 : : break;
9298 : 12 : CASE_CFN_CBRT:
9299 : 12 : x = build_real_truncate (type, dconst_third ());
9300 : 12 : break;
9301 : : default:
9302 : : gcc_unreachable ();
9303 : : }
9304 : 12 : gimple_seq *lseq = seq;
9305 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1930;
9306 : 12 : {
9307 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9308 : 12 : res_op->ops[0] = x;
9309 : 12 : {
9310 : 12 : tree _o1[1], _r1;
9311 : 12 : _o1[0] = captures[0];
9312 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGL, TREE_TYPE (_o1[0]), _o1[0]);
9313 : 12 : tem_op.resimplify (lseq, valueize);
9314 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9315 : 12 : if (!_r1) goto next_after_fail1930;
9316 : 6 : res_op->ops[1] = _r1;
9317 : : }
9318 : 6 : res_op->resimplify (lseq, valueize);
9319 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1036, __FILE__, __LINE__, true);
9320 : 6 : return true;
9321 : : }
9322 : : next_after_fail1930:;
9323 : : }
9324 : : }
9325 : : }
9326 : : }
9327 : : }
9328 : : break;
9329 : 12 : case CFN_BUILT_IN_EXP2L:
9330 : 12 : if (gimple_call_num_args (_c1) == 1)
9331 : : {
9332 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9333 : 12 : _q20 = do_valueize (valueize, _q20);
9334 : 12 : {
9335 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9336 : 12 : if (flag_unsafe_math_optimizations
9337 : : )
9338 : : {
9339 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9340 : : )
9341 : : {
9342 : 12 : {
9343 : 12 : tree x;
9344 : 12 : switch (CFN_BUILT_IN_EXP2L)
9345 : : {
9346 : : CASE_CFN_EXP:
9347 : : x = build_real_truncate (type, dconst_e ());
9348 : : break;
9349 : 12 : CASE_CFN_EXP2:
9350 : 12 : x = build_real (type, dconst2);
9351 : 12 : break;
9352 : : CASE_CFN_EXP10:
9353 : : CASE_CFN_POW10:
9354 : : {
9355 : : REAL_VALUE_TYPE dconst10;
9356 : : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
9357 : : x = build_real (type, dconst10);
9358 : : }
9359 : : break;
9360 : : default:
9361 : : gcc_unreachable ();
9362 : : }
9363 : 12 : gimple_seq *lseq = seq;
9364 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1931;
9365 : 12 : {
9366 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9367 : 12 : {
9368 : 12 : tree _o1[1], _r1;
9369 : 12 : _o1[0] = x;
9370 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGL, TREE_TYPE (_o1[0]), _o1[0]);
9371 : 12 : tem_op.resimplify (lseq, valueize);
9372 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9373 : 12 : if (!_r1) goto next_after_fail1931;
9374 : 12 : res_op->ops[0] = _r1;
9375 : : }
9376 : 12 : res_op->ops[1] = captures[0];
9377 : 12 : res_op->resimplify (lseq, valueize);
9378 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
9379 : 12 : return true;
9380 : : }
9381 : : next_after_fail1931:;
9382 : : }
9383 : : }
9384 : : }
9385 : : }
9386 : : }
9387 : : break;
9388 : : default:;
9389 : : }
9390 : : }
9391 : : break;
9392 : : default:;
9393 : : }
9394 : : return false;
9395 : : }
9396 : :
9397 : : bool
9398 : 1230 : gimple_simplify_CFN_BUILT_IN_LOG10 (gimple_match_op *res_op, gimple_seq *seq,
9399 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9400 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9401 : : {
9402 : 1230 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9403 : 1230 : switch (TREE_CODE (_p0))
9404 : : {
9405 : 827 : case SSA_NAME:
9406 : 827 : if (gimple *_d1 = get_def (valueize, _p0))
9407 : : {
9408 : 536 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9409 : 346 : switch (gimple_assign_rhs_code (_a1))
9410 : : {
9411 : 9 : case RDIV_EXPR:
9412 : 9 : {
9413 : 9 : tree _q20 = gimple_assign_rhs1 (_a1);
9414 : 9 : _q20 = do_valueize (valueize, _q20);
9415 : 9 : tree _q21 = gimple_assign_rhs2 (_a1);
9416 : 9 : _q21 = do_valueize (valueize, _q21);
9417 : 9 : switch (TREE_CODE (_q20))
9418 : : {
9419 : 4 : case REAL_CST:
9420 : 4 : {
9421 : 4 : {
9422 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9423 : 4 : if (gimple_simplify_664 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10))
9424 : 2 : return true;
9425 : : }
9426 : 2 : break;
9427 : : }
9428 : 7 : default:;
9429 : : }
9430 : 7 : if (real_onep (_q20))
9431 : : {
9432 : 1 : {
9433 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9434 : 1 : if (gimple_simplify_663 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10))
9435 : 0 : return true;
9436 : : }
9437 : : }
9438 : : break;
9439 : : }
9440 : : default:;
9441 : : }
9442 : 316 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9443 : 113 : switch (gimple_call_combined_fn (_c1))
9444 : : {
9445 : 12 : case CFN_BUILT_IN_EXP:
9446 : 12 : if (gimple_call_num_args (_c1) == 1)
9447 : : {
9448 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9449 : 12 : _q20 = do_valueize (valueize, _q20);
9450 : 12 : {
9451 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9452 : 12 : if (flag_unsafe_math_optimizations
9453 : : )
9454 : : {
9455 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9456 : : )
9457 : : {
9458 : 12 : {
9459 : 12 : tree x;
9460 : 12 : switch (CFN_BUILT_IN_EXP)
9461 : : {
9462 : 12 : CASE_CFN_EXP:
9463 : 12 : x = build_real_truncate (type, dconst_e ());
9464 : 12 : break;
9465 : : CASE_CFN_EXP2:
9466 : : x = build_real (type, dconst2);
9467 : : break;
9468 : : CASE_CFN_EXP10:
9469 : : CASE_CFN_POW10:
9470 : : {
9471 : : REAL_VALUE_TYPE dconst10;
9472 : : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
9473 : : x = build_real (type, dconst10);
9474 : : }
9475 : : break;
9476 : : default:
9477 : : gcc_unreachable ();
9478 : : }
9479 : 12 : gimple_seq *lseq = seq;
9480 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1964;
9481 : 12 : {
9482 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9483 : 12 : {
9484 : 12 : tree _o1[1], _r1;
9485 : 12 : _o1[0] = x;
9486 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o1[0]), _o1[0]);
9487 : 12 : tem_op.resimplify (lseq, valueize);
9488 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9489 : 12 : if (!_r1) goto next_after_fail1964;
9490 : 12 : res_op->ops[0] = _r1;
9491 : : }
9492 : 12 : res_op->ops[1] = captures[0];
9493 : 12 : res_op->resimplify (lseq, valueize);
9494 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
9495 : 12 : return true;
9496 : : }
9497 : : next_after_fail1964:;
9498 : : }
9499 : : }
9500 : : }
9501 : : }
9502 : : }
9503 : : break;
9504 : 12 : case CFN_BUILT_IN_POW:
9505 : 12 : if (gimple_call_num_args (_c1) == 2)
9506 : : {
9507 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9508 : 12 : _q20 = do_valueize (valueize, _q20);
9509 : 12 : tree _q21 = gimple_call_arg (_c1, 1);
9510 : 12 : _q21 = do_valueize (valueize, _q21);
9511 : 12 : {
9512 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9513 : 12 : if (gimple_simplify_665 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_POW))
9514 : 6 : return true;
9515 : : }
9516 : : }
9517 : : break;
9518 : 12 : case CFN_BUILT_IN_CBRT:
9519 : 12 : if (gimple_call_num_args (_c1) == 1)
9520 : : {
9521 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9522 : 12 : _q20 = do_valueize (valueize, _q20);
9523 : 12 : {
9524 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9525 : 12 : if (flag_unsafe_math_optimizations
9526 : : )
9527 : : {
9528 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9529 : : )
9530 : : {
9531 : 12 : {
9532 : 12 : tree x;
9533 : 12 : switch (CFN_BUILT_IN_CBRT)
9534 : : {
9535 : : CASE_CFN_SQRT:
9536 : : x = build_real (type, dconsthalf);
9537 : : break;
9538 : 12 : CASE_CFN_CBRT:
9539 : 12 : x = build_real_truncate (type, dconst_third ());
9540 : 12 : break;
9541 : : default:
9542 : : gcc_unreachable ();
9543 : : }
9544 : 12 : gimple_seq *lseq = seq;
9545 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1965;
9546 : 12 : {
9547 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9548 : 12 : res_op->ops[0] = x;
9549 : 12 : {
9550 : 12 : tree _o1[1], _r1;
9551 : 12 : _o1[0] = captures[0];
9552 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o1[0]), _o1[0]);
9553 : 12 : tem_op.resimplify (lseq, valueize);
9554 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9555 : 12 : if (!_r1) goto next_after_fail1965;
9556 : 6 : res_op->ops[1] = _r1;
9557 : : }
9558 : 6 : res_op->resimplify (lseq, valueize);
9559 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1036, __FILE__, __LINE__, true);
9560 : 6 : return true;
9561 : : }
9562 : : next_after_fail1965:;
9563 : : }
9564 : : }
9565 : : }
9566 : : }
9567 : : }
9568 : : break;
9569 : 12 : case CFN_BUILT_IN_EXP2:
9570 : 12 : if (gimple_call_num_args (_c1) == 1)
9571 : : {
9572 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9573 : 12 : _q20 = do_valueize (valueize, _q20);
9574 : 12 : {
9575 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9576 : 12 : if (flag_unsafe_math_optimizations
9577 : : )
9578 : : {
9579 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9580 : : )
9581 : : {
9582 : 12 : {
9583 : 12 : tree x;
9584 : 12 : switch (CFN_BUILT_IN_EXP2)
9585 : : {
9586 : : CASE_CFN_EXP:
9587 : : x = build_real_truncate (type, dconst_e ());
9588 : : break;
9589 : 12 : CASE_CFN_EXP2:
9590 : 12 : x = build_real (type, dconst2);
9591 : 12 : break;
9592 : : CASE_CFN_EXP10:
9593 : : CASE_CFN_POW10:
9594 : : {
9595 : : REAL_VALUE_TYPE dconst10;
9596 : : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
9597 : : x = build_real (type, dconst10);
9598 : : }
9599 : : break;
9600 : : default:
9601 : : gcc_unreachable ();
9602 : : }
9603 : 12 : gimple_seq *lseq = seq;
9604 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1966;
9605 : 12 : {
9606 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9607 : 12 : {
9608 : 12 : tree _o1[1], _r1;
9609 : 12 : _o1[0] = x;
9610 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o1[0]), _o1[0]);
9611 : 12 : tem_op.resimplify (lseq, valueize);
9612 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9613 : 12 : if (!_r1) goto next_after_fail1966;
9614 : 12 : res_op->ops[0] = _r1;
9615 : : }
9616 : 12 : res_op->ops[1] = captures[0];
9617 : 12 : res_op->resimplify (lseq, valueize);
9618 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1037, __FILE__, __LINE__, true);
9619 : 12 : return true;
9620 : : }
9621 : : next_after_fail1966:;
9622 : : }
9623 : : }
9624 : : }
9625 : : }
9626 : : }
9627 : : break;
9628 : 12 : case CFN_BUILT_IN_SQRT:
9629 : 12 : if (gimple_call_num_args (_c1) == 1)
9630 : : {
9631 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9632 : 12 : _q20 = do_valueize (valueize, _q20);
9633 : 12 : {
9634 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9635 : 12 : if (flag_unsafe_math_optimizations
9636 : : )
9637 : : {
9638 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
9639 : : )
9640 : : {
9641 : 12 : {
9642 : 12 : tree x;
9643 : 12 : switch (CFN_BUILT_IN_SQRT)
9644 : : {
9645 : 12 : CASE_CFN_SQRT:
9646 : 12 : x = build_real (type, dconsthalf);
9647 : 12 : break;
9648 : : CASE_CFN_CBRT:
9649 : : x = build_real_truncate (type, dconst_third ());
9650 : : break;
9651 : : default:
9652 : : gcc_unreachable ();
9653 : : }
9654 : 12 : gimple_seq *lseq = seq;
9655 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1967;
9656 : 12 : {
9657 : 12 : res_op->set_op (MULT_EXPR, type, 2);
9658 : 12 : res_op->ops[0] = x;
9659 : 12 : {
9660 : 12 : tree _o1[1], _r1;
9661 : 12 : _o1[0] = captures[0];
9662 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o1[0]), _o1[0]);
9663 : 12 : tem_op.resimplify (lseq, valueize);
9664 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9665 : 12 : if (!_r1) goto next_after_fail1967;
9666 : 6 : res_op->ops[1] = _r1;
9667 : : }
9668 : 6 : res_op->resimplify (lseq, valueize);
9669 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1036, __FILE__, __LINE__, true);
9670 : 6 : return true;
9671 : : }
9672 : : next_after_fail1967:;
9673 : : }
9674 : : }
9675 : : }
9676 : : }
9677 : : }
9678 : : break;
9679 : 12 : case CFN_BUILT_IN_EXP10:
9680 : 12 : if (gimple_call_num_args (_c1) == 1)
9681 : : {
9682 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9683 : 12 : _q20 = do_valueize (valueize, _q20);
9684 : 12 : {
9685 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9686 : 12 : if (flag_unsafe_math_optimizations
9687 : : )
9688 : : {
9689 : 12 : gimple_seq *lseq = seq;
9690 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1968;
9691 : 12 : {
9692 : 12 : tree tem;
9693 : 12 : tem = captures[0];
9694 : 12 : res_op->set_value (tem);
9695 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
9696 : 12 : return true;
9697 : : }
9698 : 0 : next_after_fail1968:;
9699 : : }
9700 : : }
9701 : : }
9702 : : break;
9703 : 12 : case CFN_BUILT_IN_POW10:
9704 : 12 : if (gimple_call_num_args (_c1) == 1)
9705 : : {
9706 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9707 : 12 : _q20 = do_valueize (valueize, _q20);
9708 : 12 : {
9709 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9710 : 12 : if (flag_unsafe_math_optimizations
9711 : : )
9712 : : {
9713 : 12 : gimple_seq *lseq = seq;
9714 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1969;
9715 : 12 : {
9716 : 12 : tree tem;
9717 : 12 : tem = captures[0];
9718 : 12 : res_op->set_value (tem);
9719 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1038, __FILE__, __LINE__, true);
9720 : 12 : return true;
9721 : : }
9722 : 0 : next_after_fail1969:;
9723 : : }
9724 : : }
9725 : : }
9726 : : break;
9727 : : default:;
9728 : : }
9729 : : }
9730 : : break;
9731 : : default:;
9732 : : }
9733 : : return false;
9734 : : }
9735 : :
9736 : : bool
9737 : 0 : gimple_simplify_CFN_EXP10 (gimple_match_op *res_op, gimple_seq *seq,
9738 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9739 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9740 : : {
9741 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9742 : 0 : switch (TREE_CODE (_p0))
9743 : : {
9744 : 0 : case SSA_NAME:
9745 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
9746 : : {
9747 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9748 : 0 : switch (gimple_call_combined_fn (_c1))
9749 : : {
9750 : 0 : case CFN_LOG10:
9751 : 0 : if (gimple_call_num_args (_c1) == 1)
9752 : : {
9753 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9754 : 0 : _q20 = do_valueize (valueize, _q20);
9755 : 0 : {
9756 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9757 : 0 : if (flag_unsafe_math_optimizations
9758 : : )
9759 : : {
9760 : 0 : gimple_seq *lseq = seq;
9761 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1991;
9762 : 0 : {
9763 : 0 : tree tem;
9764 : 0 : tem = captures[0];
9765 : 0 : res_op->set_value (tem);
9766 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1039, __FILE__, __LINE__, true);
9767 : 0 : return true;
9768 : : }
9769 : 0 : next_after_fail1991:;
9770 : : }
9771 : : }
9772 : : }
9773 : : break;
9774 : : default:;
9775 : : }
9776 : : }
9777 : : break;
9778 : : default:;
9779 : : }
9780 : : return false;
9781 : : }
9782 : :
9783 : : bool
9784 : 11084 : gimple_simplify_CFN_BUILT_IN_SQRTL (gimple_match_op *res_op, gimple_seq *seq,
9785 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
9786 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
9787 : : {
9788 : 11084 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
9789 : 11084 : switch (TREE_CODE (_p0))
9790 : : {
9791 : 10730 : case SSA_NAME:
9792 : 10730 : if (gimple *_d1 = get_def (valueize, _p0))
9793 : : {
9794 : 5041 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9795 : 112 : switch (gimple_call_combined_fn (_c1))
9796 : : {
9797 : 12 : case CFN_BUILT_IN_SQRTL:
9798 : 12 : if (gimple_call_num_args (_c1) == 1)
9799 : : {
9800 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9801 : 12 : _q20 = do_valueize (valueize, _q20);
9802 : 12 : {
9803 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9804 : 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
9805 : : )
9806 : : {
9807 : 12 : gimple_seq *lseq = seq;
9808 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2009;
9809 : 12 : {
9810 : 12 : res_op->set_op (CFN_BUILT_IN_POWL, type, 2);
9811 : 12 : res_op->ops[0] = captures[0];
9812 : 12 : res_op->ops[1] = build_real (type, dconst_quarter ());
9813 : 12 : res_op->resimplify (lseq, valueize);
9814 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1040, __FILE__, __LINE__, true);
9815 : 12 : return true;
9816 : : }
9817 : 0 : next_after_fail2009:;
9818 : : }
9819 : : }
9820 : : }
9821 : : break;
9822 : 12 : case CFN_BUILT_IN_EXP10L:
9823 : 12 : if (gimple_call_num_args (_c1) == 1)
9824 : : {
9825 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9826 : 12 : _q20 = do_valueize (valueize, _q20);
9827 : 12 : {
9828 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9829 : 12 : if (flag_unsafe_math_optimizations
9830 : : )
9831 : : {
9832 : 12 : gimple_seq *lseq = seq;
9833 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2010;
9834 : 12 : {
9835 : 12 : res_op->set_op (CFN_BUILT_IN_EXP10L, type, 1);
9836 : 12 : {
9837 : 12 : tree _o1[2], _r1;
9838 : 12 : _o1[0] = captures[0];
9839 : 12 : _o1[1] = build_real (type, dconsthalf);
9840 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9841 : 12 : tem_op.resimplify (lseq, valueize);
9842 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9843 : 12 : if (!_r1) goto next_after_fail2010;
9844 : 6 : res_op->ops[0] = _r1;
9845 : : }
9846 : 6 : res_op->resimplify (lseq, valueize);
9847 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1041, __FILE__, __LINE__, true);
9848 : 6 : return true;
9849 : : }
9850 : : next_after_fail2010:;
9851 : : }
9852 : : }
9853 : : }
9854 : : break;
9855 : 14 : case CFN_BUILT_IN_EXPL:
9856 : 14 : if (gimple_call_num_args (_c1) == 1)
9857 : : {
9858 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
9859 : 14 : _q20 = do_valueize (valueize, _q20);
9860 : 14 : {
9861 : 14 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9862 : 14 : if (flag_unsafe_math_optimizations
9863 : : )
9864 : : {
9865 : 14 : gimple_seq *lseq = seq;
9866 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2011;
9867 : 14 : {
9868 : 14 : res_op->set_op (CFN_BUILT_IN_EXPL, type, 1);
9869 : 14 : {
9870 : 14 : tree _o1[2], _r1;
9871 : 14 : _o1[0] = captures[0];
9872 : 14 : _o1[1] = build_real (type, dconsthalf);
9873 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9874 : 14 : tem_op.resimplify (lseq, valueize);
9875 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9876 : 14 : if (!_r1) goto next_after_fail2011;
9877 : 7 : res_op->ops[0] = _r1;
9878 : : }
9879 : 7 : res_op->resimplify (lseq, valueize);
9880 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1041, __FILE__, __LINE__, true);
9881 : 7 : return true;
9882 : : }
9883 : : next_after_fail2011:;
9884 : : }
9885 : : }
9886 : : }
9887 : : break;
9888 : 14 : case CFN_BUILT_IN_POWL:
9889 : 14 : if (gimple_call_num_args (_c1) == 2)
9890 : : {
9891 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
9892 : 14 : _q20 = do_valueize (valueize, _q20);
9893 : 14 : tree _q21 = gimple_call_arg (_c1, 1);
9894 : 14 : _q21 = do_valueize (valueize, _q21);
9895 : 14 : {
9896 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9897 : 14 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
9898 : : )
9899 : : {
9900 : 14 : gimple_seq *lseq = seq;
9901 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2012;
9902 : 14 : {
9903 : 14 : res_op->set_op (CFN_BUILT_IN_POWL, type, 2);
9904 : 14 : {
9905 : 14 : tree _o1[1], _r1;
9906 : 14 : _o1[0] = captures[0];
9907 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
9908 : 14 : tem_op.resimplify (lseq, valueize);
9909 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9910 : 14 : if (!_r1) goto next_after_fail2012;
9911 : 13 : res_op->ops[0] = _r1;
9912 : : }
9913 : 13 : {
9914 : 13 : tree _o1[2], _r1;
9915 : 13 : _o1[0] = captures[1];
9916 : 13 : _o1[1] = build_real (type, dconsthalf);
9917 : 13 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9918 : 13 : tem_op.resimplify (lseq, valueize);
9919 : 13 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9920 : 13 : if (!_r1) goto next_after_fail2012;
9921 : 7 : res_op->ops[1] = _r1;
9922 : : }
9923 : 7 : res_op->resimplify (lseq, valueize);
9924 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1042, __FILE__, __LINE__, true);
9925 : 7 : return true;
9926 : : }
9927 : 7 : next_after_fail2012:;
9928 : : }
9929 : : }
9930 : : }
9931 : : break;
9932 : 12 : case CFN_BUILT_IN_POW10L:
9933 : 12 : if (gimple_call_num_args (_c1) == 1)
9934 : : {
9935 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9936 : 12 : _q20 = do_valueize (valueize, _q20);
9937 : 12 : {
9938 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9939 : 12 : if (flag_unsafe_math_optimizations
9940 : : )
9941 : : {
9942 : 12 : gimple_seq *lseq = seq;
9943 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2013;
9944 : 12 : {
9945 : 12 : res_op->set_op (CFN_BUILT_IN_POW10L, type, 1);
9946 : 12 : {
9947 : 12 : tree _o1[2], _r1;
9948 : 12 : _o1[0] = captures[0];
9949 : 12 : _o1[1] = build_real (type, dconsthalf);
9950 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9951 : 12 : tem_op.resimplify (lseq, valueize);
9952 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9953 : 12 : if (!_r1) goto next_after_fail2013;
9954 : 6 : res_op->ops[0] = _r1;
9955 : : }
9956 : 6 : res_op->resimplify (lseq, valueize);
9957 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1041, __FILE__, __LINE__, true);
9958 : 6 : return true;
9959 : : }
9960 : : next_after_fail2013:;
9961 : : }
9962 : : }
9963 : : }
9964 : : break;
9965 : 12 : case CFN_BUILT_IN_CBRTL:
9966 : 12 : if (gimple_call_num_args (_c1) == 1)
9967 : : {
9968 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9969 : 12 : _q20 = do_valueize (valueize, _q20);
9970 : 12 : {
9971 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9972 : 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
9973 : : )
9974 : : {
9975 : 12 : gimple_seq *lseq = seq;
9976 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2014;
9977 : 12 : {
9978 : 12 : res_op->set_op (CFN_BUILT_IN_POWL, type, 2);
9979 : 12 : res_op->ops[0] = captures[0];
9980 : 12 : res_op->ops[1] = build_real_truncate (type, dconst_sixth ());
9981 : 12 : res_op->resimplify (lseq, valueize);
9982 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1043, __FILE__, __LINE__, true);
9983 : 12 : return true;
9984 : : }
9985 : 0 : next_after_fail2014:;
9986 : : }
9987 : : }
9988 : : }
9989 : : break;
9990 : 12 : case CFN_BUILT_IN_EXP2L:
9991 : 12 : if (gimple_call_num_args (_c1) == 1)
9992 : : {
9993 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
9994 : 12 : _q20 = do_valueize (valueize, _q20);
9995 : 12 : {
9996 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
9997 : 12 : if (flag_unsafe_math_optimizations
9998 : : )
9999 : : {
10000 : 12 : gimple_seq *lseq = seq;
10001 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2015;
10002 : 12 : {
10003 : 12 : res_op->set_op (CFN_BUILT_IN_EXP2L, type, 1);
10004 : 12 : {
10005 : 12 : tree _o1[2], _r1;
10006 : 12 : _o1[0] = captures[0];
10007 : 12 : _o1[1] = build_real (type, dconsthalf);
10008 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10009 : 12 : tem_op.resimplify (lseq, valueize);
10010 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10011 : 12 : if (!_r1) goto next_after_fail2015;
10012 : 6 : res_op->ops[0] = _r1;
10013 : : }
10014 : 6 : res_op->resimplify (lseq, valueize);
10015 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1041, __FILE__, __LINE__, true);
10016 : 6 : return true;
10017 : : }
10018 : : next_after_fail2015:;
10019 : : }
10020 : : }
10021 : : }
10022 : : break;
10023 : : default:;
10024 : : }
10025 : : }
10026 : : break;
10027 : : default:;
10028 : : }
10029 : : return false;
10030 : : }
10031 : :
10032 : : bool
10033 : 7 : gimple_simplify_CFN_SINH (gimple_match_op *res_op, gimple_seq *seq,
10034 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10035 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10036 : : {
10037 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10038 : 7 : switch (TREE_CODE (_p0))
10039 : : {
10040 : 7 : case SSA_NAME:
10041 : 7 : if (gimple *_d1 = get_def (valueize, _p0))
10042 : : {
10043 : 4 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10044 : 0 : switch (gimple_call_combined_fn (_c1))
10045 : : {
10046 : 0 : case CFN_ATANH:
10047 : 0 : if (gimple_call_num_args (_c1) == 1)
10048 : : {
10049 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10050 : 0 : _q20 = do_valueize (valueize, _q20);
10051 : 0 : {
10052 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
10053 : 0 : if (gimple_simplify_668 (res_op, seq, valueize, type, captures, CFN_SINH, CFN_ATANH, CFN_SQRT))
10054 : 0 : return true;
10055 : : }
10056 : : }
10057 : : break;
10058 : : default:;
10059 : : }
10060 : : }
10061 : : break;
10062 : : default:;
10063 : : }
10064 : : return false;
10065 : : }
10066 : :
10067 : : bool
10068 : 42 : gimple_simplify_CFN_BUILT_IN_TRUNCF128 (gimple_match_op *res_op, gimple_seq *seq,
10069 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10070 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10071 : : {
10072 : 42 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10073 : 42 : switch (TREE_CODE (_p0))
10074 : : {
10075 : 40 : case SSA_NAME:
10076 : 40 : if (gimple *_d1 = get_def (valueize, _p0))
10077 : : {
10078 : 28 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10079 : 0 : switch (gimple_call_combined_fn (_c1))
10080 : : {
10081 : 0 : case CFN_BUILT_IN_TRUNCF128:
10082 : 0 : if (gimple_call_num_args (_c1) == 1)
10083 : : {
10084 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10085 : 0 : _q20 = do_valueize (valueize, _q20);
10086 : 0 : {
10087 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10088 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF128))
10089 : 0 : return true;
10090 : : }
10091 : : }
10092 : : break;
10093 : : default:;
10094 : : }
10095 : : }
10096 : : break;
10097 : 42 : default:;
10098 : : }
10099 : 42 : if (integer_valued_real_p (_p0))
10100 : : {
10101 : 0 : {
10102 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10103 : 0 : if (gimple_simplify_670 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF128))
10104 : 0 : return true;
10105 : : }
10106 : : }
10107 : : return false;
10108 : : }
10109 : :
10110 : : bool
10111 : 5111 : gimple_simplify_CFN_BUILT_IN_FLOOR (gimple_match_op *res_op, gimple_seq *seq,
10112 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10113 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10114 : : {
10115 : 5111 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10116 : 5111 : switch (TREE_CODE (_p0))
10117 : : {
10118 : 5009 : case SSA_NAME:
10119 : 5009 : if (gimple *_d1 = get_def (valueize, _p0))
10120 : : {
10121 : 2777 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10122 : 2980 : switch (gimple_assign_rhs_code (_a1))
10123 : : {
10124 : 188 : CASE_CONVERT:
10125 : 188 : {
10126 : 188 : tree _q20 = gimple_assign_rhs1 (_a1);
10127 : 188 : _q20 = do_valueize (valueize, _q20);
10128 : 188 : if (gimple_float_value_p (_q20, valueize))
10129 : : {
10130 : 96 : {
10131 : 96 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10132 : 96 : if (gimple_simplify_671 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOOR, CFN_BUILT_IN_FLOORF))
10133 : 48 : return true;
10134 : : }
10135 : : }
10136 : : break;
10137 : : }
10138 : : default:;
10139 : : }
10140 : 440 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10141 : 0 : switch (gimple_call_combined_fn (_c1))
10142 : : {
10143 : 0 : case CFN_BUILT_IN_FLOOR:
10144 : 0 : if (gimple_call_num_args (_c1) == 1)
10145 : : {
10146 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10147 : 0 : _q20 = do_valueize (valueize, _q20);
10148 : 0 : {
10149 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10150 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOOR))
10151 : 0 : return true;
10152 : : }
10153 : : }
10154 : : break;
10155 : : default:;
10156 : : }
10157 : : }
10158 : : break;
10159 : 5063 : default:;
10160 : : }
10161 : 5063 : if (integer_valued_real_p (_p0))
10162 : : {
10163 : 14 : {
10164 : 14 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10165 : 14 : if (gimple_simplify_670 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOOR))
10166 : 14 : return true;
10167 : : }
10168 : : }
10169 : 5049 : if (tree_expr_nonnegative_p (_p0))
10170 : : {
10171 : 34 : {
10172 : 34 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10173 : 34 : if (gimple_simplify_673 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOOR, CFN_BUILT_IN_TRUNC))
10174 : 34 : return true;
10175 : : }
10176 : : }
10177 : : return false;
10178 : : }
10179 : :
10180 : : bool
10181 : 7036 : gimple_simplify_CFN_BUILT_IN_CEIL (gimple_match_op *res_op, gimple_seq *seq,
10182 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10183 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10184 : : {
10185 : 7036 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10186 : 7036 : switch (TREE_CODE (_p0))
10187 : : {
10188 : 6956 : case SSA_NAME:
10189 : 6956 : if (gimple *_d1 = get_def (valueize, _p0))
10190 : : {
10191 : 4039 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10192 : 4050 : switch (gimple_assign_rhs_code (_a1))
10193 : : {
10194 : 379 : CASE_CONVERT:
10195 : 379 : {
10196 : 379 : tree _q20 = gimple_assign_rhs1 (_a1);
10197 : 379 : _q20 = do_valueize (valueize, _q20);
10198 : 379 : if (gimple_float_value_p (_q20, valueize))
10199 : : {
10200 : 325 : {
10201 : 325 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10202 : 325 : if (gimple_simplify_671 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEIL, CFN_BUILT_IN_CEILF))
10203 : 164 : return true;
10204 : : }
10205 : : }
10206 : : break;
10207 : : }
10208 : : default:;
10209 : : }
10210 : 389 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10211 : 0 : switch (gimple_call_combined_fn (_c1))
10212 : : {
10213 : 0 : case CFN_BUILT_IN_CEIL:
10214 : 0 : if (gimple_call_num_args (_c1) == 1)
10215 : : {
10216 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10217 : 0 : _q20 = do_valueize (valueize, _q20);
10218 : 0 : {
10219 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10220 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEIL))
10221 : 0 : return true;
10222 : : }
10223 : : }
10224 : : break;
10225 : : default:;
10226 : : }
10227 : : }
10228 : : break;
10229 : 6872 : default:;
10230 : : }
10231 : 6872 : if (integer_valued_real_p (_p0))
10232 : : {
10233 : 79 : {
10234 : 79 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10235 : 79 : if (gimple_simplify_670 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEIL))
10236 : 79 : return true;
10237 : : }
10238 : : }
10239 : : return false;
10240 : : }
10241 : :
10242 : : bool
10243 : 213 : gimple_simplify_CFN_CEIL (gimple_match_op *res_op, gimple_seq *seq,
10244 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10245 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10246 : : {
10247 : 213 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10248 : 213 : switch (TREE_CODE (_p0))
10249 : : {
10250 : 213 : case SSA_NAME:
10251 : 213 : if (gimple *_d1 = get_def (valueize, _p0))
10252 : : {
10253 : 123 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10254 : 0 : switch (gimple_call_combined_fn (_c1))
10255 : : {
10256 : 0 : case CFN_CEIL:
10257 : 0 : if (gimple_call_num_args (_c1) == 1)
10258 : : {
10259 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10260 : 0 : _q20 = do_valueize (valueize, _q20);
10261 : 0 : {
10262 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10263 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures, CFN_CEIL))
10264 : 0 : return true;
10265 : : }
10266 : : }
10267 : : break;
10268 : : default:;
10269 : : }
10270 : : }
10271 : : break;
10272 : 213 : default:;
10273 : : }
10274 : 213 : if (integer_valued_real_p (_p0))
10275 : : {
10276 : 0 : {
10277 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10278 : 0 : if (gimple_simplify_670 (res_op, seq, valueize, type, captures, CFN_CEIL))
10279 : 0 : return true;
10280 : : }
10281 : : }
10282 : : return false;
10283 : : }
10284 : :
10285 : : bool
10286 : 42 : gimple_simplify_CFN_BUILT_IN_ROUNDF128 (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 : 42 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10291 : 42 : switch (TREE_CODE (_p0))
10292 : : {
10293 : 40 : case SSA_NAME:
10294 : 40 : if (gimple *_d1 = get_def (valueize, _p0))
10295 : : {
10296 : 28 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10297 : 0 : switch (gimple_call_combined_fn (_c1))
10298 : : {
10299 : 0 : case CFN_BUILT_IN_ROUNDF128:
10300 : 0 : if (gimple_call_num_args (_c1) == 1)
10301 : : {
10302 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10303 : 0 : _q20 = do_valueize (valueize, _q20);
10304 : 0 : {
10305 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10306 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF128))
10307 : 0 : return true;
10308 : : }
10309 : : }
10310 : : break;
10311 : : default:;
10312 : : }
10313 : : }
10314 : : break;
10315 : 42 : default:;
10316 : : }
10317 : 42 : if (integer_valued_real_p (_p0))
10318 : : {
10319 : 0 : {
10320 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10321 : 0 : if (gimple_simplify_670 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF128))
10322 : 0 : return true;
10323 : : }
10324 : : }
10325 : : return false;
10326 : : }
10327 : :
10328 : : bool
10329 : 804 : gimple_simplify_CFN_BUILT_IN_NEARBYINTL (gimple_match_op *res_op, gimple_seq *seq,
10330 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10331 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10332 : : {
10333 : 804 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10334 : 804 : switch (TREE_CODE (_p0))
10335 : : {
10336 : 721 : case SSA_NAME:
10337 : 721 : if (gimple *_d1 = get_def (valueize, _p0))
10338 : : {
10339 : 449 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10340 : 128 : switch (gimple_assign_rhs_code (_a1))
10341 : : {
10342 : 110 : CASE_CONVERT:
10343 : 110 : {
10344 : 110 : tree _q20 = gimple_assign_rhs1 (_a1);
10345 : 110 : _q20 = do_valueize (valueize, _q20);
10346 : 110 : if (gimple_double_value_p (_q20, valueize))
10347 : : {
10348 : 36 : {
10349 : 36 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10350 : 36 : if (gimple_simplify_672 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTL, CFN_BUILT_IN_NEARBYINT))
10351 : 18 : return true;
10352 : : }
10353 : : }
10354 : 92 : if (gimple_float_value_p (_q20, valueize))
10355 : : {
10356 : 72 : {
10357 : 72 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10358 : 72 : if (gimple_simplify_671 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTL, CFN_BUILT_IN_NEARBYINTF))
10359 : 36 : return true;
10360 : : }
10361 : : }
10362 : : break;
10363 : : }
10364 : : default:;
10365 : : }
10366 : 321 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10367 : 0 : switch (gimple_call_combined_fn (_c1))
10368 : : {
10369 : 0 : case CFN_BUILT_IN_NEARBYINTL:
10370 : 0 : if (gimple_call_num_args (_c1) == 1)
10371 : : {
10372 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10373 : 0 : _q20 = do_valueize (valueize, _q20);
10374 : 0 : {
10375 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10376 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTL))
10377 : 0 : return true;
10378 : : }
10379 : : }
10380 : : break;
10381 : : default:;
10382 : : }
10383 : : }
10384 : : break;
10385 : 750 : default:;
10386 : : }
10387 : 750 : if (integer_valued_real_p (_p0))
10388 : : {
10389 : 44 : {
10390 : 44 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10391 : 44 : if (gimple_simplify_670 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTL))
10392 : 44 : return true;
10393 : : }
10394 : : }
10395 : : return false;
10396 : : }
10397 : :
10398 : : bool
10399 : 0 : gimple_simplify_CFN_BUILT_IN_RINTF64 (gimple_match_op *res_op, gimple_seq *seq,
10400 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10401 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10402 : : {
10403 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10404 : 0 : switch (TREE_CODE (_p0))
10405 : : {
10406 : 0 : case SSA_NAME:
10407 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
10408 : : {
10409 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10410 : 0 : switch (gimple_call_combined_fn (_c1))
10411 : : {
10412 : 0 : case CFN_BUILT_IN_RINTF64:
10413 : 0 : if (gimple_call_num_args (_c1) == 1)
10414 : : {
10415 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10416 : 0 : _q20 = do_valueize (valueize, _q20);
10417 : 0 : {
10418 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10419 : 0 : if (gimple_simplify_669 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF64))
10420 : 0 : return true;
10421 : : }
10422 : : }
10423 : : break;
10424 : : default:;
10425 : : }
10426 : : }
10427 : : break;
10428 : 0 : default:;
10429 : : }
10430 : 0 : if (integer_valued_real_p (_p0))
10431 : : {
10432 : 0 : {
10433 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10434 : 0 : if (gimple_simplify_670 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF64))
10435 : 0 : return true;
10436 : : }
10437 : : }
10438 : : return false;
10439 : : }
10440 : :
10441 : : bool
10442 : 505 : gimple_simplify_CFN_BUILT_IN_CEXP (gimple_match_op *res_op, gimple_seq *seq,
10443 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10444 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10445 : : {
10446 : 505 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10447 : 505 : if (gimple_compositional_complex (_p0, valueize))
10448 : : {
10449 : 22 : {
10450 : 22 : tree captures[3] ATTRIBUTE_UNUSED = { _p0 };
10451 : 22 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
10452 : : )
10453 : : {
10454 : 8 : if (targetm.libc_has_function (function_c99_math_complex, TREE_TYPE (captures[0]))
10455 : : )
10456 : : {
10457 : 8 : gimple_seq *lseq = seq;
10458 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2043;
10459 : 8 : {
10460 : 8 : res_op->set_op (COMPLEX_EXPR, type, 2);
10461 : 8 : {
10462 : 8 : tree _o1[2], _r1;
10463 : 8 : {
10464 : 8 : tree _o2[1], _r2;
10465 : 8 : {
10466 : 8 : tree _o3[1], _r3;
10467 : 8 : _o3[0] = captures[0];
10468 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o3[0])), _o3[0]);
10469 : 8 : tem_op.resimplify (lseq, valueize);
10470 : 8 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
10471 : 8 : if (!_r3) goto next_after_fail2043;
10472 : 8 : _o2[0] = _r3;
10473 : : }
10474 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_EXP, TREE_TYPE (_o2[0]), _o2[0]);
10475 : 8 : tem_op.resimplify (lseq, valueize);
10476 : 8 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
10477 : 8 : if (!_r2) goto next_after_fail2043;
10478 : 7 : captures[1] = _r2;
10479 : : }
10480 : 7 : _o1[0] = captures[1];
10481 : 7 : {
10482 : 7 : tree _o2[1], _r2;
10483 : 7 : {
10484 : 7 : tree _o3[1], _r3;
10485 : 7 : {
10486 : 7 : tree _o4[1], _r4;
10487 : 7 : _o4[0] = captures[0];
10488 : 7 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o4[0])), _o4[0]);
10489 : 7 : tem_op.resimplify (lseq, valueize);
10490 : 7 : _r4 = maybe_push_res_to_seq (&tem_op, lseq);
10491 : 7 : if (!_r4) goto next_after_fail2043;
10492 : 7 : _o3[0] = _r4;
10493 : : }
10494 : 7 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_CEXPI, type, _o3[0]);
10495 : 7 : tem_op.resimplify (lseq, valueize);
10496 : 7 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
10497 : 7 : if (!_r3) goto next_after_fail2043;
10498 : 4 : captures[2] = _r3;
10499 : : }
10500 : 4 : _o2[0] = captures[2];
10501 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o2[0])), _o2[0]);
10502 : 4 : tem_op.resimplify (lseq, valueize);
10503 : 4 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
10504 : 4 : if (!_r2) goto next_after_fail2043;
10505 : 4 : _o1[1] = _r2;
10506 : : }
10507 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10508 : 4 : tem_op.resimplify (lseq, valueize);
10509 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10510 : 4 : if (!_r1) goto next_after_fail2043;
10511 : 4 : res_op->ops[0] = _r1;
10512 : : }
10513 : 4 : {
10514 : 4 : tree _o1[2], _r1;
10515 : 4 : _o1[0] = captures[1];
10516 : 4 : {
10517 : 4 : tree _o2[1], _r2;
10518 : 4 : _o2[0] = captures[2];
10519 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o2[0])), _o2[0]);
10520 : 4 : tem_op.resimplify (lseq, valueize);
10521 : 4 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
10522 : 4 : if (!_r2) goto next_after_fail2043;
10523 : 4 : _o1[1] = _r2;
10524 : : }
10525 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10526 : 4 : tem_op.resimplify (lseq, valueize);
10527 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10528 : 4 : if (!_r1) goto next_after_fail2043;
10529 : 4 : res_op->ops[1] = _r1;
10530 : : }
10531 : 4 : res_op->resimplify (lseq, valueize);
10532 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1048, __FILE__, __LINE__, true);
10533 : 4 : return true;
10534 : : }
10535 : : next_after_fail2043:;
10536 : : }
10537 : : }
10538 : : }
10539 : : }
10540 : : return false;
10541 : : }
10542 : :
10543 : : bool
10544 : 260 : gimple_simplify_CFN_BUILT_IN_LLRINTL (gimple_match_op *res_op, gimple_seq *seq,
10545 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10546 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10547 : : {
10548 : 260 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10549 : 260 : switch (TREE_CODE (_p0))
10550 : : {
10551 : 212 : case SSA_NAME:
10552 : 212 : if (gimple *_d1 = get_def (valueize, _p0))
10553 : : {
10554 : 83 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10555 : 0 : switch (gimple_assign_rhs_code (_a1))
10556 : : {
10557 : 0 : CASE_CONVERT:
10558 : 0 : {
10559 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10560 : 0 : _q20 = do_valueize (valueize, _q20);
10561 : 0 : if (gimple_double_value_p (_q20, valueize))
10562 : : {
10563 : 0 : {
10564 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10565 : 0 : if (gimple_simplify_676 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLRINTL, CFN_BUILT_IN_LLRINT))
10566 : 0 : return true;
10567 : : }
10568 : : }
10569 : 0 : if (gimple_float_value_p (_q20, valueize))
10570 : : {
10571 : 0 : {
10572 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10573 : 0 : if (gimple_simplify_677 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLRINTL, CFN_BUILT_IN_LLRINTF))
10574 : 0 : return true;
10575 : : }
10576 : : }
10577 : : break;
10578 : : }
10579 : : default:;
10580 : : }
10581 : : }
10582 : : break;
10583 : 260 : default:;
10584 : : }
10585 : 260 : if (integer_valued_real_p (_p0))
10586 : : {
10587 : 28 : {
10588 : 28 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10589 : 28 : if (gimple_simplify_682 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLRINTL))
10590 : 20 : return true;
10591 : : }
10592 : : }
10593 : 240 : {
10594 : 240 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10595 : 240 : if (gimple_simplify_681 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IRINTL, CFN_BUILT_IN_LRINTL, CFN_BUILT_IN_LLRINTL))
10596 : 205 : return true;
10597 : : }
10598 : 35 : return false;
10599 : : }
10600 : :
10601 : : bool
10602 : 1503 : gimple_simplify_CFN_BUILT_IN_LROUND (gimple_match_op *res_op, gimple_seq *seq,
10603 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10604 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10605 : : {
10606 : 1503 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10607 : 1503 : switch (TREE_CODE (_p0))
10608 : : {
10609 : 1347 : case SSA_NAME:
10610 : 1347 : if (gimple *_d1 = get_def (valueize, _p0))
10611 : : {
10612 : 875 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10613 : 428 : switch (gimple_assign_rhs_code (_a1))
10614 : : {
10615 : 234 : CASE_CONVERT:
10616 : 234 : {
10617 : 234 : tree _q20 = gimple_assign_rhs1 (_a1);
10618 : 234 : _q20 = do_valueize (valueize, _q20);
10619 : 234 : if (gimple_float_value_p (_q20, valueize))
10620 : : {
10621 : 168 : {
10622 : 168 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10623 : 168 : if (gimple_simplify_677 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LROUND, CFN_BUILT_IN_LROUNDF))
10624 : 168 : return true;
10625 : : }
10626 : : }
10627 : : break;
10628 : : }
10629 : : default:;
10630 : : }
10631 : : }
10632 : : break;
10633 : 1335 : default:;
10634 : : }
10635 : 1335 : if (integer_valued_real_p (_p0))
10636 : : {
10637 : 45 : {
10638 : 45 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10639 : 45 : if (gimple_simplify_679 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LROUND))
10640 : 45 : return true;
10641 : : }
10642 : : }
10643 : : return false;
10644 : : }
10645 : :
10646 : : bool
10647 : 0 : gimple_simplify_CFN_LFLOOR (gimple_match_op *res_op, gimple_seq *seq,
10648 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10649 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10650 : : {
10651 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10652 : 0 : if (tree_expr_nonnegative_p (_p0))
10653 : : {
10654 : 0 : {
10655 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10656 : 0 : if (gimple_simplify_678 (res_op, seq, valueize, type, captures, CFN_LFLOOR))
10657 : 0 : return true;
10658 : : }
10659 : : }
10660 : 0 : if (integer_valued_real_p (_p0))
10661 : : {
10662 : 0 : {
10663 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10664 : 0 : if (gimple_simplify_679 (res_op, seq, valueize, type, captures, CFN_LFLOOR))
10665 : 0 : return true;
10666 : : }
10667 : : }
10668 : : return false;
10669 : : }
10670 : :
10671 : : bool
10672 : 0 : gimple_simplify_CFN_LLCEIL (gimple_match_op *res_op, gimple_seq *seq,
10673 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10674 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10675 : : {
10676 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10677 : 0 : if (integer_valued_real_p (_p0))
10678 : : {
10679 : 0 : {
10680 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10681 : 0 : if (gimple_simplify_679 (res_op, seq, valueize, type, captures, CFN_LLCEIL))
10682 : 0 : return true;
10683 : : }
10684 : : }
10685 : 0 : {
10686 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10687 : 0 : if (gimple_simplify_681 (res_op, seq, valueize, type, captures, CFN_ICEIL, CFN_LCEIL, CFN_LLCEIL))
10688 : 0 : return true;
10689 : : }
10690 : 0 : return false;
10691 : : }
10692 : :
10693 : : bool
10694 : 195 : gimple_simplify_CFN_BUILT_IN_IRINTF (gimple_match_op *res_op, gimple_seq *seq,
10695 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10696 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10697 : : {
10698 : 195 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10699 : 195 : if (integer_valued_real_p (_p0))
10700 : : {
10701 : 0 : {
10702 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10703 : 0 : if (gimple_simplify_682 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IRINTF))
10704 : 0 : return true;
10705 : : }
10706 : : }
10707 : 195 : {
10708 : 195 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10709 : 195 : if (gimple_simplify_680 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IRINTF, CFN_BUILT_IN_LRINTF, CFN_BUILT_IN_LLRINTF))
10710 : 0 : return true;
10711 : : }
10712 : 195 : return false;
10713 : : }
10714 : :
10715 : : bool
10716 : 842 : gimple_simplify_CFN_BUILT_IN_SIGNBITF (gimple_match_op *res_op, gimple_seq *seq,
10717 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10718 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10719 : : {
10720 : 842 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10721 : 842 : if (tree_expr_nonnegative_p (_p0))
10722 : : {
10723 : 306 : {
10724 : 306 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10725 : 306 : if (gimple_simplify_683 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SIGNBITF))
10726 : 306 : return true;
10727 : : }
10728 : : }
10729 : 536 : {
10730 : 536 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10731 : 536 : if (gimple_simplify_684 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SIGNBITF))
10732 : 1 : return true;
10733 : : }
10734 : 535 : return false;
10735 : : }
10736 : :
10737 : : bool
10738 : 5731 : gimple_simplify_CFN_BUILT_IN_CTZL (gimple_match_op *res_op, gimple_seq *seq,
10739 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10740 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10741 : : {
10742 : 5731 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10743 : 5731 : switch (TREE_CODE (_p0))
10744 : : {
10745 : 5618 : case SSA_NAME:
10746 : 5618 : if (gimple *_d1 = get_def (valueize, _p0))
10747 : : {
10748 : 2654 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10749 : 2715 : switch (gimple_assign_rhs_code (_a1))
10750 : : {
10751 : 1 : case NEGATE_EXPR:
10752 : 1 : {
10753 : 1 : tree _q20 = gimple_assign_rhs1 (_a1);
10754 : 1 : _q20 = do_valueize (valueize, _q20);
10755 : 1 : {
10756 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
10757 : 1 : if (gimple_simplify_696 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CTZL))
10758 : 1 : return true;
10759 : : }
10760 : 0 : break;
10761 : : }
10762 : 0 : case ABS_EXPR:
10763 : 0 : {
10764 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10765 : 0 : _q20 = do_valueize (valueize, _q20);
10766 : 0 : {
10767 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
10768 : 0 : if (gimple_simplify_697 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CTZL))
10769 : 0 : return true;
10770 : : }
10771 : 0 : break;
10772 : : }
10773 : 420 : CASE_CONVERT:
10774 : 420 : {
10775 : 420 : tree _q20 = gimple_assign_rhs1 (_a1);
10776 : 420 : _q20 = do_valueize (valueize, _q20);
10777 : 420 : {
10778 : 420 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
10779 : 420 : if (gimple_simplify_698 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CTZL))
10780 : 8 : return true;
10781 : : }
10782 : 412 : break;
10783 : : }
10784 : : default:;
10785 : : }
10786 : : }
10787 : : break;
10788 : 5722 : default:;
10789 : : }
10790 : 5722 : {
10791 : 5722 : tree _p0_pops[1];
10792 : 5722 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
10793 : : {
10794 : 164 : tree _q20 = _p0_pops[0];
10795 : 164 : switch (TREE_CODE (_q20))
10796 : : {
10797 : 164 : case SSA_NAME:
10798 : 164 : if (gimple *_d1 = get_def (valueize, _q20))
10799 : : {
10800 : 164 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10801 : 8 : switch (gimple_assign_rhs_code (_a1))
10802 : : {
10803 : 0 : case NEGATE_EXPR:
10804 : 0 : {
10805 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
10806 : 0 : _q30 = do_valueize (valueize, _q30);
10807 : 0 : {
10808 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
10809 : 0 : if (gimple_simplify_694 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CTZL))
10810 : 0 : return true;
10811 : : }
10812 : 0 : break;
10813 : : }
10814 : 0 : case ABS_EXPR:
10815 : 0 : {
10816 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
10817 : 0 : _q30 = do_valueize (valueize, _q30);
10818 : 0 : {
10819 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
10820 : 0 : if (gimple_simplify_695 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CTZL))
10821 : 0 : return true;
10822 : : }
10823 : 0 : break;
10824 : : }
10825 : : default:;
10826 : : }
10827 : : }
10828 : : break;
10829 : : default:;
10830 : : }
10831 : : }
10832 : : }
10833 : 5722 : return false;
10834 : : }
10835 : :
10836 : : bool
10837 : 820 : gimple_simplify_CFN_POPCOUNT (gimple_match_op *res_op, gimple_seq *seq,
10838 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
10839 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
10840 : : {
10841 : 820 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
10842 : 820 : switch (TREE_CODE (_p0))
10843 : : {
10844 : 810 : case SSA_NAME:
10845 : 810 : if (gimple *_d1 = get_def (valueize, _p0))
10846 : : {
10847 : 456 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10848 : 638 : switch (gimple_assign_rhs_code (_a1))
10849 : : {
10850 : 2 : CASE_CONVERT:
10851 : 2 : {
10852 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
10853 : 2 : _q20 = do_valueize (valueize, _q20);
10854 : 2 : switch (TREE_CODE (_q20))
10855 : : {
10856 : 2 : case SSA_NAME:
10857 : 2 : if (gimple *_d2 = get_def (valueize, _q20))
10858 : : {
10859 : 2 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10860 : 0 : switch (gimple_assign_rhs_code (_a2))
10861 : : {
10862 : 0 : case LROTATE_EXPR:
10863 : 0 : {
10864 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
10865 : 0 : _q30 = do_valueize (valueize, _q30);
10866 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
10867 : 0 : _q31 = do_valueize (valueize, _q31);
10868 : 0 : {
10869 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
10870 : 0 : if (gimple_simplify_700 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_POPCOUNT))
10871 : 0 : return true;
10872 : : }
10873 : 0 : break;
10874 : : }
10875 : 0 : case RROTATE_EXPR:
10876 : 0 : {
10877 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
10878 : 0 : _q30 = do_valueize (valueize, _q30);
10879 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
10880 : 0 : _q31 = do_valueize (valueize, _q31);
10881 : 0 : {
10882 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
10883 : 0 : if (gimple_simplify_700 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_POPCOUNT))
10884 : 0 : return true;
10885 : : }
10886 : 0 : break;
10887 : : }
10888 : : default:;
10889 : : }
10890 : 2 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
10891 : 0 : switch (gimple_call_combined_fn (_c2))
10892 : : {
10893 : 0 : case CFN_BUILT_IN_BSWAP128:
10894 : 0 : if (gimple_call_num_args (_c2) == 1)
10895 : : {
10896 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10897 : 0 : _q30 = do_valueize (valueize, _q30);
10898 : 0 : {
10899 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10900 : 0 : if (gimple_simplify_699 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_POPCOUNT))
10901 : 0 : return true;
10902 : : }
10903 : : }
10904 : : break;
10905 : 0 : case CFN_BUILT_IN_BSWAP16:
10906 : 0 : if (gimple_call_num_args (_c2) == 1)
10907 : : {
10908 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10909 : 0 : _q30 = do_valueize (valueize, _q30);
10910 : 0 : {
10911 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10912 : 0 : if (gimple_simplify_699 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_POPCOUNT))
10913 : 0 : return true;
10914 : : }
10915 : : }
10916 : : break;
10917 : 0 : case CFN_BUILT_IN_BSWAP32:
10918 : 0 : if (gimple_call_num_args (_c2) == 1)
10919 : : {
10920 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10921 : 0 : _q30 = do_valueize (valueize, _q30);
10922 : 0 : {
10923 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10924 : 0 : if (gimple_simplify_699 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_POPCOUNT))
10925 : 0 : return true;
10926 : : }
10927 : : }
10928 : : break;
10929 : 0 : case CFN_BUILT_IN_BSWAP64:
10930 : 0 : if (gimple_call_num_args (_c2) == 1)
10931 : : {
10932 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
10933 : 0 : _q30 = do_valueize (valueize, _q30);
10934 : 0 : {
10935 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
10936 : 0 : if (gimple_simplify_699 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_POPCOUNT))
10937 : 0 : return true;
10938 : : }
10939 : : }
10940 : : break;
10941 : : default:;
10942 : : }
10943 : : }
10944 : : break;
10945 : 2 : default:;
10946 : : }
10947 : 2 : {
10948 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
10949 : 2 : if (gimple_simplify_701 (res_op, seq, valueize, type, captures, CFN_POPCOUNT))
10950 : 2 : return true;
10951 : : }
10952 : 0 : break;
10953 : : }
10954 : 0 : case LROTATE_EXPR:
10955 : 0 : {
10956 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10957 : 0 : _q20 = do_valueize (valueize, _q20);
10958 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10959 : 0 : _q21 = do_valueize (valueize, _q21);
10960 : 0 : {
10961 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
10962 : 0 : if (gimple_simplify_703 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_POPCOUNT))
10963 : 0 : return true;
10964 : : }
10965 : 0 : break;
10966 : : }
10967 : 0 : case RROTATE_EXPR:
10968 : 0 : {
10969 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10970 : 0 : _q20 = do_valueize (valueize, _q20);
10971 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10972 : 0 : _q21 = do_valueize (valueize, _q21);
10973 : 0 : {
10974 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
10975 : 0 : if (gimple_simplify_703 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_POPCOUNT))
10976 : 0 : return true;
10977 : : }
10978 : 0 : break;
10979 : : }
10980 : : default:;
10981 : : }
10982 : 85 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
10983 : 0 : switch (gimple_call_combined_fn (_c1))
10984 : : {
10985 : 0 : case CFN_BUILT_IN_BSWAP128:
10986 : 0 : if (gimple_call_num_args (_c1) == 1)
10987 : : {
10988 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
10989 : 0 : _q20 = do_valueize (valueize, _q20);
10990 : 0 : {
10991 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
10992 : 0 : if (gimple_simplify_702 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_POPCOUNT))
10993 : 0 : return true;
10994 : : }
10995 : : }
10996 : : break;
10997 : 0 : case CFN_BUILT_IN_BSWAP16:
10998 : 0 : if (gimple_call_num_args (_c1) == 1)
10999 : : {
11000 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
11001 : 0 : _q20 = do_valueize (valueize, _q20);
11002 : 0 : {
11003 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
11004 : 0 : if (gimple_simplify_702 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_POPCOUNT))
11005 : 0 : return true;
11006 : : }
11007 : : }
11008 : : break;
11009 : 0 : case CFN_BUILT_IN_BSWAP32:
11010 : 0 : if (gimple_call_num_args (_c1) == 1)
11011 : : {
11012 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
11013 : 0 : _q20 = do_valueize (valueize, _q20);
11014 : 0 : {
11015 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
11016 : 0 : if (gimple_simplify_702 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_POPCOUNT))
11017 : 0 : return true;
11018 : : }
11019 : : }
11020 : : break;
11021 : 0 : case CFN_BUILT_IN_BSWAP64:
11022 : 0 : if (gimple_call_num_args (_c1) == 1)
11023 : : {
11024 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
11025 : 0 : _q20 = do_valueize (valueize, _q20);
11026 : 0 : {
11027 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
11028 : 0 : if (gimple_simplify_702 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_POPCOUNT))
11029 : 0 : return true;
11030 : : }
11031 : : }
11032 : : break;
11033 : : default:;
11034 : : }
11035 : : }
11036 : : break;
11037 : 818 : default:;
11038 : : }
11039 : 818 : {
11040 : 818 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11041 : 818 : if (gimple_simplify_704 (res_op, seq, valueize, type, captures, CFN_POPCOUNT))
11042 : 0 : return true;
11043 : : }
11044 : 818 : return false;
11045 : : }
11046 : :
11047 : : bool
11048 : 441 : gimple_simplify_CFN_BUILT_IN_FFSLL (gimple_match_op *res_op, gimple_seq *seq,
11049 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
11050 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
11051 : : {
11052 : 441 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11053 : 441 : switch (TREE_CODE (_p0))
11054 : : {
11055 : 438 : case SSA_NAME:
11056 : 438 : if (gimple *_d1 = get_def (valueize, _p0))
11057 : : {
11058 : 203 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11059 : 247 : switch (gimple_assign_rhs_code (_a1))
11060 : : {
11061 : 143 : CASE_CONVERT:
11062 : 143 : {
11063 : 143 : tree _q20 = gimple_assign_rhs1 (_a1);
11064 : 143 : _q20 = do_valueize (valueize, _q20);
11065 : 143 : {
11066 : 143 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
11067 : 143 : if (gimple_simplify_712 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FFSLL))
11068 : 9 : return true;
11069 : : }
11070 : 134 : break;
11071 : : }
11072 : : default:;
11073 : : }
11074 : : }
11075 : : break;
11076 : 432 : default:;
11077 : : }
11078 : 432 : if (tree_expr_nonzero_p (_p0))
11079 : : {
11080 : 6 : {
11081 : 6 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11082 : 6 : if (gimple_simplify_711 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FFSLL, CFN_BUILT_IN_CTZLL))
11083 : 6 : return true;
11084 : : }
11085 : : }
11086 : : return false;
11087 : : }
11088 : :
11089 : : bool
11090 : 1661 : gimple_simplify_CFN_REDUC_MAX (gimple_match_op *res_op, gimple_seq *seq,
11091 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
11092 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
11093 : : {
11094 : 1661 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11095 : 1661 : switch (TREE_CODE (_p0))
11096 : : {
11097 : 1661 : case SSA_NAME:
11098 : 1661 : if (gimple *_d1 = get_def (valueize, _p0))
11099 : : {
11100 : 616 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11101 : 533 : switch (gimple_assign_rhs_code (_a1))
11102 : : {
11103 : 371 : case MAX_EXPR:
11104 : 371 : {
11105 : 371 : tree _q20 = gimple_assign_rhs1 (_a1);
11106 : 371 : _q20 = do_valueize (valueize, _q20);
11107 : 371 : tree _q21 = gimple_assign_rhs2 (_a1);
11108 : 371 : _q21 = do_valueize (valueize, _q21);
11109 : 371 : if (tree_swap_operands_p (_q20, _q21))
11110 : 0 : std::swap (_q20, _q21);
11111 : 371 : switch (TREE_CODE (_q21))
11112 : : {
11113 : 16 : case VECTOR_CST:
11114 : 16 : {
11115 : 16 : {
11116 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11117 : 16 : gimple_seq *lseq = seq;
11118 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2057;
11119 : 16 : {
11120 : 16 : res_op->set_op (MAX_EXPR, type, 2);
11121 : 16 : {
11122 : 16 : tree _o1[1], _r1;
11123 : 16 : _o1[0] = captures[0];
11124 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_MAX, type, _o1[0]);
11125 : 16 : tem_op.resimplify (lseq, valueize);
11126 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11127 : 16 : if (!_r1) goto next_after_fail2057;
11128 : 16 : res_op->ops[0] = _r1;
11129 : : }
11130 : 16 : {
11131 : 16 : tree _o1[1], _r1;
11132 : 16 : _o1[0] = captures[1];
11133 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_MAX, type, _o1[0]);
11134 : 16 : tem_op.resimplify (lseq, valueize);
11135 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11136 : 16 : if (!_r1) goto next_after_fail2057;
11137 : 16 : res_op->ops[1] = _r1;
11138 : : }
11139 : 16 : res_op->resimplify (lseq, valueize);
11140 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1052, __FILE__, __LINE__, true);
11141 : 16 : return true;
11142 : : }
11143 : 0 : next_after_fail2057:;
11144 : : }
11145 : 0 : break;
11146 : : }
11147 : : default:;
11148 : : }
11149 : 1661 : break;
11150 : : }
11151 : : default:;
11152 : : }
11153 : : }
11154 : : break;
11155 : : default:;
11156 : : }
11157 : : return false;
11158 : : }
11159 : :
11160 : : bool
11161 : 0 : gimple_simplify_CFN_REDUC_FMIN (gimple_match_op *res_op, gimple_seq *seq,
11162 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
11163 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
11164 : : {
11165 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11166 : 0 : switch (TREE_CODE (_p0))
11167 : : {
11168 : 0 : case SSA_NAME:
11169 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
11170 : : {
11171 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
11172 : 0 : switch (gimple_call_combined_fn (_c1))
11173 : : {
11174 : 0 : case CFN_FMIN:
11175 : 0 : if (gimple_call_num_args (_c1) == 2)
11176 : : {
11177 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
11178 : 0 : _q20 = do_valueize (valueize, _q20);
11179 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
11180 : 0 : _q21 = do_valueize (valueize, _q21);
11181 : 0 : switch (TREE_CODE (_q21))
11182 : : {
11183 : 0 : case VECTOR_CST:
11184 : 0 : {
11185 : 0 : {
11186 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11187 : 0 : gimple_seq *lseq = seq;
11188 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2060;
11189 : 0 : {
11190 : 0 : res_op->set_op (CFN_FMIN, type, 2);
11191 : 0 : {
11192 : 0 : tree _o1[1], _r1;
11193 : 0 : _o1[0] = captures[0];
11194 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_FMIN, type, _o1[0]);
11195 : 0 : tem_op.resimplify (lseq, valueize);
11196 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11197 : 0 : if (!_r1) goto next_after_fail2060;
11198 : 0 : res_op->ops[0] = _r1;
11199 : : }
11200 : 0 : {
11201 : 0 : tree _o1[1], _r1;
11202 : 0 : _o1[0] = captures[1];
11203 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_FMIN, type, _o1[0]);
11204 : 0 : tem_op.resimplify (lseq, valueize);
11205 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
11206 : 0 : if (!_r1) goto next_after_fail2060;
11207 : 0 : res_op->ops[1] = _r1;
11208 : : }
11209 : 0 : res_op->resimplify (lseq, valueize);
11210 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1052, __FILE__, __LINE__, true);
11211 : 0 : return true;
11212 : : }
11213 : 0 : next_after_fail2060:;
11214 : : }
11215 : 0 : break;
11216 : : }
11217 : : default:;
11218 : : }
11219 : : }
11220 : : break;
11221 : : default:;
11222 : : }
11223 : : }
11224 : : break;
11225 : : default:;
11226 : : }
11227 : : return false;
11228 : : }
11229 : :
11230 : : bool
11231 : 11270333 : gimple_simplify_MINUS_EXPR (gimple_match_op *res_op, gimple_seq *seq,
11232 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
11233 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
11234 : : {
11235 : 11270333 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
11236 : 11270333 : if (integer_zerop (_p1))
11237 : : {
11238 : 95194 : {
11239 : 95194 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11240 : 95194 : gimple_seq *lseq = seq;
11241 : 95194 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2169;
11242 : 95194 : {
11243 : 95194 : tree tem;
11244 : 95194 : tem = captures[0];
11245 : 95194 : res_op->set_value (tem);
11246 : 95194 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1053, __FILE__, __LINE__, true);
11247 : 95194 : return true;
11248 : : }
11249 : 0 : next_after_fail2169:;
11250 : : }
11251 : : }
11252 : 11175139 : if (real_zerop (_p1))
11253 : : {
11254 : 20456 : {
11255 : 20456 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
11256 : 20456 : if (fold_real_zero_addition_p (type, captures[0], captures[1], 1)
11257 : : )
11258 : : {
11259 : 18762 : gimple_seq *lseq = seq;
11260 : 18762 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2170;
11261 : 18762 : {
11262 : 18762 : tree tem;
11263 : 18762 : tem = captures[0];
11264 : 18762 : res_op->set_value (tem);
11265 : 18762 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1079, __FILE__, __LINE__, true);
11266 : 18762 : return true;
11267 : : }
11268 : 0 : next_after_fail2170:;
11269 : : }
11270 : : }
11271 : : }
11272 : 11156377 : switch (TREE_CODE (_p0))
11273 : : {
11274 : 9299920 : case SSA_NAME:
11275 : 9299920 : if (gimple *_d1 = get_def (valueize, _p0))
11276 : : {
11277 : 7021561 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11278 : 7680133 : switch (gimple_assign_rhs_code (_a1))
11279 : : {
11280 : 1430754 : case PLUS_EXPR:
11281 : 1430754 : {
11282 : 1430754 : tree _q20 = gimple_assign_rhs1 (_a1);
11283 : 1430754 : _q20 = do_valueize (valueize, _q20);
11284 : 1430754 : tree _q21 = gimple_assign_rhs2 (_a1);
11285 : 1430754 : _q21 = do_valueize (valueize, _q21);
11286 : 1430754 : if (tree_swap_operands_p (_q20, _q21))
11287 : 124520 : std::swap (_q20, _q21);
11288 : 1430754 : switch (TREE_CODE (_q21))
11289 : : {
11290 : 20136 : case REAL_CST:
11291 : 20136 : {
11292 : 20136 : switch (TREE_CODE (_p1))
11293 : : {
11294 : 2636 : case REAL_CST:
11295 : 2636 : {
11296 : 2636 : {
11297 : 2636 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
11298 : 2636 : if (gimple_simplify_55 (res_op, seq, valueize, type, captures, MINUS_EXPR, PLUS_EXPR))
11299 : 2 : return true;
11300 : : }
11301 : 2634 : break;
11302 : : }
11303 : : default:;
11304 : : }
11305 : : break;
11306 : : }
11307 : : default:;
11308 : : }
11309 : 11156373 : break;
11310 : : }
11311 : 152005 : case MINUS_EXPR:
11312 : 152005 : {
11313 : 152005 : tree _q20 = gimple_assign_rhs1 (_a1);
11314 : 152005 : _q20 = do_valueize (valueize, _q20);
11315 : 152005 : tree _q21 = gimple_assign_rhs2 (_a1);
11316 : 152005 : _q21 = do_valueize (valueize, _q21);
11317 : 152005 : switch (TREE_CODE (_q21))
11318 : : {
11319 : 5547 : case REAL_CST:
11320 : 5547 : {
11321 : 5547 : switch (TREE_CODE (_p1))
11322 : : {
11323 : 1945 : case REAL_CST:
11324 : 1945 : {
11325 : 1945 : {
11326 : 1945 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
11327 : 1945 : if (gimple_simplify_55 (res_op, seq, valueize, type, captures, MINUS_EXPR, MINUS_EXPR))
11328 : 2 : return true;
11329 : : }
11330 : 1943 : break;
11331 : : }
11332 : : default:;
11333 : : }
11334 : : break;
11335 : : }
11336 : : default:;
11337 : : }
11338 : : break;
11339 : : }
11340 : : default:;
11341 : : }
11342 : : }
11343 : : break;
11344 : 11156373 : default:;
11345 : : }
11346 : 11156373 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
11347 : : {
11348 : 47170 : {
11349 : 47170 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11350 : 42301 : if (!FLOAT_TYPE_P (type)
11351 : 47261 : || (!tree_expr_maybe_nan_p (captures[0])
11352 : 138 : && !tree_expr_maybe_infinite_p (captures[0])
11353 : 114 : && (!HONOR_SIGN_DEPENDENT_ROUNDING (type)
11354 : 16 : || !HONOR_SIGNED_ZEROS (type)))
11355 : : )
11356 : : {
11357 : 42308 : gimple_seq *lseq = seq;
11358 : 42308 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2171;
11359 : 42308 : {
11360 : 42308 : tree tem;
11361 : 42308 : tem = build_zero_cst (type);
11362 : 42308 : res_op->set_value (tem);
11363 : 42308 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1080, __FILE__, __LINE__, true);
11364 : 42308 : return true;
11365 : : }
11366 : 0 : next_after_fail2171:;
11367 : : }
11368 : : }
11369 : : }
11370 : 11114065 : switch (TREE_CODE (_p0))
11371 : : {
11372 : 9257610 : case SSA_NAME:
11373 : 9257610 : if (gimple *_d1 = get_def (valueize, _p0))
11374 : : {
11375 : 6989314 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11376 : 7655810 : switch (gimple_assign_rhs_code (_a1))
11377 : : {
11378 : 1177588 : CASE_CONVERT:
11379 : 1177588 : {
11380 : 1177588 : tree _q20 = gimple_assign_rhs1 (_a1);
11381 : 1177588 : _q20 = do_valueize (valueize, _q20);
11382 : 1177588 : switch (TREE_CODE (_p1))
11383 : : {
11384 : 1155575 : case SSA_NAME:
11385 : 1155575 : if (gimple *_d2 = get_def (valueize, _p1))
11386 : : {
11387 : 1126856 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11388 : 1107813 : switch (gimple_assign_rhs_code (_a2))
11389 : : {
11390 : 969978 : CASE_CONVERT:
11391 : 969978 : {
11392 : 969978 : tree _q40 = gimple_assign_rhs1 (_a2);
11393 : 969978 : _q40 = do_valueize (valueize, _q40);
11394 : 969978 : switch (TREE_CODE (_q40))
11395 : : {
11396 : 953011 : case SSA_NAME:
11397 : 953011 : if (gimple *_d3 = get_def (valueize, _q40))
11398 : : {
11399 : 939443 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11400 : 1041265 : switch (gimple_assign_rhs_code (_a3))
11401 : : {
11402 : 169759 : case MULT_EXPR:
11403 : 169759 : {
11404 : 169759 : tree _q50 = gimple_assign_rhs1 (_a3);
11405 : 169759 : _q50 = do_valueize (valueize, _q50);
11406 : 169759 : tree _q51 = gimple_assign_rhs2 (_a3);
11407 : 169759 : _q51 = do_valueize (valueize, _q51);
11408 : 169759 : if (tree_swap_operands_p (_q50, _q51))
11409 : 5043 : std::swap (_q50, _q51);
11410 : 169759 : switch (TREE_CODE (_q50))
11411 : : {
11412 : 169759 : case SSA_NAME:
11413 : 169759 : if (gimple *_d4 = get_def (valueize, _q50))
11414 : : {
11415 : 160472 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11416 : 266974 : switch (gimple_assign_rhs_code (_a4))
11417 : : {
11418 : 0 : case TRUNC_DIV_EXPR:
11419 : 0 : {
11420 : 0 : tree _q60 = gimple_assign_rhs1 (_a4);
11421 : 0 : _q60 = do_valueize (valueize, _q60);
11422 : 0 : tree _q61 = gimple_assign_rhs2 (_a4);
11423 : 0 : _q61 = do_valueize (valueize, _q61);
11424 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
11425 : : {
11426 : 0 : if ((_q51 == _q61 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q61, 0))
11427 : : {
11428 : 0 : {
11429 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q61 };
11430 : 0 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11431 : 0 : return true;
11432 : : }
11433 : : }
11434 : : }
11435 : : break;
11436 : : }
11437 : : default:;
11438 : : }
11439 : : }
11440 : : break;
11441 : 169759 : default:;
11442 : : }
11443 : 169759 : switch (TREE_CODE (_q51))
11444 : : {
11445 : 166205 : case SSA_NAME:
11446 : 166205 : if (gimple *_d4 = get_def (valueize, _q51))
11447 : : {
11448 : 144228 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11449 : 203257 : switch (gimple_assign_rhs_code (_a4))
11450 : : {
11451 : 2 : case TRUNC_DIV_EXPR:
11452 : 2 : {
11453 : 2 : tree _q70 = gimple_assign_rhs1 (_a4);
11454 : 2 : _q70 = do_valueize (valueize, _q70);
11455 : 2 : tree _q71 = gimple_assign_rhs2 (_a4);
11456 : 2 : _q71 = do_valueize (valueize, _q71);
11457 : 2 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q20, 0))
11458 : : {
11459 : 0 : if ((_q71 == _q50 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q50, 0))
11460 : : {
11461 : 0 : {
11462 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q70, _q71, _q20, _q50 };
11463 : 0 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11464 : 0 : return true;
11465 : : }
11466 : : }
11467 : : }
11468 : : break;
11469 : : }
11470 : : default:;
11471 : : }
11472 : : }
11473 : : break;
11474 : : default:;
11475 : : }
11476 : 11114065 : break;
11477 : : }
11478 : : default:;
11479 : : }
11480 : : }
11481 : : break;
11482 : : default:;
11483 : : }
11484 : : break;
11485 : : }
11486 : 11540 : case MULT_EXPR:
11487 : 11540 : {
11488 : 11540 : tree _q40 = gimple_assign_rhs1 (_a2);
11489 : 11540 : _q40 = do_valueize (valueize, _q40);
11490 : 11540 : tree _q41 = gimple_assign_rhs2 (_a2);
11491 : 11540 : _q41 = do_valueize (valueize, _q41);
11492 : 11540 : if (tree_swap_operands_p (_q40, _q41))
11493 : 80 : std::swap (_q40, _q41);
11494 : 11540 : switch (TREE_CODE (_q40))
11495 : : {
11496 : 11540 : case SSA_NAME:
11497 : 11540 : if (gimple *_d3 = get_def (valueize, _q40))
11498 : : {
11499 : 11351 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11500 : 11215 : switch (gimple_assign_rhs_code (_a3))
11501 : : {
11502 : 22 : case TRUNC_DIV_EXPR:
11503 : 22 : {
11504 : 22 : tree _q50 = gimple_assign_rhs1 (_a3);
11505 : 22 : _q50 = do_valueize (valueize, _q50);
11506 : 22 : tree _q51 = gimple_assign_rhs2 (_a3);
11507 : 22 : _q51 = do_valueize (valueize, _q51);
11508 : 22 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
11509 : : {
11510 : 0 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
11511 : : {
11512 : 0 : {
11513 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _q20, _q51 };
11514 : 0 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11515 : 0 : return true;
11516 : : }
11517 : : }
11518 : : }
11519 : : break;
11520 : : }
11521 : : default:;
11522 : : }
11523 : : }
11524 : : break;
11525 : 11540 : default:;
11526 : : }
11527 : 11540 : switch (TREE_CODE (_q41))
11528 : : {
11529 : 2068 : case SSA_NAME:
11530 : 2068 : if (gimple *_d3 = get_def (valueize, _q41))
11531 : : {
11532 : 1969 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11533 : 2146 : switch (gimple_assign_rhs_code (_a3))
11534 : : {
11535 : 8 : case TRUNC_DIV_EXPR:
11536 : 8 : {
11537 : 8 : tree _q60 = gimple_assign_rhs1 (_a3);
11538 : 8 : _q60 = do_valueize (valueize, _q60);
11539 : 8 : tree _q61 = gimple_assign_rhs2 (_a3);
11540 : 8 : _q61 = do_valueize (valueize, _q61);
11541 : 8 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q20, 0))
11542 : : {
11543 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
11544 : : {
11545 : 0 : {
11546 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _q20, _q40 };
11547 : 0 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11548 : 0 : return true;
11549 : : }
11550 : : }
11551 : : }
11552 : : break;
11553 : : }
11554 : : default:;
11555 : : }
11556 : : }
11557 : : break;
11558 : : default:;
11559 : : }
11560 : 11114065 : break;
11561 : : }
11562 : : default:;
11563 : : }
11564 : : }
11565 : : break;
11566 : : default:;
11567 : : }
11568 : : break;
11569 : : }
11570 : : default:;
11571 : : }
11572 : : }
11573 : : break;
11574 : 11114065 : default:;
11575 : : }
11576 : 11114065 : switch (TREE_CODE (_p1))
11577 : : {
11578 : 9609057 : case SSA_NAME:
11579 : 9609057 : if (gimple *_d1 = get_def (valueize, _p1))
11580 : : {
11581 : 7433733 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11582 : 8018000 : switch (gimple_assign_rhs_code (_a1))
11583 : : {
11584 : 1812929 : CASE_CONVERT:
11585 : 1812929 : {
11586 : 1812929 : tree _q30 = gimple_assign_rhs1 (_a1);
11587 : 1812929 : _q30 = do_valueize (valueize, _q30);
11588 : 1812929 : switch (TREE_CODE (_q30))
11589 : : {
11590 : 1725639 : case SSA_NAME:
11591 : 1725639 : if (gimple *_d2 = get_def (valueize, _q30))
11592 : : {
11593 : 1693299 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11594 : 1702209 : switch (gimple_assign_rhs_code (_a2))
11595 : : {
11596 : 193077 : case MULT_EXPR:
11597 : 193077 : {
11598 : 193077 : tree _q40 = gimple_assign_rhs1 (_a2);
11599 : 193077 : _q40 = do_valueize (valueize, _q40);
11600 : 193077 : tree _q41 = gimple_assign_rhs2 (_a2);
11601 : 193077 : _q41 = do_valueize (valueize, _q41);
11602 : 193077 : if (tree_swap_operands_p (_q40, _q41))
11603 : 5067 : std::swap (_q40, _q41);
11604 : 193077 : switch (TREE_CODE (_q40))
11605 : : {
11606 : 193077 : case SSA_NAME:
11607 : 193077 : if (gimple *_d3 = get_def (valueize, _q40))
11608 : : {
11609 : 183713 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11610 : 282806 : switch (gimple_assign_rhs_code (_a3))
11611 : : {
11612 : 0 : case TRUNC_DIV_EXPR:
11613 : 0 : {
11614 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
11615 : 0 : _q50 = do_valueize (valueize, _q50);
11616 : 0 : tree _q51 = gimple_assign_rhs2 (_a3);
11617 : 0 : _q51 = do_valueize (valueize, _q51);
11618 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
11619 : : {
11620 : 0 : if ((_q41 == _q51 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q51, 0))
11621 : : {
11622 : 0 : {
11623 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q51 };
11624 : 0 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11625 : 0 : return true;
11626 : : }
11627 : : }
11628 : : }
11629 : : break;
11630 : : }
11631 : : default:;
11632 : : }
11633 : : }
11634 : : break;
11635 : 193077 : default:;
11636 : : }
11637 : 193077 : switch (TREE_CODE (_q41))
11638 : : {
11639 : 174987 : case SSA_NAME:
11640 : 174987 : if (gimple *_d3 = get_def (valueize, _q41))
11641 : : {
11642 : 152975 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11643 : 205051 : switch (gimple_assign_rhs_code (_a3))
11644 : : {
11645 : 10 : case TRUNC_DIV_EXPR:
11646 : 10 : {
11647 : 10 : tree _q60 = gimple_assign_rhs1 (_a3);
11648 : 10 : _q60 = do_valueize (valueize, _q60);
11649 : 10 : tree _q61 = gimple_assign_rhs2 (_a3);
11650 : 10 : _q61 = do_valueize (valueize, _q61);
11651 : 10 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _p0, 0))
11652 : : {
11653 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || operand_equal_p (_q61, _q40, 0))
11654 : : {
11655 : 0 : {
11656 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q60, _q61, _p0, _q40 };
11657 : 0 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11658 : 0 : return true;
11659 : : }
11660 : : }
11661 : : }
11662 : : break;
11663 : : }
11664 : : default:;
11665 : : }
11666 : : }
11667 : : break;
11668 : : default:;
11669 : : }
11670 : 11112663 : break;
11671 : : }
11672 : : default:;
11673 : : }
11674 : : }
11675 : : break;
11676 : : default:;
11677 : : }
11678 : : break;
11679 : : }
11680 : 1214767 : case MULT_EXPR:
11681 : 1214767 : {
11682 : 1214767 : tree _q30 = gimple_assign_rhs1 (_a1);
11683 : 1214767 : _q30 = do_valueize (valueize, _q30);
11684 : 1214767 : tree _q31 = gimple_assign_rhs2 (_a1);
11685 : 1214767 : _q31 = do_valueize (valueize, _q31);
11686 : 1214767 : if (tree_swap_operands_p (_q30, _q31))
11687 : 24745 : std::swap (_q30, _q31);
11688 : 1214767 : switch (TREE_CODE (_q30))
11689 : : {
11690 : 1214541 : case SSA_NAME:
11691 : 1214541 : if (gimple *_d2 = get_def (valueize, _q30))
11692 : : {
11693 : 1176703 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11694 : 1352290 : switch (gimple_assign_rhs_code (_a2))
11695 : : {
11696 : 6811 : case TRUNC_DIV_EXPR:
11697 : 6811 : {
11698 : 6811 : tree _q40 = gimple_assign_rhs1 (_a2);
11699 : 6811 : _q40 = do_valueize (valueize, _q40);
11700 : 6811 : tree _q41 = gimple_assign_rhs2 (_a2);
11701 : 6811 : _q41 = do_valueize (valueize, _q41);
11702 : 6811 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
11703 : : {
11704 : 1152 : if ((_q31 == _q41 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _q41, 0))
11705 : : {
11706 : 1152 : {
11707 : 1152 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _p0, _q41 };
11708 : 1152 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11709 : 1152 : return true;
11710 : : }
11711 : : }
11712 : : }
11713 : : break;
11714 : : }
11715 : : default:;
11716 : : }
11717 : : }
11718 : : break;
11719 : 1213615 : default:;
11720 : : }
11721 : 1213615 : switch (TREE_CODE (_q31))
11722 : : {
11723 : 394503 : case SSA_NAME:
11724 : 394503 : if (gimple *_d2 = get_def (valueize, _q31))
11725 : : {
11726 : 354791 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11727 : 490436 : switch (gimple_assign_rhs_code (_a2))
11728 : : {
11729 : 9153 : case TRUNC_DIV_EXPR:
11730 : 9153 : {
11731 : 9153 : tree _q50 = gimple_assign_rhs1 (_a2);
11732 : 9153 : _q50 = do_valueize (valueize, _q50);
11733 : 9153 : tree _q51 = gimple_assign_rhs2 (_a2);
11734 : 9153 : _q51 = do_valueize (valueize, _q51);
11735 : 9153 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _p0, 0))
11736 : : {
11737 : 431 : if ((_q51 == _q30 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q30, 0))
11738 : : {
11739 : 250 : {
11740 : 250 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _p0, _q30 };
11741 : 250 : if (gimple_simplify_90 (res_op, seq, valueize, type, captures))
11742 : 250 : return true;
11743 : : }
11744 : : }
11745 : : }
11746 : : break;
11747 : : }
11748 : : default:;
11749 : : }
11750 : : }
11751 : : break;
11752 : : default:;
11753 : : }
11754 : 11112663 : break;
11755 : : }
11756 : : default:;
11757 : : }
11758 : : }
11759 : : break;
11760 : 11112663 : default:;
11761 : : }
11762 : 11112663 : switch (TREE_CODE (_p0))
11763 : : {
11764 : 9256208 : case SSA_NAME:
11765 : 9256208 : if (gimple *_d1 = get_def (valueize, _p0))
11766 : : {
11767 : 6987937 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11768 : 7653893 : switch (gimple_assign_rhs_code (_a1))
11769 : : {
11770 : 826852 : case MULT_EXPR:
11771 : 826852 : {
11772 : 826852 : tree _q20 = gimple_assign_rhs1 (_a1);
11773 : 826852 : _q20 = do_valueize (valueize, _q20);
11774 : 826852 : tree _q21 = gimple_assign_rhs2 (_a1);
11775 : 826852 : _q21 = do_valueize (valueize, _q21);
11776 : 826852 : if (tree_swap_operands_p (_q20, _q21))
11777 : 31226 : std::swap (_q20, _q21);
11778 : 826852 : switch (TREE_CODE (_q21))
11779 : : {
11780 : 199100 : case SSA_NAME:
11781 : 199100 : if (gimple *_d2 = get_def (valueize, _q21))
11782 : : {
11783 : 170314 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11784 : 172532 : switch (gimple_assign_rhs_code (_a2))
11785 : : {
11786 : 8628 : case PLUS_EXPR:
11787 : 8628 : {
11788 : 8628 : tree _q40 = gimple_assign_rhs1 (_a2);
11789 : 8628 : _q40 = do_valueize (valueize, _q40);
11790 : 8628 : tree _q41 = gimple_assign_rhs2 (_a2);
11791 : 8628 : _q41 = do_valueize (valueize, _q41);
11792 : 8628 : if (tree_swap_operands_p (_q40, _q41))
11793 : 546 : std::swap (_q40, _q41);
11794 : 8628 : switch (TREE_CODE (_q40))
11795 : : {
11796 : 8628 : case SSA_NAME:
11797 : 8628 : if (gimple *_d3 = get_def (valueize, _q40))
11798 : : {
11799 : 8133 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11800 : 10510 : switch (gimple_assign_rhs_code (_a3))
11801 : : {
11802 : 0 : case TRUNC_DIV_EXPR:
11803 : 0 : {
11804 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
11805 : 0 : _q50 = do_valueize (valueize, _q50);
11806 : 0 : tree _q51 = gimple_assign_rhs2 (_a3);
11807 : 0 : _q51 = do_valueize (valueize, _q51);
11808 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11809 : : {
11810 : 0 : if (integer_onep (_q41))
11811 : : {
11812 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
11813 : : {
11814 : 0 : {
11815 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q40, _q50 };
11816 : 0 : if (gimple_simplify_91 (res_op, seq, valueize, type, captures))
11817 : 0 : return true;
11818 : : }
11819 : : }
11820 : : }
11821 : : }
11822 : : break;
11823 : : }
11824 : : default:;
11825 : : }
11826 : : }
11827 : : break;
11828 : : default:;
11829 : : }
11830 : 826852 : break;
11831 : : }
11832 : : default:;
11833 : : }
11834 : : }
11835 : : break;
11836 : 826852 : default:;
11837 : : }
11838 : 826852 : switch (TREE_CODE (_q20))
11839 : : {
11840 : 826527 : case SSA_NAME:
11841 : 826527 : if (gimple *_d2 = get_def (valueize, _q20))
11842 : : {
11843 : 795896 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11844 : 850896 : switch (gimple_assign_rhs_code (_a2))
11845 : : {
11846 : 44696 : case PLUS_EXPR:
11847 : 44696 : {
11848 : 44696 : tree _q30 = gimple_assign_rhs1 (_a2);
11849 : 44696 : _q30 = do_valueize (valueize, _q30);
11850 : 44696 : tree _q31 = gimple_assign_rhs2 (_a2);
11851 : 44696 : _q31 = do_valueize (valueize, _q31);
11852 : 44696 : if (tree_swap_operands_p (_q30, _q31))
11853 : 4234 : std::swap (_q30, _q31);
11854 : 44696 : switch (TREE_CODE (_q30))
11855 : : {
11856 : 44696 : case SSA_NAME:
11857 : 44696 : if (gimple *_d3 = get_def (valueize, _q30))
11858 : : {
11859 : 43509 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11860 : 33602 : switch (gimple_assign_rhs_code (_a3))
11861 : : {
11862 : 6 : case TRUNC_DIV_EXPR:
11863 : 6 : {
11864 : 6 : tree _q40 = gimple_assign_rhs1 (_a3);
11865 : 6 : _q40 = do_valueize (valueize, _q40);
11866 : 6 : tree _q41 = gimple_assign_rhs2 (_a3);
11867 : 6 : _q41 = do_valueize (valueize, _q41);
11868 : 6 : if (integer_onep (_q31))
11869 : : {
11870 : 0 : if ((_q21 == _q41 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q41, 0) && types_match (_q21, _q41)))
11871 : : {
11872 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
11873 : : {
11874 : 0 : {
11875 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q20, _q30, _q40 };
11876 : 0 : if (gimple_simplify_91 (res_op, seq, valueize, type, captures))
11877 : 0 : return true;
11878 : : }
11879 : : }
11880 : : }
11881 : : }
11882 : : break;
11883 : : }
11884 : : default:;
11885 : : }
11886 : : }
11887 : : break;
11888 : : default:;
11889 : : }
11890 : 11112560 : break;
11891 : : }
11892 : : default:;
11893 : : }
11894 : : }
11895 : : break;
11896 : : default:;
11897 : : }
11898 : 11112560 : break;
11899 : : }
11900 : 4915 : case LSHIFT_EXPR:
11901 : 4915 : {
11902 : 4915 : tree _q20 = gimple_assign_rhs1 (_a1);
11903 : 4915 : _q20 = do_valueize (valueize, _q20);
11904 : 4915 : tree _q21 = gimple_assign_rhs2 (_a1);
11905 : 4915 : _q21 = do_valueize (valueize, _q21);
11906 : 4915 : switch (TREE_CODE (_p1))
11907 : : {
11908 : 4878 : case SSA_NAME:
11909 : 4878 : if (gimple *_d2 = get_def (valueize, _p1))
11910 : : {
11911 : 4617 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11912 : 4966 : switch (gimple_assign_rhs_code (_a2))
11913 : : {
11914 : 1404 : case LSHIFT_EXPR:
11915 : 1404 : {
11916 : 1404 : tree _q50 = gimple_assign_rhs1 (_a2);
11917 : 1404 : _q50 = do_valueize (valueize, _q50);
11918 : 1404 : tree _q51 = gimple_assign_rhs2 (_a2);
11919 : 1404 : _q51 = do_valueize (valueize, _q51);
11920 : 1404 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11921 : : {
11922 : 1115 : {
11923 : 1115 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
11924 : 1115 : if (gimple_simplify_57 (res_op, seq, valueize, type, captures, MINUS_EXPR))
11925 : 15 : return true;
11926 : : }
11927 : : }
11928 : : break;
11929 : : }
11930 : : default:;
11931 : : }
11932 : : }
11933 : : break;
11934 : : default:;
11935 : : }
11936 : : break;
11937 : : }
11938 : 12174 : case BIT_AND_EXPR:
11939 : 12174 : {
11940 : 12174 : tree _q20 = gimple_assign_rhs1 (_a1);
11941 : 12174 : _q20 = do_valueize (valueize, _q20);
11942 : 12174 : tree _q21 = gimple_assign_rhs2 (_a1);
11943 : 12174 : _q21 = do_valueize (valueize, _q21);
11944 : 12174 : if (tree_swap_operands_p (_q20, _q21))
11945 : 98 : std::swap (_q20, _q21);
11946 : 12174 : switch (TREE_CODE (_q21))
11947 : : {
11948 : 2604 : case SSA_NAME:
11949 : 2604 : if (gimple *_d2 = get_def (valueize, _q21))
11950 : : {
11951 : 2546 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11952 : 2358 : switch (gimple_assign_rhs_code (_a2))
11953 : : {
11954 : 0 : case BIT_NOT_EXPR:
11955 : 0 : {
11956 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
11957 : 0 : _q40 = do_valueize (valueize, _q40);
11958 : 0 : switch (TREE_CODE (_p1))
11959 : : {
11960 : 0 : case SSA_NAME:
11961 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
11962 : : {
11963 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11964 : 0 : switch (gimple_assign_rhs_code (_a3))
11965 : : {
11966 : 0 : case BIT_AND_EXPR:
11967 : 0 : {
11968 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
11969 : 0 : _q60 = do_valueize (valueize, _q60);
11970 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
11971 : 0 : _q61 = do_valueize (valueize, _q61);
11972 : 0 : if (tree_swap_operands_p (_q60, _q61))
11973 : 0 : std::swap (_q60, _q61);
11974 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
11975 : : {
11976 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q40, 0) && types_match (_q61, _q40)))
11977 : : {
11978 : 0 : {
11979 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
11980 : 0 : if (gimple_simplify_92 (res_op, seq, valueize, type, captures))
11981 : 0 : return true;
11982 : : }
11983 : : }
11984 : : }
11985 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
11986 : : {
11987 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
11988 : : {
11989 : 0 : {
11990 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q40, _p1 };
11991 : 0 : if (gimple_simplify_92 (res_op, seq, valueize, type, captures))
11992 : 0 : return true;
11993 : : }
11994 : : }
11995 : : }
11996 : 12174 : break;
11997 : : }
11998 : : default:;
11999 : : }
12000 : : }
12001 : : break;
12002 : : default:;
12003 : : }
12004 : : break;
12005 : : }
12006 : : default:;
12007 : : }
12008 : : }
12009 : : break;
12010 : 12174 : default:;
12011 : : }
12012 : 12174 : switch (TREE_CODE (_q20))
12013 : : {
12014 : 12174 : case SSA_NAME:
12015 : 12174 : if (gimple *_d2 = get_def (valueize, _q20))
12016 : : {
12017 : 12041 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12018 : 12725 : switch (gimple_assign_rhs_code (_a2))
12019 : : {
12020 : 0 : case BIT_NOT_EXPR:
12021 : 0 : {
12022 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12023 : 0 : _q30 = do_valueize (valueize, _q30);
12024 : 0 : switch (TREE_CODE (_p1))
12025 : : {
12026 : 0 : case SSA_NAME:
12027 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
12028 : : {
12029 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12030 : 0 : switch (gimple_assign_rhs_code (_a3))
12031 : : {
12032 : 0 : case BIT_AND_EXPR:
12033 : 0 : {
12034 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
12035 : 0 : _q60 = do_valueize (valueize, _q60);
12036 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
12037 : 0 : _q61 = do_valueize (valueize, _q61);
12038 : 0 : if (tree_swap_operands_p (_q60, _q61))
12039 : 0 : std::swap (_q60, _q61);
12040 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
12041 : : {
12042 : 0 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
12043 : : {
12044 : 0 : {
12045 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
12046 : 0 : if (gimple_simplify_92 (res_op, seq, valueize, type, captures))
12047 : 0 : return true;
12048 : : }
12049 : : }
12050 : : }
12051 : 0 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
12052 : : {
12053 : 0 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
12054 : : {
12055 : 0 : {
12056 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q30, _p1 };
12057 : 0 : if (gimple_simplify_92 (res_op, seq, valueize, type, captures))
12058 : 0 : return true;
12059 : : }
12060 : : }
12061 : : }
12062 : 12174 : break;
12063 : : }
12064 : : default:;
12065 : : }
12066 : : }
12067 : : break;
12068 : : default:;
12069 : : }
12070 : : break;
12071 : : }
12072 : : default:;
12073 : : }
12074 : : }
12075 : : break;
12076 : 12174 : default:;
12077 : : }
12078 : 12174 : switch (TREE_CODE (_q21))
12079 : : {
12080 : 8341 : case INTEGER_CST:
12081 : 8341 : {
12082 : 8341 : switch (TREE_CODE (_p1))
12083 : : {
12084 : 8208 : case SSA_NAME:
12085 : 8208 : if (gimple *_d2 = get_def (valueize, _p1))
12086 : : {
12087 : 7975 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12088 : 7876 : switch (gimple_assign_rhs_code (_a2))
12089 : : {
12090 : 2425 : case BIT_AND_EXPR:
12091 : 2425 : {
12092 : 2425 : tree _q50 = gimple_assign_rhs1 (_a2);
12093 : 2425 : _q50 = do_valueize (valueize, _q50);
12094 : 2425 : tree _q51 = gimple_assign_rhs2 (_a2);
12095 : 2425 : _q51 = do_valueize (valueize, _q51);
12096 : 2425 : if (tree_swap_operands_p (_q50, _q51))
12097 : 0 : std::swap (_q50, _q51);
12098 : 2425 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12099 : : {
12100 : 0 : switch (TREE_CODE (_q51))
12101 : : {
12102 : 0 : case INTEGER_CST:
12103 : 0 : {
12104 : 0 : {
12105 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
12106 : 0 : if (~wi::to_wide (captures[2]) == wi::to_wide (captures[4])
12107 : : )
12108 : : {
12109 : 0 : gimple_seq *lseq = seq;
12110 : 0 : if (lseq
12111 : 0 : && (!single_use (captures[0])
12112 : 0 : || !single_use (captures[3])))
12113 : 0 : lseq = NULL;
12114 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2172;
12115 : 0 : {
12116 : 0 : res_op->set_op (MINUS_EXPR, type, 2);
12117 : 0 : {
12118 : 0 : tree _o1[2], _r1;
12119 : 0 : _o1[0] = captures[1];
12120 : 0 : _o1[1] = captures[4];
12121 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
12122 : 0 : tem_op.resimplify (lseq, valueize);
12123 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
12124 : 0 : if (!_r1) goto next_after_fail2172;
12125 : 0 : res_op->ops[0] = _r1;
12126 : : }
12127 : 0 : res_op->ops[1] = captures[4];
12128 : 0 : res_op->resimplify (lseq, valueize);
12129 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1081, __FILE__, __LINE__, true);
12130 : 0 : return true;
12131 : : }
12132 : 0 : next_after_fail2172:;
12133 : : }
12134 : : }
12135 : 0 : break;
12136 : : }
12137 : : default:;
12138 : : }
12139 : : }
12140 : 12174 : break;
12141 : : }
12142 : : default:;
12143 : : }
12144 : : }
12145 : : break;
12146 : : default:;
12147 : : }
12148 : : break;
12149 : : }
12150 : 12174 : default:;
12151 : : }
12152 : 12174 : switch (TREE_CODE (_p1))
12153 : : {
12154 : 11847 : case SSA_NAME:
12155 : 11847 : if (gimple *_d2 = get_def (valueize, _p1))
12156 : : {
12157 : 11407 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12158 : 11945 : switch (gimple_assign_rhs_code (_a2))
12159 : : {
12160 : 2973 : case BIT_AND_EXPR:
12161 : 2973 : {
12162 : 2973 : tree _q50 = gimple_assign_rhs1 (_a2);
12163 : 2973 : _q50 = do_valueize (valueize, _q50);
12164 : 2973 : tree _q51 = gimple_assign_rhs2 (_a2);
12165 : 2973 : _q51 = do_valueize (valueize, _q51);
12166 : 2973 : if (tree_swap_operands_p (_q50, _q51))
12167 : 14 : std::swap (_q50, _q51);
12168 : 2973 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12169 : : {
12170 : 20 : switch (TREE_CODE (_q51))
12171 : : {
12172 : 20 : case SSA_NAME:
12173 : 20 : if (gimple *_d3 = get_def (valueize, _q51))
12174 : : {
12175 : 20 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12176 : 8 : switch (gimple_assign_rhs_code (_a3))
12177 : : {
12178 : 0 : case BIT_NOT_EXPR:
12179 : 0 : {
12180 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
12181 : 0 : _q70 = do_valueize (valueize, _q70);
12182 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
12183 : : {
12184 : 0 : {
12185 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
12186 : 0 : if (gimple_simplify_93 (res_op, seq, valueize, type, captures))
12187 : 0 : return true;
12188 : : }
12189 : : }
12190 : : break;
12191 : : }
12192 : : default:;
12193 : : }
12194 : : }
12195 : : break;
12196 : : default:;
12197 : : }
12198 : : }
12199 : 2973 : switch (TREE_CODE (_q50))
12200 : : {
12201 : 2973 : case SSA_NAME:
12202 : 2973 : if (gimple *_d3 = get_def (valueize, _q50))
12203 : : {
12204 : 2939 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12205 : 3318 : switch (gimple_assign_rhs_code (_a3))
12206 : : {
12207 : 0 : case BIT_NOT_EXPR:
12208 : 0 : {
12209 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
12210 : 0 : _q60 = do_valueize (valueize, _q60);
12211 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
12212 : : {
12213 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12214 : : {
12215 : 0 : {
12216 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
12217 : 0 : if (gimple_simplify_93 (res_op, seq, valueize, type, captures))
12218 : 0 : return true;
12219 : : }
12220 : : }
12221 : : }
12222 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
12223 : : {
12224 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12225 : : {
12226 : 0 : {
12227 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
12228 : 0 : if (gimple_simplify_93 (res_op, seq, valueize, type, captures))
12229 : 0 : return true;
12230 : : }
12231 : : }
12232 : : }
12233 : : break;
12234 : : }
12235 : : default:;
12236 : : }
12237 : : }
12238 : : break;
12239 : 2973 : default:;
12240 : : }
12241 : 2973 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12242 : : {
12243 : 0 : switch (TREE_CODE (_q51))
12244 : : {
12245 : 0 : case SSA_NAME:
12246 : 0 : if (gimple *_d3 = get_def (valueize, _q51))
12247 : : {
12248 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12249 : 0 : switch (gimple_assign_rhs_code (_a3))
12250 : : {
12251 : 0 : case BIT_NOT_EXPR:
12252 : 0 : {
12253 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
12254 : 0 : _q70 = do_valueize (valueize, _q70);
12255 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
12256 : : {
12257 : 0 : {
12258 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1 };
12259 : 0 : if (gimple_simplify_93 (res_op, seq, valueize, type, captures))
12260 : 0 : return true;
12261 : : }
12262 : : }
12263 : : break;
12264 : : }
12265 : : default:;
12266 : : }
12267 : : }
12268 : : break;
12269 : : default:;
12270 : : }
12271 : : }
12272 : 12170 : break;
12273 : : }
12274 : 2649 : case PLUS_EXPR:
12275 : 2649 : {
12276 : 2649 : tree _q50 = gimple_assign_rhs1 (_a2);
12277 : 2649 : _q50 = do_valueize (valueize, _q50);
12278 : 2649 : tree _q51 = gimple_assign_rhs2 (_a2);
12279 : 2649 : _q51 = do_valueize (valueize, _q51);
12280 : 2649 : if (tree_swap_operands_p (_q50, _q51))
12281 : 728 : std::swap (_q50, _q51);
12282 : 2649 : switch (TREE_CODE (_q50))
12283 : : {
12284 : 2649 : case SSA_NAME:
12285 : 2649 : if (gimple *_d3 = get_def (valueize, _q50))
12286 : : {
12287 : 2642 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12288 : 2589 : switch (gimple_assign_rhs_code (_a3))
12289 : : {
12290 : 11 : case BIT_IOR_EXPR:
12291 : 11 : {
12292 : 11 : tree _q60 = gimple_assign_rhs1 (_a3);
12293 : 11 : _q60 = do_valueize (valueize, _q60);
12294 : 11 : tree _q61 = gimple_assign_rhs2 (_a3);
12295 : 11 : _q61 = do_valueize (valueize, _q61);
12296 : 11 : if (tree_swap_operands_p (_q60, _q61))
12297 : 0 : std::swap (_q60, _q61);
12298 : 11 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
12299 : : {
12300 : 9 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
12301 : : {
12302 : 9 : if (integer_onep (_q51))
12303 : : {
12304 : 9 : {
12305 : 9 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
12306 : 9 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12307 : 4 : return true;
12308 : : }
12309 : : }
12310 : : }
12311 : : }
12312 : 7 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
12313 : : {
12314 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
12315 : : {
12316 : 0 : if (integer_onep (_q51))
12317 : : {
12318 : 0 : {
12319 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
12320 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12321 : 0 : return true;
12322 : : }
12323 : : }
12324 : : }
12325 : : }
12326 : 2645 : break;
12327 : : }
12328 : : default:;
12329 : : }
12330 : : }
12331 : : break;
12332 : 2645 : default:;
12333 : : }
12334 : 2645 : {
12335 : 2645 : tree _q50_pops[1];
12336 : 2645 : if (gimple_nop_convert (_q50, _q50_pops, valueize))
12337 : : {
12338 : 8 : tree _q60 = _q50_pops[0];
12339 : 8 : switch (TREE_CODE (_q60))
12340 : : {
12341 : 8 : case SSA_NAME:
12342 : 8 : if (gimple *_d3 = get_def (valueize, _q60))
12343 : : {
12344 : 6 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12345 : 0 : switch (gimple_assign_rhs_code (_a3))
12346 : : {
12347 : 0 : case BIT_IOR_EXPR:
12348 : 0 : {
12349 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
12350 : 0 : _q70 = do_valueize (valueize, _q70);
12351 : 0 : tree _q71 = gimple_assign_rhs2 (_a3);
12352 : 0 : _q71 = do_valueize (valueize, _q71);
12353 : 0 : if (tree_swap_operands_p (_q70, _q71))
12354 : 0 : std::swap (_q70, _q71);
12355 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
12356 : : {
12357 : 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
12358 : : {
12359 : 0 : if (integer_onep (_q51))
12360 : : {
12361 : 0 : {
12362 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
12363 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12364 : 0 : return true;
12365 : : }
12366 : : }
12367 : : }
12368 : : }
12369 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
12370 : : {
12371 : 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
12372 : : {
12373 : 0 : if (integer_onep (_q51))
12374 : : {
12375 : 0 : {
12376 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
12377 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12378 : 0 : return true;
12379 : : }
12380 : : }
12381 : : }
12382 : : }
12383 : 2645 : break;
12384 : : }
12385 : : default:;
12386 : : }
12387 : : }
12388 : : break;
12389 : : default:;
12390 : : }
12391 : : }
12392 : : }
12393 : 2645 : break;
12394 : : }
12395 : : default:;
12396 : : }
12397 : : }
12398 : : break;
12399 : 12170 : default:;
12400 : : }
12401 : 12170 : {
12402 : 12170 : tree _p1_pops[1];
12403 : 12170 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
12404 : : {
12405 : 3153 : tree _q50 = _p1_pops[0];
12406 : 3153 : switch (TREE_CODE (_q50))
12407 : : {
12408 : 3127 : case SSA_NAME:
12409 : 3127 : if (gimple *_d2 = get_def (valueize, _q50))
12410 : : {
12411 : 3124 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12412 : 3803 : switch (gimple_assign_rhs_code (_a2))
12413 : : {
12414 : 0 : case PLUS_EXPR:
12415 : 0 : {
12416 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
12417 : 0 : _q60 = do_valueize (valueize, _q60);
12418 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
12419 : 0 : _q61 = do_valueize (valueize, _q61);
12420 : 0 : if (tree_swap_operands_p (_q60, _q61))
12421 : 0 : std::swap (_q60, _q61);
12422 : 0 : switch (TREE_CODE (_q60))
12423 : : {
12424 : 0 : case SSA_NAME:
12425 : 0 : if (gimple *_d3 = get_def (valueize, _q60))
12426 : : {
12427 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12428 : 0 : switch (gimple_assign_rhs_code (_a3))
12429 : : {
12430 : 0 : case BIT_IOR_EXPR:
12431 : 0 : {
12432 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
12433 : 0 : _q70 = do_valueize (valueize, _q70);
12434 : 0 : tree _q71 = gimple_assign_rhs2 (_a3);
12435 : 0 : _q71 = do_valueize (valueize, _q71);
12436 : 0 : if (tree_swap_operands_p (_q70, _q71))
12437 : 0 : std::swap (_q70, _q71);
12438 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
12439 : : {
12440 : 0 : if ((_q71 == _q21 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q21, 0) && types_match (_q71, _q21)))
12441 : : {
12442 : 0 : if (integer_onep (_q61))
12443 : : {
12444 : 0 : {
12445 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
12446 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12447 : 0 : return true;
12448 : : }
12449 : : }
12450 : : }
12451 : : }
12452 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
12453 : : {
12454 : 0 : if ((_q71 == _q20 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q20, 0) && types_match (_q71, _q20)))
12455 : : {
12456 : 0 : if (integer_onep (_q61))
12457 : : {
12458 : 0 : {
12459 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
12460 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12461 : 0 : return true;
12462 : : }
12463 : : }
12464 : : }
12465 : : }
12466 : 0 : break;
12467 : : }
12468 : : default:;
12469 : : }
12470 : : }
12471 : : break;
12472 : 0 : default:;
12473 : : }
12474 : 0 : {
12475 : 0 : tree _q60_pops[1];
12476 : 0 : if (gimple_nop_convert (_q60, _q60_pops, valueize))
12477 : : {
12478 : 0 : tree _q70 = _q60_pops[0];
12479 : 0 : switch (TREE_CODE (_q70))
12480 : : {
12481 : 0 : case SSA_NAME:
12482 : 0 : if (gimple *_d3 = get_def (valueize, _q70))
12483 : : {
12484 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12485 : 0 : switch (gimple_assign_rhs_code (_a3))
12486 : : {
12487 : 0 : case BIT_IOR_EXPR:
12488 : 0 : {
12489 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
12490 : 0 : _q80 = do_valueize (valueize, _q80);
12491 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
12492 : 0 : _q81 = do_valueize (valueize, _q81);
12493 : 0 : if (tree_swap_operands_p (_q80, _q81))
12494 : 0 : std::swap (_q80, _q81);
12495 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
12496 : : {
12497 : 0 : if ((_q81 == _q21 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q21, 0) && types_match (_q81, _q21)))
12498 : : {
12499 : 0 : if (integer_onep (_q61))
12500 : : {
12501 : 0 : {
12502 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
12503 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12504 : 0 : return true;
12505 : : }
12506 : : }
12507 : : }
12508 : : }
12509 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
12510 : : {
12511 : 0 : if ((_q81 == _q20 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q20, 0) && types_match (_q81, _q20)))
12512 : : {
12513 : 0 : if (integer_onep (_q61))
12514 : : {
12515 : 0 : {
12516 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
12517 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
12518 : 0 : return true;
12519 : : }
12520 : : }
12521 : : }
12522 : : }
12523 : 0 : break;
12524 : : }
12525 : : default:;
12526 : : }
12527 : : }
12528 : : break;
12529 : : default:;
12530 : : }
12531 : : }
12532 : : }
12533 : 0 : break;
12534 : : }
12535 : : default:;
12536 : : }
12537 : : }
12538 : : break;
12539 : : default:;
12540 : : }
12541 : : }
12542 : : }
12543 : 12170 : break;
12544 : : }
12545 : 16457 : case BIT_NOT_EXPR:
12546 : 16457 : {
12547 : 16457 : tree _q20 = gimple_assign_rhs1 (_a1);
12548 : 16457 : _q20 = do_valueize (valueize, _q20);
12549 : 16457 : switch (TREE_CODE (_p1))
12550 : : {
12551 : 16427 : case SSA_NAME:
12552 : 16427 : if (gimple *_d2 = get_def (valueize, _p1))
12553 : : {
12554 : 14278 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12555 : 23490 : switch (gimple_assign_rhs_code (_a2))
12556 : : {
12557 : 4 : case BIT_NOT_EXPR:
12558 : 4 : {
12559 : 4 : tree _q40 = gimple_assign_rhs1 (_a2);
12560 : 4 : _q40 = do_valueize (valueize, _q40);
12561 : 4 : {
12562 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
12563 : 4 : if (!TYPE_OVERFLOW_SANITIZED (type)
12564 : : )
12565 : : {
12566 : 4 : {
12567 : 4 : tree utype = unsigned_type_for (type);
12568 : 4 : gimple_seq *lseq = seq;
12569 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2173;
12570 : 4 : {
12571 : 4 : res_op->set_op (NOP_EXPR, type, 1);
12572 : 4 : {
12573 : 4 : tree _o1[2], _r1;
12574 : 4 : {
12575 : 4 : tree _o2[1], _r2;
12576 : 4 : _o2[0] = captures[1];
12577 : 4 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
12578 : 4 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
12579 : : {
12580 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
12581 : 4 : tem_op.resimplify (lseq, valueize);
12582 : 4 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
12583 : 4 : if (!_r2) goto next_after_fail2173;
12584 : : }
12585 : : else
12586 : : _r2 = _o2[0];
12587 : 0 : _o1[0] = _r2;
12588 : : }
12589 : 0 : {
12590 : 0 : tree _o2[1], _r2;
12591 : 0 : _o2[0] = captures[0];
12592 : 0 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
12593 : 0 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
12594 : : {
12595 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
12596 : 0 : tem_op.resimplify (lseq, valueize);
12597 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
12598 : 0 : if (!_r2) goto next_after_fail2173;
12599 : : }
12600 : : else
12601 : : _r2 = _o2[0];
12602 : 0 : _o1[1] = _r2;
12603 : : }
12604 : 0 : (*res_op).set_op (MINUS_EXPR, TREE_TYPE (_o1[0]), 2);
12605 : 0 : (*res_op).ops[0] = _o1[0];
12606 : 0 : (*res_op).ops[1] = _o1[1];
12607 : 0 : (*res_op).resimplify (lseq, valueize);
12608 : : }
12609 : 0 : if (type != res_op->type
12610 : 0 : && !useless_type_conversion_p (type, res_op->type))
12611 : : {
12612 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2173;
12613 : 0 : res_op->set_op (NOP_EXPR, type, 1);
12614 : 0 : res_op->resimplify (lseq, valueize);
12615 : : }
12616 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1082, __FILE__, __LINE__, true);
12617 : 0 : return true;
12618 : : }
12619 : 4 : next_after_fail2173:;
12620 : : }
12621 : : }
12622 : : }
12623 : 4 : break;
12624 : : }
12625 : : default:;
12626 : : }
12627 : : }
12628 : : break;
12629 : : default:;
12630 : : }
12631 : : break;
12632 : : }
12633 : 1430141 : case PLUS_EXPR:
12634 : 1430141 : {
12635 : 1430141 : tree _q20 = gimple_assign_rhs1 (_a1);
12636 : 1430141 : _q20 = do_valueize (valueize, _q20);
12637 : 1430141 : tree _q21 = gimple_assign_rhs2 (_a1);
12638 : 1430141 : _q21 = do_valueize (valueize, _q21);
12639 : 1430141 : if (tree_swap_operands_p (_q20, _q21))
12640 : 124466 : std::swap (_q20, _q21);
12641 : 1430141 : switch (TREE_CODE (_p1))
12642 : : {
12643 : 1388167 : case SSA_NAME:
12644 : 1388167 : if (gimple *_d2 = get_def (valueize, _p1))
12645 : : {
12646 : 1330728 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12647 : 1519192 : switch (gimple_assign_rhs_code (_a2))
12648 : : {
12649 : 112 : case BIT_IOR_EXPR:
12650 : 112 : {
12651 : 112 : tree _q50 = gimple_assign_rhs1 (_a2);
12652 : 112 : _q50 = do_valueize (valueize, _q50);
12653 : 112 : tree _q51 = gimple_assign_rhs2 (_a2);
12654 : 112 : _q51 = do_valueize (valueize, _q51);
12655 : 112 : if (tree_swap_operands_p (_q50, _q51))
12656 : 2 : std::swap (_q50, _q51);
12657 : 112 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12658 : : {
12659 : 8 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12660 : : {
12661 : 8 : {
12662 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12663 : 8 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
12664 : 16 : && !TYPE_SATURATING (type)
12665 : : )
12666 : : {
12667 : 8 : gimple_seq *lseq = seq;
12668 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2174;
12669 : 8 : {
12670 : 8 : res_op->set_op (BIT_AND_EXPR, type, 2);
12671 : 8 : res_op->ops[0] = captures[0];
12672 : 8 : res_op->ops[1] = captures[1];
12673 : 8 : res_op->resimplify (lseq, valueize);
12674 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1083, __FILE__, __LINE__, true);
12675 : 8 : return true;
12676 : : }
12677 : 0 : next_after_fail2174:;
12678 : : }
12679 : : }
12680 : : }
12681 : : }
12682 : 1430125 : break;
12683 : : }
12684 : 10195 : case BIT_AND_EXPR:
12685 : 10195 : {
12686 : 10195 : tree _q50 = gimple_assign_rhs1 (_a2);
12687 : 10195 : _q50 = do_valueize (valueize, _q50);
12688 : 10195 : tree _q51 = gimple_assign_rhs2 (_a2);
12689 : 10195 : _q51 = do_valueize (valueize, _q51);
12690 : 10195 : if (tree_swap_operands_p (_q50, _q51))
12691 : 33 : std::swap (_q50, _q51);
12692 : 10195 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12693 : : {
12694 : 416 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12695 : : {
12696 : 8 : {
12697 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12698 : 8 : if (!TYPE_OVERFLOW_SANITIZED (type) && !TYPE_OVERFLOW_TRAPS (type)
12699 : 16 : && !TYPE_SATURATING (type)
12700 : : )
12701 : : {
12702 : 8 : gimple_seq *lseq = seq;
12703 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2175;
12704 : 8 : {
12705 : 8 : res_op->set_op (BIT_IOR_EXPR, type, 2);
12706 : 8 : res_op->ops[0] = captures[0];
12707 : 8 : res_op->ops[1] = captures[1];
12708 : 8 : res_op->resimplify (lseq, valueize);
12709 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1084, __FILE__, __LINE__, true);
12710 : 8 : return true;
12711 : : }
12712 : 0 : next_after_fail2175:;
12713 : : }
12714 : : }
12715 : : }
12716 : : }
12717 : 1430125 : break;
12718 : : }
12719 : : default:;
12720 : : }
12721 : : }
12722 : : break;
12723 : 1430125 : default:;
12724 : : }
12725 : 1430125 : switch (TREE_CODE (_q20))
12726 : : {
12727 : 1430125 : case SSA_NAME:
12728 : 1430125 : if (gimple *_d2 = get_def (valueize, _q20))
12729 : : {
12730 : 1374800 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12731 : 1574553 : switch (gimple_assign_rhs_code (_a2))
12732 : : {
12733 : 7944 : case BIT_AND_EXPR:
12734 : 7944 : {
12735 : 7944 : tree _q30 = gimple_assign_rhs1 (_a2);
12736 : 7944 : _q30 = do_valueize (valueize, _q30);
12737 : 7944 : tree _q31 = gimple_assign_rhs2 (_a2);
12738 : 7944 : _q31 = do_valueize (valueize, _q31);
12739 : 7944 : if (tree_swap_operands_p (_q30, _q31))
12740 : 40 : std::swap (_q30, _q31);
12741 : 7944 : if (integer_all_onesp (_q21))
12742 : : {
12743 : 57 : switch (TREE_CODE (_p1))
12744 : : {
12745 : 57 : case SSA_NAME:
12746 : 57 : if (gimple *_d3 = get_def (valueize, _p1))
12747 : : {
12748 : 51 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12749 : 3 : switch (gimple_assign_rhs_code (_a3))
12750 : : {
12751 : 3 : case BIT_IOR_EXPR:
12752 : 3 : {
12753 : 3 : tree _q70 = gimple_assign_rhs1 (_a3);
12754 : 3 : _q70 = do_valueize (valueize, _q70);
12755 : 3 : tree _q71 = gimple_assign_rhs2 (_a3);
12756 : 3 : _q71 = do_valueize (valueize, _q71);
12757 : 3 : if (tree_swap_operands_p (_q70, _q71))
12758 : 0 : std::swap (_q70, _q71);
12759 : 3 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
12760 : : {
12761 : 3 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
12762 : : {
12763 : 3 : {
12764 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
12765 : 3 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12766 : 1 : return true;
12767 : : }
12768 : : }
12769 : : }
12770 : 2 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
12771 : : {
12772 : 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
12773 : : {
12774 : 0 : {
12775 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
12776 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12777 : 0 : return true;
12778 : : }
12779 : : }
12780 : : }
12781 : 56 : break;
12782 : : }
12783 : : default:;
12784 : : }
12785 : : }
12786 : : break;
12787 : 56 : default:;
12788 : : }
12789 : 56 : {
12790 : 56 : tree _p1_pops[1];
12791 : 56 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
12792 : : {
12793 : 0 : tree _q70 = _p1_pops[0];
12794 : 0 : switch (TREE_CODE (_q70))
12795 : : {
12796 : 0 : case SSA_NAME:
12797 : 0 : if (gimple *_d3 = get_def (valueize, _q70))
12798 : : {
12799 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12800 : 0 : switch (gimple_assign_rhs_code (_a3))
12801 : : {
12802 : 0 : case BIT_IOR_EXPR:
12803 : 0 : {
12804 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
12805 : 0 : _q80 = do_valueize (valueize, _q80);
12806 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
12807 : 0 : _q81 = do_valueize (valueize, _q81);
12808 : 0 : if (tree_swap_operands_p (_q80, _q81))
12809 : 0 : std::swap (_q80, _q81);
12810 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
12811 : : {
12812 : 0 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
12813 : : {
12814 : 0 : {
12815 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
12816 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12817 : 0 : return true;
12818 : : }
12819 : : }
12820 : : }
12821 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
12822 : : {
12823 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
12824 : : {
12825 : 0 : {
12826 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q31, _q30 };
12827 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12828 : 0 : return true;
12829 : : }
12830 : : }
12831 : : }
12832 : 56 : break;
12833 : : }
12834 : : default:;
12835 : : }
12836 : : }
12837 : : break;
12838 : : default:;
12839 : : }
12840 : : }
12841 : : }
12842 : : }
12843 : 1430124 : break;
12844 : : }
12845 : : default:;
12846 : : }
12847 : : }
12848 : : break;
12849 : 1430124 : default:;
12850 : : }
12851 : 1430124 : {
12852 : 1430124 : tree _q20_pops[1];
12853 : 1430124 : if (gimple_nop_convert (_q20, _q20_pops, valueize))
12854 : : {
12855 : 158997 : tree _q30 = _q20_pops[0];
12856 : 158997 : switch (TREE_CODE (_q30))
12857 : : {
12858 : 138449 : case SSA_NAME:
12859 : 138449 : if (gimple *_d2 = get_def (valueize, _q30))
12860 : : {
12861 : 129492 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12862 : 125897 : switch (gimple_assign_rhs_code (_a2))
12863 : : {
12864 : 13 : case BIT_AND_EXPR:
12865 : 13 : {
12866 : 13 : tree _q40 = gimple_assign_rhs1 (_a2);
12867 : 13 : _q40 = do_valueize (valueize, _q40);
12868 : 13 : tree _q41 = gimple_assign_rhs2 (_a2);
12869 : 13 : _q41 = do_valueize (valueize, _q41);
12870 : 13 : if (tree_swap_operands_p (_q40, _q41))
12871 : 0 : std::swap (_q40, _q41);
12872 : 13 : if (integer_all_onesp (_q21))
12873 : : {
12874 : 7 : switch (TREE_CODE (_p1))
12875 : : {
12876 : 7 : case SSA_NAME:
12877 : 7 : if (gimple *_d3 = get_def (valueize, _p1))
12878 : : {
12879 : 7 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12880 : 7 : switch (gimple_assign_rhs_code (_a3))
12881 : : {
12882 : 0 : case BIT_IOR_EXPR:
12883 : 0 : {
12884 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
12885 : 0 : _q80 = do_valueize (valueize, _q80);
12886 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
12887 : 0 : _q81 = do_valueize (valueize, _q81);
12888 : 0 : if (tree_swap_operands_p (_q80, _q81))
12889 : 0 : std::swap (_q80, _q81);
12890 : 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
12891 : : {
12892 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
12893 : : {
12894 : 0 : {
12895 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
12896 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12897 : 0 : return true;
12898 : : }
12899 : : }
12900 : : }
12901 : 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
12902 : : {
12903 : 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
12904 : : {
12905 : 0 : {
12906 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
12907 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12908 : 0 : return true;
12909 : : }
12910 : : }
12911 : : }
12912 : 7 : break;
12913 : : }
12914 : : default:;
12915 : : }
12916 : : }
12917 : : break;
12918 : 7 : default:;
12919 : : }
12920 : 7 : {
12921 : 7 : tree _p1_pops[1];
12922 : 7 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
12923 : : {
12924 : 7 : tree _q80 = _p1_pops[0];
12925 : 7 : switch (TREE_CODE (_q80))
12926 : : {
12927 : 7 : case SSA_NAME:
12928 : 7 : if (gimple *_d3 = get_def (valueize, _q80))
12929 : : {
12930 : 7 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12931 : 7 : switch (gimple_assign_rhs_code (_a3))
12932 : : {
12933 : 7 : case BIT_IOR_EXPR:
12934 : 7 : {
12935 : 7 : tree _q90 = gimple_assign_rhs1 (_a3);
12936 : 7 : _q90 = do_valueize (valueize, _q90);
12937 : 7 : tree _q91 = gimple_assign_rhs2 (_a3);
12938 : 7 : _q91 = do_valueize (valueize, _q91);
12939 : 7 : if (tree_swap_operands_p (_q90, _q91))
12940 : 0 : std::swap (_q90, _q91);
12941 : 7 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
12942 : : {
12943 : 5 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
12944 : : {
12945 : 5 : {
12946 : 5 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
12947 : 5 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12948 : 3 : return true;
12949 : : }
12950 : : }
12951 : : }
12952 : 4 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
12953 : : {
12954 : 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
12955 : : {
12956 : 0 : {
12957 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q40 };
12958 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
12959 : 0 : return true;
12960 : : }
12961 : : }
12962 : : }
12963 : 4 : break;
12964 : : }
12965 : : default:;
12966 : : }
12967 : : }
12968 : : break;
12969 : : default:;
12970 : : }
12971 : : }
12972 : : }
12973 : : }
12974 : 1430121 : break;
12975 : : }
12976 : : default:;
12977 : : }
12978 : : }
12979 : : break;
12980 : : default:;
12981 : : }
12982 : : }
12983 : : }
12984 : 1430121 : break;
12985 : : }
12986 : 1194 : case BIT_IOR_EXPR:
12987 : 1194 : {
12988 : 1194 : tree _q20 = gimple_assign_rhs1 (_a1);
12989 : 1194 : _q20 = do_valueize (valueize, _q20);
12990 : 1194 : tree _q21 = gimple_assign_rhs2 (_a1);
12991 : 1194 : _q21 = do_valueize (valueize, _q21);
12992 : 1194 : if (tree_swap_operands_p (_q20, _q21))
12993 : 95 : std::swap (_q20, _q21);
12994 : 1194 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
12995 : : {
12996 : 48 : {
12997 : 48 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
12998 : 48 : if (gimple_simplify_96 (res_op, seq, valueize, type, captures))
12999 : 48 : return true;
13000 : : }
13001 : : }
13002 : 1146 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
13003 : : {
13004 : 0 : {
13005 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
13006 : 0 : if (gimple_simplify_96 (res_op, seq, valueize, type, captures))
13007 : 0 : return true;
13008 : : }
13009 : : }
13010 : 1146 : switch (TREE_CODE (_p1))
13011 : : {
13012 : 1146 : case SSA_NAME:
13013 : 1146 : if (gimple *_d2 = get_def (valueize, _p1))
13014 : : {
13015 : 1068 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13016 : 991 : switch (gimple_assign_rhs_code (_a2))
13017 : : {
13018 : 12 : case BIT_XOR_EXPR:
13019 : 12 : {
13020 : 12 : tree _q50 = gimple_assign_rhs1 (_a2);
13021 : 12 : _q50 = do_valueize (valueize, _q50);
13022 : 12 : tree _q51 = gimple_assign_rhs2 (_a2);
13023 : 12 : _q51 = do_valueize (valueize, _q51);
13024 : 12 : if (tree_swap_operands_p (_q50, _q51))
13025 : 2 : std::swap (_q50, _q51);
13026 : 12 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
13027 : : {
13028 : 8 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
13029 : : {
13030 : 8 : {
13031 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13032 : 8 : gimple_seq *lseq = seq;
13033 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2176;
13034 : 8 : {
13035 : 8 : res_op->set_op (BIT_AND_EXPR, type, 2);
13036 : 8 : res_op->ops[0] = captures[0];
13037 : 8 : res_op->ops[1] = captures[1];
13038 : 8 : res_op->resimplify (lseq, valueize);
13039 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1085, __FILE__, __LINE__, true);
13040 : 8 : return true;
13041 : : }
13042 : 0 : next_after_fail2176:;
13043 : : }
13044 : : }
13045 : : }
13046 : 11112560 : break;
13047 : : }
13048 : 20 : case BIT_AND_EXPR:
13049 : 20 : {
13050 : 20 : tree _q50 = gimple_assign_rhs1 (_a2);
13051 : 20 : _q50 = do_valueize (valueize, _q50);
13052 : 20 : tree _q51 = gimple_assign_rhs2 (_a2);
13053 : 20 : _q51 = do_valueize (valueize, _q51);
13054 : 20 : if (tree_swap_operands_p (_q50, _q51))
13055 : 2 : std::swap (_q50, _q51);
13056 : 20 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
13057 : : {
13058 : 8 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
13059 : : {
13060 : 8 : {
13061 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13062 : 8 : gimple_seq *lseq = seq;
13063 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2177;
13064 : 8 : {
13065 : 8 : res_op->set_op (BIT_XOR_EXPR, type, 2);
13066 : 8 : res_op->ops[0] = captures[0];
13067 : 8 : res_op->ops[1] = captures[1];
13068 : 8 : res_op->resimplify (lseq, valueize);
13069 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1086, __FILE__, __LINE__, true);
13070 : 8 : return true;
13071 : : }
13072 : 0 : next_after_fail2177:;
13073 : : }
13074 : : }
13075 : : }
13076 : 11112560 : break;
13077 : : }
13078 : : default:;
13079 : : }
13080 : : }
13081 : : break;
13082 : : default:;
13083 : : }
13084 : 11112560 : break;
13085 : : }
13086 : : default:;
13087 : : }
13088 : : }
13089 : : break;
13090 : 11112560 : default:;
13091 : : }
13092 : 11112560 : {
13093 : 11112560 : tree _p0_pops[1];
13094 : 11112560 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
13095 : : {
13096 : 999708 : tree _q20 = _p0_pops[0];
13097 : 999708 : switch (TREE_CODE (_q20))
13098 : : {
13099 : 995467 : case SSA_NAME:
13100 : 995467 : if (gimple *_d1 = get_def (valueize, _q20))
13101 : : {
13102 : 971821 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13103 : 1192643 : switch (gimple_assign_rhs_code (_a1))
13104 : : {
13105 : 488831 : case PLUS_EXPR:
13106 : 488831 : {
13107 : 488831 : tree _q30 = gimple_assign_rhs1 (_a1);
13108 : 488831 : _q30 = do_valueize (valueize, _q30);
13109 : 488831 : tree _q31 = gimple_assign_rhs2 (_a1);
13110 : 488831 : _q31 = do_valueize (valueize, _q31);
13111 : 488831 : if (tree_swap_operands_p (_q30, _q31))
13112 : 70816 : std::swap (_q30, _q31);
13113 : 488831 : switch (TREE_CODE (_q30))
13114 : : {
13115 : 488831 : case SSA_NAME:
13116 : 488831 : if (gimple *_d2 = get_def (valueize, _q30))
13117 : : {
13118 : 475909 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13119 : 458166 : switch (gimple_assign_rhs_code (_a2))
13120 : : {
13121 : 4478 : case BIT_AND_EXPR:
13122 : 4478 : {
13123 : 4478 : tree _q40 = gimple_assign_rhs1 (_a2);
13124 : 4478 : _q40 = do_valueize (valueize, _q40);
13125 : 4478 : tree _q41 = gimple_assign_rhs2 (_a2);
13126 : 4478 : _q41 = do_valueize (valueize, _q41);
13127 : 4478 : if (tree_swap_operands_p (_q40, _q41))
13128 : 0 : std::swap (_q40, _q41);
13129 : 4478 : if (integer_all_onesp (_q31))
13130 : : {
13131 : 2 : switch (TREE_CODE (_p1))
13132 : : {
13133 : 2 : case SSA_NAME:
13134 : 2 : if (gimple *_d3 = get_def (valueize, _p1))
13135 : : {
13136 : 2 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13137 : 2 : switch (gimple_assign_rhs_code (_a3))
13138 : : {
13139 : 0 : case BIT_IOR_EXPR:
13140 : 0 : {
13141 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
13142 : 0 : _q80 = do_valueize (valueize, _q80);
13143 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
13144 : 0 : _q81 = do_valueize (valueize, _q81);
13145 : 0 : if (tree_swap_operands_p (_q80, _q81))
13146 : 0 : std::swap (_q80, _q81);
13147 : 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
13148 : : {
13149 : 0 : if ((_q81 == _q41 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q41, 0) && types_match (_q81, _q41)))
13150 : : {
13151 : 0 : {
13152 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
13153 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13154 : 0 : return true;
13155 : : }
13156 : : }
13157 : : }
13158 : 0 : if ((_q80 == _q41 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q41, 0) && types_match (_q80, _q41)))
13159 : : {
13160 : 0 : if ((_q81 == _q40 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q40, 0) && types_match (_q81, _q40)))
13161 : : {
13162 : 0 : {
13163 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
13164 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13165 : 0 : return true;
13166 : : }
13167 : : }
13168 : : }
13169 : 2 : break;
13170 : : }
13171 : : default:;
13172 : : }
13173 : : }
13174 : : break;
13175 : 2 : default:;
13176 : : }
13177 : 2 : {
13178 : 2 : tree _p1_pops[1];
13179 : 2 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
13180 : : {
13181 : 2 : tree _q80 = _p1_pops[0];
13182 : 2 : switch (TREE_CODE (_q80))
13183 : : {
13184 : 2 : case SSA_NAME:
13185 : 2 : if (gimple *_d3 = get_def (valueize, _q80))
13186 : : {
13187 : 2 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13188 : 2 : switch (gimple_assign_rhs_code (_a3))
13189 : : {
13190 : 2 : case BIT_IOR_EXPR:
13191 : 2 : {
13192 : 2 : tree _q90 = gimple_assign_rhs1 (_a3);
13193 : 2 : _q90 = do_valueize (valueize, _q90);
13194 : 2 : tree _q91 = gimple_assign_rhs2 (_a3);
13195 : 2 : _q91 = do_valueize (valueize, _q91);
13196 : 2 : if (tree_swap_operands_p (_q90, _q91))
13197 : 0 : std::swap (_q90, _q91);
13198 : 2 : if ((_q90 == _q40 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q40, 0) && types_match (_q90, _q40)))
13199 : : {
13200 : 2 : if ((_q91 == _q41 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q41, 0) && types_match (_q91, _q41)))
13201 : : {
13202 : 2 : {
13203 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q40, _q41 };
13204 : 2 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13205 : 1 : return true;
13206 : : }
13207 : : }
13208 : : }
13209 : 1 : if ((_q90 == _q41 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q41, 0) && types_match (_q90, _q41)))
13210 : : {
13211 : 0 : if ((_q91 == _q40 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q40, 0) && types_match (_q91, _q40)))
13212 : : {
13213 : 0 : {
13214 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q41, _q40 };
13215 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13216 : 0 : return true;
13217 : : }
13218 : : }
13219 : : }
13220 : 1 : break;
13221 : : }
13222 : : default:;
13223 : : }
13224 : : }
13225 : : break;
13226 : : default:;
13227 : : }
13228 : : }
13229 : : }
13230 : : }
13231 : 488830 : break;
13232 : : }
13233 : : default:;
13234 : : }
13235 : : }
13236 : : break;
13237 : 488830 : default:;
13238 : : }
13239 : 488830 : {
13240 : 488830 : tree _q30_pops[1];
13241 : 488830 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
13242 : : {
13243 : 55230 : tree _q40 = _q30_pops[0];
13244 : 55230 : switch (TREE_CODE (_q40))
13245 : : {
13246 : 55217 : case SSA_NAME:
13247 : 55217 : if (gimple *_d2 = get_def (valueize, _q40))
13248 : : {
13249 : 52221 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13250 : 40525 : switch (gimple_assign_rhs_code (_a2))
13251 : : {
13252 : 0 : case BIT_AND_EXPR:
13253 : 0 : {
13254 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
13255 : 0 : _q50 = do_valueize (valueize, _q50);
13256 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
13257 : 0 : _q51 = do_valueize (valueize, _q51);
13258 : 0 : if (tree_swap_operands_p (_q50, _q51))
13259 : 0 : std::swap (_q50, _q51);
13260 : 0 : if (integer_all_onesp (_q31))
13261 : : {
13262 : 0 : switch (TREE_CODE (_p1))
13263 : : {
13264 : 0 : case SSA_NAME:
13265 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
13266 : : {
13267 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13268 : 0 : switch (gimple_assign_rhs_code (_a3))
13269 : : {
13270 : 0 : case BIT_IOR_EXPR:
13271 : 0 : {
13272 : 0 : tree _q90 = gimple_assign_rhs1 (_a3);
13273 : 0 : _q90 = do_valueize (valueize, _q90);
13274 : 0 : tree _q91 = gimple_assign_rhs2 (_a3);
13275 : 0 : _q91 = do_valueize (valueize, _q91);
13276 : 0 : if (tree_swap_operands_p (_q90, _q91))
13277 : 0 : std::swap (_q90, _q91);
13278 : 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
13279 : : {
13280 : 0 : if ((_q91 == _q51 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q51, 0) && types_match (_q91, _q51)))
13281 : : {
13282 : 0 : {
13283 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
13284 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13285 : 0 : return true;
13286 : : }
13287 : : }
13288 : : }
13289 : 0 : if ((_q90 == _q51 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q51, 0) && types_match (_q90, _q51)))
13290 : : {
13291 : 0 : if ((_q91 == _q50 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q50, 0) && types_match (_q91, _q50)))
13292 : : {
13293 : 0 : {
13294 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
13295 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13296 : 0 : return true;
13297 : : }
13298 : : }
13299 : : }
13300 : 0 : break;
13301 : : }
13302 : : default:;
13303 : : }
13304 : : }
13305 : : break;
13306 : 0 : default:;
13307 : : }
13308 : 0 : {
13309 : 0 : tree _p1_pops[1];
13310 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
13311 : : {
13312 : 0 : tree _q90 = _p1_pops[0];
13313 : 0 : switch (TREE_CODE (_q90))
13314 : : {
13315 : 0 : case SSA_NAME:
13316 : 0 : if (gimple *_d3 = get_def (valueize, _q90))
13317 : : {
13318 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13319 : 0 : switch (gimple_assign_rhs_code (_a3))
13320 : : {
13321 : 0 : case BIT_IOR_EXPR:
13322 : 0 : {
13323 : 0 : tree _q100 = gimple_assign_rhs1 (_a3);
13324 : 0 : _q100 = do_valueize (valueize, _q100);
13325 : 0 : tree _q101 = gimple_assign_rhs2 (_a3);
13326 : 0 : _q101 = do_valueize (valueize, _q101);
13327 : 0 : if (tree_swap_operands_p (_q100, _q101))
13328 : 0 : std::swap (_q100, _q101);
13329 : 0 : if ((_q100 == _q50 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q50, 0) && types_match (_q100, _q50)))
13330 : : {
13331 : 0 : if ((_q101 == _q51 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q51, 0) && types_match (_q101, _q51)))
13332 : : {
13333 : 0 : {
13334 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
13335 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13336 : 0 : return true;
13337 : : }
13338 : : }
13339 : : }
13340 : 0 : if ((_q100 == _q51 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q51, 0) && types_match (_q100, _q51)))
13341 : : {
13342 : 0 : if ((_q101 == _q50 && ! TREE_SIDE_EFFECTS (_q101)) || (operand_equal_p (_q101, _q50, 0) && types_match (_q101, _q50)))
13343 : : {
13344 : 0 : {
13345 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q51, _q50 };
13346 : 0 : if (gimple_simplify_95 (res_op, seq, valueize, type, captures))
13347 : 0 : return true;
13348 : : }
13349 : : }
13350 : : }
13351 : 0 : break;
13352 : : }
13353 : : default:;
13354 : : }
13355 : : }
13356 : : break;
13357 : : default:;
13358 : : }
13359 : : }
13360 : : }
13361 : : }
13362 : 488830 : break;
13363 : : }
13364 : : default:;
13365 : : }
13366 : : }
13367 : : break;
13368 : : default:;
13369 : : }
13370 : : }
13371 : : }
13372 : 488830 : break;
13373 : : }
13374 : 701 : case BIT_AND_EXPR:
13375 : 701 : {
13376 : 701 : tree _q30 = gimple_assign_rhs1 (_a1);
13377 : 701 : _q30 = do_valueize (valueize, _q30);
13378 : 701 : tree _q31 = gimple_assign_rhs2 (_a1);
13379 : 701 : _q31 = do_valueize (valueize, _q31);
13380 : 701 : if (tree_swap_operands_p (_q30, _q31))
13381 : 0 : std::swap (_q30, _q31);
13382 : 701 : switch (TREE_CODE (_p1))
13383 : : {
13384 : 701 : case SSA_NAME:
13385 : 701 : if (gimple *_d2 = get_def (valueize, _p1))
13386 : : {
13387 : 701 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13388 : 696 : switch (gimple_assign_rhs_code (_a2))
13389 : : {
13390 : 24 : case PLUS_EXPR:
13391 : 24 : {
13392 : 24 : tree _q60 = gimple_assign_rhs1 (_a2);
13393 : 24 : _q60 = do_valueize (valueize, _q60);
13394 : 24 : tree _q61 = gimple_assign_rhs2 (_a2);
13395 : 24 : _q61 = do_valueize (valueize, _q61);
13396 : 24 : if (tree_swap_operands_p (_q60, _q61))
13397 : 1 : std::swap (_q60, _q61);
13398 : 24 : switch (TREE_CODE (_q60))
13399 : : {
13400 : 24 : case SSA_NAME:
13401 : 24 : if (gimple *_d3 = get_def (valueize, _q60))
13402 : : {
13403 : 24 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13404 : 21 : switch (gimple_assign_rhs_code (_a3))
13405 : : {
13406 : 0 : case BIT_IOR_EXPR:
13407 : 0 : {
13408 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
13409 : 0 : _q70 = do_valueize (valueize, _q70);
13410 : 0 : tree _q71 = gimple_assign_rhs2 (_a3);
13411 : 0 : _q71 = do_valueize (valueize, _q71);
13412 : 0 : if (tree_swap_operands_p (_q70, _q71))
13413 : 0 : std::swap (_q70, _q71);
13414 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
13415 : : {
13416 : 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
13417 : : {
13418 : 0 : if (integer_onep (_q61))
13419 : : {
13420 : 0 : {
13421 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
13422 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13423 : 0 : return true;
13424 : : }
13425 : : }
13426 : : }
13427 : : }
13428 : 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
13429 : : {
13430 : 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
13431 : : {
13432 : 0 : if (integer_onep (_q61))
13433 : : {
13434 : 0 : {
13435 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
13436 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13437 : 0 : return true;
13438 : : }
13439 : : }
13440 : : }
13441 : : }
13442 : 24 : break;
13443 : : }
13444 : : default:;
13445 : : }
13446 : : }
13447 : : break;
13448 : 24 : default:;
13449 : : }
13450 : 24 : {
13451 : 24 : tree _q60_pops[1];
13452 : 24 : if (gimple_nop_convert (_q60, _q60_pops, valueize))
13453 : : {
13454 : 9 : tree _q70 = _q60_pops[0];
13455 : 9 : switch (TREE_CODE (_q70))
13456 : : {
13457 : 9 : case SSA_NAME:
13458 : 9 : if (gimple *_d3 = get_def (valueize, _q70))
13459 : : {
13460 : 9 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13461 : 9 : switch (gimple_assign_rhs_code (_a3))
13462 : : {
13463 : 9 : case BIT_IOR_EXPR:
13464 : 9 : {
13465 : 9 : tree _q80 = gimple_assign_rhs1 (_a3);
13466 : 9 : _q80 = do_valueize (valueize, _q80);
13467 : 9 : tree _q81 = gimple_assign_rhs2 (_a3);
13468 : 9 : _q81 = do_valueize (valueize, _q81);
13469 : 9 : if (tree_swap_operands_p (_q80, _q81))
13470 : 0 : std::swap (_q80, _q81);
13471 : 9 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
13472 : : {
13473 : 7 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
13474 : : {
13475 : 7 : if (integer_onep (_q61))
13476 : : {
13477 : 7 : {
13478 : 7 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
13479 : 7 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13480 : 4 : return true;
13481 : : }
13482 : : }
13483 : : }
13484 : : }
13485 : 5 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
13486 : : {
13487 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
13488 : : {
13489 : 0 : if (integer_onep (_q61))
13490 : : {
13491 : 0 : {
13492 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
13493 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13494 : 0 : return true;
13495 : : }
13496 : : }
13497 : : }
13498 : : }
13499 : 20 : break;
13500 : : }
13501 : : default:;
13502 : : }
13503 : : }
13504 : : break;
13505 : : default:;
13506 : : }
13507 : : }
13508 : : }
13509 : 20 : break;
13510 : : }
13511 : : default:;
13512 : : }
13513 : : }
13514 : : break;
13515 : 697 : default:;
13516 : : }
13517 : 697 : {
13518 : 697 : tree _p1_pops[1];
13519 : 697 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
13520 : : {
13521 : 649 : tree _q60 = _p1_pops[0];
13522 : 649 : switch (TREE_CODE (_q60))
13523 : : {
13524 : 649 : case SSA_NAME:
13525 : 649 : if (gimple *_d2 = get_def (valueize, _q60))
13526 : : {
13527 : 649 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13528 : 649 : switch (gimple_assign_rhs_code (_a2))
13529 : : {
13530 : 132 : case PLUS_EXPR:
13531 : 132 : {
13532 : 132 : tree _q70 = gimple_assign_rhs1 (_a2);
13533 : 132 : _q70 = do_valueize (valueize, _q70);
13534 : 132 : tree _q71 = gimple_assign_rhs2 (_a2);
13535 : 132 : _q71 = do_valueize (valueize, _q71);
13536 : 132 : if (tree_swap_operands_p (_q70, _q71))
13537 : 0 : std::swap (_q70, _q71);
13538 : 132 : switch (TREE_CODE (_q70))
13539 : : {
13540 : 132 : case SSA_NAME:
13541 : 132 : if (gimple *_d3 = get_def (valueize, _q70))
13542 : : {
13543 : 132 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13544 : 132 : switch (gimple_assign_rhs_code (_a3))
13545 : : {
13546 : 4 : case BIT_IOR_EXPR:
13547 : 4 : {
13548 : 4 : tree _q80 = gimple_assign_rhs1 (_a3);
13549 : 4 : _q80 = do_valueize (valueize, _q80);
13550 : 4 : tree _q81 = gimple_assign_rhs2 (_a3);
13551 : 4 : _q81 = do_valueize (valueize, _q81);
13552 : 4 : if (tree_swap_operands_p (_q80, _q81))
13553 : 0 : std::swap (_q80, _q81);
13554 : 4 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
13555 : : {
13556 : 4 : if ((_q81 == _q31 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q31, 0) && types_match (_q81, _q31)))
13557 : : {
13558 : 4 : if (integer_onep (_q71))
13559 : : {
13560 : 4 : {
13561 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
13562 : 4 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13563 : 2 : return true;
13564 : : }
13565 : : }
13566 : : }
13567 : : }
13568 : 2 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
13569 : : {
13570 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
13571 : : {
13572 : 0 : if (integer_onep (_q71))
13573 : : {
13574 : 0 : {
13575 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
13576 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13577 : 0 : return true;
13578 : : }
13579 : : }
13580 : : }
13581 : : }
13582 : 130 : break;
13583 : : }
13584 : : default:;
13585 : : }
13586 : : }
13587 : : break;
13588 : 130 : default:;
13589 : : }
13590 : 130 : {
13591 : 130 : tree _q70_pops[1];
13592 : 130 : if (gimple_nop_convert (_q70, _q70_pops, valueize))
13593 : : {
13594 : 0 : tree _q80 = _q70_pops[0];
13595 : 0 : switch (TREE_CODE (_q80))
13596 : : {
13597 : 0 : case SSA_NAME:
13598 : 0 : if (gimple *_d3 = get_def (valueize, _q80))
13599 : : {
13600 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13601 : 0 : switch (gimple_assign_rhs_code (_a3))
13602 : : {
13603 : 0 : case BIT_IOR_EXPR:
13604 : 0 : {
13605 : 0 : tree _q90 = gimple_assign_rhs1 (_a3);
13606 : 0 : _q90 = do_valueize (valueize, _q90);
13607 : 0 : tree _q91 = gimple_assign_rhs2 (_a3);
13608 : 0 : _q91 = do_valueize (valueize, _q91);
13609 : 0 : if (tree_swap_operands_p (_q90, _q91))
13610 : 0 : std::swap (_q90, _q91);
13611 : 0 : if ((_q90 == _q30 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q30, 0) && types_match (_q90, _q30)))
13612 : : {
13613 : 0 : if ((_q91 == _q31 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q31, 0) && types_match (_q91, _q31)))
13614 : : {
13615 : 0 : if (integer_onep (_q71))
13616 : : {
13617 : 0 : {
13618 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
13619 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13620 : 0 : return true;
13621 : : }
13622 : : }
13623 : : }
13624 : : }
13625 : 0 : if ((_q90 == _q31 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q31, 0) && types_match (_q90, _q31)))
13626 : : {
13627 : 0 : if ((_q91 == _q30 && ! TREE_SIDE_EFFECTS (_q91)) || (operand_equal_p (_q91, _q30, 0) && types_match (_q91, _q30)))
13628 : : {
13629 : 0 : if (integer_onep (_q71))
13630 : : {
13631 : 0 : {
13632 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
13633 : 0 : if (gimple_simplify_94 (res_op, seq, valueize, type, captures))
13634 : 0 : return true;
13635 : : }
13636 : : }
13637 : : }
13638 : : }
13639 : 130 : break;
13640 : : }
13641 : : default:;
13642 : : }
13643 : : }
13644 : : break;
13645 : : default:;
13646 : : }
13647 : : }
13648 : : }
13649 : 130 : break;
13650 : : }
13651 : : default:;
13652 : : }
13653 : : }
13654 : : break;
13655 : : default:;
13656 : : }
13657 : : }
13658 : : }
13659 : 695 : break;
13660 : : }
13661 : : default:;
13662 : : }
13663 : : }
13664 : : break;
13665 : : default:;
13666 : : }
13667 : : }
13668 : : }
13669 : 11112553 : if (gimple_negate_expr_p (_p1, valueize))
13670 : : {
13671 : 953967 : {
13672 : 953967 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
13673 : 953967 : if (!FIXED_POINT_TYPE_P (type)
13674 : : )
13675 : : {
13676 : 953967 : gimple_seq *lseq = seq;
13677 : 953967 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2178;
13678 : 953967 : {
13679 : 953967 : res_op->set_op (PLUS_EXPR, type, 2);
13680 : 953967 : res_op->ops[0] = captures[0];
13681 : 953967 : {
13682 : 953967 : tree _o1[1], _r1;
13683 : 953967 : _o1[0] = captures[1];
13684 : 953967 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
13685 : 953967 : tem_op.resimplify (lseq, valueize);
13686 : 953967 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13687 : 953967 : if (!_r1) goto next_after_fail2178;
13688 : 919790 : res_op->ops[1] = _r1;
13689 : : }
13690 : 919790 : res_op->resimplify (lseq, valueize);
13691 : 919790 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1087, __FILE__, __LINE__, true);
13692 : 919790 : return true;
13693 : : }
13694 : 34177 : next_after_fail2178:;
13695 : : }
13696 : : }
13697 : : }
13698 : 10192763 : switch (TREE_CODE (_p0))
13699 : : {
13700 : 8337024 : case SSA_NAME:
13701 : 8337024 : if (gimple *_d1 = get_def (valueize, _p0))
13702 : : {
13703 : 6644094 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13704 : 7516364 : switch (gimple_assign_rhs_code (_a1))
13705 : : {
13706 : 1164554 : CASE_CONVERT:
13707 : 1164554 : {
13708 : 1164554 : tree _q20 = gimple_assign_rhs1 (_a1);
13709 : 1164554 : _q20 = do_valueize (valueize, _q20);
13710 : 1164554 : switch (TREE_CODE (_p1))
13711 : : {
13712 : 1155055 : case SSA_NAME:
13713 : 1155055 : if (gimple *_d2 = get_def (valueize, _p1))
13714 : : {
13715 : 1126336 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13716 : 1107293 : switch (gimple_assign_rhs_code (_a2))
13717 : : {
13718 : 969975 : CASE_CONVERT:
13719 : 969975 : {
13720 : 969975 : tree _q40 = gimple_assign_rhs1 (_a2);
13721 : 969975 : _q40 = do_valueize (valueize, _q40);
13722 : 969975 : switch (TREE_CODE (_q40))
13723 : : {
13724 : 953008 : case SSA_NAME:
13725 : 953008 : if (gimple *_d3 = get_def (valueize, _q40))
13726 : : {
13727 : 939440 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13728 : 1041262 : switch (gimple_assign_rhs_code (_a3))
13729 : : {
13730 : 1181 : case BIT_AND_EXPR:
13731 : 1181 : {
13732 : 1181 : tree _q50 = gimple_assign_rhs1 (_a3);
13733 : 1181 : _q50 = do_valueize (valueize, _q50);
13734 : 1181 : tree _q51 = gimple_assign_rhs2 (_a3);
13735 : 1181 : _q51 = do_valueize (valueize, _q51);
13736 : 1181 : if (tree_swap_operands_p (_q50, _q51))
13737 : 0 : std::swap (_q50, _q51);
13738 : 1181 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
13739 : : {
13740 : 491 : {
13741 : 491 : tree captures[5] ATTRIBUTE_UNUSED = { _q50, _p1, _q40, _q51, _q20 };
13742 : 491 : if (gimple_simplify_97 (res_op, seq, valueize, type, captures))
13743 : 0 : return true;
13744 : : }
13745 : : }
13746 : 1181 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
13747 : : {
13748 : 0 : {
13749 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q51, _p1, _q40, _q50, _q20 };
13750 : 0 : if (gimple_simplify_97 (res_op, seq, valueize, type, captures))
13751 : 0 : return true;
13752 : : }
13753 : : }
13754 : 1164554 : break;
13755 : : }
13756 : : default:;
13757 : : }
13758 : : }
13759 : : break;
13760 : : default:;
13761 : : }
13762 : : break;
13763 : : }
13764 : 1717 : case BIT_AND_EXPR:
13765 : 1717 : {
13766 : 1717 : tree _q40 = gimple_assign_rhs1 (_a2);
13767 : 1717 : _q40 = do_valueize (valueize, _q40);
13768 : 1717 : tree _q41 = gimple_assign_rhs2 (_a2);
13769 : 1717 : _q41 = do_valueize (valueize, _q41);
13770 : 1717 : if (tree_swap_operands_p (_q40, _q41))
13771 : 0 : std::swap (_q40, _q41);
13772 : 1717 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _q20, 0))
13773 : : {
13774 : 0 : {
13775 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _p1, _q41, _q20 };
13776 : 0 : if (gimple_simplify_98 (res_op, seq, valueize, type, captures))
13777 : 0 : return true;
13778 : : }
13779 : : }
13780 : 1717 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q20, 0))
13781 : : {
13782 : 0 : {
13783 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _p1, _q40, _q20 };
13784 : 0 : if (gimple_simplify_98 (res_op, seq, valueize, type, captures))
13785 : 0 : return true;
13786 : : }
13787 : : }
13788 : 1164554 : break;
13789 : : }
13790 : : default:;
13791 : : }
13792 : : }
13793 : : break;
13794 : 1164554 : default:;
13795 : : }
13796 : 1164554 : switch (TREE_CODE (_q20))
13797 : : {
13798 : 1160636 : case SSA_NAME:
13799 : 1160636 : if (gimple *_d2 = get_def (valueize, _q20))
13800 : : {
13801 : 1130906 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13802 : 1394453 : switch (gimple_assign_rhs_code (_a2))
13803 : : {
13804 : 18201 : case ADDR_EXPR:
13805 : 18201 : {
13806 : 18201 : switch (TREE_CODE (_p1))
13807 : : {
13808 : 18201 : case SSA_NAME:
13809 : 18201 : if (gimple *_d3 = get_def (valueize, _p1))
13810 : : {
13811 : 17929 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13812 : 17929 : switch (gimple_assign_rhs_code (_a3))
13813 : : {
13814 : 17642 : CASE_CONVERT:
13815 : 17642 : {
13816 : 17642 : tree _q40 = gimple_assign_rhs1 (_a3);
13817 : 17642 : _q40 = do_valueize (valueize, _q40);
13818 : 17642 : switch (TREE_CODE (_q40))
13819 : : {
13820 : 15613 : case SSA_NAME:
13821 : 15613 : if (gimple *_d4 = get_def (valueize, _q40))
13822 : : {
13823 : 15178 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
13824 : 24924 : switch (gimple_assign_rhs_code (_a4))
13825 : : {
13826 : 62 : case POINTER_PLUS_EXPR:
13827 : 62 : {
13828 : 62 : tree _q50 = gimple_assign_rhs1 (_a4);
13829 : 62 : _q50 = do_valueize (valueize, _q50);
13830 : 62 : tree _q51 = gimple_assign_rhs2 (_a4);
13831 : 62 : _q51 = do_valueize (valueize, _q51);
13832 : 62 : {
13833 : 62 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
13834 : 62 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
13835 : : )
13836 : : {
13837 : 62 : {
13838 : 62 : poly_int64 diff;
13839 : 62 : if (ptr_difference_const (captures[0], captures[1], &diff)
13840 : : )
13841 : : {
13842 : 0 : gimple_seq *lseq = seq;
13843 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2179;
13844 : 0 : {
13845 : 0 : res_op->set_op (MINUS_EXPR, type, 2);
13846 : 0 : res_op->ops[0] = build_int_cst_type (type, diff);
13847 : 0 : {
13848 : 0 : tree _o1[1], _r1;
13849 : 0 : _o1[0] = captures[2];
13850 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
13851 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
13852 : : {
13853 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
13854 : 0 : tem_op.resimplify (lseq, valueize);
13855 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13856 : 0 : if (!_r1) goto next_after_fail2179;
13857 : : }
13858 : : else
13859 : : _r1 = _o1[0];
13860 : 0 : res_op->ops[1] = _r1;
13861 : : }
13862 : 0 : res_op->resimplify (lseq, valueize);
13863 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1088, __FILE__, __LINE__, true);
13864 : 0 : return true;
13865 : : }
13866 : 62 : next_after_fail2179:;
13867 : : }
13868 : : }
13869 : : }
13870 : : }
13871 : 62 : break;
13872 : : }
13873 : : default:;
13874 : : }
13875 : : }
13876 : : break;
13877 : 17642 : default:;
13878 : : }
13879 : 17642 : {
13880 : 17642 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
13881 : 17642 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
13882 : : )
13883 : : {
13884 : 17642 : {
13885 : 17642 : poly_int64 diff;
13886 : 17642 : if (ptr_difference_const (captures[0], captures[1], &diff)
13887 : : )
13888 : : {
13889 : 717 : gimple_seq *lseq = seq;
13890 : 717 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2180;
13891 : 717 : {
13892 : 717 : tree tem;
13893 : 717 : tem = build_int_cst_type (type, diff);
13894 : 717 : res_op->set_value (tem);
13895 : 717 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1089, __FILE__, __LINE__, true);
13896 : 717 : return true;
13897 : : }
13898 : 0 : next_after_fail2180:;
13899 : : }
13900 : : }
13901 : : }
13902 : : }
13903 : 16925 : break;
13904 : : }
13905 : : default:;
13906 : : }
13907 : : }
13908 : : break;
13909 : : default:;
13910 : : }
13911 : : break;
13912 : : }
13913 : 26128 : case POINTER_PLUS_EXPR:
13914 : 26128 : {
13915 : 26128 : tree _q30 = gimple_assign_rhs1 (_a2);
13916 : 26128 : _q30 = do_valueize (valueize, _q30);
13917 : 26128 : tree _q31 = gimple_assign_rhs2 (_a2);
13918 : 26128 : _q31 = do_valueize (valueize, _q31);
13919 : 26128 : switch (TREE_CODE (_p1))
13920 : : {
13921 : 26128 : case SSA_NAME:
13922 : 26128 : if (gimple *_d3 = get_def (valueize, _p1))
13923 : : {
13924 : 25747 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13925 : 25844 : switch (gimple_assign_rhs_code (_a3))
13926 : : {
13927 : 19544 : CASE_CONVERT:
13928 : 19544 : {
13929 : 19544 : tree _q60 = gimple_assign_rhs1 (_a3);
13930 : 19544 : _q60 = do_valueize (valueize, _q60);
13931 : 19544 : switch (TREE_CODE (_q60))
13932 : : {
13933 : 14824 : case SSA_NAME:
13934 : 14824 : if (gimple *_d4 = get_def (valueize, _q60))
13935 : : {
13936 : 14665 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
13937 : 22844 : switch (gimple_assign_rhs_code (_a4))
13938 : : {
13939 : 585 : case ADDR_EXPR:
13940 : 585 : {
13941 : 585 : {
13942 : 585 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
13943 : 585 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
13944 : : )
13945 : : {
13946 : 585 : {
13947 : 585 : poly_int64 diff;
13948 : 585 : if (ptr_difference_const (captures[0], captures[2], &diff)
13949 : : )
13950 : : {
13951 : 23 : gimple_seq *lseq = seq;
13952 : 23 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2181;
13953 : 23 : {
13954 : 23 : res_op->set_op (PLUS_EXPR, type, 2);
13955 : 23 : {
13956 : 23 : tree _o1[1], _r1;
13957 : 23 : _o1[0] = captures[1];
13958 : 23 : if (type != TREE_TYPE (_o1[0]) /* XXX */
13959 : 23 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
13960 : : {
13961 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
13962 : 16 : tem_op.resimplify (lseq, valueize);
13963 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13964 : 16 : if (!_r1) goto next_after_fail2181;
13965 : : }
13966 : : else
13967 : : _r1 = _o1[0];
13968 : 11 : res_op->ops[0] = _r1;
13969 : : }
13970 : 11 : res_op->ops[1] = build_int_cst_type (type, diff);
13971 : 11 : res_op->resimplify (lseq, valueize);
13972 : 11 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1090, __FILE__, __LINE__, true);
13973 : 11 : return true;
13974 : : }
13975 : 574 : next_after_fail2181:;
13976 : : }
13977 : : }
13978 : : }
13979 : : }
13980 : 574 : break;
13981 : : }
13982 : : default:;
13983 : : }
13984 : : }
13985 : : break;
13986 : 4720 : case ADDR_EXPR:
13987 : 4720 : {
13988 : 4720 : {
13989 : 4720 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
13990 : 4720 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
13991 : : )
13992 : : {
13993 : 4720 : {
13994 : 4720 : poly_int64 diff;
13995 : 4720 : if (ptr_difference_const (captures[0], captures[2], &diff)
13996 : : )
13997 : : {
13998 : 513 : gimple_seq *lseq = seq;
13999 : 513 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2182;
14000 : 513 : {
14001 : 513 : res_op->set_op (PLUS_EXPR, type, 2);
14002 : 513 : {
14003 : 513 : tree _o1[1], _r1;
14004 : 513 : _o1[0] = captures[1];
14005 : 513 : if (type != TREE_TYPE (_o1[0]) /* XXX */
14006 : 513 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
14007 : : {
14008 : 429 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
14009 : 429 : tem_op.resimplify (lseq, valueize);
14010 : 429 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14011 : 429 : if (!_r1) goto next_after_fail2182;
14012 : : }
14013 : : else
14014 : : _r1 = _o1[0];
14015 : 201 : res_op->ops[0] = _r1;
14016 : : }
14017 : 201 : res_op->ops[1] = build_int_cst_type (type, diff);
14018 : 201 : res_op->resimplify (lseq, valueize);
14019 : 201 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1090, __FILE__, __LINE__, true);
14020 : 201 : return true;
14021 : : }
14022 : 4519 : next_after_fail2182:;
14023 : : }
14024 : : }
14025 : : }
14026 : : }
14027 : 4519 : break;
14028 : : }
14029 : : default:;
14030 : : }
14031 : : break;
14032 : : }
14033 : : default:;
14034 : : }
14035 : : }
14036 : : break;
14037 : : default:;
14038 : : }
14039 : : break;
14040 : : }
14041 : : default:;
14042 : : }
14043 : : }
14044 : : break;
14045 : 3918 : case ADDR_EXPR:
14046 : 3918 : {
14047 : 3918 : switch (TREE_CODE (_p1))
14048 : : {
14049 : 3918 : case SSA_NAME:
14050 : 3918 : if (gimple *_d2 = get_def (valueize, _p1))
14051 : : {
14052 : 3668 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14053 : 3877 : switch (gimple_assign_rhs_code (_a2))
14054 : : {
14055 : 2735 : CASE_CONVERT:
14056 : 2735 : {
14057 : 2735 : tree _q40 = gimple_assign_rhs1 (_a2);
14058 : 2735 : _q40 = do_valueize (valueize, _q40);
14059 : 2735 : switch (TREE_CODE (_q40))
14060 : : {
14061 : 255 : case SSA_NAME:
14062 : 255 : if (gimple *_d3 = get_def (valueize, _q40))
14063 : : {
14064 : 232 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
14065 : 111 : switch (gimple_assign_rhs_code (_a3))
14066 : : {
14067 : 54 : case POINTER_PLUS_EXPR:
14068 : 54 : {
14069 : 54 : tree _q50 = gimple_assign_rhs1 (_a3);
14070 : 54 : _q50 = do_valueize (valueize, _q50);
14071 : 54 : tree _q51 = gimple_assign_rhs2 (_a3);
14072 : 54 : _q51 = do_valueize (valueize, _q51);
14073 : 54 : {
14074 : 54 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q50, _q51 };
14075 : 54 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
14076 : : )
14077 : : {
14078 : 54 : {
14079 : 54 : poly_int64 diff;
14080 : 54 : if (ptr_difference_const (captures[0], captures[1], &diff)
14081 : : )
14082 : : {
14083 : 2 : gimple_seq *lseq = seq;
14084 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2183;
14085 : 2 : {
14086 : 2 : res_op->set_op (MINUS_EXPR, type, 2);
14087 : 2 : res_op->ops[0] = build_int_cst_type (type, diff);
14088 : 2 : {
14089 : 2 : tree _o1[1], _r1;
14090 : 2 : _o1[0] = captures[2];
14091 : 2 : if (type != TREE_TYPE (_o1[0]) /* XXX */
14092 : 2 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
14093 : : {
14094 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
14095 : 0 : tem_op.resimplify (lseq, valueize);
14096 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14097 : 0 : if (!_r1) goto next_after_fail2183;
14098 : : }
14099 : : else
14100 : : _r1 = _o1[0];
14101 : 2 : res_op->ops[1] = _r1;
14102 : : }
14103 : 2 : res_op->resimplify (lseq, valueize);
14104 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1088, __FILE__, __LINE__, true);
14105 : 2 : return true;
14106 : : }
14107 : 52 : next_after_fail2183:;
14108 : : }
14109 : : }
14110 : : }
14111 : : }
14112 : 52 : break;
14113 : : }
14114 : : default:;
14115 : : }
14116 : : }
14117 : : break;
14118 : 2733 : default:;
14119 : : }
14120 : 2733 : {
14121 : 2733 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
14122 : 2733 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
14123 : : )
14124 : : {
14125 : 2733 : {
14126 : 2733 : poly_int64 diff;
14127 : 2733 : if (ptr_difference_const (captures[0], captures[1], &diff)
14128 : : )
14129 : : {
14130 : 1890 : gimple_seq *lseq = seq;
14131 : 1890 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2184;
14132 : 1890 : {
14133 : 1890 : tree tem;
14134 : 1890 : tem = build_int_cst_type (type, diff);
14135 : 1890 : res_op->set_value (tem);
14136 : 1890 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1089, __FILE__, __LINE__, true);
14137 : 1890 : return true;
14138 : : }
14139 : 0 : next_after_fail2184:;
14140 : : }
14141 : : }
14142 : : }
14143 : : }
14144 : 843 : break;
14145 : : }
14146 : : default:;
14147 : : }
14148 : : }
14149 : : break;
14150 : : default:;
14151 : : }
14152 : : break;
14153 : : }
14154 : 1161733 : default:;
14155 : : }
14156 : 1161733 : switch (TREE_CODE (_p1))
14157 : : {
14158 : 1152234 : case SSA_NAME:
14159 : 1152234 : if (gimple *_d2 = get_def (valueize, _p1))
14160 : : {
14161 : 1123515 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14162 : 1104472 : switch (gimple_assign_rhs_code (_a2))
14163 : : {
14164 : 967154 : CASE_CONVERT:
14165 : 967154 : {
14166 : 967154 : tree _q40 = gimple_assign_rhs1 (_a2);
14167 : 967154 : _q40 = do_valueize (valueize, _q40);
14168 : 967154 : switch (TREE_CODE (_q40))
14169 : : {
14170 : 952278 : case SSA_NAME:
14171 : 952278 : if (gimple *_d3 = get_def (valueize, _q40))
14172 : : {
14173 : 938723 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
14174 : 1040646 : switch (gimple_assign_rhs_code (_a3))
14175 : : {
14176 : 1926 : case ADDR_EXPR:
14177 : 1926 : {
14178 : 1926 : {
14179 : 1926 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
14180 : 1926 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
14181 : : )
14182 : : {
14183 : 1926 : {
14184 : 1926 : poly_int64 diff;
14185 : 1926 : if (ptr_difference_const (captures[0], captures[1], &diff)
14186 : : )
14187 : : {
14188 : 0 : gimple_seq *lseq = seq;
14189 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2185;
14190 : 0 : {
14191 : 0 : tree tem;
14192 : 0 : tem = build_int_cst_type (type, diff);
14193 : 0 : res_op->set_value (tem);
14194 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1091, __FILE__, __LINE__, true);
14195 : 0 : return true;
14196 : : }
14197 : 0 : next_after_fail2185:;
14198 : : }
14199 : : }
14200 : : }
14201 : : }
14202 : 1926 : break;
14203 : : }
14204 : : default:;
14205 : : }
14206 : : }
14207 : : break;
14208 : 14876 : case ADDR_EXPR:
14209 : 14876 : {
14210 : 14876 : {
14211 : 14876 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
14212 : 14876 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
14213 : : )
14214 : : {
14215 : 14864 : {
14216 : 14864 : poly_int64 diff;
14217 : 14864 : if (ptr_difference_const (captures[0], captures[1], &diff)
14218 : : )
14219 : : {
14220 : 0 : gimple_seq *lseq = seq;
14221 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2186;
14222 : 0 : {
14223 : 0 : tree tem;
14224 : 0 : tem = build_int_cst_type (type, diff);
14225 : 0 : res_op->set_value (tem);
14226 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1091, __FILE__, __LINE__, true);
14227 : 0 : return true;
14228 : : }
14229 : 0 : next_after_fail2186:;
14230 : : }
14231 : : }
14232 : : }
14233 : : }
14234 : 14876 : break;
14235 : : }
14236 : : default:;
14237 : : }
14238 : : break;
14239 : : }
14240 : : default:;
14241 : : }
14242 : : }
14243 : : break;
14244 : : default:;
14245 : : }
14246 : : break;
14247 : : }
14248 : : default:;
14249 : : }
14250 : : }
14251 : : break;
14252 : 10189942 : default:;
14253 : : }
14254 : 10189942 : if (integer_onep (_p0))
14255 : : {
14256 : 244109 : switch (TREE_CODE (_p1))
14257 : : {
14258 : 229904 : case SSA_NAME:
14259 : 229904 : {
14260 : 229904 : {
14261 : 229904 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
14262 : 229904 : if (INTEGRAL_TYPE_P (type)
14263 : 229904 : && ssa_name_has_boolean_range (captures[1])
14264 : : )
14265 : : {
14266 : 491 : gimple_seq *lseq = seq;
14267 : 491 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2187;
14268 : 491 : {
14269 : 491 : res_op->set_op (BIT_XOR_EXPR, type, 2);
14270 : 491 : res_op->ops[0] = captures[1];
14271 : 491 : res_op->ops[1] = captures[0];
14272 : 491 : res_op->resimplify (lseq, valueize);
14273 : 491 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1092, __FILE__, __LINE__, true);
14274 : 491 : return true;
14275 : : }
14276 : 0 : next_after_fail2187:;
14277 : : }
14278 : : }
14279 : 229413 : break;
14280 : : }
14281 : : default:;
14282 : : }
14283 : : }
14284 : 10189451 : switch (TREE_CODE (_p1))
14285 : : {
14286 : 9600559 : case SSA_NAME:
14287 : 9600559 : if (gimple *_d1 = get_def (valueize, _p1))
14288 : : {
14289 : 7425379 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14290 : 8009778 : switch (gimple_assign_rhs_code (_a1))
14291 : : {
14292 : 1809944 : CASE_CONVERT:
14293 : 1809944 : {
14294 : 1809944 : tree _q30 = gimple_assign_rhs1 (_a1);
14295 : 1809944 : _q30 = do_valueize (valueize, _q30);
14296 : 1809944 : switch (TREE_CODE (_q30))
14297 : : {
14298 : 1724745 : case SSA_NAME:
14299 : 1724745 : if (gimple *_d2 = get_def (valueize, _q30))
14300 : : {
14301 : 1692422 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14302 : 1701424 : switch (gimple_assign_rhs_code (_a2))
14303 : : {
14304 : 12024 : case BIT_AND_EXPR:
14305 : 12024 : {
14306 : 12024 : tree _q40 = gimple_assign_rhs1 (_a2);
14307 : 12024 : _q40 = do_valueize (valueize, _q40);
14308 : 12024 : tree _q41 = gimple_assign_rhs2 (_a2);
14309 : 12024 : _q41 = do_valueize (valueize, _q41);
14310 : 12024 : if (tree_swap_operands_p (_q40, _q41))
14311 : 47 : std::swap (_q40, _q41);
14312 : 12024 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
14313 : : {
14314 : 0 : {
14315 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _q40, _p1, _q30, _q41, _p0 };
14316 : 0 : if (gimple_simplify_97 (res_op, seq, valueize, type, captures))
14317 : 0 : return true;
14318 : : }
14319 : : }
14320 : 12024 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
14321 : : {
14322 : 18 : {
14323 : 18 : tree captures[5] ATTRIBUTE_UNUSED = { _q41, _p1, _q30, _q40, _p0 };
14324 : 18 : if (gimple_simplify_97 (res_op, seq, valueize, type, captures))
14325 : 6 : return true;
14326 : : }
14327 : : }
14328 : 10186883 : break;
14329 : : }
14330 : : default:;
14331 : : }
14332 : : }
14333 : : break;
14334 : : default:;
14335 : : }
14336 : : break;
14337 : : }
14338 : 33556 : case BIT_AND_EXPR:
14339 : 33556 : {
14340 : 33556 : tree _q30 = gimple_assign_rhs1 (_a1);
14341 : 33556 : _q30 = do_valueize (valueize, _q30);
14342 : 33556 : tree _q31 = gimple_assign_rhs2 (_a1);
14343 : 33556 : _q31 = do_valueize (valueize, _q31);
14344 : 33556 : if (tree_swap_operands_p (_q30, _q31))
14345 : 149 : std::swap (_q30, _q31);
14346 : 33556 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || operand_equal_p (_q30, _p0, 0))
14347 : : {
14348 : 2790 : {
14349 : 2790 : tree captures[5] ATTRIBUTE_UNUSED = { _q30, _p1, _p1, _q31, _p0 };
14350 : 2790 : if (gimple_simplify_98 (res_op, seq, valueize, type, captures))
14351 : 2557 : return true;
14352 : : }
14353 : : }
14354 : 30999 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _p0, 0))
14355 : : {
14356 : 64 : {
14357 : 64 : tree captures[5] ATTRIBUTE_UNUSED = { _q31, _p1, _p1, _q30, _p0 };
14358 : 64 : if (gimple_simplify_98 (res_op, seq, valueize, type, captures))
14359 : 5 : return true;
14360 : : }
14361 : : }
14362 : 10186883 : break;
14363 : : }
14364 : : default:;
14365 : : }
14366 : : }
14367 : : break;
14368 : 10186883 : default:;
14369 : : }
14370 : 10186883 : switch (TREE_CODE (_p0))
14371 : : {
14372 : 8331643 : case SSA_NAME:
14373 : 8331643 : if (gimple *_d1 = get_def (valueize, _p0))
14374 : : {
14375 : 6640287 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14376 : 7512851 : switch (gimple_assign_rhs_code (_a1))
14377 : : {
14378 : 1395859 : case PLUS_EXPR:
14379 : 1395859 : {
14380 : 1395859 : tree _q20 = gimple_assign_rhs1 (_a1);
14381 : 1395859 : _q20 = do_valueize (valueize, _q20);
14382 : 1395859 : tree _q21 = gimple_assign_rhs2 (_a1);
14383 : 1395859 : _q21 = do_valueize (valueize, _q21);
14384 : 1395859 : if (tree_swap_operands_p (_q20, _q21))
14385 : 117668 : std::swap (_q20, _q21);
14386 : 1395859 : switch (TREE_CODE (_p1))
14387 : : {
14388 : 1387805 : case SSA_NAME:
14389 : 1387805 : if (gimple *_d2 = get_def (valueize, _p1))
14390 : : {
14391 : 1330366 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14392 : 1518830 : switch (gimple_assign_rhs_code (_a2))
14393 : : {
14394 : 539717 : case PLUS_EXPR:
14395 : 539717 : {
14396 : 539717 : tree _q50 = gimple_assign_rhs1 (_a2);
14397 : 539717 : _q50 = do_valueize (valueize, _q50);
14398 : 539717 : tree _q51 = gimple_assign_rhs2 (_a2);
14399 : 539717 : _q51 = do_valueize (valueize, _q51);
14400 : 539717 : if (tree_swap_operands_p (_q50, _q51))
14401 : 7538 : std::swap (_q50, _q51);
14402 : 539717 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14403 : : {
14404 : 19963 : {
14405 : 19963 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
14406 : 39926 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
14407 : 39556 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
14408 : 1224 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
14409 : : )
14410 : : {
14411 : 19593 : gimple_seq *lseq = seq;
14412 : 19593 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2188;
14413 : 19593 : {
14414 : 19593 : res_op->set_op (MINUS_EXPR, type, 2);
14415 : 19593 : res_op->ops[0] = captures[0];
14416 : 19593 : res_op->ops[1] = captures[2];
14417 : 19593 : res_op->resimplify (lseq, valueize);
14418 : 19593 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1093, __FILE__, __LINE__, true);
14419 : 19593 : return true;
14420 : : }
14421 : 0 : next_after_fail2188:;
14422 : : }
14423 : : }
14424 : : }
14425 : 520124 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
14426 : : {
14427 : 5772 : {
14428 : 5772 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
14429 : 11544 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
14430 : 11544 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
14431 : 35 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
14432 : : )
14433 : : {
14434 : 5772 : gimple_seq *lseq = seq;
14435 : 5772 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2189;
14436 : 5772 : {
14437 : 5772 : res_op->set_op (MINUS_EXPR, type, 2);
14438 : 5772 : res_op->ops[0] = captures[0];
14439 : 5772 : res_op->ops[1] = captures[2];
14440 : 5772 : res_op->resimplify (lseq, valueize);
14441 : 5772 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1093, __FILE__, __LINE__, true);
14442 : 5772 : return true;
14443 : : }
14444 : 0 : next_after_fail2189:;
14445 : : }
14446 : : }
14447 : : }
14448 : 514352 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
14449 : : {
14450 : 115 : {
14451 : 115 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
14452 : 230 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
14453 : 230 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
14454 : 99 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
14455 : : )
14456 : : {
14457 : 115 : gimple_seq *lseq = seq;
14458 : 115 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2190;
14459 : 115 : {
14460 : 115 : res_op->set_op (MINUS_EXPR, type, 2);
14461 : 115 : res_op->ops[0] = captures[0];
14462 : 115 : res_op->ops[1] = captures[2];
14463 : 115 : res_op->resimplify (lseq, valueize);
14464 : 115 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1093, __FILE__, __LINE__, true);
14465 : 115 : return true;
14466 : : }
14467 : 0 : next_after_fail2190:;
14468 : : }
14469 : : }
14470 : : }
14471 : 514237 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14472 : : {
14473 : 20022 : {
14474 : 20022 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
14475 : 40044 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
14476 : 39763 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
14477 : 2698 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
14478 : : )
14479 : : {
14480 : 19741 : gimple_seq *lseq = seq;
14481 : 19741 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2191;
14482 : 19741 : {
14483 : 19741 : res_op->set_op (MINUS_EXPR, type, 2);
14484 : 19741 : res_op->ops[0] = captures[0];
14485 : 19741 : res_op->ops[1] = captures[2];
14486 : 19741 : res_op->resimplify (lseq, valueize);
14487 : 19741 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1093, __FILE__, __LINE__, true);
14488 : 19741 : return true;
14489 : : }
14490 : 0 : next_after_fail2191:;
14491 : : }
14492 : : }
14493 : : }
14494 : 10140543 : break;
14495 : : }
14496 : : default:;
14497 : : }
14498 : : }
14499 : : break;
14500 : : default:;
14501 : : }
14502 : 10140543 : break;
14503 : : }
14504 : 148204 : case MINUS_EXPR:
14505 : 148204 : {
14506 : 148204 : tree _q20 = gimple_assign_rhs1 (_a1);
14507 : 148204 : _q20 = do_valueize (valueize, _q20);
14508 : 148204 : tree _q21 = gimple_assign_rhs2 (_a1);
14509 : 148204 : _q21 = do_valueize (valueize, _q21);
14510 : 148204 : switch (TREE_CODE (_p1))
14511 : : {
14512 : 142211 : case SSA_NAME:
14513 : 142211 : if (gimple *_d2 = get_def (valueize, _p1))
14514 : : {
14515 : 131997 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14516 : 133260 : switch (gimple_assign_rhs_code (_a2))
14517 : : {
14518 : 10332 : case MINUS_EXPR:
14519 : 10332 : {
14520 : 10332 : tree _q50 = gimple_assign_rhs1 (_a2);
14521 : 10332 : _q50 = do_valueize (valueize, _q50);
14522 : 10332 : tree _q51 = gimple_assign_rhs2 (_a2);
14523 : 10332 : _q51 = do_valueize (valueize, _q51);
14524 : 10332 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14525 : : {
14526 : 267 : {
14527 : 267 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
14528 : 534 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
14529 : 505 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
14530 : 203 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[0])))
14531 : : )
14532 : : {
14533 : 238 : gimple_seq *lseq = seq;
14534 : 238 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2192;
14535 : 238 : {
14536 : 238 : res_op->set_op (MINUS_EXPR, type, 2);
14537 : 238 : res_op->ops[0] = captures[0];
14538 : 238 : res_op->ops[1] = captures[2];
14539 : 238 : res_op->resimplify (lseq, valueize);
14540 : 238 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1094, __FILE__, __LINE__, true);
14541 : 238 : return true;
14542 : : }
14543 : 0 : next_after_fail2192:;
14544 : : }
14545 : : }
14546 : : }
14547 : 10094 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14548 : : {
14549 : 856 : {
14550 : 856 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
14551 : 1712 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
14552 : 1671 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
14553 : 358 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
14554 : : )
14555 : : {
14556 : 815 : gimple_seq *lseq = seq;
14557 : 815 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2193;
14558 : 815 : {
14559 : 815 : res_op->set_op (MINUS_EXPR, type, 2);
14560 : 815 : res_op->ops[0] = captures[2];
14561 : 815 : res_op->ops[1] = captures[1];
14562 : 815 : res_op->resimplify (lseq, valueize);
14563 : 815 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1095, __FILE__, __LINE__, true);
14564 : 815 : return true;
14565 : : }
14566 : 0 : next_after_fail2193:;
14567 : : }
14568 : : }
14569 : : }
14570 : : break;
14571 : : }
14572 : : default:;
14573 : : }
14574 : : }
14575 : : break;
14576 : : default:;
14577 : : }
14578 : : break;
14579 : : }
14580 : 2755 : case POINTER_DIFF_EXPR:
14581 : 2755 : {
14582 : 2755 : tree _q20 = gimple_assign_rhs1 (_a1);
14583 : 2755 : _q20 = do_valueize (valueize, _q20);
14584 : 2755 : tree _q21 = gimple_assign_rhs2 (_a1);
14585 : 2755 : _q21 = do_valueize (valueize, _q21);
14586 : 2755 : switch (TREE_CODE (_p1))
14587 : : {
14588 : 2755 : case SSA_NAME:
14589 : 2755 : if (gimple *_d2 = get_def (valueize, _p1))
14590 : : {
14591 : 2275 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14592 : 2059 : switch (gimple_assign_rhs_code (_a2))
14593 : : {
14594 : 518 : case POINTER_DIFF_EXPR:
14595 : 518 : {
14596 : 518 : tree _q50 = gimple_assign_rhs1 (_a2);
14597 : 518 : _q50 = do_valueize (valueize, _q50);
14598 : 518 : tree _q51 = gimple_assign_rhs2 (_a2);
14599 : 518 : _q51 = do_valueize (valueize, _q51);
14600 : 518 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
14601 : : {
14602 : 66 : {
14603 : 66 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
14604 : 132 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
14605 : 132 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
14606 : : )
14607 : : {
14608 : 66 : gimple_seq *lseq = seq;
14609 : 66 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2194;
14610 : 66 : {
14611 : 66 : res_op->set_op (POINTER_DIFF_EXPR, type, 2);
14612 : 66 : res_op->ops[0] = captures[1];
14613 : 66 : res_op->ops[1] = captures[3];
14614 : 66 : res_op->resimplify (lseq, valueize);
14615 : 66 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1096, __FILE__, __LINE__, true);
14616 : 66 : return true;
14617 : : }
14618 : 0 : next_after_fail2194:;
14619 : : }
14620 : : }
14621 : : }
14622 : 452 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
14623 : : {
14624 : 0 : {
14625 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
14626 : 0 : if (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))
14627 : 0 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
14628 : : )
14629 : : {
14630 : 0 : gimple_seq *lseq = seq;
14631 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2195;
14632 : 0 : {
14633 : 0 : res_op->set_op (POINTER_DIFF_EXPR, type, 2);
14634 : 0 : res_op->ops[0] = captures[3];
14635 : 0 : res_op->ops[1] = captures[2];
14636 : 0 : res_op->resimplify (lseq, valueize);
14637 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1097, __FILE__, __LINE__, true);
14638 : 0 : return true;
14639 : : }
14640 : 0 : next_after_fail2195:;
14641 : : }
14642 : : }
14643 : : }
14644 : : break;
14645 : : }
14646 : : default:;
14647 : : }
14648 : : }
14649 : : break;
14650 : : default:;
14651 : : }
14652 : : break;
14653 : : }
14654 : : default:;
14655 : : }
14656 : : }
14657 : : break;
14658 : 10140543 : default:;
14659 : : }
14660 : 10140543 : switch (TREE_CODE (_p1))
14661 : : {
14662 : 9551651 : case SSA_NAME:
14663 : 9551651 : if (gimple *_d1 = get_def (valueize, _p1))
14664 : : {
14665 : 7376471 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14666 : 7960870 : switch (gimple_assign_rhs_code (_a1))
14667 : : {
14668 : 1809938 : CASE_CONVERT:
14669 : 1809938 : {
14670 : 1809938 : tree _q30 = gimple_assign_rhs1 (_a1);
14671 : 1809938 : _q30 = do_valueize (valueize, _q30);
14672 : 1809938 : switch (TREE_CODE (_q30))
14673 : : {
14674 : 1724739 : case SSA_NAME:
14675 : 1724739 : if (gimple *_d2 = get_def (valueize, _q30))
14676 : : {
14677 : 1692416 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
14678 : 1701418 : switch (gimple_assign_rhs_code (_a2))
14679 : : {
14680 : 1896 : case NEGATE_EXPR:
14681 : 1896 : {
14682 : 1896 : tree _q40 = gimple_assign_rhs1 (_a2);
14683 : 1896 : _q40 = do_valueize (valueize, _q40);
14684 : 1896 : {
14685 : 1896 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
14686 : 1896 : if (gimple_simplify_99 (res_op, seq, valueize, type, captures))
14687 : 37 : return true;
14688 : : }
14689 : 1859 : break;
14690 : : }
14691 : : default:;
14692 : : }
14693 : : }
14694 : : break;
14695 : : default:;
14696 : : }
14697 : : break;
14698 : : }
14699 : 0 : case NEGATE_EXPR:
14700 : 0 : {
14701 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
14702 : 0 : _q30 = do_valueize (valueize, _q30);
14703 : 0 : {
14704 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
14705 : 0 : if (gimple_simplify_99 (res_op, seq, valueize, type, captures))
14706 : 0 : return true;
14707 : : }
14708 : 0 : break;
14709 : : }
14710 : : default:;
14711 : : }
14712 : : }
14713 : : break;
14714 : 10140506 : default:;
14715 : : }
14716 : 10140506 : switch (TREE_CODE (_p0))
14717 : : {
14718 : 8285274 : case SSA_NAME:
14719 : 8285274 : if (gimple *_d1 = get_def (valueize, _p0))
14720 : : {
14721 : 6593918 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14722 : 7466482 : switch (gimple_assign_rhs_code (_a1))
14723 : : {
14724 : 1350626 : case PLUS_EXPR:
14725 : 1350626 : {
14726 : 1350626 : tree _q20 = gimple_assign_rhs1 (_a1);
14727 : 1350626 : _q20 = do_valueize (valueize, _q20);
14728 : 1350626 : tree _q21 = gimple_assign_rhs2 (_a1);
14729 : 1350626 : _q21 = do_valueize (valueize, _q21);
14730 : 1350626 : if (tree_swap_operands_p (_q20, _q21))
14731 : 109624 : std::swap (_q20, _q21);
14732 : 1350626 : {
14733 : 1350626 : tree _q20_pops[1];
14734 : 1350626 : if (gimple_nop_convert (_q20, _q20_pops, valueize))
14735 : : {
14736 : 154738 : tree _q30 = _q20_pops[0];
14737 : 154738 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
14738 : : {
14739 : 0 : {
14740 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
14741 : 0 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14742 : 0 : return true;
14743 : : }
14744 : : }
14745 : : }
14746 : : }
14747 : 1350626 : {
14748 : 1350626 : tree _q21_pops[1];
14749 : 1350626 : if (gimple_nop_convert (_q21, _q21_pops, valueize))
14750 : : {
14751 : 49636 : tree _q40 = _q21_pops[0];
14752 : 49636 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
14753 : : {
14754 : 0 : {
14755 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
14756 : 0 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14757 : 0 : return true;
14758 : : }
14759 : : }
14760 : : }
14761 : : }
14762 : 1350626 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
14763 : : {
14764 : 12666 : {
14765 : 12666 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14766 : 12666 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14767 : 12094 : return true;
14768 : : }
14769 : : }
14770 : 1338532 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
14771 : : {
14772 : 25914 : {
14773 : 25914 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
14774 : 25914 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14775 : 24535 : return true;
14776 : : }
14777 : : }
14778 : 10102231 : break;
14779 : : }
14780 : 147146 : case MINUS_EXPR:
14781 : 147146 : {
14782 : 147146 : tree _q20 = gimple_assign_rhs1 (_a1);
14783 : 147146 : _q20 = do_valueize (valueize, _q20);
14784 : 147146 : tree _q21 = gimple_assign_rhs2 (_a1);
14785 : 147146 : _q21 = do_valueize (valueize, _q21);
14786 : 147146 : {
14787 : 147146 : tree _q20_pops[1];
14788 : 147146 : if (gimple_nop_convert (_q20, _q20_pops, valueize))
14789 : : {
14790 : 6068 : tree _q30 = _q20_pops[0];
14791 : 6068 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
14792 : : {
14793 : 0 : {
14794 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
14795 : 0 : if (gimple_simplify_101 (res_op, seq, valueize, type, captures))
14796 : 0 : return true;
14797 : : }
14798 : : }
14799 : : }
14800 : : }
14801 : 147146 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
14802 : : {
14803 : 1867 : {
14804 : 1867 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
14805 : 1867 : if (gimple_simplify_101 (res_op, seq, valueize, type, captures))
14806 : 1646 : return true;
14807 : : }
14808 : : }
14809 : : break;
14810 : : }
14811 : : default:;
14812 : : }
14813 : : }
14814 : : break;
14815 : 10102231 : default:;
14816 : : }
14817 : 10102231 : {
14818 : 10102231 : tree _p0_pops[1];
14819 : 10102231 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
14820 : : {
14821 : 990998 : tree _q20 = _p0_pops[0];
14822 : 990998 : switch (TREE_CODE (_q20))
14823 : : {
14824 : 988972 : case SSA_NAME:
14825 : 988972 : if (gimple *_d1 = get_def (valueize, _q20))
14826 : : {
14827 : 965859 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14828 : 1188341 : switch (gimple_assign_rhs_code (_a1))
14829 : : {
14830 : 488082 : case PLUS_EXPR:
14831 : 488082 : {
14832 : 488082 : tree _q30 = gimple_assign_rhs1 (_a1);
14833 : 488082 : _q30 = do_valueize (valueize, _q30);
14834 : 488082 : tree _q31 = gimple_assign_rhs2 (_a1);
14835 : 488082 : _q31 = do_valueize (valueize, _q31);
14836 : 488082 : if (tree_swap_operands_p (_q30, _q31))
14837 : 70816 : std::swap (_q30, _q31);
14838 : 488082 : {
14839 : 488082 : tree _q30_pops[1];
14840 : 488082 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
14841 : : {
14842 : 55213 : tree _q40 = _q30_pops[0];
14843 : 55213 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
14844 : : {
14845 : 14 : {
14846 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
14847 : 14 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14848 : 14 : return true;
14849 : : }
14850 : : }
14851 : : }
14852 : : }
14853 : 488068 : {
14854 : 488068 : tree _q31_pops[1];
14855 : 488068 : if (gimple_nop_convert (_q31, _q31_pops, valueize))
14856 : : {
14857 : 4675 : tree _q50 = _q31_pops[0];
14858 : 4675 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
14859 : : {
14860 : 0 : {
14861 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q30 };
14862 : 0 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14863 : 0 : return true;
14864 : : }
14865 : : }
14866 : : }
14867 : : }
14868 : 488068 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
14869 : : {
14870 : 0 : {
14871 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
14872 : 0 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14873 : 0 : return true;
14874 : : }
14875 : : }
14876 : 488068 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
14877 : : {
14878 : 0 : {
14879 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q31, _q30 };
14880 : 0 : if (gimple_simplify_100 (res_op, seq, valueize, type, captures))
14881 : 0 : return true;
14882 : : }
14883 : : }
14884 : 10102215 : break;
14885 : : }
14886 : 2216 : case MINUS_EXPR:
14887 : 2216 : {
14888 : 2216 : tree _q30 = gimple_assign_rhs1 (_a1);
14889 : 2216 : _q30 = do_valueize (valueize, _q30);
14890 : 2216 : tree _q31 = gimple_assign_rhs2 (_a1);
14891 : 2216 : _q31 = do_valueize (valueize, _q31);
14892 : 2216 : {
14893 : 2216 : tree _q30_pops[1];
14894 : 2216 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
14895 : : {
14896 : 143 : tree _q40 = _q30_pops[0];
14897 : 143 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
14898 : : {
14899 : 4 : {
14900 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q31 };
14901 : 4 : if (gimple_simplify_101 (res_op, seq, valueize, type, captures))
14902 : 2 : return true;
14903 : : }
14904 : : }
14905 : : }
14906 : : }
14907 : 2214 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
14908 : : {
14909 : 0 : {
14910 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
14911 : 0 : if (gimple_simplify_101 (res_op, seq, valueize, type, captures))
14912 : 0 : return true;
14913 : : }
14914 : : }
14915 : : break;
14916 : : }
14917 : : default:;
14918 : : }
14919 : : }
14920 : : break;
14921 : : default:;
14922 : : }
14923 : : }
14924 : : }
14925 : 10102215 : switch (TREE_CODE (_p1))
14926 : : {
14927 : 9513337 : case SSA_NAME:
14928 : 9513337 : if (gimple *_d1 = get_def (valueize, _p1))
14929 : : {
14930 : 7340898 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14931 : 7935438 : switch (gimple_assign_rhs_code (_a1))
14932 : : {
14933 : 692717 : case PLUS_EXPR:
14934 : 692717 : {
14935 : 692717 : tree _q30 = gimple_assign_rhs1 (_a1);
14936 : 692717 : _q30 = do_valueize (valueize, _q30);
14937 : 692717 : tree _q31 = gimple_assign_rhs2 (_a1);
14938 : 692717 : _q31 = do_valueize (valueize, _q31);
14939 : 692717 : if (tree_swap_operands_p (_q30, _q31))
14940 : 10522 : std::swap (_q30, _q31);
14941 : 692717 : {
14942 : 692717 : tree _q30_pops[1];
14943 : 692717 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
14944 : : {
14945 : 28409 : tree _q40 = _q30_pops[0];
14946 : 28409 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
14947 : : {
14948 : 0 : {
14949 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
14950 : 0 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
14951 : 0 : return true;
14952 : : }
14953 : : }
14954 : : }
14955 : : }
14956 : 692717 : {
14957 : 692717 : tree _q31_pops[1];
14958 : 692717 : if (gimple_nop_convert (_q31, _q31_pops, valueize))
14959 : : {
14960 : 12252 : tree _q50 = _q31_pops[0];
14961 : 12252 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
14962 : : {
14963 : 0 : {
14964 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
14965 : 0 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
14966 : 0 : return true;
14967 : : }
14968 : : }
14969 : : }
14970 : : }
14971 : 692717 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
14972 : : {
14973 : 2537 : {
14974 : 2537 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
14975 : 2537 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
14976 : 2347 : return true;
14977 : : }
14978 : : }
14979 : 690370 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
14980 : : {
14981 : 1190 : {
14982 : 1190 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
14983 : 1190 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
14984 : 814 : return true;
14985 : : }
14986 : : }
14987 : 10096488 : break;
14988 : : }
14989 : 111486 : case MINUS_EXPR:
14990 : 111486 : {
14991 : 111486 : tree _q30 = gimple_assign_rhs1 (_a1);
14992 : 111486 : _q30 = do_valueize (valueize, _q30);
14993 : 111486 : tree _q31 = gimple_assign_rhs2 (_a1);
14994 : 111486 : _q31 = do_valueize (valueize, _q31);
14995 : 111486 : {
14996 : 111486 : tree _q30_pops[1];
14997 : 111486 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
14998 : : {
14999 : 3828 : tree _q40 = _q30_pops[0];
15000 : 3828 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
15001 : : {
15002 : 0 : {
15003 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
15004 : 0 : if (gimple_simplify_103 (res_op, seq, valueize, type, captures))
15005 : 0 : return true;
15006 : : }
15007 : : }
15008 : : }
15009 : : }
15010 : 111486 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
15011 : : {
15012 : 3180 : {
15013 : 3180 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
15014 : 3180 : if (gimple_simplify_103 (res_op, seq, valueize, type, captures))
15015 : 2566 : return true;
15016 : : }
15017 : : }
15018 : : break;
15019 : : }
15020 : : default:;
15021 : : }
15022 : : }
15023 : : break;
15024 : 10096488 : default:;
15025 : : }
15026 : 10096488 : {
15027 : 10096488 : tree _p1_pops[1];
15028 : 10096488 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
15029 : : {
15030 : 1434368 : tree _q30 = _p1_pops[0];
15031 : 1434368 : switch (TREE_CODE (_q30))
15032 : : {
15033 : 1349242 : case SSA_NAME:
15034 : 1349242 : if (gimple *_d1 = get_def (valueize, _q30))
15035 : : {
15036 : 1328364 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15037 : 1362410 : switch (gimple_assign_rhs_code (_a1))
15038 : : {
15039 : 628107 : case PLUS_EXPR:
15040 : 628107 : {
15041 : 628107 : tree _q40 = gimple_assign_rhs1 (_a1);
15042 : 628107 : _q40 = do_valueize (valueize, _q40);
15043 : 628107 : tree _q41 = gimple_assign_rhs2 (_a1);
15044 : 628107 : _q41 = do_valueize (valueize, _q41);
15045 : 628107 : if (tree_swap_operands_p (_q40, _q41))
15046 : 52134 : std::swap (_q40, _q41);
15047 : 628107 : {
15048 : 628107 : tree _q40_pops[1];
15049 : 628107 : if (gimple_nop_convert (_q40, _q40_pops, valueize))
15050 : : {
15051 : 4346 : tree _q50 = _q40_pops[0];
15052 : 4346 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
15053 : : {
15054 : 4 : {
15055 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
15056 : 4 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
15057 : 2 : return true;
15058 : : }
15059 : : }
15060 : : }
15061 : : }
15062 : 628105 : {
15063 : 628105 : tree _q41_pops[1];
15064 : 628105 : if (gimple_nop_convert (_q41, _q41_pops, valueize))
15065 : : {
15066 : 899 : tree _q60 = _q41_pops[0];
15067 : 899 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
15068 : : {
15069 : 0 : {
15070 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
15071 : 0 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
15072 : 0 : return true;
15073 : : }
15074 : : }
15075 : : }
15076 : : }
15077 : 628105 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
15078 : : {
15079 : 0 : {
15080 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
15081 : 0 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
15082 : 0 : return true;
15083 : : }
15084 : : }
15085 : 628105 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
15086 : : {
15087 : 0 : {
15088 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q40 };
15089 : 0 : if (gimple_simplify_102 (res_op, seq, valueize, type, captures))
15090 : 0 : return true;
15091 : : }
15092 : : }
15093 : 10096482 : break;
15094 : : }
15095 : 7670 : case MINUS_EXPR:
15096 : 7670 : {
15097 : 7670 : tree _q40 = gimple_assign_rhs1 (_a1);
15098 : 7670 : _q40 = do_valueize (valueize, _q40);
15099 : 7670 : tree _q41 = gimple_assign_rhs2 (_a1);
15100 : 7670 : _q41 = do_valueize (valueize, _q41);
15101 : 7670 : {
15102 : 7670 : tree _q40_pops[1];
15103 : 7670 : if (gimple_nop_convert (_q40, _q40_pops, valueize))
15104 : : {
15105 : 2043 : tree _q50 = _q40_pops[0];
15106 : 2043 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
15107 : : {
15108 : 4 : {
15109 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
15110 : 4 : if (gimple_simplify_103 (res_op, seq, valueize, type, captures))
15111 : 4 : return true;
15112 : : }
15113 : : }
15114 : : }
15115 : : }
15116 : 7666 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
15117 : : {
15118 : 0 : {
15119 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q41 };
15120 : 0 : if (gimple_simplify_103 (res_op, seq, valueize, type, captures))
15121 : 0 : return true;
15122 : : }
15123 : : }
15124 : : break;
15125 : : }
15126 : : default:;
15127 : : }
15128 : : }
15129 : : break;
15130 : : default:;
15131 : : }
15132 : : }
15133 : : }
15134 : 10096482 : switch (TREE_CODE (_p0))
15135 : : {
15136 : 8241709 : case SSA_NAME:
15137 : 8241709 : if (gimple *_d1 = get_def (valueize, _p0))
15138 : : {
15139 : 6550545 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15140 : 7424247 : switch (gimple_assign_rhs_code (_a1))
15141 : : {
15142 : 1311927 : case PLUS_EXPR:
15143 : 1311927 : {
15144 : 1311927 : tree _q20 = gimple_assign_rhs1 (_a1);
15145 : 1311927 : _q20 = do_valueize (valueize, _q20);
15146 : 1311927 : tree _q21 = gimple_assign_rhs2 (_a1);
15147 : 1311927 : _q21 = do_valueize (valueize, _q21);
15148 : 1311927 : if (tree_swap_operands_p (_q20, _q21))
15149 : 102900 : std::swap (_q20, _q21);
15150 : 1311927 : switch (TREE_CODE (_p1))
15151 : : {
15152 : 1303883 : case SSA_NAME:
15153 : 1303883 : if (gimple *_d2 = get_def (valueize, _p1))
15154 : : {
15155 : 1249185 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15156 : 1447741 : switch (gimple_assign_rhs_code (_a2))
15157 : : {
15158 : 2076 : case MINUS_EXPR:
15159 : 2076 : {
15160 : 2076 : tree _q50 = gimple_assign_rhs1 (_a2);
15161 : 2076 : _q50 = do_valueize (valueize, _q50);
15162 : 2076 : tree _q51 = gimple_assign_rhs2 (_a2);
15163 : 2076 : _q51 = do_valueize (valueize, _q51);
15164 : 2076 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
15165 : : {
15166 : 55 : {
15167 : 55 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
15168 : 55 : if (gimple_simplify_104 (res_op, seq, valueize, type, captures))
15169 : 55 : return true;
15170 : : }
15171 : : }
15172 : 2021 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
15173 : : {
15174 : 121 : {
15175 : 121 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
15176 : 121 : if (gimple_simplify_104 (res_op, seq, valueize, type, captures))
15177 : 121 : return true;
15178 : : }
15179 : : }
15180 : : break;
15181 : : }
15182 : : default:;
15183 : : }
15184 : : }
15185 : : break;
15186 : 1311751 : default:;
15187 : : }
15188 : 1311751 : if (CONSTANT_CLASS_P (_q21))
15189 : : {
15190 : 499080 : if (CONSTANT_CLASS_P (_p1))
15191 : : {
15192 : 2624 : {
15193 : 2624 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15194 : 2624 : if (gimple_simplify_65 (res_op, seq, valueize, type, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR))
15195 : 0 : return true;
15196 : : }
15197 : : }
15198 : : }
15199 : 10051101 : break;
15200 : : }
15201 : 145471 : case MINUS_EXPR:
15202 : 145471 : {
15203 : 145471 : tree _q20 = gimple_assign_rhs1 (_a1);
15204 : 145471 : _q20 = do_valueize (valueize, _q20);
15205 : 145471 : tree _q21 = gimple_assign_rhs2 (_a1);
15206 : 145471 : _q21 = do_valueize (valueize, _q21);
15207 : 145471 : if (CONSTANT_CLASS_P (_q21))
15208 : : {
15209 : 5961 : if (CONSTANT_CLASS_P (_p1))
15210 : : {
15211 : 1950 : {
15212 : 1950 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15213 : 1950 : if (gimple_simplify_65 (res_op, seq, valueize, type, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR))
15214 : 20 : return true;
15215 : : }
15216 : : }
15217 : : }
15218 : 145451 : if (CONSTANT_CLASS_P (_q20))
15219 : : {
15220 : 11718 : if (CONSTANT_CLASS_P (_p1))
15221 : : {
15222 : 268 : {
15223 : 268 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15224 : 268 : if (gimple_simplify_66 (res_op, seq, valueize, type, captures, MINUS_EXPR))
15225 : 2 : return true;
15226 : : }
15227 : : }
15228 : : }
15229 : : break;
15230 : : }
15231 : 1161330 : CASE_CONVERT:
15232 : 1161330 : {
15233 : 1161330 : tree _q20 = gimple_assign_rhs1 (_a1);
15234 : 1161330 : _q20 = do_valueize (valueize, _q20);
15235 : 1161330 : switch (TREE_CODE (_p1))
15236 : : {
15237 : 1151831 : case SSA_NAME:
15238 : 1151831 : if (gimple *_d2 = get_def (valueize, _p1))
15239 : : {
15240 : 1123112 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15241 : 1104065 : switch (gimple_assign_rhs_code (_a2))
15242 : : {
15243 : 967142 : CASE_CONVERT:
15244 : 967142 : {
15245 : 967142 : tree _q40 = gimple_assign_rhs1 (_a2);
15246 : 967142 : _q40 = do_valueize (valueize, _q40);
15247 : 967142 : {
15248 : 967142 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
15249 : 967142 : if (gimple_simplify_71 (res_op, seq, valueize, type, captures, MINUS_EXPR))
15250 : 35872 : return true;
15251 : : }
15252 : 931270 : break;
15253 : : }
15254 : : default:;
15255 : : }
15256 : : }
15257 : : break;
15258 : 1125458 : default:;
15259 : : }
15260 : 1125458 : switch (TREE_CODE (_q20))
15261 : : {
15262 : 1123432 : case SSA_NAME:
15263 : 1123432 : if (gimple *_d2 = get_def (valueize, _q20))
15264 : : {
15265 : 1093895 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15266 : 1357896 : switch (gimple_assign_rhs_code (_a2))
15267 : : {
15268 : 792 : case NEGATE_EXPR:
15269 : 792 : {
15270 : 792 : tree _q30 = gimple_assign_rhs1 (_a2);
15271 : 792 : _q30 = do_valueize (valueize, _q30);
15272 : 792 : if (integer_each_onep (_p1))
15273 : : {
15274 : 0 : {
15275 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
15276 : 0 : if (gimple_simplify_106 (res_op, seq, valueize, type, captures))
15277 : 0 : return true;
15278 : : }
15279 : : }
15280 : : break;
15281 : : }
15282 : 462394 : case PLUS_EXPR:
15283 : 462394 : {
15284 : 462394 : tree _q30 = gimple_assign_rhs1 (_a2);
15285 : 462394 : _q30 = do_valueize (valueize, _q30);
15286 : 462394 : tree _q31 = gimple_assign_rhs2 (_a2);
15287 : 462394 : _q31 = do_valueize (valueize, _q31);
15288 : 462394 : if (tree_swap_operands_p (_q30, _q31))
15289 : 65206 : std::swap (_q30, _q31);
15290 : 462394 : switch (TREE_CODE (_p1))
15291 : : {
15292 : 462394 : case SSA_NAME:
15293 : 462394 : if (gimple *_d3 = get_def (valueize, _p1))
15294 : : {
15295 : 462075 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
15296 : 461460 : switch (gimple_assign_rhs_code (_a3))
15297 : : {
15298 : 457649 : CASE_CONVERT:
15299 : 457649 : {
15300 : 457649 : tree _q60 = gimple_assign_rhs1 (_a3);
15301 : 457649 : _q60 = do_valueize (valueize, _q60);
15302 : 457649 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
15303 : : {
15304 : 1148 : {
15305 : 1148 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
15306 : 1148 : if (gimple_simplify_107 (res_op, seq, valueize, type, captures))
15307 : 325 : return true;
15308 : : }
15309 : : }
15310 : 457324 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
15311 : : {
15312 : 225 : {
15313 : 225 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
15314 : 225 : if (gimple_simplify_107 (res_op, seq, valueize, type, captures))
15315 : 21 : return true;
15316 : : }
15317 : : }
15318 : : break;
15319 : : }
15320 : : default:;
15321 : : }
15322 : : }
15323 : : break;
15324 : 462048 : default:;
15325 : : }
15326 : 462048 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q30, 0))
15327 : : {
15328 : 0 : {
15329 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
15330 : 0 : if (gimple_simplify_107 (res_op, seq, valueize, type, captures))
15331 : 0 : return true;
15332 : : }
15333 : : }
15334 : 462048 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
15335 : : {
15336 : 0 : {
15337 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
15338 : 0 : if (gimple_simplify_107 (res_op, seq, valueize, type, captures))
15339 : 0 : return true;
15340 : : }
15341 : : }
15342 : 1116172 : break;
15343 : : }
15344 : 25908 : case POINTER_PLUS_EXPR:
15345 : 25908 : {
15346 : 25908 : tree _q30 = gimple_assign_rhs1 (_a2);
15347 : 25908 : _q30 = do_valueize (valueize, _q30);
15348 : 25908 : tree _q31 = gimple_assign_rhs2 (_a2);
15349 : 25908 : _q31 = do_valueize (valueize, _q31);
15350 : 25908 : switch (TREE_CODE (_p1))
15351 : : {
15352 : 25908 : case SSA_NAME:
15353 : 25908 : if (gimple *_d3 = get_def (valueize, _p1))
15354 : : {
15355 : 25527 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
15356 : 25624 : switch (gimple_assign_rhs_code (_a3))
15357 : : {
15358 : 19332 : CASE_CONVERT:
15359 : 19332 : {
15360 : 19332 : tree _q60 = gimple_assign_rhs1 (_a3);
15361 : 19332 : _q60 = do_valueize (valueize, _q60);
15362 : 19332 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
15363 : : {
15364 : 8940 : {
15365 : 8940 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
15366 : 8940 : if (!TYPE_SATURATING (type)
15367 : : )
15368 : : {
15369 : 8940 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
15370 : 17880 : && !FIXED_POINT_TYPE_P (type)
15371 : : )
15372 : : {
15373 : 8940 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
15374 : 8940 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
15375 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
15376 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
15377 : : )
15378 : : {
15379 : 8940 : gimple_seq *lseq = seq;
15380 : 8940 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2196;
15381 : 8940 : {
15382 : 8940 : res_op->set_op (NOP_EXPR, type, 1);
15383 : 8940 : res_op->ops[0] = captures[1];
15384 : 8940 : res_op->resimplify (lseq, valueize);
15385 : 8940 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1098, __FILE__, __LINE__, true);
15386 : 8940 : return true;
15387 : : }
15388 : 0 : next_after_fail2196:;
15389 : : }
15390 : : }
15391 : : }
15392 : : }
15393 : : }
15394 : : break;
15395 : : }
15396 : : default:;
15397 : : }
15398 : : }
15399 : : break;
15400 : : default:;
15401 : : }
15402 : : break;
15403 : : }
15404 : : default:;
15405 : : }
15406 : : }
15407 : : break;
15408 : 1116172 : default:;
15409 : : }
15410 : 1116172 : switch (TREE_CODE (_p1))
15411 : : {
15412 : 1106673 : case SSA_NAME:
15413 : 1106673 : if (gimple *_d2 = get_def (valueize, _p1))
15414 : : {
15415 : 1077954 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15416 : 1058907 : switch (gimple_assign_rhs_code (_a2))
15417 : : {
15418 : 921984 : CASE_CONVERT:
15419 : 921984 : {
15420 : 921984 : tree _q40 = gimple_assign_rhs1 (_a2);
15421 : 921984 : _q40 = do_valueize (valueize, _q40);
15422 : 921984 : switch (TREE_CODE (_q40))
15423 : : {
15424 : 907420 : case SSA_NAME:
15425 : 907420 : if (gimple *_d3 = get_def (valueize, _q40))
15426 : : {
15427 : 893940 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
15428 : 996017 : switch (gimple_assign_rhs_code (_a3))
15429 : : {
15430 : 458379 : case PLUS_EXPR:
15431 : 458379 : {
15432 : 458379 : tree _q50 = gimple_assign_rhs1 (_a3);
15433 : 458379 : _q50 = do_valueize (valueize, _q50);
15434 : 458379 : tree _q51 = gimple_assign_rhs2 (_a3);
15435 : 458379 : _q51 = do_valueize (valueize, _q51);
15436 : 458379 : if (tree_swap_operands_p (_q50, _q51))
15437 : 124 : std::swap (_q50, _q51);
15438 : 458379 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
15439 : : {
15440 : 53 : {
15441 : 53 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
15442 : 53 : if (gimple_simplify_108 (res_op, seq, valueize, type, captures))
15443 : 19 : return true;
15444 : : }
15445 : : }
15446 : 458360 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
15447 : : {
15448 : 103 : {
15449 : 103 : tree captures[3] ATTRIBUTE_UNUSED = { _q51, _q50, _q20 };
15450 : 103 : if (gimple_simplify_108 (res_op, seq, valueize, type, captures))
15451 : 6 : return true;
15452 : : }
15453 : : }
15454 : 10051101 : break;
15455 : : }
15456 : : default:;
15457 : : }
15458 : : }
15459 : : break;
15460 : : default:;
15461 : : }
15462 : : break;
15463 : : }
15464 : : default:;
15465 : : }
15466 : : }
15467 : : break;
15468 : : default:;
15469 : : }
15470 : : break;
15471 : : }
15472 : 59027 : case NEGATE_EXPR:
15473 : 59027 : {
15474 : 59027 : tree _q20 = gimple_assign_rhs1 (_a1);
15475 : 59027 : _q20 = do_valueize (valueize, _q20);
15476 : 59027 : if (integer_each_onep (_p1))
15477 : : {
15478 : 9 : {
15479 : 9 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
15480 : 9 : if (gimple_simplify_106 (res_op, seq, valueize, type, captures))
15481 : 0 : return true;
15482 : : }
15483 : : }
15484 : : break;
15485 : : }
15486 : : default:;
15487 : : }
15488 : : }
15489 : : break;
15490 : 10051101 : default:;
15491 : : }
15492 : 10051101 : {
15493 : 10051101 : tree _p0_pops[1];
15494 : 10051101 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
15495 : : {
15496 : 946752 : tree _q20 = _p0_pops[0];
15497 : 946752 : switch (TREE_CODE (_q20))
15498 : : {
15499 : 944726 : case SSA_NAME:
15500 : 944726 : if (gimple *_d1 = get_def (valueize, _q20))
15501 : : {
15502 : 921806 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15503 : 1145049 : switch (gimple_assign_rhs_code (_a1))
15504 : : {
15505 : 456444 : case PLUS_EXPR:
15506 : 456444 : {
15507 : 456444 : tree _q30 = gimple_assign_rhs1 (_a1);
15508 : 456444 : _q30 = do_valueize (valueize, _q30);
15509 : 456444 : tree _q31 = gimple_assign_rhs2 (_a1);
15510 : 456444 : _q31 = do_valueize (valueize, _q31);
15511 : 456444 : if (tree_swap_operands_p (_q30, _q31))
15512 : 64965 : std::swap (_q30, _q31);
15513 : 456444 : if (CONSTANT_CLASS_P (_q31))
15514 : : {
15515 : 27676 : if (CONSTANT_CLASS_P (_p1))
15516 : : {
15517 : 0 : {
15518 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
15519 : 0 : if (gimple_simplify_65 (res_op, seq, valueize, type, captures, PLUS_EXPR, MINUS_EXPR, MINUS_EXPR))
15520 : 0 : return true;
15521 : : }
15522 : : }
15523 : : }
15524 : 10051101 : break;
15525 : : }
15526 : 1859 : case MINUS_EXPR:
15527 : 1859 : {
15528 : 1859 : tree _q30 = gimple_assign_rhs1 (_a1);
15529 : 1859 : _q30 = do_valueize (valueize, _q30);
15530 : 1859 : tree _q31 = gimple_assign_rhs2 (_a1);
15531 : 1859 : _q31 = do_valueize (valueize, _q31);
15532 : 1859 : if (CONSTANT_CLASS_P (_q31))
15533 : : {
15534 : 100 : if (CONSTANT_CLASS_P (_p1))
15535 : : {
15536 : 0 : {
15537 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
15538 : 0 : if (gimple_simplify_65 (res_op, seq, valueize, type, captures, MINUS_EXPR, PLUS_EXPR, MINUS_EXPR))
15539 : 0 : return true;
15540 : : }
15541 : : }
15542 : : }
15543 : 1859 : if (CONSTANT_CLASS_P (_q30))
15544 : : {
15545 : 267 : if (CONSTANT_CLASS_P (_p1))
15546 : : {
15547 : 0 : {
15548 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
15549 : 0 : if (gimple_simplify_66 (res_op, seq, valueize, type, captures, MINUS_EXPR))
15550 : 0 : return true;
15551 : : }
15552 : : }
15553 : : }
15554 : : break;
15555 : : }
15556 : : default:;
15557 : : }
15558 : : }
15559 : : break;
15560 : : default:;
15561 : : }
15562 : : }
15563 : : }
15564 : 10051101 : if (CONSTANT_CLASS_P (_p0))
15565 : : {
15566 : 1710593 : switch (TREE_CODE (_p1))
15567 : : {
15568 : 1677932 : case SSA_NAME:
15569 : 1677932 : if (gimple *_d1 = get_def (valueize, _p1))
15570 : : {
15571 : 1223743 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15572 : 1155534 : switch (gimple_assign_rhs_code (_a1))
15573 : : {
15574 : 62933 : case MINUS_EXPR:
15575 : 62933 : {
15576 : 62933 : tree _q30 = gimple_assign_rhs1 (_a1);
15577 : 62933 : _q30 = do_valueize (valueize, _q30);
15578 : 62933 : tree _q31 = gimple_assign_rhs2 (_a1);
15579 : 62933 : _q31 = do_valueize (valueize, _q31);
15580 : 62933 : if (CONSTANT_CLASS_P (_q30))
15581 : : {
15582 : 1294 : {
15583 : 1294 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
15584 : 1294 : if (gimple_simplify_105 (res_op, seq, valueize, type, captures))
15585 : 788 : return true;
15586 : : }
15587 : : }
15588 : : break;
15589 : : }
15590 : : default:;
15591 : : }
15592 : : }
15593 : : break;
15594 : 1709805 : default:;
15595 : : }
15596 : 1709805 : {
15597 : 1709805 : tree _p1_pops[1];
15598 : 1709805 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
15599 : : {
15600 : 260861 : tree _q30 = _p1_pops[0];
15601 : 260861 : switch (TREE_CODE (_q30))
15602 : : {
15603 : 251869 : case SSA_NAME:
15604 : 251869 : if (gimple *_d1 = get_def (valueize, _q30))
15605 : : {
15606 : 1878676 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15607 : 185169 : switch (gimple_assign_rhs_code (_a1))
15608 : : {
15609 : 1822 : case MINUS_EXPR:
15610 : 1822 : {
15611 : 1822 : tree _q40 = gimple_assign_rhs1 (_a1);
15612 : 1822 : _q40 = do_valueize (valueize, _q40);
15613 : 1822 : tree _q41 = gimple_assign_rhs2 (_a1);
15614 : 1822 : _q41 = do_valueize (valueize, _q41);
15615 : 1822 : if (CONSTANT_CLASS_P (_q40))
15616 : : {
15617 : 390 : {
15618 : 390 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
15619 : 390 : if (gimple_simplify_105 (res_op, seq, valueize, type, captures))
15620 : 277 : return true;
15621 : : }
15622 : : }
15623 : : break;
15624 : : }
15625 : : default:;
15626 : : }
15627 : : }
15628 : : break;
15629 : : default:;
15630 : : }
15631 : : }
15632 : : }
15633 : : }
15634 : 10050036 : if (integer_all_onesp (_p0))
15635 : : {
15636 : 249624 : {
15637 : 249624 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
15638 : 249624 : if (!TYPE_SATURATING (type)
15639 : : )
15640 : : {
15641 : 249624 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
15642 : 499248 : && !FIXED_POINT_TYPE_P (type)
15643 : : )
15644 : : {
15645 : 249624 : if (TREE_CODE (type) != COMPLEX_TYPE
15646 : : )
15647 : : {
15648 : 249590 : gimple_seq *lseq = seq;
15649 : 249590 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2197;
15650 : 249590 : {
15651 : 249590 : res_op->set_op (BIT_NOT_EXPR, type, 1);
15652 : 249590 : res_op->ops[0] = captures[0];
15653 : 249590 : res_op->resimplify (lseq, valueize);
15654 : 249590 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1099, __FILE__, __LINE__, true);
15655 : 249590 : return true;
15656 : : }
15657 : 0 : next_after_fail2197:;
15658 : : }
15659 : : }
15660 : : }
15661 : : }
15662 : : }
15663 : 9800446 : switch (TREE_CODE (_p1))
15664 : : {
15665 : 9211590 : case SSA_NAME:
15666 : 9211590 : if (gimple *_d1 = get_def (valueize, _p1))
15667 : : {
15668 : 7049226 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15669 : 7687096 : switch (gimple_assign_rhs_code (_a1))
15670 : : {
15671 : 1742898 : CASE_CONVERT:
15672 : 1742898 : {
15673 : 1742898 : tree _q30 = gimple_assign_rhs1 (_a1);
15674 : 1742898 : _q30 = do_valueize (valueize, _q30);
15675 : 1742898 : switch (TREE_CODE (_q30))
15676 : : {
15677 : 1658042 : case SSA_NAME:
15678 : 1658042 : if (gimple *_d2 = get_def (valueize, _q30))
15679 : : {
15680 : 1625822 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15681 : 1640956 : switch (gimple_assign_rhs_code (_a2))
15682 : : {
15683 : 612060 : case PLUS_EXPR:
15684 : 612060 : {
15685 : 612060 : tree _q40 = gimple_assign_rhs1 (_a2);
15686 : 612060 : _q40 = do_valueize (valueize, _q40);
15687 : 612060 : tree _q41 = gimple_assign_rhs2 (_a2);
15688 : 612060 : _q41 = do_valueize (valueize, _q41);
15689 : 612060 : if (tree_swap_operands_p (_q40, _q41))
15690 : 52352 : std::swap (_q40, _q41);
15691 : 612060 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
15692 : : {
15693 : 0 : {
15694 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _p0 };
15695 : 0 : if (gimple_simplify_108 (res_op, seq, valueize, type, captures))
15696 : 0 : return true;
15697 : : }
15698 : : }
15699 : 612060 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
15700 : : {
15701 : 1021 : {
15702 : 1021 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _p0 };
15703 : 1021 : if (gimple_simplify_108 (res_op, seq, valueize, type, captures))
15704 : 693 : return true;
15705 : : }
15706 : : }
15707 : 9799753 : break;
15708 : : }
15709 : : default:;
15710 : : }
15711 : : }
15712 : : break;
15713 : : default:;
15714 : : }
15715 : : break;
15716 : : }
15717 : : default:;
15718 : : }
15719 : : }
15720 : : break;
15721 : 9799753 : default:;
15722 : : }
15723 : 9799753 : switch (TREE_CODE (_p0))
15724 : : {
15725 : 8196328 : case SSA_NAME:
15726 : 8196328 : if (gimple *_d1 = get_def (valueize, _p0))
15727 : : {
15728 : 6505164 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15729 : 7378866 : switch (gimple_assign_rhs_code (_a1))
15730 : : {
15731 : 1116147 : CASE_CONVERT:
15732 : 1116147 : {
15733 : 1116147 : tree _q20 = gimple_assign_rhs1 (_a1);
15734 : 1116147 : _q20 = do_valueize (valueize, _q20);
15735 : 1116147 : switch (TREE_CODE (_p1))
15736 : : {
15737 : 1106648 : case SSA_NAME:
15738 : 1106648 : if (gimple *_d2 = get_def (valueize, _p1))
15739 : : {
15740 : 1077929 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15741 : 1058882 : switch (gimple_assign_rhs_code (_a2))
15742 : : {
15743 : 921959 : CASE_CONVERT:
15744 : 921959 : {
15745 : 921959 : tree _q40 = gimple_assign_rhs1 (_a2);
15746 : 921959 : _q40 = do_valueize (valueize, _q40);
15747 : 921959 : switch (TREE_CODE (_q40))
15748 : : {
15749 : 907395 : case SSA_NAME:
15750 : 907395 : if (gimple *_d3 = get_def (valueize, _q40))
15751 : : {
15752 : 893915 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
15753 : 995992 : switch (gimple_assign_rhs_code (_a3))
15754 : : {
15755 : 4721 : case POINTER_PLUS_EXPR:
15756 : 4721 : {
15757 : 4721 : tree _q50 = gimple_assign_rhs1 (_a3);
15758 : 4721 : _q50 = do_valueize (valueize, _q50);
15759 : 4721 : tree _q51 = gimple_assign_rhs2 (_a3);
15760 : 4721 : _q51 = do_valueize (valueize, _q51);
15761 : 4721 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
15762 : : {
15763 : 113 : {
15764 : 113 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
15765 : 113 : if (!TYPE_SATURATING (type)
15766 : : )
15767 : : {
15768 : 113 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
15769 : 226 : && !FIXED_POINT_TYPE_P (type)
15770 : : )
15771 : : {
15772 : 113 : if (INTEGRAL_TYPE_P (type)
15773 : 113 : && TYPE_OVERFLOW_UNDEFINED (type)
15774 : 20 : && TREE_CODE (captures[1]) != INTEGER_CST
15775 : 133 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
15776 : : )
15777 : : {
15778 : 20 : {
15779 : 20 : tree utype = unsigned_type_for (type);
15780 : 20 : gimple_seq *lseq = seq;
15781 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2198;
15782 : 20 : {
15783 : 20 : res_op->set_op (NOP_EXPR, type, 1);
15784 : 20 : {
15785 : 20 : tree _o1[1], _r1;
15786 : 20 : {
15787 : 20 : tree _o2[1], _r2;
15788 : 20 : _o2[0] = captures[1];
15789 : 20 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
15790 : 20 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
15791 : : {
15792 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
15793 : 0 : tem_op.resimplify (lseq, valueize);
15794 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15795 : 0 : if (!_r2) goto next_after_fail2198;
15796 : : }
15797 : : else
15798 : : _r2 = _o2[0];
15799 : 20 : _o1[0] = _r2;
15800 : : }
15801 : 20 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
15802 : 20 : (*res_op).ops[0] = _o1[0];
15803 : 20 : (*res_op).resimplify (lseq, valueize);
15804 : : }
15805 : 20 : if (type != res_op->type
15806 : 20 : && !useless_type_conversion_p (type, res_op->type))
15807 : : {
15808 : 20 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2198;
15809 : 2 : res_op->set_op (NOP_EXPR, type, 1);
15810 : 2 : res_op->resimplify (lseq, valueize);
15811 : : }
15812 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1100, __FILE__, __LINE__, true);
15813 : 2 : return true;
15814 : : }
15815 : 18 : next_after_fail2198:;
15816 : : }
15817 : : }
15818 : : else
15819 : : {
15820 : 93 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
15821 : 93 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
15822 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
15823 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0)
15824 : : )
15825 : : {
15826 : 93 : gimple_seq *lseq = seq;
15827 : 93 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2199;
15828 : 93 : {
15829 : 93 : res_op->set_op (NEGATE_EXPR, type, 1);
15830 : 93 : {
15831 : 93 : tree _o1[1], _r1;
15832 : 93 : _o1[0] = captures[1];
15833 : 93 : if (type != TREE_TYPE (_o1[0]) /* XXX */
15834 : 93 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
15835 : : {
15836 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
15837 : 0 : tem_op.resimplify (lseq, valueize);
15838 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15839 : 0 : if (!_r1) goto next_after_fail2199;
15840 : : }
15841 : : else
15842 : : _r1 = _o1[0];
15843 : 93 : res_op->ops[0] = _r1;
15844 : : }
15845 : 93 : res_op->resimplify (lseq, valueize);
15846 : 93 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1101, __FILE__, __LINE__, true);
15847 : 93 : return true;
15848 : : }
15849 : 18 : next_after_fail2199:;
15850 : : }
15851 : : }
15852 : : }
15853 : : }
15854 : : }
15855 : : }
15856 : : break;
15857 : : }
15858 : : default:;
15859 : : }
15860 : : }
15861 : : break;
15862 : : default:;
15863 : : }
15864 : : break;
15865 : : }
15866 : : default:;
15867 : : }
15868 : : }
15869 : : break;
15870 : 1116052 : default:;
15871 : : }
15872 : 1116052 : switch (TREE_CODE (_q20))
15873 : : {
15874 : 1114026 : case SSA_NAME:
15875 : 1114026 : if (gimple *_d2 = get_def (valueize, _q20))
15876 : : {
15877 : 1084489 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15878 : 1348430 : switch (gimple_assign_rhs_code (_a2))
15879 : : {
15880 : 462047 : case PLUS_EXPR:
15881 : 462047 : {
15882 : 462047 : tree _q30 = gimple_assign_rhs1 (_a2);
15883 : 462047 : _q30 = do_valueize (valueize, _q30);
15884 : 462047 : tree _q31 = gimple_assign_rhs2 (_a2);
15885 : 462047 : _q31 = do_valueize (valueize, _q31);
15886 : 462047 : if (tree_swap_operands_p (_q30, _q31))
15887 : 65203 : std::swap (_q30, _q31);
15888 : 462047 : switch (TREE_CODE (_p1))
15889 : : {
15890 : 462047 : case SSA_NAME:
15891 : 462047 : if (gimple *_d3 = get_def (valueize, _p1))
15892 : : {
15893 : 461728 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
15894 : 461113 : switch (gimple_assign_rhs_code (_a3))
15895 : : {
15896 : 457302 : CASE_CONVERT:
15897 : 457302 : {
15898 : 457302 : tree _q60 = gimple_assign_rhs1 (_a3);
15899 : 457302 : _q60 = do_valueize (valueize, _q60);
15900 : 457302 : switch (TREE_CODE (_q60))
15901 : : {
15902 : 457302 : case SSA_NAME:
15903 : 457302 : if (gimple *_d4 = get_def (valueize, _q60))
15904 : : {
15905 : 457231 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
15906 : 458981 : switch (gimple_assign_rhs_code (_a4))
15907 : : {
15908 : 452753 : case PLUS_EXPR:
15909 : 452753 : {
15910 : 452753 : tree _q70 = gimple_assign_rhs1 (_a4);
15911 : 452753 : _q70 = do_valueize (valueize, _q70);
15912 : 452753 : tree _q71 = gimple_assign_rhs2 (_a4);
15913 : 452753 : _q71 = do_valueize (valueize, _q71);
15914 : 452753 : if (tree_swap_operands_p (_q70, _q71))
15915 : 37 : std::swap (_q70, _q71);
15916 : 452753 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
15917 : : {
15918 : 10858 : {
15919 : 10858 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
15920 : 10858 : if (gimple_simplify_109 (res_op, seq, valueize, type, captures))
15921 : 59 : return true;
15922 : : }
15923 : : }
15924 : 452694 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q30, 0))
15925 : : {
15926 : 10 : {
15927 : 10 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q70, _q30 };
15928 : 10 : if (gimple_simplify_109 (res_op, seq, valueize, type, captures))
15929 : 4 : return true;
15930 : : }
15931 : : }
15932 : 452690 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q31, 0))
15933 : : {
15934 : 14 : {
15935 : 14 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q71, _q31 };
15936 : 14 : if (gimple_simplify_109 (res_op, seq, valueize, type, captures))
15937 : 2 : return true;
15938 : : }
15939 : : }
15940 : 452688 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q31, 0))
15941 : : {
15942 : 9245 : {
15943 : 9245 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q70, _q31 };
15944 : 9245 : if (gimple_simplify_109 (res_op, seq, valueize, type, captures))
15945 : 2742 : return true;
15946 : : }
15947 : : }
15948 : 9782745 : break;
15949 : : }
15950 : : default:;
15951 : : }
15952 : : }
15953 : : break;
15954 : : default:;
15955 : : }
15956 : : break;
15957 : : }
15958 : : default:;
15959 : : }
15960 : : }
15961 : : break;
15962 : : default:;
15963 : : }
15964 : 9782745 : break;
15965 : : }
15966 : 16957 : case POINTER_PLUS_EXPR:
15967 : 16957 : {
15968 : 16957 : tree _q30 = gimple_assign_rhs1 (_a2);
15969 : 16957 : _q30 = do_valueize (valueize, _q30);
15970 : 16957 : tree _q31 = gimple_assign_rhs2 (_a2);
15971 : 16957 : _q31 = do_valueize (valueize, _q31);
15972 : 16957 : switch (TREE_CODE (_p1))
15973 : : {
15974 : 16957 : case SSA_NAME:
15975 : 16957 : if (gimple *_d3 = get_def (valueize, _p1))
15976 : : {
15977 : 16576 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
15978 : 16673 : switch (gimple_assign_rhs_code (_a3))
15979 : : {
15980 : 10381 : CASE_CONVERT:
15981 : 10381 : {
15982 : 10381 : tree _q60 = gimple_assign_rhs1 (_a3);
15983 : 10381 : _q60 = do_valueize (valueize, _q60);
15984 : 10381 : switch (TREE_CODE (_q60))
15985 : : {
15986 : 6174 : case SSA_NAME:
15987 : 6174 : if (gimple *_d4 = get_def (valueize, _q60))
15988 : : {
15989 : 6064 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
15990 : 6980 : switch (gimple_assign_rhs_code (_a4))
15991 : : {
15992 : 3672 : case POINTER_PLUS_EXPR:
15993 : 3672 : {
15994 : 3672 : tree _q70 = gimple_assign_rhs1 (_a4);
15995 : 3672 : _q70 = do_valueize (valueize, _q70);
15996 : 3672 : tree _q71 = gimple_assign_rhs2 (_a4);
15997 : 3672 : _q71 = do_valueize (valueize, _q71);
15998 : 3672 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
15999 : : {
16000 : 1531 : {
16001 : 1531 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
16002 : 1531 : if (!TYPE_SATURATING (type)
16003 : : )
16004 : : {
16005 : 1531 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
16006 : 3062 : && !FIXED_POINT_TYPE_P (type)
16007 : : )
16008 : : {
16009 : 1531 : if (INTEGRAL_TYPE_P (type)
16010 : 1531 : && TYPE_OVERFLOW_UNDEFINED (type)
16011 : 1545 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
16012 : : )
16013 : : {
16014 : 14 : {
16015 : 14 : tree utype = unsigned_type_for (type);
16016 : 14 : gimple_seq *lseq = seq;
16017 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2200;
16018 : 14 : {
16019 : 14 : res_op->set_op (NOP_EXPR, type, 1);
16020 : 14 : {
16021 : 14 : tree _o1[2], _r1;
16022 : 14 : {
16023 : 14 : tree _o2[1], _r2;
16024 : 14 : _o2[0] = captures[1];
16025 : 14 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
16026 : 14 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
16027 : : {
16028 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
16029 : 0 : tem_op.resimplify (lseq, valueize);
16030 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16031 : 0 : if (!_r2) goto next_after_fail2200;
16032 : : }
16033 : : else
16034 : : _r2 = _o2[0];
16035 : 14 : _o1[0] = _r2;
16036 : : }
16037 : 14 : {
16038 : 14 : tree _o2[1], _r2;
16039 : 14 : _o2[0] = captures[2];
16040 : 14 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
16041 : 14 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
16042 : : {
16043 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
16044 : 0 : tem_op.resimplify (lseq, valueize);
16045 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16046 : 0 : if (!_r2) goto next_after_fail2200;
16047 : : }
16048 : : else
16049 : : _r2 = _o2[0];
16050 : 14 : _o1[1] = _r2;
16051 : : }
16052 : 14 : (*res_op).set_op (MINUS_EXPR, TREE_TYPE (_o1[0]), 2);
16053 : 14 : (*res_op).ops[0] = _o1[0];
16054 : 14 : (*res_op).ops[1] = _o1[1];
16055 : 14 : (*res_op).resimplify (lseq, valueize);
16056 : : }
16057 : 14 : if (type != res_op->type
16058 : 14 : && !useless_type_conversion_p (type, res_op->type))
16059 : : {
16060 : 14 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2200;
16061 : 9 : res_op->set_op (NOP_EXPR, type, 1);
16062 : 9 : res_op->resimplify (lseq, valueize);
16063 : : }
16064 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1102, __FILE__, __LINE__, true);
16065 : 9 : return true;
16066 : : }
16067 : 5 : next_after_fail2200:;
16068 : : }
16069 : : }
16070 : : else
16071 : : {
16072 : 1517 : if (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
16073 : 1517 : || (POINTER_TYPE_P (TREE_TYPE (captures[0]))
16074 : 0 : && TREE_CODE (captures[1]) == INTEGER_CST
16075 : 0 : && tree_int_cst_sign_bit (captures[1]) == 0
16076 : 0 : && TREE_CODE (captures[2]) == INTEGER_CST
16077 : 0 : && tree_int_cst_sign_bit (captures[2]) == 0)
16078 : : )
16079 : : {
16080 : 1517 : gimple_seq *lseq = seq;
16081 : 1517 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2201;
16082 : 1517 : {
16083 : 1517 : res_op->set_op (MINUS_EXPR, type, 2);
16084 : 1517 : {
16085 : 1517 : tree _o1[1], _r1;
16086 : 1517 : _o1[0] = captures[1];
16087 : 1517 : if (type != TREE_TYPE (_o1[0]) /* XXX */
16088 : 1517 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
16089 : : {
16090 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
16091 : 8 : tem_op.resimplify (lseq, valueize);
16092 : 8 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16093 : 8 : if (!_r1) goto next_after_fail2201;
16094 : : }
16095 : : else
16096 : : _r1 = _o1[0];
16097 : 1517 : res_op->ops[0] = _r1;
16098 : : }
16099 : 1517 : {
16100 : 1517 : tree _o1[1], _r1;
16101 : 1517 : _o1[0] = captures[2];
16102 : 1517 : if (type != TREE_TYPE (_o1[0]) /* XXX */
16103 : 1517 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
16104 : : {
16105 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
16106 : 8 : tem_op.resimplify (lseq, valueize);
16107 : 8 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16108 : 8 : if (!_r1) goto next_after_fail2201;
16109 : : }
16110 : : else
16111 : : _r1 = _o1[0];
16112 : 1517 : res_op->ops[1] = _r1;
16113 : : }
16114 : 1517 : res_op->resimplify (lseq, valueize);
16115 : 1517 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1103, __FILE__, __LINE__, true);
16116 : 1517 : return true;
16117 : : }
16118 : 5 : next_after_fail2201:;
16119 : : }
16120 : : }
16121 : : }
16122 : : }
16123 : : }
16124 : : }
16125 : : break;
16126 : : }
16127 : : default:;
16128 : : }
16129 : : }
16130 : : break;
16131 : : default:;
16132 : : }
16133 : : break;
16134 : : }
16135 : : default:;
16136 : : }
16137 : : }
16138 : : break;
16139 : : default:;
16140 : : }
16141 : : break;
16142 : : }
16143 : : default:;
16144 : : }
16145 : : }
16146 : : break;
16147 : : default:;
16148 : : }
16149 : : break;
16150 : : }
16151 : 820739 : case MULT_EXPR:
16152 : 820739 : {
16153 : 820739 : tree _q20 = gimple_assign_rhs1 (_a1);
16154 : 820739 : _q20 = do_valueize (valueize, _q20);
16155 : 820739 : tree _q21 = gimple_assign_rhs2 (_a1);
16156 : 820739 : _q21 = do_valueize (valueize, _q21);
16157 : 820739 : if (tree_swap_operands_p (_q20, _q21))
16158 : 31179 : std::swap (_q20, _q21);
16159 : 820739 : switch (TREE_CODE (_p1))
16160 : : {
16161 : 777105 : case SSA_NAME:
16162 : 777105 : if (gimple *_d2 = get_def (valueize, _p1))
16163 : : {
16164 : 760580 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16165 : 787972 : switch (gimple_assign_rhs_code (_a2))
16166 : : {
16167 : 601102 : case MULT_EXPR:
16168 : 601102 : {
16169 : 601102 : tree _q50 = gimple_assign_rhs1 (_a2);
16170 : 601102 : _q50 = do_valueize (valueize, _q50);
16171 : 601102 : tree _q51 = gimple_assign_rhs2 (_a2);
16172 : 601102 : _q51 = do_valueize (valueize, _q51);
16173 : 601102 : if (tree_swap_operands_p (_q50, _q51))
16174 : 4029 : std::swap (_q50, _q51);
16175 : 601102 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
16176 : : {
16177 : 1951 : {
16178 : 1951 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
16179 : 1951 : if (gimple_simplify_74 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16180 : 29 : return true;
16181 : : }
16182 : : }
16183 : 601073 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
16184 : : {
16185 : 6810 : {
16186 : 6810 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
16187 : 6810 : if (gimple_simplify_74 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16188 : 5 : return true;
16189 : : }
16190 : : }
16191 : 601068 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
16192 : : {
16193 : 2572 : {
16194 : 2572 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q51 };
16195 : 2572 : if (gimple_simplify_74 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16196 : 2 : return true;
16197 : : }
16198 : : }
16199 : 601066 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
16200 : : {
16201 : 524934 : {
16202 : 524934 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q20, _p1, _q50 };
16203 : 524934 : if (gimple_simplify_74 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16204 : 12544 : return true;
16205 : : }
16206 : : }
16207 : 9782745 : break;
16208 : : }
16209 : : default:;
16210 : : }
16211 : : }
16212 : : break;
16213 : : default:;
16214 : : }
16215 : 9782745 : break;
16216 : : }
16217 : : default:;
16218 : : }
16219 : : }
16220 : : break;
16221 : 9782745 : default:;
16222 : : }
16223 : 9782745 : switch (TREE_CODE (_p1))
16224 : : {
16225 : 9193889 : case SSA_NAME:
16226 : 9193889 : if (gimple *_d1 = get_def (valueize, _p1))
16227 : : {
16228 : 7031525 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16229 : 7669395 : switch (gimple_assign_rhs_code (_a1))
16230 : : {
16231 : 1195898 : case MULT_EXPR:
16232 : 1195898 : {
16233 : 1195898 : tree _q30 = gimple_assign_rhs1 (_a1);
16234 : 1195898 : _q30 = do_valueize (valueize, _q30);
16235 : 1195898 : tree _q31 = gimple_assign_rhs2 (_a1);
16236 : 1195898 : _q31 = do_valueize (valueize, _q31);
16237 : 1195898 : if (tree_swap_operands_p (_q30, _q31))
16238 : 24572 : std::swap (_q30, _q31);
16239 : 1195898 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
16240 : : {
16241 : 14345 : {
16242 : 14345 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
16243 : 14345 : if (gimple_simplify_75 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16244 : 86 : return true;
16245 : : }
16246 : : }
16247 : 1195812 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
16248 : : {
16249 : 6499 : {
16250 : 6499 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
16251 : 6499 : if (gimple_simplify_75 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16252 : 41 : return true;
16253 : : }
16254 : : }
16255 : 9782618 : break;
16256 : : }
16257 : : default:;
16258 : : }
16259 : : }
16260 : : break;
16261 : 9782618 : default:;
16262 : : }
16263 : 9782618 : switch (TREE_CODE (_p0))
16264 : : {
16265 : 8179233 : case SSA_NAME:
16266 : 8179233 : if (gimple *_d1 = get_def (valueize, _p0))
16267 : : {
16268 : 6488070 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16269 : 7361770 : switch (gimple_assign_rhs_code (_a1))
16270 : : {
16271 : 808159 : case MULT_EXPR:
16272 : 808159 : {
16273 : 808159 : tree _q20 = gimple_assign_rhs1 (_a1);
16274 : 808159 : _q20 = do_valueize (valueize, _q20);
16275 : 808159 : tree _q21 = gimple_assign_rhs2 (_a1);
16276 : 808159 : _q21 = do_valueize (valueize, _q21);
16277 : 808159 : if (tree_swap_operands_p (_q20, _q21))
16278 : 31177 : std::swap (_q20, _q21);
16279 : 808159 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
16280 : : {
16281 : 31710 : {
16282 : 31710 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
16283 : 31710 : if (gimple_simplify_76 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16284 : 13245 : return true;
16285 : : }
16286 : : }
16287 : 794914 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
16288 : : {
16289 : 17022 : {
16290 : 17022 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
16291 : 17022 : if (gimple_simplify_76 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16292 : 2290 : return true;
16293 : : }
16294 : : }
16295 : 9767083 : break;
16296 : : }
16297 : : default:;
16298 : : }
16299 : : }
16300 : : break;
16301 : 9767083 : default:;
16302 : : }
16303 : 9767083 : switch (TREE_CODE (_p1))
16304 : : {
16305 : 9178227 : case SSA_NAME:
16306 : 9178227 : if (gimple *_d1 = get_def (valueize, _p1))
16307 : : {
16308 : 7018542 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16309 : 7666825 : switch (gimple_assign_rhs_code (_a1))
16310 : : {
16311 : 1195747 : case MULT_EXPR:
16312 : 1195747 : {
16313 : 1195747 : tree _q30 = gimple_assign_rhs1 (_a1);
16314 : 1195747 : _q30 = do_valueize (valueize, _q30);
16315 : 1195747 : tree _q31 = gimple_assign_rhs2 (_a1);
16316 : 1195747 : _q31 = do_valueize (valueize, _q31);
16317 : 1195747 : if (tree_swap_operands_p (_q30, _q31))
16318 : 24546 : std::swap (_q30, _q31);
16319 : 1195747 : switch (TREE_CODE (_q30))
16320 : : {
16321 : 1195521 : case SSA_NAME:
16322 : 1195521 : if (gimple *_d2 = get_def (valueize, _q30))
16323 : : {
16324 : 1157731 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16325 : 1334977 : switch (gimple_assign_rhs_code (_a2))
16326 : : {
16327 : 14377 : case MINUS_EXPR:
16328 : 14377 : {
16329 : 14377 : tree _q40 = gimple_assign_rhs1 (_a2);
16330 : 14377 : _q40 = do_valueize (valueize, _q40);
16331 : 14377 : tree _q41 = gimple_assign_rhs2 (_a2);
16332 : 14377 : _q41 = do_valueize (valueize, _q41);
16333 : 14377 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
16334 : : {
16335 : 502 : if (gimple_zero_one_valued_p (_q31, valueize))
16336 : : {
16337 : 0 : {
16338 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
16339 : 0 : if (gimple_simplify_110 (res_op, seq, valueize, type, captures))
16340 : 0 : return true;
16341 : : }
16342 : : }
16343 : : }
16344 : : break;
16345 : : }
16346 : : default:;
16347 : : }
16348 : : }
16349 : : break;
16350 : 1195747 : default:;
16351 : : }
16352 : 1195747 : if (gimple_zero_one_valued_p (_q30, valueize))
16353 : : {
16354 : 201 : switch (TREE_CODE (_q31))
16355 : : {
16356 : 114 : case SSA_NAME:
16357 : 114 : if (gimple *_d2 = get_def (valueize, _q31))
16358 : : {
16359 : 114 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16360 : 18 : switch (gimple_assign_rhs_code (_a2))
16361 : : {
16362 : 18 : case MINUS_EXPR:
16363 : 18 : {
16364 : 18 : tree _q50 = gimple_assign_rhs1 (_a2);
16365 : 18 : _q50 = do_valueize (valueize, _q50);
16366 : 18 : tree _q51 = gimple_assign_rhs2 (_a2);
16367 : 18 : _q51 = do_valueize (valueize, _q51);
16368 : 18 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
16369 : : {
16370 : 18 : {
16371 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q51, _q30 };
16372 : 18 : if (gimple_simplify_110 (res_op, seq, valueize, type, captures))
16373 : 18 : return true;
16374 : : }
16375 : : }
16376 : : break;
16377 : : }
16378 : : default:;
16379 : : }
16380 : : }
16381 : : break;
16382 : : default:;
16383 : : }
16384 : : }
16385 : 9767065 : break;
16386 : : }
16387 : : default:;
16388 : : }
16389 : : }
16390 : : break;
16391 : 9767065 : default:;
16392 : : }
16393 : 9767065 : switch (TREE_CODE (_p0))
16394 : : {
16395 : 8163680 : case SSA_NAME:
16396 : 8163680 : if (gimple *_d1 = get_def (valueize, _p0))
16397 : : {
16398 : 6472517 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16399 : 7346235 : switch (gimple_assign_rhs_code (_a1))
16400 : : {
16401 : 3189 : case VEC_COND_EXPR:
16402 : 3189 : {
16403 : 3189 : tree _q20 = gimple_assign_rhs1 (_a1);
16404 : 3189 : _q20 = do_valueize (valueize, _q20);
16405 : 3189 : tree _q21 = gimple_assign_rhs2 (_a1);
16406 : 3189 : _q21 = do_valueize (valueize, _q21);
16407 : 3189 : tree _q22 = gimple_assign_rhs3 (_a1);
16408 : 3189 : _q22 = do_valueize (valueize, _q22);
16409 : 3189 : switch (TREE_CODE (_p1))
16410 : : {
16411 : 2116 : case SSA_NAME:
16412 : 2116 : if (gimple *_d2 = get_def (valueize, _p1))
16413 : : {
16414 : 1911 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16415 : 2057 : switch (gimple_assign_rhs_code (_a2))
16416 : : {
16417 : 1723 : case VEC_COND_EXPR:
16418 : 1723 : {
16419 : 1723 : tree _q60 = gimple_assign_rhs1 (_a2);
16420 : 1723 : _q60 = do_valueize (valueize, _q60);
16421 : 1723 : tree _q61 = gimple_assign_rhs2 (_a2);
16422 : 1723 : _q61 = do_valueize (valueize, _q61);
16423 : 1723 : tree _q62 = gimple_assign_rhs3 (_a2);
16424 : 1723 : _q62 = do_valueize (valueize, _q62);
16425 : 1723 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
16426 : : {
16427 : 96 : {
16428 : 96 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
16429 : 96 : if (VECTOR_TYPE_P (type)
16430 : 96 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
16431 : : || types_match (type, TREE_TYPE (captures[2]))
16432 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
16433 : : || (optimize_vectors_before_lowering_p ()
16434 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
16435 : : )
16436 : : {
16437 : 96 : gimple_seq *lseq = seq;
16438 : 96 : if (lseq
16439 : 32 : && (!single_use (captures[0])
16440 : 0 : || !single_use (captures[4])))
16441 : 96 : lseq = NULL;
16442 : 96 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2202;
16443 : 96 : {
16444 : 96 : res_op->set_op (VEC_COND_EXPR, type, 3);
16445 : 96 : res_op->ops[0] = captures[1];
16446 : 96 : {
16447 : 96 : tree _o1[2], _r1;
16448 : 96 : _o1[0] = captures[2];
16449 : 96 : _o1[1] = captures[5];
16450 : 96 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16451 : 96 : tem_op.resimplify (NULL, valueize);
16452 : 96 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16453 : 96 : if (!_r1) goto next_after_fail2202;
16454 : 0 : res_op->ops[1] = _r1;
16455 : : }
16456 : 0 : {
16457 : 0 : tree _o1[2], _r1;
16458 : 0 : _o1[0] = captures[3];
16459 : 0 : _o1[1] = captures[6];
16460 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16461 : 0 : tem_op.resimplify (NULL, valueize);
16462 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16463 : 0 : if (!_r1) goto next_after_fail2202;
16464 : 0 : res_op->ops[2] = _r1;
16465 : : }
16466 : 0 : res_op->resimplify (lseq, valueize);
16467 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1060, __FILE__, __LINE__, true);
16468 : 0 : return true;
16469 : : }
16470 : 96 : next_after_fail2202:;
16471 : : }
16472 : : }
16473 : : }
16474 : : break;
16475 : : }
16476 : : default:;
16477 : : }
16478 : : }
16479 : : break;
16480 : 3189 : default:;
16481 : : }
16482 : 3189 : {
16483 : 3189 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
16484 : 3189 : if (VECTOR_TYPE_P (type)
16485 : 3189 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
16486 : : || types_match (type, TREE_TYPE (captures[2]))
16487 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
16488 : : || (optimize_vectors_before_lowering_p ()
16489 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
16490 : : )
16491 : : {
16492 : 3189 : gimple_seq *lseq = seq;
16493 : 3189 : if (lseq
16494 : 1223 : && (!single_use (captures[0])))
16495 : 2211 : lseq = NULL;
16496 : 3189 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2203;
16497 : 3189 : {
16498 : 3189 : res_op->set_op (VEC_COND_EXPR, type, 3);
16499 : 3189 : res_op->ops[0] = captures[1];
16500 : 3189 : {
16501 : 3189 : tree _o1[2], _r1;
16502 : 3189 : _o1[0] = captures[2];
16503 : 3189 : _o1[1] = captures[4];
16504 : 3189 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16505 : 3189 : tem_op.resimplify (NULL, valueize);
16506 : 3189 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16507 : 3189 : if (!_r1) goto next_after_fail2203;
16508 : 1073 : res_op->ops[1] = _r1;
16509 : : }
16510 : 1073 : {
16511 : 1073 : tree _o1[2], _r1;
16512 : 1073 : _o1[0] = captures[3];
16513 : 1073 : _o1[1] = captures[4];
16514 : 1073 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16515 : 1073 : tem_op.resimplify (NULL, valueize);
16516 : 1073 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16517 : 1073 : if (!_r1) goto next_after_fail2203;
16518 : 1073 : res_op->ops[2] = _r1;
16519 : : }
16520 : 1073 : res_op->resimplify (lseq, valueize);
16521 : 1073 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1062, __FILE__, __LINE__, true);
16522 : 1073 : return true;
16523 : : }
16524 : 2116 : next_after_fail2203:;
16525 : : }
16526 : : }
16527 : 2116 : break;
16528 : : }
16529 : : default:;
16530 : : }
16531 : : }
16532 : : break;
16533 : 9765992 : default:;
16534 : : }
16535 : 9765992 : if (integer_zerop (_p0))
16536 : : {
16537 : 22934 : {
16538 : 22934 : tree captures[1] ATTRIBUTE_UNUSED = { _p1 };
16539 : 22934 : gimple_seq *lseq = seq;
16540 : 22934 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2204;
16541 : 22934 : {
16542 : 22934 : res_op->set_op (NEGATE_EXPR, type, 1);
16543 : 22934 : res_op->ops[0] = captures[0];
16544 : 22934 : res_op->resimplify (lseq, valueize);
16545 : 22934 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1104, __FILE__, __LINE__, true);
16546 : 22934 : return true;
16547 : : }
16548 : 0 : next_after_fail2204:;
16549 : : }
16550 : : }
16551 : 9743058 : if (real_zerop (_p0))
16552 : : {
16553 : 9925 : {
16554 : 9925 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16555 : 9925 : if (fold_real_zero_addition_p (type, captures[1], captures[0], 0)
16556 : : )
16557 : : {
16558 : 122 : gimple_seq *lseq = seq;
16559 : 122 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2205;
16560 : 122 : {
16561 : 122 : res_op->set_op (NEGATE_EXPR, type, 1);
16562 : 122 : res_op->ops[0] = captures[1];
16563 : 122 : res_op->resimplify (lseq, valueize);
16564 : 122 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1105, __FILE__, __LINE__, true);
16565 : 122 : return true;
16566 : : }
16567 : 0 : next_after_fail2205:;
16568 : : }
16569 : : }
16570 : : }
16571 : 9742936 : switch (TREE_CODE (_p1))
16572 : : {
16573 : 9155153 : case SSA_NAME:
16574 : 9155153 : if (gimple *_d1 = get_def (valueize, _p1))
16575 : : {
16576 : 7007745 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16577 : 7655484 : switch (gimple_assign_rhs_code (_a1))
16578 : : {
16579 : 6127 : case VEC_COND_EXPR:
16580 : 6127 : {
16581 : 6127 : tree _q30 = gimple_assign_rhs1 (_a1);
16582 : 6127 : _q30 = do_valueize (valueize, _q30);
16583 : 6127 : tree _q31 = gimple_assign_rhs2 (_a1);
16584 : 6127 : _q31 = do_valueize (valueize, _q31);
16585 : 6127 : tree _q32 = gimple_assign_rhs3 (_a1);
16586 : 6127 : _q32 = do_valueize (valueize, _q32);
16587 : 6127 : {
16588 : 6127 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
16589 : 6127 : if (VECTOR_TYPE_P (type)
16590 : 6127 : && (TREE_CODE_CLASS (MINUS_EXPR) != tcc_comparison
16591 : : || types_match (type, TREE_TYPE (captures[3]))
16592 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
16593 : : || (optimize_vectors_before_lowering_p ()
16594 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
16595 : : )
16596 : : {
16597 : 6127 : gimple_seq *lseq = seq;
16598 : 6127 : if (lseq
16599 : 2457 : && (!single_use (captures[1])))
16600 : 3735 : lseq = NULL;
16601 : 6127 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2206;
16602 : 6127 : {
16603 : 6127 : res_op->set_op (VEC_COND_EXPR, type, 3);
16604 : 6127 : res_op->ops[0] = captures[2];
16605 : 6127 : {
16606 : 6127 : tree _o1[2], _r1;
16607 : 6127 : _o1[0] = captures[0];
16608 : 6127 : _o1[1] = captures[3];
16609 : 6127 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16610 : 6127 : tem_op.resimplify (NULL, valueize);
16611 : 6127 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16612 : 6127 : if (!_r1) goto next_after_fail2206;
16613 : 1651 : res_op->ops[1] = _r1;
16614 : : }
16615 : 1651 : {
16616 : 1651 : tree _o1[2], _r1;
16617 : 1651 : _o1[0] = captures[0];
16618 : 1651 : _o1[1] = captures[4];
16619 : 1651 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16620 : 1651 : tem_op.resimplify (NULL, valueize);
16621 : 1651 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16622 : 1651 : if (!_r1) goto next_after_fail2206;
16623 : 1627 : res_op->ops[2] = _r1;
16624 : : }
16625 : 1627 : res_op->resimplify (lseq, valueize);
16626 : 1627 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1063, __FILE__, __LINE__, true);
16627 : 1627 : return true;
16628 : : }
16629 : 4500 : next_after_fail2206:;
16630 : : }
16631 : : }
16632 : 4500 : if (integer_each_onep (_q31))
16633 : : {
16634 : 72 : if (integer_zerop (_q32))
16635 : : {
16636 : 72 : {
16637 : 72 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
16638 : 72 : if (gimple_simplify_111 (res_op, seq, valueize, type, captures))
16639 : 0 : return true;
16640 : : }
16641 : : }
16642 : : }
16643 : : break;
16644 : : }
16645 : 5771 : case VIEW_CONVERT_EXPR:
16646 : 5771 : {
16647 : 5771 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
16648 : 5771 : if ((TREE_CODE (_q30) == SSA_NAME
16649 : 5771 : || is_gimple_min_invariant (_q30)))
16650 : : {
16651 : 5755 : _q30 = do_valueize (valueize, _q30);
16652 : 5755 : switch (TREE_CODE (_q30))
16653 : : {
16654 : 5755 : case SSA_NAME:
16655 : 5755 : if (gimple *_d2 = get_def (valueize, _q30))
16656 : : {
16657 : 5475 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16658 : 4919 : switch (gimple_assign_rhs_code (_a2))
16659 : : {
16660 : 33 : case VEC_COND_EXPR:
16661 : 33 : {
16662 : 33 : tree _q40 = gimple_assign_rhs1 (_a2);
16663 : 33 : _q40 = do_valueize (valueize, _q40);
16664 : 33 : tree _q41 = gimple_assign_rhs2 (_a2);
16665 : 33 : _q41 = do_valueize (valueize, _q41);
16666 : 33 : tree _q42 = gimple_assign_rhs3 (_a2);
16667 : 33 : _q42 = do_valueize (valueize, _q42);
16668 : 33 : if (integer_each_onep (_q41))
16669 : : {
16670 : 0 : if (integer_zerop (_q42))
16671 : : {
16672 : 0 : {
16673 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42 };
16674 : 0 : if (gimple_simplify_111 (res_op, seq, valueize, type, captures))
16675 : 0 : return true;
16676 : : }
16677 : : }
16678 : : }
16679 : : break;
16680 : : }
16681 : : default:;
16682 : : }
16683 : : }
16684 : : break;
16685 : : default:;
16686 : : }
16687 : : }
16688 : : break;
16689 : : }
16690 : : default:;
16691 : : }
16692 : : }
16693 : : break;
16694 : 9741309 : default:;
16695 : : }
16696 : 9741309 : switch (TREE_CODE (_p0))
16697 : : {
16698 : 8162607 : case SSA_NAME:
16699 : 8162607 : if (gimple *_d1 = get_def (valueize, _p0))
16700 : : {
16701 : 6471444 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16702 : 7345162 : switch (gimple_assign_rhs_code (_a1))
16703 : : {
16704 : 14580 : case RDIV_EXPR:
16705 : 14580 : {
16706 : 14580 : tree _q20 = gimple_assign_rhs1 (_a1);
16707 : 14580 : _q20 = do_valueize (valueize, _q20);
16708 : 14580 : tree _q21 = gimple_assign_rhs2 (_a1);
16709 : 14580 : _q21 = do_valueize (valueize, _q21);
16710 : 14580 : switch (TREE_CODE (_p1))
16711 : : {
16712 : 11919 : case SSA_NAME:
16713 : 11919 : if (gimple *_d2 = get_def (valueize, _p1))
16714 : : {
16715 : 11585 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16716 : 8330 : switch (gimple_assign_rhs_code (_a2))
16717 : : {
16718 : 2941 : case RDIV_EXPR:
16719 : 2941 : {
16720 : 2941 : tree _q50 = gimple_assign_rhs1 (_a2);
16721 : 2941 : _q50 = do_valueize (valueize, _q50);
16722 : 2941 : tree _q51 = gimple_assign_rhs2 (_a2);
16723 : 2941 : _q51 = do_valueize (valueize, _q51);
16724 : 2941 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
16725 : : {
16726 : 935 : {
16727 : 935 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
16728 : 935 : if (gimple_simplify_82 (res_op, seq, valueize, type, captures, MINUS_EXPR))
16729 : 0 : return true;
16730 : : }
16731 : : }
16732 : : break;
16733 : : }
16734 : : default:;
16735 : : }
16736 : : }
16737 : : break;
16738 : : default:;
16739 : : }
16740 : : break;
16741 : : }
16742 : 1311727 : case PLUS_EXPR:
16743 : 1311727 : {
16744 : 1311727 : tree _q20 = gimple_assign_rhs1 (_a1);
16745 : 1311727 : _q20 = do_valueize (valueize, _q20);
16746 : 1311727 : tree _q21 = gimple_assign_rhs2 (_a1);
16747 : 1311727 : _q21 = do_valueize (valueize, _q21);
16748 : 1311727 : if (tree_swap_operands_p (_q20, _q21))
16749 : 102900 : std::swap (_q20, _q21);
16750 : 1311727 : switch (TREE_CODE (_q20))
16751 : : {
16752 : 1311727 : case SSA_NAME:
16753 : 1311727 : if (gimple *_d2 = get_def (valueize, _q20))
16754 : : {
16755 : 1259267 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16756 : 4777 : switch (gimple_call_combined_fn (_c2))
16757 : : {
16758 : 0 : case CFN_BUILT_IN_POPCOUNT:
16759 : 0 : if (gimple_call_num_args (_c2) == 1)
16760 : : {
16761 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
16762 : 0 : _q30 = do_valueize (valueize, _q30);
16763 : 0 : switch (TREE_CODE (_q21))
16764 : : {
16765 : 0 : case SSA_NAME:
16766 : 0 : if (gimple *_d3 = get_def (valueize, _q21))
16767 : : {
16768 : 0 : if (gcall *_c3 = dyn_cast <gcall *> (_d3))
16769 : 0 : switch (gimple_call_combined_fn (_c3))
16770 : : {
16771 : 0 : case CFN_BUILT_IN_POPCOUNT:
16772 : 0 : if (gimple_call_num_args (_c3) == 1)
16773 : : {
16774 : 0 : tree _q50 = gimple_call_arg (_c3, 0);
16775 : 0 : _q50 = do_valueize (valueize, _q50);
16776 : 0 : switch (TREE_CODE (_p1))
16777 : : {
16778 : 0 : case SSA_NAME:
16779 : 0 : if (gimple *_d4 = get_def (valueize, _p1))
16780 : : {
16781 : 0 : if (gcall *_c4 = dyn_cast <gcall *> (_d4))
16782 : 0 : switch (gimple_call_combined_fn (_c4))
16783 : : {
16784 : 0 : case CFN_BUILT_IN_POPCOUNT:
16785 : 0 : if (gimple_call_num_args (_c4) == 1)
16786 : : {
16787 : 0 : tree _q70 = gimple_call_arg (_c4, 0);
16788 : 0 : _q70 = do_valueize (valueize, _q70);
16789 : 0 : switch (TREE_CODE (_q70))
16790 : : {
16791 : 0 : case SSA_NAME:
16792 : 0 : if (gimple *_d5 = get_def (valueize, _q70))
16793 : : {
16794 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
16795 : 0 : switch (gimple_assign_rhs_code (_a5))
16796 : : {
16797 : 0 : case BIT_AND_EXPR:
16798 : 0 : {
16799 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
16800 : 0 : _q80 = do_valueize (valueize, _q80);
16801 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
16802 : 0 : _q81 = do_valueize (valueize, _q81);
16803 : 0 : if (tree_swap_operands_p (_q80, _q81))
16804 : 0 : std::swap (_q80, _q81);
16805 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
16806 : : {
16807 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
16808 : : {
16809 : 0 : {
16810 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16811 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT))
16812 : 0 : return true;
16813 : : }
16814 : : }
16815 : : }
16816 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
16817 : : {
16818 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
16819 : : {
16820 : 0 : {
16821 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16822 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNT))
16823 : 0 : return true;
16824 : : }
16825 : : }
16826 : : }
16827 : 9741300 : break;
16828 : : }
16829 : 0 : case BIT_IOR_EXPR:
16830 : 0 : {
16831 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
16832 : 0 : _q80 = do_valueize (valueize, _q80);
16833 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
16834 : 0 : _q81 = do_valueize (valueize, _q81);
16835 : 0 : if (tree_swap_operands_p (_q80, _q81))
16836 : 0 : std::swap (_q80, _q81);
16837 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
16838 : : {
16839 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
16840 : : {
16841 : 0 : {
16842 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16843 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT))
16844 : 0 : return true;
16845 : : }
16846 : : }
16847 : : }
16848 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
16849 : : {
16850 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
16851 : : {
16852 : 0 : {
16853 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16854 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNT))
16855 : 0 : return true;
16856 : : }
16857 : : }
16858 : : }
16859 : 9741300 : break;
16860 : : }
16861 : : default:;
16862 : : }
16863 : : }
16864 : : break;
16865 : : default:;
16866 : : }
16867 : : }
16868 : : break;
16869 : : default:;
16870 : : }
16871 : : }
16872 : : break;
16873 : : default:;
16874 : : }
16875 : : }
16876 : : break;
16877 : : default:;
16878 : : }
16879 : : }
16880 : : break;
16881 : : default:;
16882 : : }
16883 : : }
16884 : : break;
16885 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
16886 : 0 : if (gimple_call_num_args (_c2) == 1)
16887 : : {
16888 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
16889 : 0 : _q30 = do_valueize (valueize, _q30);
16890 : 0 : switch (TREE_CODE (_q21))
16891 : : {
16892 : 0 : case SSA_NAME:
16893 : 0 : if (gimple *_d3 = get_def (valueize, _q21))
16894 : : {
16895 : 0 : if (gcall *_c3 = dyn_cast <gcall *> (_d3))
16896 : 0 : switch (gimple_call_combined_fn (_c3))
16897 : : {
16898 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
16899 : 0 : if (gimple_call_num_args (_c3) == 1)
16900 : : {
16901 : 0 : tree _q50 = gimple_call_arg (_c3, 0);
16902 : 0 : _q50 = do_valueize (valueize, _q50);
16903 : 0 : switch (TREE_CODE (_p1))
16904 : : {
16905 : 0 : case SSA_NAME:
16906 : 0 : if (gimple *_d4 = get_def (valueize, _p1))
16907 : : {
16908 : 0 : if (gcall *_c4 = dyn_cast <gcall *> (_d4))
16909 : 0 : switch (gimple_call_combined_fn (_c4))
16910 : : {
16911 : 0 : case CFN_BUILT_IN_POPCOUNTLL:
16912 : 0 : if (gimple_call_num_args (_c4) == 1)
16913 : : {
16914 : 0 : tree _q70 = gimple_call_arg (_c4, 0);
16915 : 0 : _q70 = do_valueize (valueize, _q70);
16916 : 0 : switch (TREE_CODE (_q70))
16917 : : {
16918 : 0 : case SSA_NAME:
16919 : 0 : if (gimple *_d5 = get_def (valueize, _q70))
16920 : : {
16921 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
16922 : 0 : switch (gimple_assign_rhs_code (_a5))
16923 : : {
16924 : 0 : case BIT_AND_EXPR:
16925 : 0 : {
16926 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
16927 : 0 : _q80 = do_valueize (valueize, _q80);
16928 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
16929 : 0 : _q81 = do_valueize (valueize, _q81);
16930 : 0 : if (tree_swap_operands_p (_q80, _q81))
16931 : 0 : std::swap (_q80, _q81);
16932 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
16933 : : {
16934 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
16935 : : {
16936 : 0 : {
16937 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16938 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL))
16939 : 0 : return true;
16940 : : }
16941 : : }
16942 : : }
16943 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
16944 : : {
16945 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
16946 : : {
16947 : 0 : {
16948 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16949 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTLL))
16950 : 0 : return true;
16951 : : }
16952 : : }
16953 : : }
16954 : 9741300 : break;
16955 : : }
16956 : 0 : case BIT_IOR_EXPR:
16957 : 0 : {
16958 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
16959 : 0 : _q80 = do_valueize (valueize, _q80);
16960 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
16961 : 0 : _q81 = do_valueize (valueize, _q81);
16962 : 0 : if (tree_swap_operands_p (_q80, _q81))
16963 : 0 : std::swap (_q80, _q81);
16964 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
16965 : : {
16966 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
16967 : : {
16968 : 0 : {
16969 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16970 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL))
16971 : 0 : return true;
16972 : : }
16973 : : }
16974 : : }
16975 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
16976 : : {
16977 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
16978 : : {
16979 : 0 : {
16980 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
16981 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTLL))
16982 : 0 : return true;
16983 : : }
16984 : : }
16985 : : }
16986 : 9741300 : break;
16987 : : }
16988 : : default:;
16989 : : }
16990 : : }
16991 : : break;
16992 : : default:;
16993 : : }
16994 : : }
16995 : : break;
16996 : : default:;
16997 : : }
16998 : : }
16999 : : break;
17000 : : default:;
17001 : : }
17002 : : }
17003 : : break;
17004 : : default:;
17005 : : }
17006 : : }
17007 : : break;
17008 : : default:;
17009 : : }
17010 : : }
17011 : : break;
17012 : 0 : case CFN_POPCOUNT:
17013 : 0 : if (gimple_call_num_args (_c2) == 1)
17014 : : {
17015 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
17016 : 0 : _q30 = do_valueize (valueize, _q30);
17017 : 0 : switch (TREE_CODE (_q21))
17018 : : {
17019 : 0 : case SSA_NAME:
17020 : 0 : if (gimple *_d3 = get_def (valueize, _q21))
17021 : : {
17022 : 0 : if (gcall *_c3 = dyn_cast <gcall *> (_d3))
17023 : 0 : switch (gimple_call_combined_fn (_c3))
17024 : : {
17025 : 0 : case CFN_POPCOUNT:
17026 : 0 : if (gimple_call_num_args (_c3) == 1)
17027 : : {
17028 : 0 : tree _q50 = gimple_call_arg (_c3, 0);
17029 : 0 : _q50 = do_valueize (valueize, _q50);
17030 : 0 : switch (TREE_CODE (_p1))
17031 : : {
17032 : 0 : case SSA_NAME:
17033 : 0 : if (gimple *_d4 = get_def (valueize, _p1))
17034 : : {
17035 : 0 : if (gcall *_c4 = dyn_cast <gcall *> (_d4))
17036 : 0 : switch (gimple_call_combined_fn (_c4))
17037 : : {
17038 : 0 : case CFN_POPCOUNT:
17039 : 0 : if (gimple_call_num_args (_c4) == 1)
17040 : : {
17041 : 0 : tree _q70 = gimple_call_arg (_c4, 0);
17042 : 0 : _q70 = do_valueize (valueize, _q70);
17043 : 0 : switch (TREE_CODE (_q70))
17044 : : {
17045 : 0 : case SSA_NAME:
17046 : 0 : if (gimple *_d5 = get_def (valueize, _q70))
17047 : : {
17048 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
17049 : 0 : switch (gimple_assign_rhs_code (_a5))
17050 : : {
17051 : 0 : case BIT_AND_EXPR:
17052 : 0 : {
17053 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
17054 : 0 : _q80 = do_valueize (valueize, _q80);
17055 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
17056 : 0 : _q81 = do_valueize (valueize, _q81);
17057 : 0 : if (tree_swap_operands_p (_q80, _q81))
17058 : 0 : std::swap (_q80, _q81);
17059 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
17060 : : {
17061 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
17062 : : {
17063 : 0 : {
17064 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17065 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT))
17066 : 0 : return true;
17067 : : }
17068 : : }
17069 : : }
17070 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
17071 : : {
17072 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
17073 : : {
17074 : 0 : {
17075 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17076 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_POPCOUNT))
17077 : 0 : return true;
17078 : : }
17079 : : }
17080 : : }
17081 : 9741300 : break;
17082 : : }
17083 : 0 : case BIT_IOR_EXPR:
17084 : 0 : {
17085 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
17086 : 0 : _q80 = do_valueize (valueize, _q80);
17087 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
17088 : 0 : _q81 = do_valueize (valueize, _q81);
17089 : 0 : if (tree_swap_operands_p (_q80, _q81))
17090 : 0 : std::swap (_q80, _q81);
17091 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
17092 : : {
17093 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
17094 : : {
17095 : 0 : {
17096 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17097 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT))
17098 : 0 : return true;
17099 : : }
17100 : : }
17101 : : }
17102 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
17103 : : {
17104 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
17105 : : {
17106 : 0 : {
17107 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17108 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_POPCOUNT))
17109 : 0 : return true;
17110 : : }
17111 : : }
17112 : : }
17113 : 9741300 : break;
17114 : : }
17115 : : default:;
17116 : : }
17117 : : }
17118 : : break;
17119 : : default:;
17120 : : }
17121 : : }
17122 : : break;
17123 : : default:;
17124 : : }
17125 : : }
17126 : : break;
17127 : : default:;
17128 : : }
17129 : : }
17130 : : break;
17131 : : default:;
17132 : : }
17133 : : }
17134 : : break;
17135 : : default:;
17136 : : }
17137 : : }
17138 : : break;
17139 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
17140 : 0 : if (gimple_call_num_args (_c2) == 1)
17141 : : {
17142 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
17143 : 0 : _q30 = do_valueize (valueize, _q30);
17144 : 0 : switch (TREE_CODE (_q21))
17145 : : {
17146 : 0 : case SSA_NAME:
17147 : 0 : if (gimple *_d3 = get_def (valueize, _q21))
17148 : : {
17149 : 0 : if (gcall *_c3 = dyn_cast <gcall *> (_d3))
17150 : 0 : switch (gimple_call_combined_fn (_c3))
17151 : : {
17152 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
17153 : 0 : if (gimple_call_num_args (_c3) == 1)
17154 : : {
17155 : 0 : tree _q50 = gimple_call_arg (_c3, 0);
17156 : 0 : _q50 = do_valueize (valueize, _q50);
17157 : 0 : switch (TREE_CODE (_p1))
17158 : : {
17159 : 0 : case SSA_NAME:
17160 : 0 : if (gimple *_d4 = get_def (valueize, _p1))
17161 : : {
17162 : 0 : if (gcall *_c4 = dyn_cast <gcall *> (_d4))
17163 : 0 : switch (gimple_call_combined_fn (_c4))
17164 : : {
17165 : 0 : case CFN_BUILT_IN_POPCOUNTIMAX:
17166 : 0 : if (gimple_call_num_args (_c4) == 1)
17167 : : {
17168 : 0 : tree _q70 = gimple_call_arg (_c4, 0);
17169 : 0 : _q70 = do_valueize (valueize, _q70);
17170 : 0 : switch (TREE_CODE (_q70))
17171 : : {
17172 : 0 : case SSA_NAME:
17173 : 0 : if (gimple *_d5 = get_def (valueize, _q70))
17174 : : {
17175 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
17176 : 0 : switch (gimple_assign_rhs_code (_a5))
17177 : : {
17178 : 0 : case BIT_AND_EXPR:
17179 : 0 : {
17180 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
17181 : 0 : _q80 = do_valueize (valueize, _q80);
17182 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
17183 : 0 : _q81 = do_valueize (valueize, _q81);
17184 : 0 : if (tree_swap_operands_p (_q80, _q81))
17185 : 0 : std::swap (_q80, _q81);
17186 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
17187 : : {
17188 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
17189 : : {
17190 : 0 : {
17191 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17192 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX))
17193 : 0 : return true;
17194 : : }
17195 : : }
17196 : : }
17197 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
17198 : : {
17199 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
17200 : : {
17201 : 0 : {
17202 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17203 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTIMAX))
17204 : 0 : return true;
17205 : : }
17206 : : }
17207 : : }
17208 : 9741300 : break;
17209 : : }
17210 : 0 : case BIT_IOR_EXPR:
17211 : 0 : {
17212 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
17213 : 0 : _q80 = do_valueize (valueize, _q80);
17214 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
17215 : 0 : _q81 = do_valueize (valueize, _q81);
17216 : 0 : if (tree_swap_operands_p (_q80, _q81))
17217 : 0 : std::swap (_q80, _q81);
17218 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
17219 : : {
17220 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
17221 : : {
17222 : 0 : {
17223 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17224 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX))
17225 : 0 : return true;
17226 : : }
17227 : : }
17228 : : }
17229 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
17230 : : {
17231 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
17232 : : {
17233 : 0 : {
17234 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17235 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTIMAX))
17236 : 0 : return true;
17237 : : }
17238 : : }
17239 : : }
17240 : 9741300 : break;
17241 : : }
17242 : : default:;
17243 : : }
17244 : : }
17245 : : break;
17246 : : default:;
17247 : : }
17248 : : }
17249 : : break;
17250 : : default:;
17251 : : }
17252 : : }
17253 : : break;
17254 : : default:;
17255 : : }
17256 : : }
17257 : : break;
17258 : : default:;
17259 : : }
17260 : : }
17261 : : break;
17262 : : default:;
17263 : : }
17264 : : }
17265 : : break;
17266 : 0 : case CFN_BUILT_IN_POPCOUNTL:
17267 : 0 : if (gimple_call_num_args (_c2) == 1)
17268 : : {
17269 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
17270 : 0 : _q30 = do_valueize (valueize, _q30);
17271 : 0 : switch (TREE_CODE (_q21))
17272 : : {
17273 : 0 : case SSA_NAME:
17274 : 0 : if (gimple *_d3 = get_def (valueize, _q21))
17275 : : {
17276 : 0 : if (gcall *_c3 = dyn_cast <gcall *> (_d3))
17277 : 0 : switch (gimple_call_combined_fn (_c3))
17278 : : {
17279 : 0 : case CFN_BUILT_IN_POPCOUNTL:
17280 : 0 : if (gimple_call_num_args (_c3) == 1)
17281 : : {
17282 : 0 : tree _q50 = gimple_call_arg (_c3, 0);
17283 : 0 : _q50 = do_valueize (valueize, _q50);
17284 : 0 : switch (TREE_CODE (_p1))
17285 : : {
17286 : 0 : case SSA_NAME:
17287 : 0 : if (gimple *_d4 = get_def (valueize, _p1))
17288 : : {
17289 : 0 : if (gcall *_c4 = dyn_cast <gcall *> (_d4))
17290 : 0 : switch (gimple_call_combined_fn (_c4))
17291 : : {
17292 : 0 : case CFN_BUILT_IN_POPCOUNTL:
17293 : 0 : if (gimple_call_num_args (_c4) == 1)
17294 : : {
17295 : 0 : tree _q70 = gimple_call_arg (_c4, 0);
17296 : 0 : _q70 = do_valueize (valueize, _q70);
17297 : 0 : switch (TREE_CODE (_q70))
17298 : : {
17299 : 0 : case SSA_NAME:
17300 : 0 : if (gimple *_d5 = get_def (valueize, _q70))
17301 : : {
17302 : 0 : if (gassign *_a5 = dyn_cast <gassign *> (_d5))
17303 : 0 : switch (gimple_assign_rhs_code (_a5))
17304 : : {
17305 : 0 : case BIT_AND_EXPR:
17306 : 0 : {
17307 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
17308 : 0 : _q80 = do_valueize (valueize, _q80);
17309 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
17310 : 0 : _q81 = do_valueize (valueize, _q81);
17311 : 0 : if (tree_swap_operands_p (_q80, _q81))
17312 : 0 : std::swap (_q80, _q81);
17313 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
17314 : : {
17315 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
17316 : : {
17317 : 0 : {
17318 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17319 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL))
17320 : 0 : return true;
17321 : : }
17322 : : }
17323 : : }
17324 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
17325 : : {
17326 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
17327 : : {
17328 : 0 : {
17329 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17330 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, BIT_IOR_EXPR, CFN_BUILT_IN_POPCOUNTL))
17331 : 0 : return true;
17332 : : }
17333 : : }
17334 : : }
17335 : 9741300 : break;
17336 : : }
17337 : 0 : case BIT_IOR_EXPR:
17338 : 0 : {
17339 : 0 : tree _q80 = gimple_assign_rhs1 (_a5);
17340 : 0 : _q80 = do_valueize (valueize, _q80);
17341 : 0 : tree _q81 = gimple_assign_rhs2 (_a5);
17342 : 0 : _q81 = do_valueize (valueize, _q81);
17343 : 0 : if (tree_swap_operands_p (_q80, _q81))
17344 : 0 : std::swap (_q80, _q81);
17345 : 0 : if ((_q80 == _q30 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q30, 0) && types_match (_q80, _q30)))
17346 : : {
17347 : 0 : if ((_q81 == _q50 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q50, 0) && types_match (_q81, _q50)))
17348 : : {
17349 : 0 : {
17350 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17351 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL))
17352 : 0 : return true;
17353 : : }
17354 : : }
17355 : : }
17356 : 0 : if ((_q80 == _q50 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q50, 0) && types_match (_q80, _q50)))
17357 : : {
17358 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
17359 : : {
17360 : 0 : {
17361 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _q50, _p1, _q70 };
17362 : 0 : if (gimple_simplify_113 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_AND_EXPR, CFN_BUILT_IN_POPCOUNTL))
17363 : 0 : return true;
17364 : : }
17365 : : }
17366 : : }
17367 : 9741300 : break;
17368 : : }
17369 : : default:;
17370 : : }
17371 : : }
17372 : : break;
17373 : : default:;
17374 : : }
17375 : : }
17376 : : break;
17377 : : default:;
17378 : : }
17379 : : }
17380 : : break;
17381 : : default:;
17382 : : }
17383 : : }
17384 : : break;
17385 : : default:;
17386 : : }
17387 : : }
17388 : : break;
17389 : : default:;
17390 : : }
17391 : : }
17392 : : break;
17393 : : default:;
17394 : : }
17395 : : }
17396 : : break;
17397 : : default:;
17398 : : }
17399 : 9741300 : break;
17400 : : }
17401 : 2361 : case VEC_PERM_EXPR:
17402 : 2361 : {
17403 : 2361 : tree _q20 = gimple_assign_rhs1 (_a1);
17404 : 2361 : _q20 = do_valueize (valueize, _q20);
17405 : 2361 : tree _q21 = gimple_assign_rhs2 (_a1);
17406 : 2361 : _q21 = do_valueize (valueize, _q21);
17407 : 2361 : tree _q22 = gimple_assign_rhs3 (_a1);
17408 : 2361 : _q22 = do_valueize (valueize, _q22);
17409 : 2361 : switch (TREE_CODE (_q20))
17410 : : {
17411 : 2357 : case SSA_NAME:
17412 : 2357 : if (gimple *_d2 = get_def (valueize, _q20))
17413 : : {
17414 : 2241 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17415 : 3890 : switch (gimple_assign_rhs_code (_a2))
17416 : : {
17417 : 3 : case MULT_EXPR:
17418 : 3 : {
17419 : 3 : tree _q30 = gimple_assign_rhs1 (_a2);
17420 : 3 : _q30 = do_valueize (valueize, _q30);
17421 : 3 : tree _q31 = gimple_assign_rhs2 (_a2);
17422 : 3 : _q31 = do_valueize (valueize, _q31);
17423 : 3 : if (tree_swap_operands_p (_q30, _q31))
17424 : 0 : std::swap (_q30, _q31);
17425 : 3 : if (gimple_vec_same_elem_p (_q31, valueize))
17426 : : {
17427 : 0 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
17428 : : {
17429 : 0 : {
17430 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q22, _p1 };
17431 : 0 : if (gimple_simplify_114 (res_op, seq, valueize, type, captures))
17432 : 0 : return true;
17433 : : }
17434 : : }
17435 : : }
17436 : 3 : if (gimple_vec_same_elem_p (_q30, valueize))
17437 : : {
17438 : 3 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
17439 : : {
17440 : 3 : {
17441 : 3 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q31, _q30, _q22, _p1 };
17442 : 3 : if (gimple_simplify_114 (res_op, seq, valueize, type, captures))
17443 : 0 : return true;
17444 : : }
17445 : : }
17446 : : }
17447 : 9741300 : break;
17448 : : }
17449 : : default:;
17450 : : }
17451 : : }
17452 : : break;
17453 : : default:;
17454 : : }
17455 : : break;
17456 : : }
17457 : : default:;
17458 : : }
17459 : 968719 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
17460 : 57237 : switch (gimple_call_combined_fn (_c1))
17461 : : {
17462 : 598 : case CFN_BUILT_IN_LOG:
17463 : 598 : if (gimple_call_num_args (_c1) == 1)
17464 : : {
17465 : 598 : tree _q20 = gimple_call_arg (_c1, 0);
17466 : 598 : _q20 = do_valueize (valueize, _q20);
17467 : 598 : switch (TREE_CODE (_p1))
17468 : : {
17469 : 493 : case SSA_NAME:
17470 : 493 : if (gimple *_d2 = get_def (valueize, _p1))
17471 : : {
17472 : 493 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17473 : 14 : switch (gimple_call_combined_fn (_c2))
17474 : : {
17475 : 14 : case CFN_BUILT_IN_LOG:
17476 : 14 : if (gimple_call_num_args (_c2) == 1)
17477 : : {
17478 : 14 : tree _q40 = gimple_call_arg (_c2, 0);
17479 : 14 : _q40 = do_valueize (valueize, _q40);
17480 : 14 : {
17481 : 14 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17482 : 14 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG))
17483 : 1 : return true;
17484 : : }
17485 : : }
17486 : : break;
17487 : : default:;
17488 : : }
17489 : : }
17490 : : break;
17491 : : default:;
17492 : : }
17493 : : }
17494 : : break;
17495 : 17 : case CFN_BUILT_IN_LOG2:
17496 : 17 : if (gimple_call_num_args (_c1) == 1)
17497 : : {
17498 : 17 : tree _q20 = gimple_call_arg (_c1, 0);
17499 : 17 : _q20 = do_valueize (valueize, _q20);
17500 : 17 : switch (TREE_CODE (_p1))
17501 : : {
17502 : 17 : case SSA_NAME:
17503 : 17 : if (gimple *_d2 = get_def (valueize, _p1))
17504 : : {
17505 : 17 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17506 : 2 : switch (gimple_call_combined_fn (_c2))
17507 : : {
17508 : 2 : case CFN_BUILT_IN_LOG2:
17509 : 2 : if (gimple_call_num_args (_c2) == 1)
17510 : : {
17511 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17512 : 2 : _q40 = do_valueize (valueize, _q40);
17513 : 2 : {
17514 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17515 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2))
17516 : 1 : return true;
17517 : : }
17518 : : }
17519 : : break;
17520 : : default:;
17521 : : }
17522 : : }
17523 : : break;
17524 : : default:;
17525 : : }
17526 : : }
17527 : : break;
17528 : 59 : case CFN_BUILT_IN_LOGF:
17529 : 59 : if (gimple_call_num_args (_c1) == 1)
17530 : : {
17531 : 59 : tree _q20 = gimple_call_arg (_c1, 0);
17532 : 59 : _q20 = do_valueize (valueize, _q20);
17533 : 59 : switch (TREE_CODE (_p1))
17534 : : {
17535 : 59 : case SSA_NAME:
17536 : 59 : if (gimple *_d2 = get_def (valueize, _p1))
17537 : : {
17538 : 59 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17539 : 2 : switch (gimple_call_combined_fn (_c2))
17540 : : {
17541 : 2 : case CFN_BUILT_IN_LOGF:
17542 : 2 : if (gimple_call_num_args (_c2) == 1)
17543 : : {
17544 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17545 : 2 : _q40 = do_valueize (valueize, _q40);
17546 : 2 : {
17547 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17548 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF))
17549 : 1 : return true;
17550 : : }
17551 : : }
17552 : : break;
17553 : : default:;
17554 : : }
17555 : : }
17556 : : break;
17557 : : default:;
17558 : : }
17559 : : }
17560 : : break;
17561 : 44 : case CFN_BUILT_IN_LOGL:
17562 : 44 : if (gimple_call_num_args (_c1) == 1)
17563 : : {
17564 : 44 : tree _q20 = gimple_call_arg (_c1, 0);
17565 : 44 : _q20 = do_valueize (valueize, _q20);
17566 : 44 : switch (TREE_CODE (_p1))
17567 : : {
17568 : 44 : case SSA_NAME:
17569 : 44 : if (gimple *_d2 = get_def (valueize, _p1))
17570 : : {
17571 : 44 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17572 : 2 : switch (gimple_call_combined_fn (_c2))
17573 : : {
17574 : 2 : case CFN_BUILT_IN_LOGL:
17575 : 2 : if (gimple_call_num_args (_c2) == 1)
17576 : : {
17577 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17578 : 2 : _q40 = do_valueize (valueize, _q40);
17579 : 2 : {
17580 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17581 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL))
17582 : 1 : return true;
17583 : : }
17584 : : }
17585 : : break;
17586 : : default:;
17587 : : }
17588 : : }
17589 : : break;
17590 : : default:;
17591 : : }
17592 : : }
17593 : : break;
17594 : 17 : case CFN_BUILT_IN_LOG10F:
17595 : 17 : if (gimple_call_num_args (_c1) == 1)
17596 : : {
17597 : 17 : tree _q20 = gimple_call_arg (_c1, 0);
17598 : 17 : _q20 = do_valueize (valueize, _q20);
17599 : 17 : switch (TREE_CODE (_p1))
17600 : : {
17601 : 17 : case SSA_NAME:
17602 : 17 : if (gimple *_d2 = get_def (valueize, _p1))
17603 : : {
17604 : 17 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17605 : 2 : switch (gimple_call_combined_fn (_c2))
17606 : : {
17607 : 2 : case CFN_BUILT_IN_LOG10F:
17608 : 2 : if (gimple_call_num_args (_c2) == 1)
17609 : : {
17610 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17611 : 2 : _q40 = do_valueize (valueize, _q40);
17612 : 2 : {
17613 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17614 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10F))
17615 : 1 : return true;
17616 : : }
17617 : : }
17618 : : break;
17619 : : default:;
17620 : : }
17621 : : }
17622 : : break;
17623 : : default:;
17624 : : }
17625 : : }
17626 : : break;
17627 : 2 : case CFN_BUILT_IN_LOG10L:
17628 : 2 : if (gimple_call_num_args (_c1) == 1)
17629 : : {
17630 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
17631 : 2 : _q20 = do_valueize (valueize, _q20);
17632 : 2 : switch (TREE_CODE (_p1))
17633 : : {
17634 : 2 : case SSA_NAME:
17635 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
17636 : : {
17637 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17638 : 2 : switch (gimple_call_combined_fn (_c2))
17639 : : {
17640 : 2 : case CFN_BUILT_IN_LOG10L:
17641 : 2 : if (gimple_call_num_args (_c2) == 1)
17642 : : {
17643 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17644 : 2 : _q40 = do_valueize (valueize, _q40);
17645 : 2 : {
17646 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17647 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10L))
17648 : 1 : return true;
17649 : : }
17650 : : }
17651 : : break;
17652 : : default:;
17653 : : }
17654 : : }
17655 : : break;
17656 : : default:;
17657 : : }
17658 : : }
17659 : : break;
17660 : 0 : case CFN_LOG:
17661 : 0 : if (gimple_call_num_args (_c1) == 1)
17662 : : {
17663 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
17664 : 0 : _q20 = do_valueize (valueize, _q20);
17665 : 0 : switch (TREE_CODE (_p1))
17666 : : {
17667 : 0 : case SSA_NAME:
17668 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
17669 : : {
17670 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17671 : 0 : switch (gimple_call_combined_fn (_c2))
17672 : : {
17673 : 0 : case CFN_LOG:
17674 : 0 : if (gimple_call_num_args (_c2) == 1)
17675 : : {
17676 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17677 : 0 : _q40 = do_valueize (valueize, _q40);
17678 : 0 : {
17679 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17680 : 0 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_LOG))
17681 : 0 : return true;
17682 : : }
17683 : : }
17684 : : break;
17685 : : default:;
17686 : : }
17687 : : }
17688 : : break;
17689 : : default:;
17690 : : }
17691 : : }
17692 : : break;
17693 : 0 : case CFN_LOG2:
17694 : 0 : if (gimple_call_num_args (_c1) == 1)
17695 : : {
17696 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
17697 : 0 : _q20 = do_valueize (valueize, _q20);
17698 : 0 : switch (TREE_CODE (_p1))
17699 : : {
17700 : 0 : case SSA_NAME:
17701 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
17702 : : {
17703 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17704 : 0 : switch (gimple_call_combined_fn (_c2))
17705 : : {
17706 : 0 : case CFN_LOG2:
17707 : 0 : if (gimple_call_num_args (_c2) == 1)
17708 : : {
17709 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17710 : 0 : _q40 = do_valueize (valueize, _q40);
17711 : 0 : {
17712 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17713 : 0 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_LOG2))
17714 : 0 : return true;
17715 : : }
17716 : : }
17717 : : break;
17718 : : default:;
17719 : : }
17720 : : }
17721 : : break;
17722 : : default:;
17723 : : }
17724 : : }
17725 : : break;
17726 : 0 : case CFN_LOG10:
17727 : 0 : if (gimple_call_num_args (_c1) == 1)
17728 : : {
17729 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
17730 : 0 : _q20 = do_valueize (valueize, _q20);
17731 : 0 : switch (TREE_CODE (_p1))
17732 : : {
17733 : 0 : case SSA_NAME:
17734 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
17735 : : {
17736 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17737 : 0 : switch (gimple_call_combined_fn (_c2))
17738 : : {
17739 : 0 : case CFN_LOG10:
17740 : 0 : if (gimple_call_num_args (_c2) == 1)
17741 : : {
17742 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17743 : 0 : _q40 = do_valueize (valueize, _q40);
17744 : 0 : {
17745 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17746 : 0 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_LOG10))
17747 : 0 : return true;
17748 : : }
17749 : : }
17750 : : break;
17751 : : default:;
17752 : : }
17753 : : }
17754 : : break;
17755 : : default:;
17756 : : }
17757 : : }
17758 : : break;
17759 : 17 : case CFN_BUILT_IN_LOG10:
17760 : 17 : if (gimple_call_num_args (_c1) == 1)
17761 : : {
17762 : 17 : tree _q20 = gimple_call_arg (_c1, 0);
17763 : 17 : _q20 = do_valueize (valueize, _q20);
17764 : 17 : switch (TREE_CODE (_p1))
17765 : : {
17766 : 17 : case SSA_NAME:
17767 : 17 : if (gimple *_d2 = get_def (valueize, _p1))
17768 : : {
17769 : 17 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17770 : 2 : switch (gimple_call_combined_fn (_c2))
17771 : : {
17772 : 2 : case CFN_BUILT_IN_LOG10:
17773 : 2 : if (gimple_call_num_args (_c2) == 1)
17774 : : {
17775 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17776 : 2 : _q40 = do_valueize (valueize, _q40);
17777 : 2 : {
17778 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17779 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10))
17780 : 1 : return true;
17781 : : }
17782 : : }
17783 : : break;
17784 : : default:;
17785 : : }
17786 : : }
17787 : : break;
17788 : : default:;
17789 : : }
17790 : : }
17791 : : break;
17792 : 17 : case CFN_BUILT_IN_LOG2F:
17793 : 17 : if (gimple_call_num_args (_c1) == 1)
17794 : : {
17795 : 17 : tree _q20 = gimple_call_arg (_c1, 0);
17796 : 17 : _q20 = do_valueize (valueize, _q20);
17797 : 17 : switch (TREE_CODE (_p1))
17798 : : {
17799 : 17 : case SSA_NAME:
17800 : 17 : if (gimple *_d2 = get_def (valueize, _p1))
17801 : : {
17802 : 17 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17803 : 2 : switch (gimple_call_combined_fn (_c2))
17804 : : {
17805 : 2 : case CFN_BUILT_IN_LOG2F:
17806 : 2 : if (gimple_call_num_args (_c2) == 1)
17807 : : {
17808 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17809 : 2 : _q40 = do_valueize (valueize, _q40);
17810 : 2 : {
17811 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17812 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2F))
17813 : 1 : return true;
17814 : : }
17815 : : }
17816 : : break;
17817 : : default:;
17818 : : }
17819 : : }
17820 : : break;
17821 : : default:;
17822 : : }
17823 : : }
17824 : : break;
17825 : 2 : case CFN_BUILT_IN_LOG2L:
17826 : 2 : if (gimple_call_num_args (_c1) == 1)
17827 : : {
17828 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
17829 : 2 : _q20 = do_valueize (valueize, _q20);
17830 : 2 : switch (TREE_CODE (_p1))
17831 : : {
17832 : 2 : case SSA_NAME:
17833 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
17834 : : {
17835 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17836 : 2 : switch (gimple_call_combined_fn (_c2))
17837 : : {
17838 : 2 : case CFN_BUILT_IN_LOG2L:
17839 : 2 : if (gimple_call_num_args (_c2) == 1)
17840 : : {
17841 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
17842 : 2 : _q40 = do_valueize (valueize, _q40);
17843 : 2 : {
17844 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17845 : 2 : if (gimple_simplify_112 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2L))
17846 : 1 : return true;
17847 : : }
17848 : : }
17849 : : break;
17850 : : default:;
17851 : : }
17852 : : }
17853 : : break;
17854 : : default:;
17855 : : }
17856 : : }
17857 : : break;
17858 : : default:;
17859 : : }
17860 : : }
17861 : : break;
17862 : 9741300 : default:;
17863 : : }
17864 : 9741300 : switch (TREE_CODE (_p1))
17865 : : {
17866 : 9153517 : case SSA_NAME:
17867 : 9153517 : if (gimple *_d1 = get_def (valueize, _p1))
17868 : : {
17869 : 7006109 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17870 : 7653857 : switch (gimple_assign_rhs_code (_a1))
17871 : : {
17872 : 28882 : case BIT_AND_EXPR:
17873 : 28882 : {
17874 : 28882 : tree _q30 = gimple_assign_rhs1 (_a1);
17875 : 28882 : _q30 = do_valueize (valueize, _q30);
17876 : 28882 : tree _q31 = gimple_assign_rhs2 (_a1);
17877 : 28882 : _q31 = do_valueize (valueize, _q31);
17878 : 28882 : if (tree_swap_operands_p (_q30, _q31))
17879 : 127 : std::swap (_q30, _q31);
17880 : 28882 : switch (TREE_CODE (_q30))
17881 : : {
17882 : 28882 : case SSA_NAME:
17883 : 28882 : if (gimple *_d2 = get_def (valueize, _q30))
17884 : : {
17885 : 26934 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17886 : 26909 : switch (gimple_assign_rhs_code (_a2))
17887 : : {
17888 : 611 : case MAX_EXPR:
17889 : 611 : {
17890 : 611 : tree _q40 = gimple_assign_rhs1 (_a2);
17891 : 611 : _q40 = do_valueize (valueize, _q40);
17892 : 611 : tree _q41 = gimple_assign_rhs2 (_a2);
17893 : 611 : _q41 = do_valueize (valueize, _q41);
17894 : 611 : if (tree_swap_operands_p (_q40, _q41))
17895 : 0 : std::swap (_q40, _q41);
17896 : 611 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
17897 : : {
17898 : 611 : switch (TREE_CODE (_q41))
17899 : : {
17900 : 611 : case INTEGER_CST:
17901 : 611 : {
17902 : 611 : switch (TREE_CODE (_q31))
17903 : : {
17904 : 500 : case INTEGER_CST:
17905 : 500 : {
17906 : 500 : {
17907 : 500 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
17908 : 500 : {
17909 : 500 : auto i = wi::neg (wi::to_wide (captures[2]));
17910 : 500 : if (wi::popcount (i) == 1
17911 : 1278 : && (wi::to_wide (captures[1])) == (i - 1)
17912 : : )
17913 : : {
17914 : 56 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
17915 : : )
17916 : : {
17917 : 0 : gimple_seq *lseq = seq;
17918 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2207;
17919 : 0 : {
17920 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
17921 : 0 : res_op->ops[0] = captures[0];
17922 : 0 : res_op->ops[1] = captures[1];
17923 : 0 : res_op->resimplify (lseq, valueize);
17924 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1106, __FILE__, __LINE__, true);
17925 : 0 : return true;
17926 : : }
17927 : 0 : next_after_fail2207:;
17928 : : }
17929 : : else
17930 : : {
17931 : 56 : gimple_seq *lseq = seq;
17932 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2208;
17933 : 56 : {
17934 : 56 : res_op->set_op (COND_EXPR, type, 3);
17935 : 56 : {
17936 : 56 : tree _o1[2], _r1;
17937 : 56 : _o1[0] = captures[0];
17938 : 56 : _o1[1] = captures[1];
17939 : 56 : gimple_match_op tem_op (res_op->cond.any_else (), LE_EXPR, boolean_type_node, _o1[0], _o1[1]);
17940 : 56 : tem_op.resimplify (lseq, valueize);
17941 : 56 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17942 : 56 : if (!_r1) goto next_after_fail2208;
17943 : 28 : res_op->ops[0] = _r1;
17944 : : }
17945 : 28 : res_op->ops[1] = captures[0];
17946 : 28 : {
17947 : 28 : tree _o1[2], _r1;
17948 : 28 : _o1[0] = captures[0];
17949 : 28 : _o1[1] = captures[1];
17950 : 28 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17951 : 28 : tem_op.resimplify (lseq, valueize);
17952 : 28 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17953 : 28 : if (!_r1) goto next_after_fail2208;
17954 : 28 : res_op->ops[2] = _r1;
17955 : : }
17956 : 28 : res_op->resimplify (lseq, valueize);
17957 : 28 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1107, __FILE__, __LINE__, true);
17958 : 28 : return true;
17959 : : }
17960 : 472 : next_after_fail2208:;
17961 : : }
17962 : : }
17963 : 28 : }
17964 : : }
17965 : 472 : break;
17966 : : }
17967 : : default:;
17968 : : }
17969 : : break;
17970 : : }
17971 : : default:;
17972 : : }
17973 : : }
17974 : 9741272 : break;
17975 : : }
17976 : : default:;
17977 : : }
17978 : : }
17979 : : break;
17980 : : default:;
17981 : : }
17982 : 9741272 : break;
17983 : : }
17984 : : default:;
17985 : : }
17986 : : }
17987 : : break;
17988 : 9741272 : default:;
17989 : : }
17990 : 9741272 : switch (TREE_CODE (_p0))
17991 : : {
17992 : 8162570 : case SSA_NAME:
17993 : 8162570 : if (gimple *_d1 = get_def (valueize, _p0))
17994 : : {
17995 : 6471407 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17996 : 7345162 : switch (gimple_assign_rhs_code (_a1))
17997 : : {
17998 : 2361 : case VEC_PERM_EXPR:
17999 : 2361 : {
18000 : 2361 : tree _q20 = gimple_assign_rhs1 (_a1);
18001 : 2361 : _q20 = do_valueize (valueize, _q20);
18002 : 2361 : tree _q21 = gimple_assign_rhs2 (_a1);
18003 : 2361 : _q21 = do_valueize (valueize, _q21);
18004 : 2361 : tree _q22 = gimple_assign_rhs3 (_a1);
18005 : 2361 : _q22 = do_valueize (valueize, _q22);
18006 : 2361 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
18007 : : {
18008 : 920 : switch (TREE_CODE (_p1))
18009 : : {
18010 : 916 : case SSA_NAME:
18011 : 916 : if (gimple *_d2 = get_def (valueize, _p1))
18012 : : {
18013 : 880 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18014 : 1063 : switch (gimple_assign_rhs_code (_a2))
18015 : : {
18016 : 673 : case VEC_PERM_EXPR:
18017 : 673 : {
18018 : 673 : tree _q60 = gimple_assign_rhs1 (_a2);
18019 : 673 : _q60 = do_valueize (valueize, _q60);
18020 : 673 : tree _q61 = gimple_assign_rhs2 (_a2);
18021 : 673 : _q61 = do_valueize (valueize, _q61);
18022 : 673 : tree _q62 = gimple_assign_rhs3 (_a2);
18023 : 673 : _q62 = do_valueize (valueize, _q62);
18024 : 673 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
18025 : : {
18026 : 673 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
18027 : : {
18028 : 188 : {
18029 : 188 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
18030 : 188 : if (VECTOR_INTEGER_TYPE_P (type)
18031 : : )
18032 : : {
18033 : 32 : gimple_seq *lseq = seq;
18034 : 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2209;
18035 : 32 : {
18036 : 32 : res_op->set_op (VEC_PERM_EXPR, type, 3);
18037 : 32 : {
18038 : 32 : tree _o1[2], _r1;
18039 : 32 : _o1[0] = captures[0];
18040 : 32 : _o1[1] = captures[2];
18041 : 32 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
18042 : 32 : tem_op.resimplify (lseq, valueize);
18043 : 32 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
18044 : 32 : if (!_r1) goto next_after_fail2209;
18045 : 7 : captures[3] = _r1;
18046 : : }
18047 : 7 : res_op->ops[0] = captures[3];
18048 : 7 : res_op->ops[1] = captures[3];
18049 : 7 : res_op->ops[2] = captures[1];
18050 : 7 : res_op->resimplify (lseq, valueize);
18051 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1064, __FILE__, __LINE__, true);
18052 : 7 : return true;
18053 : : }
18054 : : next_after_fail2209:;
18055 : : }
18056 : : }
18057 : : }
18058 : : }
18059 : : break;
18060 : : }
18061 : : default:;
18062 : : }
18063 : : }
18064 : : break;
18065 : 913 : default:;
18066 : : }
18067 : 913 : switch (TREE_CODE (_q22))
18068 : : {
18069 : 904 : case VECTOR_CST:
18070 : 904 : {
18071 : 904 : switch (TREE_CODE (_p1))
18072 : : {
18073 : 900 : case SSA_NAME:
18074 : 900 : if (gimple *_d2 = get_def (valueize, _p1))
18075 : : {
18076 : 864 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18077 : 1047 : switch (gimple_assign_rhs_code (_a2))
18078 : : {
18079 : 657 : case VEC_PERM_EXPR:
18080 : 657 : {
18081 : 657 : tree _q60 = gimple_assign_rhs1 (_a2);
18082 : 657 : _q60 = do_valueize (valueize, _q60);
18083 : 657 : tree _q61 = gimple_assign_rhs2 (_a2);
18084 : 657 : _q61 = do_valueize (valueize, _q61);
18085 : 657 : tree _q62 = gimple_assign_rhs3 (_a2);
18086 : 657 : _q62 = do_valueize (valueize, _q62);
18087 : 657 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
18088 : : {
18089 : 657 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
18090 : : {
18091 : 181 : switch (TREE_CODE (_q62))
18092 : : {
18093 : 181 : case VECTOR_CST:
18094 : 181 : {
18095 : 181 : {
18096 : 181 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
18097 : 181 : if (gimple_simplify_88 (res_op, seq, valueize, type, captures, MINUS_EXPR))
18098 : 5 : return true;
18099 : : }
18100 : 176 : break;
18101 : : }
18102 : : default:;
18103 : : }
18104 : : }
18105 : : }
18106 : : break;
18107 : : }
18108 : : default:;
18109 : : }
18110 : : }
18111 : : break;
18112 : : default:;
18113 : : }
18114 : : break;
18115 : : }
18116 : : default:;
18117 : : }
18118 : : }
18119 : : break;
18120 : : }
18121 : 1130 : case BIT_IOR_EXPR:
18122 : 1130 : {
18123 : 1130 : tree _q20 = gimple_assign_rhs1 (_a1);
18124 : 1130 : _q20 = do_valueize (valueize, _q20);
18125 : 1130 : tree _q21 = gimple_assign_rhs2 (_a1);
18126 : 1130 : _q21 = do_valueize (valueize, _q21);
18127 : 1130 : if (tree_swap_operands_p (_q20, _q21))
18128 : 95 : std::swap (_q20, _q21);
18129 : 1130 : switch (TREE_CODE (_p1))
18130 : : {
18131 : 1130 : case SSA_NAME:
18132 : 1130 : if (gimple *_d2 = get_def (valueize, _p1))
18133 : : {
18134 : 1052 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18135 : 975 : switch (gimple_assign_rhs_code (_a2))
18136 : : {
18137 : 154 : case RSHIFT_EXPR:
18138 : 154 : {
18139 : 154 : tree _q50 = gimple_assign_rhs1 (_a2);
18140 : 154 : _q50 = do_valueize (valueize, _q50);
18141 : 154 : tree _q51 = gimple_assign_rhs2 (_a2);
18142 : 154 : _q51 = do_valueize (valueize, _q51);
18143 : 154 : switch (TREE_CODE (_q50))
18144 : : {
18145 : 154 : case SSA_NAME:
18146 : 154 : if (gimple *_d3 = get_def (valueize, _q50))
18147 : : {
18148 : 154 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
18149 : 154 : switch (gimple_assign_rhs_code (_a3))
18150 : : {
18151 : 90 : case BIT_XOR_EXPR:
18152 : 90 : {
18153 : 90 : tree _q60 = gimple_assign_rhs1 (_a3);
18154 : 90 : _q60 = do_valueize (valueize, _q60);
18155 : 90 : tree _q61 = gimple_assign_rhs2 (_a3);
18156 : 90 : _q61 = do_valueize (valueize, _q61);
18157 : 90 : if (tree_swap_operands_p (_q60, _q61))
18158 : 0 : std::swap (_q60, _q61);
18159 : 90 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
18160 : : {
18161 : 90 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
18162 : : {
18163 : 90 : if (integer_onep (_q51))
18164 : : {
18165 : 90 : {
18166 : 90 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
18167 : 90 : if (fold_before_rtl_expansion_p ()
18168 : 6 : && VECTOR_TYPE_P (type)
18169 : 96 : && direct_internal_fn_supported_p (IFN_AVG_CEIL, type, OPTIMIZE_FOR_BOTH)
18170 : : )
18171 : : {
18172 : 6 : gimple_seq *lseq = seq;
18173 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2210;
18174 : 6 : {
18175 : 6 : res_op->set_op (CFN_AVG_CEIL, type, 2);
18176 : 6 : res_op->ops[0] = captures[0];
18177 : 6 : res_op->ops[1] = captures[1];
18178 : 6 : res_op->resimplify (lseq, valueize);
18179 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1108, __FILE__, __LINE__, true);
18180 : 6 : return true;
18181 : : }
18182 : 0 : next_after_fail2210:;
18183 : : }
18184 : : }
18185 : : }
18186 : : }
18187 : : }
18188 : 11270333 : break;
18189 : : }
18190 : : default:;
18191 : : }
18192 : : }
18193 : : break;
18194 : : default:;
18195 : : }
18196 : : break;
18197 : : }
18198 : : default:;
18199 : : }
18200 : : }
18201 : : break;
18202 : : default:;
18203 : : }
18204 : 11270333 : break;
18205 : : }
18206 : : default:;
18207 : : }
18208 : : }
18209 : : break;
18210 : : default:;
18211 : : }
18212 : : return false;
18213 : : }
18214 : :
18215 : : bool
18216 : 9194096 : gimple_simplify_GE_EXPR (gimple_match_op *res_op, gimple_seq *seq,
18217 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
18218 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
18219 : : {
18220 : 9194096 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
18221 : 9194096 : switch (TREE_CODE (_p0))
18222 : : {
18223 : 8914045 : case SSA_NAME:
18224 : 8914045 : if (gimple *_d1 = get_def (valueize, _p0))
18225 : : {
18226 : 2805296 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18227 : 2839504 : switch (gimple_assign_rhs_code (_a1))
18228 : : {
18229 : 11409 : case RDIV_EXPR:
18230 : 11409 : {
18231 : 11409 : tree _q20 = gimple_assign_rhs1 (_a1);
18232 : 11409 : _q20 = do_valueize (valueize, _q20);
18233 : 11409 : tree _q21 = gimple_assign_rhs2 (_a1);
18234 : 11409 : _q21 = do_valueize (valueize, _q21);
18235 : 11409 : switch (TREE_CODE (_q20))
18236 : : {
18237 : 2065 : case REAL_CST:
18238 : 2065 : {
18239 : 2065 : if (real_zerop (_p1))
18240 : : {
18241 : 59 : {
18242 : 59 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
18243 : 59 : if (gimple_simplify_455 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
18244 : 0 : return true;
18245 : : }
18246 : : }
18247 : : break;
18248 : : }
18249 : : default:;
18250 : : }
18251 : : break;
18252 : : }
18253 : : default:;
18254 : : }
18255 : : }
18256 : : break;
18257 : 9194096 : default:;
18258 : : }
18259 : 9194096 : {
18260 : 9194096 : tree _p0_pops[1];
18261 : 9194096 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
18262 : : {
18263 : 163833 : tree _q20 = _p0_pops[0];
18264 : 163833 : switch (TREE_CODE (_p1))
18265 : : {
18266 : 67414 : case SSA_NAME:
18267 : 67414 : if (gimple *_d1 = get_def (valueize, _p1))
18268 : : {
18269 : 63764 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18270 : 57869 : switch (gimple_assign_rhs_code (_a1))
18271 : : {
18272 : 0 : case LSHIFT_EXPR:
18273 : 0 : {
18274 : 0 : tree _q40 = gimple_assign_rhs1 (_a1);
18275 : 0 : _q40 = do_valueize (valueize, _q40);
18276 : 0 : tree _q41 = gimple_assign_rhs2 (_a1);
18277 : 0 : _q41 = do_valueize (valueize, _q41);
18278 : 0 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
18279 : : {
18280 : 0 : {
18281 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
18282 : 0 : if (gimple_simplify_456 (res_op, seq, valueize, type, captures, LE_EXPR))
18283 : 0 : return true;
18284 : : }
18285 : : }
18286 : : break;
18287 : : }
18288 : : default:;
18289 : : }
18290 : : }
18291 : : break;
18292 : 163833 : default:;
18293 : : }
18294 : 163833 : {
18295 : 163833 : tree _p1_pops[1];
18296 : 163833 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
18297 : : {
18298 : 27450 : tree _q40 = _p1_pops[0];
18299 : 27450 : switch (TREE_CODE (_q40))
18300 : : {
18301 : 27240 : case SSA_NAME:
18302 : 27240 : if (gimple *_d1 = get_def (valueize, _q40))
18303 : : {
18304 : 26114 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18305 : 32981 : switch (gimple_assign_rhs_code (_a1))
18306 : : {
18307 : 88 : case LSHIFT_EXPR:
18308 : 88 : {
18309 : 88 : tree _q50 = gimple_assign_rhs1 (_a1);
18310 : 88 : _q50 = do_valueize (valueize, _q50);
18311 : 88 : tree _q51 = gimple_assign_rhs2 (_a1);
18312 : 88 : _q51 = do_valueize (valueize, _q51);
18313 : 88 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
18314 : : {
18315 : 0 : {
18316 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q20 };
18317 : 0 : if (gimple_simplify_456 (res_op, seq, valueize, type, captures, LE_EXPR))
18318 : 0 : return true;
18319 : : }
18320 : : }
18321 : : break;
18322 : : }
18323 : : default:;
18324 : : }
18325 : : }
18326 : : break;
18327 : : default:;
18328 : : }
18329 : : }
18330 : : }
18331 : 163833 : switch (TREE_CODE (_q20))
18332 : : {
18333 : 162888 : case SSA_NAME:
18334 : 162888 : if (gimple *_d1 = get_def (valueize, _q20))
18335 : : {
18336 : 155565 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18337 : 163180 : switch (gimple_assign_rhs_code (_a1))
18338 : : {
18339 : 5 : case LSHIFT_EXPR:
18340 : 5 : {
18341 : 5 : tree _q30 = gimple_assign_rhs1 (_a1);
18342 : 5 : _q30 = do_valueize (valueize, _q30);
18343 : 5 : tree _q31 = gimple_assign_rhs2 (_a1);
18344 : 5 : _q31 = do_valueize (valueize, _q31);
18345 : 5 : {
18346 : 5 : tree _p1_pops[1];
18347 : 5 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
18348 : : {
18349 : 0 : tree _q60 = _p1_pops[0];
18350 : 0 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
18351 : : {
18352 : 0 : {
18353 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
18354 : 0 : if (gimple_simplify_457 (res_op, seq, valueize, type, captures, GE_EXPR))
18355 : 0 : return true;
18356 : : }
18357 : : }
18358 : : }
18359 : : }
18360 : 5 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
18361 : : {
18362 : 0 : {
18363 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
18364 : 0 : if (gimple_simplify_457 (res_op, seq, valueize, type, captures, GE_EXPR))
18365 : 0 : return true;
18366 : : }
18367 : : }
18368 : : break;
18369 : : }
18370 : : default:;
18371 : : }
18372 : : }
18373 : : break;
18374 : : default:;
18375 : : }
18376 : : }
18377 : : }
18378 : 9194096 : switch (TREE_CODE (_p1))
18379 : : {
18380 : 3687624 : case SSA_NAME:
18381 : 3687624 : if (gimple *_d1 = get_def (valueize, _p1))
18382 : : {
18383 : 1310515 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18384 : 1481328 : switch (gimple_assign_rhs_code (_a1))
18385 : : {
18386 : 5097 : case LSHIFT_EXPR:
18387 : 5097 : {
18388 : 5097 : tree _q30 = gimple_assign_rhs1 (_a1);
18389 : 5097 : _q30 = do_valueize (valueize, _q30);
18390 : 5097 : tree _q31 = gimple_assign_rhs2 (_a1);
18391 : 5097 : _q31 = do_valueize (valueize, _q31);
18392 : 5097 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
18393 : : {
18394 : 5 : {
18395 : 5 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
18396 : 5 : if (gimple_simplify_456 (res_op, seq, valueize, type, captures, LE_EXPR))
18397 : 1 : return true;
18398 : : }
18399 : : }
18400 : : break;
18401 : : }
18402 : : default:;
18403 : : }
18404 : : }
18405 : : break;
18406 : 9194095 : default:;
18407 : : }
18408 : 9194095 : {
18409 : 9194095 : tree _p1_pops[1];
18410 : 9194095 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
18411 : : {
18412 : 48721 : tree _q30 = _p1_pops[0];
18413 : 48721 : switch (TREE_CODE (_q30))
18414 : : {
18415 : 48511 : case SSA_NAME:
18416 : 48511 : if (gimple *_d1 = get_def (valueize, _q30))
18417 : : {
18418 : 46976 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18419 : 50375 : switch (gimple_assign_rhs_code (_a1))
18420 : : {
18421 : 88 : case LSHIFT_EXPR:
18422 : 88 : {
18423 : 88 : tree _q40 = gimple_assign_rhs1 (_a1);
18424 : 88 : _q40 = do_valueize (valueize, _q40);
18425 : 88 : tree _q41 = gimple_assign_rhs2 (_a1);
18426 : 88 : _q41 = do_valueize (valueize, _q41);
18427 : 88 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
18428 : : {
18429 : 0 : {
18430 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _p0 };
18431 : 0 : if (gimple_simplify_456 (res_op, seq, valueize, type, captures, LE_EXPR))
18432 : 0 : return true;
18433 : : }
18434 : : }
18435 : : break;
18436 : : }
18437 : : default:;
18438 : : }
18439 : : }
18440 : : break;
18441 : : default:;
18442 : : }
18443 : : }
18444 : : }
18445 : 9194095 : switch (TREE_CODE (_p0))
18446 : : {
18447 : 8914044 : case SSA_NAME:
18448 : 8914044 : if (gimple *_d1 = get_def (valueize, _p0))
18449 : : {
18450 : 2805296 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18451 : 2839504 : switch (gimple_assign_rhs_code (_a1))
18452 : : {
18453 : 709 : case LSHIFT_EXPR:
18454 : 709 : {
18455 : 709 : tree _q20 = gimple_assign_rhs1 (_a1);
18456 : 709 : _q20 = do_valueize (valueize, _q20);
18457 : 709 : tree _q21 = gimple_assign_rhs2 (_a1);
18458 : 709 : _q21 = do_valueize (valueize, _q21);
18459 : 709 : {
18460 : 709 : tree _p1_pops[1];
18461 : 709 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
18462 : : {
18463 : 9 : tree _q50 = _p1_pops[0];
18464 : 9 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
18465 : : {
18466 : 9 : {
18467 : 9 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
18468 : 9 : if (gimple_simplify_457 (res_op, seq, valueize, type, captures, GE_EXPR))
18469 : 3 : return true;
18470 : : }
18471 : : }
18472 : : }
18473 : : }
18474 : 706 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
18475 : : {
18476 : 118 : {
18477 : 118 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
18478 : 118 : if (gimple_simplify_457 (res_op, seq, valueize, type, captures, GE_EXPR))
18479 : 2 : return true;
18480 : : }
18481 : : }
18482 : : break;
18483 : : }
18484 : 2446 : case TRUNC_MOD_EXPR:
18485 : 2446 : {
18486 : 2446 : tree _q20 = gimple_assign_rhs1 (_a1);
18487 : 2446 : _q20 = do_valueize (valueize, _q20);
18488 : 2446 : tree _q21 = gimple_assign_rhs2 (_a1);
18489 : 2446 : _q21 = do_valueize (valueize, _q21);
18490 : 2446 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
18491 : : {
18492 : 0 : {
18493 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
18494 : 0 : if (gimple_simplify_458 (res_op, seq, valueize, type, captures, GE_EXPR))
18495 : 0 : return true;
18496 : : }
18497 : : }
18498 : : break;
18499 : : }
18500 : 24022 : case MULT_EXPR:
18501 : 24022 : {
18502 : 24022 : tree _q20 = gimple_assign_rhs1 (_a1);
18503 : 24022 : _q20 = do_valueize (valueize, _q20);
18504 : 24022 : tree _q21 = gimple_assign_rhs2 (_a1);
18505 : 24022 : _q21 = do_valueize (valueize, _q21);
18506 : 24022 : if (tree_swap_operands_p (_q20, _q21))
18507 : 738 : std::swap (_q20, _q21);
18508 : 24022 : switch (TREE_CODE (_p1))
18509 : : {
18510 : 14677 : case SSA_NAME:
18511 : 14677 : if (gimple *_d2 = get_def (valueize, _p1))
18512 : : {
18513 : 14176 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18514 : 13945 : switch (gimple_assign_rhs_code (_a2))
18515 : : {
18516 : 5387 : case MULT_EXPR:
18517 : 5387 : {
18518 : 5387 : tree _q50 = gimple_assign_rhs1 (_a2);
18519 : 5387 : _q50 = do_valueize (valueize, _q50);
18520 : 5387 : tree _q51 = gimple_assign_rhs2 (_a2);
18521 : 5387 : _q51 = do_valueize (valueize, _q51);
18522 : 5387 : if (tree_swap_operands_p (_q50, _q51))
18523 : 84 : std::swap (_q50, _q51);
18524 : 5387 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
18525 : : {
18526 : 141 : {
18527 : 141 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
18528 : 141 : if (gimple_simplify_459 (res_op, seq, valueize, type, captures, GE_EXPR))
18529 : 0 : return true;
18530 : : }
18531 : : }
18532 : 5387 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
18533 : : {
18534 : 0 : {
18535 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
18536 : 0 : if (gimple_simplify_459 (res_op, seq, valueize, type, captures, GE_EXPR))
18537 : 0 : return true;
18538 : : }
18539 : : }
18540 : 5387 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
18541 : : {
18542 : 0 : {
18543 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
18544 : 0 : if (gimple_simplify_459 (res_op, seq, valueize, type, captures, GE_EXPR))
18545 : 0 : return true;
18546 : : }
18547 : : }
18548 : 5387 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
18549 : : {
18550 : 18 : {
18551 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
18552 : 18 : if (gimple_simplify_459 (res_op, seq, valueize, type, captures, GE_EXPR))
18553 : 0 : return true;
18554 : : }
18555 : : }
18556 : 9189645 : break;
18557 : : }
18558 : : default:;
18559 : : }
18560 : : }
18561 : : break;
18562 : : default:;
18563 : : }
18564 : 9189645 : break;
18565 : : }
18566 : 255982 : CASE_CONVERT:
18567 : 255982 : {
18568 : 255982 : tree _q20 = gimple_assign_rhs1 (_a1);
18569 : 255982 : _q20 = do_valueize (valueize, _q20);
18570 : 255982 : switch (TREE_CODE (_q20))
18571 : : {
18572 : 255037 : case SSA_NAME:
18573 : 255037 : if (gimple *_d2 = get_def (valueize, _q20))
18574 : : {
18575 : 245935 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18576 : 252191 : switch (gimple_assign_rhs_code (_a2))
18577 : : {
18578 : 5284 : case EXACT_DIV_EXPR:
18579 : 5284 : {
18580 : 5284 : tree _q30 = gimple_assign_rhs1 (_a2);
18581 : 5284 : _q30 = do_valueize (valueize, _q30);
18582 : 5284 : tree _q31 = gimple_assign_rhs2 (_a2);
18583 : 5284 : _q31 = do_valueize (valueize, _q31);
18584 : 5284 : switch (TREE_CODE (_q31))
18585 : : {
18586 : 5284 : case INTEGER_CST:
18587 : 5284 : {
18588 : 5284 : switch (TREE_CODE (_p1))
18589 : : {
18590 : 4947 : case SSA_NAME:
18591 : 4947 : if (gimple *_d3 = get_def (valueize, _p1))
18592 : : {
18593 : 4592 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
18594 : 3225 : switch (gimple_assign_rhs_code (_a3))
18595 : : {
18596 : 699 : CASE_CONVERT:
18597 : 699 : {
18598 : 699 : tree _q60 = gimple_assign_rhs1 (_a3);
18599 : 699 : _q60 = do_valueize (valueize, _q60);
18600 : 699 : switch (TREE_CODE (_q60))
18601 : : {
18602 : 699 : case SSA_NAME:
18603 : 699 : if (gimple *_d4 = get_def (valueize, _q60))
18604 : : {
18605 : 699 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
18606 : 737 : switch (gimple_assign_rhs_code (_a4))
18607 : : {
18608 : 198 : case EXACT_DIV_EXPR:
18609 : 198 : {
18610 : 198 : tree _q70 = gimple_assign_rhs1 (_a4);
18611 : 198 : _q70 = do_valueize (valueize, _q70);
18612 : 198 : tree _q71 = gimple_assign_rhs2 (_a4);
18613 : 198 : _q71 = do_valueize (valueize, _q71);
18614 : 198 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
18615 : : {
18616 : 178 : {
18617 : 178 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q70 };
18618 : 178 : if (gimple_simplify_239 (res_op, seq, valueize, type, captures, GE_EXPR))
18619 : 60 : return true;
18620 : : }
18621 : : }
18622 : : break;
18623 : : }
18624 : : default:;
18625 : : }
18626 : : }
18627 : : break;
18628 : : default:;
18629 : : }
18630 : : break;
18631 : : }
18632 : : default:;
18633 : : }
18634 : : }
18635 : : break;
18636 : : default:;
18637 : : }
18638 : : break;
18639 : : }
18640 : : default:;
18641 : : }
18642 : : break;
18643 : : }
18644 : : default:;
18645 : : }
18646 : : }
18647 : : break;
18648 : : default:;
18649 : : }
18650 : : break;
18651 : : }
18652 : 14566 : case EXACT_DIV_EXPR:
18653 : 14566 : {
18654 : 14566 : tree _q20 = gimple_assign_rhs1 (_a1);
18655 : 14566 : _q20 = do_valueize (valueize, _q20);
18656 : 14566 : tree _q21 = gimple_assign_rhs2 (_a1);
18657 : 14566 : _q21 = do_valueize (valueize, _q21);
18658 : 14566 : switch (TREE_CODE (_q21))
18659 : : {
18660 : 14566 : case INTEGER_CST:
18661 : 14566 : {
18662 : 14566 : switch (TREE_CODE (_p1))
18663 : : {
18664 : 7643 : case SSA_NAME:
18665 : 7643 : if (gimple *_d2 = get_def (valueize, _p1))
18666 : : {
18667 : 6372 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18668 : 3333 : switch (gimple_assign_rhs_code (_a2))
18669 : : {
18670 : 18 : case EXACT_DIV_EXPR:
18671 : 18 : {
18672 : 18 : tree _q50 = gimple_assign_rhs1 (_a2);
18673 : 18 : _q50 = do_valueize (valueize, _q50);
18674 : 18 : tree _q51 = gimple_assign_rhs2 (_a2);
18675 : 18 : _q51 = do_valueize (valueize, _q51);
18676 : 18 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
18677 : : {
18678 : 18 : {
18679 : 18 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
18680 : 18 : if (gimple_simplify_239 (res_op, seq, valueize, type, captures, GE_EXPR))
18681 : 18 : return true;
18682 : : }
18683 : : }
18684 : : break;
18685 : : }
18686 : : default:;
18687 : : }
18688 : : }
18689 : : break;
18690 : : default:;
18691 : : }
18692 : : break;
18693 : : }
18694 : : default:;
18695 : : }
18696 : : break;
18697 : : }
18698 : 5083 : case TRUNC_DIV_EXPR:
18699 : 5083 : {
18700 : 5083 : tree _q20 = gimple_assign_rhs1 (_a1);
18701 : 5083 : _q20 = do_valueize (valueize, _q20);
18702 : 5083 : tree _q21 = gimple_assign_rhs2 (_a1);
18703 : 5083 : _q21 = do_valueize (valueize, _q21);
18704 : 5083 : switch (TREE_CODE (_q21))
18705 : : {
18706 : 3938 : case INTEGER_CST:
18707 : 3938 : {
18708 : 3938 : switch (TREE_CODE (_p1))
18709 : : {
18710 : 2989 : case INTEGER_CST:
18711 : 2989 : {
18712 : 2989 : {
18713 : 2989 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
18714 : 2989 : if (gimple_simplify_241 (res_op, seq, valueize, type, captures, GE_EXPR))
18715 : 2987 : return true;
18716 : : }
18717 : 2 : break;
18718 : : }
18719 : : default:;
18720 : : }
18721 : : break;
18722 : : }
18723 : : default:;
18724 : : }
18725 : : break;
18726 : : }
18727 : 507362 : case PLUS_EXPR:
18728 : 507362 : {
18729 : 507362 : tree _q20 = gimple_assign_rhs1 (_a1);
18730 : 507362 : _q20 = do_valueize (valueize, _q20);
18731 : 507362 : tree _q21 = gimple_assign_rhs2 (_a1);
18732 : 507362 : _q21 = do_valueize (valueize, _q21);
18733 : 507362 : if (tree_swap_operands_p (_q20, _q21))
18734 : 28000 : std::swap (_q20, _q21);
18735 : 507362 : switch (TREE_CODE (_p1))
18736 : : {
18737 : 281317 : case SSA_NAME:
18738 : 281317 : if (gimple *_d2 = get_def (valueize, _p1))
18739 : : {
18740 : 276420 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18741 : 242950 : switch (gimple_assign_rhs_code (_a2))
18742 : : {
18743 : 197196 : case PLUS_EXPR:
18744 : 197196 : {
18745 : 197196 : tree _q50 = gimple_assign_rhs1 (_a2);
18746 : 197196 : _q50 = do_valueize (valueize, _q50);
18747 : 197196 : tree _q51 = gimple_assign_rhs2 (_a2);
18748 : 197196 : _q51 = do_valueize (valueize, _q51);
18749 : 197196 : if (tree_swap_operands_p (_q50, _q51))
18750 : 23014 : std::swap (_q50, _q51);
18751 : 197196 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
18752 : : {
18753 : 1684 : {
18754 : 1684 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
18755 : 1684 : if (gimple_simplify_460 (res_op, seq, valueize, type, captures, GE_EXPR))
18756 : 26 : return true;
18757 : : }
18758 : : }
18759 : 197170 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
18760 : : {
18761 : 136 : {
18762 : 136 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
18763 : 136 : if (gimple_simplify_460 (res_op, seq, valueize, type, captures, GE_EXPR))
18764 : 60 : return true;
18765 : : }
18766 : : }
18767 : 197110 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
18768 : : {
18769 : 56 : {
18770 : 56 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
18771 : 56 : if (gimple_simplify_460 (res_op, seq, valueize, type, captures, GE_EXPR))
18772 : 2 : return true;
18773 : : }
18774 : : }
18775 : 197108 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
18776 : : {
18777 : 1774 : {
18778 : 1774 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
18779 : 1774 : if (gimple_simplify_460 (res_op, seq, valueize, type, captures, GE_EXPR))
18780 : 1129 : return true;
18781 : : }
18782 : : }
18783 : 506145 : break;
18784 : : }
18785 : : default:;
18786 : : }
18787 : : }
18788 : : break;
18789 : 506145 : default:;
18790 : : }
18791 : 506145 : switch (TREE_CODE (_q21))
18792 : : {
18793 : 260603 : case INTEGER_CST:
18794 : 260603 : {
18795 : 260603 : switch (TREE_CODE (_p1))
18796 : : {
18797 : 100997 : case SSA_NAME:
18798 : 100997 : if (gimple *_d2 = get_def (valueize, _p1))
18799 : : {
18800 : 97083 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18801 : 61896 : switch (gimple_assign_rhs_code (_a2))
18802 : : {
18803 : 42160 : case PLUS_EXPR:
18804 : 42160 : {
18805 : 42160 : tree _q50 = gimple_assign_rhs1 (_a2);
18806 : 42160 : _q50 = do_valueize (valueize, _q50);
18807 : 42160 : tree _q51 = gimple_assign_rhs2 (_a2);
18808 : 42160 : _q51 = do_valueize (valueize, _q51);
18809 : 42160 : if (tree_swap_operands_p (_q50, _q51))
18810 : 152 : std::swap (_q50, _q51);
18811 : 42160 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
18812 : : {
18813 : 1630 : {
18814 : 1630 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
18815 : 1630 : if (gimple_simplify_461 (res_op, seq, valueize, type, captures, GE_EXPR))
18816 : 0 : return true;
18817 : : }
18818 : : }
18819 : 506145 : break;
18820 : : }
18821 : : default:;
18822 : : }
18823 : : }
18824 : : break;
18825 : : default:;
18826 : : }
18827 : : break;
18828 : : }
18829 : 506145 : default:;
18830 : : }
18831 : 506145 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
18832 : : {
18833 : 4848 : {
18834 : 4848 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
18835 : 4848 : if (gimple_simplify_462 (res_op, seq, valueize, type, captures, GE_EXPR))
18836 : 121 : return true;
18837 : : }
18838 : : }
18839 : 506024 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
18840 : : {
18841 : 3733 : {
18842 : 3733 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
18843 : 3733 : if (gimple_simplify_462 (res_op, seq, valueize, type, captures, GE_EXPR))
18844 : 42 : return true;
18845 : : }
18846 : : }
18847 : 9189645 : break;
18848 : : }
18849 : 152676 : case MINUS_EXPR:
18850 : 152676 : {
18851 : 152676 : tree _q20 = gimple_assign_rhs1 (_a1);
18852 : 152676 : _q20 = do_valueize (valueize, _q20);
18853 : 152676 : tree _q21 = gimple_assign_rhs2 (_a1);
18854 : 152676 : _q21 = do_valueize (valueize, _q21);
18855 : 152676 : switch (TREE_CODE (_p1))
18856 : : {
18857 : 50874 : case SSA_NAME:
18858 : 50874 : if (gimple *_d2 = get_def (valueize, _p1))
18859 : : {
18860 : 47247 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18861 : 43940 : switch (gimple_assign_rhs_code (_a2))
18862 : : {
18863 : 26884 : case MINUS_EXPR:
18864 : 26884 : {
18865 : 26884 : tree _q50 = gimple_assign_rhs1 (_a2);
18866 : 26884 : _q50 = do_valueize (valueize, _q50);
18867 : 26884 : tree _q51 = gimple_assign_rhs2 (_a2);
18868 : 26884 : _q51 = do_valueize (valueize, _q51);
18869 : 26884 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
18870 : : {
18871 : 78 : {
18872 : 78 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
18873 : 78 : if (gimple_simplify_463 (res_op, seq, valueize, type, captures, GE_EXPR))
18874 : 0 : return true;
18875 : : }
18876 : : }
18877 : 26884 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
18878 : : {
18879 : 162 : {
18880 : 162 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
18881 : 162 : if (gimple_simplify_464 (res_op, seq, valueize, type, captures, GE_EXPR))
18882 : 0 : return true;
18883 : : }
18884 : : }
18885 : : break;
18886 : : }
18887 : : default:;
18888 : : }
18889 : : }
18890 : : break;
18891 : : default:;
18892 : : }
18893 : : break;
18894 : : }
18895 : 10221 : case POINTER_DIFF_EXPR:
18896 : 10221 : {
18897 : 10221 : tree _q20 = gimple_assign_rhs1 (_a1);
18898 : 10221 : _q20 = do_valueize (valueize, _q20);
18899 : 10221 : tree _q21 = gimple_assign_rhs2 (_a1);
18900 : 10221 : _q21 = do_valueize (valueize, _q21);
18901 : 10221 : switch (TREE_CODE (_p1))
18902 : : {
18903 : 3327 : case SSA_NAME:
18904 : 3327 : if (gimple *_d2 = get_def (valueize, _p1))
18905 : : {
18906 : 2839 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
18907 : 1733 : switch (gimple_assign_rhs_code (_a2))
18908 : : {
18909 : 88 : case POINTER_DIFF_EXPR:
18910 : 88 : {
18911 : 88 : tree _q50 = gimple_assign_rhs1 (_a2);
18912 : 88 : _q50 = do_valueize (valueize, _q50);
18913 : 88 : tree _q51 = gimple_assign_rhs2 (_a2);
18914 : 88 : _q51 = do_valueize (valueize, _q51);
18915 : 88 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
18916 : : {
18917 : 0 : {
18918 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50 };
18919 : 0 : if (gimple_simplify_245 (res_op, seq, valueize, type, captures, GE_EXPR))
18920 : 0 : return true;
18921 : : }
18922 : : }
18923 : 88 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
18924 : : {
18925 : 0 : {
18926 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q51 };
18927 : 0 : if (gimple_simplify_246 (res_op, seq, valueize, type, captures, GE_EXPR))
18928 : 0 : return true;
18929 : : }
18930 : : }
18931 : : break;
18932 : : }
18933 : : default:;
18934 : : }
18935 : : }
18936 : : break;
18937 : : default:;
18938 : : }
18939 : : break;
18940 : : }
18941 : : default:;
18942 : : }
18943 : : }
18944 : : break;
18945 : 9189645 : default:;
18946 : : }
18947 : 9189645 : switch (TREE_CODE (_p1))
18948 : : {
18949 : 3686281 : case SSA_NAME:
18950 : 3686281 : if (gimple *_d1 = get_def (valueize, _p1))
18951 : : {
18952 : 1309174 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
18953 : 1480029 : switch (gimple_assign_rhs_code (_a1))
18954 : : {
18955 : 328075 : case PLUS_EXPR:
18956 : 328075 : {
18957 : 328075 : tree _q30 = gimple_assign_rhs1 (_a1);
18958 : 328075 : _q30 = do_valueize (valueize, _q30);
18959 : 328075 : tree _q31 = gimple_assign_rhs2 (_a1);
18960 : 328075 : _q31 = do_valueize (valueize, _q31);
18961 : 328075 : if (tree_swap_operands_p (_q30, _q31))
18962 : 26675 : std::swap (_q30, _q31);
18963 : 328075 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
18964 : : {
18965 : 150724 : {
18966 : 150724 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
18967 : 150724 : if (gimple_simplify_462 (res_op, seq, valueize, type, captures, LE_EXPR))
18968 : 1377 : return true;
18969 : : }
18970 : : }
18971 : 326698 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
18972 : : {
18973 : 6862 : {
18974 : 6862 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q31, _p0 };
18975 : 6862 : if (gimple_simplify_462 (res_op, seq, valueize, type, captures, LE_EXPR))
18976 : 467 : return true;
18977 : : }
18978 : : }
18979 : 9187801 : break;
18980 : : }
18981 : 56632 : case MINUS_EXPR:
18982 : 56632 : {
18983 : 56632 : tree _q30 = gimple_assign_rhs1 (_a1);
18984 : 56632 : _q30 = do_valueize (valueize, _q30);
18985 : 56632 : tree _q31 = gimple_assign_rhs2 (_a1);
18986 : 56632 : _q31 = do_valueize (valueize, _q31);
18987 : 56632 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
18988 : : {
18989 : 7431 : {
18990 : 7431 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
18991 : 7431 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, GE_EXPR))
18992 : 0 : return true;
18993 : : }
18994 : : }
18995 : : break;
18996 : : }
18997 : : default:;
18998 : : }
18999 : : }
19000 : : break;
19001 : 9187801 : default:;
19002 : : }
19003 : 9187801 : switch (TREE_CODE (_p0))
19004 : : {
19005 : 8907750 : case SSA_NAME:
19006 : 8907750 : if (gimple *_d1 = get_def (valueize, _p0))
19007 : : {
19008 : 2799046 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19009 : 2833715 : switch (gimple_assign_rhs_code (_a1))
19010 : : {
19011 : 152676 : case MINUS_EXPR:
19012 : 152676 : {
19013 : 152676 : tree _q20 = gimple_assign_rhs1 (_a1);
19014 : 152676 : _q20 = do_valueize (valueize, _q20);
19015 : 152676 : tree _q21 = gimple_assign_rhs2 (_a1);
19016 : 152676 : _q21 = do_valueize (valueize, _q21);
19017 : 152676 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
19018 : : {
19019 : 98 : {
19020 : 98 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
19021 : 98 : if (gimple_simplify_244 (res_op, seq, valueize, type, captures, LE_EXPR))
19022 : 16 : return true;
19023 : : }
19024 : : }
19025 : : break;
19026 : : }
19027 : 2669 : case BIT_IOR_EXPR:
19028 : 2669 : {
19029 : 2669 : tree _q20 = gimple_assign_rhs1 (_a1);
19030 : 2669 : _q20 = do_valueize (valueize, _q20);
19031 : 2669 : tree _q21 = gimple_assign_rhs2 (_a1);
19032 : 2669 : _q21 = do_valueize (valueize, _q21);
19033 : 2669 : if (tree_swap_operands_p (_q20, _q21))
19034 : 246 : std::swap (_q20, _q21);
19035 : 2669 : if (tree_expr_nonnegative_p (_q20))
19036 : : {
19037 : 477 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
19038 : : {
19039 : 1 : {
19040 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
19041 : 1 : if (gimple_simplify_465 (res_op, seq, valueize, type, captures, GE_EXPR, BIT_IOR_EXPR))
19042 : 1 : return true;
19043 : : }
19044 : : }
19045 : : }
19046 : 2668 : if (tree_expr_nonnegative_p (_q21))
19047 : : {
19048 : 701 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
19049 : : {
19050 : 1 : {
19051 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
19052 : 1 : if (gimple_simplify_465 (res_op, seq, valueize, type, captures, GE_EXPR, BIT_IOR_EXPR))
19053 : 1 : return true;
19054 : : }
19055 : : }
19056 : : }
19057 : 9187783 : break;
19058 : : }
19059 : : default:;
19060 : : }
19061 : : }
19062 : : break;
19063 : 9187783 : default:;
19064 : : }
19065 : 9187783 : switch (TREE_CODE (_p1))
19066 : : {
19067 : 3684435 : case SSA_NAME:
19068 : 3684435 : if (gimple *_d1 = get_def (valueize, _p1))
19069 : : {
19070 : 1307328 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19071 : 1478185 : switch (gimple_assign_rhs_code (_a1))
19072 : : {
19073 : 1898 : case BIT_AND_EXPR:
19074 : 1898 : {
19075 : 1898 : tree _q30 = gimple_assign_rhs1 (_a1);
19076 : 1898 : _q30 = do_valueize (valueize, _q30);
19077 : 1898 : tree _q31 = gimple_assign_rhs2 (_a1);
19078 : 1898 : _q31 = do_valueize (valueize, _q31);
19079 : 1898 : if (tree_swap_operands_p (_q30, _q31))
19080 : 31 : std::swap (_q30, _q31);
19081 : 1898 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
19082 : : {
19083 : 22 : if (tree_expr_nonnegative_p (_q30))
19084 : : {
19085 : 6 : {
19086 : 6 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
19087 : 6 : if (gimple_simplify_465 (res_op, seq, valueize, type, captures, LE_EXPR, BIT_AND_EXPR))
19088 : 6 : return true;
19089 : : }
19090 : : }
19091 : : }
19092 : 1892 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
19093 : : {
19094 : 1 : if (tree_expr_nonnegative_p (_q31))
19095 : : {
19096 : 1 : {
19097 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
19098 : 1 : if (gimple_simplify_465 (res_op, seq, valueize, type, captures, LE_EXPR, BIT_AND_EXPR))
19099 : 1 : return true;
19100 : : }
19101 : : }
19102 : : }
19103 : 9187776 : break;
19104 : : }
19105 : : default:;
19106 : : }
19107 : : }
19108 : : break;
19109 : 9187776 : default:;
19110 : : }
19111 : 9187776 : switch (TREE_CODE (_p0))
19112 : : {
19113 : 8907725 : case SSA_NAME:
19114 : 8907725 : if (gimple *_d1 = get_def (valueize, _p0))
19115 : : {
19116 : 2799021 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19117 : 2833691 : switch (gimple_assign_rhs_code (_a1))
19118 : : {
19119 : 25817 : case MIN_EXPR:
19120 : 25817 : {
19121 : 25817 : tree _q20 = gimple_assign_rhs1 (_a1);
19122 : 25817 : _q20 = do_valueize (valueize, _q20);
19123 : 25817 : tree _q21 = gimple_assign_rhs2 (_a1);
19124 : 25817 : _q21 = do_valueize (valueize, _q21);
19125 : 25817 : if (tree_swap_operands_p (_q20, _q21))
19126 : 1168 : std::swap (_q20, _q21);
19127 : 25817 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
19128 : : {
19129 : 60 : {
19130 : 60 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
19131 : 60 : if (gimple_simplify_254 (res_op, seq, valueize, type, captures, MIN_EXPR, GE_EXPR, LE_EXPR))
19132 : 60 : return true;
19133 : : }
19134 : : }
19135 : 25757 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
19136 : : {
19137 : 44 : {
19138 : 44 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
19139 : 44 : if (gimple_simplify_254 (res_op, seq, valueize, type, captures, MIN_EXPR, GE_EXPR, LE_EXPR))
19140 : 44 : return true;
19141 : : }
19142 : : }
19143 : 25713 : switch (TREE_CODE (_q21))
19144 : : {
19145 : 19114 : case INTEGER_CST:
19146 : 19114 : {
19147 : 19114 : switch (TREE_CODE (_p1))
19148 : : {
19149 : 10177 : case INTEGER_CST:
19150 : 10177 : {
19151 : 10177 : {
19152 : 10177 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19153 : 10177 : if (gimple_simplify_466 (res_op, seq, valueize, type, captures, MIN_EXPR, GE_EXPR, BIT_AND_EXPR))
19154 : 85 : return true;
19155 : : }
19156 : 10092 : break;
19157 : : }
19158 : : default:;
19159 : : }
19160 : : break;
19161 : : }
19162 : : default:;
19163 : : }
19164 : 9187587 : break;
19165 : : }
19166 : : default:;
19167 : : }
19168 : : }
19169 : : break;
19170 : 9187587 : default:;
19171 : : }
19172 : 9187587 : switch (TREE_CODE (_p1))
19173 : : {
19174 : 3684338 : case SSA_NAME:
19175 : 3684338 : if (gimple *_d1 = get_def (valueize, _p1))
19176 : : {
19177 : 1307231 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19178 : 1477998 : switch (gimple_assign_rhs_code (_a1))
19179 : : {
19180 : 2857 : case MAX_EXPR:
19181 : 2857 : {
19182 : 2857 : tree _q30 = gimple_assign_rhs1 (_a1);
19183 : 2857 : _q30 = do_valueize (valueize, _q30);
19184 : 2857 : tree _q31 = gimple_assign_rhs2 (_a1);
19185 : 2857 : _q31 = do_valueize (valueize, _q31);
19186 : 2857 : if (tree_swap_operands_p (_q30, _q31))
19187 : 24 : std::swap (_q30, _q31);
19188 : 2857 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
19189 : : {
19190 : 2 : {
19191 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
19192 : 2 : if (gimple_simplify_254 (res_op, seq, valueize, type, captures, MAX_EXPR, LE_EXPR, GE_EXPR))
19193 : 2 : return true;
19194 : : }
19195 : : }
19196 : 2855 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
19197 : : {
19198 : 14 : {
19199 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
19200 : 14 : if (gimple_simplify_254 (res_op, seq, valueize, type, captures, MAX_EXPR, LE_EXPR, GE_EXPR))
19201 : 14 : return true;
19202 : : }
19203 : : }
19204 : 9187431 : break;
19205 : : }
19206 : 10877 : case MIN_EXPR:
19207 : 10877 : {
19208 : 10877 : tree _q30 = gimple_assign_rhs1 (_a1);
19209 : 10877 : _q30 = do_valueize (valueize, _q30);
19210 : 10877 : tree _q31 = gimple_assign_rhs2 (_a1);
19211 : 10877 : _q31 = do_valueize (valueize, _q31);
19212 : 10877 : if (tree_swap_operands_p (_q30, _q31))
19213 : 659 : std::swap (_q30, _q31);
19214 : 10877 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
19215 : : {
19216 : 57 : {
19217 : 57 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
19218 : 57 : if (gimple_simplify_467 (res_op, seq, valueize, type, captures, MIN_EXPR, GE_EXPR))
19219 : 57 : return true;
19220 : : }
19221 : : }
19222 : 10820 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
19223 : : {
19224 : 83 : {
19225 : 83 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
19226 : 83 : if (gimple_simplify_467 (res_op, seq, valueize, type, captures, MIN_EXPR, GE_EXPR))
19227 : 83 : return true;
19228 : : }
19229 : : }
19230 : 9187431 : break;
19231 : : }
19232 : : default:;
19233 : : }
19234 : : }
19235 : : break;
19236 : 9187431 : default:;
19237 : : }
19238 : 9187431 : switch (TREE_CODE (_p0))
19239 : : {
19240 : 8907380 : case SSA_NAME:
19241 : 8907380 : if (gimple *_d1 = get_def (valueize, _p0))
19242 : : {
19243 : 2798676 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19244 : 2833398 : switch (gimple_assign_rhs_code (_a1))
19245 : : {
19246 : 2513 : case MAX_EXPR:
19247 : 2513 : {
19248 : 2513 : tree _q20 = gimple_assign_rhs1 (_a1);
19249 : 2513 : _q20 = do_valueize (valueize, _q20);
19250 : 2513 : tree _q21 = gimple_assign_rhs2 (_a1);
19251 : 2513 : _q21 = do_valueize (valueize, _q21);
19252 : 2513 : if (tree_swap_operands_p (_q20, _q21))
19253 : 32 : std::swap (_q20, _q21);
19254 : 2513 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
19255 : : {
19256 : 1 : {
19257 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
19258 : 1 : if (gimple_simplify_467 (res_op, seq, valueize, type, captures, MAX_EXPR, LE_EXPR))
19259 : 1 : return true;
19260 : : }
19261 : : }
19262 : 2512 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
19263 : : {
19264 : 26 : {
19265 : 26 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
19266 : 26 : if (gimple_simplify_467 (res_op, seq, valueize, type, captures, MAX_EXPR, LE_EXPR))
19267 : 26 : return true;
19268 : : }
19269 : : }
19270 : 2486 : switch (TREE_CODE (_q21))
19271 : : {
19272 : 2272 : case INTEGER_CST:
19273 : 2272 : {
19274 : 2272 : switch (TREE_CODE (_p1))
19275 : : {
19276 : 1234 : case INTEGER_CST:
19277 : 1234 : {
19278 : 1234 : {
19279 : 1234 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19280 : 1234 : if (gimple_simplify_466 (res_op, seq, valueize, type, captures, MAX_EXPR, GE_EXPR, BIT_IOR_EXPR))
19281 : 208 : return true;
19282 : : }
19283 : 1026 : break;
19284 : : }
19285 : : default:;
19286 : : }
19287 : : break;
19288 : : }
19289 : : default:;
19290 : : }
19291 : 9187184 : break;
19292 : : }
19293 : 18 : case VEC_COND_EXPR:
19294 : 18 : {
19295 : 18 : tree _q20 = gimple_assign_rhs1 (_a1);
19296 : 18 : _q20 = do_valueize (valueize, _q20);
19297 : 18 : tree _q21 = gimple_assign_rhs2 (_a1);
19298 : 18 : _q21 = do_valueize (valueize, _q21);
19299 : 18 : tree _q22 = gimple_assign_rhs3 (_a1);
19300 : 18 : _q22 = do_valueize (valueize, _q22);
19301 : 18 : switch (TREE_CODE (_p1))
19302 : : {
19303 : 2 : case SSA_NAME:
19304 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
19305 : : {
19306 : 2 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19307 : 2 : switch (gimple_assign_rhs_code (_a2))
19308 : : {
19309 : 2 : case VEC_COND_EXPR:
19310 : 2 : {
19311 : 2 : tree _q60 = gimple_assign_rhs1 (_a2);
19312 : 2 : _q60 = do_valueize (valueize, _q60);
19313 : 2 : tree _q61 = gimple_assign_rhs2 (_a2);
19314 : 2 : _q61 = do_valueize (valueize, _q61);
19315 : 2 : tree _q62 = gimple_assign_rhs3 (_a2);
19316 : 2 : _q62 = do_valueize (valueize, _q62);
19317 : 2 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
19318 : : {
19319 : 0 : {
19320 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
19321 : 0 : if (VECTOR_TYPE_P (type)
19322 : 0 : && (TREE_CODE_CLASS (GE_EXPR) != tcc_comparison
19323 : 0 : || types_match (type, TREE_TYPE (captures[2]))
19324 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
19325 : : || (optimize_vectors_before_lowering_p ()
19326 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
19327 : : )
19328 : : {
19329 : 0 : gimple_seq *lseq = seq;
19330 : 0 : if (lseq
19331 : 0 : && (!single_use (captures[0])
19332 : 0 : || !single_use (captures[4])))
19333 : 0 : lseq = NULL;
19334 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2573;
19335 : 0 : {
19336 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
19337 : 0 : res_op->ops[0] = captures[1];
19338 : 0 : {
19339 : 0 : tree _o1[2], _r1;
19340 : 0 : _o1[0] = captures[2];
19341 : 0 : _o1[1] = captures[5];
19342 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
19343 : 0 : tem_op.resimplify (NULL, valueize);
19344 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19345 : 0 : if (!_r1) goto next_after_fail2573;
19346 : 0 : res_op->ops[1] = _r1;
19347 : : }
19348 : 0 : {
19349 : 0 : tree _o1[2], _r1;
19350 : 0 : _o1[0] = captures[3];
19351 : 0 : _o1[1] = captures[6];
19352 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
19353 : 0 : tem_op.resimplify (NULL, valueize);
19354 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19355 : 0 : if (!_r1) goto next_after_fail2573;
19356 : 0 : res_op->ops[2] = _r1;
19357 : : }
19358 : 0 : res_op->resimplify (lseq, valueize);
19359 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1060, __FILE__, __LINE__, true);
19360 : 0 : return true;
19361 : : }
19362 : 0 : next_after_fail2573:;
19363 : : }
19364 : : }
19365 : : }
19366 : : break;
19367 : : }
19368 : : default:;
19369 : : }
19370 : : }
19371 : : break;
19372 : 18 : default:;
19373 : : }
19374 : 18 : {
19375 : 18 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
19376 : 18 : if (VECTOR_TYPE_P (type)
19377 : 18 : && (TREE_CODE_CLASS (GE_EXPR) != tcc_comparison
19378 : 18 : || types_match (type, TREE_TYPE (captures[2]))
19379 : 18 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
19380 : : || (optimize_vectors_before_lowering_p ()
19381 : 10 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
19382 : : )
19383 : : {
19384 : 18 : gimple_seq *lseq = seq;
19385 : 18 : if (lseq
19386 : 4 : && (!single_use (captures[0])))
19387 : 16 : lseq = NULL;
19388 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2574;
19389 : 18 : {
19390 : 18 : res_op->set_op (VEC_COND_EXPR, type, 3);
19391 : 18 : res_op->ops[0] = captures[1];
19392 : 18 : {
19393 : 18 : tree _o1[2], _r1;
19394 : 18 : _o1[0] = captures[2];
19395 : 18 : _o1[1] = captures[4];
19396 : 18 : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
19397 : 18 : tem_op.resimplify (NULL, valueize);
19398 : 18 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19399 : 18 : if (!_r1) goto next_after_fail2574;
19400 : 14 : res_op->ops[1] = _r1;
19401 : : }
19402 : 14 : {
19403 : 14 : tree _o1[2], _r1;
19404 : 14 : _o1[0] = captures[3];
19405 : 14 : _o1[1] = captures[4];
19406 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
19407 : 14 : tem_op.resimplify (NULL, valueize);
19408 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19409 : 14 : if (!_r1) goto next_after_fail2574;
19410 : 12 : res_op->ops[2] = _r1;
19411 : : }
19412 : 12 : res_op->resimplify (lseq, valueize);
19413 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1062, __FILE__, __LINE__, true);
19414 : 12 : return true;
19415 : : }
19416 : 6 : next_after_fail2574:;
19417 : : }
19418 : : }
19419 : 6 : break;
19420 : : }
19421 : : default:;
19422 : : }
19423 : : }
19424 : : break;
19425 : 9187184 : default:;
19426 : : }
19427 : 9187184 : switch (TREE_CODE (_p1))
19428 : : {
19429 : 3684181 : case SSA_NAME:
19430 : 3684181 : if (gimple *_d1 = get_def (valueize, _p1))
19431 : : {
19432 : 1307074 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19433 : 1477842 : switch (gimple_assign_rhs_code (_a1))
19434 : : {
19435 : 2 : case VEC_COND_EXPR:
19436 : 2 : {
19437 : 2 : tree _q30 = gimple_assign_rhs1 (_a1);
19438 : 2 : _q30 = do_valueize (valueize, _q30);
19439 : 2 : tree _q31 = gimple_assign_rhs2 (_a1);
19440 : 2 : _q31 = do_valueize (valueize, _q31);
19441 : 2 : tree _q32 = gimple_assign_rhs3 (_a1);
19442 : 2 : _q32 = do_valueize (valueize, _q32);
19443 : 2 : {
19444 : 2 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
19445 : 2 : if (VECTOR_TYPE_P (type)
19446 : 2 : && (TREE_CODE_CLASS (GE_EXPR) != tcc_comparison
19447 : 2 : || types_match (type, TREE_TYPE (captures[3]))
19448 : 2 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
19449 : : || (optimize_vectors_before_lowering_p ()
19450 : 2 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
19451 : : )
19452 : : {
19453 : 2 : gimple_seq *lseq = seq;
19454 : 2 : if (lseq
19455 : 1 : && (!single_use (captures[1])))
19456 : 1 : lseq = NULL;
19457 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2575;
19458 : 2 : {
19459 : 2 : res_op->set_op (VEC_COND_EXPR, type, 3);
19460 : 2 : res_op->ops[0] = captures[2];
19461 : 2 : {
19462 : 2 : tree _o1[2], _r1;
19463 : 2 : _o1[0] = captures[0];
19464 : 2 : _o1[1] = captures[3];
19465 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
19466 : 2 : tem_op.resimplify (NULL, valueize);
19467 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19468 : 2 : if (!_r1) goto next_after_fail2575;
19469 : 2 : res_op->ops[1] = _r1;
19470 : : }
19471 : 2 : {
19472 : 2 : tree _o1[2], _r1;
19473 : 2 : _o1[0] = captures[0];
19474 : 2 : _o1[1] = captures[4];
19475 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), GE_EXPR, type, _o1[0], _o1[1]);
19476 : 2 : tem_op.resimplify (NULL, valueize);
19477 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
19478 : 2 : if (!_r1) goto next_after_fail2575;
19479 : 2 : res_op->ops[2] = _r1;
19480 : : }
19481 : 2 : res_op->resimplify (lseq, valueize);
19482 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1063, __FILE__, __LINE__, true);
19483 : 2 : return true;
19484 : : }
19485 : 0 : next_after_fail2575:;
19486 : : }
19487 : : }
19488 : 0 : break;
19489 : : }
19490 : : default:;
19491 : : }
19492 : : }
19493 : : break;
19494 : 9187182 : default:;
19495 : : }
19496 : 9187182 : if (uniform_integer_cst_p (_p1))
19497 : : {
19498 : 5082789 : {
19499 : 5082789 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
19500 : 5082789 : if (gimple_simplify_468 (res_op, seq, valueize, type, captures, GE_EXPR, GT_EXPR))
19501 : 225573 : return true;
19502 : : }
19503 : : }
19504 : 8961609 : switch (TREE_CODE (_p0))
19505 : : {
19506 : 8711478 : case SSA_NAME:
19507 : 8711478 : if (gimple *_d1 = get_def (valueize, _p0))
19508 : : {
19509 : 2688433 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19510 : 2724295 : switch (gimple_assign_rhs_code (_a1))
19511 : : {
19512 : 23757 : case MULT_EXPR:
19513 : 23757 : {
19514 : 23757 : tree _q20 = gimple_assign_rhs1 (_a1);
19515 : 23757 : _q20 = do_valueize (valueize, _q20);
19516 : 23757 : tree _q21 = gimple_assign_rhs2 (_a1);
19517 : 23757 : _q21 = do_valueize (valueize, _q21);
19518 : 23757 : if (tree_swap_operands_p (_q20, _q21))
19519 : 687 : std::swap (_q20, _q21);
19520 : 23757 : switch (TREE_CODE (_q21))
19521 : : {
19522 : 15249 : case INTEGER_CST:
19523 : 15249 : {
19524 : 15249 : if (integer_zerop (_p1))
19525 : : {
19526 : 5672 : {
19527 : 5672 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
19528 : 5672 : if (gimple_simplify_274 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
19529 : 27 : return true;
19530 : : }
19531 : : }
19532 : : break;
19533 : : }
19534 : : default:;
19535 : : }
19536 : 8961582 : break;
19537 : : }
19538 : : default:;
19539 : : }
19540 : : }
19541 : : break;
19542 : 8961582 : default:;
19543 : : }
19544 : 8961582 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
19545 : : {
19546 : 21041 : {
19547 : 21041 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
19548 : 21041 : if (gimple_simplify_276 (res_op, seq, valueize, type, captures, GE_EXPR))
19549 : 20374 : return true;
19550 : : }
19551 : : }
19552 : 8941208 : switch (TREE_CODE (_p0))
19553 : : {
19554 : 8699406 : case SSA_NAME:
19555 : 8699406 : if (gimple *_d1 = get_def (valueize, _p0))
19556 : : {
19557 : 2678263 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19558 : 2708554 : switch (gimple_assign_rhs_code (_a1))
19559 : : {
19560 : 1120 : case BIT_NOT_EXPR:
19561 : 1120 : {
19562 : 1120 : tree _q20 = gimple_assign_rhs1 (_a1);
19563 : 1120 : _q20 = do_valueize (valueize, _q20);
19564 : 1120 : switch (TREE_CODE (_p1))
19565 : : {
19566 : 750 : case SSA_NAME:
19567 : 750 : if (gimple *_d2 = get_def (valueize, _p1))
19568 : : {
19569 : 626 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19570 : 653 : switch (gimple_assign_rhs_code (_a2))
19571 : : {
19572 : 0 : case BIT_NOT_EXPR:
19573 : 0 : {
19574 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
19575 : 0 : _q40 = do_valueize (valueize, _q40);
19576 : 0 : {
19577 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _p1, _q40 };
19578 : 0 : if (gimple_simplify_280 (res_op, seq, valueize, type, captures, GE_EXPR))
19579 : 0 : return true;
19580 : : }
19581 : 0 : break;
19582 : : }
19583 : : default:;
19584 : : }
19585 : : }
19586 : : break;
19587 : 1120 : default:;
19588 : : }
19589 : 1120 : {
19590 : 1120 : tree _p1_pops[1];
19591 : 1120 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
19592 : : {
19593 : 108 : tree _q40 = _p1_pops[0];
19594 : 108 : switch (TREE_CODE (_q40))
19595 : : {
19596 : 108 : case SSA_NAME:
19597 : 108 : if (gimple *_d2 = get_def (valueize, _q40))
19598 : : {
19599 : 90 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19600 : 180 : switch (gimple_assign_rhs_code (_a2))
19601 : : {
19602 : 0 : case BIT_NOT_EXPR:
19603 : 0 : {
19604 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
19605 : 0 : _q50 = do_valueize (valueize, _q50);
19606 : 0 : {
19607 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q40, _q50 };
19608 : 0 : if (gimple_simplify_280 (res_op, seq, valueize, type, captures, GE_EXPR))
19609 : 0 : return true;
19610 : : }
19611 : 0 : break;
19612 : : }
19613 : : default:;
19614 : : }
19615 : : }
19616 : : break;
19617 : : default:;
19618 : : }
19619 : : }
19620 : : }
19621 : 1120 : if (CONSTANT_CLASS_P (_p1))
19622 : : {
19623 : 370 : {
19624 : 370 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
19625 : 370 : if (gimple_simplify_279 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
19626 : 28 : return true;
19627 : : }
19628 : : }
19629 : : break;
19630 : : }
19631 : : default:;
19632 : : }
19633 : : }
19634 : : break;
19635 : 8941180 : default:;
19636 : : }
19637 : 8941180 : {
19638 : 8941180 : tree _p0_pops[1];
19639 : 8941180 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
19640 : : {
19641 : 162787 : tree _q20 = _p0_pops[0];
19642 : 162787 : switch (TREE_CODE (_q20))
19643 : : {
19644 : 161843 : case SSA_NAME:
19645 : 161843 : if (gimple *_d1 = get_def (valueize, _q20))
19646 : : {
19647 : 154544 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19648 : 162100 : switch (gimple_assign_rhs_code (_a1))
19649 : : {
19650 : 41 : case BIT_NOT_EXPR:
19651 : 41 : {
19652 : 41 : tree _q30 = gimple_assign_rhs1 (_a1);
19653 : 41 : _q30 = do_valueize (valueize, _q30);
19654 : 41 : switch (TREE_CODE (_p1))
19655 : : {
19656 : 0 : case SSA_NAME:
19657 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
19658 : : {
19659 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19660 : 0 : switch (gimple_assign_rhs_code (_a2))
19661 : : {
19662 : 0 : case BIT_NOT_EXPR:
19663 : 0 : {
19664 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
19665 : 0 : _q50 = do_valueize (valueize, _q50);
19666 : 0 : {
19667 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _p1, _q50 };
19668 : 0 : if (gimple_simplify_278 (res_op, seq, valueize, type, captures, GE_EXPR))
19669 : 0 : return true;
19670 : : }
19671 : 0 : break;
19672 : : }
19673 : : default:;
19674 : : }
19675 : : }
19676 : : break;
19677 : 41 : default:;
19678 : : }
19679 : 41 : {
19680 : 41 : tree _p1_pops[1];
19681 : 41 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
19682 : : {
19683 : 0 : tree _q50 = _p1_pops[0];
19684 : 0 : switch (TREE_CODE (_q50))
19685 : : {
19686 : 0 : case SSA_NAME:
19687 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
19688 : : {
19689 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19690 : 0 : switch (gimple_assign_rhs_code (_a2))
19691 : : {
19692 : 0 : case BIT_NOT_EXPR:
19693 : 0 : {
19694 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
19695 : 0 : _q60 = do_valueize (valueize, _q60);
19696 : 0 : {
19697 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q50, _q60 };
19698 : 0 : if (gimple_simplify_278 (res_op, seq, valueize, type, captures, GE_EXPR))
19699 : 0 : return true;
19700 : : }
19701 : 0 : break;
19702 : : }
19703 : : default:;
19704 : : }
19705 : : }
19706 : : break;
19707 : : default:;
19708 : : }
19709 : : }
19710 : : }
19711 : 41 : if (CONSTANT_CLASS_P (_p1))
19712 : : {
19713 : 41 : {
19714 : 41 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
19715 : 41 : if (gimple_simplify_279 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
19716 : 7 : return true;
19717 : : }
19718 : : }
19719 : : break;
19720 : : }
19721 : : default:;
19722 : : }
19723 : : }
19724 : : break;
19725 : : default:;
19726 : : }
19727 : : }
19728 : : }
19729 : 8941173 : switch (TREE_CODE (_p1))
19730 : : {
19731 : 291082 : case REAL_CST:
19732 : 291082 : {
19733 : 291082 : {
19734 : 291082 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
19735 : 291082 : if (gimple_simplify_281 (res_op, seq, valueize, type, captures, GE_EXPR))
19736 : 40 : return true;
19737 : : }
19738 : 291042 : break;
19739 : : }
19740 : 8941133 : default:;
19741 : : }
19742 : 8941133 : switch (TREE_CODE (_p0))
19743 : : {
19744 : 8699331 : case SSA_NAME:
19745 : 8699331 : if (gimple *_d1 = get_def (valueize, _p0))
19746 : : {
19747 : 2678200 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
19748 : 2708487 : switch (gimple_assign_rhs_code (_a1))
19749 : : {
19750 : 494890 : case PLUS_EXPR:
19751 : 494890 : {
19752 : 494890 : tree _q20 = gimple_assign_rhs1 (_a1);
19753 : 494890 : _q20 = do_valueize (valueize, _q20);
19754 : 494890 : tree _q21 = gimple_assign_rhs2 (_a1);
19755 : 494890 : _q21 = do_valueize (valueize, _q21);
19756 : 494890 : if (tree_swap_operands_p (_q20, _q21))
19757 : 27821 : std::swap (_q20, _q21);
19758 : 494890 : switch (TREE_CODE (_q21))
19759 : : {
19760 : 394 : case REAL_CST:
19761 : 394 : {
19762 : 394 : switch (TREE_CODE (_p1))
19763 : : {
19764 : 99 : case REAL_CST:
19765 : 99 : {
19766 : 99 : {
19767 : 99 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19768 : 99 : if (gimple_simplify_282 (res_op, seq, valueize, type, captures, PLUS_EXPR, GE_EXPR))
19769 : 0 : return true;
19770 : : }
19771 : 99 : break;
19772 : : }
19773 : : default:;
19774 : : }
19775 : : break;
19776 : : }
19777 : 251135 : case INTEGER_CST:
19778 : 251135 : {
19779 : 251135 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
19780 : : {
19781 : 2906 : {
19782 : 2906 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q20, _q21 };
19783 : 2906 : if (gimple_simplify_469 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
19784 : 42 : return true;
19785 : : }
19786 : : }
19787 : : break;
19788 : : }
19789 : : default:;
19790 : : }
19791 : 8922338 : break;
19792 : : }
19793 : 147997 : case MINUS_EXPR:
19794 : 147997 : {
19795 : 147997 : tree _q20 = gimple_assign_rhs1 (_a1);
19796 : 147997 : _q20 = do_valueize (valueize, _q20);
19797 : 147997 : tree _q21 = gimple_assign_rhs2 (_a1);
19798 : 147997 : _q21 = do_valueize (valueize, _q21);
19799 : 147997 : switch (TREE_CODE (_q21))
19800 : : {
19801 : 126 : case REAL_CST:
19802 : 126 : {
19803 : 126 : switch (TREE_CODE (_p1))
19804 : : {
19805 : 126 : case REAL_CST:
19806 : 126 : {
19807 : 126 : {
19808 : 126 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19809 : 126 : if (gimple_simplify_282 (res_op, seq, valueize, type, captures, MINUS_EXPR, GE_EXPR))
19810 : 0 : return true;
19811 : : }
19812 : 126 : break;
19813 : : }
19814 : : default:;
19815 : : }
19816 : : break;
19817 : : }
19818 : 147997 : default:;
19819 : : }
19820 : 147997 : switch (TREE_CODE (_q20))
19821 : : {
19822 : 0 : case REAL_CST:
19823 : 0 : {
19824 : 0 : switch (TREE_CODE (_p1))
19825 : : {
19826 : 0 : case REAL_CST:
19827 : 0 : {
19828 : 0 : {
19829 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19830 : 0 : if (gimple_simplify_283 (res_op, seq, valueize, type, captures, GE_EXPR))
19831 : 0 : return true;
19832 : : }
19833 : 0 : break;
19834 : : }
19835 : : default:;
19836 : : }
19837 : : break;
19838 : : }
19839 : : default:;
19840 : : }
19841 : : break;
19842 : : }
19843 : 1736 : case FLOAT_EXPR:
19844 : 1736 : {
19845 : 1736 : tree _q20 = gimple_assign_rhs1 (_a1);
19846 : 1736 : _q20 = do_valueize (valueize, _q20);
19847 : 1736 : switch (TREE_CODE (_p1))
19848 : : {
19849 : 945 : case SSA_NAME:
19850 : 945 : if (gimple *_d2 = get_def (valueize, _p1))
19851 : : {
19852 : 897 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19853 : 1137 : switch (gimple_assign_rhs_code (_a2))
19854 : : {
19855 : 192 : case FLOAT_EXPR:
19856 : 192 : {
19857 : 192 : tree _q40 = gimple_assign_rhs1 (_a2);
19858 : 192 : _q40 = do_valueize (valueize, _q40);
19859 : 192 : {
19860 : 192 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
19861 : 192 : if (gimple_simplify_286 (res_op, seq, valueize, type, captures, GE_EXPR, GE_EXPR))
19862 : 12 : return true;
19863 : : }
19864 : 180 : break;
19865 : : }
19866 : : default:;
19867 : : }
19868 : : }
19869 : : break;
19870 : 791 : case REAL_CST:
19871 : 791 : {
19872 : 791 : {
19873 : 791 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
19874 : 791 : if (gimple_simplify_287 (res_op, seq, valueize, type, captures, GE_EXPR, GE_EXPR))
19875 : 56 : return true;
19876 : : }
19877 : 735 : break;
19878 : : }
19879 : : default:;
19880 : : }
19881 : : break;
19882 : : }
19883 : 13045 : case EXACT_DIV_EXPR:
19884 : 13045 : {
19885 : 13045 : tree _q20 = gimple_assign_rhs1 (_a1);
19886 : 13045 : _q20 = do_valueize (valueize, _q20);
19887 : 13045 : tree _q21 = gimple_assign_rhs2 (_a1);
19888 : 13045 : _q21 = do_valueize (valueize, _q21);
19889 : 13045 : switch (TREE_CODE (_q21))
19890 : : {
19891 : 13045 : case INTEGER_CST:
19892 : 13045 : {
19893 : 13045 : switch (TREE_CODE (_p1))
19894 : : {
19895 : 5420 : case INTEGER_CST:
19896 : 5420 : {
19897 : 5420 : {
19898 : 5420 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
19899 : 5420 : if (gimple_simplify_470 (res_op, seq, valueize, type, captures, GE_EXPR))
19900 : 5420 : return true;
19901 : : }
19902 : 0 : break;
19903 : : }
19904 : : default:;
19905 : : }
19906 : : break;
19907 : : }
19908 : : default:;
19909 : : }
19910 : : break;
19911 : : }
19912 : 252546 : CASE_CONVERT:
19913 : 252546 : {
19914 : 252546 : tree _q20 = gimple_assign_rhs1 (_a1);
19915 : 252546 : _q20 = do_valueize (valueize, _q20);
19916 : 252546 : switch (TREE_CODE (_q20))
19917 : : {
19918 : 251602 : case SSA_NAME:
19919 : 251602 : if (gimple *_d2 = get_def (valueize, _q20))
19920 : : {
19921 : 242536 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19922 : 248394 : switch (gimple_assign_rhs_code (_a2))
19923 : : {
19924 : 4912 : case EXACT_DIV_EXPR:
19925 : 4912 : {
19926 : 4912 : tree _q30 = gimple_assign_rhs1 (_a2);
19927 : 4912 : _q30 = do_valueize (valueize, _q30);
19928 : 4912 : tree _q31 = gimple_assign_rhs2 (_a2);
19929 : 4912 : _q31 = do_valueize (valueize, _q31);
19930 : 4912 : switch (TREE_CODE (_q31))
19931 : : {
19932 : 4912 : case INTEGER_CST:
19933 : 4912 : {
19934 : 4912 : switch (TREE_CODE (_p1))
19935 : : {
19936 : 25 : case INTEGER_CST:
19937 : 25 : {
19938 : 25 : {
19939 : 25 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p1 };
19940 : 25 : if (gimple_simplify_471 (res_op, seq, valueize, type, captures, GE_EXPR, LT_EXPR))
19941 : 2 : return true;
19942 : : }
19943 : 23 : break;
19944 : : }
19945 : : default:;
19946 : : }
19947 : : break;
19948 : : }
19949 : : default:;
19950 : : }
19951 : : break;
19952 : : }
19953 : : default:;
19954 : : }
19955 : : }
19956 : : break;
19957 : 252544 : default:;
19958 : : }
19959 : 252544 : switch (TREE_CODE (_p1))
19960 : : {
19961 : 144013 : case SSA_NAME:
19962 : 144013 : if (gimple *_d2 = get_def (valueize, _p1))
19963 : : {
19964 : 138626 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19965 : 123375 : switch (gimple_assign_rhs_code (_a2))
19966 : : {
19967 : 74930 : CASE_CONVERT:
19968 : 74930 : {
19969 : 74930 : tree _q40 = gimple_assign_rhs1 (_a2);
19970 : 74930 : _q40 = do_valueize (valueize, _q40);
19971 : 74930 : {
19972 : 74930 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
19973 : 74930 : if (gimple_simplify_291 (res_op, seq, valueize, type, captures, GE_EXPR))
19974 : 177 : return true;
19975 : : }
19976 : 74753 : break;
19977 : : }
19978 : : default:;
19979 : : }
19980 : : }
19981 : : break;
19982 : 252367 : default:;
19983 : : }
19984 : 252367 : {
19985 : 252367 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
19986 : 252367 : if (gimple_simplify_292 (res_op, seq, valueize, type, captures, GE_EXPR))
19987 : 1196 : return true;
19988 : : }
19989 : 251171 : switch (TREE_CODE (_q20))
19990 : : {
19991 : 250227 : case SSA_NAME:
19992 : 250227 : if (gimple *_d2 = get_def (valueize, _q20))
19993 : : {
19994 : 241320 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
19995 : 246635 : switch (gimple_assign_rhs_code (_a2))
19996 : : {
19997 : 0 : case ADDR_EXPR:
19998 : 0 : {
19999 : 0 : switch (TREE_CODE (_p1))
20000 : : {
20001 : 0 : case SSA_NAME:
20002 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
20003 : : {
20004 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
20005 : 0 : switch (gimple_assign_rhs_code (_a3))
20006 : : {
20007 : 0 : CASE_CONVERT:
20008 : 0 : {
20009 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
20010 : 0 : _q40 = do_valueize (valueize, _q40);
20011 : 0 : switch (TREE_CODE (_q40))
20012 : : {
20013 : 0 : case SSA_NAME:
20014 : 0 : if (gimple *_d4 = get_def (valueize, _q40))
20015 : : {
20016 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
20017 : 0 : switch (gimple_assign_rhs_code (_a4))
20018 : : {
20019 : 0 : case ADDR_EXPR:
20020 : 0 : {
20021 : 0 : {
20022 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
20023 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20024 : 0 : return true;
20025 : : }
20026 : 0 : break;
20027 : : }
20028 : : default:;
20029 : : }
20030 : : }
20031 : : break;
20032 : 0 : case ADDR_EXPR:
20033 : 0 : {
20034 : 0 : {
20035 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
20036 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20037 : 0 : return true;
20038 : : }
20039 : 0 : break;
20040 : : }
20041 : : default:;
20042 : : }
20043 : : break;
20044 : : }
20045 : 0 : case ADDR_EXPR:
20046 : 0 : {
20047 : 0 : {
20048 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
20049 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20050 : 0 : return true;
20051 : : }
20052 : 0 : break;
20053 : : }
20054 : : default:;
20055 : : }
20056 : : }
20057 : : break;
20058 : 0 : case ADDR_EXPR:
20059 : 0 : {
20060 : 0 : {
20061 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
20062 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20063 : 0 : return true;
20064 : : }
20065 : 0 : break;
20066 : : }
20067 : : default:;
20068 : : }
20069 : : break;
20070 : : }
20071 : : default:;
20072 : : }
20073 : : }
20074 : : break;
20075 : 944 : case ADDR_EXPR:
20076 : 944 : {
20077 : 944 : switch (TREE_CODE (_p1))
20078 : : {
20079 : 944 : case SSA_NAME:
20080 : 944 : if (gimple *_d2 = get_def (valueize, _p1))
20081 : : {
20082 : 944 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20083 : 1680 : switch (gimple_assign_rhs_code (_a2))
20084 : : {
20085 : 153 : CASE_CONVERT:
20086 : 153 : {
20087 : 153 : tree _q40 = gimple_assign_rhs1 (_a2);
20088 : 153 : _q40 = do_valueize (valueize, _q40);
20089 : 153 : switch (TREE_CODE (_q40))
20090 : : {
20091 : 0 : case SSA_NAME:
20092 : 0 : if (gimple *_d3 = get_def (valueize, _q40))
20093 : : {
20094 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
20095 : 0 : switch (gimple_assign_rhs_code (_a3))
20096 : : {
20097 : 0 : case ADDR_EXPR:
20098 : 0 : {
20099 : 0 : {
20100 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
20101 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20102 : 0 : return true;
20103 : : }
20104 : 0 : break;
20105 : : }
20106 : : default:;
20107 : : }
20108 : : }
20109 : : break;
20110 : 153 : case ADDR_EXPR:
20111 : 153 : {
20112 : 153 : {
20113 : 153 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
20114 : 153 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20115 : 14 : return true;
20116 : : }
20117 : 139 : break;
20118 : : }
20119 : : default:;
20120 : : }
20121 : : break;
20122 : : }
20123 : 0 : case ADDR_EXPR:
20124 : 0 : {
20125 : 0 : {
20126 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
20127 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20128 : 0 : return true;
20129 : : }
20130 : 0 : break;
20131 : : }
20132 : : default:;
20133 : : }
20134 : : }
20135 : : break;
20136 : 0 : case ADDR_EXPR:
20137 : 0 : {
20138 : 0 : {
20139 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
20140 : 0 : if (gimple_simplify_309 (res_op, seq, valueize, type, captures, GE_EXPR))
20141 : 0 : return true;
20142 : : }
20143 : 0 : break;
20144 : : }
20145 : : default:;
20146 : : }
20147 : : break;
20148 : : }
20149 : 251157 : default:;
20150 : : }
20151 : 251157 : if (uniform_integer_cst_p (_p1))
20152 : : {
20153 : 104690 : {
20154 : 104690 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
20155 : 104690 : if (gimple_simplify_472 (res_op, seq, valueize, type, captures, GE_EXPR))
20156 : 399 : return true;
20157 : : }
20158 : : }
20159 : : break;
20160 : : }
20161 : 2986 : case NEGATE_EXPR:
20162 : 2986 : {
20163 : 2986 : tree _q20 = gimple_assign_rhs1 (_a1);
20164 : 2986 : _q20 = do_valueize (valueize, _q20);
20165 : 2986 : switch (TREE_CODE (_p1))
20166 : : {
20167 : 1222 : case SSA_NAME:
20168 : 1222 : if (gimple *_d2 = get_def (valueize, _p1))
20169 : : {
20170 : 1142 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20171 : 1176 : switch (gimple_assign_rhs_code (_a2))
20172 : : {
20173 : 90 : case NEGATE_EXPR:
20174 : 90 : {
20175 : 90 : tree _q40 = gimple_assign_rhs1 (_a2);
20176 : 90 : _q40 = do_valueize (valueize, _q40);
20177 : 90 : {
20178 : 90 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
20179 : 90 : if (gimple_simplify_289 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
20180 : 90 : return true;
20181 : : }
20182 : 0 : break;
20183 : : }
20184 : : default:;
20185 : : }
20186 : : }
20187 : : break;
20188 : 2896 : default:;
20189 : : }
20190 : 2896 : if (CONSTANT_CLASS_P (_p1))
20191 : : {
20192 : 1764 : {
20193 : 1764 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
20194 : 1764 : if (gimple_simplify_290 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
20195 : 1340 : return true;
20196 : : }
20197 : : }
20198 : : break;
20199 : : }
20200 : 71 : case ADDR_EXPR:
20201 : 71 : {
20202 : 71 : switch (TREE_CODE (_p1))
20203 : : {
20204 : 71 : case SSA_NAME:
20205 : 71 : if (gimple *_d2 = get_def (valueize, _p1))
20206 : : {
20207 : 71 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20208 : 137 : switch (gimple_assign_rhs_code (_a2))
20209 : : {
20210 : 2 : CASE_CONVERT:
20211 : 2 : {
20212 : 2 : tree _q30 = gimple_assign_rhs1 (_a2);
20213 : 2 : _q30 = do_valueize (valueize, _q30);
20214 : 2 : switch (TREE_CODE (_q30))
20215 : : {
20216 : 2 : case SSA_NAME:
20217 : 2 : if (gimple *_d3 = get_def (valueize, _q30))
20218 : : {
20219 : 2 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
20220 : 2 : switch (gimple_assign_rhs_code (_a3))
20221 : : {
20222 : 0 : case ADDR_EXPR:
20223 : 0 : {
20224 : 0 : {
20225 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
20226 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20227 : 0 : return true;
20228 : : }
20229 : 0 : break;
20230 : : }
20231 : : default:;
20232 : : }
20233 : : }
20234 : : break;
20235 : 0 : case ADDR_EXPR:
20236 : 0 : {
20237 : 0 : {
20238 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
20239 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20240 : 0 : return true;
20241 : : }
20242 : 0 : break;
20243 : : }
20244 : : default:;
20245 : : }
20246 : : break;
20247 : : }
20248 : 12 : case ADDR_EXPR:
20249 : 12 : {
20250 : 12 : {
20251 : 12 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
20252 : 12 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20253 : 12 : return true;
20254 : : }
20255 : 0 : break;
20256 : : }
20257 : : default:;
20258 : : }
20259 : : }
20260 : : break;
20261 : 0 : case ADDR_EXPR:
20262 : 0 : {
20263 : 0 : {
20264 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
20265 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20266 : 0 : return true;
20267 : : }
20268 : 0 : break;
20269 : : }
20270 : : default:;
20271 : : }
20272 : : break;
20273 : : }
20274 : : default:;
20275 : : }
20276 : 799603 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
20277 : 155171 : switch (gimple_call_combined_fn (_c1))
20278 : : {
20279 : 8 : case CFN_BUILT_IN_SQRTF:
20280 : 8 : if (gimple_call_num_args (_c1) == 1)
20281 : : {
20282 : 8 : tree _q20 = gimple_call_arg (_c1, 0);
20283 : 8 : _q20 = do_valueize (valueize, _q20);
20284 : 8 : switch (TREE_CODE (_p1))
20285 : : {
20286 : 2 : case SSA_NAME:
20287 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
20288 : : {
20289 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
20290 : 2 : switch (gimple_call_combined_fn (_c2))
20291 : : {
20292 : 2 : case CFN_BUILT_IN_SQRTF:
20293 : 2 : if (gimple_call_num_args (_c2) == 1)
20294 : : {
20295 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
20296 : 2 : _q40 = do_valueize (valueize, _q40);
20297 : 2 : {
20298 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
20299 : 2 : if (gimple_simplify_285 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF, GE_EXPR))
20300 : 2 : return true;
20301 : : }
20302 : : }
20303 : : break;
20304 : : default:;
20305 : : }
20306 : : }
20307 : : break;
20308 : 6 : case REAL_CST:
20309 : 6 : {
20310 : 6 : {
20311 : 6 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
20312 : 6 : if (gimple_simplify_284 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF, GE_EXPR))
20313 : 6 : return true;
20314 : : }
20315 : 0 : break;
20316 : : }
20317 : : default:;
20318 : : }
20319 : : }
20320 : : break;
20321 : 8 : case CFN_BUILT_IN_SQRTL:
20322 : 8 : if (gimple_call_num_args (_c1) == 1)
20323 : : {
20324 : 8 : tree _q20 = gimple_call_arg (_c1, 0);
20325 : 8 : _q20 = do_valueize (valueize, _q20);
20326 : 8 : switch (TREE_CODE (_p1))
20327 : : {
20328 : 2 : case SSA_NAME:
20329 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
20330 : : {
20331 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
20332 : 2 : switch (gimple_call_combined_fn (_c2))
20333 : : {
20334 : 2 : case CFN_BUILT_IN_SQRTL:
20335 : 2 : if (gimple_call_num_args (_c2) == 1)
20336 : : {
20337 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
20338 : 2 : _q40 = do_valueize (valueize, _q40);
20339 : 2 : {
20340 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
20341 : 2 : if (gimple_simplify_285 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTL, GE_EXPR))
20342 : 2 : return true;
20343 : : }
20344 : : }
20345 : : break;
20346 : : default:;
20347 : : }
20348 : : }
20349 : : break;
20350 : 6 : case REAL_CST:
20351 : 6 : {
20352 : 6 : {
20353 : 6 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
20354 : 6 : if (gimple_simplify_284 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTL, GE_EXPR))
20355 : 6 : return true;
20356 : : }
20357 : 0 : break;
20358 : : }
20359 : : default:;
20360 : : }
20361 : : }
20362 : : break;
20363 : 25 : case CFN_BUILT_IN_SQRT:
20364 : 25 : if (gimple_call_num_args (_c1) == 1)
20365 : : {
20366 : 25 : tree _q20 = gimple_call_arg (_c1, 0);
20367 : 25 : _q20 = do_valueize (valueize, _q20);
20368 : 25 : switch (TREE_CODE (_p1))
20369 : : {
20370 : 2 : case SSA_NAME:
20371 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
20372 : : {
20373 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
20374 : 2 : switch (gimple_call_combined_fn (_c2))
20375 : : {
20376 : 2 : case CFN_BUILT_IN_SQRT:
20377 : 2 : if (gimple_call_num_args (_c2) == 1)
20378 : : {
20379 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
20380 : 2 : _q40 = do_valueize (valueize, _q40);
20381 : 2 : {
20382 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
20383 : 2 : if (gimple_simplify_285 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRT, GE_EXPR))
20384 : 2 : return true;
20385 : : }
20386 : : }
20387 : : break;
20388 : : default:;
20389 : : }
20390 : : }
20391 : : break;
20392 : 23 : case REAL_CST:
20393 : 23 : {
20394 : 23 : {
20395 : 23 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
20396 : 23 : if (gimple_simplify_284 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRT, GE_EXPR))
20397 : 6 : return true;
20398 : : }
20399 : 17 : break;
20400 : : }
20401 : : default:;
20402 : : }
20403 : : }
20404 : : break;
20405 : 0 : case CFN_SQRT:
20406 : 0 : if (gimple_call_num_args (_c1) == 1)
20407 : : {
20408 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
20409 : 0 : _q20 = do_valueize (valueize, _q20);
20410 : 0 : switch (TREE_CODE (_p1))
20411 : : {
20412 : 0 : case SSA_NAME:
20413 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
20414 : : {
20415 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
20416 : 0 : switch (gimple_call_combined_fn (_c2))
20417 : : {
20418 : 0 : case CFN_SQRT:
20419 : 0 : if (gimple_call_num_args (_c2) == 1)
20420 : : {
20421 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
20422 : 0 : _q40 = do_valueize (valueize, _q40);
20423 : 0 : {
20424 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
20425 : 0 : if (gimple_simplify_285 (res_op, seq, valueize, type, captures, CFN_SQRT, GE_EXPR))
20426 : 0 : return true;
20427 : : }
20428 : : }
20429 : : break;
20430 : : default:;
20431 : : }
20432 : : }
20433 : : break;
20434 : 0 : case REAL_CST:
20435 : 0 : {
20436 : 0 : {
20437 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
20438 : 0 : if (gimple_simplify_284 (res_op, seq, valueize, type, captures, CFN_SQRT, GE_EXPR))
20439 : 0 : return true;
20440 : : }
20441 : 0 : break;
20442 : : }
20443 : : default:;
20444 : : }
20445 : : }
20446 : : break;
20447 : : default:;
20448 : : }
20449 : : }
20450 : : break;
20451 : 10083 : case ADDR_EXPR:
20452 : 10083 : {
20453 : 10083 : switch (TREE_CODE (_p1))
20454 : : {
20455 : 0 : case SSA_NAME:
20456 : 0 : if (gimple *_d1 = get_def (valueize, _p1))
20457 : : {
20458 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20459 : 0 : switch (gimple_assign_rhs_code (_a1))
20460 : : {
20461 : 0 : CASE_CONVERT:
20462 : 0 : {
20463 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
20464 : 0 : _q30 = do_valueize (valueize, _q30);
20465 : 0 : switch (TREE_CODE (_q30))
20466 : : {
20467 : 0 : case SSA_NAME:
20468 : 0 : if (gimple *_d2 = get_def (valueize, _q30))
20469 : : {
20470 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20471 : 0 : switch (gimple_assign_rhs_code (_a2))
20472 : : {
20473 : 0 : case ADDR_EXPR:
20474 : 0 : {
20475 : 0 : {
20476 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
20477 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20478 : 0 : return true;
20479 : : }
20480 : 0 : break;
20481 : : }
20482 : : default:;
20483 : : }
20484 : : }
20485 : : break;
20486 : 0 : case ADDR_EXPR:
20487 : 0 : {
20488 : 0 : {
20489 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q30 };
20490 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20491 : 0 : return true;
20492 : : }
20493 : 0 : break;
20494 : : }
20495 : : default:;
20496 : : }
20497 : : break;
20498 : : }
20499 : 0 : case ADDR_EXPR:
20500 : 0 : {
20501 : 0 : {
20502 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
20503 : 0 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20504 : 0 : return true;
20505 : : }
20506 : 0 : break;
20507 : : }
20508 : : default:;
20509 : : }
20510 : : }
20511 : : break;
20512 : 10073 : case ADDR_EXPR:
20513 : 10073 : {
20514 : 10073 : {
20515 : 10073 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
20516 : 10073 : if (gimple_simplify_310 (res_op, seq, valueize, type, captures, GE_EXPR))
20517 : 10011 : return true;
20518 : : }
20519 : 62 : break;
20520 : : }
20521 : : default:;
20522 : : }
20523 : : break;
20524 : : }
20525 : 8922338 : default:;
20526 : : }
20527 : 8922338 : if (uniform_integer_cst_p (_p1))
20528 : : {
20529 : 4849728 : {
20530 : 4849728 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _p1 };
20531 : 4849728 : if (gimple_simplify_473 (res_op, seq, valueize, type, captures, GE_EXPR))
20532 : 13519 : return true;
20533 : : }
20534 : : }
20535 : 8908819 : switch (TREE_CODE (_p0))
20536 : : {
20537 : 8677041 : case SSA_NAME:
20538 : 8677041 : if (gimple *_d1 = get_def (valueize, _p0))
20539 : : {
20540 : 2658090 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20541 : 2679540 : switch (gimple_assign_rhs_code (_a1))
20542 : : {
20543 : 122 : case COND_EXPR:
20544 : 122 : {
20545 : 122 : tree _q20 = gimple_assign_rhs1 (_a1);
20546 : 122 : _q20 = do_valueize (valueize, _q20);
20547 : 122 : tree _q21 = gimple_assign_rhs2 (_a1);
20548 : 122 : _q21 = do_valueize (valueize, _q21);
20549 : 122 : tree _q22 = gimple_assign_rhs3 (_a1);
20550 : 122 : _q22 = do_valueize (valueize, _q22);
20551 : 122 : {
20552 : 122 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1 };
20553 : 122 : if (gimple_simplify_314 (res_op, seq, valueize, type, captures, GE_EXPR))
20554 : 15 : return true;
20555 : : }
20556 : 107 : break;
20557 : : }
20558 : : default:;
20559 : : }
20560 : : }
20561 : : break;
20562 : 8908804 : default:;
20563 : : }
20564 : 8908804 : switch (TREE_CODE (_p1))
20565 : : {
20566 : 3671776 : case SSA_NAME:
20567 : 3671776 : if (gimple *_d1 = get_def (valueize, _p1))
20568 : : {
20569 : 1296571 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20570 : 1461768 : switch (gimple_assign_rhs_code (_a1))
20571 : : {
20572 : 165 : case COND_EXPR:
20573 : 165 : {
20574 : 165 : tree _q30 = gimple_assign_rhs1 (_a1);
20575 : 165 : _q30 = do_valueize (valueize, _q30);
20576 : 165 : tree _q31 = gimple_assign_rhs2 (_a1);
20577 : 165 : _q31 = do_valueize (valueize, _q31);
20578 : 165 : tree _q32 = gimple_assign_rhs3 (_a1);
20579 : 165 : _q32 = do_valueize (valueize, _q32);
20580 : 165 : {
20581 : 165 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q32, _p0 };
20582 : 165 : if (gimple_simplify_314 (res_op, seq, valueize, type, captures, LE_EXPR))
20583 : 0 : return true;
20584 : : }
20585 : 165 : break;
20586 : : }
20587 : : default:;
20588 : : }
20589 : : }
20590 : : break;
20591 : 8908804 : default:;
20592 : : }
20593 : 8908804 : switch (TREE_CODE (_p0))
20594 : : {
20595 : 8677026 : case SSA_NAME:
20596 : 8677026 : if (gimple *_d1 = get_def (valueize, _p0))
20597 : : {
20598 : 2658075 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20599 : 2679525 : switch (gimple_assign_rhs_code (_a1))
20600 : : {
20601 : 250593 : CASE_CONVERT:
20602 : 250593 : {
20603 : 250593 : tree _q20 = gimple_assign_rhs1 (_a1);
20604 : 250593 : _q20 = do_valueize (valueize, _q20);
20605 : 250593 : switch (TREE_CODE (_q20))
20606 : : {
20607 : 249663 : case SSA_NAME:
20608 : 249663 : if (gimple *_d2 = get_def (valueize, _q20))
20609 : : {
20610 : 240757 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20611 : 246159 : switch (gimple_assign_rhs_code (_a2))
20612 : : {
20613 : 28359 : case PLUS_EXPR:
20614 : 28359 : {
20615 : 28359 : tree _q30 = gimple_assign_rhs1 (_a2);
20616 : 28359 : _q30 = do_valueize (valueize, _q30);
20617 : 28359 : tree _q31 = gimple_assign_rhs2 (_a2);
20618 : 28359 : _q31 = do_valueize (valueize, _q31);
20619 : 28359 : if (tree_swap_operands_p (_q30, _q31))
20620 : 738 : std::swap (_q30, _q31);
20621 : 28359 : switch (TREE_CODE (_q30))
20622 : : {
20623 : 28359 : case SSA_NAME:
20624 : 28359 : if (gimple *_d3 = get_def (valueize, _q30))
20625 : : {
20626 : 27736 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
20627 : 28008 : switch (gimple_assign_rhs_code (_a3))
20628 : : {
20629 : 11378 : CASE_CONVERT:
20630 : 11378 : {
20631 : 11378 : tree _q40 = gimple_assign_rhs1 (_a3);
20632 : 11378 : _q40 = do_valueize (valueize, _q40);
20633 : 11378 : switch (TREE_CODE (_q31))
20634 : : {
20635 : 10265 : case INTEGER_CST:
20636 : 10265 : {
20637 : 10265 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
20638 : : {
20639 : 78 : {
20640 : 78 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q40, _q31 };
20641 : 78 : if (gimple_simplify_474 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
20642 : 78 : return true;
20643 : : }
20644 : : }
20645 : : break;
20646 : : }
20647 : : default:;
20648 : : }
20649 : : break;
20650 : : }
20651 : : default:;
20652 : : }
20653 : : }
20654 : : break;
20655 : : default:;
20656 : : }
20657 : 8908726 : break;
20658 : : }
20659 : : default:;
20660 : : }
20661 : : }
20662 : : break;
20663 : : default:;
20664 : : }
20665 : : break;
20666 : : }
20667 : : default:;
20668 : : }
20669 : : }
20670 : : break;
20671 : 8908726 : default:;
20672 : : }
20673 : 8908726 : switch (TREE_CODE (_p1))
20674 : : {
20675 : 3671698 : case SSA_NAME:
20676 : 3671698 : if (gimple *_d1 = get_def (valueize, _p1))
20677 : : {
20678 : 1296493 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20679 : 1461768 : switch (gimple_assign_rhs_code (_a1))
20680 : : {
20681 : 116587 : CASE_CONVERT:
20682 : 116587 : {
20683 : 116587 : tree _q30 = gimple_assign_rhs1 (_a1);
20684 : 116587 : _q30 = do_valueize (valueize, _q30);
20685 : 116587 : switch (TREE_CODE (_q30))
20686 : : {
20687 : 116392 : case SSA_NAME:
20688 : 116392 : if (gimple *_d2 = get_def (valueize, _q30))
20689 : : {
20690 : 107229 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20691 : 115208 : switch (gimple_assign_rhs_code (_a2))
20692 : : {
20693 : 12157 : case PLUS_EXPR:
20694 : 12157 : {
20695 : 12157 : tree _q40 = gimple_assign_rhs1 (_a2);
20696 : 12157 : _q40 = do_valueize (valueize, _q40);
20697 : 12157 : tree _q41 = gimple_assign_rhs2 (_a2);
20698 : 12157 : _q41 = do_valueize (valueize, _q41);
20699 : 12157 : if (tree_swap_operands_p (_q40, _q41))
20700 : 362 : std::swap (_q40, _q41);
20701 : 12157 : switch (TREE_CODE (_q40))
20702 : : {
20703 : 12157 : case SSA_NAME:
20704 : 12157 : if (gimple *_d3 = get_def (valueize, _q40))
20705 : : {
20706 : 11545 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
20707 : 12336 : switch (gimple_assign_rhs_code (_a3))
20708 : : {
20709 : 1366 : CASE_CONVERT:
20710 : 1366 : {
20711 : 1366 : tree _q50 = gimple_assign_rhs1 (_a3);
20712 : 1366 : _q50 = do_valueize (valueize, _q50);
20713 : 1366 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
20714 : : {
20715 : 58 : switch (TREE_CODE (_q41))
20716 : : {
20717 : 52 : case INTEGER_CST:
20718 : 52 : {
20719 : 52 : {
20720 : 52 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0, _q41 };
20721 : 52 : if (gimple_simplify_474 (res_op, seq, valueize, type, captures, LE_EXPR, GT_EXPR))
20722 : 52 : return true;
20723 : : }
20724 : 0 : break;
20725 : : }
20726 : : default:;
20727 : : }
20728 : : }
20729 : : break;
20730 : : }
20731 : : default:;
20732 : : }
20733 : : }
20734 : : break;
20735 : : default:;
20736 : : }
20737 : 8908583 : break;
20738 : : }
20739 : : default:;
20740 : : }
20741 : : }
20742 : : break;
20743 : : default:;
20744 : : }
20745 : : break;
20746 : : }
20747 : 326225 : case PLUS_EXPR:
20748 : 326225 : {
20749 : 326225 : tree _q30 = gimple_assign_rhs1 (_a1);
20750 : 326225 : _q30 = do_valueize (valueize, _q30);
20751 : 326225 : tree _q31 = gimple_assign_rhs2 (_a1);
20752 : 326225 : _q31 = do_valueize (valueize, _q31);
20753 : 326225 : if (tree_swap_operands_p (_q30, _q31))
20754 : 26603 : std::swap (_q30, _q31);
20755 : 326225 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
20756 : : {
20757 : 6395 : switch (TREE_CODE (_q31))
20758 : : {
20759 : 2914 : case INTEGER_CST:
20760 : 2914 : {
20761 : 2914 : {
20762 : 2914 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0, _q31 };
20763 : 2914 : if (gimple_simplify_469 (res_op, seq, valueize, type, captures, LE_EXPR, GT_EXPR))
20764 : 86 : return true;
20765 : : }
20766 : 2828 : break;
20767 : : }
20768 : : default:;
20769 : : }
20770 : : }
20771 : 8908583 : break;
20772 : : }
20773 : 56622 : case MINUS_EXPR:
20774 : 56622 : {
20775 : 56622 : tree _q30 = gimple_assign_rhs1 (_a1);
20776 : 56622 : _q30 = do_valueize (valueize, _q30);
20777 : 56622 : tree _q31 = gimple_assign_rhs2 (_a1);
20778 : 56622 : _q31 = do_valueize (valueize, _q31);
20779 : 56622 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
20780 : : {
20781 : 7431 : {
20782 : 7431 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
20783 : 7431 : if (gimple_simplify_475 (res_op, seq, valueize, type, captures, LE_EXPR))
20784 : 5 : return true;
20785 : : }
20786 : : }
20787 : : break;
20788 : : }
20789 : : default:;
20790 : : }
20791 : : }
20792 : : break;
20793 : 8908583 : default:;
20794 : : }
20795 : 8908583 : switch (TREE_CODE (_p0))
20796 : : {
20797 : 8676805 : case SSA_NAME:
20798 : 8676805 : if (gimple *_d1 = get_def (valueize, _p0))
20799 : : {
20800 : 2657854 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20801 : 2679377 : switch (gimple_assign_rhs_code (_a1))
20802 : : {
20803 : 494590 : case PLUS_EXPR:
20804 : 494590 : {
20805 : 494590 : tree _q20 = gimple_assign_rhs1 (_a1);
20806 : 494590 : _q20 = do_valueize (valueize, _q20);
20807 : 494590 : tree _q21 = gimple_assign_rhs2 (_a1);
20808 : 494590 : _q21 = do_valueize (valueize, _q21);
20809 : 494590 : if (tree_swap_operands_p (_q20, _q21))
20810 : 27814 : std::swap (_q20, _q21);
20811 : 494590 : switch (TREE_CODE (_q20))
20812 : : {
20813 : 494590 : case SSA_NAME:
20814 : 494590 : if (gimple *_d2 = get_def (valueize, _q20))
20815 : : {
20816 : 480755 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
20817 : 318511 : switch (gimple_assign_rhs_code (_a2))
20818 : : {
20819 : 7074 : case MINUS_EXPR:
20820 : 7074 : {
20821 : 7074 : tree _q30 = gimple_assign_rhs1 (_a2);
20822 : 7074 : _q30 = do_valueize (valueize, _q30);
20823 : 7074 : tree _q31 = gimple_assign_rhs2 (_a2);
20824 : 7074 : _q31 = do_valueize (valueize, _q31);
20825 : 7074 : if (integer_minus_onep (_q21))
20826 : : {
20827 : 2517 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
20828 : : {
20829 : 2 : {
20830 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
20831 : 2 : if (gimple_simplify_476 (res_op, seq, valueize, type, captures, GE_EXPR))
20832 : 2 : return true;
20833 : : }
20834 : : }
20835 : : }
20836 : : break;
20837 : : }
20838 : : default:;
20839 : : }
20840 : : }
20841 : : break;
20842 : : default:;
20843 : : }
20844 : 8908581 : break;
20845 : : }
20846 : : default:;
20847 : : }
20848 : : }
20849 : : break;
20850 : 8908581 : default:;
20851 : : }
20852 : 8908581 : switch (TREE_CODE (_p1))
20853 : : {
20854 : 3671553 : case SSA_NAME:
20855 : 3671553 : if (gimple *_d1 = get_def (valueize, _p1))
20856 : : {
20857 : 1296348 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20858 : 1461625 : switch (gimple_assign_rhs_code (_a1))
20859 : : {
20860 : 6 : case REALPART_EXPR:
20861 : 6 : {
20862 : 6 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
20863 : 6 : if ((TREE_CODE (_q30) == SSA_NAME
20864 : 6 : || is_gimple_min_invariant (_q30)))
20865 : : {
20866 : 6 : _q30 = do_valueize (valueize, _q30);
20867 : 6 : switch (TREE_CODE (_q30))
20868 : : {
20869 : 6 : case SSA_NAME:
20870 : 6 : if (gimple *_d2 = get_def (valueize, _q30))
20871 : : {
20872 : 6 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
20873 : 6 : switch (gimple_call_combined_fn (_c2))
20874 : : {
20875 : 2 : case CFN_SUB_OVERFLOW:
20876 : 2 : if (gimple_call_num_args (_c2) == 2)
20877 : : {
20878 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
20879 : 2 : _q40 = do_valueize (valueize, _q40);
20880 : 2 : tree _q41 = gimple_call_arg (_c2, 1);
20881 : 2 : _q41 = do_valueize (valueize, _q41);
20882 : 2 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
20883 : : {
20884 : 0 : {
20885 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q41 };
20886 : 0 : if (gimple_simplify_477 (res_op, seq, valueize, type, captures, LE_EXPR, EQ_EXPR))
20887 : 0 : return true;
20888 : : }
20889 : : }
20890 : : }
20891 : : break;
20892 : : default:;
20893 : : }
20894 : : }
20895 : : break;
20896 : : default:;
20897 : : }
20898 : : }
20899 : : break;
20900 : : }
20901 : : default:;
20902 : : }
20903 : : }
20904 : : break;
20905 : 8908581 : default:;
20906 : : }
20907 : 8908581 : switch (TREE_CODE (_p0))
20908 : : {
20909 : 8676803 : case SSA_NAME:
20910 : 8676803 : if (gimple *_d1 = get_def (valueize, _p0))
20911 : : {
20912 : 2657852 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20913 : 2679375 : switch (gimple_assign_rhs_code (_a1))
20914 : : {
20915 : 45 : case REALPART_EXPR:
20916 : 45 : {
20917 : 45 : tree _q20 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
20918 : 45 : if ((TREE_CODE (_q20) == SSA_NAME
20919 : 45 : || is_gimple_min_invariant (_q20)))
20920 : : {
20921 : 45 : _q20 = do_valueize (valueize, _q20);
20922 : 45 : switch (TREE_CODE (_q20))
20923 : : {
20924 : 45 : case SSA_NAME:
20925 : 45 : if (gimple *_d2 = get_def (valueize, _q20))
20926 : : {
20927 : 45 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
20928 : 12 : switch (gimple_call_combined_fn (_c2))
20929 : : {
20930 : 12 : case CFN_ADD_OVERFLOW:
20931 : 12 : if (gimple_call_num_args (_c2) == 2)
20932 : : {
20933 : 12 : tree _q30 = gimple_call_arg (_c2, 0);
20934 : 12 : _q30 = do_valueize (valueize, _q30);
20935 : 12 : tree _q31 = gimple_call_arg (_c2, 1);
20936 : 12 : _q31 = do_valueize (valueize, _q31);
20937 : 12 : if (tree_swap_operands_p (_q30, _q31))
20938 : 0 : std::swap (_q30, _q31);
20939 : 12 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
20940 : : {
20941 : 4 : {
20942 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
20943 : 4 : if (gimple_simplify_478 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR))
20944 : 2 : return true;
20945 : : }
20946 : : }
20947 : 10 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
20948 : : {
20949 : 6 : {
20950 : 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q31, _q30 };
20951 : 6 : if (gimple_simplify_478 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR))
20952 : 3 : return true;
20953 : : }
20954 : : }
20955 : : }
20956 : : break;
20957 : : default:;
20958 : : }
20959 : : }
20960 : : break;
20961 : : default:;
20962 : : }
20963 : : }
20964 : : break;
20965 : : }
20966 : 2094 : case TRUNC_DIV_EXPR:
20967 : 2094 : {
20968 : 2094 : tree _q20 = gimple_assign_rhs1 (_a1);
20969 : 2094 : _q20 = do_valueize (valueize, _q20);
20970 : 2094 : tree _q21 = gimple_assign_rhs2 (_a1);
20971 : 2094 : _q21 = do_valueize (valueize, _q21);
20972 : 2094 : if (integer_all_onesp (_q20))
20973 : : {
20974 : 48 : {
20975 : 48 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _p1 };
20976 : 48 : if (gimple_simplify_479 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR))
20977 : 6 : return true;
20978 : : }
20979 : : }
20980 : : break;
20981 : : }
20982 : 23690 : case MULT_EXPR:
20983 : 23690 : {
20984 : 23690 : tree _q20 = gimple_assign_rhs1 (_a1);
20985 : 23690 : _q20 = do_valueize (valueize, _q20);
20986 : 23690 : tree _q21 = gimple_assign_rhs2 (_a1);
20987 : 23690 : _q21 = do_valueize (valueize, _q21);
20988 : 23690 : if (tree_swap_operands_p (_q20, _q21))
20989 : 687 : std::swap (_q20, _q21);
20990 : 23690 : switch (TREE_CODE (_q21))
20991 : : {
20992 : 738 : case REAL_CST:
20993 : 738 : {
20994 : 738 : switch (TREE_CODE (_p1))
20995 : : {
20996 : 148 : case REAL_CST:
20997 : 148 : {
20998 : 148 : {
20999 : 148 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
21000 : 148 : if (gimple_simplify_480 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
21001 : 0 : return true;
21002 : : }
21003 : 148 : break;
21004 : : }
21005 : : default:;
21006 : : }
21007 : : break;
21008 : : }
21009 : : default:;
21010 : : }
21011 : 9194096 : break;
21012 : : }
21013 : 494588 : case PLUS_EXPR:
21014 : 494588 : {
21015 : 494588 : tree _q20 = gimple_assign_rhs1 (_a1);
21016 : 494588 : _q20 = do_valueize (valueize, _q20);
21017 : 494588 : tree _q21 = gimple_assign_rhs2 (_a1);
21018 : 494588 : _q21 = do_valueize (valueize, _q21);
21019 : 494588 : if (tree_swap_operands_p (_q20, _q21))
21020 : 27814 : std::swap (_q20, _q21);
21021 : 494588 : switch (TREE_CODE (_q21))
21022 : : {
21023 : 250915 : case INTEGER_CST:
21024 : 250915 : {
21025 : 250915 : switch (TREE_CODE (_p1))
21026 : : {
21027 : 150084 : case INTEGER_CST:
21028 : 150084 : {
21029 : 150084 : {
21030 : 150084 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
21031 : 150084 : if (gimple_simplify_481 (res_op, seq, valueize, type, captures, PLUS_EXPR, MINUS_EXPR, GE_EXPR, LE_EXPR))
21032 : 3240 : return true;
21033 : : }
21034 : 146844 : break;
21035 : : }
21036 : : default:;
21037 : : }
21038 : : break;
21039 : : }
21040 : : default:;
21041 : : }
21042 : 9194096 : break;
21043 : : }
21044 : 147748 : case MINUS_EXPR:
21045 : 147748 : {
21046 : 147748 : tree _q20 = gimple_assign_rhs1 (_a1);
21047 : 147748 : _q20 = do_valueize (valueize, _q20);
21048 : 147748 : tree _q21 = gimple_assign_rhs2 (_a1);
21049 : 147748 : _q21 = do_valueize (valueize, _q21);
21050 : 147748 : switch (TREE_CODE (_q21))
21051 : : {
21052 : 3560 : case INTEGER_CST:
21053 : 3560 : {
21054 : 3560 : switch (TREE_CODE (_p1))
21055 : : {
21056 : 3480 : case INTEGER_CST:
21057 : 3480 : {
21058 : 3480 : {
21059 : 3480 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
21060 : 3480 : if (gimple_simplify_481 (res_op, seq, valueize, type, captures, MINUS_EXPR, PLUS_EXPR, GE_EXPR, LE_EXPR))
21061 : 1294 : return true;
21062 : : }
21063 : 2186 : break;
21064 : : }
21065 : : default:;
21066 : : }
21067 : : break;
21068 : : }
21069 : 146454 : default:;
21070 : : }
21071 : 146454 : switch (TREE_CODE (_q20))
21072 : : {
21073 : 3585 : case INTEGER_CST:
21074 : 3585 : {
21075 : 3585 : switch (TREE_CODE (_p1))
21076 : : {
21077 : 948 : case INTEGER_CST:
21078 : 948 : {
21079 : 948 : {
21080 : 948 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
21081 : 948 : if (gimple_simplify_317 (res_op, seq, valueize, type, captures, GE_EXPR, LE_EXPR))
21082 : 795 : return true;
21083 : : }
21084 : 153 : break;
21085 : : }
21086 : : default:;
21087 : : }
21088 : : break;
21089 : : }
21090 : : default:;
21091 : : }
21092 : : break;
21093 : : }
21094 : : default:;
21095 : : }
21096 : 798625 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
21097 : 155097 : switch (gimple_call_combined_fn (_c1))
21098 : : {
21099 : 0 : case CFN_BUILT_IN_CTZ:
21100 : 0 : if (gimple_call_num_args (_c1) == 1)
21101 : : {
21102 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21103 : 0 : _q20 = do_valueize (valueize, _q20);
21104 : 0 : switch (TREE_CODE (_p1))
21105 : : {
21106 : 0 : case INTEGER_CST:
21107 : 0 : {
21108 : 0 : {
21109 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21110 : 0 : if (gimple_simplify_482 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZ))
21111 : 0 : return true;
21112 : : }
21113 : 0 : break;
21114 : : }
21115 : : default:;
21116 : : }
21117 : : }
21118 : : break;
21119 : 2 : case CFN_BUILT_IN_EXP:
21120 : 2 : if (gimple_call_num_args (_c1) == 1)
21121 : : {
21122 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21123 : 2 : _q20 = do_valueize (valueize, _q20);
21124 : 2 : switch (TREE_CODE (_p1))
21125 : : {
21126 : 2 : case REAL_CST:
21127 : 2 : {
21128 : 2 : {
21129 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21130 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, GE_EXPR))
21131 : 2 : return true;
21132 : : }
21133 : 0 : break;
21134 : : }
21135 : : default:;
21136 : : }
21137 : : }
21138 : : break;
21139 : 15 : case CFN_BUILT_IN_LOG:
21140 : 15 : if (gimple_call_num_args (_c1) == 1)
21141 : : {
21142 : 15 : tree _q20 = gimple_call_arg (_c1, 0);
21143 : 15 : _q20 = do_valueize (valueize, _q20);
21144 : 15 : switch (TREE_CODE (_p1))
21145 : : {
21146 : 2 : case REAL_CST:
21147 : 2 : {
21148 : 2 : {
21149 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21150 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, GE_EXPR))
21151 : 2 : return true;
21152 : : }
21153 : 0 : break;
21154 : : }
21155 : : default:;
21156 : : }
21157 : : }
21158 : : break;
21159 : 2 : case CFN_BUILT_IN_EXP10F:
21160 : 2 : if (gimple_call_num_args (_c1) == 1)
21161 : : {
21162 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21163 : 2 : _q20 = do_valueize (valueize, _q20);
21164 : 2 : switch (TREE_CODE (_p1))
21165 : : {
21166 : 2 : case REAL_CST:
21167 : 2 : {
21168 : 2 : {
21169 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21170 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, GE_EXPR))
21171 : 2 : return true;
21172 : : }
21173 : 0 : break;
21174 : : }
21175 : : default:;
21176 : : }
21177 : : }
21178 : : break;
21179 : 2 : case CFN_BUILT_IN_EXP10L:
21180 : 2 : if (gimple_call_num_args (_c1) == 1)
21181 : : {
21182 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21183 : 2 : _q20 = do_valueize (valueize, _q20);
21184 : 2 : switch (TREE_CODE (_p1))
21185 : : {
21186 : 2 : case REAL_CST:
21187 : 2 : {
21188 : 2 : {
21189 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21190 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, GE_EXPR))
21191 : 2 : return true;
21192 : : }
21193 : 0 : break;
21194 : : }
21195 : : default:;
21196 : : }
21197 : : }
21198 : : break;
21199 : 0 : case CFN_BUILT_IN_CTZL:
21200 : 0 : if (gimple_call_num_args (_c1) == 1)
21201 : : {
21202 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21203 : 0 : _q20 = do_valueize (valueize, _q20);
21204 : 0 : switch (TREE_CODE (_p1))
21205 : : {
21206 : 0 : case INTEGER_CST:
21207 : 0 : {
21208 : 0 : {
21209 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21210 : 0 : if (gimple_simplify_482 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZL))
21211 : 0 : return true;
21212 : : }
21213 : 0 : break;
21214 : : }
21215 : : default:;
21216 : : }
21217 : : }
21218 : : break;
21219 : 2 : case CFN_BUILT_IN_EXP2:
21220 : 2 : if (gimple_call_num_args (_c1) == 1)
21221 : : {
21222 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21223 : 2 : _q20 = do_valueize (valueize, _q20);
21224 : 2 : switch (TREE_CODE (_p1))
21225 : : {
21226 : 2 : case REAL_CST:
21227 : 2 : {
21228 : 2 : {
21229 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21230 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, GE_EXPR))
21231 : 2 : return true;
21232 : : }
21233 : 0 : break;
21234 : : }
21235 : : default:;
21236 : : }
21237 : : }
21238 : : break;
21239 : 2 : case CFN_BUILT_IN_EXPF:
21240 : 2 : if (gimple_call_num_args (_c1) == 1)
21241 : : {
21242 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21243 : 2 : _q20 = do_valueize (valueize, _q20);
21244 : 2 : switch (TREE_CODE (_p1))
21245 : : {
21246 : 2 : case REAL_CST:
21247 : 2 : {
21248 : 2 : {
21249 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21250 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, GE_EXPR))
21251 : 2 : return true;
21252 : : }
21253 : 0 : break;
21254 : : }
21255 : : default:;
21256 : : }
21257 : : }
21258 : : break;
21259 : 2 : case CFN_BUILT_IN_EXPL:
21260 : 2 : if (gimple_call_num_args (_c1) == 1)
21261 : : {
21262 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21263 : 2 : _q20 = do_valueize (valueize, _q20);
21264 : 2 : switch (TREE_CODE (_p1))
21265 : : {
21266 : 2 : case REAL_CST:
21267 : 2 : {
21268 : 2 : {
21269 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21270 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, GE_EXPR))
21271 : 2 : return true;
21272 : : }
21273 : 0 : break;
21274 : : }
21275 : : default:;
21276 : : }
21277 : : }
21278 : : break;
21279 : 2 : case CFN_BUILT_IN_LOG2:
21280 : 2 : if (gimple_call_num_args (_c1) == 1)
21281 : : {
21282 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21283 : 2 : _q20 = do_valueize (valueize, _q20);
21284 : 2 : switch (TREE_CODE (_p1))
21285 : : {
21286 : 2 : case REAL_CST:
21287 : 2 : {
21288 : 2 : {
21289 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21290 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, GE_EXPR))
21291 : 2 : return true;
21292 : : }
21293 : 0 : break;
21294 : : }
21295 : : default:;
21296 : : }
21297 : : }
21298 : : break;
21299 : 2 : case CFN_BUILT_IN_LOGF:
21300 : 2 : if (gimple_call_num_args (_c1) == 1)
21301 : : {
21302 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21303 : 2 : _q20 = do_valueize (valueize, _q20);
21304 : 2 : switch (TREE_CODE (_p1))
21305 : : {
21306 : 2 : case REAL_CST:
21307 : 2 : {
21308 : 2 : {
21309 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21310 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, GE_EXPR))
21311 : 2 : return true;
21312 : : }
21313 : 0 : break;
21314 : : }
21315 : : default:;
21316 : : }
21317 : : }
21318 : : break;
21319 : 2 : case CFN_BUILT_IN_LOGL:
21320 : 2 : if (gimple_call_num_args (_c1) == 1)
21321 : : {
21322 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21323 : 2 : _q20 = do_valueize (valueize, _q20);
21324 : 2 : switch (TREE_CODE (_p1))
21325 : : {
21326 : 2 : case REAL_CST:
21327 : 2 : {
21328 : 2 : {
21329 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21330 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, GE_EXPR))
21331 : 2 : return true;
21332 : : }
21333 : 0 : break;
21334 : : }
21335 : : default:;
21336 : : }
21337 : : }
21338 : : break;
21339 : 2 : case CFN_BUILT_IN_LOG10F:
21340 : 2 : if (gimple_call_num_args (_c1) == 1)
21341 : : {
21342 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21343 : 2 : _q20 = do_valueize (valueize, _q20);
21344 : 2 : switch (TREE_CODE (_p1))
21345 : : {
21346 : 2 : case REAL_CST:
21347 : 2 : {
21348 : 2 : {
21349 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21350 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, GE_EXPR))
21351 : 2 : return true;
21352 : : }
21353 : 0 : break;
21354 : : }
21355 : : default:;
21356 : : }
21357 : : }
21358 : : break;
21359 : 2 : case CFN_BUILT_IN_LOG10L:
21360 : 2 : if (gimple_call_num_args (_c1) == 1)
21361 : : {
21362 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21363 : 2 : _q20 = do_valueize (valueize, _q20);
21364 : 2 : switch (TREE_CODE (_p1))
21365 : : {
21366 : 2 : case REAL_CST:
21367 : 2 : {
21368 : 2 : {
21369 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21370 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, GE_EXPR))
21371 : 2 : return true;
21372 : : }
21373 : 0 : break;
21374 : : }
21375 : : default:;
21376 : : }
21377 : : }
21378 : : break;
21379 : 0 : case CFN_BUILT_IN_CTZIMAX:
21380 : 0 : if (gimple_call_num_args (_c1) == 1)
21381 : : {
21382 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21383 : 0 : _q20 = do_valueize (valueize, _q20);
21384 : 0 : switch (TREE_CODE (_p1))
21385 : : {
21386 : 0 : case INTEGER_CST:
21387 : 0 : {
21388 : 0 : {
21389 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21390 : 0 : if (gimple_simplify_482 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZIMAX))
21391 : 0 : return true;
21392 : : }
21393 : 0 : break;
21394 : : }
21395 : : default:;
21396 : : }
21397 : : }
21398 : : break;
21399 : 0 : case CFN_CTZ:
21400 : 0 : if (gimple_call_num_args (_c1) == 2)
21401 : : {
21402 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21403 : 0 : _q20 = do_valueize (valueize, _q20);
21404 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
21405 : 0 : _q21 = do_valueize (valueize, _q21);
21406 : 0 : switch (TREE_CODE (_p1))
21407 : : {
21408 : 0 : case INTEGER_CST:
21409 : 0 : {
21410 : 0 : {
21411 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
21412 : 0 : if (gimple_simplify_483 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR))
21413 : 0 : return true;
21414 : : }
21415 : 0 : break;
21416 : : }
21417 : : default:;
21418 : : }
21419 : : }
21420 : 0 : if (gimple_call_num_args (_c1) == 1)
21421 : : {
21422 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21423 : 0 : _q20 = do_valueize (valueize, _q20);
21424 : 0 : switch (TREE_CODE (_p1))
21425 : : {
21426 : 0 : case INTEGER_CST:
21427 : 0 : {
21428 : 0 : {
21429 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21430 : 0 : if (gimple_simplify_482 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR, CFN_CTZ))
21431 : 0 : return true;
21432 : : }
21433 : 0 : break;
21434 : : }
21435 : : default:;
21436 : : }
21437 : : }
21438 : : break;
21439 : 0 : case CFN_EXP:
21440 : 0 : if (gimple_call_num_args (_c1) == 1)
21441 : : {
21442 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21443 : 0 : _q20 = do_valueize (valueize, _q20);
21444 : 0 : switch (TREE_CODE (_p1))
21445 : : {
21446 : 0 : case REAL_CST:
21447 : 0 : {
21448 : 0 : {
21449 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21450 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_LOG, CFN_EXP, GE_EXPR))
21451 : 0 : return true;
21452 : : }
21453 : 0 : break;
21454 : : }
21455 : : default:;
21456 : : }
21457 : : }
21458 : : break;
21459 : 0 : case CFN_LOG:
21460 : 0 : if (gimple_call_num_args (_c1) == 1)
21461 : : {
21462 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21463 : 0 : _q20 = do_valueize (valueize, _q20);
21464 : 0 : switch (TREE_CODE (_p1))
21465 : : {
21466 : 0 : case REAL_CST:
21467 : 0 : {
21468 : 0 : {
21469 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21470 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_LOG, CFN_EXP, GE_EXPR))
21471 : 0 : return true;
21472 : : }
21473 : 0 : break;
21474 : : }
21475 : : default:;
21476 : : }
21477 : : }
21478 : : break;
21479 : 0 : case CFN_EXP2:
21480 : 0 : if (gimple_call_num_args (_c1) == 1)
21481 : : {
21482 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21483 : 0 : _q20 = do_valueize (valueize, _q20);
21484 : 0 : switch (TREE_CODE (_p1))
21485 : : {
21486 : 0 : case REAL_CST:
21487 : 0 : {
21488 : 0 : {
21489 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21490 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_LOG2, CFN_EXP2, GE_EXPR))
21491 : 0 : return true;
21492 : : }
21493 : 0 : break;
21494 : : }
21495 : : default:;
21496 : : }
21497 : : }
21498 : : break;
21499 : 0 : case CFN_LOG2:
21500 : 0 : if (gimple_call_num_args (_c1) == 1)
21501 : : {
21502 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21503 : 0 : _q20 = do_valueize (valueize, _q20);
21504 : 0 : switch (TREE_CODE (_p1))
21505 : : {
21506 : 0 : case REAL_CST:
21507 : 0 : {
21508 : 0 : {
21509 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21510 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_LOG2, CFN_EXP2, GE_EXPR))
21511 : 0 : return true;
21512 : : }
21513 : 0 : break;
21514 : : }
21515 : : default:;
21516 : : }
21517 : : }
21518 : : break;
21519 : 0 : case CFN_EXP10:
21520 : 0 : if (gimple_call_num_args (_c1) == 1)
21521 : : {
21522 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21523 : 0 : _q20 = do_valueize (valueize, _q20);
21524 : 0 : switch (TREE_CODE (_p1))
21525 : : {
21526 : 0 : case REAL_CST:
21527 : 0 : {
21528 : 0 : {
21529 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21530 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_LOG10, CFN_EXP10, GE_EXPR))
21531 : 0 : return true;
21532 : : }
21533 : 0 : break;
21534 : : }
21535 : : default:;
21536 : : }
21537 : : }
21538 : : break;
21539 : 36 : case CFN_BUILT_IN_CTZLL:
21540 : 36 : if (gimple_call_num_args (_c1) == 1)
21541 : : {
21542 : 36 : tree _q20 = gimple_call_arg (_c1, 0);
21543 : 36 : _q20 = do_valueize (valueize, _q20);
21544 : 36 : switch (TREE_CODE (_p1))
21545 : : {
21546 : 0 : case INTEGER_CST:
21547 : 0 : {
21548 : 0 : {
21549 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21550 : 0 : if (gimple_simplify_482 (res_op, seq, valueize, type, captures, GE_EXPR, EQ_EXPR, CFN_BUILT_IN_CTZLL))
21551 : 0 : return true;
21552 : : }
21553 : 0 : break;
21554 : : }
21555 : : default:;
21556 : : }
21557 : : }
21558 : : break;
21559 : 0 : case CFN_LOG10:
21560 : 0 : if (gimple_call_num_args (_c1) == 1)
21561 : : {
21562 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
21563 : 0 : _q20 = do_valueize (valueize, _q20);
21564 : 0 : switch (TREE_CODE (_p1))
21565 : : {
21566 : 0 : case REAL_CST:
21567 : 0 : {
21568 : 0 : {
21569 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21570 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_LOG10, CFN_EXP10, GE_EXPR))
21571 : 0 : return true;
21572 : : }
21573 : 0 : break;
21574 : : }
21575 : : default:;
21576 : : }
21577 : : }
21578 : : break;
21579 : 2 : case CFN_BUILT_IN_EXP10:
21580 : 2 : if (gimple_call_num_args (_c1) == 1)
21581 : : {
21582 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21583 : 2 : _q20 = do_valueize (valueize, _q20);
21584 : 2 : switch (TREE_CODE (_p1))
21585 : : {
21586 : 2 : case REAL_CST:
21587 : 2 : {
21588 : 2 : {
21589 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21590 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, GE_EXPR))
21591 : 2 : return true;
21592 : : }
21593 : 0 : break;
21594 : : }
21595 : : default:;
21596 : : }
21597 : : }
21598 : : break;
21599 : 2 : case CFN_BUILT_IN_EXP2F:
21600 : 2 : if (gimple_call_num_args (_c1) == 1)
21601 : : {
21602 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21603 : 2 : _q20 = do_valueize (valueize, _q20);
21604 : 2 : switch (TREE_CODE (_p1))
21605 : : {
21606 : 2 : case REAL_CST:
21607 : 2 : {
21608 : 2 : {
21609 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21610 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, GE_EXPR))
21611 : 2 : return true;
21612 : : }
21613 : 0 : break;
21614 : : }
21615 : : default:;
21616 : : }
21617 : : }
21618 : : break;
21619 : 2 : case CFN_BUILT_IN_EXP2L:
21620 : 2 : if (gimple_call_num_args (_c1) == 1)
21621 : : {
21622 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21623 : 2 : _q20 = do_valueize (valueize, _q20);
21624 : 2 : switch (TREE_CODE (_p1))
21625 : : {
21626 : 2 : case REAL_CST:
21627 : 2 : {
21628 : 2 : {
21629 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21630 : 2 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, GE_EXPR))
21631 : 2 : return true;
21632 : : }
21633 : 0 : break;
21634 : : }
21635 : : default:;
21636 : : }
21637 : : }
21638 : : break;
21639 : 2 : case CFN_BUILT_IN_LOG10:
21640 : 2 : if (gimple_call_num_args (_c1) == 1)
21641 : : {
21642 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21643 : 2 : _q20 = do_valueize (valueize, _q20);
21644 : 2 : switch (TREE_CODE (_p1))
21645 : : {
21646 : 2 : case REAL_CST:
21647 : 2 : {
21648 : 2 : {
21649 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21650 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, GE_EXPR))
21651 : 2 : return true;
21652 : : }
21653 : 0 : break;
21654 : : }
21655 : : default:;
21656 : : }
21657 : : }
21658 : : break;
21659 : 2 : case CFN_BUILT_IN_LOG2F:
21660 : 2 : if (gimple_call_num_args (_c1) == 1)
21661 : : {
21662 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21663 : 2 : _q20 = do_valueize (valueize, _q20);
21664 : 2 : switch (TREE_CODE (_p1))
21665 : : {
21666 : 2 : case REAL_CST:
21667 : 2 : {
21668 : 2 : {
21669 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21670 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, GE_EXPR))
21671 : 2 : return true;
21672 : : }
21673 : 0 : break;
21674 : : }
21675 : : default:;
21676 : : }
21677 : : }
21678 : : break;
21679 : 2 : case CFN_BUILT_IN_LOG2L:
21680 : 2 : if (gimple_call_num_args (_c1) == 1)
21681 : : {
21682 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
21683 : 2 : _q20 = do_valueize (valueize, _q20);
21684 : 2 : switch (TREE_CODE (_p1))
21685 : : {
21686 : 2 : case REAL_CST:
21687 : 2 : {
21688 : 2 : {
21689 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
21690 : 2 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, GE_EXPR))
21691 : 2 : return true;
21692 : : }
21693 : 0 : break;
21694 : : }
21695 : : default:;
21696 : : }
21697 : : }
21698 : : break;
21699 : : default:;
21700 : : }
21701 : : }
21702 : : break;
21703 : 1641 : case REAL_CST:
21704 : 1641 : {
21705 : 1641 : switch (TREE_CODE (_p1))
21706 : : {
21707 : 0 : case SSA_NAME:
21708 : 0 : if (gimple *_d1 = get_def (valueize, _p1))
21709 : : {
21710 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
21711 : 0 : switch (gimple_call_combined_fn (_c1))
21712 : : {
21713 : 0 : case CFN_BUILT_IN_EXP:
21714 : 0 : if (gimple_call_num_args (_c1) == 1)
21715 : : {
21716 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21717 : 0 : _q30 = do_valueize (valueize, _q30);
21718 : 0 : {
21719 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21720 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, LE_EXPR))
21721 : 0 : return true;
21722 : : }
21723 : : }
21724 : : break;
21725 : 0 : case CFN_BUILT_IN_LOG:
21726 : 0 : if (gimple_call_num_args (_c1) == 1)
21727 : : {
21728 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21729 : 0 : _q30 = do_valueize (valueize, _q30);
21730 : 0 : {
21731 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21732 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP, LE_EXPR))
21733 : 0 : return true;
21734 : : }
21735 : : }
21736 : : break;
21737 : 0 : case CFN_BUILT_IN_EXP10F:
21738 : 0 : if (gimple_call_num_args (_c1) == 1)
21739 : : {
21740 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21741 : 0 : _q30 = do_valueize (valueize, _q30);
21742 : 0 : {
21743 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21744 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, LE_EXPR))
21745 : 0 : return true;
21746 : : }
21747 : : }
21748 : : break;
21749 : 0 : case CFN_BUILT_IN_EXP10L:
21750 : 0 : if (gimple_call_num_args (_c1) == 1)
21751 : : {
21752 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21753 : 0 : _q30 = do_valueize (valueize, _q30);
21754 : 0 : {
21755 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21756 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, LE_EXPR))
21757 : 0 : return true;
21758 : : }
21759 : : }
21760 : : break;
21761 : 0 : case CFN_BUILT_IN_EXP2:
21762 : 0 : if (gimple_call_num_args (_c1) == 1)
21763 : : {
21764 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21765 : 0 : _q30 = do_valueize (valueize, _q30);
21766 : 0 : {
21767 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21768 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, LE_EXPR))
21769 : 0 : return true;
21770 : : }
21771 : : }
21772 : : break;
21773 : 0 : case CFN_BUILT_IN_EXPF:
21774 : 0 : if (gimple_call_num_args (_c1) == 1)
21775 : : {
21776 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21777 : 0 : _q30 = do_valueize (valueize, _q30);
21778 : 0 : {
21779 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21780 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, LE_EXPR))
21781 : 0 : return true;
21782 : : }
21783 : : }
21784 : : break;
21785 : 0 : case CFN_BUILT_IN_EXPL:
21786 : 0 : if (gimple_call_num_args (_c1) == 1)
21787 : : {
21788 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21789 : 0 : _q30 = do_valueize (valueize, _q30);
21790 : 0 : {
21791 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21792 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, LE_EXPR))
21793 : 0 : return true;
21794 : : }
21795 : : }
21796 : : break;
21797 : 0 : case CFN_BUILT_IN_LOG2:
21798 : 0 : if (gimple_call_num_args (_c1) == 1)
21799 : : {
21800 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21801 : 0 : _q30 = do_valueize (valueize, _q30);
21802 : 0 : {
21803 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21804 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_EXP2, LE_EXPR))
21805 : 0 : return true;
21806 : : }
21807 : : }
21808 : : break;
21809 : 0 : case CFN_BUILT_IN_LOGF:
21810 : 0 : if (gimple_call_num_args (_c1) == 1)
21811 : : {
21812 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21813 : 0 : _q30 = do_valueize (valueize, _q30);
21814 : 0 : {
21815 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21816 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGF, CFN_BUILT_IN_EXPF, LE_EXPR))
21817 : 0 : return true;
21818 : : }
21819 : : }
21820 : : break;
21821 : 0 : case CFN_BUILT_IN_LOGL:
21822 : 0 : if (gimple_call_num_args (_c1) == 1)
21823 : : {
21824 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21825 : 0 : _q30 = do_valueize (valueize, _q30);
21826 : 0 : {
21827 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21828 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOGL, CFN_BUILT_IN_EXPL, LE_EXPR))
21829 : 0 : return true;
21830 : : }
21831 : : }
21832 : : break;
21833 : 0 : case CFN_BUILT_IN_LOG10F:
21834 : 0 : if (gimple_call_num_args (_c1) == 1)
21835 : : {
21836 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21837 : 0 : _q30 = do_valueize (valueize, _q30);
21838 : 0 : {
21839 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21840 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10F, CFN_BUILT_IN_EXP10F, LE_EXPR))
21841 : 0 : return true;
21842 : : }
21843 : : }
21844 : : break;
21845 : 0 : case CFN_BUILT_IN_LOG10L:
21846 : 0 : if (gimple_call_num_args (_c1) == 1)
21847 : : {
21848 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21849 : 0 : _q30 = do_valueize (valueize, _q30);
21850 : 0 : {
21851 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21852 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10L, CFN_BUILT_IN_EXP10L, LE_EXPR))
21853 : 0 : return true;
21854 : : }
21855 : : }
21856 : : break;
21857 : 0 : case CFN_EXP:
21858 : 0 : if (gimple_call_num_args (_c1) == 1)
21859 : : {
21860 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21861 : 0 : _q30 = do_valueize (valueize, _q30);
21862 : 0 : {
21863 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21864 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_LOG, CFN_EXP, LE_EXPR))
21865 : 0 : return true;
21866 : : }
21867 : : }
21868 : : break;
21869 : 0 : case CFN_LOG:
21870 : 0 : if (gimple_call_num_args (_c1) == 1)
21871 : : {
21872 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21873 : 0 : _q30 = do_valueize (valueize, _q30);
21874 : 0 : {
21875 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21876 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_LOG, CFN_EXP, LE_EXPR))
21877 : 0 : return true;
21878 : : }
21879 : : }
21880 : : break;
21881 : 0 : case CFN_EXP2:
21882 : 0 : if (gimple_call_num_args (_c1) == 1)
21883 : : {
21884 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21885 : 0 : _q30 = do_valueize (valueize, _q30);
21886 : 0 : {
21887 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21888 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_LOG2, CFN_EXP2, LE_EXPR))
21889 : 0 : return true;
21890 : : }
21891 : : }
21892 : : break;
21893 : 0 : case CFN_LOG2:
21894 : 0 : if (gimple_call_num_args (_c1) == 1)
21895 : : {
21896 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21897 : 0 : _q30 = do_valueize (valueize, _q30);
21898 : 0 : {
21899 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21900 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_LOG2, CFN_EXP2, LE_EXPR))
21901 : 0 : return true;
21902 : : }
21903 : : }
21904 : : break;
21905 : 0 : case CFN_EXP10:
21906 : 0 : if (gimple_call_num_args (_c1) == 1)
21907 : : {
21908 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21909 : 0 : _q30 = do_valueize (valueize, _q30);
21910 : 0 : {
21911 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21912 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_LOG10, CFN_EXP10, LE_EXPR))
21913 : 0 : return true;
21914 : : }
21915 : : }
21916 : : break;
21917 : 0 : case CFN_LOG10:
21918 : 0 : if (gimple_call_num_args (_c1) == 1)
21919 : : {
21920 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21921 : 0 : _q30 = do_valueize (valueize, _q30);
21922 : 0 : {
21923 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21924 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_LOG10, CFN_EXP10, LE_EXPR))
21925 : 0 : return true;
21926 : : }
21927 : : }
21928 : : break;
21929 : 0 : case CFN_BUILT_IN_EXP10:
21930 : 0 : if (gimple_call_num_args (_c1) == 1)
21931 : : {
21932 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21933 : 0 : _q30 = do_valueize (valueize, _q30);
21934 : 0 : {
21935 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21936 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, LE_EXPR))
21937 : 0 : return true;
21938 : : }
21939 : : }
21940 : : break;
21941 : 0 : case CFN_BUILT_IN_EXP2F:
21942 : 0 : if (gimple_call_num_args (_c1) == 1)
21943 : : {
21944 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21945 : 0 : _q30 = do_valueize (valueize, _q30);
21946 : 0 : {
21947 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21948 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, LE_EXPR))
21949 : 0 : return true;
21950 : : }
21951 : : }
21952 : : break;
21953 : 0 : case CFN_BUILT_IN_EXP2L:
21954 : 0 : if (gimple_call_num_args (_c1) == 1)
21955 : : {
21956 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21957 : 0 : _q30 = do_valueize (valueize, _q30);
21958 : 0 : {
21959 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21960 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, LE_EXPR))
21961 : 0 : return true;
21962 : : }
21963 : : }
21964 : : break;
21965 : 0 : case CFN_BUILT_IN_LOG10:
21966 : 0 : if (gimple_call_num_args (_c1) == 1)
21967 : : {
21968 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21969 : 0 : _q30 = do_valueize (valueize, _q30);
21970 : 0 : {
21971 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21972 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG10, CFN_BUILT_IN_EXP10, LE_EXPR))
21973 : 0 : return true;
21974 : : }
21975 : : }
21976 : : break;
21977 : 0 : case CFN_BUILT_IN_LOG2F:
21978 : 0 : if (gimple_call_num_args (_c1) == 1)
21979 : : {
21980 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21981 : 0 : _q30 = do_valueize (valueize, _q30);
21982 : 0 : {
21983 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21984 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2F, CFN_BUILT_IN_EXP2F, LE_EXPR))
21985 : 0 : return true;
21986 : : }
21987 : : }
21988 : : break;
21989 : 0 : case CFN_BUILT_IN_LOG2L:
21990 : 0 : if (gimple_call_num_args (_c1) == 1)
21991 : : {
21992 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
21993 : 0 : _q30 = do_valueize (valueize, _q30);
21994 : 0 : {
21995 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
21996 : 0 : if (gimple_simplify_491 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_EXP2L, LE_EXPR))
21997 : 0 : return true;
21998 : : }
21999 : : }
22000 : : break;
22001 : : default:;
22002 : : }
22003 : : }
22004 : : break;
22005 : : default:;
22006 : : }
22007 : : break;
22008 : : }
22009 : : default:;
22010 : : }
22011 : : return false;
22012 : : }
22013 : :
22014 : : bool
22015 : 2691 : gimple_simplify_CFN_BUILT_IN_POWIF (gimple_match_op *res_op, gimple_seq *seq,
22016 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
22017 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
22018 : : {
22019 : 2691 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
22020 : 2691 : switch (TREE_CODE (_p0))
22021 : : {
22022 : 1352 : case SSA_NAME:
22023 : 1352 : if (gimple *_d1 = get_def (valueize, _p0))
22024 : : {
22025 : 1130 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
22026 : 1378 : switch (gimple_assign_rhs_code (_a1))
22027 : : {
22028 : 0 : case NEGATE_EXPR:
22029 : 0 : {
22030 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
22031 : 0 : _q20 = do_valueize (valueize, _q20);
22032 : 0 : switch (TREE_CODE (_p1))
22033 : : {
22034 : 0 : case INTEGER_CST:
22035 : 0 : {
22036 : 0 : {
22037 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
22038 : 0 : if ((wi::to_wide (captures[1]) & 1) == 0
22039 : : )
22040 : : {
22041 : 0 : gimple_seq *lseq = seq;
22042 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2656;
22043 : 0 : {
22044 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
22045 : 0 : res_op->ops[0] = captures[0];
22046 : 0 : res_op->ops[1] = captures[1];
22047 : 0 : res_op->resimplify (lseq, valueize);
22048 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1195, __FILE__, __LINE__, true);
22049 : 0 : return true;
22050 : : }
22051 : 0 : next_after_fail2656:;
22052 : : }
22053 : : }
22054 : 0 : break;
22055 : : }
22056 : : default:;
22057 : : }
22058 : : break;
22059 : : }
22060 : 0 : case ABS_EXPR:
22061 : 0 : {
22062 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
22063 : 0 : _q20 = do_valueize (valueize, _q20);
22064 : 0 : switch (TREE_CODE (_p1))
22065 : : {
22066 : 0 : case INTEGER_CST:
22067 : 0 : {
22068 : 0 : {
22069 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
22070 : 0 : if ((wi::to_wide (captures[1]) & 1) == 0
22071 : : )
22072 : : {
22073 : 0 : gimple_seq *lseq = seq;
22074 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2657;
22075 : 0 : {
22076 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
22077 : 0 : res_op->ops[0] = captures[0];
22078 : 0 : res_op->ops[1] = captures[1];
22079 : 0 : res_op->resimplify (lseq, valueize);
22080 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1195, __FILE__, __LINE__, true);
22081 : 0 : return true;
22082 : : }
22083 : 0 : next_after_fail2657:;
22084 : : }
22085 : : }
22086 : 0 : break;
22087 : : }
22088 : : default:;
22089 : : }
22090 : : break;
22091 : : }
22092 : 10 : case RDIV_EXPR:
22093 : 10 : {
22094 : 10 : tree _q20 = gimple_assign_rhs1 (_a1);
22095 : 10 : _q20 = do_valueize (valueize, _q20);
22096 : 10 : tree _q21 = gimple_assign_rhs2 (_a1);
22097 : 10 : _q21 = do_valueize (valueize, _q21);
22098 : 10 : if (real_onep (_q20))
22099 : : {
22100 : 2 : {
22101 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
22102 : 2 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
22103 : : )
22104 : : {
22105 : 2 : if (! HONOR_INFINITIES (type) && ! flag_trapping_math
22106 : : )
22107 : : {
22108 : 2 : if (single_use (captures[0])
22109 : : )
22110 : : {
22111 : 2 : gimple_seq *lseq = seq;
22112 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2658;
22113 : 2 : {
22114 : 2 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
22115 : 2 : res_op->ops[0] = captures[2];
22116 : 2 : {
22117 : 2 : tree _o1[1], _r1;
22118 : 2 : _o1[0] = captures[3];
22119 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
22120 : 2 : tem_op.resimplify (lseq, valueize);
22121 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
22122 : 2 : if (!_r1) goto next_after_fail2658;
22123 : 1 : res_op->ops[1] = _r1;
22124 : : }
22125 : 1 : res_op->resimplify (lseq, valueize);
22126 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1196, __FILE__, __LINE__, true);
22127 : 1 : return true;
22128 : : }
22129 : 1 : next_after_fail2658:;
22130 : : }
22131 : : }
22132 : : }
22133 : : }
22134 : : }
22135 : : break;
22136 : : }
22137 : : default:;
22138 : : }
22139 : 78 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
22140 : 12 : switch (gimple_call_combined_fn (_c1))
22141 : : {
22142 : 0 : case CFN_BUILT_IN_COPYSIGN:
22143 : 0 : if (gimple_call_num_args (_c1) == 2)
22144 : : {
22145 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22146 : 0 : _q20 = do_valueize (valueize, _q20);
22147 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22148 : 0 : _q21 = do_valueize (valueize, _q21);
22149 : 0 : switch (TREE_CODE (_p1))
22150 : : {
22151 : 0 : case INTEGER_CST:
22152 : 0 : {
22153 : 0 : {
22154 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22155 : 0 : const combined_fn copysigns = CFN_BUILT_IN_COPYSIGN;
22156 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
22157 : : )
22158 : : {
22159 : 0 : gimple_seq *lseq = seq;
22160 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2659;
22161 : 0 : {
22162 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
22163 : 0 : res_op->ops[0] = captures[0];
22164 : 0 : res_op->ops[1] = captures[2];
22165 : 0 : res_op->resimplify (lseq, valueize);
22166 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1197, __FILE__, __LINE__, true);
22167 : 0 : return true;
22168 : : }
22169 : 0 : next_after_fail2659:;
22170 : : }
22171 : : }
22172 : 0 : break;
22173 : : }
22174 : : default:;
22175 : : }
22176 : : }
22177 : : break;
22178 : 0 : case CFN_BUILT_IN_COPYSIGNF:
22179 : 0 : if (gimple_call_num_args (_c1) == 2)
22180 : : {
22181 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22182 : 0 : _q20 = do_valueize (valueize, _q20);
22183 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22184 : 0 : _q21 = do_valueize (valueize, _q21);
22185 : 0 : switch (TREE_CODE (_p1))
22186 : : {
22187 : 0 : case INTEGER_CST:
22188 : 0 : {
22189 : 0 : {
22190 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22191 : 0 : const combined_fn copysigns = CFN_BUILT_IN_COPYSIGNF;
22192 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
22193 : : )
22194 : : {
22195 : 0 : gimple_seq *lseq = seq;
22196 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2660;
22197 : 0 : {
22198 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
22199 : 0 : res_op->ops[0] = captures[0];
22200 : 0 : res_op->ops[1] = captures[2];
22201 : 0 : res_op->resimplify (lseq, valueize);
22202 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1197, __FILE__, __LINE__, true);
22203 : 0 : return true;
22204 : : }
22205 : 0 : next_after_fail2660:;
22206 : : }
22207 : : }
22208 : 0 : break;
22209 : : }
22210 : : default:;
22211 : : }
22212 : : }
22213 : : break;
22214 : 0 : case CFN_BUILT_IN_COPYSIGNL:
22215 : 0 : if (gimple_call_num_args (_c1) == 2)
22216 : : {
22217 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22218 : 0 : _q20 = do_valueize (valueize, _q20);
22219 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22220 : 0 : _q21 = do_valueize (valueize, _q21);
22221 : 0 : switch (TREE_CODE (_p1))
22222 : : {
22223 : 0 : case INTEGER_CST:
22224 : 0 : {
22225 : 0 : {
22226 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22227 : 0 : const combined_fn copysigns = CFN_BUILT_IN_COPYSIGNL;
22228 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
22229 : : )
22230 : : {
22231 : 0 : gimple_seq *lseq = seq;
22232 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2661;
22233 : 0 : {
22234 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
22235 : 0 : res_op->ops[0] = captures[0];
22236 : 0 : res_op->ops[1] = captures[2];
22237 : 0 : res_op->resimplify (lseq, valueize);
22238 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1197, __FILE__, __LINE__, true);
22239 : 0 : return true;
22240 : : }
22241 : 0 : next_after_fail2661:;
22242 : : }
22243 : : }
22244 : 0 : break;
22245 : : }
22246 : : default:;
22247 : : }
22248 : : }
22249 : : break;
22250 : 0 : case CFN_COPYSIGN:
22251 : 0 : if (gimple_call_num_args (_c1) == 2)
22252 : : {
22253 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22254 : 0 : _q20 = do_valueize (valueize, _q20);
22255 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22256 : 0 : _q21 = do_valueize (valueize, _q21);
22257 : 0 : switch (TREE_CODE (_p1))
22258 : : {
22259 : 0 : case INTEGER_CST:
22260 : 0 : {
22261 : 0 : {
22262 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22263 : 0 : const combined_fn copysigns = CFN_COPYSIGN;
22264 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
22265 : : )
22266 : : {
22267 : 0 : gimple_seq *lseq = seq;
22268 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2662;
22269 : 0 : {
22270 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
22271 : 0 : res_op->ops[0] = captures[0];
22272 : 0 : res_op->ops[1] = captures[2];
22273 : 0 : res_op->resimplify (lseq, valueize);
22274 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1197, __FILE__, __LINE__, true);
22275 : 0 : return true;
22276 : : }
22277 : 0 : next_after_fail2662:;
22278 : : }
22279 : : }
22280 : 0 : break;
22281 : : }
22282 : : default:;
22283 : : }
22284 : : }
22285 : : break;
22286 : : default:;
22287 : : }
22288 : : }
22289 : : break;
22290 : 1095 : case REAL_CST:
22291 : 1095 : {
22292 : 1095 : {
22293 : 1095 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
22294 : 1095 : if (flag_unsafe_math_optimizations
22295 : : )
22296 : : {
22297 : 9 : {
22298 : 9 : HOST_WIDE_INT tmp = 0;
22299 : 9 : if (real_isinteger (&TREE_REAL_CST (captures[0]), &tmp)
22300 : 9 : && tmp > 0 && pow2p_hwi (tmp)
22301 : : )
22302 : : {
22303 : 8 : gimple_seq *lseq = seq;
22304 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2663;
22305 : 8 : {
22306 : 8 : res_op->set_op (CFN_BUILT_IN_LDEXPF, type, 2);
22307 : 8 : res_op->ops[0] = build_one_cst (type);
22308 : 8 : {
22309 : 8 : tree _o1[2], _r1;
22310 : 8 : _o1[0] = captures[1];
22311 : 8 : _o1[1] = build_int_cst (integer_type_node,
22312 : 16 : exact_log2 (tmp));
22313 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
22314 : 8 : tem_op.resimplify (lseq, valueize);
22315 : 8 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
22316 : 8 : if (!_r1) goto next_after_fail2663;
22317 : 7 : res_op->ops[1] = _r1;
22318 : : }
22319 : 7 : res_op->resimplify (lseq, valueize);
22320 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1198, __FILE__, __LINE__, true);
22321 : 7 : return true;
22322 : : }
22323 : 2 : next_after_fail2663:;
22324 : : }
22325 : : }
22326 : : }
22327 : : }
22328 : 1088 : break;
22329 : : }
22330 : 2683 : default:;
22331 : : }
22332 : 2683 : if (real_zerop (_p0))
22333 : : {
22334 : 1 : {
22335 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
22336 : 1 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
22337 : : )
22338 : : {
22339 : 1 : if (! HONOR_INFINITIES (type) && ! flag_trapping_math
22340 : : )
22341 : : {
22342 : 1 : if (! HONOR_NANS (type) && ! HONOR_SIGNED_ZEROS (type)
22343 : : )
22344 : : {
22345 : 1 : gimple_seq *lseq = seq;
22346 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2664;
22347 : 1 : {
22348 : 1 : tree tem;
22349 : 1 : tem = captures[0];
22350 : 1 : res_op->set_value (tem);
22351 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1199, __FILE__, __LINE__, true);
22352 : 1 : return true;
22353 : : }
22354 : 0 : next_after_fail2664:;
22355 : : }
22356 : : }
22357 : : }
22358 : : }
22359 : : }
22360 : 2682 : if (real_onep (_p0))
22361 : : {
22362 : 0 : {
22363 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
22364 : 0 : if (gimple_simplify_531 (res_op, seq, valueize, type, captures))
22365 : 0 : return true;
22366 : : }
22367 : : }
22368 : 2682 : switch (TREE_CODE (_p1))
22369 : : {
22370 : 1367 : case INTEGER_CST:
22371 : 1367 : {
22372 : 1367 : {
22373 : 1367 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
22374 : 1367 : if (wi::to_wide (captures[1]) == 0
22375 : : )
22376 : : {
22377 : 1 : gimple_seq *lseq = seq;
22378 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2665;
22379 : 1 : {
22380 : 1 : tree tem;
22381 : 1 : tem = build_real (type, dconst1);
22382 : 1 : res_op->set_value (tem);
22383 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1200, __FILE__, __LINE__, true);
22384 : 1 : return true;
22385 : : }
22386 : 0 : next_after_fail2665:;
22387 : : }
22388 : : else
22389 : : {
22390 : 1366 : if (wi::to_wide (captures[1]) == 1
22391 : : )
22392 : : {
22393 : 1 : gimple_seq *lseq = seq;
22394 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2666;
22395 : 1 : {
22396 : 1 : tree tem;
22397 : 1 : tem = captures[0];
22398 : 1 : res_op->set_value (tem);
22399 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1201, __FILE__, __LINE__, true);
22400 : 1 : return true;
22401 : : }
22402 : 0 : next_after_fail2666:;
22403 : : }
22404 : : else
22405 : : {
22406 : 1365 : if (wi::to_wide (captures[1]) == -1
22407 : : )
22408 : : {
22409 : 1 : gimple_seq *lseq = seq;
22410 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2667;
22411 : 1 : {
22412 : 1 : res_op->set_op (RDIV_EXPR, type, 2);
22413 : 1 : res_op->ops[0] = build_real (type, dconst1);
22414 : 1 : res_op->ops[1] = captures[0];
22415 : 1 : res_op->resimplify (lseq, valueize);
22416 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1202, __FILE__, __LINE__, true);
22417 : 1 : return true;
22418 : : }
22419 : 0 : next_after_fail2667:;
22420 : : }
22421 : : }
22422 : : }
22423 : : }
22424 : 1364 : break;
22425 : : }
22426 : : default:;
22427 : : }
22428 : : return false;
22429 : : }
22430 : :
22431 : : bool
22432 : 382 : gimple_simplify_CFN_BUILT_IN_HYPOTF (gimple_match_op *res_op, gimple_seq *seq,
22433 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
22434 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
22435 : : {
22436 : 382 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
22437 : 382 : switch (TREE_CODE (_p0))
22438 : : {
22439 : 347 : case SSA_NAME:
22440 : 347 : if (gimple *_d1 = get_def (valueize, _p0))
22441 : : {
22442 : 232 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
22443 : 154 : switch (gimple_assign_rhs_code (_a1))
22444 : : {
22445 : 7 : case NEGATE_EXPR:
22446 : 7 : {
22447 : 7 : tree _q20 = gimple_assign_rhs1 (_a1);
22448 : 7 : _q20 = do_valueize (valueize, _q20);
22449 : 7 : {
22450 : 7 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
22451 : 7 : const combined_fn hypots = CFN_BUILT_IN_HYPOTF;
22452 : 7 : gimple_seq *lseq = seq;
22453 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2692;
22454 : 7 : {
22455 : 7 : res_op->set_op (hypots, type, 2);
22456 : 7 : res_op->ops[0] = captures[0];
22457 : 7 : res_op->ops[1] = captures[1];
22458 : 7 : res_op->resimplify (lseq, valueize);
22459 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1203, __FILE__, __LINE__, true);
22460 : 7 : return true;
22461 : : }
22462 : 0 : next_after_fail2692:;
22463 : : }
22464 : 0 : break;
22465 : : }
22466 : 5 : case ABS_EXPR:
22467 : 5 : {
22468 : 5 : tree _q20 = gimple_assign_rhs1 (_a1);
22469 : 5 : _q20 = do_valueize (valueize, _q20);
22470 : 5 : {
22471 : 5 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
22472 : 5 : const combined_fn hypots = CFN_BUILT_IN_HYPOTF;
22473 : 5 : gimple_seq *lseq = seq;
22474 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2693;
22475 : 5 : {
22476 : 5 : res_op->set_op (hypots, type, 2);
22477 : 5 : res_op->ops[0] = captures[0];
22478 : 5 : res_op->ops[1] = captures[1];
22479 : 5 : res_op->resimplify (lseq, valueize);
22480 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1203, __FILE__, __LINE__, true);
22481 : 5 : return true;
22482 : : }
22483 : 0 : next_after_fail2693:;
22484 : : }
22485 : 0 : break;
22486 : : }
22487 : : default:;
22488 : : }
22489 : : }
22490 : : break;
22491 : 370 : default:;
22492 : : }
22493 : 370 : switch (TREE_CODE (_p1))
22494 : : {
22495 : 333 : case SSA_NAME:
22496 : 333 : if (gimple *_d1 = get_def (valueize, _p1))
22497 : : {
22498 : 220 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
22499 : 189 : switch (gimple_assign_rhs_code (_a1))
22500 : : {
22501 : 7 : case NEGATE_EXPR:
22502 : 7 : {
22503 : 7 : tree _q30 = gimple_assign_rhs1 (_a1);
22504 : 7 : _q30 = do_valueize (valueize, _q30);
22505 : 7 : {
22506 : 7 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
22507 : 7 : const combined_fn hypots = CFN_BUILT_IN_HYPOTF;
22508 : 7 : gimple_seq *lseq = seq;
22509 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2694;
22510 : 7 : {
22511 : 7 : res_op->set_op (hypots, type, 2);
22512 : 7 : res_op->ops[0] = captures[0];
22513 : 7 : res_op->ops[1] = captures[1];
22514 : 7 : res_op->resimplify (lseq, valueize);
22515 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1204, __FILE__, __LINE__, true);
22516 : 7 : return true;
22517 : : }
22518 : 0 : next_after_fail2694:;
22519 : : }
22520 : 0 : break;
22521 : : }
22522 : 5 : case ABS_EXPR:
22523 : 5 : {
22524 : 5 : tree _q30 = gimple_assign_rhs1 (_a1);
22525 : 5 : _q30 = do_valueize (valueize, _q30);
22526 : 5 : {
22527 : 5 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
22528 : 5 : const combined_fn hypots = CFN_BUILT_IN_HYPOTF;
22529 : 5 : gimple_seq *lseq = seq;
22530 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2695;
22531 : 5 : {
22532 : 5 : res_op->set_op (hypots, type, 2);
22533 : 5 : res_op->ops[0] = captures[0];
22534 : 5 : res_op->ops[1] = captures[1];
22535 : 5 : res_op->resimplify (lseq, valueize);
22536 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1204, __FILE__, __LINE__, true);
22537 : 5 : return true;
22538 : : }
22539 : 0 : next_after_fail2695:;
22540 : : }
22541 : 0 : break;
22542 : : }
22543 : : default:;
22544 : : }
22545 : : }
22546 : : break;
22547 : 358 : default:;
22548 : : }
22549 : 358 : switch (TREE_CODE (_p0))
22550 : : {
22551 : 323 : case SSA_NAME:
22552 : 323 : if (gimple *_d1 = get_def (valueize, _p0))
22553 : : {
22554 : 208 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
22555 : 20 : switch (gimple_call_combined_fn (_c1))
22556 : : {
22557 : 0 : case CFN_BUILT_IN_COPYSIGN:
22558 : 0 : if (gimple_call_num_args (_c1) == 2)
22559 : : {
22560 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22561 : 0 : _q20 = do_valueize (valueize, _q20);
22562 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22563 : 0 : _q21 = do_valueize (valueize, _q21);
22564 : 0 : {
22565 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22566 : 0 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_BUILT_IN_HYPOTF))
22567 : 0 : return true;
22568 : : }
22569 : : }
22570 : : break;
22571 : 4 : case CFN_BUILT_IN_COPYSIGNF:
22572 : 4 : if (gimple_call_num_args (_c1) == 2)
22573 : : {
22574 : 4 : tree _q20 = gimple_call_arg (_c1, 0);
22575 : 4 : _q20 = do_valueize (valueize, _q20);
22576 : 4 : tree _q21 = gimple_call_arg (_c1, 1);
22577 : 4 : _q21 = do_valueize (valueize, _q21);
22578 : 4 : {
22579 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22580 : 4 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_BUILT_IN_HYPOTF))
22581 : 4 : return true;
22582 : : }
22583 : : }
22584 : : break;
22585 : 0 : case CFN_BUILT_IN_COPYSIGNL:
22586 : 0 : if (gimple_call_num_args (_c1) == 2)
22587 : : {
22588 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22589 : 0 : _q20 = do_valueize (valueize, _q20);
22590 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22591 : 0 : _q21 = do_valueize (valueize, _q21);
22592 : 0 : {
22593 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22594 : 0 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_BUILT_IN_HYPOTF))
22595 : 0 : return true;
22596 : : }
22597 : : }
22598 : : break;
22599 : 1 : case CFN_COPYSIGN:
22600 : 1 : if (gimple_call_num_args (_c1) == 2)
22601 : : {
22602 : 1 : tree _q20 = gimple_call_arg (_c1, 0);
22603 : 1 : _q20 = do_valueize (valueize, _q20);
22604 : 1 : tree _q21 = gimple_call_arg (_c1, 1);
22605 : 1 : _q21 = do_valueize (valueize, _q21);
22606 : 1 : {
22607 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22608 : 1 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_BUILT_IN_HYPOTF))
22609 : 1 : return true;
22610 : : }
22611 : : }
22612 : : break;
22613 : : default:;
22614 : : }
22615 : : }
22616 : : break;
22617 : 353 : default:;
22618 : : }
22619 : 353 : switch (TREE_CODE (_p1))
22620 : : {
22621 : 316 : case SSA_NAME:
22622 : 316 : if (gimple *_d1 = get_def (valueize, _p1))
22623 : : {
22624 : 203 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
22625 : 16 : switch (gimple_call_combined_fn (_c1))
22626 : : {
22627 : 0 : case CFN_BUILT_IN_COPYSIGN:
22628 : 0 : if (gimple_call_num_args (_c1) == 2)
22629 : : {
22630 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
22631 : 0 : _q30 = do_valueize (valueize, _q30);
22632 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
22633 : 0 : _q31 = do_valueize (valueize, _q31);
22634 : 0 : {
22635 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22636 : 0 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_BUILT_IN_HYPOTF))
22637 : 0 : return true;
22638 : : }
22639 : : }
22640 : : break;
22641 : 0 : case CFN_BUILT_IN_COPYSIGNF:
22642 : 0 : if (gimple_call_num_args (_c1) == 2)
22643 : : {
22644 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
22645 : 0 : _q30 = do_valueize (valueize, _q30);
22646 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
22647 : 0 : _q31 = do_valueize (valueize, _q31);
22648 : 0 : {
22649 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22650 : 0 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_BUILT_IN_HYPOTF))
22651 : 0 : return true;
22652 : : }
22653 : : }
22654 : : break;
22655 : 0 : case CFN_BUILT_IN_COPYSIGNL:
22656 : 0 : if (gimple_call_num_args (_c1) == 2)
22657 : : {
22658 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
22659 : 0 : _q30 = do_valueize (valueize, _q30);
22660 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
22661 : 0 : _q31 = do_valueize (valueize, _q31);
22662 : 0 : {
22663 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22664 : 0 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_BUILT_IN_HYPOTF))
22665 : 0 : return true;
22666 : : }
22667 : : }
22668 : : break;
22669 : 1 : case CFN_COPYSIGN:
22670 : 1 : if (gimple_call_num_args (_c1) == 2)
22671 : : {
22672 : 1 : tree _q30 = gimple_call_arg (_c1, 0);
22673 : 1 : _q30 = do_valueize (valueize, _q30);
22674 : 1 : tree _q31 = gimple_call_arg (_c1, 1);
22675 : 1 : _q31 = do_valueize (valueize, _q31);
22676 : 1 : {
22677 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22678 : 1 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_BUILT_IN_HYPOTF))
22679 : 1 : return true;
22680 : : }
22681 : : }
22682 : : break;
22683 : : default:;
22684 : : }
22685 : : }
22686 : : break;
22687 : 352 : default:;
22688 : : }
22689 : 352 : if (real_zerop (_p1))
22690 : : {
22691 : 2 : {
22692 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
22693 : 2 : if (gimple_simplify_534 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_HYPOTF))
22694 : 2 : return true;
22695 : : }
22696 : : }
22697 : 350 : if (real_zerop (_p0))
22698 : : {
22699 : 1 : {
22700 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
22701 : 1 : if (gimple_simplify_534 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_HYPOTF))
22702 : 1 : return true;
22703 : : }
22704 : : }
22705 : 349 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
22706 : : {
22707 : 7 : {
22708 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
22709 : 7 : if (gimple_simplify_535 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_HYPOTF))
22710 : 3 : return true;
22711 : : }
22712 : : }
22713 : : return false;
22714 : : }
22715 : :
22716 : : bool
22717 : 0 : gimple_simplify_CFN_HYPOT (gimple_match_op *res_op, gimple_seq *seq,
22718 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
22719 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
22720 : : {
22721 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
22722 : 0 : switch (TREE_CODE (_p0))
22723 : : {
22724 : 0 : case SSA_NAME:
22725 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
22726 : : {
22727 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
22728 : 0 : switch (gimple_assign_rhs_code (_a1))
22729 : : {
22730 : 0 : case NEGATE_EXPR:
22731 : 0 : {
22732 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
22733 : 0 : _q20 = do_valueize (valueize, _q20);
22734 : 0 : {
22735 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
22736 : 0 : const combined_fn hypots = CFN_HYPOT;
22737 : 0 : gimple_seq *lseq = seq;
22738 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2704;
22739 : 0 : {
22740 : 0 : res_op->set_op (hypots, type, 2);
22741 : 0 : res_op->ops[0] = captures[0];
22742 : 0 : res_op->ops[1] = captures[1];
22743 : 0 : res_op->resimplify (lseq, valueize);
22744 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1203, __FILE__, __LINE__, true);
22745 : 0 : return true;
22746 : : }
22747 : 0 : next_after_fail2704:;
22748 : : }
22749 : 0 : break;
22750 : : }
22751 : 0 : case ABS_EXPR:
22752 : 0 : {
22753 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
22754 : 0 : _q20 = do_valueize (valueize, _q20);
22755 : 0 : {
22756 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
22757 : 0 : const combined_fn hypots = CFN_HYPOT;
22758 : 0 : gimple_seq *lseq = seq;
22759 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2705;
22760 : 0 : {
22761 : 0 : res_op->set_op (hypots, type, 2);
22762 : 0 : res_op->ops[0] = captures[0];
22763 : 0 : res_op->ops[1] = captures[1];
22764 : 0 : res_op->resimplify (lseq, valueize);
22765 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1203, __FILE__, __LINE__, true);
22766 : 0 : return true;
22767 : : }
22768 : 0 : next_after_fail2705:;
22769 : : }
22770 : 0 : break;
22771 : : }
22772 : : default:;
22773 : : }
22774 : : }
22775 : : break;
22776 : 0 : default:;
22777 : : }
22778 : 0 : switch (TREE_CODE (_p1))
22779 : : {
22780 : 0 : case SSA_NAME:
22781 : 0 : if (gimple *_d1 = get_def (valueize, _p1))
22782 : : {
22783 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
22784 : 0 : switch (gimple_assign_rhs_code (_a1))
22785 : : {
22786 : 0 : case NEGATE_EXPR:
22787 : 0 : {
22788 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
22789 : 0 : _q30 = do_valueize (valueize, _q30);
22790 : 0 : {
22791 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
22792 : 0 : const combined_fn hypots = CFN_HYPOT;
22793 : 0 : gimple_seq *lseq = seq;
22794 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2706;
22795 : 0 : {
22796 : 0 : res_op->set_op (hypots, type, 2);
22797 : 0 : res_op->ops[0] = captures[0];
22798 : 0 : res_op->ops[1] = captures[1];
22799 : 0 : res_op->resimplify (lseq, valueize);
22800 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1204, __FILE__, __LINE__, true);
22801 : 0 : return true;
22802 : : }
22803 : 0 : next_after_fail2706:;
22804 : : }
22805 : 0 : break;
22806 : : }
22807 : 0 : case ABS_EXPR:
22808 : 0 : {
22809 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
22810 : 0 : _q30 = do_valueize (valueize, _q30);
22811 : 0 : {
22812 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
22813 : 0 : const combined_fn hypots = CFN_HYPOT;
22814 : 0 : gimple_seq *lseq = seq;
22815 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2707;
22816 : 0 : {
22817 : 0 : res_op->set_op (hypots, type, 2);
22818 : 0 : res_op->ops[0] = captures[0];
22819 : 0 : res_op->ops[1] = captures[1];
22820 : 0 : res_op->resimplify (lseq, valueize);
22821 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1204, __FILE__, __LINE__, true);
22822 : 0 : return true;
22823 : : }
22824 : 0 : next_after_fail2707:;
22825 : : }
22826 : 0 : break;
22827 : : }
22828 : : default:;
22829 : : }
22830 : : }
22831 : : break;
22832 : 0 : default:;
22833 : : }
22834 : 0 : switch (TREE_CODE (_p0))
22835 : : {
22836 : 0 : case SSA_NAME:
22837 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
22838 : : {
22839 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
22840 : 0 : switch (gimple_call_combined_fn (_c1))
22841 : : {
22842 : 0 : case CFN_BUILT_IN_COPYSIGN:
22843 : 0 : if (gimple_call_num_args (_c1) == 2)
22844 : : {
22845 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22846 : 0 : _q20 = do_valueize (valueize, _q20);
22847 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22848 : 0 : _q21 = do_valueize (valueize, _q21);
22849 : 0 : {
22850 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22851 : 0 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_HYPOT))
22852 : 0 : return true;
22853 : : }
22854 : : }
22855 : : break;
22856 : 0 : case CFN_BUILT_IN_COPYSIGNF:
22857 : 0 : if (gimple_call_num_args (_c1) == 2)
22858 : : {
22859 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22860 : 0 : _q20 = do_valueize (valueize, _q20);
22861 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22862 : 0 : _q21 = do_valueize (valueize, _q21);
22863 : 0 : {
22864 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22865 : 0 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_HYPOT))
22866 : 0 : return true;
22867 : : }
22868 : : }
22869 : : break;
22870 : 0 : case CFN_BUILT_IN_COPYSIGNL:
22871 : 0 : if (gimple_call_num_args (_c1) == 2)
22872 : : {
22873 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22874 : 0 : _q20 = do_valueize (valueize, _q20);
22875 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22876 : 0 : _q21 = do_valueize (valueize, _q21);
22877 : 0 : {
22878 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22879 : 0 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_HYPOT))
22880 : 0 : return true;
22881 : : }
22882 : : }
22883 : : break;
22884 : 0 : case CFN_COPYSIGN:
22885 : 0 : if (gimple_call_num_args (_c1) == 2)
22886 : : {
22887 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
22888 : 0 : _q20 = do_valueize (valueize, _q20);
22889 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
22890 : 0 : _q21 = do_valueize (valueize, _q21);
22891 : 0 : {
22892 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
22893 : 0 : if (gimple_simplify_532 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_HYPOT))
22894 : 0 : return true;
22895 : : }
22896 : : }
22897 : : break;
22898 : : default:;
22899 : : }
22900 : : }
22901 : : break;
22902 : 0 : default:;
22903 : : }
22904 : 0 : switch (TREE_CODE (_p1))
22905 : : {
22906 : 0 : case SSA_NAME:
22907 : 0 : if (gimple *_d1 = get_def (valueize, _p1))
22908 : : {
22909 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
22910 : 0 : switch (gimple_call_combined_fn (_c1))
22911 : : {
22912 : 0 : case CFN_BUILT_IN_COPYSIGN:
22913 : 0 : if (gimple_call_num_args (_c1) == 2)
22914 : : {
22915 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
22916 : 0 : _q30 = do_valueize (valueize, _q30);
22917 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
22918 : 0 : _q31 = do_valueize (valueize, _q31);
22919 : 0 : {
22920 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22921 : 0 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_HYPOT))
22922 : 0 : return true;
22923 : : }
22924 : : }
22925 : : break;
22926 : 0 : case CFN_BUILT_IN_COPYSIGNF:
22927 : 0 : if (gimple_call_num_args (_c1) == 2)
22928 : : {
22929 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
22930 : 0 : _q30 = do_valueize (valueize, _q30);
22931 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
22932 : 0 : _q31 = do_valueize (valueize, _q31);
22933 : 0 : {
22934 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22935 : 0 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_HYPOT))
22936 : 0 : return true;
22937 : : }
22938 : : }
22939 : : break;
22940 : 0 : case CFN_BUILT_IN_COPYSIGNL:
22941 : 0 : if (gimple_call_num_args (_c1) == 2)
22942 : : {
22943 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
22944 : 0 : _q30 = do_valueize (valueize, _q30);
22945 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
22946 : 0 : _q31 = do_valueize (valueize, _q31);
22947 : 0 : {
22948 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22949 : 0 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_HYPOT))
22950 : 0 : return true;
22951 : : }
22952 : : }
22953 : : break;
22954 : 0 : case CFN_COPYSIGN:
22955 : 0 : if (gimple_call_num_args (_c1) == 2)
22956 : : {
22957 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
22958 : 0 : _q30 = do_valueize (valueize, _q30);
22959 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
22960 : 0 : _q31 = do_valueize (valueize, _q31);
22961 : 0 : {
22962 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
22963 : 0 : if (gimple_simplify_533 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_HYPOT))
22964 : 0 : return true;
22965 : : }
22966 : : }
22967 : : break;
22968 : : default:;
22969 : : }
22970 : : }
22971 : : break;
22972 : 0 : default:;
22973 : : }
22974 : 0 : if (real_zerop (_p1))
22975 : : {
22976 : 0 : {
22977 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
22978 : 0 : if (gimple_simplify_534 (res_op, seq, valueize, type, captures, CFN_HYPOT))
22979 : 0 : return true;
22980 : : }
22981 : : }
22982 : 0 : if (real_zerop (_p0))
22983 : : {
22984 : 0 : {
22985 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
22986 : 0 : if (gimple_simplify_534 (res_op, seq, valueize, type, captures, CFN_HYPOT))
22987 : 0 : return true;
22988 : : }
22989 : : }
22990 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
22991 : : {
22992 : 0 : {
22993 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
22994 : 0 : if (gimple_simplify_535 (res_op, seq, valueize, type, captures, CFN_HYPOT))
22995 : 0 : return true;
22996 : : }
22997 : : }
22998 : : return false;
22999 : : }
23000 : :
23001 : : bool
23002 : 1738 : gimple_simplify_CFN_BUILT_IN_FMINF (gimple_match_op *res_op, gimple_seq *seq,
23003 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23004 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23005 : : {
23006 : 1738 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23007 : 1738 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23008 : : {
23009 : 43 : {
23010 : 43 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23011 : 43 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF))
23012 : 28 : return true;
23013 : : }
23014 : : }
23015 : 1710 : switch (TREE_CODE (_p1))
23016 : : {
23017 : 856 : case REAL_CST:
23018 : 856 : {
23019 : 856 : {
23020 : 856 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23021 : 856 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF))
23022 : 38 : return true;
23023 : : }
23024 : 818 : break;
23025 : : }
23026 : 1672 : default:;
23027 : : }
23028 : 1672 : switch (TREE_CODE (_p0))
23029 : : {
23030 : 460 : case REAL_CST:
23031 : 460 : {
23032 : 460 : {
23033 : 460 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23034 : 460 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF))
23035 : 60 : return true;
23036 : : }
23037 : 400 : break;
23038 : : }
23039 : 1612 : default:;
23040 : : }
23041 : 1612 : {
23042 : 1612 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23043 : 1612 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF))
23044 : 17 : return true;
23045 : : }
23046 : 1595 : switch (TREE_CODE (_p0))
23047 : : {
23048 : 1049 : case SSA_NAME:
23049 : 1049 : if (gimple *_d1 = get_def (valueize, _p0))
23050 : : {
23051 : 626 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23052 : 478 : switch (gimple_assign_rhs_code (_a1))
23053 : : {
23054 : 40 : case NEGATE_EXPR:
23055 : 40 : {
23056 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
23057 : 40 : _q20 = do_valueize (valueize, _q20);
23058 : 40 : switch (TREE_CODE (_p1))
23059 : : {
23060 : 0 : case SSA_NAME:
23061 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23062 : : {
23063 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23064 : 0 : switch (gimple_assign_rhs_code (_a2))
23065 : : {
23066 : 0 : case NEGATE_EXPR:
23067 : 0 : {
23068 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23069 : 0 : _q40 = do_valueize (valueize, _q40);
23070 : 0 : {
23071 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23072 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23073 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23074 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23075 : : )
23076 : : {
23077 : 0 : gimple_seq *lseq = seq;
23078 : 0 : if (lseq
23079 : 0 : && (!single_use (captures[0])
23080 : 0 : || !single_use (captures[2])))
23081 : 0 : lseq = NULL;
23082 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2789;
23083 : 0 : {
23084 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23085 : 0 : {
23086 : 0 : tree _o1[2], _r1;
23087 : 0 : _o1[0] = captures[1];
23088 : 0 : _o1[1] = captures[3];
23089 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23090 : 0 : tem_op.resimplify (lseq, valueize);
23091 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23092 : 0 : if (!_r1) goto next_after_fail2789;
23093 : 0 : res_op->ops[0] = _r1;
23094 : : }
23095 : 0 : res_op->resimplify (lseq, valueize);
23096 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23097 : 0 : return true;
23098 : : }
23099 : 0 : next_after_fail2789:;
23100 : : }
23101 : : }
23102 : 0 : break;
23103 : : }
23104 : : default:;
23105 : : }
23106 : : }
23107 : : break;
23108 : : default:;
23109 : : }
23110 : : break;
23111 : : }
23112 : : default:;
23113 : : }
23114 : : }
23115 : : break;
23116 : : default:;
23117 : : }
23118 : : return false;
23119 : : }
23120 : :
23121 : : bool
23122 : 1800 : gimple_simplify_CFN_BUILT_IN_FMIN (gimple_match_op *res_op, gimple_seq *seq,
23123 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23124 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23125 : : {
23126 : 1800 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23127 : 1800 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23128 : : {
23129 : 55 : {
23130 : 55 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23131 : 55 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
23132 : 28 : return true;
23133 : : }
23134 : : }
23135 : 1772 : switch (TREE_CODE (_p1))
23136 : : {
23137 : 880 : case REAL_CST:
23138 : 880 : {
23139 : 880 : {
23140 : 880 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23141 : 880 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
23142 : 38 : return true;
23143 : : }
23144 : 842 : break;
23145 : : }
23146 : 1734 : default:;
23147 : : }
23148 : 1734 : switch (TREE_CODE (_p0))
23149 : : {
23150 : 482 : case REAL_CST:
23151 : 482 : {
23152 : 482 : {
23153 : 482 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23154 : 482 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
23155 : 60 : return true;
23156 : : }
23157 : 422 : break;
23158 : : }
23159 : 1674 : default:;
23160 : : }
23161 : 1674 : {
23162 : 1674 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23163 : 1674 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
23164 : 23 : return true;
23165 : : }
23166 : 1651 : switch (TREE_CODE (_p0))
23167 : : {
23168 : 1075 : case SSA_NAME:
23169 : 1075 : if (gimple *_d1 = get_def (valueize, _p0))
23170 : : {
23171 : 637 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23172 : 539 : switch (gimple_assign_rhs_code (_a1))
23173 : : {
23174 : 40 : case NEGATE_EXPR:
23175 : 40 : {
23176 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
23177 : 40 : _q20 = do_valueize (valueize, _q20);
23178 : 40 : switch (TREE_CODE (_p1))
23179 : : {
23180 : 0 : case SSA_NAME:
23181 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23182 : : {
23183 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23184 : 0 : switch (gimple_assign_rhs_code (_a2))
23185 : : {
23186 : 0 : case NEGATE_EXPR:
23187 : 0 : {
23188 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23189 : 0 : _q40 = do_valueize (valueize, _q40);
23190 : 0 : {
23191 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23192 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23193 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23194 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23195 : : )
23196 : : {
23197 : 0 : gimple_seq *lseq = seq;
23198 : 0 : if (lseq
23199 : 0 : && (!single_use (captures[0])
23200 : 0 : || !single_use (captures[2])))
23201 : 0 : lseq = NULL;
23202 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2790;
23203 : 0 : {
23204 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23205 : 0 : {
23206 : 0 : tree _o1[2], _r1;
23207 : 0 : _o1[0] = captures[1];
23208 : 0 : _o1[1] = captures[3];
23209 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAX, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23210 : 0 : tem_op.resimplify (lseq, valueize);
23211 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23212 : 0 : if (!_r1) goto next_after_fail2790;
23213 : 0 : res_op->ops[0] = _r1;
23214 : : }
23215 : 0 : res_op->resimplify (lseq, valueize);
23216 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23217 : 0 : return true;
23218 : : }
23219 : 0 : next_after_fail2790:;
23220 : : }
23221 : : }
23222 : 0 : break;
23223 : : }
23224 : : default:;
23225 : : }
23226 : : }
23227 : : break;
23228 : : default:;
23229 : : }
23230 : : break;
23231 : : }
23232 : : default:;
23233 : : }
23234 : : }
23235 : : break;
23236 : : default:;
23237 : : }
23238 : : return false;
23239 : : }
23240 : :
23241 : : bool
23242 : 1522 : gimple_simplify_CFN_BUILT_IN_FMINL (gimple_match_op *res_op, gimple_seq *seq,
23243 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23244 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23245 : : {
23246 : 1522 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23247 : 1522 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23248 : : {
23249 : 45 : {
23250 : 45 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23251 : 45 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINL))
23252 : 30 : return true;
23253 : : }
23254 : : }
23255 : 1492 : switch (TREE_CODE (_p1))
23256 : : {
23257 : 856 : case REAL_CST:
23258 : 856 : {
23259 : 856 : {
23260 : 856 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23261 : 856 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINL))
23262 : 38 : return true;
23263 : : }
23264 : 818 : break;
23265 : : }
23266 : 1454 : default:;
23267 : : }
23268 : 1454 : switch (TREE_CODE (_p0))
23269 : : {
23270 : 460 : case REAL_CST:
23271 : 460 : {
23272 : 460 : {
23273 : 460 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23274 : 460 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINL))
23275 : 60 : return true;
23276 : : }
23277 : 400 : break;
23278 : : }
23279 : 1394 : default:;
23280 : : }
23281 : 1394 : {
23282 : 1394 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23283 : 1394 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINL))
23284 : 23 : return true;
23285 : : }
23286 : 1371 : switch (TREE_CODE (_p0))
23287 : : {
23288 : 831 : case SSA_NAME:
23289 : 831 : if (gimple *_d1 = get_def (valueize, _p0))
23290 : : {
23291 : 488 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23292 : 295 : switch (gimple_assign_rhs_code (_a1))
23293 : : {
23294 : 40 : case NEGATE_EXPR:
23295 : 40 : {
23296 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
23297 : 40 : _q20 = do_valueize (valueize, _q20);
23298 : 40 : switch (TREE_CODE (_p1))
23299 : : {
23300 : 0 : case SSA_NAME:
23301 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23302 : : {
23303 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23304 : 0 : switch (gimple_assign_rhs_code (_a2))
23305 : : {
23306 : 0 : case NEGATE_EXPR:
23307 : 0 : {
23308 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23309 : 0 : _q40 = do_valueize (valueize, _q40);
23310 : 0 : {
23311 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23312 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23313 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23314 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23315 : : )
23316 : : {
23317 : 0 : gimple_seq *lseq = seq;
23318 : 0 : if (lseq
23319 : 0 : && (!single_use (captures[0])
23320 : 0 : || !single_use (captures[2])))
23321 : 0 : lseq = NULL;
23322 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2791;
23323 : 0 : {
23324 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23325 : 0 : {
23326 : 0 : tree _o1[2], _r1;
23327 : 0 : _o1[0] = captures[1];
23328 : 0 : _o1[1] = captures[3];
23329 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXL, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23330 : 0 : tem_op.resimplify (lseq, valueize);
23331 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23332 : 0 : if (!_r1) goto next_after_fail2791;
23333 : 0 : res_op->ops[0] = _r1;
23334 : : }
23335 : 0 : res_op->resimplify (lseq, valueize);
23336 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23337 : 0 : return true;
23338 : : }
23339 : 0 : next_after_fail2791:;
23340 : : }
23341 : : }
23342 : 0 : break;
23343 : : }
23344 : : default:;
23345 : : }
23346 : : }
23347 : : break;
23348 : : default:;
23349 : : }
23350 : : break;
23351 : : }
23352 : : default:;
23353 : : }
23354 : : }
23355 : : break;
23356 : : default:;
23357 : : }
23358 : : return false;
23359 : : }
23360 : :
23361 : : bool
23362 : 11 : gimple_simplify_CFN_BUILT_IN_FMINF16 (gimple_match_op *res_op, gimple_seq *seq,
23363 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23364 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23365 : : {
23366 : 11 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23367 : 11 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23368 : : {
23369 : 0 : {
23370 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23371 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF16))
23372 : 0 : return true;
23373 : : }
23374 : : }
23375 : 11 : switch (TREE_CODE (_p1))
23376 : : {
23377 : 0 : case REAL_CST:
23378 : 0 : {
23379 : 0 : {
23380 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23381 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF16))
23382 : 0 : return true;
23383 : : }
23384 : 0 : break;
23385 : : }
23386 : 11 : default:;
23387 : : }
23388 : 11 : switch (TREE_CODE (_p0))
23389 : : {
23390 : 0 : case REAL_CST:
23391 : 0 : {
23392 : 0 : {
23393 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23394 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF16))
23395 : 0 : return true;
23396 : : }
23397 : 0 : break;
23398 : : }
23399 : 11 : default:;
23400 : : }
23401 : 11 : {
23402 : 11 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23403 : 11 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF16))
23404 : 11 : return true;
23405 : : }
23406 : 0 : switch (TREE_CODE (_p0))
23407 : : {
23408 : 0 : case SSA_NAME:
23409 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23410 : : {
23411 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23412 : 0 : switch (gimple_assign_rhs_code (_a1))
23413 : : {
23414 : 0 : case NEGATE_EXPR:
23415 : 0 : {
23416 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23417 : 0 : _q20 = do_valueize (valueize, _q20);
23418 : 0 : switch (TREE_CODE (_p1))
23419 : : {
23420 : 0 : case SSA_NAME:
23421 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23422 : : {
23423 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23424 : 0 : switch (gimple_assign_rhs_code (_a2))
23425 : : {
23426 : 0 : case NEGATE_EXPR:
23427 : 0 : {
23428 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23429 : 0 : _q40 = do_valueize (valueize, _q40);
23430 : 0 : {
23431 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23432 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23433 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23434 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23435 : : )
23436 : : {
23437 : 0 : gimple_seq *lseq = seq;
23438 : 0 : if (lseq
23439 : 0 : && (!single_use (captures[0])
23440 : 0 : || !single_use (captures[2])))
23441 : 0 : lseq = NULL;
23442 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2792;
23443 : 0 : {
23444 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23445 : 0 : {
23446 : 0 : tree _o1[2], _r1;
23447 : 0 : _o1[0] = captures[1];
23448 : 0 : _o1[1] = captures[3];
23449 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF16, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23450 : 0 : tem_op.resimplify (lseq, valueize);
23451 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23452 : 0 : if (!_r1) goto next_after_fail2792;
23453 : 0 : res_op->ops[0] = _r1;
23454 : : }
23455 : 0 : res_op->resimplify (lseq, valueize);
23456 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23457 : 0 : return true;
23458 : : }
23459 : 0 : next_after_fail2792:;
23460 : : }
23461 : : }
23462 : 0 : break;
23463 : : }
23464 : : default:;
23465 : : }
23466 : : }
23467 : : break;
23468 : : default:;
23469 : : }
23470 : : break;
23471 : : }
23472 : : default:;
23473 : : }
23474 : : }
23475 : : break;
23476 : : default:;
23477 : : }
23478 : : return false;
23479 : : }
23480 : :
23481 : : bool
23482 : 0 : gimple_simplify_CFN_BUILT_IN_FMINF32 (gimple_match_op *res_op, gimple_seq *seq,
23483 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23484 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23485 : : {
23486 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23487 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23488 : : {
23489 : 0 : {
23490 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23491 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
23492 : 0 : return true;
23493 : : }
23494 : : }
23495 : 0 : switch (TREE_CODE (_p1))
23496 : : {
23497 : 0 : case REAL_CST:
23498 : 0 : {
23499 : 0 : {
23500 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23501 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
23502 : 0 : return true;
23503 : : }
23504 : 0 : break;
23505 : : }
23506 : 0 : default:;
23507 : : }
23508 : 0 : switch (TREE_CODE (_p0))
23509 : : {
23510 : 0 : case REAL_CST:
23511 : 0 : {
23512 : 0 : {
23513 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23514 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
23515 : 0 : return true;
23516 : : }
23517 : 0 : break;
23518 : : }
23519 : 0 : default:;
23520 : : }
23521 : 0 : {
23522 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23523 : 0 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
23524 : 0 : return true;
23525 : : }
23526 : 0 : switch (TREE_CODE (_p0))
23527 : : {
23528 : 0 : case SSA_NAME:
23529 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23530 : : {
23531 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23532 : 0 : switch (gimple_assign_rhs_code (_a1))
23533 : : {
23534 : 0 : case NEGATE_EXPR:
23535 : 0 : {
23536 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23537 : 0 : _q20 = do_valueize (valueize, _q20);
23538 : 0 : switch (TREE_CODE (_p1))
23539 : : {
23540 : 0 : case SSA_NAME:
23541 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23542 : : {
23543 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23544 : 0 : switch (gimple_assign_rhs_code (_a2))
23545 : : {
23546 : 0 : case NEGATE_EXPR:
23547 : 0 : {
23548 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23549 : 0 : _q40 = do_valueize (valueize, _q40);
23550 : 0 : {
23551 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23552 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23553 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23554 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23555 : : )
23556 : : {
23557 : 0 : gimple_seq *lseq = seq;
23558 : 0 : if (lseq
23559 : 0 : && (!single_use (captures[0])
23560 : 0 : || !single_use (captures[2])))
23561 : 0 : lseq = NULL;
23562 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2793;
23563 : 0 : {
23564 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23565 : 0 : {
23566 : 0 : tree _o1[2], _r1;
23567 : 0 : _o1[0] = captures[1];
23568 : 0 : _o1[1] = captures[3];
23569 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF32, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23570 : 0 : tem_op.resimplify (lseq, valueize);
23571 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23572 : 0 : if (!_r1) goto next_after_fail2793;
23573 : 0 : res_op->ops[0] = _r1;
23574 : : }
23575 : 0 : res_op->resimplify (lseq, valueize);
23576 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23577 : 0 : return true;
23578 : : }
23579 : 0 : next_after_fail2793:;
23580 : : }
23581 : : }
23582 : 0 : break;
23583 : : }
23584 : : default:;
23585 : : }
23586 : : }
23587 : : break;
23588 : : default:;
23589 : : }
23590 : : break;
23591 : : }
23592 : : default:;
23593 : : }
23594 : : }
23595 : : break;
23596 : : default:;
23597 : : }
23598 : : return false;
23599 : : }
23600 : :
23601 : : bool
23602 : 0 : gimple_simplify_CFN_BUILT_IN_FMINF64 (gimple_match_op *res_op, gimple_seq *seq,
23603 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23604 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23605 : : {
23606 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23607 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23608 : : {
23609 : 0 : {
23610 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23611 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64))
23612 : 0 : return true;
23613 : : }
23614 : : }
23615 : 0 : switch (TREE_CODE (_p1))
23616 : : {
23617 : 0 : case REAL_CST:
23618 : 0 : {
23619 : 0 : {
23620 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23621 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64))
23622 : 0 : return true;
23623 : : }
23624 : 0 : break;
23625 : : }
23626 : 0 : default:;
23627 : : }
23628 : 0 : switch (TREE_CODE (_p0))
23629 : : {
23630 : 0 : case REAL_CST:
23631 : 0 : {
23632 : 0 : {
23633 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23634 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64))
23635 : 0 : return true;
23636 : : }
23637 : 0 : break;
23638 : : }
23639 : 0 : default:;
23640 : : }
23641 : 0 : {
23642 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23643 : 0 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF64))
23644 : 0 : return true;
23645 : : }
23646 : 0 : switch (TREE_CODE (_p0))
23647 : : {
23648 : 0 : case SSA_NAME:
23649 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23650 : : {
23651 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23652 : 0 : switch (gimple_assign_rhs_code (_a1))
23653 : : {
23654 : 0 : case NEGATE_EXPR:
23655 : 0 : {
23656 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23657 : 0 : _q20 = do_valueize (valueize, _q20);
23658 : 0 : switch (TREE_CODE (_p1))
23659 : : {
23660 : 0 : case SSA_NAME:
23661 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23662 : : {
23663 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23664 : 0 : switch (gimple_assign_rhs_code (_a2))
23665 : : {
23666 : 0 : case NEGATE_EXPR:
23667 : 0 : {
23668 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23669 : 0 : _q40 = do_valueize (valueize, _q40);
23670 : 0 : {
23671 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23672 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23673 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23674 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23675 : : )
23676 : : {
23677 : 0 : gimple_seq *lseq = seq;
23678 : 0 : if (lseq
23679 : 0 : && (!single_use (captures[0])
23680 : 0 : || !single_use (captures[2])))
23681 : 0 : lseq = NULL;
23682 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2794;
23683 : 0 : {
23684 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23685 : 0 : {
23686 : 0 : tree _o1[2], _r1;
23687 : 0 : _o1[0] = captures[1];
23688 : 0 : _o1[1] = captures[3];
23689 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF64, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23690 : 0 : tem_op.resimplify (lseq, valueize);
23691 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23692 : 0 : if (!_r1) goto next_after_fail2794;
23693 : 0 : res_op->ops[0] = _r1;
23694 : : }
23695 : 0 : res_op->resimplify (lseq, valueize);
23696 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23697 : 0 : return true;
23698 : : }
23699 : 0 : next_after_fail2794:;
23700 : : }
23701 : : }
23702 : 0 : break;
23703 : : }
23704 : : default:;
23705 : : }
23706 : : }
23707 : : break;
23708 : : default:;
23709 : : }
23710 : : break;
23711 : : }
23712 : : default:;
23713 : : }
23714 : : }
23715 : : break;
23716 : : default:;
23717 : : }
23718 : : return false;
23719 : : }
23720 : :
23721 : : bool
23722 : 0 : gimple_simplify_CFN_BUILT_IN_FMINF32X (gimple_match_op *res_op, gimple_seq *seq,
23723 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23724 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23725 : : {
23726 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23727 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23728 : : {
23729 : 0 : {
23730 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23731 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
23732 : 0 : return true;
23733 : : }
23734 : : }
23735 : 0 : switch (TREE_CODE (_p1))
23736 : : {
23737 : 0 : case REAL_CST:
23738 : 0 : {
23739 : 0 : {
23740 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23741 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
23742 : 0 : return true;
23743 : : }
23744 : 0 : break;
23745 : : }
23746 : 0 : default:;
23747 : : }
23748 : 0 : switch (TREE_CODE (_p0))
23749 : : {
23750 : 0 : case REAL_CST:
23751 : 0 : {
23752 : 0 : {
23753 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23754 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
23755 : 0 : return true;
23756 : : }
23757 : 0 : break;
23758 : : }
23759 : 0 : default:;
23760 : : }
23761 : 0 : {
23762 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23763 : 0 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
23764 : 0 : return true;
23765 : : }
23766 : 0 : switch (TREE_CODE (_p0))
23767 : : {
23768 : 0 : case SSA_NAME:
23769 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23770 : : {
23771 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23772 : 0 : switch (gimple_assign_rhs_code (_a1))
23773 : : {
23774 : 0 : case NEGATE_EXPR:
23775 : 0 : {
23776 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23777 : 0 : _q20 = do_valueize (valueize, _q20);
23778 : 0 : switch (TREE_CODE (_p1))
23779 : : {
23780 : 0 : case SSA_NAME:
23781 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23782 : : {
23783 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23784 : 0 : switch (gimple_assign_rhs_code (_a2))
23785 : : {
23786 : 0 : case NEGATE_EXPR:
23787 : 0 : {
23788 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23789 : 0 : _q40 = do_valueize (valueize, _q40);
23790 : 0 : {
23791 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23792 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23793 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23794 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23795 : : )
23796 : : {
23797 : 0 : gimple_seq *lseq = seq;
23798 : 0 : if (lseq
23799 : 0 : && (!single_use (captures[0])
23800 : 0 : || !single_use (captures[2])))
23801 : 0 : lseq = NULL;
23802 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2796;
23803 : 0 : {
23804 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23805 : 0 : {
23806 : 0 : tree _o1[2], _r1;
23807 : 0 : _o1[0] = captures[1];
23808 : 0 : _o1[1] = captures[3];
23809 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF32X, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23810 : 0 : tem_op.resimplify (lseq, valueize);
23811 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23812 : 0 : if (!_r1) goto next_after_fail2796;
23813 : 0 : res_op->ops[0] = _r1;
23814 : : }
23815 : 0 : res_op->resimplify (lseq, valueize);
23816 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23817 : 0 : return true;
23818 : : }
23819 : 0 : next_after_fail2796:;
23820 : : }
23821 : : }
23822 : 0 : break;
23823 : : }
23824 : : default:;
23825 : : }
23826 : : }
23827 : : break;
23828 : : default:;
23829 : : }
23830 : : break;
23831 : : }
23832 : : default:;
23833 : : }
23834 : : }
23835 : : break;
23836 : : default:;
23837 : : }
23838 : : return false;
23839 : : }
23840 : :
23841 : : bool
23842 : 0 : gimple_simplify_CFN_BUILT_IN_FMINF128X (gimple_match_op *res_op, gimple_seq *seq,
23843 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23844 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23845 : : {
23846 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23847 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23848 : : {
23849 : 0 : {
23850 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23851 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF128X))
23852 : 0 : return true;
23853 : : }
23854 : : }
23855 : 0 : switch (TREE_CODE (_p1))
23856 : : {
23857 : 0 : case REAL_CST:
23858 : 0 : {
23859 : 0 : {
23860 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23861 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF128X))
23862 : 0 : return true;
23863 : : }
23864 : 0 : break;
23865 : : }
23866 : 0 : default:;
23867 : : }
23868 : 0 : switch (TREE_CODE (_p0))
23869 : : {
23870 : 0 : case REAL_CST:
23871 : 0 : {
23872 : 0 : {
23873 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23874 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF128X))
23875 : 0 : return true;
23876 : : }
23877 : 0 : break;
23878 : : }
23879 : 0 : default:;
23880 : : }
23881 : 0 : {
23882 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23883 : 0 : if (gimple_simplify_629 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF128X))
23884 : 0 : return true;
23885 : : }
23886 : 0 : switch (TREE_CODE (_p0))
23887 : : {
23888 : 0 : case SSA_NAME:
23889 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
23890 : : {
23891 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
23892 : 0 : switch (gimple_assign_rhs_code (_a1))
23893 : : {
23894 : 0 : case NEGATE_EXPR:
23895 : 0 : {
23896 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
23897 : 0 : _q20 = do_valueize (valueize, _q20);
23898 : 0 : switch (TREE_CODE (_p1))
23899 : : {
23900 : 0 : case SSA_NAME:
23901 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
23902 : : {
23903 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
23904 : 0 : switch (gimple_assign_rhs_code (_a2))
23905 : : {
23906 : 0 : case NEGATE_EXPR:
23907 : 0 : {
23908 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
23909 : 0 : _q40 = do_valueize (valueize, _q40);
23910 : 0 : {
23911 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
23912 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
23913 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
23914 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
23915 : : )
23916 : : {
23917 : 0 : gimple_seq *lseq = seq;
23918 : 0 : if (lseq
23919 : 0 : && (!single_use (captures[0])
23920 : 0 : || !single_use (captures[2])))
23921 : 0 : lseq = NULL;
23922 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2798;
23923 : 0 : {
23924 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
23925 : 0 : {
23926 : 0 : tree _o1[2], _r1;
23927 : 0 : _o1[0] = captures[1];
23928 : 0 : _o1[1] = captures[3];
23929 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF128X, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
23930 : 0 : tem_op.resimplify (lseq, valueize);
23931 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
23932 : 0 : if (!_r1) goto next_after_fail2798;
23933 : 0 : res_op->ops[0] = _r1;
23934 : : }
23935 : 0 : res_op->resimplify (lseq, valueize);
23936 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
23937 : 0 : return true;
23938 : : }
23939 : 0 : next_after_fail2798:;
23940 : : }
23941 : : }
23942 : 0 : break;
23943 : : }
23944 : : default:;
23945 : : }
23946 : : }
23947 : : break;
23948 : : default:;
23949 : : }
23950 : : break;
23951 : : }
23952 : : default:;
23953 : : }
23954 : : }
23955 : : break;
23956 : : default:;
23957 : : }
23958 : : return false;
23959 : : }
23960 : :
23961 : : bool
23962 : 1722 : gimple_simplify_CFN_BUILT_IN_FMAXL (gimple_match_op *res_op, gimple_seq *seq,
23963 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
23964 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
23965 : : {
23966 : 1722 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
23967 : 1722 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
23968 : : {
23969 : 43 : {
23970 : 43 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
23971 : 43 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
23972 : 28 : return true;
23973 : : }
23974 : : }
23975 : 1694 : switch (TREE_CODE (_p1))
23976 : : {
23977 : 856 : case REAL_CST:
23978 : 856 : {
23979 : 856 : {
23980 : 856 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
23981 : 856 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
23982 : 38 : return true;
23983 : : }
23984 : 818 : break;
23985 : : }
23986 : 1656 : default:;
23987 : : }
23988 : 1656 : switch (TREE_CODE (_p0))
23989 : : {
23990 : 460 : case REAL_CST:
23991 : 460 : {
23992 : 460 : {
23993 : 460 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
23994 : 460 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
23995 : 60 : return true;
23996 : : }
23997 : 400 : break;
23998 : : }
23999 : 1596 : default:;
24000 : : }
24001 : 1596 : {
24002 : 1596 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24003 : 1596 : if (gimple_simplify_630 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
24004 : 29 : return true;
24005 : : }
24006 : 1567 : switch (TREE_CODE (_p0))
24007 : : {
24008 : 1018 : case SSA_NAME:
24009 : 1018 : if (gimple *_d1 = get_def (valueize, _p0))
24010 : : {
24011 : 587 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24012 : 311 : switch (gimple_assign_rhs_code (_a1))
24013 : : {
24014 : 40 : case NEGATE_EXPR:
24015 : 40 : {
24016 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
24017 : 40 : _q20 = do_valueize (valueize, _q20);
24018 : 40 : switch (TREE_CODE (_p1))
24019 : : {
24020 : 0 : case SSA_NAME:
24021 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
24022 : : {
24023 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24024 : 0 : switch (gimple_assign_rhs_code (_a2))
24025 : : {
24026 : 0 : case NEGATE_EXPR:
24027 : 0 : {
24028 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
24029 : 0 : _q40 = do_valueize (valueize, _q40);
24030 : 0 : {
24031 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
24032 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
24033 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
24034 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
24035 : : )
24036 : : {
24037 : 0 : gimple_seq *lseq = seq;
24038 : 0 : if (lseq
24039 : 0 : && (!single_use (captures[0])
24040 : 0 : || !single_use (captures[2])))
24041 : 0 : lseq = NULL;
24042 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2802;
24043 : 0 : {
24044 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
24045 : 0 : {
24046 : 0 : tree _o1[2], _r1;
24047 : 0 : _o1[0] = captures[1];
24048 : 0 : _o1[1] = captures[3];
24049 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMINL, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
24050 : 0 : tem_op.resimplify (lseq, valueize);
24051 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
24052 : 0 : if (!_r1) goto next_after_fail2802;
24053 : 0 : res_op->ops[0] = _r1;
24054 : : }
24055 : 0 : res_op->resimplify (lseq, valueize);
24056 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
24057 : 0 : return true;
24058 : : }
24059 : 0 : next_after_fail2802:;
24060 : : }
24061 : : }
24062 : 0 : break;
24063 : : }
24064 : : default:;
24065 : : }
24066 : : }
24067 : : break;
24068 : : default:;
24069 : : }
24070 : : break;
24071 : : }
24072 : : default:;
24073 : : }
24074 : : }
24075 : : break;
24076 : : default:;
24077 : : }
24078 : : return false;
24079 : : }
24080 : :
24081 : : bool
24082 : 42 : gimple_simplify_CFN_BUILT_IN_FMAXF128 (gimple_match_op *res_op, gimple_seq *seq,
24083 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24084 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24085 : : {
24086 : 42 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24087 : 42 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
24088 : : {
24089 : 0 : {
24090 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
24091 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128))
24092 : 0 : return true;
24093 : : }
24094 : : }
24095 : 42 : switch (TREE_CODE (_p1))
24096 : : {
24097 : 0 : case REAL_CST:
24098 : 0 : {
24099 : 0 : {
24100 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24101 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128))
24102 : 0 : return true;
24103 : : }
24104 : 0 : break;
24105 : : }
24106 : 42 : default:;
24107 : : }
24108 : 42 : switch (TREE_CODE (_p0))
24109 : : {
24110 : 0 : case REAL_CST:
24111 : 0 : {
24112 : 0 : {
24113 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
24114 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128))
24115 : 0 : return true;
24116 : : }
24117 : 0 : break;
24118 : : }
24119 : 42 : default:;
24120 : : }
24121 : 42 : {
24122 : 42 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24123 : 42 : if (gimple_simplify_630 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128))
24124 : 0 : return true;
24125 : : }
24126 : 42 : switch (TREE_CODE (_p0))
24127 : : {
24128 : 40 : case SSA_NAME:
24129 : 40 : if (gimple *_d1 = get_def (valueize, _p0))
24130 : : {
24131 : 28 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24132 : 44 : switch (gimple_assign_rhs_code (_a1))
24133 : : {
24134 : 0 : case NEGATE_EXPR:
24135 : 0 : {
24136 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24137 : 0 : _q20 = do_valueize (valueize, _q20);
24138 : 0 : switch (TREE_CODE (_p1))
24139 : : {
24140 : 0 : case SSA_NAME:
24141 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
24142 : : {
24143 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24144 : 0 : switch (gimple_assign_rhs_code (_a2))
24145 : : {
24146 : 0 : case NEGATE_EXPR:
24147 : 0 : {
24148 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
24149 : 0 : _q40 = do_valueize (valueize, _q40);
24150 : 0 : {
24151 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
24152 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
24153 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
24154 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
24155 : : )
24156 : : {
24157 : 0 : gimple_seq *lseq = seq;
24158 : 0 : if (lseq
24159 : 0 : && (!single_use (captures[0])
24160 : 0 : || !single_use (captures[2])))
24161 : 0 : lseq = NULL;
24162 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2806;
24163 : 0 : {
24164 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
24165 : 0 : {
24166 : 0 : tree _o1[2], _r1;
24167 : 0 : _o1[0] = captures[1];
24168 : 0 : _o1[1] = captures[3];
24169 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMINF128, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
24170 : 0 : tem_op.resimplify (lseq, valueize);
24171 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
24172 : 0 : if (!_r1) goto next_after_fail2806;
24173 : 0 : res_op->ops[0] = _r1;
24174 : : }
24175 : 0 : res_op->resimplify (lseq, valueize);
24176 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
24177 : 0 : return true;
24178 : : }
24179 : 0 : next_after_fail2806:;
24180 : : }
24181 : : }
24182 : 0 : break;
24183 : : }
24184 : : default:;
24185 : : }
24186 : : }
24187 : : break;
24188 : : default:;
24189 : : }
24190 : : break;
24191 : : }
24192 : : default:;
24193 : : }
24194 : : }
24195 : : break;
24196 : : default:;
24197 : : }
24198 : : return false;
24199 : : }
24200 : :
24201 : : bool
24202 : 0 : gimple_simplify_CFN_FMAX (gimple_match_op *res_op, gimple_seq *seq,
24203 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24204 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24205 : : {
24206 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24207 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
24208 : : {
24209 : 0 : {
24210 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
24211 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures, CFN_FMAX))
24212 : 0 : return true;
24213 : : }
24214 : : }
24215 : 0 : switch (TREE_CODE (_p1))
24216 : : {
24217 : 0 : case REAL_CST:
24218 : 0 : {
24219 : 0 : {
24220 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24221 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_FMAX))
24222 : 0 : return true;
24223 : : }
24224 : 0 : break;
24225 : : }
24226 : 0 : default:;
24227 : : }
24228 : 0 : switch (TREE_CODE (_p0))
24229 : : {
24230 : 0 : case REAL_CST:
24231 : 0 : {
24232 : 0 : {
24233 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
24234 : 0 : if (gimple_simplify_628 (res_op, seq, valueize, type, captures, CFN_FMAX))
24235 : 0 : return true;
24236 : : }
24237 : 0 : break;
24238 : : }
24239 : 0 : default:;
24240 : : }
24241 : 0 : {
24242 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24243 : 0 : if (gimple_simplify_630 (res_op, seq, valueize, type, captures, CFN_FMAX))
24244 : 0 : return true;
24245 : : }
24246 : 0 : switch (TREE_CODE (_p0))
24247 : : {
24248 : 0 : case SSA_NAME:
24249 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
24250 : : {
24251 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24252 : 0 : switch (gimple_assign_rhs_code (_a1))
24253 : : {
24254 : 0 : case NEGATE_EXPR:
24255 : 0 : {
24256 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24257 : 0 : _q20 = do_valueize (valueize, _q20);
24258 : 0 : switch (TREE_CODE (_p1))
24259 : : {
24260 : 0 : case SSA_NAME:
24261 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
24262 : : {
24263 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24264 : 0 : switch (gimple_assign_rhs_code (_a2))
24265 : : {
24266 : 0 : case NEGATE_EXPR:
24267 : 0 : {
24268 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
24269 : 0 : _q40 = do_valueize (valueize, _q40);
24270 : 0 : {
24271 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
24272 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
24273 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
24274 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
24275 : : )
24276 : : {
24277 : 0 : gimple_seq *lseq = seq;
24278 : 0 : if (lseq
24279 : 0 : && (!single_use (captures[0])
24280 : 0 : || !single_use (captures[2])))
24281 : 0 : lseq = NULL;
24282 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2810;
24283 : 0 : {
24284 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
24285 : 0 : {
24286 : 0 : tree _o1[2], _r1;
24287 : 0 : _o1[0] = captures[1];
24288 : 0 : _o1[1] = captures[3];
24289 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_FMIN, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
24290 : 0 : tem_op.resimplify (lseq, valueize);
24291 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
24292 : 0 : if (!_r1) goto next_after_fail2810;
24293 : 0 : res_op->ops[0] = _r1;
24294 : : }
24295 : 0 : res_op->resimplify (lseq, valueize);
24296 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1219, __FILE__, __LINE__, true);
24297 : 0 : return true;
24298 : : }
24299 : 0 : next_after_fail2810:;
24300 : : }
24301 : : }
24302 : 0 : break;
24303 : : }
24304 : : default:;
24305 : : }
24306 : : }
24307 : : break;
24308 : : default:;
24309 : : }
24310 : : break;
24311 : : }
24312 : : default:;
24313 : : }
24314 : : }
24315 : : break;
24316 : : default:;
24317 : : }
24318 : : return false;
24319 : : }
24320 : :
24321 : : bool
24322 : 119950 : gimple_simplify_ORDERED_EXPR (gimple_match_op *res_op, gimple_seq *seq,
24323 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24324 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24325 : : {
24326 : 119950 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24327 : 119950 : switch (TREE_CODE (_p0))
24328 : : {
24329 : 111399 : case SSA_NAME:
24330 : 111399 : if (gimple *_d1 = get_def (valueize, _p0))
24331 : : {
24332 : 43492 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24333 : 45495 : switch (gimple_assign_rhs_code (_a1))
24334 : : {
24335 : 0 : case VEC_COND_EXPR:
24336 : 0 : {
24337 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24338 : 0 : _q20 = do_valueize (valueize, _q20);
24339 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
24340 : 0 : _q21 = do_valueize (valueize, _q21);
24341 : 0 : tree _q22 = gimple_assign_rhs3 (_a1);
24342 : 0 : _q22 = do_valueize (valueize, _q22);
24343 : 0 : switch (TREE_CODE (_p1))
24344 : : {
24345 : 0 : case SSA_NAME:
24346 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
24347 : : {
24348 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24349 : 0 : switch (gimple_assign_rhs_code (_a2))
24350 : : {
24351 : 0 : case VEC_COND_EXPR:
24352 : 0 : {
24353 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
24354 : 0 : _q60 = do_valueize (valueize, _q60);
24355 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
24356 : 0 : _q61 = do_valueize (valueize, _q61);
24357 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
24358 : 0 : _q62 = do_valueize (valueize, _q62);
24359 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
24360 : : {
24361 : 0 : {
24362 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
24363 : 0 : if (VECTOR_TYPE_P (type)
24364 : 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
24365 : 0 : || types_match (type, TREE_TYPE (captures[2]))
24366 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
24367 : : || (optimize_vectors_before_lowering_p ()
24368 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
24369 : : )
24370 : : {
24371 : 0 : gimple_seq *lseq = seq;
24372 : 0 : if (lseq
24373 : 0 : && (!single_use (captures[0])
24374 : 0 : || !single_use (captures[4])))
24375 : 0 : lseq = NULL;
24376 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2818;
24377 : 0 : {
24378 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
24379 : 0 : res_op->ops[0] = captures[1];
24380 : 0 : {
24381 : 0 : tree _o1[2], _r1;
24382 : 0 : _o1[0] = captures[2];
24383 : 0 : _o1[1] = captures[5];
24384 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
24385 : 0 : tem_op.resimplify (NULL, valueize);
24386 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24387 : 0 : if (!_r1) goto next_after_fail2818;
24388 : 0 : res_op->ops[1] = _r1;
24389 : : }
24390 : 0 : {
24391 : 0 : tree _o1[2], _r1;
24392 : 0 : _o1[0] = captures[3];
24393 : 0 : _o1[1] = captures[6];
24394 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
24395 : 0 : tem_op.resimplify (NULL, valueize);
24396 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24397 : 0 : if (!_r1) goto next_after_fail2818;
24398 : 0 : res_op->ops[2] = _r1;
24399 : : }
24400 : 0 : res_op->resimplify (lseq, valueize);
24401 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1060, __FILE__, __LINE__, true);
24402 : 0 : return true;
24403 : : }
24404 : 0 : next_after_fail2818:;
24405 : : }
24406 : : }
24407 : : }
24408 : : break;
24409 : : }
24410 : : default:;
24411 : : }
24412 : : }
24413 : : break;
24414 : 0 : default:;
24415 : : }
24416 : 0 : {
24417 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
24418 : 0 : if (VECTOR_TYPE_P (type)
24419 : 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
24420 : 0 : || types_match (type, TREE_TYPE (captures[2]))
24421 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]))
24422 : : || (optimize_vectors_before_lowering_p ()
24423 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[1]))))
24424 : : )
24425 : : {
24426 : 0 : gimple_seq *lseq = seq;
24427 : 0 : if (lseq
24428 : 0 : && (!single_use (captures[0])))
24429 : 0 : lseq = NULL;
24430 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2819;
24431 : 0 : {
24432 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
24433 : 0 : res_op->ops[0] = captures[1];
24434 : 0 : {
24435 : 0 : tree _o1[2], _r1;
24436 : 0 : _o1[0] = captures[2];
24437 : 0 : _o1[1] = captures[4];
24438 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
24439 : 0 : tem_op.resimplify (NULL, valueize);
24440 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24441 : 0 : if (!_r1) goto next_after_fail2819;
24442 : 0 : res_op->ops[1] = _r1;
24443 : : }
24444 : 0 : {
24445 : 0 : tree _o1[2], _r1;
24446 : 0 : _o1[0] = captures[3];
24447 : 0 : _o1[1] = captures[4];
24448 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
24449 : 0 : tem_op.resimplify (NULL, valueize);
24450 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24451 : 0 : if (!_r1) goto next_after_fail2819;
24452 : 0 : res_op->ops[2] = _r1;
24453 : : }
24454 : 0 : res_op->resimplify (lseq, valueize);
24455 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1062, __FILE__, __LINE__, true);
24456 : 0 : return true;
24457 : : }
24458 : 0 : next_after_fail2819:;
24459 : : }
24460 : : }
24461 : 0 : break;
24462 : : }
24463 : : default:;
24464 : : }
24465 : : }
24466 : : break;
24467 : 119950 : default:;
24468 : : }
24469 : 119950 : switch (TREE_CODE (_p1))
24470 : : {
24471 : 110572 : case SSA_NAME:
24472 : 110572 : if (gimple *_d1 = get_def (valueize, _p1))
24473 : : {
24474 : 43210 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24475 : 45344 : switch (gimple_assign_rhs_code (_a1))
24476 : : {
24477 : 0 : case VEC_COND_EXPR:
24478 : 0 : {
24479 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
24480 : 0 : _q30 = do_valueize (valueize, _q30);
24481 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
24482 : 0 : _q31 = do_valueize (valueize, _q31);
24483 : 0 : tree _q32 = gimple_assign_rhs3 (_a1);
24484 : 0 : _q32 = do_valueize (valueize, _q32);
24485 : 0 : {
24486 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
24487 : 0 : if (VECTOR_TYPE_P (type)
24488 : 0 : && (TREE_CODE_CLASS (ORDERED_EXPR) != tcc_comparison
24489 : 0 : || types_match (type, TREE_TYPE (captures[3]))
24490 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]))
24491 : : || (optimize_vectors_before_lowering_p ()
24492 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]), TREE_TYPE (captures[2]))))
24493 : : )
24494 : : {
24495 : 0 : gimple_seq *lseq = seq;
24496 : 0 : if (lseq
24497 : 0 : && (!single_use (captures[1])))
24498 : 0 : lseq = NULL;
24499 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2820;
24500 : 0 : {
24501 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
24502 : 0 : res_op->ops[0] = captures[2];
24503 : 0 : {
24504 : 0 : tree _o1[2], _r1;
24505 : 0 : _o1[0] = captures[0];
24506 : 0 : _o1[1] = captures[3];
24507 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
24508 : 0 : tem_op.resimplify (NULL, valueize);
24509 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24510 : 0 : if (!_r1) goto next_after_fail2820;
24511 : 0 : res_op->ops[1] = _r1;
24512 : : }
24513 : 0 : {
24514 : 0 : tree _o1[2], _r1;
24515 : 0 : _o1[0] = captures[0];
24516 : 0 : _o1[1] = captures[4];
24517 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ORDERED_EXPR, type, _o1[0], _o1[1]);
24518 : 0 : tem_op.resimplify (NULL, valueize);
24519 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
24520 : 0 : if (!_r1) goto next_after_fail2820;
24521 : 0 : res_op->ops[2] = _r1;
24522 : : }
24523 : 0 : res_op->resimplify (lseq, valueize);
24524 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1063, __FILE__, __LINE__, true);
24525 : 0 : return true;
24526 : : }
24527 : 0 : next_after_fail2820:;
24528 : : }
24529 : : }
24530 : 0 : break;
24531 : : }
24532 : : default:;
24533 : : }
24534 : : }
24535 : : break;
24536 : 119950 : default:;
24537 : : }
24538 : 119950 : switch (TREE_CODE (_p0))
24539 : : {
24540 : 111399 : case SSA_NAME:
24541 : 111399 : if (gimple *_d1 = get_def (valueize, _p0))
24542 : : {
24543 : 43492 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24544 : 45495 : switch (gimple_assign_rhs_code (_a1))
24545 : : {
24546 : 0 : case FLOAT_EXPR:
24547 : 0 : {
24548 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24549 : 0 : _q20 = do_valueize (valueize, _q20);
24550 : 0 : switch (TREE_CODE (_p1))
24551 : : {
24552 : 0 : case SSA_NAME:
24553 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
24554 : : {
24555 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24556 : 0 : switch (gimple_assign_rhs_code (_a2))
24557 : : {
24558 : 0 : case FLOAT_EXPR:
24559 : 0 : {
24560 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
24561 : 0 : _q40 = do_valueize (valueize, _q40);
24562 : 0 : {
24563 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
24564 : 0 : if (gimple_simplify_286 (res_op, seq, valueize, type, captures, ORDERED_EXPR, ORDERED_EXPR))
24565 : 0 : return true;
24566 : : }
24567 : 0 : break;
24568 : : }
24569 : : default:;
24570 : : }
24571 : : }
24572 : : break;
24573 : : default:;
24574 : : }
24575 : : break;
24576 : : }
24577 : 240 : case NEGATE_EXPR:
24578 : 240 : {
24579 : 240 : tree _q20 = gimple_assign_rhs1 (_a1);
24580 : 240 : _q20 = do_valueize (valueize, _q20);
24581 : 240 : switch (TREE_CODE (_p1))
24582 : : {
24583 : 240 : case SSA_NAME:
24584 : 240 : if (gimple *_d2 = get_def (valueize, _p1))
24585 : : {
24586 : 240 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
24587 : 240 : switch (gimple_assign_rhs_code (_a2))
24588 : : {
24589 : 240 : case NEGATE_EXPR:
24590 : 240 : {
24591 : 240 : tree _q40 = gimple_assign_rhs1 (_a2);
24592 : 240 : _q40 = do_valueize (valueize, _q40);
24593 : 240 : {
24594 : 240 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
24595 : 240 : if (gimple_simplify_289 (res_op, seq, valueize, type, captures, ORDERED_EXPR, ORDERED_EXPR))
24596 : 240 : return true;
24597 : : }
24598 : 0 : break;
24599 : : }
24600 : : default:;
24601 : : }
24602 : : }
24603 : : break;
24604 : 0 : default:;
24605 : : }
24606 : 0 : if (CONSTANT_CLASS_P (_p1))
24607 : : {
24608 : 0 : {
24609 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
24610 : 0 : if (gimple_simplify_290 (res_op, seq, valueize, type, captures, ORDERED_EXPR, ORDERED_EXPR))
24611 : 0 : return true;
24612 : : }
24613 : : }
24614 : : break;
24615 : : }
24616 : : default:;
24617 : : }
24618 : : }
24619 : : break;
24620 : 119710 : default:;
24621 : : }
24622 : 119710 : switch (TREE_CODE (_p1))
24623 : : {
24624 : 947 : case REAL_CST:
24625 : 947 : {
24626 : 947 : {
24627 : 947 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24628 : 947 : if (gimple_simplify_658 (res_op, seq, valueize, type, captures, ORDERED_EXPR))
24629 : 0 : return true;
24630 : : }
24631 : 947 : break;
24632 : : }
24633 : 119710 : default:;
24634 : : }
24635 : 119710 : {
24636 : 119710 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24637 : 119710 : if (tree_expr_nan_p (captures[0]) || tree_expr_nan_p (captures[1])
24638 : : )
24639 : : {
24640 : 0 : gimple_seq *lseq = seq;
24641 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2821;
24642 : 0 : {
24643 : 0 : tree tem;
24644 : 0 : tem = constant_boolean_node (false, type);
24645 : 0 : res_op->set_value (tem);
24646 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1228, __FILE__, __LINE__, true);
24647 : 0 : return true;
24648 : : }
24649 : 0 : next_after_fail2821:;
24650 : : }
24651 : : else
24652 : : {
24653 : 119710 : if (!tree_expr_maybe_nan_p (captures[0]) && !tree_expr_maybe_nan_p (captures[1])
24654 : : )
24655 : : {
24656 : 0 : gimple_seq *lseq = seq;
24657 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2822;
24658 : 0 : {
24659 : 0 : tree tem;
24660 : 0 : tem = constant_boolean_node (true, type);
24661 : 0 : res_op->set_value (tem);
24662 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1229, __FILE__, __LINE__, true);
24663 : 0 : return true;
24664 : : }
24665 : 0 : next_after_fail2822:;
24666 : : }
24667 : : }
24668 : : }
24669 : 119710 : return false;
24670 : : }
24671 : :
24672 : : bool
24673 : 291793 : gimple_simplify_CFN_SUB_OVERFLOW (gimple_match_op *res_op, gimple_seq *seq,
24674 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24675 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24676 : : {
24677 : 291793 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24678 : 291793 : switch (TREE_CODE (_p0))
24679 : : {
24680 : 171150 : case SSA_NAME:
24681 : 171150 : if (gimple *_d1 = get_def (valueize, _p0))
24682 : : {
24683 : 123607 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24684 : 7654 : switch (gimple_assign_rhs_code (_a1))
24685 : : {
24686 : 3332 : CASE_CONVERT:
24687 : 3332 : {
24688 : 3332 : tree _q20 = gimple_assign_rhs1 (_a1);
24689 : 3332 : _q20 = do_valueize (valueize, _q20);
24690 : 3332 : {
24691 : 3332 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
24692 : 3332 : if (gimple_simplify_661 (res_op, seq, valueize, type, captures, CFN_SUB_OVERFLOW))
24693 : 3327 : return true;
24694 : : }
24695 : 5 : break;
24696 : : }
24697 : : default:;
24698 : : }
24699 : : }
24700 : : break;
24701 : 288466 : default:;
24702 : : }
24703 : 288466 : switch (TREE_CODE (_p1))
24704 : : {
24705 : 165883 : case SSA_NAME:
24706 : 165883 : if (gimple *_d1 = get_def (valueize, _p1))
24707 : : {
24708 : 119550 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24709 : 5992 : switch (gimple_assign_rhs_code (_a1))
24710 : : {
24711 : 3515 : CASE_CONVERT:
24712 : 3515 : {
24713 : 3515 : tree _q30 = gimple_assign_rhs1 (_a1);
24714 : 3515 : _q30 = do_valueize (valueize, _q30);
24715 : 3515 : {
24716 : 3515 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
24717 : 3515 : if (gimple_simplify_662 (res_op, seq, valueize, type, captures, CFN_SUB_OVERFLOW))
24718 : 3361 : return true;
24719 : : }
24720 : 154 : break;
24721 : : }
24722 : : default:;
24723 : : }
24724 : : }
24725 : : break;
24726 : : default:;
24727 : : }
24728 : : return false;
24729 : : }
24730 : :
24731 : : bool
24732 : 0 : gimple_simplify_CFN_BUILT_IN_POWF64 (gimple_match_op *res_op, gimple_seq *seq,
24733 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24734 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24735 : : {
24736 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24737 : 0 : switch (TREE_CODE (_p0))
24738 : : {
24739 : 0 : case SSA_NAME:
24740 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
24741 : : {
24742 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24743 : 0 : switch (gimple_assign_rhs_code (_a1))
24744 : : {
24745 : 0 : case RDIV_EXPR:
24746 : 0 : {
24747 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24748 : 0 : _q20 = do_valueize (valueize, _q20);
24749 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
24750 : 0 : _q21 = do_valueize (valueize, _q21);
24751 : 0 : if (real_onep (_q20))
24752 : : {
24753 : 0 : {
24754 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
24755 : 0 : if (gimple_simplify_527 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF64))
24756 : 0 : return true;
24757 : : }
24758 : : }
24759 : : break;
24760 : : }
24761 : : default:;
24762 : : }
24763 : : }
24764 : : break;
24765 : 0 : default:;
24766 : : }
24767 : 0 : if (real_zerop (_p0))
24768 : : {
24769 : 0 : {
24770 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24771 : 0 : if (gimple_simplify_528 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF64))
24772 : 0 : return true;
24773 : : }
24774 : : }
24775 : : return false;
24776 : : }
24777 : :
24778 : : bool
24779 : 0 : gimple_simplify_CFN_BUILT_IN_POWF128X (gimple_match_op *res_op, gimple_seq *seq,
24780 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24781 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24782 : : {
24783 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24784 : 0 : switch (TREE_CODE (_p0))
24785 : : {
24786 : 0 : case SSA_NAME:
24787 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
24788 : : {
24789 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24790 : 0 : switch (gimple_assign_rhs_code (_a1))
24791 : : {
24792 : 0 : case RDIV_EXPR:
24793 : 0 : {
24794 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24795 : 0 : _q20 = do_valueize (valueize, _q20);
24796 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
24797 : 0 : _q21 = do_valueize (valueize, _q21);
24798 : 0 : if (real_onep (_q20))
24799 : : {
24800 : 0 : {
24801 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
24802 : 0 : if (gimple_simplify_527 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF128X))
24803 : 0 : return true;
24804 : : }
24805 : : }
24806 : : break;
24807 : : }
24808 : : default:;
24809 : : }
24810 : : }
24811 : : break;
24812 : 0 : default:;
24813 : : }
24814 : 0 : if (real_zerop (_p0))
24815 : : {
24816 : 0 : {
24817 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24818 : 0 : if (gimple_simplify_528 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF128X))
24819 : 0 : return true;
24820 : : }
24821 : : }
24822 : : return false;
24823 : : }
24824 : :
24825 : : bool
24826 : 0 : gimple_simplify_CFN_LDEXP (gimple_match_op *res_op, gimple_seq *seq,
24827 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24828 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24829 : : {
24830 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24831 : 0 : if (real_zerop (_p0))
24832 : : {
24833 : 0 : {
24834 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24835 : 0 : if (gimple_simplify_674 (res_op, seq, valueize, type, captures))
24836 : 0 : return true;
24837 : : }
24838 : : }
24839 : 0 : if (integer_zerop (_p1))
24840 : : {
24841 : 0 : {
24842 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24843 : 0 : if (gimple_simplify_675 (res_op, seq, valueize, type, captures))
24844 : 0 : return true;
24845 : : }
24846 : : }
24847 : 0 : switch (TREE_CODE (_p0))
24848 : : {
24849 : 0 : case REAL_CST:
24850 : 0 : {
24851 : 0 : {
24852 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24853 : 0 : if (!real_isfinite (TREE_REAL_CST_PTR (captures[0]))
24854 : : )
24855 : : {
24856 : 0 : gimple_seq *lseq = seq;
24857 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2845;
24858 : 0 : {
24859 : 0 : tree tem;
24860 : 0 : tem = captures[0];
24861 : 0 : res_op->set_value (tem);
24862 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1231, __FILE__, __LINE__, true);
24863 : 0 : return true;
24864 : : }
24865 : 0 : next_after_fail2845:;
24866 : : }
24867 : : }
24868 : 0 : break;
24869 : : }
24870 : : default:;
24871 : : }
24872 : : return false;
24873 : : }
24874 : :
24875 : : bool
24876 : 1068 : gimple_simplify_CFN_BUILT_IN_SCALBLNF (gimple_match_op *res_op, gimple_seq *seq,
24877 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24878 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24879 : : {
24880 : 1068 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24881 : 1068 : if (real_zerop (_p0))
24882 : : {
24883 : 28 : {
24884 : 28 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24885 : 28 : if (gimple_simplify_674 (res_op, seq, valueize, type, captures))
24886 : 28 : return true;
24887 : : }
24888 : : }
24889 : 1040 : if (integer_zerop (_p1))
24890 : : {
24891 : 7 : {
24892 : 7 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24893 : 7 : if (gimple_simplify_675 (res_op, seq, valueize, type, captures))
24894 : 7 : return true;
24895 : : }
24896 : : }
24897 : 1033 : switch (TREE_CODE (_p0))
24898 : : {
24899 : 832 : case REAL_CST:
24900 : 832 : {
24901 : 832 : {
24902 : 832 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
24903 : 832 : if (!real_isfinite (TREE_REAL_CST_PTR (captures[0]))
24904 : : )
24905 : : {
24906 : 56 : gimple_seq *lseq = seq;
24907 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2849;
24908 : 56 : {
24909 : 56 : tree tem;
24910 : 56 : tem = captures[0];
24911 : 56 : res_op->set_value (tem);
24912 : 56 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1231, __FILE__, __LINE__, true);
24913 : 56 : return true;
24914 : : }
24915 : 0 : next_after_fail2849:;
24916 : : }
24917 : : }
24918 : 776 : break;
24919 : : }
24920 : : default:;
24921 : : }
24922 : : return false;
24923 : : }
24924 : :
24925 : : bool
24926 : 0 : gimple_simplify_CFN_VEC_SHL_INSERT (gimple_match_op *res_op, gimple_seq *seq,
24927 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24928 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
24929 : : {
24930 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24931 : 0 : switch (TREE_CODE (_p0))
24932 : : {
24933 : 0 : case SSA_NAME:
24934 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
24935 : : {
24936 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24937 : 0 : switch (gimple_assign_rhs_code (_a1))
24938 : : {
24939 : 0 : case VEC_DUPLICATE_EXPR:
24940 : 0 : {
24941 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
24942 : 0 : _q20 = do_valueize (valueize, _q20);
24943 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
24944 : : {
24945 : 0 : {
24946 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
24947 : 0 : gimple_seq *lseq = seq;
24948 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2884;
24949 : 0 : {
24950 : 0 : tree tem;
24951 : 0 : tem = captures[0];
24952 : 0 : res_op->set_value (tem);
24953 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1232, __FILE__, __LINE__, true);
24954 : 0 : return true;
24955 : : }
24956 : 0 : next_after_fail2884:;
24957 : : }
24958 : : }
24959 : : break;
24960 : : }
24961 : : default:;
24962 : : }
24963 : : }
24964 : : break;
24965 : : default:;
24966 : : }
24967 : : return false;
24968 : : }
24969 : :
24970 : : bool
24971 : 197778 : gimple_simplify_VEC_COND_EXPR (gimple_match_op *res_op, gimple_seq *seq,
24972 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
24973 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
24974 : : {
24975 : 197778 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
24976 : 197778 : switch (TREE_CODE (_p0))
24977 : : {
24978 : 189615 : case SSA_NAME:
24979 : 189615 : if (gimple *_d1 = get_def (valueize, _p0))
24980 : : {
24981 : 162874 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
24982 : 162137 : switch (gimple_assign_rhs_code (_a1))
24983 : : {
24984 : 30 : case VEC_COND_EXPR:
24985 : 30 : {
24986 : 30 : tree _q20 = gimple_assign_rhs1 (_a1);
24987 : 30 : _q20 = do_valueize (valueize, _q20);
24988 : 30 : tree _q21 = gimple_assign_rhs2 (_a1);
24989 : 30 : _q21 = do_valueize (valueize, _q21);
24990 : 30 : tree _q22 = gimple_assign_rhs3 (_a1);
24991 : 30 : _q22 = do_valueize (valueize, _q22);
24992 : 30 : if (integer_zerop (_q22))
24993 : : {
24994 : 0 : {
24995 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _p2 };
24996 : 0 : if (optimize_vectors_before_lowering_p () && types_match (captures[1], captures[2])
24997 : : )
24998 : : {
24999 : 0 : gimple_seq *lseq = seq;
25000 : 0 : if (lseq
25001 : 0 : && (!single_use (captures[0])))
25002 : 0 : lseq = NULL;
25003 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2909;
25004 : 0 : {
25005 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
25006 : 0 : {
25007 : 0 : tree _o1[2], _r1;
25008 : 0 : _o1[0] = captures[1];
25009 : 0 : _o1[1] = captures[2];
25010 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25011 : 0 : tem_op.resimplify (lseq, valueize);
25012 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25013 : 0 : if (!_r1) goto next_after_fail2909;
25014 : 0 : res_op->ops[0] = _r1;
25015 : : }
25016 : 0 : res_op->ops[1] = captures[3];
25017 : 0 : res_op->ops[2] = captures[4];
25018 : 0 : res_op->resimplify (lseq, valueize);
25019 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1257, __FILE__, __LINE__, true);
25020 : 0 : return true;
25021 : : }
25022 : 0 : next_after_fail2909:;
25023 : : }
25024 : : }
25025 : : }
25026 : 30 : if (integer_all_onesp (_q21))
25027 : : {
25028 : 3 : {
25029 : 3 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q22, _p1, _p2 };
25030 : 6 : if (optimize_vectors_before_lowering_p () && types_match (captures[1], captures[2])
25031 : : )
25032 : : {
25033 : 3 : gimple_seq *lseq = seq;
25034 : 3 : if (lseq
25035 : 3 : && (!single_use (captures[0])))
25036 : 0 : lseq = NULL;
25037 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2910;
25038 : 3 : {
25039 : 3 : res_op->set_op (VEC_COND_EXPR, type, 3);
25040 : 3 : {
25041 : 3 : tree _o1[2], _r1;
25042 : 3 : _o1[0] = captures[1];
25043 : 3 : _o1[1] = captures[2];
25044 : 3 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25045 : 3 : tem_op.resimplify (lseq, valueize);
25046 : 3 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25047 : 3 : if (!_r1) goto next_after_fail2910;
25048 : 3 : res_op->ops[0] = _r1;
25049 : : }
25050 : 3 : res_op->ops[1] = captures[3];
25051 : 3 : res_op->ops[2] = captures[4];
25052 : 3 : res_op->resimplify (lseq, valueize);
25053 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1258, __FILE__, __LINE__, true);
25054 : 3 : return true;
25055 : : }
25056 : 0 : next_after_fail2910:;
25057 : : }
25058 : : }
25059 : : }
25060 : 27 : if (integer_zerop (_q21))
25061 : : {
25062 : 12 : {
25063 : 12 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q22, _p1, _p2 };
25064 : 24 : if (optimize_vectors_before_lowering_p () && types_match (captures[1], captures[2])
25065 : : )
25066 : : {
25067 : 12 : gimple_seq *lseq = seq;
25068 : 12 : if (lseq
25069 : 12 : && (!single_use (captures[0])))
25070 : 0 : lseq = NULL;
25071 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2911;
25072 : 12 : {
25073 : 12 : res_op->set_op (VEC_COND_EXPR, type, 3);
25074 : 12 : {
25075 : 12 : tree _o1[2], _r1;
25076 : 12 : _o1[0] = captures[1];
25077 : 12 : {
25078 : 12 : tree _o2[1], _r2;
25079 : 12 : _o2[0] = captures[2];
25080 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
25081 : 12 : tem_op.resimplify (lseq, valueize);
25082 : 12 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
25083 : 12 : if (!_r2) goto next_after_fail2911;
25084 : 12 : _o1[1] = _r2;
25085 : : }
25086 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25087 : 12 : tem_op.resimplify (lseq, valueize);
25088 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25089 : 12 : if (!_r1) goto next_after_fail2911;
25090 : 12 : res_op->ops[0] = _r1;
25091 : : }
25092 : 12 : res_op->ops[1] = captures[4];
25093 : 12 : res_op->ops[2] = captures[3];
25094 : 12 : res_op->resimplify (lseq, valueize);
25095 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1259, __FILE__, __LINE__, true);
25096 : 12 : return true;
25097 : : }
25098 : 0 : next_after_fail2911:;
25099 : : }
25100 : : }
25101 : : }
25102 : 15 : if (integer_all_onesp (_q22))
25103 : : {
25104 : 15 : {
25105 : 15 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _p2 };
25106 : 30 : if (optimize_vectors_before_lowering_p () && types_match (captures[1], captures[2])
25107 : : )
25108 : : {
25109 : 15 : gimple_seq *lseq = seq;
25110 : 15 : if (lseq
25111 : 9 : && (!single_use (captures[0])))
25112 : 6 : lseq = NULL;
25113 : 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2912;
25114 : 15 : {
25115 : 15 : res_op->set_op (VEC_COND_EXPR, type, 3);
25116 : 15 : {
25117 : 15 : tree _o1[2], _r1;
25118 : 15 : _o1[0] = captures[1];
25119 : 15 : {
25120 : 15 : tree _o2[1], _r2;
25121 : 15 : _o2[0] = captures[2];
25122 : 15 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
25123 : 15 : tem_op.resimplify (lseq, valueize);
25124 : 15 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
25125 : 15 : if (!_r2) goto next_after_fail2912;
25126 : 15 : _o1[1] = _r2;
25127 : : }
25128 : 15 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25129 : 15 : tem_op.resimplify (lseq, valueize);
25130 : 15 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25131 : 15 : if (!_r1) goto next_after_fail2912;
25132 : 9 : res_op->ops[0] = _r1;
25133 : : }
25134 : 9 : res_op->ops[1] = captures[4];
25135 : 9 : res_op->ops[2] = captures[3];
25136 : 9 : res_op->resimplify (lseq, valueize);
25137 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1260, __FILE__, __LINE__, true);
25138 : 9 : return true;
25139 : : }
25140 : 6 : next_after_fail2912:;
25141 : : }
25142 : : }
25143 : : }
25144 : : break;
25145 : : }
25146 : 23113 : case LT_EXPR:
25147 : 23113 : {
25148 : 23113 : tree _q20 = gimple_assign_rhs1 (_a1);
25149 : 23113 : _q20 = do_valueize (valueize, _q20);
25150 : 23113 : tree _q21 = gimple_assign_rhs2 (_a1);
25151 : 23113 : _q21 = do_valueize (valueize, _q21);
25152 : 23113 : switch (TREE_CODE (_q20))
25153 : : {
25154 : 23113 : case SSA_NAME:
25155 : 23113 : if (gimple *_d2 = get_def (valueize, _q20))
25156 : : {
25157 : 20564 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
25158 : 25444 : switch (gimple_assign_rhs_code (_a2))
25159 : : {
25160 : 3299 : case VIEW_CONVERT_EXPR:
25161 : 3299 : {
25162 : 3299 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a2), 0);
25163 : 3299 : if ((TREE_CODE (_q30) == SSA_NAME
25164 : 3299 : || is_gimple_min_invariant (_q30)))
25165 : : {
25166 : 3299 : _q30 = do_valueize (valueize, _q30);
25167 : 3299 : switch (TREE_CODE (_q30))
25168 : : {
25169 : 3299 : case SSA_NAME:
25170 : 3299 : if (gimple *_d3 = get_def (valueize, _q30))
25171 : : {
25172 : 3274 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
25173 : 1393 : switch (gimple_assign_rhs_code (_a3))
25174 : : {
25175 : 97 : case VEC_COND_EXPR:
25176 : 97 : {
25177 : 97 : tree _q40 = gimple_assign_rhs1 (_a3);
25178 : 97 : _q40 = do_valueize (valueize, _q40);
25179 : 97 : tree _q41 = gimple_assign_rhs2 (_a3);
25180 : 97 : _q41 = do_valueize (valueize, _q41);
25181 : 97 : tree _q42 = gimple_assign_rhs3 (_a3);
25182 : 97 : _q42 = do_valueize (valueize, _q42);
25183 : 97 : switch (TREE_CODE (_q40))
25184 : : {
25185 : 97 : case SSA_NAME:
25186 : 97 : if (gimple *_d4 = get_def (valueize, _q40))
25187 : : {
25188 : 97 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
25189 : 97 : switch (gimple_assign_rhs_code (_a4))
25190 : : {
25191 : 83 : case LT_EXPR:
25192 : 83 : {
25193 : 83 : tree _q50 = gimple_assign_rhs1 (_a4);
25194 : 83 : _q50 = do_valueize (valueize, _q50);
25195 : 83 : tree _q51 = gimple_assign_rhs2 (_a4);
25196 : 83 : _q51 = do_valueize (valueize, _q51);
25197 : 83 : if (integer_all_onesp (_q41))
25198 : : {
25199 : 2 : if (integer_zerop (_q42))
25200 : : {
25201 : 2 : if (integer_zerop (_q21))
25202 : : {
25203 : 2 : {
25204 : 2 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q50, _q51, _p1, _p2 };
25205 : 2 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, LT_EXPR))
25206 : 2 : return true;
25207 : : }
25208 : : }
25209 : : }
25210 : : }
25211 : : break;
25212 : : }
25213 : 0 : case LE_EXPR:
25214 : 0 : {
25215 : 0 : tree _q50 = gimple_assign_rhs1 (_a4);
25216 : 0 : _q50 = do_valueize (valueize, _q50);
25217 : 0 : tree _q51 = gimple_assign_rhs2 (_a4);
25218 : 0 : _q51 = do_valueize (valueize, _q51);
25219 : 0 : if (integer_all_onesp (_q41))
25220 : : {
25221 : 0 : if (integer_zerop (_q42))
25222 : : {
25223 : 0 : if (integer_zerop (_q21))
25224 : : {
25225 : 0 : {
25226 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q50, _q51, _p1, _p2 };
25227 : 0 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, LE_EXPR))
25228 : 0 : return true;
25229 : : }
25230 : : }
25231 : : }
25232 : : }
25233 : : break;
25234 : : }
25235 : 0 : case EQ_EXPR:
25236 : 0 : {
25237 : 0 : tree _q50 = gimple_assign_rhs1 (_a4);
25238 : 0 : _q50 = do_valueize (valueize, _q50);
25239 : 0 : tree _q51 = gimple_assign_rhs2 (_a4);
25240 : 0 : _q51 = do_valueize (valueize, _q51);
25241 : 0 : if (tree_swap_operands_p (_q50, _q51))
25242 : 0 : std::swap (_q50, _q51);
25243 : 0 : if (integer_all_onesp (_q41))
25244 : : {
25245 : 0 : if (integer_zerop (_q42))
25246 : : {
25247 : 0 : if (integer_zerop (_q21))
25248 : : {
25249 : 0 : {
25250 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q50, _q51, _p1, _p2 };
25251 : 0 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, EQ_EXPR))
25252 : 0 : return true;
25253 : : }
25254 : : }
25255 : : }
25256 : : }
25257 : 197391 : break;
25258 : : }
25259 : 0 : case NE_EXPR:
25260 : 0 : {
25261 : 0 : tree _q50 = gimple_assign_rhs1 (_a4);
25262 : 0 : _q50 = do_valueize (valueize, _q50);
25263 : 0 : tree _q51 = gimple_assign_rhs2 (_a4);
25264 : 0 : _q51 = do_valueize (valueize, _q51);
25265 : 0 : if (tree_swap_operands_p (_q50, _q51))
25266 : 0 : std::swap (_q50, _q51);
25267 : 0 : if (integer_all_onesp (_q41))
25268 : : {
25269 : 0 : if (integer_zerop (_q42))
25270 : : {
25271 : 0 : if (integer_zerop (_q21))
25272 : : {
25273 : 0 : {
25274 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q50, _q51, _p1, _p2 };
25275 : 0 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, NE_EXPR))
25276 : 0 : return true;
25277 : : }
25278 : : }
25279 : : }
25280 : : }
25281 : 197391 : break;
25282 : : }
25283 : 12 : case GE_EXPR:
25284 : 12 : {
25285 : 12 : tree _q50 = gimple_assign_rhs1 (_a4);
25286 : 12 : _q50 = do_valueize (valueize, _q50);
25287 : 12 : tree _q51 = gimple_assign_rhs2 (_a4);
25288 : 12 : _q51 = do_valueize (valueize, _q51);
25289 : 12 : if (integer_all_onesp (_q41))
25290 : : {
25291 : 12 : if (integer_zerop (_q42))
25292 : : {
25293 : 12 : if (integer_zerop (_q21))
25294 : : {
25295 : 12 : {
25296 : 12 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q50, _q51, _p1, _p2 };
25297 : 12 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, GE_EXPR))
25298 : 8 : return true;
25299 : : }
25300 : : }
25301 : : }
25302 : : }
25303 : : break;
25304 : : }
25305 : 2 : case GT_EXPR:
25306 : 2 : {
25307 : 2 : tree _q50 = gimple_assign_rhs1 (_a4);
25308 : 2 : _q50 = do_valueize (valueize, _q50);
25309 : 2 : tree _q51 = gimple_assign_rhs2 (_a4);
25310 : 2 : _q51 = do_valueize (valueize, _q51);
25311 : 2 : if (integer_all_onesp (_q41))
25312 : : {
25313 : 2 : if (integer_zerop (_q42))
25314 : : {
25315 : 2 : if (integer_zerop (_q21))
25316 : : {
25317 : 2 : {
25318 : 2 : tree captures[7] ATTRIBUTE_UNUSED = { _q20, _q30, _q40, _q50, _q51, _p1, _p2 };
25319 : 2 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, GT_EXPR))
25320 : 2 : return true;
25321 : : }
25322 : : }
25323 : : }
25324 : : }
25325 : : break;
25326 : : }
25327 : : default:;
25328 : : }
25329 : : }
25330 : : break;
25331 : : default:;
25332 : : }
25333 : : break;
25334 : : }
25335 : : default:;
25336 : : }
25337 : : }
25338 : : break;
25339 : : default:;
25340 : : }
25341 : : }
25342 : : break;
25343 : : }
25344 : : default:;
25345 : : }
25346 : : }
25347 : : break;
25348 : : default:;
25349 : : }
25350 : : break;
25351 : : }
25352 : : default:;
25353 : : }
25354 : : }
25355 : : break;
25356 : 8163 : case VECTOR_CST:
25357 : 8163 : {
25358 : 8163 : {
25359 : 8163 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
25360 : 8163 : if (integer_all_onesp (captures[0])
25361 : : )
25362 : : {
25363 : 141 : gimple_seq *lseq = seq;
25364 : 141 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2913;
25365 : 141 : {
25366 : 141 : tree tem;
25367 : 141 : tem = captures[1];
25368 : 141 : res_op->set_value (tem);
25369 : 141 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1261, __FILE__, __LINE__, true);
25370 : 141 : return true;
25371 : : }
25372 : 0 : next_after_fail2913:;
25373 : : }
25374 : : else
25375 : : {
25376 : 8022 : if (integer_zerop (captures[0])
25377 : : )
25378 : : {
25379 : 210 : gimple_seq *lseq = seq;
25380 : 210 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2914;
25381 : 210 : {
25382 : 210 : tree tem;
25383 : 210 : tem = captures[2];
25384 : 210 : res_op->set_value (tem);
25385 : 210 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1262, __FILE__, __LINE__, true);
25386 : 210 : return true;
25387 : : }
25388 : 0 : next_after_fail2914:;
25389 : : }
25390 : : }
25391 : : }
25392 : 7812 : break;
25393 : : }
25394 : 197391 : default:;
25395 : : }
25396 : 197391 : switch (TREE_CODE (_p1))
25397 : : {
25398 : 52665 : case SSA_NAME:
25399 : 52665 : if (gimple *_d1 = get_def (valueize, _p1))
25400 : : {
25401 : 46197 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25402 : 56489 : switch (gimple_assign_rhs_code (_a1))
25403 : : {
25404 : 3809 : case VEC_COND_EXPR:
25405 : 3809 : {
25406 : 3809 : tree _q30 = gimple_assign_rhs1 (_a1);
25407 : 3809 : _q30 = do_valueize (valueize, _q30);
25408 : 3809 : tree _q31 = gimple_assign_rhs2 (_a1);
25409 : 3809 : _q31 = do_valueize (valueize, _q31);
25410 : 3809 : tree _q32 = gimple_assign_rhs3 (_a1);
25411 : 3809 : _q32 = do_valueize (valueize, _q32);
25412 : 3809 : if ((_p2 == _q32 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q32, 0) && types_match (_p2, _q32)))
25413 : : {
25414 : 690 : {
25415 : 690 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
25416 : 929 : if (optimize_vectors_before_lowering_p () && types_match (captures[0], captures[2])
25417 : : )
25418 : : {
25419 : 239 : gimple_seq *lseq = seq;
25420 : 239 : if (lseq
25421 : 6 : && (!single_use (captures[1])))
25422 : 233 : lseq = NULL;
25423 : 239 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2915;
25424 : 239 : {
25425 : 239 : res_op->set_op (VEC_COND_EXPR, type, 3);
25426 : 239 : {
25427 : 239 : tree _o1[2], _r1;
25428 : 239 : _o1[0] = captures[0];
25429 : 239 : _o1[1] = captures[2];
25430 : 239 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25431 : 239 : tem_op.resimplify (lseq, valueize);
25432 : 239 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25433 : 239 : if (!_r1) goto next_after_fail2915;
25434 : 15 : res_op->ops[0] = _r1;
25435 : : }
25436 : 15 : res_op->ops[1] = captures[3];
25437 : 15 : res_op->ops[2] = captures[4];
25438 : 15 : res_op->resimplify (lseq, valueize);
25439 : 15 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1263, __FILE__, __LINE__, true);
25440 : 15 : return true;
25441 : : }
25442 : 675 : next_after_fail2915:;
25443 : : }
25444 : : }
25445 : : }
25446 : : break;
25447 : : }
25448 : : default:;
25449 : : }
25450 : : }
25451 : : break;
25452 : 197376 : default:;
25453 : : }
25454 : 197376 : switch (TREE_CODE (_p2))
25455 : : {
25456 : 45102 : case SSA_NAME:
25457 : 45102 : if (gimple *_d1 = get_def (valueize, _p2))
25458 : : {
25459 : 38937 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25460 : 40916 : switch (gimple_assign_rhs_code (_a1))
25461 : : {
25462 : 4453 : case VEC_COND_EXPR:
25463 : 4453 : {
25464 : 4453 : tree _q40 = gimple_assign_rhs1 (_a1);
25465 : 4453 : _q40 = do_valueize (valueize, _q40);
25466 : 4453 : tree _q41 = gimple_assign_rhs2 (_a1);
25467 : 4453 : _q41 = do_valueize (valueize, _q41);
25468 : 4453 : tree _q42 = gimple_assign_rhs3 (_a1);
25469 : 4453 : _q42 = do_valueize (valueize, _q42);
25470 : 4453 : if ((_q41 == _p1 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p1, 0) && types_match (_q41, _p1)))
25471 : : {
25472 : 655 : {
25473 : 655 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q42 };
25474 : 739 : if (optimize_vectors_before_lowering_p () && types_match (captures[0], captures[3])
25475 : : )
25476 : : {
25477 : 84 : gimple_seq *lseq = seq;
25478 : 84 : if (lseq
25479 : 23 : && (!single_use (captures[2])))
25480 : 69 : lseq = NULL;
25481 : 84 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2916;
25482 : 84 : {
25483 : 84 : res_op->set_op (VEC_COND_EXPR, type, 3);
25484 : 84 : {
25485 : 84 : tree _o1[2], _r1;
25486 : 84 : _o1[0] = captures[0];
25487 : 84 : _o1[1] = captures[3];
25488 : 84 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25489 : 84 : tem_op.resimplify (lseq, valueize);
25490 : 84 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25491 : 84 : if (!_r1) goto next_after_fail2916;
25492 : 16 : res_op->ops[0] = _r1;
25493 : : }
25494 : 16 : res_op->ops[1] = captures[1];
25495 : 16 : res_op->ops[2] = captures[4];
25496 : 16 : res_op->resimplify (lseq, valueize);
25497 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1264, __FILE__, __LINE__, true);
25498 : 16 : return true;
25499 : : }
25500 : 639 : next_after_fail2916:;
25501 : : }
25502 : : }
25503 : : }
25504 : : break;
25505 : : }
25506 : : default:;
25507 : : }
25508 : : }
25509 : : break;
25510 : 197360 : default:;
25511 : : }
25512 : 197360 : switch (TREE_CODE (_p1))
25513 : : {
25514 : 52641 : case SSA_NAME:
25515 : 52641 : if (gimple *_d1 = get_def (valueize, _p1))
25516 : : {
25517 : 46182 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25518 : 56474 : switch (gimple_assign_rhs_code (_a1))
25519 : : {
25520 : 3794 : case VEC_COND_EXPR:
25521 : 3794 : {
25522 : 3794 : tree _q30 = gimple_assign_rhs1 (_a1);
25523 : 3794 : _q30 = do_valueize (valueize, _q30);
25524 : 3794 : tree _q31 = gimple_assign_rhs2 (_a1);
25525 : 3794 : _q31 = do_valueize (valueize, _q31);
25526 : 3794 : tree _q32 = gimple_assign_rhs3 (_a1);
25527 : 3794 : _q32 = do_valueize (valueize, _q32);
25528 : 3794 : if ((_p2 == _q31 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q31, 0) && types_match (_p2, _q31)))
25529 : : {
25530 : 12 : {
25531 : 12 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
25532 : 24 : if (optimize_vectors_before_lowering_p () && types_match (captures[0], captures[2])
25533 : : )
25534 : : {
25535 : 12 : gimple_seq *lseq = seq;
25536 : 12 : if (lseq
25537 : 6 : && (!single_use (captures[1])))
25538 : 6 : lseq = NULL;
25539 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2917;
25540 : 12 : {
25541 : 12 : res_op->set_op (VEC_COND_EXPR, type, 3);
25542 : 12 : {
25543 : 12 : tree _o1[2], _r1;
25544 : 12 : {
25545 : 12 : tree _o2[1], _r2;
25546 : 12 : _o2[0] = captures[0];
25547 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
25548 : 12 : tem_op.resimplify (lseq, valueize);
25549 : 12 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
25550 : 12 : if (!_r2) goto next_after_fail2917;
25551 : 6 : _o1[0] = _r2;
25552 : : }
25553 : 6 : _o1[1] = captures[2];
25554 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25555 : 6 : tem_op.resimplify (lseq, valueize);
25556 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25557 : 6 : if (!_r1) goto next_after_fail2917;
25558 : 6 : res_op->ops[0] = _r1;
25559 : : }
25560 : 6 : res_op->ops[1] = captures[3];
25561 : 6 : res_op->ops[2] = captures[4];
25562 : 6 : res_op->resimplify (lseq, valueize);
25563 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1265, __FILE__, __LINE__, true);
25564 : 6 : return true;
25565 : : }
25566 : 6 : next_after_fail2917:;
25567 : : }
25568 : : }
25569 : : }
25570 : : break;
25571 : : }
25572 : : default:;
25573 : : }
25574 : : }
25575 : : break;
25576 : 197354 : default:;
25577 : : }
25578 : 197354 : switch (TREE_CODE (_p2))
25579 : : {
25580 : 45086 : case SSA_NAME:
25581 : 45086 : if (gimple *_d1 = get_def (valueize, _p2))
25582 : : {
25583 : 38921 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25584 : 40900 : switch (gimple_assign_rhs_code (_a1))
25585 : : {
25586 : 4437 : case VEC_COND_EXPR:
25587 : 4437 : {
25588 : 4437 : tree _q40 = gimple_assign_rhs1 (_a1);
25589 : 4437 : _q40 = do_valueize (valueize, _q40);
25590 : 4437 : tree _q41 = gimple_assign_rhs2 (_a1);
25591 : 4437 : _q41 = do_valueize (valueize, _q41);
25592 : 4437 : tree _q42 = gimple_assign_rhs3 (_a1);
25593 : 4437 : _q42 = do_valueize (valueize, _q42);
25594 : 4437 : if ((_q42 == _p1 && ! TREE_SIDE_EFFECTS (_q42)) || (operand_equal_p (_q42, _p1, 0) && types_match (_q42, _p1)))
25595 : : {
25596 : 0 : {
25597 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
25598 : 0 : if (optimize_vectors_before_lowering_p () && types_match (captures[0], captures[3])
25599 : : )
25600 : : {
25601 : 0 : gimple_seq *lseq = seq;
25602 : 0 : if (lseq
25603 : 0 : && (!single_use (captures[2])))
25604 : 0 : lseq = NULL;
25605 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2918;
25606 : 0 : {
25607 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
25608 : 0 : {
25609 : 0 : tree _o1[2], _r1;
25610 : 0 : {
25611 : 0 : tree _o2[1], _r2;
25612 : 0 : _o2[0] = captures[0];
25613 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
25614 : 0 : tem_op.resimplify (lseq, valueize);
25615 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
25616 : 0 : if (!_r2) goto next_after_fail2918;
25617 : 0 : _o1[0] = _r2;
25618 : : }
25619 : 0 : _o1[1] = captures[3];
25620 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
25621 : 0 : tem_op.resimplify (lseq, valueize);
25622 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
25623 : 0 : if (!_r1) goto next_after_fail2918;
25624 : 0 : res_op->ops[0] = _r1;
25625 : : }
25626 : 0 : res_op->ops[1] = captures[4];
25627 : 0 : res_op->ops[2] = captures[1];
25628 : 0 : res_op->resimplify (lseq, valueize);
25629 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1266, __FILE__, __LINE__, true);
25630 : 0 : return true;
25631 : : }
25632 : 0 : next_after_fail2918:;
25633 : : }
25634 : : }
25635 : : }
25636 : : break;
25637 : : }
25638 : : default:;
25639 : : }
25640 : : }
25641 : : break;
25642 : 197354 : default:;
25643 : : }
25644 : 197354 : switch (TREE_CODE (_p1))
25645 : : {
25646 : 144130 : case VECTOR_CST:
25647 : 144130 : {
25648 : 144130 : switch (TREE_CODE (_p2))
25649 : : {
25650 : 137358 : case VECTOR_CST:
25651 : 137358 : {
25652 : 137358 : {
25653 : 137358 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
25654 : 137358 : if (VECTOR_BOOLEAN_TYPE_P (type)
25655 : 137596 : && types_match (type, TREE_TYPE (captures[0]))
25656 : : )
25657 : : {
25658 : 238 : if (integer_zerop (captures[1]) && integer_all_onesp (captures[2])
25659 : : )
25660 : : {
25661 : 70 : gimple_seq *lseq = seq;
25662 : 70 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2919;
25663 : 70 : {
25664 : 70 : res_op->set_op (BIT_NOT_EXPR, type, 1);
25665 : 70 : res_op->ops[0] = captures[0];
25666 : 70 : res_op->resimplify (lseq, valueize);
25667 : 70 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1267, __FILE__, __LINE__, true);
25668 : 70 : return true;
25669 : : }
25670 : 0 : next_after_fail2919:;
25671 : : }
25672 : : else
25673 : : {
25674 : 168 : if (integer_all_onesp (captures[1]) && integer_zerop (captures[2])
25675 : : )
25676 : : {
25677 : 103 : gimple_seq *lseq = seq;
25678 : 103 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2920;
25679 : 103 : {
25680 : 103 : tree tem;
25681 : 103 : tem = captures[0];
25682 : 103 : res_op->set_value (tem);
25683 : 103 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1268, __FILE__, __LINE__, true);
25684 : 103 : return true;
25685 : : }
25686 : 0 : next_after_fail2920:;
25687 : : }
25688 : : }
25689 : : }
25690 : : }
25691 : 137185 : break;
25692 : : }
25693 : : default:;
25694 : : }
25695 : : break;
25696 : : }
25697 : 197181 : default:;
25698 : : }
25699 : 197181 : switch (TREE_CODE (_p0))
25700 : : {
25701 : 189369 : case SSA_NAME:
25702 : 189369 : if (gimple *_d1 = get_def (valueize, _p0))
25703 : : {
25704 : 162640 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
25705 : 161903 : switch (gimple_assign_rhs_code (_a1))
25706 : : {
25707 : 23095 : case LT_EXPR:
25708 : 23095 : {
25709 : 23095 : tree _q20 = gimple_assign_rhs1 (_a1);
25710 : 23095 : _q20 = do_valueize (valueize, _q20);
25711 : 23095 : tree _q21 = gimple_assign_rhs2 (_a1);
25712 : 23095 : _q21 = do_valueize (valueize, _q21);
25713 : 23095 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
25714 : : {
25715 : 5003 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
25716 : : {
25717 : 4680 : {
25718 : 4680 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25719 : 4680 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, LT_EXPR, MIN_EXPR, MIN_EXPR))
25720 : 56 : return true;
25721 : : }
25722 : : }
25723 : : }
25724 : 23039 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
25725 : : {
25726 : 1853 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
25727 : : {
25728 : 1745 : {
25729 : 1745 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25730 : 1745 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, LT_EXPR, MAX_EXPR, MAX_EXPR))
25731 : 2 : return true;
25732 : : }
25733 : : }
25734 : : }
25735 : 23037 : if (integer_zerop (_q21))
25736 : : {
25737 : 7056 : if (integer_all_onesp (_p1))
25738 : : {
25739 : 1345 : if (integer_zerop (_p2))
25740 : : {
25741 : 1290 : {
25742 : 1290 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
25743 : 2580 : if (VECTOR_INTEGER_TYPE_P (TREE_TYPE (captures[0]))
25744 : 1290 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
25745 : 1290 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
25746 : 2580 : && target_supports_op_p (TREE_TYPE (captures[0]), RSHIFT_EXPR, optab_scalar)
25747 : : )
25748 : : {
25749 : 1026 : {
25750 : 1026 : unsigned int prec = element_precision (TREE_TYPE (captures[0]));
25751 : 1026 : gimple_seq *lseq = seq;
25752 : 1026 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2921;
25753 : 1026 : {
25754 : 1026 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25755 : 1026 : {
25756 : 1026 : tree _o1[2], _r1;
25757 : 1026 : _o1[0] = captures[0];
25758 : 1026 : _o1[1] = build_int_cst (integer_type_node, prec - 1);
25759 : 1026 : (*res_op).set_op (RSHIFT_EXPR, TREE_TYPE (_o1[0]), 2);
25760 : 1026 : (*res_op).ops[0] = _o1[0];
25761 : 1026 : (*res_op).ops[1] = _o1[1];
25762 : 1026 : (*res_op).resimplify (lseq, valueize);
25763 : : }
25764 : 1026 : if (type != res_op->type
25765 : 1026 : && !useless_type_conversion_p (type, res_op->type))
25766 : : {
25767 : 420 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2921;
25768 : 114 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25769 : 114 : res_op->resimplify (lseq, valueize);
25770 : : }
25771 : 720 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1269, __FILE__, __LINE__, true);
25772 : 720 : return true;
25773 : : }
25774 : : next_after_fail2921:;
25775 : : }
25776 : : }
25777 : : }
25778 : : }
25779 : : }
25780 : 6336 : if (integer_onep (_p1))
25781 : : {
25782 : 653 : if (integer_zerop (_p2))
25783 : : {
25784 : 606 : {
25785 : 606 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
25786 : 1212 : if (VECTOR_INTEGER_TYPE_P (TREE_TYPE (captures[0]))
25787 : 606 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
25788 : 1212 : && tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
25789 : : )
25790 : : {
25791 : 606 : {
25792 : 606 : unsigned int prec = element_precision (TREE_TYPE (captures[0]));
25793 : 606 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
25794 : 606 : if (target_supports_op_p (utype, RSHIFT_EXPR, optab_scalar)
25795 : : )
25796 : : {
25797 : 579 : gimple_seq *lseq = seq;
25798 : 579 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2922;
25799 : 579 : {
25800 : 579 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25801 : 579 : {
25802 : 579 : tree _o1[2], _r1;
25803 : 579 : {
25804 : 579 : tree _o2[1], _r2;
25805 : 579 : _o2[0] = captures[0];
25806 : 579 : if (utype != TREE_TYPE (_o2[0]) /* XXX */
25807 : 579 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
25808 : : {
25809 : 579 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, utype, _o2[0]);
25810 : 579 : tem_op.resimplify (lseq, valueize);
25811 : 579 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
25812 : 579 : if (!_r2) goto next_after_fail2922;
25813 : : }
25814 : : else
25815 : : _r2 = _o2[0];
25816 : 207 : _o1[0] = _r2;
25817 : : }
25818 : 207 : _o1[1] = build_int_cst (integer_type_node, prec - 1);
25819 : 207 : (*res_op).set_op (RSHIFT_EXPR, TREE_TYPE (_o1[0]), 2);
25820 : 207 : (*res_op).ops[0] = _o1[0];
25821 : 207 : (*res_op).ops[1] = _o1[1];
25822 : 207 : (*res_op).resimplify (lseq, valueize);
25823 : : }
25824 : 207 : if (type != res_op->type
25825 : 207 : && !useless_type_conversion_p (type, res_op->type))
25826 : : {
25827 : 175 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2922;
25828 : 125 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
25829 : 125 : res_op->resimplify (lseq, valueize);
25830 : : }
25831 : 157 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1270, __FILE__, __LINE__, true);
25832 : 157 : return true;
25833 : : }
25834 : : next_after_fail2922:;
25835 : : }
25836 : : }
25837 : : }
25838 : : }
25839 : : }
25840 : : }
25841 : : }
25842 : : break;
25843 : : }
25844 : 9287 : case LE_EXPR:
25845 : 9287 : {
25846 : 9287 : tree _q20 = gimple_assign_rhs1 (_a1);
25847 : 9287 : _q20 = do_valueize (valueize, _q20);
25848 : 9287 : tree _q21 = gimple_assign_rhs2 (_a1);
25849 : 9287 : _q21 = do_valueize (valueize, _q21);
25850 : 9287 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
25851 : : {
25852 : 271 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
25853 : : {
25854 : 0 : {
25855 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25856 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, LE_EXPR, MIN_EXPR, MIN_EXPR))
25857 : 0 : return true;
25858 : : }
25859 : : }
25860 : : }
25861 : 9287 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
25862 : : {
25863 : 43 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
25864 : : {
25865 : 0 : {
25866 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25867 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, LE_EXPR, MAX_EXPR, MAX_EXPR))
25868 : 0 : return true;
25869 : : }
25870 : : }
25871 : : }
25872 : : break;
25873 : : }
25874 : 142 : case UNGT_EXPR:
25875 : 142 : {
25876 : 142 : tree _q20 = gimple_assign_rhs1 (_a1);
25877 : 142 : _q20 = do_valueize (valueize, _q20);
25878 : 142 : tree _q21 = gimple_assign_rhs2 (_a1);
25879 : 142 : _q21 = do_valueize (valueize, _q21);
25880 : 142 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
25881 : : {
25882 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
25883 : : {
25884 : 0 : {
25885 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25886 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, UNGT_EXPR, MIN_EXPR, MIN_EXPR))
25887 : 0 : return true;
25888 : : }
25889 : : }
25890 : : }
25891 : 142 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
25892 : : {
25893 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
25894 : : {
25895 : 0 : {
25896 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25897 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, UNGT_EXPR, MAX_EXPR, MAX_EXPR))
25898 : 0 : return true;
25899 : : }
25900 : : }
25901 : : }
25902 : : break;
25903 : : }
25904 : 112 : case UNGE_EXPR:
25905 : 112 : {
25906 : 112 : tree _q20 = gimple_assign_rhs1 (_a1);
25907 : 112 : _q20 = do_valueize (valueize, _q20);
25908 : 112 : tree _q21 = gimple_assign_rhs2 (_a1);
25909 : 112 : _q21 = do_valueize (valueize, _q21);
25910 : 112 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
25911 : : {
25912 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
25913 : : {
25914 : 0 : {
25915 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25916 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, UNGE_EXPR, MIN_EXPR, MIN_EXPR))
25917 : 0 : return true;
25918 : : }
25919 : : }
25920 : : }
25921 : 112 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
25922 : : {
25923 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
25924 : : {
25925 : 0 : {
25926 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25927 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, UNGE_EXPR, MAX_EXPR, MAX_EXPR))
25928 : 0 : return true;
25929 : : }
25930 : : }
25931 : : }
25932 : : break;
25933 : : }
25934 : 18244 : case GT_EXPR:
25935 : 18244 : {
25936 : 18244 : tree _q20 = gimple_assign_rhs1 (_a1);
25937 : 18244 : _q20 = do_valueize (valueize, _q20);
25938 : 18244 : tree _q21 = gimple_assign_rhs2 (_a1);
25939 : 18244 : _q21 = do_valueize (valueize, _q21);
25940 : 18244 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
25941 : : {
25942 : 4781 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
25943 : : {
25944 : 4730 : {
25945 : 4730 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25946 : 4730 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, GT_EXPR, MAX_EXPR, MAX_EXPR))
25947 : 3 : return true;
25948 : : }
25949 : : }
25950 : : }
25951 : 18241 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
25952 : : {
25953 : 1335 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
25954 : : {
25955 : 1291 : {
25956 : 1291 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25957 : 1291 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, GT_EXPR, MIN_EXPR, MIN_EXPR))
25958 : 2 : return true;
25959 : : }
25960 : : }
25961 : : }
25962 : : break;
25963 : : }
25964 : 9328 : case GE_EXPR:
25965 : 9328 : {
25966 : 9328 : tree _q20 = gimple_assign_rhs1 (_a1);
25967 : 9328 : _q20 = do_valueize (valueize, _q20);
25968 : 9328 : tree _q21 = gimple_assign_rhs2 (_a1);
25969 : 9328 : _q21 = do_valueize (valueize, _q21);
25970 : 9328 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
25971 : : {
25972 : 364 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
25973 : : {
25974 : 0 : {
25975 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25976 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, GE_EXPR, MAX_EXPR, MAX_EXPR))
25977 : 0 : return true;
25978 : : }
25979 : : }
25980 : : }
25981 : 9328 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
25982 : : {
25983 : 53 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
25984 : : {
25985 : 0 : {
25986 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
25987 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, GE_EXPR, MIN_EXPR, MIN_EXPR))
25988 : 0 : return true;
25989 : : }
25990 : : }
25991 : : }
25992 : : break;
25993 : : }
25994 : 142 : case UNLT_EXPR:
25995 : 142 : {
25996 : 142 : tree _q20 = gimple_assign_rhs1 (_a1);
25997 : 142 : _q20 = do_valueize (valueize, _q20);
25998 : 142 : tree _q21 = gimple_assign_rhs2 (_a1);
25999 : 142 : _q21 = do_valueize (valueize, _q21);
26000 : 142 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
26001 : : {
26002 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26003 : : {
26004 : 0 : {
26005 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
26006 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, UNLT_EXPR, MAX_EXPR, MAX_EXPR))
26007 : 0 : return true;
26008 : : }
26009 : : }
26010 : : }
26011 : 142 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
26012 : : {
26013 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26014 : : {
26015 : 0 : {
26016 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
26017 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, UNLT_EXPR, MIN_EXPR, MIN_EXPR))
26018 : 0 : return true;
26019 : : }
26020 : : }
26021 : : }
26022 : : break;
26023 : : }
26024 : 172 : case UNLE_EXPR:
26025 : 172 : {
26026 : 172 : tree _q20 = gimple_assign_rhs1 (_a1);
26027 : 172 : _q20 = do_valueize (valueize, _q20);
26028 : 172 : tree _q21 = gimple_assign_rhs2 (_a1);
26029 : 172 : _q21 = do_valueize (valueize, _q21);
26030 : 172 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
26031 : : {
26032 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26033 : : {
26034 : 0 : {
26035 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
26036 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, UNLE_EXPR, MAX_EXPR, MAX_EXPR))
26037 : 0 : return true;
26038 : : }
26039 : : }
26040 : : }
26041 : 172 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
26042 : : {
26043 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26044 : : {
26045 : 0 : {
26046 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
26047 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, UNLE_EXPR, MIN_EXPR, MIN_EXPR))
26048 : 0 : return true;
26049 : : }
26050 : : }
26051 : : }
26052 : : break;
26053 : : }
26054 : 20114 : case NE_EXPR:
26055 : 20114 : {
26056 : 20114 : tree _q20 = gimple_assign_rhs1 (_a1);
26057 : 20114 : _q20 = do_valueize (valueize, _q20);
26058 : 20114 : tree _q21 = gimple_assign_rhs2 (_a1);
26059 : 20114 : _q21 = do_valueize (valueize, _q21);
26060 : 20114 : if (tree_swap_operands_p (_q20, _q21))
26061 : 281 : std::swap (_q20, _q21);
26062 : 20114 : switch (TREE_CODE (_p1))
26063 : : {
26064 : 3191 : case SSA_NAME:
26065 : 3191 : if (gimple *_d2 = get_def (valueize, _p1))
26066 : : {
26067 : 3133 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
26068 : 4950 : switch (gimple_assign_rhs_code (_a2))
26069 : : {
26070 : 236 : case MINUS_EXPR:
26071 : 236 : {
26072 : 236 : tree _q50 = gimple_assign_rhs1 (_a2);
26073 : 236 : _q50 = do_valueize (valueize, _q50);
26074 : 236 : tree _q51 = gimple_assign_rhs2 (_a2);
26075 : 236 : _q51 = do_valueize (valueize, _q51);
26076 : 236 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26077 : : {
26078 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26079 : : {
26080 : 0 : if (integer_zerop (_p2))
26081 : : {
26082 : 0 : {
26083 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26084 : 0 : if (gimple_simplify_641 (res_op, seq, valueize, type, captures))
26085 : 0 : return true;
26086 : : }
26087 : : }
26088 : : }
26089 : : }
26090 : 236 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26091 : : {
26092 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26093 : : {
26094 : 0 : if (integer_zerop (_p2))
26095 : : {
26096 : 0 : {
26097 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26098 : 0 : if (gimple_simplify_641 (res_op, seq, valueize, type, captures))
26099 : 0 : return true;
26100 : : }
26101 : : }
26102 : : }
26103 : : }
26104 : : break;
26105 : : }
26106 : 21 : case BIT_XOR_EXPR:
26107 : 21 : {
26108 : 21 : tree _q50 = gimple_assign_rhs1 (_a2);
26109 : 21 : _q50 = do_valueize (valueize, _q50);
26110 : 21 : tree _q51 = gimple_assign_rhs2 (_a2);
26111 : 21 : _q51 = do_valueize (valueize, _q51);
26112 : 21 : if (tree_swap_operands_p (_q50, _q51))
26113 : 0 : std::swap (_q50, _q51);
26114 : 21 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26115 : : {
26116 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26117 : : {
26118 : 0 : if (integer_zerop (_p2))
26119 : : {
26120 : 0 : {
26121 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26122 : 0 : if (gimple_simplify_642 (res_op, seq, valueize, type, captures))
26123 : 0 : return true;
26124 : : }
26125 : : }
26126 : : }
26127 : : }
26128 : 21 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26129 : : {
26130 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26131 : : {
26132 : 0 : if (integer_zerop (_p2))
26133 : : {
26134 : 0 : {
26135 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26136 : 0 : if (gimple_simplify_642 (res_op, seq, valueize, type, captures))
26137 : 0 : return true;
26138 : : }
26139 : : }
26140 : : }
26141 : : }
26142 : 196235 : break;
26143 : : }
26144 : 33 : case BIT_AND_EXPR:
26145 : 33 : {
26146 : 33 : tree _q50 = gimple_assign_rhs1 (_a2);
26147 : 33 : _q50 = do_valueize (valueize, _q50);
26148 : 33 : tree _q51 = gimple_assign_rhs2 (_a2);
26149 : 33 : _q51 = do_valueize (valueize, _q51);
26150 : 33 : if (tree_swap_operands_p (_q50, _q51))
26151 : 0 : std::swap (_q50, _q51);
26152 : 33 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26153 : : {
26154 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26155 : : {
26156 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26157 : : {
26158 : 0 : {
26159 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26160 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_AND_EXPR))
26161 : 0 : return true;
26162 : : }
26163 : : }
26164 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26165 : : {
26166 : 0 : {
26167 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26168 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_AND_EXPR))
26169 : 0 : return true;
26170 : : }
26171 : : }
26172 : : }
26173 : : }
26174 : 33 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26175 : : {
26176 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26177 : : {
26178 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26179 : : {
26180 : 0 : {
26181 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26182 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_AND_EXPR))
26183 : 0 : return true;
26184 : : }
26185 : : }
26186 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26187 : : {
26188 : 0 : {
26189 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26190 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_AND_EXPR))
26191 : 0 : return true;
26192 : : }
26193 : : }
26194 : : }
26195 : : }
26196 : 196235 : break;
26197 : : }
26198 : 105 : case BIT_IOR_EXPR:
26199 : 105 : {
26200 : 105 : tree _q50 = gimple_assign_rhs1 (_a2);
26201 : 105 : _q50 = do_valueize (valueize, _q50);
26202 : 105 : tree _q51 = gimple_assign_rhs2 (_a2);
26203 : 105 : _q51 = do_valueize (valueize, _q51);
26204 : 105 : if (tree_swap_operands_p (_q50, _q51))
26205 : 14 : std::swap (_q50, _q51);
26206 : 105 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26207 : : {
26208 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26209 : : {
26210 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26211 : : {
26212 : 0 : {
26213 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26214 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR))
26215 : 0 : return true;
26216 : : }
26217 : : }
26218 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26219 : : {
26220 : 0 : {
26221 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26222 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR))
26223 : 0 : return true;
26224 : : }
26225 : : }
26226 : : }
26227 : : }
26228 : 105 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26229 : : {
26230 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26231 : : {
26232 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26233 : : {
26234 : 0 : {
26235 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26236 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR))
26237 : 0 : return true;
26238 : : }
26239 : : }
26240 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26241 : : {
26242 : 0 : {
26243 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26244 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR))
26245 : 0 : return true;
26246 : : }
26247 : : }
26248 : : }
26249 : : }
26250 : 196235 : break;
26251 : : }
26252 : 3 : case MIN_EXPR:
26253 : 3 : {
26254 : 3 : tree _q50 = gimple_assign_rhs1 (_a2);
26255 : 3 : _q50 = do_valueize (valueize, _q50);
26256 : 3 : tree _q51 = gimple_assign_rhs2 (_a2);
26257 : 3 : _q51 = do_valueize (valueize, _q51);
26258 : 3 : if (tree_swap_operands_p (_q50, _q51))
26259 : 0 : std::swap (_q50, _q51);
26260 : 3 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26261 : : {
26262 : 3 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26263 : : {
26264 : 3 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26265 : : {
26266 : 3 : {
26267 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26268 : 3 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MIN_EXPR))
26269 : 3 : return true;
26270 : : }
26271 : : }
26272 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26273 : : {
26274 : 0 : {
26275 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26276 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MIN_EXPR))
26277 : 0 : return true;
26278 : : }
26279 : : }
26280 : : }
26281 : : }
26282 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26283 : : {
26284 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26285 : : {
26286 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26287 : : {
26288 : 0 : {
26289 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26290 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MIN_EXPR))
26291 : 0 : return true;
26292 : : }
26293 : : }
26294 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26295 : : {
26296 : 0 : {
26297 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26298 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MIN_EXPR))
26299 : 0 : return true;
26300 : : }
26301 : : }
26302 : : }
26303 : : }
26304 : 196235 : break;
26305 : : }
26306 : 15 : case MAX_EXPR:
26307 : 15 : {
26308 : 15 : tree _q50 = gimple_assign_rhs1 (_a2);
26309 : 15 : _q50 = do_valueize (valueize, _q50);
26310 : 15 : tree _q51 = gimple_assign_rhs2 (_a2);
26311 : 15 : _q51 = do_valueize (valueize, _q51);
26312 : 15 : if (tree_swap_operands_p (_q50, _q51))
26313 : 0 : std::swap (_q50, _q51);
26314 : 15 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26315 : : {
26316 : 3 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26317 : : {
26318 : 3 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26319 : : {
26320 : 3 : {
26321 : 3 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26322 : 3 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MAX_EXPR))
26323 : 3 : return true;
26324 : : }
26325 : : }
26326 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26327 : : {
26328 : 0 : {
26329 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26330 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MAX_EXPR))
26331 : 0 : return true;
26332 : : }
26333 : : }
26334 : : }
26335 : : }
26336 : 12 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26337 : : {
26338 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26339 : : {
26340 : 0 : if ((_p2 == _q20 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q20, 0) && types_match (_p2, _q20)))
26341 : : {
26342 : 0 : {
26343 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26344 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MAX_EXPR))
26345 : 0 : return true;
26346 : : }
26347 : : }
26348 : 0 : if ((_p2 == _q21 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q21, 0) && types_match (_p2, _q21)))
26349 : : {
26350 : 0 : {
26351 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26352 : 0 : if (gimple_simplify_643 (res_op, seq, valueize, type, captures, MAX_EXPR))
26353 : 0 : return true;
26354 : : }
26355 : : }
26356 : : }
26357 : : }
26358 : 196235 : break;
26359 : : }
26360 : 25 : case MULT_EXPR:
26361 : 25 : {
26362 : 25 : tree _q50 = gimple_assign_rhs1 (_a2);
26363 : 25 : _q50 = do_valueize (valueize, _q50);
26364 : 25 : tree _q51 = gimple_assign_rhs2 (_a2);
26365 : 25 : _q51 = do_valueize (valueize, _q51);
26366 : 25 : if (tree_swap_operands_p (_q50, _q51))
26367 : 0 : std::swap (_q50, _q51);
26368 : 25 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26369 : : {
26370 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26371 : : {
26372 : 0 : switch (TREE_CODE (_p2))
26373 : : {
26374 : 0 : case SSA_NAME:
26375 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
26376 : : {
26377 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
26378 : 0 : switch (gimple_assign_rhs_code (_a3))
26379 : : {
26380 : 0 : case MULT_EXPR:
26381 : 0 : {
26382 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
26383 : 0 : _q80 = do_valueize (valueize, _q80);
26384 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
26385 : 0 : _q81 = do_valueize (valueize, _q81);
26386 : 0 : if (tree_swap_operands_p (_q80, _q81))
26387 : 0 : std::swap (_q80, _q81);
26388 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
26389 : : {
26390 : 0 : if ((_q81 == _q20 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q20, 0) && types_match (_q81, _q20)))
26391 : : {
26392 : 0 : {
26393 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26394 : 0 : const enum tree_code op = MULT_EXPR;
26395 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
26396 : : )
26397 : : {
26398 : 0 : gimple_seq *lseq = seq;
26399 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2923;
26400 : 0 : {
26401 : 0 : tree tem;
26402 : 0 : tem = captures[2];
26403 : 0 : res_op->set_value (tem);
26404 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 632, __FILE__, __LINE__, true);
26405 : 0 : return true;
26406 : : }
26407 : 0 : next_after_fail2923:;
26408 : : }
26409 : : }
26410 : : }
26411 : : }
26412 : 25 : break;
26413 : : }
26414 : : default:;
26415 : : }
26416 : : }
26417 : : break;
26418 : : default:;
26419 : : }
26420 : : }
26421 : : }
26422 : 25 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26423 : : {
26424 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26425 : : {
26426 : 0 : switch (TREE_CODE (_p2))
26427 : : {
26428 : 0 : case SSA_NAME:
26429 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
26430 : : {
26431 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
26432 : 0 : switch (gimple_assign_rhs_code (_a3))
26433 : : {
26434 : 0 : case MULT_EXPR:
26435 : 0 : {
26436 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
26437 : 0 : _q80 = do_valueize (valueize, _q80);
26438 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
26439 : 0 : _q81 = do_valueize (valueize, _q81);
26440 : 0 : if (tree_swap_operands_p (_q80, _q81))
26441 : 0 : std::swap (_q80, _q81);
26442 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
26443 : : {
26444 : 0 : if ((_q81 == _q21 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q21, 0) && types_match (_q81, _q21)))
26445 : : {
26446 : 0 : {
26447 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26448 : 0 : const enum tree_code op = MULT_EXPR;
26449 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
26450 : : )
26451 : : {
26452 : 0 : gimple_seq *lseq = seq;
26453 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2924;
26454 : 0 : {
26455 : 0 : tree tem;
26456 : 0 : tem = captures[2];
26457 : 0 : res_op->set_value (tem);
26458 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 632, __FILE__, __LINE__, true);
26459 : 0 : return true;
26460 : : }
26461 : 0 : next_after_fail2924:;
26462 : : }
26463 : : }
26464 : : }
26465 : : }
26466 : 196235 : break;
26467 : : }
26468 : : default:;
26469 : : }
26470 : : }
26471 : : break;
26472 : : default:;
26473 : : }
26474 : : }
26475 : : }
26476 : 196235 : break;
26477 : : }
26478 : 43 : case PLUS_EXPR:
26479 : 43 : {
26480 : 43 : tree _q50 = gimple_assign_rhs1 (_a2);
26481 : 43 : _q50 = do_valueize (valueize, _q50);
26482 : 43 : tree _q51 = gimple_assign_rhs2 (_a2);
26483 : 43 : _q51 = do_valueize (valueize, _q51);
26484 : 43 : if (tree_swap_operands_p (_q50, _q51))
26485 : 0 : std::swap (_q50, _q51);
26486 : 43 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
26487 : : {
26488 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
26489 : : {
26490 : 0 : switch (TREE_CODE (_p2))
26491 : : {
26492 : 0 : case SSA_NAME:
26493 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
26494 : : {
26495 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
26496 : 0 : switch (gimple_assign_rhs_code (_a3))
26497 : : {
26498 : 0 : case PLUS_EXPR:
26499 : 0 : {
26500 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
26501 : 0 : _q80 = do_valueize (valueize, _q80);
26502 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
26503 : 0 : _q81 = do_valueize (valueize, _q81);
26504 : 0 : if (tree_swap_operands_p (_q80, _q81))
26505 : 0 : std::swap (_q80, _q81);
26506 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
26507 : : {
26508 : 0 : if ((_q81 == _q20 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q20, 0) && types_match (_q81, _q20)))
26509 : : {
26510 : 0 : {
26511 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
26512 : 0 : const enum tree_code op = PLUS_EXPR;
26513 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
26514 : : )
26515 : : {
26516 : 0 : gimple_seq *lseq = seq;
26517 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2925;
26518 : 0 : {
26519 : 0 : tree tem;
26520 : 0 : tem = captures[2];
26521 : 0 : res_op->set_value (tem);
26522 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 632, __FILE__, __LINE__, true);
26523 : 0 : return true;
26524 : : }
26525 : 0 : next_after_fail2925:;
26526 : : }
26527 : : }
26528 : : }
26529 : : }
26530 : 43 : break;
26531 : : }
26532 : 0 : case MULT_EXPR:
26533 : 0 : {
26534 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
26535 : 0 : _q80 = do_valueize (valueize, _q80);
26536 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
26537 : 0 : _q81 = do_valueize (valueize, _q81);
26538 : 0 : if (tree_swap_operands_p (_q80, _q81))
26539 : 0 : std::swap (_q80, _q81);
26540 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
26541 : : {
26542 : 0 : if (uniform_integer_cst_p (_q81))
26543 : : {
26544 : 0 : {
26545 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _p1, _q81 };
26546 : 0 : if (wi::to_wide (uniform_integer_cst_p (captures[3])) == 2
26547 : : )
26548 : : {
26549 : 0 : gimple_seq *lseq = seq;
26550 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2926;
26551 : 0 : {
26552 : 0 : tree tem;
26553 : 0 : tem = captures[2];
26554 : 0 : res_op->set_value (tem);
26555 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 633, __FILE__, __LINE__, true);
26556 : 0 : return true;
26557 : : }
26558 : 0 : next_after_fail2926:;
26559 : : }
26560 : : }
26561 : : }
26562 : : }
26563 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
26564 : : {
26565 : 0 : if (uniform_integer_cst_p (_q81))
26566 : : {
26567 : 0 : {
26568 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q21, _q20, _p1, _q81 };
26569 : 0 : if (wi::to_wide (uniform_integer_cst_p (captures[3])) == 2
26570 : : )
26571 : : {
26572 : 0 : gimple_seq *lseq = seq;
26573 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2927;
26574 : 0 : {
26575 : 0 : tree tem;
26576 : 0 : tem = captures[2];
26577 : 0 : res_op->set_value (tem);
26578 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 633, __FILE__, __LINE__, true);
26579 : 0 : return true;
26580 : : }
26581 : 0 : next_after_fail2927:;
26582 : : }
26583 : : }
26584 : : }
26585 : : }
26586 : 43 : break;
26587 : : }
26588 : : default:;
26589 : : }
26590 : : }
26591 : : break;
26592 : : default:;
26593 : : }
26594 : : }
26595 : : }
26596 : 43 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
26597 : : {
26598 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
26599 : : {
26600 : 0 : switch (TREE_CODE (_p2))
26601 : : {
26602 : 0 : case SSA_NAME:
26603 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
26604 : : {
26605 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
26606 : 0 : switch (gimple_assign_rhs_code (_a3))
26607 : : {
26608 : 0 : case PLUS_EXPR:
26609 : 0 : {
26610 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
26611 : 0 : _q80 = do_valueize (valueize, _q80);
26612 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
26613 : 0 : _q81 = do_valueize (valueize, _q81);
26614 : 0 : if (tree_swap_operands_p (_q80, _q81))
26615 : 0 : std::swap (_q80, _q81);
26616 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
26617 : : {
26618 : 0 : if ((_q81 == _q21 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q21, 0) && types_match (_q81, _q21)))
26619 : : {
26620 : 0 : {
26621 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _p1 };
26622 : 0 : const enum tree_code op = PLUS_EXPR;
26623 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
26624 : : )
26625 : : {
26626 : 0 : gimple_seq *lseq = seq;
26627 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2928;
26628 : 0 : {
26629 : 0 : tree tem;
26630 : 0 : tem = captures[2];
26631 : 0 : res_op->set_value (tem);
26632 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 632, __FILE__, __LINE__, true);
26633 : 0 : return true;
26634 : : }
26635 : 0 : next_after_fail2928:;
26636 : : }
26637 : : }
26638 : : }
26639 : : }
26640 : 196235 : break;
26641 : : }
26642 : 0 : case MULT_EXPR:
26643 : 0 : {
26644 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
26645 : 0 : _q80 = do_valueize (valueize, _q80);
26646 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
26647 : 0 : _q81 = do_valueize (valueize, _q81);
26648 : 0 : if (tree_swap_operands_p (_q80, _q81))
26649 : 0 : std::swap (_q80, _q81);
26650 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
26651 : : {
26652 : 0 : if (uniform_integer_cst_p (_q81))
26653 : : {
26654 : 0 : {
26655 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _p1, _q81 };
26656 : 0 : if (wi::to_wide (uniform_integer_cst_p (captures[3])) == 2
26657 : : )
26658 : : {
26659 : 0 : gimple_seq *lseq = seq;
26660 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2929;
26661 : 0 : {
26662 : 0 : tree tem;
26663 : 0 : tem = captures[2];
26664 : 0 : res_op->set_value (tem);
26665 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 633, __FILE__, __LINE__, true);
26666 : 0 : return true;
26667 : : }
26668 : 0 : next_after_fail2929:;
26669 : : }
26670 : : }
26671 : : }
26672 : : }
26673 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
26674 : : {
26675 : 0 : if (uniform_integer_cst_p (_q81))
26676 : : {
26677 : 0 : {
26678 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q21, _q20, _p1, _q81 };
26679 : 0 : if (wi::to_wide (uniform_integer_cst_p (captures[3])) == 2
26680 : : )
26681 : : {
26682 : 0 : gimple_seq *lseq = seq;
26683 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2930;
26684 : 0 : {
26685 : 0 : tree tem;
26686 : 0 : tem = captures[2];
26687 : 0 : res_op->set_value (tem);
26688 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 633, __FILE__, __LINE__, true);
26689 : 0 : return true;
26690 : : }
26691 : 0 : next_after_fail2930:;
26692 : : }
26693 : : }
26694 : : }
26695 : : }
26696 : 196235 : break;
26697 : : }
26698 : : default:;
26699 : : }
26700 : : }
26701 : : break;
26702 : : default:;
26703 : : }
26704 : : }
26705 : : }
26706 : 196235 : break;
26707 : : }
26708 : : default:;
26709 : : }
26710 : : }
26711 : : break;
26712 : : default:;
26713 : : }
26714 : 196235 : break;
26715 : : }
26716 : : default:;
26717 : : }
26718 : : }
26719 : : break;
26720 : 196235 : default:;
26721 : : }
26722 : 196235 : switch (TREE_CODE (_p1))
26723 : : {
26724 : 52566 : case SSA_NAME:
26725 : 52566 : if (gimple *_d1 = get_def (valueize, _p1))
26726 : : {
26727 : 46107 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
26728 : 56446 : switch (gimple_assign_rhs_code (_a1))
26729 : : {
26730 : 3788 : case VEC_COND_EXPR:
26731 : 3788 : {
26732 : 3788 : tree _q30 = gimple_assign_rhs1 (_a1);
26733 : 3788 : _q30 = do_valueize (valueize, _q30);
26734 : 3788 : tree _q31 = gimple_assign_rhs2 (_a1);
26735 : 3788 : _q31 = do_valueize (valueize, _q31);
26736 : 3788 : tree _q32 = gimple_assign_rhs3 (_a1);
26737 : 3788 : _q32 = do_valueize (valueize, _q32);
26738 : 3788 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
26739 : : {
26740 : 0 : {
26741 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _p2 };
26742 : 0 : gimple_seq *lseq = seq;
26743 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2931;
26744 : 0 : {
26745 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
26746 : 0 : res_op->ops[0] = captures[0];
26747 : 0 : res_op->ops[1] = captures[1];
26748 : 0 : res_op->ops[2] = captures[3];
26749 : 0 : res_op->resimplify (lseq, valueize);
26750 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1249, __FILE__, __LINE__, true);
26751 : 0 : return true;
26752 : : }
26753 : 0 : next_after_fail2931:;
26754 : : }
26755 : : }
26756 : : break;
26757 : : }
26758 : : default:;
26759 : : }
26760 : : }
26761 : : break;
26762 : 196235 : default:;
26763 : : }
26764 : 196235 : switch (TREE_CODE (_p2))
26765 : : {
26766 : 45017 : case SSA_NAME:
26767 : 45017 : if (gimple *_d1 = get_def (valueize, _p2))
26768 : : {
26769 : 38852 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
26770 : 40884 : switch (gimple_assign_rhs_code (_a1))
26771 : : {
26772 : 4437 : case VEC_COND_EXPR:
26773 : 4437 : {
26774 : 4437 : tree _q40 = gimple_assign_rhs1 (_a1);
26775 : 4437 : _q40 = do_valueize (valueize, _q40);
26776 : 4437 : tree _q41 = gimple_assign_rhs2 (_a1);
26777 : 4437 : _q41 = do_valueize (valueize, _q41);
26778 : 4437 : tree _q42 = gimple_assign_rhs3 (_a1);
26779 : 4437 : _q42 = do_valueize (valueize, _q42);
26780 : 4437 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
26781 : : {
26782 : 24 : {
26783 : 24 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q41, _q42 };
26784 : 24 : gimple_seq *lseq = seq;
26785 : 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2932;
26786 : 24 : {
26787 : 24 : res_op->set_op (VEC_COND_EXPR, type, 3);
26788 : 24 : res_op->ops[0] = captures[0];
26789 : 24 : res_op->ops[1] = captures[1];
26790 : 24 : res_op->ops[2] = captures[3];
26791 : 24 : res_op->resimplify (lseq, valueize);
26792 : 24 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1250, __FILE__, __LINE__, true);
26793 : 24 : return true;
26794 : : }
26795 : 0 : next_after_fail2932:;
26796 : : }
26797 : : }
26798 : 4413 : {
26799 : 4413 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42 };
26800 : 4413 : if (inverse_conditions_p (captures[0], captures[2])
26801 : : )
26802 : : {
26803 : 0 : gimple_seq *lseq = seq;
26804 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2933;
26805 : 0 : {
26806 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
26807 : 0 : res_op->ops[0] = captures[0];
26808 : 0 : res_op->ops[1] = captures[1];
26809 : 0 : res_op->ops[2] = captures[3];
26810 : 0 : res_op->resimplify (lseq, valueize);
26811 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1251, __FILE__, __LINE__, true);
26812 : 0 : return true;
26813 : : }
26814 : 0 : next_after_fail2933:;
26815 : : }
26816 : : }
26817 : 4413 : break;
26818 : : }
26819 : : default:;
26820 : : }
26821 : : }
26822 : : break;
26823 : 196211 : default:;
26824 : : }
26825 : 196211 : switch (TREE_CODE (_p1))
26826 : : {
26827 : 52550 : case SSA_NAME:
26828 : 52550 : if (gimple *_d1 = get_def (valueize, _p1))
26829 : : {
26830 : 46091 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
26831 : 56414 : switch (gimple_assign_rhs_code (_a1))
26832 : : {
26833 : 3788 : case VEC_COND_EXPR:
26834 : 3788 : {
26835 : 3788 : tree _q30 = gimple_assign_rhs1 (_a1);
26836 : 3788 : _q30 = do_valueize (valueize, _q30);
26837 : 3788 : tree _q31 = gimple_assign_rhs2 (_a1);
26838 : 3788 : _q31 = do_valueize (valueize, _q31);
26839 : 3788 : tree _q32 = gimple_assign_rhs3 (_a1);
26840 : 3788 : _q32 = do_valueize (valueize, _q32);
26841 : 3788 : {
26842 : 3788 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q31, _q32, _p2 };
26843 : 3788 : if (inverse_conditions_p (captures[0], captures[1])
26844 : : )
26845 : : {
26846 : 0 : gimple_seq *lseq = seq;
26847 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2934;
26848 : 0 : {
26849 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
26850 : 0 : res_op->ops[0] = captures[0];
26851 : 0 : res_op->ops[1] = captures[3];
26852 : 0 : res_op->ops[2] = captures[4];
26853 : 0 : res_op->resimplify (lseq, valueize);
26854 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1252, __FILE__, __LINE__, true);
26855 : 0 : return true;
26856 : : }
26857 : 0 : next_after_fail2934:;
26858 : : }
26859 : : }
26860 : 3788 : break;
26861 : : }
26862 : : default:;
26863 : : }
26864 : : }
26865 : : break;
26866 : 196211 : default:;
26867 : : }
26868 : 196211 : if ((_p2 == _p1 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _p1, 0) && types_match (_p2, _p1)))
26869 : : {
26870 : 1400 : {
26871 : 1400 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
26872 : 1400 : gimple_seq *lseq = seq;
26873 : 1400 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2935;
26874 : 1400 : {
26875 : 1400 : tree tem;
26876 : 1400 : tem = captures[1];
26877 : 1400 : res_op->set_value (tem);
26878 : 1400 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1253, __FILE__, __LINE__, true);
26879 : 1400 : return true;
26880 : : }
26881 : 0 : next_after_fail2935:;
26882 : : }
26883 : : }
26884 : 194811 : switch (TREE_CODE (_p0))
26885 : : {
26886 : 186999 : case SSA_NAME:
26887 : 186999 : if (gimple *_d1 = get_def (valueize, _p0))
26888 : : {
26889 : 160450 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
26890 : 159713 : switch (gimple_assign_rhs_code (_a1))
26891 : : {
26892 : 40786 : case EQ_EXPR:
26893 : 40786 : {
26894 : 40786 : tree _q20 = gimple_assign_rhs1 (_a1);
26895 : 40786 : _q20 = do_valueize (valueize, _q20);
26896 : 40786 : tree _q21 = gimple_assign_rhs2 (_a1);
26897 : 40786 : _q21 = do_valueize (valueize, _q21);
26898 : 40786 : if (tree_swap_operands_p (_q20, _q21))
26899 : 698 : std::swap (_q20, _q21);
26900 : 40786 : if (zerop (_q21))
26901 : : {
26902 : 6341 : switch (TREE_CODE (_p2))
26903 : : {
26904 : 1816 : case SSA_NAME:
26905 : 1816 : if (gimple *_d2 = get_def (valueize, _p2))
26906 : : {
26907 : 1802 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
26908 : 2047 : switch (gimple_assign_rhs_code (_a2))
26909 : : {
26910 : 0 : case NEGATE_EXPR:
26911 : 0 : {
26912 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
26913 : 0 : _q60 = do_valueize (valueize, _q60);
26914 : 0 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
26915 : : {
26916 : 0 : {
26917 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
26918 : 0 : const enum tree_code cmp = EQ_EXPR;
26919 : 0 : if (!HONOR_SIGNED_ZEROS (type)
26920 : 0 : && bitwise_equal_p (captures[0], captures[1])
26921 : : )
26922 : : {
26923 : 0 : gimple_seq *lseq = seq;
26924 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2936;
26925 : 0 : {
26926 : 0 : tree tem;
26927 : 0 : tem = captures[2];
26928 : 0 : res_op->set_value (tem);
26929 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 641, __FILE__, __LINE__, true);
26930 : 0 : return true;
26931 : : }
26932 : 0 : next_after_fail2936:;
26933 : : }
26934 : : }
26935 : : }
26936 : : break;
26937 : : }
26938 : : default:;
26939 : : }
26940 : : }
26941 : : break;
26942 : 6341 : default:;
26943 : : }
26944 : 6341 : if (zerop (_p1))
26945 : : {
26946 : 158 : switch (TREE_CODE (_p2))
26947 : : {
26948 : 105 : case SSA_NAME:
26949 : 105 : if (gimple *_d2 = get_def (valueize, _p2))
26950 : : {
26951 : 105 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
26952 : 50 : switch (gimple_assign_rhs_code (_a2))
26953 : : {
26954 : 0 : case NEGATE_EXPR:
26955 : 0 : {
26956 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
26957 : 0 : _q60 = do_valueize (valueize, _q60);
26958 : 0 : {
26959 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p2, _q60 };
26960 : 0 : const enum tree_code cmp = EQ_EXPR;
26961 : 0 : if (!HONOR_SIGNED_ZEROS (type)
26962 : 0 : && bitwise_equal_p (captures[0], captures[2])
26963 : : )
26964 : : {
26965 : 0 : gimple_seq *lseq = seq;
26966 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2937;
26967 : 0 : {
26968 : 0 : tree tem;
26969 : 0 : tem = captures[1];
26970 : 0 : res_op->set_value (tem);
26971 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 642, __FILE__, __LINE__, true);
26972 : 0 : return true;
26973 : : }
26974 : 0 : next_after_fail2937:;
26975 : : }
26976 : : }
26977 : 0 : break;
26978 : : }
26979 : : default:;
26980 : : }
26981 : : }
26982 : : break;
26983 : : default:;
26984 : : }
26985 : : }
26986 : : }
26987 : 40786 : switch (TREE_CODE (_q20))
26988 : : {
26989 : 40786 : case SSA_NAME:
26990 : 40786 : if (gimple *_d2 = get_def (valueize, _q20))
26991 : : {
26992 : 39943 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
26993 : 65730 : switch (gimple_assign_rhs_code (_a2))
26994 : : {
26995 : 1700 : case MINUS_EXPR:
26996 : 1700 : {
26997 : 1700 : tree _q30 = gimple_assign_rhs1 (_a2);
26998 : 1700 : _q30 = do_valueize (valueize, _q30);
26999 : 1700 : tree _q31 = gimple_assign_rhs2 (_a2);
27000 : 1700 : _q31 = do_valueize (valueize, _q31);
27001 : 1700 : if (zerop (_q21))
27002 : : {
27003 : 8 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
27004 : : {
27005 : 0 : switch (TREE_CODE (_p2))
27006 : : {
27007 : 0 : case SSA_NAME:
27008 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27009 : : {
27010 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27011 : 0 : switch (gimple_assign_rhs_code (_a3))
27012 : : {
27013 : 0 : case MINUS_EXPR:
27014 : 0 : {
27015 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
27016 : 0 : _q80 = do_valueize (valueize, _q80);
27017 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
27018 : 0 : _q81 = do_valueize (valueize, _q81);
27019 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
27020 : : {
27021 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
27022 : : {
27023 : 0 : {
27024 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p2 };
27025 : 0 : const enum tree_code cmp = EQ_EXPR;
27026 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27027 : : )
27028 : : {
27029 : 0 : gimple_seq *lseq = seq;
27030 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2938;
27031 : 0 : {
27032 : 0 : tree tem;
27033 : 0 : tem = captures[3];
27034 : 0 : res_op->set_value (tem);
27035 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 643, __FILE__, __LINE__, true);
27036 : 0 : return true;
27037 : : }
27038 : 0 : next_after_fail2938:;
27039 : : }
27040 : : }
27041 : : }
27042 : : }
27043 : : break;
27044 : : }
27045 : : default:;
27046 : : }
27047 : : }
27048 : : break;
27049 : : default:;
27050 : : }
27051 : : }
27052 : : }
27053 : 1700 : if (integer_zerop (_q21))
27054 : : {
27055 : 8 : if (integer_zerop (_p1))
27056 : : {
27057 : 0 : switch (TREE_CODE (_p2))
27058 : : {
27059 : 0 : case SSA_NAME:
27060 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27061 : : {
27062 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27063 : 0 : switch (gimple_assign_rhs_code (_a3))
27064 : : {
27065 : 0 : case MINUS_EXPR:
27066 : 0 : {
27067 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
27068 : 0 : _q80 = do_valueize (valueize, _q80);
27069 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
27070 : 0 : _q81 = do_valueize (valueize, _q81);
27071 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
27072 : : {
27073 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
27074 : : {
27075 : 0 : {
27076 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p2 };
27077 : 0 : if (gimple_simplify_644 (res_op, seq, valueize, type, captures, EQ_EXPR))
27078 : 0 : return true;
27079 : : }
27080 : : }
27081 : : }
27082 : : break;
27083 : : }
27084 : : default:;
27085 : : }
27086 : : }
27087 : : break;
27088 : : default:;
27089 : : }
27090 : : }
27091 : : }
27092 : : break;
27093 : : }
27094 : : default:;
27095 : : }
27096 : : }
27097 : : break;
27098 : : default:;
27099 : : }
27100 : 194802 : break;
27101 : : }
27102 : 148 : case UNEQ_EXPR:
27103 : 148 : {
27104 : 148 : tree _q20 = gimple_assign_rhs1 (_a1);
27105 : 148 : _q20 = do_valueize (valueize, _q20);
27106 : 148 : tree _q21 = gimple_assign_rhs2 (_a1);
27107 : 148 : _q21 = do_valueize (valueize, _q21);
27108 : 148 : if (tree_swap_operands_p (_q20, _q21))
27109 : 0 : std::swap (_q20, _q21);
27110 : 148 : if (zerop (_q21))
27111 : : {
27112 : 6 : switch (TREE_CODE (_p2))
27113 : : {
27114 : 0 : case SSA_NAME:
27115 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
27116 : : {
27117 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27118 : 0 : switch (gimple_assign_rhs_code (_a2))
27119 : : {
27120 : 0 : case NEGATE_EXPR:
27121 : 0 : {
27122 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
27123 : 0 : _q60 = do_valueize (valueize, _q60);
27124 : 0 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
27125 : : {
27126 : 0 : {
27127 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
27128 : 0 : const enum tree_code cmp = UNEQ_EXPR;
27129 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27130 : 0 : && bitwise_equal_p (captures[0], captures[1])
27131 : : )
27132 : : {
27133 : 0 : gimple_seq *lseq = seq;
27134 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2939;
27135 : 0 : {
27136 : 0 : tree tem;
27137 : 0 : tem = captures[2];
27138 : 0 : res_op->set_value (tem);
27139 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 641, __FILE__, __LINE__, true);
27140 : 0 : return true;
27141 : : }
27142 : 0 : next_after_fail2939:;
27143 : : }
27144 : : }
27145 : : }
27146 : : break;
27147 : : }
27148 : : default:;
27149 : : }
27150 : : }
27151 : : break;
27152 : 6 : default:;
27153 : : }
27154 : 6 : if (zerop (_p1))
27155 : : {
27156 : 0 : switch (TREE_CODE (_p2))
27157 : : {
27158 : 0 : case SSA_NAME:
27159 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
27160 : : {
27161 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27162 : 0 : switch (gimple_assign_rhs_code (_a2))
27163 : : {
27164 : 0 : case NEGATE_EXPR:
27165 : 0 : {
27166 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
27167 : 0 : _q60 = do_valueize (valueize, _q60);
27168 : 0 : {
27169 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p2, _q60 };
27170 : 0 : const enum tree_code cmp = UNEQ_EXPR;
27171 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27172 : 0 : && bitwise_equal_p (captures[0], captures[2])
27173 : : )
27174 : : {
27175 : 0 : gimple_seq *lseq = seq;
27176 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2940;
27177 : 0 : {
27178 : 0 : tree tem;
27179 : 0 : tem = captures[1];
27180 : 0 : res_op->set_value (tem);
27181 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 642, __FILE__, __LINE__, true);
27182 : 0 : return true;
27183 : : }
27184 : 0 : next_after_fail2940:;
27185 : : }
27186 : : }
27187 : 0 : break;
27188 : : }
27189 : : default:;
27190 : : }
27191 : : }
27192 : : break;
27193 : : default:;
27194 : : }
27195 : : }
27196 : : }
27197 : 148 : switch (TREE_CODE (_q20))
27198 : : {
27199 : 148 : case SSA_NAME:
27200 : 148 : if (gimple *_d2 = get_def (valueize, _q20))
27201 : : {
27202 : 146 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27203 : 292 : switch (gimple_assign_rhs_code (_a2))
27204 : : {
27205 : 0 : case MINUS_EXPR:
27206 : 0 : {
27207 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
27208 : 0 : _q30 = do_valueize (valueize, _q30);
27209 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
27210 : 0 : _q31 = do_valueize (valueize, _q31);
27211 : 0 : if (zerop (_q21))
27212 : : {
27213 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
27214 : : {
27215 : 0 : switch (TREE_CODE (_p2))
27216 : : {
27217 : 0 : case SSA_NAME:
27218 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27219 : : {
27220 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27221 : 0 : switch (gimple_assign_rhs_code (_a3))
27222 : : {
27223 : 0 : case MINUS_EXPR:
27224 : 0 : {
27225 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
27226 : 0 : _q80 = do_valueize (valueize, _q80);
27227 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
27228 : 0 : _q81 = do_valueize (valueize, _q81);
27229 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
27230 : : {
27231 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
27232 : : {
27233 : 0 : {
27234 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p2 };
27235 : 0 : const enum tree_code cmp = UNEQ_EXPR;
27236 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27237 : : )
27238 : : {
27239 : 0 : gimple_seq *lseq = seq;
27240 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2941;
27241 : 0 : {
27242 : 0 : tree tem;
27243 : 0 : tem = captures[3];
27244 : 0 : res_op->set_value (tem);
27245 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 643, __FILE__, __LINE__, true);
27246 : 0 : return true;
27247 : : }
27248 : 0 : next_after_fail2941:;
27249 : : }
27250 : : }
27251 : : }
27252 : : }
27253 : : break;
27254 : : }
27255 : : default:;
27256 : : }
27257 : : }
27258 : : break;
27259 : : default:;
27260 : : }
27261 : : }
27262 : : }
27263 : 0 : if (integer_zerop (_q21))
27264 : : {
27265 : 0 : if (integer_zerop (_p1))
27266 : : {
27267 : 0 : switch (TREE_CODE (_p2))
27268 : : {
27269 : 0 : case SSA_NAME:
27270 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27271 : : {
27272 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27273 : 0 : switch (gimple_assign_rhs_code (_a3))
27274 : : {
27275 : 0 : case MINUS_EXPR:
27276 : 0 : {
27277 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
27278 : 0 : _q80 = do_valueize (valueize, _q80);
27279 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
27280 : 0 : _q81 = do_valueize (valueize, _q81);
27281 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
27282 : : {
27283 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
27284 : : {
27285 : 0 : {
27286 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p2 };
27287 : 0 : if (gimple_simplify_644 (res_op, seq, valueize, type, captures, UNEQ_EXPR))
27288 : 0 : return true;
27289 : : }
27290 : : }
27291 : : }
27292 : : break;
27293 : : }
27294 : : default:;
27295 : : }
27296 : : }
27297 : : break;
27298 : : default:;
27299 : : }
27300 : : }
27301 : : }
27302 : : break;
27303 : : }
27304 : : default:;
27305 : : }
27306 : : }
27307 : : break;
27308 : : default:;
27309 : : }
27310 : 194802 : break;
27311 : : }
27312 : 19486 : case NE_EXPR:
27313 : 19486 : {
27314 : 19486 : tree _q20 = gimple_assign_rhs1 (_a1);
27315 : 19486 : _q20 = do_valueize (valueize, _q20);
27316 : 19486 : tree _q21 = gimple_assign_rhs2 (_a1);
27317 : 19486 : _q21 = do_valueize (valueize, _q21);
27318 : 19486 : if (tree_swap_operands_p (_q20, _q21))
27319 : 281 : std::swap (_q20, _q21);
27320 : 19486 : if (zerop (_q21))
27321 : : {
27322 : 5711 : switch (TREE_CODE (_p2))
27323 : : {
27324 : 1902 : case SSA_NAME:
27325 : 1902 : if (gimple *_d2 = get_def (valueize, _p2))
27326 : : {
27327 : 1869 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27328 : 2334 : switch (gimple_assign_rhs_code (_a2))
27329 : : {
27330 : 2 : case NEGATE_EXPR:
27331 : 2 : {
27332 : 2 : tree _q60 = gimple_assign_rhs1 (_a2);
27333 : 2 : _q60 = do_valueize (valueize, _q60);
27334 : 2 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
27335 : : {
27336 : 2 : {
27337 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
27338 : 2 : const enum tree_code cmp = NE_EXPR;
27339 : 2 : if (!HONOR_SIGNED_ZEROS (type)
27340 : 2 : && bitwise_equal_p (captures[0], captures[1])
27341 : : )
27342 : : {
27343 : 0 : gimple_seq *lseq = seq;
27344 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2942;
27345 : 0 : {
27346 : 0 : tree tem;
27347 : 0 : tem = captures[1];
27348 : 0 : res_op->set_value (tem);
27349 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 645, __FILE__, __LINE__, true);
27350 : 0 : return true;
27351 : : }
27352 : 0 : next_after_fail2942:;
27353 : : }
27354 : : }
27355 : : }
27356 : : break;
27357 : : }
27358 : : default:;
27359 : : }
27360 : : }
27361 : : break;
27362 : 5711 : default:;
27363 : : }
27364 : 5711 : if (integer_zerop (_p2))
27365 : : {
27366 : 2840 : {
27367 : 2840 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
27368 : 2840 : const enum tree_code cmp = NE_EXPR;
27369 : 2840 : if (!HONOR_SIGNED_ZEROS (type)
27370 : 2840 : && bitwise_equal_p (captures[0], captures[1])
27371 : : )
27372 : : {
27373 : 3 : gimple_seq *lseq = seq;
27374 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2943;
27375 : 3 : {
27376 : 3 : tree tem;
27377 : 3 : tem = captures[1];
27378 : 3 : res_op->set_value (tem);
27379 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 646, __FILE__, __LINE__, true);
27380 : 3 : return true;
27381 : : }
27382 : 0 : next_after_fail2943:;
27383 : : }
27384 : : }
27385 : : }
27386 : : }
27387 : 19483 : switch (TREE_CODE (_q20))
27388 : : {
27389 : 19483 : case SSA_NAME:
27390 : 19483 : if (gimple *_d2 = get_def (valueize, _q20))
27391 : : {
27392 : 18922 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27393 : 30293 : switch (gimple_assign_rhs_code (_a2))
27394 : : {
27395 : 134 : case MINUS_EXPR:
27396 : 134 : {
27397 : 134 : tree _q30 = gimple_assign_rhs1 (_a2);
27398 : 134 : _q30 = do_valueize (valueize, _q30);
27399 : 134 : tree _q31 = gimple_assign_rhs2 (_a2);
27400 : 134 : _q31 = do_valueize (valueize, _q31);
27401 : 134 : if (zerop (_q21))
27402 : : {
27403 : 6 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
27404 : : {
27405 : 0 : switch (TREE_CODE (_p2))
27406 : : {
27407 : 0 : case SSA_NAME:
27408 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27409 : : {
27410 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27411 : 0 : switch (gimple_assign_rhs_code (_a3))
27412 : : {
27413 : 0 : case MINUS_EXPR:
27414 : 0 : {
27415 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
27416 : 0 : _q80 = do_valueize (valueize, _q80);
27417 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
27418 : 0 : _q81 = do_valueize (valueize, _q81);
27419 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
27420 : : {
27421 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
27422 : : {
27423 : 0 : {
27424 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
27425 : 0 : const enum tree_code cmp = NE_EXPR;
27426 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27427 : : )
27428 : : {
27429 : 0 : gimple_seq *lseq = seq;
27430 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2944;
27431 : 0 : {
27432 : 0 : tree tem;
27433 : 0 : tem = captures[0];
27434 : 0 : res_op->set_value (tem);
27435 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 647, __FILE__, __LINE__, true);
27436 : 0 : return true;
27437 : : }
27438 : 0 : next_after_fail2944:;
27439 : : }
27440 : : }
27441 : : }
27442 : : }
27443 : : break;
27444 : : }
27445 : : default:;
27446 : : }
27447 : : }
27448 : : break;
27449 : : default:;
27450 : : }
27451 : : }
27452 : : }
27453 : 134 : if (integer_zerop (_q21))
27454 : : {
27455 : 6 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
27456 : : {
27457 : 0 : if (integer_zerop (_p2))
27458 : : {
27459 : 0 : {
27460 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
27461 : 0 : if (gimple_simplify_645 (res_op, seq, valueize, type, captures, NE_EXPR))
27462 : 0 : return true;
27463 : : }
27464 : : }
27465 : : }
27466 : : }
27467 : : break;
27468 : : }
27469 : : default:;
27470 : : }
27471 : : }
27472 : : break;
27473 : : default:;
27474 : : }
27475 : 194802 : break;
27476 : : }
27477 : 243 : case LTGT_EXPR:
27478 : 243 : {
27479 : 243 : tree _q20 = gimple_assign_rhs1 (_a1);
27480 : 243 : _q20 = do_valueize (valueize, _q20);
27481 : 243 : tree _q21 = gimple_assign_rhs2 (_a1);
27482 : 243 : _q21 = do_valueize (valueize, _q21);
27483 : 243 : if (tree_swap_operands_p (_q20, _q21))
27484 : 38 : std::swap (_q20, _q21);
27485 : 243 : if (zerop (_q21))
27486 : : {
27487 : 0 : switch (TREE_CODE (_p2))
27488 : : {
27489 : 0 : case SSA_NAME:
27490 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
27491 : : {
27492 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27493 : 0 : switch (gimple_assign_rhs_code (_a2))
27494 : : {
27495 : 0 : case NEGATE_EXPR:
27496 : 0 : {
27497 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
27498 : 0 : _q60 = do_valueize (valueize, _q60);
27499 : 0 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
27500 : : {
27501 : 0 : {
27502 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
27503 : 0 : const enum tree_code cmp = LTGT_EXPR;
27504 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27505 : 0 : && bitwise_equal_p (captures[0], captures[1])
27506 : : )
27507 : : {
27508 : 0 : gimple_seq *lseq = seq;
27509 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2945;
27510 : 0 : {
27511 : 0 : tree tem;
27512 : 0 : tem = captures[1];
27513 : 0 : res_op->set_value (tem);
27514 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 645, __FILE__, __LINE__, true);
27515 : 0 : return true;
27516 : : }
27517 : 0 : next_after_fail2945:;
27518 : : }
27519 : : }
27520 : : }
27521 : : break;
27522 : : }
27523 : : default:;
27524 : : }
27525 : : }
27526 : : break;
27527 : 0 : default:;
27528 : : }
27529 : 0 : if (integer_zerop (_p2))
27530 : : {
27531 : 0 : {
27532 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
27533 : 0 : const enum tree_code cmp = LTGT_EXPR;
27534 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27535 : 0 : && bitwise_equal_p (captures[0], captures[1])
27536 : : )
27537 : : {
27538 : 0 : gimple_seq *lseq = seq;
27539 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2946;
27540 : 0 : {
27541 : 0 : tree tem;
27542 : 0 : tem = captures[1];
27543 : 0 : res_op->set_value (tem);
27544 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 646, __FILE__, __LINE__, true);
27545 : 0 : return true;
27546 : : }
27547 : 0 : next_after_fail2946:;
27548 : : }
27549 : : }
27550 : : }
27551 : : }
27552 : 243 : switch (TREE_CODE (_q20))
27553 : : {
27554 : 243 : case SSA_NAME:
27555 : 243 : if (gimple *_d2 = get_def (valueize, _q20))
27556 : : {
27557 : 233 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27558 : 446 : switch (gimple_assign_rhs_code (_a2))
27559 : : {
27560 : 0 : case MINUS_EXPR:
27561 : 0 : {
27562 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
27563 : 0 : _q30 = do_valueize (valueize, _q30);
27564 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
27565 : 0 : _q31 = do_valueize (valueize, _q31);
27566 : 0 : if (zerop (_q21))
27567 : : {
27568 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
27569 : : {
27570 : 0 : switch (TREE_CODE (_p2))
27571 : : {
27572 : 0 : case SSA_NAME:
27573 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27574 : : {
27575 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27576 : 0 : switch (gimple_assign_rhs_code (_a3))
27577 : : {
27578 : 0 : case MINUS_EXPR:
27579 : 0 : {
27580 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
27581 : 0 : _q80 = do_valueize (valueize, _q80);
27582 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
27583 : 0 : _q81 = do_valueize (valueize, _q81);
27584 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
27585 : : {
27586 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
27587 : : {
27588 : 0 : {
27589 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
27590 : 0 : const enum tree_code cmp = LTGT_EXPR;
27591 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27592 : : )
27593 : : {
27594 : 0 : gimple_seq *lseq = seq;
27595 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2947;
27596 : 0 : {
27597 : 0 : tree tem;
27598 : 0 : tem = captures[0];
27599 : 0 : res_op->set_value (tem);
27600 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 647, __FILE__, __LINE__, true);
27601 : 0 : return true;
27602 : : }
27603 : 0 : next_after_fail2947:;
27604 : : }
27605 : : }
27606 : : }
27607 : : }
27608 : : break;
27609 : : }
27610 : : default:;
27611 : : }
27612 : : }
27613 : : break;
27614 : : default:;
27615 : : }
27616 : : }
27617 : : }
27618 : 0 : if (integer_zerop (_q21))
27619 : : {
27620 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
27621 : : {
27622 : 0 : if (integer_zerop (_p2))
27623 : : {
27624 : 0 : {
27625 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
27626 : 0 : if (gimple_simplify_645 (res_op, seq, valueize, type, captures, LTGT_EXPR))
27627 : 0 : return true;
27628 : : }
27629 : : }
27630 : : }
27631 : : }
27632 : : break;
27633 : : }
27634 : : default:;
27635 : : }
27636 : : }
27637 : : break;
27638 : : default:;
27639 : : }
27640 : 194802 : break;
27641 : : }
27642 : 9327 : case GE_EXPR:
27643 : 9327 : {
27644 : 9327 : tree _q20 = gimple_assign_rhs1 (_a1);
27645 : 9327 : _q20 = do_valueize (valueize, _q20);
27646 : 9327 : tree _q21 = gimple_assign_rhs2 (_a1);
27647 : 9327 : _q21 = do_valueize (valueize, _q21);
27648 : 9327 : switch (TREE_CODE (_q20))
27649 : : {
27650 : 9300 : case SSA_NAME:
27651 : 9300 : if (gimple *_d2 = get_def (valueize, _q20))
27652 : : {
27653 : 8857 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27654 : 8911 : switch (gimple_assign_rhs_code (_a2))
27655 : : {
27656 : 0 : CASE_CONVERT:
27657 : 0 : {
27658 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
27659 : 0 : _q30 = do_valueize (valueize, _q30);
27660 : 0 : if (zerop (_q21))
27661 : : {
27662 : 0 : switch (TREE_CODE (_p2))
27663 : : {
27664 : 0 : case SSA_NAME:
27665 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27666 : : {
27667 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27668 : 0 : switch (gimple_assign_rhs_code (_a3))
27669 : : {
27670 : 0 : case NEGATE_EXPR:
27671 : 0 : {
27672 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
27673 : 0 : _q70 = do_valueize (valueize, _q70);
27674 : 0 : if ((_q70 == _p1 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _p1, 0) && types_match (_q70, _p1)))
27675 : : {
27676 : 0 : {
27677 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
27678 : 0 : const enum tree_code cmp = GE_EXPR;
27679 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
27680 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
27681 : 0 : && element_precision (captures[1])
27682 : 0 : <= element_precision (captures[0])
27683 : 0 : && bitwise_equal_p (captures[1], captures[2])
27684 : : )
27685 : : {
27686 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
27687 : : )
27688 : : {
27689 : 0 : {
27690 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
27691 : 0 : if (types_match (captures[0], stype)
27692 : : )
27693 : : {
27694 : 0 : gimple_seq *lseq = seq;
27695 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2948;
27696 : 0 : {
27697 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
27698 : 0 : res_op->ops[0] = captures[0];
27699 : 0 : res_op->resimplify (lseq, valueize);
27700 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 651, __FILE__, __LINE__, true);
27701 : 0 : return true;
27702 : : }
27703 : 0 : next_after_fail2948:;
27704 : : }
27705 : : else
27706 : : {
27707 : 0 : gimple_seq *lseq = seq;
27708 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2949;
27709 : 0 : {
27710 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
27711 : 0 : {
27712 : 0 : tree _o1[1], _r1;
27713 : 0 : _o1[0] = captures[2];
27714 : 0 : if (stype != TREE_TYPE (_o1[0]) /* XXX */
27715 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
27716 : : {
27717 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
27718 : 0 : tem_op.resimplify (lseq, valueize);
27719 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
27720 : 0 : if (!_r1) goto next_after_fail2949;
27721 : : }
27722 : : else
27723 : : _r1 = _o1[0];
27724 : 0 : res_op->ops[0] = _r1;
27725 : : }
27726 : 0 : res_op->resimplify (lseq, valueize);
27727 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 652, __FILE__, __LINE__, true);
27728 : 0 : return true;
27729 : : }
27730 : 0 : next_after_fail2949:;
27731 : : }
27732 : : }
27733 : : }
27734 : : else
27735 : : {
27736 : 0 : gimple_seq *lseq = seq;
27737 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2950;
27738 : 0 : {
27739 : 0 : res_op->set_op (ABS_EXPR, type, 1);
27740 : 0 : res_op->ops[0] = captures[2];
27741 : 0 : res_op->resimplify (lseq, valueize);
27742 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 653, __FILE__, __LINE__, true);
27743 : 0 : return true;
27744 : : }
27745 : 0 : next_after_fail2950:;
27746 : : }
27747 : : }
27748 : : }
27749 : : }
27750 : : break;
27751 : : }
27752 : : default:;
27753 : : }
27754 : : }
27755 : : break;
27756 : : default:;
27757 : : }
27758 : : }
27759 : : break;
27760 : : }
27761 : : default:;
27762 : : }
27763 : : }
27764 : : break;
27765 : 9327 : default:;
27766 : : }
27767 : 9327 : if (zerop (_q21))
27768 : : {
27769 : 1976 : switch (TREE_CODE (_p2))
27770 : : {
27771 : 1130 : case SSA_NAME:
27772 : 1130 : if (gimple *_d2 = get_def (valueize, _p2))
27773 : : {
27774 : 1127 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27775 : 160 : switch (gimple_assign_rhs_code (_a2))
27776 : : {
27777 : 0 : case NEGATE_EXPR:
27778 : 0 : {
27779 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
27780 : 0 : _q60 = do_valueize (valueize, _q60);
27781 : 0 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
27782 : : {
27783 : 0 : {
27784 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q20, _p1 };
27785 : 0 : const enum tree_code cmp = GE_EXPR;
27786 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
27787 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
27788 : 0 : && element_precision (captures[1])
27789 : 0 : <= element_precision (captures[0])
27790 : 0 : && bitwise_equal_p (captures[1], captures[2])
27791 : : )
27792 : : {
27793 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
27794 : : )
27795 : : {
27796 : 0 : {
27797 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
27798 : 0 : if (types_match (captures[0], stype)
27799 : : )
27800 : : {
27801 : 0 : gimple_seq *lseq = seq;
27802 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2951;
27803 : 0 : {
27804 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
27805 : 0 : res_op->ops[0] = captures[0];
27806 : 0 : res_op->resimplify (lseq, valueize);
27807 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 651, __FILE__, __LINE__, true);
27808 : 0 : return true;
27809 : : }
27810 : 0 : next_after_fail2951:;
27811 : : }
27812 : : else
27813 : : {
27814 : 0 : gimple_seq *lseq = seq;
27815 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2952;
27816 : 0 : {
27817 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
27818 : 0 : {
27819 : 0 : tree _o1[1], _r1;
27820 : 0 : _o1[0] = captures[2];
27821 : 0 : if (stype != TREE_TYPE (_o1[0]) /* XXX */
27822 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
27823 : : {
27824 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
27825 : 0 : tem_op.resimplify (lseq, valueize);
27826 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
27827 : 0 : if (!_r1) goto next_after_fail2952;
27828 : : }
27829 : : else
27830 : : _r1 = _o1[0];
27831 : 0 : res_op->ops[0] = _r1;
27832 : : }
27833 : 0 : res_op->resimplify (lseq, valueize);
27834 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 652, __FILE__, __LINE__, true);
27835 : 0 : return true;
27836 : : }
27837 : 0 : next_after_fail2952:;
27838 : : }
27839 : : }
27840 : : }
27841 : : else
27842 : : {
27843 : 0 : gimple_seq *lseq = seq;
27844 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2953;
27845 : 0 : {
27846 : 0 : res_op->set_op (ABS_EXPR, type, 1);
27847 : 0 : res_op->ops[0] = captures[2];
27848 : 0 : res_op->resimplify (lseq, valueize);
27849 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 653, __FILE__, __LINE__, true);
27850 : 0 : return true;
27851 : : }
27852 : 0 : next_after_fail2953:;
27853 : : }
27854 : : }
27855 : : }
27856 : : }
27857 : : break;
27858 : : }
27859 : : default:;
27860 : : }
27861 : : }
27862 : : break;
27863 : : default:;
27864 : : }
27865 : : }
27866 : 9327 : switch (TREE_CODE (_q20))
27867 : : {
27868 : 9300 : case SSA_NAME:
27869 : 9300 : if (gimple *_d2 = get_def (valueize, _q20))
27870 : : {
27871 : 8857 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27872 : 8911 : switch (gimple_assign_rhs_code (_a2))
27873 : : {
27874 : 10 : case MINUS_EXPR:
27875 : 10 : {
27876 : 10 : tree _q30 = gimple_assign_rhs1 (_a2);
27877 : 10 : _q30 = do_valueize (valueize, _q30);
27878 : 10 : tree _q31 = gimple_assign_rhs2 (_a2);
27879 : 10 : _q31 = do_valueize (valueize, _q31);
27880 : 10 : if (zerop (_q21))
27881 : : {
27882 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
27883 : : {
27884 : 0 : switch (TREE_CODE (_p2))
27885 : : {
27886 : 0 : case SSA_NAME:
27887 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27888 : : {
27889 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27890 : 0 : switch (gimple_assign_rhs_code (_a3))
27891 : : {
27892 : 0 : case MINUS_EXPR:
27893 : 0 : {
27894 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
27895 : 0 : _q80 = do_valueize (valueize, _q80);
27896 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
27897 : 0 : _q81 = do_valueize (valueize, _q81);
27898 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
27899 : : {
27900 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
27901 : : {
27902 : 0 : {
27903 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
27904 : 0 : const enum tree_code cmp = GE_EXPR;
27905 : 0 : if (!HONOR_SIGNED_ZEROS (type)
27906 : 0 : && !TYPE_UNSIGNED (type)
27907 : : )
27908 : : {
27909 : 0 : gimple_seq *lseq = seq;
27910 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2954;
27911 : 0 : {
27912 : 0 : res_op->set_op (ABS_EXPR, type, 1);
27913 : 0 : res_op->ops[0] = captures[0];
27914 : 0 : res_op->resimplify (lseq, valueize);
27915 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 654, __FILE__, __LINE__, true);
27916 : 0 : return true;
27917 : : }
27918 : 0 : next_after_fail2954:;
27919 : : }
27920 : : }
27921 : : }
27922 : : }
27923 : : break;
27924 : : }
27925 : : default:;
27926 : : }
27927 : : }
27928 : : break;
27929 : : default:;
27930 : : }
27931 : : }
27932 : : }
27933 : : break;
27934 : : }
27935 : : default:;
27936 : : }
27937 : : }
27938 : : break;
27939 : : default:;
27940 : : }
27941 : : break;
27942 : : }
27943 : 18231 : case GT_EXPR:
27944 : 18231 : {
27945 : 18231 : tree _q20 = gimple_assign_rhs1 (_a1);
27946 : 18231 : _q20 = do_valueize (valueize, _q20);
27947 : 18231 : tree _q21 = gimple_assign_rhs2 (_a1);
27948 : 18231 : _q21 = do_valueize (valueize, _q21);
27949 : 18231 : switch (TREE_CODE (_q20))
27950 : : {
27951 : 18231 : case SSA_NAME:
27952 : 18231 : if (gimple *_d2 = get_def (valueize, _q20))
27953 : : {
27954 : 16317 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
27955 : 15701 : switch (gimple_assign_rhs_code (_a2))
27956 : : {
27957 : 2 : CASE_CONVERT:
27958 : 2 : {
27959 : 2 : tree _q30 = gimple_assign_rhs1 (_a2);
27960 : 2 : _q30 = do_valueize (valueize, _q30);
27961 : 2 : if (zerop (_q21))
27962 : : {
27963 : 0 : switch (TREE_CODE (_p2))
27964 : : {
27965 : 0 : case SSA_NAME:
27966 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
27967 : : {
27968 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
27969 : 0 : switch (gimple_assign_rhs_code (_a3))
27970 : : {
27971 : 0 : case NEGATE_EXPR:
27972 : 0 : {
27973 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
27974 : 0 : _q70 = do_valueize (valueize, _q70);
27975 : 0 : if ((_q70 == _p1 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _p1, 0) && types_match (_q70, _p1)))
27976 : : {
27977 : 0 : {
27978 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
27979 : 0 : const enum tree_code cmp = GT_EXPR;
27980 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
27981 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
27982 : 0 : && element_precision (captures[1])
27983 : 0 : <= element_precision (captures[0])
27984 : 0 : && bitwise_equal_p (captures[1], captures[2])
27985 : : )
27986 : : {
27987 : 0 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
27988 : : )
27989 : : {
27990 : 0 : {
27991 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
27992 : 0 : if (types_match (captures[0], stype)
27993 : : )
27994 : : {
27995 : 0 : gimple_seq *lseq = seq;
27996 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2955;
27997 : 0 : {
27998 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
27999 : 0 : res_op->ops[0] = captures[0];
28000 : 0 : res_op->resimplify (lseq, valueize);
28001 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 651, __FILE__, __LINE__, true);
28002 : 0 : return true;
28003 : : }
28004 : 0 : next_after_fail2955:;
28005 : : }
28006 : : else
28007 : : {
28008 : 0 : gimple_seq *lseq = seq;
28009 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2956;
28010 : 0 : {
28011 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
28012 : 0 : {
28013 : 0 : tree _o1[1], _r1;
28014 : 0 : _o1[0] = captures[2];
28015 : 0 : if (stype != TREE_TYPE (_o1[0]) /* XXX */
28016 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
28017 : : {
28018 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
28019 : 0 : tem_op.resimplify (lseq, valueize);
28020 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
28021 : 0 : if (!_r1) goto next_after_fail2956;
28022 : : }
28023 : : else
28024 : : _r1 = _o1[0];
28025 : 0 : res_op->ops[0] = _r1;
28026 : : }
28027 : 0 : res_op->resimplify (lseq, valueize);
28028 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 652, __FILE__, __LINE__, true);
28029 : 0 : return true;
28030 : : }
28031 : 0 : next_after_fail2956:;
28032 : : }
28033 : : }
28034 : : }
28035 : : else
28036 : : {
28037 : 0 : gimple_seq *lseq = seq;
28038 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2957;
28039 : 0 : {
28040 : 0 : res_op->set_op (ABS_EXPR, type, 1);
28041 : 0 : res_op->ops[0] = captures[2];
28042 : 0 : res_op->resimplify (lseq, valueize);
28043 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 653, __FILE__, __LINE__, true);
28044 : 0 : return true;
28045 : : }
28046 : 0 : next_after_fail2957:;
28047 : : }
28048 : : }
28049 : : }
28050 : : }
28051 : : break;
28052 : : }
28053 : : default:;
28054 : : }
28055 : : }
28056 : : break;
28057 : : default:;
28058 : : }
28059 : : }
28060 : : break;
28061 : : }
28062 : : default:;
28063 : : }
28064 : : }
28065 : : break;
28066 : 18231 : default:;
28067 : : }
28068 : 18231 : if (zerop (_q21))
28069 : : {
28070 : 557 : switch (TREE_CODE (_p2))
28071 : : {
28072 : 69 : case SSA_NAME:
28073 : 69 : if (gimple *_d2 = get_def (valueize, _p2))
28074 : : {
28075 : 63 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
28076 : 76 : switch (gimple_assign_rhs_code (_a2))
28077 : : {
28078 : 6 : case NEGATE_EXPR:
28079 : 6 : {
28080 : 6 : tree _q60 = gimple_assign_rhs1 (_a2);
28081 : 6 : _q60 = do_valueize (valueize, _q60);
28082 : 6 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
28083 : : {
28084 : 6 : {
28085 : 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q20, _p1 };
28086 : 6 : const enum tree_code cmp = GT_EXPR;
28087 : 6 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
28088 : 6 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
28089 : 12 : && element_precision (captures[1])
28090 : 6 : <= element_precision (captures[0])
28091 : 12 : && bitwise_equal_p (captures[1], captures[2])
28092 : : )
28093 : : {
28094 : 6 : if (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
28095 : : )
28096 : : {
28097 : 0 : {
28098 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
28099 : 0 : if (types_match (captures[0], stype)
28100 : : )
28101 : : {
28102 : 0 : gimple_seq *lseq = seq;
28103 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2958;
28104 : 0 : {
28105 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
28106 : 0 : res_op->ops[0] = captures[0];
28107 : 0 : res_op->resimplify (lseq, valueize);
28108 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 651, __FILE__, __LINE__, true);
28109 : 0 : return true;
28110 : : }
28111 : 0 : next_after_fail2958:;
28112 : : }
28113 : : else
28114 : : {
28115 : 0 : gimple_seq *lseq = seq;
28116 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2959;
28117 : 0 : {
28118 : 0 : res_op->set_op (ABSU_EXPR, type, 1);
28119 : 0 : {
28120 : 0 : tree _o1[1], _r1;
28121 : 0 : _o1[0] = captures[2];
28122 : 0 : if (stype != TREE_TYPE (_o1[0]) /* XXX */
28123 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
28124 : : {
28125 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
28126 : 0 : tem_op.resimplify (lseq, valueize);
28127 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
28128 : 0 : if (!_r1) goto next_after_fail2959;
28129 : : }
28130 : : else
28131 : : _r1 = _o1[0];
28132 : 0 : res_op->ops[0] = _r1;
28133 : : }
28134 : 0 : res_op->resimplify (lseq, valueize);
28135 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 652, __FILE__, __LINE__, true);
28136 : 0 : return true;
28137 : : }
28138 : 0 : next_after_fail2959:;
28139 : : }
28140 : : }
28141 : : }
28142 : : else
28143 : : {
28144 : 6 : gimple_seq *lseq = seq;
28145 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2960;
28146 : 6 : {
28147 : 6 : res_op->set_op (ABS_EXPR, type, 1);
28148 : 6 : res_op->ops[0] = captures[2];
28149 : 6 : res_op->resimplify (lseq, valueize);
28150 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 653, __FILE__, __LINE__, true);
28151 : 6 : return true;
28152 : : }
28153 : 0 : next_after_fail2960:;
28154 : : }
28155 : : }
28156 : : }
28157 : : }
28158 : : break;
28159 : : }
28160 : : default:;
28161 : : }
28162 : : }
28163 : : break;
28164 : : default:;
28165 : : }
28166 : : }
28167 : 18225 : switch (TREE_CODE (_q20))
28168 : : {
28169 : 18225 : case SSA_NAME:
28170 : 18225 : if (gimple *_d2 = get_def (valueize, _q20))
28171 : : {
28172 : 16311 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
28173 : 15701 : switch (gimple_assign_rhs_code (_a2))
28174 : : {
28175 : 69 : case MINUS_EXPR:
28176 : 69 : {
28177 : 69 : tree _q30 = gimple_assign_rhs1 (_a2);
28178 : 69 : _q30 = do_valueize (valueize, _q30);
28179 : 69 : tree _q31 = gimple_assign_rhs2 (_a2);
28180 : 69 : _q31 = do_valueize (valueize, _q31);
28181 : 69 : if (zerop (_q21))
28182 : : {
28183 : 30 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
28184 : : {
28185 : 0 : switch (TREE_CODE (_p2))
28186 : : {
28187 : 0 : case SSA_NAME:
28188 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
28189 : : {
28190 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
28191 : 0 : switch (gimple_assign_rhs_code (_a3))
28192 : : {
28193 : 0 : case MINUS_EXPR:
28194 : 0 : {
28195 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
28196 : 0 : _q80 = do_valueize (valueize, _q80);
28197 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
28198 : 0 : _q81 = do_valueize (valueize, _q81);
28199 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
28200 : : {
28201 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
28202 : : {
28203 : 0 : {
28204 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
28205 : 0 : const enum tree_code cmp = GT_EXPR;
28206 : 0 : if (!HONOR_SIGNED_ZEROS (type)
28207 : 0 : && !TYPE_UNSIGNED (type)
28208 : : )
28209 : : {
28210 : 0 : gimple_seq *lseq = seq;
28211 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2961;
28212 : 0 : {
28213 : 0 : res_op->set_op (ABS_EXPR, type, 1);
28214 : 0 : res_op->ops[0] = captures[0];
28215 : 0 : res_op->resimplify (lseq, valueize);
28216 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 654, __FILE__, __LINE__, true);
28217 : 0 : return true;
28218 : : }
28219 : 0 : next_after_fail2961:;
28220 : : }
28221 : : }
28222 : : }
28223 : : }
28224 : : break;
28225 : : }
28226 : : default:;
28227 : : }
28228 : : }
28229 : : break;
28230 : : default:;
28231 : : }
28232 : : }
28233 : : }
28234 : : break;
28235 : : }
28236 : : default:;
28237 : : }
28238 : : }
28239 : : break;
28240 : : default:;
28241 : : }
28242 : : break;
28243 : : }
28244 : 9269 : case LE_EXPR:
28245 : 9269 : {
28246 : 9269 : tree _q20 = gimple_assign_rhs1 (_a1);
28247 : 9269 : _q20 = do_valueize (valueize, _q20);
28248 : 9269 : tree _q21 = gimple_assign_rhs2 (_a1);
28249 : 9269 : _q21 = do_valueize (valueize, _q21);
28250 : 9269 : switch (TREE_CODE (_q20))
28251 : : {
28252 : 9267 : case SSA_NAME:
28253 : 9267 : if (gimple *_d2 = get_def (valueize, _q20))
28254 : : {
28255 : 8721 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
28256 : 9782 : switch (gimple_assign_rhs_code (_a2))
28257 : : {
28258 : 28 : CASE_CONVERT:
28259 : 28 : {
28260 : 28 : tree _q30 = gimple_assign_rhs1 (_a2);
28261 : 28 : _q30 = do_valueize (valueize, _q30);
28262 : 28 : if (zerop (_q21))
28263 : : {
28264 : 0 : switch (TREE_CODE (_p2))
28265 : : {
28266 : 0 : case SSA_NAME:
28267 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
28268 : : {
28269 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
28270 : 0 : switch (gimple_assign_rhs_code (_a3))
28271 : : {
28272 : 0 : case NEGATE_EXPR:
28273 : 0 : {
28274 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
28275 : 0 : _q70 = do_valueize (valueize, _q70);
28276 : 0 : if ((_q70 == _p1 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _p1, 0) && types_match (_q70, _p1)))
28277 : : {
28278 : 0 : {
28279 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
28280 : 0 : const enum tree_code cmp = LE_EXPR;
28281 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
28282 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
28283 : 0 : && element_precision (captures[1])
28284 : 0 : <= element_precision (captures[0])
28285 : 0 : && bitwise_equal_p (captures[1], captures[2])
28286 : : )
28287 : : {
28288 : 0 : if ((ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
28289 : 0 : && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
28290 : 0 : || TYPE_UNSIGNED (TREE_TYPE (captures[2]))
28291 : : )
28292 : : {
28293 : 0 : {
28294 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
28295 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
28296 : 0 : if (types_match (captures[0], stype)
28297 : : )
28298 : : {
28299 : 0 : gimple_seq *lseq = seq;
28300 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2962;
28301 : 0 : {
28302 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28303 : 0 : {
28304 : 0 : tree _o1[1], _r1;
28305 : 0 : {
28306 : 0 : tree _o2[1], _r2;
28307 : 0 : _o2[0] = captures[0];
28308 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28309 : 0 : tem_op.resimplify (lseq, valueize);
28310 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28311 : 0 : if (!_r2) goto next_after_fail2962;
28312 : 0 : _o1[0] = _r2;
28313 : : }
28314 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28315 : 0 : (*res_op).ops[0] = _o1[0];
28316 : 0 : (*res_op).resimplify (lseq, valueize);
28317 : : }
28318 : 0 : if (type != res_op->type
28319 : 0 : && !useless_type_conversion_p (type, res_op->type))
28320 : : {
28321 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2962;
28322 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28323 : 0 : res_op->resimplify (lseq, valueize);
28324 : : }
28325 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 659, __FILE__, __LINE__, true);
28326 : 0 : return true;
28327 : : }
28328 : 0 : next_after_fail2962:;
28329 : : }
28330 : : else
28331 : : {
28332 : 0 : gimple_seq *lseq = seq;
28333 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2963;
28334 : 0 : {
28335 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28336 : 0 : {
28337 : 0 : tree _o1[1], _r1;
28338 : 0 : {
28339 : 0 : tree _o2[1], _r2;
28340 : 0 : {
28341 : 0 : tree _o3[1], _r3;
28342 : 0 : _o3[0] = captures[2];
28343 : 0 : if (stype != TREE_TYPE (_o3[0]) /* XXX */
28344 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o3[0])))
28345 : : {
28346 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o3[0]);
28347 : 0 : tem_op.resimplify (lseq, valueize);
28348 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
28349 : 0 : if (!_r3) goto next_after_fail2963;
28350 : : }
28351 : : else
28352 : : _r3 = _o3[0];
28353 : 0 : _o2[0] = _r3;
28354 : : }
28355 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28356 : 0 : tem_op.resimplify (lseq, valueize);
28357 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28358 : 0 : if (!_r2) goto next_after_fail2963;
28359 : 0 : _o1[0] = _r2;
28360 : : }
28361 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28362 : 0 : (*res_op).ops[0] = _o1[0];
28363 : 0 : (*res_op).resimplify (lseq, valueize);
28364 : : }
28365 : 0 : if (type != res_op->type
28366 : 0 : && !useless_type_conversion_p (type, res_op->type))
28367 : : {
28368 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2963;
28369 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28370 : 0 : res_op->resimplify (lseq, valueize);
28371 : : }
28372 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 660, __FILE__, __LINE__, true);
28373 : 0 : return true;
28374 : : }
28375 : 0 : next_after_fail2963:;
28376 : : }
28377 : : }
28378 : : }
28379 : : else
28380 : : {
28381 : 0 : gimple_seq *lseq = seq;
28382 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2964;
28383 : 0 : {
28384 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28385 : 0 : {
28386 : 0 : tree _o1[1], _r1;
28387 : 0 : {
28388 : 0 : tree _o2[1], _r2;
28389 : 0 : _o2[0] = captures[2];
28390 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
28391 : 0 : tem_op.resimplify (lseq, valueize);
28392 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28393 : 0 : if (!_r2) goto next_after_fail2964;
28394 : 0 : _o1[0] = _r2;
28395 : : }
28396 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28397 : 0 : (*res_op).ops[0] = _o1[0];
28398 : 0 : (*res_op).resimplify (lseq, valueize);
28399 : : }
28400 : 0 : if (type != res_op->type
28401 : 0 : && !useless_type_conversion_p (type, res_op->type))
28402 : : {
28403 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2964;
28404 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28405 : 0 : res_op->resimplify (lseq, valueize);
28406 : : }
28407 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 661, __FILE__, __LINE__, true);
28408 : 0 : return true;
28409 : : }
28410 : 0 : next_after_fail2964:;
28411 : : }
28412 : : }
28413 : : }
28414 : : }
28415 : : break;
28416 : : }
28417 : : default:;
28418 : : }
28419 : : }
28420 : : break;
28421 : : default:;
28422 : : }
28423 : : }
28424 : : break;
28425 : : }
28426 : : default:;
28427 : : }
28428 : : }
28429 : : break;
28430 : 9269 : default:;
28431 : : }
28432 : 9269 : if (zerop (_q21))
28433 : : {
28434 : 881 : switch (TREE_CODE (_p2))
28435 : : {
28436 : 133 : case SSA_NAME:
28437 : 133 : if (gimple *_d2 = get_def (valueize, _p2))
28438 : : {
28439 : 133 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
28440 : 210 : switch (gimple_assign_rhs_code (_a2))
28441 : : {
28442 : 0 : case NEGATE_EXPR:
28443 : 0 : {
28444 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
28445 : 0 : _q60 = do_valueize (valueize, _q60);
28446 : 0 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
28447 : : {
28448 : 0 : {
28449 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q20, _p1 };
28450 : 0 : const enum tree_code cmp = LE_EXPR;
28451 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
28452 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
28453 : 0 : && element_precision (captures[1])
28454 : 0 : <= element_precision (captures[0])
28455 : 0 : && bitwise_equal_p (captures[1], captures[2])
28456 : : )
28457 : : {
28458 : 0 : if ((ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
28459 : 0 : && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
28460 : 0 : || TYPE_UNSIGNED (TREE_TYPE (captures[2]))
28461 : : )
28462 : : {
28463 : 0 : {
28464 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
28465 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
28466 : 0 : if (types_match (captures[0], stype)
28467 : : )
28468 : : {
28469 : 0 : gimple_seq *lseq = seq;
28470 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2965;
28471 : 0 : {
28472 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28473 : 0 : {
28474 : 0 : tree _o1[1], _r1;
28475 : 0 : {
28476 : 0 : tree _o2[1], _r2;
28477 : 0 : _o2[0] = captures[0];
28478 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28479 : 0 : tem_op.resimplify (lseq, valueize);
28480 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28481 : 0 : if (!_r2) goto next_after_fail2965;
28482 : 0 : _o1[0] = _r2;
28483 : : }
28484 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28485 : 0 : (*res_op).ops[0] = _o1[0];
28486 : 0 : (*res_op).resimplify (lseq, valueize);
28487 : : }
28488 : 0 : if (type != res_op->type
28489 : 0 : && !useless_type_conversion_p (type, res_op->type))
28490 : : {
28491 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2965;
28492 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28493 : 0 : res_op->resimplify (lseq, valueize);
28494 : : }
28495 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 659, __FILE__, __LINE__, true);
28496 : 0 : return true;
28497 : : }
28498 : 0 : next_after_fail2965:;
28499 : : }
28500 : : else
28501 : : {
28502 : 0 : gimple_seq *lseq = seq;
28503 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2966;
28504 : 0 : {
28505 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28506 : 0 : {
28507 : 0 : tree _o1[1], _r1;
28508 : 0 : {
28509 : 0 : tree _o2[1], _r2;
28510 : 0 : {
28511 : 0 : tree _o3[1], _r3;
28512 : 0 : _o3[0] = captures[2];
28513 : 0 : if (stype != TREE_TYPE (_o3[0]) /* XXX */
28514 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o3[0])))
28515 : : {
28516 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o3[0]);
28517 : 0 : tem_op.resimplify (lseq, valueize);
28518 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
28519 : 0 : if (!_r3) goto next_after_fail2966;
28520 : : }
28521 : : else
28522 : : _r3 = _o3[0];
28523 : 0 : _o2[0] = _r3;
28524 : : }
28525 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28526 : 0 : tem_op.resimplify (lseq, valueize);
28527 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28528 : 0 : if (!_r2) goto next_after_fail2966;
28529 : 0 : _o1[0] = _r2;
28530 : : }
28531 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28532 : 0 : (*res_op).ops[0] = _o1[0];
28533 : 0 : (*res_op).resimplify (lseq, valueize);
28534 : : }
28535 : 0 : if (type != res_op->type
28536 : 0 : && !useless_type_conversion_p (type, res_op->type))
28537 : : {
28538 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2966;
28539 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28540 : 0 : res_op->resimplify (lseq, valueize);
28541 : : }
28542 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 660, __FILE__, __LINE__, true);
28543 : 0 : return true;
28544 : : }
28545 : 0 : next_after_fail2966:;
28546 : : }
28547 : : }
28548 : : }
28549 : : else
28550 : : {
28551 : 0 : gimple_seq *lseq = seq;
28552 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2967;
28553 : 0 : {
28554 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28555 : 0 : {
28556 : 0 : tree _o1[1], _r1;
28557 : 0 : {
28558 : 0 : tree _o2[1], _r2;
28559 : 0 : _o2[0] = captures[2];
28560 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
28561 : 0 : tem_op.resimplify (lseq, valueize);
28562 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28563 : 0 : if (!_r2) goto next_after_fail2967;
28564 : 0 : _o1[0] = _r2;
28565 : : }
28566 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28567 : 0 : (*res_op).ops[0] = _o1[0];
28568 : 0 : (*res_op).resimplify (lseq, valueize);
28569 : : }
28570 : 0 : if (type != res_op->type
28571 : 0 : && !useless_type_conversion_p (type, res_op->type))
28572 : : {
28573 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2967;
28574 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28575 : 0 : res_op->resimplify (lseq, valueize);
28576 : : }
28577 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 661, __FILE__, __LINE__, true);
28578 : 0 : return true;
28579 : : }
28580 : 0 : next_after_fail2967:;
28581 : : }
28582 : : }
28583 : : }
28584 : : }
28585 : : break;
28586 : : }
28587 : : default:;
28588 : : }
28589 : : }
28590 : : break;
28591 : : default:;
28592 : : }
28593 : : }
28594 : 9269 : switch (TREE_CODE (_q20))
28595 : : {
28596 : 9267 : case SSA_NAME:
28597 : 9267 : if (gimple *_d2 = get_def (valueize, _q20))
28598 : : {
28599 : 8721 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
28600 : 9782 : switch (gimple_assign_rhs_code (_a2))
28601 : : {
28602 : 120 : case MINUS_EXPR:
28603 : 120 : {
28604 : 120 : tree _q30 = gimple_assign_rhs1 (_a2);
28605 : 120 : _q30 = do_valueize (valueize, _q30);
28606 : 120 : tree _q31 = gimple_assign_rhs2 (_a2);
28607 : 120 : _q31 = do_valueize (valueize, _q31);
28608 : 120 : if (zerop (_q21))
28609 : : {
28610 : 120 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
28611 : : {
28612 : 0 : switch (TREE_CODE (_p2))
28613 : : {
28614 : 0 : case SSA_NAME:
28615 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
28616 : : {
28617 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
28618 : 0 : switch (gimple_assign_rhs_code (_a3))
28619 : : {
28620 : 0 : case MINUS_EXPR:
28621 : 0 : {
28622 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
28623 : 0 : _q80 = do_valueize (valueize, _q80);
28624 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
28625 : 0 : _q81 = do_valueize (valueize, _q81);
28626 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
28627 : : {
28628 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
28629 : : {
28630 : 0 : {
28631 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
28632 : 0 : const enum tree_code cmp = LE_EXPR;
28633 : 0 : if (!HONOR_SIGNED_ZEROS (type)
28634 : 0 : && !TYPE_UNSIGNED (type)
28635 : : )
28636 : : {
28637 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
28638 : 0 : && !TYPE_OVERFLOW_WRAPS (type)
28639 : : )
28640 : : {
28641 : 0 : {
28642 : 0 : tree utype = unsigned_type_for (type);
28643 : 0 : gimple_seq *lseq = seq;
28644 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2968;
28645 : 0 : {
28646 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28647 : 0 : {
28648 : 0 : tree _o1[1], _r1;
28649 : 0 : {
28650 : 0 : tree _o2[1], _r2;
28651 : 0 : _o2[0] = captures[0];
28652 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28653 : 0 : tem_op.resimplify (lseq, valueize);
28654 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28655 : 0 : if (!_r2) goto next_after_fail2968;
28656 : 0 : _o1[0] = _r2;
28657 : : }
28658 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28659 : 0 : (*res_op).ops[0] = _o1[0];
28660 : 0 : (*res_op).resimplify (lseq, valueize);
28661 : : }
28662 : 0 : if (type != res_op->type
28663 : 0 : && !useless_type_conversion_p (type, res_op->type))
28664 : : {
28665 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2968;
28666 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28667 : 0 : res_op->resimplify (lseq, valueize);
28668 : : }
28669 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 662, __FILE__, __LINE__, true);
28670 : 0 : return true;
28671 : : }
28672 : 0 : next_after_fail2968:;
28673 : : }
28674 : : }
28675 : : else
28676 : : {
28677 : 0 : gimple_seq *lseq = seq;
28678 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2969;
28679 : 0 : {
28680 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
28681 : 0 : {
28682 : 0 : tree _o1[1], _r1;
28683 : 0 : _o1[0] = captures[0];
28684 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
28685 : 0 : tem_op.resimplify (lseq, valueize);
28686 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
28687 : 0 : if (!_r1) goto next_after_fail2969;
28688 : 0 : res_op->ops[0] = _r1;
28689 : : }
28690 : 0 : res_op->resimplify (lseq, valueize);
28691 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 663, __FILE__, __LINE__, true);
28692 : 0 : return true;
28693 : : }
28694 : 0 : next_after_fail2969:;
28695 : : }
28696 : : }
28697 : : }
28698 : : }
28699 : : }
28700 : : break;
28701 : : }
28702 : : default:;
28703 : : }
28704 : : }
28705 : : break;
28706 : : default:;
28707 : : }
28708 : : }
28709 : : }
28710 : : break;
28711 : : }
28712 : : default:;
28713 : : }
28714 : : }
28715 : : break;
28716 : : default:;
28717 : : }
28718 : : break;
28719 : : }
28720 : 22146 : case LT_EXPR:
28721 : 22146 : {
28722 : 22146 : tree _q20 = gimple_assign_rhs1 (_a1);
28723 : 22146 : _q20 = do_valueize (valueize, _q20);
28724 : 22146 : tree _q21 = gimple_assign_rhs2 (_a1);
28725 : 22146 : _q21 = do_valueize (valueize, _q21);
28726 : 22146 : switch (TREE_CODE (_q20))
28727 : : {
28728 : 22146 : case SSA_NAME:
28729 : 22146 : if (gimple *_d2 = get_def (valueize, _q20))
28730 : : {
28731 : 19802 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
28732 : 24571 : switch (gimple_assign_rhs_code (_a2))
28733 : : {
28734 : 0 : CASE_CONVERT:
28735 : 0 : {
28736 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
28737 : 0 : _q30 = do_valueize (valueize, _q30);
28738 : 0 : if (zerop (_q21))
28739 : : {
28740 : 0 : switch (TREE_CODE (_p2))
28741 : : {
28742 : 0 : case SSA_NAME:
28743 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
28744 : : {
28745 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
28746 : 0 : switch (gimple_assign_rhs_code (_a3))
28747 : : {
28748 : 0 : case NEGATE_EXPR:
28749 : 0 : {
28750 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
28751 : 0 : _q70 = do_valueize (valueize, _q70);
28752 : 0 : if ((_q70 == _p1 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _p1, 0) && types_match (_q70, _p1)))
28753 : : {
28754 : 0 : {
28755 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _p1 };
28756 : 0 : const enum tree_code cmp = LT_EXPR;
28757 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
28758 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
28759 : 0 : && element_precision (captures[1])
28760 : 0 : <= element_precision (captures[0])
28761 : 0 : && bitwise_equal_p (captures[1], captures[2])
28762 : : )
28763 : : {
28764 : 0 : if ((ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
28765 : 0 : && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
28766 : 0 : || TYPE_UNSIGNED (TREE_TYPE (captures[2]))
28767 : : )
28768 : : {
28769 : 0 : {
28770 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
28771 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
28772 : 0 : if (types_match (captures[0], stype)
28773 : : )
28774 : : {
28775 : 0 : gimple_seq *lseq = seq;
28776 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2970;
28777 : 0 : {
28778 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28779 : 0 : {
28780 : 0 : tree _o1[1], _r1;
28781 : 0 : {
28782 : 0 : tree _o2[1], _r2;
28783 : 0 : _o2[0] = captures[0];
28784 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28785 : 0 : tem_op.resimplify (lseq, valueize);
28786 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28787 : 0 : if (!_r2) goto next_after_fail2970;
28788 : 0 : _o1[0] = _r2;
28789 : : }
28790 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28791 : 0 : (*res_op).ops[0] = _o1[0];
28792 : 0 : (*res_op).resimplify (lseq, valueize);
28793 : : }
28794 : 0 : if (type != res_op->type
28795 : 0 : && !useless_type_conversion_p (type, res_op->type))
28796 : : {
28797 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2970;
28798 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28799 : 0 : res_op->resimplify (lseq, valueize);
28800 : : }
28801 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 659, __FILE__, __LINE__, true);
28802 : 0 : return true;
28803 : : }
28804 : 0 : next_after_fail2970:;
28805 : : }
28806 : : else
28807 : : {
28808 : 0 : gimple_seq *lseq = seq;
28809 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2971;
28810 : 0 : {
28811 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28812 : 0 : {
28813 : 0 : tree _o1[1], _r1;
28814 : 0 : {
28815 : 0 : tree _o2[1], _r2;
28816 : 0 : {
28817 : 0 : tree _o3[1], _r3;
28818 : 0 : _o3[0] = captures[2];
28819 : 0 : if (stype != TREE_TYPE (_o3[0]) /* XXX */
28820 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o3[0])))
28821 : : {
28822 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o3[0]);
28823 : 0 : tem_op.resimplify (lseq, valueize);
28824 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
28825 : 0 : if (!_r3) goto next_after_fail2971;
28826 : : }
28827 : : else
28828 : : _r3 = _o3[0];
28829 : 0 : _o2[0] = _r3;
28830 : : }
28831 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28832 : 0 : tem_op.resimplify (lseq, valueize);
28833 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28834 : 0 : if (!_r2) goto next_after_fail2971;
28835 : 0 : _o1[0] = _r2;
28836 : : }
28837 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28838 : 0 : (*res_op).ops[0] = _o1[0];
28839 : 0 : (*res_op).resimplify (lseq, valueize);
28840 : : }
28841 : 0 : if (type != res_op->type
28842 : 0 : && !useless_type_conversion_p (type, res_op->type))
28843 : : {
28844 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2971;
28845 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28846 : 0 : res_op->resimplify (lseq, valueize);
28847 : : }
28848 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 660, __FILE__, __LINE__, true);
28849 : 0 : return true;
28850 : : }
28851 : 0 : next_after_fail2971:;
28852 : : }
28853 : : }
28854 : : }
28855 : : else
28856 : : {
28857 : 0 : gimple_seq *lseq = seq;
28858 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2972;
28859 : 0 : {
28860 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28861 : 0 : {
28862 : 0 : tree _o1[1], _r1;
28863 : 0 : {
28864 : 0 : tree _o2[1], _r2;
28865 : 0 : _o2[0] = captures[2];
28866 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
28867 : 0 : tem_op.resimplify (lseq, valueize);
28868 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28869 : 0 : if (!_r2) goto next_after_fail2972;
28870 : 0 : _o1[0] = _r2;
28871 : : }
28872 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28873 : 0 : (*res_op).ops[0] = _o1[0];
28874 : 0 : (*res_op).resimplify (lseq, valueize);
28875 : : }
28876 : 0 : if (type != res_op->type
28877 : 0 : && !useless_type_conversion_p (type, res_op->type))
28878 : : {
28879 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2972;
28880 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28881 : 0 : res_op->resimplify (lseq, valueize);
28882 : : }
28883 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 661, __FILE__, __LINE__, true);
28884 : 0 : return true;
28885 : : }
28886 : 0 : next_after_fail2972:;
28887 : : }
28888 : : }
28889 : : }
28890 : : }
28891 : : break;
28892 : : }
28893 : : default:;
28894 : : }
28895 : : }
28896 : : break;
28897 : : default:;
28898 : : }
28899 : : }
28900 : : break;
28901 : : }
28902 : : default:;
28903 : : }
28904 : : }
28905 : : break;
28906 : 22146 : default:;
28907 : : }
28908 : 22146 : if (zerop (_q21))
28909 : : {
28910 : 6441 : switch (TREE_CODE (_p2))
28911 : : {
28912 : 3375 : case SSA_NAME:
28913 : 3375 : if (gimple *_d2 = get_def (valueize, _p2))
28914 : : {
28915 : 3296 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
28916 : 3308 : switch (gimple_assign_rhs_code (_a2))
28917 : : {
28918 : 10 : case NEGATE_EXPR:
28919 : 10 : {
28920 : 10 : tree _q60 = gimple_assign_rhs1 (_a2);
28921 : 10 : _q60 = do_valueize (valueize, _q60);
28922 : 10 : if ((_q60 == _p1 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p1, 0) && types_match (_q60, _p1)))
28923 : : {
28924 : 0 : {
28925 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q20, _p1 };
28926 : 0 : const enum tree_code cmp = LT_EXPR;
28927 : 0 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE (captures[1]))
28928 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
28929 : 0 : && element_precision (captures[1])
28930 : 0 : <= element_precision (captures[0])
28931 : 0 : && bitwise_equal_p (captures[1], captures[2])
28932 : : )
28933 : : {
28934 : 0 : if ((ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
28935 : 0 : && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
28936 : 0 : || TYPE_UNSIGNED (TREE_TYPE (captures[2]))
28937 : : )
28938 : : {
28939 : 0 : {
28940 : 0 : tree stype = signed_type_for (TREE_TYPE (captures[2]));
28941 : 0 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
28942 : 0 : if (types_match (captures[0], stype)
28943 : : )
28944 : : {
28945 : 0 : gimple_seq *lseq = seq;
28946 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2973;
28947 : 0 : {
28948 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28949 : 0 : {
28950 : 0 : tree _o1[1], _r1;
28951 : 0 : {
28952 : 0 : tree _o2[1], _r2;
28953 : 0 : _o2[0] = captures[0];
28954 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
28955 : 0 : tem_op.resimplify (lseq, valueize);
28956 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
28957 : 0 : if (!_r2) goto next_after_fail2973;
28958 : 0 : _o1[0] = _r2;
28959 : : }
28960 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
28961 : 0 : (*res_op).ops[0] = _o1[0];
28962 : 0 : (*res_op).resimplify (lseq, valueize);
28963 : : }
28964 : 0 : if (type != res_op->type
28965 : 0 : && !useless_type_conversion_p (type, res_op->type))
28966 : : {
28967 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2973;
28968 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28969 : 0 : res_op->resimplify (lseq, valueize);
28970 : : }
28971 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 659, __FILE__, __LINE__, true);
28972 : 0 : return true;
28973 : : }
28974 : 0 : next_after_fail2973:;
28975 : : }
28976 : : else
28977 : : {
28978 : 0 : gimple_seq *lseq = seq;
28979 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2974;
28980 : 0 : {
28981 : 0 : res_op->set_op (NOP_EXPR, type, 1);
28982 : 0 : {
28983 : 0 : tree _o1[1], _r1;
28984 : 0 : {
28985 : 0 : tree _o2[1], _r2;
28986 : 0 : {
28987 : 0 : tree _o3[1], _r3;
28988 : 0 : _o3[0] = captures[2];
28989 : 0 : if (stype != TREE_TYPE (_o3[0]) /* XXX */
28990 : 0 : && !useless_type_conversion_p (stype, TREE_TYPE (_o3[0])))
28991 : : {
28992 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o3[0]);
28993 : 0 : tem_op.resimplify (lseq, valueize);
28994 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
28995 : 0 : if (!_r3) goto next_after_fail2974;
28996 : : }
28997 : : else
28998 : : _r3 = _o3[0];
28999 : 0 : _o2[0] = _r3;
29000 : : }
29001 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
29002 : 0 : tem_op.resimplify (lseq, valueize);
29003 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29004 : 0 : if (!_r2) goto next_after_fail2974;
29005 : 0 : _o1[0] = _r2;
29006 : : }
29007 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
29008 : 0 : (*res_op).ops[0] = _o1[0];
29009 : 0 : (*res_op).resimplify (lseq, valueize);
29010 : : }
29011 : 0 : if (type != res_op->type
29012 : 0 : && !useless_type_conversion_p (type, res_op->type))
29013 : : {
29014 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2974;
29015 : 0 : res_op->set_op (NOP_EXPR, type, 1);
29016 : 0 : res_op->resimplify (lseq, valueize);
29017 : : }
29018 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 660, __FILE__, __LINE__, true);
29019 : 0 : return true;
29020 : : }
29021 : 0 : next_after_fail2974:;
29022 : : }
29023 : : }
29024 : : }
29025 : : else
29026 : : {
29027 : 0 : gimple_seq *lseq = seq;
29028 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2975;
29029 : 0 : {
29030 : 0 : res_op->set_op (NOP_EXPR, type, 1);
29031 : 0 : {
29032 : 0 : tree _o1[1], _r1;
29033 : 0 : {
29034 : 0 : tree _o2[1], _r2;
29035 : 0 : _o2[0] = captures[2];
29036 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
29037 : 0 : tem_op.resimplify (lseq, valueize);
29038 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29039 : 0 : if (!_r2) goto next_after_fail2975;
29040 : 0 : _o1[0] = _r2;
29041 : : }
29042 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
29043 : 0 : (*res_op).ops[0] = _o1[0];
29044 : 0 : (*res_op).resimplify (lseq, valueize);
29045 : : }
29046 : 0 : if (type != res_op->type
29047 : 0 : && !useless_type_conversion_p (type, res_op->type))
29048 : : {
29049 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2975;
29050 : 0 : res_op->set_op (NOP_EXPR, type, 1);
29051 : 0 : res_op->resimplify (lseq, valueize);
29052 : : }
29053 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 661, __FILE__, __LINE__, true);
29054 : 0 : return true;
29055 : : }
29056 : 0 : next_after_fail2975:;
29057 : : }
29058 : : }
29059 : : }
29060 : : }
29061 : : break;
29062 : : }
29063 : : default:;
29064 : : }
29065 : : }
29066 : : break;
29067 : : default:;
29068 : : }
29069 : : }
29070 : 22146 : switch (TREE_CODE (_q20))
29071 : : {
29072 : 22146 : case SSA_NAME:
29073 : 22146 : if (gimple *_d2 = get_def (valueize, _q20))
29074 : : {
29075 : 19802 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
29076 : 24571 : switch (gimple_assign_rhs_code (_a2))
29077 : : {
29078 : 97 : case MINUS_EXPR:
29079 : 97 : {
29080 : 97 : tree _q30 = gimple_assign_rhs1 (_a2);
29081 : 97 : _q30 = do_valueize (valueize, _q30);
29082 : 97 : tree _q31 = gimple_assign_rhs2 (_a2);
29083 : 97 : _q31 = do_valueize (valueize, _q31);
29084 : 97 : if (zerop (_q21))
29085 : : {
29086 : 82 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
29087 : : {
29088 : 0 : switch (TREE_CODE (_p2))
29089 : : {
29090 : 0 : case SSA_NAME:
29091 : 0 : if (gimple *_d3 = get_def (valueize, _p2))
29092 : : {
29093 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
29094 : 0 : switch (gimple_assign_rhs_code (_a3))
29095 : : {
29096 : 0 : case MINUS_EXPR:
29097 : 0 : {
29098 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
29099 : 0 : _q80 = do_valueize (valueize, _q80);
29100 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
29101 : 0 : _q81 = do_valueize (valueize, _q81);
29102 : 0 : if ((_q80 == _q31 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q31, 0) && types_match (_q80, _q31)))
29103 : : {
29104 : 0 : if ((_q81 == _q30 && ! TREE_SIDE_EFFECTS (_q81)) || (operand_equal_p (_q81, _q30, 0) && types_match (_q81, _q30)))
29105 : : {
29106 : 0 : {
29107 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q30, _q31 };
29108 : 0 : const enum tree_code cmp = LT_EXPR;
29109 : 0 : if (!HONOR_SIGNED_ZEROS (type)
29110 : 0 : && !TYPE_UNSIGNED (type)
29111 : : )
29112 : : {
29113 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
29114 : 0 : && !TYPE_OVERFLOW_WRAPS (type)
29115 : : )
29116 : : {
29117 : 0 : {
29118 : 0 : tree utype = unsigned_type_for (type);
29119 : 0 : gimple_seq *lseq = seq;
29120 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2976;
29121 : 0 : {
29122 : 0 : res_op->set_op (NOP_EXPR, type, 1);
29123 : 0 : {
29124 : 0 : tree _o1[1], _r1;
29125 : 0 : {
29126 : 0 : tree _o2[1], _r2;
29127 : 0 : _o2[0] = captures[0];
29128 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
29129 : 0 : tem_op.resimplify (lseq, valueize);
29130 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29131 : 0 : if (!_r2) goto next_after_fail2976;
29132 : 0 : _o1[0] = _r2;
29133 : : }
29134 : 0 : (*res_op).set_op (NEGATE_EXPR, TREE_TYPE (_o1[0]), 1);
29135 : 0 : (*res_op).ops[0] = _o1[0];
29136 : 0 : (*res_op).resimplify (lseq, valueize);
29137 : : }
29138 : 0 : if (type != res_op->type
29139 : 0 : && !useless_type_conversion_p (type, res_op->type))
29140 : : {
29141 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2976;
29142 : 0 : res_op->set_op (NOP_EXPR, type, 1);
29143 : 0 : res_op->resimplify (lseq, valueize);
29144 : : }
29145 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 662, __FILE__, __LINE__, true);
29146 : 0 : return true;
29147 : : }
29148 : 0 : next_after_fail2976:;
29149 : : }
29150 : : }
29151 : : else
29152 : : {
29153 : 0 : gimple_seq *lseq = seq;
29154 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2977;
29155 : 0 : {
29156 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
29157 : 0 : {
29158 : 0 : tree _o1[1], _r1;
29159 : 0 : _o1[0] = captures[0];
29160 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
29161 : 0 : tem_op.resimplify (lseq, valueize);
29162 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29163 : 0 : if (!_r1) goto next_after_fail2977;
29164 : 0 : res_op->ops[0] = _r1;
29165 : : }
29166 : 0 : res_op->resimplify (lseq, valueize);
29167 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 663, __FILE__, __LINE__, true);
29168 : 0 : return true;
29169 : : }
29170 : 0 : next_after_fail2977:;
29171 : : }
29172 : : }
29173 : : }
29174 : : }
29175 : : }
29176 : : break;
29177 : : }
29178 : : default:;
29179 : : }
29180 : : }
29181 : : break;
29182 : : default:;
29183 : : }
29184 : : }
29185 : : }
29186 : : break;
29187 : : }
29188 : : default:;
29189 : : }
29190 : : }
29191 : : break;
29192 : : default:;
29193 : : }
29194 : : break;
29195 : : }
29196 : : default:;
29197 : : }
29198 : : }
29199 : : break;
29200 : 194802 : default:;
29201 : : }
29202 : 194802 : {
29203 : 194802 : tree _p0_pops[1];
29204 : 194802 : if (gimple_logical_inverted_value (_p0, _p0_pops, valueize))
29205 : : {
29206 : 6317 : tree _q20 = _p0_pops[0];
29207 : 6317 : if (gimple_truth_valued_p (_q20, valueize))
29208 : : {
29209 : 53 : {
29210 : 53 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
29211 : 53 : if (VEC_COND_EXPR == VEC_COND_EXPR
29212 : : || TYPE_UNSIGNED (TREE_TYPE (captures[0]))
29213 : : )
29214 : : {
29215 : 53 : gimple_seq *lseq = seq;
29216 : 53 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2978;
29217 : 53 : {
29218 : 53 : res_op->set_op (VEC_COND_EXPR, type, 3);
29219 : 53 : res_op->ops[0] = captures[0];
29220 : 53 : res_op->ops[1] = captures[2];
29221 : 53 : res_op->ops[2] = captures[1];
29222 : 53 : res_op->resimplify (lseq, valueize);
29223 : 53 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1254, __FILE__, __LINE__, true);
29224 : 53 : return true;
29225 : : }
29226 : 0 : next_after_fail2978:;
29227 : : }
29228 : : }
29229 : : }
29230 : : }
29231 : : }
29232 : 194749 : switch (TREE_CODE (_p1))
29233 : : {
29234 : 51935 : case SSA_NAME:
29235 : 51935 : if (gimple *_d1 = get_def (valueize, _p1))
29236 : : {
29237 : 45820 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
29238 : 55884 : switch (gimple_assign_rhs_code (_a1))
29239 : : {
29240 : 3579 : case VIEW_CONVERT_EXPR:
29241 : 3579 : {
29242 : 3579 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
29243 : 3579 : if ((TREE_CODE (_q30) == SSA_NAME
29244 : 3579 : || is_gimple_min_invariant (_q30)))
29245 : : {
29246 : 3579 : _q30 = do_valueize (valueize, _q30);
29247 : 3579 : switch (TREE_CODE (_q30))
29248 : : {
29249 : 3579 : case SSA_NAME:
29250 : 3579 : if (gimple *_d2 = get_def (valueize, _q30))
29251 : : {
29252 : 3477 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
29253 : 2104 : switch (gimple_assign_rhs_code (_a2))
29254 : : {
29255 : 111 : case NEGATE_EXPR:
29256 : 111 : {
29257 : 111 : tree _q40 = gimple_assign_rhs1 (_a2);
29258 : 111 : _q40 = do_valueize (valueize, _q40);
29259 : 111 : {
29260 : 111 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _p2 };
29261 : 111 : {
29262 : 111 : tree op_type = TREE_TYPE (captures[1]);
29263 : 111 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NEG), op_type)
29264 : 111 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29265 : : )
29266 : : {
29267 : 0 : gimple_seq *lseq = seq;
29268 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2979;
29269 : 0 : {
29270 : 0 : res_op->set_op (CFN_COND_NEG, type, 3);
29271 : 0 : res_op->ops[0] = captures[0];
29272 : 0 : {
29273 : 0 : tree _o1[1], _r1;
29274 : 0 : _o1[0] = captures[2];
29275 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29276 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29277 : : {
29278 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29279 : 0 : tem_op.resimplify (lseq, valueize);
29280 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29281 : 0 : if (!_r1) goto next_after_fail2979;
29282 : : }
29283 : : else
29284 : : _r1 = _o1[0];
29285 : 0 : res_op->ops[1] = _r1;
29286 : : }
29287 : 0 : res_op->ops[2] = captures[3];
29288 : 0 : res_op->resimplify (lseq, valueize);
29289 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1271, __FILE__, __LINE__, true);
29290 : 0 : return true;
29291 : : }
29292 : 111 : next_after_fail2979:;
29293 : : }
29294 : : }
29295 : : }
29296 : 111 : break;
29297 : : }
29298 : 0 : case BIT_NOT_EXPR:
29299 : 0 : {
29300 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
29301 : 0 : _q40 = do_valueize (valueize, _q40);
29302 : 0 : {
29303 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _p2 };
29304 : 0 : {
29305 : 0 : tree op_type = TREE_TYPE (captures[1]);
29306 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NOT), op_type)
29307 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29308 : : )
29309 : : {
29310 : 0 : gimple_seq *lseq = seq;
29311 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2980;
29312 : 0 : {
29313 : 0 : res_op->set_op (CFN_COND_NOT, type, 3);
29314 : 0 : res_op->ops[0] = captures[0];
29315 : 0 : {
29316 : 0 : tree _o1[1], _r1;
29317 : 0 : _o1[0] = captures[2];
29318 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29319 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29320 : : {
29321 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29322 : 0 : tem_op.resimplify (lseq, valueize);
29323 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29324 : 0 : if (!_r1) goto next_after_fail2980;
29325 : : }
29326 : : else
29327 : : _r1 = _o1[0];
29328 : 0 : res_op->ops[1] = _r1;
29329 : : }
29330 : 0 : res_op->ops[2] = captures[3];
29331 : 0 : res_op->resimplify (lseq, valueize);
29332 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1271, __FILE__, __LINE__, true);
29333 : 0 : return true;
29334 : : }
29335 : 0 : next_after_fail2980:;
29336 : : }
29337 : : }
29338 : : }
29339 : 0 : break;
29340 : : }
29341 : : default:;
29342 : : }
29343 : : }
29344 : : break;
29345 : : default:;
29346 : : }
29347 : : }
29348 : : break;
29349 : : }
29350 : 50 : case NEGATE_EXPR:
29351 : 50 : {
29352 : 50 : tree _q30 = gimple_assign_rhs1 (_a1);
29353 : 50 : _q30 = do_valueize (valueize, _q30);
29354 : 50 : {
29355 : 50 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _p2 };
29356 : 50 : {
29357 : 50 : tree op_type = TREE_TYPE (captures[1]);
29358 : 50 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NEG), op_type)
29359 : 50 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29360 : : )
29361 : : {
29362 : 0 : gimple_seq *lseq = seq;
29363 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2981;
29364 : 0 : {
29365 : 0 : res_op->set_op (CFN_COND_NEG, type, 3);
29366 : 0 : res_op->ops[0] = captures[0];
29367 : 0 : {
29368 : 0 : tree _o1[1], _r1;
29369 : 0 : _o1[0] = captures[2];
29370 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29371 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29372 : : {
29373 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29374 : 0 : tem_op.resimplify (lseq, valueize);
29375 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29376 : 0 : if (!_r1) goto next_after_fail2981;
29377 : : }
29378 : : else
29379 : : _r1 = _o1[0];
29380 : 0 : res_op->ops[1] = _r1;
29381 : : }
29382 : 0 : res_op->ops[2] = captures[3];
29383 : 0 : res_op->resimplify (lseq, valueize);
29384 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1271, __FILE__, __LINE__, true);
29385 : 0 : return true;
29386 : : }
29387 : 50 : next_after_fail2981:;
29388 : : }
29389 : : }
29390 : : }
29391 : 50 : break;
29392 : : }
29393 : 0 : case BIT_NOT_EXPR:
29394 : 0 : {
29395 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
29396 : 0 : _q30 = do_valueize (valueize, _q30);
29397 : 0 : {
29398 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _p2 };
29399 : 0 : {
29400 : 0 : tree op_type = TREE_TYPE (captures[1]);
29401 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NOT), op_type)
29402 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29403 : : )
29404 : : {
29405 : 0 : gimple_seq *lseq = seq;
29406 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2982;
29407 : 0 : {
29408 : 0 : res_op->set_op (CFN_COND_NOT, type, 3);
29409 : 0 : res_op->ops[0] = captures[0];
29410 : 0 : {
29411 : 0 : tree _o1[1], _r1;
29412 : 0 : _o1[0] = captures[2];
29413 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29414 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29415 : : {
29416 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29417 : 0 : tem_op.resimplify (lseq, valueize);
29418 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29419 : 0 : if (!_r1) goto next_after_fail2982;
29420 : : }
29421 : : else
29422 : : _r1 = _o1[0];
29423 : 0 : res_op->ops[1] = _r1;
29424 : : }
29425 : 0 : res_op->ops[2] = captures[3];
29426 : 0 : res_op->resimplify (lseq, valueize);
29427 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1271, __FILE__, __LINE__, true);
29428 : 0 : return true;
29429 : : }
29430 : 0 : next_after_fail2982:;
29431 : : }
29432 : : }
29433 : : }
29434 : 0 : break;
29435 : : }
29436 : : default:;
29437 : : }
29438 : : }
29439 : : break;
29440 : 194749 : default:;
29441 : : }
29442 : 194749 : switch (TREE_CODE (_p2))
29443 : : {
29444 : 44381 : case SSA_NAME:
29445 : 44381 : if (gimple *_d1 = get_def (valueize, _p2))
29446 : : {
29447 : 38560 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
29448 : 40330 : switch (gimple_assign_rhs_code (_a1))
29449 : : {
29450 : 5258 : case VIEW_CONVERT_EXPR:
29451 : 5258 : {
29452 : 5258 : tree _q40 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
29453 : 5258 : if ((TREE_CODE (_q40) == SSA_NAME
29454 : 5258 : || is_gimple_min_invariant (_q40)))
29455 : : {
29456 : 5258 : _q40 = do_valueize (valueize, _q40);
29457 : 5258 : switch (TREE_CODE (_q40))
29458 : : {
29459 : 5258 : case SSA_NAME:
29460 : 5258 : if (gimple *_d2 = get_def (valueize, _q40))
29461 : : {
29462 : 5190 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
29463 : 3523 : switch (gimple_assign_rhs_code (_a2))
29464 : : {
29465 : 20 : case NEGATE_EXPR:
29466 : 20 : {
29467 : 20 : tree _q50 = gimple_assign_rhs1 (_a2);
29468 : 20 : _q50 = do_valueize (valueize, _q50);
29469 : 20 : {
29470 : 20 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50 };
29471 : 20 : {
29472 : 20 : tree op_type = TREE_TYPE (captures[2]);
29473 : 20 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NEG), op_type)
29474 : 20 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29475 : : )
29476 : : {
29477 : 0 : gimple_seq *lseq = seq;
29478 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2983;
29479 : 0 : {
29480 : 0 : res_op->set_op (CFN_COND_NEG, type, 3);
29481 : 0 : {
29482 : 0 : tree _o1[1], _r1;
29483 : 0 : _o1[0] = captures[0];
29484 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
29485 : 0 : tem_op.resimplify (lseq, valueize);
29486 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29487 : 0 : if (!_r1) goto next_after_fail2983;
29488 : 0 : res_op->ops[0] = _r1;
29489 : : }
29490 : 0 : {
29491 : 0 : tree _o1[1], _r1;
29492 : 0 : _o1[0] = captures[3];
29493 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29494 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29495 : : {
29496 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29497 : 0 : tem_op.resimplify (lseq, valueize);
29498 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29499 : 0 : if (!_r1) goto next_after_fail2983;
29500 : : }
29501 : : else
29502 : : _r1 = _o1[0];
29503 : 0 : res_op->ops[1] = _r1;
29504 : : }
29505 : 0 : res_op->ops[2] = captures[1];
29506 : 0 : res_op->resimplify (lseq, valueize);
29507 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1272, __FILE__, __LINE__, true);
29508 : 0 : return true;
29509 : : }
29510 : 20 : next_after_fail2983:;
29511 : : }
29512 : : }
29513 : : }
29514 : 20 : break;
29515 : : }
29516 : 0 : case BIT_NOT_EXPR:
29517 : 0 : {
29518 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
29519 : 0 : _q50 = do_valueize (valueize, _q50);
29520 : 0 : {
29521 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50 };
29522 : 0 : {
29523 : 0 : tree op_type = TREE_TYPE (captures[2]);
29524 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NOT), op_type)
29525 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29526 : : )
29527 : : {
29528 : 0 : gimple_seq *lseq = seq;
29529 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2984;
29530 : 0 : {
29531 : 0 : res_op->set_op (CFN_COND_NOT, type, 3);
29532 : 0 : {
29533 : 0 : tree _o1[1], _r1;
29534 : 0 : _o1[0] = captures[0];
29535 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
29536 : 0 : tem_op.resimplify (lseq, valueize);
29537 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29538 : 0 : if (!_r1) goto next_after_fail2984;
29539 : 0 : res_op->ops[0] = _r1;
29540 : : }
29541 : 0 : {
29542 : 0 : tree _o1[1], _r1;
29543 : 0 : _o1[0] = captures[3];
29544 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29545 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29546 : : {
29547 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29548 : 0 : tem_op.resimplify (lseq, valueize);
29549 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29550 : 0 : if (!_r1) goto next_after_fail2984;
29551 : : }
29552 : : else
29553 : : _r1 = _o1[0];
29554 : 0 : res_op->ops[1] = _r1;
29555 : : }
29556 : 0 : res_op->ops[2] = captures[1];
29557 : 0 : res_op->resimplify (lseq, valueize);
29558 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1272, __FILE__, __LINE__, true);
29559 : 0 : return true;
29560 : : }
29561 : 0 : next_after_fail2984:;
29562 : : }
29563 : : }
29564 : : }
29565 : 0 : break;
29566 : : }
29567 : : default:;
29568 : : }
29569 : : }
29570 : : break;
29571 : : default:;
29572 : : }
29573 : : }
29574 : : break;
29575 : : }
29576 : 46 : case NEGATE_EXPR:
29577 : 46 : {
29578 : 46 : tree _q40 = gimple_assign_rhs1 (_a1);
29579 : 46 : _q40 = do_valueize (valueize, _q40);
29580 : 46 : {
29581 : 46 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40 };
29582 : 46 : {
29583 : 46 : tree op_type = TREE_TYPE (captures[2]);
29584 : 46 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NEG), op_type)
29585 : 46 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29586 : : )
29587 : : {
29588 : 0 : gimple_seq *lseq = seq;
29589 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2985;
29590 : 0 : {
29591 : 0 : res_op->set_op (CFN_COND_NEG, type, 3);
29592 : 0 : {
29593 : 0 : tree _o1[1], _r1;
29594 : 0 : _o1[0] = captures[0];
29595 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
29596 : 0 : tem_op.resimplify (lseq, valueize);
29597 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29598 : 0 : if (!_r1) goto next_after_fail2985;
29599 : 0 : res_op->ops[0] = _r1;
29600 : : }
29601 : 0 : {
29602 : 0 : tree _o1[1], _r1;
29603 : 0 : _o1[0] = captures[3];
29604 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29605 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29606 : : {
29607 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29608 : 0 : tem_op.resimplify (lseq, valueize);
29609 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29610 : 0 : if (!_r1) goto next_after_fail2985;
29611 : : }
29612 : : else
29613 : : _r1 = _o1[0];
29614 : 0 : res_op->ops[1] = _r1;
29615 : : }
29616 : 0 : res_op->ops[2] = captures[1];
29617 : 0 : res_op->resimplify (lseq, valueize);
29618 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1272, __FILE__, __LINE__, true);
29619 : 0 : return true;
29620 : : }
29621 : 46 : next_after_fail2985:;
29622 : : }
29623 : : }
29624 : : }
29625 : 46 : break;
29626 : : }
29627 : 2 : case BIT_NOT_EXPR:
29628 : 2 : {
29629 : 2 : tree _q40 = gimple_assign_rhs1 (_a1);
29630 : 2 : _q40 = do_valueize (valueize, _q40);
29631 : 2 : {
29632 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40 };
29633 : 2 : {
29634 : 2 : tree op_type = TREE_TYPE (captures[2]);
29635 : 2 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_NOT), op_type)
29636 : 2 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29637 : : )
29638 : : {
29639 : 0 : gimple_seq *lseq = seq;
29640 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2986;
29641 : 0 : {
29642 : 0 : res_op->set_op (CFN_COND_NOT, type, 3);
29643 : 0 : {
29644 : 0 : tree _o1[1], _r1;
29645 : 0 : _o1[0] = captures[0];
29646 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
29647 : 0 : tem_op.resimplify (lseq, valueize);
29648 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29649 : 0 : if (!_r1) goto next_after_fail2986;
29650 : 0 : res_op->ops[0] = _r1;
29651 : : }
29652 : 0 : {
29653 : 0 : tree _o1[1], _r1;
29654 : 0 : _o1[0] = captures[3];
29655 : 0 : if (type != TREE_TYPE (_o1[0]) /* XXX */
29656 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
29657 : : {
29658 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
29659 : 0 : tem_op.resimplify (lseq, valueize);
29660 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
29661 : 0 : if (!_r1) goto next_after_fail2986;
29662 : : }
29663 : : else
29664 : : _r1 = _o1[0];
29665 : 0 : res_op->ops[1] = _r1;
29666 : : }
29667 : 0 : res_op->ops[2] = captures[1];
29668 : 0 : res_op->resimplify (lseq, valueize);
29669 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1272, __FILE__, __LINE__, true);
29670 : 0 : return true;
29671 : : }
29672 : 2 : next_after_fail2986:;
29673 : : }
29674 : : }
29675 : : }
29676 : 2 : break;
29677 : : }
29678 : : default:;
29679 : : }
29680 : : }
29681 : : break;
29682 : 194749 : default:;
29683 : : }
29684 : 194749 : switch (TREE_CODE (_p1))
29685 : : {
29686 : 51935 : case SSA_NAME:
29687 : 51935 : if (gimple *_d1 = get_def (valueize, _p1))
29688 : : {
29689 : 45820 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
29690 : 55884 : switch (gimple_assign_rhs_code (_a1))
29691 : : {
29692 : 3579 : case VIEW_CONVERT_EXPR:
29693 : 3579 : {
29694 : 3579 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
29695 : 3579 : if ((TREE_CODE (_q30) == SSA_NAME
29696 : 3579 : || is_gimple_min_invariant (_q30)))
29697 : : {
29698 : 3579 : _q30 = do_valueize (valueize, _q30);
29699 : 3579 : switch (TREE_CODE (_q30))
29700 : : {
29701 : 3579 : case SSA_NAME:
29702 : 3579 : if (gimple *_d2 = get_def (valueize, _q30))
29703 : : {
29704 : 3477 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
29705 : 2104 : switch (gimple_assign_rhs_code (_a2))
29706 : : {
29707 : 552 : case PLUS_EXPR:
29708 : 552 : {
29709 : 552 : tree _q40 = gimple_assign_rhs1 (_a2);
29710 : 552 : _q40 = do_valueize (valueize, _q40);
29711 : 552 : tree _q41 = gimple_assign_rhs2 (_a2);
29712 : 552 : _q41 = do_valueize (valueize, _q41);
29713 : 552 : if (tree_swap_operands_p (_q40, _q41))
29714 : 11 : std::swap (_q40, _q41);
29715 : 552 : {
29716 : 552 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
29717 : 552 : {
29718 : 552 : tree op_type = TREE_TYPE (captures[1]);
29719 : 552 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_ADD), op_type)
29720 : 31 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29721 : 583 : && single_use (captures[1])
29722 : : )
29723 : : {
29724 : 31 : gimple_seq *lseq = seq;
29725 : 31 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2987;
29726 : 31 : {
29727 : 31 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29728 : 31 : {
29729 : 31 : tree _o1[4], _r1;
29730 : 31 : _o1[0] = captures[0];
29731 : 31 : _o1[1] = captures[2];
29732 : 31 : _o1[2] = captures[3];
29733 : 31 : {
29734 : 31 : tree _o2[1], _r2;
29735 : 31 : _o2[0] = captures[4];
29736 : 31 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
29737 : 31 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
29738 : : {
29739 : 31 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
29740 : 31 : tem_op.resimplify (lseq, valueize);
29741 : 31 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29742 : 31 : if (!_r2) goto next_after_fail2987;
29743 : : }
29744 : : else
29745 : : _r2 = _o2[0];
29746 : 13 : _o1[3] = _r2;
29747 : : }
29748 : 13 : (*res_op).set_op (CFN_COND_ADD, TREE_TYPE (_o1[1]), 4);
29749 : 13 : (*res_op).ops[0] = _o1[0];
29750 : 13 : (*res_op).ops[1] = _o1[1];
29751 : 13 : (*res_op).ops[2] = _o1[2];
29752 : 13 : (*res_op).ops[3] = _o1[3];
29753 : 13 : (*res_op).resimplify (lseq, valueize);
29754 : : }
29755 : 13 : if (type != res_op->type
29756 : 13 : && !useless_type_conversion_p (type, res_op->type))
29757 : : {
29758 : 13 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2987;
29759 : 10 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29760 : 10 : res_op->resimplify (lseq, valueize);
29761 : : }
29762 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
29763 : 10 : return true;
29764 : : }
29765 : 542 : next_after_fail2987:;
29766 : : }
29767 : : }
29768 : : }
29769 : 542 : break;
29770 : : }
29771 : 162 : case MINUS_EXPR:
29772 : 162 : {
29773 : 162 : tree _q40 = gimple_assign_rhs1 (_a2);
29774 : 162 : _q40 = do_valueize (valueize, _q40);
29775 : 162 : tree _q41 = gimple_assign_rhs2 (_a2);
29776 : 162 : _q41 = do_valueize (valueize, _q41);
29777 : 162 : {
29778 : 162 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
29779 : 162 : {
29780 : 162 : tree op_type = TREE_TYPE (captures[1]);
29781 : 162 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SUB), op_type)
29782 : 27 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29783 : 189 : && single_use (captures[1])
29784 : : )
29785 : : {
29786 : 27 : gimple_seq *lseq = seq;
29787 : 27 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2988;
29788 : 27 : {
29789 : 27 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29790 : 27 : {
29791 : 27 : tree _o1[4], _r1;
29792 : 27 : _o1[0] = captures[0];
29793 : 27 : _o1[1] = captures[2];
29794 : 27 : _o1[2] = captures[3];
29795 : 27 : {
29796 : 27 : tree _o2[1], _r2;
29797 : 27 : _o2[0] = captures[4];
29798 : 27 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
29799 : 27 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
29800 : : {
29801 : 27 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
29802 : 27 : tem_op.resimplify (lseq, valueize);
29803 : 27 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29804 : 27 : if (!_r2) goto next_after_fail2988;
29805 : : }
29806 : : else
29807 : : _r2 = _o2[0];
29808 : 9 : _o1[3] = _r2;
29809 : : }
29810 : 9 : (*res_op).set_op (CFN_COND_SUB, TREE_TYPE (_o1[1]), 4);
29811 : 9 : (*res_op).ops[0] = _o1[0];
29812 : 9 : (*res_op).ops[1] = _o1[1];
29813 : 9 : (*res_op).ops[2] = _o1[2];
29814 : 9 : (*res_op).ops[3] = _o1[3];
29815 : 9 : (*res_op).resimplify (lseq, valueize);
29816 : : }
29817 : 9 : if (type != res_op->type
29818 : 9 : && !useless_type_conversion_p (type, res_op->type))
29819 : : {
29820 : 9 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2988;
29821 : 9 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29822 : 9 : res_op->resimplify (lseq, valueize);
29823 : : }
29824 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
29825 : 9 : return true;
29826 : : }
29827 : 153 : next_after_fail2988:;
29828 : : }
29829 : : }
29830 : : }
29831 : 153 : break;
29832 : : }
29833 : 105 : case MULT_EXPR:
29834 : 105 : {
29835 : 105 : tree _q40 = gimple_assign_rhs1 (_a2);
29836 : 105 : _q40 = do_valueize (valueize, _q40);
29837 : 105 : tree _q41 = gimple_assign_rhs2 (_a2);
29838 : 105 : _q41 = do_valueize (valueize, _q41);
29839 : 105 : if (tree_swap_operands_p (_q40, _q41))
29840 : 9 : std::swap (_q40, _q41);
29841 : 105 : {
29842 : 105 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
29843 : 105 : {
29844 : 105 : tree op_type = TREE_TYPE (captures[1]);
29845 : 105 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MUL), op_type)
29846 : 27 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29847 : 132 : && single_use (captures[1])
29848 : : )
29849 : : {
29850 : 27 : gimple_seq *lseq = seq;
29851 : 27 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2989;
29852 : 27 : {
29853 : 27 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29854 : 27 : {
29855 : 27 : tree _o1[4], _r1;
29856 : 27 : _o1[0] = captures[0];
29857 : 27 : _o1[1] = captures[2];
29858 : 27 : _o1[2] = captures[3];
29859 : 27 : {
29860 : 27 : tree _o2[1], _r2;
29861 : 27 : _o2[0] = captures[4];
29862 : 27 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
29863 : 27 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
29864 : : {
29865 : 27 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
29866 : 27 : tem_op.resimplify (lseq, valueize);
29867 : 27 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29868 : 27 : if (!_r2) goto next_after_fail2989;
29869 : : }
29870 : : else
29871 : : _r2 = _o2[0];
29872 : 9 : _o1[3] = _r2;
29873 : : }
29874 : 9 : (*res_op).set_op (CFN_COND_MUL, TREE_TYPE (_o1[1]), 4);
29875 : 9 : (*res_op).ops[0] = _o1[0];
29876 : 9 : (*res_op).ops[1] = _o1[1];
29877 : 9 : (*res_op).ops[2] = _o1[2];
29878 : 9 : (*res_op).ops[3] = _o1[3];
29879 : 9 : (*res_op).resimplify (lseq, valueize);
29880 : : }
29881 : 9 : if (type != res_op->type
29882 : 9 : && !useless_type_conversion_p (type, res_op->type))
29883 : : {
29884 : 9 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2989;
29885 : 9 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29886 : 9 : res_op->resimplify (lseq, valueize);
29887 : : }
29888 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
29889 : 9 : return true;
29890 : : }
29891 : 96 : next_after_fail2989:;
29892 : : }
29893 : : }
29894 : : }
29895 : 96 : break;
29896 : : }
29897 : 0 : case TRUNC_DIV_EXPR:
29898 : 0 : {
29899 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
29900 : 0 : _q40 = do_valueize (valueize, _q40);
29901 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
29902 : 0 : _q41 = do_valueize (valueize, _q41);
29903 : 0 : {
29904 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
29905 : 0 : {
29906 : 0 : tree op_type = TREE_TYPE (captures[1]);
29907 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_DIV), op_type)
29908 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29909 : 0 : && single_use (captures[1])
29910 : : )
29911 : : {
29912 : 0 : gimple_seq *lseq = seq;
29913 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2990;
29914 : 0 : {
29915 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29916 : 0 : {
29917 : 0 : tree _o1[4], _r1;
29918 : 0 : _o1[0] = captures[0];
29919 : 0 : _o1[1] = captures[2];
29920 : 0 : _o1[2] = captures[3];
29921 : 0 : {
29922 : 0 : tree _o2[1], _r2;
29923 : 0 : _o2[0] = captures[4];
29924 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
29925 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
29926 : : {
29927 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
29928 : 0 : tem_op.resimplify (lseq, valueize);
29929 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29930 : 0 : if (!_r2) goto next_after_fail2990;
29931 : : }
29932 : : else
29933 : : _r2 = _o2[0];
29934 : 0 : _o1[3] = _r2;
29935 : : }
29936 : 0 : (*res_op).set_op (CFN_COND_DIV, TREE_TYPE (_o1[1]), 4);
29937 : 0 : (*res_op).ops[0] = _o1[0];
29938 : 0 : (*res_op).ops[1] = _o1[1];
29939 : 0 : (*res_op).ops[2] = _o1[2];
29940 : 0 : (*res_op).ops[3] = _o1[3];
29941 : 0 : (*res_op).resimplify (lseq, valueize);
29942 : : }
29943 : 0 : if (type != res_op->type
29944 : 0 : && !useless_type_conversion_p (type, res_op->type))
29945 : : {
29946 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2990;
29947 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29948 : 0 : res_op->resimplify (lseq, valueize);
29949 : : }
29950 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
29951 : 0 : return true;
29952 : : }
29953 : 0 : next_after_fail2990:;
29954 : : }
29955 : : }
29956 : : }
29957 : 0 : break;
29958 : : }
29959 : 0 : case TRUNC_MOD_EXPR:
29960 : 0 : {
29961 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
29962 : 0 : _q40 = do_valueize (valueize, _q40);
29963 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
29964 : 0 : _q41 = do_valueize (valueize, _q41);
29965 : 0 : {
29966 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
29967 : 0 : {
29968 : 0 : tree op_type = TREE_TYPE (captures[1]);
29969 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MOD), op_type)
29970 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
29971 : 0 : && single_use (captures[1])
29972 : : )
29973 : : {
29974 : 0 : gimple_seq *lseq = seq;
29975 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2991;
29976 : 0 : {
29977 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
29978 : 0 : {
29979 : 0 : tree _o1[4], _r1;
29980 : 0 : _o1[0] = captures[0];
29981 : 0 : _o1[1] = captures[2];
29982 : 0 : _o1[2] = captures[3];
29983 : 0 : {
29984 : 0 : tree _o2[1], _r2;
29985 : 0 : _o2[0] = captures[4];
29986 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
29987 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
29988 : : {
29989 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
29990 : 0 : tem_op.resimplify (lseq, valueize);
29991 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
29992 : 0 : if (!_r2) goto next_after_fail2991;
29993 : : }
29994 : : else
29995 : : _r2 = _o2[0];
29996 : 0 : _o1[3] = _r2;
29997 : : }
29998 : 0 : (*res_op).set_op (CFN_COND_MOD, TREE_TYPE (_o1[1]), 4);
29999 : 0 : (*res_op).ops[0] = _o1[0];
30000 : 0 : (*res_op).ops[1] = _o1[1];
30001 : 0 : (*res_op).ops[2] = _o1[2];
30002 : 0 : (*res_op).ops[3] = _o1[3];
30003 : 0 : (*res_op).resimplify (lseq, valueize);
30004 : : }
30005 : 0 : if (type != res_op->type
30006 : 0 : && !useless_type_conversion_p (type, res_op->type))
30007 : : {
30008 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2991;
30009 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30010 : 0 : res_op->resimplify (lseq, valueize);
30011 : : }
30012 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30013 : 0 : return true;
30014 : : }
30015 : 0 : next_after_fail2991:;
30016 : : }
30017 : : }
30018 : : }
30019 : 0 : break;
30020 : : }
30021 : 0 : case RDIV_EXPR:
30022 : 0 : {
30023 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
30024 : 0 : _q40 = do_valueize (valueize, _q40);
30025 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
30026 : 0 : _q41 = do_valueize (valueize, _q41);
30027 : 0 : {
30028 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30029 : 0 : {
30030 : 0 : tree op_type = TREE_TYPE (captures[1]);
30031 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_RDIV), op_type)
30032 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30033 : 0 : && single_use (captures[1])
30034 : : )
30035 : : {
30036 : 0 : gimple_seq *lseq = seq;
30037 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2992;
30038 : 0 : {
30039 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30040 : 0 : {
30041 : 0 : tree _o1[4], _r1;
30042 : 0 : _o1[0] = captures[0];
30043 : 0 : _o1[1] = captures[2];
30044 : 0 : _o1[2] = captures[3];
30045 : 0 : {
30046 : 0 : tree _o2[1], _r2;
30047 : 0 : _o2[0] = captures[4];
30048 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30049 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30050 : : {
30051 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30052 : 0 : tem_op.resimplify (lseq, valueize);
30053 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30054 : 0 : if (!_r2) goto next_after_fail2992;
30055 : : }
30056 : : else
30057 : : _r2 = _o2[0];
30058 : 0 : _o1[3] = _r2;
30059 : : }
30060 : 0 : (*res_op).set_op (CFN_COND_RDIV, TREE_TYPE (_o1[1]), 4);
30061 : 0 : (*res_op).ops[0] = _o1[0];
30062 : 0 : (*res_op).ops[1] = _o1[1];
30063 : 0 : (*res_op).ops[2] = _o1[2];
30064 : 0 : (*res_op).ops[3] = _o1[3];
30065 : 0 : (*res_op).resimplify (lseq, valueize);
30066 : : }
30067 : 0 : if (type != res_op->type
30068 : 0 : && !useless_type_conversion_p (type, res_op->type))
30069 : : {
30070 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2992;
30071 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30072 : 0 : res_op->resimplify (lseq, valueize);
30073 : : }
30074 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30075 : 0 : return true;
30076 : : }
30077 : 0 : next_after_fail2992:;
30078 : : }
30079 : : }
30080 : : }
30081 : 0 : break;
30082 : : }
30083 : 0 : case MIN_EXPR:
30084 : 0 : {
30085 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
30086 : 0 : _q40 = do_valueize (valueize, _q40);
30087 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
30088 : 0 : _q41 = do_valueize (valueize, _q41);
30089 : 0 : if (tree_swap_operands_p (_q40, _q41))
30090 : 0 : std::swap (_q40, _q41);
30091 : 0 : {
30092 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30093 : 0 : {
30094 : 0 : tree op_type = TREE_TYPE (captures[1]);
30095 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MIN), op_type)
30096 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30097 : 0 : && single_use (captures[1])
30098 : : )
30099 : : {
30100 : 0 : gimple_seq *lseq = seq;
30101 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2993;
30102 : 0 : {
30103 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30104 : 0 : {
30105 : 0 : tree _o1[4], _r1;
30106 : 0 : _o1[0] = captures[0];
30107 : 0 : _o1[1] = captures[2];
30108 : 0 : _o1[2] = captures[3];
30109 : 0 : {
30110 : 0 : tree _o2[1], _r2;
30111 : 0 : _o2[0] = captures[4];
30112 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30113 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30114 : : {
30115 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30116 : 0 : tem_op.resimplify (lseq, valueize);
30117 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30118 : 0 : if (!_r2) goto next_after_fail2993;
30119 : : }
30120 : : else
30121 : : _r2 = _o2[0];
30122 : 0 : _o1[3] = _r2;
30123 : : }
30124 : 0 : (*res_op).set_op (CFN_COND_MIN, TREE_TYPE (_o1[1]), 4);
30125 : 0 : (*res_op).ops[0] = _o1[0];
30126 : 0 : (*res_op).ops[1] = _o1[1];
30127 : 0 : (*res_op).ops[2] = _o1[2];
30128 : 0 : (*res_op).ops[3] = _o1[3];
30129 : 0 : (*res_op).resimplify (lseq, valueize);
30130 : : }
30131 : 0 : if (type != res_op->type
30132 : 0 : && !useless_type_conversion_p (type, res_op->type))
30133 : : {
30134 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2993;
30135 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30136 : 0 : res_op->resimplify (lseq, valueize);
30137 : : }
30138 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30139 : 0 : return true;
30140 : : }
30141 : 0 : next_after_fail2993:;
30142 : : }
30143 : : }
30144 : : }
30145 : 0 : break;
30146 : : }
30147 : 0 : case MAX_EXPR:
30148 : 0 : {
30149 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
30150 : 0 : _q40 = do_valueize (valueize, _q40);
30151 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
30152 : 0 : _q41 = do_valueize (valueize, _q41);
30153 : 0 : if (tree_swap_operands_p (_q40, _q41))
30154 : 0 : std::swap (_q40, _q41);
30155 : 0 : {
30156 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30157 : 0 : {
30158 : 0 : tree op_type = TREE_TYPE (captures[1]);
30159 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MAX), op_type)
30160 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30161 : 0 : && single_use (captures[1])
30162 : : )
30163 : : {
30164 : 0 : gimple_seq *lseq = seq;
30165 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2994;
30166 : 0 : {
30167 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30168 : 0 : {
30169 : 0 : tree _o1[4], _r1;
30170 : 0 : _o1[0] = captures[0];
30171 : 0 : _o1[1] = captures[2];
30172 : 0 : _o1[2] = captures[3];
30173 : 0 : {
30174 : 0 : tree _o2[1], _r2;
30175 : 0 : _o2[0] = captures[4];
30176 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30177 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30178 : : {
30179 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30180 : 0 : tem_op.resimplify (lseq, valueize);
30181 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30182 : 0 : if (!_r2) goto next_after_fail2994;
30183 : : }
30184 : : else
30185 : : _r2 = _o2[0];
30186 : 0 : _o1[3] = _r2;
30187 : : }
30188 : 0 : (*res_op).set_op (CFN_COND_MAX, TREE_TYPE (_o1[1]), 4);
30189 : 0 : (*res_op).ops[0] = _o1[0];
30190 : 0 : (*res_op).ops[1] = _o1[1];
30191 : 0 : (*res_op).ops[2] = _o1[2];
30192 : 0 : (*res_op).ops[3] = _o1[3];
30193 : 0 : (*res_op).resimplify (lseq, valueize);
30194 : : }
30195 : 0 : if (type != res_op->type
30196 : 0 : && !useless_type_conversion_p (type, res_op->type))
30197 : : {
30198 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2994;
30199 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30200 : 0 : res_op->resimplify (lseq, valueize);
30201 : : }
30202 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30203 : 0 : return true;
30204 : : }
30205 : 0 : next_after_fail2994:;
30206 : : }
30207 : : }
30208 : : }
30209 : 0 : break;
30210 : : }
30211 : 7 : case BIT_AND_EXPR:
30212 : 7 : {
30213 : 7 : tree _q40 = gimple_assign_rhs1 (_a2);
30214 : 7 : _q40 = do_valueize (valueize, _q40);
30215 : 7 : tree _q41 = gimple_assign_rhs2 (_a2);
30216 : 7 : _q41 = do_valueize (valueize, _q41);
30217 : 7 : if (tree_swap_operands_p (_q40, _q41))
30218 : 0 : std::swap (_q40, _q41);
30219 : 7 : {
30220 : 7 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30221 : 7 : {
30222 : 7 : tree op_type = TREE_TYPE (captures[1]);
30223 : 7 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_AND), op_type)
30224 : 1 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30225 : 8 : && single_use (captures[1])
30226 : : )
30227 : : {
30228 : 1 : gimple_seq *lseq = seq;
30229 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2995;
30230 : 1 : {
30231 : 1 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30232 : 1 : {
30233 : 1 : tree _o1[4], _r1;
30234 : 1 : _o1[0] = captures[0];
30235 : 1 : _o1[1] = captures[2];
30236 : 1 : _o1[2] = captures[3];
30237 : 1 : {
30238 : 1 : tree _o2[1], _r2;
30239 : 1 : _o2[0] = captures[4];
30240 : 1 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30241 : 1 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30242 : : {
30243 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30244 : 1 : tem_op.resimplify (lseq, valueize);
30245 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30246 : 1 : if (!_r2) goto next_after_fail2995;
30247 : : }
30248 : : else
30249 : : _r2 = _o2[0];
30250 : 1 : _o1[3] = _r2;
30251 : : }
30252 : 1 : (*res_op).set_op (CFN_COND_AND, TREE_TYPE (_o1[1]), 4);
30253 : 1 : (*res_op).ops[0] = _o1[0];
30254 : 1 : (*res_op).ops[1] = _o1[1];
30255 : 1 : (*res_op).ops[2] = _o1[2];
30256 : 1 : (*res_op).ops[3] = _o1[3];
30257 : 1 : (*res_op).resimplify (lseq, valueize);
30258 : : }
30259 : 1 : if (type != res_op->type
30260 : 1 : && !useless_type_conversion_p (type, res_op->type))
30261 : : {
30262 : 1 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2995;
30263 : 1 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30264 : 1 : res_op->resimplify (lseq, valueize);
30265 : : }
30266 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30267 : 1 : return true;
30268 : : }
30269 : 6 : next_after_fail2995:;
30270 : : }
30271 : : }
30272 : : }
30273 : 6 : break;
30274 : : }
30275 : 97 : case BIT_IOR_EXPR:
30276 : 97 : {
30277 : 97 : tree _q40 = gimple_assign_rhs1 (_a2);
30278 : 97 : _q40 = do_valueize (valueize, _q40);
30279 : 97 : tree _q41 = gimple_assign_rhs2 (_a2);
30280 : 97 : _q41 = do_valueize (valueize, _q41);
30281 : 97 : if (tree_swap_operands_p (_q40, _q41))
30282 : 0 : std::swap (_q40, _q41);
30283 : 97 : {
30284 : 97 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30285 : 97 : {
30286 : 97 : tree op_type = TREE_TYPE (captures[1]);
30287 : 97 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_IOR), op_type)
30288 : 41 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30289 : 138 : && single_use (captures[1])
30290 : : )
30291 : : {
30292 : 41 : gimple_seq *lseq = seq;
30293 : 41 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2996;
30294 : 41 : {
30295 : 41 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30296 : 41 : {
30297 : 41 : tree _o1[4], _r1;
30298 : 41 : _o1[0] = captures[0];
30299 : 41 : _o1[1] = captures[2];
30300 : 41 : _o1[2] = captures[3];
30301 : 41 : {
30302 : 41 : tree _o2[1], _r2;
30303 : 41 : _o2[0] = captures[4];
30304 : 41 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30305 : 41 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30306 : : {
30307 : 41 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30308 : 41 : tem_op.resimplify (lseq, valueize);
30309 : 41 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30310 : 41 : if (!_r2) goto next_after_fail2996;
30311 : : }
30312 : : else
30313 : : _r2 = _o2[0];
30314 : 41 : _o1[3] = _r2;
30315 : : }
30316 : 41 : (*res_op).set_op (CFN_COND_IOR, TREE_TYPE (_o1[1]), 4);
30317 : 41 : (*res_op).ops[0] = _o1[0];
30318 : 41 : (*res_op).ops[1] = _o1[1];
30319 : 41 : (*res_op).ops[2] = _o1[2];
30320 : 41 : (*res_op).ops[3] = _o1[3];
30321 : 41 : (*res_op).resimplify (lseq, valueize);
30322 : : }
30323 : 41 : if (type != res_op->type
30324 : 41 : && !useless_type_conversion_p (type, res_op->type))
30325 : : {
30326 : 41 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2996;
30327 : 13 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30328 : 13 : res_op->resimplify (lseq, valueize);
30329 : : }
30330 : 13 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30331 : 13 : return true;
30332 : : }
30333 : 84 : next_after_fail2996:;
30334 : : }
30335 : : }
30336 : : }
30337 : 84 : break;
30338 : : }
30339 : 102 : case BIT_XOR_EXPR:
30340 : 102 : {
30341 : 102 : tree _q40 = gimple_assign_rhs1 (_a2);
30342 : 102 : _q40 = do_valueize (valueize, _q40);
30343 : 102 : tree _q41 = gimple_assign_rhs2 (_a2);
30344 : 102 : _q41 = do_valueize (valueize, _q41);
30345 : 102 : if (tree_swap_operands_p (_q40, _q41))
30346 : 0 : std::swap (_q40, _q41);
30347 : 102 : {
30348 : 102 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30349 : 102 : {
30350 : 102 : tree op_type = TREE_TYPE (captures[1]);
30351 : 102 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_XOR), op_type)
30352 : 1 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30353 : 103 : && single_use (captures[1])
30354 : : )
30355 : : {
30356 : 1 : gimple_seq *lseq = seq;
30357 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2997;
30358 : 1 : {
30359 : 1 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30360 : 1 : {
30361 : 1 : tree _o1[4], _r1;
30362 : 1 : _o1[0] = captures[0];
30363 : 1 : _o1[1] = captures[2];
30364 : 1 : _o1[2] = captures[3];
30365 : 1 : {
30366 : 1 : tree _o2[1], _r2;
30367 : 1 : _o2[0] = captures[4];
30368 : 1 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30369 : 1 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30370 : : {
30371 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30372 : 1 : tem_op.resimplify (lseq, valueize);
30373 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30374 : 1 : if (!_r2) goto next_after_fail2997;
30375 : : }
30376 : : else
30377 : : _r2 = _o2[0];
30378 : 1 : _o1[3] = _r2;
30379 : : }
30380 : 1 : (*res_op).set_op (CFN_COND_XOR, TREE_TYPE (_o1[1]), 4);
30381 : 1 : (*res_op).ops[0] = _o1[0];
30382 : 1 : (*res_op).ops[1] = _o1[1];
30383 : 1 : (*res_op).ops[2] = _o1[2];
30384 : 1 : (*res_op).ops[3] = _o1[3];
30385 : 1 : (*res_op).resimplify (lseq, valueize);
30386 : : }
30387 : 1 : if (type != res_op->type
30388 : 1 : && !useless_type_conversion_p (type, res_op->type))
30389 : : {
30390 : 1 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2997;
30391 : 1 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30392 : 1 : res_op->resimplify (lseq, valueize);
30393 : : }
30394 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30395 : 1 : return true;
30396 : : }
30397 : 101 : next_after_fail2997:;
30398 : : }
30399 : : }
30400 : : }
30401 : 101 : break;
30402 : : }
30403 : 6 : case LSHIFT_EXPR:
30404 : 6 : {
30405 : 6 : tree _q40 = gimple_assign_rhs1 (_a2);
30406 : 6 : _q40 = do_valueize (valueize, _q40);
30407 : 6 : tree _q41 = gimple_assign_rhs2 (_a2);
30408 : 6 : _q41 = do_valueize (valueize, _q41);
30409 : 6 : {
30410 : 6 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30411 : 6 : {
30412 : 6 : tree op_type = TREE_TYPE (captures[1]);
30413 : 6 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHL), op_type)
30414 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30415 : 6 : && single_use (captures[1])
30416 : : )
30417 : : {
30418 : 0 : gimple_seq *lseq = seq;
30419 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2998;
30420 : 0 : {
30421 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30422 : 0 : {
30423 : 0 : tree _o1[4], _r1;
30424 : 0 : _o1[0] = captures[0];
30425 : 0 : _o1[1] = captures[2];
30426 : 0 : _o1[2] = captures[3];
30427 : 0 : {
30428 : 0 : tree _o2[1], _r2;
30429 : 0 : _o2[0] = captures[4];
30430 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30431 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30432 : : {
30433 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30434 : 0 : tem_op.resimplify (lseq, valueize);
30435 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30436 : 0 : if (!_r2) goto next_after_fail2998;
30437 : : }
30438 : : else
30439 : : _r2 = _o2[0];
30440 : 0 : _o1[3] = _r2;
30441 : : }
30442 : 0 : (*res_op).set_op (CFN_COND_SHL, TREE_TYPE (_o1[1]), 4);
30443 : 0 : (*res_op).ops[0] = _o1[0];
30444 : 0 : (*res_op).ops[1] = _o1[1];
30445 : 0 : (*res_op).ops[2] = _o1[2];
30446 : 0 : (*res_op).ops[3] = _o1[3];
30447 : 0 : (*res_op).resimplify (lseq, valueize);
30448 : : }
30449 : 0 : if (type != res_op->type
30450 : 0 : && !useless_type_conversion_p (type, res_op->type))
30451 : : {
30452 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2998;
30453 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30454 : 0 : res_op->resimplify (lseq, valueize);
30455 : : }
30456 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30457 : 0 : return true;
30458 : : }
30459 : 6 : next_after_fail2998:;
30460 : : }
30461 : : }
30462 : : }
30463 : 6 : break;
30464 : : }
30465 : 0 : case RSHIFT_EXPR:
30466 : 0 : {
30467 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
30468 : 0 : _q40 = do_valueize (valueize, _q40);
30469 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
30470 : 0 : _q41 = do_valueize (valueize, _q41);
30471 : 0 : {
30472 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30473 : 0 : {
30474 : 0 : tree op_type = TREE_TYPE (captures[1]);
30475 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHR), op_type)
30476 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30477 : 0 : && single_use (captures[1])
30478 : : )
30479 : : {
30480 : 0 : gimple_seq *lseq = seq;
30481 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2999;
30482 : 0 : {
30483 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30484 : 0 : {
30485 : 0 : tree _o1[4], _r1;
30486 : 0 : _o1[0] = captures[0];
30487 : 0 : _o1[1] = captures[2];
30488 : 0 : _o1[2] = captures[3];
30489 : 0 : {
30490 : 0 : tree _o2[1], _r2;
30491 : 0 : _o2[0] = captures[4];
30492 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30493 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30494 : : {
30495 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30496 : 0 : tem_op.resimplify (lseq, valueize);
30497 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30498 : 0 : if (!_r2) goto next_after_fail2999;
30499 : : }
30500 : : else
30501 : : _r2 = _o2[0];
30502 : 0 : _o1[3] = _r2;
30503 : : }
30504 : 0 : (*res_op).set_op (CFN_COND_SHR, TREE_TYPE (_o1[1]), 4);
30505 : 0 : (*res_op).ops[0] = _o1[0];
30506 : 0 : (*res_op).ops[1] = _o1[1];
30507 : 0 : (*res_op).ops[2] = _o1[2];
30508 : 0 : (*res_op).ops[3] = _o1[3];
30509 : 0 : (*res_op).resimplify (lseq, valueize);
30510 : : }
30511 : 0 : if (type != res_op->type
30512 : 0 : && !useless_type_conversion_p (type, res_op->type))
30513 : : {
30514 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail2999;
30515 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30516 : 0 : res_op->resimplify (lseq, valueize);
30517 : : }
30518 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30519 : 0 : return true;
30520 : : }
30521 : 0 : next_after_fail2999:;
30522 : : }
30523 : : }
30524 : : }
30525 : 0 : break;
30526 : : }
30527 : : default:;
30528 : : }
30529 : 1830 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
30530 : 998 : switch (gimple_call_combined_fn (_c2))
30531 : : {
30532 : 0 : case CFN_FMAX:
30533 : 0 : if (gimple_call_num_args (_c2) == 2)
30534 : : {
30535 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
30536 : 0 : _q40 = do_valueize (valueize, _q40);
30537 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
30538 : 0 : _q41 = do_valueize (valueize, _q41);
30539 : 0 : {
30540 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30541 : 0 : {
30542 : 0 : tree op_type = TREE_TYPE (captures[1]);
30543 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMAX), op_type)
30544 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30545 : 0 : && single_use (captures[1])
30546 : : )
30547 : : {
30548 : 0 : gimple_seq *lseq = seq;
30549 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3000;
30550 : 0 : {
30551 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30552 : 0 : {
30553 : 0 : tree _o1[4], _r1;
30554 : 0 : _o1[0] = captures[0];
30555 : 0 : _o1[1] = captures[2];
30556 : 0 : _o1[2] = captures[3];
30557 : 0 : {
30558 : 0 : tree _o2[1], _r2;
30559 : 0 : _o2[0] = captures[4];
30560 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30561 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30562 : : {
30563 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30564 : 0 : tem_op.resimplify (lseq, valueize);
30565 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30566 : 0 : if (!_r2) goto next_after_fail3000;
30567 : : }
30568 : : else
30569 : : _r2 = _o2[0];
30570 : 0 : _o1[3] = _r2;
30571 : : }
30572 : 0 : (*res_op).set_op (CFN_COND_FMAX, TREE_TYPE (_o1[1]), 4);
30573 : 0 : (*res_op).ops[0] = _o1[0];
30574 : 0 : (*res_op).ops[1] = _o1[1];
30575 : 0 : (*res_op).ops[2] = _o1[2];
30576 : 0 : (*res_op).ops[3] = _o1[3];
30577 : 0 : (*res_op).resimplify (lseq, valueize);
30578 : : }
30579 : 0 : if (type != res_op->type
30580 : 0 : && !useless_type_conversion_p (type, res_op->type))
30581 : : {
30582 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3000;
30583 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30584 : 0 : res_op->resimplify (lseq, valueize);
30585 : : }
30586 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30587 : 0 : return true;
30588 : : }
30589 : 0 : next_after_fail3000:;
30590 : : }
30591 : : }
30592 : : }
30593 : : }
30594 : : break;
30595 : 0 : case CFN_FMIN:
30596 : 0 : if (gimple_call_num_args (_c2) == 2)
30597 : : {
30598 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
30599 : 0 : _q40 = do_valueize (valueize, _q40);
30600 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
30601 : 0 : _q41 = do_valueize (valueize, _q41);
30602 : 0 : {
30603 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30604 : 0 : {
30605 : 0 : tree op_type = TREE_TYPE (captures[1]);
30606 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMIN), op_type)
30607 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30608 : 0 : && single_use (captures[1])
30609 : : )
30610 : : {
30611 : 0 : gimple_seq *lseq = seq;
30612 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3001;
30613 : 0 : {
30614 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30615 : 0 : {
30616 : 0 : tree _o1[4], _r1;
30617 : 0 : _o1[0] = captures[0];
30618 : 0 : _o1[1] = captures[2];
30619 : 0 : _o1[2] = captures[3];
30620 : 0 : {
30621 : 0 : tree _o2[1], _r2;
30622 : 0 : _o2[0] = captures[4];
30623 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30624 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30625 : : {
30626 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30627 : 0 : tem_op.resimplify (lseq, valueize);
30628 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30629 : 0 : if (!_r2) goto next_after_fail3001;
30630 : : }
30631 : : else
30632 : : _r2 = _o2[0];
30633 : 0 : _o1[3] = _r2;
30634 : : }
30635 : 0 : (*res_op).set_op (CFN_COND_FMIN, TREE_TYPE (_o1[1]), 4);
30636 : 0 : (*res_op).ops[0] = _o1[0];
30637 : 0 : (*res_op).ops[1] = _o1[1];
30638 : 0 : (*res_op).ops[2] = _o1[2];
30639 : 0 : (*res_op).ops[3] = _o1[3];
30640 : 0 : (*res_op).resimplify (lseq, valueize);
30641 : : }
30642 : 0 : if (type != res_op->type
30643 : 0 : && !useless_type_conversion_p (type, res_op->type))
30644 : : {
30645 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3001;
30646 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30647 : 0 : res_op->resimplify (lseq, valueize);
30648 : : }
30649 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30650 : 0 : return true;
30651 : : }
30652 : 0 : next_after_fail3001:;
30653 : : }
30654 : : }
30655 : : }
30656 : : }
30657 : : break;
30658 : 0 : case CFN_COPYSIGN:
30659 : 0 : if (gimple_call_num_args (_c2) == 2)
30660 : : {
30661 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
30662 : 0 : _q40 = do_valueize (valueize, _q40);
30663 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
30664 : 0 : _q41 = do_valueize (valueize, _q41);
30665 : 0 : {
30666 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _p2 };
30667 : 0 : {
30668 : 0 : tree op_type = TREE_TYPE (captures[1]);
30669 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_COPYSIGN), op_type)
30670 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30671 : 0 : && single_use (captures[1])
30672 : : )
30673 : : {
30674 : 0 : gimple_seq *lseq = seq;
30675 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3002;
30676 : 0 : {
30677 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30678 : 0 : {
30679 : 0 : tree _o1[4], _r1;
30680 : 0 : _o1[0] = captures[0];
30681 : 0 : _o1[1] = captures[2];
30682 : 0 : _o1[2] = captures[3];
30683 : 0 : {
30684 : 0 : tree _o2[1], _r2;
30685 : 0 : _o2[0] = captures[4];
30686 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30687 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30688 : : {
30689 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30690 : 0 : tem_op.resimplify (lseq, valueize);
30691 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30692 : 0 : if (!_r2) goto next_after_fail3002;
30693 : : }
30694 : : else
30695 : : _r2 = _o2[0];
30696 : 0 : _o1[3] = _r2;
30697 : : }
30698 : 0 : (*res_op).set_op (CFN_COND_COPYSIGN, TREE_TYPE (_o1[1]), 4);
30699 : 0 : (*res_op).ops[0] = _o1[0];
30700 : 0 : (*res_op).ops[1] = _o1[1];
30701 : 0 : (*res_op).ops[2] = _o1[2];
30702 : 0 : (*res_op).ops[3] = _o1[3];
30703 : 0 : (*res_op).resimplify (lseq, valueize);
30704 : : }
30705 : 0 : if (type != res_op->type
30706 : 0 : && !useless_type_conversion_p (type, res_op->type))
30707 : : {
30708 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3002;
30709 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30710 : 0 : res_op->resimplify (lseq, valueize);
30711 : : }
30712 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30713 : 0 : return true;
30714 : : }
30715 : 0 : next_after_fail3002:;
30716 : : }
30717 : : }
30718 : : }
30719 : : }
30720 : : break;
30721 : : default:;
30722 : : }
30723 : : }
30724 : : break;
30725 : : default:;
30726 : : }
30727 : : }
30728 : : break;
30729 : : }
30730 : 402 : case PLUS_EXPR:
30731 : 402 : {
30732 : 402 : tree _q30 = gimple_assign_rhs1 (_a1);
30733 : 402 : _q30 = do_valueize (valueize, _q30);
30734 : 402 : tree _q31 = gimple_assign_rhs2 (_a1);
30735 : 402 : _q31 = do_valueize (valueize, _q31);
30736 : 402 : if (tree_swap_operands_p (_q30, _q31))
30737 : 26 : std::swap (_q30, _q31);
30738 : 402 : {
30739 : 402 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
30740 : 402 : {
30741 : 402 : tree op_type = TREE_TYPE (captures[1]);
30742 : 402 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_ADD), op_type)
30743 : 19 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30744 : 421 : && single_use (captures[1])
30745 : : )
30746 : : {
30747 : 19 : gimple_seq *lseq = seq;
30748 : 19 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3003;
30749 : 19 : {
30750 : 19 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30751 : 19 : {
30752 : 19 : tree _o1[4], _r1;
30753 : 19 : _o1[0] = captures[0];
30754 : 19 : _o1[1] = captures[2];
30755 : 19 : _o1[2] = captures[3];
30756 : 19 : {
30757 : 19 : tree _o2[1], _r2;
30758 : 19 : _o2[0] = captures[4];
30759 : 19 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30760 : 19 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30761 : : {
30762 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30763 : 0 : tem_op.resimplify (lseq, valueize);
30764 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30765 : 0 : if (!_r2) goto next_after_fail3003;
30766 : : }
30767 : : else
30768 : : _r2 = _o2[0];
30769 : 19 : _o1[3] = _r2;
30770 : : }
30771 : 19 : (*res_op).set_op (CFN_COND_ADD, TREE_TYPE (_o1[1]), 4);
30772 : 19 : (*res_op).ops[0] = _o1[0];
30773 : 19 : (*res_op).ops[1] = _o1[1];
30774 : 19 : (*res_op).ops[2] = _o1[2];
30775 : 19 : (*res_op).ops[3] = _o1[3];
30776 : 19 : (*res_op).resimplify (lseq, valueize);
30777 : : }
30778 : 19 : if (type != res_op->type
30779 : 19 : && !useless_type_conversion_p (type, res_op->type))
30780 : : {
30781 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3003;
30782 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30783 : 0 : res_op->resimplify (lseq, valueize);
30784 : : }
30785 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30786 : 19 : return true;
30787 : : }
30788 : 383 : next_after_fail3003:;
30789 : : }
30790 : : }
30791 : : }
30792 : 383 : break;
30793 : : }
30794 : 485 : case MINUS_EXPR:
30795 : 485 : {
30796 : 485 : tree _q30 = gimple_assign_rhs1 (_a1);
30797 : 485 : _q30 = do_valueize (valueize, _q30);
30798 : 485 : tree _q31 = gimple_assign_rhs2 (_a1);
30799 : 485 : _q31 = do_valueize (valueize, _q31);
30800 : 485 : {
30801 : 485 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
30802 : 485 : {
30803 : 485 : tree op_type = TREE_TYPE (captures[1]);
30804 : 485 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SUB), op_type)
30805 : 51 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30806 : 536 : && single_use (captures[1])
30807 : : )
30808 : : {
30809 : 51 : gimple_seq *lseq = seq;
30810 : 51 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3004;
30811 : 51 : {
30812 : 51 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30813 : 51 : {
30814 : 51 : tree _o1[4], _r1;
30815 : 51 : _o1[0] = captures[0];
30816 : 51 : _o1[1] = captures[2];
30817 : 51 : _o1[2] = captures[3];
30818 : 51 : {
30819 : 51 : tree _o2[1], _r2;
30820 : 51 : _o2[0] = captures[4];
30821 : 51 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30822 : 51 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30823 : : {
30824 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30825 : 0 : tem_op.resimplify (lseq, valueize);
30826 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30827 : 0 : if (!_r2) goto next_after_fail3004;
30828 : : }
30829 : : else
30830 : : _r2 = _o2[0];
30831 : 51 : _o1[3] = _r2;
30832 : : }
30833 : 51 : (*res_op).set_op (CFN_COND_SUB, TREE_TYPE (_o1[1]), 4);
30834 : 51 : (*res_op).ops[0] = _o1[0];
30835 : 51 : (*res_op).ops[1] = _o1[1];
30836 : 51 : (*res_op).ops[2] = _o1[2];
30837 : 51 : (*res_op).ops[3] = _o1[3];
30838 : 51 : (*res_op).resimplify (lseq, valueize);
30839 : : }
30840 : 51 : if (type != res_op->type
30841 : 51 : && !useless_type_conversion_p (type, res_op->type))
30842 : : {
30843 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3004;
30844 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30845 : 0 : res_op->resimplify (lseq, valueize);
30846 : : }
30847 : 51 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30848 : 51 : return true;
30849 : : }
30850 : 434 : next_after_fail3004:;
30851 : : }
30852 : : }
30853 : : }
30854 : 434 : break;
30855 : : }
30856 : 211 : case MULT_EXPR:
30857 : 211 : {
30858 : 211 : tree _q30 = gimple_assign_rhs1 (_a1);
30859 : 211 : _q30 = do_valueize (valueize, _q30);
30860 : 211 : tree _q31 = gimple_assign_rhs2 (_a1);
30861 : 211 : _q31 = do_valueize (valueize, _q31);
30862 : 211 : if (tree_swap_operands_p (_q30, _q31))
30863 : 28 : std::swap (_q30, _q31);
30864 : 211 : {
30865 : 211 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
30866 : 211 : {
30867 : 211 : tree op_type = TREE_TYPE (captures[1]);
30868 : 211 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MUL), op_type)
30869 : 3 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30870 : 214 : && single_use (captures[1])
30871 : : )
30872 : : {
30873 : 3 : gimple_seq *lseq = seq;
30874 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3005;
30875 : 3 : {
30876 : 3 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30877 : 3 : {
30878 : 3 : tree _o1[4], _r1;
30879 : 3 : _o1[0] = captures[0];
30880 : 3 : _o1[1] = captures[2];
30881 : 3 : _o1[2] = captures[3];
30882 : 3 : {
30883 : 3 : tree _o2[1], _r2;
30884 : 3 : _o2[0] = captures[4];
30885 : 3 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30886 : 3 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30887 : : {
30888 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30889 : 0 : tem_op.resimplify (lseq, valueize);
30890 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30891 : 0 : if (!_r2) goto next_after_fail3005;
30892 : : }
30893 : : else
30894 : : _r2 = _o2[0];
30895 : 3 : _o1[3] = _r2;
30896 : : }
30897 : 3 : (*res_op).set_op (CFN_COND_MUL, TREE_TYPE (_o1[1]), 4);
30898 : 3 : (*res_op).ops[0] = _o1[0];
30899 : 3 : (*res_op).ops[1] = _o1[1];
30900 : 3 : (*res_op).ops[2] = _o1[2];
30901 : 3 : (*res_op).ops[3] = _o1[3];
30902 : 3 : (*res_op).resimplify (lseq, valueize);
30903 : : }
30904 : 3 : if (type != res_op->type
30905 : 3 : && !useless_type_conversion_p (type, res_op->type))
30906 : : {
30907 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3005;
30908 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30909 : 0 : res_op->resimplify (lseq, valueize);
30910 : : }
30911 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30912 : 3 : return true;
30913 : : }
30914 : 208 : next_after_fail3005:;
30915 : : }
30916 : : }
30917 : : }
30918 : 208 : break;
30919 : : }
30920 : 0 : case TRUNC_DIV_EXPR:
30921 : 0 : {
30922 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
30923 : 0 : _q30 = do_valueize (valueize, _q30);
30924 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
30925 : 0 : _q31 = do_valueize (valueize, _q31);
30926 : 0 : {
30927 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
30928 : 0 : {
30929 : 0 : tree op_type = TREE_TYPE (captures[1]);
30930 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_DIV), op_type)
30931 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30932 : 0 : && single_use (captures[1])
30933 : : )
30934 : : {
30935 : 0 : gimple_seq *lseq = seq;
30936 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3006;
30937 : 0 : {
30938 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30939 : 0 : {
30940 : 0 : tree _o1[4], _r1;
30941 : 0 : _o1[0] = captures[0];
30942 : 0 : _o1[1] = captures[2];
30943 : 0 : _o1[2] = captures[3];
30944 : 0 : {
30945 : 0 : tree _o2[1], _r2;
30946 : 0 : _o2[0] = captures[4];
30947 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
30948 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
30949 : : {
30950 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
30951 : 0 : tem_op.resimplify (lseq, valueize);
30952 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
30953 : 0 : if (!_r2) goto next_after_fail3006;
30954 : : }
30955 : : else
30956 : : _r2 = _o2[0];
30957 : 0 : _o1[3] = _r2;
30958 : : }
30959 : 0 : (*res_op).set_op (CFN_COND_DIV, TREE_TYPE (_o1[1]), 4);
30960 : 0 : (*res_op).ops[0] = _o1[0];
30961 : 0 : (*res_op).ops[1] = _o1[1];
30962 : 0 : (*res_op).ops[2] = _o1[2];
30963 : 0 : (*res_op).ops[3] = _o1[3];
30964 : 0 : (*res_op).resimplify (lseq, valueize);
30965 : : }
30966 : 0 : if (type != res_op->type
30967 : 0 : && !useless_type_conversion_p (type, res_op->type))
30968 : : {
30969 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3006;
30970 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
30971 : 0 : res_op->resimplify (lseq, valueize);
30972 : : }
30973 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
30974 : 0 : return true;
30975 : : }
30976 : 0 : next_after_fail3006:;
30977 : : }
30978 : : }
30979 : : }
30980 : 0 : break;
30981 : : }
30982 : 0 : case TRUNC_MOD_EXPR:
30983 : 0 : {
30984 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
30985 : 0 : _q30 = do_valueize (valueize, _q30);
30986 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
30987 : 0 : _q31 = do_valueize (valueize, _q31);
30988 : 0 : {
30989 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
30990 : 0 : {
30991 : 0 : tree op_type = TREE_TYPE (captures[1]);
30992 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MOD), op_type)
30993 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
30994 : 0 : && single_use (captures[1])
30995 : : )
30996 : : {
30997 : 0 : gimple_seq *lseq = seq;
30998 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3007;
30999 : 0 : {
31000 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31001 : 0 : {
31002 : 0 : tree _o1[4], _r1;
31003 : 0 : _o1[0] = captures[0];
31004 : 0 : _o1[1] = captures[2];
31005 : 0 : _o1[2] = captures[3];
31006 : 0 : {
31007 : 0 : tree _o2[1], _r2;
31008 : 0 : _o2[0] = captures[4];
31009 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31010 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31011 : : {
31012 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31013 : 0 : tem_op.resimplify (lseq, valueize);
31014 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31015 : 0 : if (!_r2) goto next_after_fail3007;
31016 : : }
31017 : : else
31018 : : _r2 = _o2[0];
31019 : 0 : _o1[3] = _r2;
31020 : : }
31021 : 0 : (*res_op).set_op (CFN_COND_MOD, TREE_TYPE (_o1[1]), 4);
31022 : 0 : (*res_op).ops[0] = _o1[0];
31023 : 0 : (*res_op).ops[1] = _o1[1];
31024 : 0 : (*res_op).ops[2] = _o1[2];
31025 : 0 : (*res_op).ops[3] = _o1[3];
31026 : 0 : (*res_op).resimplify (lseq, valueize);
31027 : : }
31028 : 0 : if (type != res_op->type
31029 : 0 : && !useless_type_conversion_p (type, res_op->type))
31030 : : {
31031 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3007;
31032 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31033 : 0 : res_op->resimplify (lseq, valueize);
31034 : : }
31035 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31036 : 0 : return true;
31037 : : }
31038 : 0 : next_after_fail3007:;
31039 : : }
31040 : : }
31041 : : }
31042 : 0 : break;
31043 : : }
31044 : 15 : case RDIV_EXPR:
31045 : 15 : {
31046 : 15 : tree _q30 = gimple_assign_rhs1 (_a1);
31047 : 15 : _q30 = do_valueize (valueize, _q30);
31048 : 15 : tree _q31 = gimple_assign_rhs2 (_a1);
31049 : 15 : _q31 = do_valueize (valueize, _q31);
31050 : 15 : {
31051 : 15 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31052 : 15 : {
31053 : 15 : tree op_type = TREE_TYPE (captures[1]);
31054 : 15 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_RDIV), op_type)
31055 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31056 : 15 : && single_use (captures[1])
31057 : : )
31058 : : {
31059 : 0 : gimple_seq *lseq = seq;
31060 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3008;
31061 : 0 : {
31062 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31063 : 0 : {
31064 : 0 : tree _o1[4], _r1;
31065 : 0 : _o1[0] = captures[0];
31066 : 0 : _o1[1] = captures[2];
31067 : 0 : _o1[2] = captures[3];
31068 : 0 : {
31069 : 0 : tree _o2[1], _r2;
31070 : 0 : _o2[0] = captures[4];
31071 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31072 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31073 : : {
31074 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31075 : 0 : tem_op.resimplify (lseq, valueize);
31076 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31077 : 0 : if (!_r2) goto next_after_fail3008;
31078 : : }
31079 : : else
31080 : : _r2 = _o2[0];
31081 : 0 : _o1[3] = _r2;
31082 : : }
31083 : 0 : (*res_op).set_op (CFN_COND_RDIV, TREE_TYPE (_o1[1]), 4);
31084 : 0 : (*res_op).ops[0] = _o1[0];
31085 : 0 : (*res_op).ops[1] = _o1[1];
31086 : 0 : (*res_op).ops[2] = _o1[2];
31087 : 0 : (*res_op).ops[3] = _o1[3];
31088 : 0 : (*res_op).resimplify (lseq, valueize);
31089 : : }
31090 : 0 : if (type != res_op->type
31091 : 0 : && !useless_type_conversion_p (type, res_op->type))
31092 : : {
31093 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3008;
31094 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31095 : 0 : res_op->resimplify (lseq, valueize);
31096 : : }
31097 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31098 : 0 : return true;
31099 : : }
31100 : 15 : next_after_fail3008:;
31101 : : }
31102 : : }
31103 : : }
31104 : 15 : break;
31105 : : }
31106 : 336 : case MIN_EXPR:
31107 : 336 : {
31108 : 336 : tree _q30 = gimple_assign_rhs1 (_a1);
31109 : 336 : _q30 = do_valueize (valueize, _q30);
31110 : 336 : tree _q31 = gimple_assign_rhs2 (_a1);
31111 : 336 : _q31 = do_valueize (valueize, _q31);
31112 : 336 : if (tree_swap_operands_p (_q30, _q31))
31113 : 166 : std::swap (_q30, _q31);
31114 : 336 : {
31115 : 336 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31116 : 336 : {
31117 : 336 : tree op_type = TREE_TYPE (captures[1]);
31118 : 336 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MIN), op_type)
31119 : 96 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31120 : 432 : && single_use (captures[1])
31121 : : )
31122 : : {
31123 : 96 : gimple_seq *lseq = seq;
31124 : 96 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3009;
31125 : 96 : {
31126 : 96 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31127 : 96 : {
31128 : 96 : tree _o1[4], _r1;
31129 : 96 : _o1[0] = captures[0];
31130 : 96 : _o1[1] = captures[2];
31131 : 96 : _o1[2] = captures[3];
31132 : 96 : {
31133 : 96 : tree _o2[1], _r2;
31134 : 96 : _o2[0] = captures[4];
31135 : 96 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31136 : 96 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31137 : : {
31138 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31139 : 0 : tem_op.resimplify (lseq, valueize);
31140 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31141 : 0 : if (!_r2) goto next_after_fail3009;
31142 : : }
31143 : : else
31144 : : _r2 = _o2[0];
31145 : 96 : _o1[3] = _r2;
31146 : : }
31147 : 96 : (*res_op).set_op (CFN_COND_MIN, TREE_TYPE (_o1[1]), 4);
31148 : 96 : (*res_op).ops[0] = _o1[0];
31149 : 96 : (*res_op).ops[1] = _o1[1];
31150 : 96 : (*res_op).ops[2] = _o1[2];
31151 : 96 : (*res_op).ops[3] = _o1[3];
31152 : 96 : (*res_op).resimplify (lseq, valueize);
31153 : : }
31154 : 96 : if (type != res_op->type
31155 : 96 : && !useless_type_conversion_p (type, res_op->type))
31156 : : {
31157 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3009;
31158 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31159 : 0 : res_op->resimplify (lseq, valueize);
31160 : : }
31161 : 96 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31162 : 96 : return true;
31163 : : }
31164 : 240 : next_after_fail3009:;
31165 : : }
31166 : : }
31167 : : }
31168 : 240 : break;
31169 : : }
31170 : 135 : case MAX_EXPR:
31171 : 135 : {
31172 : 135 : tree _q30 = gimple_assign_rhs1 (_a1);
31173 : 135 : _q30 = do_valueize (valueize, _q30);
31174 : 135 : tree _q31 = gimple_assign_rhs2 (_a1);
31175 : 135 : _q31 = do_valueize (valueize, _q31);
31176 : 135 : if (tree_swap_operands_p (_q30, _q31))
31177 : 22 : std::swap (_q30, _q31);
31178 : 135 : {
31179 : 135 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31180 : 135 : {
31181 : 135 : tree op_type = TREE_TYPE (captures[1]);
31182 : 135 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MAX), op_type)
31183 : 99 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31184 : 234 : && single_use (captures[1])
31185 : : )
31186 : : {
31187 : 99 : gimple_seq *lseq = seq;
31188 : 99 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3010;
31189 : 99 : {
31190 : 99 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31191 : 99 : {
31192 : 99 : tree _o1[4], _r1;
31193 : 99 : _o1[0] = captures[0];
31194 : 99 : _o1[1] = captures[2];
31195 : 99 : _o1[2] = captures[3];
31196 : 99 : {
31197 : 99 : tree _o2[1], _r2;
31198 : 99 : _o2[0] = captures[4];
31199 : 99 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31200 : 99 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31201 : : {
31202 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31203 : 0 : tem_op.resimplify (lseq, valueize);
31204 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31205 : 0 : if (!_r2) goto next_after_fail3010;
31206 : : }
31207 : : else
31208 : : _r2 = _o2[0];
31209 : 99 : _o1[3] = _r2;
31210 : : }
31211 : 99 : (*res_op).set_op (CFN_COND_MAX, TREE_TYPE (_o1[1]), 4);
31212 : 99 : (*res_op).ops[0] = _o1[0];
31213 : 99 : (*res_op).ops[1] = _o1[1];
31214 : 99 : (*res_op).ops[2] = _o1[2];
31215 : 99 : (*res_op).ops[3] = _o1[3];
31216 : 99 : (*res_op).resimplify (lseq, valueize);
31217 : : }
31218 : 99 : if (type != res_op->type
31219 : 99 : && !useless_type_conversion_p (type, res_op->type))
31220 : : {
31221 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3010;
31222 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31223 : 0 : res_op->resimplify (lseq, valueize);
31224 : : }
31225 : 99 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31226 : 99 : return true;
31227 : : }
31228 : 36 : next_after_fail3010:;
31229 : : }
31230 : : }
31231 : : }
31232 : 36 : break;
31233 : : }
31234 : 119 : case BIT_AND_EXPR:
31235 : 119 : {
31236 : 119 : tree _q30 = gimple_assign_rhs1 (_a1);
31237 : 119 : _q30 = do_valueize (valueize, _q30);
31238 : 119 : tree _q31 = gimple_assign_rhs2 (_a1);
31239 : 119 : _q31 = do_valueize (valueize, _q31);
31240 : 119 : if (tree_swap_operands_p (_q30, _q31))
31241 : 4 : std::swap (_q30, _q31);
31242 : 119 : {
31243 : 119 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31244 : 119 : {
31245 : 119 : tree op_type = TREE_TYPE (captures[1]);
31246 : 119 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_AND), op_type)
31247 : 30 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31248 : 149 : && single_use (captures[1])
31249 : : )
31250 : : {
31251 : 30 : gimple_seq *lseq = seq;
31252 : 30 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3011;
31253 : 30 : {
31254 : 30 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31255 : 30 : {
31256 : 30 : tree _o1[4], _r1;
31257 : 30 : _o1[0] = captures[0];
31258 : 30 : _o1[1] = captures[2];
31259 : 30 : _o1[2] = captures[3];
31260 : 30 : {
31261 : 30 : tree _o2[1], _r2;
31262 : 30 : _o2[0] = captures[4];
31263 : 30 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31264 : 30 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31265 : : {
31266 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31267 : 0 : tem_op.resimplify (lseq, valueize);
31268 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31269 : 0 : if (!_r2) goto next_after_fail3011;
31270 : : }
31271 : : else
31272 : : _r2 = _o2[0];
31273 : 30 : _o1[3] = _r2;
31274 : : }
31275 : 30 : (*res_op).set_op (CFN_COND_AND, TREE_TYPE (_o1[1]), 4);
31276 : 30 : (*res_op).ops[0] = _o1[0];
31277 : 30 : (*res_op).ops[1] = _o1[1];
31278 : 30 : (*res_op).ops[2] = _o1[2];
31279 : 30 : (*res_op).ops[3] = _o1[3];
31280 : 30 : (*res_op).resimplify (lseq, valueize);
31281 : : }
31282 : 30 : if (type != res_op->type
31283 : 30 : && !useless_type_conversion_p (type, res_op->type))
31284 : : {
31285 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3011;
31286 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31287 : 0 : res_op->resimplify (lseq, valueize);
31288 : : }
31289 : 30 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31290 : 30 : return true;
31291 : : }
31292 : 89 : next_after_fail3011:;
31293 : : }
31294 : : }
31295 : : }
31296 : 89 : break;
31297 : : }
31298 : 465 : case BIT_IOR_EXPR:
31299 : 465 : {
31300 : 465 : tree _q30 = gimple_assign_rhs1 (_a1);
31301 : 465 : _q30 = do_valueize (valueize, _q30);
31302 : 465 : tree _q31 = gimple_assign_rhs2 (_a1);
31303 : 465 : _q31 = do_valueize (valueize, _q31);
31304 : 465 : if (tree_swap_operands_p (_q30, _q31))
31305 : 18 : std::swap (_q30, _q31);
31306 : 465 : {
31307 : 465 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31308 : 465 : {
31309 : 465 : tree op_type = TREE_TYPE (captures[1]);
31310 : 465 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_IOR), op_type)
31311 : 101 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31312 : 566 : && single_use (captures[1])
31313 : : )
31314 : : {
31315 : 101 : gimple_seq *lseq = seq;
31316 : 101 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3012;
31317 : 101 : {
31318 : 101 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31319 : 101 : {
31320 : 101 : tree _o1[4], _r1;
31321 : 101 : _o1[0] = captures[0];
31322 : 101 : _o1[1] = captures[2];
31323 : 101 : _o1[2] = captures[3];
31324 : 101 : {
31325 : 101 : tree _o2[1], _r2;
31326 : 101 : _o2[0] = captures[4];
31327 : 101 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31328 : 101 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31329 : : {
31330 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31331 : 0 : tem_op.resimplify (lseq, valueize);
31332 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31333 : 0 : if (!_r2) goto next_after_fail3012;
31334 : : }
31335 : : else
31336 : : _r2 = _o2[0];
31337 : 101 : _o1[3] = _r2;
31338 : : }
31339 : 101 : (*res_op).set_op (CFN_COND_IOR, TREE_TYPE (_o1[1]), 4);
31340 : 101 : (*res_op).ops[0] = _o1[0];
31341 : 101 : (*res_op).ops[1] = _o1[1];
31342 : 101 : (*res_op).ops[2] = _o1[2];
31343 : 101 : (*res_op).ops[3] = _o1[3];
31344 : 101 : (*res_op).resimplify (lseq, valueize);
31345 : : }
31346 : 101 : if (type != res_op->type
31347 : 101 : && !useless_type_conversion_p (type, res_op->type))
31348 : : {
31349 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3012;
31350 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31351 : 0 : res_op->resimplify (lseq, valueize);
31352 : : }
31353 : 101 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31354 : 101 : return true;
31355 : : }
31356 : 364 : next_after_fail3012:;
31357 : : }
31358 : : }
31359 : : }
31360 : 364 : break;
31361 : : }
31362 : 208 : case BIT_XOR_EXPR:
31363 : 208 : {
31364 : 208 : tree _q30 = gimple_assign_rhs1 (_a1);
31365 : 208 : _q30 = do_valueize (valueize, _q30);
31366 : 208 : tree _q31 = gimple_assign_rhs2 (_a1);
31367 : 208 : _q31 = do_valueize (valueize, _q31);
31368 : 208 : if (tree_swap_operands_p (_q30, _q31))
31369 : 21 : std::swap (_q30, _q31);
31370 : 208 : {
31371 : 208 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31372 : 208 : {
31373 : 208 : tree op_type = TREE_TYPE (captures[1]);
31374 : 208 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_XOR), op_type)
31375 : 21 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31376 : 229 : && single_use (captures[1])
31377 : : )
31378 : : {
31379 : 21 : gimple_seq *lseq = seq;
31380 : 21 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3013;
31381 : 21 : {
31382 : 21 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31383 : 21 : {
31384 : 21 : tree _o1[4], _r1;
31385 : 21 : _o1[0] = captures[0];
31386 : 21 : _o1[1] = captures[2];
31387 : 21 : _o1[2] = captures[3];
31388 : 21 : {
31389 : 21 : tree _o2[1], _r2;
31390 : 21 : _o2[0] = captures[4];
31391 : 21 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31392 : 21 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31393 : : {
31394 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31395 : 0 : tem_op.resimplify (lseq, valueize);
31396 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31397 : 0 : if (!_r2) goto next_after_fail3013;
31398 : : }
31399 : : else
31400 : : _r2 = _o2[0];
31401 : 21 : _o1[3] = _r2;
31402 : : }
31403 : 21 : (*res_op).set_op (CFN_COND_XOR, TREE_TYPE (_o1[1]), 4);
31404 : 21 : (*res_op).ops[0] = _o1[0];
31405 : 21 : (*res_op).ops[1] = _o1[1];
31406 : 21 : (*res_op).ops[2] = _o1[2];
31407 : 21 : (*res_op).ops[3] = _o1[3];
31408 : 21 : (*res_op).resimplify (lseq, valueize);
31409 : : }
31410 : 21 : if (type != res_op->type
31411 : 21 : && !useless_type_conversion_p (type, res_op->type))
31412 : : {
31413 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3013;
31414 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31415 : 0 : res_op->resimplify (lseq, valueize);
31416 : : }
31417 : 21 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31418 : 21 : return true;
31419 : : }
31420 : 187 : next_after_fail3013:;
31421 : : }
31422 : : }
31423 : : }
31424 : 187 : break;
31425 : : }
31426 : 266 : case LSHIFT_EXPR:
31427 : 266 : {
31428 : 266 : tree _q30 = gimple_assign_rhs1 (_a1);
31429 : 266 : _q30 = do_valueize (valueize, _q30);
31430 : 266 : tree _q31 = gimple_assign_rhs2 (_a1);
31431 : 266 : _q31 = do_valueize (valueize, _q31);
31432 : 266 : {
31433 : 266 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31434 : 266 : {
31435 : 266 : tree op_type = TREE_TYPE (captures[1]);
31436 : 266 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHL), op_type)
31437 : 219 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31438 : 485 : && single_use (captures[1])
31439 : : )
31440 : : {
31441 : 167 : gimple_seq *lseq = seq;
31442 : 167 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3014;
31443 : 167 : {
31444 : 167 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31445 : 167 : {
31446 : 167 : tree _o1[4], _r1;
31447 : 167 : _o1[0] = captures[0];
31448 : 167 : _o1[1] = captures[2];
31449 : 167 : _o1[2] = captures[3];
31450 : 167 : {
31451 : 167 : tree _o2[1], _r2;
31452 : 167 : _o2[0] = captures[4];
31453 : 167 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31454 : 167 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31455 : : {
31456 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31457 : 0 : tem_op.resimplify (lseq, valueize);
31458 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31459 : 0 : if (!_r2) goto next_after_fail3014;
31460 : : }
31461 : : else
31462 : : _r2 = _o2[0];
31463 : 167 : _o1[3] = _r2;
31464 : : }
31465 : 167 : (*res_op).set_op (CFN_COND_SHL, TREE_TYPE (_o1[1]), 4);
31466 : 167 : (*res_op).ops[0] = _o1[0];
31467 : 167 : (*res_op).ops[1] = _o1[1];
31468 : 167 : (*res_op).ops[2] = _o1[2];
31469 : 167 : (*res_op).ops[3] = _o1[3];
31470 : 167 : (*res_op).resimplify (lseq, valueize);
31471 : : }
31472 : 167 : if (type != res_op->type
31473 : 167 : && !useless_type_conversion_p (type, res_op->type))
31474 : : {
31475 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3014;
31476 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31477 : 0 : res_op->resimplify (lseq, valueize);
31478 : : }
31479 : 167 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31480 : 167 : return true;
31481 : : }
31482 : 99 : next_after_fail3014:;
31483 : : }
31484 : : }
31485 : : }
31486 : 99 : break;
31487 : : }
31488 : 346 : case RSHIFT_EXPR:
31489 : 346 : {
31490 : 346 : tree _q30 = gimple_assign_rhs1 (_a1);
31491 : 346 : _q30 = do_valueize (valueize, _q30);
31492 : 346 : tree _q31 = gimple_assign_rhs2 (_a1);
31493 : 346 : _q31 = do_valueize (valueize, _q31);
31494 : 346 : {
31495 : 346 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31496 : 346 : {
31497 : 346 : tree op_type = TREE_TYPE (captures[1]);
31498 : 346 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHR), op_type)
31499 : 188 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31500 : 534 : && single_use (captures[1])
31501 : : )
31502 : : {
31503 : 188 : gimple_seq *lseq = seq;
31504 : 188 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3015;
31505 : 188 : {
31506 : 188 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31507 : 188 : {
31508 : 188 : tree _o1[4], _r1;
31509 : 188 : _o1[0] = captures[0];
31510 : 188 : _o1[1] = captures[2];
31511 : 188 : _o1[2] = captures[3];
31512 : 188 : {
31513 : 188 : tree _o2[1], _r2;
31514 : 188 : _o2[0] = captures[4];
31515 : 188 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31516 : 188 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31517 : : {
31518 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31519 : 0 : tem_op.resimplify (lseq, valueize);
31520 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31521 : 0 : if (!_r2) goto next_after_fail3015;
31522 : : }
31523 : : else
31524 : : _r2 = _o2[0];
31525 : 188 : _o1[3] = _r2;
31526 : : }
31527 : 188 : (*res_op).set_op (CFN_COND_SHR, TREE_TYPE (_o1[1]), 4);
31528 : 188 : (*res_op).ops[0] = _o1[0];
31529 : 188 : (*res_op).ops[1] = _o1[1];
31530 : 188 : (*res_op).ops[2] = _o1[2];
31531 : 188 : (*res_op).ops[3] = _o1[3];
31532 : 188 : (*res_op).resimplify (lseq, valueize);
31533 : : }
31534 : 188 : if (type != res_op->type
31535 : 188 : && !useless_type_conversion_p (type, res_op->type))
31536 : : {
31537 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3015;
31538 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31539 : 0 : res_op->resimplify (lseq, valueize);
31540 : : }
31541 : 188 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31542 : 188 : return true;
31543 : : }
31544 : 158 : next_after_fail3015:;
31545 : : }
31546 : : }
31547 : : }
31548 : 158 : break;
31549 : : }
31550 : : default:;
31551 : : }
31552 : 14265 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
31553 : 3648 : switch (gimple_call_combined_fn (_c1))
31554 : : {
31555 : 0 : case CFN_FMAX:
31556 : 0 : if (gimple_call_num_args (_c1) == 2)
31557 : : {
31558 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
31559 : 0 : _q30 = do_valueize (valueize, _q30);
31560 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
31561 : 0 : _q31 = do_valueize (valueize, _q31);
31562 : 0 : {
31563 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31564 : 0 : {
31565 : 0 : tree op_type = TREE_TYPE (captures[1]);
31566 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMAX), op_type)
31567 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31568 : 0 : && single_use (captures[1])
31569 : : )
31570 : : {
31571 : 0 : gimple_seq *lseq = seq;
31572 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3016;
31573 : 0 : {
31574 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31575 : 0 : {
31576 : 0 : tree _o1[4], _r1;
31577 : 0 : _o1[0] = captures[0];
31578 : 0 : _o1[1] = captures[2];
31579 : 0 : _o1[2] = captures[3];
31580 : 0 : {
31581 : 0 : tree _o2[1], _r2;
31582 : 0 : _o2[0] = captures[4];
31583 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31584 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31585 : : {
31586 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31587 : 0 : tem_op.resimplify (lseq, valueize);
31588 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31589 : 0 : if (!_r2) goto next_after_fail3016;
31590 : : }
31591 : : else
31592 : : _r2 = _o2[0];
31593 : 0 : _o1[3] = _r2;
31594 : : }
31595 : 0 : (*res_op).set_op (CFN_COND_FMAX, TREE_TYPE (_o1[1]), 4);
31596 : 0 : (*res_op).ops[0] = _o1[0];
31597 : 0 : (*res_op).ops[1] = _o1[1];
31598 : 0 : (*res_op).ops[2] = _o1[2];
31599 : 0 : (*res_op).ops[3] = _o1[3];
31600 : 0 : (*res_op).resimplify (lseq, valueize);
31601 : : }
31602 : 0 : if (type != res_op->type
31603 : 0 : && !useless_type_conversion_p (type, res_op->type))
31604 : : {
31605 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3016;
31606 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31607 : 0 : res_op->resimplify (lseq, valueize);
31608 : : }
31609 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31610 : 0 : return true;
31611 : : }
31612 : 0 : next_after_fail3016:;
31613 : : }
31614 : : }
31615 : : }
31616 : : }
31617 : : break;
31618 : 0 : case CFN_FMIN:
31619 : 0 : if (gimple_call_num_args (_c1) == 2)
31620 : : {
31621 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
31622 : 0 : _q30 = do_valueize (valueize, _q30);
31623 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
31624 : 0 : _q31 = do_valueize (valueize, _q31);
31625 : 0 : {
31626 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31627 : 0 : {
31628 : 0 : tree op_type = TREE_TYPE (captures[1]);
31629 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMIN), op_type)
31630 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31631 : 0 : && single_use (captures[1])
31632 : : )
31633 : : {
31634 : 0 : gimple_seq *lseq = seq;
31635 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3017;
31636 : 0 : {
31637 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31638 : 0 : {
31639 : 0 : tree _o1[4], _r1;
31640 : 0 : _o1[0] = captures[0];
31641 : 0 : _o1[1] = captures[2];
31642 : 0 : _o1[2] = captures[3];
31643 : 0 : {
31644 : 0 : tree _o2[1], _r2;
31645 : 0 : _o2[0] = captures[4];
31646 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31647 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31648 : : {
31649 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31650 : 0 : tem_op.resimplify (lseq, valueize);
31651 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31652 : 0 : if (!_r2) goto next_after_fail3017;
31653 : : }
31654 : : else
31655 : : _r2 = _o2[0];
31656 : 0 : _o1[3] = _r2;
31657 : : }
31658 : 0 : (*res_op).set_op (CFN_COND_FMIN, TREE_TYPE (_o1[1]), 4);
31659 : 0 : (*res_op).ops[0] = _o1[0];
31660 : 0 : (*res_op).ops[1] = _o1[1];
31661 : 0 : (*res_op).ops[2] = _o1[2];
31662 : 0 : (*res_op).ops[3] = _o1[3];
31663 : 0 : (*res_op).resimplify (lseq, valueize);
31664 : : }
31665 : 0 : if (type != res_op->type
31666 : 0 : && !useless_type_conversion_p (type, res_op->type))
31667 : : {
31668 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3017;
31669 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31670 : 0 : res_op->resimplify (lseq, valueize);
31671 : : }
31672 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31673 : 0 : return true;
31674 : : }
31675 : 0 : next_after_fail3017:;
31676 : : }
31677 : : }
31678 : : }
31679 : : }
31680 : : break;
31681 : 0 : case CFN_COPYSIGN:
31682 : 0 : if (gimple_call_num_args (_c1) == 2)
31683 : : {
31684 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
31685 : 0 : _q30 = do_valueize (valueize, _q30);
31686 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
31687 : 0 : _q31 = do_valueize (valueize, _q31);
31688 : 0 : {
31689 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _p2 };
31690 : 0 : {
31691 : 0 : tree op_type = TREE_TYPE (captures[1]);
31692 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_COPYSIGN), op_type)
31693 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31694 : 0 : && single_use (captures[1])
31695 : : )
31696 : : {
31697 : 0 : gimple_seq *lseq = seq;
31698 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3018;
31699 : 0 : {
31700 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31701 : 0 : {
31702 : 0 : tree _o1[4], _r1;
31703 : 0 : _o1[0] = captures[0];
31704 : 0 : _o1[1] = captures[2];
31705 : 0 : _o1[2] = captures[3];
31706 : 0 : {
31707 : 0 : tree _o2[1], _r2;
31708 : 0 : _o2[0] = captures[4];
31709 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31710 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31711 : : {
31712 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31713 : 0 : tem_op.resimplify (lseq, valueize);
31714 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31715 : 0 : if (!_r2) goto next_after_fail3018;
31716 : : }
31717 : : else
31718 : : _r2 = _o2[0];
31719 : 0 : _o1[3] = _r2;
31720 : : }
31721 : 0 : (*res_op).set_op (CFN_COND_COPYSIGN, TREE_TYPE (_o1[1]), 4);
31722 : 0 : (*res_op).ops[0] = _o1[0];
31723 : 0 : (*res_op).ops[1] = _o1[1];
31724 : 0 : (*res_op).ops[2] = _o1[2];
31725 : 0 : (*res_op).ops[3] = _o1[3];
31726 : 0 : (*res_op).resimplify (lseq, valueize);
31727 : : }
31728 : 0 : if (type != res_op->type
31729 : 0 : && !useless_type_conversion_p (type, res_op->type))
31730 : : {
31731 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3018;
31732 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31733 : 0 : res_op->resimplify (lseq, valueize);
31734 : : }
31735 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1273, __FILE__, __LINE__, true);
31736 : 0 : return true;
31737 : : }
31738 : 0 : next_after_fail3018:;
31739 : : }
31740 : : }
31741 : : }
31742 : : }
31743 : : break;
31744 : : default:;
31745 : : }
31746 : : }
31747 : : break;
31748 : 193931 : default:;
31749 : : }
31750 : 193931 : switch (TREE_CODE (_p2))
31751 : : {
31752 : 43729 : case SSA_NAME:
31753 : 43729 : if (gimple *_d1 = get_def (valueize, _p2))
31754 : : {
31755 : 37946 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
31756 : 39523 : switch (gimple_assign_rhs_code (_a1))
31757 : : {
31758 : 5065 : case VIEW_CONVERT_EXPR:
31759 : 5065 : {
31760 : 5065 : tree _q40 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
31761 : 5065 : if ((TREE_CODE (_q40) == SSA_NAME
31762 : 5065 : || is_gimple_min_invariant (_q40)))
31763 : : {
31764 : 5065 : _q40 = do_valueize (valueize, _q40);
31765 : 5065 : switch (TREE_CODE (_q40))
31766 : : {
31767 : 5065 : case SSA_NAME:
31768 : 5065 : if (gimple *_d2 = get_def (valueize, _q40))
31769 : : {
31770 : 5009 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
31771 : 3310 : switch (gimple_assign_rhs_code (_a2))
31772 : : {
31773 : 1346 : case PLUS_EXPR:
31774 : 1346 : {
31775 : 1346 : tree _q50 = gimple_assign_rhs1 (_a2);
31776 : 1346 : _q50 = do_valueize (valueize, _q50);
31777 : 1346 : tree _q51 = gimple_assign_rhs2 (_a2);
31778 : 1346 : _q51 = do_valueize (valueize, _q51);
31779 : 1346 : if (tree_swap_operands_p (_q50, _q51))
31780 : 56 : std::swap (_q50, _q51);
31781 : 1346 : {
31782 : 1346 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
31783 : 1346 : {
31784 : 1346 : tree op_type = TREE_TYPE (captures[2]);
31785 : 1346 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_ADD), op_type)
31786 : 129 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31787 : 1475 : && single_use (captures[2])
31788 : : )
31789 : : {
31790 : 101 : gimple_seq *lseq = seq;
31791 : 101 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3019;
31792 : 101 : {
31793 : 101 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31794 : 101 : {
31795 : 101 : tree _o1[4], _r1;
31796 : 101 : {
31797 : 101 : tree _o2[1], _r2;
31798 : 101 : _o2[0] = captures[0];
31799 : 101 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
31800 : 101 : tem_op.resimplify (lseq, valueize);
31801 : 101 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31802 : 101 : if (!_r2) goto next_after_fail3019;
31803 : 33 : _o1[0] = _r2;
31804 : : }
31805 : 33 : _o1[1] = captures[3];
31806 : 33 : _o1[2] = captures[4];
31807 : 33 : {
31808 : 33 : tree _o2[1], _r2;
31809 : 33 : _o2[0] = captures[1];
31810 : 33 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31811 : 33 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31812 : : {
31813 : 33 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31814 : 33 : tem_op.resimplify (lseq, valueize);
31815 : 33 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31816 : 33 : if (!_r2) goto next_after_fail3019;
31817 : : }
31818 : : else
31819 : : _r2 = _o2[0];
31820 : 33 : _o1[3] = _r2;
31821 : : }
31822 : 33 : (*res_op).set_op (CFN_COND_ADD, TREE_TYPE (_o1[1]), 4);
31823 : 33 : (*res_op).ops[0] = _o1[0];
31824 : 33 : (*res_op).ops[1] = _o1[1];
31825 : 33 : (*res_op).ops[2] = _o1[2];
31826 : 33 : (*res_op).ops[3] = _o1[3];
31827 : 33 : (*res_op).resimplify (lseq, valueize);
31828 : : }
31829 : 33 : if (type != res_op->type
31830 : 33 : && !useless_type_conversion_p (type, res_op->type))
31831 : : {
31832 : 33 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3019;
31833 : 33 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31834 : 33 : res_op->resimplify (lseq, valueize);
31835 : : }
31836 : 33 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
31837 : 33 : return true;
31838 : : }
31839 : 1313 : next_after_fail3019:;
31840 : : }
31841 : : }
31842 : : }
31843 : 1313 : break;
31844 : : }
31845 : 52 : case MINUS_EXPR:
31846 : 52 : {
31847 : 52 : tree _q50 = gimple_assign_rhs1 (_a2);
31848 : 52 : _q50 = do_valueize (valueize, _q50);
31849 : 52 : tree _q51 = gimple_assign_rhs2 (_a2);
31850 : 52 : _q51 = do_valueize (valueize, _q51);
31851 : 52 : {
31852 : 52 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
31853 : 52 : {
31854 : 52 : tree op_type = TREE_TYPE (captures[2]);
31855 : 52 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SUB), op_type)
31856 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31857 : 52 : && single_use (captures[2])
31858 : : )
31859 : : {
31860 : 0 : gimple_seq *lseq = seq;
31861 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3020;
31862 : 0 : {
31863 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31864 : 0 : {
31865 : 0 : tree _o1[4], _r1;
31866 : 0 : {
31867 : 0 : tree _o2[1], _r2;
31868 : 0 : _o2[0] = captures[0];
31869 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
31870 : 0 : tem_op.resimplify (lseq, valueize);
31871 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31872 : 0 : if (!_r2) goto next_after_fail3020;
31873 : 0 : _o1[0] = _r2;
31874 : : }
31875 : 0 : _o1[1] = captures[3];
31876 : 0 : _o1[2] = captures[4];
31877 : 0 : {
31878 : 0 : tree _o2[1], _r2;
31879 : 0 : _o2[0] = captures[1];
31880 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31881 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31882 : : {
31883 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31884 : 0 : tem_op.resimplify (lseq, valueize);
31885 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31886 : 0 : if (!_r2) goto next_after_fail3020;
31887 : : }
31888 : : else
31889 : : _r2 = _o2[0];
31890 : 0 : _o1[3] = _r2;
31891 : : }
31892 : 0 : (*res_op).set_op (CFN_COND_SUB, TREE_TYPE (_o1[1]), 4);
31893 : 0 : (*res_op).ops[0] = _o1[0];
31894 : 0 : (*res_op).ops[1] = _o1[1];
31895 : 0 : (*res_op).ops[2] = _o1[2];
31896 : 0 : (*res_op).ops[3] = _o1[3];
31897 : 0 : (*res_op).resimplify (lseq, valueize);
31898 : : }
31899 : 0 : if (type != res_op->type
31900 : 0 : && !useless_type_conversion_p (type, res_op->type))
31901 : : {
31902 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3020;
31903 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31904 : 0 : res_op->resimplify (lseq, valueize);
31905 : : }
31906 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
31907 : 0 : return true;
31908 : : }
31909 : 52 : next_after_fail3020:;
31910 : : }
31911 : : }
31912 : : }
31913 : 52 : break;
31914 : : }
31915 : 91 : case MULT_EXPR:
31916 : 91 : {
31917 : 91 : tree _q50 = gimple_assign_rhs1 (_a2);
31918 : 91 : _q50 = do_valueize (valueize, _q50);
31919 : 91 : tree _q51 = gimple_assign_rhs2 (_a2);
31920 : 91 : _q51 = do_valueize (valueize, _q51);
31921 : 91 : if (tree_swap_operands_p (_q50, _q51))
31922 : 12 : std::swap (_q50, _q51);
31923 : 91 : {
31924 : 91 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
31925 : 91 : {
31926 : 91 : tree op_type = TREE_TYPE (captures[2]);
31927 : 91 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MUL), op_type)
31928 : 6 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31929 : 97 : && single_use (captures[2])
31930 : : )
31931 : : {
31932 : 6 : gimple_seq *lseq = seq;
31933 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3021;
31934 : 6 : {
31935 : 6 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31936 : 6 : {
31937 : 6 : tree _o1[4], _r1;
31938 : 6 : {
31939 : 6 : tree _o2[1], _r2;
31940 : 6 : _o2[0] = captures[0];
31941 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
31942 : 6 : tem_op.resimplify (lseq, valueize);
31943 : 6 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31944 : 6 : if (!_r2) goto next_after_fail3021;
31945 : 0 : _o1[0] = _r2;
31946 : : }
31947 : 0 : _o1[1] = captures[3];
31948 : 0 : _o1[2] = captures[4];
31949 : 0 : {
31950 : 0 : tree _o2[1], _r2;
31951 : 0 : _o2[0] = captures[1];
31952 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
31953 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
31954 : : {
31955 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
31956 : 0 : tem_op.resimplify (lseq, valueize);
31957 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
31958 : 0 : if (!_r2) goto next_after_fail3021;
31959 : : }
31960 : : else
31961 : : _r2 = _o2[0];
31962 : 0 : _o1[3] = _r2;
31963 : : }
31964 : 0 : (*res_op).set_op (CFN_COND_MUL, TREE_TYPE (_o1[1]), 4);
31965 : 0 : (*res_op).ops[0] = _o1[0];
31966 : 0 : (*res_op).ops[1] = _o1[1];
31967 : 0 : (*res_op).ops[2] = _o1[2];
31968 : 0 : (*res_op).ops[3] = _o1[3];
31969 : 0 : (*res_op).resimplify (lseq, valueize);
31970 : : }
31971 : 0 : if (type != res_op->type
31972 : 0 : && !useless_type_conversion_p (type, res_op->type))
31973 : : {
31974 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3021;
31975 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
31976 : 0 : res_op->resimplify (lseq, valueize);
31977 : : }
31978 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
31979 : 0 : return true;
31980 : : }
31981 : 91 : next_after_fail3021:;
31982 : : }
31983 : : }
31984 : : }
31985 : 91 : break;
31986 : : }
31987 : 0 : case TRUNC_DIV_EXPR:
31988 : 0 : {
31989 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
31990 : 0 : _q50 = do_valueize (valueize, _q50);
31991 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
31992 : 0 : _q51 = do_valueize (valueize, _q51);
31993 : 0 : {
31994 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
31995 : 0 : {
31996 : 0 : tree op_type = TREE_TYPE (captures[2]);
31997 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_DIV), op_type)
31998 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
31999 : 0 : && single_use (captures[2])
32000 : : )
32001 : : {
32002 : 0 : gimple_seq *lseq = seq;
32003 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3022;
32004 : 0 : {
32005 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32006 : 0 : {
32007 : 0 : tree _o1[4], _r1;
32008 : 0 : {
32009 : 0 : tree _o2[1], _r2;
32010 : 0 : _o2[0] = captures[0];
32011 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32012 : 0 : tem_op.resimplify (lseq, valueize);
32013 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32014 : 0 : if (!_r2) goto next_after_fail3022;
32015 : 0 : _o1[0] = _r2;
32016 : : }
32017 : 0 : _o1[1] = captures[3];
32018 : 0 : _o1[2] = captures[4];
32019 : 0 : {
32020 : 0 : tree _o2[1], _r2;
32021 : 0 : _o2[0] = captures[1];
32022 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32023 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32024 : : {
32025 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32026 : 0 : tem_op.resimplify (lseq, valueize);
32027 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32028 : 0 : if (!_r2) goto next_after_fail3022;
32029 : : }
32030 : : else
32031 : : _r2 = _o2[0];
32032 : 0 : _o1[3] = _r2;
32033 : : }
32034 : 0 : (*res_op).set_op (CFN_COND_DIV, TREE_TYPE (_o1[1]), 4);
32035 : 0 : (*res_op).ops[0] = _o1[0];
32036 : 0 : (*res_op).ops[1] = _o1[1];
32037 : 0 : (*res_op).ops[2] = _o1[2];
32038 : 0 : (*res_op).ops[3] = _o1[3];
32039 : 0 : (*res_op).resimplify (lseq, valueize);
32040 : : }
32041 : 0 : if (type != res_op->type
32042 : 0 : && !useless_type_conversion_p (type, res_op->type))
32043 : : {
32044 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3022;
32045 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32046 : 0 : res_op->resimplify (lseq, valueize);
32047 : : }
32048 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32049 : 0 : return true;
32050 : : }
32051 : 0 : next_after_fail3022:;
32052 : : }
32053 : : }
32054 : : }
32055 : 0 : break;
32056 : : }
32057 : 0 : case TRUNC_MOD_EXPR:
32058 : 0 : {
32059 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32060 : 0 : _q50 = do_valueize (valueize, _q50);
32061 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32062 : 0 : _q51 = do_valueize (valueize, _q51);
32063 : 0 : {
32064 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32065 : 0 : {
32066 : 0 : tree op_type = TREE_TYPE (captures[2]);
32067 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MOD), op_type)
32068 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32069 : 0 : && single_use (captures[2])
32070 : : )
32071 : : {
32072 : 0 : gimple_seq *lseq = seq;
32073 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3023;
32074 : 0 : {
32075 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32076 : 0 : {
32077 : 0 : tree _o1[4], _r1;
32078 : 0 : {
32079 : 0 : tree _o2[1], _r2;
32080 : 0 : _o2[0] = captures[0];
32081 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32082 : 0 : tem_op.resimplify (lseq, valueize);
32083 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32084 : 0 : if (!_r2) goto next_after_fail3023;
32085 : 0 : _o1[0] = _r2;
32086 : : }
32087 : 0 : _o1[1] = captures[3];
32088 : 0 : _o1[2] = captures[4];
32089 : 0 : {
32090 : 0 : tree _o2[1], _r2;
32091 : 0 : _o2[0] = captures[1];
32092 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32093 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32094 : : {
32095 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32096 : 0 : tem_op.resimplify (lseq, valueize);
32097 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32098 : 0 : if (!_r2) goto next_after_fail3023;
32099 : : }
32100 : : else
32101 : : _r2 = _o2[0];
32102 : 0 : _o1[3] = _r2;
32103 : : }
32104 : 0 : (*res_op).set_op (CFN_COND_MOD, TREE_TYPE (_o1[1]), 4);
32105 : 0 : (*res_op).ops[0] = _o1[0];
32106 : 0 : (*res_op).ops[1] = _o1[1];
32107 : 0 : (*res_op).ops[2] = _o1[2];
32108 : 0 : (*res_op).ops[3] = _o1[3];
32109 : 0 : (*res_op).resimplify (lseq, valueize);
32110 : : }
32111 : 0 : if (type != res_op->type
32112 : 0 : && !useless_type_conversion_p (type, res_op->type))
32113 : : {
32114 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3023;
32115 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32116 : 0 : res_op->resimplify (lseq, valueize);
32117 : : }
32118 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32119 : 0 : return true;
32120 : : }
32121 : 0 : next_after_fail3023:;
32122 : : }
32123 : : }
32124 : : }
32125 : 0 : break;
32126 : : }
32127 : 0 : case RDIV_EXPR:
32128 : 0 : {
32129 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32130 : 0 : _q50 = do_valueize (valueize, _q50);
32131 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32132 : 0 : _q51 = do_valueize (valueize, _q51);
32133 : 0 : {
32134 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32135 : 0 : {
32136 : 0 : tree op_type = TREE_TYPE (captures[2]);
32137 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_RDIV), op_type)
32138 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32139 : 0 : && single_use (captures[2])
32140 : : )
32141 : : {
32142 : 0 : gimple_seq *lseq = seq;
32143 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3024;
32144 : 0 : {
32145 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32146 : 0 : {
32147 : 0 : tree _o1[4], _r1;
32148 : 0 : {
32149 : 0 : tree _o2[1], _r2;
32150 : 0 : _o2[0] = captures[0];
32151 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32152 : 0 : tem_op.resimplify (lseq, valueize);
32153 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32154 : 0 : if (!_r2) goto next_after_fail3024;
32155 : 0 : _o1[0] = _r2;
32156 : : }
32157 : 0 : _o1[1] = captures[3];
32158 : 0 : _o1[2] = captures[4];
32159 : 0 : {
32160 : 0 : tree _o2[1], _r2;
32161 : 0 : _o2[0] = captures[1];
32162 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32163 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32164 : : {
32165 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32166 : 0 : tem_op.resimplify (lseq, valueize);
32167 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32168 : 0 : if (!_r2) goto next_after_fail3024;
32169 : : }
32170 : : else
32171 : : _r2 = _o2[0];
32172 : 0 : _o1[3] = _r2;
32173 : : }
32174 : 0 : (*res_op).set_op (CFN_COND_RDIV, TREE_TYPE (_o1[1]), 4);
32175 : 0 : (*res_op).ops[0] = _o1[0];
32176 : 0 : (*res_op).ops[1] = _o1[1];
32177 : 0 : (*res_op).ops[2] = _o1[2];
32178 : 0 : (*res_op).ops[3] = _o1[3];
32179 : 0 : (*res_op).resimplify (lseq, valueize);
32180 : : }
32181 : 0 : if (type != res_op->type
32182 : 0 : && !useless_type_conversion_p (type, res_op->type))
32183 : : {
32184 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3024;
32185 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32186 : 0 : res_op->resimplify (lseq, valueize);
32187 : : }
32188 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32189 : 0 : return true;
32190 : : }
32191 : 0 : next_after_fail3024:;
32192 : : }
32193 : : }
32194 : : }
32195 : 0 : break;
32196 : : }
32197 : 0 : case MIN_EXPR:
32198 : 0 : {
32199 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32200 : 0 : _q50 = do_valueize (valueize, _q50);
32201 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32202 : 0 : _q51 = do_valueize (valueize, _q51);
32203 : 0 : if (tree_swap_operands_p (_q50, _q51))
32204 : 0 : std::swap (_q50, _q51);
32205 : 0 : {
32206 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32207 : 0 : {
32208 : 0 : tree op_type = TREE_TYPE (captures[2]);
32209 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MIN), op_type)
32210 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32211 : 0 : && single_use (captures[2])
32212 : : )
32213 : : {
32214 : 0 : gimple_seq *lseq = seq;
32215 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3025;
32216 : 0 : {
32217 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32218 : 0 : {
32219 : 0 : tree _o1[4], _r1;
32220 : 0 : {
32221 : 0 : tree _o2[1], _r2;
32222 : 0 : _o2[0] = captures[0];
32223 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32224 : 0 : tem_op.resimplify (lseq, valueize);
32225 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32226 : 0 : if (!_r2) goto next_after_fail3025;
32227 : 0 : _o1[0] = _r2;
32228 : : }
32229 : 0 : _o1[1] = captures[3];
32230 : 0 : _o1[2] = captures[4];
32231 : 0 : {
32232 : 0 : tree _o2[1], _r2;
32233 : 0 : _o2[0] = captures[1];
32234 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32235 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32236 : : {
32237 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32238 : 0 : tem_op.resimplify (lseq, valueize);
32239 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32240 : 0 : if (!_r2) goto next_after_fail3025;
32241 : : }
32242 : : else
32243 : : _r2 = _o2[0];
32244 : 0 : _o1[3] = _r2;
32245 : : }
32246 : 0 : (*res_op).set_op (CFN_COND_MIN, TREE_TYPE (_o1[1]), 4);
32247 : 0 : (*res_op).ops[0] = _o1[0];
32248 : 0 : (*res_op).ops[1] = _o1[1];
32249 : 0 : (*res_op).ops[2] = _o1[2];
32250 : 0 : (*res_op).ops[3] = _o1[3];
32251 : 0 : (*res_op).resimplify (lseq, valueize);
32252 : : }
32253 : 0 : if (type != res_op->type
32254 : 0 : && !useless_type_conversion_p (type, res_op->type))
32255 : : {
32256 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3025;
32257 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32258 : 0 : res_op->resimplify (lseq, valueize);
32259 : : }
32260 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32261 : 0 : return true;
32262 : : }
32263 : 0 : next_after_fail3025:;
32264 : : }
32265 : : }
32266 : : }
32267 : 0 : break;
32268 : : }
32269 : 0 : case MAX_EXPR:
32270 : 0 : {
32271 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32272 : 0 : _q50 = do_valueize (valueize, _q50);
32273 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32274 : 0 : _q51 = do_valueize (valueize, _q51);
32275 : 0 : if (tree_swap_operands_p (_q50, _q51))
32276 : 0 : std::swap (_q50, _q51);
32277 : 0 : {
32278 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32279 : 0 : {
32280 : 0 : tree op_type = TREE_TYPE (captures[2]);
32281 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MAX), op_type)
32282 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32283 : 0 : && single_use (captures[2])
32284 : : )
32285 : : {
32286 : 0 : gimple_seq *lseq = seq;
32287 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3026;
32288 : 0 : {
32289 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32290 : 0 : {
32291 : 0 : tree _o1[4], _r1;
32292 : 0 : {
32293 : 0 : tree _o2[1], _r2;
32294 : 0 : _o2[0] = captures[0];
32295 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32296 : 0 : tem_op.resimplify (lseq, valueize);
32297 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32298 : 0 : if (!_r2) goto next_after_fail3026;
32299 : 0 : _o1[0] = _r2;
32300 : : }
32301 : 0 : _o1[1] = captures[3];
32302 : 0 : _o1[2] = captures[4];
32303 : 0 : {
32304 : 0 : tree _o2[1], _r2;
32305 : 0 : _o2[0] = captures[1];
32306 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32307 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32308 : : {
32309 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32310 : 0 : tem_op.resimplify (lseq, valueize);
32311 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32312 : 0 : if (!_r2) goto next_after_fail3026;
32313 : : }
32314 : : else
32315 : : _r2 = _o2[0];
32316 : 0 : _o1[3] = _r2;
32317 : : }
32318 : 0 : (*res_op).set_op (CFN_COND_MAX, TREE_TYPE (_o1[1]), 4);
32319 : 0 : (*res_op).ops[0] = _o1[0];
32320 : 0 : (*res_op).ops[1] = _o1[1];
32321 : 0 : (*res_op).ops[2] = _o1[2];
32322 : 0 : (*res_op).ops[3] = _o1[3];
32323 : 0 : (*res_op).resimplify (lseq, valueize);
32324 : : }
32325 : 0 : if (type != res_op->type
32326 : 0 : && !useless_type_conversion_p (type, res_op->type))
32327 : : {
32328 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3026;
32329 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32330 : 0 : res_op->resimplify (lseq, valueize);
32331 : : }
32332 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32333 : 0 : return true;
32334 : : }
32335 : 0 : next_after_fail3026:;
32336 : : }
32337 : : }
32338 : : }
32339 : 0 : break;
32340 : : }
32341 : 0 : case BIT_AND_EXPR:
32342 : 0 : {
32343 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32344 : 0 : _q50 = do_valueize (valueize, _q50);
32345 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32346 : 0 : _q51 = do_valueize (valueize, _q51);
32347 : 0 : if (tree_swap_operands_p (_q50, _q51))
32348 : 0 : std::swap (_q50, _q51);
32349 : 0 : {
32350 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32351 : 0 : {
32352 : 0 : tree op_type = TREE_TYPE (captures[2]);
32353 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_AND), op_type)
32354 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32355 : 0 : && single_use (captures[2])
32356 : : )
32357 : : {
32358 : 0 : gimple_seq *lseq = seq;
32359 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3027;
32360 : 0 : {
32361 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32362 : 0 : {
32363 : 0 : tree _o1[4], _r1;
32364 : 0 : {
32365 : 0 : tree _o2[1], _r2;
32366 : 0 : _o2[0] = captures[0];
32367 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32368 : 0 : tem_op.resimplify (lseq, valueize);
32369 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32370 : 0 : if (!_r2) goto next_after_fail3027;
32371 : 0 : _o1[0] = _r2;
32372 : : }
32373 : 0 : _o1[1] = captures[3];
32374 : 0 : _o1[2] = captures[4];
32375 : 0 : {
32376 : 0 : tree _o2[1], _r2;
32377 : 0 : _o2[0] = captures[1];
32378 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32379 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32380 : : {
32381 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32382 : 0 : tem_op.resimplify (lseq, valueize);
32383 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32384 : 0 : if (!_r2) goto next_after_fail3027;
32385 : : }
32386 : : else
32387 : : _r2 = _o2[0];
32388 : 0 : _o1[3] = _r2;
32389 : : }
32390 : 0 : (*res_op).set_op (CFN_COND_AND, TREE_TYPE (_o1[1]), 4);
32391 : 0 : (*res_op).ops[0] = _o1[0];
32392 : 0 : (*res_op).ops[1] = _o1[1];
32393 : 0 : (*res_op).ops[2] = _o1[2];
32394 : 0 : (*res_op).ops[3] = _o1[3];
32395 : 0 : (*res_op).resimplify (lseq, valueize);
32396 : : }
32397 : 0 : if (type != res_op->type
32398 : 0 : && !useless_type_conversion_p (type, res_op->type))
32399 : : {
32400 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3027;
32401 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32402 : 0 : res_op->resimplify (lseq, valueize);
32403 : : }
32404 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32405 : 0 : return true;
32406 : : }
32407 : 0 : next_after_fail3027:;
32408 : : }
32409 : : }
32410 : : }
32411 : 0 : break;
32412 : : }
32413 : 0 : case BIT_IOR_EXPR:
32414 : 0 : {
32415 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32416 : 0 : _q50 = do_valueize (valueize, _q50);
32417 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32418 : 0 : _q51 = do_valueize (valueize, _q51);
32419 : 0 : if (tree_swap_operands_p (_q50, _q51))
32420 : 0 : std::swap (_q50, _q51);
32421 : 0 : {
32422 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32423 : 0 : {
32424 : 0 : tree op_type = TREE_TYPE (captures[2]);
32425 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_IOR), op_type)
32426 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32427 : 0 : && single_use (captures[2])
32428 : : )
32429 : : {
32430 : 0 : gimple_seq *lseq = seq;
32431 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3028;
32432 : 0 : {
32433 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32434 : 0 : {
32435 : 0 : tree _o1[4], _r1;
32436 : 0 : {
32437 : 0 : tree _o2[1], _r2;
32438 : 0 : _o2[0] = captures[0];
32439 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32440 : 0 : tem_op.resimplify (lseq, valueize);
32441 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32442 : 0 : if (!_r2) goto next_after_fail3028;
32443 : 0 : _o1[0] = _r2;
32444 : : }
32445 : 0 : _o1[1] = captures[3];
32446 : 0 : _o1[2] = captures[4];
32447 : 0 : {
32448 : 0 : tree _o2[1], _r2;
32449 : 0 : _o2[0] = captures[1];
32450 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32451 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32452 : : {
32453 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32454 : 0 : tem_op.resimplify (lseq, valueize);
32455 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32456 : 0 : if (!_r2) goto next_after_fail3028;
32457 : : }
32458 : : else
32459 : : _r2 = _o2[0];
32460 : 0 : _o1[3] = _r2;
32461 : : }
32462 : 0 : (*res_op).set_op (CFN_COND_IOR, TREE_TYPE (_o1[1]), 4);
32463 : 0 : (*res_op).ops[0] = _o1[0];
32464 : 0 : (*res_op).ops[1] = _o1[1];
32465 : 0 : (*res_op).ops[2] = _o1[2];
32466 : 0 : (*res_op).ops[3] = _o1[3];
32467 : 0 : (*res_op).resimplify (lseq, valueize);
32468 : : }
32469 : 0 : if (type != res_op->type
32470 : 0 : && !useless_type_conversion_p (type, res_op->type))
32471 : : {
32472 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3028;
32473 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32474 : 0 : res_op->resimplify (lseq, valueize);
32475 : : }
32476 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32477 : 0 : return true;
32478 : : }
32479 : 0 : next_after_fail3028:;
32480 : : }
32481 : : }
32482 : : }
32483 : 0 : break;
32484 : : }
32485 : 0 : case BIT_XOR_EXPR:
32486 : 0 : {
32487 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32488 : 0 : _q50 = do_valueize (valueize, _q50);
32489 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32490 : 0 : _q51 = do_valueize (valueize, _q51);
32491 : 0 : if (tree_swap_operands_p (_q50, _q51))
32492 : 0 : std::swap (_q50, _q51);
32493 : 0 : {
32494 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32495 : 0 : {
32496 : 0 : tree op_type = TREE_TYPE (captures[2]);
32497 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_XOR), op_type)
32498 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32499 : 0 : && single_use (captures[2])
32500 : : )
32501 : : {
32502 : 0 : gimple_seq *lseq = seq;
32503 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3029;
32504 : 0 : {
32505 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32506 : 0 : {
32507 : 0 : tree _o1[4], _r1;
32508 : 0 : {
32509 : 0 : tree _o2[1], _r2;
32510 : 0 : _o2[0] = captures[0];
32511 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32512 : 0 : tem_op.resimplify (lseq, valueize);
32513 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32514 : 0 : if (!_r2) goto next_after_fail3029;
32515 : 0 : _o1[0] = _r2;
32516 : : }
32517 : 0 : _o1[1] = captures[3];
32518 : 0 : _o1[2] = captures[4];
32519 : 0 : {
32520 : 0 : tree _o2[1], _r2;
32521 : 0 : _o2[0] = captures[1];
32522 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32523 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32524 : : {
32525 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32526 : 0 : tem_op.resimplify (lseq, valueize);
32527 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32528 : 0 : if (!_r2) goto next_after_fail3029;
32529 : : }
32530 : : else
32531 : : _r2 = _o2[0];
32532 : 0 : _o1[3] = _r2;
32533 : : }
32534 : 0 : (*res_op).set_op (CFN_COND_XOR, TREE_TYPE (_o1[1]), 4);
32535 : 0 : (*res_op).ops[0] = _o1[0];
32536 : 0 : (*res_op).ops[1] = _o1[1];
32537 : 0 : (*res_op).ops[2] = _o1[2];
32538 : 0 : (*res_op).ops[3] = _o1[3];
32539 : 0 : (*res_op).resimplify (lseq, valueize);
32540 : : }
32541 : 0 : if (type != res_op->type
32542 : 0 : && !useless_type_conversion_p (type, res_op->type))
32543 : : {
32544 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3029;
32545 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32546 : 0 : res_op->resimplify (lseq, valueize);
32547 : : }
32548 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32549 : 0 : return true;
32550 : : }
32551 : 0 : next_after_fail3029:;
32552 : : }
32553 : : }
32554 : : }
32555 : 0 : break;
32556 : : }
32557 : 72 : case LSHIFT_EXPR:
32558 : 72 : {
32559 : 72 : tree _q50 = gimple_assign_rhs1 (_a2);
32560 : 72 : _q50 = do_valueize (valueize, _q50);
32561 : 72 : tree _q51 = gimple_assign_rhs2 (_a2);
32562 : 72 : _q51 = do_valueize (valueize, _q51);
32563 : 72 : {
32564 : 72 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32565 : 72 : {
32566 : 72 : tree op_type = TREE_TYPE (captures[2]);
32567 : 72 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHL), op_type)
32568 : 24 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32569 : 96 : && single_use (captures[2])
32570 : : )
32571 : : {
32572 : 0 : gimple_seq *lseq = seq;
32573 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3030;
32574 : 0 : {
32575 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32576 : 0 : {
32577 : 0 : tree _o1[4], _r1;
32578 : 0 : {
32579 : 0 : tree _o2[1], _r2;
32580 : 0 : _o2[0] = captures[0];
32581 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32582 : 0 : tem_op.resimplify (lseq, valueize);
32583 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32584 : 0 : if (!_r2) goto next_after_fail3030;
32585 : 0 : _o1[0] = _r2;
32586 : : }
32587 : 0 : _o1[1] = captures[3];
32588 : 0 : _o1[2] = captures[4];
32589 : 0 : {
32590 : 0 : tree _o2[1], _r2;
32591 : 0 : _o2[0] = captures[1];
32592 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32593 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32594 : : {
32595 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32596 : 0 : tem_op.resimplify (lseq, valueize);
32597 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32598 : 0 : if (!_r2) goto next_after_fail3030;
32599 : : }
32600 : : else
32601 : : _r2 = _o2[0];
32602 : 0 : _o1[3] = _r2;
32603 : : }
32604 : 0 : (*res_op).set_op (CFN_COND_SHL, TREE_TYPE (_o1[1]), 4);
32605 : 0 : (*res_op).ops[0] = _o1[0];
32606 : 0 : (*res_op).ops[1] = _o1[1];
32607 : 0 : (*res_op).ops[2] = _o1[2];
32608 : 0 : (*res_op).ops[3] = _o1[3];
32609 : 0 : (*res_op).resimplify (lseq, valueize);
32610 : : }
32611 : 0 : if (type != res_op->type
32612 : 0 : && !useless_type_conversion_p (type, res_op->type))
32613 : : {
32614 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3030;
32615 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32616 : 0 : res_op->resimplify (lseq, valueize);
32617 : : }
32618 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32619 : 0 : return true;
32620 : : }
32621 : 72 : next_after_fail3030:;
32622 : : }
32623 : : }
32624 : : }
32625 : 72 : break;
32626 : : }
32627 : 0 : case RSHIFT_EXPR:
32628 : 0 : {
32629 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
32630 : 0 : _q50 = do_valueize (valueize, _q50);
32631 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
32632 : 0 : _q51 = do_valueize (valueize, _q51);
32633 : 0 : {
32634 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32635 : 0 : {
32636 : 0 : tree op_type = TREE_TYPE (captures[2]);
32637 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHR), op_type)
32638 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32639 : 0 : && single_use (captures[2])
32640 : : )
32641 : : {
32642 : 0 : gimple_seq *lseq = seq;
32643 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3031;
32644 : 0 : {
32645 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32646 : 0 : {
32647 : 0 : tree _o1[4], _r1;
32648 : 0 : {
32649 : 0 : tree _o2[1], _r2;
32650 : 0 : _o2[0] = captures[0];
32651 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32652 : 0 : tem_op.resimplify (lseq, valueize);
32653 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32654 : 0 : if (!_r2) goto next_after_fail3031;
32655 : 0 : _o1[0] = _r2;
32656 : : }
32657 : 0 : _o1[1] = captures[3];
32658 : 0 : _o1[2] = captures[4];
32659 : 0 : {
32660 : 0 : tree _o2[1], _r2;
32661 : 0 : _o2[0] = captures[1];
32662 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32663 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32664 : : {
32665 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32666 : 0 : tem_op.resimplify (lseq, valueize);
32667 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32668 : 0 : if (!_r2) goto next_after_fail3031;
32669 : : }
32670 : : else
32671 : : _r2 = _o2[0];
32672 : 0 : _o1[3] = _r2;
32673 : : }
32674 : 0 : (*res_op).set_op (CFN_COND_SHR, TREE_TYPE (_o1[1]), 4);
32675 : 0 : (*res_op).ops[0] = _o1[0];
32676 : 0 : (*res_op).ops[1] = _o1[1];
32677 : 0 : (*res_op).ops[2] = _o1[2];
32678 : 0 : (*res_op).ops[3] = _o1[3];
32679 : 0 : (*res_op).resimplify (lseq, valueize);
32680 : : }
32681 : 0 : if (type != res_op->type
32682 : 0 : && !useless_type_conversion_p (type, res_op->type))
32683 : : {
32684 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3031;
32685 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32686 : 0 : res_op->resimplify (lseq, valueize);
32687 : : }
32688 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32689 : 0 : return true;
32690 : : }
32691 : 0 : next_after_fail3031:;
32692 : : }
32693 : : }
32694 : : }
32695 : 0 : break;
32696 : : }
32697 : : default:;
32698 : : }
32699 : 1891 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
32700 : 1217 : switch (gimple_call_combined_fn (_c2))
32701 : : {
32702 : 0 : case CFN_FMAX:
32703 : 0 : if (gimple_call_num_args (_c2) == 2)
32704 : : {
32705 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
32706 : 0 : _q50 = do_valueize (valueize, _q50);
32707 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
32708 : 0 : _q51 = do_valueize (valueize, _q51);
32709 : 0 : {
32710 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32711 : 0 : {
32712 : 0 : tree op_type = TREE_TYPE (captures[2]);
32713 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMAX), op_type)
32714 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32715 : 0 : && single_use (captures[2])
32716 : : )
32717 : : {
32718 : 0 : gimple_seq *lseq = seq;
32719 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3032;
32720 : 0 : {
32721 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32722 : 0 : {
32723 : 0 : tree _o1[4], _r1;
32724 : 0 : {
32725 : 0 : tree _o2[1], _r2;
32726 : 0 : _o2[0] = captures[0];
32727 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32728 : 0 : tem_op.resimplify (lseq, valueize);
32729 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32730 : 0 : if (!_r2) goto next_after_fail3032;
32731 : 0 : _o1[0] = _r2;
32732 : : }
32733 : 0 : _o1[1] = captures[3];
32734 : 0 : _o1[2] = captures[4];
32735 : 0 : {
32736 : 0 : tree _o2[1], _r2;
32737 : 0 : _o2[0] = captures[1];
32738 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32739 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32740 : : {
32741 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32742 : 0 : tem_op.resimplify (lseq, valueize);
32743 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32744 : 0 : if (!_r2) goto next_after_fail3032;
32745 : : }
32746 : : else
32747 : : _r2 = _o2[0];
32748 : 0 : _o1[3] = _r2;
32749 : : }
32750 : 0 : (*res_op).set_op (CFN_COND_FMAX, TREE_TYPE (_o1[1]), 4);
32751 : 0 : (*res_op).ops[0] = _o1[0];
32752 : 0 : (*res_op).ops[1] = _o1[1];
32753 : 0 : (*res_op).ops[2] = _o1[2];
32754 : 0 : (*res_op).ops[3] = _o1[3];
32755 : 0 : (*res_op).resimplify (lseq, valueize);
32756 : : }
32757 : 0 : if (type != res_op->type
32758 : 0 : && !useless_type_conversion_p (type, res_op->type))
32759 : : {
32760 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3032;
32761 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32762 : 0 : res_op->resimplify (lseq, valueize);
32763 : : }
32764 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32765 : 0 : return true;
32766 : : }
32767 : 0 : next_after_fail3032:;
32768 : : }
32769 : : }
32770 : : }
32771 : : }
32772 : : break;
32773 : 0 : case CFN_FMIN:
32774 : 0 : if (gimple_call_num_args (_c2) == 2)
32775 : : {
32776 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
32777 : 0 : _q50 = do_valueize (valueize, _q50);
32778 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
32779 : 0 : _q51 = do_valueize (valueize, _q51);
32780 : 0 : {
32781 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32782 : 0 : {
32783 : 0 : tree op_type = TREE_TYPE (captures[2]);
32784 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMIN), op_type)
32785 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32786 : 0 : && single_use (captures[2])
32787 : : )
32788 : : {
32789 : 0 : gimple_seq *lseq = seq;
32790 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3033;
32791 : 0 : {
32792 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32793 : 0 : {
32794 : 0 : tree _o1[4], _r1;
32795 : 0 : {
32796 : 0 : tree _o2[1], _r2;
32797 : 0 : _o2[0] = captures[0];
32798 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32799 : 0 : tem_op.resimplify (lseq, valueize);
32800 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32801 : 0 : if (!_r2) goto next_after_fail3033;
32802 : 0 : _o1[0] = _r2;
32803 : : }
32804 : 0 : _o1[1] = captures[3];
32805 : 0 : _o1[2] = captures[4];
32806 : 0 : {
32807 : 0 : tree _o2[1], _r2;
32808 : 0 : _o2[0] = captures[1];
32809 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32810 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32811 : : {
32812 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32813 : 0 : tem_op.resimplify (lseq, valueize);
32814 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32815 : 0 : if (!_r2) goto next_after_fail3033;
32816 : : }
32817 : : else
32818 : : _r2 = _o2[0];
32819 : 0 : _o1[3] = _r2;
32820 : : }
32821 : 0 : (*res_op).set_op (CFN_COND_FMIN, TREE_TYPE (_o1[1]), 4);
32822 : 0 : (*res_op).ops[0] = _o1[0];
32823 : 0 : (*res_op).ops[1] = _o1[1];
32824 : 0 : (*res_op).ops[2] = _o1[2];
32825 : 0 : (*res_op).ops[3] = _o1[3];
32826 : 0 : (*res_op).resimplify (lseq, valueize);
32827 : : }
32828 : 0 : if (type != res_op->type
32829 : 0 : && !useless_type_conversion_p (type, res_op->type))
32830 : : {
32831 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3033;
32832 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32833 : 0 : res_op->resimplify (lseq, valueize);
32834 : : }
32835 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32836 : 0 : return true;
32837 : : }
32838 : 0 : next_after_fail3033:;
32839 : : }
32840 : : }
32841 : : }
32842 : : }
32843 : : break;
32844 : 0 : case CFN_COPYSIGN:
32845 : 0 : if (gimple_call_num_args (_c2) == 2)
32846 : : {
32847 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
32848 : 0 : _q50 = do_valueize (valueize, _q50);
32849 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
32850 : 0 : _q51 = do_valueize (valueize, _q51);
32851 : 0 : {
32852 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51 };
32853 : 0 : {
32854 : 0 : tree op_type = TREE_TYPE (captures[2]);
32855 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_COPYSIGN), op_type)
32856 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32857 : 0 : && single_use (captures[2])
32858 : : )
32859 : : {
32860 : 0 : gimple_seq *lseq = seq;
32861 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3034;
32862 : 0 : {
32863 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32864 : 0 : {
32865 : 0 : tree _o1[4], _r1;
32866 : 0 : {
32867 : 0 : tree _o2[1], _r2;
32868 : 0 : _o2[0] = captures[0];
32869 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32870 : 0 : tem_op.resimplify (lseq, valueize);
32871 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32872 : 0 : if (!_r2) goto next_after_fail3034;
32873 : 0 : _o1[0] = _r2;
32874 : : }
32875 : 0 : _o1[1] = captures[3];
32876 : 0 : _o1[2] = captures[4];
32877 : 0 : {
32878 : 0 : tree _o2[1], _r2;
32879 : 0 : _o2[0] = captures[1];
32880 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32881 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32882 : : {
32883 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32884 : 0 : tem_op.resimplify (lseq, valueize);
32885 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32886 : 0 : if (!_r2) goto next_after_fail3034;
32887 : : }
32888 : : else
32889 : : _r2 = _o2[0];
32890 : 0 : _o1[3] = _r2;
32891 : : }
32892 : 0 : (*res_op).set_op (CFN_COND_COPYSIGN, TREE_TYPE (_o1[1]), 4);
32893 : 0 : (*res_op).ops[0] = _o1[0];
32894 : 0 : (*res_op).ops[1] = _o1[1];
32895 : 0 : (*res_op).ops[2] = _o1[2];
32896 : 0 : (*res_op).ops[3] = _o1[3];
32897 : 0 : (*res_op).resimplify (lseq, valueize);
32898 : : }
32899 : 0 : if (type != res_op->type
32900 : 0 : && !useless_type_conversion_p (type, res_op->type))
32901 : : {
32902 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3034;
32903 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32904 : 0 : res_op->resimplify (lseq, valueize);
32905 : : }
32906 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32907 : 0 : return true;
32908 : : }
32909 : 0 : next_after_fail3034:;
32910 : : }
32911 : : }
32912 : : }
32913 : : }
32914 : : break;
32915 : : default:;
32916 : : }
32917 : : }
32918 : : break;
32919 : : default:;
32920 : : }
32921 : : }
32922 : : break;
32923 : : }
32924 : 1110 : case PLUS_EXPR:
32925 : 1110 : {
32926 : 1110 : tree _q40 = gimple_assign_rhs1 (_a1);
32927 : 1110 : _q40 = do_valueize (valueize, _q40);
32928 : 1110 : tree _q41 = gimple_assign_rhs2 (_a1);
32929 : 1110 : _q41 = do_valueize (valueize, _q41);
32930 : 1110 : if (tree_swap_operands_p (_q40, _q41))
32931 : 18 : std::swap (_q40, _q41);
32932 : 1110 : {
32933 : 1110 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
32934 : 1110 : {
32935 : 1110 : tree op_type = TREE_TYPE (captures[2]);
32936 : 1110 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_ADD), op_type)
32937 : 169 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
32938 : 1279 : && single_use (captures[2])
32939 : : )
32940 : : {
32941 : 48 : gimple_seq *lseq = seq;
32942 : 48 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3035;
32943 : 48 : {
32944 : 48 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32945 : 48 : {
32946 : 48 : tree _o1[4], _r1;
32947 : 48 : {
32948 : 48 : tree _o2[1], _r2;
32949 : 48 : _o2[0] = captures[0];
32950 : 48 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
32951 : 48 : tem_op.resimplify (lseq, valueize);
32952 : 48 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32953 : 48 : if (!_r2) goto next_after_fail3035;
32954 : 12 : _o1[0] = _r2;
32955 : : }
32956 : 12 : _o1[1] = captures[3];
32957 : 12 : _o1[2] = captures[4];
32958 : 12 : {
32959 : 12 : tree _o2[1], _r2;
32960 : 12 : _o2[0] = captures[1];
32961 : 12 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
32962 : 12 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
32963 : : {
32964 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
32965 : 0 : tem_op.resimplify (lseq, valueize);
32966 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
32967 : 0 : if (!_r2) goto next_after_fail3035;
32968 : : }
32969 : : else
32970 : : _r2 = _o2[0];
32971 : 12 : _o1[3] = _r2;
32972 : : }
32973 : 12 : (*res_op).set_op (CFN_COND_ADD, TREE_TYPE (_o1[1]), 4);
32974 : 12 : (*res_op).ops[0] = _o1[0];
32975 : 12 : (*res_op).ops[1] = _o1[1];
32976 : 12 : (*res_op).ops[2] = _o1[2];
32977 : 12 : (*res_op).ops[3] = _o1[3];
32978 : 12 : (*res_op).resimplify (lseq, valueize);
32979 : : }
32980 : 12 : if (type != res_op->type
32981 : 12 : && !useless_type_conversion_p (type, res_op->type))
32982 : : {
32983 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3035;
32984 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
32985 : 0 : res_op->resimplify (lseq, valueize);
32986 : : }
32987 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
32988 : 12 : return true;
32989 : : }
32990 : 1098 : next_after_fail3035:;
32991 : : }
32992 : : }
32993 : : }
32994 : 1098 : break;
32995 : : }
32996 : 312 : case MINUS_EXPR:
32997 : 312 : {
32998 : 312 : tree _q40 = gimple_assign_rhs1 (_a1);
32999 : 312 : _q40 = do_valueize (valueize, _q40);
33000 : 312 : tree _q41 = gimple_assign_rhs2 (_a1);
33001 : 312 : _q41 = do_valueize (valueize, _q41);
33002 : 312 : {
33003 : 312 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33004 : 312 : {
33005 : 312 : tree op_type = TREE_TYPE (captures[2]);
33006 : 312 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SUB), op_type)
33007 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33008 : 312 : && single_use (captures[2])
33009 : : )
33010 : : {
33011 : 0 : gimple_seq *lseq = seq;
33012 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3036;
33013 : 0 : {
33014 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33015 : 0 : {
33016 : 0 : tree _o1[4], _r1;
33017 : 0 : {
33018 : 0 : tree _o2[1], _r2;
33019 : 0 : _o2[0] = captures[0];
33020 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33021 : 0 : tem_op.resimplify (lseq, valueize);
33022 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33023 : 0 : if (!_r2) goto next_after_fail3036;
33024 : 0 : _o1[0] = _r2;
33025 : : }
33026 : 0 : _o1[1] = captures[3];
33027 : 0 : _o1[2] = captures[4];
33028 : 0 : {
33029 : 0 : tree _o2[1], _r2;
33030 : 0 : _o2[0] = captures[1];
33031 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33032 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33033 : : {
33034 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33035 : 0 : tem_op.resimplify (lseq, valueize);
33036 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33037 : 0 : if (!_r2) goto next_after_fail3036;
33038 : : }
33039 : : else
33040 : : _r2 = _o2[0];
33041 : 0 : _o1[3] = _r2;
33042 : : }
33043 : 0 : (*res_op).set_op (CFN_COND_SUB, TREE_TYPE (_o1[1]), 4);
33044 : 0 : (*res_op).ops[0] = _o1[0];
33045 : 0 : (*res_op).ops[1] = _o1[1];
33046 : 0 : (*res_op).ops[2] = _o1[2];
33047 : 0 : (*res_op).ops[3] = _o1[3];
33048 : 0 : (*res_op).resimplify (lseq, valueize);
33049 : : }
33050 : 0 : if (type != res_op->type
33051 : 0 : && !useless_type_conversion_p (type, res_op->type))
33052 : : {
33053 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3036;
33054 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33055 : 0 : res_op->resimplify (lseq, valueize);
33056 : : }
33057 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33058 : 0 : return true;
33059 : : }
33060 : 312 : next_after_fail3036:;
33061 : : }
33062 : : }
33063 : : }
33064 : 312 : break;
33065 : : }
33066 : 299 : case MULT_EXPR:
33067 : 299 : {
33068 : 299 : tree _q40 = gimple_assign_rhs1 (_a1);
33069 : 299 : _q40 = do_valueize (valueize, _q40);
33070 : 299 : tree _q41 = gimple_assign_rhs2 (_a1);
33071 : 299 : _q41 = do_valueize (valueize, _q41);
33072 : 299 : if (tree_swap_operands_p (_q40, _q41))
33073 : 8 : std::swap (_q40, _q41);
33074 : 299 : {
33075 : 299 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33076 : 299 : {
33077 : 299 : tree op_type = TREE_TYPE (captures[2]);
33078 : 299 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MUL), op_type)
33079 : 6 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33080 : 305 : && single_use (captures[2])
33081 : : )
33082 : : {
33083 : 6 : gimple_seq *lseq = seq;
33084 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3037;
33085 : 6 : {
33086 : 6 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33087 : 6 : {
33088 : 6 : tree _o1[4], _r1;
33089 : 6 : {
33090 : 6 : tree _o2[1], _r2;
33091 : 6 : _o2[0] = captures[0];
33092 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33093 : 6 : tem_op.resimplify (lseq, valueize);
33094 : 6 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33095 : 6 : if (!_r2) goto next_after_fail3037;
33096 : 2 : _o1[0] = _r2;
33097 : : }
33098 : 2 : _o1[1] = captures[3];
33099 : 2 : _o1[2] = captures[4];
33100 : 2 : {
33101 : 2 : tree _o2[1], _r2;
33102 : 2 : _o2[0] = captures[1];
33103 : 2 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33104 : 2 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33105 : : {
33106 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33107 : 0 : tem_op.resimplify (lseq, valueize);
33108 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33109 : 0 : if (!_r2) goto next_after_fail3037;
33110 : : }
33111 : : else
33112 : : _r2 = _o2[0];
33113 : 2 : _o1[3] = _r2;
33114 : : }
33115 : 2 : (*res_op).set_op (CFN_COND_MUL, TREE_TYPE (_o1[1]), 4);
33116 : 2 : (*res_op).ops[0] = _o1[0];
33117 : 2 : (*res_op).ops[1] = _o1[1];
33118 : 2 : (*res_op).ops[2] = _o1[2];
33119 : 2 : (*res_op).ops[3] = _o1[3];
33120 : 2 : (*res_op).resimplify (lseq, valueize);
33121 : : }
33122 : 2 : if (type != res_op->type
33123 : 2 : && !useless_type_conversion_p (type, res_op->type))
33124 : : {
33125 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3037;
33126 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33127 : 0 : res_op->resimplify (lseq, valueize);
33128 : : }
33129 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33130 : 2 : return true;
33131 : : }
33132 : 297 : next_after_fail3037:;
33133 : : }
33134 : : }
33135 : : }
33136 : 297 : break;
33137 : : }
33138 : 0 : case TRUNC_DIV_EXPR:
33139 : 0 : {
33140 : 0 : tree _q40 = gimple_assign_rhs1 (_a1);
33141 : 0 : _q40 = do_valueize (valueize, _q40);
33142 : 0 : tree _q41 = gimple_assign_rhs2 (_a1);
33143 : 0 : _q41 = do_valueize (valueize, _q41);
33144 : 0 : {
33145 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33146 : 0 : {
33147 : 0 : tree op_type = TREE_TYPE (captures[2]);
33148 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_DIV), op_type)
33149 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33150 : 0 : && single_use (captures[2])
33151 : : )
33152 : : {
33153 : 0 : gimple_seq *lseq = seq;
33154 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3038;
33155 : 0 : {
33156 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33157 : 0 : {
33158 : 0 : tree _o1[4], _r1;
33159 : 0 : {
33160 : 0 : tree _o2[1], _r2;
33161 : 0 : _o2[0] = captures[0];
33162 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33163 : 0 : tem_op.resimplify (lseq, valueize);
33164 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33165 : 0 : if (!_r2) goto next_after_fail3038;
33166 : 0 : _o1[0] = _r2;
33167 : : }
33168 : 0 : _o1[1] = captures[3];
33169 : 0 : _o1[2] = captures[4];
33170 : 0 : {
33171 : 0 : tree _o2[1], _r2;
33172 : 0 : _o2[0] = captures[1];
33173 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33174 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33175 : : {
33176 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33177 : 0 : tem_op.resimplify (lseq, valueize);
33178 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33179 : 0 : if (!_r2) goto next_after_fail3038;
33180 : : }
33181 : : else
33182 : : _r2 = _o2[0];
33183 : 0 : _o1[3] = _r2;
33184 : : }
33185 : 0 : (*res_op).set_op (CFN_COND_DIV, TREE_TYPE (_o1[1]), 4);
33186 : 0 : (*res_op).ops[0] = _o1[0];
33187 : 0 : (*res_op).ops[1] = _o1[1];
33188 : 0 : (*res_op).ops[2] = _o1[2];
33189 : 0 : (*res_op).ops[3] = _o1[3];
33190 : 0 : (*res_op).resimplify (lseq, valueize);
33191 : : }
33192 : 0 : if (type != res_op->type
33193 : 0 : && !useless_type_conversion_p (type, res_op->type))
33194 : : {
33195 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3038;
33196 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33197 : 0 : res_op->resimplify (lseq, valueize);
33198 : : }
33199 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33200 : 0 : return true;
33201 : : }
33202 : 0 : next_after_fail3038:;
33203 : : }
33204 : : }
33205 : : }
33206 : 0 : break;
33207 : : }
33208 : 0 : case TRUNC_MOD_EXPR:
33209 : 0 : {
33210 : 0 : tree _q40 = gimple_assign_rhs1 (_a1);
33211 : 0 : _q40 = do_valueize (valueize, _q40);
33212 : 0 : tree _q41 = gimple_assign_rhs2 (_a1);
33213 : 0 : _q41 = do_valueize (valueize, _q41);
33214 : 0 : {
33215 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33216 : 0 : {
33217 : 0 : tree op_type = TREE_TYPE (captures[2]);
33218 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MOD), op_type)
33219 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33220 : 0 : && single_use (captures[2])
33221 : : )
33222 : : {
33223 : 0 : gimple_seq *lseq = seq;
33224 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3039;
33225 : 0 : {
33226 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33227 : 0 : {
33228 : 0 : tree _o1[4], _r1;
33229 : 0 : {
33230 : 0 : tree _o2[1], _r2;
33231 : 0 : _o2[0] = captures[0];
33232 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33233 : 0 : tem_op.resimplify (lseq, valueize);
33234 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33235 : 0 : if (!_r2) goto next_after_fail3039;
33236 : 0 : _o1[0] = _r2;
33237 : : }
33238 : 0 : _o1[1] = captures[3];
33239 : 0 : _o1[2] = captures[4];
33240 : 0 : {
33241 : 0 : tree _o2[1], _r2;
33242 : 0 : _o2[0] = captures[1];
33243 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33244 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33245 : : {
33246 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33247 : 0 : tem_op.resimplify (lseq, valueize);
33248 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33249 : 0 : if (!_r2) goto next_after_fail3039;
33250 : : }
33251 : : else
33252 : : _r2 = _o2[0];
33253 : 0 : _o1[3] = _r2;
33254 : : }
33255 : 0 : (*res_op).set_op (CFN_COND_MOD, TREE_TYPE (_o1[1]), 4);
33256 : 0 : (*res_op).ops[0] = _o1[0];
33257 : 0 : (*res_op).ops[1] = _o1[1];
33258 : 0 : (*res_op).ops[2] = _o1[2];
33259 : 0 : (*res_op).ops[3] = _o1[3];
33260 : 0 : (*res_op).resimplify (lseq, valueize);
33261 : : }
33262 : 0 : if (type != res_op->type
33263 : 0 : && !useless_type_conversion_p (type, res_op->type))
33264 : : {
33265 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3039;
33266 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33267 : 0 : res_op->resimplify (lseq, valueize);
33268 : : }
33269 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33270 : 0 : return true;
33271 : : }
33272 : 0 : next_after_fail3039:;
33273 : : }
33274 : : }
33275 : : }
33276 : 0 : break;
33277 : : }
33278 : 18 : case RDIV_EXPR:
33279 : 18 : {
33280 : 18 : tree _q40 = gimple_assign_rhs1 (_a1);
33281 : 18 : _q40 = do_valueize (valueize, _q40);
33282 : 18 : tree _q41 = gimple_assign_rhs2 (_a1);
33283 : 18 : _q41 = do_valueize (valueize, _q41);
33284 : 18 : {
33285 : 18 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33286 : 18 : {
33287 : 18 : tree op_type = TREE_TYPE (captures[2]);
33288 : 18 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_RDIV), op_type)
33289 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33290 : 18 : && single_use (captures[2])
33291 : : )
33292 : : {
33293 : 0 : gimple_seq *lseq = seq;
33294 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3040;
33295 : 0 : {
33296 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33297 : 0 : {
33298 : 0 : tree _o1[4], _r1;
33299 : 0 : {
33300 : 0 : tree _o2[1], _r2;
33301 : 0 : _o2[0] = captures[0];
33302 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33303 : 0 : tem_op.resimplify (lseq, valueize);
33304 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33305 : 0 : if (!_r2) goto next_after_fail3040;
33306 : 0 : _o1[0] = _r2;
33307 : : }
33308 : 0 : _o1[1] = captures[3];
33309 : 0 : _o1[2] = captures[4];
33310 : 0 : {
33311 : 0 : tree _o2[1], _r2;
33312 : 0 : _o2[0] = captures[1];
33313 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33314 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33315 : : {
33316 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33317 : 0 : tem_op.resimplify (lseq, valueize);
33318 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33319 : 0 : if (!_r2) goto next_after_fail3040;
33320 : : }
33321 : : else
33322 : : _r2 = _o2[0];
33323 : 0 : _o1[3] = _r2;
33324 : : }
33325 : 0 : (*res_op).set_op (CFN_COND_RDIV, TREE_TYPE (_o1[1]), 4);
33326 : 0 : (*res_op).ops[0] = _o1[0];
33327 : 0 : (*res_op).ops[1] = _o1[1];
33328 : 0 : (*res_op).ops[2] = _o1[2];
33329 : 0 : (*res_op).ops[3] = _o1[3];
33330 : 0 : (*res_op).resimplify (lseq, valueize);
33331 : : }
33332 : 0 : if (type != res_op->type
33333 : 0 : && !useless_type_conversion_p (type, res_op->type))
33334 : : {
33335 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3040;
33336 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33337 : 0 : res_op->resimplify (lseq, valueize);
33338 : : }
33339 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33340 : 0 : return true;
33341 : : }
33342 : 18 : next_after_fail3040:;
33343 : : }
33344 : : }
33345 : : }
33346 : 18 : break;
33347 : : }
33348 : 18 : case MIN_EXPR:
33349 : 18 : {
33350 : 18 : tree _q40 = gimple_assign_rhs1 (_a1);
33351 : 18 : _q40 = do_valueize (valueize, _q40);
33352 : 18 : tree _q41 = gimple_assign_rhs2 (_a1);
33353 : 18 : _q41 = do_valueize (valueize, _q41);
33354 : 18 : if (tree_swap_operands_p (_q40, _q41))
33355 : 0 : std::swap (_q40, _q41);
33356 : 18 : {
33357 : 18 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33358 : 18 : {
33359 : 18 : tree op_type = TREE_TYPE (captures[2]);
33360 : 18 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MIN), op_type)
33361 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33362 : 18 : && single_use (captures[2])
33363 : : )
33364 : : {
33365 : 0 : gimple_seq *lseq = seq;
33366 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3041;
33367 : 0 : {
33368 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33369 : 0 : {
33370 : 0 : tree _o1[4], _r1;
33371 : 0 : {
33372 : 0 : tree _o2[1], _r2;
33373 : 0 : _o2[0] = captures[0];
33374 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33375 : 0 : tem_op.resimplify (lseq, valueize);
33376 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33377 : 0 : if (!_r2) goto next_after_fail3041;
33378 : 0 : _o1[0] = _r2;
33379 : : }
33380 : 0 : _o1[1] = captures[3];
33381 : 0 : _o1[2] = captures[4];
33382 : 0 : {
33383 : 0 : tree _o2[1], _r2;
33384 : 0 : _o2[0] = captures[1];
33385 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33386 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33387 : : {
33388 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33389 : 0 : tem_op.resimplify (lseq, valueize);
33390 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33391 : 0 : if (!_r2) goto next_after_fail3041;
33392 : : }
33393 : : else
33394 : : _r2 = _o2[0];
33395 : 0 : _o1[3] = _r2;
33396 : : }
33397 : 0 : (*res_op).set_op (CFN_COND_MIN, TREE_TYPE (_o1[1]), 4);
33398 : 0 : (*res_op).ops[0] = _o1[0];
33399 : 0 : (*res_op).ops[1] = _o1[1];
33400 : 0 : (*res_op).ops[2] = _o1[2];
33401 : 0 : (*res_op).ops[3] = _o1[3];
33402 : 0 : (*res_op).resimplify (lseq, valueize);
33403 : : }
33404 : 0 : if (type != res_op->type
33405 : 0 : && !useless_type_conversion_p (type, res_op->type))
33406 : : {
33407 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3041;
33408 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33409 : 0 : res_op->resimplify (lseq, valueize);
33410 : : }
33411 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33412 : 0 : return true;
33413 : : }
33414 : 18 : next_after_fail3041:;
33415 : : }
33416 : : }
33417 : : }
33418 : 18 : break;
33419 : : }
33420 : 108 : case MAX_EXPR:
33421 : 108 : {
33422 : 108 : tree _q40 = gimple_assign_rhs1 (_a1);
33423 : 108 : _q40 = do_valueize (valueize, _q40);
33424 : 108 : tree _q41 = gimple_assign_rhs2 (_a1);
33425 : 108 : _q41 = do_valueize (valueize, _q41);
33426 : 108 : if (tree_swap_operands_p (_q40, _q41))
33427 : 44 : std::swap (_q40, _q41);
33428 : 108 : {
33429 : 108 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33430 : 108 : {
33431 : 108 : tree op_type = TREE_TYPE (captures[2]);
33432 : 108 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_MAX), op_type)
33433 : 90 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33434 : 198 : && single_use (captures[2])
33435 : : )
33436 : : {
33437 : 90 : gimple_seq *lseq = seq;
33438 : 90 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3042;
33439 : 90 : {
33440 : 90 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33441 : 90 : {
33442 : 90 : tree _o1[4], _r1;
33443 : 90 : {
33444 : 90 : tree _o2[1], _r2;
33445 : 90 : _o2[0] = captures[0];
33446 : 90 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33447 : 90 : tem_op.resimplify (lseq, valueize);
33448 : 90 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33449 : 90 : if (!_r2) goto next_after_fail3042;
33450 : 12 : _o1[0] = _r2;
33451 : : }
33452 : 12 : _o1[1] = captures[3];
33453 : 12 : _o1[2] = captures[4];
33454 : 12 : {
33455 : 12 : tree _o2[1], _r2;
33456 : 12 : _o2[0] = captures[1];
33457 : 12 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33458 : 12 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33459 : : {
33460 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33461 : 0 : tem_op.resimplify (lseq, valueize);
33462 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33463 : 0 : if (!_r2) goto next_after_fail3042;
33464 : : }
33465 : : else
33466 : : _r2 = _o2[0];
33467 : 12 : _o1[3] = _r2;
33468 : : }
33469 : 12 : (*res_op).set_op (CFN_COND_MAX, TREE_TYPE (_o1[1]), 4);
33470 : 12 : (*res_op).ops[0] = _o1[0];
33471 : 12 : (*res_op).ops[1] = _o1[1];
33472 : 12 : (*res_op).ops[2] = _o1[2];
33473 : 12 : (*res_op).ops[3] = _o1[3];
33474 : 12 : (*res_op).resimplify (lseq, valueize);
33475 : : }
33476 : 12 : if (type != res_op->type
33477 : 12 : && !useless_type_conversion_p (type, res_op->type))
33478 : : {
33479 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3042;
33480 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33481 : 0 : res_op->resimplify (lseq, valueize);
33482 : : }
33483 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33484 : 12 : return true;
33485 : : }
33486 : 96 : next_after_fail3042:;
33487 : : }
33488 : : }
33489 : : }
33490 : 96 : break;
33491 : : }
33492 : 0 : case BIT_AND_EXPR:
33493 : 0 : {
33494 : 0 : tree _q40 = gimple_assign_rhs1 (_a1);
33495 : 0 : _q40 = do_valueize (valueize, _q40);
33496 : 0 : tree _q41 = gimple_assign_rhs2 (_a1);
33497 : 0 : _q41 = do_valueize (valueize, _q41);
33498 : 0 : if (tree_swap_operands_p (_q40, _q41))
33499 : 0 : std::swap (_q40, _q41);
33500 : 0 : {
33501 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33502 : 0 : {
33503 : 0 : tree op_type = TREE_TYPE (captures[2]);
33504 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_AND), op_type)
33505 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33506 : 0 : && single_use (captures[2])
33507 : : )
33508 : : {
33509 : 0 : gimple_seq *lseq = seq;
33510 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3043;
33511 : 0 : {
33512 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33513 : 0 : {
33514 : 0 : tree _o1[4], _r1;
33515 : 0 : {
33516 : 0 : tree _o2[1], _r2;
33517 : 0 : _o2[0] = captures[0];
33518 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33519 : 0 : tem_op.resimplify (lseq, valueize);
33520 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33521 : 0 : if (!_r2) goto next_after_fail3043;
33522 : 0 : _o1[0] = _r2;
33523 : : }
33524 : 0 : _o1[1] = captures[3];
33525 : 0 : _o1[2] = captures[4];
33526 : 0 : {
33527 : 0 : tree _o2[1], _r2;
33528 : 0 : _o2[0] = captures[1];
33529 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33530 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33531 : : {
33532 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33533 : 0 : tem_op.resimplify (lseq, valueize);
33534 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33535 : 0 : if (!_r2) goto next_after_fail3043;
33536 : : }
33537 : : else
33538 : : _r2 = _o2[0];
33539 : 0 : _o1[3] = _r2;
33540 : : }
33541 : 0 : (*res_op).set_op (CFN_COND_AND, TREE_TYPE (_o1[1]), 4);
33542 : 0 : (*res_op).ops[0] = _o1[0];
33543 : 0 : (*res_op).ops[1] = _o1[1];
33544 : 0 : (*res_op).ops[2] = _o1[2];
33545 : 0 : (*res_op).ops[3] = _o1[3];
33546 : 0 : (*res_op).resimplify (lseq, valueize);
33547 : : }
33548 : 0 : if (type != res_op->type
33549 : 0 : && !useless_type_conversion_p (type, res_op->type))
33550 : : {
33551 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3043;
33552 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33553 : 0 : res_op->resimplify (lseq, valueize);
33554 : : }
33555 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33556 : 0 : return true;
33557 : : }
33558 : 0 : next_after_fail3043:;
33559 : : }
33560 : : }
33561 : : }
33562 : 0 : break;
33563 : : }
33564 : 44 : case BIT_IOR_EXPR:
33565 : 44 : {
33566 : 44 : tree _q40 = gimple_assign_rhs1 (_a1);
33567 : 44 : _q40 = do_valueize (valueize, _q40);
33568 : 44 : tree _q41 = gimple_assign_rhs2 (_a1);
33569 : 44 : _q41 = do_valueize (valueize, _q41);
33570 : 44 : if (tree_swap_operands_p (_q40, _q41))
33571 : 0 : std::swap (_q40, _q41);
33572 : 44 : {
33573 : 44 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33574 : 44 : {
33575 : 44 : tree op_type = TREE_TYPE (captures[2]);
33576 : 44 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_IOR), op_type)
33577 : 8 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33578 : 52 : && single_use (captures[2])
33579 : : )
33580 : : {
33581 : 8 : gimple_seq *lseq = seq;
33582 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3044;
33583 : 8 : {
33584 : 8 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33585 : 8 : {
33586 : 8 : tree _o1[4], _r1;
33587 : 8 : {
33588 : 8 : tree _o2[1], _r2;
33589 : 8 : _o2[0] = captures[0];
33590 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33591 : 8 : tem_op.resimplify (lseq, valueize);
33592 : 8 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33593 : 8 : if (!_r2) goto next_after_fail3044;
33594 : 2 : _o1[0] = _r2;
33595 : : }
33596 : 2 : _o1[1] = captures[3];
33597 : 2 : _o1[2] = captures[4];
33598 : 2 : {
33599 : 2 : tree _o2[1], _r2;
33600 : 2 : _o2[0] = captures[1];
33601 : 2 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33602 : 2 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33603 : : {
33604 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33605 : 0 : tem_op.resimplify (lseq, valueize);
33606 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33607 : 0 : if (!_r2) goto next_after_fail3044;
33608 : : }
33609 : : else
33610 : : _r2 = _o2[0];
33611 : 2 : _o1[3] = _r2;
33612 : : }
33613 : 2 : (*res_op).set_op (CFN_COND_IOR, TREE_TYPE (_o1[1]), 4);
33614 : 2 : (*res_op).ops[0] = _o1[0];
33615 : 2 : (*res_op).ops[1] = _o1[1];
33616 : 2 : (*res_op).ops[2] = _o1[2];
33617 : 2 : (*res_op).ops[3] = _o1[3];
33618 : 2 : (*res_op).resimplify (lseq, valueize);
33619 : : }
33620 : 2 : if (type != res_op->type
33621 : 2 : && !useless_type_conversion_p (type, res_op->type))
33622 : : {
33623 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3044;
33624 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33625 : 0 : res_op->resimplify (lseq, valueize);
33626 : : }
33627 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33628 : 2 : return true;
33629 : : }
33630 : 42 : next_after_fail3044:;
33631 : : }
33632 : : }
33633 : : }
33634 : 42 : break;
33635 : : }
33636 : 108 : case BIT_XOR_EXPR:
33637 : 108 : {
33638 : 108 : tree _q40 = gimple_assign_rhs1 (_a1);
33639 : 108 : _q40 = do_valueize (valueize, _q40);
33640 : 108 : tree _q41 = gimple_assign_rhs2 (_a1);
33641 : 108 : _q41 = do_valueize (valueize, _q41);
33642 : 108 : if (tree_swap_operands_p (_q40, _q41))
33643 : 12 : std::swap (_q40, _q41);
33644 : 108 : {
33645 : 108 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33646 : 108 : {
33647 : 108 : tree op_type = TREE_TYPE (captures[2]);
33648 : 108 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_XOR), op_type)
33649 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33650 : 108 : && single_use (captures[2])
33651 : : )
33652 : : {
33653 : 0 : gimple_seq *lseq = seq;
33654 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3045;
33655 : 0 : {
33656 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33657 : 0 : {
33658 : 0 : tree _o1[4], _r1;
33659 : 0 : {
33660 : 0 : tree _o2[1], _r2;
33661 : 0 : _o2[0] = captures[0];
33662 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33663 : 0 : tem_op.resimplify (lseq, valueize);
33664 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33665 : 0 : if (!_r2) goto next_after_fail3045;
33666 : 0 : _o1[0] = _r2;
33667 : : }
33668 : 0 : _o1[1] = captures[3];
33669 : 0 : _o1[2] = captures[4];
33670 : 0 : {
33671 : 0 : tree _o2[1], _r2;
33672 : 0 : _o2[0] = captures[1];
33673 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33674 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33675 : : {
33676 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33677 : 0 : tem_op.resimplify (lseq, valueize);
33678 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33679 : 0 : if (!_r2) goto next_after_fail3045;
33680 : : }
33681 : : else
33682 : : _r2 = _o2[0];
33683 : 0 : _o1[3] = _r2;
33684 : : }
33685 : 0 : (*res_op).set_op (CFN_COND_XOR, TREE_TYPE (_o1[1]), 4);
33686 : 0 : (*res_op).ops[0] = _o1[0];
33687 : 0 : (*res_op).ops[1] = _o1[1];
33688 : 0 : (*res_op).ops[2] = _o1[2];
33689 : 0 : (*res_op).ops[3] = _o1[3];
33690 : 0 : (*res_op).resimplify (lseq, valueize);
33691 : : }
33692 : 0 : if (type != res_op->type
33693 : 0 : && !useless_type_conversion_p (type, res_op->type))
33694 : : {
33695 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3045;
33696 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33697 : 0 : res_op->resimplify (lseq, valueize);
33698 : : }
33699 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33700 : 0 : return true;
33701 : : }
33702 : 108 : next_after_fail3045:;
33703 : : }
33704 : : }
33705 : : }
33706 : 108 : break;
33707 : : }
33708 : 219 : case LSHIFT_EXPR:
33709 : 219 : {
33710 : 219 : tree _q40 = gimple_assign_rhs1 (_a1);
33711 : 219 : _q40 = do_valueize (valueize, _q40);
33712 : 219 : tree _q41 = gimple_assign_rhs2 (_a1);
33713 : 219 : _q41 = do_valueize (valueize, _q41);
33714 : 219 : {
33715 : 219 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33716 : 219 : {
33717 : 219 : tree op_type = TREE_TYPE (captures[2]);
33718 : 219 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHL), op_type)
33719 : 34 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33720 : 253 : && single_use (captures[2])
33721 : : )
33722 : : {
33723 : 6 : gimple_seq *lseq = seq;
33724 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3046;
33725 : 6 : {
33726 : 6 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33727 : 6 : {
33728 : 6 : tree _o1[4], _r1;
33729 : 6 : {
33730 : 6 : tree _o2[1], _r2;
33731 : 6 : _o2[0] = captures[0];
33732 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33733 : 6 : tem_op.resimplify (lseq, valueize);
33734 : 6 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33735 : 6 : if (!_r2) goto next_after_fail3046;
33736 : 2 : _o1[0] = _r2;
33737 : : }
33738 : 2 : _o1[1] = captures[3];
33739 : 2 : _o1[2] = captures[4];
33740 : 2 : {
33741 : 2 : tree _o2[1], _r2;
33742 : 2 : _o2[0] = captures[1];
33743 : 2 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33744 : 2 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33745 : : {
33746 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33747 : 0 : tem_op.resimplify (lseq, valueize);
33748 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33749 : 0 : if (!_r2) goto next_after_fail3046;
33750 : : }
33751 : : else
33752 : : _r2 = _o2[0];
33753 : 2 : _o1[3] = _r2;
33754 : : }
33755 : 2 : (*res_op).set_op (CFN_COND_SHL, TREE_TYPE (_o1[1]), 4);
33756 : 2 : (*res_op).ops[0] = _o1[0];
33757 : 2 : (*res_op).ops[1] = _o1[1];
33758 : 2 : (*res_op).ops[2] = _o1[2];
33759 : 2 : (*res_op).ops[3] = _o1[3];
33760 : 2 : (*res_op).resimplify (lseq, valueize);
33761 : : }
33762 : 2 : if (type != res_op->type
33763 : 2 : && !useless_type_conversion_p (type, res_op->type))
33764 : : {
33765 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3046;
33766 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33767 : 0 : res_op->resimplify (lseq, valueize);
33768 : : }
33769 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33770 : 2 : return true;
33771 : : }
33772 : 217 : next_after_fail3046:;
33773 : : }
33774 : : }
33775 : : }
33776 : 217 : break;
33777 : : }
33778 : 297 : case RSHIFT_EXPR:
33779 : 297 : {
33780 : 297 : tree _q40 = gimple_assign_rhs1 (_a1);
33781 : 297 : _q40 = do_valueize (valueize, _q40);
33782 : 297 : tree _q41 = gimple_assign_rhs2 (_a1);
33783 : 297 : _q41 = do_valueize (valueize, _q41);
33784 : 297 : {
33785 : 297 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33786 : 297 : {
33787 : 297 : tree op_type = TREE_TYPE (captures[2]);
33788 : 297 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_SHR), op_type)
33789 : 10 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33790 : 307 : && single_use (captures[2])
33791 : : )
33792 : : {
33793 : 0 : gimple_seq *lseq = seq;
33794 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3047;
33795 : 0 : {
33796 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33797 : 0 : {
33798 : 0 : tree _o1[4], _r1;
33799 : 0 : {
33800 : 0 : tree _o2[1], _r2;
33801 : 0 : _o2[0] = captures[0];
33802 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33803 : 0 : tem_op.resimplify (lseq, valueize);
33804 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33805 : 0 : if (!_r2) goto next_after_fail3047;
33806 : 0 : _o1[0] = _r2;
33807 : : }
33808 : 0 : _o1[1] = captures[3];
33809 : 0 : _o1[2] = captures[4];
33810 : 0 : {
33811 : 0 : tree _o2[1], _r2;
33812 : 0 : _o2[0] = captures[1];
33813 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33814 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33815 : : {
33816 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33817 : 0 : tem_op.resimplify (lseq, valueize);
33818 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33819 : 0 : if (!_r2) goto next_after_fail3047;
33820 : : }
33821 : : else
33822 : : _r2 = _o2[0];
33823 : 0 : _o1[3] = _r2;
33824 : : }
33825 : 0 : (*res_op).set_op (CFN_COND_SHR, TREE_TYPE (_o1[1]), 4);
33826 : 0 : (*res_op).ops[0] = _o1[0];
33827 : 0 : (*res_op).ops[1] = _o1[1];
33828 : 0 : (*res_op).ops[2] = _o1[2];
33829 : 0 : (*res_op).ops[3] = _o1[3];
33830 : 0 : (*res_op).resimplify (lseq, valueize);
33831 : : }
33832 : 0 : if (type != res_op->type
33833 : 0 : && !useless_type_conversion_p (type, res_op->type))
33834 : : {
33835 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3047;
33836 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33837 : 0 : res_op->resimplify (lseq, valueize);
33838 : : }
33839 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33840 : 0 : return true;
33841 : : }
33842 : 297 : next_after_fail3047:;
33843 : : }
33844 : : }
33845 : : }
33846 : 297 : break;
33847 : : }
33848 : : default:;
33849 : : }
33850 : 12360 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
33851 : 2112 : switch (gimple_call_combined_fn (_c1))
33852 : : {
33853 : 0 : case CFN_FMAX:
33854 : 0 : if (gimple_call_num_args (_c1) == 2)
33855 : : {
33856 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
33857 : 0 : _q40 = do_valueize (valueize, _q40);
33858 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
33859 : 0 : _q41 = do_valueize (valueize, _q41);
33860 : 0 : {
33861 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33862 : 0 : {
33863 : 0 : tree op_type = TREE_TYPE (captures[2]);
33864 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMAX), op_type)
33865 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33866 : 0 : && single_use (captures[2])
33867 : : )
33868 : : {
33869 : 0 : gimple_seq *lseq = seq;
33870 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3048;
33871 : 0 : {
33872 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33873 : 0 : {
33874 : 0 : tree _o1[4], _r1;
33875 : 0 : {
33876 : 0 : tree _o2[1], _r2;
33877 : 0 : _o2[0] = captures[0];
33878 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33879 : 0 : tem_op.resimplify (lseq, valueize);
33880 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33881 : 0 : if (!_r2) goto next_after_fail3048;
33882 : 0 : _o1[0] = _r2;
33883 : : }
33884 : 0 : _o1[1] = captures[3];
33885 : 0 : _o1[2] = captures[4];
33886 : 0 : {
33887 : 0 : tree _o2[1], _r2;
33888 : 0 : _o2[0] = captures[1];
33889 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33890 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33891 : : {
33892 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33893 : 0 : tem_op.resimplify (lseq, valueize);
33894 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33895 : 0 : if (!_r2) goto next_after_fail3048;
33896 : : }
33897 : : else
33898 : : _r2 = _o2[0];
33899 : 0 : _o1[3] = _r2;
33900 : : }
33901 : 0 : (*res_op).set_op (CFN_COND_FMAX, TREE_TYPE (_o1[1]), 4);
33902 : 0 : (*res_op).ops[0] = _o1[0];
33903 : 0 : (*res_op).ops[1] = _o1[1];
33904 : 0 : (*res_op).ops[2] = _o1[2];
33905 : 0 : (*res_op).ops[3] = _o1[3];
33906 : 0 : (*res_op).resimplify (lseq, valueize);
33907 : : }
33908 : 0 : if (type != res_op->type
33909 : 0 : && !useless_type_conversion_p (type, res_op->type))
33910 : : {
33911 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3048;
33912 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33913 : 0 : res_op->resimplify (lseq, valueize);
33914 : : }
33915 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33916 : 0 : return true;
33917 : : }
33918 : 0 : next_after_fail3048:;
33919 : : }
33920 : : }
33921 : : }
33922 : : }
33923 : : break;
33924 : 0 : case CFN_FMIN:
33925 : 0 : if (gimple_call_num_args (_c1) == 2)
33926 : : {
33927 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
33928 : 0 : _q40 = do_valueize (valueize, _q40);
33929 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
33930 : 0 : _q41 = do_valueize (valueize, _q41);
33931 : 0 : {
33932 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
33933 : 0 : {
33934 : 0 : tree op_type = TREE_TYPE (captures[2]);
33935 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_FMIN), op_type)
33936 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
33937 : 0 : && single_use (captures[2])
33938 : : )
33939 : : {
33940 : 0 : gimple_seq *lseq = seq;
33941 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3049;
33942 : 0 : {
33943 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33944 : 0 : {
33945 : 0 : tree _o1[4], _r1;
33946 : 0 : {
33947 : 0 : tree _o2[1], _r2;
33948 : 0 : _o2[0] = captures[0];
33949 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
33950 : 0 : tem_op.resimplify (lseq, valueize);
33951 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33952 : 0 : if (!_r2) goto next_after_fail3049;
33953 : 0 : _o1[0] = _r2;
33954 : : }
33955 : 0 : _o1[1] = captures[3];
33956 : 0 : _o1[2] = captures[4];
33957 : 0 : {
33958 : 0 : tree _o2[1], _r2;
33959 : 0 : _o2[0] = captures[1];
33960 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
33961 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
33962 : : {
33963 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
33964 : 0 : tem_op.resimplify (lseq, valueize);
33965 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
33966 : 0 : if (!_r2) goto next_after_fail3049;
33967 : : }
33968 : : else
33969 : : _r2 = _o2[0];
33970 : 0 : _o1[3] = _r2;
33971 : : }
33972 : 0 : (*res_op).set_op (CFN_COND_FMIN, TREE_TYPE (_o1[1]), 4);
33973 : 0 : (*res_op).ops[0] = _o1[0];
33974 : 0 : (*res_op).ops[1] = _o1[1];
33975 : 0 : (*res_op).ops[2] = _o1[2];
33976 : 0 : (*res_op).ops[3] = _o1[3];
33977 : 0 : (*res_op).resimplify (lseq, valueize);
33978 : : }
33979 : 0 : if (type != res_op->type
33980 : 0 : && !useless_type_conversion_p (type, res_op->type))
33981 : : {
33982 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3049;
33983 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
33984 : 0 : res_op->resimplify (lseq, valueize);
33985 : : }
33986 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
33987 : 0 : return true;
33988 : : }
33989 : 0 : next_after_fail3049:;
33990 : : }
33991 : : }
33992 : : }
33993 : : }
33994 : : break;
33995 : 0 : case CFN_COPYSIGN:
33996 : 0 : if (gimple_call_num_args (_c1) == 2)
33997 : : {
33998 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
33999 : 0 : _q40 = do_valueize (valueize, _q40);
34000 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
34001 : 0 : _q41 = do_valueize (valueize, _q41);
34002 : 0 : {
34003 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41 };
34004 : 0 : {
34005 : 0 : tree op_type = TREE_TYPE (captures[2]);
34006 : 0 : if (vectorized_internal_fn_supported_p (as_internal_fn (CFN_COND_COPYSIGN), op_type)
34007 : 0 : && is_truth_type_for (op_type, TREE_TYPE (captures[0]))
34008 : 0 : && single_use (captures[2])
34009 : : )
34010 : : {
34011 : 0 : gimple_seq *lseq = seq;
34012 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail3050;
34013 : 0 : {
34014 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
34015 : 0 : {
34016 : 0 : tree _o1[4], _r1;
34017 : 0 : {
34018 : 0 : tree _o2[1], _r2;
34019 : 0 : _o2[0] = captures[0];
34020 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
34021 : 0 : tem_op.resimplify (lseq, valueize);
34022 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
34023 : 0 : if (!_r2) goto next_after_fail3050;
34024 : 0 : _o1[0] = _r2;
34025 : : }
34026 : 0 : _o1[1] = captures[3];
34027 : 0 : _o1[2] = captures[4];
34028 : 0 : {
34029 : 0 : tree _o2[1], _r2;
34030 : 0 : _o2[0] = captures[1];
34031 : 0 : if (op_type != TREE_TYPE (_o2[0]) /* XXX */
34032 : 0 : && !useless_type_conversion_p (op_type, TREE_TYPE (_o2[0])))
34033 : : {
34034 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
34035 : 0 : tem_op.resimplify (lseq, valueize);
34036 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
34037 : 0 : if (!_r2) goto next_after_fail3050;
34038 : : }
34039 : : else
34040 : : _r2 = _o2[0];
34041 : 0 : _o1[3] = _r2;
34042 : : }
34043 : 0 : (*res_op).set_op (CFN_COND_COPYSIGN, TREE_TYPE (_o1[1]), 4);
34044 : 0 : (*res_op).ops[0] = _o1[0];
34045 : 0 : (*res_op).ops[1] = _o1[1];
34046 : 0 : (*res_op).ops[2] = _o1[2];
34047 : 0 : (*res_op).ops[3] = _o1[3];
34048 : 0 : (*res_op).resimplify (lseq, valueize);
34049 : : }
34050 : 0 : if (type != res_op->type
34051 : 0 : && !useless_type_conversion_p (type, res_op->type))
34052 : : {
34053 : 0 : if (!(res_op->ops[0] = maybe_push_res_to_seq (res_op, lseq))) goto next_after_fail3050;
34054 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
34055 : 0 : res_op->resimplify (lseq, valueize);
34056 : : }
34057 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1274, __FILE__, __LINE__, true);
34058 : 0 : return true;
34059 : : }
34060 : 0 : next_after_fail3050:;
34061 : : }
34062 : : }
34063 : : }
34064 : : }
34065 : : break;
34066 : : default:;
34067 : : }
34068 : : }
34069 : : break;
34070 : 193868 : default:;
34071 : : }
34072 : 193868 : switch (TREE_CODE (_p1))
34073 : : {
34074 : 51078 : case SSA_NAME:
34075 : 51078 : if (gimple *_d1 = get_def (valueize, _p1))
34076 : : {
34077 : 44963 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
34078 : 54957 : switch (gimple_assign_rhs_code (_a1))
34079 : : {
34080 : 3534 : case VIEW_CONVERT_EXPR:
34081 : 3534 : {
34082 : 3534 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
34083 : 3534 : if ((TREE_CODE (_q30) == SSA_NAME
34084 : 3534 : || is_gimple_min_invariant (_q30)))
34085 : : {
34086 : 3534 : _q30 = do_valueize (valueize, _q30);
34087 : 3534 : switch (TREE_CODE (_q30))
34088 : : {
34089 : 3534 : case SSA_NAME:
34090 : 3534 : if (gimple *_d2 = get_def (valueize, _q30))
34091 : : {
34092 : 3433 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
34093 : 998 : switch (gimple_call_combined_fn (_c2))
34094 : : {
34095 : 0 : case CFN_FMA:
34096 : 0 : if (gimple_call_num_args (_c2) == 3)
34097 : : {
34098 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34099 : 0 : _q40 = do_valueize (valueize, _q40);
34100 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34101 : 0 : _q41 = do_valueize (valueize, _q41);
34102 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34103 : 0 : _q42 = do_valueize (valueize, _q42);
34104 : 0 : if (tree_swap_operands_p (_q40, _q41))
34105 : 0 : std::swap (_q40, _q41);
34106 : 0 : {
34107 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42, _p2 };
34108 : 0 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FMA, CFN_COND_FMA))
34109 : 0 : return true;
34110 : : }
34111 : : }
34112 : : break;
34113 : 0 : case CFN_FMS:
34114 : 0 : if (gimple_call_num_args (_c2) == 3)
34115 : : {
34116 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34117 : 0 : _q40 = do_valueize (valueize, _q40);
34118 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34119 : 0 : _q41 = do_valueize (valueize, _q41);
34120 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34121 : 0 : _q42 = do_valueize (valueize, _q42);
34122 : 0 : if (tree_swap_operands_p (_q40, _q41))
34123 : 0 : std::swap (_q40, _q41);
34124 : 0 : {
34125 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42, _p2 };
34126 : 0 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FMS, CFN_COND_FMS))
34127 : 0 : return true;
34128 : : }
34129 : : }
34130 : : break;
34131 : 0 : case CFN_FNMA:
34132 : 0 : if (gimple_call_num_args (_c2) == 3)
34133 : : {
34134 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34135 : 0 : _q40 = do_valueize (valueize, _q40);
34136 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34137 : 0 : _q41 = do_valueize (valueize, _q41);
34138 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34139 : 0 : _q42 = do_valueize (valueize, _q42);
34140 : 0 : if (tree_swap_operands_p (_q40, _q41))
34141 : 0 : std::swap (_q40, _q41);
34142 : 0 : {
34143 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42, _p2 };
34144 : 0 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FNMA, CFN_COND_FNMA))
34145 : 0 : return true;
34146 : : }
34147 : : }
34148 : : break;
34149 : 0 : case CFN_FNMS:
34150 : 0 : if (gimple_call_num_args (_c2) == 3)
34151 : : {
34152 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34153 : 0 : _q40 = do_valueize (valueize, _q40);
34154 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34155 : 0 : _q41 = do_valueize (valueize, _q41);
34156 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34157 : 0 : _q42 = do_valueize (valueize, _q42);
34158 : 0 : if (tree_swap_operands_p (_q40, _q41))
34159 : 0 : std::swap (_q40, _q41);
34160 : 0 : {
34161 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q30, _q40, _q41, _q42, _p2 };
34162 : 0 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FNMS, CFN_COND_FNMS))
34163 : 0 : return true;
34164 : : }
34165 : : }
34166 : : break;
34167 : : default:;
34168 : : }
34169 : : }
34170 : : break;
34171 : : default:;
34172 : : }
34173 : : }
34174 : : break;
34175 : : }
34176 : : default:;
34177 : : }
34178 : 14265 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
34179 : 3648 : switch (gimple_call_combined_fn (_c1))
34180 : : {
34181 : 390 : case CFN_FMA:
34182 : 390 : if (gimple_call_num_args (_c1) == 3)
34183 : : {
34184 : 390 : tree _q30 = gimple_call_arg (_c1, 0);
34185 : 390 : _q30 = do_valueize (valueize, _q30);
34186 : 390 : tree _q31 = gimple_call_arg (_c1, 1);
34187 : 390 : _q31 = do_valueize (valueize, _q31);
34188 : 390 : tree _q32 = gimple_call_arg (_c1, 2);
34189 : 390 : _q32 = do_valueize (valueize, _q32);
34190 : 390 : if (tree_swap_operands_p (_q30, _q31))
34191 : 60 : std::swap (_q30, _q31);
34192 : 390 : {
34193 : 390 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
34194 : 390 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FMA, CFN_COND_FMA))
34195 : 390 : return true;
34196 : : }
34197 : : }
34198 : : break;
34199 : 42 : case CFN_FMS:
34200 : 42 : if (gimple_call_num_args (_c1) == 3)
34201 : : {
34202 : 42 : tree _q30 = gimple_call_arg (_c1, 0);
34203 : 42 : _q30 = do_valueize (valueize, _q30);
34204 : 42 : tree _q31 = gimple_call_arg (_c1, 1);
34205 : 42 : _q31 = do_valueize (valueize, _q31);
34206 : 42 : tree _q32 = gimple_call_arg (_c1, 2);
34207 : 42 : _q32 = do_valueize (valueize, _q32);
34208 : 42 : if (tree_swap_operands_p (_q30, _q31))
34209 : 0 : std::swap (_q30, _q31);
34210 : 42 : {
34211 : 42 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
34212 : 42 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FMS, CFN_COND_FMS))
34213 : 42 : return true;
34214 : : }
34215 : : }
34216 : : break;
34217 : 42 : case CFN_FNMA:
34218 : 42 : if (gimple_call_num_args (_c1) == 3)
34219 : : {
34220 : 42 : tree _q30 = gimple_call_arg (_c1, 0);
34221 : 42 : _q30 = do_valueize (valueize, _q30);
34222 : 42 : tree _q31 = gimple_call_arg (_c1, 1);
34223 : 42 : _q31 = do_valueize (valueize, _q31);
34224 : 42 : tree _q32 = gimple_call_arg (_c1, 2);
34225 : 42 : _q32 = do_valueize (valueize, _q32);
34226 : 42 : if (tree_swap_operands_p (_q30, _q31))
34227 : 0 : std::swap (_q30, _q31);
34228 : 42 : {
34229 : 42 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
34230 : 42 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FNMA, CFN_COND_FNMA))
34231 : 42 : return true;
34232 : : }
34233 : : }
34234 : : break;
34235 : 42 : case CFN_FNMS:
34236 : 42 : if (gimple_call_num_args (_c1) == 3)
34237 : : {
34238 : 42 : tree _q30 = gimple_call_arg (_c1, 0);
34239 : 42 : _q30 = do_valueize (valueize, _q30);
34240 : 42 : tree _q31 = gimple_call_arg (_c1, 1);
34241 : 42 : _q31 = do_valueize (valueize, _q31);
34242 : 42 : tree _q32 = gimple_call_arg (_c1, 2);
34243 : 42 : _q32 = do_valueize (valueize, _q32);
34244 : 42 : if (tree_swap_operands_p (_q30, _q31))
34245 : 0 : std::swap (_q30, _q31);
34246 : 42 : {
34247 : 42 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _p2 };
34248 : 42 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_FNMS, CFN_COND_FNMS))
34249 : 42 : return true;
34250 : : }
34251 : : }
34252 : : break;
34253 : : default:;
34254 : : }
34255 : : }
34256 : : break;
34257 : 193352 : default:;
34258 : : }
34259 : 193352 : switch (TREE_CODE (_p2))
34260 : : {
34261 : 43322 : case SSA_NAME:
34262 : 43322 : if (gimple *_d1 = get_def (valueize, _p2))
34263 : : {
34264 : 37651 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
34265 : 39079 : switch (gimple_assign_rhs_code (_a1))
34266 : : {
34267 : 5032 : case VIEW_CONVERT_EXPR:
34268 : 5032 : {
34269 : 5032 : tree _q40 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
34270 : 5032 : if ((TREE_CODE (_q40) == SSA_NAME
34271 : 5032 : || is_gimple_min_invariant (_q40)))
34272 : : {
34273 : 5032 : _q40 = do_valueize (valueize, _q40);
34274 : 5032 : switch (TREE_CODE (_q40))
34275 : : {
34276 : 5032 : case SSA_NAME:
34277 : 5032 : if (gimple *_d2 = get_def (valueize, _q40))
34278 : : {
34279 : 4976 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
34280 : 1217 : switch (gimple_call_combined_fn (_c2))
34281 : : {
34282 : 0 : case CFN_FMA:
34283 : 0 : if (gimple_call_num_args (_c2) == 3)
34284 : : {
34285 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
34286 : 0 : _q50 = do_valueize (valueize, _q50);
34287 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
34288 : 0 : _q51 = do_valueize (valueize, _q51);
34289 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
34290 : 0 : _q52 = do_valueize (valueize, _q52);
34291 : 0 : if (tree_swap_operands_p (_q50, _q51))
34292 : 0 : std::swap (_q50, _q51);
34293 : 0 : {
34294 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51, _q52 };
34295 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FMA, CFN_COND_FMA))
34296 : 0 : return true;
34297 : : }
34298 : : }
34299 : : break;
34300 : 0 : case CFN_FMS:
34301 : 0 : if (gimple_call_num_args (_c2) == 3)
34302 : : {
34303 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
34304 : 0 : _q50 = do_valueize (valueize, _q50);
34305 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
34306 : 0 : _q51 = do_valueize (valueize, _q51);
34307 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
34308 : 0 : _q52 = do_valueize (valueize, _q52);
34309 : 0 : if (tree_swap_operands_p (_q50, _q51))
34310 : 0 : std::swap (_q50, _q51);
34311 : 0 : {
34312 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51, _q52 };
34313 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FMS, CFN_COND_FMS))
34314 : 0 : return true;
34315 : : }
34316 : : }
34317 : : break;
34318 : 0 : case CFN_FNMA:
34319 : 0 : if (gimple_call_num_args (_c2) == 3)
34320 : : {
34321 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
34322 : 0 : _q50 = do_valueize (valueize, _q50);
34323 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
34324 : 0 : _q51 = do_valueize (valueize, _q51);
34325 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
34326 : 0 : _q52 = do_valueize (valueize, _q52);
34327 : 0 : if (tree_swap_operands_p (_q50, _q51))
34328 : 0 : std::swap (_q50, _q51);
34329 : 0 : {
34330 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51, _q52 };
34331 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FNMA, CFN_COND_FNMA))
34332 : 0 : return true;
34333 : : }
34334 : : }
34335 : : break;
34336 : 0 : case CFN_FNMS:
34337 : 0 : if (gimple_call_num_args (_c2) == 3)
34338 : : {
34339 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
34340 : 0 : _q50 = do_valueize (valueize, _q50);
34341 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
34342 : 0 : _q51 = do_valueize (valueize, _q51);
34343 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
34344 : 0 : _q52 = do_valueize (valueize, _q52);
34345 : 0 : if (tree_swap_operands_p (_q50, _q51))
34346 : 0 : std::swap (_q50, _q51);
34347 : 0 : {
34348 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q50, _q51, _q52 };
34349 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FNMS, CFN_COND_FNMS))
34350 : 0 : return true;
34351 : : }
34352 : : }
34353 : : break;
34354 : : default:;
34355 : : }
34356 : : }
34357 : : break;
34358 : : default:;
34359 : : }
34360 : : }
34361 : : break;
34362 : : }
34363 : : default:;
34364 : : }
34365 : 12360 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
34366 : 2112 : switch (gimple_call_combined_fn (_c1))
34367 : : {
34368 : 10 : case CFN_FMA:
34369 : 10 : if (gimple_call_num_args (_c1) == 3)
34370 : : {
34371 : 10 : tree _q40 = gimple_call_arg (_c1, 0);
34372 : 10 : _q40 = do_valueize (valueize, _q40);
34373 : 10 : tree _q41 = gimple_call_arg (_c1, 1);
34374 : 10 : _q41 = do_valueize (valueize, _q41);
34375 : 10 : tree _q42 = gimple_call_arg (_c1, 2);
34376 : 10 : _q42 = do_valueize (valueize, _q42);
34377 : 10 : if (tree_swap_operands_p (_q40, _q41))
34378 : 0 : std::swap (_q40, _q41);
34379 : 10 : {
34380 : 10 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41, _q42 };
34381 : 10 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FMA, CFN_COND_FMA))
34382 : 0 : return true;
34383 : : }
34384 : : }
34385 : : break;
34386 : 0 : case CFN_FMS:
34387 : 0 : if (gimple_call_num_args (_c1) == 3)
34388 : : {
34389 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
34390 : 0 : _q40 = do_valueize (valueize, _q40);
34391 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
34392 : 0 : _q41 = do_valueize (valueize, _q41);
34393 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
34394 : 0 : _q42 = do_valueize (valueize, _q42);
34395 : 0 : if (tree_swap_operands_p (_q40, _q41))
34396 : 0 : std::swap (_q40, _q41);
34397 : 0 : {
34398 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41, _q42 };
34399 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FMS, CFN_COND_FMS))
34400 : 0 : return true;
34401 : : }
34402 : : }
34403 : : break;
34404 : 0 : case CFN_FNMA:
34405 : 0 : if (gimple_call_num_args (_c1) == 3)
34406 : : {
34407 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
34408 : 0 : _q40 = do_valueize (valueize, _q40);
34409 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
34410 : 0 : _q41 = do_valueize (valueize, _q41);
34411 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
34412 : 0 : _q42 = do_valueize (valueize, _q42);
34413 : 0 : if (tree_swap_operands_p (_q40, _q41))
34414 : 0 : std::swap (_q40, _q41);
34415 : 0 : {
34416 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41, _q42 };
34417 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FNMA, CFN_COND_FNMA))
34418 : 0 : return true;
34419 : : }
34420 : : }
34421 : : break;
34422 : 0 : case CFN_FNMS:
34423 : 0 : if (gimple_call_num_args (_c1) == 3)
34424 : : {
34425 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
34426 : 0 : _q40 = do_valueize (valueize, _q40);
34427 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
34428 : 0 : _q41 = do_valueize (valueize, _q41);
34429 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
34430 : 0 : _q42 = do_valueize (valueize, _q42);
34431 : 0 : if (tree_swap_operands_p (_q40, _q41))
34432 : 0 : std::swap (_q40, _q41);
34433 : 0 : {
34434 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _p2, _q40, _q41, _q42 };
34435 : 0 : if (gimple_simplify_647 (res_op, seq, valueize, type, captures, CFN_FNMS, CFN_COND_FNMS))
34436 : 0 : return true;
34437 : : }
34438 : : }
34439 : : break;
34440 : : default:;
34441 : : }
34442 : : }
34443 : : break;
34444 : 193352 : default:;
34445 : : }
34446 : 193352 : switch (TREE_CODE (_p1))
34447 : : {
34448 : 50562 : case SSA_NAME:
34449 : 50562 : if (gimple *_d1 = get_def (valueize, _p1))
34450 : : {
34451 : 44447 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
34452 : 54957 : switch (gimple_assign_rhs_code (_a1))
34453 : : {
34454 : 3534 : case VIEW_CONVERT_EXPR:
34455 : 3534 : {
34456 : 3534 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
34457 : 3534 : if ((TREE_CODE (_q30) == SSA_NAME
34458 : 3534 : || is_gimple_min_invariant (_q30)))
34459 : : {
34460 : 3534 : _q30 = do_valueize (valueize, _q30);
34461 : 3534 : switch (TREE_CODE (_q30))
34462 : : {
34463 : 3534 : case SSA_NAME:
34464 : 3534 : if (gimple *_d2 = get_def (valueize, _q30))
34465 : : {
34466 : 3433 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
34467 : 998 : switch (gimple_call_combined_fn (_c2))
34468 : : {
34469 : 0 : case CFN_COND_ADD:
34470 : 0 : if (gimple_call_num_args (_c2) == 4)
34471 : : {
34472 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34473 : 0 : _q40 = do_valueize (valueize, _q40);
34474 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34475 : 0 : _q41 = do_valueize (valueize, _q41);
34476 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34477 : 0 : _q42 = do_valueize (valueize, _q42);
34478 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34479 : 0 : _q43 = do_valueize (valueize, _q43);
34480 : 0 : if (tree_swap_operands_p (_q41, _q42))
34481 : 0 : std::swap (_q41, _q42);
34482 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34483 : : {
34484 : 0 : {
34485 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34486 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_ADD))
34487 : 0 : return true;
34488 : : }
34489 : : }
34490 : : }
34491 : : break;
34492 : 0 : case CFN_COND_AND:
34493 : 0 : if (gimple_call_num_args (_c2) == 4)
34494 : : {
34495 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34496 : 0 : _q40 = do_valueize (valueize, _q40);
34497 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34498 : 0 : _q41 = do_valueize (valueize, _q41);
34499 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34500 : 0 : _q42 = do_valueize (valueize, _q42);
34501 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34502 : 0 : _q43 = do_valueize (valueize, _q43);
34503 : 0 : if (tree_swap_operands_p (_q41, _q42))
34504 : 0 : std::swap (_q41, _q42);
34505 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34506 : : {
34507 : 0 : {
34508 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34509 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_AND))
34510 : 0 : return true;
34511 : : }
34512 : : }
34513 : : }
34514 : : break;
34515 : 0 : case CFN_COND_DIV:
34516 : 0 : if (gimple_call_num_args (_c2) == 4)
34517 : : {
34518 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34519 : 0 : _q40 = do_valueize (valueize, _q40);
34520 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34521 : 0 : _q41 = do_valueize (valueize, _q41);
34522 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34523 : 0 : _q42 = do_valueize (valueize, _q42);
34524 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34525 : 0 : _q43 = do_valueize (valueize, _q43);
34526 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34527 : : {
34528 : 0 : {
34529 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34530 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_DIV))
34531 : 0 : return true;
34532 : : }
34533 : : }
34534 : : }
34535 : : break;
34536 : 0 : case CFN_COND_IOR:
34537 : 0 : if (gimple_call_num_args (_c2) == 4)
34538 : : {
34539 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34540 : 0 : _q40 = do_valueize (valueize, _q40);
34541 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34542 : 0 : _q41 = do_valueize (valueize, _q41);
34543 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34544 : 0 : _q42 = do_valueize (valueize, _q42);
34545 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34546 : 0 : _q43 = do_valueize (valueize, _q43);
34547 : 0 : if (tree_swap_operands_p (_q41, _q42))
34548 : 0 : std::swap (_q41, _q42);
34549 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34550 : : {
34551 : 0 : {
34552 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34553 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_IOR))
34554 : 0 : return true;
34555 : : }
34556 : : }
34557 : : }
34558 : : break;
34559 : 0 : case CFN_COND_MAX:
34560 : 0 : if (gimple_call_num_args (_c2) == 4)
34561 : : {
34562 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34563 : 0 : _q40 = do_valueize (valueize, _q40);
34564 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34565 : 0 : _q41 = do_valueize (valueize, _q41);
34566 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34567 : 0 : _q42 = do_valueize (valueize, _q42);
34568 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34569 : 0 : _q43 = do_valueize (valueize, _q43);
34570 : 0 : if (tree_swap_operands_p (_q41, _q42))
34571 : 0 : std::swap (_q41, _q42);
34572 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34573 : : {
34574 : 0 : {
34575 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34576 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MAX))
34577 : 0 : return true;
34578 : : }
34579 : : }
34580 : : }
34581 : : break;
34582 : 0 : case CFN_COND_MIN:
34583 : 0 : if (gimple_call_num_args (_c2) == 4)
34584 : : {
34585 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34586 : 0 : _q40 = do_valueize (valueize, _q40);
34587 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34588 : 0 : _q41 = do_valueize (valueize, _q41);
34589 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34590 : 0 : _q42 = do_valueize (valueize, _q42);
34591 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34592 : 0 : _q43 = do_valueize (valueize, _q43);
34593 : 0 : if (tree_swap_operands_p (_q41, _q42))
34594 : 0 : std::swap (_q41, _q42);
34595 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34596 : : {
34597 : 0 : {
34598 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34599 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MIN))
34600 : 0 : return true;
34601 : : }
34602 : : }
34603 : : }
34604 : : break;
34605 : 0 : case CFN_COND_MOD:
34606 : 0 : if (gimple_call_num_args (_c2) == 4)
34607 : : {
34608 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34609 : 0 : _q40 = do_valueize (valueize, _q40);
34610 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34611 : 0 : _q41 = do_valueize (valueize, _q41);
34612 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34613 : 0 : _q42 = do_valueize (valueize, _q42);
34614 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34615 : 0 : _q43 = do_valueize (valueize, _q43);
34616 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34617 : : {
34618 : 0 : {
34619 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34620 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MOD))
34621 : 0 : return true;
34622 : : }
34623 : : }
34624 : : }
34625 : : break;
34626 : 0 : case CFN_COND_MUL:
34627 : 0 : if (gimple_call_num_args (_c2) == 4)
34628 : : {
34629 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34630 : 0 : _q40 = do_valueize (valueize, _q40);
34631 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34632 : 0 : _q41 = do_valueize (valueize, _q41);
34633 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34634 : 0 : _q42 = do_valueize (valueize, _q42);
34635 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34636 : 0 : _q43 = do_valueize (valueize, _q43);
34637 : 0 : if (tree_swap_operands_p (_q41, _q42))
34638 : 0 : std::swap (_q41, _q42);
34639 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34640 : : {
34641 : 0 : {
34642 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34643 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MUL))
34644 : 0 : return true;
34645 : : }
34646 : : }
34647 : : }
34648 : : break;
34649 : 0 : case CFN_COND_SHL:
34650 : 0 : if (gimple_call_num_args (_c2) == 4)
34651 : : {
34652 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34653 : 0 : _q40 = do_valueize (valueize, _q40);
34654 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34655 : 0 : _q41 = do_valueize (valueize, _q41);
34656 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34657 : 0 : _q42 = do_valueize (valueize, _q42);
34658 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34659 : 0 : _q43 = do_valueize (valueize, _q43);
34660 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34661 : : {
34662 : 0 : {
34663 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34664 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_SHL))
34665 : 0 : return true;
34666 : : }
34667 : : }
34668 : : }
34669 : : break;
34670 : 0 : case CFN_COND_SHR:
34671 : 0 : if (gimple_call_num_args (_c2) == 4)
34672 : : {
34673 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34674 : 0 : _q40 = do_valueize (valueize, _q40);
34675 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34676 : 0 : _q41 = do_valueize (valueize, _q41);
34677 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34678 : 0 : _q42 = do_valueize (valueize, _q42);
34679 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34680 : 0 : _q43 = do_valueize (valueize, _q43);
34681 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34682 : : {
34683 : 0 : {
34684 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34685 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_SHR))
34686 : 0 : return true;
34687 : : }
34688 : : }
34689 : : }
34690 : : break;
34691 : 0 : case CFN_COND_SUB:
34692 : 0 : if (gimple_call_num_args (_c2) == 4)
34693 : : {
34694 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34695 : 0 : _q40 = do_valueize (valueize, _q40);
34696 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34697 : 0 : _q41 = do_valueize (valueize, _q41);
34698 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34699 : 0 : _q42 = do_valueize (valueize, _q42);
34700 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34701 : 0 : _q43 = do_valueize (valueize, _q43);
34702 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34703 : : {
34704 : 0 : {
34705 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34706 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_SUB))
34707 : 0 : return true;
34708 : : }
34709 : : }
34710 : : }
34711 : : break;
34712 : 0 : case CFN_COND_XOR:
34713 : 0 : if (gimple_call_num_args (_c2) == 4)
34714 : : {
34715 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34716 : 0 : _q40 = do_valueize (valueize, _q40);
34717 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34718 : 0 : _q41 = do_valueize (valueize, _q41);
34719 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34720 : 0 : _q42 = do_valueize (valueize, _q42);
34721 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34722 : 0 : _q43 = do_valueize (valueize, _q43);
34723 : 0 : if (tree_swap_operands_p (_q41, _q42))
34724 : 0 : std::swap (_q41, _q42);
34725 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34726 : : {
34727 : 0 : {
34728 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34729 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_XOR))
34730 : 0 : return true;
34731 : : }
34732 : : }
34733 : : }
34734 : : break;
34735 : 0 : case CFN_COND_COPYSIGN:
34736 : 0 : if (gimple_call_num_args (_c2) == 4)
34737 : : {
34738 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34739 : 0 : _q40 = do_valueize (valueize, _q40);
34740 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34741 : 0 : _q41 = do_valueize (valueize, _q41);
34742 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34743 : 0 : _q42 = do_valueize (valueize, _q42);
34744 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34745 : 0 : _q43 = do_valueize (valueize, _q43);
34746 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34747 : : {
34748 : 0 : {
34749 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34750 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_COPYSIGN))
34751 : 0 : return true;
34752 : : }
34753 : : }
34754 : : }
34755 : : break;
34756 : 0 : case CFN_COND_FMAX:
34757 : 0 : if (gimple_call_num_args (_c2) == 4)
34758 : : {
34759 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34760 : 0 : _q40 = do_valueize (valueize, _q40);
34761 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34762 : 0 : _q41 = do_valueize (valueize, _q41);
34763 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34764 : 0 : _q42 = do_valueize (valueize, _q42);
34765 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34766 : 0 : _q43 = do_valueize (valueize, _q43);
34767 : 0 : if (tree_swap_operands_p (_q41, _q42))
34768 : 0 : std::swap (_q41, _q42);
34769 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34770 : : {
34771 : 0 : {
34772 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34773 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_FMAX))
34774 : 0 : return true;
34775 : : }
34776 : : }
34777 : : }
34778 : : break;
34779 : 0 : case CFN_COND_FMIN:
34780 : 0 : if (gimple_call_num_args (_c2) == 4)
34781 : : {
34782 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34783 : 0 : _q40 = do_valueize (valueize, _q40);
34784 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34785 : 0 : _q41 = do_valueize (valueize, _q41);
34786 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34787 : 0 : _q42 = do_valueize (valueize, _q42);
34788 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34789 : 0 : _q43 = do_valueize (valueize, _q43);
34790 : 0 : if (tree_swap_operands_p (_q41, _q42))
34791 : 0 : std::swap (_q41, _q42);
34792 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34793 : : {
34794 : 0 : {
34795 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34796 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_FMIN))
34797 : 0 : return true;
34798 : : }
34799 : : }
34800 : : }
34801 : : break;
34802 : 0 : case CFN_COND_RDIV:
34803 : 0 : if (gimple_call_num_args (_c2) == 4)
34804 : : {
34805 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
34806 : 0 : _q40 = do_valueize (valueize, _q40);
34807 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
34808 : 0 : _q41 = do_valueize (valueize, _q41);
34809 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
34810 : 0 : _q42 = do_valueize (valueize, _q42);
34811 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
34812 : 0 : _q43 = do_valueize (valueize, _q43);
34813 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
34814 : : {
34815 : 0 : {
34816 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _p2 };
34817 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_RDIV))
34818 : 0 : return true;
34819 : : }
34820 : : }
34821 : : }
34822 : : break;
34823 : : default:;
34824 : : }
34825 : : }
34826 : : break;
34827 : : default:;
34828 : : }
34829 : : }
34830 : : break;
34831 : : }
34832 : : default:;
34833 : : }
34834 : 13749 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
34835 : 3132 : switch (gimple_call_combined_fn (_c1))
34836 : : {
34837 : 144 : case CFN_COND_ADD:
34838 : 144 : if (gimple_call_num_args (_c1) == 4)
34839 : : {
34840 : 144 : tree _q30 = gimple_call_arg (_c1, 0);
34841 : 144 : _q30 = do_valueize (valueize, _q30);
34842 : 144 : tree _q31 = gimple_call_arg (_c1, 1);
34843 : 144 : _q31 = do_valueize (valueize, _q31);
34844 : 144 : tree _q32 = gimple_call_arg (_c1, 2);
34845 : 144 : _q32 = do_valueize (valueize, _q32);
34846 : 144 : tree _q33 = gimple_call_arg (_c1, 3);
34847 : 144 : _q33 = do_valueize (valueize, _q33);
34848 : 144 : if (tree_swap_operands_p (_q31, _q32))
34849 : 12 : std::swap (_q31, _q32);
34850 : 144 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
34851 : : {
34852 : 144 : {
34853 : 144 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
34854 : 144 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_ADD))
34855 : 144 : return true;
34856 : : }
34857 : : }
34858 : : }
34859 : : break;
34860 : 0 : case CFN_COND_AND:
34861 : 0 : if (gimple_call_num_args (_c1) == 4)
34862 : : {
34863 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
34864 : 0 : _q30 = do_valueize (valueize, _q30);
34865 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
34866 : 0 : _q31 = do_valueize (valueize, _q31);
34867 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
34868 : 0 : _q32 = do_valueize (valueize, _q32);
34869 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
34870 : 0 : _q33 = do_valueize (valueize, _q33);
34871 : 0 : if (tree_swap_operands_p (_q31, _q32))
34872 : 0 : std::swap (_q31, _q32);
34873 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
34874 : : {
34875 : 0 : {
34876 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
34877 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_AND))
34878 : 0 : return true;
34879 : : }
34880 : : }
34881 : : }
34882 : : break;
34883 : 0 : case CFN_COND_DIV:
34884 : 0 : if (gimple_call_num_args (_c1) == 4)
34885 : : {
34886 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
34887 : 0 : _q30 = do_valueize (valueize, _q30);
34888 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
34889 : 0 : _q31 = do_valueize (valueize, _q31);
34890 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
34891 : 0 : _q32 = do_valueize (valueize, _q32);
34892 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
34893 : 0 : _q33 = do_valueize (valueize, _q33);
34894 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
34895 : : {
34896 : 0 : {
34897 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
34898 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_DIV))
34899 : 0 : return true;
34900 : : }
34901 : : }
34902 : : }
34903 : : break;
34904 : 0 : case CFN_COND_IOR:
34905 : 0 : if (gimple_call_num_args (_c1) == 4)
34906 : : {
34907 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
34908 : 0 : _q30 = do_valueize (valueize, _q30);
34909 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
34910 : 0 : _q31 = do_valueize (valueize, _q31);
34911 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
34912 : 0 : _q32 = do_valueize (valueize, _q32);
34913 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
34914 : 0 : _q33 = do_valueize (valueize, _q33);
34915 : 0 : if (tree_swap_operands_p (_q31, _q32))
34916 : 0 : std::swap (_q31, _q32);
34917 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
34918 : : {
34919 : 0 : {
34920 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
34921 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_IOR))
34922 : 0 : return true;
34923 : : }
34924 : : }
34925 : : }
34926 : : break;
34927 : 0 : case CFN_COND_MAX:
34928 : 0 : if (gimple_call_num_args (_c1) == 4)
34929 : : {
34930 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
34931 : 0 : _q30 = do_valueize (valueize, _q30);
34932 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
34933 : 0 : _q31 = do_valueize (valueize, _q31);
34934 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
34935 : 0 : _q32 = do_valueize (valueize, _q32);
34936 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
34937 : 0 : _q33 = do_valueize (valueize, _q33);
34938 : 0 : if (tree_swap_operands_p (_q31, _q32))
34939 : 0 : std::swap (_q31, _q32);
34940 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
34941 : : {
34942 : 0 : {
34943 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
34944 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MAX))
34945 : 0 : return true;
34946 : : }
34947 : : }
34948 : : }
34949 : : break;
34950 : 0 : case CFN_COND_MIN:
34951 : 0 : if (gimple_call_num_args (_c1) == 4)
34952 : : {
34953 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
34954 : 0 : _q30 = do_valueize (valueize, _q30);
34955 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
34956 : 0 : _q31 = do_valueize (valueize, _q31);
34957 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
34958 : 0 : _q32 = do_valueize (valueize, _q32);
34959 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
34960 : 0 : _q33 = do_valueize (valueize, _q33);
34961 : 0 : if (tree_swap_operands_p (_q31, _q32))
34962 : 0 : std::swap (_q31, _q32);
34963 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
34964 : : {
34965 : 0 : {
34966 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
34967 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MIN))
34968 : 0 : return true;
34969 : : }
34970 : : }
34971 : : }
34972 : : break;
34973 : 0 : case CFN_COND_MOD:
34974 : 0 : if (gimple_call_num_args (_c1) == 4)
34975 : : {
34976 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
34977 : 0 : _q30 = do_valueize (valueize, _q30);
34978 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
34979 : 0 : _q31 = do_valueize (valueize, _q31);
34980 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
34981 : 0 : _q32 = do_valueize (valueize, _q32);
34982 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
34983 : 0 : _q33 = do_valueize (valueize, _q33);
34984 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
34985 : : {
34986 : 0 : {
34987 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
34988 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MOD))
34989 : 0 : return true;
34990 : : }
34991 : : }
34992 : : }
34993 : : break;
34994 : 12 : case CFN_COND_MUL:
34995 : 12 : if (gimple_call_num_args (_c1) == 4)
34996 : : {
34997 : 12 : tree _q30 = gimple_call_arg (_c1, 0);
34998 : 12 : _q30 = do_valueize (valueize, _q30);
34999 : 12 : tree _q31 = gimple_call_arg (_c1, 1);
35000 : 12 : _q31 = do_valueize (valueize, _q31);
35001 : 12 : tree _q32 = gimple_call_arg (_c1, 2);
35002 : 12 : _q32 = do_valueize (valueize, _q32);
35003 : 12 : tree _q33 = gimple_call_arg (_c1, 3);
35004 : 12 : _q33 = do_valueize (valueize, _q33);
35005 : 12 : if (tree_swap_operands_p (_q31, _q32))
35006 : 0 : std::swap (_q31, _q32);
35007 : 12 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35008 : : {
35009 : 12 : {
35010 : 12 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35011 : 12 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_MUL))
35012 : 12 : return true;
35013 : : }
35014 : : }
35015 : : }
35016 : : break;
35017 : 0 : case CFN_COND_SHL:
35018 : 0 : if (gimple_call_num_args (_c1) == 4)
35019 : : {
35020 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
35021 : 0 : _q30 = do_valueize (valueize, _q30);
35022 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
35023 : 0 : _q31 = do_valueize (valueize, _q31);
35024 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
35025 : 0 : _q32 = do_valueize (valueize, _q32);
35026 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
35027 : 0 : _q33 = do_valueize (valueize, _q33);
35028 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35029 : : {
35030 : 0 : {
35031 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35032 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_SHL))
35033 : 0 : return true;
35034 : : }
35035 : : }
35036 : : }
35037 : : break;
35038 : 0 : case CFN_COND_SHR:
35039 : 0 : if (gimple_call_num_args (_c1) == 4)
35040 : : {
35041 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
35042 : 0 : _q30 = do_valueize (valueize, _q30);
35043 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
35044 : 0 : _q31 = do_valueize (valueize, _q31);
35045 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
35046 : 0 : _q32 = do_valueize (valueize, _q32);
35047 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
35048 : 0 : _q33 = do_valueize (valueize, _q33);
35049 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35050 : : {
35051 : 0 : {
35052 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35053 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_SHR))
35054 : 0 : return true;
35055 : : }
35056 : : }
35057 : : }
35058 : : break;
35059 : 168 : case CFN_COND_SUB:
35060 : 168 : if (gimple_call_num_args (_c1) == 4)
35061 : : {
35062 : 168 : tree _q30 = gimple_call_arg (_c1, 0);
35063 : 168 : _q30 = do_valueize (valueize, _q30);
35064 : 168 : tree _q31 = gimple_call_arg (_c1, 1);
35065 : 168 : _q31 = do_valueize (valueize, _q31);
35066 : 168 : tree _q32 = gimple_call_arg (_c1, 2);
35067 : 168 : _q32 = do_valueize (valueize, _q32);
35068 : 168 : tree _q33 = gimple_call_arg (_c1, 3);
35069 : 168 : _q33 = do_valueize (valueize, _q33);
35070 : 168 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35071 : : {
35072 : 168 : {
35073 : 168 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35074 : 168 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_SUB))
35075 : 168 : return true;
35076 : : }
35077 : : }
35078 : : }
35079 : : break;
35080 : 0 : case CFN_COND_XOR:
35081 : 0 : if (gimple_call_num_args (_c1) == 4)
35082 : : {
35083 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
35084 : 0 : _q30 = do_valueize (valueize, _q30);
35085 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
35086 : 0 : _q31 = do_valueize (valueize, _q31);
35087 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
35088 : 0 : _q32 = do_valueize (valueize, _q32);
35089 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
35090 : 0 : _q33 = do_valueize (valueize, _q33);
35091 : 0 : if (tree_swap_operands_p (_q31, _q32))
35092 : 0 : std::swap (_q31, _q32);
35093 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35094 : : {
35095 : 0 : {
35096 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35097 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_XOR))
35098 : 0 : return true;
35099 : : }
35100 : : }
35101 : : }
35102 : : break;
35103 : 0 : case CFN_COND_COPYSIGN:
35104 : 0 : if (gimple_call_num_args (_c1) == 4)
35105 : : {
35106 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
35107 : 0 : _q30 = do_valueize (valueize, _q30);
35108 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
35109 : 0 : _q31 = do_valueize (valueize, _q31);
35110 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
35111 : 0 : _q32 = do_valueize (valueize, _q32);
35112 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
35113 : 0 : _q33 = do_valueize (valueize, _q33);
35114 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35115 : : {
35116 : 0 : {
35117 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35118 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_COPYSIGN))
35119 : 0 : return true;
35120 : : }
35121 : : }
35122 : : }
35123 : : break;
35124 : 0 : case CFN_COND_FMAX:
35125 : 0 : if (gimple_call_num_args (_c1) == 4)
35126 : : {
35127 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
35128 : 0 : _q30 = do_valueize (valueize, _q30);
35129 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
35130 : 0 : _q31 = do_valueize (valueize, _q31);
35131 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
35132 : 0 : _q32 = do_valueize (valueize, _q32);
35133 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
35134 : 0 : _q33 = do_valueize (valueize, _q33);
35135 : 0 : if (tree_swap_operands_p (_q31, _q32))
35136 : 0 : std::swap (_q31, _q32);
35137 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35138 : : {
35139 : 0 : {
35140 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35141 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_FMAX))
35142 : 0 : return true;
35143 : : }
35144 : : }
35145 : : }
35146 : : break;
35147 : 0 : case CFN_COND_FMIN:
35148 : 0 : if (gimple_call_num_args (_c1) == 4)
35149 : : {
35150 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
35151 : 0 : _q30 = do_valueize (valueize, _q30);
35152 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
35153 : 0 : _q31 = do_valueize (valueize, _q31);
35154 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
35155 : 0 : _q32 = do_valueize (valueize, _q32);
35156 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
35157 : 0 : _q33 = do_valueize (valueize, _q33);
35158 : 0 : if (tree_swap_operands_p (_q31, _q32))
35159 : 0 : std::swap (_q31, _q32);
35160 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35161 : : {
35162 : 0 : {
35163 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35164 : 0 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_FMIN))
35165 : 0 : return true;
35166 : : }
35167 : : }
35168 : : }
35169 : : break;
35170 : 58 : case CFN_COND_RDIV:
35171 : 58 : if (gimple_call_num_args (_c1) == 4)
35172 : : {
35173 : 58 : tree _q30 = gimple_call_arg (_c1, 0);
35174 : 58 : _q30 = do_valueize (valueize, _q30);
35175 : 58 : tree _q31 = gimple_call_arg (_c1, 1);
35176 : 58 : _q31 = do_valueize (valueize, _q31);
35177 : 58 : tree _q32 = gimple_call_arg (_c1, 2);
35178 : 58 : _q32 = do_valueize (valueize, _q32);
35179 : 58 : tree _q33 = gimple_call_arg (_c1, 3);
35180 : 58 : _q33 = do_valueize (valueize, _q33);
35181 : 58 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
35182 : : {
35183 : 36 : {
35184 : 36 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _p2 };
35185 : 36 : if (gimple_simplify_648 (res_op, seq, valueize, type, captures, CFN_COND_RDIV))
35186 : 36 : return true;
35187 : : }
35188 : : }
35189 : : }
35190 : : break;
35191 : : default:;
35192 : : }
35193 : : }
35194 : : break;
35195 : 192992 : default:;
35196 : : }
35197 : 192992 : switch (TREE_CODE (_p2))
35198 : : {
35199 : 42974 : case SSA_NAME:
35200 : 42974 : if (gimple *_d1 = get_def (valueize, _p2))
35201 : : {
35202 : 37303 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
35203 : 38599 : switch (gimple_assign_rhs_code (_a1))
35204 : : {
35205 : 4984 : case VIEW_CONVERT_EXPR:
35206 : 4984 : {
35207 : 4984 : tree _q40 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
35208 : 4984 : if ((TREE_CODE (_q40) == SSA_NAME
35209 : 4984 : || is_gimple_min_invariant (_q40)))
35210 : : {
35211 : 4984 : _q40 = do_valueize (valueize, _q40);
35212 : 4984 : switch (TREE_CODE (_q40))
35213 : : {
35214 : 4984 : case SSA_NAME:
35215 : 4984 : if (gimple *_d2 = get_def (valueize, _q40))
35216 : : {
35217 : 4928 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
35218 : 1217 : switch (gimple_call_combined_fn (_c2))
35219 : : {
35220 : 0 : case CFN_COND_ADD:
35221 : 0 : if (gimple_call_num_args (_c2) == 4)
35222 : : {
35223 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35224 : 0 : _q50 = do_valueize (valueize, _q50);
35225 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35226 : 0 : _q51 = do_valueize (valueize, _q51);
35227 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35228 : 0 : _q52 = do_valueize (valueize, _q52);
35229 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35230 : 0 : _q53 = do_valueize (valueize, _q53);
35231 : 0 : if (tree_swap_operands_p (_q51, _q52))
35232 : 0 : std::swap (_q51, _q52);
35233 : 0 : {
35234 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35235 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_ADD))
35236 : 0 : return true;
35237 : : }
35238 : : }
35239 : : break;
35240 : 0 : case CFN_COND_AND:
35241 : 0 : if (gimple_call_num_args (_c2) == 4)
35242 : : {
35243 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35244 : 0 : _q50 = do_valueize (valueize, _q50);
35245 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35246 : 0 : _q51 = do_valueize (valueize, _q51);
35247 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35248 : 0 : _q52 = do_valueize (valueize, _q52);
35249 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35250 : 0 : _q53 = do_valueize (valueize, _q53);
35251 : 0 : if (tree_swap_operands_p (_q51, _q52))
35252 : 0 : std::swap (_q51, _q52);
35253 : 0 : {
35254 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35255 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_AND))
35256 : 0 : return true;
35257 : : }
35258 : : }
35259 : : break;
35260 : 0 : case CFN_COND_DIV:
35261 : 0 : if (gimple_call_num_args (_c2) == 4)
35262 : : {
35263 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35264 : 0 : _q50 = do_valueize (valueize, _q50);
35265 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35266 : 0 : _q51 = do_valueize (valueize, _q51);
35267 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35268 : 0 : _q52 = do_valueize (valueize, _q52);
35269 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35270 : 0 : _q53 = do_valueize (valueize, _q53);
35271 : 0 : {
35272 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35273 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_DIV))
35274 : 0 : return true;
35275 : : }
35276 : : }
35277 : : break;
35278 : 0 : case CFN_COND_IOR:
35279 : 0 : if (gimple_call_num_args (_c2) == 4)
35280 : : {
35281 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35282 : 0 : _q50 = do_valueize (valueize, _q50);
35283 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35284 : 0 : _q51 = do_valueize (valueize, _q51);
35285 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35286 : 0 : _q52 = do_valueize (valueize, _q52);
35287 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35288 : 0 : _q53 = do_valueize (valueize, _q53);
35289 : 0 : if (tree_swap_operands_p (_q51, _q52))
35290 : 0 : std::swap (_q51, _q52);
35291 : 0 : {
35292 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35293 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_IOR))
35294 : 0 : return true;
35295 : : }
35296 : : }
35297 : : break;
35298 : 0 : case CFN_COND_MAX:
35299 : 0 : if (gimple_call_num_args (_c2) == 4)
35300 : : {
35301 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35302 : 0 : _q50 = do_valueize (valueize, _q50);
35303 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35304 : 0 : _q51 = do_valueize (valueize, _q51);
35305 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35306 : 0 : _q52 = do_valueize (valueize, _q52);
35307 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35308 : 0 : _q53 = do_valueize (valueize, _q53);
35309 : 0 : if (tree_swap_operands_p (_q51, _q52))
35310 : 0 : std::swap (_q51, _q52);
35311 : 0 : {
35312 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35313 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MAX))
35314 : 0 : return true;
35315 : : }
35316 : : }
35317 : : break;
35318 : 0 : case CFN_COND_MIN:
35319 : 0 : if (gimple_call_num_args (_c2) == 4)
35320 : : {
35321 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35322 : 0 : _q50 = do_valueize (valueize, _q50);
35323 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35324 : 0 : _q51 = do_valueize (valueize, _q51);
35325 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35326 : 0 : _q52 = do_valueize (valueize, _q52);
35327 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35328 : 0 : _q53 = do_valueize (valueize, _q53);
35329 : 0 : if (tree_swap_operands_p (_q51, _q52))
35330 : 0 : std::swap (_q51, _q52);
35331 : 0 : {
35332 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35333 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MIN))
35334 : 0 : return true;
35335 : : }
35336 : : }
35337 : : break;
35338 : 0 : case CFN_COND_MOD:
35339 : 0 : if (gimple_call_num_args (_c2) == 4)
35340 : : {
35341 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35342 : 0 : _q50 = do_valueize (valueize, _q50);
35343 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35344 : 0 : _q51 = do_valueize (valueize, _q51);
35345 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35346 : 0 : _q52 = do_valueize (valueize, _q52);
35347 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35348 : 0 : _q53 = do_valueize (valueize, _q53);
35349 : 0 : {
35350 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35351 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MOD))
35352 : 0 : return true;
35353 : : }
35354 : : }
35355 : : break;
35356 : 0 : case CFN_COND_MUL:
35357 : 0 : if (gimple_call_num_args (_c2) == 4)
35358 : : {
35359 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35360 : 0 : _q50 = do_valueize (valueize, _q50);
35361 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35362 : 0 : _q51 = do_valueize (valueize, _q51);
35363 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35364 : 0 : _q52 = do_valueize (valueize, _q52);
35365 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35366 : 0 : _q53 = do_valueize (valueize, _q53);
35367 : 0 : if (tree_swap_operands_p (_q51, _q52))
35368 : 0 : std::swap (_q51, _q52);
35369 : 0 : {
35370 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35371 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MUL))
35372 : 0 : return true;
35373 : : }
35374 : : }
35375 : : break;
35376 : 0 : case CFN_COND_SHL:
35377 : 0 : if (gimple_call_num_args (_c2) == 4)
35378 : : {
35379 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35380 : 0 : _q50 = do_valueize (valueize, _q50);
35381 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35382 : 0 : _q51 = do_valueize (valueize, _q51);
35383 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35384 : 0 : _q52 = do_valueize (valueize, _q52);
35385 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35386 : 0 : _q53 = do_valueize (valueize, _q53);
35387 : 0 : {
35388 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35389 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_SHL))
35390 : 0 : return true;
35391 : : }
35392 : : }
35393 : : break;
35394 : 0 : case CFN_COND_SHR:
35395 : 0 : if (gimple_call_num_args (_c2) == 4)
35396 : : {
35397 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35398 : 0 : _q50 = do_valueize (valueize, _q50);
35399 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35400 : 0 : _q51 = do_valueize (valueize, _q51);
35401 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35402 : 0 : _q52 = do_valueize (valueize, _q52);
35403 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35404 : 0 : _q53 = do_valueize (valueize, _q53);
35405 : 0 : {
35406 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35407 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_SHR))
35408 : 0 : return true;
35409 : : }
35410 : : }
35411 : : break;
35412 : 0 : case CFN_COND_SUB:
35413 : 0 : if (gimple_call_num_args (_c2) == 4)
35414 : : {
35415 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35416 : 0 : _q50 = do_valueize (valueize, _q50);
35417 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35418 : 0 : _q51 = do_valueize (valueize, _q51);
35419 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35420 : 0 : _q52 = do_valueize (valueize, _q52);
35421 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35422 : 0 : _q53 = do_valueize (valueize, _q53);
35423 : 0 : {
35424 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35425 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_SUB))
35426 : 0 : return true;
35427 : : }
35428 : : }
35429 : : break;
35430 : 0 : case CFN_COND_XOR:
35431 : 0 : if (gimple_call_num_args (_c2) == 4)
35432 : : {
35433 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35434 : 0 : _q50 = do_valueize (valueize, _q50);
35435 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35436 : 0 : _q51 = do_valueize (valueize, _q51);
35437 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35438 : 0 : _q52 = do_valueize (valueize, _q52);
35439 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35440 : 0 : _q53 = do_valueize (valueize, _q53);
35441 : 0 : if (tree_swap_operands_p (_q51, _q52))
35442 : 0 : std::swap (_q51, _q52);
35443 : 0 : {
35444 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35445 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_XOR))
35446 : 0 : return true;
35447 : : }
35448 : : }
35449 : : break;
35450 : 0 : case CFN_COND_COPYSIGN:
35451 : 0 : if (gimple_call_num_args (_c2) == 4)
35452 : : {
35453 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35454 : 0 : _q50 = do_valueize (valueize, _q50);
35455 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35456 : 0 : _q51 = do_valueize (valueize, _q51);
35457 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35458 : 0 : _q52 = do_valueize (valueize, _q52);
35459 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35460 : 0 : _q53 = do_valueize (valueize, _q53);
35461 : 0 : {
35462 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35463 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_COPYSIGN))
35464 : 0 : return true;
35465 : : }
35466 : : }
35467 : : break;
35468 : 0 : case CFN_COND_FMAX:
35469 : 0 : if (gimple_call_num_args (_c2) == 4)
35470 : : {
35471 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35472 : 0 : _q50 = do_valueize (valueize, _q50);
35473 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35474 : 0 : _q51 = do_valueize (valueize, _q51);
35475 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35476 : 0 : _q52 = do_valueize (valueize, _q52);
35477 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35478 : 0 : _q53 = do_valueize (valueize, _q53);
35479 : 0 : if (tree_swap_operands_p (_q51, _q52))
35480 : 0 : std::swap (_q51, _q52);
35481 : 0 : {
35482 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35483 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_FMAX))
35484 : 0 : return true;
35485 : : }
35486 : : }
35487 : : break;
35488 : 0 : case CFN_COND_FMIN:
35489 : 0 : if (gimple_call_num_args (_c2) == 4)
35490 : : {
35491 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35492 : 0 : _q50 = do_valueize (valueize, _q50);
35493 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35494 : 0 : _q51 = do_valueize (valueize, _q51);
35495 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35496 : 0 : _q52 = do_valueize (valueize, _q52);
35497 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35498 : 0 : _q53 = do_valueize (valueize, _q53);
35499 : 0 : if (tree_swap_operands_p (_q51, _q52))
35500 : 0 : std::swap (_q51, _q52);
35501 : 0 : {
35502 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35503 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_FMIN))
35504 : 0 : return true;
35505 : : }
35506 : : }
35507 : : break;
35508 : 0 : case CFN_COND_RDIV:
35509 : 0 : if (gimple_call_num_args (_c2) == 4)
35510 : : {
35511 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
35512 : 0 : _q50 = do_valueize (valueize, _q50);
35513 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
35514 : 0 : _q51 = do_valueize (valueize, _q51);
35515 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
35516 : 0 : _q52 = do_valueize (valueize, _q52);
35517 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
35518 : 0 : _q53 = do_valueize (valueize, _q53);
35519 : 0 : {
35520 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53 };
35521 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_RDIV))
35522 : 0 : return true;
35523 : : }
35524 : : }
35525 : : break;
35526 : : default:;
35527 : : }
35528 : : }
35529 : : break;
35530 : : default:;
35531 : : }
35532 : : }
35533 : : break;
35534 : : }
35535 : : default:;
35536 : : }
35537 : 12264 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
35538 : 2016 : switch (gimple_call_combined_fn (_c1))
35539 : : {
35540 : 104 : case CFN_COND_ADD:
35541 : 104 : if (gimple_call_num_args (_c1) == 4)
35542 : : {
35543 : 104 : tree _q40 = gimple_call_arg (_c1, 0);
35544 : 104 : _q40 = do_valueize (valueize, _q40);
35545 : 104 : tree _q41 = gimple_call_arg (_c1, 1);
35546 : 104 : _q41 = do_valueize (valueize, _q41);
35547 : 104 : tree _q42 = gimple_call_arg (_c1, 2);
35548 : 104 : _q42 = do_valueize (valueize, _q42);
35549 : 104 : tree _q43 = gimple_call_arg (_c1, 3);
35550 : 104 : _q43 = do_valueize (valueize, _q43);
35551 : 104 : if (tree_swap_operands_p (_q41, _q42))
35552 : 18 : std::swap (_q41, _q42);
35553 : 104 : {
35554 : 104 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35555 : 104 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_ADD))
35556 : 0 : return true;
35557 : : }
35558 : : }
35559 : : break;
35560 : 1 : case CFN_COND_AND:
35561 : 1 : if (gimple_call_num_args (_c1) == 4)
35562 : : {
35563 : 1 : tree _q40 = gimple_call_arg (_c1, 0);
35564 : 1 : _q40 = do_valueize (valueize, _q40);
35565 : 1 : tree _q41 = gimple_call_arg (_c1, 1);
35566 : 1 : _q41 = do_valueize (valueize, _q41);
35567 : 1 : tree _q42 = gimple_call_arg (_c1, 2);
35568 : 1 : _q42 = do_valueize (valueize, _q42);
35569 : 1 : tree _q43 = gimple_call_arg (_c1, 3);
35570 : 1 : _q43 = do_valueize (valueize, _q43);
35571 : 1 : if (tree_swap_operands_p (_q41, _q42))
35572 : 0 : std::swap (_q41, _q42);
35573 : 1 : {
35574 : 1 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35575 : 1 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_AND))
35576 : 0 : return true;
35577 : : }
35578 : : }
35579 : : break;
35580 : 0 : case CFN_COND_DIV:
35581 : 0 : if (gimple_call_num_args (_c1) == 4)
35582 : : {
35583 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35584 : 0 : _q40 = do_valueize (valueize, _q40);
35585 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35586 : 0 : _q41 = do_valueize (valueize, _q41);
35587 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35588 : 0 : _q42 = do_valueize (valueize, _q42);
35589 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35590 : 0 : _q43 = do_valueize (valueize, _q43);
35591 : 0 : {
35592 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35593 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_DIV))
35594 : 0 : return true;
35595 : : }
35596 : : }
35597 : : break;
35598 : 1 : case CFN_COND_IOR:
35599 : 1 : if (gimple_call_num_args (_c1) == 4)
35600 : : {
35601 : 1 : tree _q40 = gimple_call_arg (_c1, 0);
35602 : 1 : _q40 = do_valueize (valueize, _q40);
35603 : 1 : tree _q41 = gimple_call_arg (_c1, 1);
35604 : 1 : _q41 = do_valueize (valueize, _q41);
35605 : 1 : tree _q42 = gimple_call_arg (_c1, 2);
35606 : 1 : _q42 = do_valueize (valueize, _q42);
35607 : 1 : tree _q43 = gimple_call_arg (_c1, 3);
35608 : 1 : _q43 = do_valueize (valueize, _q43);
35609 : 1 : if (tree_swap_operands_p (_q41, _q42))
35610 : 0 : std::swap (_q41, _q42);
35611 : 1 : {
35612 : 1 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35613 : 1 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_IOR))
35614 : 0 : return true;
35615 : : }
35616 : : }
35617 : : break;
35618 : 0 : case CFN_COND_MAX:
35619 : 0 : if (gimple_call_num_args (_c1) == 4)
35620 : : {
35621 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35622 : 0 : _q40 = do_valueize (valueize, _q40);
35623 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35624 : 0 : _q41 = do_valueize (valueize, _q41);
35625 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35626 : 0 : _q42 = do_valueize (valueize, _q42);
35627 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35628 : 0 : _q43 = do_valueize (valueize, _q43);
35629 : 0 : if (tree_swap_operands_p (_q41, _q42))
35630 : 0 : std::swap (_q41, _q42);
35631 : 0 : {
35632 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35633 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MAX))
35634 : 0 : return true;
35635 : : }
35636 : : }
35637 : : break;
35638 : 0 : case CFN_COND_MIN:
35639 : 0 : if (gimple_call_num_args (_c1) == 4)
35640 : : {
35641 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35642 : 0 : _q40 = do_valueize (valueize, _q40);
35643 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35644 : 0 : _q41 = do_valueize (valueize, _q41);
35645 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35646 : 0 : _q42 = do_valueize (valueize, _q42);
35647 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35648 : 0 : _q43 = do_valueize (valueize, _q43);
35649 : 0 : if (tree_swap_operands_p (_q41, _q42))
35650 : 0 : std::swap (_q41, _q42);
35651 : 0 : {
35652 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35653 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MIN))
35654 : 0 : return true;
35655 : : }
35656 : : }
35657 : : break;
35658 : 0 : case CFN_COND_MOD:
35659 : 0 : if (gimple_call_num_args (_c1) == 4)
35660 : : {
35661 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35662 : 0 : _q40 = do_valueize (valueize, _q40);
35663 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35664 : 0 : _q41 = do_valueize (valueize, _q41);
35665 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35666 : 0 : _q42 = do_valueize (valueize, _q42);
35667 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35668 : 0 : _q43 = do_valueize (valueize, _q43);
35669 : 0 : {
35670 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35671 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MOD))
35672 : 0 : return true;
35673 : : }
35674 : : }
35675 : : break;
35676 : 27 : case CFN_COND_MUL:
35677 : 27 : if (gimple_call_num_args (_c1) == 4)
35678 : : {
35679 : 27 : tree _q40 = gimple_call_arg (_c1, 0);
35680 : 27 : _q40 = do_valueize (valueize, _q40);
35681 : 27 : tree _q41 = gimple_call_arg (_c1, 1);
35682 : 27 : _q41 = do_valueize (valueize, _q41);
35683 : 27 : tree _q42 = gimple_call_arg (_c1, 2);
35684 : 27 : _q42 = do_valueize (valueize, _q42);
35685 : 27 : tree _q43 = gimple_call_arg (_c1, 3);
35686 : 27 : _q43 = do_valueize (valueize, _q43);
35687 : 27 : if (tree_swap_operands_p (_q41, _q42))
35688 : 0 : std::swap (_q41, _q42);
35689 : 27 : {
35690 : 27 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35691 : 27 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_MUL))
35692 : 0 : return true;
35693 : : }
35694 : : }
35695 : : break;
35696 : 0 : case CFN_COND_SHL:
35697 : 0 : if (gimple_call_num_args (_c1) == 4)
35698 : : {
35699 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35700 : 0 : _q40 = do_valueize (valueize, _q40);
35701 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35702 : 0 : _q41 = do_valueize (valueize, _q41);
35703 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35704 : 0 : _q42 = do_valueize (valueize, _q42);
35705 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35706 : 0 : _q43 = do_valueize (valueize, _q43);
35707 : 0 : {
35708 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35709 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_SHL))
35710 : 0 : return true;
35711 : : }
35712 : : }
35713 : : break;
35714 : 0 : case CFN_COND_SHR:
35715 : 0 : if (gimple_call_num_args (_c1) == 4)
35716 : : {
35717 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35718 : 0 : _q40 = do_valueize (valueize, _q40);
35719 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35720 : 0 : _q41 = do_valueize (valueize, _q41);
35721 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35722 : 0 : _q42 = do_valueize (valueize, _q42);
35723 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35724 : 0 : _q43 = do_valueize (valueize, _q43);
35725 : 0 : {
35726 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35727 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_SHR))
35728 : 0 : return true;
35729 : : }
35730 : : }
35731 : : break;
35732 : 189 : case CFN_COND_SUB:
35733 : 189 : if (gimple_call_num_args (_c1) == 4)
35734 : : {
35735 : 189 : tree _q40 = gimple_call_arg (_c1, 0);
35736 : 189 : _q40 = do_valueize (valueize, _q40);
35737 : 189 : tree _q41 = gimple_call_arg (_c1, 1);
35738 : 189 : _q41 = do_valueize (valueize, _q41);
35739 : 189 : tree _q42 = gimple_call_arg (_c1, 2);
35740 : 189 : _q42 = do_valueize (valueize, _q42);
35741 : 189 : tree _q43 = gimple_call_arg (_c1, 3);
35742 : 189 : _q43 = do_valueize (valueize, _q43);
35743 : 189 : {
35744 : 189 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35745 : 189 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_SUB))
35746 : 0 : return true;
35747 : : }
35748 : : }
35749 : : break;
35750 : 1 : case CFN_COND_XOR:
35751 : 1 : if (gimple_call_num_args (_c1) == 4)
35752 : : {
35753 : 1 : tree _q40 = gimple_call_arg (_c1, 0);
35754 : 1 : _q40 = do_valueize (valueize, _q40);
35755 : 1 : tree _q41 = gimple_call_arg (_c1, 1);
35756 : 1 : _q41 = do_valueize (valueize, _q41);
35757 : 1 : tree _q42 = gimple_call_arg (_c1, 2);
35758 : 1 : _q42 = do_valueize (valueize, _q42);
35759 : 1 : tree _q43 = gimple_call_arg (_c1, 3);
35760 : 1 : _q43 = do_valueize (valueize, _q43);
35761 : 1 : if (tree_swap_operands_p (_q41, _q42))
35762 : 0 : std::swap (_q41, _q42);
35763 : 1 : {
35764 : 1 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35765 : 1 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_XOR))
35766 : 0 : return true;
35767 : : }
35768 : : }
35769 : : break;
35770 : 0 : case CFN_COND_COPYSIGN:
35771 : 0 : if (gimple_call_num_args (_c1) == 4)
35772 : : {
35773 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35774 : 0 : _q40 = do_valueize (valueize, _q40);
35775 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35776 : 0 : _q41 = do_valueize (valueize, _q41);
35777 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35778 : 0 : _q42 = do_valueize (valueize, _q42);
35779 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35780 : 0 : _q43 = do_valueize (valueize, _q43);
35781 : 0 : {
35782 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35783 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_COPYSIGN))
35784 : 0 : return true;
35785 : : }
35786 : : }
35787 : : break;
35788 : 0 : case CFN_COND_FMAX:
35789 : 0 : if (gimple_call_num_args (_c1) == 4)
35790 : : {
35791 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35792 : 0 : _q40 = do_valueize (valueize, _q40);
35793 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35794 : 0 : _q41 = do_valueize (valueize, _q41);
35795 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35796 : 0 : _q42 = do_valueize (valueize, _q42);
35797 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35798 : 0 : _q43 = do_valueize (valueize, _q43);
35799 : 0 : if (tree_swap_operands_p (_q41, _q42))
35800 : 0 : std::swap (_q41, _q42);
35801 : 0 : {
35802 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35803 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_FMAX))
35804 : 0 : return true;
35805 : : }
35806 : : }
35807 : : break;
35808 : 0 : case CFN_COND_FMIN:
35809 : 0 : if (gimple_call_num_args (_c1) == 4)
35810 : : {
35811 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
35812 : 0 : _q40 = do_valueize (valueize, _q40);
35813 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
35814 : 0 : _q41 = do_valueize (valueize, _q41);
35815 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
35816 : 0 : _q42 = do_valueize (valueize, _q42);
35817 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
35818 : 0 : _q43 = do_valueize (valueize, _q43);
35819 : 0 : if (tree_swap_operands_p (_q41, _q42))
35820 : 0 : std::swap (_q41, _q42);
35821 : 0 : {
35822 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35823 : 0 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_FMIN))
35824 : 0 : return true;
35825 : : }
35826 : : }
35827 : : break;
35828 : 88 : case CFN_COND_RDIV:
35829 : 88 : if (gimple_call_num_args (_c1) == 4)
35830 : : {
35831 : 88 : tree _q40 = gimple_call_arg (_c1, 0);
35832 : 88 : _q40 = do_valueize (valueize, _q40);
35833 : 88 : tree _q41 = gimple_call_arg (_c1, 1);
35834 : 88 : _q41 = do_valueize (valueize, _q41);
35835 : 88 : tree _q42 = gimple_call_arg (_c1, 2);
35836 : 88 : _q42 = do_valueize (valueize, _q42);
35837 : 88 : tree _q43 = gimple_call_arg (_c1, 3);
35838 : 88 : _q43 = do_valueize (valueize, _q43);
35839 : 88 : {
35840 : 88 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43 };
35841 : 88 : if (gimple_simplify_649 (res_op, seq, valueize, type, captures, CFN_COND_RDIV))
35842 : 0 : return true;
35843 : : }
35844 : : }
35845 : : break;
35846 : : default:;
35847 : : }
35848 : : }
35849 : : break;
35850 : 192992 : default:;
35851 : : }
35852 : 192992 : switch (TREE_CODE (_p1))
35853 : : {
35854 : 50202 : case SSA_NAME:
35855 : 50202 : if (gimple *_d1 = get_def (valueize, _p1))
35856 : : {
35857 : 44087 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
35858 : 54957 : switch (gimple_assign_rhs_code (_a1))
35859 : : {
35860 : 3534 : case VIEW_CONVERT_EXPR:
35861 : 3534 : {
35862 : 3534 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
35863 : 3534 : if ((TREE_CODE (_q30) == SSA_NAME
35864 : 3534 : || is_gimple_min_invariant (_q30)))
35865 : : {
35866 : 3534 : _q30 = do_valueize (valueize, _q30);
35867 : 3534 : switch (TREE_CODE (_q30))
35868 : : {
35869 : 3534 : case SSA_NAME:
35870 : 3534 : if (gimple *_d2 = get_def (valueize, _q30))
35871 : : {
35872 : 3433 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
35873 : 998 : switch (gimple_call_combined_fn (_c2))
35874 : : {
35875 : 0 : case CFN_COND_FMA:
35876 : 0 : if (gimple_call_num_args (_c2) == 5)
35877 : : {
35878 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
35879 : 0 : _q40 = do_valueize (valueize, _q40);
35880 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
35881 : 0 : _q41 = do_valueize (valueize, _q41);
35882 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
35883 : 0 : _q42 = do_valueize (valueize, _q42);
35884 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
35885 : 0 : _q43 = do_valueize (valueize, _q43);
35886 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
35887 : 0 : _q44 = do_valueize (valueize, _q44);
35888 : 0 : if (tree_swap_operands_p (_q41, _q42))
35889 : 0 : std::swap (_q41, _q42);
35890 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
35891 : : {
35892 : 0 : {
35893 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _p2 };
35894 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FMA))
35895 : 0 : return true;
35896 : : }
35897 : : }
35898 : : }
35899 : : break;
35900 : 0 : case CFN_COND_FMS:
35901 : 0 : if (gimple_call_num_args (_c2) == 5)
35902 : : {
35903 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
35904 : 0 : _q40 = do_valueize (valueize, _q40);
35905 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
35906 : 0 : _q41 = do_valueize (valueize, _q41);
35907 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
35908 : 0 : _q42 = do_valueize (valueize, _q42);
35909 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
35910 : 0 : _q43 = do_valueize (valueize, _q43);
35911 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
35912 : 0 : _q44 = do_valueize (valueize, _q44);
35913 : 0 : if (tree_swap_operands_p (_q41, _q42))
35914 : 0 : std::swap (_q41, _q42);
35915 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
35916 : : {
35917 : 0 : {
35918 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _p2 };
35919 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FMS))
35920 : 0 : return true;
35921 : : }
35922 : : }
35923 : : }
35924 : : break;
35925 : 0 : case CFN_COND_FNMA:
35926 : 0 : if (gimple_call_num_args (_c2) == 5)
35927 : : {
35928 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
35929 : 0 : _q40 = do_valueize (valueize, _q40);
35930 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
35931 : 0 : _q41 = do_valueize (valueize, _q41);
35932 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
35933 : 0 : _q42 = do_valueize (valueize, _q42);
35934 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
35935 : 0 : _q43 = do_valueize (valueize, _q43);
35936 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
35937 : 0 : _q44 = do_valueize (valueize, _q44);
35938 : 0 : if (tree_swap_operands_p (_q41, _q42))
35939 : 0 : std::swap (_q41, _q42);
35940 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
35941 : : {
35942 : 0 : {
35943 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _p2 };
35944 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FNMA))
35945 : 0 : return true;
35946 : : }
35947 : : }
35948 : : }
35949 : : break;
35950 : 0 : case CFN_COND_FNMS:
35951 : 0 : if (gimple_call_num_args (_c2) == 5)
35952 : : {
35953 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
35954 : 0 : _q40 = do_valueize (valueize, _q40);
35955 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
35956 : 0 : _q41 = do_valueize (valueize, _q41);
35957 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
35958 : 0 : _q42 = do_valueize (valueize, _q42);
35959 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
35960 : 0 : _q43 = do_valueize (valueize, _q43);
35961 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
35962 : 0 : _q44 = do_valueize (valueize, _q44);
35963 : 0 : if (tree_swap_operands_p (_q41, _q42))
35964 : 0 : std::swap (_q41, _q42);
35965 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
35966 : : {
35967 : 0 : {
35968 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _p2 };
35969 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FNMS))
35970 : 0 : return true;
35971 : : }
35972 : : }
35973 : : }
35974 : : break;
35975 : : default:;
35976 : : }
35977 : : }
35978 : : break;
35979 : : default:;
35980 : : }
35981 : : }
35982 : : break;
35983 : : }
35984 : : default:;
35985 : : }
35986 : 13389 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
35987 : 2772 : switch (gimple_call_combined_fn (_c1))
35988 : : {
35989 : 0 : case CFN_COND_FMA:
35990 : 0 : if (gimple_call_num_args (_c1) == 5)
35991 : : {
35992 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
35993 : 0 : _q30 = do_valueize (valueize, _q30);
35994 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
35995 : 0 : _q31 = do_valueize (valueize, _q31);
35996 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
35997 : 0 : _q32 = do_valueize (valueize, _q32);
35998 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
35999 : 0 : _q33 = do_valueize (valueize, _q33);
36000 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36001 : 0 : _q34 = do_valueize (valueize, _q34);
36002 : 0 : if (tree_swap_operands_p (_q31, _q32))
36003 : 0 : std::swap (_q31, _q32);
36004 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36005 : : {
36006 : 0 : {
36007 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _p2 };
36008 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FMA))
36009 : 0 : return true;
36010 : : }
36011 : : }
36012 : : }
36013 : : break;
36014 : 0 : case CFN_COND_FMS:
36015 : 0 : if (gimple_call_num_args (_c1) == 5)
36016 : : {
36017 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36018 : 0 : _q30 = do_valueize (valueize, _q30);
36019 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36020 : 0 : _q31 = do_valueize (valueize, _q31);
36021 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36022 : 0 : _q32 = do_valueize (valueize, _q32);
36023 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36024 : 0 : _q33 = do_valueize (valueize, _q33);
36025 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36026 : 0 : _q34 = do_valueize (valueize, _q34);
36027 : 0 : if (tree_swap_operands_p (_q31, _q32))
36028 : 0 : std::swap (_q31, _q32);
36029 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36030 : : {
36031 : 0 : {
36032 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _p2 };
36033 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FMS))
36034 : 0 : return true;
36035 : : }
36036 : : }
36037 : : }
36038 : : break;
36039 : 0 : case CFN_COND_FNMA:
36040 : 0 : if (gimple_call_num_args (_c1) == 5)
36041 : : {
36042 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36043 : 0 : _q30 = do_valueize (valueize, _q30);
36044 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36045 : 0 : _q31 = do_valueize (valueize, _q31);
36046 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36047 : 0 : _q32 = do_valueize (valueize, _q32);
36048 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36049 : 0 : _q33 = do_valueize (valueize, _q33);
36050 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36051 : 0 : _q34 = do_valueize (valueize, _q34);
36052 : 0 : if (tree_swap_operands_p (_q31, _q32))
36053 : 0 : std::swap (_q31, _q32);
36054 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36055 : : {
36056 : 0 : {
36057 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _p2 };
36058 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FNMA))
36059 : 0 : return true;
36060 : : }
36061 : : }
36062 : : }
36063 : : break;
36064 : 0 : case CFN_COND_FNMS:
36065 : 0 : if (gimple_call_num_args (_c1) == 5)
36066 : : {
36067 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36068 : 0 : _q30 = do_valueize (valueize, _q30);
36069 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36070 : 0 : _q31 = do_valueize (valueize, _q31);
36071 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36072 : 0 : _q32 = do_valueize (valueize, _q32);
36073 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36074 : 0 : _q33 = do_valueize (valueize, _q33);
36075 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36076 : 0 : _q34 = do_valueize (valueize, _q34);
36077 : 0 : if (tree_swap_operands_p (_q31, _q32))
36078 : 0 : std::swap (_q31, _q32);
36079 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36080 : : {
36081 : 0 : {
36082 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _p2 };
36083 : 0 : if (gimple_simplify_650 (res_op, seq, valueize, type, captures, CFN_COND_FNMS))
36084 : 0 : return true;
36085 : : }
36086 : : }
36087 : : }
36088 : : break;
36089 : : default:;
36090 : : }
36091 : : }
36092 : : break;
36093 : 192992 : default:;
36094 : : }
36095 : 192992 : switch (TREE_CODE (_p2))
36096 : : {
36097 : 42974 : case SSA_NAME:
36098 : 42974 : if (gimple *_d1 = get_def (valueize, _p2))
36099 : : {
36100 : 37303 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
36101 : 38599 : switch (gimple_assign_rhs_code (_a1))
36102 : : {
36103 : 4984 : case VIEW_CONVERT_EXPR:
36104 : 4984 : {
36105 : 4984 : tree _q40 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
36106 : 4984 : if ((TREE_CODE (_q40) == SSA_NAME
36107 : 4984 : || is_gimple_min_invariant (_q40)))
36108 : : {
36109 : 4984 : _q40 = do_valueize (valueize, _q40);
36110 : 4984 : switch (TREE_CODE (_q40))
36111 : : {
36112 : 4984 : case SSA_NAME:
36113 : 4984 : if (gimple *_d2 = get_def (valueize, _q40))
36114 : : {
36115 : 4928 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
36116 : 1217 : switch (gimple_call_combined_fn (_c2))
36117 : : {
36118 : 0 : case CFN_COND_FMA:
36119 : 0 : if (gimple_call_num_args (_c2) == 5)
36120 : : {
36121 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
36122 : 0 : _q50 = do_valueize (valueize, _q50);
36123 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
36124 : 0 : _q51 = do_valueize (valueize, _q51);
36125 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
36126 : 0 : _q52 = do_valueize (valueize, _q52);
36127 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
36128 : 0 : _q53 = do_valueize (valueize, _q53);
36129 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
36130 : 0 : _q54 = do_valueize (valueize, _q54);
36131 : 0 : if (tree_swap_operands_p (_q51, _q52))
36132 : 0 : std::swap (_q51, _q52);
36133 : 0 : {
36134 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54 };
36135 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FMA))
36136 : 0 : return true;
36137 : : }
36138 : : }
36139 : : break;
36140 : 0 : case CFN_COND_FMS:
36141 : 0 : if (gimple_call_num_args (_c2) == 5)
36142 : : {
36143 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
36144 : 0 : _q50 = do_valueize (valueize, _q50);
36145 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
36146 : 0 : _q51 = do_valueize (valueize, _q51);
36147 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
36148 : 0 : _q52 = do_valueize (valueize, _q52);
36149 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
36150 : 0 : _q53 = do_valueize (valueize, _q53);
36151 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
36152 : 0 : _q54 = do_valueize (valueize, _q54);
36153 : 0 : if (tree_swap_operands_p (_q51, _q52))
36154 : 0 : std::swap (_q51, _q52);
36155 : 0 : {
36156 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54 };
36157 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FMS))
36158 : 0 : return true;
36159 : : }
36160 : : }
36161 : : break;
36162 : 0 : case CFN_COND_FNMA:
36163 : 0 : if (gimple_call_num_args (_c2) == 5)
36164 : : {
36165 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
36166 : 0 : _q50 = do_valueize (valueize, _q50);
36167 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
36168 : 0 : _q51 = do_valueize (valueize, _q51);
36169 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
36170 : 0 : _q52 = do_valueize (valueize, _q52);
36171 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
36172 : 0 : _q53 = do_valueize (valueize, _q53);
36173 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
36174 : 0 : _q54 = do_valueize (valueize, _q54);
36175 : 0 : if (tree_swap_operands_p (_q51, _q52))
36176 : 0 : std::swap (_q51, _q52);
36177 : 0 : {
36178 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54 };
36179 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FNMA))
36180 : 0 : return true;
36181 : : }
36182 : : }
36183 : : break;
36184 : 0 : case CFN_COND_FNMS:
36185 : 0 : if (gimple_call_num_args (_c2) == 5)
36186 : : {
36187 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
36188 : 0 : _q50 = do_valueize (valueize, _q50);
36189 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
36190 : 0 : _q51 = do_valueize (valueize, _q51);
36191 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
36192 : 0 : _q52 = do_valueize (valueize, _q52);
36193 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
36194 : 0 : _q53 = do_valueize (valueize, _q53);
36195 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
36196 : 0 : _q54 = do_valueize (valueize, _q54);
36197 : 0 : if (tree_swap_operands_p (_q51, _q52))
36198 : 0 : std::swap (_q51, _q52);
36199 : 0 : {
36200 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54 };
36201 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FNMS))
36202 : 0 : return true;
36203 : : }
36204 : : }
36205 : : break;
36206 : : default:;
36207 : : }
36208 : : }
36209 : : break;
36210 : : default:;
36211 : : }
36212 : : }
36213 : : break;
36214 : : }
36215 : : default:;
36216 : : }
36217 : 12264 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
36218 : 2016 : switch (gimple_call_combined_fn (_c1))
36219 : : {
36220 : 0 : case CFN_COND_FMA:
36221 : 0 : if (gimple_call_num_args (_c1) == 5)
36222 : : {
36223 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
36224 : 0 : _q40 = do_valueize (valueize, _q40);
36225 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
36226 : 0 : _q41 = do_valueize (valueize, _q41);
36227 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
36228 : 0 : _q42 = do_valueize (valueize, _q42);
36229 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
36230 : 0 : _q43 = do_valueize (valueize, _q43);
36231 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
36232 : 0 : _q44 = do_valueize (valueize, _q44);
36233 : 0 : if (tree_swap_operands_p (_q41, _q42))
36234 : 0 : std::swap (_q41, _q42);
36235 : 0 : {
36236 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44 };
36237 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FMA))
36238 : 0 : return true;
36239 : : }
36240 : : }
36241 : : break;
36242 : 0 : case CFN_COND_FMS:
36243 : 0 : if (gimple_call_num_args (_c1) == 5)
36244 : : {
36245 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
36246 : 0 : _q40 = do_valueize (valueize, _q40);
36247 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
36248 : 0 : _q41 = do_valueize (valueize, _q41);
36249 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
36250 : 0 : _q42 = do_valueize (valueize, _q42);
36251 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
36252 : 0 : _q43 = do_valueize (valueize, _q43);
36253 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
36254 : 0 : _q44 = do_valueize (valueize, _q44);
36255 : 0 : if (tree_swap_operands_p (_q41, _q42))
36256 : 0 : std::swap (_q41, _q42);
36257 : 0 : {
36258 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44 };
36259 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FMS))
36260 : 0 : return true;
36261 : : }
36262 : : }
36263 : : break;
36264 : 0 : case CFN_COND_FNMA:
36265 : 0 : if (gimple_call_num_args (_c1) == 5)
36266 : : {
36267 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
36268 : 0 : _q40 = do_valueize (valueize, _q40);
36269 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
36270 : 0 : _q41 = do_valueize (valueize, _q41);
36271 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
36272 : 0 : _q42 = do_valueize (valueize, _q42);
36273 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
36274 : 0 : _q43 = do_valueize (valueize, _q43);
36275 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
36276 : 0 : _q44 = do_valueize (valueize, _q44);
36277 : 0 : if (tree_swap_operands_p (_q41, _q42))
36278 : 0 : std::swap (_q41, _q42);
36279 : 0 : {
36280 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44 };
36281 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FNMA))
36282 : 0 : return true;
36283 : : }
36284 : : }
36285 : : break;
36286 : 0 : case CFN_COND_FNMS:
36287 : 0 : if (gimple_call_num_args (_c1) == 5)
36288 : : {
36289 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
36290 : 0 : _q40 = do_valueize (valueize, _q40);
36291 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
36292 : 0 : _q41 = do_valueize (valueize, _q41);
36293 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
36294 : 0 : _q42 = do_valueize (valueize, _q42);
36295 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
36296 : 0 : _q43 = do_valueize (valueize, _q43);
36297 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
36298 : 0 : _q44 = do_valueize (valueize, _q44);
36299 : 0 : if (tree_swap_operands_p (_q41, _q42))
36300 : 0 : std::swap (_q41, _q42);
36301 : 0 : {
36302 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44 };
36303 : 0 : if (gimple_simplify_651 (res_op, seq, valueize, type, captures, CFN_COND_FNMS))
36304 : 0 : return true;
36305 : : }
36306 : : }
36307 : : break;
36308 : : default:;
36309 : : }
36310 : : }
36311 : : break;
36312 : 192992 : default:;
36313 : : }
36314 : 192992 : switch (TREE_CODE (_p1))
36315 : : {
36316 : 50202 : case SSA_NAME:
36317 : 50202 : if (gimple *_d1 = get_def (valueize, _p1))
36318 : : {
36319 : 44087 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
36320 : 54957 : switch (gimple_assign_rhs_code (_a1))
36321 : : {
36322 : 3534 : case VIEW_CONVERT_EXPR:
36323 : 3534 : {
36324 : 3534 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
36325 : 3534 : if ((TREE_CODE (_q30) == SSA_NAME
36326 : 3534 : || is_gimple_min_invariant (_q30)))
36327 : : {
36328 : 3534 : _q30 = do_valueize (valueize, _q30);
36329 : 3534 : switch (TREE_CODE (_q30))
36330 : : {
36331 : 3534 : case SSA_NAME:
36332 : 3534 : if (gimple *_d2 = get_def (valueize, _q30))
36333 : : {
36334 : 3433 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
36335 : 998 : switch (gimple_call_combined_fn (_c2))
36336 : : {
36337 : 0 : case CFN_COND_LEN_ADD:
36338 : 0 : if (gimple_call_num_args (_c2) == 6)
36339 : : {
36340 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36341 : 0 : _q40 = do_valueize (valueize, _q40);
36342 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36343 : 0 : _q41 = do_valueize (valueize, _q41);
36344 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36345 : 0 : _q42 = do_valueize (valueize, _q42);
36346 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36347 : 0 : _q43 = do_valueize (valueize, _q43);
36348 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36349 : 0 : _q44 = do_valueize (valueize, _q44);
36350 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36351 : 0 : _q45 = do_valueize (valueize, _q45);
36352 : 0 : if (tree_swap_operands_p (_q41, _q42))
36353 : 0 : std::swap (_q41, _q42);
36354 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36355 : : {
36356 : 0 : {
36357 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36358 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_ADD))
36359 : 0 : return true;
36360 : : }
36361 : : }
36362 : : }
36363 : : break;
36364 : 0 : case CFN_COND_LEN_AND:
36365 : 0 : if (gimple_call_num_args (_c2) == 6)
36366 : : {
36367 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36368 : 0 : _q40 = do_valueize (valueize, _q40);
36369 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36370 : 0 : _q41 = do_valueize (valueize, _q41);
36371 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36372 : 0 : _q42 = do_valueize (valueize, _q42);
36373 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36374 : 0 : _q43 = do_valueize (valueize, _q43);
36375 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36376 : 0 : _q44 = do_valueize (valueize, _q44);
36377 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36378 : 0 : _q45 = do_valueize (valueize, _q45);
36379 : 0 : if (tree_swap_operands_p (_q41, _q42))
36380 : 0 : std::swap (_q41, _q42);
36381 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36382 : : {
36383 : 0 : {
36384 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36385 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_AND))
36386 : 0 : return true;
36387 : : }
36388 : : }
36389 : : }
36390 : : break;
36391 : 0 : case CFN_COND_LEN_DIV:
36392 : 0 : if (gimple_call_num_args (_c2) == 6)
36393 : : {
36394 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36395 : 0 : _q40 = do_valueize (valueize, _q40);
36396 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36397 : 0 : _q41 = do_valueize (valueize, _q41);
36398 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36399 : 0 : _q42 = do_valueize (valueize, _q42);
36400 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36401 : 0 : _q43 = do_valueize (valueize, _q43);
36402 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36403 : 0 : _q44 = do_valueize (valueize, _q44);
36404 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36405 : 0 : _q45 = do_valueize (valueize, _q45);
36406 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36407 : : {
36408 : 0 : {
36409 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36410 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_DIV))
36411 : 0 : return true;
36412 : : }
36413 : : }
36414 : : }
36415 : : break;
36416 : 0 : case CFN_COND_LEN_IOR:
36417 : 0 : if (gimple_call_num_args (_c2) == 6)
36418 : : {
36419 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36420 : 0 : _q40 = do_valueize (valueize, _q40);
36421 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36422 : 0 : _q41 = do_valueize (valueize, _q41);
36423 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36424 : 0 : _q42 = do_valueize (valueize, _q42);
36425 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36426 : 0 : _q43 = do_valueize (valueize, _q43);
36427 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36428 : 0 : _q44 = do_valueize (valueize, _q44);
36429 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36430 : 0 : _q45 = do_valueize (valueize, _q45);
36431 : 0 : if (tree_swap_operands_p (_q41, _q42))
36432 : 0 : std::swap (_q41, _q42);
36433 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36434 : : {
36435 : 0 : {
36436 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36437 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_IOR))
36438 : 0 : return true;
36439 : : }
36440 : : }
36441 : : }
36442 : : break;
36443 : 0 : case CFN_COND_LEN_MAX:
36444 : 0 : if (gimple_call_num_args (_c2) == 6)
36445 : : {
36446 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36447 : 0 : _q40 = do_valueize (valueize, _q40);
36448 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36449 : 0 : _q41 = do_valueize (valueize, _q41);
36450 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36451 : 0 : _q42 = do_valueize (valueize, _q42);
36452 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36453 : 0 : _q43 = do_valueize (valueize, _q43);
36454 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36455 : 0 : _q44 = do_valueize (valueize, _q44);
36456 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36457 : 0 : _q45 = do_valueize (valueize, _q45);
36458 : 0 : if (tree_swap_operands_p (_q41, _q42))
36459 : 0 : std::swap (_q41, _q42);
36460 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36461 : : {
36462 : 0 : {
36463 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36464 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MAX))
36465 : 0 : return true;
36466 : : }
36467 : : }
36468 : : }
36469 : : break;
36470 : 0 : case CFN_COND_LEN_MIN:
36471 : 0 : if (gimple_call_num_args (_c2) == 6)
36472 : : {
36473 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36474 : 0 : _q40 = do_valueize (valueize, _q40);
36475 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36476 : 0 : _q41 = do_valueize (valueize, _q41);
36477 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36478 : 0 : _q42 = do_valueize (valueize, _q42);
36479 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36480 : 0 : _q43 = do_valueize (valueize, _q43);
36481 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36482 : 0 : _q44 = do_valueize (valueize, _q44);
36483 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36484 : 0 : _q45 = do_valueize (valueize, _q45);
36485 : 0 : if (tree_swap_operands_p (_q41, _q42))
36486 : 0 : std::swap (_q41, _q42);
36487 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36488 : : {
36489 : 0 : {
36490 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36491 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MIN))
36492 : 0 : return true;
36493 : : }
36494 : : }
36495 : : }
36496 : : break;
36497 : 0 : case CFN_COND_LEN_MOD:
36498 : 0 : if (gimple_call_num_args (_c2) == 6)
36499 : : {
36500 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36501 : 0 : _q40 = do_valueize (valueize, _q40);
36502 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36503 : 0 : _q41 = do_valueize (valueize, _q41);
36504 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36505 : 0 : _q42 = do_valueize (valueize, _q42);
36506 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36507 : 0 : _q43 = do_valueize (valueize, _q43);
36508 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36509 : 0 : _q44 = do_valueize (valueize, _q44);
36510 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36511 : 0 : _q45 = do_valueize (valueize, _q45);
36512 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36513 : : {
36514 : 0 : {
36515 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36516 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MOD))
36517 : 0 : return true;
36518 : : }
36519 : : }
36520 : : }
36521 : : break;
36522 : 0 : case CFN_COND_LEN_MUL:
36523 : 0 : if (gimple_call_num_args (_c2) == 6)
36524 : : {
36525 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36526 : 0 : _q40 = do_valueize (valueize, _q40);
36527 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36528 : 0 : _q41 = do_valueize (valueize, _q41);
36529 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36530 : 0 : _q42 = do_valueize (valueize, _q42);
36531 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36532 : 0 : _q43 = do_valueize (valueize, _q43);
36533 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36534 : 0 : _q44 = do_valueize (valueize, _q44);
36535 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36536 : 0 : _q45 = do_valueize (valueize, _q45);
36537 : 0 : if (tree_swap_operands_p (_q41, _q42))
36538 : 0 : std::swap (_q41, _q42);
36539 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36540 : : {
36541 : 0 : {
36542 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36543 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MUL))
36544 : 0 : return true;
36545 : : }
36546 : : }
36547 : : }
36548 : : break;
36549 : 0 : case CFN_COND_LEN_SHL:
36550 : 0 : if (gimple_call_num_args (_c2) == 6)
36551 : : {
36552 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36553 : 0 : _q40 = do_valueize (valueize, _q40);
36554 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36555 : 0 : _q41 = do_valueize (valueize, _q41);
36556 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36557 : 0 : _q42 = do_valueize (valueize, _q42);
36558 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36559 : 0 : _q43 = do_valueize (valueize, _q43);
36560 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36561 : 0 : _q44 = do_valueize (valueize, _q44);
36562 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36563 : 0 : _q45 = do_valueize (valueize, _q45);
36564 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36565 : : {
36566 : 0 : {
36567 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36568 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHL))
36569 : 0 : return true;
36570 : : }
36571 : : }
36572 : : }
36573 : : break;
36574 : 0 : case CFN_COND_LEN_SHR:
36575 : 0 : if (gimple_call_num_args (_c2) == 6)
36576 : : {
36577 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36578 : 0 : _q40 = do_valueize (valueize, _q40);
36579 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36580 : 0 : _q41 = do_valueize (valueize, _q41);
36581 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36582 : 0 : _q42 = do_valueize (valueize, _q42);
36583 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36584 : 0 : _q43 = do_valueize (valueize, _q43);
36585 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36586 : 0 : _q44 = do_valueize (valueize, _q44);
36587 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36588 : 0 : _q45 = do_valueize (valueize, _q45);
36589 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36590 : : {
36591 : 0 : {
36592 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36593 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHR))
36594 : 0 : return true;
36595 : : }
36596 : : }
36597 : : }
36598 : : break;
36599 : 0 : case CFN_COND_LEN_SUB:
36600 : 0 : if (gimple_call_num_args (_c2) == 6)
36601 : : {
36602 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36603 : 0 : _q40 = do_valueize (valueize, _q40);
36604 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36605 : 0 : _q41 = do_valueize (valueize, _q41);
36606 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36607 : 0 : _q42 = do_valueize (valueize, _q42);
36608 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36609 : 0 : _q43 = do_valueize (valueize, _q43);
36610 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36611 : 0 : _q44 = do_valueize (valueize, _q44);
36612 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36613 : 0 : _q45 = do_valueize (valueize, _q45);
36614 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36615 : : {
36616 : 0 : {
36617 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36618 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SUB))
36619 : 0 : return true;
36620 : : }
36621 : : }
36622 : : }
36623 : : break;
36624 : 0 : case CFN_COND_LEN_XOR:
36625 : 0 : if (gimple_call_num_args (_c2) == 6)
36626 : : {
36627 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36628 : 0 : _q40 = do_valueize (valueize, _q40);
36629 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36630 : 0 : _q41 = do_valueize (valueize, _q41);
36631 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36632 : 0 : _q42 = do_valueize (valueize, _q42);
36633 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36634 : 0 : _q43 = do_valueize (valueize, _q43);
36635 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36636 : 0 : _q44 = do_valueize (valueize, _q44);
36637 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36638 : 0 : _q45 = do_valueize (valueize, _q45);
36639 : 0 : if (tree_swap_operands_p (_q41, _q42))
36640 : 0 : std::swap (_q41, _q42);
36641 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36642 : : {
36643 : 0 : {
36644 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36645 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_XOR))
36646 : 0 : return true;
36647 : : }
36648 : : }
36649 : : }
36650 : : break;
36651 : 0 : case CFN_COND_LEN_FMAX:
36652 : 0 : if (gimple_call_num_args (_c2) == 6)
36653 : : {
36654 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36655 : 0 : _q40 = do_valueize (valueize, _q40);
36656 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36657 : 0 : _q41 = do_valueize (valueize, _q41);
36658 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36659 : 0 : _q42 = do_valueize (valueize, _q42);
36660 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36661 : 0 : _q43 = do_valueize (valueize, _q43);
36662 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36663 : 0 : _q44 = do_valueize (valueize, _q44);
36664 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36665 : 0 : _q45 = do_valueize (valueize, _q45);
36666 : 0 : if (tree_swap_operands_p (_q41, _q42))
36667 : 0 : std::swap (_q41, _q42);
36668 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36669 : : {
36670 : 0 : {
36671 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36672 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMAX))
36673 : 0 : return true;
36674 : : }
36675 : : }
36676 : : }
36677 : : break;
36678 : 0 : case CFN_COND_LEN_FMIN:
36679 : 0 : if (gimple_call_num_args (_c2) == 6)
36680 : : {
36681 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36682 : 0 : _q40 = do_valueize (valueize, _q40);
36683 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36684 : 0 : _q41 = do_valueize (valueize, _q41);
36685 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36686 : 0 : _q42 = do_valueize (valueize, _q42);
36687 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36688 : 0 : _q43 = do_valueize (valueize, _q43);
36689 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36690 : 0 : _q44 = do_valueize (valueize, _q44);
36691 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36692 : 0 : _q45 = do_valueize (valueize, _q45);
36693 : 0 : if (tree_swap_operands_p (_q41, _q42))
36694 : 0 : std::swap (_q41, _q42);
36695 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36696 : : {
36697 : 0 : {
36698 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36699 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMIN))
36700 : 0 : return true;
36701 : : }
36702 : : }
36703 : : }
36704 : : break;
36705 : 0 : case CFN_COND_LEN_RDIV:
36706 : 0 : if (gimple_call_num_args (_c2) == 6)
36707 : : {
36708 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36709 : 0 : _q40 = do_valueize (valueize, _q40);
36710 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36711 : 0 : _q41 = do_valueize (valueize, _q41);
36712 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36713 : 0 : _q42 = do_valueize (valueize, _q42);
36714 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36715 : 0 : _q43 = do_valueize (valueize, _q43);
36716 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36717 : 0 : _q44 = do_valueize (valueize, _q44);
36718 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36719 : 0 : _q45 = do_valueize (valueize, _q45);
36720 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36721 : : {
36722 : 0 : {
36723 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36724 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_RDIV))
36725 : 0 : return true;
36726 : : }
36727 : : }
36728 : : }
36729 : : break;
36730 : 0 : case CFN_COND_LEN_COPYSIGN:
36731 : 0 : if (gimple_call_num_args (_c2) == 6)
36732 : : {
36733 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
36734 : 0 : _q40 = do_valueize (valueize, _q40);
36735 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
36736 : 0 : _q41 = do_valueize (valueize, _q41);
36737 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
36738 : 0 : _q42 = do_valueize (valueize, _q42);
36739 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
36740 : 0 : _q43 = do_valueize (valueize, _q43);
36741 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
36742 : 0 : _q44 = do_valueize (valueize, _q44);
36743 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
36744 : 0 : _q45 = do_valueize (valueize, _q45);
36745 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
36746 : : {
36747 : 0 : {
36748 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _p2 };
36749 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_COPYSIGN))
36750 : 0 : return true;
36751 : : }
36752 : : }
36753 : : }
36754 : : break;
36755 : : default:;
36756 : : }
36757 : : }
36758 : : break;
36759 : : default:;
36760 : : }
36761 : : }
36762 : : break;
36763 : : }
36764 : : default:;
36765 : : }
36766 : 13389 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
36767 : 2772 : switch (gimple_call_combined_fn (_c1))
36768 : : {
36769 : 0 : case CFN_COND_LEN_ADD:
36770 : 0 : if (gimple_call_num_args (_c1) == 6)
36771 : : {
36772 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36773 : 0 : _q30 = do_valueize (valueize, _q30);
36774 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36775 : 0 : _q31 = do_valueize (valueize, _q31);
36776 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36777 : 0 : _q32 = do_valueize (valueize, _q32);
36778 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36779 : 0 : _q33 = do_valueize (valueize, _q33);
36780 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36781 : 0 : _q34 = do_valueize (valueize, _q34);
36782 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36783 : 0 : _q35 = do_valueize (valueize, _q35);
36784 : 0 : if (tree_swap_operands_p (_q31, _q32))
36785 : 0 : std::swap (_q31, _q32);
36786 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36787 : : {
36788 : 0 : {
36789 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36790 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_ADD))
36791 : 0 : return true;
36792 : : }
36793 : : }
36794 : : }
36795 : : break;
36796 : 0 : case CFN_COND_LEN_AND:
36797 : 0 : if (gimple_call_num_args (_c1) == 6)
36798 : : {
36799 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36800 : 0 : _q30 = do_valueize (valueize, _q30);
36801 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36802 : 0 : _q31 = do_valueize (valueize, _q31);
36803 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36804 : 0 : _q32 = do_valueize (valueize, _q32);
36805 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36806 : 0 : _q33 = do_valueize (valueize, _q33);
36807 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36808 : 0 : _q34 = do_valueize (valueize, _q34);
36809 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36810 : 0 : _q35 = do_valueize (valueize, _q35);
36811 : 0 : if (tree_swap_operands_p (_q31, _q32))
36812 : 0 : std::swap (_q31, _q32);
36813 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36814 : : {
36815 : 0 : {
36816 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36817 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_AND))
36818 : 0 : return true;
36819 : : }
36820 : : }
36821 : : }
36822 : : break;
36823 : 0 : case CFN_COND_LEN_DIV:
36824 : 0 : if (gimple_call_num_args (_c1) == 6)
36825 : : {
36826 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36827 : 0 : _q30 = do_valueize (valueize, _q30);
36828 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36829 : 0 : _q31 = do_valueize (valueize, _q31);
36830 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36831 : 0 : _q32 = do_valueize (valueize, _q32);
36832 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36833 : 0 : _q33 = do_valueize (valueize, _q33);
36834 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36835 : 0 : _q34 = do_valueize (valueize, _q34);
36836 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36837 : 0 : _q35 = do_valueize (valueize, _q35);
36838 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36839 : : {
36840 : 0 : {
36841 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36842 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_DIV))
36843 : 0 : return true;
36844 : : }
36845 : : }
36846 : : }
36847 : : break;
36848 : 0 : case CFN_COND_LEN_IOR:
36849 : 0 : if (gimple_call_num_args (_c1) == 6)
36850 : : {
36851 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36852 : 0 : _q30 = do_valueize (valueize, _q30);
36853 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36854 : 0 : _q31 = do_valueize (valueize, _q31);
36855 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36856 : 0 : _q32 = do_valueize (valueize, _q32);
36857 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36858 : 0 : _q33 = do_valueize (valueize, _q33);
36859 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36860 : 0 : _q34 = do_valueize (valueize, _q34);
36861 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36862 : 0 : _q35 = do_valueize (valueize, _q35);
36863 : 0 : if (tree_swap_operands_p (_q31, _q32))
36864 : 0 : std::swap (_q31, _q32);
36865 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36866 : : {
36867 : 0 : {
36868 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36869 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_IOR))
36870 : 0 : return true;
36871 : : }
36872 : : }
36873 : : }
36874 : : break;
36875 : 0 : case CFN_COND_LEN_MAX:
36876 : 0 : if (gimple_call_num_args (_c1) == 6)
36877 : : {
36878 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36879 : 0 : _q30 = do_valueize (valueize, _q30);
36880 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36881 : 0 : _q31 = do_valueize (valueize, _q31);
36882 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36883 : 0 : _q32 = do_valueize (valueize, _q32);
36884 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36885 : 0 : _q33 = do_valueize (valueize, _q33);
36886 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36887 : 0 : _q34 = do_valueize (valueize, _q34);
36888 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36889 : 0 : _q35 = do_valueize (valueize, _q35);
36890 : 0 : if (tree_swap_operands_p (_q31, _q32))
36891 : 0 : std::swap (_q31, _q32);
36892 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36893 : : {
36894 : 0 : {
36895 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36896 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MAX))
36897 : 0 : return true;
36898 : : }
36899 : : }
36900 : : }
36901 : : break;
36902 : 0 : case CFN_COND_LEN_MIN:
36903 : 0 : if (gimple_call_num_args (_c1) == 6)
36904 : : {
36905 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36906 : 0 : _q30 = do_valueize (valueize, _q30);
36907 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36908 : 0 : _q31 = do_valueize (valueize, _q31);
36909 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36910 : 0 : _q32 = do_valueize (valueize, _q32);
36911 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36912 : 0 : _q33 = do_valueize (valueize, _q33);
36913 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36914 : 0 : _q34 = do_valueize (valueize, _q34);
36915 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36916 : 0 : _q35 = do_valueize (valueize, _q35);
36917 : 0 : if (tree_swap_operands_p (_q31, _q32))
36918 : 0 : std::swap (_q31, _q32);
36919 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36920 : : {
36921 : 0 : {
36922 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36923 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MIN))
36924 : 0 : return true;
36925 : : }
36926 : : }
36927 : : }
36928 : : break;
36929 : 0 : case CFN_COND_LEN_MOD:
36930 : 0 : if (gimple_call_num_args (_c1) == 6)
36931 : : {
36932 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36933 : 0 : _q30 = do_valueize (valueize, _q30);
36934 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36935 : 0 : _q31 = do_valueize (valueize, _q31);
36936 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36937 : 0 : _q32 = do_valueize (valueize, _q32);
36938 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36939 : 0 : _q33 = do_valueize (valueize, _q33);
36940 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36941 : 0 : _q34 = do_valueize (valueize, _q34);
36942 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36943 : 0 : _q35 = do_valueize (valueize, _q35);
36944 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36945 : : {
36946 : 0 : {
36947 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36948 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MOD))
36949 : 0 : return true;
36950 : : }
36951 : : }
36952 : : }
36953 : : break;
36954 : 0 : case CFN_COND_LEN_MUL:
36955 : 0 : if (gimple_call_num_args (_c1) == 6)
36956 : : {
36957 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36958 : 0 : _q30 = do_valueize (valueize, _q30);
36959 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36960 : 0 : _q31 = do_valueize (valueize, _q31);
36961 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36962 : 0 : _q32 = do_valueize (valueize, _q32);
36963 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36964 : 0 : _q33 = do_valueize (valueize, _q33);
36965 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36966 : 0 : _q34 = do_valueize (valueize, _q34);
36967 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36968 : 0 : _q35 = do_valueize (valueize, _q35);
36969 : 0 : if (tree_swap_operands_p (_q31, _q32))
36970 : 0 : std::swap (_q31, _q32);
36971 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36972 : : {
36973 : 0 : {
36974 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
36975 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MUL))
36976 : 0 : return true;
36977 : : }
36978 : : }
36979 : : }
36980 : : break;
36981 : 0 : case CFN_COND_LEN_SHL:
36982 : 0 : if (gimple_call_num_args (_c1) == 6)
36983 : : {
36984 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
36985 : 0 : _q30 = do_valueize (valueize, _q30);
36986 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
36987 : 0 : _q31 = do_valueize (valueize, _q31);
36988 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
36989 : 0 : _q32 = do_valueize (valueize, _q32);
36990 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
36991 : 0 : _q33 = do_valueize (valueize, _q33);
36992 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
36993 : 0 : _q34 = do_valueize (valueize, _q34);
36994 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
36995 : 0 : _q35 = do_valueize (valueize, _q35);
36996 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
36997 : : {
36998 : 0 : {
36999 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37000 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHL))
37001 : 0 : return true;
37002 : : }
37003 : : }
37004 : : }
37005 : : break;
37006 : 0 : case CFN_COND_LEN_SHR:
37007 : 0 : if (gimple_call_num_args (_c1) == 6)
37008 : : {
37009 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
37010 : 0 : _q30 = do_valueize (valueize, _q30);
37011 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
37012 : 0 : _q31 = do_valueize (valueize, _q31);
37013 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
37014 : 0 : _q32 = do_valueize (valueize, _q32);
37015 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
37016 : 0 : _q33 = do_valueize (valueize, _q33);
37017 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
37018 : 0 : _q34 = do_valueize (valueize, _q34);
37019 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
37020 : 0 : _q35 = do_valueize (valueize, _q35);
37021 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
37022 : : {
37023 : 0 : {
37024 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37025 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHR))
37026 : 0 : return true;
37027 : : }
37028 : : }
37029 : : }
37030 : : break;
37031 : 0 : case CFN_COND_LEN_SUB:
37032 : 0 : if (gimple_call_num_args (_c1) == 6)
37033 : : {
37034 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
37035 : 0 : _q30 = do_valueize (valueize, _q30);
37036 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
37037 : 0 : _q31 = do_valueize (valueize, _q31);
37038 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
37039 : 0 : _q32 = do_valueize (valueize, _q32);
37040 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
37041 : 0 : _q33 = do_valueize (valueize, _q33);
37042 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
37043 : 0 : _q34 = do_valueize (valueize, _q34);
37044 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
37045 : 0 : _q35 = do_valueize (valueize, _q35);
37046 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
37047 : : {
37048 : 0 : {
37049 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37050 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SUB))
37051 : 0 : return true;
37052 : : }
37053 : : }
37054 : : }
37055 : : break;
37056 : 0 : case CFN_COND_LEN_XOR:
37057 : 0 : if (gimple_call_num_args (_c1) == 6)
37058 : : {
37059 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
37060 : 0 : _q30 = do_valueize (valueize, _q30);
37061 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
37062 : 0 : _q31 = do_valueize (valueize, _q31);
37063 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
37064 : 0 : _q32 = do_valueize (valueize, _q32);
37065 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
37066 : 0 : _q33 = do_valueize (valueize, _q33);
37067 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
37068 : 0 : _q34 = do_valueize (valueize, _q34);
37069 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
37070 : 0 : _q35 = do_valueize (valueize, _q35);
37071 : 0 : if (tree_swap_operands_p (_q31, _q32))
37072 : 0 : std::swap (_q31, _q32);
37073 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
37074 : : {
37075 : 0 : {
37076 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37077 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_XOR))
37078 : 0 : return true;
37079 : : }
37080 : : }
37081 : : }
37082 : : break;
37083 : 0 : case CFN_COND_LEN_FMAX:
37084 : 0 : if (gimple_call_num_args (_c1) == 6)
37085 : : {
37086 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
37087 : 0 : _q30 = do_valueize (valueize, _q30);
37088 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
37089 : 0 : _q31 = do_valueize (valueize, _q31);
37090 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
37091 : 0 : _q32 = do_valueize (valueize, _q32);
37092 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
37093 : 0 : _q33 = do_valueize (valueize, _q33);
37094 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
37095 : 0 : _q34 = do_valueize (valueize, _q34);
37096 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
37097 : 0 : _q35 = do_valueize (valueize, _q35);
37098 : 0 : if (tree_swap_operands_p (_q31, _q32))
37099 : 0 : std::swap (_q31, _q32);
37100 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
37101 : : {
37102 : 0 : {
37103 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37104 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMAX))
37105 : 0 : return true;
37106 : : }
37107 : : }
37108 : : }
37109 : : break;
37110 : 0 : case CFN_COND_LEN_FMIN:
37111 : 0 : if (gimple_call_num_args (_c1) == 6)
37112 : : {
37113 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
37114 : 0 : _q30 = do_valueize (valueize, _q30);
37115 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
37116 : 0 : _q31 = do_valueize (valueize, _q31);
37117 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
37118 : 0 : _q32 = do_valueize (valueize, _q32);
37119 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
37120 : 0 : _q33 = do_valueize (valueize, _q33);
37121 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
37122 : 0 : _q34 = do_valueize (valueize, _q34);
37123 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
37124 : 0 : _q35 = do_valueize (valueize, _q35);
37125 : 0 : if (tree_swap_operands_p (_q31, _q32))
37126 : 0 : std::swap (_q31, _q32);
37127 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
37128 : : {
37129 : 0 : {
37130 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37131 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMIN))
37132 : 0 : return true;
37133 : : }
37134 : : }
37135 : : }
37136 : : break;
37137 : 0 : case CFN_COND_LEN_RDIV:
37138 : 0 : if (gimple_call_num_args (_c1) == 6)
37139 : : {
37140 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
37141 : 0 : _q30 = do_valueize (valueize, _q30);
37142 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
37143 : 0 : _q31 = do_valueize (valueize, _q31);
37144 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
37145 : 0 : _q32 = do_valueize (valueize, _q32);
37146 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
37147 : 0 : _q33 = do_valueize (valueize, _q33);
37148 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
37149 : 0 : _q34 = do_valueize (valueize, _q34);
37150 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
37151 : 0 : _q35 = do_valueize (valueize, _q35);
37152 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
37153 : : {
37154 : 0 : {
37155 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37156 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_RDIV))
37157 : 0 : return true;
37158 : : }
37159 : : }
37160 : : }
37161 : : break;
37162 : 0 : case CFN_COND_LEN_COPYSIGN:
37163 : 0 : if (gimple_call_num_args (_c1) == 6)
37164 : : {
37165 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
37166 : 0 : _q30 = do_valueize (valueize, _q30);
37167 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
37168 : 0 : _q31 = do_valueize (valueize, _q31);
37169 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
37170 : 0 : _q32 = do_valueize (valueize, _q32);
37171 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
37172 : 0 : _q33 = do_valueize (valueize, _q33);
37173 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
37174 : 0 : _q34 = do_valueize (valueize, _q34);
37175 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
37176 : 0 : _q35 = do_valueize (valueize, _q35);
37177 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
37178 : : {
37179 : 0 : {
37180 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _p2 };
37181 : 0 : if (gimple_simplify_652 (res_op, seq, valueize, type, captures, CFN_COND_LEN_COPYSIGN))
37182 : 0 : return true;
37183 : : }
37184 : : }
37185 : : }
37186 : : break;
37187 : : default:;
37188 : : }
37189 : : }
37190 : : break;
37191 : 192992 : default:;
37192 : : }
37193 : 192992 : switch (TREE_CODE (_p2))
37194 : : {
37195 : 42974 : case SSA_NAME:
37196 : 42974 : if (gimple *_d1 = get_def (valueize, _p2))
37197 : : {
37198 : 37303 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
37199 : 38599 : switch (gimple_assign_rhs_code (_a1))
37200 : : {
37201 : 4984 : case VIEW_CONVERT_EXPR:
37202 : 4984 : {
37203 : 4984 : tree _q40 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
37204 : 4984 : if ((TREE_CODE (_q40) == SSA_NAME
37205 : 4984 : || is_gimple_min_invariant (_q40)))
37206 : : {
37207 : 4984 : _q40 = do_valueize (valueize, _q40);
37208 : 4984 : switch (TREE_CODE (_q40))
37209 : : {
37210 : 4984 : case SSA_NAME:
37211 : 4984 : if (gimple *_d2 = get_def (valueize, _q40))
37212 : : {
37213 : 4928 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
37214 : 1217 : switch (gimple_call_combined_fn (_c2))
37215 : : {
37216 : 0 : case CFN_COND_LEN_ADD:
37217 : 0 : if (gimple_call_num_args (_c2) == 6)
37218 : : {
37219 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37220 : 0 : _q50 = do_valueize (valueize, _q50);
37221 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37222 : 0 : _q51 = do_valueize (valueize, _q51);
37223 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37224 : 0 : _q52 = do_valueize (valueize, _q52);
37225 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37226 : 0 : _q53 = do_valueize (valueize, _q53);
37227 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37228 : 0 : _q54 = do_valueize (valueize, _q54);
37229 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37230 : 0 : _q55 = do_valueize (valueize, _q55);
37231 : 0 : if (tree_swap_operands_p (_q51, _q52))
37232 : 0 : std::swap (_q51, _q52);
37233 : 0 : {
37234 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37235 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_ADD))
37236 : 0 : return true;
37237 : : }
37238 : : }
37239 : : break;
37240 : 0 : case CFN_COND_LEN_AND:
37241 : 0 : if (gimple_call_num_args (_c2) == 6)
37242 : : {
37243 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37244 : 0 : _q50 = do_valueize (valueize, _q50);
37245 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37246 : 0 : _q51 = do_valueize (valueize, _q51);
37247 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37248 : 0 : _q52 = do_valueize (valueize, _q52);
37249 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37250 : 0 : _q53 = do_valueize (valueize, _q53);
37251 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37252 : 0 : _q54 = do_valueize (valueize, _q54);
37253 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37254 : 0 : _q55 = do_valueize (valueize, _q55);
37255 : 0 : if (tree_swap_operands_p (_q51, _q52))
37256 : 0 : std::swap (_q51, _q52);
37257 : 0 : {
37258 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37259 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_AND))
37260 : 0 : return true;
37261 : : }
37262 : : }
37263 : : break;
37264 : 0 : case CFN_COND_LEN_DIV:
37265 : 0 : if (gimple_call_num_args (_c2) == 6)
37266 : : {
37267 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37268 : 0 : _q50 = do_valueize (valueize, _q50);
37269 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37270 : 0 : _q51 = do_valueize (valueize, _q51);
37271 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37272 : 0 : _q52 = do_valueize (valueize, _q52);
37273 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37274 : 0 : _q53 = do_valueize (valueize, _q53);
37275 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37276 : 0 : _q54 = do_valueize (valueize, _q54);
37277 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37278 : 0 : _q55 = do_valueize (valueize, _q55);
37279 : 0 : {
37280 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37281 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_DIV))
37282 : 0 : return true;
37283 : : }
37284 : : }
37285 : : break;
37286 : 0 : case CFN_COND_LEN_IOR:
37287 : 0 : if (gimple_call_num_args (_c2) == 6)
37288 : : {
37289 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37290 : 0 : _q50 = do_valueize (valueize, _q50);
37291 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37292 : 0 : _q51 = do_valueize (valueize, _q51);
37293 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37294 : 0 : _q52 = do_valueize (valueize, _q52);
37295 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37296 : 0 : _q53 = do_valueize (valueize, _q53);
37297 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37298 : 0 : _q54 = do_valueize (valueize, _q54);
37299 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37300 : 0 : _q55 = do_valueize (valueize, _q55);
37301 : 0 : if (tree_swap_operands_p (_q51, _q52))
37302 : 0 : std::swap (_q51, _q52);
37303 : 0 : {
37304 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37305 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_IOR))
37306 : 0 : return true;
37307 : : }
37308 : : }
37309 : : break;
37310 : 0 : case CFN_COND_LEN_MAX:
37311 : 0 : if (gimple_call_num_args (_c2) == 6)
37312 : : {
37313 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37314 : 0 : _q50 = do_valueize (valueize, _q50);
37315 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37316 : 0 : _q51 = do_valueize (valueize, _q51);
37317 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37318 : 0 : _q52 = do_valueize (valueize, _q52);
37319 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37320 : 0 : _q53 = do_valueize (valueize, _q53);
37321 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37322 : 0 : _q54 = do_valueize (valueize, _q54);
37323 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37324 : 0 : _q55 = do_valueize (valueize, _q55);
37325 : 0 : if (tree_swap_operands_p (_q51, _q52))
37326 : 0 : std::swap (_q51, _q52);
37327 : 0 : {
37328 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37329 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MAX))
37330 : 0 : return true;
37331 : : }
37332 : : }
37333 : : break;
37334 : 0 : case CFN_COND_LEN_MIN:
37335 : 0 : if (gimple_call_num_args (_c2) == 6)
37336 : : {
37337 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37338 : 0 : _q50 = do_valueize (valueize, _q50);
37339 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37340 : 0 : _q51 = do_valueize (valueize, _q51);
37341 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37342 : 0 : _q52 = do_valueize (valueize, _q52);
37343 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37344 : 0 : _q53 = do_valueize (valueize, _q53);
37345 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37346 : 0 : _q54 = do_valueize (valueize, _q54);
37347 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37348 : 0 : _q55 = do_valueize (valueize, _q55);
37349 : 0 : if (tree_swap_operands_p (_q51, _q52))
37350 : 0 : std::swap (_q51, _q52);
37351 : 0 : {
37352 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37353 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MIN))
37354 : 0 : return true;
37355 : : }
37356 : : }
37357 : : break;
37358 : 0 : case CFN_COND_LEN_MOD:
37359 : 0 : if (gimple_call_num_args (_c2) == 6)
37360 : : {
37361 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37362 : 0 : _q50 = do_valueize (valueize, _q50);
37363 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37364 : 0 : _q51 = do_valueize (valueize, _q51);
37365 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37366 : 0 : _q52 = do_valueize (valueize, _q52);
37367 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37368 : 0 : _q53 = do_valueize (valueize, _q53);
37369 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37370 : 0 : _q54 = do_valueize (valueize, _q54);
37371 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37372 : 0 : _q55 = do_valueize (valueize, _q55);
37373 : 0 : {
37374 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37375 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MOD))
37376 : 0 : return true;
37377 : : }
37378 : : }
37379 : : break;
37380 : 0 : case CFN_COND_LEN_MUL:
37381 : 0 : if (gimple_call_num_args (_c2) == 6)
37382 : : {
37383 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37384 : 0 : _q50 = do_valueize (valueize, _q50);
37385 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37386 : 0 : _q51 = do_valueize (valueize, _q51);
37387 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37388 : 0 : _q52 = do_valueize (valueize, _q52);
37389 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37390 : 0 : _q53 = do_valueize (valueize, _q53);
37391 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37392 : 0 : _q54 = do_valueize (valueize, _q54);
37393 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37394 : 0 : _q55 = do_valueize (valueize, _q55);
37395 : 0 : if (tree_swap_operands_p (_q51, _q52))
37396 : 0 : std::swap (_q51, _q52);
37397 : 0 : {
37398 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37399 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MUL))
37400 : 0 : return true;
37401 : : }
37402 : : }
37403 : : break;
37404 : 0 : case CFN_COND_LEN_SHL:
37405 : 0 : if (gimple_call_num_args (_c2) == 6)
37406 : : {
37407 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37408 : 0 : _q50 = do_valueize (valueize, _q50);
37409 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37410 : 0 : _q51 = do_valueize (valueize, _q51);
37411 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37412 : 0 : _q52 = do_valueize (valueize, _q52);
37413 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37414 : 0 : _q53 = do_valueize (valueize, _q53);
37415 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37416 : 0 : _q54 = do_valueize (valueize, _q54);
37417 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37418 : 0 : _q55 = do_valueize (valueize, _q55);
37419 : 0 : {
37420 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37421 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHL))
37422 : 0 : return true;
37423 : : }
37424 : : }
37425 : : break;
37426 : 0 : case CFN_COND_LEN_SHR:
37427 : 0 : if (gimple_call_num_args (_c2) == 6)
37428 : : {
37429 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37430 : 0 : _q50 = do_valueize (valueize, _q50);
37431 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37432 : 0 : _q51 = do_valueize (valueize, _q51);
37433 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37434 : 0 : _q52 = do_valueize (valueize, _q52);
37435 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37436 : 0 : _q53 = do_valueize (valueize, _q53);
37437 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37438 : 0 : _q54 = do_valueize (valueize, _q54);
37439 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37440 : 0 : _q55 = do_valueize (valueize, _q55);
37441 : 0 : {
37442 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37443 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHR))
37444 : 0 : return true;
37445 : : }
37446 : : }
37447 : : break;
37448 : 0 : case CFN_COND_LEN_SUB:
37449 : 0 : if (gimple_call_num_args (_c2) == 6)
37450 : : {
37451 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37452 : 0 : _q50 = do_valueize (valueize, _q50);
37453 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37454 : 0 : _q51 = do_valueize (valueize, _q51);
37455 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37456 : 0 : _q52 = do_valueize (valueize, _q52);
37457 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37458 : 0 : _q53 = do_valueize (valueize, _q53);
37459 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37460 : 0 : _q54 = do_valueize (valueize, _q54);
37461 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37462 : 0 : _q55 = do_valueize (valueize, _q55);
37463 : 0 : {
37464 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37465 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SUB))
37466 : 0 : return true;
37467 : : }
37468 : : }
37469 : : break;
37470 : 0 : case CFN_COND_LEN_XOR:
37471 : 0 : if (gimple_call_num_args (_c2) == 6)
37472 : : {
37473 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37474 : 0 : _q50 = do_valueize (valueize, _q50);
37475 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37476 : 0 : _q51 = do_valueize (valueize, _q51);
37477 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37478 : 0 : _q52 = do_valueize (valueize, _q52);
37479 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37480 : 0 : _q53 = do_valueize (valueize, _q53);
37481 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37482 : 0 : _q54 = do_valueize (valueize, _q54);
37483 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37484 : 0 : _q55 = do_valueize (valueize, _q55);
37485 : 0 : if (tree_swap_operands_p (_q51, _q52))
37486 : 0 : std::swap (_q51, _q52);
37487 : 0 : {
37488 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37489 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_XOR))
37490 : 0 : return true;
37491 : : }
37492 : : }
37493 : : break;
37494 : 0 : case CFN_COND_LEN_FMAX:
37495 : 0 : if (gimple_call_num_args (_c2) == 6)
37496 : : {
37497 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37498 : 0 : _q50 = do_valueize (valueize, _q50);
37499 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37500 : 0 : _q51 = do_valueize (valueize, _q51);
37501 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37502 : 0 : _q52 = do_valueize (valueize, _q52);
37503 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37504 : 0 : _q53 = do_valueize (valueize, _q53);
37505 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37506 : 0 : _q54 = do_valueize (valueize, _q54);
37507 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37508 : 0 : _q55 = do_valueize (valueize, _q55);
37509 : 0 : if (tree_swap_operands_p (_q51, _q52))
37510 : 0 : std::swap (_q51, _q52);
37511 : 0 : {
37512 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37513 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMAX))
37514 : 0 : return true;
37515 : : }
37516 : : }
37517 : : break;
37518 : 0 : case CFN_COND_LEN_FMIN:
37519 : 0 : if (gimple_call_num_args (_c2) == 6)
37520 : : {
37521 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37522 : 0 : _q50 = do_valueize (valueize, _q50);
37523 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37524 : 0 : _q51 = do_valueize (valueize, _q51);
37525 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37526 : 0 : _q52 = do_valueize (valueize, _q52);
37527 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37528 : 0 : _q53 = do_valueize (valueize, _q53);
37529 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37530 : 0 : _q54 = do_valueize (valueize, _q54);
37531 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37532 : 0 : _q55 = do_valueize (valueize, _q55);
37533 : 0 : if (tree_swap_operands_p (_q51, _q52))
37534 : 0 : std::swap (_q51, _q52);
37535 : 0 : {
37536 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37537 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMIN))
37538 : 0 : return true;
37539 : : }
37540 : : }
37541 : : break;
37542 : 0 : case CFN_COND_LEN_RDIV:
37543 : 0 : if (gimple_call_num_args (_c2) == 6)
37544 : : {
37545 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37546 : 0 : _q50 = do_valueize (valueize, _q50);
37547 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37548 : 0 : _q51 = do_valueize (valueize, _q51);
37549 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37550 : 0 : _q52 = do_valueize (valueize, _q52);
37551 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37552 : 0 : _q53 = do_valueize (valueize, _q53);
37553 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37554 : 0 : _q54 = do_valueize (valueize, _q54);
37555 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37556 : 0 : _q55 = do_valueize (valueize, _q55);
37557 : 0 : {
37558 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37559 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_RDIV))
37560 : 0 : return true;
37561 : : }
37562 : : }
37563 : : break;
37564 : 0 : case CFN_COND_LEN_COPYSIGN:
37565 : 0 : if (gimple_call_num_args (_c2) == 6)
37566 : : {
37567 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
37568 : 0 : _q50 = do_valueize (valueize, _q50);
37569 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
37570 : 0 : _q51 = do_valueize (valueize, _q51);
37571 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
37572 : 0 : _q52 = do_valueize (valueize, _q52);
37573 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
37574 : 0 : _q53 = do_valueize (valueize, _q53);
37575 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
37576 : 0 : _q54 = do_valueize (valueize, _q54);
37577 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
37578 : 0 : _q55 = do_valueize (valueize, _q55);
37579 : 0 : {
37580 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55 };
37581 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_COPYSIGN))
37582 : 0 : return true;
37583 : : }
37584 : : }
37585 : : break;
37586 : : default:;
37587 : : }
37588 : : }
37589 : : break;
37590 : : default:;
37591 : : }
37592 : : }
37593 : : break;
37594 : : }
37595 : : default:;
37596 : : }
37597 : 12264 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
37598 : 2016 : switch (gimple_call_combined_fn (_c1))
37599 : : {
37600 : 0 : case CFN_COND_LEN_ADD:
37601 : 0 : if (gimple_call_num_args (_c1) == 6)
37602 : : {
37603 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37604 : 0 : _q40 = do_valueize (valueize, _q40);
37605 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37606 : 0 : _q41 = do_valueize (valueize, _q41);
37607 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37608 : 0 : _q42 = do_valueize (valueize, _q42);
37609 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37610 : 0 : _q43 = do_valueize (valueize, _q43);
37611 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37612 : 0 : _q44 = do_valueize (valueize, _q44);
37613 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37614 : 0 : _q45 = do_valueize (valueize, _q45);
37615 : 0 : if (tree_swap_operands_p (_q41, _q42))
37616 : 0 : std::swap (_q41, _q42);
37617 : 0 : {
37618 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37619 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_ADD))
37620 : 0 : return true;
37621 : : }
37622 : : }
37623 : : break;
37624 : 0 : case CFN_COND_LEN_AND:
37625 : 0 : if (gimple_call_num_args (_c1) == 6)
37626 : : {
37627 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37628 : 0 : _q40 = do_valueize (valueize, _q40);
37629 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37630 : 0 : _q41 = do_valueize (valueize, _q41);
37631 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37632 : 0 : _q42 = do_valueize (valueize, _q42);
37633 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37634 : 0 : _q43 = do_valueize (valueize, _q43);
37635 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37636 : 0 : _q44 = do_valueize (valueize, _q44);
37637 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37638 : 0 : _q45 = do_valueize (valueize, _q45);
37639 : 0 : if (tree_swap_operands_p (_q41, _q42))
37640 : 0 : std::swap (_q41, _q42);
37641 : 0 : {
37642 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37643 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_AND))
37644 : 0 : return true;
37645 : : }
37646 : : }
37647 : : break;
37648 : 0 : case CFN_COND_LEN_DIV:
37649 : 0 : if (gimple_call_num_args (_c1) == 6)
37650 : : {
37651 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37652 : 0 : _q40 = do_valueize (valueize, _q40);
37653 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37654 : 0 : _q41 = do_valueize (valueize, _q41);
37655 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37656 : 0 : _q42 = do_valueize (valueize, _q42);
37657 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37658 : 0 : _q43 = do_valueize (valueize, _q43);
37659 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37660 : 0 : _q44 = do_valueize (valueize, _q44);
37661 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37662 : 0 : _q45 = do_valueize (valueize, _q45);
37663 : 0 : {
37664 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37665 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_DIV))
37666 : 0 : return true;
37667 : : }
37668 : : }
37669 : : break;
37670 : 0 : case CFN_COND_LEN_IOR:
37671 : 0 : if (gimple_call_num_args (_c1) == 6)
37672 : : {
37673 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37674 : 0 : _q40 = do_valueize (valueize, _q40);
37675 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37676 : 0 : _q41 = do_valueize (valueize, _q41);
37677 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37678 : 0 : _q42 = do_valueize (valueize, _q42);
37679 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37680 : 0 : _q43 = do_valueize (valueize, _q43);
37681 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37682 : 0 : _q44 = do_valueize (valueize, _q44);
37683 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37684 : 0 : _q45 = do_valueize (valueize, _q45);
37685 : 0 : if (tree_swap_operands_p (_q41, _q42))
37686 : 0 : std::swap (_q41, _q42);
37687 : 0 : {
37688 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37689 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_IOR))
37690 : 0 : return true;
37691 : : }
37692 : : }
37693 : : break;
37694 : 0 : case CFN_COND_LEN_MAX:
37695 : 0 : if (gimple_call_num_args (_c1) == 6)
37696 : : {
37697 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37698 : 0 : _q40 = do_valueize (valueize, _q40);
37699 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37700 : 0 : _q41 = do_valueize (valueize, _q41);
37701 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37702 : 0 : _q42 = do_valueize (valueize, _q42);
37703 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37704 : 0 : _q43 = do_valueize (valueize, _q43);
37705 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37706 : 0 : _q44 = do_valueize (valueize, _q44);
37707 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37708 : 0 : _q45 = do_valueize (valueize, _q45);
37709 : 0 : if (tree_swap_operands_p (_q41, _q42))
37710 : 0 : std::swap (_q41, _q42);
37711 : 0 : {
37712 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37713 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MAX))
37714 : 0 : return true;
37715 : : }
37716 : : }
37717 : : break;
37718 : 0 : case CFN_COND_LEN_MIN:
37719 : 0 : if (gimple_call_num_args (_c1) == 6)
37720 : : {
37721 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37722 : 0 : _q40 = do_valueize (valueize, _q40);
37723 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37724 : 0 : _q41 = do_valueize (valueize, _q41);
37725 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37726 : 0 : _q42 = do_valueize (valueize, _q42);
37727 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37728 : 0 : _q43 = do_valueize (valueize, _q43);
37729 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37730 : 0 : _q44 = do_valueize (valueize, _q44);
37731 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37732 : 0 : _q45 = do_valueize (valueize, _q45);
37733 : 0 : if (tree_swap_operands_p (_q41, _q42))
37734 : 0 : std::swap (_q41, _q42);
37735 : 0 : {
37736 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37737 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MIN))
37738 : 0 : return true;
37739 : : }
37740 : : }
37741 : : break;
37742 : 0 : case CFN_COND_LEN_MOD:
37743 : 0 : if (gimple_call_num_args (_c1) == 6)
37744 : : {
37745 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37746 : 0 : _q40 = do_valueize (valueize, _q40);
37747 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37748 : 0 : _q41 = do_valueize (valueize, _q41);
37749 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37750 : 0 : _q42 = do_valueize (valueize, _q42);
37751 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37752 : 0 : _q43 = do_valueize (valueize, _q43);
37753 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37754 : 0 : _q44 = do_valueize (valueize, _q44);
37755 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37756 : 0 : _q45 = do_valueize (valueize, _q45);
37757 : 0 : {
37758 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37759 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MOD))
37760 : 0 : return true;
37761 : : }
37762 : : }
37763 : : break;
37764 : 0 : case CFN_COND_LEN_MUL:
37765 : 0 : if (gimple_call_num_args (_c1) == 6)
37766 : : {
37767 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37768 : 0 : _q40 = do_valueize (valueize, _q40);
37769 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37770 : 0 : _q41 = do_valueize (valueize, _q41);
37771 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37772 : 0 : _q42 = do_valueize (valueize, _q42);
37773 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37774 : 0 : _q43 = do_valueize (valueize, _q43);
37775 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37776 : 0 : _q44 = do_valueize (valueize, _q44);
37777 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37778 : 0 : _q45 = do_valueize (valueize, _q45);
37779 : 0 : if (tree_swap_operands_p (_q41, _q42))
37780 : 0 : std::swap (_q41, _q42);
37781 : 0 : {
37782 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37783 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_MUL))
37784 : 0 : return true;
37785 : : }
37786 : : }
37787 : : break;
37788 : 0 : case CFN_COND_LEN_SHL:
37789 : 0 : if (gimple_call_num_args (_c1) == 6)
37790 : : {
37791 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37792 : 0 : _q40 = do_valueize (valueize, _q40);
37793 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37794 : 0 : _q41 = do_valueize (valueize, _q41);
37795 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37796 : 0 : _q42 = do_valueize (valueize, _q42);
37797 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37798 : 0 : _q43 = do_valueize (valueize, _q43);
37799 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37800 : 0 : _q44 = do_valueize (valueize, _q44);
37801 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37802 : 0 : _q45 = do_valueize (valueize, _q45);
37803 : 0 : {
37804 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37805 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHL))
37806 : 0 : return true;
37807 : : }
37808 : : }
37809 : : break;
37810 : 0 : case CFN_COND_LEN_SHR:
37811 : 0 : if (gimple_call_num_args (_c1) == 6)
37812 : : {
37813 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37814 : 0 : _q40 = do_valueize (valueize, _q40);
37815 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37816 : 0 : _q41 = do_valueize (valueize, _q41);
37817 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37818 : 0 : _q42 = do_valueize (valueize, _q42);
37819 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37820 : 0 : _q43 = do_valueize (valueize, _q43);
37821 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37822 : 0 : _q44 = do_valueize (valueize, _q44);
37823 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37824 : 0 : _q45 = do_valueize (valueize, _q45);
37825 : 0 : {
37826 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37827 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SHR))
37828 : 0 : return true;
37829 : : }
37830 : : }
37831 : : break;
37832 : 0 : case CFN_COND_LEN_SUB:
37833 : 0 : if (gimple_call_num_args (_c1) == 6)
37834 : : {
37835 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37836 : 0 : _q40 = do_valueize (valueize, _q40);
37837 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37838 : 0 : _q41 = do_valueize (valueize, _q41);
37839 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37840 : 0 : _q42 = do_valueize (valueize, _q42);
37841 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37842 : 0 : _q43 = do_valueize (valueize, _q43);
37843 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37844 : 0 : _q44 = do_valueize (valueize, _q44);
37845 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37846 : 0 : _q45 = do_valueize (valueize, _q45);
37847 : 0 : {
37848 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37849 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_SUB))
37850 : 0 : return true;
37851 : : }
37852 : : }
37853 : : break;
37854 : 0 : case CFN_COND_LEN_XOR:
37855 : 0 : if (gimple_call_num_args (_c1) == 6)
37856 : : {
37857 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37858 : 0 : _q40 = do_valueize (valueize, _q40);
37859 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37860 : 0 : _q41 = do_valueize (valueize, _q41);
37861 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37862 : 0 : _q42 = do_valueize (valueize, _q42);
37863 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37864 : 0 : _q43 = do_valueize (valueize, _q43);
37865 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37866 : 0 : _q44 = do_valueize (valueize, _q44);
37867 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37868 : 0 : _q45 = do_valueize (valueize, _q45);
37869 : 0 : if (tree_swap_operands_p (_q41, _q42))
37870 : 0 : std::swap (_q41, _q42);
37871 : 0 : {
37872 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37873 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_XOR))
37874 : 0 : return true;
37875 : : }
37876 : : }
37877 : : break;
37878 : 0 : case CFN_COND_LEN_FMAX:
37879 : 0 : if (gimple_call_num_args (_c1) == 6)
37880 : : {
37881 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37882 : 0 : _q40 = do_valueize (valueize, _q40);
37883 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37884 : 0 : _q41 = do_valueize (valueize, _q41);
37885 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37886 : 0 : _q42 = do_valueize (valueize, _q42);
37887 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37888 : 0 : _q43 = do_valueize (valueize, _q43);
37889 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37890 : 0 : _q44 = do_valueize (valueize, _q44);
37891 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37892 : 0 : _q45 = do_valueize (valueize, _q45);
37893 : 0 : if (tree_swap_operands_p (_q41, _q42))
37894 : 0 : std::swap (_q41, _q42);
37895 : 0 : {
37896 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37897 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMAX))
37898 : 0 : return true;
37899 : : }
37900 : : }
37901 : : break;
37902 : 0 : case CFN_COND_LEN_FMIN:
37903 : 0 : if (gimple_call_num_args (_c1) == 6)
37904 : : {
37905 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37906 : 0 : _q40 = do_valueize (valueize, _q40);
37907 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37908 : 0 : _q41 = do_valueize (valueize, _q41);
37909 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37910 : 0 : _q42 = do_valueize (valueize, _q42);
37911 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37912 : 0 : _q43 = do_valueize (valueize, _q43);
37913 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37914 : 0 : _q44 = do_valueize (valueize, _q44);
37915 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37916 : 0 : _q45 = do_valueize (valueize, _q45);
37917 : 0 : if (tree_swap_operands_p (_q41, _q42))
37918 : 0 : std::swap (_q41, _q42);
37919 : 0 : {
37920 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37921 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMIN))
37922 : 0 : return true;
37923 : : }
37924 : : }
37925 : : break;
37926 : 0 : case CFN_COND_LEN_RDIV:
37927 : 0 : if (gimple_call_num_args (_c1) == 6)
37928 : : {
37929 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37930 : 0 : _q40 = do_valueize (valueize, _q40);
37931 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37932 : 0 : _q41 = do_valueize (valueize, _q41);
37933 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37934 : 0 : _q42 = do_valueize (valueize, _q42);
37935 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37936 : 0 : _q43 = do_valueize (valueize, _q43);
37937 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37938 : 0 : _q44 = do_valueize (valueize, _q44);
37939 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37940 : 0 : _q45 = do_valueize (valueize, _q45);
37941 : 0 : {
37942 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37943 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_RDIV))
37944 : 0 : return true;
37945 : : }
37946 : : }
37947 : : break;
37948 : 0 : case CFN_COND_LEN_COPYSIGN:
37949 : 0 : if (gimple_call_num_args (_c1) == 6)
37950 : : {
37951 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
37952 : 0 : _q40 = do_valueize (valueize, _q40);
37953 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
37954 : 0 : _q41 = do_valueize (valueize, _q41);
37955 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
37956 : 0 : _q42 = do_valueize (valueize, _q42);
37957 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
37958 : 0 : _q43 = do_valueize (valueize, _q43);
37959 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
37960 : 0 : _q44 = do_valueize (valueize, _q44);
37961 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
37962 : 0 : _q45 = do_valueize (valueize, _q45);
37963 : 0 : {
37964 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45 };
37965 : 0 : if (gimple_simplify_653 (res_op, seq, valueize, type, captures, CFN_COND_LEN_COPYSIGN))
37966 : 0 : return true;
37967 : : }
37968 : : }
37969 : : break;
37970 : : default:;
37971 : : }
37972 : : }
37973 : : break;
37974 : 192992 : default:;
37975 : : }
37976 : 192992 : switch (TREE_CODE (_p1))
37977 : : {
37978 : 50202 : case SSA_NAME:
37979 : 50202 : if (gimple *_d1 = get_def (valueize, _p1))
37980 : : {
37981 : 44087 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
37982 : 54957 : switch (gimple_assign_rhs_code (_a1))
37983 : : {
37984 : 3534 : case VIEW_CONVERT_EXPR:
37985 : 3534 : {
37986 : 3534 : tree _q30 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
37987 : 3534 : if ((TREE_CODE (_q30) == SSA_NAME
37988 : 3534 : || is_gimple_min_invariant (_q30)))
37989 : : {
37990 : 3534 : _q30 = do_valueize (valueize, _q30);
37991 : 3534 : switch (TREE_CODE (_q30))
37992 : : {
37993 : 3534 : case SSA_NAME:
37994 : 3534 : if (gimple *_d2 = get_def (valueize, _q30))
37995 : : {
37996 : 3433 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
37997 : 998 : switch (gimple_call_combined_fn (_c2))
37998 : : {
37999 : 0 : case CFN_COND_LEN_FMA:
38000 : 0 : if (gimple_call_num_args (_c2) == 7)
38001 : : {
38002 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
38003 : 0 : _q40 = do_valueize (valueize, _q40);
38004 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
38005 : 0 : _q41 = do_valueize (valueize, _q41);
38006 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
38007 : 0 : _q42 = do_valueize (valueize, _q42);
38008 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
38009 : 0 : _q43 = do_valueize (valueize, _q43);
38010 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
38011 : 0 : _q44 = do_valueize (valueize, _q44);
38012 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
38013 : 0 : _q45 = do_valueize (valueize, _q45);
38014 : 0 : tree _q46 = gimple_call_arg (_c2, 6);
38015 : 0 : _q46 = do_valueize (valueize, _q46);
38016 : 0 : if (tree_swap_operands_p (_q41, _q42))
38017 : 0 : std::swap (_q41, _q42);
38018 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
38019 : : {
38020 : 0 : {
38021 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _q46, _p2 };
38022 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMA))
38023 : 0 : return true;
38024 : : }
38025 : : }
38026 : : }
38027 : : break;
38028 : 0 : case CFN_COND_LEN_FMS:
38029 : 0 : if (gimple_call_num_args (_c2) == 7)
38030 : : {
38031 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
38032 : 0 : _q40 = do_valueize (valueize, _q40);
38033 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
38034 : 0 : _q41 = do_valueize (valueize, _q41);
38035 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
38036 : 0 : _q42 = do_valueize (valueize, _q42);
38037 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
38038 : 0 : _q43 = do_valueize (valueize, _q43);
38039 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
38040 : 0 : _q44 = do_valueize (valueize, _q44);
38041 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
38042 : 0 : _q45 = do_valueize (valueize, _q45);
38043 : 0 : tree _q46 = gimple_call_arg (_c2, 6);
38044 : 0 : _q46 = do_valueize (valueize, _q46);
38045 : 0 : if (tree_swap_operands_p (_q41, _q42))
38046 : 0 : std::swap (_q41, _q42);
38047 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
38048 : : {
38049 : 0 : {
38050 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _q46, _p2 };
38051 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMS))
38052 : 0 : return true;
38053 : : }
38054 : : }
38055 : : }
38056 : : break;
38057 : 0 : case CFN_COND_LEN_FNMA:
38058 : 0 : if (gimple_call_num_args (_c2) == 7)
38059 : : {
38060 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
38061 : 0 : _q40 = do_valueize (valueize, _q40);
38062 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
38063 : 0 : _q41 = do_valueize (valueize, _q41);
38064 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
38065 : 0 : _q42 = do_valueize (valueize, _q42);
38066 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
38067 : 0 : _q43 = do_valueize (valueize, _q43);
38068 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
38069 : 0 : _q44 = do_valueize (valueize, _q44);
38070 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
38071 : 0 : _q45 = do_valueize (valueize, _q45);
38072 : 0 : tree _q46 = gimple_call_arg (_c2, 6);
38073 : 0 : _q46 = do_valueize (valueize, _q46);
38074 : 0 : if (tree_swap_operands_p (_q41, _q42))
38075 : 0 : std::swap (_q41, _q42);
38076 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
38077 : : {
38078 : 0 : {
38079 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _q46, _p2 };
38080 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMA))
38081 : 0 : return true;
38082 : : }
38083 : : }
38084 : : }
38085 : : break;
38086 : 0 : case CFN_COND_LEN_FNMS:
38087 : 0 : if (gimple_call_num_args (_c2) == 7)
38088 : : {
38089 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
38090 : 0 : _q40 = do_valueize (valueize, _q40);
38091 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
38092 : 0 : _q41 = do_valueize (valueize, _q41);
38093 : 0 : tree _q42 = gimple_call_arg (_c2, 2);
38094 : 0 : _q42 = do_valueize (valueize, _q42);
38095 : 0 : tree _q43 = gimple_call_arg (_c2, 3);
38096 : 0 : _q43 = do_valueize (valueize, _q43);
38097 : 0 : tree _q44 = gimple_call_arg (_c2, 4);
38098 : 0 : _q44 = do_valueize (valueize, _q44);
38099 : 0 : tree _q45 = gimple_call_arg (_c2, 5);
38100 : 0 : _q45 = do_valueize (valueize, _q45);
38101 : 0 : tree _q46 = gimple_call_arg (_c2, 6);
38102 : 0 : _q46 = do_valueize (valueize, _q46);
38103 : 0 : if (tree_swap_operands_p (_q41, _q42))
38104 : 0 : std::swap (_q41, _q42);
38105 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
38106 : : {
38107 : 0 : {
38108 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q41, _q42, _q43, _q44, _q45, _q46, _p2 };
38109 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMS))
38110 : 0 : return true;
38111 : : }
38112 : : }
38113 : : }
38114 : : break;
38115 : : default:;
38116 : : }
38117 : : }
38118 : : break;
38119 : : default:;
38120 : : }
38121 : : }
38122 : : break;
38123 : : }
38124 : : default:;
38125 : : }
38126 : 13389 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
38127 : 2772 : switch (gimple_call_combined_fn (_c1))
38128 : : {
38129 : 0 : case CFN_COND_LEN_FMA:
38130 : 0 : if (gimple_call_num_args (_c1) == 7)
38131 : : {
38132 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38133 : 0 : _q30 = do_valueize (valueize, _q30);
38134 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38135 : 0 : _q31 = do_valueize (valueize, _q31);
38136 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38137 : 0 : _q32 = do_valueize (valueize, _q32);
38138 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38139 : 0 : _q33 = do_valueize (valueize, _q33);
38140 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38141 : 0 : _q34 = do_valueize (valueize, _q34);
38142 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
38143 : 0 : _q35 = do_valueize (valueize, _q35);
38144 : 0 : tree _q36 = gimple_call_arg (_c1, 6);
38145 : 0 : _q36 = do_valueize (valueize, _q36);
38146 : 0 : if (tree_swap_operands_p (_q31, _q32))
38147 : 0 : std::swap (_q31, _q32);
38148 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
38149 : : {
38150 : 0 : {
38151 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _q36, _p2 };
38152 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMA))
38153 : 0 : return true;
38154 : : }
38155 : : }
38156 : : }
38157 : : break;
38158 : 0 : case CFN_COND_LEN_FMS:
38159 : 0 : if (gimple_call_num_args (_c1) == 7)
38160 : : {
38161 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38162 : 0 : _q30 = do_valueize (valueize, _q30);
38163 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38164 : 0 : _q31 = do_valueize (valueize, _q31);
38165 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38166 : 0 : _q32 = do_valueize (valueize, _q32);
38167 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38168 : 0 : _q33 = do_valueize (valueize, _q33);
38169 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38170 : 0 : _q34 = do_valueize (valueize, _q34);
38171 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
38172 : 0 : _q35 = do_valueize (valueize, _q35);
38173 : 0 : tree _q36 = gimple_call_arg (_c1, 6);
38174 : 0 : _q36 = do_valueize (valueize, _q36);
38175 : 0 : if (tree_swap_operands_p (_q31, _q32))
38176 : 0 : std::swap (_q31, _q32);
38177 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
38178 : : {
38179 : 0 : {
38180 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _q36, _p2 };
38181 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMS))
38182 : 0 : return true;
38183 : : }
38184 : : }
38185 : : }
38186 : : break;
38187 : 0 : case CFN_COND_LEN_FNMA:
38188 : 0 : if (gimple_call_num_args (_c1) == 7)
38189 : : {
38190 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38191 : 0 : _q30 = do_valueize (valueize, _q30);
38192 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38193 : 0 : _q31 = do_valueize (valueize, _q31);
38194 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38195 : 0 : _q32 = do_valueize (valueize, _q32);
38196 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38197 : 0 : _q33 = do_valueize (valueize, _q33);
38198 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38199 : 0 : _q34 = do_valueize (valueize, _q34);
38200 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
38201 : 0 : _q35 = do_valueize (valueize, _q35);
38202 : 0 : tree _q36 = gimple_call_arg (_c1, 6);
38203 : 0 : _q36 = do_valueize (valueize, _q36);
38204 : 0 : if (tree_swap_operands_p (_q31, _q32))
38205 : 0 : std::swap (_q31, _q32);
38206 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
38207 : : {
38208 : 0 : {
38209 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _q36, _p2 };
38210 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMA))
38211 : 0 : return true;
38212 : : }
38213 : : }
38214 : : }
38215 : : break;
38216 : 0 : case CFN_COND_LEN_FNMS:
38217 : 0 : if (gimple_call_num_args (_c1) == 7)
38218 : : {
38219 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38220 : 0 : _q30 = do_valueize (valueize, _q30);
38221 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38222 : 0 : _q31 = do_valueize (valueize, _q31);
38223 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38224 : 0 : _q32 = do_valueize (valueize, _q32);
38225 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38226 : 0 : _q33 = do_valueize (valueize, _q33);
38227 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38228 : 0 : _q34 = do_valueize (valueize, _q34);
38229 : 0 : tree _q35 = gimple_call_arg (_c1, 5);
38230 : 0 : _q35 = do_valueize (valueize, _q35);
38231 : 0 : tree _q36 = gimple_call_arg (_c1, 6);
38232 : 0 : _q36 = do_valueize (valueize, _q36);
38233 : 0 : if (tree_swap_operands_p (_q31, _q32))
38234 : 0 : std::swap (_q31, _q32);
38235 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
38236 : : {
38237 : 0 : {
38238 : 0 : tree captures[8] ATTRIBUTE_UNUSED = { _p0, _q31, _q32, _q33, _q34, _q35, _q36, _p2 };
38239 : 0 : if (gimple_simplify_654 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMS))
38240 : 0 : return true;
38241 : : }
38242 : : }
38243 : : }
38244 : : break;
38245 : : default:;
38246 : : }
38247 : : }
38248 : : break;
38249 : 192992 : default:;
38250 : : }
38251 : 192992 : switch (TREE_CODE (_p2))
38252 : : {
38253 : 42974 : case SSA_NAME:
38254 : 42974 : if (gimple *_d1 = get_def (valueize, _p2))
38255 : : {
38256 : 37303 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
38257 : 38599 : switch (gimple_assign_rhs_code (_a1))
38258 : : {
38259 : 4984 : case VIEW_CONVERT_EXPR:
38260 : 4984 : {
38261 : 4984 : tree _q40 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
38262 : 4984 : if ((TREE_CODE (_q40) == SSA_NAME
38263 : 4984 : || is_gimple_min_invariant (_q40)))
38264 : : {
38265 : 4984 : _q40 = do_valueize (valueize, _q40);
38266 : 4984 : switch (TREE_CODE (_q40))
38267 : : {
38268 : 4984 : case SSA_NAME:
38269 : 4984 : if (gimple *_d2 = get_def (valueize, _q40))
38270 : : {
38271 : 4928 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
38272 : 1217 : switch (gimple_call_combined_fn (_c2))
38273 : : {
38274 : 0 : case CFN_COND_LEN_FMA:
38275 : 0 : if (gimple_call_num_args (_c2) == 7)
38276 : : {
38277 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
38278 : 0 : _q50 = do_valueize (valueize, _q50);
38279 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
38280 : 0 : _q51 = do_valueize (valueize, _q51);
38281 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
38282 : 0 : _q52 = do_valueize (valueize, _q52);
38283 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
38284 : 0 : _q53 = do_valueize (valueize, _q53);
38285 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
38286 : 0 : _q54 = do_valueize (valueize, _q54);
38287 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
38288 : 0 : _q55 = do_valueize (valueize, _q55);
38289 : 0 : tree _q56 = gimple_call_arg (_c2, 6);
38290 : 0 : _q56 = do_valueize (valueize, _q56);
38291 : 0 : if (tree_swap_operands_p (_q51, _q52))
38292 : 0 : std::swap (_q51, _q52);
38293 : 0 : {
38294 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55, _q56 };
38295 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMA))
38296 : 0 : return true;
38297 : : }
38298 : : }
38299 : : break;
38300 : 0 : case CFN_COND_LEN_FMS:
38301 : 0 : if (gimple_call_num_args (_c2) == 7)
38302 : : {
38303 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
38304 : 0 : _q50 = do_valueize (valueize, _q50);
38305 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
38306 : 0 : _q51 = do_valueize (valueize, _q51);
38307 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
38308 : 0 : _q52 = do_valueize (valueize, _q52);
38309 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
38310 : 0 : _q53 = do_valueize (valueize, _q53);
38311 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
38312 : 0 : _q54 = do_valueize (valueize, _q54);
38313 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
38314 : 0 : _q55 = do_valueize (valueize, _q55);
38315 : 0 : tree _q56 = gimple_call_arg (_c2, 6);
38316 : 0 : _q56 = do_valueize (valueize, _q56);
38317 : 0 : if (tree_swap_operands_p (_q51, _q52))
38318 : 0 : std::swap (_q51, _q52);
38319 : 0 : {
38320 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55, _q56 };
38321 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMS))
38322 : 0 : return true;
38323 : : }
38324 : : }
38325 : : break;
38326 : 0 : case CFN_COND_LEN_FNMA:
38327 : 0 : if (gimple_call_num_args (_c2) == 7)
38328 : : {
38329 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
38330 : 0 : _q50 = do_valueize (valueize, _q50);
38331 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
38332 : 0 : _q51 = do_valueize (valueize, _q51);
38333 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
38334 : 0 : _q52 = do_valueize (valueize, _q52);
38335 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
38336 : 0 : _q53 = do_valueize (valueize, _q53);
38337 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
38338 : 0 : _q54 = do_valueize (valueize, _q54);
38339 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
38340 : 0 : _q55 = do_valueize (valueize, _q55);
38341 : 0 : tree _q56 = gimple_call_arg (_c2, 6);
38342 : 0 : _q56 = do_valueize (valueize, _q56);
38343 : 0 : if (tree_swap_operands_p (_q51, _q52))
38344 : 0 : std::swap (_q51, _q52);
38345 : 0 : {
38346 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55, _q56 };
38347 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMA))
38348 : 0 : return true;
38349 : : }
38350 : : }
38351 : : break;
38352 : 0 : case CFN_COND_LEN_FNMS:
38353 : 0 : if (gimple_call_num_args (_c2) == 7)
38354 : : {
38355 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
38356 : 0 : _q50 = do_valueize (valueize, _q50);
38357 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
38358 : 0 : _q51 = do_valueize (valueize, _q51);
38359 : 0 : tree _q52 = gimple_call_arg (_c2, 2);
38360 : 0 : _q52 = do_valueize (valueize, _q52);
38361 : 0 : tree _q53 = gimple_call_arg (_c2, 3);
38362 : 0 : _q53 = do_valueize (valueize, _q53);
38363 : 0 : tree _q54 = gimple_call_arg (_c2, 4);
38364 : 0 : _q54 = do_valueize (valueize, _q54);
38365 : 0 : tree _q55 = gimple_call_arg (_c2, 5);
38366 : 0 : _q55 = do_valueize (valueize, _q55);
38367 : 0 : tree _q56 = gimple_call_arg (_c2, 6);
38368 : 0 : _q56 = do_valueize (valueize, _q56);
38369 : 0 : if (tree_swap_operands_p (_q51, _q52))
38370 : 0 : std::swap (_q51, _q52);
38371 : 0 : {
38372 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q50, _q51, _q52, _q53, _q54, _q55, _q56 };
38373 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMS))
38374 : 0 : return true;
38375 : : }
38376 : : }
38377 : : break;
38378 : : default:;
38379 : : }
38380 : : }
38381 : : break;
38382 : : default:;
38383 : : }
38384 : : }
38385 : : break;
38386 : : }
38387 : : default:;
38388 : : }
38389 : 12264 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
38390 : 2016 : switch (gimple_call_combined_fn (_c1))
38391 : : {
38392 : 0 : case CFN_COND_LEN_FMA:
38393 : 0 : if (gimple_call_num_args (_c1) == 7)
38394 : : {
38395 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
38396 : 0 : _q40 = do_valueize (valueize, _q40);
38397 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
38398 : 0 : _q41 = do_valueize (valueize, _q41);
38399 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
38400 : 0 : _q42 = do_valueize (valueize, _q42);
38401 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
38402 : 0 : _q43 = do_valueize (valueize, _q43);
38403 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
38404 : 0 : _q44 = do_valueize (valueize, _q44);
38405 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
38406 : 0 : _q45 = do_valueize (valueize, _q45);
38407 : 0 : tree _q46 = gimple_call_arg (_c1, 6);
38408 : 0 : _q46 = do_valueize (valueize, _q46);
38409 : 0 : if (tree_swap_operands_p (_q41, _q42))
38410 : 0 : std::swap (_q41, _q42);
38411 : 0 : {
38412 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45, _q46 };
38413 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMA))
38414 : 0 : return true;
38415 : : }
38416 : : }
38417 : : break;
38418 : 0 : case CFN_COND_LEN_FMS:
38419 : 0 : if (gimple_call_num_args (_c1) == 7)
38420 : : {
38421 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
38422 : 0 : _q40 = do_valueize (valueize, _q40);
38423 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
38424 : 0 : _q41 = do_valueize (valueize, _q41);
38425 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
38426 : 0 : _q42 = do_valueize (valueize, _q42);
38427 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
38428 : 0 : _q43 = do_valueize (valueize, _q43);
38429 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
38430 : 0 : _q44 = do_valueize (valueize, _q44);
38431 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
38432 : 0 : _q45 = do_valueize (valueize, _q45);
38433 : 0 : tree _q46 = gimple_call_arg (_c1, 6);
38434 : 0 : _q46 = do_valueize (valueize, _q46);
38435 : 0 : if (tree_swap_operands_p (_q41, _q42))
38436 : 0 : std::swap (_q41, _q42);
38437 : 0 : {
38438 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45, _q46 };
38439 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FMS))
38440 : 0 : return true;
38441 : : }
38442 : : }
38443 : : break;
38444 : 0 : case CFN_COND_LEN_FNMA:
38445 : 0 : if (gimple_call_num_args (_c1) == 7)
38446 : : {
38447 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
38448 : 0 : _q40 = do_valueize (valueize, _q40);
38449 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
38450 : 0 : _q41 = do_valueize (valueize, _q41);
38451 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
38452 : 0 : _q42 = do_valueize (valueize, _q42);
38453 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
38454 : 0 : _q43 = do_valueize (valueize, _q43);
38455 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
38456 : 0 : _q44 = do_valueize (valueize, _q44);
38457 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
38458 : 0 : _q45 = do_valueize (valueize, _q45);
38459 : 0 : tree _q46 = gimple_call_arg (_c1, 6);
38460 : 0 : _q46 = do_valueize (valueize, _q46);
38461 : 0 : if (tree_swap_operands_p (_q41, _q42))
38462 : 0 : std::swap (_q41, _q42);
38463 : 0 : {
38464 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45, _q46 };
38465 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMA))
38466 : 0 : return true;
38467 : : }
38468 : : }
38469 : : break;
38470 : 0 : case CFN_COND_LEN_FNMS:
38471 : 0 : if (gimple_call_num_args (_c1) == 7)
38472 : : {
38473 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
38474 : 0 : _q40 = do_valueize (valueize, _q40);
38475 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
38476 : 0 : _q41 = do_valueize (valueize, _q41);
38477 : 0 : tree _q42 = gimple_call_arg (_c1, 2);
38478 : 0 : _q42 = do_valueize (valueize, _q42);
38479 : 0 : tree _q43 = gimple_call_arg (_c1, 3);
38480 : 0 : _q43 = do_valueize (valueize, _q43);
38481 : 0 : tree _q44 = gimple_call_arg (_c1, 4);
38482 : 0 : _q44 = do_valueize (valueize, _q44);
38483 : 0 : tree _q45 = gimple_call_arg (_c1, 5);
38484 : 0 : _q45 = do_valueize (valueize, _q45);
38485 : 0 : tree _q46 = gimple_call_arg (_c1, 6);
38486 : 0 : _q46 = do_valueize (valueize, _q46);
38487 : 0 : if (tree_swap_operands_p (_q41, _q42))
38488 : 0 : std::swap (_q41, _q42);
38489 : 0 : {
38490 : 0 : tree captures[9] ATTRIBUTE_UNUSED = { _p0, _p1, _q40, _q41, _q42, _q43, _q44, _q45, _q46 };
38491 : 0 : if (gimple_simplify_655 (res_op, seq, valueize, type, captures, CFN_COND_LEN_FNMS))
38492 : 0 : return true;
38493 : : }
38494 : : }
38495 : : break;
38496 : : default:;
38497 : : }
38498 : : }
38499 : : break;
38500 : 192992 : default:;
38501 : : }
38502 : 192992 : switch (TREE_CODE (_p1))
38503 : : {
38504 : 50202 : case SSA_NAME:
38505 : 50202 : if (gimple *_d1 = get_def (valueize, _p1))
38506 : : {
38507 : 44087 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
38508 : 2772 : switch (gimple_call_combined_fn (_c1))
38509 : : {
38510 : 0 : case CFN_COND_ADD:
38511 : 0 : if (gimple_call_num_args (_c1) == 4)
38512 : : {
38513 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38514 : 0 : _q30 = do_valueize (valueize, _q30);
38515 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38516 : 0 : _q31 = do_valueize (valueize, _q31);
38517 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38518 : 0 : _q32 = do_valueize (valueize, _q32);
38519 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38520 : 0 : _q33 = do_valueize (valueize, _q33);
38521 : 0 : if (tree_swap_operands_p (_q31, _q32))
38522 : 0 : std::swap (_q31, _q32);
38523 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38524 : : {
38525 : 0 : {
38526 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38527 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_ADD))
38528 : 0 : return true;
38529 : : }
38530 : : }
38531 : : }
38532 : : break;
38533 : 0 : case CFN_COND_AND:
38534 : 0 : if (gimple_call_num_args (_c1) == 4)
38535 : : {
38536 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38537 : 0 : _q30 = do_valueize (valueize, _q30);
38538 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38539 : 0 : _q31 = do_valueize (valueize, _q31);
38540 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38541 : 0 : _q32 = do_valueize (valueize, _q32);
38542 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38543 : 0 : _q33 = do_valueize (valueize, _q33);
38544 : 0 : if (tree_swap_operands_p (_q31, _q32))
38545 : 0 : std::swap (_q31, _q32);
38546 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38547 : : {
38548 : 0 : {
38549 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38550 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_AND))
38551 : 0 : return true;
38552 : : }
38553 : : }
38554 : : }
38555 : : break;
38556 : 0 : case CFN_COND_DIV:
38557 : 0 : if (gimple_call_num_args (_c1) == 4)
38558 : : {
38559 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38560 : 0 : _q30 = do_valueize (valueize, _q30);
38561 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38562 : 0 : _q31 = do_valueize (valueize, _q31);
38563 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38564 : 0 : _q32 = do_valueize (valueize, _q32);
38565 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38566 : 0 : _q33 = do_valueize (valueize, _q33);
38567 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38568 : : {
38569 : 0 : {
38570 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38571 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_DIV))
38572 : 0 : return true;
38573 : : }
38574 : : }
38575 : : }
38576 : : break;
38577 : 0 : case CFN_COND_FMA:
38578 : 0 : if (gimple_call_num_args (_c1) == 5)
38579 : : {
38580 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38581 : 0 : _q30 = do_valueize (valueize, _q30);
38582 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38583 : 0 : _q31 = do_valueize (valueize, _q31);
38584 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38585 : 0 : _q32 = do_valueize (valueize, _q32);
38586 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38587 : 0 : _q33 = do_valueize (valueize, _q33);
38588 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38589 : 0 : _q34 = do_valueize (valueize, _q34);
38590 : 0 : if (tree_swap_operands_p (_q31, _q32))
38591 : 0 : std::swap (_q31, _q32);
38592 : 0 : if ((_p2 == _q34 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q34, 0) && types_match (_p2, _q34)))
38593 : : {
38594 : 0 : {
38595 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33, _q34 };
38596 : 0 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_COND_FMA))
38597 : 0 : return true;
38598 : : }
38599 : : }
38600 : : }
38601 : : break;
38602 : 0 : case CFN_COND_FMS:
38603 : 0 : if (gimple_call_num_args (_c1) == 5)
38604 : : {
38605 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38606 : 0 : _q30 = do_valueize (valueize, _q30);
38607 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38608 : 0 : _q31 = do_valueize (valueize, _q31);
38609 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38610 : 0 : _q32 = do_valueize (valueize, _q32);
38611 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38612 : 0 : _q33 = do_valueize (valueize, _q33);
38613 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38614 : 0 : _q34 = do_valueize (valueize, _q34);
38615 : 0 : if (tree_swap_operands_p (_q31, _q32))
38616 : 0 : std::swap (_q31, _q32);
38617 : 0 : if ((_p2 == _q34 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q34, 0) && types_match (_p2, _q34)))
38618 : : {
38619 : 0 : {
38620 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33, _q34 };
38621 : 0 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_COND_FMS))
38622 : 0 : return true;
38623 : : }
38624 : : }
38625 : : }
38626 : : break;
38627 : 0 : case CFN_COND_IOR:
38628 : 0 : if (gimple_call_num_args (_c1) == 4)
38629 : : {
38630 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38631 : 0 : _q30 = do_valueize (valueize, _q30);
38632 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38633 : 0 : _q31 = do_valueize (valueize, _q31);
38634 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38635 : 0 : _q32 = do_valueize (valueize, _q32);
38636 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38637 : 0 : _q33 = do_valueize (valueize, _q33);
38638 : 0 : if (tree_swap_operands_p (_q31, _q32))
38639 : 0 : std::swap (_q31, _q32);
38640 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38641 : : {
38642 : 0 : {
38643 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38644 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_IOR))
38645 : 0 : return true;
38646 : : }
38647 : : }
38648 : : }
38649 : : break;
38650 : 0 : case CFN_COND_MAX:
38651 : 0 : if (gimple_call_num_args (_c1) == 4)
38652 : : {
38653 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38654 : 0 : _q30 = do_valueize (valueize, _q30);
38655 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38656 : 0 : _q31 = do_valueize (valueize, _q31);
38657 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38658 : 0 : _q32 = do_valueize (valueize, _q32);
38659 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38660 : 0 : _q33 = do_valueize (valueize, _q33);
38661 : 0 : if (tree_swap_operands_p (_q31, _q32))
38662 : 0 : std::swap (_q31, _q32);
38663 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38664 : : {
38665 : 0 : {
38666 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38667 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_MAX))
38668 : 0 : return true;
38669 : : }
38670 : : }
38671 : : }
38672 : : break;
38673 : 0 : case CFN_COND_MIN:
38674 : 0 : if (gimple_call_num_args (_c1) == 4)
38675 : : {
38676 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38677 : 0 : _q30 = do_valueize (valueize, _q30);
38678 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38679 : 0 : _q31 = do_valueize (valueize, _q31);
38680 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38681 : 0 : _q32 = do_valueize (valueize, _q32);
38682 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38683 : 0 : _q33 = do_valueize (valueize, _q33);
38684 : 0 : if (tree_swap_operands_p (_q31, _q32))
38685 : 0 : std::swap (_q31, _q32);
38686 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38687 : : {
38688 : 0 : {
38689 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38690 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_MIN))
38691 : 0 : return true;
38692 : : }
38693 : : }
38694 : : }
38695 : : break;
38696 : 0 : case CFN_COND_MOD:
38697 : 0 : if (gimple_call_num_args (_c1) == 4)
38698 : : {
38699 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38700 : 0 : _q30 = do_valueize (valueize, _q30);
38701 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38702 : 0 : _q31 = do_valueize (valueize, _q31);
38703 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38704 : 0 : _q32 = do_valueize (valueize, _q32);
38705 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38706 : 0 : _q33 = do_valueize (valueize, _q33);
38707 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38708 : : {
38709 : 0 : {
38710 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38711 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_MOD))
38712 : 0 : return true;
38713 : : }
38714 : : }
38715 : : }
38716 : : break;
38717 : 0 : case CFN_COND_MUL:
38718 : 0 : if (gimple_call_num_args (_c1) == 4)
38719 : : {
38720 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38721 : 0 : _q30 = do_valueize (valueize, _q30);
38722 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38723 : 0 : _q31 = do_valueize (valueize, _q31);
38724 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38725 : 0 : _q32 = do_valueize (valueize, _q32);
38726 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38727 : 0 : _q33 = do_valueize (valueize, _q33);
38728 : 0 : if (tree_swap_operands_p (_q31, _q32))
38729 : 0 : std::swap (_q31, _q32);
38730 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38731 : : {
38732 : 0 : {
38733 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38734 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_MUL))
38735 : 0 : return true;
38736 : : }
38737 : : }
38738 : : }
38739 : : break;
38740 : 0 : case CFN_COND_SHL:
38741 : 0 : if (gimple_call_num_args (_c1) == 4)
38742 : : {
38743 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38744 : 0 : _q30 = do_valueize (valueize, _q30);
38745 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38746 : 0 : _q31 = do_valueize (valueize, _q31);
38747 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38748 : 0 : _q32 = do_valueize (valueize, _q32);
38749 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38750 : 0 : _q33 = do_valueize (valueize, _q33);
38751 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38752 : : {
38753 : 0 : {
38754 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38755 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_SHL))
38756 : 0 : return true;
38757 : : }
38758 : : }
38759 : : }
38760 : : break;
38761 : 0 : case CFN_COND_SHR:
38762 : 0 : if (gimple_call_num_args (_c1) == 4)
38763 : : {
38764 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38765 : 0 : _q30 = do_valueize (valueize, _q30);
38766 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38767 : 0 : _q31 = do_valueize (valueize, _q31);
38768 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38769 : 0 : _q32 = do_valueize (valueize, _q32);
38770 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38771 : 0 : _q33 = do_valueize (valueize, _q33);
38772 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38773 : : {
38774 : 0 : {
38775 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38776 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_SHR))
38777 : 0 : return true;
38778 : : }
38779 : : }
38780 : : }
38781 : : break;
38782 : 0 : case CFN_COND_SUB:
38783 : 0 : if (gimple_call_num_args (_c1) == 4)
38784 : : {
38785 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38786 : 0 : _q30 = do_valueize (valueize, _q30);
38787 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38788 : 0 : _q31 = do_valueize (valueize, _q31);
38789 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38790 : 0 : _q32 = do_valueize (valueize, _q32);
38791 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38792 : 0 : _q33 = do_valueize (valueize, _q33);
38793 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38794 : : {
38795 : 0 : {
38796 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38797 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_SUB))
38798 : 0 : return true;
38799 : : }
38800 : : }
38801 : : }
38802 : : break;
38803 : 0 : case CFN_COND_XOR:
38804 : 0 : if (gimple_call_num_args (_c1) == 4)
38805 : : {
38806 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38807 : 0 : _q30 = do_valueize (valueize, _q30);
38808 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38809 : 0 : _q31 = do_valueize (valueize, _q31);
38810 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38811 : 0 : _q32 = do_valueize (valueize, _q32);
38812 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38813 : 0 : _q33 = do_valueize (valueize, _q33);
38814 : 0 : if (tree_swap_operands_p (_q31, _q32))
38815 : 0 : std::swap (_q31, _q32);
38816 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38817 : : {
38818 : 0 : {
38819 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38820 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_XOR))
38821 : 0 : return true;
38822 : : }
38823 : : }
38824 : : }
38825 : : break;
38826 : 0 : case CFN_COND_COPYSIGN:
38827 : 0 : if (gimple_call_num_args (_c1) == 4)
38828 : : {
38829 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38830 : 0 : _q30 = do_valueize (valueize, _q30);
38831 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38832 : 0 : _q31 = do_valueize (valueize, _q31);
38833 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38834 : 0 : _q32 = do_valueize (valueize, _q32);
38835 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38836 : 0 : _q33 = do_valueize (valueize, _q33);
38837 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38838 : : {
38839 : 0 : {
38840 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38841 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_COPYSIGN))
38842 : 0 : return true;
38843 : : }
38844 : : }
38845 : : }
38846 : : break;
38847 : 0 : case CFN_COND_FMAX:
38848 : 0 : if (gimple_call_num_args (_c1) == 4)
38849 : : {
38850 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38851 : 0 : _q30 = do_valueize (valueize, _q30);
38852 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38853 : 0 : _q31 = do_valueize (valueize, _q31);
38854 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38855 : 0 : _q32 = do_valueize (valueize, _q32);
38856 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38857 : 0 : _q33 = do_valueize (valueize, _q33);
38858 : 0 : if (tree_swap_operands_p (_q31, _q32))
38859 : 0 : std::swap (_q31, _q32);
38860 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38861 : : {
38862 : 0 : {
38863 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38864 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_FMAX))
38865 : 0 : return true;
38866 : : }
38867 : : }
38868 : : }
38869 : : break;
38870 : 0 : case CFN_COND_FMIN:
38871 : 0 : if (gimple_call_num_args (_c1) == 4)
38872 : : {
38873 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38874 : 0 : _q30 = do_valueize (valueize, _q30);
38875 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38876 : 0 : _q31 = do_valueize (valueize, _q31);
38877 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38878 : 0 : _q32 = do_valueize (valueize, _q32);
38879 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38880 : 0 : _q33 = do_valueize (valueize, _q33);
38881 : 0 : if (tree_swap_operands_p (_q31, _q32))
38882 : 0 : std::swap (_q31, _q32);
38883 : 0 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38884 : : {
38885 : 0 : {
38886 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38887 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_FMIN))
38888 : 0 : return true;
38889 : : }
38890 : : }
38891 : : }
38892 : : break;
38893 : 0 : case CFN_COND_FNMA:
38894 : 0 : if (gimple_call_num_args (_c1) == 5)
38895 : : {
38896 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38897 : 0 : _q30 = do_valueize (valueize, _q30);
38898 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38899 : 0 : _q31 = do_valueize (valueize, _q31);
38900 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38901 : 0 : _q32 = do_valueize (valueize, _q32);
38902 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38903 : 0 : _q33 = do_valueize (valueize, _q33);
38904 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38905 : 0 : _q34 = do_valueize (valueize, _q34);
38906 : 0 : if (tree_swap_operands_p (_q31, _q32))
38907 : 0 : std::swap (_q31, _q32);
38908 : 0 : if ((_p2 == _q34 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q34, 0) && types_match (_p2, _q34)))
38909 : : {
38910 : 0 : {
38911 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33, _q34 };
38912 : 0 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_COND_FNMA))
38913 : 0 : return true;
38914 : : }
38915 : : }
38916 : : }
38917 : : break;
38918 : 0 : case CFN_COND_FNMS:
38919 : 0 : if (gimple_call_num_args (_c1) == 5)
38920 : : {
38921 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
38922 : 0 : _q30 = do_valueize (valueize, _q30);
38923 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
38924 : 0 : _q31 = do_valueize (valueize, _q31);
38925 : 0 : tree _q32 = gimple_call_arg (_c1, 2);
38926 : 0 : _q32 = do_valueize (valueize, _q32);
38927 : 0 : tree _q33 = gimple_call_arg (_c1, 3);
38928 : 0 : _q33 = do_valueize (valueize, _q33);
38929 : 0 : tree _q34 = gimple_call_arg (_c1, 4);
38930 : 0 : _q34 = do_valueize (valueize, _q34);
38931 : 0 : if (tree_swap_operands_p (_q31, _q32))
38932 : 0 : std::swap (_q31, _q32);
38933 : 0 : if ((_p2 == _q34 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q34, 0) && types_match (_p2, _q34)))
38934 : : {
38935 : 0 : {
38936 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33, _q34 };
38937 : 0 : if (gimple_simplify_657 (res_op, seq, valueize, type, captures, CFN_COND_FNMS))
38938 : 0 : return true;
38939 : : }
38940 : : }
38941 : : }
38942 : : break;
38943 : 22 : case CFN_COND_RDIV:
38944 : 22 : if (gimple_call_num_args (_c1) == 4)
38945 : : {
38946 : 22 : tree _q30 = gimple_call_arg (_c1, 0);
38947 : 22 : _q30 = do_valueize (valueize, _q30);
38948 : 22 : tree _q31 = gimple_call_arg (_c1, 1);
38949 : 22 : _q31 = do_valueize (valueize, _q31);
38950 : 22 : tree _q32 = gimple_call_arg (_c1, 2);
38951 : 22 : _q32 = do_valueize (valueize, _q32);
38952 : 22 : tree _q33 = gimple_call_arg (_c1, 3);
38953 : 22 : _q33 = do_valueize (valueize, _q33);
38954 : 22 : if ((_p2 == _q33 && ! TREE_SIDE_EFFECTS (_p2)) || (operand_equal_p (_p2, _q33, 0) && types_match (_p2, _q33)))
38955 : : {
38956 : 0 : {
38957 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32, _q33 };
38958 : 0 : if (gimple_simplify_656 (res_op, seq, valueize, type, captures, CFN_COND_RDIV))
38959 : 0 : return true;
38960 : : }
38961 : : }
38962 : : }
38963 : : break;
38964 : : default:;
38965 : : }
38966 : : }
38967 : : break;
38968 : : default:;
38969 : : }
38970 : : return false;
38971 : : }
38972 : : #pragma GCC diagnostic pop
|