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 : 1688888 : gimple_power_of_two_cand (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
11 : : {
12 : 1688888 : const tree type = TREE_TYPE (t);
13 : 1688888 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 1688888 : switch (TREE_CODE (t))
15 : : {
16 : 1046112 : case SSA_NAME:
17 : 1046112 : if (gimple *_d1 = get_def (valueize, t))
18 : : {
19 : 846452 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20 : 1164410 : 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", 7, __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 : 629976 : case INTEGER_CST:
51 : 629976 : {
52 : 629976 : {
53 : 629976 : tree captures[1] ATTRIBUTE_UNUSED = { t };
54 : 629976 : {
55 : 629976 : res_ops[0] = captures[0];
56 : 629976 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 8, __FILE__, __LINE__, false);
57 : : return true;
58 : : }
59 : : }
60 : : break;
61 : : }
62 : : default:;
63 : : }
64 : : return false;
65 : : }
66 : :
67 : : bool
68 : 1119896 : gimple_min_value (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
69 : : {
70 : 1119896 : const tree type = TREE_TYPE (t);
71 : 1119896 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
72 : 1119896 : if (uniform_integer_cst_p (t))
73 : : {
74 : 717368 : {
75 : 717368 : {
76 : 717368 : tree int_cst = uniform_integer_cst_p (t);
77 : 717368 : tree inner_type = TREE_TYPE (int_cst);
78 : 1434736 : if ((INTEGRAL_TYPE_P (inner_type)
79 : 153446 : || POINTER_TYPE_P (inner_type))
80 : 1588137 : && wi::eq_p (wi::to_wide (int_cst), wi::min_value (inner_type))
81 : : )
82 : : {
83 : 258975 : {
84 : 258975 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 33, __FILE__, __LINE__, false);
85 : 258975 : return true;
86 : : }
87 : : }
88 : : }
89 : : }
90 : : }
91 : : return false;
92 : : }
93 : :
94 : : bool
95 : 2080 : gimple_double_value_p (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
96 : : {
97 : 2080 : const tree type = TREE_TYPE (t);
98 : 2080 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
99 : 2080 : {
100 : 2080 : tree captures[1] ATTRIBUTE_UNUSED = { t };
101 : 2080 : if (TYPE_MAIN_VARIANT (TREE_TYPE (captures[0])) == double_type_node
102 : : )
103 : : {
104 : 750 : {
105 : 750 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 44, __FILE__, __LINE__, false);
106 : 750 : return true;
107 : : }
108 : : }
109 : : }
110 : : return false;
111 : : }
112 : :
113 : : bool
114 : 582337 : gimple_vec_same_elem_p (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
115 : : {
116 : 582337 : const tree type = TREE_TYPE (t);
117 : 582337 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
118 : 582337 : switch (TREE_CODE (t))
119 : : {
120 : 567092 : case SSA_NAME:
121 : 567092 : if (gimple *_d1 = get_def (valueize, t))
122 : : {
123 : 481676 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
124 : 847262 : switch (gimple_assign_rhs_code (_a1))
125 : : {
126 : 0 : case VEC_DUPLICATE_EXPR:
127 : 0 : {
128 : 0 : tree _p0 = gimple_assign_rhs1 (_a1);
129 : 0 : _p0 = do_valueize (valueize, _p0);
130 : 0 : {
131 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
132 : 0 : {
133 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 47, __FILE__, __LINE__, false);
134 : 0 : return true;
135 : : }
136 : : }
137 : 2469 : break;
138 : : }
139 : 2469 : case CONSTRUCTOR:
140 : 2469 : {
141 : 2469 : {
142 : 2469 : tree captures[1] ATTRIBUTE_UNUSED = { t };
143 : 2469 : if (TREE_CODE (captures[0]) == SSA_NAME
144 : 2469 : && uniform_vector_p (gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])))
145 : : )
146 : : {
147 : 507 : {
148 : 507 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 48, __FILE__, __LINE__, false);
149 : 507 : return true;
150 : : }
151 : : }
152 : : }
153 : : break;
154 : : }
155 : : default:;
156 : : }
157 : : }
158 : : break;
159 : 581830 : default:;
160 : : }
161 : 581830 : {
162 : 581830 : tree captures[1] ATTRIBUTE_UNUSED = { t };
163 : 581830 : if (uniform_vector_p (captures[0])
164 : : )
165 : : {
166 : 11247 : {
167 : 11247 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 49, __FILE__, __LINE__, false);
168 : 11247 : return true;
169 : : }
170 : : }
171 : : }
172 : : return false;
173 : : }
174 : :
175 : : bool
176 : 0 : gimple_simplify_6 (gimple_match_op *res_op, gimple_seq *seq,
177 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
178 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
179 : : {
180 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
181 : 0 : gimple_seq *lseq = seq;
182 : 0 : if (lseq
183 : 0 : && (!single_use (captures[0])))
184 : 0 : lseq = NULL;
185 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail165;
186 : 0 : {
187 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
188 : 0 : {
189 : 0 : tree _o1[2], _r1;
190 : 0 : _o1[0] = captures[1];
191 : 0 : _o1[1] = captures[2];
192 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
193 : 0 : tem_op.resimplify (lseq, valueize);
194 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
195 : 0 : if (!_r1) goto next_after_fail165;
196 : 0 : res_op->ops[0] = _r1;
197 : : }
198 : 0 : res_op->resimplify (lseq, valueize);
199 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 59, __FILE__, __LINE__, true);
200 : : return true;
201 : : }
202 : : next_after_fail165:;
203 : : return false;
204 : : }
205 : :
206 : : bool
207 : 16 : gimple_simplify_12 (gimple_match_op *res_op, gimple_seq *seq,
208 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
209 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
210 : : {
211 : 16 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
212 : 16 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[0]))
213 : : )
214 : : {
215 : 16 : gimple_seq *lseq = seq;
216 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail171;
217 : 16 : {
218 : 16 : res_op->set_op (NOP_EXPR, type, 1);
219 : 16 : {
220 : 16 : tree _o1[2], _r1;
221 : 16 : _o1[0] = captures[1];
222 : 16 : {
223 : 16 : tree _o2[1], _r2;
224 : 16 : _o2[0] = captures[0];
225 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
226 : 16 : tem_op.resimplify (lseq, valueize);
227 : 16 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
228 : 16 : if (!_r2) goto next_after_fail171;
229 : 16 : _o1[1] = _r2;
230 : : }
231 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
232 : 16 : tem_op.resimplify (lseq, valueize);
233 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
234 : 16 : if (!_r1) goto next_after_fail171;
235 : 16 : res_op->ops[0] = _r1;
236 : : }
237 : 16 : res_op->resimplify (lseq, valueize);
238 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 65, __FILE__, __LINE__, true);
239 : 16 : return true;
240 : : }
241 : : next_after_fail171:;
242 : : }
243 : : return false;
244 : : }
245 : :
246 : : bool
247 : 8 : gimple_simplify_17 (gimple_match_op *res_op, gimple_seq *seq,
248 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
249 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
250 : : {
251 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
252 : 8 : gimple_seq *lseq = seq;
253 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail176;
254 : 8 : {
255 : 8 : res_op->set_op (BIT_XOR_EXPR, type, 2);
256 : 8 : res_op->ops[0] = captures[0];
257 : 8 : res_op->ops[1] = captures[1];
258 : 8 : res_op->resimplify (lseq, valueize);
259 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 70, __FILE__, __LINE__, true);
260 : : return true;
261 : : }
262 : 0 : next_after_fail176:;
263 : 0 : return false;
264 : : }
265 : :
266 : : bool
267 : 590 : gimple_simplify_20 (gimple_match_op *res_op, gimple_seq *seq,
268 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
269 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
270 : : {
271 : 590 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
272 : 590 : gimple_seq *lseq = seq;
273 : 590 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail179;
274 : 590 : {
275 : 590 : res_op->set_op (NOP_EXPR, type, 1);
276 : 590 : res_op->ops[0] = captures[0];
277 : 590 : res_op->resimplify (lseq, valueize);
278 : 590 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 73, __FILE__, __LINE__, true);
279 : : return true;
280 : : }
281 : 0 : next_after_fail179:;
282 : 0 : return false;
283 : : }
284 : :
285 : : bool
286 : 2623 : gimple_simplify_24 (gimple_match_op *res_op, gimple_seq *seq,
287 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
288 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
289 : : const enum tree_code ARG_UNUSED (opo),
290 : : const enum tree_code ARG_UNUSED (opi))
291 : : {
292 : 2623 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
293 : 2623 : gimple_seq *lseq = seq;
294 : 2623 : if (lseq
295 : 1470 : && (!single_use (captures[0])))
296 : 1263 : lseq = NULL;
297 : 2623 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail183;
298 : 2623 : {
299 : 2623 : res_op->set_op (BIT_AND_EXPR, type, 2);
300 : 2623 : {
301 : 2623 : tree _o1[1], _r1;
302 : 2623 : _o1[0] = captures[1];
303 : 2623 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
304 : 2623 : tem_op.resimplify (lseq, valueize);
305 : 2623 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
306 : 2623 : if (!_r1) goto next_after_fail183;
307 : 1422 : res_op->ops[0] = _r1;
308 : : }
309 : 1422 : res_op->ops[1] = captures[2];
310 : 1422 : res_op->resimplify (lseq, valueize);
311 : 1422 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 77, __FILE__, __LINE__, true);
312 : : return true;
313 : : }
314 : : next_after_fail183:;
315 : : return false;
316 : : }
317 : :
318 : : bool
319 : 648991 : gimple_simplify_28 (gimple_match_op *res_op, gimple_seq *seq,
320 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
321 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
322 : : const enum tree_code ARG_UNUSED (bitop))
323 : : {
324 : 648991 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
325 : 648991 : if (((TREE_CODE (captures[3]) == INTEGER_CST
326 : 360702 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
327 : 314962 : && (int_fits_type_p (captures[3], TREE_TYPE (captures[1]))
328 : 31933 : || tree_nop_conversion_p (TREE_TYPE (captures[1]), type)))
329 : 349370 : || types_match (captures[1], captures[3]))
330 : 299621 : && !POINTER_TYPE_P (TREE_TYPE (captures[1]))
331 : 299621 : && !VECTOR_TYPE_P (TREE_TYPE (captures[1]))
332 : 299621 : && TREE_CODE (TREE_TYPE (captures[1])) != OFFSET_TYPE
333 : : && (bitop != BIT_AND_EXPR ||
334 : : 1
335 : : )
336 : 648991 : && (
337 : 299621 : TYPE_PRECISION (TREE_TYPE (captures[1])) < TYPE_PRECISION (type)
338 : 272574 : || (
339 : : 1
340 : 272574 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (type))
341 : 228960 : || GET_MODE_CLASS (TYPE_MODE (type)) != MODE_INT
342 : 228960 : || !type_has_mode_precision_p (type)
343 : 228946 : || (
344 : : 1
345 : 228946 : && TREE_CODE (captures[3]) != INTEGER_CST
346 : 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
347 : 0 : && single_use (captures[0])
348 : 0 : && single_use (captures[2])))
349 : : )
350 : : {
351 : 70675 : gimple_seq *lseq = seq;
352 : 70675 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail187;
353 : 70675 : {
354 : 70675 : res_op->set_op (NOP_EXPR, type, 1);
355 : 70675 : {
356 : 70675 : tree _o1[2], _r1;
357 : 70675 : _o1[0] = captures[1];
358 : 70675 : {
359 : 70675 : tree _o2[1], _r2;
360 : 70675 : _o2[0] = captures[3];
361 : 70675 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0])
362 : 70675 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
363 : : {
364 : 70675 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
365 : 70675 : tem_op.resimplify (lseq, valueize);
366 : 70675 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
367 : 70675 : if (!_r2) goto next_after_fail187;
368 : : }
369 : : else
370 : : _r2 = _o2[0];
371 : 70675 : _o1[1] = _r2;
372 : : }
373 : 70675 : gimple_match_op tem_op (res_op->cond.any_else (), bitop, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
374 : 70675 : tem_op.resimplify (lseq, valueize);
375 : 70675 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
376 : 70675 : if (!_r1) goto next_after_fail187;
377 : 29820 : res_op->ops[0] = _r1;
378 : : }
379 : 29820 : res_op->resimplify (lseq, valueize);
380 : 29820 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 80, __FILE__, __LINE__, true);
381 : 29820 : return true;
382 : : }
383 : : next_after_fail187:;
384 : : }
385 : : return false;
386 : : }
387 : :
388 : : bool
389 : 0 : gimple_simplify_41 (gimple_match_op *res_op, gimple_seq *seq,
390 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
391 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
392 : : {
393 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
394 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
395 : 0 : && !TYPE_UNSIGNED (TREE_TYPE (captures[1]))
396 : 0 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[3]))
397 : : )
398 : : {
399 : 0 : gimple_seq *lseq = seq;
400 : 0 : if (lseq
401 : 0 : && (!single_use (captures[0])
402 : 0 : || !single_use (captures[2])))
403 : 0 : lseq = NULL;
404 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail204;
405 : 0 : {
406 : 0 : res_op->set_op (GE_EXPR, type, 2);
407 : 0 : {
408 : 0 : tree _o1[2], _r1;
409 : 0 : _o1[0] = captures[1];
410 : 0 : _o1[1] = captures[3];
411 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
412 : 0 : tem_op.resimplify (lseq, valueize);
413 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
414 : 0 : if (!_r1) goto next_after_fail204;
415 : 0 : res_op->ops[0] = _r1;
416 : : }
417 : 0 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
418 : 0 : res_op->resimplify (lseq, valueize);
419 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 96, __FILE__, __LINE__, true);
420 : 0 : return true;
421 : : }
422 : : next_after_fail204:;
423 : : }
424 : : return false;
425 : : }
426 : :
427 : : bool
428 : 32 : gimple_simplify_46 (gimple_match_op *res_op, gimple_seq *seq,
429 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
430 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
431 : : {
432 : 32 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
433 : 32 : if (ANY_INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_UNDEFINED (type)
434 : : )
435 : : {
436 : 16 : gimple_seq *lseq = seq;
437 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail212;
438 : 16 : {
439 : 16 : res_op->set_op (ABS_EXPR, type, 1);
440 : 16 : res_op->ops[0] = captures[0];
441 : 16 : res_op->resimplify (lseq, valueize);
442 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 104, __FILE__, __LINE__, true);
443 : 16 : return true;
444 : : }
445 : 0 : next_after_fail212:;
446 : : }
447 : : return false;
448 : : }
449 : :
450 : : bool
451 : 16 : gimple_simplify_51 (gimple_match_op *res_op, gimple_seq *seq,
452 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
453 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
454 : : {
455 : 16 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
456 : 16 : gimple_seq *lseq = seq;
457 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail218;
458 : 16 : {
459 : 16 : res_op->set_op (PLUS_EXPR, type, 2);
460 : 16 : res_op->ops[0] = captures[0];
461 : 16 : res_op->ops[1] = captures[1];
462 : 16 : res_op->resimplify (lseq, valueize);
463 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 110, __FILE__, __LINE__, true);
464 : : return true;
465 : : }
466 : 0 : next_after_fail218:;
467 : 0 : return false;
468 : : }
469 : :
470 : : bool
471 : 683980 : gimple_simplify_54 (gimple_match_op *res_op, gimple_seq *seq,
472 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
473 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
474 : : {
475 : 683980 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
476 : 683980 : if (!TYPE_SATURATING (type)
477 : : )
478 : : {
479 : 683980 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
480 : 683980 : && !TYPE_OVERFLOW_SANITIZED (type)
481 : : )
482 : : {
483 : 681076 : {
484 : 681076 : tree t1 = type;
485 : 681076 : if (INTEGRAL_TYPE_P (type)
486 : 1963175 : && TYPE_OVERFLOW_WRAPS (type) != TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
487 : 925 : t1 = TYPE_OVERFLOW_WRAPS (type) ? type : TREE_TYPE (captures[1]);
488 : 681076 : gimple_seq *lseq = seq;
489 : 681076 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail221;
490 : 681076 : {
491 : 681076 : res_op->set_op (NOP_EXPR, type, 1);
492 : 681076 : {
493 : 681076 : tree _o1[2], _r1;
494 : 681076 : {
495 : 681076 : tree _o2[1], _r2;
496 : 681076 : _o2[0] = captures[0];
497 : 681076 : if (t1 != TREE_TYPE (_o2[0])
498 : 681076 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
499 : : {
500 : 39 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
501 : 39 : tem_op.resimplify (lseq, valueize);
502 : 39 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
503 : 39 : if (!_r2) goto next_after_fail221;
504 : : }
505 : : else
506 : : _r2 = _o2[0];
507 : 681066 : _o1[0] = _r2;
508 : : }
509 : 681066 : {
510 : 681066 : tree _o2[1], _r2;
511 : 681066 : _o2[0] = captures[1];
512 : 681066 : if (t1 != TREE_TYPE (_o2[0])
513 : 681066 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
514 : : {
515 : 1127 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
516 : 1127 : tem_op.resimplify (lseq, valueize);
517 : 1127 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
518 : 1127 : if (!_r2) goto next_after_fail221;
519 : : }
520 : : else
521 : : _r2 = _o2[0];
522 : 680362 : _o1[1] = _r2;
523 : : }
524 : 680362 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
525 : 680362 : tem_op.resimplify (lseq, valueize);
526 : 680362 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
527 : 680362 : if (!_r1) goto next_after_fail221;
528 : 46946 : res_op->ops[0] = _r1;
529 : : }
530 : 46946 : res_op->resimplify (lseq, valueize);
531 : 46946 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 113, __FILE__, __LINE__, true);
532 : 46946 : return true;
533 : : }
534 : : next_after_fail221:;
535 : : }
536 : : }
537 : : }
538 : : return false;
539 : : }
540 : :
541 : : bool
542 : 47611 : gimple_simplify_65 (gimple_match_op *res_op, gimple_seq *seq,
543 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
544 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
545 : : const enum tree_code ARG_UNUSED (plusminus))
546 : : {
547 : 47611 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
548 : 47611 : if (!TYPE_SATURATING (type)
549 : 47611 : && (!FLOAT_TYPE_P (type) || flag_associative_math)
550 : : )
551 : : {
552 : 39587 : if (!ALL_FRACT_MODE_P (TYPE_MODE (type))
553 : : )
554 : : {
555 : 113 : if ((!ANY_INTEGRAL_TYPE_P (type)
556 : 39582 : || TYPE_OVERFLOW_WRAPS (type)
557 : 23359 : || (INTEGRAL_TYPE_P (type)
558 : 23259 : && ((tree_expr_nonzero_p (captures[0])
559 : 2438 : && expr_not_equal_to (captures[0],
560 : 40806 : wi::minus_one (TYPE_PRECISION (type))))
561 : 6586 : || (plusminus == PLUS_EXPR
562 : 22603 : ? expr_not_equal_to (captures[2],
563 : 46173 : wi::max_value (TYPE_PRECISION (type), SIGNED))
564 : 16017 : : (expr_not_equal_to (captures[2],
565 : 55604 : wi::min_value (TYPE_PRECISION (type), SIGNED))
566 : 760 : && expr_not_equal_to (captures[2],
567 : 1520 : wi::min_value (TYPE_PRECISION (type), SIGNED)
568 : 42627 : + 1))))))
569 : 81884 : && single_use (captures[1])
570 : : )
571 : : {
572 : 4353 : gimple_seq *lseq = seq;
573 : 4353 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail241;
574 : 4353 : {
575 : 4353 : res_op->set_op (MULT_EXPR, type, 2);
576 : 4353 : {
577 : 4353 : tree _o1[2], _r1;
578 : 4353 : _o1[0] = build_one_cst (type);
579 : 4353 : _o1[1] = captures[2];
580 : 4353 : gimple_match_op tem_op (res_op->cond.any_else (), plusminus, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
581 : 4353 : tem_op.resimplify (lseq, valueize);
582 : 4353 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
583 : 4353 : if (!_r1) goto next_after_fail241;
584 : 2488 : res_op->ops[0] = _r1;
585 : : }
586 : 2488 : res_op->ops[1] = captures[0];
587 : 2488 : res_op->resimplify (lseq, valueize);
588 : 2488 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 133, __FILE__, __LINE__, true);
589 : 2488 : return true;
590 : : }
591 : : next_after_fail241:;
592 : : }
593 : : }
594 : : }
595 : : return false;
596 : : }
597 : :
598 : : bool
599 : 466 : gimple_simplify_71 (gimple_match_op *res_op, gimple_seq *seq,
600 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
601 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
602 : : const combined_fn ARG_UNUSED (POPCOUNT))
603 : : {
604 : 466 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
605 : 932 : if (INTEGRAL_TYPE_P (type)
606 : 2330 : && (wi::bit_and (widest_int::from (tree_nonzero_bits (captures[1]), UNSIGNED),
607 : 1864 : widest_int::from (tree_nonzero_bits (captures[3]), UNSIGNED))
608 : 1398 : == 0)
609 : : )
610 : : {
611 : 2 : {
612 : 2 : tree utype = TREE_TYPE (captures[1]);
613 : 2 : if (TYPE_PRECISION (utype) < TYPE_PRECISION (TREE_TYPE (captures[3])))
614 : 1 : utype = TREE_TYPE (captures[3]);
615 : 2 : gimple_seq *lseq = seq;
616 : 2 : if (lseq
617 : 2 : && (!single_use (captures[0])
618 : 2 : || !single_use (captures[2])))
619 : 0 : lseq = NULL;
620 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail247;
621 : 2 : {
622 : 2 : res_op->set_op (POPCOUNT, type, 1);
623 : 2 : {
624 : 2 : tree _o1[2], _r1;
625 : 2 : {
626 : 2 : tree _o2[1], _r2;
627 : 2 : _o2[0] = captures[1];
628 : 2 : if (utype != TREE_TYPE (_o2[0])
629 : 2 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
630 : : {
631 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
632 : 1 : tem_op.resimplify (lseq, valueize);
633 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
634 : 1 : if (!_r2) goto next_after_fail247;
635 : : }
636 : : else
637 : : _r2 = _o2[0];
638 : 2 : _o1[0] = _r2;
639 : : }
640 : 2 : {
641 : 2 : tree _o2[1], _r2;
642 : 2 : _o2[0] = captures[3];
643 : 2 : if (utype != TREE_TYPE (_o2[0])
644 : 2 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
645 : : {
646 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
647 : 1 : tem_op.resimplify (lseq, valueize);
648 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
649 : 1 : if (!_r2) goto next_after_fail247;
650 : : }
651 : : else
652 : : _r2 = _o2[0];
653 : 2 : _o1[1] = _r2;
654 : : }
655 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
656 : 2 : tem_op.resimplify (lseq, valueize);
657 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
658 : 2 : if (!_r1) goto next_after_fail247;
659 : 2 : res_op->ops[0] = _r1;
660 : : }
661 : 2 : res_op->resimplify (lseq, valueize);
662 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 139, __FILE__, __LINE__, true);
663 : 2 : return true;
664 : : }
665 : : next_after_fail247:;
666 : : }
667 : : }
668 : : return false;
669 : : }
670 : :
671 : : bool
672 : 0 : gimple_simplify_82 (gimple_match_op *res_op, gimple_seq *seq,
673 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
674 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
675 : : {
676 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
677 : 0 : gimple_seq *lseq = seq;
678 : 0 : if (lseq
679 : 0 : && (!single_use (captures[0])))
680 : 0 : lseq = NULL;
681 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail258;
682 : 0 : {
683 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
684 : 0 : res_op->ops[0] = captures[1];
685 : 0 : {
686 : 0 : tree _o1[1], _r1;
687 : 0 : _o1[0] = captures[2];
688 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
689 : 0 : tem_op.resimplify (lseq, valueize);
690 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
691 : 0 : if (!_r1) goto next_after_fail258;
692 : 0 : res_op->ops[1] = _r1;
693 : : }
694 : 0 : res_op->resimplify (lseq, valueize);
695 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 150, __FILE__, __LINE__, true);
696 : : return true;
697 : : }
698 : : next_after_fail258:;
699 : : return false;
700 : : }
701 : :
702 : : bool
703 : 3898 : gimple_simplify_88 (gimple_match_op *res_op, gimple_seq *seq,
704 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
705 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
706 : : {
707 : 3898 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
708 : 3898 : if (!TYPE_SATURATING (type)
709 : : )
710 : : {
711 : 3898 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
712 : 7242 : && !FIXED_POINT_TYPE_P (type)
713 : : )
714 : : {
715 : 0 : if (!ANY_INTEGRAL_TYPE_P (type)
716 : 3344 : || TYPE_OVERFLOW_WRAPS (type)
717 : : )
718 : : {
719 : 922 : gimple_seq *lseq = seq;
720 : 922 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail265;
721 : 922 : {
722 : 922 : res_op->set_op (NEGATE_EXPR, type, 1);
723 : 922 : {
724 : 922 : tree _o1[1], _r1;
725 : 922 : _o1[0] = captures[1];
726 : 922 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
727 : 922 : tem_op.resimplify (lseq, valueize);
728 : 922 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
729 : 922 : if (!_r1) goto next_after_fail265;
730 : 921 : res_op->ops[0] = _r1;
731 : : }
732 : 921 : res_op->resimplify (lseq, valueize);
733 : 921 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 156, __FILE__, __LINE__, true);
734 : 921 : return true;
735 : : }
736 : : next_after_fail265:;
737 : : }
738 : : else
739 : : {
740 : 2422 : gimple_seq *lseq = seq;
741 : 2422 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail266;
742 : 2422 : {
743 : 2422 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
744 : 2422 : {
745 : 2422 : tree _o1[1], _r1;
746 : 2422 : _o1[0] = captures[1];
747 : 2422 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
748 : 2422 : tem_op.resimplify (lseq, valueize);
749 : 2422 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
750 : 2422 : if (!_r1) goto next_after_fail266;
751 : 1269 : res_op->ops[0] = _r1;
752 : : }
753 : 1269 : res_op->resimplify (lseq, valueize);
754 : 1269 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 157, __FILE__, __LINE__, true);
755 : 1269 : return true;
756 : : }
757 : : next_after_fail266:;
758 : : }
759 : : }
760 : : }
761 : : return false;
762 : : }
763 : :
764 : : bool
765 : 54 : gimple_simplify_97 (gimple_match_op *res_op, gimple_seq *seq,
766 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
767 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
768 : : {
769 : 54 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
770 : 54 : if (VECTOR_TYPE_P (type)
771 : 54 : && known_eq (TYPE_VECTOR_SUBPARTS (type),
772 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (captures[3])))
773 : 162 : && (TYPE_MODE (TREE_TYPE (type))
774 : 54 : == TYPE_MODE (TREE_TYPE (TREE_TYPE (captures[3]))))
775 : : )
776 : : {
777 : 54 : gimple_seq *lseq = seq;
778 : 54 : if (lseq
779 : 11 : && (!single_use (captures[1])))
780 : 54 : lseq = NULL;
781 : 54 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail279;
782 : 54 : {
783 : 54 : res_op->set_op (PLUS_EXPR, type, 2);
784 : 54 : res_op->ops[0] = captures[0];
785 : 54 : {
786 : 54 : tree _o1[1], _r1;
787 : 54 : {
788 : 54 : tree _o2[3], _r2;
789 : 54 : _o2[0] = captures[2];
790 : 54 : {
791 : 54 : tree _o3[1], _r3;
792 : 54 : _o3[0] = captures[3];
793 : 54 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
794 : 54 : tem_op.resimplify (lseq, valueize);
795 : 54 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
796 : 54 : if (!_r3) goto next_after_fail279;
797 : 54 : _o2[1] = _r3;
798 : : }
799 : 54 : _o2[2] = captures[4];
800 : 54 : gimple_match_op tem_op (res_op->cond.any_else (), VEC_COND_EXPR, TREE_TYPE (_o2[1]), _o2[0], _o2[1], _o2[2]);
801 : 54 : tem_op.resimplify (lseq, valueize);
802 : 54 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
803 : 54 : if (!_r2) goto next_after_fail279;
804 : 0 : _o1[0] = _r2;
805 : : }
806 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
807 : 0 : tem_op.resimplify (lseq, valueize);
808 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
809 : 0 : if (!_r1) goto next_after_fail279;
810 : 0 : res_op->ops[1] = _r1;
811 : : }
812 : 0 : res_op->resimplify (lseq, valueize);
813 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 170, __FILE__, __LINE__, true);
814 : 0 : return true;
815 : : }
816 : : next_after_fail279:;
817 : : }
818 : : return false;
819 : : }
820 : :
821 : : bool
822 : 19313 : gimple_simplify_104 (gimple_match_op *res_op, gimple_seq *seq,
823 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
824 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
825 : : {
826 : 19313 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
827 : 19313 : {
828 : 19313 : bool wascmp;
829 : 19313 : if (bitwise_inverted_equal_p (captures[0], captures[2], wascmp)
830 : 19313 : && (!wascmp || element_precision (type) == 1)
831 : : )
832 : : {
833 : 5 : gimple_seq *lseq = seq;
834 : 5 : if (lseq
835 : 3 : && (!single_use (captures[1])))
836 : 2 : lseq = NULL;
837 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail286;
838 : 5 : {
839 : 5 : res_op->set_op (BIT_IOR_EXPR, type, 2);
840 : 5 : res_op->ops[0] = captures[0];
841 : 5 : {
842 : 5 : tree _o1[1], _r1;
843 : 5 : _o1[0] = captures[3];
844 : 5 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
845 : 5 : tem_op.resimplify (lseq, valueize);
846 : 5 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
847 : 5 : if (!_r1) goto next_after_fail286;
848 : 3 : res_op->ops[1] = _r1;
849 : : }
850 : 3 : res_op->resimplify (lseq, valueize);
851 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 177, __FILE__, __LINE__, true);
852 : 3 : return true;
853 : : }
854 : 19310 : next_after_fail286:;
855 : : }
856 : : }
857 : 19310 : return false;
858 : : }
859 : :
860 : : bool
861 : 1 : gimple_simplify_115 (gimple_match_op *res_op, gimple_seq *seq,
862 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
863 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
864 : : {
865 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
866 : 1 : gimple_seq *lseq = seq;
867 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail297;
868 : 1 : {
869 : 1 : tree tem;
870 : 1 : tem = captures[2];
871 : 1 : res_op->set_value (tem);
872 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 182, __FILE__, __LINE__, true);
873 : : return true;
874 : : }
875 : 0 : next_after_fail297:;
876 : 0 : return false;
877 : : }
878 : :
879 : : bool
880 : 0 : gimple_simplify_122 (gimple_match_op *res_op, gimple_seq *seq,
881 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
882 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
883 : : {
884 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
885 : 0 : gimple_seq *lseq = seq;
886 : 0 : if (lseq
887 : 0 : && (!single_use (captures[0])
888 : 0 : || !single_use (captures[3])
889 : 0 : || !single_use (captures[4])))
890 : 0 : lseq = NULL;
891 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail304;
892 : 0 : {
893 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
894 : 0 : {
895 : 0 : tree _o1[2], _r1;
896 : 0 : _o1[0] = captures[1];
897 : 0 : _o1[1] = captures[2];
898 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
899 : 0 : tem_op.resimplify (lseq, valueize);
900 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
901 : 0 : if (!_r1) goto next_after_fail304;
902 : 0 : res_op->ops[0] = _r1;
903 : : }
904 : 0 : res_op->resimplify (lseq, valueize);
905 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 189, __FILE__, __LINE__, true);
906 : : return true;
907 : : }
908 : : next_after_fail304:;
909 : : return false;
910 : : }
911 : :
912 : : bool
913 : 1251704 : gimple_simplify_131 (gimple_match_op *res_op, gimple_seq *seq,
914 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
915 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
916 : : const enum tree_code ARG_UNUSED (bitop),
917 : : const enum tree_code ARG_UNUSED (rbitop))
918 : : {
919 : 1251704 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
920 : 1251704 : {
921 : 1251704 : bool wascmp;
922 : 1251704 : if (bitwise_inverted_equal_p (captures[2], captures[0], wascmp)
923 : 1251704 : && (!wascmp || element_precision (type) == 1)
924 : : )
925 : : {
926 : 2778 : gimple_seq *lseq = seq;
927 : 2778 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail317;
928 : 2778 : {
929 : 2778 : res_op->set_op (bitop, type, 2);
930 : 2778 : res_op->ops[0] = captures[2];
931 : 2778 : res_op->ops[1] = captures[1];
932 : 2778 : res_op->resimplify (lseq, valueize);
933 : 2778 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 195, __FILE__, __LINE__, true);
934 : 2778 : return true;
935 : : }
936 : 0 : next_after_fail317:;
937 : : }
938 : : }
939 : 1248926 : return false;
940 : : }
941 : :
942 : : bool
943 : 222534 : gimple_simplify_135 (gimple_match_op *res_op, gimple_seq *seq,
944 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
945 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
946 : : const enum tree_code ARG_UNUSED (op))
947 : : {
948 : 222534 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
949 : 222534 : if (bitwise_equal_p (captures[4], captures[7])
950 : : )
951 : : {
952 : 128 : gimple_seq *lseq = seq;
953 : 128 : if (lseq
954 : 77 : && (!single_use (captures[0])
955 : 77 : || !single_use (captures[1])
956 : 77 : || !single_use (captures[2])
957 : 49 : || !single_use (captures[3])))
958 : 79 : lseq = NULL;
959 : 128 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail321;
960 : 128 : {
961 : 128 : res_op->set_op (NOP_EXPR, type, 1);
962 : 128 : {
963 : 128 : tree _o1[2], _r1;
964 : 128 : {
965 : 128 : tree _o2[2], _r2;
966 : 128 : _o2[0] = captures[5];
967 : 128 : {
968 : 128 : tree _o3[1], _r3;
969 : 128 : _o3[0] = captures[6];
970 : 128 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o3[0])
971 : 128 : && !useless_type_conversion_p (TREE_TYPE (_o2[0]), TREE_TYPE (_o3[0])))
972 : : {
973 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
974 : 0 : tem_op.resimplify (lseq, valueize);
975 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
976 : 0 : if (!_r3) goto next_after_fail321;
977 : : }
978 : : else
979 : : _r3 = _o3[0];
980 : 128 : _o2[1] = _r3;
981 : : }
982 : 128 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
983 : 128 : tem_op.resimplify (lseq, valueize);
984 : 128 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
985 : 128 : if (!_r2) goto next_after_fail321;
986 : 49 : _o1[0] = _r2;
987 : : }
988 : 49 : {
989 : 49 : tree _o2[1], _r2;
990 : 49 : _o2[0] = captures[4];
991 : 49 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0])
992 : 49 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
993 : : {
994 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
995 : 0 : tem_op.resimplify (lseq, valueize);
996 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
997 : 0 : if (!_r2) goto next_after_fail321;
998 : : }
999 : : else
1000 : : _r2 = _o2[0];
1001 : 49 : _o1[1] = _r2;
1002 : : }
1003 : 49 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1004 : 49 : tem_op.resimplify (lseq, valueize);
1005 : 49 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1006 : 49 : if (!_r1) goto next_after_fail321;
1007 : 49 : res_op->ops[0] = _r1;
1008 : : }
1009 : 49 : res_op->resimplify (lseq, valueize);
1010 : 49 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 198, __FILE__, __LINE__, true);
1011 : 49 : return true;
1012 : : }
1013 : : next_after_fail321:;
1014 : : }
1015 : : return false;
1016 : : }
1017 : :
1018 : : bool
1019 : 172 : gimple_simplify_149 (gimple_match_op *res_op, gimple_seq *seq,
1020 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1021 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1022 : : const enum tree_code ARG_UNUSED (code2),
1023 : : const enum tree_code ARG_UNUSED (code1))
1024 : : {
1025 : 172 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1026 : 172 : if ((TREE_CODE (captures[2]) == INTEGER_CST
1027 : 172 : && TREE_CODE (captures[5]) == INTEGER_CST)
1028 : 279 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1029 : 2 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
1030 : 107 : && bitwise_equal_p (captures[2], captures[5]))
1031 : : )
1032 : : {
1033 : 65 : {
1034 : 65 : bool one_before = false;
1035 : 65 : bool one_after = false;
1036 : 65 : int cmp = 0;
1037 : 65 : bool allbits = true;
1038 : 65 : if (TREE_CODE (captures[2]) == INTEGER_CST
1039 : 65 : && TREE_CODE (captures[5]) == INTEGER_CST)
1040 : : {
1041 : 65 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
1042 : 65 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
1043 : 65 : auto t2 = wi::to_wide (captures[5]);
1044 : 65 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
1045 : 65 : if (cmp < 0
1046 : 65 : && t1 == t2 - 1)
1047 : : one_before = true;
1048 : 65 : if (cmp > 0
1049 : 65 : && t1 == t2 + 1)
1050 : : one_after = true;
1051 : : }
1052 : 65 : bool val;
1053 : 65 : switch (code2)
1054 : : {
1055 : 0 : case EQ_EXPR: val = (cmp == 0); break;
1056 : 0 : case NE_EXPR: val = (cmp != 0); break;
1057 : 0 : case LT_EXPR: val = (cmp < 0); break;
1058 : 62 : case GT_EXPR: val = (cmp > 0); break;
1059 : 3 : case LE_EXPR: val = (cmp <= 0); break;
1060 : 0 : case GE_EXPR: val = (cmp >= 0); break;
1061 : 0 : default: gcc_unreachable ();
1062 : : }
1063 : 65 : if (code1 == EQ_EXPR && val
1064 : : )
1065 : : {
1066 : 0 : gimple_seq *lseq = seq;
1067 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail339;
1068 : 0 : {
1069 : 0 : tree tem;
1070 : 0 : tem = captures[3];
1071 : 0 : res_op->set_value (tem);
1072 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 212, __FILE__, __LINE__, true);
1073 : 0 : return true;
1074 : : }
1075 : 0 : next_after_fail339:;
1076 : : }
1077 : : else
1078 : : {
1079 : 65 : if (code1 == NE_EXPR && val && allbits
1080 : : )
1081 : : {
1082 : 0 : gimple_seq *lseq = seq;
1083 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail340;
1084 : 0 : {
1085 : 0 : tree tem;
1086 : 0 : tem = constant_boolean_node (true, type);
1087 : 0 : res_op->set_value (tem);
1088 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 213, __FILE__, __LINE__, true);
1089 : 0 : return true;
1090 : : }
1091 : 0 : next_after_fail340:;
1092 : 0 : }
1093 : : else
1094 : : {
1095 : 65 : if (code1 == NE_EXPR && !val && allbits
1096 : : )
1097 : : {
1098 : 0 : gimple_seq *lseq = seq;
1099 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail341;
1100 : 0 : {
1101 : 0 : tree tem;
1102 : 0 : tem = captures[0];
1103 : 0 : res_op->set_value (tem);
1104 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 214, __FILE__, __LINE__, true);
1105 : 0 : return true;
1106 : : }
1107 : 0 : next_after_fail341:;
1108 : 0 : }
1109 : : else
1110 : : {
1111 : 65 : if (code1 == EQ_EXPR
1112 : 65 : && code2 == GT_EXPR
1113 : 62 : && cmp == 0
1114 : 62 : && allbits
1115 : : )
1116 : : {
1117 : 62 : gimple_seq *lseq = seq;
1118 : 62 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail342;
1119 : 62 : {
1120 : 62 : res_op->set_op (GE_EXPR, type, 2);
1121 : 62 : res_op->ops[0] = captures[4];
1122 : 62 : res_op->ops[1] = captures[5];
1123 : 62 : res_op->resimplify (lseq, valueize);
1124 : 62 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 215, __FILE__, __LINE__, true);
1125 : 62 : return true;
1126 : : }
1127 : 0 : next_after_fail342:;
1128 : 0 : }
1129 : : else
1130 : : {
1131 : 3 : if (code1 == EQ_EXPR
1132 : 3 : && code2 == LT_EXPR
1133 : 0 : && cmp == 0
1134 : 0 : && allbits
1135 : : )
1136 : : {
1137 : 0 : gimple_seq *lseq = seq;
1138 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail343;
1139 : 0 : {
1140 : 0 : res_op->set_op (LE_EXPR, type, 2);
1141 : 0 : res_op->ops[0] = captures[4];
1142 : 0 : res_op->ops[1] = captures[5];
1143 : 0 : res_op->resimplify (lseq, valueize);
1144 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 216, __FILE__, __LINE__, true);
1145 : 0 : return true;
1146 : : }
1147 : 0 : next_after_fail343:;
1148 : 0 : }
1149 : : else
1150 : : {
1151 : 3 : if (code1 == EQ_EXPR
1152 : 3 : && code2 == GE_EXPR
1153 : : && one_before
1154 : 0 : && allbits
1155 : : )
1156 : : {
1157 : 0 : gimple_seq *lseq = seq;
1158 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail344;
1159 : 0 : {
1160 : 0 : res_op->set_op (GE_EXPR, type, 2);
1161 : 0 : res_op->ops[0] = captures[4];
1162 : 0 : {
1163 : 0 : tree _o1[1], _r1;
1164 : 0 : _o1[0] = captures[2];
1165 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
1166 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
1167 : : {
1168 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
1169 : 0 : tem_op.resimplify (lseq, valueize);
1170 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1171 : 0 : if (!_r1) goto next_after_fail344;
1172 : : }
1173 : : else
1174 : : _r1 = _o1[0];
1175 : 0 : res_op->ops[1] = _r1;
1176 : : }
1177 : 0 : res_op->resimplify (lseq, valueize);
1178 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 217, __FILE__, __LINE__, true);
1179 : 0 : return true;
1180 : : }
1181 : : next_after_fail344:;
1182 : : }
1183 : : else
1184 : : {
1185 : 3 : if (code1 == EQ_EXPR
1186 : 3 : && code2 == LE_EXPR
1187 : : && one_after
1188 : 3 : && allbits
1189 : : )
1190 : : {
1191 : 0 : gimple_seq *lseq = seq;
1192 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail345;
1193 : 0 : {
1194 : 0 : res_op->set_op (LE_EXPR, type, 2);
1195 : 0 : res_op->ops[0] = captures[4];
1196 : 0 : {
1197 : 0 : tree _o1[1], _r1;
1198 : 0 : _o1[0] = captures[2];
1199 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
1200 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
1201 : : {
1202 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
1203 : 0 : tem_op.resimplify (lseq, valueize);
1204 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1205 : 0 : if (!_r1) goto next_after_fail345;
1206 : : }
1207 : : else
1208 : : _r1 = _o1[0];
1209 : 0 : res_op->ops[1] = _r1;
1210 : : }
1211 : 0 : res_op->resimplify (lseq, valueize);
1212 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 218, __FILE__, __LINE__, true);
1213 : 0 : return true;
1214 : : }
1215 : : next_after_fail345:;
1216 : : }
1217 : : }
1218 : : }
1219 : : }
1220 : : }
1221 : : }
1222 : : }
1223 : : }
1224 : : }
1225 : : return false;
1226 : : }
1227 : :
1228 : : bool
1229 : 0 : gimple_simplify_180 (gimple_match_op *res_op, gimple_seq *seq,
1230 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1231 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1232 : : {
1233 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1234 : 0 : if (!tree_expr_maybe_nan_p (captures[0]) && !HONOR_SIGNED_ZEROS (type)
1235 : : )
1236 : : {
1237 : 0 : gimple_seq *lseq = seq;
1238 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail402;
1239 : 0 : {
1240 : 0 : res_op->set_op (NOP_EXPR, type, 1);
1241 : 0 : {
1242 : 0 : tree _o1[1], _r1;
1243 : 0 : _o1[0] = captures[0];
1244 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
1245 : 0 : tem_op.resimplify (lseq, valueize);
1246 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1247 : 0 : if (!_r1) goto next_after_fail402;
1248 : 0 : res_op->ops[0] = _r1;
1249 : : }
1250 : 0 : res_op->resimplify (lseq, valueize);
1251 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 233, __FILE__, __LINE__, true);
1252 : 0 : return true;
1253 : : }
1254 : : next_after_fail402:;
1255 : : }
1256 : : return false;
1257 : : }
1258 : :
1259 : : bool
1260 : 4 : gimple_simplify_191 (gimple_match_op *res_op, gimple_seq *seq,
1261 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1262 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1263 : : {
1264 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1265 : 4 : if (INTEGRAL_TYPE_P (type)
1266 : 4 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1267 : 8 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1268 : : )
1269 : : {
1270 : 4 : if (TYPE_UNSIGNED (type)
1271 : : )
1272 : : {
1273 : 2 : gimple_seq *lseq = seq;
1274 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail414;
1275 : 2 : {
1276 : 2 : res_op->set_op (ABSU_EXPR, type, 1);
1277 : 2 : res_op->ops[0] = captures[0];
1278 : 2 : res_op->resimplify (lseq, valueize);
1279 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 240, __FILE__, __LINE__, true);
1280 : 2 : return true;
1281 : : }
1282 : 0 : next_after_fail414:;
1283 : : }
1284 : : else
1285 : : {
1286 : 2 : gimple_seq *lseq = seq;
1287 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail415;
1288 : 2 : {
1289 : 2 : res_op->set_op (ABS_EXPR, type, 1);
1290 : 2 : res_op->ops[0] = captures[0];
1291 : 2 : res_op->resimplify (lseq, valueize);
1292 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 241, __FILE__, __LINE__, true);
1293 : 2 : return true;
1294 : : }
1295 : 0 : next_after_fail415:;
1296 : : }
1297 : : }
1298 : : return false;
1299 : : }
1300 : :
1301 : : bool
1302 : 31 : gimple_simplify_202 (gimple_match_op *res_op, gimple_seq *seq,
1303 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1304 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1305 : : const combined_fn ARG_UNUSED (POW))
1306 : : {
1307 : 31 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1308 : 31 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
1309 : : )
1310 : : {
1311 : 0 : gimple_seq *lseq = seq;
1312 : 0 : if (lseq
1313 : 0 : && (!single_use (captures[0])
1314 : 0 : || !single_use (captures[3])))
1315 : 0 : lseq = NULL;
1316 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail427;
1317 : 0 : {
1318 : 0 : res_op->set_op (POW, type, 2);
1319 : 0 : {
1320 : 0 : tree _o1[2], _r1;
1321 : 0 : _o1[0] = captures[1];
1322 : 0 : _o1[1] = captures[4];
1323 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1324 : 0 : tem_op.resimplify (lseq, valueize);
1325 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1326 : 0 : if (!_r1) goto next_after_fail427;
1327 : 0 : res_op->ops[0] = _r1;
1328 : : }
1329 : 0 : res_op->ops[1] = captures[2];
1330 : 0 : res_op->resimplify (lseq, valueize);
1331 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 252, __FILE__, __LINE__, true);
1332 : 0 : return true;
1333 : : }
1334 : : next_after_fail427:;
1335 : : }
1336 : : return false;
1337 : : }
1338 : :
1339 : : bool
1340 : 73429 : gimple_simplify_211 (gimple_match_op *res_op, gimple_seq *seq,
1341 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1342 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1343 : : const enum tree_code ARG_UNUSED (op))
1344 : : {
1345 : 73429 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1346 : 146858 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1347 : 143558 : && (TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
1348 : 46660 : || TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[2])))
1349 : 71747 : && (CONSTANT_CLASS_P (captures[2]) || (single_use (captures[1]) && single_use (captures[0])))
1350 : 8125 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
1351 : 153333 : && tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[3]))
1352 : : )
1353 : : {
1354 : 8093 : gimple_seq *lseq = seq;
1355 : 8093 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail439;
1356 : 8093 : {
1357 : 8093 : res_op->set_op (op, type, 2);
1358 : 8093 : res_op->ops[0] = captures[2];
1359 : 8093 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[2]));
1360 : 8093 : res_op->resimplify (lseq, valueize);
1361 : 8093 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 263, __FILE__, __LINE__, true);
1362 : 8093 : return true;
1363 : : }
1364 : 0 : next_after_fail439:;
1365 : : }
1366 : : return false;
1367 : : }
1368 : :
1369 : : bool
1370 : 18 : gimple_simplify_217 (gimple_match_op *res_op, gimple_seq *seq,
1371 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1372 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1373 : : const enum tree_code ARG_UNUSED (op))
1374 : : {
1375 : 18 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1376 : 18 : if (!TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
1377 : : )
1378 : : {
1379 : 18 : gimple_seq *lseq = seq;
1380 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail458;
1381 : 18 : {
1382 : 18 : res_op->set_op (op, type, 2);
1383 : 18 : res_op->ops[0] = captures[3];
1384 : 18 : res_op->ops[1] = captures[2];
1385 : 18 : res_op->resimplify (lseq, valueize);
1386 : 18 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 282, __FILE__, __LINE__, true);
1387 : 18 : return true;
1388 : : }
1389 : 0 : next_after_fail458:;
1390 : : }
1391 : : return false;
1392 : : }
1393 : :
1394 : : bool
1395 : 186 : gimple_simplify_224 (gimple_match_op *res_op, gimple_seq *seq,
1396 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1397 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1398 : : const enum tree_code ARG_UNUSED (cmp1),
1399 : : const enum tree_code ARG_UNUSED (cmp2),
1400 : : const enum tree_code ARG_UNUSED (rcmp))
1401 : : {
1402 : 186 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1403 : 186 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
1404 : : )
1405 : : {
1406 : 186 : gimple_seq *lseq = seq;
1407 : 186 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail465;
1408 : 186 : {
1409 : 186 : res_op->set_op (rcmp, type, 2);
1410 : 186 : res_op->ops[0] = captures[0];
1411 : 186 : res_op->ops[1] = captures[1];
1412 : 186 : res_op->resimplify (lseq, valueize);
1413 : 186 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 288, __FILE__, __LINE__, true);
1414 : 186 : return true;
1415 : : }
1416 : 0 : next_after_fail465:;
1417 : : }
1418 : : return false;
1419 : : }
1420 : :
1421 : : bool
1422 : 8 : gimple_simplify_230 (gimple_match_op *res_op, gimple_seq *seq,
1423 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1424 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1425 : : const enum tree_code ARG_UNUSED (cmp),
1426 : : const enum tree_code ARG_UNUSED (icmp))
1427 : : {
1428 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1429 : 8 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1430 : : )
1431 : : {
1432 : 8 : gimple_seq *lseq = seq;
1433 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail475;
1434 : 8 : {
1435 : 8 : res_op->set_op (icmp, type, 2);
1436 : 8 : res_op->ops[0] = captures[0];
1437 : 8 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[0]),
1438 : 8 : wi::exact_log2 (wi::to_wide (captures[1])));
1439 : 8 : res_op->resimplify (lseq, valueize);
1440 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 298, __FILE__, __LINE__, true);
1441 : 8 : return true;
1442 : : }
1443 : 0 : next_after_fail475:;
1444 : : }
1445 : : return false;
1446 : : }
1447 : :
1448 : : bool
1449 : 646 : gimple_simplify_234 (gimple_match_op *res_op, gimple_seq *seq,
1450 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1451 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1452 : : const enum tree_code ARG_UNUSED (cmp))
1453 : : {
1454 : 646 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1455 : 646 : {
1456 : 646 : int cand = wi::ctz (wi::to_wide (captures[2])) - wi::ctz (wi::to_wide (captures[0]));
1457 : 1292 : if (cand < 0
1458 : 646 : || (!integer_zerop (captures[2])
1459 : 761 : && wi::lshift (wi::to_wide (captures[0]), cand) != wi::to_wide (captures[2]))
1460 : : )
1461 : : {
1462 : 0 : gimple_seq *lseq = seq;
1463 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail486;
1464 : 0 : {
1465 : 0 : tree tem;
1466 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
1467 : 0 : res_op->set_value (tem);
1468 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 309, __FILE__, __LINE__, true);
1469 : 115 : return true;
1470 : : }
1471 : 0 : next_after_fail486:;
1472 : : }
1473 : : else
1474 : : {
1475 : 646 : if (!integer_zerop (captures[2])
1476 : 646 : && wi::lshift (wi::to_wide (captures[0]), cand) == wi::to_wide (captures[2])
1477 : : )
1478 : : {
1479 : 115 : gimple_seq *lseq = seq;
1480 : 115 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail487;
1481 : 115 : {
1482 : 115 : res_op->set_op (cmp, type, 2);
1483 : 115 : res_op->ops[0] = captures[1];
1484 : 115 : res_op->ops[1] = build_int_cst (TREE_TYPE (captures[1]), cand);
1485 : 115 : res_op->resimplify (lseq, valueize);
1486 : 115 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 310, __FILE__, __LINE__, true);
1487 : 115 : return true;
1488 : : }
1489 : 0 : next_after_fail487:;
1490 : : }
1491 : : }
1492 : : }
1493 : 531 : return false;
1494 : : }
1495 : :
1496 : : bool
1497 : 47197 : gimple_simplify_244 (gimple_match_op *res_op, gimple_seq *seq,
1498 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1499 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1500 : : const enum tree_code ARG_UNUSED (cmp))
1501 : : {
1502 : 47197 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1503 : 47197 : if (single_use (captures[0])
1504 : : )
1505 : : {
1506 : 17405 : gimple_seq *lseq = seq;
1507 : 17405 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail498;
1508 : 17405 : {
1509 : 17405 : res_op->set_op (cmp, type, 2);
1510 : 17405 : res_op->ops[0] = captures[1];
1511 : 17405 : res_op->ops[1] = captures[2];
1512 : 17405 : res_op->resimplify (lseq, valueize);
1513 : 17405 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 320, __FILE__, __LINE__, true);
1514 : 17405 : return true;
1515 : : }
1516 : 0 : next_after_fail498:;
1517 : : }
1518 : : return false;
1519 : : }
1520 : :
1521 : : bool
1522 : 0 : gimple_simplify_248 (gimple_match_op *res_op, gimple_seq *seq,
1523 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1524 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1525 : : const enum tree_code ARG_UNUSED (cmp))
1526 : : {
1527 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1528 : 0 : gimple_seq *lseq = seq;
1529 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail507;
1530 : 0 : {
1531 : 0 : tree tem;
1532 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
1533 : 0 : res_op->set_value (tem);
1534 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 329, __FILE__, __LINE__, true);
1535 : : return true;
1536 : : }
1537 : 0 : next_after_fail507:;
1538 : 0 : return false;
1539 : : }
1540 : :
1541 : : bool
1542 : 5498422 : gimple_simplify_252 (gimple_match_op *res_op, gimple_seq *seq,
1543 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1544 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1545 : : const enum tree_code ARG_UNUSED (cmp))
1546 : : {
1547 : 5498422 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1548 : 5498422 : if (REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[1]))
1549 : : )
1550 : : {
1551 : 730 : gimple_seq *lseq = seq;
1552 : 730 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail511;
1553 : 730 : {
1554 : 730 : res_op->set_op (cmp, type, 2);
1555 : 730 : res_op->ops[0] = captures[0];
1556 : 730 : res_op->ops[1] = build_real (TREE_TYPE (captures[1]), dconst0);
1557 : 730 : res_op->resimplify (lseq, valueize);
1558 : 730 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 332, __FILE__, __LINE__, true);
1559 : 730 : return true;
1560 : : }
1561 : 0 : next_after_fail511:;
1562 : : }
1563 : : else
1564 : : {
1565 : 5497692 : if (TREE_CODE (captures[0]) == REAL_CST
1566 : 5497692 : && REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (captures[0]))
1567 : : )
1568 : : {
1569 : 0 : gimple_seq *lseq = seq;
1570 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail512;
1571 : 0 : {
1572 : 0 : res_op->set_op (cmp, type, 2);
1573 : 0 : res_op->ops[0] = build_real (TREE_TYPE (captures[0]), dconst0);
1574 : 0 : res_op->ops[1] = captures[1];
1575 : 0 : res_op->resimplify (lseq, valueize);
1576 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 333, __FILE__, __LINE__, true);
1577 : 0 : return true;
1578 : : }
1579 : 0 : next_after_fail512:;
1580 : : }
1581 : : else
1582 : : {
1583 : 5497692 : if (REAL_VALUE_ISNAN (TREE_REAL_CST (captures[1]))
1584 : 1530 : && (cmp == EQ_EXPR || cmp == NE_EXPR || !flag_trapping_math)
1585 : 115 : && !tree_expr_signaling_nan_p (captures[1])
1586 : 5497707 : && !tree_expr_maybe_signaling_nan_p (captures[0])
1587 : : )
1588 : : {
1589 : 15 : gimple_seq *lseq = seq;
1590 : 15 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail513;
1591 : 15 : {
1592 : 15 : tree tem;
1593 : 15 : tem = constant_boolean_node (cmp == NE_EXPR, type);
1594 : 15 : res_op->set_value (tem);
1595 : 15 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 334, __FILE__, __LINE__, true);
1596 : 15 : return true;
1597 : : }
1598 : 0 : next_after_fail513:;
1599 : : }
1600 : : else
1601 : : {
1602 : 5497677 : if (TREE_CODE (captures[0]) == REAL_CST
1603 : 3322 : && REAL_VALUE_ISNAN (TREE_REAL_CST (captures[0]))
1604 : 2396 : && (cmp == EQ_EXPR || cmp == NE_EXPR || !flag_trapping_math)
1605 : 0 : && !tree_expr_signaling_nan_p (captures[0])
1606 : 5497677 : && !tree_expr_signaling_nan_p (captures[1])
1607 : : )
1608 : : {
1609 : 0 : gimple_seq *lseq = seq;
1610 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail514;
1611 : 0 : {
1612 : 0 : tree tem;
1613 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
1614 : 0 : res_op->set_value (tem);
1615 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 335, __FILE__, __LINE__, true);
1616 : 0 : return true;
1617 : : }
1618 : 0 : next_after_fail514:;
1619 : : }
1620 : : else
1621 : : {
1622 : 5497677 : if (REAL_VALUE_ISINF (TREE_REAL_CST (captures[1]))
1623 : 5872922 : && MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (captures[1])))
1624 : : )
1625 : : {
1626 : 125082 : {
1627 : 125082 : REAL_VALUE_TYPE max;
1628 : 125082 : enum tree_code code = cmp;
1629 : 125082 : bool neg = REAL_VALUE_NEGATIVE (TREE_REAL_CST (captures[1]));
1630 : 125082 : if (neg)
1631 : 42467 : code = swap_tree_comparison (code);
1632 : 125082 : if (code == GT_EXPR
1633 : 125082 : && !(HONOR_NANS (captures[0]) && flag_trapping_math)
1634 : : )
1635 : : {
1636 : 0 : gimple_seq *lseq = seq;
1637 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail515;
1638 : 0 : {
1639 : 0 : tree tem;
1640 : 0 : tem = constant_boolean_node (false, type);
1641 : 0 : res_op->set_value (tem);
1642 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 336, __FILE__, __LINE__, true);
1643 : 2916 : return true;
1644 : : }
1645 : 0 : next_after_fail515:;
1646 : : }
1647 : : else
1648 : : {
1649 : 125082 : if (code == LE_EXPR
1650 : : )
1651 : : {
1652 : 91302 : if (! HONOR_NANS (captures[0])
1653 : : )
1654 : : {
1655 : 0 : gimple_seq *lseq = seq;
1656 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail516;
1657 : 0 : {
1658 : 0 : tree tem;
1659 : 0 : tem = constant_boolean_node (true, type);
1660 : 0 : res_op->set_value (tem);
1661 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 337, __FILE__, __LINE__, true);
1662 : 0 : return true;
1663 : : }
1664 : 0 : next_after_fail516:;
1665 : : }
1666 : : else
1667 : : {
1668 : 91302 : if (!flag_trapping_math
1669 : : )
1670 : : {
1671 : 0 : gimple_seq *lseq = seq;
1672 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail517;
1673 : 0 : {
1674 : 0 : res_op->set_op (EQ_EXPR, type, 2);
1675 : 0 : res_op->ops[0] = captures[0];
1676 : 0 : res_op->ops[1] = captures[0];
1677 : 0 : res_op->resimplify (lseq, valueize);
1678 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 338, __FILE__, __LINE__, true);
1679 : 0 : return true;
1680 : : }
1681 : 0 : next_after_fail517:;
1682 : : }
1683 : : }
1684 : : }
1685 : : else
1686 : : {
1687 : 29206 : if ((code == EQ_EXPR && !(HONOR_NANS (captures[0]) && flag_trapping_math))
1688 : 62986 : || code == GE_EXPR
1689 : : )
1690 : : {
1691 : 24 : {
1692 : 24 : real_maxval (&max, neg, TYPE_MODE (TREE_TYPE (captures[0])));
1693 : 24 : if (neg
1694 : : )
1695 : : {
1696 : 0 : gimple_seq *lseq = seq;
1697 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail518;
1698 : 0 : {
1699 : 0 : res_op->set_op (LT_EXPR, type, 2);
1700 : 0 : res_op->ops[0] = captures[0];
1701 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1702 : 0 : res_op->resimplify (lseq, valueize);
1703 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 339, __FILE__, __LINE__, true);
1704 : 0 : return true;
1705 : : }
1706 : 0 : next_after_fail518:;
1707 : : }
1708 : : else
1709 : : {
1710 : 24 : gimple_seq *lseq = seq;
1711 : 24 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail519;
1712 : 24 : {
1713 : 24 : res_op->set_op (GT_EXPR, type, 2);
1714 : 24 : res_op->ops[0] = captures[0];
1715 : 24 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1716 : 24 : res_op->resimplify (lseq, valueize);
1717 : 24 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 340, __FILE__, __LINE__, true);
1718 : 24 : return true;
1719 : : }
1720 : 0 : next_after_fail519:;
1721 : : }
1722 : : }
1723 : : }
1724 : : else
1725 : : {
1726 : 33756 : if (code == LT_EXPR
1727 : : )
1728 : : {
1729 : 1547 : {
1730 : 1547 : real_maxval (&max, neg, TYPE_MODE (TREE_TYPE (captures[0])));
1731 : 1547 : if (neg
1732 : : )
1733 : : {
1734 : 805 : gimple_seq *lseq = seq;
1735 : 805 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail520;
1736 : 805 : {
1737 : 805 : res_op->set_op (GE_EXPR, type, 2);
1738 : 805 : res_op->ops[0] = captures[0];
1739 : 805 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1740 : 805 : res_op->resimplify (lseq, valueize);
1741 : 805 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 341, __FILE__, __LINE__, true);
1742 : 805 : return true;
1743 : : }
1744 : 0 : next_after_fail520:;
1745 : : }
1746 : : else
1747 : : {
1748 : 742 : gimple_seq *lseq = seq;
1749 : 742 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail521;
1750 : 742 : {
1751 : 742 : res_op->set_op (LE_EXPR, type, 2);
1752 : 742 : res_op->ops[0] = captures[0];
1753 : 742 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1754 : 742 : res_op->resimplify (lseq, valueize);
1755 : 742 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 342, __FILE__, __LINE__, true);
1756 : 742 : return true;
1757 : : }
1758 : 0 : next_after_fail521:;
1759 : : }
1760 : : }
1761 : : }
1762 : : else
1763 : : {
1764 : 32209 : if (code == NE_EXPR
1765 : : )
1766 : : {
1767 : 1345 : {
1768 : 1345 : real_maxval (&max, neg, TYPE_MODE (TREE_TYPE (captures[0])));
1769 : 1345 : if (! HONOR_NANS (captures[0])
1770 : : )
1771 : : {
1772 : 0 : if (neg
1773 : : )
1774 : : {
1775 : 0 : gimple_seq *lseq = seq;
1776 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail522;
1777 : 0 : {
1778 : 0 : res_op->set_op (GE_EXPR, type, 2);
1779 : 0 : res_op->ops[0] = captures[0];
1780 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1781 : 0 : res_op->resimplify (lseq, valueize);
1782 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 343, __FILE__, __LINE__, true);
1783 : 0 : return true;
1784 : : }
1785 : 0 : next_after_fail522:;
1786 : : }
1787 : : else
1788 : : {
1789 : 0 : gimple_seq *lseq = seq;
1790 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail523;
1791 : 0 : {
1792 : 0 : res_op->set_op (LE_EXPR, type, 2);
1793 : 0 : res_op->ops[0] = captures[0];
1794 : 0 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1795 : 0 : res_op->resimplify (lseq, valueize);
1796 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 344, __FILE__, __LINE__, true);
1797 : 0 : return true;
1798 : : }
1799 : 0 : next_after_fail523:;
1800 : : }
1801 : : }
1802 : : else
1803 : : {
1804 : 1345 : if (neg
1805 : : )
1806 : : {
1807 : 356 : gimple_seq *lseq = seq;
1808 : 356 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail524;
1809 : 356 : {
1810 : 356 : res_op->set_op (UNGE_EXPR, type, 2);
1811 : 356 : res_op->ops[0] = captures[0];
1812 : 356 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1813 : 356 : res_op->resimplify (lseq, valueize);
1814 : 356 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 345, __FILE__, __LINE__, true);
1815 : 356 : return true;
1816 : : }
1817 : 0 : next_after_fail524:;
1818 : : }
1819 : : else
1820 : : {
1821 : 989 : gimple_seq *lseq = seq;
1822 : 989 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail525;
1823 : 989 : {
1824 : 989 : res_op->set_op (UNLE_EXPR, type, 2);
1825 : 989 : res_op->ops[0] = captures[0];
1826 : 989 : res_op->ops[1] = build_real (TREE_TYPE (captures[0]), max);
1827 : 989 : res_op->resimplify (lseq, valueize);
1828 : 989 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 346, __FILE__, __LINE__, true);
1829 : 989 : return true;
1830 : : }
1831 : 0 : next_after_fail525:;
1832 : : }
1833 : : }
1834 : : }
1835 : : }
1836 : : }
1837 : : }
1838 : : }
1839 : : }
1840 : : }
1841 : : }
1842 : : }
1843 : : }
1844 : : }
1845 : : }
1846 : : return false;
1847 : : }
1848 : :
1849 : : bool
1850 : 187 : gimple_simplify_285 (gimple_match_op *res_op, gimple_seq *seq,
1851 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1852 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1853 : : const enum tree_code ARG_UNUSED (inner),
1854 : : const enum tree_code ARG_UNUSED (outer))
1855 : : {
1856 : 187 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1857 : 187 : {
1858 : 187 : bool cst1 = integer_onep (captures[1]);
1859 : 187 : bool cst0 = integer_zerop (captures[1]);
1860 : 187 : bool innereq = inner == EQ_EXPR;
1861 : 187 : bool outereq = outer == EQ_EXPR;
1862 : 273 : if (innereq ? cst0 : cst1
1863 : : )
1864 : : {
1865 : 53 : gimple_seq *lseq = seq;
1866 : 53 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail614;
1867 : 53 : {
1868 : 53 : tree tem;
1869 : 53 : tem = constant_boolean_node (!outereq, type);
1870 : 53 : res_op->set_value (tem);
1871 : 53 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 418, __FILE__, __LINE__, true);
1872 : 53 : return true;
1873 : : }
1874 : 0 : next_after_fail614:;
1875 : : }
1876 : : else
1877 : : {
1878 : 204 : if (innereq ? cst1 : cst0
1879 : : )
1880 : : {
1881 : 70 : {
1882 : 70 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
1883 : 70 : tree ucst1 = build_one_cst (utype);
1884 : 70 : if (!outereq
1885 : : )
1886 : : {
1887 : 35 : gimple_seq *lseq = seq;
1888 : 35 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail615;
1889 : 35 : {
1890 : 35 : res_op->set_op (GT_EXPR, type, 2);
1891 : 35 : {
1892 : 35 : tree _o1[1], _r1;
1893 : 35 : _o1[0] = captures[0];
1894 : 35 : if (utype != TREE_TYPE (_o1[0])
1895 : 35 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
1896 : : {
1897 : 31 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
1898 : 31 : tem_op.resimplify (lseq, valueize);
1899 : 31 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1900 : 31 : if (!_r1) goto next_after_fail615;
1901 : : }
1902 : : else
1903 : : _r1 = _o1[0];
1904 : 19 : res_op->ops[0] = _r1;
1905 : : }
1906 : 19 : res_op->ops[1] = ucst1;
1907 : 19 : res_op->resimplify (lseq, valueize);
1908 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 419, __FILE__, __LINE__, true);
1909 : 19 : return true;
1910 : : }
1911 : : next_after_fail615:;
1912 : : }
1913 : : else
1914 : : {
1915 : 35 : gimple_seq *lseq = seq;
1916 : 35 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail616;
1917 : 35 : {
1918 : 35 : res_op->set_op (LE_EXPR, type, 2);
1919 : 35 : {
1920 : 35 : tree _o1[1], _r1;
1921 : 35 : _o1[0] = captures[0];
1922 : 35 : if (utype != TREE_TYPE (_o1[0])
1923 : 35 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
1924 : : {
1925 : 31 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
1926 : 31 : tem_op.resimplify (lseq, valueize);
1927 : 31 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1928 : 31 : if (!_r1) goto next_after_fail616;
1929 : : }
1930 : : else
1931 : : _r1 = _o1[0];
1932 : 19 : res_op->ops[0] = _r1;
1933 : : }
1934 : 19 : res_op->ops[1] = ucst1;
1935 : 19 : res_op->resimplify (lseq, valueize);
1936 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 420, __FILE__, __LINE__, true);
1937 : 19 : return true;
1938 : : }
1939 : : next_after_fail616:;
1940 : : }
1941 : : }
1942 : : }
1943 : : else
1944 : : {
1945 : 64 : {
1946 : 64 : tree value = build_int_cst (TREE_TYPE (captures[0]), !innereq);
1947 : 64 : if (outereq
1948 : : )
1949 : : {
1950 : 32 : gimple_seq *lseq = seq;
1951 : 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail617;
1952 : 32 : {
1953 : 32 : res_op->set_op (EQ_EXPR, type, 2);
1954 : 32 : res_op->ops[0] = captures[0];
1955 : 32 : res_op->ops[1] = value;
1956 : 32 : res_op->resimplify (lseq, valueize);
1957 : 32 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 421, __FILE__, __LINE__, true);
1958 : 32 : return true;
1959 : : }
1960 : 0 : next_after_fail617:;
1961 : : }
1962 : : else
1963 : : {
1964 : 32 : gimple_seq *lseq = seq;
1965 : 32 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail618;
1966 : 32 : {
1967 : 32 : res_op->set_op (NE_EXPR, type, 2);
1968 : 32 : res_op->ops[0] = captures[0];
1969 : 32 : res_op->ops[1] = value;
1970 : 32 : res_op->resimplify (lseq, valueize);
1971 : 32 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 422, __FILE__, __LINE__, true);
1972 : 32 : return true;
1973 : : }
1974 : 0 : next_after_fail618:;
1975 : : }
1976 : : }
1977 : : }
1978 : : }
1979 : : }
1980 : : return false;
1981 : : }
1982 : :
1983 : : bool
1984 : 473550 : gimple_simplify_297 (gimple_match_op *res_op, gimple_seq *seq,
1985 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1986 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1987 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
1988 : : {
1989 : 473550 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1990 : 473550 : if (REAL_VALUE_NEGATIVE (TREE_REAL_CST (captures[0]))
1991 : : )
1992 : : {
1993 : 121 : gimple_seq *lseq = seq;
1994 : 121 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail638;
1995 : 121 : {
1996 : 121 : res_op->set_op (COPYSIGN_ALL, type, 2);
1997 : 121 : {
1998 : 121 : tree _o1[1], _r1;
1999 : 121 : _o1[0] = captures[0];
2000 : 121 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2001 : 121 : tem_op.resimplify (lseq, valueize);
2002 : 121 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2003 : 121 : if (!_r1) goto next_after_fail638;
2004 : 121 : res_op->ops[0] = _r1;
2005 : : }
2006 : 121 : res_op->ops[1] = captures[1];
2007 : 121 : res_op->resimplify (lseq, valueize);
2008 : 121 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 442, __FILE__, __LINE__, true);
2009 : 121 : return true;
2010 : : }
2011 : : next_after_fail638:;
2012 : : }
2013 : : return false;
2014 : : }
2015 : :
2016 : : bool
2017 : 395 : gimple_simplify_304 (gimple_match_op *res_op, gimple_seq *seq,
2018 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2019 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2020 : : {
2021 : 395 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2022 : 489 : if ((TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (captures[0]))
2023 : 310 : && (!VECTOR_TYPE_P (type)
2024 : 0 : || target_supports_op_p (type, RSHIFT_EXPR, optab_vector)
2025 : 0 : || target_supports_op_p (type, RSHIFT_EXPR, optab_scalar))
2026 : 705 : && (useless_type_conversion_p (type, TREE_TYPE (captures[2]))
2027 : 260 : || (element_precision (type) >= element_precision (TREE_TYPE (captures[2]))
2028 : 260 : && (TYPE_UNSIGNED (TREE_TYPE (captures[2]))
2029 : 456 : || (element_precision (type)
2030 : 228 : == element_precision (TREE_TYPE (captures[2])))
2031 : 216 : || (INTEGRAL_TYPE_P (type)
2032 : 432 : && (tree_nonzero_bits (captures[0])
2033 : 1259 : & wi::mask (element_precision (TREE_TYPE (captures[2])) - 1,
2034 : : true,
2035 : 827 : element_precision (type))) == 0))))
2036 : : )
2037 : : {
2038 : 110 : if (!VECTOR_TYPE_P (type)
2039 : 110 : && useless_type_conversion_p (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
2040 : 160 : && element_precision (TREE_TYPE (captures[1])) < element_precision (type)
2041 : : )
2042 : : {
2043 : 0 : gimple_seq *lseq = seq;
2044 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail647;
2045 : 0 : {
2046 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2047 : 0 : {
2048 : 0 : tree _o1[2], _r1;
2049 : 0 : _o1[0] = captures[1];
2050 : 0 : _o1[1] = captures[3];
2051 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2052 : 0 : tem_op.resimplify (lseq, valueize);
2053 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2054 : 0 : if (!_r1) goto next_after_fail647;
2055 : 0 : res_op->ops[0] = _r1;
2056 : : }
2057 : 0 : res_op->resimplify (lseq, valueize);
2058 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 449, __FILE__, __LINE__, true);
2059 : 0 : return true;
2060 : : }
2061 : : next_after_fail647:;
2062 : : }
2063 : : else
2064 : : {
2065 : 110 : gimple_seq *lseq = seq;
2066 : 110 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail648;
2067 : 110 : {
2068 : 110 : res_op->set_op (RSHIFT_EXPR, type, 2);
2069 : 110 : res_op->ops[0] = captures[0];
2070 : 110 : res_op->ops[1] = captures[3];
2071 : 110 : res_op->resimplify (lseq, valueize);
2072 : 110 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 450, __FILE__, __LINE__, true);
2073 : 110 : return true;
2074 : : }
2075 : 0 : next_after_fail648:;
2076 : : }
2077 : : }
2078 : : return false;
2079 : : }
2080 : :
2081 : : bool
2082 : 1887 : gimple_simplify_320 (gimple_match_op *res_op, gimple_seq *seq,
2083 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2084 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2085 : : const enum tree_code ARG_UNUSED (mod))
2086 : : {
2087 : 1887 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2088 : 1887 : gimple_seq *lseq = seq;
2089 : 1887 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail668;
2090 : 1887 : {
2091 : 1887 : tree tem;
2092 : 1887 : tem = build_zero_cst (type);
2093 : 1887 : res_op->set_value (tem);
2094 : 1887 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 470, __FILE__, __LINE__, true);
2095 : : return true;
2096 : : }
2097 : 0 : next_after_fail668:;
2098 : 0 : return false;
2099 : : }
2100 : :
2101 : : bool
2102 : 10781 : gimple_simplify_324 (gimple_match_op *res_op, gimple_seq *seq,
2103 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2104 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2105 : : const enum tree_code ARG_UNUSED (mod))
2106 : : {
2107 : 10781 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2108 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
2109 : 10781 : && TYPE_OVERFLOW_UNDEFINED (type)
2110 : 21562 : && wi::multiple_of_p (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
2111 : 2310 : TYPE_SIGN (type))
2112 : : )
2113 : : {
2114 : 26 : gimple_seq *lseq = seq;
2115 : 26 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail672;
2116 : 26 : {
2117 : 26 : tree tem;
2118 : 26 : tem = build_zero_cst (type);
2119 : 26 : res_op->set_value (tem);
2120 : 26 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 474, __FILE__, __LINE__, true);
2121 : 26 : return true;
2122 : : }
2123 : 0 : next_after_fail672:;
2124 : : }
2125 : : return false;
2126 : : }
2127 : :
2128 : : bool
2129 : 0 : gimple_simplify_334 (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 combined_fn ARG_UNUSED (POW))
2133 : : {
2134 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2135 : 0 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
2136 : : )
2137 : : {
2138 : 0 : if (!TREE_OVERFLOW (captures[2])
2139 : : )
2140 : : {
2141 : 0 : gimple_seq *lseq = seq;
2142 : 0 : if (lseq
2143 : 0 : && (!single_use (captures[0])))
2144 : 0 : lseq = NULL;
2145 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail684;
2146 : 0 : {
2147 : 0 : res_op->set_op (POW, type, 2);
2148 : 0 : res_op->ops[0] = captures[1];
2149 : 0 : {
2150 : 0 : tree _o1[2], _r1;
2151 : 0 : _o1[0] = captures[2];
2152 : 0 : _o1[1] = build_one_cst (type);
2153 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2154 : 0 : tem_op.resimplify (lseq, valueize);
2155 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2156 : 0 : if (!_r1) goto next_after_fail684;
2157 : 0 : res_op->ops[1] = _r1;
2158 : : }
2159 : 0 : res_op->resimplify (lseq, valueize);
2160 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 486, __FILE__, __LINE__, true);
2161 : 0 : return true;
2162 : : }
2163 : : next_after_fail684:;
2164 : : }
2165 : : }
2166 : : return false;
2167 : : }
2168 : :
2169 : : bool
2170 : 67393 : gimple_simplify_340 (gimple_match_op *res_op, gimple_seq *seq,
2171 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2172 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2173 : : const enum tree_code ARG_UNUSED (op))
2174 : : {
2175 : 67393 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2176 : 134786 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2177 : 67393 : && TYPE_UNSIGNED (TREE_TYPE (captures[1]))
2178 : 134786 : && wi::only_sign_bit_p (wi::to_wide (captures[1]))
2179 : : )
2180 : : {
2181 : 2 : {
2182 : 2 : tree stype = signed_type_for (TREE_TYPE (captures[1]));
2183 : 2 : gimple_seq *lseq = seq;
2184 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail692;
2185 : 2 : {
2186 : 2 : res_op->set_op (op, type, 2);
2187 : 2 : {
2188 : 2 : tree _o1[1], _r1;
2189 : 2 : _o1[0] = captures[0];
2190 : 2 : if (stype != TREE_TYPE (_o1[0])
2191 : 2 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
2192 : : {
2193 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
2194 : 2 : tem_op.resimplify (lseq, valueize);
2195 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2196 : 2 : if (!_r1) goto next_after_fail692;
2197 : : }
2198 : : else
2199 : : _r1 = _o1[0];
2200 : 1 : res_op->ops[0] = _r1;
2201 : : }
2202 : 1 : {
2203 : 1 : tree _o1[1], _r1;
2204 : 1 : _o1[0] = captures[2];
2205 : 1 : if (stype != TREE_TYPE (_o1[0])
2206 : 1 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
2207 : : {
2208 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
2209 : 1 : tem_op.resimplify (lseq, valueize);
2210 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2211 : 1 : if (!_r1) goto next_after_fail692;
2212 : : }
2213 : : else
2214 : : _r1 = _o1[0];
2215 : 1 : res_op->ops[1] = _r1;
2216 : : }
2217 : 1 : res_op->resimplify (lseq, valueize);
2218 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 494, __FILE__, __LINE__, true);
2219 : 1 : return true;
2220 : : }
2221 : : next_after_fail692:;
2222 : : }
2223 : : }
2224 : : return false;
2225 : : }
2226 : :
2227 : : bool
2228 : 324 : gimple_simplify_353 (gimple_match_op *res_op, gimple_seq *seq,
2229 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2230 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2231 : : const enum tree_code ARG_UNUSED (cmp),
2232 : : const enum tree_code ARG_UNUSED (out))
2233 : : {
2234 : 324 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2235 : 324 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
2236 : 230 : && types_match (TREE_TYPE (captures[3]), TREE_TYPE (captures[0]))
2237 : 230 : && tree_nop_conversion_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[3]))
2238 : 327 : && wi::to_wide (captures[4]) != 0
2239 : 224 : && single_use (captures[1])
2240 : : )
2241 : : {
2242 : 221 : {
2243 : 221 : unsigned int prec = TYPE_PRECISION (TREE_TYPE (captures[3]));
2244 : 221 : signop sign = TYPE_SIGN (TREE_TYPE (captures[3]));
2245 : 221 : gimple_seq *lseq = seq;
2246 : 221 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail738;
2247 : 221 : {
2248 : 221 : res_op->set_op (out, type, 2);
2249 : 221 : res_op->ops[0] = captures[3];
2250 : 221 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[3]),
2251 : 221 : wi::max_value (prec, sign)
2252 : 663 : - wi::to_wide (captures[4]));
2253 : 221 : res_op->resimplify (lseq, valueize);
2254 : 221 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 503, __FILE__, __LINE__, true);
2255 : 221 : return true;
2256 : : }
2257 : 0 : next_after_fail738:;
2258 : : }
2259 : : }
2260 : : return false;
2261 : : }
2262 : :
2263 : : bool
2264 : 20 : gimple_simplify_361 (gimple_match_op *res_op, gimple_seq *seq,
2265 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2266 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2267 : : const enum tree_code ARG_UNUSED (op),
2268 : : const enum tree_code ARG_UNUSED (cmp),
2269 : : const combined_fn ARG_UNUSED (ctz))
2270 : : {
2271 : 20 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2272 : 20 : {
2273 : 20 : bool ok = true;
2274 : 20 : HOST_WIDE_INT val = 0;
2275 : 20 : if (!tree_fits_shwi_p (captures[2]))
2276 : : ok = false;
2277 : : else
2278 : : {
2279 : 20 : val = tree_to_shwi (captures[2]);
2280 : 20 : if (op == GT_EXPR || op == LE_EXPR)
2281 : : {
2282 : 20 : if (val == HOST_WIDE_INT_MAX)
2283 : : ok = false;
2284 : : else
2285 : 20 : val++;
2286 : : }
2287 : : }
2288 : 20 : tree type0 = TREE_TYPE (captures[1]);
2289 : 20 : int prec = TYPE_PRECISION (type0);
2290 : 40 : if (ok && prec <= MAX_FIXED_MODE_SIZE
2291 : : )
2292 : : {
2293 : 20 : if (val <= 0
2294 : : )
2295 : : {
2296 : 0 : gimple_seq *lseq = seq;
2297 : 0 : if (lseq
2298 : : && (!single_use (captures[0])))
2299 : : lseq = NULL;
2300 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail748;
2301 : 0 : {
2302 : 0 : tree tem;
2303 : 0 : tem = constant_boolean_node (cmp == EQ_EXPR ? true : false, type);
2304 : 0 : res_op->set_value (tem);
2305 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 533, __FILE__, __LINE__, true);
2306 : 0 : return true;
2307 : : }
2308 : 0 : next_after_fail748:;
2309 : : }
2310 : : else
2311 : : {
2312 : 20 : if (val >= prec
2313 : : )
2314 : : {
2315 : 0 : gimple_seq *lseq = seq;
2316 : 0 : if (lseq
2317 : : && (!single_use (captures[0])))
2318 : : lseq = NULL;
2319 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail749;
2320 : 0 : {
2321 : 0 : tree tem;
2322 : 0 : tem = constant_boolean_node (cmp == EQ_EXPR ? false : true, type);
2323 : 0 : res_op->set_value (tem);
2324 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 534, __FILE__, __LINE__, true);
2325 : 0 : return true;
2326 : : }
2327 : 0 : next_after_fail749:;
2328 : : }
2329 : : else
2330 : : {
2331 : 20 : gimple_seq *lseq = seq;
2332 : 20 : if (lseq
2333 : 6 : && (!single_use (captures[0])))
2334 : 20 : lseq = NULL;
2335 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail750;
2336 : 20 : {
2337 : 20 : res_op->set_op (cmp, type, 2);
2338 : 20 : {
2339 : 20 : tree _o1[2], _r1;
2340 : 20 : _o1[0] = captures[1];
2341 : 20 : _o1[1] = wide_int_to_tree (type0,
2342 : 20 : wi::mask (val, false, prec));
2343 : 20 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2344 : 20 : tem_op.resimplify (lseq, valueize);
2345 : 20 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2346 : 20 : if (!_r1) goto next_after_fail750;
2347 : 0 : res_op->ops[0] = _r1;
2348 : : }
2349 : 0 : res_op->ops[1] = build_zero_cst (type0);
2350 : 0 : res_op->resimplify (lseq, valueize);
2351 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 535, __FILE__, __LINE__, true);
2352 : 0 : return true;
2353 : : }
2354 : : next_after_fail750:;
2355 : : }
2356 : : }
2357 : : }
2358 : : }
2359 : : return false;
2360 : : }
2361 : :
2362 : : bool
2363 : 971 : gimple_simplify_371 (gimple_match_op *res_op, gimple_seq *seq,
2364 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2365 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2366 : : {
2367 : 971 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2368 : 1942 : if (INTEGRAL_TYPE_P (type)
2369 : 971 : && !TYPE_UNSIGNED (type)
2370 : 884 : && !TYPE_OVERFLOW_TRAPS (type)
2371 : 884 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
2372 : 2826 : && (expr_not_equal_to (captures[0], wi::to_wide (TYPE_MIN_VALUE (type)))
2373 : 1851 : || expr_not_equal_to (captures[1], wi::minus_one (TYPE_PRECISION
2374 : : (TREE_TYPE (captures[1])))))
2375 : : )
2376 : : {
2377 : 17 : gimple_seq *lseq = seq;
2378 : 17 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail766;
2379 : 17 : {
2380 : 17 : res_op->set_op (TRUNC_MOD_EXPR, type, 2);
2381 : 17 : res_op->ops[0] = captures[0];
2382 : 17 : {
2383 : 17 : tree _o1[1], _r1;
2384 : 17 : _o1[0] = captures[1];
2385 : 17 : if (type != TREE_TYPE (_o1[0])
2386 : 17 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2387 : : {
2388 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
2389 : 0 : tem_op.resimplify (lseq, valueize);
2390 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2391 : 0 : if (!_r1) goto next_after_fail766;
2392 : : }
2393 : : else
2394 : : _r1 = _o1[0];
2395 : 17 : res_op->ops[1] = _r1;
2396 : : }
2397 : 17 : res_op->resimplify (lseq, valueize);
2398 : 17 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 547, __FILE__, __LINE__, true);
2399 : 17 : return true;
2400 : : }
2401 : : next_after_fail766:;
2402 : : }
2403 : : return false;
2404 : : }
2405 : :
2406 : : bool
2407 : 924229 : gimple_simplify_379 (gimple_match_op *res_op, gimple_seq *seq,
2408 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2409 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2410 : : const enum tree_code ARG_UNUSED (shift))
2411 : : {
2412 : 924229 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2413 : 924229 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2414 : : )
2415 : : {
2416 : 915417 : {
2417 : 915417 : int width = ceil_log2 (element_precision (TREE_TYPE (captures[0])));
2418 : 915417 : int prec = TYPE_PRECISION (TREE_TYPE (captures[1]));
2419 : 915417 : if ((get_nonzero_bits (captures[1]) & wi::mask (width, false, prec)) == 0
2420 : : )
2421 : : {
2422 : 9 : gimple_seq *lseq = seq;
2423 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail774;
2424 : 9 : {
2425 : 9 : tree tem;
2426 : 9 : tem = captures[0];
2427 : 9 : res_op->set_value (tem);
2428 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 554, __FILE__, __LINE__, true);
2429 : 9 : return true;
2430 : : }
2431 : 0 : next_after_fail774:;
2432 : : }
2433 : : }
2434 : : }
2435 : : return false;
2436 : : }
2437 : :
2438 : : bool
2439 : 172 : gimple_simplify_385 (gimple_match_op *res_op, gimple_seq *seq,
2440 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2441 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2442 : : {
2443 : 172 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2444 : 172 : {
2445 : 172 : unsigned prec = TYPE_PRECISION (type);
2446 : 172 : int shift = (64 - prec) & 63;
2447 : 172 : unsigned HOST_WIDE_INT c1
2448 : : = HOST_WIDE_INT_UC (0x0101010101010101) >> shift;
2449 : 172 : unsigned HOST_WIDE_INT c2
2450 : : = HOST_WIDE_INT_UC (0x0F0F0F0F0F0F0F0F) >> shift;
2451 : 172 : unsigned HOST_WIDE_INT c3
2452 : : = HOST_WIDE_INT_UC (0x3333333333333333) >> shift;
2453 : 172 : unsigned HOST_WIDE_INT c4
2454 : : = HOST_WIDE_INT_UC (0x5555555555555555) >> shift;
2455 : 172 : if (prec >= 16
2456 : 172 : && prec <= 64
2457 : 172 : && pow2p_hwi (prec)
2458 : 172 : && TYPE_UNSIGNED (type)
2459 : 172 : && integer_onep (captures[5])
2460 : 151 : && wi::to_widest (captures[7]) == 2
2461 : 130 : && wi::to_widest (captures[1]) == 4
2462 : 172 : && wi::to_widest (captures[11]) == prec - 8
2463 : 109 : && tree_to_uhwi (captures[10]) == c1
2464 : 109 : && tree_to_uhwi (captures[9]) == c2
2465 : 109 : && tree_to_uhwi (captures[8]) == c3
2466 : 109 : && tree_to_uhwi (captures[3]) == c3
2467 : 281 : && tree_to_uhwi (captures[6]) == c4
2468 : : )
2469 : : {
2470 : 109 : if (direct_internal_fn_supported_p (IFN_POPCOUNT, type,
2471 : : OPTIMIZE_FOR_BOTH)
2472 : : )
2473 : : {
2474 : 0 : gimple_seq *lseq = seq;
2475 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail787;
2476 : 0 : {
2477 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2478 : 0 : {
2479 : 0 : tree _o1[1], _r1;
2480 : 0 : _o1[0] = captures[4];
2481 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_POPCOUNT, type, _o1[0]);
2482 : 0 : tem_op.resimplify (lseq, valueize);
2483 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2484 : 0 : if (!_r1) goto next_after_fail787;
2485 : 0 : res_op->ops[0] = _r1;
2486 : : }
2487 : 0 : res_op->resimplify (lseq, valueize);
2488 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 566, __FILE__, __LINE__, true);
2489 : 0 : return true;
2490 : : }
2491 : : next_after_fail787:;
2492 : : }
2493 : : else
2494 : : {
2495 : 109 : {
2496 : 109 : tree half_type = NULL_TREE;
2497 : 109 : opt_machine_mode m = mode_for_size ((prec + 1) / 2, MODE_INT, 1);
2498 : 109 : int half_prec = 8;
2499 : 109 : if (m.exists ()
2500 : 109 : && m.require () != TYPE_MODE (type))
2501 : : {
2502 : 109 : half_prec = GET_MODE_PRECISION (as_a <scalar_int_mode> (m));
2503 : 109 : half_type = build_nonstandard_integer_type (half_prec, 1);
2504 : : }
2505 : 109 : gcc_assert (half_prec > 2);
2506 : 109 : if (half_type != NULL_TREE
2507 : 109 : && direct_internal_fn_supported_p (IFN_POPCOUNT, half_type,
2508 : : OPTIMIZE_FOR_BOTH)
2509 : : )
2510 : : {
2511 : 0 : gimple_seq *lseq = seq;
2512 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail788;
2513 : 0 : {
2514 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2515 : 0 : {
2516 : 0 : tree _o1[2], _r1;
2517 : 0 : {
2518 : 0 : tree _o2[1], _r2;
2519 : 0 : {
2520 : 0 : tree _o3[1], _r3;
2521 : 0 : _o3[0] = captures[4];
2522 : 0 : if (half_type != TREE_TYPE (_o3[0])
2523 : 0 : && !useless_type_conversion_p (half_type, TREE_TYPE (_o3[0])))
2524 : : {
2525 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, half_type, _o3[0]);
2526 : 0 : tem_op.resimplify (lseq, valueize);
2527 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2528 : 0 : if (!_r3) goto next_after_fail788;
2529 : : }
2530 : : else
2531 : : _r3 = _o3[0];
2532 : 0 : _o2[0] = _r3;
2533 : : }
2534 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_POPCOUNT, half_type, _o2[0]);
2535 : 0 : tem_op.resimplify (lseq, valueize);
2536 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2537 : 0 : if (!_r2) goto next_after_fail788;
2538 : 0 : _o1[0] = _r2;
2539 : : }
2540 : 0 : {
2541 : 0 : tree _o2[1], _r2;
2542 : 0 : {
2543 : 0 : tree _o3[1], _r3;
2544 : 0 : {
2545 : 0 : tree _o4[2], _r4;
2546 : 0 : _o4[0] = captures[4];
2547 : 0 : _o4[1] = build_int_cst (integer_type_node, half_prec);
2548 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o4[0]), _o4[0], _o4[1]);
2549 : 0 : tem_op.resimplify (lseq, valueize);
2550 : 0 : _r4 = maybe_push_res_to_seq (&tem_op, lseq);
2551 : 0 : if (!_r4) goto next_after_fail788;
2552 : 0 : _o3[0] = _r4;
2553 : : }
2554 : 0 : if (half_type != TREE_TYPE (_o3[0])
2555 : 0 : && !useless_type_conversion_p (half_type, TREE_TYPE (_o3[0])))
2556 : : {
2557 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, half_type, _o3[0]);
2558 : 0 : tem_op.resimplify (lseq, valueize);
2559 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2560 : 0 : if (!_r3) goto next_after_fail788;
2561 : : }
2562 : : else
2563 : : _r3 = _o3[0];
2564 : 0 : _o2[0] = _r3;
2565 : : }
2566 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_POPCOUNT, half_type, _o2[0]);
2567 : 0 : tem_op.resimplify (lseq, valueize);
2568 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2569 : 0 : if (!_r2) goto next_after_fail788;
2570 : 0 : _o1[1] = _r2;
2571 : : }
2572 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2573 : 0 : tem_op.resimplify (lseq, valueize);
2574 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2575 : 0 : if (!_r1) goto next_after_fail788;
2576 : 0 : res_op->ops[0] = _r1;
2577 : : }
2578 : 0 : res_op->resimplify (lseq, valueize);
2579 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 567, __FILE__, __LINE__, true);
2580 : 0 : return true;
2581 : : }
2582 : 109 : next_after_fail788:;
2583 : : }
2584 : : }
2585 : : }
2586 : : }
2587 : : }
2588 : : return false;
2589 : : }
2590 : :
2591 : : bool
2592 : 7559 : gimple_simplify_402 (gimple_match_op *res_op, gimple_seq *seq,
2593 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2594 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2595 : : const combined_fn ARG_UNUSED (pows),
2596 : : const combined_fn ARG_UNUSED (exps),
2597 : : const combined_fn ARG_UNUSED (logs),
2598 : : const combined_fn ARG_UNUSED (exp2s),
2599 : : const combined_fn ARG_UNUSED (log2s))
2600 : : {
2601 : 7559 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2602 : 7559 : if (flag_unsafe_math_optimizations
2603 : : )
2604 : : {
2605 : 387 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[0]), &dconst0)
2606 : 115 : && real_isfinite (TREE_REAL_CST_PTR (captures[0]))
2607 : 387 : && canonicalize_math_after_vectorization_p ()
2608 : : )
2609 : : {
2610 : 13 : {
2611 : 13 : const REAL_VALUE_TYPE *const value = TREE_REAL_CST_PTR (captures[0]);
2612 : 13 : bool use_exp2 = false;
2613 : 13 : if (targetm.libc_has_function (function_c99_misc, TREE_TYPE (captures[0]))
2614 : 13 : && value->cl == rvc_normal)
2615 : : {
2616 : 13 : REAL_VALUE_TYPE frac_rvt = *value;
2617 : 13 : SET_REAL_EXP (&frac_rvt, 1);
2618 : 13 : if (real_equal (&frac_rvt, &dconst1))
2619 : 8 : use_exp2 = true;
2620 : : }
2621 : 5 : if (!use_exp2
2622 : : )
2623 : : {
2624 : 5 : if (optimize_pow_to_exp (captures[0], captures[1])
2625 : : )
2626 : : {
2627 : 0 : gimple_seq *lseq = seq;
2628 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail818;
2629 : 0 : {
2630 : 0 : res_op->set_op (exps, type, 1);
2631 : 0 : {
2632 : 0 : tree _o1[2], _r1;
2633 : 0 : {
2634 : 0 : tree _o2[1], _r2;
2635 : 0 : _o2[0] = captures[0];
2636 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), logs, TREE_TYPE (_o2[0]), _o2[0]);
2637 : 0 : tem_op.resimplify (lseq, valueize);
2638 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2639 : 0 : if (!_r2) goto next_after_fail818;
2640 : 0 : _o1[0] = _r2;
2641 : : }
2642 : 0 : _o1[1] = captures[1];
2643 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2644 : 0 : tem_op.resimplify (lseq, valueize);
2645 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2646 : 0 : if (!_r1) goto next_after_fail818;
2647 : 0 : res_op->ops[0] = _r1;
2648 : : }
2649 : 0 : res_op->resimplify (lseq, valueize);
2650 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 585, __FILE__, __LINE__, true);
2651 : 0 : return true;
2652 : : }
2653 : : next_after_fail818:;
2654 : : }
2655 : : }
2656 : : else
2657 : : {
2658 : 8 : gimple_seq *lseq = seq;
2659 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail819;
2660 : 8 : {
2661 : 8 : res_op->set_op (exp2s, type, 1);
2662 : 8 : {
2663 : 8 : tree _o1[2], _r1;
2664 : 8 : {
2665 : 8 : tree _o2[1], _r2;
2666 : 8 : _o2[0] = captures[0];
2667 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), log2s, TREE_TYPE (_o2[0]), _o2[0]);
2668 : 8 : tem_op.resimplify (lseq, valueize);
2669 : 8 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2670 : 8 : if (!_r2) goto next_after_fail819;
2671 : 8 : _o1[0] = _r2;
2672 : : }
2673 : 8 : _o1[1] = captures[1];
2674 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2675 : 8 : tem_op.resimplify (lseq, valueize);
2676 : 8 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2677 : 8 : if (!_r1) goto next_after_fail819;
2678 : 8 : res_op->ops[0] = _r1;
2679 : : }
2680 : 8 : res_op->resimplify (lseq, valueize);
2681 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 586, __FILE__, __LINE__, true);
2682 : 8 : return true;
2683 : : }
2684 : : next_after_fail819:;
2685 : : }
2686 : : }
2687 : : }
2688 : : }
2689 : : return false;
2690 : : }
2691 : :
2692 : : bool
2693 : 465 : gimple_simplify_414 (gimple_match_op *res_op, gimple_seq *seq,
2694 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2695 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2696 : : const combined_fn ARG_UNUSED (fmas))
2697 : : {
2698 : 465 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2699 : 465 : if (canonicalize_math_after_vectorization_p ()
2700 : : )
2701 : : {
2702 : 377 : if (single_use (captures[0])
2703 : : )
2704 : : {
2705 : 377 : gimple_seq *lseq = seq;
2706 : 377 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail832;
2707 : 377 : {
2708 : 377 : res_op->set_op (CFN_FNMS, type, 3);
2709 : 377 : res_op->ops[0] = captures[1];
2710 : 377 : res_op->ops[1] = captures[2];
2711 : 377 : res_op->ops[2] = captures[3];
2712 : 377 : res_op->resimplify (lseq, valueize);
2713 : 377 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 599, __FILE__, __LINE__, true);
2714 : 377 : return true;
2715 : : }
2716 : 0 : next_after_fail832:;
2717 : : }
2718 : : }
2719 : : return false;
2720 : : }
2721 : :
2722 : : bool
2723 : 19 : gimple_simplify_418 (gimple_match_op *res_op, gimple_seq *seq,
2724 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2725 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2726 : : {
2727 : 19 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2728 : 19 : gimple_seq *lseq = seq;
2729 : 19 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail836;
2730 : 19 : {
2731 : 19 : res_op->set_op (BIT_AND_EXPR, type, 2);
2732 : 19 : res_op->ops[0] = captures[0];
2733 : 19 : res_op->ops[1] = captures[1];
2734 : 19 : res_op->resimplify (lseq, valueize);
2735 : 19 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 603, __FILE__, __LINE__, true);
2736 : : return true;
2737 : : }
2738 : 0 : next_after_fail836:;
2739 : 0 : return false;
2740 : : }
2741 : :
2742 : : bool
2743 : 4 : gimple_simplify_421 (gimple_match_op *res_op, gimple_seq *seq,
2744 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2745 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2746 : : {
2747 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2748 : 4 : gimple_seq *lseq = seq;
2749 : 4 : if (lseq
2750 : 2 : && (!single_use (captures[3])
2751 : 2 : || !single_use (captures[4])))
2752 : 2 : lseq = NULL;
2753 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail839;
2754 : 4 : {
2755 : 4 : res_op->set_op (BIT_AND_EXPR, type, 2);
2756 : 4 : res_op->ops[0] = captures[0];
2757 : 4 : {
2758 : 4 : tree _o1[1], _r1;
2759 : 4 : _o1[0] = captures[5];
2760 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2761 : 4 : tem_op.resimplify (lseq, valueize);
2762 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2763 : 4 : if (!_r1) goto next_after_fail839;
2764 : 2 : res_op->ops[1] = _r1;
2765 : : }
2766 : 2 : res_op->resimplify (lseq, valueize);
2767 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 606, __FILE__, __LINE__, true);
2768 : : return true;
2769 : : }
2770 : : next_after_fail839:;
2771 : : return false;
2772 : : }
2773 : :
2774 : : bool
2775 : 887 : gimple_simplify_426 (gimple_match_op *res_op, gimple_seq *seq,
2776 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2777 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2778 : : const enum tree_code ARG_UNUSED (bitop))
2779 : : {
2780 : 887 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2781 : 887 : {
2782 : 887 : tree pmop[2];
2783 : 887 : tree utype = fold_bit_and_mask (TREE_TYPE (captures[1]), captures[4], NEGATE_EXPR, captures[1],
2784 : : bitop, captures[2], captures[3], NULL_TREE, ERROR_MARK,
2785 : : NULL_TREE, NULL_TREE, pmop);
2786 : 887 : if (utype
2787 : : )
2788 : : {
2789 : 887 : gimple_seq *lseq = seq;
2790 : 887 : if (lseq
2791 : 308 : && (!single_use (captures[0])
2792 : 298 : || !single_use (captures[1])))
2793 : 881 : lseq = NULL;
2794 : 887 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail844;
2795 : 887 : {
2796 : 887 : res_op->set_op (NOP_EXPR, type, 1);
2797 : 887 : {
2798 : 887 : tree _o1[2], _r1;
2799 : 887 : {
2800 : 887 : tree _o2[1], _r2;
2801 : 887 : {
2802 : 887 : tree _o3[1], _r3;
2803 : 887 : _o3[0] = pmop[0];
2804 : 887 : if (utype != TREE_TYPE (_o3[0])
2805 : 887 : && !useless_type_conversion_p (utype, TREE_TYPE (_o3[0])))
2806 : : {
2807 : 582 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o3[0]);
2808 : 582 : tem_op.resimplify (lseq, valueize);
2809 : 582 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2810 : 582 : if (!_r3) goto next_after_fail844;
2811 : : }
2812 : : else
2813 : : _r3 = _o3[0];
2814 : 324 : _o2[0] = _r3;
2815 : : }
2816 : 324 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
2817 : 324 : tem_op.resimplify (lseq, valueize);
2818 : 324 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2819 : 324 : if (!_r2) goto next_after_fail844;
2820 : 9 : _o1[0] = _r2;
2821 : : }
2822 : 9 : {
2823 : 9 : tree _o2[1], _r2;
2824 : 9 : _o2[0] = captures[4];
2825 : 9 : if (utype != TREE_TYPE (_o2[0])
2826 : 9 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
2827 : : {
2828 : 3 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
2829 : 3 : tem_op.resimplify (lseq, valueize);
2830 : 3 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2831 : 3 : if (!_r2) goto next_after_fail844;
2832 : : }
2833 : : else
2834 : : _r2 = _o2[0];
2835 : 9 : _o1[1] = _r2;
2836 : : }
2837 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2838 : 9 : tem_op.resimplify (lseq, valueize);
2839 : 9 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2840 : 9 : if (!_r1) goto next_after_fail844;
2841 : 7 : res_op->ops[0] = _r1;
2842 : : }
2843 : 7 : res_op->resimplify (lseq, valueize);
2844 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 610, __FILE__, __LINE__, true);
2845 : 7 : return true;
2846 : : }
2847 : 880 : next_after_fail844:;
2848 : : }
2849 : : }
2850 : 880 : return false;
2851 : : }
2852 : :
2853 : : bool
2854 : 1801 : gimple_simplify_441 (gimple_match_op *res_op, gimple_seq *seq,
2855 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2856 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2857 : : const enum tree_code ARG_UNUSED (eqne))
2858 : : {
2859 : 1801 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2860 : 1801 : if (eqne == EQ_EXPR
2861 : : )
2862 : : {
2863 : 10 : gimple_seq *lseq = seq;
2864 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail864;
2865 : 10 : {
2866 : 10 : tree tem;
2867 : 10 : tem = constant_boolean_node (false, type);
2868 : 10 : res_op->set_value (tem);
2869 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 626, __FILE__, __LINE__, true);
2870 : 10 : return true;
2871 : : }
2872 : 0 : next_after_fail864:;
2873 : : }
2874 : : else
2875 : : {
2876 : 1791 : if (eqne == NE_EXPR
2877 : : )
2878 : : {
2879 : 1791 : gimple_seq *lseq = seq;
2880 : 1791 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail865;
2881 : 1791 : {
2882 : 1791 : tree tem;
2883 : 1791 : tem = captures[0];
2884 : 1791 : res_op->set_value (tem);
2885 : 1791 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 627, __FILE__, __LINE__, true);
2886 : 1791 : return true;
2887 : : }
2888 : 0 : next_after_fail865:;
2889 : : }
2890 : : }
2891 : : return false;
2892 : : }
2893 : :
2894 : : bool
2895 : 12 : gimple_simplify_446 (gimple_match_op *res_op, gimple_seq *seq,
2896 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2897 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2898 : : const enum tree_code ARG_UNUSED (eqne))
2899 : : {
2900 : 12 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2901 : 12 : if (eqne == EQ_EXPR
2902 : : )
2903 : : {
2904 : 0 : gimple_seq *lseq = seq;
2905 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail889;
2906 : 0 : {
2907 : 0 : tree tem;
2908 : 0 : tem = constant_boolean_node (false, type);
2909 : 0 : res_op->set_value (tem);
2910 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 626, __FILE__, __LINE__, true);
2911 : 0 : return true;
2912 : : }
2913 : 0 : next_after_fail889:;
2914 : : }
2915 : : else
2916 : : {
2917 : 12 : if (eqne == NE_EXPR
2918 : : )
2919 : : {
2920 : 12 : gimple_seq *lseq = seq;
2921 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail890;
2922 : 12 : {
2923 : 12 : tree tem;
2924 : 12 : tem = captures[0];
2925 : 12 : res_op->set_value (tem);
2926 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 627, __FILE__, __LINE__, true);
2927 : 12 : return true;
2928 : : }
2929 : 0 : next_after_fail890:;
2930 : : }
2931 : : }
2932 : : return false;
2933 : : }
2934 : :
2935 : : bool
2936 : 182 : gimple_simplify_450 (gimple_match_op *res_op, gimple_seq *seq,
2937 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2938 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2939 : : const enum tree_code ARG_UNUSED (code2),
2940 : : const enum tree_code ARG_UNUSED (code1))
2941 : : {
2942 : 182 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2943 : 182 : if ((TREE_CODE (captures[2]) == INTEGER_CST
2944 : 157 : && TREE_CODE (captures[5]) == INTEGER_CST)
2945 : 218 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
2946 : 9 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
2947 : 61 : && bitwise_equal_p (captures[2], captures[5]))
2948 : : )
2949 : : {
2950 : 122 : {
2951 : 122 : bool one_before = false;
2952 : 122 : bool one_after = false;
2953 : 122 : int cmp = 0;
2954 : 122 : bool allbits = true;
2955 : 122 : if (TREE_CODE (captures[2]) == INTEGER_CST
2956 : 121 : && TREE_CODE (captures[5]) == INTEGER_CST)
2957 : : {
2958 : 121 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
2959 : 121 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
2960 : 121 : auto t2 = wi::to_wide (captures[5]);
2961 : 121 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
2962 : 121 : if (cmp < 0
2963 : 121 : && t1 == t2 - 1)
2964 : : one_before = true;
2965 : 121 : if (cmp > 0
2966 : 121 : && t1 == t2 + 1)
2967 : : one_after = true;
2968 : : }
2969 : 122 : bool val;
2970 : 122 : switch (code2)
2971 : : {
2972 : 46 : case EQ_EXPR: val = (cmp == 0); break;
2973 : 0 : case NE_EXPR: val = (cmp != 0); break;
2974 : 0 : case LT_EXPR: val = (cmp < 0); break;
2975 : 58 : case GT_EXPR: val = (cmp > 0); break;
2976 : 2 : case LE_EXPR: val = (cmp <= 0); break;
2977 : 16 : case GE_EXPR: val = (cmp >= 0); break;
2978 : 0 : default: gcc_unreachable ();
2979 : : }
2980 : 122 : if (code1 == EQ_EXPR && val
2981 : : )
2982 : : {
2983 : 10 : gimple_seq *lseq = seq;
2984 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail895;
2985 : 10 : {
2986 : 10 : tree tem;
2987 : 10 : tem = captures[0];
2988 : 10 : res_op->set_value (tem);
2989 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 630, __FILE__, __LINE__, true);
2990 : 10 : return true;
2991 : : }
2992 : 0 : next_after_fail895:;
2993 : : }
2994 : : else
2995 : : {
2996 : 112 : if (code1 == EQ_EXPR && !val
2997 : : )
2998 : : {
2999 : 2 : gimple_seq *lseq = seq;
3000 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail896;
3001 : 2 : {
3002 : 2 : tree tem;
3003 : 2 : tem = constant_boolean_node (false, type);
3004 : 2 : res_op->set_value (tem);
3005 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 631, __FILE__, __LINE__, true);
3006 : 2 : return true;
3007 : : }
3008 : 0 : next_after_fail896:;
3009 : : }
3010 : : else
3011 : : {
3012 : 110 : if (code1 == NE_EXPR && !val && allbits
3013 : : )
3014 : : {
3015 : 0 : gimple_seq *lseq = seq;
3016 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail897;
3017 : 0 : {
3018 : 0 : tree tem;
3019 : 0 : tem = captures[3];
3020 : 0 : res_op->set_value (tem);
3021 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 632, __FILE__, __LINE__, true);
3022 : 0 : return true;
3023 : : }
3024 : 0 : next_after_fail897:;
3025 : 0 : }
3026 : : else
3027 : : {
3028 : 110 : if (code1 == NE_EXPR
3029 : 110 : && code2 == GE_EXPR
3030 : 16 : && cmp == 0
3031 : 16 : && allbits
3032 : : )
3033 : : {
3034 : 16 : gimple_seq *lseq = seq;
3035 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail898;
3036 : 16 : {
3037 : 16 : res_op->set_op (GT_EXPR, type, 2);
3038 : 16 : res_op->ops[0] = captures[4];
3039 : 16 : {
3040 : 16 : tree _o1[1], _r1;
3041 : 16 : _o1[0] = captures[2];
3042 : 16 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
3043 : 16 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
3044 : : {
3045 : 16 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
3046 : 16 : tem_op.resimplify (lseq, valueize);
3047 : 16 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3048 : 16 : if (!_r1) goto next_after_fail898;
3049 : : }
3050 : : else
3051 : : _r1 = _o1[0];
3052 : 16 : res_op->ops[1] = _r1;
3053 : : }
3054 : 16 : res_op->resimplify (lseq, valueize);
3055 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 633, __FILE__, __LINE__, true);
3056 : 16 : return true;
3057 : : }
3058 : : next_after_fail898:;
3059 : : }
3060 : : else
3061 : : {
3062 : 94 : if (code1 == NE_EXPR
3063 : 94 : && code2 == LE_EXPR
3064 : 0 : && cmp == 0
3065 : 0 : && allbits
3066 : : )
3067 : : {
3068 : 0 : gimple_seq *lseq = seq;
3069 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail899;
3070 : 0 : {
3071 : 0 : res_op->set_op (LT_EXPR, type, 2);
3072 : 0 : res_op->ops[0] = captures[4];
3073 : 0 : {
3074 : 0 : tree _o1[1], _r1;
3075 : 0 : _o1[0] = captures[2];
3076 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
3077 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
3078 : : {
3079 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
3080 : 0 : tem_op.resimplify (lseq, valueize);
3081 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3082 : 0 : if (!_r1) goto next_after_fail899;
3083 : : }
3084 : : else
3085 : : _r1 = _o1[0];
3086 : 0 : res_op->ops[1] = _r1;
3087 : : }
3088 : 0 : res_op->resimplify (lseq, valueize);
3089 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 634, __FILE__, __LINE__, true);
3090 : 0 : return true;
3091 : : }
3092 : : next_after_fail899:;
3093 : : }
3094 : : else
3095 : : {
3096 : 94 : if (code1 == NE_EXPR
3097 : 94 : && code2 == GT_EXPR
3098 : : && one_after
3099 : 55 : && allbits
3100 : : )
3101 : : {
3102 : 46 : gimple_seq *lseq = seq;
3103 : 46 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail900;
3104 : 46 : {
3105 : 46 : res_op->set_op (GT_EXPR, type, 2);
3106 : 46 : res_op->ops[0] = captures[4];
3107 : 46 : {
3108 : 46 : tree _o1[1], _r1;
3109 : 46 : _o1[0] = captures[2];
3110 : 46 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
3111 : 46 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
3112 : : {
3113 : 46 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
3114 : 46 : tem_op.resimplify (lseq, valueize);
3115 : 46 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3116 : 46 : if (!_r1) goto next_after_fail900;
3117 : : }
3118 : : else
3119 : : _r1 = _o1[0];
3120 : 46 : res_op->ops[1] = _r1;
3121 : : }
3122 : 46 : res_op->resimplify (lseq, valueize);
3123 : 46 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 635, __FILE__, __LINE__, true);
3124 : 46 : return true;
3125 : : }
3126 : : next_after_fail900:;
3127 : : }
3128 : : else
3129 : : {
3130 : 48 : if (code1 == NE_EXPR
3131 : 48 : && code2 == LT_EXPR
3132 : : && one_before
3133 : 0 : && allbits
3134 : : )
3135 : : {
3136 : 0 : gimple_seq *lseq = seq;
3137 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail901;
3138 : 0 : {
3139 : 0 : res_op->set_op (LT_EXPR, type, 2);
3140 : 0 : res_op->ops[0] = captures[4];
3141 : 0 : {
3142 : 0 : tree _o1[1], _r1;
3143 : 0 : _o1[0] = captures[2];
3144 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
3145 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
3146 : : {
3147 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
3148 : 0 : tem_op.resimplify (lseq, valueize);
3149 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3150 : 0 : if (!_r1) goto next_after_fail901;
3151 : : }
3152 : : else
3153 : : _r1 = _o1[0];
3154 : 0 : res_op->ops[1] = _r1;
3155 : : }
3156 : 0 : res_op->resimplify (lseq, valueize);
3157 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 636, __FILE__, __LINE__, true);
3158 : 0 : return true;
3159 : : }
3160 : : next_after_fail901:;
3161 : : }
3162 : : }
3163 : : }
3164 : : }
3165 : : }
3166 : : }
3167 : : }
3168 : : }
3169 : : }
3170 : : return false;
3171 : : }
3172 : :
3173 : : bool
3174 : 15070 : gimple_simplify_474 (gimple_match_op *res_op, gimple_seq *seq,
3175 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3176 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3177 : : {
3178 : 15070 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3179 : 15070 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[2]))
3180 : 15070 : && (element_precision (TREE_TYPE (captures[2]))
3181 : 0 : <= element_precision (TREE_TYPE (captures[3]))
3182 : 0 : || !TYPE_UNSIGNED (TREE_TYPE (captures[3])))
3183 : : )
3184 : : {
3185 : 0 : {
3186 : 0 : tree shift_type = TREE_TYPE (captures[2]);
3187 : 0 : gimple_seq *lseq = seq;
3188 : 0 : if (lseq
3189 : 0 : && (!single_use (captures[0])
3190 : 0 : || !single_use (captures[1])))
3191 : 0 : lseq = NULL;
3192 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail938;
3193 : 0 : {
3194 : 0 : res_op->set_op (NOP_EXPR, type, 1);
3195 : 0 : {
3196 : 0 : tree _o1[2], _r1;
3197 : 0 : {
3198 : 0 : tree _o2[1], _r2;
3199 : 0 : _o2[0] = captures[3];
3200 : 0 : if (shift_type != TREE_TYPE (_o2[0])
3201 : 0 : && !useless_type_conversion_p (shift_type, TREE_TYPE (_o2[0])))
3202 : : {
3203 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, shift_type, _o2[0]);
3204 : 0 : tem_op.resimplify (lseq, valueize);
3205 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3206 : 0 : if (!_r2) goto next_after_fail938;
3207 : : }
3208 : : else
3209 : : _r2 = _o2[0];
3210 : 0 : _o1[0] = _r2;
3211 : : }
3212 : 0 : _o1[1] = captures[4];
3213 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3214 : 0 : tem_op.resimplify (lseq, valueize);
3215 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3216 : 0 : if (!_r1) goto next_after_fail938;
3217 : 0 : res_op->ops[0] = _r1;
3218 : : }
3219 : 0 : res_op->resimplify (lseq, valueize);
3220 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 659, __FILE__, __LINE__, true);
3221 : 0 : return true;
3222 : : }
3223 : : next_after_fail938:;
3224 : : }
3225 : : }
3226 : : return false;
3227 : : }
3228 : :
3229 : : bool
3230 : 0 : gimple_simplify_486 (gimple_match_op *res_op, gimple_seq *seq,
3231 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3232 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3233 : : const enum tree_code ARG_UNUSED (minmax),
3234 : : const enum tree_code ARG_UNUSED (cmp))
3235 : : {
3236 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3237 : 0 : {
3238 : 0 : poly_int64 off0, off1;
3239 : 0 : tree base0, base1;
3240 : 0 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[3], base0, base1,
3241 : : off0, off1,
3242 : :
3243 : : );
3244 : 0 : if (equal == 1
3245 : : )
3246 : : {
3247 : 0 : if (minmax == MIN_EXPR
3248 : : )
3249 : : {
3250 : 0 : if (known_le (off0, off1)
3251 : : )
3252 : : {
3253 : 0 : gimple_seq *lseq = seq;
3254 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail957;
3255 : 0 : {
3256 : 0 : tree tem;
3257 : 0 : tem = captures[0];
3258 : 0 : res_op->set_value (tem);
3259 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 671, __FILE__, __LINE__, true);
3260 : 0 : return true;
3261 : : }
3262 : 0 : next_after_fail957:;
3263 : : }
3264 : : else
3265 : : {
3266 : 0 : if (known_gt (off0, off1)
3267 : : )
3268 : : {
3269 : 0 : gimple_seq *lseq = seq;
3270 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail958;
3271 : 0 : {
3272 : 0 : tree tem;
3273 : 0 : tem = captures[2];
3274 : 0 : res_op->set_value (tem);
3275 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 672, __FILE__, __LINE__, true);
3276 : 0 : return true;
3277 : : }
3278 : 0 : next_after_fail958:;
3279 : : }
3280 : : }
3281 : : }
3282 : : else
3283 : : {
3284 : 0 : if (known_ge (off0, off1)
3285 : : )
3286 : : {
3287 : 0 : gimple_seq *lseq = seq;
3288 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail959;
3289 : 0 : {
3290 : 0 : tree tem;
3291 : 0 : tem = captures[0];
3292 : 0 : res_op->set_value (tem);
3293 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 673, __FILE__, __LINE__, true);
3294 : 0 : return true;
3295 : : }
3296 : 0 : next_after_fail959:;
3297 : : }
3298 : : else
3299 : : {
3300 : 0 : if (known_lt (off0, off1)
3301 : : )
3302 : : {
3303 : 0 : gimple_seq *lseq = seq;
3304 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail960;
3305 : 0 : {
3306 : 0 : tree tem;
3307 : 0 : tem = captures[2];
3308 : 0 : res_op->set_value (tem);
3309 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 674, __FILE__, __LINE__, true);
3310 : 0 : return true;
3311 : : }
3312 : 0 : next_after_fail960:;
3313 : : }
3314 : : }
3315 : : }
3316 : : }
3317 : : }
3318 : 0 : return false;
3319 : : }
3320 : :
3321 : : bool
3322 : 605 : gimple_simplify_504 (gimple_match_op *res_op, gimple_seq *seq,
3323 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3324 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3325 : : {
3326 : 605 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3327 : 605 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
3328 : 605 : && bitwise_equal_p (captures[0], captures[2])
3329 : : )
3330 : : {
3331 : 428 : gimple_seq *lseq = seq;
3332 : 428 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail981;
3333 : 428 : {
3334 : 428 : res_op->set_op (NOP_EXPR, type, 1);
3335 : 428 : {
3336 : 428 : tree _o1[2], _r1;
3337 : 428 : _o1[0] = captures[0];
3338 : 428 : _o1[1] = captures[1];
3339 : 428 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, boolean_type_node, _o1[0], _o1[1]);
3340 : 428 : tem_op.resimplify (lseq, valueize);
3341 : 428 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3342 : 428 : if (!_r1) goto next_after_fail981;
3343 : 428 : res_op->ops[0] = _r1;
3344 : : }
3345 : 428 : res_op->resimplify (lseq, valueize);
3346 : 428 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 691, __FILE__, __LINE__, true);
3347 : 428 : return true;
3348 : : }
3349 : : next_after_fail981:;
3350 : : }
3351 : : return false;
3352 : : }
3353 : :
3354 : : bool
3355 : 2812 : gimple_simplify_512 (gimple_match_op *res_op, gimple_seq *seq,
3356 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3357 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3358 : : const enum tree_code ARG_UNUSED (cmp),
3359 : : const enum tree_code ARG_UNUSED (minmax))
3360 : : {
3361 : 2812 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3362 : 2812 : {
3363 : 2812 : tree_code code = minmax_from_comparison (cmp, captures[0], captures[1], captures[0], captures[4]);
3364 : 2812 : if ((cmp == LT_EXPR || cmp == LE_EXPR)
3365 : 1948 : && code == MIN_EXPR
3366 : 4611 : && integer_nonzerop (fold_build2 (LE_EXPR, boolean_type_node, captures[3], captures[4]))
3367 : : )
3368 : : {
3369 : 75 : gimple_seq *lseq = seq;
3370 : 75 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1037;
3371 : 75 : {
3372 : 75 : res_op->set_op (MIN_EXPR, type, 2);
3373 : 75 : res_op->ops[0] = captures[2];
3374 : 75 : res_op->ops[1] = captures[4];
3375 : 75 : res_op->resimplify (lseq, valueize);
3376 : 75 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 711, __FILE__, __LINE__, true);
3377 : 75 : return true;
3378 : : }
3379 : 0 : next_after_fail1037:;
3380 : : }
3381 : : else
3382 : : {
3383 : 2737 : if ((cmp == GT_EXPR || cmp == GE_EXPR)
3384 : 864 : && code == MAX_EXPR
3385 : 2981 : && integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node, captures[3], captures[4]))
3386 : : )
3387 : : {
3388 : 97 : gimple_seq *lseq = seq;
3389 : 97 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1038;
3390 : 97 : {
3391 : 97 : res_op->set_op (MAX_EXPR, type, 2);
3392 : 97 : res_op->ops[0] = captures[2];
3393 : 97 : res_op->ops[1] = captures[4];
3394 : 97 : res_op->resimplify (lseq, valueize);
3395 : 97 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 712, __FILE__, __LINE__, true);
3396 : 97 : return true;
3397 : : }
3398 : 0 : next_after_fail1038:;
3399 : : }
3400 : : }
3401 : : }
3402 : : return false;
3403 : : }
3404 : :
3405 : : bool
3406 : 3 : gimple_simplify_514 (gimple_match_op *res_op, gimple_seq *seq,
3407 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3408 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3409 : : {
3410 : 3 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3411 : 3 : gimple_seq *lseq = seq;
3412 : 3 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1041;
3413 : 3 : {
3414 : 3 : tree tem;
3415 : 3 : tem = captures[2];
3416 : 3 : res_op->set_value (tem);
3417 : 3 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 715, __FILE__, __LINE__, true);
3418 : : return true;
3419 : : }
3420 : 0 : next_after_fail1041:;
3421 : 0 : return false;
3422 : : }
3423 : :
3424 : : bool
3425 : 4 : gimple_simplify_516 (gimple_match_op *res_op, gimple_seq *seq,
3426 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3427 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3428 : : const enum tree_code ARG_UNUSED (op))
3429 : : {
3430 : 4 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3431 : 4 : gimple_seq *lseq = seq;
3432 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1043;
3433 : 4 : {
3434 : 4 : tree tem;
3435 : 4 : tem = captures[2];
3436 : 4 : res_op->set_value (tem);
3437 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 717, __FILE__, __LINE__, true);
3438 : : return true;
3439 : : }
3440 : 0 : next_after_fail1043:;
3441 : 0 : return false;
3442 : : }
3443 : :
3444 : : bool
3445 : 0 : gimple_simplify_519 (gimple_match_op *res_op, gimple_seq *seq,
3446 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3447 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3448 : : const enum tree_code ARG_UNUSED (op))
3449 : : {
3450 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3451 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
3452 : : )
3453 : : {
3454 : 0 : gimple_seq *lseq = seq;
3455 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1046;
3456 : 0 : {
3457 : 0 : tree tem;
3458 : 0 : tem = captures[2];
3459 : 0 : res_op->set_value (tem);
3460 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 718, __FILE__, __LINE__, true);
3461 : 0 : return true;
3462 : : }
3463 : 0 : next_after_fail1046:;
3464 : : }
3465 : : return false;
3466 : : }
3467 : :
3468 : : bool
3469 : 0 : gimple_simplify_522 (gimple_match_op *res_op, gimple_seq *seq,
3470 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3471 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3472 : : const enum tree_code ARG_UNUSED (op))
3473 : : {
3474 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3475 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
3476 : : )
3477 : : {
3478 : 0 : gimple_seq *lseq = seq;
3479 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1049;
3480 : 0 : {
3481 : 0 : tree tem;
3482 : 0 : tem = captures[2];
3483 : 0 : res_op->set_value (tem);
3484 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 718, __FILE__, __LINE__, true);
3485 : 0 : return true;
3486 : : }
3487 : 0 : next_after_fail1049:;
3488 : : }
3489 : : return false;
3490 : : }
3491 : :
3492 : : bool
3493 : 33 : gimple_simplify_525 (gimple_match_op *res_op, gimple_seq *seq,
3494 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3495 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3496 : : {
3497 : 33 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3498 : 33 : if (!TYPE_SATURATING (type)
3499 : 33 : && (TYPE_OVERFLOW_WRAPS (type)
3500 : 33 : || !wi::only_sign_bit_p (wi::to_wide (captures[1])))
3501 : 80 : && wi::eq_p (wi::neg (wi::to_wide (captures[1])), wi::to_wide (captures[3]))
3502 : : )
3503 : : {
3504 : 0 : gimple_seq *lseq = seq;
3505 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1052;
3506 : 0 : {
3507 : 0 : tree tem;
3508 : 0 : tem = captures[2];
3509 : 0 : res_op->set_value (tem);
3510 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 720, __FILE__, __LINE__, true);
3511 : 0 : return true;
3512 : : }
3513 : 0 : next_after_fail1052:;
3514 : : }
3515 : : return false;
3516 : : }
3517 : :
3518 : : bool
3519 : 2579 : gimple_simplify_530 (gimple_match_op *res_op, gimple_seq *seq,
3520 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3521 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3522 : : const enum tree_code ARG_UNUSED (cmp))
3523 : : {
3524 : 2579 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3525 : 2579 : if (!HONOR_SIGNED_ZEROS (type)
3526 : 2579 : && bitwise_equal_p (captures[0], captures[1])
3527 : : )
3528 : : {
3529 : 1 : gimple_seq *lseq = seq;
3530 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1059;
3531 : 1 : {
3532 : 1 : tree tem;
3533 : 1 : tem = captures[2];
3534 : 1 : res_op->set_value (tem);
3535 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 725, __FILE__, __LINE__, true);
3536 : 1 : return true;
3537 : : }
3538 : 0 : next_after_fail1059:;
3539 : : }
3540 : : return false;
3541 : : }
3542 : :
3543 : : bool
3544 : 0 : gimple_simplify_532 (gimple_match_op *res_op, gimple_seq *seq,
3545 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3546 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3547 : : const enum tree_code ARG_UNUSED (cmp))
3548 : : {
3549 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3550 : 0 : if (!HONOR_SIGNED_ZEROS (type)
3551 : : )
3552 : : {
3553 : 0 : gimple_seq *lseq = seq;
3554 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1061;
3555 : 0 : {
3556 : 0 : tree tem;
3557 : 0 : tem = captures[3];
3558 : 0 : res_op->set_value (tem);
3559 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 727, __FILE__, __LINE__, true);
3560 : 0 : return true;
3561 : : }
3562 : 0 : next_after_fail1061:;
3563 : : }
3564 : : return false;
3565 : : }
3566 : :
3567 : : bool
3568 : 16375 : gimple_simplify_538 (gimple_match_op *res_op, gimple_seq *seq,
3569 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3570 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3571 : : const enum tree_code ARG_UNUSED (cmp))
3572 : : {
3573 : 16375 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3574 : 16375 : if (!HONOR_SIGNED_ZEROS (type)
3575 : 16375 : && bitwise_equal_p (captures[0], captures[1])
3576 : : )
3577 : : {
3578 : 7 : gimple_seq *lseq = seq;
3579 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1067;
3580 : 7 : {
3581 : 7 : tree tem;
3582 : 7 : tem = captures[1];
3583 : 7 : res_op->set_value (tem);
3584 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 730, __FILE__, __LINE__, true);
3585 : 7 : return true;
3586 : : }
3587 : 0 : next_after_fail1067:;
3588 : : }
3589 : : return false;
3590 : : }
3591 : :
3592 : : bool
3593 : 1001 : gimple_simplify_545 (gimple_match_op *res_op, gimple_seq *seq,
3594 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3595 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3596 : : const enum tree_code ARG_UNUSED (cmp))
3597 : : {
3598 : 1001 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3599 : 1001 : if (!HONOR_SIGNED_ZEROS (TREE_TYPE(captures[0]))
3600 : 883 : && !TYPE_UNSIGNED (TREE_TYPE(captures[0]))
3601 : 1884 : && bitwise_equal_p (captures[0], captures[1])
3602 : : )
3603 : : {
3604 : 677 : if (TYPE_UNSIGNED (type)
3605 : : )
3606 : : {
3607 : 389 : gimple_seq *lseq = seq;
3608 : 389 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1075;
3609 : 389 : {
3610 : 389 : res_op->set_op (ABSU_EXPR, type, 1);
3611 : 389 : res_op->ops[0] = captures[0];
3612 : 389 : res_op->resimplify (lseq, valueize);
3613 : 389 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 735, __FILE__, __LINE__, true);
3614 : 389 : return true;
3615 : : }
3616 : 0 : next_after_fail1075:;
3617 : : }
3618 : : else
3619 : : {
3620 : 288 : gimple_seq *lseq = seq;
3621 : 288 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1076;
3622 : 288 : {
3623 : 288 : res_op->set_op (ABS_EXPR, type, 1);
3624 : 288 : res_op->ops[0] = captures[0];
3625 : 288 : res_op->resimplify (lseq, valueize);
3626 : 288 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 736, __FILE__, __LINE__, true);
3627 : 288 : return true;
3628 : : }
3629 : 0 : next_after_fail1076:;
3630 : : }
3631 : : }
3632 : : return false;
3633 : : }
3634 : :
3635 : : bool
3636 : 2 : gimple_simplify_554 (gimple_match_op *res_op, gimple_seq *seq,
3637 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3638 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3639 : : const enum tree_code ARG_UNUSED (cmp))
3640 : : {
3641 : 2 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3642 : 2 : if (!HONOR_SIGNED_ZEROS (type)
3643 : 2 : && !TYPE_UNSIGNED (type)
3644 : : )
3645 : : {
3646 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
3647 : 2 : && !TYPE_OVERFLOW_WRAPS (type)
3648 : : )
3649 : : {
3650 : 2 : {
3651 : 2 : tree utype = unsigned_type_for (type);
3652 : 2 : gimple_seq *lseq = seq;
3653 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1091;
3654 : 2 : {
3655 : 2 : res_op->set_op (NOP_EXPR, type, 1);
3656 : 2 : {
3657 : 2 : tree _o1[1], _r1;
3658 : 2 : {
3659 : 2 : tree _o2[1], _r2;
3660 : 2 : _o2[0] = captures[0];
3661 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o2[0]);
3662 : 2 : tem_op.resimplify (lseq, valueize);
3663 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3664 : 2 : if (!_r2) goto next_after_fail1091;
3665 : 2 : _o1[0] = _r2;
3666 : : }
3667 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3668 : 2 : tem_op.resimplify (lseq, valueize);
3669 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3670 : 2 : if (!_r1) goto next_after_fail1091;
3671 : 2 : res_op->ops[0] = _r1;
3672 : : }
3673 : 2 : res_op->resimplify (lseq, valueize);
3674 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 744, __FILE__, __LINE__, true);
3675 : 2 : return true;
3676 : : }
3677 : : next_after_fail1091:;
3678 : : }
3679 : : }
3680 : : else
3681 : : {
3682 : 0 : gimple_seq *lseq = seq;
3683 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1092;
3684 : 0 : {
3685 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
3686 : 0 : {
3687 : 0 : tree _o1[1], _r1;
3688 : 0 : _o1[0] = captures[0];
3689 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3690 : 0 : tem_op.resimplify (lseq, valueize);
3691 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3692 : 0 : if (!_r1) goto next_after_fail1092;
3693 : 0 : res_op->ops[0] = _r1;
3694 : : }
3695 : 0 : res_op->resimplify (lseq, valueize);
3696 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 745, __FILE__, __LINE__, true);
3697 : 0 : return true;
3698 : : }
3699 : : next_after_fail1092:;
3700 : : }
3701 : : }
3702 : : return false;
3703 : : }
3704 : :
3705 : : bool
3706 : 0 : gimple_simplify_563 (gimple_match_op *res_op, gimple_seq *seq,
3707 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3708 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3709 : : {
3710 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3711 : 0 : {
3712 : 0 : int val;
3713 : 0 : internal_fn ifn = IFN_LAST;
3714 : 0 : if (TREE_CODE (TREE_TYPE (captures[2])) == BITINT_TYPE)
3715 : : ifn = IFN_CLZ;
3716 : 0 : else if (direct_internal_fn_supported_p (IFN_CLZ, TREE_TYPE (captures[2]),
3717 : : OPTIMIZE_FOR_BOTH))
3718 : : ifn = IFN_CLZ;
3719 : : if (ifn == IFN_CLZ
3720 : : )
3721 : : {
3722 : 0 : gimple_seq *lseq = seq;
3723 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1103;
3724 : 0 : {
3725 : 0 : res_op->set_op (CFN_CLZ, type, 2);
3726 : 0 : res_op->ops[0] = captures[2];
3727 : 0 : res_op->ops[1] = captures[3];
3728 : 0 : res_op->resimplify (lseq, valueize);
3729 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 753, __FILE__, __LINE__, true);
3730 : 0 : return true;
3731 : : }
3732 : 0 : next_after_fail1103:;
3733 : : }
3734 : : }
3735 : : return false;
3736 : : }
3737 : :
3738 : : bool
3739 : 0 : gimple_simplify_570 (gimple_match_op *res_op, gimple_seq *seq,
3740 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3741 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3742 : : {
3743 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3744 : 0 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), type)
3745 : : )
3746 : : {
3747 : 0 : gimple_seq *lseq = seq;
3748 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1112;
3749 : 0 : {
3750 : 0 : res_op->set_op (NOP_EXPR, type, 1);
3751 : 0 : res_op->ops[0] = captures[0];
3752 : 0 : res_op->resimplify (lseq, valueize);
3753 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 760, __FILE__, __LINE__, true);
3754 : 0 : return true;
3755 : : }
3756 : 0 : next_after_fail1112:;
3757 : : }
3758 : : return false;
3759 : : }
3760 : :
3761 : : bool
3762 : 8 : gimple_simplify_579 (gimple_match_op *res_op, gimple_seq *seq,
3763 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3764 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3765 : : const enum tree_code ARG_UNUSED (op))
3766 : : {
3767 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3768 : 8 : gimple_seq *lseq = seq;
3769 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1121;
3770 : 8 : {
3771 : 8 : tree tem;
3772 : 8 : tem = captures[2];
3773 : 8 : res_op->set_value (tem);
3774 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 717, __FILE__, __LINE__, true);
3775 : : return true;
3776 : : }
3777 : 0 : next_after_fail1121:;
3778 : 0 : return false;
3779 : : }
3780 : :
3781 : : bool
3782 : 0 : gimple_simplify_586 (gimple_match_op *res_op, gimple_seq *seq,
3783 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3784 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3785 : : const combined_fn ARG_UNUSED (cond_op))
3786 : : {
3787 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3788 : 0 : {
3789 : 0 : tree op_type = TREE_TYPE (captures[4]);
3790 : 0 : if (element_precision (type) == element_precision (op_type)
3791 : : )
3792 : : {
3793 : 0 : gimple_seq *lseq = seq;
3794 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1128;
3795 : 0 : {
3796 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
3797 : 0 : {
3798 : 0 : tree _o1[5], _r1;
3799 : 0 : _o1[0] = captures[0];
3800 : 0 : _o1[1] = captures[1];
3801 : 0 : _o1[2] = captures[2];
3802 : 0 : _o1[3] = captures[3];
3803 : 0 : {
3804 : 0 : tree _o2[1], _r2;
3805 : 0 : _o2[0] = captures[5];
3806 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, op_type, _o2[0]);
3807 : 0 : tem_op.resimplify (lseq, valueize);
3808 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3809 : 0 : if (!_r2) goto next_after_fail1128;
3810 : 0 : _o1[4] = _r2;
3811 : : }
3812 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), cond_op, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2], _o1[3], _o1[4]);
3813 : 0 : tem_op.resimplify (lseq, valueize);
3814 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3815 : 0 : if (!_r1) goto next_after_fail1128;
3816 : 0 : res_op->ops[0] = _r1;
3817 : : }
3818 : 0 : res_op->resimplify (lseq, valueize);
3819 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 771, __FILE__, __LINE__, true);
3820 : 0 : return true;
3821 : : }
3822 : : next_after_fail1128:;
3823 : : }
3824 : : }
3825 : : return false;
3826 : : }
3827 : :
3828 : : bool
3829 : 0 : gimple_simplify_592 (gimple_match_op *res_op, gimple_seq *seq,
3830 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3831 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3832 : : const combined_fn ARG_UNUSED (cond_op))
3833 : : {
3834 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3835 : 0 : gimple_seq *lseq = seq;
3836 : 0 : if (lseq
3837 : 0 : && (!single_use (captures[1])))
3838 : 0 : lseq = NULL;
3839 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1134;
3840 : 0 : {
3841 : 0 : res_op->set_op (cond_op, type, 4);
3842 : 0 : {
3843 : 0 : tree _o1[2], _r1;
3844 : 0 : _o1[0] = captures[2];
3845 : 0 : _o1[1] = captures[0];
3846 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3847 : 0 : tem_op.resimplify (lseq, valueize);
3848 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3849 : 0 : if (!_r1) goto next_after_fail1134;
3850 : 0 : res_op->ops[0] = _r1;
3851 : : }
3852 : 0 : res_op->ops[1] = captures[3];
3853 : 0 : res_op->ops[2] = captures[4];
3854 : 0 : res_op->ops[3] = captures[5];
3855 : 0 : res_op->resimplify (lseq, valueize);
3856 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 777, __FILE__, __LINE__, true);
3857 : : return true;
3858 : : }
3859 : : next_after_fail1134:;
3860 : : return false;
3861 : : }
3862 : :
3863 : : bool
3864 : 66 : gimple_simplify_601 (gimple_match_op *res_op, gimple_seq *seq,
3865 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3866 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3867 : : const combined_fn ARG_UNUSED (sins),
3868 : : const combined_fn ARG_UNUSED (atans),
3869 : : const combined_fn ARG_UNUSED (sqrts),
3870 : : const combined_fn ARG_UNUSED (copysigns))
3871 : : {
3872 : 66 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3873 : 66 : {
3874 : 66 : REAL_VALUE_TYPE r_cst;
3875 : 66 : build_sinatan_real (&r_cst, type);
3876 : 66 : tree t_cst = build_real (type, r_cst);
3877 : 66 : tree t_one = build_one_cst (type);
3878 : 66 : if (SCALAR_FLOAT_TYPE_P (type)
3879 : : )
3880 : : {
3881 : 66 : gimple_seq *lseq = seq;
3882 : 66 : if (lseq
3883 : 36 : && (!single_use (captures[0])))
3884 : 54 : lseq = NULL;
3885 : 66 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1143;
3886 : 66 : {
3887 : 66 : res_op->set_op (COND_EXPR, type, 3);
3888 : 66 : {
3889 : 66 : tree _o1[2], _r1;
3890 : 66 : {
3891 : 66 : tree _o2[1], _r2;
3892 : 66 : _o2[0] = captures[1];
3893 : 66 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
3894 : 66 : tem_op.resimplify (lseq, valueize);
3895 : 66 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3896 : 66 : if (!_r2) goto next_after_fail1143;
3897 : 12 : _o1[0] = _r2;
3898 : : }
3899 : 12 : _o1[1] = t_cst;
3900 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), LT_EXPR, boolean_type_node, _o1[0], _o1[1]);
3901 : 12 : tem_op.resimplify (lseq, valueize);
3902 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3903 : 12 : if (!_r1) goto next_after_fail1143;
3904 : 12 : res_op->ops[0] = _r1;
3905 : : }
3906 : 12 : {
3907 : 12 : tree _o1[2], _r1;
3908 : 12 : _o1[0] = captures[1];
3909 : 12 : {
3910 : 12 : tree _o2[1], _r2;
3911 : 12 : {
3912 : 12 : tree _o3[2], _r3;
3913 : 12 : {
3914 : 12 : tree _o4[2], _r4;
3915 : 12 : _o4[0] = captures[1];
3916 : 12 : _o4[1] = captures[1];
3917 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o4[0]), _o4[0], _o4[1]);
3918 : 12 : tem_op.resimplify (lseq, valueize);
3919 : 12 : _r4 = maybe_push_res_to_seq (&tem_op, lseq);
3920 : 12 : if (!_r4) goto next_after_fail1143;
3921 : 12 : _o3[0] = _r4;
3922 : : }
3923 : 12 : _o3[1] = t_one;
3924 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o3[0]), _o3[0], _o3[1]);
3925 : 12 : tem_op.resimplify (lseq, valueize);
3926 : 12 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
3927 : 12 : if (!_r3) goto next_after_fail1143;
3928 : 12 : _o2[0] = _r3;
3929 : : }
3930 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), sqrts, TREE_TYPE (_o2[0]), _o2[0]);
3931 : 12 : tem_op.resimplify (lseq, valueize);
3932 : 12 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3933 : 12 : if (!_r2) goto next_after_fail1143;
3934 : 12 : _o1[1] = _r2;
3935 : : }
3936 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), RDIV_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3937 : 12 : tem_op.resimplify (lseq, valueize);
3938 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3939 : 12 : if (!_r1) goto next_after_fail1143;
3940 : 12 : res_op->ops[1] = _r1;
3941 : : }
3942 : 12 : {
3943 : 12 : tree _o1[2], _r1;
3944 : 12 : _o1[0] = t_one;
3945 : 12 : _o1[1] = captures[1];
3946 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), copysigns, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3947 : 12 : tem_op.resimplify (lseq, valueize);
3948 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3949 : 12 : if (!_r1) goto next_after_fail1143;
3950 : 12 : res_op->ops[2] = _r1;
3951 : : }
3952 : 12 : res_op->resimplify (lseq, valueize);
3953 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 786, __FILE__, __LINE__, true);
3954 : 12 : return true;
3955 : : }
3956 : 54 : next_after_fail1143:;
3957 : : }
3958 : : }
3959 : 54 : return false;
3960 : : }
3961 : :
3962 : : bool
3963 : 6 : gimple_simplify_633 (gimple_match_op *res_op, gimple_seq *seq,
3964 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3965 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3966 : : const enum tree_code ARG_UNUSED (rot),
3967 : : const combined_fn ARG_UNUSED (popcount))
3968 : : {
3969 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3970 : 12 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3971 : 6 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3972 : 6 : && (
3973 : : 1
3974 : : || !TREE_SIDE_EFFECTS (captures[3]))
3975 : : )
3976 : : {
3977 : 6 : {
3978 : 6 : tree type0 = TREE_TYPE (captures[0]);
3979 : 6 : tree type1 = TREE_TYPE (captures[1]);
3980 : 6 : unsigned int prec0 = TYPE_PRECISION (type0);
3981 : 6 : unsigned int prec1 = TYPE_PRECISION (type1);
3982 : 6 : if (prec0 == prec1 || (prec0 > prec1 && TYPE_UNSIGNED (type1))
3983 : : )
3984 : : {
3985 : 6 : gimple_seq *lseq = seq;
3986 : 6 : if (lseq
3987 : 3 : && (!single_use (captures[0])
3988 : 3 : || !single_use (captures[1])))
3989 : 3 : lseq = NULL;
3990 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1179;
3991 : 6 : {
3992 : 6 : res_op->set_op (popcount, type, 1);
3993 : 6 : {
3994 : 6 : tree _o1[1], _r1;
3995 : 6 : _o1[0] = captures[2];
3996 : 6 : if (type0 != TREE_TYPE (_o1[0])
3997 : 6 : && !useless_type_conversion_p (type0, TREE_TYPE (_o1[0])))
3998 : : {
3999 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type0, _o1[0]);
4000 : 0 : tem_op.resimplify (lseq, valueize);
4001 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4002 : 0 : if (!_r1) goto next_after_fail1179;
4003 : : }
4004 : : else
4005 : : _r1 = _o1[0];
4006 : 6 : res_op->ops[0] = _r1;
4007 : : }
4008 : 6 : res_op->resimplify (lseq, valueize);
4009 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 817, __FILE__, __LINE__, true);
4010 : 6 : return true;
4011 : : }
4012 : : next_after_fail1179:;
4013 : : }
4014 : : }
4015 : : }
4016 : : return false;
4017 : : }
4018 : :
4019 : : bool
4020 : 9 : gimple_simplify_639 (gimple_match_op *res_op, gimple_seq *seq,
4021 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4022 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4023 : : const combined_fn ARG_UNUSED (bswap),
4024 : : const combined_fn ARG_UNUSED (parity))
4025 : : {
4026 : 9 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4027 : 18 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4028 : 9 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
4029 : 18 : && TYPE_PRECISION (TREE_TYPE (captures[0]))
4030 : 9 : >= TYPE_PRECISION (TREE_TYPE (captures[1]))
4031 : : )
4032 : : {
4033 : 9 : {
4034 : 9 : tree type0 = TREE_TYPE (captures[0]);
4035 : 9 : tree type1 = TREE_TYPE (captures[1]);
4036 : 9 : gimple_seq *lseq = seq;
4037 : 9 : if (lseq
4038 : 3 : && (!single_use (captures[0])
4039 : 3 : || !single_use (captures[1])))
4040 : 6 : lseq = NULL;
4041 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1188;
4042 : 9 : {
4043 : 9 : res_op->set_op (parity, type, 1);
4044 : 9 : {
4045 : 9 : tree _o1[1], _r1;
4046 : 9 : {
4047 : 9 : tree _o2[1], _r2;
4048 : 9 : _o2[0] = captures[2];
4049 : 9 : if (type1 != TREE_TYPE (_o2[0])
4050 : 9 : && !useless_type_conversion_p (type1, TREE_TYPE (_o2[0])))
4051 : : {
4052 : 3 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type1, _o2[0]);
4053 : 3 : tem_op.resimplify (lseq, valueize);
4054 : 3 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
4055 : 3 : if (!_r2) goto next_after_fail1188;
4056 : : }
4057 : : else
4058 : : _r2 = _o2[0];
4059 : 9 : _o1[0] = _r2;
4060 : : }
4061 : 9 : if (type0 != TREE_TYPE (_o1[0])
4062 : 9 : && !useless_type_conversion_p (type0, TREE_TYPE (_o1[0])))
4063 : : {
4064 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type0, _o1[0]);
4065 : 0 : tem_op.resimplify (lseq, valueize);
4066 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4067 : 0 : if (!_r1) goto next_after_fail1188;
4068 : : }
4069 : : else
4070 : : _r1 = _o1[0];
4071 : 9 : res_op->ops[0] = _r1;
4072 : : }
4073 : 9 : res_op->resimplify (lseq, valueize);
4074 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 824, __FILE__, __LINE__, true);
4075 : 9 : return true;
4076 : : }
4077 : : next_after_fail1188:;
4078 : : }
4079 : : }
4080 : : return false;
4081 : : }
4082 : :
4083 : : bool
4084 : 6234 : gimple_simplify_647 (gimple_match_op *res_op, gimple_seq *seq,
4085 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4086 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
4087 : : const enum tree_code ARG_UNUSED (plusminus),
4088 : : const enum tree_code ARG_UNUSED (minusplus))
4089 : : {
4090 : 6234 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4091 : 6234 : if (!VECTOR_INTEGER_TYPE_P (type)
4092 : : && !FLOAT_WORDS_BIG_ENDIAN
4093 : 12750 : && (operand_equal_p (captures[0], captures[2], 0)
4094 : 4008 : ? operand_equal_p (captures[1], captures[3], 0)
4095 : 2966 : : operand_equal_p (captures[0], captures[3], 0) && operand_equal_p (captures[1], captures[2], 0))
4096 : : )
4097 : : {
4098 : 3974 : {
4099 : 3974 : vec_perm_builder builder;
4100 : 3974 : if (tree_to_vec_perm_builder (&builder, captures[4])
4101 : : )
4102 : : {
4103 : 3974 : {
4104 : 3974 : poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (type);
4105 : 3974 : vec_perm_indices sel (builder, 2, nelts);
4106 : 3974 : machine_mode vec_mode = TYPE_MODE (type);
4107 : 3974 : machine_mode wide_mode;
4108 : 3974 : scalar_mode wide_elt_mode;
4109 : 3974 : poly_uint64 wide_nunits;
4110 : 3974 : scalar_mode inner_mode = GET_MODE_INNER (vec_mode);
4111 : 3974 : if (VECTOR_MODE_P (vec_mode)
4112 : 3958 : && sel.series_p (0, 2, 0, 2)
4113 : 3799 : && sel.series_p (1, 2, nelts + 1, 2)
4114 : 3784 : && GET_MODE_2XWIDER_MODE (inner_mode).exists (&wide_elt_mode)
4115 : 3784 : && multiple_p (GET_MODE_NUNITS (vec_mode), 2, &wide_nunits)
4116 : 11732 : && related_vector_mode (vec_mode, wide_elt_mode,
4117 : 3784 : wide_nunits).exists (&wide_mode)
4118 : : )
4119 : : {
4120 : 1463 : {
4121 : 1463 : tree stype
4122 : 1463 : = lang_hooks.types.type_for_mode (GET_MODE_INNER (wide_mode),
4123 : 1463 : TYPE_UNSIGNED (type));
4124 : 1463 : tree ntype = build_vector_type_for_mode (stype, wide_mode);
4125 : 5852 : const struct real_format *fmt_old = FLOAT_MODE_FORMAT (vec_mode);
4126 : 5852 : const struct real_format *fmt_new = FLOAT_MODE_FORMAT (wide_mode);
4127 : 1463 : if (TYPE_MODE (stype) != BLKmode
4128 : 1463 : && VECTOR_TYPE_P (ntype)
4129 : 1463 : && fmt_old != NULL
4130 : 2926 : && fmt_new != NULL
4131 : : )
4132 : : {
4133 : 1463 : {
4134 : 2926 : if (known_eq (GET_MODE_NUNITS (wide_mode), 1)
4135 : 1463 : && !target_supports_op_p (ntype, NEGATE_EXPR, optab_vector))
4136 : 0 : ntype = stype;
4137 : 1463 : if (fmt_new->signbit_rw
4138 : 1463 : == fmt_old->signbit_rw + GET_MODE_UNIT_BITSIZE (vec_mode)
4139 : 1463 : && fmt_new->signbit_rw == fmt_new->signbit_ro
4140 : 1463 : && targetm.can_change_mode_class (TYPE_MODE (ntype),
4141 : 1463 : TYPE_MODE (type), ALL_REGS)
4142 : 1463 : && ((optimize_vectors_before_lowering_p ()
4143 : 0 : && VECTOR_TYPE_P (ntype))
4144 : 0 : || target_supports_op_p (ntype, NEGATE_EXPR, optab_vector))
4145 : : )
4146 : : {
4147 : 0 : if (plusminus == PLUS_EXPR
4148 : : )
4149 : : {
4150 : 0 : gimple_seq *lseq = seq;
4151 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1198;
4152 : 0 : {
4153 : 0 : res_op->set_op (PLUS_EXPR, type, 2);
4154 : 0 : {
4155 : 0 : tree _o1[1], _r1;
4156 : 0 : {
4157 : 0 : tree _o2[1], _r2;
4158 : 0 : {
4159 : 0 : tree _o3[1], _r3;
4160 : 0 : _o3[0] = captures[3];
4161 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, ntype, _o3[0]);
4162 : 0 : tem_op.resimplify (lseq, valueize);
4163 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
4164 : 0 : if (!_r3) goto next_after_fail1198;
4165 : 0 : _o2[0] = _r3;
4166 : : }
4167 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
4168 : 0 : tem_op.resimplify (lseq, valueize);
4169 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
4170 : 0 : if (!_r2) goto next_after_fail1198;
4171 : 0 : _o1[0] = _r2;
4172 : : }
4173 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
4174 : 0 : tem_op.resimplify (lseq, valueize);
4175 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4176 : 0 : if (!_r1) goto next_after_fail1198;
4177 : 0 : res_op->ops[0] = _r1;
4178 : : }
4179 : 0 : res_op->ops[1] = captures[2];
4180 : 0 : res_op->resimplify (lseq, valueize);
4181 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 837, __FILE__, __LINE__, true);
4182 : 0 : return true;
4183 : : }
4184 : 3974 : next_after_fail1198:;
4185 : : }
4186 : : else
4187 : : {
4188 : 0 : gimple_seq *lseq = seq;
4189 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1199;
4190 : 0 : {
4191 : 0 : res_op->set_op (MINUS_EXPR, type, 2);
4192 : 0 : res_op->ops[0] = captures[0];
4193 : 0 : {
4194 : 0 : tree _o1[1], _r1;
4195 : 0 : {
4196 : 0 : tree _o2[1], _r2;
4197 : 0 : {
4198 : 0 : tree _o3[1], _r3;
4199 : 0 : _o3[0] = captures[1];
4200 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, ntype, _o3[0]);
4201 : 0 : tem_op.resimplify (lseq, valueize);
4202 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
4203 : 0 : if (!_r3) goto next_after_fail1199;
4204 : 0 : _o2[0] = _r3;
4205 : : }
4206 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o2[0]), _o2[0]);
4207 : 0 : tem_op.resimplify (lseq, valueize);
4208 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
4209 : 0 : if (!_r2) goto next_after_fail1199;
4210 : 0 : _o1[0] = _r2;
4211 : : }
4212 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
4213 : 0 : tem_op.resimplify (lseq, valueize);
4214 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4215 : 0 : if (!_r1) goto next_after_fail1199;
4216 : 0 : res_op->ops[1] = _r1;
4217 : : }
4218 : 0 : res_op->resimplify (lseq, valueize);
4219 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 838, __FILE__, __LINE__, true);
4220 : 0 : return true;
4221 : : }
4222 : 3974 : next_after_fail1199:;
4223 : : }
4224 : : }
4225 : : }
4226 : : }
4227 : : }
4228 : : }
4229 : 3974 : }
4230 : : }
4231 : 3974 : }
4232 : : }
4233 : : return false;
4234 : : }
4235 : :
4236 : : bool
4237 : 7 : gimple_simplify_CFN_COSH (gimple_match_op *res_op, gimple_seq *seq,
4238 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4239 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
4240 : : {
4241 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4242 : 7 : switch (TREE_CODE (_p0))
4243 : : {
4244 : 7 : case SSA_NAME:
4245 : 7 : if (gimple *_d1 = get_def (valueize, _p0))
4246 : : {
4247 : 4 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4248 : 0 : switch (gimple_assign_rhs_code (_a1))
4249 : : {
4250 : 0 : case NEGATE_EXPR:
4251 : 0 : {
4252 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4253 : 0 : _q20 = do_valueize (valueize, _q20);
4254 : 0 : {
4255 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4256 : 0 : const combined_fn coss = CFN_COSH;
4257 : 0 : gimple_seq *lseq = seq;
4258 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1242;
4259 : 0 : {
4260 : 0 : res_op->set_op (coss, type, 1);
4261 : 0 : res_op->ops[0] = captures[0];
4262 : 0 : res_op->resimplify (lseq, valueize);
4263 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 860, __FILE__, __LINE__, true);
4264 : 0 : return true;
4265 : : }
4266 : 0 : next_after_fail1242:;
4267 : : }
4268 : 0 : break;
4269 : : }
4270 : 0 : case ABS_EXPR:
4271 : 0 : {
4272 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4273 : 0 : _q20 = do_valueize (valueize, _q20);
4274 : 0 : {
4275 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4276 : 0 : const combined_fn coss = CFN_COSH;
4277 : 0 : gimple_seq *lseq = seq;
4278 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1243;
4279 : 0 : {
4280 : 0 : res_op->set_op (coss, type, 1);
4281 : 0 : res_op->ops[0] = captures[0];
4282 : 0 : res_op->resimplify (lseq, valueize);
4283 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 860, __FILE__, __LINE__, true);
4284 : 0 : return true;
4285 : : }
4286 : 0 : next_after_fail1243:;
4287 : : }
4288 : 0 : break;
4289 : : }
4290 : : default:;
4291 : : }
4292 : 4 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
4293 : 0 : switch (gimple_call_combined_fn (_c1))
4294 : : {
4295 : 0 : case CFN_BUILT_IN_COPYSIGN:
4296 : 0 : if (gimple_call_num_args (_c1) == 2)
4297 : : {
4298 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4299 : 0 : _q20 = do_valueize (valueize, _q20);
4300 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4301 : 0 : _q21 = do_valueize (valueize, _q21);
4302 : 0 : {
4303 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4304 : 0 : if (gimple_simplify_398 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_COSH))
4305 : 0 : return true;
4306 : : }
4307 : : }
4308 : : break;
4309 : 0 : case CFN_BUILT_IN_COPYSIGNF:
4310 : 0 : if (gimple_call_num_args (_c1) == 2)
4311 : : {
4312 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4313 : 0 : _q20 = do_valueize (valueize, _q20);
4314 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4315 : 0 : _q21 = do_valueize (valueize, _q21);
4316 : 0 : {
4317 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4318 : 0 : if (gimple_simplify_398 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_COSH))
4319 : 0 : return true;
4320 : : }
4321 : : }
4322 : : break;
4323 : 0 : case CFN_BUILT_IN_COPYSIGNL:
4324 : 0 : if (gimple_call_num_args (_c1) == 2)
4325 : : {
4326 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4327 : 0 : _q20 = do_valueize (valueize, _q20);
4328 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4329 : 0 : _q21 = do_valueize (valueize, _q21);
4330 : 0 : {
4331 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4332 : 0 : if (gimple_simplify_398 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_COSH))
4333 : 0 : return true;
4334 : : }
4335 : : }
4336 : : break;
4337 : 0 : case CFN_ATANH:
4338 : 0 : if (gimple_call_num_args (_c1) == 1)
4339 : : {
4340 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4341 : 0 : _q20 = do_valueize (valueize, _q20);
4342 : 0 : {
4343 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4344 : 0 : if (gimple_simplify_400 (res_op, seq, valueize, type, captures, CFN_COSH, CFN_ATANH, CFN_SQRT))
4345 : 0 : return true;
4346 : : }
4347 : : }
4348 : : break;
4349 : 0 : case CFN_COPYSIGN:
4350 : 0 : if (gimple_call_num_args (_c1) == 2)
4351 : : {
4352 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4353 : 0 : _q20 = do_valueize (valueize, _q20);
4354 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4355 : 0 : _q21 = do_valueize (valueize, _q21);
4356 : 0 : {
4357 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4358 : 0 : if (gimple_simplify_398 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_COSH))
4359 : 0 : return true;
4360 : : }
4361 : : }
4362 : : break;
4363 : : default:;
4364 : : }
4365 : : }
4366 : : break;
4367 : : default:;
4368 : : }
4369 : : return false;
4370 : : }
4371 : :
4372 : : bool
4373 : 4905663 : gimple_simplify_VIEW_CONVERT_EXPR (gimple_match_op *res_op, gimple_seq *seq,
4374 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4375 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
4376 : : {
4377 : 4905663 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4378 : 4905663 : {
4379 : 4905663 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4380 : 4905663 : if ((
4381 : : 1
4382 : 4905663 : && useless_type_conversion_p (type, TREE_TYPE (captures[0])))
4383 : : || (
4384 : :
4385 : : && type == TREE_TYPE (captures[0]))
4386 : : )
4387 : : {
4388 : 622563 : gimple_seq *lseq = seq;
4389 : 622563 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1290;
4390 : 622563 : {
4391 : 622563 : tree tem;
4392 : 622563 : tem = captures[0];
4393 : 622563 : res_op->set_value (tem);
4394 : 622563 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 849, __FILE__, __LINE__, true);
4395 : 622563 : return true;
4396 : : }
4397 : 0 : next_after_fail1290:;
4398 : : }
4399 : : }
4400 : 4283100 : switch (TREE_CODE (_p0))
4401 : : {
4402 : 2682386 : case SSA_NAME:
4403 : 2682386 : if (gimple *_d1 = get_def (valueize, _p0))
4404 : : {
4405 : 2047940 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4406 : 1514812 : switch (gimple_assign_rhs_code (_a1))
4407 : : {
4408 : 15782 : case VIEW_CONVERT_EXPR:
4409 : 15782 : {
4410 : 15782 : tree _q20 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
4411 : 15782 : if ((TREE_CODE (_q20) == SSA_NAME
4412 : 15782 : || is_gimple_min_invariant (_q20)))
4413 : : {
4414 : 15774 : _q20 = do_valueize (valueize, _q20);
4415 : 15774 : {
4416 : 15774 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4417 : 15774 : gimple_seq *lseq = seq;
4418 : 15774 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1291;
4419 : 15774 : {
4420 : 15774 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
4421 : 15774 : res_op->ops[0] = captures[0];
4422 : 15774 : res_op->resimplify (lseq, valueize);
4423 : 15774 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 886, __FILE__, __LINE__, true);
4424 : 15774 : return true;
4425 : : }
4426 : 0 : next_after_fail1291:;
4427 : : }
4428 : : }
4429 : : break;
4430 : : }
4431 : : default:;
4432 : : }
4433 : : }
4434 : : break;
4435 : 4267326 : default:;
4436 : : }
4437 : 4267326 : {
4438 : 4267326 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4439 : 2962032 : if ((INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type))
4440 : 1311477 : && (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0])))
4441 : 5289665 : && TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (captures[0]))
4442 : : )
4443 : : {
4444 : 552377 : gimple_seq *lseq = seq;
4445 : 552377 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1292;
4446 : 552377 : {
4447 : 552377 : res_op->set_op (NOP_EXPR, type, 1);
4448 : 552377 : res_op->ops[0] = captures[0];
4449 : 552377 : res_op->resimplify (lseq, valueize);
4450 : 552377 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 887, __FILE__, __LINE__, true);
4451 : 552377 : return true;
4452 : : }
4453 : 0 : next_after_fail1292:;
4454 : : }
4455 : : }
4456 : 3714949 : switch (TREE_CODE (_p0))
4457 : : {
4458 : 2332498 : case SSA_NAME:
4459 : 2332498 : if (gimple *_d1 = get_def (valueize, _p0))
4460 : : {
4461 : 1799012 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4462 : 1171916 : switch (gimple_assign_rhs_code (_a1))
4463 : : {
4464 : 7331 : CASE_CONVERT:
4465 : 7331 : {
4466 : 7331 : tree _q20 = gimple_assign_rhs1 (_a1);
4467 : 7331 : _q20 = do_valueize (valueize, _q20);
4468 : 7331 : {
4469 : 7331 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4470 : 14662 : if ((INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0])))
4471 : 1859 : && (INTEGRAL_TYPE_P (TREE_TYPE (captures[1])) || POINTER_TYPE_P (TREE_TYPE (captures[1])))
4472 : 1859 : && TYPE_SIZE (TREE_TYPE (captures[0])) == TYPE_SIZE (TREE_TYPE (captures[1]))
4473 : 7555 : && (TYPE_PRECISION (TREE_TYPE (captures[0])) == TYPE_PRECISION (TREE_TYPE (captures[1]))
4474 : 69 : || (TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
4475 : 2 : && TYPE_UNSIGNED (TREE_TYPE (captures[1]))))
4476 : : )
4477 : : {
4478 : 157 : gimple_seq *lseq = seq;
4479 : 157 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1293;
4480 : 157 : {
4481 : 157 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
4482 : 157 : res_op->ops[0] = captures[1];
4483 : 157 : res_op->resimplify (lseq, valueize);
4484 : 157 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 888, __FILE__, __LINE__, true);
4485 : 157 : return true;
4486 : : }
4487 : 0 : next_after_fail1293:;
4488 : : }
4489 : : }
4490 : 7174 : break;
4491 : : }
4492 : 20906 : case CONSTRUCTOR:
4493 : 20906 : {
4494 : 20906 : {
4495 : 20906 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4496 : 20906 : {
4497 : 20906 : tree ctor = (TREE_CODE (captures[0]) == SSA_NAME
4498 : 20906 : ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])) : captures[0]);
4499 : 20906 : if (CONSTRUCTOR_NELTS (ctor) == 0
4500 : : )
4501 : : {
4502 : 0 : gimple_seq *lseq = seq;
4503 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1294;
4504 : 0 : {
4505 : 0 : tree tem;
4506 : 0 : tem = build_zero_cst (type);
4507 : 0 : res_op->set_value (tem);
4508 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 889, __FILE__, __LINE__, true);
4509 : 0 : return true;
4510 : : }
4511 : 0 : next_after_fail1294:;
4512 : : }
4513 : : else
4514 : : {
4515 : 20906 : if (CONSTRUCTOR_NELTS (ctor) == 1
4516 : 445 : && VECTOR_TYPE_P (TREE_TYPE (ctor))
4517 : 21351 : && operand_equal_p (TYPE_SIZE (type),
4518 : 445 : TYPE_SIZE (TREE_TYPE
4519 : : (CONSTRUCTOR_ELT (ctor, 0)->value)))
4520 : : )
4521 : : {
4522 : 177 : gimple_seq *lseq = seq;
4523 : 177 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1295;
4524 : 177 : {
4525 : 177 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
4526 : 177 : res_op->ops[0] = CONSTRUCTOR_ELT (ctor, 0)->value;
4527 : 177 : res_op->resimplify (lseq, valueize);
4528 : 177 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 890, __FILE__, __LINE__, true);
4529 : 177 : return true;
4530 : : }
4531 : 0 : next_after_fail1295:;
4532 : : }
4533 : : }
4534 : : }
4535 : : }
4536 : : break;
4537 : : }
4538 : 5759 : case VEC_COND_EXPR:
4539 : 5759 : {
4540 : 5759 : tree _q20 = gimple_assign_rhs1 (_a1);
4541 : 5759 : _q20 = do_valueize (valueize, _q20);
4542 : 5759 : tree _q21 = gimple_assign_rhs2 (_a1);
4543 : 5759 : _q21 = do_valueize (valueize, _q21);
4544 : 5759 : tree _q22 = gimple_assign_rhs3 (_a1);
4545 : 5759 : _q22 = do_valueize (valueize, _q22);
4546 : 5759 : {
4547 : 5759 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4548 : 5519 : if (VECTOR_TYPE_P (type) && VECTOR_TYPE_P (TREE_TYPE (captures[2]))
4549 : 7336 : && known_eq (TYPE_VECTOR_SUBPARTS (type),
4550 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (captures[2])))
4551 : 7682 : && tree_nop_conversion_p (TREE_TYPE (type), TREE_TYPE (TREE_TYPE (captures[2])))
4552 : : )
4553 : : {
4554 : 346 : gimple_seq *lseq = seq;
4555 : 346 : if (lseq
4556 : 177 : && (!single_use (captures[0])))
4557 : 174 : lseq = NULL;
4558 : 346 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1296;
4559 : 346 : {
4560 : 346 : res_op->set_op (VEC_COND_EXPR, type, 3);
4561 : 346 : res_op->ops[0] = captures[1];
4562 : 346 : {
4563 : 346 : tree _o1[1], _r1;
4564 : 346 : _o1[0] = captures[2];
4565 : 346 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
4566 : 346 : tem_op.resimplify (NULL, valueize);
4567 : 346 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
4568 : 346 : if (!_r1) goto next_after_fail1296;
4569 : 254 : res_op->ops[1] = _r1;
4570 : : }
4571 : 254 : {
4572 : 254 : tree _o1[1], _r1;
4573 : 254 : _o1[0] = captures[3];
4574 : 254 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
4575 : 254 : tem_op.resimplify (NULL, valueize);
4576 : 254 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
4577 : 254 : if (!_r1) goto next_after_fail1296;
4578 : 250 : res_op->ops[2] = _r1;
4579 : : }
4580 : 250 : res_op->resimplify (lseq, valueize);
4581 : 250 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 891, __FILE__, __LINE__, true);
4582 : 250 : return true;
4583 : : }
4584 : 5509 : next_after_fail1296:;
4585 : : }
4586 : : }
4587 : 5509 : break;
4588 : : }
4589 : : default:;
4590 : : }
4591 : : }
4592 : : break;
4593 : : default:;
4594 : : }
4595 : : return false;
4596 : : }
4597 : :
4598 : : bool
4599 : 2943 : gimple_simplify_CFN_BUILT_IN_BSWAP16 (gimple_match_op *res_op, gimple_seq *seq,
4600 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4601 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
4602 : : {
4603 : 2943 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4604 : 2943 : switch (TREE_CODE (_p0))
4605 : : {
4606 : 2941 : case SSA_NAME:
4607 : 2941 : if (gimple *_d1 = get_def (valueize, _p0))
4608 : : {
4609 : 1531 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4610 : 1503 : switch (gimple_assign_rhs_code (_a1))
4611 : : {
4612 : 0 : case BIT_NOT_EXPR:
4613 : 0 : {
4614 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4615 : 0 : _q20 = do_valueize (valueize, _q20);
4616 : 0 : switch (TREE_CODE (_q20))
4617 : : {
4618 : 0 : case SSA_NAME:
4619 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
4620 : : {
4621 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4622 : 0 : switch (gimple_call_combined_fn (_c2))
4623 : : {
4624 : 0 : case CFN_BUILT_IN_BSWAP16:
4625 : 0 : if (gimple_call_num_args (_c2) == 1)
4626 : : {
4627 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4628 : 0 : _q30 = do_valueize (valueize, _q30);
4629 : 0 : {
4630 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4631 : 0 : if (gimple_simplify_572 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16))
4632 : 0 : return true;
4633 : : }
4634 : : }
4635 : : break;
4636 : : default:;
4637 : : }
4638 : : }
4639 : : break;
4640 : : default:;
4641 : : }
4642 : : break;
4643 : : }
4644 : 0 : case BIT_XOR_EXPR:
4645 : 0 : {
4646 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4647 : 0 : _q20 = do_valueize (valueize, _q20);
4648 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
4649 : 0 : _q21 = do_valueize (valueize, _q21);
4650 : 0 : if (tree_swap_operands_p (_q20, _q21))
4651 : 0 : std::swap (_q20, _q21);
4652 : 0 : switch (TREE_CODE (_q20))
4653 : : {
4654 : 0 : case SSA_NAME:
4655 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
4656 : : {
4657 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4658 : 0 : switch (gimple_call_combined_fn (_c2))
4659 : : {
4660 : 0 : case CFN_BUILT_IN_BSWAP16:
4661 : 0 : if (gimple_call_num_args (_c2) == 1)
4662 : : {
4663 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4664 : 0 : _q30 = do_valueize (valueize, _q30);
4665 : 0 : {
4666 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
4667 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, CFN_BUILT_IN_BSWAP16))
4668 : 0 : return true;
4669 : : }
4670 : : }
4671 : : break;
4672 : : default:;
4673 : : }
4674 : : }
4675 : : break;
4676 : 0 : default:;
4677 : : }
4678 : 0 : switch (TREE_CODE (_q21))
4679 : : {
4680 : 0 : case SSA_NAME:
4681 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
4682 : : {
4683 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4684 : 0 : switch (gimple_call_combined_fn (_c2))
4685 : : {
4686 : 0 : case CFN_BUILT_IN_BSWAP16:
4687 : 0 : if (gimple_call_num_args (_c2) == 1)
4688 : : {
4689 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
4690 : 0 : _q40 = do_valueize (valueize, _q40);
4691 : 0 : {
4692 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
4693 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, CFN_BUILT_IN_BSWAP16))
4694 : 0 : return true;
4695 : : }
4696 : : }
4697 : : break;
4698 : : default:;
4699 : : }
4700 : : }
4701 : : break;
4702 : : default:;
4703 : : }
4704 : 2943 : break;
4705 : : }
4706 : 0 : case BIT_IOR_EXPR:
4707 : 0 : {
4708 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4709 : 0 : _q20 = do_valueize (valueize, _q20);
4710 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
4711 : 0 : _q21 = do_valueize (valueize, _q21);
4712 : 0 : if (tree_swap_operands_p (_q20, _q21))
4713 : 0 : std::swap (_q20, _q21);
4714 : 0 : switch (TREE_CODE (_q20))
4715 : : {
4716 : 0 : case SSA_NAME:
4717 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
4718 : : {
4719 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4720 : 0 : switch (gimple_call_combined_fn (_c2))
4721 : : {
4722 : 0 : case CFN_BUILT_IN_BSWAP16:
4723 : 0 : if (gimple_call_num_args (_c2) == 1)
4724 : : {
4725 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4726 : 0 : _q30 = do_valueize (valueize, _q30);
4727 : 0 : {
4728 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
4729 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, CFN_BUILT_IN_BSWAP16))
4730 : 0 : return true;
4731 : : }
4732 : : }
4733 : : break;
4734 : : default:;
4735 : : }
4736 : : }
4737 : : break;
4738 : 0 : default:;
4739 : : }
4740 : 0 : switch (TREE_CODE (_q21))
4741 : : {
4742 : 0 : case SSA_NAME:
4743 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
4744 : : {
4745 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4746 : 0 : switch (gimple_call_combined_fn (_c2))
4747 : : {
4748 : 0 : case CFN_BUILT_IN_BSWAP16:
4749 : 0 : if (gimple_call_num_args (_c2) == 1)
4750 : : {
4751 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
4752 : 0 : _q40 = do_valueize (valueize, _q40);
4753 : 0 : {
4754 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
4755 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, CFN_BUILT_IN_BSWAP16))
4756 : 0 : return true;
4757 : : }
4758 : : }
4759 : : break;
4760 : : default:;
4761 : : }
4762 : : }
4763 : : break;
4764 : : default:;
4765 : : }
4766 : 2943 : break;
4767 : : }
4768 : 389 : case BIT_AND_EXPR:
4769 : 389 : {
4770 : 389 : tree _q20 = gimple_assign_rhs1 (_a1);
4771 : 389 : _q20 = do_valueize (valueize, _q20);
4772 : 389 : tree _q21 = gimple_assign_rhs2 (_a1);
4773 : 389 : _q21 = do_valueize (valueize, _q21);
4774 : 389 : if (tree_swap_operands_p (_q20, _q21))
4775 : 0 : std::swap (_q20, _q21);
4776 : 389 : switch (TREE_CODE (_q20))
4777 : : {
4778 : 389 : case SSA_NAME:
4779 : 389 : if (gimple *_d2 = get_def (valueize, _q20))
4780 : : {
4781 : 317 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4782 : 0 : switch (gimple_call_combined_fn (_c2))
4783 : : {
4784 : 0 : case CFN_BUILT_IN_BSWAP16:
4785 : 0 : if (gimple_call_num_args (_c2) == 1)
4786 : : {
4787 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4788 : 0 : _q30 = do_valueize (valueize, _q30);
4789 : 0 : {
4790 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
4791 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, CFN_BUILT_IN_BSWAP16))
4792 : 0 : return true;
4793 : : }
4794 : : }
4795 : : break;
4796 : : default:;
4797 : : }
4798 : : }
4799 : : break;
4800 : 389 : default:;
4801 : : }
4802 : 389 : switch (TREE_CODE (_q21))
4803 : : {
4804 : 0 : case SSA_NAME:
4805 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
4806 : : {
4807 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4808 : 0 : switch (gimple_call_combined_fn (_c2))
4809 : : {
4810 : 0 : case CFN_BUILT_IN_BSWAP16:
4811 : 0 : if (gimple_call_num_args (_c2) == 1)
4812 : : {
4813 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
4814 : 0 : _q40 = do_valueize (valueize, _q40);
4815 : 0 : {
4816 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
4817 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, CFN_BUILT_IN_BSWAP16))
4818 : 0 : return true;
4819 : : }
4820 : : }
4821 : : break;
4822 : : default:;
4823 : : }
4824 : : }
4825 : : break;
4826 : : default:;
4827 : : }
4828 : 2943 : break;
4829 : : }
4830 : : default:;
4831 : : }
4832 : 36 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
4833 : 0 : switch (gimple_call_combined_fn (_c1))
4834 : : {
4835 : 0 : case CFN_BUILT_IN_BSWAP16:
4836 : 0 : if (gimple_call_num_args (_c1) == 1)
4837 : : {
4838 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4839 : 0 : _q20 = do_valueize (valueize, _q20);
4840 : 0 : {
4841 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4842 : 0 : if (gimple_simplify_571 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16))
4843 : 0 : return true;
4844 : : }
4845 : : }
4846 : : break;
4847 : : default:;
4848 : : }
4849 : : }
4850 : : break;
4851 : : default:;
4852 : : }
4853 : : return false;
4854 : : }
4855 : :
4856 : : bool
4857 : 6581 : gimple_simplify_CFN_BUILT_IN_BSWAP64 (gimple_match_op *res_op, gimple_seq *seq,
4858 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4859 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
4860 : : {
4861 : 6581 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4862 : 6581 : switch (TREE_CODE (_p0))
4863 : : {
4864 : 6507 : case SSA_NAME:
4865 : 6507 : if (gimple *_d1 = get_def (valueize, _p0))
4866 : : {
4867 : 2698 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4868 : 2948 : switch (gimple_assign_rhs_code (_a1))
4869 : : {
4870 : 2 : case BIT_NOT_EXPR:
4871 : 2 : {
4872 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
4873 : 2 : _q20 = do_valueize (valueize, _q20);
4874 : 2 : switch (TREE_CODE (_q20))
4875 : : {
4876 : 2 : case SSA_NAME:
4877 : 2 : if (gimple *_d2 = get_def (valueize, _q20))
4878 : : {
4879 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4880 : 2 : switch (gimple_call_combined_fn (_c2))
4881 : : {
4882 : 2 : case CFN_BUILT_IN_BSWAP64:
4883 : 2 : if (gimple_call_num_args (_c2) == 1)
4884 : : {
4885 : 2 : tree _q30 = gimple_call_arg (_c2, 0);
4886 : 2 : _q30 = do_valueize (valueize, _q30);
4887 : 2 : {
4888 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4889 : 2 : if (gimple_simplify_572 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64))
4890 : 2 : return true;
4891 : : }
4892 : : }
4893 : : break;
4894 : : default:;
4895 : : }
4896 : : }
4897 : : break;
4898 : : default:;
4899 : : }
4900 : : break;
4901 : : }
4902 : 4 : case BIT_XOR_EXPR:
4903 : 4 : {
4904 : 4 : tree _q20 = gimple_assign_rhs1 (_a1);
4905 : 4 : _q20 = do_valueize (valueize, _q20);
4906 : 4 : tree _q21 = gimple_assign_rhs2 (_a1);
4907 : 4 : _q21 = do_valueize (valueize, _q21);
4908 : 4 : if (tree_swap_operands_p (_q20, _q21))
4909 : 0 : std::swap (_q20, _q21);
4910 : 4 : switch (TREE_CODE (_q20))
4911 : : {
4912 : 4 : case SSA_NAME:
4913 : 4 : if (gimple *_d2 = get_def (valueize, _q20))
4914 : : {
4915 : 4 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4916 : 4 : switch (gimple_call_combined_fn (_c2))
4917 : : {
4918 : 4 : case CFN_BUILT_IN_BSWAP64:
4919 : 4 : if (gimple_call_num_args (_c2) == 1)
4920 : : {
4921 : 4 : tree _q30 = gimple_call_arg (_c2, 0);
4922 : 4 : _q30 = do_valueize (valueize, _q30);
4923 : 4 : {
4924 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
4925 : 4 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, CFN_BUILT_IN_BSWAP64))
4926 : 4 : return true;
4927 : : }
4928 : : }
4929 : : break;
4930 : : default:;
4931 : : }
4932 : : }
4933 : : break;
4934 : 0 : default:;
4935 : : }
4936 : 0 : switch (TREE_CODE (_q21))
4937 : : {
4938 : 0 : case SSA_NAME:
4939 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
4940 : : {
4941 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4942 : 0 : switch (gimple_call_combined_fn (_c2))
4943 : : {
4944 : 0 : case CFN_BUILT_IN_BSWAP64:
4945 : 0 : if (gimple_call_num_args (_c2) == 1)
4946 : : {
4947 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
4948 : 0 : _q40 = do_valueize (valueize, _q40);
4949 : 0 : {
4950 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
4951 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, CFN_BUILT_IN_BSWAP64))
4952 : 0 : return true;
4953 : : }
4954 : : }
4955 : : break;
4956 : : default:;
4957 : : }
4958 : : }
4959 : : break;
4960 : : default:;
4961 : : }
4962 : 6581 : break;
4963 : : }
4964 : 141 : case BIT_IOR_EXPR:
4965 : 141 : {
4966 : 141 : tree _q20 = gimple_assign_rhs1 (_a1);
4967 : 141 : _q20 = do_valueize (valueize, _q20);
4968 : 141 : tree _q21 = gimple_assign_rhs2 (_a1);
4969 : 141 : _q21 = do_valueize (valueize, _q21);
4970 : 141 : if (tree_swap_operands_p (_q20, _q21))
4971 : 0 : std::swap (_q20, _q21);
4972 : 141 : switch (TREE_CODE (_q20))
4973 : : {
4974 : 141 : case SSA_NAME:
4975 : 141 : if (gimple *_d2 = get_def (valueize, _q20))
4976 : : {
4977 : 141 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4978 : 4 : switch (gimple_call_combined_fn (_c2))
4979 : : {
4980 : 4 : case CFN_BUILT_IN_BSWAP64:
4981 : 4 : if (gimple_call_num_args (_c2) == 1)
4982 : : {
4983 : 4 : tree _q30 = gimple_call_arg (_c2, 0);
4984 : 4 : _q30 = do_valueize (valueize, _q30);
4985 : 4 : {
4986 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
4987 : 4 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, CFN_BUILT_IN_BSWAP64))
4988 : 4 : return true;
4989 : : }
4990 : : }
4991 : : break;
4992 : : default:;
4993 : : }
4994 : : }
4995 : : break;
4996 : 137 : default:;
4997 : : }
4998 : 137 : switch (TREE_CODE (_q21))
4999 : : {
5000 : 126 : case SSA_NAME:
5001 : 126 : if (gimple *_d2 = get_def (valueize, _q21))
5002 : : {
5003 : 122 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
5004 : 0 : switch (gimple_call_combined_fn (_c2))
5005 : : {
5006 : 0 : case CFN_BUILT_IN_BSWAP64:
5007 : 0 : if (gimple_call_num_args (_c2) == 1)
5008 : : {
5009 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
5010 : 0 : _q40 = do_valueize (valueize, _q40);
5011 : 0 : {
5012 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
5013 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, CFN_BUILT_IN_BSWAP64))
5014 : 0 : return true;
5015 : : }
5016 : : }
5017 : : break;
5018 : : default:;
5019 : : }
5020 : : }
5021 : : break;
5022 : : default:;
5023 : : }
5024 : 6581 : break;
5025 : : }
5026 : 15 : case BIT_AND_EXPR:
5027 : 15 : {
5028 : 15 : tree _q20 = gimple_assign_rhs1 (_a1);
5029 : 15 : _q20 = do_valueize (valueize, _q20);
5030 : 15 : tree _q21 = gimple_assign_rhs2 (_a1);
5031 : 15 : _q21 = do_valueize (valueize, _q21);
5032 : 15 : if (tree_swap_operands_p (_q20, _q21))
5033 : 0 : std::swap (_q20, _q21);
5034 : 15 : switch (TREE_CODE (_q20))
5035 : : {
5036 : 15 : case SSA_NAME:
5037 : 15 : if (gimple *_d2 = get_def (valueize, _q20))
5038 : : {
5039 : 15 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
5040 : 4 : switch (gimple_call_combined_fn (_c2))
5041 : : {
5042 : 4 : case CFN_BUILT_IN_BSWAP64:
5043 : 4 : if (gimple_call_num_args (_c2) == 1)
5044 : : {
5045 : 4 : tree _q30 = gimple_call_arg (_c2, 0);
5046 : 4 : _q30 = do_valueize (valueize, _q30);
5047 : 4 : {
5048 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
5049 : 4 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, CFN_BUILT_IN_BSWAP64))
5050 : 4 : return true;
5051 : : }
5052 : : }
5053 : : break;
5054 : : default:;
5055 : : }
5056 : : }
5057 : : break;
5058 : 11 : default:;
5059 : : }
5060 : 11 : switch (TREE_CODE (_q21))
5061 : : {
5062 : 0 : case SSA_NAME:
5063 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
5064 : : {
5065 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
5066 : 0 : switch (gimple_call_combined_fn (_c2))
5067 : : {
5068 : 0 : case CFN_BUILT_IN_BSWAP64:
5069 : 0 : if (gimple_call_num_args (_c2) == 1)
5070 : : {
5071 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
5072 : 0 : _q40 = do_valueize (valueize, _q40);
5073 : 0 : {
5074 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
5075 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, CFN_BUILT_IN_BSWAP64))
5076 : 0 : return true;
5077 : : }
5078 : : }
5079 : : break;
5080 : : default:;
5081 : : }
5082 : : }
5083 : : break;
5084 : : default:;
5085 : : }
5086 : 6581 : break;
5087 : : }
5088 : : default:;
5089 : : }
5090 : 954 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5091 : 476 : switch (gimple_call_combined_fn (_c1))
5092 : : {
5093 : 10 : case CFN_BUILT_IN_BSWAP64:
5094 : 10 : if (gimple_call_num_args (_c1) == 1)
5095 : : {
5096 : 10 : tree _q20 = gimple_call_arg (_c1, 0);
5097 : 10 : _q20 = do_valueize (valueize, _q20);
5098 : 10 : {
5099 : 10 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5100 : 10 : if (gimple_simplify_571 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64))
5101 : 10 : return true;
5102 : : }
5103 : : }
5104 : : break;
5105 : : default:;
5106 : : }
5107 : : }
5108 : : break;
5109 : : default:;
5110 : : }
5111 : : return false;
5112 : : }
5113 : :
5114 : : bool
5115 : 928 : gimple_simplify_CFN_BUILT_IN_LOG2 (gimple_match_op *res_op, gimple_seq *seq,
5116 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5117 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5118 : : {
5119 : 928 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5120 : 928 : switch (TREE_CODE (_p0))
5121 : : {
5122 : 565 : case SSA_NAME:
5123 : 565 : if (gimple *_d1 = get_def (valueize, _p0))
5124 : : {
5125 : 356 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5126 : 105 : switch (gimple_call_combined_fn (_c1))
5127 : : {
5128 : 12 : case CFN_BUILT_IN_EXP:
5129 : 12 : if (gimple_call_num_args (_c1) == 1)
5130 : : {
5131 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5132 : 12 : _q20 = do_valueize (valueize, _q20);
5133 : 12 : {
5134 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5135 : 12 : if (flag_unsafe_math_optimizations
5136 : : )
5137 : : {
5138 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5139 : : )
5140 : : {
5141 : 12 : {
5142 : 12 : tree x;
5143 : 12 : switch (CFN_BUILT_IN_EXP)
5144 : : {
5145 : 12 : CASE_CFN_EXP:
5146 : 12 : x = build_real_truncate (type, dconst_e ());
5147 : 12 : break;
5148 : : CASE_CFN_EXP2:
5149 : : x = build_real (type, dconst2);
5150 : : break;
5151 : : CASE_CFN_EXP10:
5152 : : CASE_CFN_POW10:
5153 : : {
5154 : : REAL_VALUE_TYPE dconst10;
5155 : : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
5156 : : x = build_real (type, dconst10);
5157 : : }
5158 : : break;
5159 : : default:
5160 : : gcc_unreachable ();
5161 : : }
5162 : 12 : gimple_seq *lseq = seq;
5163 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1386;
5164 : 12 : {
5165 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5166 : 12 : {
5167 : 12 : tree _o1[1], _r1;
5168 : 12 : _o1[0] = x;
5169 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
5170 : 12 : tem_op.resimplify (lseq, valueize);
5171 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5172 : 12 : if (!_r1) goto next_after_fail1386;
5173 : 12 : res_op->ops[0] = _r1;
5174 : : }
5175 : 12 : res_op->ops[1] = captures[0];
5176 : 12 : res_op->resimplify (lseq, valueize);
5177 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
5178 : 12 : return true;
5179 : : }
5180 : : next_after_fail1386:;
5181 : : }
5182 : : }
5183 : : }
5184 : : }
5185 : : }
5186 : : break;
5187 : 12 : case CFN_BUILT_IN_POW:
5188 : 12 : if (gimple_call_num_args (_c1) == 2)
5189 : : {
5190 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5191 : 12 : _q20 = do_valueize (valueize, _q20);
5192 : 12 : tree _q21 = gimple_call_arg (_c1, 1);
5193 : 12 : _q21 = do_valueize (valueize, _q21);
5194 : 12 : {
5195 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5196 : 12 : if (gimple_simplify_599 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2, CFN_BUILT_IN_POW))
5197 : 6 : return true;
5198 : : }
5199 : : }
5200 : : break;
5201 : 12 : case CFN_BUILT_IN_CBRT:
5202 : 12 : if (gimple_call_num_args (_c1) == 1)
5203 : : {
5204 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5205 : 12 : _q20 = do_valueize (valueize, _q20);
5206 : 12 : {
5207 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5208 : 12 : if (flag_unsafe_math_optimizations
5209 : : )
5210 : : {
5211 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5212 : : )
5213 : : {
5214 : 12 : {
5215 : 12 : tree x;
5216 : 12 : switch (CFN_BUILT_IN_CBRT)
5217 : : {
5218 : : CASE_CFN_SQRT:
5219 : : x = build_real (type, dconsthalf);
5220 : : break;
5221 : 12 : CASE_CFN_CBRT:
5222 : 12 : x = build_real_truncate (type, dconst_third ());
5223 : 12 : break;
5224 : : default:
5225 : : gcc_unreachable ();
5226 : : }
5227 : 12 : gimple_seq *lseq = seq;
5228 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1387;
5229 : 12 : {
5230 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5231 : 12 : res_op->ops[0] = x;
5232 : 12 : {
5233 : 12 : tree _o1[1], _r1;
5234 : 12 : _o1[0] = captures[0];
5235 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
5236 : 12 : tem_op.resimplify (lseq, valueize);
5237 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5238 : 12 : if (!_r1) goto next_after_fail1387;
5239 : 6 : res_op->ops[1] = _r1;
5240 : : }
5241 : 6 : res_op->resimplify (lseq, valueize);
5242 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
5243 : 6 : return true;
5244 : : }
5245 : : next_after_fail1387:;
5246 : : }
5247 : : }
5248 : : }
5249 : : }
5250 : : }
5251 : : break;
5252 : 12 : case CFN_BUILT_IN_EXP2:
5253 : 12 : if (gimple_call_num_args (_c1) == 1)
5254 : : {
5255 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5256 : 12 : _q20 = do_valueize (valueize, _q20);
5257 : 12 : {
5258 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5259 : 12 : if (flag_unsafe_math_optimizations
5260 : : )
5261 : : {
5262 : 12 : gimple_seq *lseq = seq;
5263 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1388;
5264 : 12 : {
5265 : 12 : tree tem;
5266 : 12 : tem = captures[0];
5267 : 12 : res_op->set_value (tem);
5268 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 905, __FILE__, __LINE__, true);
5269 : 12 : return true;
5270 : : }
5271 : 0 : next_after_fail1388:;
5272 : : }
5273 : : }
5274 : : }
5275 : : break;
5276 : 12 : case CFN_BUILT_IN_SQRT:
5277 : 12 : if (gimple_call_num_args (_c1) == 1)
5278 : : {
5279 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5280 : 12 : _q20 = do_valueize (valueize, _q20);
5281 : 12 : {
5282 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5283 : 12 : if (flag_unsafe_math_optimizations
5284 : : )
5285 : : {
5286 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5287 : : )
5288 : : {
5289 : 12 : {
5290 : 12 : tree x;
5291 : 12 : switch (CFN_BUILT_IN_SQRT)
5292 : : {
5293 : 12 : CASE_CFN_SQRT:
5294 : 12 : x = build_real (type, dconsthalf);
5295 : 12 : break;
5296 : : CASE_CFN_CBRT:
5297 : : x = build_real_truncate (type, dconst_third ());
5298 : : break;
5299 : : default:
5300 : : gcc_unreachable ();
5301 : : }
5302 : 12 : gimple_seq *lseq = seq;
5303 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1389;
5304 : 12 : {
5305 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5306 : 12 : res_op->ops[0] = x;
5307 : 12 : {
5308 : 12 : tree _o1[1], _r1;
5309 : 12 : _o1[0] = captures[0];
5310 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
5311 : 12 : tem_op.resimplify (lseq, valueize);
5312 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5313 : 12 : if (!_r1) goto next_after_fail1389;
5314 : 6 : res_op->ops[1] = _r1;
5315 : : }
5316 : 6 : res_op->resimplify (lseq, valueize);
5317 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
5318 : 6 : return true;
5319 : : }
5320 : : next_after_fail1389:;
5321 : : }
5322 : : }
5323 : : }
5324 : : }
5325 : : }
5326 : : break;
5327 : 12 : case CFN_BUILT_IN_EXP10:
5328 : 12 : if (gimple_call_num_args (_c1) == 1)
5329 : : {
5330 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5331 : 12 : _q20 = do_valueize (valueize, _q20);
5332 : 12 : {
5333 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5334 : 12 : if (flag_unsafe_math_optimizations
5335 : : )
5336 : : {
5337 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5338 : : )
5339 : : {
5340 : 12 : {
5341 : 12 : tree x;
5342 : 12 : switch (CFN_BUILT_IN_EXP10)
5343 : : {
5344 : : CASE_CFN_EXP:
5345 : : x = build_real_truncate (type, dconst_e ());
5346 : : break;
5347 : : CASE_CFN_EXP2:
5348 : : x = build_real (type, dconst2);
5349 : : break;
5350 : 12 : CASE_CFN_EXP10:
5351 : 12 : CASE_CFN_POW10:
5352 : 12 : {
5353 : 12 : REAL_VALUE_TYPE dconst10;
5354 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
5355 : 12 : x = build_real (type, dconst10);
5356 : : }
5357 : 12 : break;
5358 : : default:
5359 : : gcc_unreachable ();
5360 : : }
5361 : 12 : gimple_seq *lseq = seq;
5362 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1390;
5363 : 12 : {
5364 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5365 : 12 : {
5366 : 12 : tree _o1[1], _r1;
5367 : 12 : _o1[0] = x;
5368 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
5369 : 12 : tem_op.resimplify (lseq, valueize);
5370 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5371 : 12 : if (!_r1) goto next_after_fail1390;
5372 : 12 : res_op->ops[0] = _r1;
5373 : : }
5374 : 12 : res_op->ops[1] = captures[0];
5375 : 12 : res_op->resimplify (lseq, valueize);
5376 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
5377 : 12 : return true;
5378 : : }
5379 : : next_after_fail1390:;
5380 : : }
5381 : : }
5382 : : }
5383 : : }
5384 : : }
5385 : : break;
5386 : 12 : case CFN_BUILT_IN_POW10:
5387 : 12 : if (gimple_call_num_args (_c1) == 1)
5388 : : {
5389 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5390 : 12 : _q20 = do_valueize (valueize, _q20);
5391 : 12 : {
5392 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5393 : 12 : if (flag_unsafe_math_optimizations
5394 : : )
5395 : : {
5396 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5397 : : )
5398 : : {
5399 : 12 : {
5400 : 12 : tree x;
5401 : 12 : switch (CFN_BUILT_IN_POW10)
5402 : : {
5403 : : CASE_CFN_EXP:
5404 : : x = build_real_truncate (type, dconst_e ());
5405 : : break;
5406 : : CASE_CFN_EXP2:
5407 : : x = build_real (type, dconst2);
5408 : : break;
5409 : 12 : CASE_CFN_EXP10:
5410 : 12 : CASE_CFN_POW10:
5411 : 12 : {
5412 : 12 : REAL_VALUE_TYPE dconst10;
5413 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
5414 : 12 : x = build_real (type, dconst10);
5415 : : }
5416 : 12 : break;
5417 : : default:
5418 : : gcc_unreachable ();
5419 : : }
5420 : 12 : gimple_seq *lseq = seq;
5421 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1391;
5422 : 12 : {
5423 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5424 : 12 : {
5425 : 12 : tree _o1[1], _r1;
5426 : 12 : _o1[0] = x;
5427 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2, TREE_TYPE (_o1[0]), _o1[0]);
5428 : 12 : tem_op.resimplify (lseq, valueize);
5429 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5430 : 12 : if (!_r1) goto next_after_fail1391;
5431 : 12 : res_op->ops[0] = _r1;
5432 : : }
5433 : 12 : res_op->ops[1] = captures[0];
5434 : 12 : res_op->resimplify (lseq, valueize);
5435 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
5436 : 12 : return true;
5437 : : }
5438 : : next_after_fail1391:;
5439 : : }
5440 : : }
5441 : : }
5442 : : }
5443 : : }
5444 : : break;
5445 : : default:;
5446 : : }
5447 : : }
5448 : : break;
5449 : : default:;
5450 : : }
5451 : : return false;
5452 : : }
5453 : :
5454 : : bool
5455 : 0 : gimple_simplify_CFN_EXP (gimple_match_op *res_op, gimple_seq *seq,
5456 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5457 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5458 : : {
5459 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5460 : 0 : switch (TREE_CODE (_p0))
5461 : : {
5462 : 0 : case SSA_NAME:
5463 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5464 : : {
5465 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5466 : 0 : switch (gimple_call_combined_fn (_c1))
5467 : : {
5468 : 0 : case CFN_LOG:
5469 : 0 : if (gimple_call_num_args (_c1) == 1)
5470 : : {
5471 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5472 : 0 : _q20 = do_valueize (valueize, _q20);
5473 : 0 : {
5474 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5475 : 0 : if (flag_unsafe_math_optimizations
5476 : : )
5477 : : {
5478 : 0 : gimple_seq *lseq = seq;
5479 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1427;
5480 : 0 : {
5481 : 0 : tree tem;
5482 : 0 : tem = captures[0];
5483 : 0 : res_op->set_value (tem);
5484 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 906, __FILE__, __LINE__, true);
5485 : 0 : return true;
5486 : : }
5487 : 0 : next_after_fail1427:;
5488 : : }
5489 : : }
5490 : : }
5491 : : break;
5492 : : default:;
5493 : : }
5494 : : }
5495 : : break;
5496 : : default:;
5497 : : }
5498 : : return false;
5499 : : }
5500 : :
5501 : : bool
5502 : 0 : gimple_simplify_CFN_EXP2 (gimple_match_op *res_op, gimple_seq *seq,
5503 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5504 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5505 : : {
5506 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5507 : 0 : switch (TREE_CODE (_p0))
5508 : : {
5509 : 0 : case SSA_NAME:
5510 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5511 : : {
5512 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5513 : 0 : switch (gimple_call_combined_fn (_c1))
5514 : : {
5515 : 0 : case CFN_LOG2:
5516 : 0 : if (gimple_call_num_args (_c1) == 1)
5517 : : {
5518 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5519 : 0 : _q20 = do_valueize (valueize, _q20);
5520 : 0 : {
5521 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5522 : 0 : if (flag_unsafe_math_optimizations
5523 : : )
5524 : : {
5525 : 0 : gimple_seq *lseq = seq;
5526 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1431;
5527 : 0 : {
5528 : 0 : tree tem;
5529 : 0 : tem = captures[0];
5530 : 0 : res_op->set_value (tem);
5531 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 906, __FILE__, __LINE__, true);
5532 : 0 : return true;
5533 : : }
5534 : 0 : next_after_fail1431:;
5535 : : }
5536 : : }
5537 : : }
5538 : : break;
5539 : : default:;
5540 : : }
5541 : : }
5542 : : break;
5543 : : default:;
5544 : : }
5545 : : return false;
5546 : : }
5547 : :
5548 : : bool
5549 : 16927 : gimple_simplify_CFN_BUILT_IN_SQRTF (gimple_match_op *res_op, gimple_seq *seq,
5550 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5551 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5552 : : {
5553 : 16927 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5554 : 16927 : switch (TREE_CODE (_p0))
5555 : : {
5556 : 16288 : case SSA_NAME:
5557 : 16288 : if (gimple *_d1 = get_def (valueize, _p0))
5558 : : {
5559 : 7420 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5560 : 115 : switch (gimple_call_combined_fn (_c1))
5561 : : {
5562 : 15 : case CFN_BUILT_IN_SQRTF:
5563 : 15 : if (gimple_call_num_args (_c1) == 1)
5564 : : {
5565 : 15 : tree _q20 = gimple_call_arg (_c1, 0);
5566 : 15 : _q20 = do_valueize (valueize, _q20);
5567 : 15 : {
5568 : 15 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5569 : 15 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
5570 : : )
5571 : : {
5572 : 12 : gimple_seq *lseq = seq;
5573 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1439;
5574 : 12 : {
5575 : 12 : res_op->set_op (CFN_BUILT_IN_POWF, type, 2);
5576 : 12 : res_op->ops[0] = captures[0];
5577 : 12 : res_op->ops[1] = build_real (type, dconst_quarter ());
5578 : 12 : res_op->resimplify (lseq, valueize);
5579 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 907, __FILE__, __LINE__, true);
5580 : 12 : return true;
5581 : : }
5582 : 0 : next_after_fail1439:;
5583 : : }
5584 : : }
5585 : : }
5586 : : break;
5587 : 12 : case CFN_BUILT_IN_EXP10F:
5588 : 12 : if (gimple_call_num_args (_c1) == 1)
5589 : : {
5590 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5591 : 12 : _q20 = do_valueize (valueize, _q20);
5592 : 12 : {
5593 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5594 : 12 : if (flag_unsafe_math_optimizations
5595 : : )
5596 : : {
5597 : 12 : gimple_seq *lseq = seq;
5598 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1440;
5599 : 12 : {
5600 : 12 : res_op->set_op (CFN_BUILT_IN_EXP10F, type, 1);
5601 : 12 : {
5602 : 12 : tree _o1[2], _r1;
5603 : 12 : _o1[0] = captures[0];
5604 : 12 : _o1[1] = build_real (type, dconsthalf);
5605 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5606 : 12 : tem_op.resimplify (lseq, valueize);
5607 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5608 : 12 : if (!_r1) goto next_after_fail1440;
5609 : 6 : res_op->ops[0] = _r1;
5610 : : }
5611 : 6 : res_op->resimplify (lseq, valueize);
5612 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
5613 : 6 : return true;
5614 : : }
5615 : : next_after_fail1440:;
5616 : : }
5617 : : }
5618 : : }
5619 : : break;
5620 : 14 : case CFN_BUILT_IN_EXPF:
5621 : 14 : if (gimple_call_num_args (_c1) == 1)
5622 : : {
5623 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
5624 : 14 : _q20 = do_valueize (valueize, _q20);
5625 : 14 : {
5626 : 14 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5627 : 14 : if (flag_unsafe_math_optimizations
5628 : : )
5629 : : {
5630 : 14 : gimple_seq *lseq = seq;
5631 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1441;
5632 : 14 : {
5633 : 14 : res_op->set_op (CFN_BUILT_IN_EXPF, type, 1);
5634 : 14 : {
5635 : 14 : tree _o1[2], _r1;
5636 : 14 : _o1[0] = captures[0];
5637 : 14 : _o1[1] = build_real (type, dconsthalf);
5638 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5639 : 14 : tem_op.resimplify (lseq, valueize);
5640 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5641 : 14 : if (!_r1) goto next_after_fail1441;
5642 : 7 : res_op->ops[0] = _r1;
5643 : : }
5644 : 7 : res_op->resimplify (lseq, valueize);
5645 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
5646 : 7 : return true;
5647 : : }
5648 : : next_after_fail1441:;
5649 : : }
5650 : : }
5651 : : }
5652 : : break;
5653 : 14 : case CFN_BUILT_IN_POWF:
5654 : 14 : if (gimple_call_num_args (_c1) == 2)
5655 : : {
5656 : 14 : tree _q20 = gimple_call_arg (_c1, 0);
5657 : 14 : _q20 = do_valueize (valueize, _q20);
5658 : 14 : tree _q21 = gimple_call_arg (_c1, 1);
5659 : 14 : _q21 = do_valueize (valueize, _q21);
5660 : 14 : {
5661 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5662 : 14 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
5663 : : )
5664 : : {
5665 : 14 : gimple_seq *lseq = seq;
5666 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1442;
5667 : 14 : {
5668 : 14 : res_op->set_op (CFN_BUILT_IN_POWF, type, 2);
5669 : 14 : {
5670 : 14 : tree _o1[1], _r1;
5671 : 14 : _o1[0] = captures[0];
5672 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
5673 : 14 : tem_op.resimplify (lseq, valueize);
5674 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5675 : 14 : if (!_r1) goto next_after_fail1442;
5676 : 13 : res_op->ops[0] = _r1;
5677 : : }
5678 : 13 : {
5679 : 13 : tree _o1[2], _r1;
5680 : 13 : _o1[0] = captures[1];
5681 : 13 : _o1[1] = build_real (type, dconsthalf);
5682 : 13 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5683 : 13 : tem_op.resimplify (lseq, valueize);
5684 : 13 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5685 : 13 : if (!_r1) goto next_after_fail1442;
5686 : 7 : res_op->ops[1] = _r1;
5687 : : }
5688 : 7 : res_op->resimplify (lseq, valueize);
5689 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 909, __FILE__, __LINE__, true);
5690 : 7 : return true;
5691 : : }
5692 : 7 : next_after_fail1442:;
5693 : : }
5694 : : }
5695 : : }
5696 : : break;
5697 : 12 : case CFN_BUILT_IN_POW10F:
5698 : 12 : if (gimple_call_num_args (_c1) == 1)
5699 : : {
5700 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5701 : 12 : _q20 = do_valueize (valueize, _q20);
5702 : 12 : {
5703 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5704 : 12 : if (flag_unsafe_math_optimizations
5705 : : )
5706 : : {
5707 : 12 : gimple_seq *lseq = seq;
5708 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1443;
5709 : 12 : {
5710 : 12 : res_op->set_op (CFN_BUILT_IN_POW10F, type, 1);
5711 : 12 : {
5712 : 12 : tree _o1[2], _r1;
5713 : 12 : _o1[0] = captures[0];
5714 : 12 : _o1[1] = build_real (type, dconsthalf);
5715 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5716 : 12 : tem_op.resimplify (lseq, valueize);
5717 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5718 : 12 : if (!_r1) goto next_after_fail1443;
5719 : 6 : res_op->ops[0] = _r1;
5720 : : }
5721 : 6 : res_op->resimplify (lseq, valueize);
5722 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
5723 : 6 : return true;
5724 : : }
5725 : : next_after_fail1443:;
5726 : : }
5727 : : }
5728 : : }
5729 : : break;
5730 : 12 : case CFN_BUILT_IN_CBRTF:
5731 : 12 : if (gimple_call_num_args (_c1) == 1)
5732 : : {
5733 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5734 : 12 : _q20 = do_valueize (valueize, _q20);
5735 : 12 : {
5736 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5737 : 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
5738 : : )
5739 : : {
5740 : 12 : gimple_seq *lseq = seq;
5741 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1444;
5742 : 12 : {
5743 : 12 : res_op->set_op (CFN_BUILT_IN_POWF, type, 2);
5744 : 12 : res_op->ops[0] = captures[0];
5745 : 12 : res_op->ops[1] = build_real_truncate (type, dconst_sixth ());
5746 : 12 : res_op->resimplify (lseq, valueize);
5747 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 910, __FILE__, __LINE__, true);
5748 : 12 : return true;
5749 : : }
5750 : 0 : next_after_fail1444:;
5751 : : }
5752 : : }
5753 : : }
5754 : : break;
5755 : 12 : case CFN_BUILT_IN_EXP2F:
5756 : 12 : if (gimple_call_num_args (_c1) == 1)
5757 : : {
5758 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5759 : 12 : _q20 = do_valueize (valueize, _q20);
5760 : 12 : {
5761 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5762 : 12 : if (flag_unsafe_math_optimizations
5763 : : )
5764 : : {
5765 : 12 : gimple_seq *lseq = seq;
5766 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1445;
5767 : 12 : {
5768 : 12 : res_op->set_op (CFN_BUILT_IN_EXP2F, type, 1);
5769 : 12 : {
5770 : 12 : tree _o1[2], _r1;
5771 : 12 : _o1[0] = captures[0];
5772 : 12 : _o1[1] = build_real (type, dconsthalf);
5773 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
5774 : 12 : tem_op.resimplify (lseq, valueize);
5775 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5776 : 12 : if (!_r1) goto next_after_fail1445;
5777 : 6 : res_op->ops[0] = _r1;
5778 : : }
5779 : 6 : res_op->resimplify (lseq, valueize);
5780 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 908, __FILE__, __LINE__, true);
5781 : 6 : return true;
5782 : : }
5783 : : next_after_fail1445:;
5784 : : }
5785 : : }
5786 : : }
5787 : : break;
5788 : : default:;
5789 : : }
5790 : : }
5791 : : break;
5792 : : default:;
5793 : : }
5794 : : return false;
5795 : : }
5796 : :
5797 : : bool
5798 : 7 : gimple_simplify_CFN_SINH (gimple_match_op *res_op, gimple_seq *seq,
5799 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5800 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5801 : : {
5802 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5803 : 7 : switch (TREE_CODE (_p0))
5804 : : {
5805 : 7 : case SSA_NAME:
5806 : 7 : if (gimple *_d1 = get_def (valueize, _p0))
5807 : : {
5808 : 4 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5809 : 0 : switch (gimple_call_combined_fn (_c1))
5810 : : {
5811 : 0 : case CFN_ATANH:
5812 : 0 : if (gimple_call_num_args (_c1) == 1)
5813 : : {
5814 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5815 : 0 : _q20 = do_valueize (valueize, _q20);
5816 : 0 : {
5817 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
5818 : 0 : if (gimple_simplify_602 (res_op, seq, valueize, type, captures, CFN_SINH, CFN_ATANH, CFN_SQRT))
5819 : 0 : return true;
5820 : : }
5821 : : }
5822 : : break;
5823 : : default:;
5824 : : }
5825 : : }
5826 : : break;
5827 : : default:;
5828 : : }
5829 : : return false;
5830 : : }
5831 : :
5832 : : bool
5833 : 0 : gimple_simplify_CFN_BUILT_IN_TRUNCF64X (gimple_match_op *res_op, gimple_seq *seq,
5834 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5835 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5836 : : {
5837 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5838 : 0 : switch (TREE_CODE (_p0))
5839 : : {
5840 : 0 : case SSA_NAME:
5841 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5842 : : {
5843 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5844 : 0 : switch (gimple_call_combined_fn (_c1))
5845 : : {
5846 : 0 : case CFN_BUILT_IN_TRUNCF64X:
5847 : 0 : if (gimple_call_num_args (_c1) == 1)
5848 : : {
5849 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5850 : 0 : _q20 = do_valueize (valueize, _q20);
5851 : 0 : {
5852 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5853 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF64X))
5854 : 0 : return true;
5855 : : }
5856 : : }
5857 : : break;
5858 : : default:;
5859 : : }
5860 : : }
5861 : : break;
5862 : 0 : default:;
5863 : : }
5864 : 0 : if (integer_valued_real_p (_p0))
5865 : : {
5866 : 0 : {
5867 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5868 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF64X))
5869 : 0 : return true;
5870 : : }
5871 : : }
5872 : : return false;
5873 : : }
5874 : :
5875 : : bool
5876 : 0 : gimple_simplify_CFN_BUILT_IN_FLOORF64 (gimple_match_op *res_op, gimple_seq *seq,
5877 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5878 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5879 : : {
5880 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5881 : 0 : switch (TREE_CODE (_p0))
5882 : : {
5883 : 0 : case SSA_NAME:
5884 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5885 : : {
5886 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5887 : 0 : switch (gimple_call_combined_fn (_c1))
5888 : : {
5889 : 0 : case CFN_BUILT_IN_FLOORF64:
5890 : 0 : if (gimple_call_num_args (_c1) == 1)
5891 : : {
5892 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5893 : 0 : _q20 = do_valueize (valueize, _q20);
5894 : 0 : {
5895 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5896 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF64))
5897 : 0 : return true;
5898 : : }
5899 : : }
5900 : : break;
5901 : : default:;
5902 : : }
5903 : : }
5904 : : break;
5905 : 0 : default:;
5906 : : }
5907 : 0 : if (integer_valued_real_p (_p0))
5908 : : {
5909 : 0 : {
5910 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5911 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF64))
5912 : 0 : return true;
5913 : : }
5914 : : }
5915 : 0 : if (tree_expr_nonnegative_p (_p0))
5916 : : {
5917 : 0 : {
5918 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5919 : 0 : if (gimple_simplify_607 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF64, CFN_BUILT_IN_TRUNCF64))
5920 : 0 : return true;
5921 : : }
5922 : : }
5923 : : return false;
5924 : : }
5925 : :
5926 : : bool
5927 : 6615 : gimple_simplify_CFN_BUILT_IN_CEIL (gimple_match_op *res_op, gimple_seq *seq,
5928 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5929 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5930 : : {
5931 : 6615 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5932 : 6615 : switch (TREE_CODE (_p0))
5933 : : {
5934 : 6547 : case SSA_NAME:
5935 : 6547 : if (gimple *_d1 = get_def (valueize, _p0))
5936 : : {
5937 : 3821 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
5938 : 3867 : switch (gimple_assign_rhs_code (_a1))
5939 : : {
5940 : 376 : CASE_CONVERT:
5941 : 376 : {
5942 : 376 : tree _q20 = gimple_assign_rhs1 (_a1);
5943 : 376 : _q20 = do_valueize (valueize, _q20);
5944 : 376 : if (gimple_float_value_p (_q20, valueize))
5945 : : {
5946 : 322 : {
5947 : 322 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5948 : 322 : if (gimple_simplify_605 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEIL, CFN_BUILT_IN_CEILF))
5949 : 161 : return true;
5950 : : }
5951 : : }
5952 : : break;
5953 : : }
5954 : : default:;
5955 : : }
5956 : 337 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5957 : 0 : switch (gimple_call_combined_fn (_c1))
5958 : : {
5959 : 0 : case CFN_BUILT_IN_CEIL:
5960 : 0 : if (gimple_call_num_args (_c1) == 1)
5961 : : {
5962 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5963 : 0 : _q20 = do_valueize (valueize, _q20);
5964 : 0 : {
5965 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5966 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEIL))
5967 : 0 : return true;
5968 : : }
5969 : : }
5970 : : break;
5971 : : default:;
5972 : : }
5973 : : }
5974 : : break;
5975 : 6454 : default:;
5976 : : }
5977 : 6454 : if (integer_valued_real_p (_p0))
5978 : : {
5979 : 71 : {
5980 : 71 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5981 : 71 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEIL))
5982 : 71 : return true;
5983 : : }
5984 : : }
5985 : : return false;
5986 : : }
5987 : :
5988 : : bool
5989 : 2415 : gimple_simplify_CFN_BUILT_IN_ROUND (gimple_match_op *res_op, gimple_seq *seq,
5990 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5991 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5992 : : {
5993 : 2415 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5994 : 2415 : switch (TREE_CODE (_p0))
5995 : : {
5996 : 2360 : case SSA_NAME:
5997 : 2360 : if (gimple *_d1 = get_def (valueize, _p0))
5998 : : {
5999 : 1295 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6000 : 1610 : switch (gimple_assign_rhs_code (_a1))
6001 : : {
6002 : 106 : CASE_CONVERT:
6003 : 106 : {
6004 : 106 : tree _q20 = gimple_assign_rhs1 (_a1);
6005 : 106 : _q20 = do_valueize (valueize, _q20);
6006 : 106 : if (gimple_float_value_p (_q20, valueize))
6007 : : {
6008 : 70 : {
6009 : 70 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6010 : 70 : if (gimple_simplify_605 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUND, CFN_BUILT_IN_ROUNDF))
6011 : 35 : return true;
6012 : : }
6013 : : }
6014 : : break;
6015 : : }
6016 : : default:;
6017 : : }
6018 : 335 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6019 : 0 : switch (gimple_call_combined_fn (_c1))
6020 : : {
6021 : 0 : case CFN_BUILT_IN_ROUND:
6022 : 0 : if (gimple_call_num_args (_c1) == 1)
6023 : : {
6024 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6025 : 0 : _q20 = do_valueize (valueize, _q20);
6026 : 0 : {
6027 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6028 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUND))
6029 : 0 : return true;
6030 : : }
6031 : : }
6032 : : break;
6033 : : default:;
6034 : : }
6035 : : }
6036 : : break;
6037 : 2380 : default:;
6038 : : }
6039 : 2380 : if (integer_valued_real_p (_p0))
6040 : : {
6041 : 40 : {
6042 : 40 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6043 : 40 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUND))
6044 : 40 : return true;
6045 : : }
6046 : : }
6047 : : return false;
6048 : : }
6049 : :
6050 : : bool
6051 : 1070 : gimple_simplify_CFN_BUILT_IN_NEARBYINT (gimple_match_op *res_op, gimple_seq *seq,
6052 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6053 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6054 : : {
6055 : 1070 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6056 : 1070 : switch (TREE_CODE (_p0))
6057 : : {
6058 : 933 : case SSA_NAME:
6059 : 933 : if (gimple *_d1 = get_def (valueize, _p0))
6060 : : {
6061 : 558 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6062 : 214 : switch (gimple_assign_rhs_code (_a1))
6063 : : {
6064 : 104 : CASE_CONVERT:
6065 : 104 : {
6066 : 104 : tree _q20 = gimple_assign_rhs1 (_a1);
6067 : 104 : _q20 = do_valueize (valueize, _q20);
6068 : 104 : if (gimple_float_value_p (_q20, valueize))
6069 : : {
6070 : 60 : {
6071 : 60 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6072 : 60 : if (gimple_simplify_605 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINT, CFN_BUILT_IN_NEARBYINTF))
6073 : 30 : return true;
6074 : : }
6075 : : }
6076 : : break;
6077 : : }
6078 : : default:;
6079 : : }
6080 : 390 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6081 : 0 : switch (gimple_call_combined_fn (_c1))
6082 : : {
6083 : 0 : case CFN_BUILT_IN_NEARBYINT:
6084 : 0 : if (gimple_call_num_args (_c1) == 1)
6085 : : {
6086 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6087 : 0 : _q20 = do_valueize (valueize, _q20);
6088 : 0 : {
6089 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6090 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINT))
6091 : 0 : return true;
6092 : : }
6093 : : }
6094 : : break;
6095 : : default:;
6096 : : }
6097 : : }
6098 : : break;
6099 : 1040 : default:;
6100 : : }
6101 : 1040 : if (integer_valued_real_p (_p0))
6102 : : {
6103 : 62 : {
6104 : 62 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6105 : 62 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINT))
6106 : 62 : return true;
6107 : : }
6108 : : }
6109 : : return false;
6110 : : }
6111 : :
6112 : : bool
6113 : 0 : gimple_simplify_CFN_BUILT_IN_RINTF32 (gimple_match_op *res_op, gimple_seq *seq,
6114 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6115 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6116 : : {
6117 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6118 : 0 : switch (TREE_CODE (_p0))
6119 : : {
6120 : 0 : case SSA_NAME:
6121 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
6122 : : {
6123 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6124 : 0 : switch (gimple_call_combined_fn (_c1))
6125 : : {
6126 : 0 : case CFN_BUILT_IN_RINTF32:
6127 : 0 : if (gimple_call_num_args (_c1) == 1)
6128 : : {
6129 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6130 : 0 : _q20 = do_valueize (valueize, _q20);
6131 : 0 : {
6132 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6133 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF32))
6134 : 0 : return true;
6135 : : }
6136 : : }
6137 : : break;
6138 : : default:;
6139 : : }
6140 : : }
6141 : : break;
6142 : 0 : default:;
6143 : : }
6144 : 0 : if (integer_valued_real_p (_p0))
6145 : : {
6146 : 0 : {
6147 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6148 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF32))
6149 : 0 : return true;
6150 : : }
6151 : : }
6152 : : return false;
6153 : : }
6154 : :
6155 : : bool
6156 : 596 : gimple_simplify_CFN_BUILT_IN_CEXPF (gimple_match_op *res_op, gimple_seq *seq,
6157 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6158 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6159 : : {
6160 : 596 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6161 : 596 : if (gimple_compositional_complex (_p0, valueize))
6162 : : {
6163 : 79 : {
6164 : 79 : tree captures[3] ATTRIBUTE_UNUSED = { _p0 };
6165 : 79 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
6166 : : )
6167 : : {
6168 : 0 : if (targetm.libc_has_function (function_c99_math_complex, TREE_TYPE (captures[0]))
6169 : : )
6170 : : {
6171 : 0 : gimple_seq *lseq = seq;
6172 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1486;
6173 : 0 : {
6174 : 0 : res_op->set_op (COMPLEX_EXPR, type, 2);
6175 : 0 : {
6176 : 0 : tree _o1[2], _r1;
6177 : 0 : {
6178 : 0 : tree _o2[1], _r2;
6179 : 0 : {
6180 : 0 : tree _o3[1], _r3;
6181 : 0 : _o3[0] = captures[0];
6182 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o3[0])), _o3[0]);
6183 : 0 : tem_op.resimplify (lseq, valueize);
6184 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6185 : 0 : if (!_r3) goto next_after_fail1486;
6186 : 0 : _o2[0] = _r3;
6187 : : }
6188 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_EXPF, TREE_TYPE (_o2[0]), _o2[0]);
6189 : 0 : tem_op.resimplify (lseq, valueize);
6190 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6191 : 0 : if (!_r2) goto next_after_fail1486;
6192 : 0 : captures[1] = _r2;
6193 : : }
6194 : 0 : _o1[0] = captures[1];
6195 : 0 : {
6196 : 0 : tree _o2[1], _r2;
6197 : 0 : {
6198 : 0 : tree _o3[1], _r3;
6199 : 0 : {
6200 : 0 : tree _o4[1], _r4;
6201 : 0 : _o4[0] = captures[0];
6202 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o4[0])), _o4[0]);
6203 : 0 : tem_op.resimplify (lseq, valueize);
6204 : 0 : _r4 = maybe_push_res_to_seq (&tem_op, lseq);
6205 : 0 : if (!_r4) goto next_after_fail1486;
6206 : 0 : _o3[0] = _r4;
6207 : : }
6208 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_CEXPIF, type, _o3[0]);
6209 : 0 : tem_op.resimplify (lseq, valueize);
6210 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
6211 : 0 : if (!_r3) goto next_after_fail1486;
6212 : 0 : captures[2] = _r3;
6213 : : }
6214 : 0 : _o2[0] = captures[2];
6215 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o2[0])), _o2[0]);
6216 : 0 : tem_op.resimplify (lseq, valueize);
6217 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6218 : 0 : if (!_r2) goto next_after_fail1486;
6219 : 0 : _o1[1] = _r2;
6220 : : }
6221 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6222 : 0 : tem_op.resimplify (lseq, valueize);
6223 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6224 : 0 : if (!_r1) goto next_after_fail1486;
6225 : 0 : res_op->ops[0] = _r1;
6226 : : }
6227 : 0 : {
6228 : 0 : tree _o1[2], _r1;
6229 : 0 : _o1[0] = captures[1];
6230 : 0 : {
6231 : 0 : tree _o2[1], _r2;
6232 : 0 : _o2[0] = captures[2];
6233 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o2[0])), _o2[0]);
6234 : 0 : tem_op.resimplify (lseq, valueize);
6235 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6236 : 0 : if (!_r2) goto next_after_fail1486;
6237 : 0 : _o1[1] = _r2;
6238 : : }
6239 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
6240 : 0 : tem_op.resimplify (lseq, valueize);
6241 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6242 : 0 : if (!_r1) goto next_after_fail1486;
6243 : 0 : res_op->ops[1] = _r1;
6244 : : }
6245 : 0 : res_op->resimplify (lseq, valueize);
6246 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 915, __FILE__, __LINE__, true);
6247 : 0 : return true;
6248 : : }
6249 : : next_after_fail1486:;
6250 : : }
6251 : : }
6252 : : }
6253 : : }
6254 : : return false;
6255 : : }
6256 : :
6257 : : bool
6258 : 190 : gimple_simplify_CFN_BUILT_IN_IFLOOR (gimple_match_op *res_op, gimple_seq *seq,
6259 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6260 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6261 : : {
6262 : 190 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6263 : 190 : switch (TREE_CODE (_p0))
6264 : : {
6265 : 188 : case SSA_NAME:
6266 : 188 : if (gimple *_d1 = get_def (valueize, _p0))
6267 : : {
6268 : 94 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6269 : 184 : switch (gimple_assign_rhs_code (_a1))
6270 : : {
6271 : 0 : CASE_CONVERT:
6272 : 0 : {
6273 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
6274 : 0 : _q20 = do_valueize (valueize, _q20);
6275 : 0 : if (gimple_float_value_p (_q20, valueize))
6276 : : {
6277 : 0 : {
6278 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6279 : 0 : if (gimple_simplify_611 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IFLOOR, CFN_BUILT_IN_IFLOORF))
6280 : 0 : return true;
6281 : : }
6282 : : }
6283 : : break;
6284 : : }
6285 : : default:;
6286 : : }
6287 : : }
6288 : : break;
6289 : 190 : default:;
6290 : : }
6291 : 190 : if (tree_expr_nonnegative_p (_p0))
6292 : : {
6293 : 0 : {
6294 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6295 : 0 : if (gimple_simplify_612 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IFLOOR))
6296 : 0 : return true;
6297 : : }
6298 : : }
6299 : 190 : if (integer_valued_real_p (_p0))
6300 : : {
6301 : 1 : {
6302 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6303 : 1 : if (gimple_simplify_613 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IFLOOR))
6304 : 1 : return true;
6305 : : }
6306 : : }
6307 : 189 : {
6308 : 189 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6309 : 189 : if (gimple_simplify_614 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IFLOOR, CFN_BUILT_IN_LFLOOR, CFN_BUILT_IN_LLFLOOR))
6310 : 0 : return true;
6311 : : }
6312 : 189 : return false;
6313 : : }
6314 : :
6315 : : bool
6316 : 236 : gimple_simplify_CFN_BUILT_IN_IRINT (gimple_match_op *res_op, gimple_seq *seq,
6317 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6318 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6319 : : {
6320 : 236 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6321 : 236 : switch (TREE_CODE (_p0))
6322 : : {
6323 : 232 : case SSA_NAME:
6324 : 232 : if (gimple *_d1 = get_def (valueize, _p0))
6325 : : {
6326 : 125 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6327 : 184 : switch (gimple_assign_rhs_code (_a1))
6328 : : {
6329 : 0 : CASE_CONVERT:
6330 : 0 : {
6331 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
6332 : 0 : _q20 = do_valueize (valueize, _q20);
6333 : 0 : if (gimple_float_value_p (_q20, valueize))
6334 : : {
6335 : 0 : {
6336 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6337 : 0 : if (gimple_simplify_611 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IRINT, CFN_BUILT_IN_IRINTF))
6338 : 0 : return true;
6339 : : }
6340 : : }
6341 : : break;
6342 : : }
6343 : : default:;
6344 : : }
6345 : : }
6346 : : break;
6347 : 236 : default:;
6348 : : }
6349 : 236 : if (integer_valued_real_p (_p0))
6350 : : {
6351 : 0 : {
6352 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6353 : 0 : if (gimple_simplify_616 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IRINT))
6354 : 0 : return true;
6355 : : }
6356 : : }
6357 : 236 : {
6358 : 236 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6359 : 236 : if (gimple_simplify_614 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IRINT, CFN_BUILT_IN_LRINT, CFN_BUILT_IN_LLRINT))
6360 : 0 : return true;
6361 : : }
6362 : 236 : return false;
6363 : : }
6364 : :
6365 : : bool
6366 : 970 : gimple_simplify_CFN_BUILT_IN_IROUNDF (gimple_match_op *res_op, gimple_seq *seq,
6367 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6368 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6369 : : {
6370 : 970 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6371 : 970 : if (integer_valued_real_p (_p0))
6372 : : {
6373 : 7 : {
6374 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6375 : 7 : if (gimple_simplify_613 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IROUNDF))
6376 : 7 : return true;
6377 : : }
6378 : : }
6379 : 963 : {
6380 : 963 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6381 : 963 : if (gimple_simplify_614 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IROUNDF, CFN_BUILT_IN_LROUNDF, CFN_BUILT_IN_LLROUNDF))
6382 : 4 : return true;
6383 : : }
6384 : 959 : return false;
6385 : : }
6386 : :
6387 : : bool
6388 : 974 : gimple_simplify_CFN_BUILT_IN_CPROJF (gimple_match_op *res_op, gimple_seq *seq,
6389 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6390 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6391 : : {
6392 : 974 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6393 : 974 : {
6394 : 974 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6395 : 974 : if (!HONOR_INFINITIES (type)
6396 : : )
6397 : : {
6398 : 21 : gimple_seq *lseq = seq;
6399 : 21 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1489;
6400 : 21 : {
6401 : 21 : tree tem;
6402 : 21 : tem = captures[0];
6403 : 21 : res_op->set_value (tem);
6404 : 21 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 916, __FILE__, __LINE__, true);
6405 : 21 : return true;
6406 : : }
6407 : 0 : next_after_fail1489:;
6408 : : }
6409 : : }
6410 : 953 : switch (TREE_CODE (_p0))
6411 : : {
6412 : 896 : case SSA_NAME:
6413 : 896 : if (gimple *_d1 = get_def (valueize, _p0))
6414 : : {
6415 : 526 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6416 : 704 : switch (gimple_assign_rhs_code (_a1))
6417 : : {
6418 : 336 : case COMPLEX_EXPR:
6419 : 336 : {
6420 : 336 : tree _q20 = gimple_assign_rhs1 (_a1);
6421 : 336 : _q20 = do_valueize (valueize, _q20);
6422 : 336 : tree _q21 = gimple_assign_rhs2 (_a1);
6423 : 336 : _q21 = do_valueize (valueize, _q21);
6424 : 336 : switch (TREE_CODE (_q20))
6425 : : {
6426 : 56 : case REAL_CST:
6427 : 56 : {
6428 : 56 : if (tree_expr_nonnegative_p (_q21))
6429 : : {
6430 : 56 : {
6431 : 56 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6432 : 56 : if (real_isinf (TREE_REAL_CST_PTR (captures[0]))
6433 : : )
6434 : : {
6435 : 56 : gimple_seq *lseq = seq;
6436 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1490;
6437 : 56 : {
6438 : 56 : tree tem;
6439 : 56 : tem = build_complex_inf (type, false);
6440 : 56 : res_op->set_value (tem);
6441 : 56 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 917, __FILE__, __LINE__, true);
6442 : 56 : return true;
6443 : : }
6444 : 0 : next_after_fail1490:;
6445 : : }
6446 : : }
6447 : : }
6448 : : break;
6449 : : }
6450 : 280 : default:;
6451 : : }
6452 : 280 : switch (TREE_CODE (_q21))
6453 : : {
6454 : 224 : case REAL_CST:
6455 : 224 : {
6456 : 224 : {
6457 : 224 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6458 : 224 : if (real_isinf (TREE_REAL_CST_PTR (captures[1]))
6459 : : )
6460 : : {
6461 : 224 : gimple_seq *lseq = seq;
6462 : 224 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1491;
6463 : 224 : {
6464 : 224 : tree tem;
6465 : 224 : tem = build_complex_inf (type, TREE_REAL_CST_PTR (captures[1])->sign);
6466 : 224 : res_op->set_value (tem);
6467 : 224 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 918, __FILE__, __LINE__, true);
6468 : 224 : return true;
6469 : : }
6470 : 0 : next_after_fail1491:;
6471 : : }
6472 : : }
6473 : 0 : break;
6474 : : }
6475 : : default:;
6476 : : }
6477 : : break;
6478 : : }
6479 : : default:;
6480 : : }
6481 : : }
6482 : : break;
6483 : : default:;
6484 : : }
6485 : : return false;
6486 : : }
6487 : :
6488 : : bool
6489 : 753 : gimple_simplify_CFN_BUILT_IN_PARITYL (gimple_match_op *res_op, gimple_seq *seq,
6490 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6491 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6492 : : {
6493 : 753 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6494 : 753 : switch (TREE_CODE (_p0))
6495 : : {
6496 : 737 : case SSA_NAME:
6497 : 737 : if (gimple *_d1 = get_def (valueize, _p0))
6498 : : {
6499 : 430 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6500 : 343 : switch (gimple_assign_rhs_code (_a1))
6501 : : {
6502 : 2 : case BIT_NOT_EXPR:
6503 : 2 : {
6504 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
6505 : 2 : _q20 = do_valueize (valueize, _q20);
6506 : 2 : {
6507 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6508 : 2 : if (gimple_simplify_635 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYL))
6509 : 2 : return true;
6510 : : }
6511 : 0 : break;
6512 : : }
6513 : 41 : CASE_CONVERT:
6514 : 41 : {
6515 : 41 : tree _q20 = gimple_assign_rhs1 (_a1);
6516 : 41 : _q20 = do_valueize (valueize, _q20);
6517 : 41 : switch (TREE_CODE (_q20))
6518 : : {
6519 : 41 : case SSA_NAME:
6520 : 41 : if (gimple *_d2 = get_def (valueize, _q20))
6521 : : {
6522 : 39 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
6523 : 30 : switch (gimple_assign_rhs_code (_a2))
6524 : : {
6525 : 0 : case LROTATE_EXPR:
6526 : 0 : {
6527 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
6528 : 0 : _q30 = do_valueize (valueize, _q30);
6529 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
6530 : 0 : _q31 = do_valueize (valueize, _q31);
6531 : 0 : {
6532 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6533 : 0 : if (gimple_simplify_637 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_PARITYL))
6534 : 0 : return true;
6535 : : }
6536 : 0 : break;
6537 : : }
6538 : 0 : case RROTATE_EXPR:
6539 : 0 : {
6540 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
6541 : 0 : _q30 = do_valueize (valueize, _q30);
6542 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
6543 : 0 : _q31 = do_valueize (valueize, _q31);
6544 : 0 : {
6545 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6546 : 0 : if (gimple_simplify_637 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_PARITYL))
6547 : 0 : return true;
6548 : : }
6549 : 0 : break;
6550 : : }
6551 : : default:;
6552 : : }
6553 : 23 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
6554 : 2 : switch (gimple_call_combined_fn (_c2))
6555 : : {
6556 : 0 : case CFN_BUILT_IN_BSWAP128:
6557 : 0 : if (gimple_call_num_args (_c2) == 1)
6558 : : {
6559 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
6560 : 0 : _q30 = do_valueize (valueize, _q30);
6561 : 0 : {
6562 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6563 : 0 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_PARITYL))
6564 : 0 : return true;
6565 : : }
6566 : : }
6567 : : break;
6568 : 2 : case CFN_BUILT_IN_BSWAP16:
6569 : 2 : if (gimple_call_num_args (_c2) == 1)
6570 : : {
6571 : 2 : tree _q30 = gimple_call_arg (_c2, 0);
6572 : 2 : _q30 = do_valueize (valueize, _q30);
6573 : 2 : {
6574 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6575 : 2 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_PARITYL))
6576 : 1 : return true;
6577 : : }
6578 : : }
6579 : : break;
6580 : 0 : case CFN_BUILT_IN_BSWAP32:
6581 : 0 : if (gimple_call_num_args (_c2) == 1)
6582 : : {
6583 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
6584 : 0 : _q30 = do_valueize (valueize, _q30);
6585 : 0 : {
6586 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6587 : 0 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_PARITYL))
6588 : 0 : return true;
6589 : : }
6590 : : }
6591 : : break;
6592 : 0 : case CFN_BUILT_IN_BSWAP64:
6593 : 0 : if (gimple_call_num_args (_c2) == 1)
6594 : : {
6595 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
6596 : 0 : _q30 = do_valueize (valueize, _q30);
6597 : 0 : {
6598 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6599 : 0 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_PARITYL))
6600 : 0 : return true;
6601 : : }
6602 : : }
6603 : : break;
6604 : : default:;
6605 : : }
6606 : : }
6607 : : break;
6608 : 40 : default:;
6609 : : }
6610 : 40 : {
6611 : 40 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
6612 : 40 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYL))
6613 : 4 : return true;
6614 : : }
6615 : 36 : break;
6616 : : }
6617 : 0 : case LROTATE_EXPR:
6618 : 0 : {
6619 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
6620 : 0 : _q20 = do_valueize (valueize, _q20);
6621 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
6622 : 0 : _q21 = do_valueize (valueize, _q21);
6623 : 0 : {
6624 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
6625 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_PARITYL))
6626 : 0 : return true;
6627 : : }
6628 : 0 : break;
6629 : : }
6630 : 2 : case RROTATE_EXPR:
6631 : 2 : {
6632 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
6633 : 2 : _q20 = do_valueize (valueize, _q20);
6634 : 2 : tree _q21 = gimple_assign_rhs2 (_a1);
6635 : 2 : _q21 = do_valueize (valueize, _q21);
6636 : 2 : {
6637 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
6638 : 2 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_PARITYL))
6639 : 2 : return true;
6640 : : }
6641 : 0 : break;
6642 : : }
6643 : : default:;
6644 : : }
6645 : 178 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6646 : 11 : switch (gimple_call_combined_fn (_c1))
6647 : : {
6648 : 0 : case CFN_BUILT_IN_BSWAP128:
6649 : 0 : if (gimple_call_num_args (_c1) == 1)
6650 : : {
6651 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6652 : 0 : _q20 = do_valueize (valueize, _q20);
6653 : 0 : {
6654 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6655 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_PARITYL))
6656 : 0 : return true;
6657 : : }
6658 : : }
6659 : : break;
6660 : 0 : case CFN_BUILT_IN_BSWAP16:
6661 : 0 : if (gimple_call_num_args (_c1) == 1)
6662 : : {
6663 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6664 : 0 : _q20 = do_valueize (valueize, _q20);
6665 : 0 : {
6666 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6667 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_PARITYL))
6668 : 0 : return true;
6669 : : }
6670 : : }
6671 : : break;
6672 : 0 : case CFN_BUILT_IN_BSWAP32:
6673 : 0 : if (gimple_call_num_args (_c1) == 1)
6674 : : {
6675 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6676 : 0 : _q20 = do_valueize (valueize, _q20);
6677 : 0 : {
6678 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6679 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_PARITYL))
6680 : 0 : return true;
6681 : : }
6682 : : }
6683 : : break;
6684 : 2 : case CFN_BUILT_IN_BSWAP64:
6685 : 2 : if (gimple_call_num_args (_c1) == 1)
6686 : : {
6687 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
6688 : 2 : _q20 = do_valueize (valueize, _q20);
6689 : 2 : {
6690 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6691 : 2 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_PARITYL))
6692 : 2 : return true;
6693 : : }
6694 : : }
6695 : : break;
6696 : : default:;
6697 : : }
6698 : : }
6699 : : break;
6700 : 742 : default:;
6701 : : }
6702 : 742 : {
6703 : 742 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6704 : 742 : if (gimple_simplify_634 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYL))
6705 : 3 : return true;
6706 : : }
6707 : 739 : return false;
6708 : : }
6709 : :
6710 : : bool
6711 : 580 : gimple_simplify_CFN_REDUC_XOR (gimple_match_op *res_op, gimple_seq *seq,
6712 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6713 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6714 : : {
6715 : 580 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6716 : 580 : switch (TREE_CODE (_p0))
6717 : : {
6718 : 580 : case SSA_NAME:
6719 : 580 : if (gimple *_d1 = get_def (valueize, _p0))
6720 : : {
6721 : 213 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6722 : 231 : switch (gimple_assign_rhs_code (_a1))
6723 : : {
6724 : 47 : case VIEW_CONVERT_EXPR:
6725 : 47 : {
6726 : 47 : tree _q20 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
6727 : 47 : if ((TREE_CODE (_q20) == SSA_NAME
6728 : 47 : || is_gimple_min_invariant (_q20)))
6729 : : {
6730 : 47 : _q20 = do_valueize (valueize, _q20);
6731 : 47 : switch (TREE_CODE (_q20))
6732 : : {
6733 : 47 : case SSA_NAME:
6734 : 47 : if (gimple *_d2 = get_def (valueize, _q20))
6735 : : {
6736 : 41 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
6737 : 67 : switch (gimple_assign_rhs_code (_a2))
6738 : : {
6739 : 0 : case BIT_AND_EXPR:
6740 : 0 : {
6741 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
6742 : 0 : _q30 = do_valueize (valueize, _q30);
6743 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
6744 : 0 : _q31 = do_valueize (valueize, _q31);
6745 : 0 : if (tree_swap_operands_p (_q30, _q31))
6746 : 0 : std::swap (_q30, _q31);
6747 : 0 : switch (TREE_CODE (_q31))
6748 : : {
6749 : 0 : case VECTOR_CST:
6750 : 0 : {
6751 : 0 : {
6752 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q31 };
6753 : 0 : if (gimple_simplify_645 (res_op, seq, valueize, type, captures, CFN_REDUC_XOR))
6754 : 0 : return true;
6755 : : }
6756 : 0 : break;
6757 : : }
6758 : : default:;
6759 : : }
6760 : 580 : break;
6761 : : }
6762 : : default:;
6763 : : }
6764 : : }
6765 : : break;
6766 : : default:;
6767 : : }
6768 : : }
6769 : : break;
6770 : : }
6771 : 0 : case BIT_AND_EXPR:
6772 : 0 : {
6773 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
6774 : 0 : _q20 = do_valueize (valueize, _q20);
6775 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
6776 : 0 : _q21 = do_valueize (valueize, _q21);
6777 : 0 : if (tree_swap_operands_p (_q20, _q21))
6778 : 0 : std::swap (_q20, _q21);
6779 : 0 : switch (TREE_CODE (_q21))
6780 : : {
6781 : 0 : case VECTOR_CST:
6782 : 0 : {
6783 : 0 : {
6784 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6785 : 0 : if (gimple_simplify_645 (res_op, seq, valueize, type, captures, CFN_REDUC_XOR))
6786 : 0 : return true;
6787 : : }
6788 : 0 : break;
6789 : : }
6790 : : default:;
6791 : : }
6792 : 580 : break;
6793 : : }
6794 : 0 : case CONSTRUCTOR:
6795 : 0 : {
6796 : 0 : {
6797 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6798 : 0 : if (gimple_simplify_646 (res_op, seq, valueize, type, captures, CFN_REDUC_XOR))
6799 : 0 : return true;
6800 : : }
6801 : 0 : break;
6802 : : }
6803 : 130 : case BIT_XOR_EXPR:
6804 : 130 : {
6805 : 130 : tree _q20 = gimple_assign_rhs1 (_a1);
6806 : 130 : _q20 = do_valueize (valueize, _q20);
6807 : 130 : tree _q21 = gimple_assign_rhs2 (_a1);
6808 : 130 : _q21 = do_valueize (valueize, _q21);
6809 : 130 : if (tree_swap_operands_p (_q20, _q21))
6810 : 4 : std::swap (_q20, _q21);
6811 : 130 : switch (TREE_CODE (_q21))
6812 : : {
6813 : 4 : case VECTOR_CST:
6814 : 4 : {
6815 : 4 : {
6816 : 4 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6817 : 4 : gimple_seq *lseq = seq;
6818 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1500;
6819 : 4 : {
6820 : 4 : res_op->set_op (BIT_XOR_EXPR, type, 2);
6821 : 4 : {
6822 : 4 : tree _o1[1], _r1;
6823 : 4 : _o1[0] = captures[0];
6824 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_XOR, type, _o1[0]);
6825 : 4 : tem_op.resimplify (lseq, valueize);
6826 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6827 : 4 : if (!_r1) goto next_after_fail1500;
6828 : 2 : res_op->ops[0] = _r1;
6829 : : }
6830 : 2 : {
6831 : 2 : tree _o1[1], _r1;
6832 : 2 : _o1[0] = captures[1];
6833 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_XOR, type, _o1[0]);
6834 : 2 : tem_op.resimplify (lseq, valueize);
6835 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6836 : 2 : if (!_r1) goto next_after_fail1500;
6837 : 2 : res_op->ops[1] = _r1;
6838 : : }
6839 : 2 : res_op->resimplify (lseq, valueize);
6840 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
6841 : 2 : return true;
6842 : : }
6843 : 2 : next_after_fail1500:;
6844 : : }
6845 : 2 : break;
6846 : : }
6847 : : default:;
6848 : : }
6849 : 580 : break;
6850 : : }
6851 : : default:;
6852 : : }
6853 : : }
6854 : : break;
6855 : : default:;
6856 : : }
6857 : : return false;
6858 : : }
6859 : :
6860 : : bool
6861 : 34593693 : gimple_simplify_MULT_EXPR (gimple_match_op *res_op, gimple_seq *seq,
6862 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6863 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
6864 : : {
6865 : 34593693 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6866 : 34593693 : switch (TREE_CODE (_p1))
6867 : : {
6868 : 56131 : case VECTOR_CST:
6869 : 56131 : {
6870 : 56131 : {
6871 : 56131 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6872 : 56131 : if (initializer_each_zero_or_onep (captures[1])
6873 : 1306 : && !HONOR_SNANS (type)
6874 : 57437 : && !HONOR_SIGNED_ZEROS (type)
6875 : : )
6876 : : {
6877 : 616 : {
6878 : 616 : tree itype = FLOAT_TYPE_P (type) ? unsigned_type_for (type) : type;
6879 : 616 : if (itype
6880 : 616 : && (!VECTOR_MODE_P (TYPE_MODE (type))
6881 : 608 : || (VECTOR_MODE_P (TYPE_MODE (itype))
6882 : 608 : && optab_handler (and_optab,
6883 : 608 : TYPE_MODE (itype)) != CODE_FOR_nothing))
6884 : : )
6885 : : {
6886 : 613 : gimple_seq *lseq = seq;
6887 : 613 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1686;
6888 : 613 : {
6889 : 613 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
6890 : 613 : {
6891 : 613 : tree _o1[2], _r1;
6892 : 613 : {
6893 : 613 : tree _o2[1], _r2;
6894 : 613 : _o2[0] = captures[0];
6895 : 613 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, itype, _o2[0]);
6896 : 613 : tem_op.resimplify (lseq, valueize);
6897 : 613 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6898 : 613 : if (!_r2) goto next_after_fail1686;
6899 : 567 : _o1[0] = _r2;
6900 : : }
6901 : 567 : {
6902 : 567 : tree _o2[2], _r2;
6903 : 567 : _o2[0] = captures[1];
6904 : 567 : _o2[1] = build_zero_cst (type);
6905 : 567 : gimple_match_op tem_op (res_op->cond.any_else (), NE_EXPR, itype, _o2[0], _o2[1]);
6906 : 567 : tem_op.resimplify (lseq, valueize);
6907 : 567 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
6908 : 567 : if (!_r2) goto next_after_fail1686;
6909 : 567 : _o1[1] = _r2;
6910 : : }
6911 : 567 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, itype, _o1[0], _o1[1]);
6912 : 567 : tem_op.resimplify (lseq, valueize);
6913 : 567 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6914 : 567 : if (!_r1) goto next_after_fail1686;
6915 : 522 : res_op->ops[0] = _r1;
6916 : : }
6917 : 522 : res_op->resimplify (lseq, valueize);
6918 : 522 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 988, __FILE__, __LINE__, true);
6919 : 522 : return true;
6920 : : }
6921 : 55609 : next_after_fail1686:;
6922 : : }
6923 : : }
6924 : : }
6925 : : }
6926 : 55609 : break;
6927 : : }
6928 : 34593171 : default:;
6929 : : }
6930 : 34593171 : if (integer_zerop (_p1))
6931 : : {
6932 : 238962 : {
6933 : 238962 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6934 : 238962 : gimple_seq *lseq = seq;
6935 : 238962 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1687;
6936 : 238962 : {
6937 : 238962 : tree tem;
6938 : 238962 : tem = captures[1];
6939 : 238962 : res_op->set_value (tem);
6940 : 238962 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 989, __FILE__, __LINE__, true);
6941 : 238962 : return true;
6942 : : }
6943 : 0 : next_after_fail1687:;
6944 : : }
6945 : : }
6946 : 34354209 : if (real_zerop (_p1))
6947 : : {
6948 : 19902 : {
6949 : 19902 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
6950 : 19902 : if (!tree_expr_maybe_nan_p (captures[0])
6951 : 336 : && (!HONOR_NANS (type) || !tree_expr_maybe_infinite_p (captures[0]))
6952 : 20199 : && (!HONOR_SIGNED_ZEROS (type) || tree_expr_nonnegative_p (captures[0]))
6953 : : )
6954 : : {
6955 : 196 : gimple_seq *lseq = seq;
6956 : 196 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1688;
6957 : 196 : {
6958 : 196 : tree tem;
6959 : 196 : tem = captures[1];
6960 : 196 : res_op->set_value (tem);
6961 : 196 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 990, __FILE__, __LINE__, true);
6962 : 196 : return true;
6963 : : }
6964 : 0 : next_after_fail1688:;
6965 : : }
6966 : : }
6967 : : }
6968 : 34354013 : if (real_onep (_p1))
6969 : : {
6970 : 26995 : {
6971 : 26995 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6972 : 26995 : if (!tree_expr_maybe_signaling_nan_p (captures[0])
6973 : 26995 : && (!HONOR_SIGNED_ZEROS (type)
6974 : 25616 : || !COMPLEX_FLOAT_TYPE_P (type))
6975 : : )
6976 : : {
6977 : 24172 : gimple_seq *lseq = seq;
6978 : 24172 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1689;
6979 : 24172 : {
6980 : 24172 : tree tem;
6981 : 24172 : tem = captures[0];
6982 : 24172 : res_op->set_value (tem);
6983 : 24172 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 991, __FILE__, __LINE__, true);
6984 : 24172 : return true;
6985 : : }
6986 : 0 : next_after_fail1689:;
6987 : : }
6988 : : }
6989 : : }
6990 : 34329841 : if (real_minus_onep (_p1))
6991 : : {
6992 : 2902 : {
6993 : 2902 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6994 : 2902 : if (!tree_expr_maybe_signaling_nan_p (captures[0])
6995 : 2902 : && (!HONOR_SIGNED_ZEROS (type)
6996 : 2894 : || !COMPLEX_FLOAT_TYPE_P (type))
6997 : : )
6998 : : {
6999 : 918 : gimple_seq *lseq = seq;
7000 : 918 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1690;
7001 : 918 : {
7002 : 918 : res_op->set_op (NEGATE_EXPR, type, 1);
7003 : 918 : res_op->ops[0] = captures[0];
7004 : 918 : res_op->resimplify (lseq, valueize);
7005 : 918 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 992, __FILE__, __LINE__, true);
7006 : 918 : return true;
7007 : : }
7008 : 0 : next_after_fail1690:;
7009 : : }
7010 : : }
7011 : : }
7012 : 34328923 : switch (TREE_CODE (_p0))
7013 : : {
7014 : 33849540 : case SSA_NAME:
7015 : 33849540 : if (gimple *_d1 = get_def (valueize, _p0))
7016 : : {
7017 : 13550065 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7018 : 13131894 : switch (gimple_assign_rhs_code (_a1))
7019 : : {
7020 : 157689 : case BIT_AND_EXPR:
7021 : 157689 : {
7022 : 157689 : tree _q20 = gimple_assign_rhs1 (_a1);
7023 : 157689 : _q20 = do_valueize (valueize, _q20);
7024 : 157689 : tree _q21 = gimple_assign_rhs2 (_a1);
7025 : 157689 : _q21 = do_valueize (valueize, _q21);
7026 : 157689 : if (tree_swap_operands_p (_q20, _q21))
7027 : 1040 : std::swap (_q20, _q21);
7028 : 157689 : switch (TREE_CODE (_q20))
7029 : : {
7030 : 157689 : case SSA_NAME:
7031 : 157689 : if (gimple *_d2 = get_def (valueize, _q20))
7032 : : {
7033 : 154127 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7034 : 191683 : switch (gimple_assign_rhs_code (_a2))
7035 : : {
7036 : 20530 : case RSHIFT_EXPR:
7037 : 20530 : {
7038 : 20530 : tree _q30 = gimple_assign_rhs1 (_a2);
7039 : 20530 : _q30 = do_valueize (valueize, _q30);
7040 : 20530 : tree _q31 = gimple_assign_rhs2 (_a2);
7041 : 20530 : _q31 = do_valueize (valueize, _q31);
7042 : 20530 : if (uniform_integer_cst_p (_q31))
7043 : : {
7044 : 19281 : if (uniform_integer_cst_p (_q21))
7045 : : {
7046 : 19208 : if (uniform_integer_cst_p (_p1))
7047 : : {
7048 : 9338 : {
7049 : 9338 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q21, _p1 };
7050 : 9338 : {
7051 : 9338 : tree rshift_cst = uniform_integer_cst_p (captures[1]);
7052 : 9338 : tree bit_and_cst = uniform_integer_cst_p (captures[2]);
7053 : 9338 : tree mult_cst = uniform_integer_cst_p (captures[3]);
7054 : 9338 : if (VECTOR_TYPE_P (type)
7055 : 8 : && tree_fits_uhwi_p (rshift_cst)
7056 : 8 : && tree_fits_uhwi_p (mult_cst)
7057 : 8 : && tree_fits_uhwi_p (bit_and_cst)
7058 : : )
7059 : : {
7060 : 8 : {
7061 : 8 : HOST_WIDE_INT vec_elem_bits = vector_element_bits (type);
7062 : 8 : poly_int64 vec_nelts = TYPE_VECTOR_SUBPARTS (type);
7063 : 8 : poly_int64 vec_bits = vec_elem_bits * vec_nelts;
7064 : 8 : unsigned HOST_WIDE_INT cmp_bits_i, bit_and_i, mult_i;
7065 : 8 : unsigned HOST_WIDE_INT target_mult_i, target_bit_and_i;
7066 : 8 : cmp_bits_i = tree_to_uhwi (rshift_cst) + 1;
7067 : 8 : mult_i = tree_to_uhwi (mult_cst);
7068 : 8 : target_mult_i = (HOST_WIDE_INT_1U << cmp_bits_i) - 1;
7069 : 8 : bit_and_i = tree_to_uhwi (bit_and_cst);
7070 : 8 : target_bit_and_i = 0;
7071 : 24 : for (unsigned i = 0; i < vec_elem_bits / cmp_bits_i; i++)
7072 : 16 : target_bit_and_i = (target_bit_and_i << cmp_bits_i) | 1U;
7073 : 12 : if ((exact_log2 (cmp_bits_i)) >= 0
7074 : 8 : && cmp_bits_i < HOST_BITS_PER_WIDE_INT
7075 : 8 : && multiple_p (vec_bits, cmp_bits_i)
7076 : 8 : && vec_elem_bits <= HOST_BITS_PER_WIDE_INT
7077 : 8 : && target_mult_i == mult_i
7078 : 8 : && target_bit_and_i == bit_and_i
7079 : : )
7080 : : {
7081 : 8 : {
7082 : 8 : tree cmp_type = build_nonstandard_integer_type (cmp_bits_i, 0);
7083 : 8 : poly_int64 vector_type_nelts = exact_div (vec_bits, cmp_bits_i);
7084 : 8 : tree vec_cmp_type = build_vector_type (cmp_type, vector_type_nelts);
7085 : 8 : tree vec_truth_type = truth_type_for (vec_cmp_type);
7086 : 8 : tree zeros = build_zero_cst (vec_cmp_type);
7087 : 8 : tree ones = build_all_ones_cst (vec_cmp_type);
7088 : 8 : if (expand_vec_cmp_expr_p (vec_cmp_type, vec_truth_type, LT_EXPR)
7089 : 8 : && expand_vec_cond_expr_p (vec_cmp_type, vec_truth_type, LT_EXPR)
7090 : : )
7091 : : {
7092 : 8 : gimple_seq *lseq = seq;
7093 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1691;
7094 : 8 : {
7095 : 8 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
7096 : 8 : {
7097 : 8 : tree _o1[3], _r1;
7098 : 8 : {
7099 : 8 : tree _o2[2], _r2;
7100 : 8 : {
7101 : 8 : tree _o3[1], _r3;
7102 : 8 : _o3[0] = captures[0];
7103 : 8 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, vec_cmp_type, _o3[0]);
7104 : 8 : tem_op.resimplify (lseq, valueize);
7105 : 8 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
7106 : 8 : if (!_r3) goto next_after_fail1691;
7107 : 4 : _o2[0] = _r3;
7108 : : }
7109 : 4 : _o2[1] = zeros;
7110 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), LT_EXPR, vec_truth_type, _o2[0], _o2[1]);
7111 : 4 : tem_op.resimplify (lseq, valueize);
7112 : 4 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
7113 : 4 : if (!_r2) goto next_after_fail1691;
7114 : 4 : _o1[0] = _r2;
7115 : : }
7116 : 4 : _o1[1] = ones;
7117 : 4 : _o1[2] = zeros;
7118 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), VEC_COND_EXPR, TREE_TYPE (_o1[1]), _o1[0], _o1[1], _o1[2]);
7119 : 4 : tem_op.resimplify (lseq, valueize);
7120 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
7121 : 4 : if (!_r1) goto next_after_fail1691;
7122 : 4 : res_op->ops[0] = _r1;
7123 : : }
7124 : 4 : res_op->resimplify (lseq, valueize);
7125 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 993, __FILE__, __LINE__, true);
7126 : 4 : return true;
7127 : : }
7128 : 4 : next_after_fail1691:;
7129 : : }
7130 : : }
7131 : : }
7132 : : }
7133 : : }
7134 : : }
7135 : : }
7136 : : }
7137 : : }
7138 : : }
7139 : : break;
7140 : : }
7141 : : default:;
7142 : : }
7143 : : }
7144 : : break;
7145 : : default:;
7146 : : }
7147 : 34328919 : break;
7148 : : }
7149 : : default:;
7150 : : }
7151 : : }
7152 : : break;
7153 : 34328919 : default:;
7154 : : }
7155 : 34328919 : switch (TREE_CODE (_p1))
7156 : : {
7157 : 5614273 : case SSA_NAME:
7158 : 5614273 : if (gimple *_d1 = get_def (valueize, _p1))
7159 : : {
7160 : 4273151 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7161 : 4404599 : switch (gimple_assign_rhs_code (_a1))
7162 : : {
7163 : 1308 : case COND_EXPR:
7164 : 1308 : {
7165 : 1308 : tree _q30 = gimple_assign_rhs1 (_a1);
7166 : 1308 : _q30 = do_valueize (valueize, _q30);
7167 : 1308 : tree _q31 = gimple_assign_rhs2 (_a1);
7168 : 1308 : _q31 = do_valueize (valueize, _q31);
7169 : 1308 : tree _q32 = gimple_assign_rhs3 (_a1);
7170 : 1308 : _q32 = do_valueize (valueize, _q32);
7171 : 1308 : switch (TREE_CODE (_q30))
7172 : : {
7173 : 1308 : case SSA_NAME:
7174 : 1308 : if (gimple *_d2 = get_def (valueize, _q30))
7175 : : {
7176 : 1298 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7177 : 1309 : switch (gimple_assign_rhs_code (_a2))
7178 : : {
7179 : 14 : case GT_EXPR:
7180 : 14 : {
7181 : 14 : tree _q40 = gimple_assign_rhs1 (_a2);
7182 : 14 : _q40 = do_valueize (valueize, _q40);
7183 : 14 : tree _q41 = gimple_assign_rhs2 (_a2);
7184 : 14 : _q41 = do_valueize (valueize, _q41);
7185 : 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7186 : : {
7187 : 0 : if (real_zerop (_q41))
7188 : : {
7189 : 0 : if (real_onep (_q31))
7190 : : {
7191 : 0 : if (real_minus_onep (_q32))
7192 : : {
7193 : 0 : {
7194 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7195 : 0 : if (gimple_simplify_165 (res_op, seq, valueize, type, captures))
7196 : 0 : return true;
7197 : : }
7198 : : }
7199 : : }
7200 : : }
7201 : : }
7202 : : break;
7203 : : }
7204 : 17 : case GE_EXPR:
7205 : 17 : {
7206 : 17 : tree _q40 = gimple_assign_rhs1 (_a2);
7207 : 17 : _q40 = do_valueize (valueize, _q40);
7208 : 17 : tree _q41 = gimple_assign_rhs2 (_a2);
7209 : 17 : _q41 = do_valueize (valueize, _q41);
7210 : 17 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7211 : : {
7212 : 0 : if (real_zerop (_q41))
7213 : : {
7214 : 0 : if (real_onep (_q31))
7215 : : {
7216 : 0 : if (real_minus_onep (_q32))
7217 : : {
7218 : 0 : {
7219 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7220 : 0 : if (gimple_simplify_166 (res_op, seq, valueize, type, captures))
7221 : 0 : return true;
7222 : : }
7223 : : }
7224 : : }
7225 : : }
7226 : : }
7227 : : break;
7228 : : }
7229 : 93 : case LT_EXPR:
7230 : 93 : {
7231 : 93 : tree _q40 = gimple_assign_rhs1 (_a2);
7232 : 93 : _q40 = do_valueize (valueize, _q40);
7233 : 93 : tree _q41 = gimple_assign_rhs2 (_a2);
7234 : 93 : _q41 = do_valueize (valueize, _q41);
7235 : 93 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7236 : : {
7237 : 3 : if (real_zerop (_q41))
7238 : : {
7239 : 0 : if (real_onep (_q31))
7240 : : {
7241 : 0 : if (real_minus_onep (_q32))
7242 : : {
7243 : 0 : {
7244 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7245 : 0 : if (gimple_simplify_167 (res_op, seq, valueize, type, captures))
7246 : 0 : return true;
7247 : : }
7248 : : }
7249 : : }
7250 : : }
7251 : : }
7252 : : break;
7253 : : }
7254 : 14 : case LE_EXPR:
7255 : 14 : {
7256 : 14 : tree _q40 = gimple_assign_rhs1 (_a2);
7257 : 14 : _q40 = do_valueize (valueize, _q40);
7258 : 14 : tree _q41 = gimple_assign_rhs2 (_a2);
7259 : 14 : _q41 = do_valueize (valueize, _q41);
7260 : 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7261 : : {
7262 : 0 : if (real_zerop (_q41))
7263 : : {
7264 : 0 : if (real_onep (_q31))
7265 : : {
7266 : 0 : if (real_minus_onep (_q32))
7267 : : {
7268 : 0 : {
7269 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7270 : 0 : if (gimple_simplify_168 (res_op, seq, valueize, type, captures))
7271 : 0 : return true;
7272 : : }
7273 : : }
7274 : : }
7275 : : }
7276 : : }
7277 : : break;
7278 : : }
7279 : : default:;
7280 : : }
7281 : : }
7282 : : break;
7283 : 0 : case GT_EXPR:
7284 : 0 : {
7285 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7286 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
7287 : 0 : || is_gimple_min_invariant (_q40)))
7288 : : {
7289 : 0 : _q40 = do_valueize (valueize, _q40);
7290 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7291 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
7292 : 0 : || is_gimple_min_invariant (_q41)))
7293 : : {
7294 : 0 : _q41 = do_valueize (valueize, _q41);
7295 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7296 : : {
7297 : 0 : if (real_zerop (_q41))
7298 : : {
7299 : 0 : if (real_onep (_q31))
7300 : : {
7301 : 0 : if (real_minus_onep (_q32))
7302 : : {
7303 : 0 : {
7304 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7305 : 0 : if (gimple_simplify_165 (res_op, seq, valueize, type, captures))
7306 : 0 : return true;
7307 : : }
7308 : : }
7309 : : }
7310 : : }
7311 : : }
7312 : : }
7313 : : }
7314 : : break;
7315 : : }
7316 : 0 : case GE_EXPR:
7317 : 0 : {
7318 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7319 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
7320 : 0 : || is_gimple_min_invariant (_q40)))
7321 : : {
7322 : 0 : _q40 = do_valueize (valueize, _q40);
7323 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7324 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
7325 : 0 : || is_gimple_min_invariant (_q41)))
7326 : : {
7327 : 0 : _q41 = do_valueize (valueize, _q41);
7328 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7329 : : {
7330 : 0 : if (real_zerop (_q41))
7331 : : {
7332 : 0 : if (real_onep (_q31))
7333 : : {
7334 : 0 : if (real_minus_onep (_q32))
7335 : : {
7336 : 0 : {
7337 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7338 : 0 : if (gimple_simplify_166 (res_op, seq, valueize, type, captures))
7339 : 0 : return true;
7340 : : }
7341 : : }
7342 : : }
7343 : : }
7344 : : }
7345 : : }
7346 : : }
7347 : : break;
7348 : : }
7349 : 0 : case LT_EXPR:
7350 : 0 : {
7351 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7352 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
7353 : 0 : || is_gimple_min_invariant (_q40)))
7354 : : {
7355 : 0 : _q40 = do_valueize (valueize, _q40);
7356 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7357 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
7358 : 0 : || is_gimple_min_invariant (_q41)))
7359 : : {
7360 : 0 : _q41 = do_valueize (valueize, _q41);
7361 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7362 : : {
7363 : 0 : if (real_zerop (_q41))
7364 : : {
7365 : 0 : if (real_onep (_q31))
7366 : : {
7367 : 0 : if (real_minus_onep (_q32))
7368 : : {
7369 : 0 : {
7370 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7371 : 0 : if (gimple_simplify_167 (res_op, seq, valueize, type, captures))
7372 : 0 : return true;
7373 : : }
7374 : : }
7375 : : }
7376 : : }
7377 : : }
7378 : : }
7379 : : }
7380 : : break;
7381 : : }
7382 : 0 : case LE_EXPR:
7383 : 0 : {
7384 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7385 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
7386 : 0 : || is_gimple_min_invariant (_q40)))
7387 : : {
7388 : 0 : _q40 = do_valueize (valueize, _q40);
7389 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7390 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
7391 : 0 : || is_gimple_min_invariant (_q41)))
7392 : : {
7393 : 0 : _q41 = do_valueize (valueize, _q41);
7394 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7395 : : {
7396 : 0 : if (real_zerop (_q41))
7397 : : {
7398 : 0 : if (real_onep (_q31))
7399 : : {
7400 : 0 : if (real_minus_onep (_q32))
7401 : : {
7402 : 0 : {
7403 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
7404 : 0 : if (gimple_simplify_168 (res_op, seq, valueize, type, captures))
7405 : 0 : return true;
7406 : : }
7407 : : }
7408 : : }
7409 : : }
7410 : : }
7411 : : }
7412 : : }
7413 : : break;
7414 : : }
7415 : : default:;
7416 : : }
7417 : : break;
7418 : : }
7419 : : default:;
7420 : : }
7421 : : }
7422 : : break;
7423 : 34328919 : default:;
7424 : : }
7425 : 34328919 : switch (TREE_CODE (_p0))
7426 : : {
7427 : 33849536 : case SSA_NAME:
7428 : 33849536 : if (gimple *_d1 = get_def (valueize, _p0))
7429 : : {
7430 : 13550061 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7431 : 13131890 : switch (gimple_assign_rhs_code (_a1))
7432 : : {
7433 : 3046 : case COND_EXPR:
7434 : 3046 : {
7435 : 3046 : tree _q20 = gimple_assign_rhs1 (_a1);
7436 : 3046 : _q20 = do_valueize (valueize, _q20);
7437 : 3046 : tree _q21 = gimple_assign_rhs2 (_a1);
7438 : 3046 : _q21 = do_valueize (valueize, _q21);
7439 : 3046 : tree _q22 = gimple_assign_rhs3 (_a1);
7440 : 3046 : _q22 = do_valueize (valueize, _q22);
7441 : 3046 : switch (TREE_CODE (_q20))
7442 : : {
7443 : 3046 : case SSA_NAME:
7444 : 3046 : if (gimple *_d2 = get_def (valueize, _q20))
7445 : : {
7446 : 3038 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7447 : 3038 : switch (gimple_assign_rhs_code (_a2))
7448 : : {
7449 : 76 : case GT_EXPR:
7450 : 76 : {
7451 : 76 : tree _q30 = gimple_assign_rhs1 (_a2);
7452 : 76 : _q30 = do_valueize (valueize, _q30);
7453 : 76 : tree _q31 = gimple_assign_rhs2 (_a2);
7454 : 76 : _q31 = do_valueize (valueize, _q31);
7455 : 76 : if (real_zerop (_q31))
7456 : : {
7457 : 0 : if (real_onep (_q21))
7458 : : {
7459 : 0 : if (real_minus_onep (_q22))
7460 : : {
7461 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7462 : : {
7463 : 0 : {
7464 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7465 : 0 : if (gimple_simplify_169 (res_op, seq, valueize, type, captures))
7466 : 0 : return true;
7467 : : }
7468 : : }
7469 : : }
7470 : : }
7471 : 0 : if (real_minus_onep (_q21))
7472 : : {
7473 : 0 : if (real_onep (_q22))
7474 : : {
7475 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7476 : : {
7477 : 0 : {
7478 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7479 : 0 : if (gimple_simplify_170 (res_op, seq, valueize, type, captures))
7480 : 0 : return true;
7481 : : }
7482 : : }
7483 : : }
7484 : : }
7485 : : }
7486 : : break;
7487 : : }
7488 : 50 : case GE_EXPR:
7489 : 50 : {
7490 : 50 : tree _q30 = gimple_assign_rhs1 (_a2);
7491 : 50 : _q30 = do_valueize (valueize, _q30);
7492 : 50 : tree _q31 = gimple_assign_rhs2 (_a2);
7493 : 50 : _q31 = do_valueize (valueize, _q31);
7494 : 50 : if (real_zerop (_q31))
7495 : : {
7496 : 0 : if (real_onep (_q21))
7497 : : {
7498 : 0 : if (real_minus_onep (_q22))
7499 : : {
7500 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7501 : : {
7502 : 0 : {
7503 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7504 : 0 : if (gimple_simplify_171 (res_op, seq, valueize, type, captures))
7505 : 0 : return true;
7506 : : }
7507 : : }
7508 : : }
7509 : : }
7510 : 0 : if (real_minus_onep (_q21))
7511 : : {
7512 : 0 : if (real_onep (_q22))
7513 : : {
7514 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7515 : : {
7516 : 0 : {
7517 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7518 : 0 : if (gimple_simplify_172 (res_op, seq, valueize, type, captures))
7519 : 0 : return true;
7520 : : }
7521 : : }
7522 : : }
7523 : : }
7524 : : }
7525 : : break;
7526 : : }
7527 : 1089 : case LT_EXPR:
7528 : 1089 : {
7529 : 1089 : tree _q30 = gimple_assign_rhs1 (_a2);
7530 : 1089 : _q30 = do_valueize (valueize, _q30);
7531 : 1089 : tree _q31 = gimple_assign_rhs2 (_a2);
7532 : 1089 : _q31 = do_valueize (valueize, _q31);
7533 : 1089 : if (real_zerop (_q31))
7534 : : {
7535 : 35 : if (real_onep (_q21))
7536 : : {
7537 : 0 : if (real_minus_onep (_q22))
7538 : : {
7539 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7540 : : {
7541 : 0 : {
7542 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7543 : 0 : if (gimple_simplify_173 (res_op, seq, valueize, type, captures))
7544 : 0 : return true;
7545 : : }
7546 : : }
7547 : : }
7548 : : }
7549 : 35 : if (real_minus_onep (_q21))
7550 : : {
7551 : 0 : if (real_onep (_q22))
7552 : : {
7553 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7554 : : {
7555 : 0 : {
7556 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7557 : 0 : if (gimple_simplify_174 (res_op, seq, valueize, type, captures))
7558 : 0 : return true;
7559 : : }
7560 : : }
7561 : : }
7562 : : }
7563 : : }
7564 : : break;
7565 : : }
7566 : 38 : case LE_EXPR:
7567 : 38 : {
7568 : 38 : tree _q30 = gimple_assign_rhs1 (_a2);
7569 : 38 : _q30 = do_valueize (valueize, _q30);
7570 : 38 : tree _q31 = gimple_assign_rhs2 (_a2);
7571 : 38 : _q31 = do_valueize (valueize, _q31);
7572 : 38 : if (real_zerop (_q31))
7573 : : {
7574 : 0 : if (real_onep (_q21))
7575 : : {
7576 : 0 : if (real_minus_onep (_q22))
7577 : : {
7578 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7579 : : {
7580 : 0 : {
7581 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7582 : 0 : if (gimple_simplify_175 (res_op, seq, valueize, type, captures))
7583 : 0 : return true;
7584 : : }
7585 : : }
7586 : : }
7587 : : }
7588 : 0 : if (real_minus_onep (_q21))
7589 : : {
7590 : 0 : if (real_onep (_q22))
7591 : : {
7592 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7593 : : {
7594 : 0 : {
7595 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7596 : 0 : if (gimple_simplify_176 (res_op, seq, valueize, type, captures))
7597 : 0 : return true;
7598 : : }
7599 : : }
7600 : : }
7601 : : }
7602 : : }
7603 : : break;
7604 : : }
7605 : : default:;
7606 : : }
7607 : : }
7608 : : break;
7609 : 0 : case GT_EXPR:
7610 : 0 : {
7611 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
7612 : 0 : if ((TREE_CODE (_q30) == SSA_NAME
7613 : 0 : || is_gimple_min_invariant (_q30)))
7614 : : {
7615 : 0 : _q30 = do_valueize (valueize, _q30);
7616 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
7617 : 0 : if ((TREE_CODE (_q31) == SSA_NAME
7618 : 0 : || is_gimple_min_invariant (_q31)))
7619 : : {
7620 : 0 : _q31 = do_valueize (valueize, _q31);
7621 : 0 : if (real_zerop (_q31))
7622 : : {
7623 : 0 : if (real_onep (_q21))
7624 : : {
7625 : 0 : if (real_minus_onep (_q22))
7626 : : {
7627 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7628 : : {
7629 : 0 : {
7630 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7631 : 0 : if (gimple_simplify_169 (res_op, seq, valueize, type, captures))
7632 : 0 : return true;
7633 : : }
7634 : : }
7635 : : }
7636 : : }
7637 : 0 : if (real_minus_onep (_q21))
7638 : : {
7639 : 0 : if (real_onep (_q22))
7640 : : {
7641 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7642 : : {
7643 : 0 : {
7644 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7645 : 0 : if (gimple_simplify_170 (res_op, seq, valueize, type, captures))
7646 : 0 : return true;
7647 : : }
7648 : : }
7649 : : }
7650 : : }
7651 : : }
7652 : : }
7653 : : }
7654 : : break;
7655 : : }
7656 : 0 : case GE_EXPR:
7657 : 0 : {
7658 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
7659 : 0 : if ((TREE_CODE (_q30) == SSA_NAME
7660 : 0 : || is_gimple_min_invariant (_q30)))
7661 : : {
7662 : 0 : _q30 = do_valueize (valueize, _q30);
7663 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
7664 : 0 : if ((TREE_CODE (_q31) == SSA_NAME
7665 : 0 : || is_gimple_min_invariant (_q31)))
7666 : : {
7667 : 0 : _q31 = do_valueize (valueize, _q31);
7668 : 0 : if (real_zerop (_q31))
7669 : : {
7670 : 0 : if (real_onep (_q21))
7671 : : {
7672 : 0 : if (real_minus_onep (_q22))
7673 : : {
7674 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7675 : : {
7676 : 0 : {
7677 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7678 : 0 : if (gimple_simplify_171 (res_op, seq, valueize, type, captures))
7679 : 0 : return true;
7680 : : }
7681 : : }
7682 : : }
7683 : : }
7684 : 0 : if (real_minus_onep (_q21))
7685 : : {
7686 : 0 : if (real_onep (_q22))
7687 : : {
7688 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7689 : : {
7690 : 0 : {
7691 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7692 : 0 : if (gimple_simplify_172 (res_op, seq, valueize, type, captures))
7693 : 0 : return true;
7694 : : }
7695 : : }
7696 : : }
7697 : : }
7698 : : }
7699 : : }
7700 : : }
7701 : : break;
7702 : : }
7703 : 0 : case LT_EXPR:
7704 : 0 : {
7705 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
7706 : 0 : if ((TREE_CODE (_q30) == SSA_NAME
7707 : 0 : || is_gimple_min_invariant (_q30)))
7708 : : {
7709 : 0 : _q30 = do_valueize (valueize, _q30);
7710 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
7711 : 0 : if ((TREE_CODE (_q31) == SSA_NAME
7712 : 0 : || is_gimple_min_invariant (_q31)))
7713 : : {
7714 : 0 : _q31 = do_valueize (valueize, _q31);
7715 : 0 : if (real_zerop (_q31))
7716 : : {
7717 : 0 : if (real_onep (_q21))
7718 : : {
7719 : 0 : if (real_minus_onep (_q22))
7720 : : {
7721 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7722 : : {
7723 : 0 : {
7724 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7725 : 0 : if (gimple_simplify_173 (res_op, seq, valueize, type, captures))
7726 : 0 : return true;
7727 : : }
7728 : : }
7729 : : }
7730 : : }
7731 : 0 : if (real_minus_onep (_q21))
7732 : : {
7733 : 0 : if (real_onep (_q22))
7734 : : {
7735 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7736 : : {
7737 : 0 : {
7738 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7739 : 0 : if (gimple_simplify_174 (res_op, seq, valueize, type, captures))
7740 : 0 : return true;
7741 : : }
7742 : : }
7743 : : }
7744 : : }
7745 : : }
7746 : : }
7747 : : }
7748 : : break;
7749 : : }
7750 : 0 : case LE_EXPR:
7751 : 0 : {
7752 : 0 : tree _q30 = TREE_OPERAND (_q20, 0);
7753 : 0 : if ((TREE_CODE (_q30) == SSA_NAME
7754 : 0 : || is_gimple_min_invariant (_q30)))
7755 : : {
7756 : 0 : _q30 = do_valueize (valueize, _q30);
7757 : 0 : tree _q31 = TREE_OPERAND (_q20, 1);
7758 : 0 : if ((TREE_CODE (_q31) == SSA_NAME
7759 : 0 : || is_gimple_min_invariant (_q31)))
7760 : : {
7761 : 0 : _q31 = do_valueize (valueize, _q31);
7762 : 0 : if (real_zerop (_q31))
7763 : : {
7764 : 0 : if (real_onep (_q21))
7765 : : {
7766 : 0 : if (real_minus_onep (_q22))
7767 : : {
7768 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7769 : : {
7770 : 0 : {
7771 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
7772 : 0 : if (gimple_simplify_175 (res_op, seq, valueize, type, captures))
7773 : 0 : return true;
7774 : : }
7775 : : }
7776 : : }
7777 : : }
7778 : 0 : if (real_minus_onep (_q21))
7779 : : {
7780 : 0 : if (real_onep (_q22))
7781 : : {
7782 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7783 : : {
7784 : 0 : {
7785 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
7786 : 0 : if (gimple_simplify_176 (res_op, seq, valueize, type, captures))
7787 : 0 : return true;
7788 : : }
7789 : : }
7790 : : }
7791 : : }
7792 : : }
7793 : : }
7794 : : }
7795 : : break;
7796 : : }
7797 : : default:;
7798 : : }
7799 : : break;
7800 : : }
7801 : : default:;
7802 : : }
7803 : : }
7804 : : break;
7805 : 34328919 : default:;
7806 : : }
7807 : 34328919 : switch (TREE_CODE (_p1))
7808 : : {
7809 : 5614273 : case SSA_NAME:
7810 : 5614273 : if (gimple *_d1 = get_def (valueize, _p1))
7811 : : {
7812 : 4273151 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7813 : 4404599 : switch (gimple_assign_rhs_code (_a1))
7814 : : {
7815 : 1308 : case COND_EXPR:
7816 : 1308 : {
7817 : 1308 : tree _q30 = gimple_assign_rhs1 (_a1);
7818 : 1308 : _q30 = do_valueize (valueize, _q30);
7819 : 1308 : tree _q31 = gimple_assign_rhs2 (_a1);
7820 : 1308 : _q31 = do_valueize (valueize, _q31);
7821 : 1308 : tree _q32 = gimple_assign_rhs3 (_a1);
7822 : 1308 : _q32 = do_valueize (valueize, _q32);
7823 : 1308 : switch (TREE_CODE (_q30))
7824 : : {
7825 : 1308 : case SSA_NAME:
7826 : 1308 : if (gimple *_d2 = get_def (valueize, _q30))
7827 : : {
7828 : 1298 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7829 : 1309 : switch (gimple_assign_rhs_code (_a2))
7830 : : {
7831 : 14 : case GT_EXPR:
7832 : 14 : {
7833 : 14 : tree _q40 = gimple_assign_rhs1 (_a2);
7834 : 14 : _q40 = do_valueize (valueize, _q40);
7835 : 14 : tree _q41 = gimple_assign_rhs2 (_a2);
7836 : 14 : _q41 = do_valueize (valueize, _q41);
7837 : 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7838 : : {
7839 : 0 : if (real_zerop (_q41))
7840 : : {
7841 : 0 : if (real_minus_onep (_q31))
7842 : : {
7843 : 0 : if (real_onep (_q32))
7844 : : {
7845 : 0 : {
7846 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
7847 : 0 : if (gimple_simplify_177 (res_op, seq, valueize, type, captures))
7848 : 0 : return true;
7849 : : }
7850 : : }
7851 : : }
7852 : : }
7853 : : }
7854 : : break;
7855 : : }
7856 : 17 : case GE_EXPR:
7857 : 17 : {
7858 : 17 : tree _q40 = gimple_assign_rhs1 (_a2);
7859 : 17 : _q40 = do_valueize (valueize, _q40);
7860 : 17 : tree _q41 = gimple_assign_rhs2 (_a2);
7861 : 17 : _q41 = do_valueize (valueize, _q41);
7862 : 17 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7863 : : {
7864 : 0 : if (real_zerop (_q41))
7865 : : {
7866 : 0 : if (real_minus_onep (_q31))
7867 : : {
7868 : 0 : if (real_onep (_q32))
7869 : : {
7870 : 0 : {
7871 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
7872 : 0 : if (gimple_simplify_178 (res_op, seq, valueize, type, captures))
7873 : 0 : return true;
7874 : : }
7875 : : }
7876 : : }
7877 : : }
7878 : : }
7879 : : break;
7880 : : }
7881 : 93 : case LT_EXPR:
7882 : 93 : {
7883 : 93 : tree _q40 = gimple_assign_rhs1 (_a2);
7884 : 93 : _q40 = do_valueize (valueize, _q40);
7885 : 93 : tree _q41 = gimple_assign_rhs2 (_a2);
7886 : 93 : _q41 = do_valueize (valueize, _q41);
7887 : 93 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7888 : : {
7889 : 3 : if (real_zerop (_q41))
7890 : : {
7891 : 0 : if (real_minus_onep (_q31))
7892 : : {
7893 : 0 : if (real_onep (_q32))
7894 : : {
7895 : 0 : {
7896 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
7897 : 0 : if (gimple_simplify_179 (res_op, seq, valueize, type, captures))
7898 : 0 : return true;
7899 : : }
7900 : : }
7901 : : }
7902 : : }
7903 : : }
7904 : : break;
7905 : : }
7906 : 14 : case LE_EXPR:
7907 : 14 : {
7908 : 14 : tree _q40 = gimple_assign_rhs1 (_a2);
7909 : 14 : _q40 = do_valueize (valueize, _q40);
7910 : 14 : tree _q41 = gimple_assign_rhs2 (_a2);
7911 : 14 : _q41 = do_valueize (valueize, _q41);
7912 : 14 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7913 : : {
7914 : 0 : if (real_zerop (_q41))
7915 : : {
7916 : 0 : if (real_minus_onep (_q31))
7917 : : {
7918 : 0 : if (real_onep (_q32))
7919 : : {
7920 : 0 : {
7921 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
7922 : 0 : if (gimple_simplify_180 (res_op, seq, valueize, type, captures))
7923 : 0 : return true;
7924 : : }
7925 : : }
7926 : : }
7927 : : }
7928 : : }
7929 : : break;
7930 : : }
7931 : : default:;
7932 : : }
7933 : : }
7934 : : break;
7935 : 0 : case GT_EXPR:
7936 : 0 : {
7937 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7938 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
7939 : 0 : || is_gimple_min_invariant (_q40)))
7940 : : {
7941 : 0 : _q40 = do_valueize (valueize, _q40);
7942 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7943 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
7944 : 0 : || is_gimple_min_invariant (_q41)))
7945 : : {
7946 : 0 : _q41 = do_valueize (valueize, _q41);
7947 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7948 : : {
7949 : 0 : if (real_zerop (_q41))
7950 : : {
7951 : 0 : if (real_minus_onep (_q31))
7952 : : {
7953 : 0 : if (real_onep (_q32))
7954 : : {
7955 : 0 : {
7956 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
7957 : 0 : if (gimple_simplify_177 (res_op, seq, valueize, type, captures))
7958 : 0 : return true;
7959 : : }
7960 : : }
7961 : : }
7962 : : }
7963 : : }
7964 : : }
7965 : : }
7966 : : break;
7967 : : }
7968 : 0 : case GE_EXPR:
7969 : 0 : {
7970 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
7971 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
7972 : 0 : || is_gimple_min_invariant (_q40)))
7973 : : {
7974 : 0 : _q40 = do_valueize (valueize, _q40);
7975 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
7976 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
7977 : 0 : || is_gimple_min_invariant (_q41)))
7978 : : {
7979 : 0 : _q41 = do_valueize (valueize, _q41);
7980 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7981 : : {
7982 : 0 : if (real_zerop (_q41))
7983 : : {
7984 : 0 : if (real_minus_onep (_q31))
7985 : : {
7986 : 0 : if (real_onep (_q32))
7987 : : {
7988 : 0 : {
7989 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
7990 : 0 : if (gimple_simplify_178 (res_op, seq, valueize, type, captures))
7991 : 0 : return true;
7992 : : }
7993 : : }
7994 : : }
7995 : : }
7996 : : }
7997 : : }
7998 : : }
7999 : : break;
8000 : : }
8001 : 0 : case LT_EXPR:
8002 : 0 : {
8003 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
8004 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
8005 : 0 : || is_gimple_min_invariant (_q40)))
8006 : : {
8007 : 0 : _q40 = do_valueize (valueize, _q40);
8008 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
8009 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
8010 : 0 : || is_gimple_min_invariant (_q41)))
8011 : : {
8012 : 0 : _q41 = do_valueize (valueize, _q41);
8013 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
8014 : : {
8015 : 0 : if (real_zerop (_q41))
8016 : : {
8017 : 0 : if (real_minus_onep (_q31))
8018 : : {
8019 : 0 : if (real_onep (_q32))
8020 : : {
8021 : 0 : {
8022 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
8023 : 0 : if (gimple_simplify_179 (res_op, seq, valueize, type, captures))
8024 : 0 : return true;
8025 : : }
8026 : : }
8027 : : }
8028 : : }
8029 : : }
8030 : : }
8031 : : }
8032 : : break;
8033 : : }
8034 : 0 : case LE_EXPR:
8035 : 0 : {
8036 : 0 : tree _q40 = TREE_OPERAND (_q30, 0);
8037 : 0 : if ((TREE_CODE (_q40) == SSA_NAME
8038 : 0 : || is_gimple_min_invariant (_q40)))
8039 : : {
8040 : 0 : _q40 = do_valueize (valueize, _q40);
8041 : 0 : tree _q41 = TREE_OPERAND (_q30, 1);
8042 : 0 : if ((TREE_CODE (_q41) == SSA_NAME
8043 : 0 : || is_gimple_min_invariant (_q41)))
8044 : : {
8045 : 0 : _q41 = do_valueize (valueize, _q41);
8046 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
8047 : : {
8048 : 0 : if (real_zerop (_q41))
8049 : : {
8050 : 0 : if (real_minus_onep (_q31))
8051 : : {
8052 : 0 : if (real_onep (_q32))
8053 : : {
8054 : 0 : {
8055 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
8056 : 0 : if (gimple_simplify_180 (res_op, seq, valueize, type, captures))
8057 : 0 : return true;
8058 : : }
8059 : : }
8060 : : }
8061 : : }
8062 : : }
8063 : : }
8064 : : }
8065 : : break;
8066 : : }
8067 : : default:;
8068 : : }
8069 : : break;
8070 : : }
8071 : : default:;
8072 : : }
8073 : 1252675 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
8074 : 103646 : switch (gimple_call_combined_fn (_c1))
8075 : : {
8076 : 237 : case CFN_BUILT_IN_COPYSIGNF16:
8077 : 237 : if (gimple_call_num_args (_c1) == 2)
8078 : : {
8079 : 237 : tree _q30 = gimple_call_arg (_c1, 0);
8080 : 237 : _q30 = do_valueize (valueize, _q30);
8081 : 237 : tree _q31 = gimple_call_arg (_c1, 1);
8082 : 237 : _q31 = do_valueize (valueize, _q31);
8083 : 237 : if (real_onep (_q30))
8084 : : {
8085 : 237 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8086 : : {
8087 : 0 : {
8088 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8089 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF16))
8090 : 0 : return true;
8091 : : }
8092 : : }
8093 : : }
8094 : : }
8095 : : break;
8096 : 0 : case CFN_BUILT_IN_COPYSIGNF32:
8097 : 0 : if (gimple_call_num_args (_c1) == 2)
8098 : : {
8099 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8100 : 0 : _q30 = do_valueize (valueize, _q30);
8101 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8102 : 0 : _q31 = do_valueize (valueize, _q31);
8103 : 0 : if (real_onep (_q30))
8104 : : {
8105 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8106 : : {
8107 : 0 : {
8108 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8109 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32))
8110 : 0 : return true;
8111 : : }
8112 : : }
8113 : : }
8114 : : }
8115 : : break;
8116 : 0 : case CFN_BUILT_IN_COPYSIGNF64:
8117 : 0 : if (gimple_call_num_args (_c1) == 2)
8118 : : {
8119 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8120 : 0 : _q30 = do_valueize (valueize, _q30);
8121 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8122 : 0 : _q31 = do_valueize (valueize, _q31);
8123 : 0 : if (real_onep (_q30))
8124 : : {
8125 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8126 : : {
8127 : 0 : {
8128 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8129 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64))
8130 : 0 : return true;
8131 : : }
8132 : : }
8133 : : }
8134 : : }
8135 : : break;
8136 : 0 : case CFN_BUILT_IN_COPYSIGNF128X:
8137 : 0 : if (gimple_call_num_args (_c1) == 2)
8138 : : {
8139 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8140 : 0 : _q30 = do_valueize (valueize, _q30);
8141 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8142 : 0 : _q31 = do_valueize (valueize, _q31);
8143 : 0 : if (real_onep (_q30))
8144 : : {
8145 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8146 : : {
8147 : 0 : {
8148 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8149 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128X))
8150 : 0 : return true;
8151 : : }
8152 : : }
8153 : : }
8154 : : }
8155 : : break;
8156 : 480 : case CFN_BUILT_IN_COPYSIGNF128:
8157 : 480 : if (gimple_call_num_args (_c1) == 2)
8158 : : {
8159 : 480 : tree _q30 = gimple_call_arg (_c1, 0);
8160 : 480 : _q30 = do_valueize (valueize, _q30);
8161 : 480 : tree _q31 = gimple_call_arg (_c1, 1);
8162 : 480 : _q31 = do_valueize (valueize, _q31);
8163 : 480 : if (real_onep (_q30))
8164 : : {
8165 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8166 : : {
8167 : 0 : {
8168 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8169 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128))
8170 : 0 : return true;
8171 : : }
8172 : : }
8173 : : }
8174 : : }
8175 : : break;
8176 : 0 : case CFN_BUILT_IN_COPYSIGNF32X:
8177 : 0 : if (gimple_call_num_args (_c1) == 2)
8178 : : {
8179 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8180 : 0 : _q30 = do_valueize (valueize, _q30);
8181 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8182 : 0 : _q31 = do_valueize (valueize, _q31);
8183 : 0 : if (real_onep (_q30))
8184 : : {
8185 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8186 : : {
8187 : 0 : {
8188 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8189 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32X))
8190 : 0 : return true;
8191 : : }
8192 : : }
8193 : : }
8194 : : }
8195 : : break;
8196 : 0 : case CFN_BUILT_IN_COPYSIGNF64X:
8197 : 0 : if (gimple_call_num_args (_c1) == 2)
8198 : : {
8199 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8200 : 0 : _q30 = do_valueize (valueize, _q30);
8201 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8202 : 0 : _q31 = do_valueize (valueize, _q31);
8203 : 0 : if (real_onep (_q30))
8204 : : {
8205 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8206 : : {
8207 : 0 : {
8208 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8209 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64X))
8210 : 0 : return true;
8211 : : }
8212 : : }
8213 : : }
8214 : : }
8215 : : break;
8216 : 957 : case CFN_BUILT_IN_COPYSIGN:
8217 : 957 : if (gimple_call_num_args (_c1) == 2)
8218 : : {
8219 : 957 : tree _q30 = gimple_call_arg (_c1, 0);
8220 : 957 : _q30 = do_valueize (valueize, _q30);
8221 : 957 : tree _q31 = gimple_call_arg (_c1, 1);
8222 : 957 : _q31 = do_valueize (valueize, _q31);
8223 : 957 : if (real_onep (_q30))
8224 : : {
8225 : 60 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8226 : : {
8227 : 0 : {
8228 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8229 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN))
8230 : 0 : return true;
8231 : : }
8232 : : }
8233 : : }
8234 : : }
8235 : : break;
8236 : 674 : case CFN_BUILT_IN_COPYSIGNF:
8237 : 674 : if (gimple_call_num_args (_c1) == 2)
8238 : : {
8239 : 674 : tree _q30 = gimple_call_arg (_c1, 0);
8240 : 674 : _q30 = do_valueize (valueize, _q30);
8241 : 674 : tree _q31 = gimple_call_arg (_c1, 1);
8242 : 674 : _q31 = do_valueize (valueize, _q31);
8243 : 674 : if (real_onep (_q30))
8244 : : {
8245 : 168 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8246 : : {
8247 : 2 : {
8248 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8249 : 2 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF))
8250 : 2 : return true;
8251 : : }
8252 : : }
8253 : : }
8254 : : }
8255 : : break;
8256 : 482 : case CFN_BUILT_IN_COPYSIGNL:
8257 : 482 : if (gimple_call_num_args (_c1) == 2)
8258 : : {
8259 : 482 : tree _q30 = gimple_call_arg (_c1, 0);
8260 : 482 : _q30 = do_valueize (valueize, _q30);
8261 : 482 : tree _q31 = gimple_call_arg (_c1, 1);
8262 : 482 : _q31 = do_valueize (valueize, _q31);
8263 : 482 : if (real_onep (_q30))
8264 : : {
8265 : 0 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8266 : : {
8267 : 0 : {
8268 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8269 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL))
8270 : 0 : return true;
8271 : : }
8272 : : }
8273 : : }
8274 : : }
8275 : : break;
8276 : 139 : case CFN_COPYSIGN:
8277 : 139 : if (gimple_call_num_args (_c1) == 2)
8278 : : {
8279 : 139 : tree _q30 = gimple_call_arg (_c1, 0);
8280 : 139 : _q30 = do_valueize (valueize, _q30);
8281 : 139 : tree _q31 = gimple_call_arg (_c1, 1);
8282 : 139 : _q31 = do_valueize (valueize, _q31);
8283 : 139 : if (real_onep (_q30))
8284 : : {
8285 : 104 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
8286 : : {
8287 : 0 : {
8288 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8289 : 0 : if (gimple_simplify_181 (res_op, seq, valueize, type, captures, CFN_COPYSIGN))
8290 : 0 : return true;
8291 : : }
8292 : : }
8293 : : }
8294 : : }
8295 : : break;
8296 : : default:;
8297 : : }
8298 : : }
8299 : : break;
8300 : 34328917 : default:;
8301 : : }
8302 : 34328917 : switch (TREE_CODE (_p0))
8303 : : {
8304 : 33849534 : case SSA_NAME:
8305 : 33849534 : if (gimple *_d1 = get_def (valueize, _p0))
8306 : : {
8307 : 13550059 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
8308 : 298133 : switch (gimple_call_combined_fn (_c1))
8309 : : {
8310 : 19 : case CFN_BUILT_IN_COPYSIGNF16:
8311 : 19 : if (gimple_call_num_args (_c1) == 2)
8312 : : {
8313 : 19 : tree _q20 = gimple_call_arg (_c1, 0);
8314 : 19 : _q20 = do_valueize (valueize, _q20);
8315 : 19 : tree _q21 = gimple_call_arg (_c1, 1);
8316 : 19 : _q21 = do_valueize (valueize, _q21);
8317 : 19 : if (real_onep (_q20))
8318 : : {
8319 : 19 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8320 : : {
8321 : 0 : {
8322 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8323 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF16))
8324 : 0 : return true;
8325 : : }
8326 : : }
8327 : 19 : switch (TREE_CODE (_q21))
8328 : : {
8329 : 19 : case SSA_NAME:
8330 : 19 : if (gimple *_d2 = get_def (valueize, _q21))
8331 : : {
8332 : 19 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8333 : 6 : switch (gimple_assign_rhs_code (_a2))
8334 : : {
8335 : 0 : case NEGATE_EXPR:
8336 : 0 : {
8337 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8338 : 0 : _q40 = do_valueize (valueize, _q40);
8339 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8340 : : {
8341 : 0 : {
8342 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8343 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF16))
8344 : 0 : return true;
8345 : : }
8346 : : }
8347 : : break;
8348 : : }
8349 : : default:;
8350 : : }
8351 : : }
8352 : : break;
8353 : : default:;
8354 : : }
8355 : : }
8356 : : }
8357 : : break;
8358 : 0 : case CFN_BUILT_IN_COPYSIGNF32:
8359 : 0 : if (gimple_call_num_args (_c1) == 2)
8360 : : {
8361 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8362 : 0 : _q20 = do_valueize (valueize, _q20);
8363 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8364 : 0 : _q21 = do_valueize (valueize, _q21);
8365 : 0 : if (real_onep (_q20))
8366 : : {
8367 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8368 : : {
8369 : 0 : {
8370 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8371 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32))
8372 : 0 : return true;
8373 : : }
8374 : : }
8375 : 0 : switch (TREE_CODE (_q21))
8376 : : {
8377 : 0 : case SSA_NAME:
8378 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
8379 : : {
8380 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8381 : 0 : switch (gimple_assign_rhs_code (_a2))
8382 : : {
8383 : 0 : case NEGATE_EXPR:
8384 : 0 : {
8385 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8386 : 0 : _q40 = do_valueize (valueize, _q40);
8387 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8388 : : {
8389 : 0 : {
8390 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8391 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32))
8392 : 0 : return true;
8393 : : }
8394 : : }
8395 : : break;
8396 : : }
8397 : : default:;
8398 : : }
8399 : : }
8400 : : break;
8401 : : default:;
8402 : : }
8403 : : }
8404 : : }
8405 : : break;
8406 : 0 : case CFN_BUILT_IN_COPYSIGNF64:
8407 : 0 : if (gimple_call_num_args (_c1) == 2)
8408 : : {
8409 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8410 : 0 : _q20 = do_valueize (valueize, _q20);
8411 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8412 : 0 : _q21 = do_valueize (valueize, _q21);
8413 : 0 : if (real_onep (_q20))
8414 : : {
8415 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8416 : : {
8417 : 0 : {
8418 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8419 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64))
8420 : 0 : return true;
8421 : : }
8422 : : }
8423 : 0 : switch (TREE_CODE (_q21))
8424 : : {
8425 : 0 : case SSA_NAME:
8426 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
8427 : : {
8428 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8429 : 0 : switch (gimple_assign_rhs_code (_a2))
8430 : : {
8431 : 0 : case NEGATE_EXPR:
8432 : 0 : {
8433 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8434 : 0 : _q40 = do_valueize (valueize, _q40);
8435 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8436 : : {
8437 : 0 : {
8438 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8439 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64))
8440 : 0 : return true;
8441 : : }
8442 : : }
8443 : : break;
8444 : : }
8445 : : default:;
8446 : : }
8447 : : }
8448 : : break;
8449 : : default:;
8450 : : }
8451 : : }
8452 : : }
8453 : : break;
8454 : 0 : case CFN_BUILT_IN_COPYSIGNF128X:
8455 : 0 : if (gimple_call_num_args (_c1) == 2)
8456 : : {
8457 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8458 : 0 : _q20 = do_valueize (valueize, _q20);
8459 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8460 : 0 : _q21 = do_valueize (valueize, _q21);
8461 : 0 : if (real_onep (_q20))
8462 : : {
8463 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8464 : : {
8465 : 0 : {
8466 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8467 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128X))
8468 : 0 : return true;
8469 : : }
8470 : : }
8471 : 0 : switch (TREE_CODE (_q21))
8472 : : {
8473 : 0 : case SSA_NAME:
8474 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
8475 : : {
8476 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8477 : 0 : switch (gimple_assign_rhs_code (_a2))
8478 : : {
8479 : 0 : case NEGATE_EXPR:
8480 : 0 : {
8481 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8482 : 0 : _q40 = do_valueize (valueize, _q40);
8483 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8484 : : {
8485 : 0 : {
8486 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8487 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128X))
8488 : 0 : return true;
8489 : : }
8490 : : }
8491 : : break;
8492 : : }
8493 : : default:;
8494 : : }
8495 : : }
8496 : : break;
8497 : : default:;
8498 : : }
8499 : : }
8500 : : }
8501 : : break;
8502 : 316 : case CFN_BUILT_IN_COPYSIGNF128:
8503 : 316 : if (gimple_call_num_args (_c1) == 2)
8504 : : {
8505 : 316 : tree _q20 = gimple_call_arg (_c1, 0);
8506 : 316 : _q20 = do_valueize (valueize, _q20);
8507 : 316 : tree _q21 = gimple_call_arg (_c1, 1);
8508 : 316 : _q21 = do_valueize (valueize, _q21);
8509 : 316 : if (real_onep (_q20))
8510 : : {
8511 : 144 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8512 : : {
8513 : 0 : {
8514 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8515 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128))
8516 : 0 : return true;
8517 : : }
8518 : : }
8519 : 144 : switch (TREE_CODE (_q21))
8520 : : {
8521 : 144 : case SSA_NAME:
8522 : 144 : if (gimple *_d2 = get_def (valueize, _q21))
8523 : : {
8524 : 144 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8525 : 0 : switch (gimple_assign_rhs_code (_a2))
8526 : : {
8527 : 0 : case NEGATE_EXPR:
8528 : 0 : {
8529 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8530 : 0 : _q40 = do_valueize (valueize, _q40);
8531 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8532 : : {
8533 : 0 : {
8534 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8535 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128))
8536 : 0 : return true;
8537 : : }
8538 : : }
8539 : : break;
8540 : : }
8541 : : default:;
8542 : : }
8543 : : }
8544 : : break;
8545 : : default:;
8546 : : }
8547 : : }
8548 : : }
8549 : : break;
8550 : 0 : case CFN_BUILT_IN_COPYSIGNF32X:
8551 : 0 : if (gimple_call_num_args (_c1) == 2)
8552 : : {
8553 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8554 : 0 : _q20 = do_valueize (valueize, _q20);
8555 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8556 : 0 : _q21 = do_valueize (valueize, _q21);
8557 : 0 : if (real_onep (_q20))
8558 : : {
8559 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8560 : : {
8561 : 0 : {
8562 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8563 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32X))
8564 : 0 : return true;
8565 : : }
8566 : : }
8567 : 0 : switch (TREE_CODE (_q21))
8568 : : {
8569 : 0 : case SSA_NAME:
8570 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
8571 : : {
8572 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8573 : 0 : switch (gimple_assign_rhs_code (_a2))
8574 : : {
8575 : 0 : case NEGATE_EXPR:
8576 : 0 : {
8577 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8578 : 0 : _q40 = do_valueize (valueize, _q40);
8579 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8580 : : {
8581 : 0 : {
8582 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8583 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32X))
8584 : 0 : return true;
8585 : : }
8586 : : }
8587 : : break;
8588 : : }
8589 : : default:;
8590 : : }
8591 : : }
8592 : : break;
8593 : : default:;
8594 : : }
8595 : : }
8596 : : }
8597 : : break;
8598 : 0 : case CFN_BUILT_IN_COPYSIGNF64X:
8599 : 0 : if (gimple_call_num_args (_c1) == 2)
8600 : : {
8601 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
8602 : 0 : _q20 = do_valueize (valueize, _q20);
8603 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
8604 : 0 : _q21 = do_valueize (valueize, _q21);
8605 : 0 : if (real_onep (_q20))
8606 : : {
8607 : 0 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8608 : : {
8609 : 0 : {
8610 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8611 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64X))
8612 : 0 : return true;
8613 : : }
8614 : : }
8615 : 0 : switch (TREE_CODE (_q21))
8616 : : {
8617 : 0 : case SSA_NAME:
8618 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
8619 : : {
8620 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8621 : 0 : switch (gimple_assign_rhs_code (_a2))
8622 : : {
8623 : 0 : case NEGATE_EXPR:
8624 : 0 : {
8625 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8626 : 0 : _q40 = do_valueize (valueize, _q40);
8627 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8628 : : {
8629 : 0 : {
8630 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8631 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64X))
8632 : 0 : return true;
8633 : : }
8634 : : }
8635 : : break;
8636 : : }
8637 : : default:;
8638 : : }
8639 : : }
8640 : : break;
8641 : : default:;
8642 : : }
8643 : : }
8644 : : }
8645 : : break;
8646 : 450 : case CFN_BUILT_IN_COPYSIGN:
8647 : 450 : if (gimple_call_num_args (_c1) == 2)
8648 : : {
8649 : 450 : tree _q20 = gimple_call_arg (_c1, 0);
8650 : 450 : _q20 = do_valueize (valueize, _q20);
8651 : 450 : tree _q21 = gimple_call_arg (_c1, 1);
8652 : 450 : _q21 = do_valueize (valueize, _q21);
8653 : 450 : if (real_onep (_q20))
8654 : : {
8655 : 167 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8656 : : {
8657 : 0 : {
8658 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8659 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN))
8660 : 0 : return true;
8661 : : }
8662 : : }
8663 : 167 : switch (TREE_CODE (_q21))
8664 : : {
8665 : 167 : case SSA_NAME:
8666 : 167 : if (gimple *_d2 = get_def (valueize, _q21))
8667 : : {
8668 : 167 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8669 : 10 : switch (gimple_assign_rhs_code (_a2))
8670 : : {
8671 : 0 : case NEGATE_EXPR:
8672 : 0 : {
8673 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8674 : 0 : _q40 = do_valueize (valueize, _q40);
8675 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8676 : : {
8677 : 0 : {
8678 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8679 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN))
8680 : 0 : return true;
8681 : : }
8682 : : }
8683 : : break;
8684 : : }
8685 : : default:;
8686 : : }
8687 : : }
8688 : : break;
8689 : : default:;
8690 : : }
8691 : : }
8692 : : }
8693 : : break;
8694 : 878 : case CFN_BUILT_IN_COPYSIGNF:
8695 : 878 : if (gimple_call_num_args (_c1) == 2)
8696 : : {
8697 : 878 : tree _q20 = gimple_call_arg (_c1, 0);
8698 : 878 : _q20 = do_valueize (valueize, _q20);
8699 : 878 : tree _q21 = gimple_call_arg (_c1, 1);
8700 : 878 : _q21 = do_valueize (valueize, _q21);
8701 : 878 : if (real_onep (_q20))
8702 : : {
8703 : 340 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8704 : : {
8705 : 64 : {
8706 : 64 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8707 : 64 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF))
8708 : 0 : return true;
8709 : : }
8710 : : }
8711 : 340 : switch (TREE_CODE (_q21))
8712 : : {
8713 : 340 : case SSA_NAME:
8714 : 340 : if (gimple *_d2 = get_def (valueize, _q21))
8715 : : {
8716 : 322 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8717 : 8 : switch (gimple_assign_rhs_code (_a2))
8718 : : {
8719 : 0 : case NEGATE_EXPR:
8720 : 0 : {
8721 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8722 : 0 : _q40 = do_valueize (valueize, _q40);
8723 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8724 : : {
8725 : 0 : {
8726 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8727 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF))
8728 : 0 : return true;
8729 : : }
8730 : : }
8731 : : break;
8732 : : }
8733 : : default:;
8734 : : }
8735 : : }
8736 : : break;
8737 : : default:;
8738 : : }
8739 : : }
8740 : : }
8741 : : break;
8742 : 592 : case CFN_BUILT_IN_COPYSIGNL:
8743 : 592 : if (gimple_call_num_args (_c1) == 2)
8744 : : {
8745 : 592 : tree _q20 = gimple_call_arg (_c1, 0);
8746 : 592 : _q20 = do_valueize (valueize, _q20);
8747 : 592 : tree _q21 = gimple_call_arg (_c1, 1);
8748 : 592 : _q21 = do_valueize (valueize, _q21);
8749 : 592 : if (real_onep (_q20))
8750 : : {
8751 : 144 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8752 : : {
8753 : 0 : {
8754 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8755 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL))
8756 : 0 : return true;
8757 : : }
8758 : : }
8759 : 144 : switch (TREE_CODE (_q21))
8760 : : {
8761 : 144 : case SSA_NAME:
8762 : 144 : if (gimple *_d2 = get_def (valueize, _q21))
8763 : : {
8764 : 144 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8765 : 0 : switch (gimple_assign_rhs_code (_a2))
8766 : : {
8767 : 0 : case NEGATE_EXPR:
8768 : 0 : {
8769 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8770 : 0 : _q40 = do_valueize (valueize, _q40);
8771 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8772 : : {
8773 : 0 : {
8774 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8775 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL))
8776 : 0 : return true;
8777 : : }
8778 : : }
8779 : : break;
8780 : : }
8781 : : default:;
8782 : : }
8783 : : }
8784 : : break;
8785 : : default:;
8786 : : }
8787 : : }
8788 : : }
8789 : : break;
8790 : 75 : case CFN_COPYSIGN:
8791 : 75 : if (gimple_call_num_args (_c1) == 2)
8792 : : {
8793 : 75 : tree _q20 = gimple_call_arg (_c1, 0);
8794 : 75 : _q20 = do_valueize (valueize, _q20);
8795 : 75 : tree _q21 = gimple_call_arg (_c1, 1);
8796 : 75 : _q21 = do_valueize (valueize, _q21);
8797 : 75 : if (real_onep (_q20))
8798 : : {
8799 : 27 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
8800 : : {
8801 : 0 : {
8802 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q21 };
8803 : 0 : if (gimple_simplify_182 (res_op, seq, valueize, type, captures, CFN_COPYSIGN))
8804 : 0 : return true;
8805 : : }
8806 : : }
8807 : 27 : switch (TREE_CODE (_q21))
8808 : : {
8809 : 27 : case SSA_NAME:
8810 : 27 : if (gimple *_d2 = get_def (valueize, _q21))
8811 : : {
8812 : 27 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8813 : 54 : switch (gimple_assign_rhs_code (_a2))
8814 : : {
8815 : 0 : case NEGATE_EXPR:
8816 : 0 : {
8817 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8818 : 0 : _q40 = do_valueize (valueize, _q40);
8819 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
8820 : : {
8821 : 0 : {
8822 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
8823 : 0 : if (gimple_simplify_183 (res_op, seq, valueize, type, captures, CFN_COPYSIGN))
8824 : 0 : return true;
8825 : : }
8826 : : }
8827 : : break;
8828 : : }
8829 : : default:;
8830 : : }
8831 : : }
8832 : : break;
8833 : : default:;
8834 : : }
8835 : : }
8836 : : }
8837 : : break;
8838 : : default:;
8839 : : }
8840 : : }
8841 : : break;
8842 : 34328917 : default:;
8843 : : }
8844 : 34328917 : switch (TREE_CODE (_p1))
8845 : : {
8846 : 5614271 : case SSA_NAME:
8847 : 5614271 : if (gimple *_d1 = get_def (valueize, _p1))
8848 : : {
8849 : 4273149 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
8850 : 103644 : switch (gimple_call_combined_fn (_c1))
8851 : : {
8852 : 237 : case CFN_BUILT_IN_COPYSIGNF16:
8853 : 237 : if (gimple_call_num_args (_c1) == 2)
8854 : : {
8855 : 237 : tree _q30 = gimple_call_arg (_c1, 0);
8856 : 237 : _q30 = do_valueize (valueize, _q30);
8857 : 237 : tree _q31 = gimple_call_arg (_c1, 1);
8858 : 237 : _q31 = do_valueize (valueize, _q31);
8859 : 237 : if (real_onep (_q30))
8860 : : {
8861 : 237 : switch (TREE_CODE (_q31))
8862 : : {
8863 : 237 : case SSA_NAME:
8864 : 237 : if (gimple *_d2 = get_def (valueize, _q31))
8865 : : {
8866 : 237 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8867 : 474 : switch (gimple_assign_rhs_code (_a2))
8868 : : {
8869 : 0 : case NEGATE_EXPR:
8870 : 0 : {
8871 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
8872 : 0 : _q50 = do_valueize (valueize, _q50);
8873 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
8874 : : {
8875 : 0 : {
8876 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8877 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF16))
8878 : 0 : return true;
8879 : : }
8880 : : }
8881 : : break;
8882 : : }
8883 : : default:;
8884 : : }
8885 : : }
8886 : : break;
8887 : : default:;
8888 : : }
8889 : : }
8890 : : }
8891 : : break;
8892 : 0 : case CFN_BUILT_IN_COPYSIGNF32:
8893 : 0 : if (gimple_call_num_args (_c1) == 2)
8894 : : {
8895 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8896 : 0 : _q30 = do_valueize (valueize, _q30);
8897 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8898 : 0 : _q31 = do_valueize (valueize, _q31);
8899 : 0 : if (real_onep (_q30))
8900 : : {
8901 : 0 : switch (TREE_CODE (_q31))
8902 : : {
8903 : 0 : case SSA_NAME:
8904 : 0 : if (gimple *_d2 = get_def (valueize, _q31))
8905 : : {
8906 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8907 : 0 : switch (gimple_assign_rhs_code (_a2))
8908 : : {
8909 : 0 : case NEGATE_EXPR:
8910 : 0 : {
8911 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
8912 : 0 : _q50 = do_valueize (valueize, _q50);
8913 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
8914 : : {
8915 : 0 : {
8916 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8917 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32))
8918 : 0 : return true;
8919 : : }
8920 : : }
8921 : : break;
8922 : : }
8923 : : default:;
8924 : : }
8925 : : }
8926 : : break;
8927 : : default:;
8928 : : }
8929 : : }
8930 : : }
8931 : : break;
8932 : 0 : case CFN_BUILT_IN_COPYSIGNF64:
8933 : 0 : if (gimple_call_num_args (_c1) == 2)
8934 : : {
8935 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8936 : 0 : _q30 = do_valueize (valueize, _q30);
8937 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8938 : 0 : _q31 = do_valueize (valueize, _q31);
8939 : 0 : if (real_onep (_q30))
8940 : : {
8941 : 0 : switch (TREE_CODE (_q31))
8942 : : {
8943 : 0 : case SSA_NAME:
8944 : 0 : if (gimple *_d2 = get_def (valueize, _q31))
8945 : : {
8946 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8947 : 0 : switch (gimple_assign_rhs_code (_a2))
8948 : : {
8949 : 0 : case NEGATE_EXPR:
8950 : 0 : {
8951 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
8952 : 0 : _q50 = do_valueize (valueize, _q50);
8953 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
8954 : : {
8955 : 0 : {
8956 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8957 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64))
8958 : 0 : return true;
8959 : : }
8960 : : }
8961 : : break;
8962 : : }
8963 : : default:;
8964 : : }
8965 : : }
8966 : : break;
8967 : : default:;
8968 : : }
8969 : : }
8970 : : }
8971 : : break;
8972 : 0 : case CFN_BUILT_IN_COPYSIGNF128X:
8973 : 0 : if (gimple_call_num_args (_c1) == 2)
8974 : : {
8975 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
8976 : 0 : _q30 = do_valueize (valueize, _q30);
8977 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
8978 : 0 : _q31 = do_valueize (valueize, _q31);
8979 : 0 : if (real_onep (_q30))
8980 : : {
8981 : 0 : switch (TREE_CODE (_q31))
8982 : : {
8983 : 0 : case SSA_NAME:
8984 : 0 : if (gimple *_d2 = get_def (valueize, _q31))
8985 : : {
8986 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8987 : 0 : switch (gimple_assign_rhs_code (_a2))
8988 : : {
8989 : 0 : case NEGATE_EXPR:
8990 : 0 : {
8991 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
8992 : 0 : _q50 = do_valueize (valueize, _q50);
8993 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
8994 : : {
8995 : 0 : {
8996 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8997 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128X))
8998 : 0 : return true;
8999 : : }
9000 : : }
9001 : : break;
9002 : : }
9003 : : default:;
9004 : : }
9005 : : }
9006 : : break;
9007 : : default:;
9008 : : }
9009 : : }
9010 : : }
9011 : : break;
9012 : 480 : case CFN_BUILT_IN_COPYSIGNF128:
9013 : 480 : if (gimple_call_num_args (_c1) == 2)
9014 : : {
9015 : 480 : tree _q30 = gimple_call_arg (_c1, 0);
9016 : 480 : _q30 = do_valueize (valueize, _q30);
9017 : 480 : tree _q31 = gimple_call_arg (_c1, 1);
9018 : 480 : _q31 = do_valueize (valueize, _q31);
9019 : 480 : if (real_onep (_q30))
9020 : : {
9021 : 0 : switch (TREE_CODE (_q31))
9022 : : {
9023 : 0 : case SSA_NAME:
9024 : 0 : if (gimple *_d2 = get_def (valueize, _q31))
9025 : : {
9026 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9027 : 0 : switch (gimple_assign_rhs_code (_a2))
9028 : : {
9029 : 0 : case NEGATE_EXPR:
9030 : 0 : {
9031 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9032 : 0 : _q50 = do_valueize (valueize, _q50);
9033 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9034 : : {
9035 : 0 : {
9036 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9037 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128))
9038 : 0 : return true;
9039 : : }
9040 : : }
9041 : : break;
9042 : : }
9043 : : default:;
9044 : : }
9045 : : }
9046 : : break;
9047 : : default:;
9048 : : }
9049 : : }
9050 : : }
9051 : : break;
9052 : 0 : case CFN_BUILT_IN_COPYSIGNF32X:
9053 : 0 : if (gimple_call_num_args (_c1) == 2)
9054 : : {
9055 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
9056 : 0 : _q30 = do_valueize (valueize, _q30);
9057 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
9058 : 0 : _q31 = do_valueize (valueize, _q31);
9059 : 0 : if (real_onep (_q30))
9060 : : {
9061 : 0 : switch (TREE_CODE (_q31))
9062 : : {
9063 : 0 : case SSA_NAME:
9064 : 0 : if (gimple *_d2 = get_def (valueize, _q31))
9065 : : {
9066 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9067 : 0 : switch (gimple_assign_rhs_code (_a2))
9068 : : {
9069 : 0 : case NEGATE_EXPR:
9070 : 0 : {
9071 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9072 : 0 : _q50 = do_valueize (valueize, _q50);
9073 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9074 : : {
9075 : 0 : {
9076 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9077 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32X))
9078 : 0 : return true;
9079 : : }
9080 : : }
9081 : : break;
9082 : : }
9083 : : default:;
9084 : : }
9085 : : }
9086 : : break;
9087 : : default:;
9088 : : }
9089 : : }
9090 : : }
9091 : : break;
9092 : 0 : case CFN_BUILT_IN_COPYSIGNF64X:
9093 : 0 : if (gimple_call_num_args (_c1) == 2)
9094 : : {
9095 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
9096 : 0 : _q30 = do_valueize (valueize, _q30);
9097 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
9098 : 0 : _q31 = do_valueize (valueize, _q31);
9099 : 0 : if (real_onep (_q30))
9100 : : {
9101 : 0 : switch (TREE_CODE (_q31))
9102 : : {
9103 : 0 : case SSA_NAME:
9104 : 0 : if (gimple *_d2 = get_def (valueize, _q31))
9105 : : {
9106 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9107 : 0 : switch (gimple_assign_rhs_code (_a2))
9108 : : {
9109 : 0 : case NEGATE_EXPR:
9110 : 0 : {
9111 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9112 : 0 : _q50 = do_valueize (valueize, _q50);
9113 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9114 : : {
9115 : 0 : {
9116 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9117 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64X))
9118 : 0 : return true;
9119 : : }
9120 : : }
9121 : : break;
9122 : : }
9123 : : default:;
9124 : : }
9125 : : }
9126 : : break;
9127 : : default:;
9128 : : }
9129 : : }
9130 : : }
9131 : : break;
9132 : 957 : case CFN_BUILT_IN_COPYSIGN:
9133 : 957 : if (gimple_call_num_args (_c1) == 2)
9134 : : {
9135 : 957 : tree _q30 = gimple_call_arg (_c1, 0);
9136 : 957 : _q30 = do_valueize (valueize, _q30);
9137 : 957 : tree _q31 = gimple_call_arg (_c1, 1);
9138 : 957 : _q31 = do_valueize (valueize, _q31);
9139 : 957 : if (real_onep (_q30))
9140 : : {
9141 : 60 : switch (TREE_CODE (_q31))
9142 : : {
9143 : 60 : case SSA_NAME:
9144 : 60 : if (gimple *_d2 = get_def (valueize, _q31))
9145 : : {
9146 : 60 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9147 : 120 : switch (gimple_assign_rhs_code (_a2))
9148 : : {
9149 : 0 : case NEGATE_EXPR:
9150 : 0 : {
9151 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9152 : 0 : _q50 = do_valueize (valueize, _q50);
9153 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9154 : : {
9155 : 0 : {
9156 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9157 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN))
9158 : 0 : return true;
9159 : : }
9160 : : }
9161 : : break;
9162 : : }
9163 : : default:;
9164 : : }
9165 : : }
9166 : : break;
9167 : : default:;
9168 : : }
9169 : : }
9170 : : }
9171 : : break;
9172 : 672 : case CFN_BUILT_IN_COPYSIGNF:
9173 : 672 : if (gimple_call_num_args (_c1) == 2)
9174 : : {
9175 : 672 : tree _q30 = gimple_call_arg (_c1, 0);
9176 : 672 : _q30 = do_valueize (valueize, _q30);
9177 : 672 : tree _q31 = gimple_call_arg (_c1, 1);
9178 : 672 : _q31 = do_valueize (valueize, _q31);
9179 : 672 : if (real_onep (_q30))
9180 : : {
9181 : 166 : switch (TREE_CODE (_q31))
9182 : : {
9183 : 166 : case SSA_NAME:
9184 : 166 : if (gimple *_d2 = get_def (valueize, _q31))
9185 : : {
9186 : 166 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9187 : 330 : switch (gimple_assign_rhs_code (_a2))
9188 : : {
9189 : 2 : case NEGATE_EXPR:
9190 : 2 : {
9191 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
9192 : 2 : _q50 = do_valueize (valueize, _q50);
9193 : 2 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9194 : : {
9195 : 2 : {
9196 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9197 : 2 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF))
9198 : 1 : return true;
9199 : : }
9200 : : }
9201 : : break;
9202 : : }
9203 : : default:;
9204 : : }
9205 : : }
9206 : : break;
9207 : : default:;
9208 : : }
9209 : : }
9210 : : }
9211 : : break;
9212 : 482 : case CFN_BUILT_IN_COPYSIGNL:
9213 : 482 : if (gimple_call_num_args (_c1) == 2)
9214 : : {
9215 : 482 : tree _q30 = gimple_call_arg (_c1, 0);
9216 : 482 : _q30 = do_valueize (valueize, _q30);
9217 : 482 : tree _q31 = gimple_call_arg (_c1, 1);
9218 : 482 : _q31 = do_valueize (valueize, _q31);
9219 : 482 : if (real_onep (_q30))
9220 : : {
9221 : 0 : switch (TREE_CODE (_q31))
9222 : : {
9223 : 0 : case SSA_NAME:
9224 : 0 : if (gimple *_d2 = get_def (valueize, _q31))
9225 : : {
9226 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9227 : 0 : switch (gimple_assign_rhs_code (_a2))
9228 : : {
9229 : 0 : case NEGATE_EXPR:
9230 : 0 : {
9231 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9232 : 0 : _q50 = do_valueize (valueize, _q50);
9233 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9234 : : {
9235 : 0 : {
9236 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9237 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL))
9238 : 0 : return true;
9239 : : }
9240 : : }
9241 : : break;
9242 : : }
9243 : : default:;
9244 : : }
9245 : : }
9246 : : break;
9247 : : default:;
9248 : : }
9249 : : }
9250 : : }
9251 : : break;
9252 : 139 : case CFN_COPYSIGN:
9253 : 139 : if (gimple_call_num_args (_c1) == 2)
9254 : : {
9255 : 139 : tree _q30 = gimple_call_arg (_c1, 0);
9256 : 139 : _q30 = do_valueize (valueize, _q30);
9257 : 139 : tree _q31 = gimple_call_arg (_c1, 1);
9258 : 139 : _q31 = do_valueize (valueize, _q31);
9259 : 139 : if (real_onep (_q30))
9260 : : {
9261 : 104 : switch (TREE_CODE (_q31))
9262 : : {
9263 : 104 : case SSA_NAME:
9264 : 104 : if (gimple *_d2 = get_def (valueize, _q31))
9265 : : {
9266 : 104 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9267 : 178 : switch (gimple_assign_rhs_code (_a2))
9268 : : {
9269 : 0 : case NEGATE_EXPR:
9270 : 0 : {
9271 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9272 : 0 : _q50 = do_valueize (valueize, _q50);
9273 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
9274 : : {
9275 : 0 : {
9276 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9277 : 0 : if (gimple_simplify_184 (res_op, seq, valueize, type, captures, CFN_COPYSIGN))
9278 : 0 : return true;
9279 : : }
9280 : : }
9281 : : break;
9282 : : }
9283 : : default:;
9284 : : }
9285 : : }
9286 : : break;
9287 : : default:;
9288 : : }
9289 : : }
9290 : : }
9291 : : break;
9292 : : default:;
9293 : : }
9294 : : }
9295 : : break;
9296 : 34328916 : default:;
9297 : : }
9298 : 34328916 : if (integer_onep (_p1))
9299 : : {
9300 : 170063 : {
9301 : 170063 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9302 : 170063 : if (gimple_simplify_185 (res_op, seq, valueize, type, captures, MULT_EXPR))
9303 : 170063 : return true;
9304 : : }
9305 : : }
9306 : 34158853 : switch (TREE_CODE (_p0))
9307 : : {
9308 : 33684084 : case SSA_NAME:
9309 : 33684084 : if (gimple *_d1 = get_def (valueize, _p0))
9310 : : {
9311 : 13421707 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9312 : 13024615 : switch (gimple_assign_rhs_code (_a1))
9313 : : {
9314 : 419480 : case MULT_EXPR:
9315 : 419480 : {
9316 : 419480 : tree _q20 = gimple_assign_rhs1 (_a1);
9317 : 419480 : _q20 = do_valueize (valueize, _q20);
9318 : 419480 : tree _q21 = gimple_assign_rhs2 (_a1);
9319 : 419480 : _q21 = do_valueize (valueize, _q21);
9320 : 419480 : if (tree_swap_operands_p (_q20, _q21))
9321 : 24462 : std::swap (_q20, _q21);
9322 : 419480 : switch (TREE_CODE (_q21))
9323 : : {
9324 : 71901 : case INTEGER_CST:
9325 : 71901 : {
9326 : 71901 : switch (TREE_CODE (_p1))
9327 : : {
9328 : 64696 : case INTEGER_CST:
9329 : 64696 : {
9330 : 64696 : {
9331 : 64696 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
9332 : 64696 : {
9333 : 64696 : wi::overflow_type overflow;
9334 : 64696 : wide_int mul = wi::mul (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
9335 : 129392 : TYPE_SIGN (type), &overflow);
9336 : 64696 : if (!overflow || TYPE_OVERFLOW_WRAPS (type)
9337 : : )
9338 : : {
9339 : 64623 : gimple_seq *lseq = seq;
9340 : 64623 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1692;
9341 : 64623 : {
9342 : 64623 : res_op->set_op (MULT_EXPR, type, 2);
9343 : 64623 : res_op->ops[0] = captures[0];
9344 : 64623 : res_op->ops[1] = wide_int_to_tree (type, mul);
9345 : 64623 : res_op->resimplify (lseq, valueize);
9346 : 64623 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 994, __FILE__, __LINE__, true);
9347 : 64623 : return true;
9348 : : }
9349 : 0 : next_after_fail1692:;
9350 : : }
9351 : 64623 : }
9352 : : }
9353 : 73 : break;
9354 : : }
9355 : : default:;
9356 : : }
9357 : : break;
9358 : : }
9359 : : default:;
9360 : : }
9361 : 34092048 : break;
9362 : : }
9363 : 1784344 : case PLUS_EXPR:
9364 : 1784344 : {
9365 : 1784344 : tree _q20 = gimple_assign_rhs1 (_a1);
9366 : 1784344 : _q20 = do_valueize (valueize, _q20);
9367 : 1784344 : tree _q21 = gimple_assign_rhs2 (_a1);
9368 : 1784344 : _q21 = do_valueize (valueize, _q21);
9369 : 1784344 : if (tree_swap_operands_p (_q20, _q21))
9370 : 68713 : std::swap (_q20, _q21);
9371 : 1784344 : switch (TREE_CODE (_q20))
9372 : : {
9373 : 1784344 : case SSA_NAME:
9374 : 1784344 : if (gimple *_d2 = get_def (valueize, _q20))
9375 : : {
9376 : 1674341 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9377 : 1503128 : switch (gimple_assign_rhs_code (_a2))
9378 : : {
9379 : 398406 : case MULT_EXPR:
9380 : 398406 : {
9381 : 398406 : tree _q30 = gimple_assign_rhs1 (_a2);
9382 : 398406 : _q30 = do_valueize (valueize, _q30);
9383 : 398406 : tree _q31 = gimple_assign_rhs2 (_a2);
9384 : 398406 : _q31 = do_valueize (valueize, _q31);
9385 : 398406 : if (tree_swap_operands_p (_q30, _q31))
9386 : 11725 : std::swap (_q30, _q31);
9387 : 398406 : switch (TREE_CODE (_q31))
9388 : : {
9389 : 257223 : case INTEGER_CST:
9390 : 257223 : {
9391 : 257223 : switch (TREE_CODE (_q21))
9392 : : {
9393 : 227020 : case INTEGER_CST:
9394 : 227020 : {
9395 : 227020 : switch (TREE_CODE (_p1))
9396 : : {
9397 : 223033 : case INTEGER_CST:
9398 : 223033 : {
9399 : 223033 : {
9400 : 223033 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31, _q21, _p1 };
9401 : 223033 : {
9402 : 223033 : bool overflowed = true;
9403 : 223033 : wi::overflow_type ovf1, ovf2;
9404 : 223033 : wide_int mul = wi::mul (wi::to_wide (captures[3]), wi::to_wide (captures[5]),
9405 : 446066 : TYPE_SIGN (type), &ovf1);
9406 : 223033 : wide_int add = wi::mul (wi::to_wide (captures[4]), wi::to_wide (captures[5]),
9407 : 446066 : TYPE_SIGN (type), &ovf2);
9408 : 223033 : if (TYPE_OVERFLOW_UNDEFINED (type))
9409 : : {
9410 : 9979 : value_range vr0;
9411 : 9977 : if (ovf1 == wi::OVF_NONE && ovf2 == wi::OVF_NONE
9412 : 9977 : && get_global_range_query ()->range_of_expr (vr0, captures[1])
9413 : 19956 : && !vr0.varying_p () && !vr0.undefined_p ())
9414 : : {
9415 : 8639 : wide_int wmin0 = vr0.lower_bound ();
9416 : 8639 : wide_int wmax0 = vr0.upper_bound ();
9417 : 8639 : wmin0 = wi::mul (wmin0, wi::to_wide (captures[5]), TYPE_SIGN (type), &ovf1);
9418 : 8639 : wmax0 = wi::mul (wmax0, wi::to_wide (captures[5]), TYPE_SIGN (type), &ovf2);
9419 : 8639 : if (ovf1 == wi::OVF_NONE && ovf2 == wi::OVF_NONE)
9420 : : {
9421 : 5905 : wi::add (wmin0, add, TYPE_SIGN (type), &ovf1);
9422 : 5905 : wi::add (wmax0, add, TYPE_SIGN (type), &ovf2);
9423 : 5905 : if (ovf1 == wi::OVF_NONE && ovf2 == wi::OVF_NONE)
9424 : 8639 : overflowed = false;
9425 : : }
9426 : 8639 : }
9427 : 9979 : }
9428 : : else
9429 : : overflowed = false;
9430 : 9979 : if (!overflowed
9431 : : )
9432 : : {
9433 : 218959 : gimple_seq *lseq = seq;
9434 : 218959 : if (lseq
9435 : 13623 : && (!single_use (captures[0])
9436 : 2457 : || !single_use (captures[1])))
9437 : 218408 : lseq = NULL;
9438 : 218959 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1693;
9439 : 218959 : {
9440 : 218959 : res_op->set_op (PLUS_EXPR, type, 2);
9441 : 218959 : {
9442 : 218959 : tree _o1[2], _r1;
9443 : 218959 : _o1[0] = captures[2];
9444 : 218959 : _o1[1] = wide_int_to_tree (type, mul);
9445 : 218959 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
9446 : 218959 : tem_op.resimplify (lseq, valueize);
9447 : 218959 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9448 : 218959 : if (!_r1) goto next_after_fail1693;
9449 : 810 : res_op->ops[0] = _r1;
9450 : : }
9451 : 810 : res_op->ops[1] = wide_int_to_tree (type, add);
9452 : 810 : res_op->resimplify (lseq, valueize);
9453 : 810 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 995, __FILE__, __LINE__, true);
9454 : 810 : return true;
9455 : : }
9456 : 222223 : next_after_fail1693:;
9457 : : }
9458 : 223033 : }
9459 : : }
9460 : 222223 : break;
9461 : : }
9462 : : default:;
9463 : : }
9464 : : break;
9465 : : }
9466 : : default:;
9467 : : }
9468 : : break;
9469 : : }
9470 : : default:;
9471 : : }
9472 : 34092048 : break;
9473 : : }
9474 : : default:;
9475 : : }
9476 : : }
9477 : : break;
9478 : : default:;
9479 : : }
9480 : 34092048 : break;
9481 : : }
9482 : 103130 : case TRUNC_DIV_EXPR:
9483 : 103130 : {
9484 : 103130 : tree _q20 = gimple_assign_rhs1 (_a1);
9485 : 103130 : _q20 = do_valueize (valueize, _q20);
9486 : 103130 : tree _q21 = gimple_assign_rhs2 (_a1);
9487 : 103130 : _q21 = do_valueize (valueize, _q21);
9488 : 103130 : if (integer_pow2p (_q21))
9489 : : {
9490 : 23805 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9491 : : {
9492 : 6466 : {
9493 : 6466 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9494 : 6466 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
9495 : : )
9496 : : {
9497 : 1131 : gimple_seq *lseq = seq;
9498 : 1131 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1694;
9499 : 1131 : {
9500 : 1131 : res_op->set_op (BIT_AND_EXPR, type, 2);
9501 : 1131 : res_op->ops[0] = captures[0];
9502 : 1131 : {
9503 : 1131 : tree _o1[1], _r1;
9504 : 1131 : _o1[0] = captures[1];
9505 : 1131 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
9506 : 1131 : tem_op.resimplify (lseq, valueize);
9507 : 1131 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9508 : 1131 : if (!_r1) goto next_after_fail1694;
9509 : 1131 : res_op->ops[1] = _r1;
9510 : : }
9511 : 1131 : res_op->resimplify (lseq, valueize);
9512 : 1131 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 996, __FILE__, __LINE__, true);
9513 : 1131 : return true;
9514 : : }
9515 : 5335 : next_after_fail1694:;
9516 : : }
9517 : : }
9518 : : }
9519 : : }
9520 : : break;
9521 : : }
9522 : 4914 : case ABS_EXPR:
9523 : 4914 : {
9524 : 4914 : tree _q20 = gimple_assign_rhs1 (_a1);
9525 : 4914 : _q20 = do_valueize (valueize, _q20);
9526 : 4914 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9527 : : {
9528 : 238 : {
9529 : 238 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
9530 : 238 : gimple_seq *lseq = seq;
9531 : 238 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1695;
9532 : 238 : {
9533 : 238 : res_op->set_op (MULT_EXPR, type, 2);
9534 : 238 : res_op->ops[0] = captures[1];
9535 : 238 : res_op->ops[1] = captures[1];
9536 : 238 : res_op->resimplify (lseq, valueize);
9537 : 238 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 997, __FILE__, __LINE__, true);
9538 : 238 : return true;
9539 : : }
9540 : 0 : next_after_fail1695:;
9541 : : }
9542 : : }
9543 : : break;
9544 : : }
9545 : 96 : case ABSU_EXPR:
9546 : 96 : {
9547 : 96 : tree _q20 = gimple_assign_rhs1 (_a1);
9548 : 96 : _q20 = do_valueize (valueize, _q20);
9549 : 96 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9550 : : {
9551 : 2 : {
9552 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20 };
9553 : 2 : gimple_seq *lseq = seq;
9554 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1696;
9555 : 2 : {
9556 : 2 : res_op->set_op (MULT_EXPR, type, 2);
9557 : 2 : {
9558 : 2 : tree _o1[1], _r1;
9559 : 2 : _o1[0] = captures[1];
9560 : 2 : if (type != TREE_TYPE (_o1[0])
9561 : 2 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
9562 : : {
9563 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
9564 : 2 : tem_op.resimplify (lseq, valueize);
9565 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
9566 : 2 : if (!_r1) goto next_after_fail1696;
9567 : : }
9568 : : else
9569 : : _r1 = _o1[0];
9570 : 1 : captures[2] = _r1;
9571 : : }
9572 : 1 : res_op->ops[0] = captures[2];
9573 : 1 : res_op->ops[1] = captures[2];
9574 : 1 : res_op->resimplify (lseq, valueize);
9575 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 998, __FILE__, __LINE__, true);
9576 : 1 : return true;
9577 : : }
9578 : 1 : next_after_fail1696:;
9579 : : }
9580 : : }
9581 : : break;
9582 : : }
9583 : : default:;
9584 : : }
9585 : 2605089 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
9586 : 294717 : switch (gimple_call_combined_fn (_c1))
9587 : : {
9588 : 19 : case CFN_BUILT_IN_COPYSIGNF16:
9589 : 19 : if (gimple_call_num_args (_c1) == 2)
9590 : : {
9591 : 19 : tree _q20 = gimple_call_arg (_c1, 0);
9592 : 19 : _q20 = do_valueize (valueize, _q20);
9593 : 19 : tree _q21 = gimple_call_arg (_c1, 1);
9594 : 19 : _q21 = do_valueize (valueize, _q21);
9595 : 19 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9596 : : {
9597 : 0 : {
9598 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9599 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF16))
9600 : 0 : return true;
9601 : : }
9602 : : }
9603 : : }
9604 : : break;
9605 : 0 : case CFN_BUILT_IN_COPYSIGNF32:
9606 : 0 : if (gimple_call_num_args (_c1) == 2)
9607 : : {
9608 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9609 : 0 : _q20 = do_valueize (valueize, _q20);
9610 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
9611 : 0 : _q21 = do_valueize (valueize, _q21);
9612 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9613 : : {
9614 : 0 : {
9615 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9616 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32))
9617 : 0 : return true;
9618 : : }
9619 : : }
9620 : : }
9621 : : break;
9622 : 0 : case CFN_BUILT_IN_COPYSIGNF64:
9623 : 0 : if (gimple_call_num_args (_c1) == 2)
9624 : : {
9625 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9626 : 0 : _q20 = do_valueize (valueize, _q20);
9627 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
9628 : 0 : _q21 = do_valueize (valueize, _q21);
9629 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9630 : : {
9631 : 0 : {
9632 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9633 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64))
9634 : 0 : return true;
9635 : : }
9636 : : }
9637 : : }
9638 : : break;
9639 : 0 : case CFN_BUILT_IN_COPYSIGNF128X:
9640 : 0 : if (gimple_call_num_args (_c1) == 2)
9641 : : {
9642 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9643 : 0 : _q20 = do_valueize (valueize, _q20);
9644 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
9645 : 0 : _q21 = do_valueize (valueize, _q21);
9646 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9647 : : {
9648 : 0 : {
9649 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9650 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128X))
9651 : 0 : return true;
9652 : : }
9653 : : }
9654 : : }
9655 : : break;
9656 : 316 : case CFN_BUILT_IN_COPYSIGNF128:
9657 : 316 : if (gimple_call_num_args (_c1) == 2)
9658 : : {
9659 : 316 : tree _q20 = gimple_call_arg (_c1, 0);
9660 : 316 : _q20 = do_valueize (valueize, _q20);
9661 : 316 : tree _q21 = gimple_call_arg (_c1, 1);
9662 : 316 : _q21 = do_valueize (valueize, _q21);
9663 : 316 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9664 : : {
9665 : 0 : {
9666 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9667 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128))
9668 : 0 : return true;
9669 : : }
9670 : : }
9671 : : }
9672 : : break;
9673 : 0 : case CFN_BUILT_IN_COPYSIGNF32X:
9674 : 0 : if (gimple_call_num_args (_c1) == 2)
9675 : : {
9676 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9677 : 0 : _q20 = do_valueize (valueize, _q20);
9678 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
9679 : 0 : _q21 = do_valueize (valueize, _q21);
9680 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9681 : : {
9682 : 0 : {
9683 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9684 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32X))
9685 : 0 : return true;
9686 : : }
9687 : : }
9688 : : }
9689 : : break;
9690 : 0 : case CFN_BUILT_IN_COPYSIGNF64X:
9691 : 0 : if (gimple_call_num_args (_c1) == 2)
9692 : : {
9693 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
9694 : 0 : _q20 = do_valueize (valueize, _q20);
9695 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
9696 : 0 : _q21 = do_valueize (valueize, _q21);
9697 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9698 : : {
9699 : 0 : {
9700 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9701 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64X))
9702 : 0 : return true;
9703 : : }
9704 : : }
9705 : : }
9706 : : break;
9707 : 450 : case CFN_BUILT_IN_COPYSIGN:
9708 : 450 : if (gimple_call_num_args (_c1) == 2)
9709 : : {
9710 : 450 : tree _q20 = gimple_call_arg (_c1, 0);
9711 : 450 : _q20 = do_valueize (valueize, _q20);
9712 : 450 : tree _q21 = gimple_call_arg (_c1, 1);
9713 : 450 : _q21 = do_valueize (valueize, _q21);
9714 : 450 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9715 : : {
9716 : 0 : {
9717 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9718 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN))
9719 : 0 : return true;
9720 : : }
9721 : : }
9722 : : }
9723 : : break;
9724 : 878 : case CFN_BUILT_IN_COPYSIGNF:
9725 : 878 : if (gimple_call_num_args (_c1) == 2)
9726 : : {
9727 : 878 : tree _q20 = gimple_call_arg (_c1, 0);
9728 : 878 : _q20 = do_valueize (valueize, _q20);
9729 : 878 : tree _q21 = gimple_call_arg (_c1, 1);
9730 : 878 : _q21 = do_valueize (valueize, _q21);
9731 : 878 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9732 : : {
9733 : 0 : {
9734 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9735 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF))
9736 : 0 : return true;
9737 : : }
9738 : : }
9739 : : }
9740 : : break;
9741 : 592 : case CFN_BUILT_IN_COPYSIGNL:
9742 : 592 : if (gimple_call_num_args (_c1) == 2)
9743 : : {
9744 : 592 : tree _q20 = gimple_call_arg (_c1, 0);
9745 : 592 : _q20 = do_valueize (valueize, _q20);
9746 : 592 : tree _q21 = gimple_call_arg (_c1, 1);
9747 : 592 : _q21 = do_valueize (valueize, _q21);
9748 : 592 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9749 : : {
9750 : 0 : {
9751 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9752 : 0 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL))
9753 : 0 : return true;
9754 : : }
9755 : : }
9756 : : }
9757 : : break;
9758 : 75 : case CFN_COPYSIGN:
9759 : 75 : if (gimple_call_num_args (_c1) == 2)
9760 : : {
9761 : 75 : tree _q20 = gimple_call_arg (_c1, 0);
9762 : 75 : _q20 = do_valueize (valueize, _q20);
9763 : 75 : tree _q21 = gimple_call_arg (_c1, 1);
9764 : 75 : _q21 = do_valueize (valueize, _q21);
9765 : 75 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
9766 : : {
9767 : 2 : {
9768 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9769 : 2 : if (gimple_simplify_186 (res_op, seq, valueize, type, captures, CFN_COPYSIGN))
9770 : 2 : return true;
9771 : : }
9772 : : }
9773 : : }
9774 : : break;
9775 : : default:;
9776 : : }
9777 : : }
9778 : : break;
9779 : 34092048 : default:;
9780 : : }
9781 : 34092048 : switch (TREE_CODE (_p1))
9782 : : {
9783 : 5614029 : case SSA_NAME:
9784 : 5614029 : if (gimple *_d1 = get_def (valueize, _p1))
9785 : : {
9786 : 4272907 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9787 : 4404360 : switch (gimple_assign_rhs_code (_a1))
9788 : : {
9789 : 572893 : CASE_CONVERT:
9790 : 572893 : {
9791 : 572893 : tree _q30 = gimple_assign_rhs1 (_a1);
9792 : 572893 : _q30 = do_valueize (valueize, _q30);
9793 : 572893 : switch (TREE_CODE (_q30))
9794 : : {
9795 : 572893 : case SSA_NAME:
9796 : 572893 : if (gimple *_d2 = get_def (valueize, _q30))
9797 : : {
9798 : 562177 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9799 : 608916 : switch (gimple_assign_rhs_code (_a2))
9800 : : {
9801 : 2213 : case LSHIFT_EXPR:
9802 : 2213 : {
9803 : 2213 : tree _q40 = gimple_assign_rhs1 (_a2);
9804 : 2213 : _q40 = do_valueize (valueize, _q40);
9805 : 2213 : tree _q41 = gimple_assign_rhs2 (_a2);
9806 : 2213 : _q41 = do_valueize (valueize, _q41);
9807 : 2213 : if (integer_onep (_q40))
9808 : : {
9809 : 0 : {
9810 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q41 };
9811 : 0 : if (gimple_simplify_187 (res_op, seq, valueize, type, captures))
9812 : 0 : return true;
9813 : : }
9814 : : }
9815 : : break;
9816 : : }
9817 : : default:;
9818 : : }
9819 : : }
9820 : : break;
9821 : : default:;
9822 : : }
9823 : : break;
9824 : : }
9825 : : default:;
9826 : : }
9827 : : }
9828 : : break;
9829 : 34092048 : default:;
9830 : : }
9831 : 34092048 : switch (TREE_CODE (_p0))
9832 : : {
9833 : 33617279 : case SSA_NAME:
9834 : 33617279 : if (gimple *_d1 = get_def (valueize, _p0))
9835 : : {
9836 : 13354902 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9837 : 12957812 : switch (gimple_assign_rhs_code (_a1))
9838 : : {
9839 : 4891106 : CASE_CONVERT:
9840 : 4891106 : {
9841 : 4891106 : tree _q20 = gimple_assign_rhs1 (_a1);
9842 : 4891106 : _q20 = do_valueize (valueize, _q20);
9843 : 4891106 : switch (TREE_CODE (_q20))
9844 : : {
9845 : 4890899 : case SSA_NAME:
9846 : 4890899 : if (gimple *_d2 = get_def (valueize, _q20))
9847 : : {
9848 : 4440658 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9849 : 3453123 : switch (gimple_assign_rhs_code (_a2))
9850 : : {
9851 : 6149 : case LSHIFT_EXPR:
9852 : 6149 : {
9853 : 6149 : tree _q30 = gimple_assign_rhs1 (_a2);
9854 : 6149 : _q30 = do_valueize (valueize, _q30);
9855 : 6149 : tree _q31 = gimple_assign_rhs2 (_a2);
9856 : 6149 : _q31 = do_valueize (valueize, _q31);
9857 : 6149 : if (integer_onep (_q30))
9858 : : {
9859 : 1011 : {
9860 : 1011 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _q31 };
9861 : 1011 : if (gimple_simplify_187 (res_op, seq, valueize, type, captures))
9862 : 173 : return true;
9863 : : }
9864 : : }
9865 : : break;
9866 : : }
9867 : 368 : case EQ_EXPR:
9868 : 368 : {
9869 : 368 : tree _q30 = gimple_assign_rhs1 (_a2);
9870 : 368 : _q30 = do_valueize (valueize, _q30);
9871 : 368 : tree _q31 = gimple_assign_rhs2 (_a2);
9872 : 368 : _q31 = do_valueize (valueize, _q31);
9873 : 368 : if (tree_swap_operands_p (_q30, _q31))
9874 : 0 : std::swap (_q30, _q31);
9875 : 368 : if (integer_zerop (_q31))
9876 : : {
9877 : 86 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
9878 : : {
9879 : 0 : {
9880 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
9881 : 0 : if (gimple_simplify_188 (res_op, seq, valueize, type, captures))
9882 : 0 : return true;
9883 : : }
9884 : : }
9885 : : }
9886 : 34091875 : break;
9887 : : }
9888 : : default:;
9889 : : }
9890 : : }
9891 : : break;
9892 : : default:;
9893 : : }
9894 : : break;
9895 : : }
9896 : : default:;
9897 : : }
9898 : : }
9899 : : break;
9900 : 34091875 : default:;
9901 : : }
9902 : 34091875 : switch (TREE_CODE (_p1))
9903 : : {
9904 : 5614029 : case SSA_NAME:
9905 : 5614029 : if (gimple *_d1 = get_def (valueize, _p1))
9906 : : {
9907 : 4272907 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9908 : 4404360 : switch (gimple_assign_rhs_code (_a1))
9909 : : {
9910 : 2333 : case LSHIFT_EXPR:
9911 : 2333 : {
9912 : 2333 : tree _q30 = gimple_assign_rhs1 (_a1);
9913 : 2333 : _q30 = do_valueize (valueize, _q30);
9914 : 2333 : tree _q31 = gimple_assign_rhs2 (_a1);
9915 : 2333 : _q31 = do_valueize (valueize, _q31);
9916 : 2333 : if (integer_onep (_q30))
9917 : : {
9918 : 37 : {
9919 : 37 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
9920 : 37 : if (gimple_simplify_187 (res_op, seq, valueize, type, captures))
9921 : 37 : return true;
9922 : : }
9923 : : }
9924 : : break;
9925 : : }
9926 : : default:;
9927 : : }
9928 : : }
9929 : : break;
9930 : 34091838 : default:;
9931 : : }
9932 : 34091838 : switch (TREE_CODE (_p0))
9933 : : {
9934 : 33617069 : case SSA_NAME:
9935 : 33617069 : if (gimple *_d1 = get_def (valueize, _p0))
9936 : : {
9937 : 13354692 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9938 : 12957606 : switch (gimple_assign_rhs_code (_a1))
9939 : : {
9940 : 6942 : case LSHIFT_EXPR:
9941 : 6942 : {
9942 : 6942 : tree _q20 = gimple_assign_rhs1 (_a1);
9943 : 6942 : _q20 = do_valueize (valueize, _q20);
9944 : 6942 : tree _q21 = gimple_assign_rhs2 (_a1);
9945 : 6942 : _q21 = do_valueize (valueize, _q21);
9946 : 6942 : if (integer_onep (_q20))
9947 : : {
9948 : 153 : {
9949 : 153 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q20, _q21 };
9950 : 153 : if (gimple_simplify_187 (res_op, seq, valueize, type, captures))
9951 : 153 : return true;
9952 : : }
9953 : : }
9954 : : break;
9955 : : }
9956 : : default:;
9957 : : }
9958 : : }
9959 : : break;
9960 : 34091685 : default:;
9961 : : }
9962 : 34091685 : switch (TREE_CODE (_p1))
9963 : : {
9964 : 5613953 : case SSA_NAME:
9965 : 5613953 : if (gimple *_d1 = get_def (valueize, _p1))
9966 : : {
9967 : 4272831 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9968 : 4404298 : switch (gimple_assign_rhs_code (_a1))
9969 : : {
9970 : 572893 : CASE_CONVERT:
9971 : 572893 : {
9972 : 572893 : tree _q30 = gimple_assign_rhs1 (_a1);
9973 : 572893 : _q30 = do_valueize (valueize, _q30);
9974 : 572893 : switch (TREE_CODE (_q30))
9975 : : {
9976 : 572893 : case SSA_NAME:
9977 : 572893 : if (gimple *_d2 = get_def (valueize, _q30))
9978 : : {
9979 : 562177 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9980 : 608916 : switch (gimple_assign_rhs_code (_a2))
9981 : : {
9982 : 117 : case EQ_EXPR:
9983 : 117 : {
9984 : 117 : tree _q40 = gimple_assign_rhs1 (_a2);
9985 : 117 : _q40 = do_valueize (valueize, _q40);
9986 : 117 : tree _q41 = gimple_assign_rhs2 (_a2);
9987 : 117 : _q41 = do_valueize (valueize, _q41);
9988 : 117 : if (tree_swap_operands_p (_q40, _q41))
9989 : 0 : std::swap (_q40, _q41);
9990 : 117 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
9991 : : {
9992 : 0 : if (integer_zerop (_q41))
9993 : : {
9994 : 0 : {
9995 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
9996 : 0 : if (gimple_simplify_189 (res_op, seq, valueize, type, captures))
9997 : 0 : return true;
9998 : : }
9999 : : }
10000 : : }
10001 : 34091685 : break;
10002 : : }
10003 : : default:;
10004 : : }
10005 : : }
10006 : : break;
10007 : : default:;
10008 : : }
10009 : : break;
10010 : : }
10011 : 0 : case EQ_EXPR:
10012 : 0 : {
10013 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
10014 : 0 : _q30 = do_valueize (valueize, _q30);
10015 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
10016 : 0 : _q31 = do_valueize (valueize, _q31);
10017 : 0 : if (tree_swap_operands_p (_q30, _q31))
10018 : 0 : std::swap (_q30, _q31);
10019 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10020 : : {
10021 : 0 : if (integer_zerop (_q31))
10022 : : {
10023 : 0 : {
10024 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10025 : 0 : if (gimple_simplify_189 (res_op, seq, valueize, type, captures))
10026 : 0 : return true;
10027 : : }
10028 : : }
10029 : : }
10030 : 34091685 : break;
10031 : : }
10032 : : default:;
10033 : : }
10034 : : }
10035 : : break;
10036 : 34091685 : default:;
10037 : : }
10038 : 34091685 : switch (TREE_CODE (_p0))
10039 : : {
10040 : 33616916 : case SSA_NAME:
10041 : 33616916 : if (gimple *_d1 = get_def (valueize, _p0))
10042 : : {
10043 : 13354539 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10044 : 12957453 : switch (gimple_assign_rhs_code (_a1))
10045 : : {
10046 : 0 : case EQ_EXPR:
10047 : 0 : {
10048 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
10049 : 0 : _q20 = do_valueize (valueize, _q20);
10050 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
10051 : 0 : _q21 = do_valueize (valueize, _q21);
10052 : 0 : if (tree_swap_operands_p (_q20, _q21))
10053 : 0 : std::swap (_q20, _q21);
10054 : 0 : if (integer_zerop (_q21))
10055 : : {
10056 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10057 : : {
10058 : 0 : {
10059 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10060 : 0 : if (gimple_simplify_188 (res_op, seq, valueize, type, captures))
10061 : 0 : return true;
10062 : : }
10063 : : }
10064 : : }
10065 : 34091685 : break;
10066 : : }
10067 : : default:;
10068 : : }
10069 : : }
10070 : : break;
10071 : 34091685 : default:;
10072 : : }
10073 : 34091685 : switch (TREE_CODE (_p1))
10074 : : {
10075 : 5613953 : case SSA_NAME:
10076 : 5613953 : if (gimple *_d1 = get_def (valueize, _p1))
10077 : : {
10078 : 4272831 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10079 : 4404298 : switch (gimple_assign_rhs_code (_a1))
10080 : : {
10081 : 513 : case VEC_COND_EXPR:
10082 : 513 : {
10083 : 513 : tree _q30 = gimple_assign_rhs1 (_a1);
10084 : 513 : _q30 = do_valueize (valueize, _q30);
10085 : 513 : tree _q31 = gimple_assign_rhs2 (_a1);
10086 : 513 : _q31 = do_valueize (valueize, _q31);
10087 : 513 : tree _q32 = gimple_assign_rhs3 (_a1);
10088 : 513 : _q32 = do_valueize (valueize, _q32);
10089 : 513 : switch (TREE_CODE (_q30))
10090 : : {
10091 : 513 : case SSA_NAME:
10092 : 513 : if (gimple *_d2 = get_def (valueize, _q30))
10093 : : {
10094 : 485 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10095 : 505 : switch (gimple_assign_rhs_code (_a2))
10096 : : {
10097 : 0 : case EQ_EXPR:
10098 : 0 : {
10099 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
10100 : 0 : _q40 = do_valueize (valueize, _q40);
10101 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
10102 : 0 : _q41 = do_valueize (valueize, _q41);
10103 : 0 : if (tree_swap_operands_p (_q40, _q41))
10104 : 0 : std::swap (_q40, _q41);
10105 : 0 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
10106 : : {
10107 : 0 : if (integer_zerop (_q41))
10108 : : {
10109 : 0 : if (integer_zerop (_q32))
10110 : : {
10111 : 0 : {
10112 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q31 };
10113 : 0 : gimple_seq *lseq = seq;
10114 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1697;
10115 : 0 : {
10116 : 0 : tree tem;
10117 : 0 : tem = build_zero_cst (type);
10118 : 0 : res_op->set_value (tem);
10119 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 999, __FILE__, __LINE__, true);
10120 : 0 : return true;
10121 : : }
10122 : 0 : next_after_fail1697:;
10123 : : }
10124 : : }
10125 : : }
10126 : : }
10127 : 34091685 : break;
10128 : : }
10129 : : default:;
10130 : : }
10131 : : }
10132 : : break;
10133 : : default:;
10134 : : }
10135 : : break;
10136 : : }
10137 : : default:;
10138 : : }
10139 : : }
10140 : : break;
10141 : 34091685 : default:;
10142 : : }
10143 : 34091685 : switch (TREE_CODE (_p0))
10144 : : {
10145 : 33616916 : case SSA_NAME:
10146 : 33616916 : if (gimple *_d1 = get_def (valueize, _p0))
10147 : : {
10148 : 13354539 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10149 : 12957453 : switch (gimple_assign_rhs_code (_a1))
10150 : : {
10151 : 234 : case VEC_COND_EXPR:
10152 : 234 : {
10153 : 234 : tree _q20 = gimple_assign_rhs1 (_a1);
10154 : 234 : _q20 = do_valueize (valueize, _q20);
10155 : 234 : tree _q21 = gimple_assign_rhs2 (_a1);
10156 : 234 : _q21 = do_valueize (valueize, _q21);
10157 : 234 : tree _q22 = gimple_assign_rhs3 (_a1);
10158 : 234 : _q22 = do_valueize (valueize, _q22);
10159 : 234 : switch (TREE_CODE (_q20))
10160 : : {
10161 : 234 : case SSA_NAME:
10162 : 234 : if (gimple *_d2 = get_def (valueize, _q20))
10163 : : {
10164 : 223 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10165 : 237 : switch (gimple_assign_rhs_code (_a2))
10166 : : {
10167 : 0 : case EQ_EXPR:
10168 : 0 : {
10169 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
10170 : 0 : _q30 = do_valueize (valueize, _q30);
10171 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
10172 : 0 : _q31 = do_valueize (valueize, _q31);
10173 : 0 : if (tree_swap_operands_p (_q30, _q31))
10174 : 0 : std::swap (_q30, _q31);
10175 : 0 : if (integer_zerop (_q31))
10176 : : {
10177 : 0 : if (integer_zerop (_q22))
10178 : : {
10179 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
10180 : : {
10181 : 0 : {
10182 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
10183 : 0 : gimple_seq *lseq = seq;
10184 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1698;
10185 : 0 : {
10186 : 0 : tree tem;
10187 : 0 : tem = build_zero_cst (type);
10188 : 0 : res_op->set_value (tem);
10189 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 999, __FILE__, __LINE__, true);
10190 : 0 : return true;
10191 : : }
10192 : 0 : next_after_fail1698:;
10193 : : }
10194 : : }
10195 : : }
10196 : : }
10197 : 34091685 : break;
10198 : : }
10199 : 32 : case NE_EXPR:
10200 : 32 : {
10201 : 32 : tree _q30 = gimple_assign_rhs1 (_a2);
10202 : 32 : _q30 = do_valueize (valueize, _q30);
10203 : 32 : tree _q31 = gimple_assign_rhs2 (_a2);
10204 : 32 : _q31 = do_valueize (valueize, _q31);
10205 : 32 : if (tree_swap_operands_p (_q30, _q31))
10206 : 0 : std::swap (_q30, _q31);
10207 : 32 : if (integer_zerop (_q31))
10208 : : {
10209 : 10 : if (integer_zerop (_q21))
10210 : : {
10211 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
10212 : : {
10213 : 0 : {
10214 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q22 };
10215 : 0 : gimple_seq *lseq = seq;
10216 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1699;
10217 : 0 : {
10218 : 0 : tree tem;
10219 : 0 : tem = build_zero_cst (type);
10220 : 0 : res_op->set_value (tem);
10221 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1000, __FILE__, __LINE__, true);
10222 : 0 : return true;
10223 : : }
10224 : 0 : next_after_fail1699:;
10225 : : }
10226 : : }
10227 : : }
10228 : : }
10229 : 34091685 : break;
10230 : : }
10231 : : default:;
10232 : : }
10233 : : }
10234 : : break;
10235 : : default:;
10236 : : }
10237 : : break;
10238 : : }
10239 : : default:;
10240 : : }
10241 : : }
10242 : : break;
10243 : 34091685 : default:;
10244 : : }
10245 : 34091685 : switch (TREE_CODE (_p1))
10246 : : {
10247 : 5613953 : case SSA_NAME:
10248 : 5613953 : if (gimple *_d1 = get_def (valueize, _p1))
10249 : : {
10250 : 4272831 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10251 : 4404298 : switch (gimple_assign_rhs_code (_a1))
10252 : : {
10253 : 513 : case VEC_COND_EXPR:
10254 : 513 : {
10255 : 513 : tree _q30 = gimple_assign_rhs1 (_a1);
10256 : 513 : _q30 = do_valueize (valueize, _q30);
10257 : 513 : tree _q31 = gimple_assign_rhs2 (_a1);
10258 : 513 : _q31 = do_valueize (valueize, _q31);
10259 : 513 : tree _q32 = gimple_assign_rhs3 (_a1);
10260 : 513 : _q32 = do_valueize (valueize, _q32);
10261 : 513 : switch (TREE_CODE (_q30))
10262 : : {
10263 : 513 : case SSA_NAME:
10264 : 513 : if (gimple *_d2 = get_def (valueize, _q30))
10265 : : {
10266 : 485 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10267 : 505 : switch (gimple_assign_rhs_code (_a2))
10268 : : {
10269 : 405 : case NE_EXPR:
10270 : 405 : {
10271 : 405 : tree _q40 = gimple_assign_rhs1 (_a2);
10272 : 405 : _q40 = do_valueize (valueize, _q40);
10273 : 405 : tree _q41 = gimple_assign_rhs2 (_a2);
10274 : 405 : _q41 = do_valueize (valueize, _q41);
10275 : 405 : if (tree_swap_operands_p (_q40, _q41))
10276 : 72 : std::swap (_q40, _q41);
10277 : 405 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
10278 : : {
10279 : 3 : if (integer_zerop (_q41))
10280 : : {
10281 : 3 : if (integer_zerop (_q31))
10282 : : {
10283 : 0 : {
10284 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q32 };
10285 : 0 : gimple_seq *lseq = seq;
10286 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1700;
10287 : 0 : {
10288 : 0 : tree tem;
10289 : 0 : tem = build_zero_cst (type);
10290 : 0 : res_op->set_value (tem);
10291 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1000, __FILE__, __LINE__, true);
10292 : 0 : return true;
10293 : : }
10294 : 0 : next_after_fail1700:;
10295 : : }
10296 : : }
10297 : : }
10298 : : }
10299 : 34091685 : break;
10300 : : }
10301 : : default:;
10302 : : }
10303 : : }
10304 : : break;
10305 : : default:;
10306 : : }
10307 : : break;
10308 : : }
10309 : : default:;
10310 : : }
10311 : : }
10312 : : break;
10313 : 34091685 : default:;
10314 : : }
10315 : 34091685 : switch (TREE_CODE (_p0))
10316 : : {
10317 : 33616916 : case SSA_NAME:
10318 : 33616916 : if (gimple *_d1 = get_def (valueize, _p0))
10319 : : {
10320 : 13354539 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10321 : 12957453 : switch (gimple_assign_rhs_code (_a1))
10322 : : {
10323 : 40713 : case RDIV_EXPR:
10324 : 40713 : {
10325 : 40713 : tree _q20 = gimple_assign_rhs1 (_a1);
10326 : 40713 : _q20 = do_valueize (valueize, _q20);
10327 : 40713 : tree _q21 = gimple_assign_rhs2 (_a1);
10328 : 40713 : _q21 = do_valueize (valueize, _q21);
10329 : 40713 : switch (TREE_CODE (_q20))
10330 : : {
10331 : 14498 : case REAL_CST:
10332 : 14498 : {
10333 : 14498 : switch (TREE_CODE (_p1))
10334 : : {
10335 : 3174 : case REAL_CST:
10336 : 3174 : {
10337 : 3174 : {
10338 : 3174 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
10339 : 3174 : if (flag_associative_math
10340 : 30 : && single_use (captures[0])
10341 : : )
10342 : : {
10343 : 0 : {
10344 : 0 : tree tem = const_binop (MULT_EXPR, type, captures[1], captures[3]);
10345 : 0 : if (tem
10346 : : )
10347 : : {
10348 : 0 : gimple_seq *lseq = seq;
10349 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1701;
10350 : 0 : {
10351 : 0 : res_op->set_op (RDIV_EXPR, type, 2);
10352 : 0 : res_op->ops[0] = tem;
10353 : 0 : res_op->ops[1] = captures[2];
10354 : 0 : res_op->resimplify (lseq, valueize);
10355 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1001, __FILE__, __LINE__, true);
10356 : 0 : return true;
10357 : : }
10358 : 0 : next_after_fail1701:;
10359 : : }
10360 : : }
10361 : : }
10362 : : }
10363 : 3174 : break;
10364 : : }
10365 : : default:;
10366 : : }
10367 : : break;
10368 : : }
10369 : : default:;
10370 : : }
10371 : : break;
10372 : : }
10373 : : default:;
10374 : : }
10375 : : }
10376 : : break;
10377 : 34091685 : default:;
10378 : : }
10379 : 34091685 : {
10380 : 34091685 : tree _p0_pops[1];
10381 : 34091685 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
10382 : : {
10383 : 2430282 : tree _q20 = _p0_pops[0];
10384 : 2430282 : switch (TREE_CODE (_q20))
10385 : : {
10386 : 2430076 : case SSA_NAME:
10387 : 2430076 : if (gimple *_d1 = get_def (valueize, _q20))
10388 : : {
10389 : 2259284 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10390 : 2194169 : switch (gimple_assign_rhs_code (_a1))
10391 : : {
10392 : 573 : case BIT_IOR_EXPR:
10393 : 573 : {
10394 : 573 : tree _q30 = gimple_assign_rhs1 (_a1);
10395 : 573 : _q30 = do_valueize (valueize, _q30);
10396 : 573 : tree _q31 = gimple_assign_rhs2 (_a1);
10397 : 573 : _q31 = do_valueize (valueize, _q31);
10398 : 573 : if (tree_swap_operands_p (_q30, _q31))
10399 : 22 : std::swap (_q30, _q31);
10400 : 573 : switch (TREE_CODE (_q30))
10401 : : {
10402 : 573 : case SSA_NAME:
10403 : 573 : if (gimple *_d2 = get_def (valueize, _q30))
10404 : : {
10405 : 573 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10406 : 399 : switch (gimple_assign_rhs_code (_a2))
10407 : : {
10408 : 2 : case NEGATE_EXPR:
10409 : 2 : {
10410 : 2 : tree _q40 = gimple_assign_rhs1 (_a2);
10411 : 2 : _q40 = do_valueize (valueize, _q40);
10412 : 2 : switch (TREE_CODE (_q40))
10413 : : {
10414 : 2 : case SSA_NAME:
10415 : 2 : if (gimple *_d3 = get_def (valueize, _q40))
10416 : : {
10417 : 2 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10418 : 2 : switch (gimple_assign_rhs_code (_a3))
10419 : : {
10420 : 2 : CASE_CONVERT:
10421 : 2 : {
10422 : 2 : tree _q50 = gimple_assign_rhs1 (_a3);
10423 : 2 : _q50 = do_valueize (valueize, _q50);
10424 : 2 : switch (TREE_CODE (_q50))
10425 : : {
10426 : 2 : case SSA_NAME:
10427 : 2 : if (gimple *_d4 = get_def (valueize, _q50))
10428 : : {
10429 : 2 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
10430 : 2 : switch (gimple_assign_rhs_code (_a4))
10431 : : {
10432 : 2 : case LT_EXPR:
10433 : 2 : {
10434 : 2 : tree _q60 = gimple_assign_rhs1 (_a4);
10435 : 2 : _q60 = do_valueize (valueize, _q60);
10436 : 2 : tree _q61 = gimple_assign_rhs2 (_a4);
10437 : 2 : _q61 = do_valueize (valueize, _q61);
10438 : 2 : if (integer_zerop (_q61))
10439 : : {
10440 : 2 : if (integer_onep (_q31))
10441 : : {
10442 : 2 : {
10443 : 2 : tree _p1_pops[1];
10444 : 2 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
10445 : : {
10446 : 2 : tree _q100 = _p1_pops[0];
10447 : 2 : if ((_q100 == _q60 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q60, 0) && types_match (_q100, _q60)))
10448 : : {
10449 : 2 : {
10450 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q60 };
10451 : 2 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10452 : 2 : return true;
10453 : : }
10454 : : }
10455 : : }
10456 : : }
10457 : 0 : if ((_p1 == _q60 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q60, 0) && types_match (_p1, _q60)))
10458 : : {
10459 : 0 : {
10460 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q60 };
10461 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10462 : 0 : return true;
10463 : : }
10464 : : }
10465 : : }
10466 : : }
10467 : : break;
10468 : : }
10469 : : default:;
10470 : : }
10471 : : }
10472 : : break;
10473 : : default:;
10474 : : }
10475 : : break;
10476 : : }
10477 : 0 : case LT_EXPR:
10478 : 0 : {
10479 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
10480 : 0 : _q50 = do_valueize (valueize, _q50);
10481 : 0 : tree _q51 = gimple_assign_rhs2 (_a3);
10482 : 0 : _q51 = do_valueize (valueize, _q51);
10483 : 0 : if (integer_zerop (_q51))
10484 : : {
10485 : 0 : if (integer_onep (_q31))
10486 : : {
10487 : 0 : {
10488 : 0 : tree _p1_pops[1];
10489 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
10490 : : {
10491 : 0 : tree _q90 = _p1_pops[0];
10492 : 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
10493 : : {
10494 : 0 : {
10495 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q50 };
10496 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10497 : 0 : return true;
10498 : : }
10499 : : }
10500 : : }
10501 : : }
10502 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
10503 : : {
10504 : 0 : {
10505 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q50 };
10506 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10507 : 0 : return true;
10508 : : }
10509 : : }
10510 : : }
10511 : : }
10512 : : break;
10513 : : }
10514 : : default:;
10515 : : }
10516 : : }
10517 : : break;
10518 : : default:;
10519 : : }
10520 : : break;
10521 : : }
10522 : : default:;
10523 : : }
10524 : : }
10525 : : break;
10526 : 571 : default:;
10527 : : }
10528 : 571 : {
10529 : 571 : tree _q30_pops[1];
10530 : 571 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
10531 : : {
10532 : 0 : tree _q40 = _q30_pops[0];
10533 : 0 : switch (TREE_CODE (_q40))
10534 : : {
10535 : 0 : case SSA_NAME:
10536 : 0 : if (gimple *_d2 = get_def (valueize, _q40))
10537 : : {
10538 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10539 : 0 : switch (gimple_assign_rhs_code (_a2))
10540 : : {
10541 : 0 : case NEGATE_EXPR:
10542 : 0 : {
10543 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
10544 : 0 : _q50 = do_valueize (valueize, _q50);
10545 : 0 : switch (TREE_CODE (_q50))
10546 : : {
10547 : 0 : case SSA_NAME:
10548 : 0 : if (gimple *_d3 = get_def (valueize, _q50))
10549 : : {
10550 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10551 : 0 : switch (gimple_assign_rhs_code (_a3))
10552 : : {
10553 : 0 : CASE_CONVERT:
10554 : 0 : {
10555 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
10556 : 0 : _q60 = do_valueize (valueize, _q60);
10557 : 0 : switch (TREE_CODE (_q60))
10558 : : {
10559 : 0 : case SSA_NAME:
10560 : 0 : if (gimple *_d4 = get_def (valueize, _q60))
10561 : : {
10562 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
10563 : 0 : switch (gimple_assign_rhs_code (_a4))
10564 : : {
10565 : 0 : case LT_EXPR:
10566 : 0 : {
10567 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
10568 : 0 : _q70 = do_valueize (valueize, _q70);
10569 : 0 : tree _q71 = gimple_assign_rhs2 (_a4);
10570 : 0 : _q71 = do_valueize (valueize, _q71);
10571 : 0 : if (integer_zerop (_q71))
10572 : : {
10573 : 0 : if (integer_onep (_q31))
10574 : : {
10575 : 0 : {
10576 : 0 : tree _p1_pops[1];
10577 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
10578 : : {
10579 : 0 : tree _q110 = _p1_pops[0];
10580 : 0 : if ((_q110 == _q70 && ! TREE_SIDE_EFFECTS (_q110)) || (operand_equal_p (_q110, _q70, 0) && types_match (_q110, _q70)))
10581 : : {
10582 : 0 : {
10583 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q70 };
10584 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10585 : 0 : return true;
10586 : : }
10587 : : }
10588 : : }
10589 : : }
10590 : 0 : if ((_p1 == _q70 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q70, 0) && types_match (_p1, _q70)))
10591 : : {
10592 : 0 : {
10593 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q70 };
10594 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10595 : 0 : return true;
10596 : : }
10597 : : }
10598 : : }
10599 : : }
10600 : : break;
10601 : : }
10602 : : default:;
10603 : : }
10604 : : }
10605 : : break;
10606 : : default:;
10607 : : }
10608 : : break;
10609 : : }
10610 : 0 : case LT_EXPR:
10611 : 0 : {
10612 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
10613 : 0 : _q60 = do_valueize (valueize, _q60);
10614 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
10615 : 0 : _q61 = do_valueize (valueize, _q61);
10616 : 0 : if (integer_zerop (_q61))
10617 : : {
10618 : 0 : if (integer_onep (_q31))
10619 : : {
10620 : 0 : {
10621 : 0 : tree _p1_pops[1];
10622 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
10623 : : {
10624 : 0 : tree _q100 = _p1_pops[0];
10625 : 0 : if ((_q100 == _q60 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q60, 0) && types_match (_q100, _q60)))
10626 : : {
10627 : 0 : {
10628 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q60 };
10629 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10630 : 0 : return true;
10631 : : }
10632 : : }
10633 : : }
10634 : : }
10635 : 0 : if ((_p1 == _q60 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q60, 0) && types_match (_p1, _q60)))
10636 : : {
10637 : 0 : {
10638 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q60 };
10639 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
10640 : 0 : return true;
10641 : : }
10642 : : }
10643 : : }
10644 : : }
10645 : : break;
10646 : : }
10647 : : default:;
10648 : : }
10649 : : }
10650 : : break;
10651 : : default:;
10652 : : }
10653 : : break;
10654 : : }
10655 : : default:;
10656 : : }
10657 : : }
10658 : : break;
10659 : : default:;
10660 : : }
10661 : : }
10662 : : }
10663 : 571 : break;
10664 : : }
10665 : : default:;
10666 : : }
10667 : : }
10668 : : break;
10669 : 2430280 : default:;
10670 : : }
10671 : 2430280 : switch (TREE_CODE (_p1))
10672 : : {
10673 : 223324 : case SSA_NAME:
10674 : 223324 : if (gimple *_d1 = get_def (valueize, _p1))
10675 : : {
10676 : 208248 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10677 : 219319 : switch (gimple_assign_rhs_code (_a1))
10678 : : {
10679 : 108 : case BIT_IOR_EXPR:
10680 : 108 : {
10681 : 108 : tree _q40 = gimple_assign_rhs1 (_a1);
10682 : 108 : _q40 = do_valueize (valueize, _q40);
10683 : 108 : tree _q41 = gimple_assign_rhs2 (_a1);
10684 : 108 : _q41 = do_valueize (valueize, _q41);
10685 : 108 : if (tree_swap_operands_p (_q40, _q41))
10686 : 10 : std::swap (_q40, _q41);
10687 : 108 : switch (TREE_CODE (_q40))
10688 : : {
10689 : 108 : case SSA_NAME:
10690 : 108 : if (gimple *_d2 = get_def (valueize, _q40))
10691 : : {
10692 : 108 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10693 : 108 : switch (gimple_assign_rhs_code (_a2))
10694 : : {
10695 : 1 : case NEGATE_EXPR:
10696 : 1 : {
10697 : 1 : tree _q50 = gimple_assign_rhs1 (_a2);
10698 : 1 : _q50 = do_valueize (valueize, _q50);
10699 : 1 : switch (TREE_CODE (_q50))
10700 : : {
10701 : 1 : case SSA_NAME:
10702 : 1 : if (gimple *_d3 = get_def (valueize, _q50))
10703 : : {
10704 : 1 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10705 : 1 : switch (gimple_assign_rhs_code (_a3))
10706 : : {
10707 : 1 : CASE_CONVERT:
10708 : 1 : {
10709 : 1 : tree _q60 = gimple_assign_rhs1 (_a3);
10710 : 1 : _q60 = do_valueize (valueize, _q60);
10711 : 1 : switch (TREE_CODE (_q60))
10712 : : {
10713 : 1 : case SSA_NAME:
10714 : 1 : if (gimple *_d4 = get_def (valueize, _q60))
10715 : : {
10716 : 1 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
10717 : 1 : switch (gimple_assign_rhs_code (_a4))
10718 : : {
10719 : 1 : case LT_EXPR:
10720 : 1 : {
10721 : 1 : tree _q70 = gimple_assign_rhs1 (_a4);
10722 : 1 : _q70 = do_valueize (valueize, _q70);
10723 : 1 : tree _q71 = gimple_assign_rhs2 (_a4);
10724 : 1 : _q71 = do_valueize (valueize, _q71);
10725 : 1 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
10726 : : {
10727 : 1 : if (integer_zerop (_q71))
10728 : : {
10729 : 1 : if (integer_onep (_q41))
10730 : : {
10731 : 1 : {
10732 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10733 : 1 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
10734 : 1 : return true;
10735 : : }
10736 : : }
10737 : : }
10738 : : }
10739 : : break;
10740 : : }
10741 : : default:;
10742 : : }
10743 : : }
10744 : : break;
10745 : : default:;
10746 : : }
10747 : : break;
10748 : : }
10749 : 0 : case LT_EXPR:
10750 : 0 : {
10751 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
10752 : 0 : _q60 = do_valueize (valueize, _q60);
10753 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
10754 : 0 : _q61 = do_valueize (valueize, _q61);
10755 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10756 : : {
10757 : 0 : if (integer_zerop (_q61))
10758 : : {
10759 : 0 : if (integer_onep (_q41))
10760 : : {
10761 : 0 : {
10762 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10763 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
10764 : 0 : return true;
10765 : : }
10766 : : }
10767 : : }
10768 : : }
10769 : : break;
10770 : : }
10771 : : default:;
10772 : : }
10773 : : }
10774 : : break;
10775 : : default:;
10776 : : }
10777 : : break;
10778 : : }
10779 : : default:;
10780 : : }
10781 : : }
10782 : : break;
10783 : 107 : default:;
10784 : : }
10785 : 107 : {
10786 : 107 : tree _q40_pops[1];
10787 : 107 : if (gimple_nop_convert (_q40, _q40_pops, valueize))
10788 : : {
10789 : 1 : tree _q50 = _q40_pops[0];
10790 : 1 : switch (TREE_CODE (_q50))
10791 : : {
10792 : 1 : case SSA_NAME:
10793 : 1 : if (gimple *_d2 = get_def (valueize, _q50))
10794 : : {
10795 : 1 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10796 : 1 : switch (gimple_assign_rhs_code (_a2))
10797 : : {
10798 : 1 : case NEGATE_EXPR:
10799 : 1 : {
10800 : 1 : tree _q60 = gimple_assign_rhs1 (_a2);
10801 : 1 : _q60 = do_valueize (valueize, _q60);
10802 : 1 : switch (TREE_CODE (_q60))
10803 : : {
10804 : 1 : case SSA_NAME:
10805 : 1 : if (gimple *_d3 = get_def (valueize, _q60))
10806 : : {
10807 : 1 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10808 : 1 : switch (gimple_assign_rhs_code (_a3))
10809 : : {
10810 : 1 : CASE_CONVERT:
10811 : 1 : {
10812 : 1 : tree _q70 = gimple_assign_rhs1 (_a3);
10813 : 1 : _q70 = do_valueize (valueize, _q70);
10814 : 1 : switch (TREE_CODE (_q70))
10815 : : {
10816 : 1 : case SSA_NAME:
10817 : 1 : if (gimple *_d4 = get_def (valueize, _q70))
10818 : : {
10819 : 1 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
10820 : 1 : switch (gimple_assign_rhs_code (_a4))
10821 : : {
10822 : 1 : case LT_EXPR:
10823 : 1 : {
10824 : 1 : tree _q80 = gimple_assign_rhs1 (_a4);
10825 : 1 : _q80 = do_valueize (valueize, _q80);
10826 : 1 : tree _q81 = gimple_assign_rhs2 (_a4);
10827 : 1 : _q81 = do_valueize (valueize, _q81);
10828 : 1 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
10829 : : {
10830 : 1 : if (integer_zerop (_q81))
10831 : : {
10832 : 1 : if (integer_onep (_q41))
10833 : : {
10834 : 1 : {
10835 : 1 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10836 : 1 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
10837 : 1 : return true;
10838 : : }
10839 : : }
10840 : : }
10841 : : }
10842 : : break;
10843 : : }
10844 : : default:;
10845 : : }
10846 : : }
10847 : : break;
10848 : : default:;
10849 : : }
10850 : : break;
10851 : : }
10852 : 0 : case LT_EXPR:
10853 : 0 : {
10854 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
10855 : 0 : _q70 = do_valueize (valueize, _q70);
10856 : 0 : tree _q71 = gimple_assign_rhs2 (_a3);
10857 : 0 : _q71 = do_valueize (valueize, _q71);
10858 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
10859 : : {
10860 : 0 : if (integer_zerop (_q71))
10861 : : {
10862 : 0 : if (integer_onep (_q41))
10863 : : {
10864 : 0 : {
10865 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10866 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
10867 : 0 : return true;
10868 : : }
10869 : : }
10870 : : }
10871 : : }
10872 : : break;
10873 : : }
10874 : : default:;
10875 : : }
10876 : : }
10877 : : break;
10878 : : default:;
10879 : : }
10880 : : break;
10881 : : }
10882 : : default:;
10883 : : }
10884 : : }
10885 : : break;
10886 : : default:;
10887 : : }
10888 : : }
10889 : : }
10890 : 106 : break;
10891 : : }
10892 : : default:;
10893 : : }
10894 : : }
10895 : : break;
10896 : 2430278 : default:;
10897 : : }
10898 : 2430278 : {
10899 : 2430278 : tree _p1_pops[1];
10900 : 2430278 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
10901 : : {
10902 : 131837 : tree _q40 = _p1_pops[0];
10903 : 131837 : switch (TREE_CODE (_q40))
10904 : : {
10905 : 131837 : case SSA_NAME:
10906 : 131837 : if (gimple *_d1 = get_def (valueize, _q40))
10907 : : {
10908 : 2543286 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10909 : 196662 : switch (gimple_assign_rhs_code (_a1))
10910 : : {
10911 : 0 : case BIT_IOR_EXPR:
10912 : 0 : {
10913 : 0 : tree _q50 = gimple_assign_rhs1 (_a1);
10914 : 0 : _q50 = do_valueize (valueize, _q50);
10915 : 0 : tree _q51 = gimple_assign_rhs2 (_a1);
10916 : 0 : _q51 = do_valueize (valueize, _q51);
10917 : 0 : if (tree_swap_operands_p (_q50, _q51))
10918 : 0 : std::swap (_q50, _q51);
10919 : 0 : switch (TREE_CODE (_q50))
10920 : : {
10921 : 0 : case SSA_NAME:
10922 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
10923 : : {
10924 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10925 : 0 : switch (gimple_assign_rhs_code (_a2))
10926 : : {
10927 : 0 : case NEGATE_EXPR:
10928 : 0 : {
10929 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
10930 : 0 : _q60 = do_valueize (valueize, _q60);
10931 : 0 : switch (TREE_CODE (_q60))
10932 : : {
10933 : 0 : case SSA_NAME:
10934 : 0 : if (gimple *_d3 = get_def (valueize, _q60))
10935 : : {
10936 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10937 : 0 : switch (gimple_assign_rhs_code (_a3))
10938 : : {
10939 : 0 : CASE_CONVERT:
10940 : 0 : {
10941 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
10942 : 0 : _q70 = do_valueize (valueize, _q70);
10943 : 0 : switch (TREE_CODE (_q70))
10944 : : {
10945 : 0 : case SSA_NAME:
10946 : 0 : if (gimple *_d4 = get_def (valueize, _q70))
10947 : : {
10948 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
10949 : 0 : switch (gimple_assign_rhs_code (_a4))
10950 : : {
10951 : 0 : case LT_EXPR:
10952 : 0 : {
10953 : 0 : tree _q80 = gimple_assign_rhs1 (_a4);
10954 : 0 : _q80 = do_valueize (valueize, _q80);
10955 : 0 : tree _q81 = gimple_assign_rhs2 (_a4);
10956 : 0 : _q81 = do_valueize (valueize, _q81);
10957 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
10958 : : {
10959 : 0 : if (integer_zerop (_q81))
10960 : : {
10961 : 0 : if (integer_onep (_q51))
10962 : : {
10963 : 0 : {
10964 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10965 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
10966 : 0 : return true;
10967 : : }
10968 : : }
10969 : : }
10970 : : }
10971 : : break;
10972 : : }
10973 : : default:;
10974 : : }
10975 : : }
10976 : : break;
10977 : : default:;
10978 : : }
10979 : : break;
10980 : : }
10981 : 0 : case LT_EXPR:
10982 : 0 : {
10983 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
10984 : 0 : _q70 = do_valueize (valueize, _q70);
10985 : 0 : tree _q71 = gimple_assign_rhs2 (_a3);
10986 : 0 : _q71 = do_valueize (valueize, _q71);
10987 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
10988 : : {
10989 : 0 : if (integer_zerop (_q71))
10990 : : {
10991 : 0 : if (integer_onep (_q51))
10992 : : {
10993 : 0 : {
10994 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10995 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
10996 : 0 : return true;
10997 : : }
10998 : : }
10999 : : }
11000 : : }
11001 : : break;
11002 : : }
11003 : : default:;
11004 : : }
11005 : : }
11006 : : break;
11007 : : default:;
11008 : : }
11009 : : break;
11010 : : }
11011 : : default:;
11012 : : }
11013 : : }
11014 : : break;
11015 : 0 : default:;
11016 : : }
11017 : 0 : {
11018 : 0 : tree _q50_pops[1];
11019 : 0 : if (gimple_nop_convert (_q50, _q50_pops, valueize))
11020 : : {
11021 : 0 : tree _q60 = _q50_pops[0];
11022 : 0 : switch (TREE_CODE (_q60))
11023 : : {
11024 : 0 : case SSA_NAME:
11025 : 0 : if (gimple *_d2 = get_def (valueize, _q60))
11026 : : {
11027 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11028 : 0 : switch (gimple_assign_rhs_code (_a2))
11029 : : {
11030 : 0 : case NEGATE_EXPR:
11031 : 0 : {
11032 : 0 : tree _q70 = gimple_assign_rhs1 (_a2);
11033 : 0 : _q70 = do_valueize (valueize, _q70);
11034 : 0 : switch (TREE_CODE (_q70))
11035 : : {
11036 : 0 : case SSA_NAME:
11037 : 0 : if (gimple *_d3 = get_def (valueize, _q70))
11038 : : {
11039 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11040 : 0 : switch (gimple_assign_rhs_code (_a3))
11041 : : {
11042 : 0 : CASE_CONVERT:
11043 : 0 : {
11044 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
11045 : 0 : _q80 = do_valueize (valueize, _q80);
11046 : 0 : switch (TREE_CODE (_q80))
11047 : : {
11048 : 0 : case SSA_NAME:
11049 : 0 : if (gimple *_d4 = get_def (valueize, _q80))
11050 : : {
11051 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11052 : 0 : switch (gimple_assign_rhs_code (_a4))
11053 : : {
11054 : 0 : case LT_EXPR:
11055 : 0 : {
11056 : 0 : tree _q90 = gimple_assign_rhs1 (_a4);
11057 : 0 : _q90 = do_valueize (valueize, _q90);
11058 : 0 : tree _q91 = gimple_assign_rhs2 (_a4);
11059 : 0 : _q91 = do_valueize (valueize, _q91);
11060 : 0 : if ((_q90 == _q20 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q20, 0) && types_match (_q90, _q20)))
11061 : : {
11062 : 0 : if (integer_zerop (_q91))
11063 : : {
11064 : 0 : if (integer_onep (_q51))
11065 : : {
11066 : 0 : {
11067 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11068 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11069 : 0 : return true;
11070 : : }
11071 : : }
11072 : : }
11073 : : }
11074 : : break;
11075 : : }
11076 : : default:;
11077 : : }
11078 : : }
11079 : : break;
11080 : : default:;
11081 : : }
11082 : : break;
11083 : : }
11084 : 0 : case LT_EXPR:
11085 : 0 : {
11086 : 0 : tree _q80 = gimple_assign_rhs1 (_a3);
11087 : 0 : _q80 = do_valueize (valueize, _q80);
11088 : 0 : tree _q81 = gimple_assign_rhs2 (_a3);
11089 : 0 : _q81 = do_valueize (valueize, _q81);
11090 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
11091 : : {
11092 : 0 : if (integer_zerop (_q81))
11093 : : {
11094 : 0 : if (integer_onep (_q51))
11095 : : {
11096 : 0 : {
11097 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
11098 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11099 : 0 : return true;
11100 : : }
11101 : : }
11102 : : }
11103 : : }
11104 : : break;
11105 : : }
11106 : : default:;
11107 : : }
11108 : : }
11109 : : break;
11110 : : default:;
11111 : : }
11112 : : break;
11113 : : }
11114 : : default:;
11115 : : }
11116 : : }
11117 : : break;
11118 : : default:;
11119 : : }
11120 : : }
11121 : : }
11122 : 0 : break;
11123 : : }
11124 : : default:;
11125 : : }
11126 : : }
11127 : : break;
11128 : : default:;
11129 : : }
11130 : : }
11131 : : }
11132 : : }
11133 : : }
11134 : 34091681 : {
11135 : 34091681 : tree _p1_pops[1];
11136 : 34091681 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11137 : : {
11138 : 283087 : tree _q30 = _p1_pops[0];
11139 : 283087 : switch (TREE_CODE (_q30))
11140 : : {
11141 : 283087 : case SSA_NAME:
11142 : 283087 : if (gimple *_d1 = get_def (valueize, _q30))
11143 : : {
11144 : 278620 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11145 : 382298 : switch (gimple_assign_rhs_code (_a1))
11146 : : {
11147 : 216 : case BIT_IOR_EXPR:
11148 : 216 : {
11149 : 216 : tree _q40 = gimple_assign_rhs1 (_a1);
11150 : 216 : _q40 = do_valueize (valueize, _q40);
11151 : 216 : tree _q41 = gimple_assign_rhs2 (_a1);
11152 : 216 : _q41 = do_valueize (valueize, _q41);
11153 : 216 : if (tree_swap_operands_p (_q40, _q41))
11154 : 12 : std::swap (_q40, _q41);
11155 : 216 : switch (TREE_CODE (_q40))
11156 : : {
11157 : 216 : case SSA_NAME:
11158 : 216 : if (gimple *_d2 = get_def (valueize, _q40))
11159 : : {
11160 : 216 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11161 : 216 : switch (gimple_assign_rhs_code (_a2))
11162 : : {
11163 : 0 : case NEGATE_EXPR:
11164 : 0 : {
11165 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
11166 : 0 : _q50 = do_valueize (valueize, _q50);
11167 : 0 : switch (TREE_CODE (_q50))
11168 : : {
11169 : 0 : case SSA_NAME:
11170 : 0 : if (gimple *_d3 = get_def (valueize, _q50))
11171 : : {
11172 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11173 : 0 : switch (gimple_assign_rhs_code (_a3))
11174 : : {
11175 : 0 : CASE_CONVERT:
11176 : 0 : {
11177 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
11178 : 0 : _q60 = do_valueize (valueize, _q60);
11179 : 0 : switch (TREE_CODE (_q60))
11180 : : {
11181 : 0 : case SSA_NAME:
11182 : 0 : if (gimple *_d4 = get_def (valueize, _q60))
11183 : : {
11184 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11185 : 0 : switch (gimple_assign_rhs_code (_a4))
11186 : : {
11187 : 0 : case LT_EXPR:
11188 : 0 : {
11189 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
11190 : 0 : _q70 = do_valueize (valueize, _q70);
11191 : 0 : tree _q71 = gimple_assign_rhs2 (_a4);
11192 : 0 : _q71 = do_valueize (valueize, _q71);
11193 : 0 : if ((_q70 == _p0 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _p0, 0) && types_match (_q70, _p0)))
11194 : : {
11195 : 0 : if (integer_zerop (_q71))
11196 : : {
11197 : 0 : if (integer_onep (_q41))
11198 : : {
11199 : 0 : {
11200 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11201 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11202 : 0 : return true;
11203 : : }
11204 : : }
11205 : : }
11206 : : }
11207 : : break;
11208 : : }
11209 : : default:;
11210 : : }
11211 : : }
11212 : : break;
11213 : : default:;
11214 : : }
11215 : : break;
11216 : : }
11217 : : default:;
11218 : : }
11219 : : }
11220 : : break;
11221 : : default:;
11222 : : }
11223 : : break;
11224 : : }
11225 : : default:;
11226 : : }
11227 : : }
11228 : : break;
11229 : 216 : default:;
11230 : : }
11231 : 216 : {
11232 : 216 : tree _q40_pops[1];
11233 : 216 : if (gimple_nop_convert (_q40, _q40_pops, valueize))
11234 : : {
11235 : 0 : tree _q50 = _q40_pops[0];
11236 : 0 : switch (TREE_CODE (_q50))
11237 : : {
11238 : 0 : case SSA_NAME:
11239 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
11240 : : {
11241 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11242 : 0 : switch (gimple_assign_rhs_code (_a2))
11243 : : {
11244 : 0 : case NEGATE_EXPR:
11245 : 0 : {
11246 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
11247 : 0 : _q60 = do_valueize (valueize, _q60);
11248 : 0 : switch (TREE_CODE (_q60))
11249 : : {
11250 : 0 : case SSA_NAME:
11251 : 0 : if (gimple *_d3 = get_def (valueize, _q60))
11252 : : {
11253 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11254 : 0 : switch (gimple_assign_rhs_code (_a3))
11255 : : {
11256 : 0 : CASE_CONVERT:
11257 : 0 : {
11258 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
11259 : 0 : _q70 = do_valueize (valueize, _q70);
11260 : 0 : switch (TREE_CODE (_q70))
11261 : : {
11262 : 0 : case SSA_NAME:
11263 : 0 : if (gimple *_d4 = get_def (valueize, _q70))
11264 : : {
11265 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11266 : 0 : switch (gimple_assign_rhs_code (_a4))
11267 : : {
11268 : 0 : case LT_EXPR:
11269 : 0 : {
11270 : 0 : tree _q80 = gimple_assign_rhs1 (_a4);
11271 : 0 : _q80 = do_valueize (valueize, _q80);
11272 : 0 : tree _q81 = gimple_assign_rhs2 (_a4);
11273 : 0 : _q81 = do_valueize (valueize, _q81);
11274 : 0 : if ((_q80 == _p0 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _p0, 0) && types_match (_q80, _p0)))
11275 : : {
11276 : 0 : if (integer_zerop (_q81))
11277 : : {
11278 : 0 : if (integer_onep (_q41))
11279 : : {
11280 : 0 : {
11281 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11282 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11283 : 0 : return true;
11284 : : }
11285 : : }
11286 : : }
11287 : : }
11288 : : break;
11289 : : }
11290 : : default:;
11291 : : }
11292 : : }
11293 : : break;
11294 : : default:;
11295 : : }
11296 : : break;
11297 : : }
11298 : : default:;
11299 : : }
11300 : : }
11301 : : break;
11302 : : default:;
11303 : : }
11304 : : break;
11305 : : }
11306 : : default:;
11307 : : }
11308 : : }
11309 : : break;
11310 : : default:;
11311 : : }
11312 : : }
11313 : : }
11314 : 216 : break;
11315 : : }
11316 : : default:;
11317 : : }
11318 : : }
11319 : : break;
11320 : : default:;
11321 : : }
11322 : : }
11323 : : }
11324 : 34091681 : switch (TREE_CODE (_p0))
11325 : : {
11326 : 33616912 : case SSA_NAME:
11327 : 33616912 : if (gimple *_d1 = get_def (valueize, _p0))
11328 : : {
11329 : 13354535 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11330 : 12957449 : switch (gimple_assign_rhs_code (_a1))
11331 : : {
11332 : 6535 : case BIT_IOR_EXPR:
11333 : 6535 : {
11334 : 6535 : tree _q20 = gimple_assign_rhs1 (_a1);
11335 : 6535 : _q20 = do_valueize (valueize, _q20);
11336 : 6535 : tree _q21 = gimple_assign_rhs2 (_a1);
11337 : 6535 : _q21 = do_valueize (valueize, _q21);
11338 : 6535 : if (tree_swap_operands_p (_q20, _q21))
11339 : 492 : std::swap (_q20, _q21);
11340 : 6535 : switch (TREE_CODE (_q20))
11341 : : {
11342 : 6535 : case SSA_NAME:
11343 : 6535 : if (gimple *_d2 = get_def (valueize, _q20))
11344 : : {
11345 : 6402 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11346 : 6173 : switch (gimple_assign_rhs_code (_a2))
11347 : : {
11348 : 0 : case NEGATE_EXPR:
11349 : 0 : {
11350 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
11351 : 0 : _q30 = do_valueize (valueize, _q30);
11352 : 0 : switch (TREE_CODE (_q30))
11353 : : {
11354 : 0 : case SSA_NAME:
11355 : 0 : if (gimple *_d3 = get_def (valueize, _q30))
11356 : : {
11357 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11358 : 0 : switch (gimple_assign_rhs_code (_a3))
11359 : : {
11360 : 0 : CASE_CONVERT:
11361 : 0 : {
11362 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
11363 : 0 : _q40 = do_valueize (valueize, _q40);
11364 : 0 : switch (TREE_CODE (_q40))
11365 : : {
11366 : 0 : case SSA_NAME:
11367 : 0 : if (gimple *_d4 = get_def (valueize, _q40))
11368 : : {
11369 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11370 : 0 : switch (gimple_assign_rhs_code (_a4))
11371 : : {
11372 : 0 : case LT_EXPR:
11373 : 0 : {
11374 : 0 : tree _q50 = gimple_assign_rhs1 (_a4);
11375 : 0 : _q50 = do_valueize (valueize, _q50);
11376 : 0 : tree _q51 = gimple_assign_rhs2 (_a4);
11377 : 0 : _q51 = do_valueize (valueize, _q51);
11378 : 0 : if (integer_zerop (_q51))
11379 : : {
11380 : 0 : if (integer_onep (_q21))
11381 : : {
11382 : 0 : {
11383 : 0 : tree _p1_pops[1];
11384 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11385 : : {
11386 : 0 : tree _q90 = _p1_pops[0];
11387 : 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
11388 : : {
11389 : 0 : {
11390 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q50 };
11391 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11392 : 0 : return true;
11393 : : }
11394 : : }
11395 : : }
11396 : : }
11397 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
11398 : : {
11399 : 0 : {
11400 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q50 };
11401 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11402 : 0 : return true;
11403 : : }
11404 : : }
11405 : : }
11406 : : }
11407 : : break;
11408 : : }
11409 : : default:;
11410 : : }
11411 : : }
11412 : : break;
11413 : : default:;
11414 : : }
11415 : : break;
11416 : : }
11417 : 0 : case LT_EXPR:
11418 : 0 : {
11419 : 0 : tree _q40 = gimple_assign_rhs1 (_a3);
11420 : 0 : _q40 = do_valueize (valueize, _q40);
11421 : 0 : tree _q41 = gimple_assign_rhs2 (_a3);
11422 : 0 : _q41 = do_valueize (valueize, _q41);
11423 : 0 : if (integer_zerop (_q41))
11424 : : {
11425 : 0 : if (integer_onep (_q21))
11426 : : {
11427 : 0 : {
11428 : 0 : tree _p1_pops[1];
11429 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11430 : : {
11431 : 0 : tree _q80 = _p1_pops[0];
11432 : 0 : if ((_q80 == _q40 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q40, 0) && types_match (_q80, _q40)))
11433 : : {
11434 : 0 : {
11435 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
11436 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11437 : 0 : return true;
11438 : : }
11439 : : }
11440 : : }
11441 : : }
11442 : 0 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
11443 : : {
11444 : 0 : {
11445 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q40 };
11446 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11447 : 0 : return true;
11448 : : }
11449 : : }
11450 : : }
11451 : : }
11452 : : break;
11453 : : }
11454 : : default:;
11455 : : }
11456 : : }
11457 : : break;
11458 : : default:;
11459 : : }
11460 : : break;
11461 : : }
11462 : : default:;
11463 : : }
11464 : : }
11465 : : break;
11466 : 6535 : default:;
11467 : : }
11468 : 6535 : {
11469 : 6535 : tree _q20_pops[1];
11470 : 6535 : if (gimple_nop_convert (_q20, _q20_pops, valueize))
11471 : : {
11472 : 7 : tree _q30 = _q20_pops[0];
11473 : 7 : switch (TREE_CODE (_q30))
11474 : : {
11475 : 7 : case SSA_NAME:
11476 : 7 : if (gimple *_d2 = get_def (valueize, _q30))
11477 : : {
11478 : 7 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11479 : 0 : switch (gimple_assign_rhs_code (_a2))
11480 : : {
11481 : 0 : case NEGATE_EXPR:
11482 : 0 : {
11483 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
11484 : 0 : _q40 = do_valueize (valueize, _q40);
11485 : 0 : switch (TREE_CODE (_q40))
11486 : : {
11487 : 0 : case SSA_NAME:
11488 : 0 : if (gimple *_d3 = get_def (valueize, _q40))
11489 : : {
11490 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11491 : 0 : switch (gimple_assign_rhs_code (_a3))
11492 : : {
11493 : 0 : CASE_CONVERT:
11494 : 0 : {
11495 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
11496 : 0 : _q50 = do_valueize (valueize, _q50);
11497 : 0 : switch (TREE_CODE (_q50))
11498 : : {
11499 : 0 : case SSA_NAME:
11500 : 0 : if (gimple *_d4 = get_def (valueize, _q50))
11501 : : {
11502 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11503 : 0 : switch (gimple_assign_rhs_code (_a4))
11504 : : {
11505 : 0 : case LT_EXPR:
11506 : 0 : {
11507 : 0 : tree _q60 = gimple_assign_rhs1 (_a4);
11508 : 0 : _q60 = do_valueize (valueize, _q60);
11509 : 0 : tree _q61 = gimple_assign_rhs2 (_a4);
11510 : 0 : _q61 = do_valueize (valueize, _q61);
11511 : 0 : if (integer_zerop (_q61))
11512 : : {
11513 : 0 : if (integer_onep (_q21))
11514 : : {
11515 : 0 : {
11516 : 0 : tree _p1_pops[1];
11517 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11518 : : {
11519 : 0 : tree _q100 = _p1_pops[0];
11520 : 0 : if ((_q100 == _q60 && ! TREE_SIDE_EFFECTS (_q100)) || (operand_equal_p (_q100, _q60, 0) && types_match (_q100, _q60)))
11521 : : {
11522 : 0 : {
11523 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q60 };
11524 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11525 : 0 : return true;
11526 : : }
11527 : : }
11528 : : }
11529 : : }
11530 : 0 : if ((_p1 == _q60 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q60, 0) && types_match (_p1, _q60)))
11531 : : {
11532 : 0 : {
11533 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q60 };
11534 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11535 : 0 : return true;
11536 : : }
11537 : : }
11538 : : }
11539 : : }
11540 : : break;
11541 : : }
11542 : : default:;
11543 : : }
11544 : : }
11545 : : break;
11546 : : default:;
11547 : : }
11548 : : break;
11549 : : }
11550 : 0 : case LT_EXPR:
11551 : 0 : {
11552 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
11553 : 0 : _q50 = do_valueize (valueize, _q50);
11554 : 0 : tree _q51 = gimple_assign_rhs2 (_a3);
11555 : 0 : _q51 = do_valueize (valueize, _q51);
11556 : 0 : if (integer_zerop (_q51))
11557 : : {
11558 : 0 : if (integer_onep (_q21))
11559 : : {
11560 : 0 : {
11561 : 0 : tree _p1_pops[1];
11562 : 0 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11563 : : {
11564 : 0 : tree _q90 = _p1_pops[0];
11565 : 0 : if ((_q90 == _q50 && ! TREE_SIDE_EFFECTS (_q90)) || (operand_equal_p (_q90, _q50, 0) && types_match (_q90, _q50)))
11566 : : {
11567 : 0 : {
11568 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q50 };
11569 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11570 : 0 : return true;
11571 : : }
11572 : : }
11573 : : }
11574 : : }
11575 : 0 : if ((_p1 == _q50 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q50, 0) && types_match (_p1, _q50)))
11576 : : {
11577 : 0 : {
11578 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q50 };
11579 : 0 : if (gimple_simplify_190 (res_op, seq, valueize, type, captures))
11580 : 0 : return true;
11581 : : }
11582 : : }
11583 : : }
11584 : : }
11585 : : break;
11586 : : }
11587 : : default:;
11588 : : }
11589 : : }
11590 : : break;
11591 : : default:;
11592 : : }
11593 : : break;
11594 : : }
11595 : : default:;
11596 : : }
11597 : : }
11598 : : break;
11599 : : default:;
11600 : : }
11601 : : }
11602 : : }
11603 : 6535 : break;
11604 : : }
11605 : : default:;
11606 : : }
11607 : : }
11608 : : break;
11609 : 34091681 : default:;
11610 : : }
11611 : 34091681 : switch (TREE_CODE (_p1))
11612 : : {
11613 : 5613949 : case SSA_NAME:
11614 : 5613949 : if (gimple *_d1 = get_def (valueize, _p1))
11615 : : {
11616 : 4272827 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11617 : 4404294 : switch (gimple_assign_rhs_code (_a1))
11618 : : {
11619 : 2396 : case BIT_IOR_EXPR:
11620 : 2396 : {
11621 : 2396 : tree _q30 = gimple_assign_rhs1 (_a1);
11622 : 2396 : _q30 = do_valueize (valueize, _q30);
11623 : 2396 : tree _q31 = gimple_assign_rhs2 (_a1);
11624 : 2396 : _q31 = do_valueize (valueize, _q31);
11625 : 2396 : if (tree_swap_operands_p (_q30, _q31))
11626 : 165 : std::swap (_q30, _q31);
11627 : 2396 : switch (TREE_CODE (_q30))
11628 : : {
11629 : 2396 : case SSA_NAME:
11630 : 2396 : if (gimple *_d2 = get_def (valueize, _q30))
11631 : : {
11632 : 2188 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11633 : 543 : switch (gimple_assign_rhs_code (_a2))
11634 : : {
11635 : 2 : case NEGATE_EXPR:
11636 : 2 : {
11637 : 2 : tree _q40 = gimple_assign_rhs1 (_a2);
11638 : 2 : _q40 = do_valueize (valueize, _q40);
11639 : 2 : switch (TREE_CODE (_q40))
11640 : : {
11641 : 2 : case SSA_NAME:
11642 : 2 : if (gimple *_d3 = get_def (valueize, _q40))
11643 : : {
11644 : 2 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11645 : 2 : switch (gimple_assign_rhs_code (_a3))
11646 : : {
11647 : 2 : CASE_CONVERT:
11648 : 2 : {
11649 : 2 : tree _q50 = gimple_assign_rhs1 (_a3);
11650 : 2 : _q50 = do_valueize (valueize, _q50);
11651 : 2 : switch (TREE_CODE (_q50))
11652 : : {
11653 : 2 : case SSA_NAME:
11654 : 2 : if (gimple *_d4 = get_def (valueize, _q50))
11655 : : {
11656 : 2 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11657 : 2 : switch (gimple_assign_rhs_code (_a4))
11658 : : {
11659 : 2 : case LT_EXPR:
11660 : 2 : {
11661 : 2 : tree _q60 = gimple_assign_rhs1 (_a4);
11662 : 2 : _q60 = do_valueize (valueize, _q60);
11663 : 2 : tree _q61 = gimple_assign_rhs2 (_a4);
11664 : 2 : _q61 = do_valueize (valueize, _q61);
11665 : 2 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
11666 : : {
11667 : 2 : if (integer_zerop (_q61))
11668 : : {
11669 : 2 : if (integer_onep (_q31))
11670 : : {
11671 : 2 : {
11672 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11673 : 2 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11674 : 2 : return true;
11675 : : }
11676 : : }
11677 : : }
11678 : : }
11679 : : break;
11680 : : }
11681 : : default:;
11682 : : }
11683 : : }
11684 : : break;
11685 : : default:;
11686 : : }
11687 : : break;
11688 : : }
11689 : 0 : case LT_EXPR:
11690 : 0 : {
11691 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
11692 : 0 : _q50 = do_valueize (valueize, _q50);
11693 : 0 : tree _q51 = gimple_assign_rhs2 (_a3);
11694 : 0 : _q51 = do_valueize (valueize, _q51);
11695 : 0 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
11696 : : {
11697 : 0 : if (integer_zerop (_q51))
11698 : : {
11699 : 0 : if (integer_onep (_q31))
11700 : : {
11701 : 0 : {
11702 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11703 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11704 : 0 : return true;
11705 : : }
11706 : : }
11707 : : }
11708 : : }
11709 : : break;
11710 : : }
11711 : : default:;
11712 : : }
11713 : : }
11714 : : break;
11715 : : default:;
11716 : : }
11717 : : break;
11718 : : }
11719 : : default:;
11720 : : }
11721 : : }
11722 : : break;
11723 : 2394 : default:;
11724 : : }
11725 : 2394 : {
11726 : 2394 : tree _q30_pops[1];
11727 : 2394 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
11728 : : {
11729 : 0 : tree _q40 = _q30_pops[0];
11730 : 0 : switch (TREE_CODE (_q40))
11731 : : {
11732 : 0 : case SSA_NAME:
11733 : 0 : if (gimple *_d2 = get_def (valueize, _q40))
11734 : : {
11735 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11736 : 0 : switch (gimple_assign_rhs_code (_a2))
11737 : : {
11738 : 0 : case NEGATE_EXPR:
11739 : 0 : {
11740 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
11741 : 0 : _q50 = do_valueize (valueize, _q50);
11742 : 0 : switch (TREE_CODE (_q50))
11743 : : {
11744 : 0 : case SSA_NAME:
11745 : 0 : if (gimple *_d3 = get_def (valueize, _q50))
11746 : : {
11747 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11748 : 0 : switch (gimple_assign_rhs_code (_a3))
11749 : : {
11750 : 0 : CASE_CONVERT:
11751 : 0 : {
11752 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
11753 : 0 : _q60 = do_valueize (valueize, _q60);
11754 : 0 : switch (TREE_CODE (_q60))
11755 : : {
11756 : 0 : case SSA_NAME:
11757 : 0 : if (gimple *_d4 = get_def (valueize, _q60))
11758 : : {
11759 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
11760 : 0 : switch (gimple_assign_rhs_code (_a4))
11761 : : {
11762 : 0 : case LT_EXPR:
11763 : 0 : {
11764 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
11765 : 0 : _q70 = do_valueize (valueize, _q70);
11766 : 0 : tree _q71 = gimple_assign_rhs2 (_a4);
11767 : 0 : _q71 = do_valueize (valueize, _q71);
11768 : 0 : if ((_q70 == _p0 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _p0, 0) && types_match (_q70, _p0)))
11769 : : {
11770 : 0 : if (integer_zerop (_q71))
11771 : : {
11772 : 0 : if (integer_onep (_q31))
11773 : : {
11774 : 0 : {
11775 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11776 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11777 : 0 : return true;
11778 : : }
11779 : : }
11780 : : }
11781 : : }
11782 : : break;
11783 : : }
11784 : : default:;
11785 : : }
11786 : : }
11787 : : break;
11788 : : default:;
11789 : : }
11790 : : break;
11791 : : }
11792 : 0 : case LT_EXPR:
11793 : 0 : {
11794 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
11795 : 0 : _q60 = do_valueize (valueize, _q60);
11796 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
11797 : 0 : _q61 = do_valueize (valueize, _q61);
11798 : 0 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
11799 : : {
11800 : 0 : if (integer_zerop (_q61))
11801 : : {
11802 : 0 : if (integer_onep (_q31))
11803 : : {
11804 : 0 : {
11805 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11806 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11807 : 0 : return true;
11808 : : }
11809 : : }
11810 : : }
11811 : : }
11812 : : break;
11813 : : }
11814 : : default:;
11815 : : }
11816 : : }
11817 : : break;
11818 : : default:;
11819 : : }
11820 : : break;
11821 : : }
11822 : : default:;
11823 : : }
11824 : : }
11825 : : break;
11826 : : default:;
11827 : : }
11828 : : }
11829 : : }
11830 : 2394 : break;
11831 : : }
11832 : : default:;
11833 : : }
11834 : : }
11835 : : break;
11836 : 34091679 : default:;
11837 : : }
11838 : 34091679 : {
11839 : 34091679 : tree _p1_pops[1];
11840 : 34091679 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11841 : : {
11842 : 283087 : tree _q30 = _p1_pops[0];
11843 : 283087 : switch (TREE_CODE (_q30))
11844 : : {
11845 : 283087 : case SSA_NAME:
11846 : 283087 : if (gimple *_d1 = get_def (valueize, _q30))
11847 : : {
11848 : 278620 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11849 : 382298 : switch (gimple_assign_rhs_code (_a1))
11850 : : {
11851 : 216 : case BIT_IOR_EXPR:
11852 : 216 : {
11853 : 216 : tree _q40 = gimple_assign_rhs1 (_a1);
11854 : 216 : _q40 = do_valueize (valueize, _q40);
11855 : 216 : tree _q41 = gimple_assign_rhs2 (_a1);
11856 : 216 : _q41 = do_valueize (valueize, _q41);
11857 : 216 : if (tree_swap_operands_p (_q40, _q41))
11858 : 12 : std::swap (_q40, _q41);
11859 : 216 : switch (TREE_CODE (_q40))
11860 : : {
11861 : 216 : case SSA_NAME:
11862 : 216 : if (gimple *_d2 = get_def (valueize, _q40))
11863 : : {
11864 : 216 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11865 : 216 : switch (gimple_assign_rhs_code (_a2))
11866 : : {
11867 : 0 : case NEGATE_EXPR:
11868 : 0 : {
11869 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
11870 : 0 : _q50 = do_valueize (valueize, _q50);
11871 : 0 : switch (TREE_CODE (_q50))
11872 : : {
11873 : 0 : case SSA_NAME:
11874 : 0 : if (gimple *_d3 = get_def (valueize, _q50))
11875 : : {
11876 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11877 : 0 : switch (gimple_assign_rhs_code (_a3))
11878 : : {
11879 : 0 : case LT_EXPR:
11880 : 0 : {
11881 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
11882 : 0 : _q60 = do_valueize (valueize, _q60);
11883 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
11884 : 0 : _q61 = do_valueize (valueize, _q61);
11885 : 0 : if ((_q60 == _p0 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _p0, 0) && types_match (_q60, _p0)))
11886 : : {
11887 : 0 : if (integer_zerop (_q61))
11888 : : {
11889 : 0 : if (integer_onep (_q41))
11890 : : {
11891 : 0 : {
11892 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11893 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11894 : 0 : return true;
11895 : : }
11896 : : }
11897 : : }
11898 : : }
11899 : : break;
11900 : : }
11901 : : default:;
11902 : : }
11903 : : }
11904 : : break;
11905 : : default:;
11906 : : }
11907 : : break;
11908 : : }
11909 : : default:;
11910 : : }
11911 : : }
11912 : : break;
11913 : 216 : default:;
11914 : : }
11915 : 216 : {
11916 : 216 : tree _q40_pops[1];
11917 : 216 : if (gimple_nop_convert (_q40, _q40_pops, valueize))
11918 : : {
11919 : 0 : tree _q50 = _q40_pops[0];
11920 : 0 : switch (TREE_CODE (_q50))
11921 : : {
11922 : 0 : case SSA_NAME:
11923 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
11924 : : {
11925 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11926 : 0 : switch (gimple_assign_rhs_code (_a2))
11927 : : {
11928 : 0 : case NEGATE_EXPR:
11929 : 0 : {
11930 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
11931 : 0 : _q60 = do_valueize (valueize, _q60);
11932 : 0 : switch (TREE_CODE (_q60))
11933 : : {
11934 : 0 : case SSA_NAME:
11935 : 0 : if (gimple *_d3 = get_def (valueize, _q60))
11936 : : {
11937 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
11938 : 0 : switch (gimple_assign_rhs_code (_a3))
11939 : : {
11940 : 0 : case LT_EXPR:
11941 : 0 : {
11942 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
11943 : 0 : _q70 = do_valueize (valueize, _q70);
11944 : 0 : tree _q71 = gimple_assign_rhs2 (_a3);
11945 : 0 : _q71 = do_valueize (valueize, _q71);
11946 : 0 : if ((_q70 == _p0 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _p0, 0) && types_match (_q70, _p0)))
11947 : : {
11948 : 0 : if (integer_zerop (_q71))
11949 : : {
11950 : 0 : if (integer_onep (_q41))
11951 : : {
11952 : 0 : {
11953 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
11954 : 0 : if (gimple_simplify_191 (res_op, seq, valueize, type, captures))
11955 : 0 : return true;
11956 : : }
11957 : : }
11958 : : }
11959 : : }
11960 : : break;
11961 : : }
11962 : : default:;
11963 : : }
11964 : : }
11965 : : break;
11966 : : default:;
11967 : : }
11968 : : break;
11969 : : }
11970 : : default:;
11971 : : }
11972 : : }
11973 : : break;
11974 : : default:;
11975 : : }
11976 : : }
11977 : : }
11978 : 216 : break;
11979 : : }
11980 : : default:;
11981 : : }
11982 : : }
11983 : : break;
11984 : : default:;
11985 : : }
11986 : : }
11987 : : }
11988 : 34091679 : switch (TREE_CODE (_p0))
11989 : : {
11990 : 33616910 : case SSA_NAME:
11991 : 33616910 : if (gimple *_d1 = get_def (valueize, _p0))
11992 : : {
11993 : 13354533 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11994 : 12957449 : switch (gimple_assign_rhs_code (_a1))
11995 : : {
11996 : 4890919 : CASE_CONVERT:
11997 : 4890919 : {
11998 : 4890919 : tree _q20 = gimple_assign_rhs1 (_a1);
11999 : 4890919 : _q20 = do_valueize (valueize, _q20);
12000 : 4890919 : switch (TREE_CODE (_q20))
12001 : : {
12002 : 4890712 : case SSA_NAME:
12003 : 4890712 : if (gimple *_d2 = get_def (valueize, _q20))
12004 : : {
12005 : 4440471 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12006 : 3452928 : switch (gimple_assign_rhs_code (_a2))
12007 : : {
12008 : 5813 : case NEGATE_EXPR:
12009 : 5813 : {
12010 : 5813 : tree _q30 = gimple_assign_rhs1 (_a2);
12011 : 5813 : _q30 = do_valueize (valueize, _q30);
12012 : 5813 : switch (TREE_CODE (_p1))
12013 : : {
12014 : 3425 : case SSA_NAME:
12015 : 3425 : if (gimple *_d3 = get_def (valueize, _p1))
12016 : : {
12017 : 3214 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12018 : 4008 : switch (gimple_assign_rhs_code (_a3))
12019 : : {
12020 : 1323 : CASE_CONVERT:
12021 : 1323 : {
12022 : 1323 : tree _q50 = gimple_assign_rhs1 (_a3);
12023 : 1323 : _q50 = do_valueize (valueize, _q50);
12024 : 1323 : if (gimple_negate_expr_p (_q50, valueize))
12025 : : {
12026 : 6 : {
12027 : 6 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q50 };
12028 : 6 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12029 : 0 : return true;
12030 : : }
12031 : : }
12032 : : break;
12033 : : }
12034 : : default:;
12035 : : }
12036 : : }
12037 : : break;
12038 : 5813 : default:;
12039 : : }
12040 : 5813 : if (gimple_negate_expr_p (_p1, valueize))
12041 : : {
12042 : 1938 : {
12043 : 1938 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p1 };
12044 : 1938 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12045 : 658 : return true;
12046 : : }
12047 : : }
12048 : : break;
12049 : : }
12050 : 607 : case LT_EXPR:
12051 : 607 : {
12052 : 607 : tree _q30 = gimple_assign_rhs1 (_a2);
12053 : 607 : _q30 = do_valueize (valueize, _q30);
12054 : 607 : tree _q31 = gimple_assign_rhs2 (_a2);
12055 : 607 : _q31 = do_valueize (valueize, _q31);
12056 : 607 : {
12057 : 607 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12058 : 607 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, LT_EXPR))
12059 : 224 : return true;
12060 : : }
12061 : 383 : break;
12062 : : }
12063 : 197 : case LE_EXPR:
12064 : 197 : {
12065 : 197 : tree _q30 = gimple_assign_rhs1 (_a2);
12066 : 197 : _q30 = do_valueize (valueize, _q30);
12067 : 197 : tree _q31 = gimple_assign_rhs2 (_a2);
12068 : 197 : _q31 = do_valueize (valueize, _q31);
12069 : 197 : {
12070 : 197 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12071 : 197 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, LE_EXPR))
12072 : 62 : return true;
12073 : : }
12074 : 135 : break;
12075 : : }
12076 : 368 : case EQ_EXPR:
12077 : 368 : {
12078 : 368 : tree _q30 = gimple_assign_rhs1 (_a2);
12079 : 368 : _q30 = do_valueize (valueize, _q30);
12080 : 368 : tree _q31 = gimple_assign_rhs2 (_a2);
12081 : 368 : _q31 = do_valueize (valueize, _q31);
12082 : 368 : if (tree_swap_operands_p (_q30, _q31))
12083 : 0 : std::swap (_q30, _q31);
12084 : 368 : {
12085 : 368 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12086 : 368 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, EQ_EXPR))
12087 : 209 : return true;
12088 : : }
12089 : 159 : break;
12090 : : }
12091 : 15873 : case NE_EXPR:
12092 : 15873 : {
12093 : 15873 : tree _q30 = gimple_assign_rhs1 (_a2);
12094 : 15873 : _q30 = do_valueize (valueize, _q30);
12095 : 15873 : tree _q31 = gimple_assign_rhs2 (_a2);
12096 : 15873 : _q31 = do_valueize (valueize, _q31);
12097 : 15873 : if (tree_swap_operands_p (_q30, _q31))
12098 : 0 : std::swap (_q30, _q31);
12099 : 15873 : {
12100 : 15873 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12101 : 15873 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, NE_EXPR))
12102 : 6853 : return true;
12103 : : }
12104 : 9020 : break;
12105 : : }
12106 : 261 : case GE_EXPR:
12107 : 261 : {
12108 : 261 : tree _q30 = gimple_assign_rhs1 (_a2);
12109 : 261 : _q30 = do_valueize (valueize, _q30);
12110 : 261 : tree _q31 = gimple_assign_rhs2 (_a2);
12111 : 261 : _q31 = do_valueize (valueize, _q31);
12112 : 261 : {
12113 : 261 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12114 : 261 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, GE_EXPR))
12115 : 88 : return true;
12116 : : }
12117 : 173 : break;
12118 : : }
12119 : 401 : case GT_EXPR:
12120 : 401 : {
12121 : 401 : tree _q30 = gimple_assign_rhs1 (_a2);
12122 : 401 : _q30 = do_valueize (valueize, _q30);
12123 : 401 : tree _q31 = gimple_assign_rhs2 (_a2);
12124 : 401 : _q31 = do_valueize (valueize, _q31);
12125 : 401 : {
12126 : 401 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12127 : 401 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, GT_EXPR))
12128 : 206 : return true;
12129 : : }
12130 : 195 : break;
12131 : : }
12132 : 0 : case UNORDERED_EXPR:
12133 : 0 : {
12134 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12135 : 0 : _q30 = do_valueize (valueize, _q30);
12136 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12137 : 0 : _q31 = do_valueize (valueize, _q31);
12138 : 0 : if (tree_swap_operands_p (_q30, _q31))
12139 : 0 : std::swap (_q30, _q31);
12140 : 0 : {
12141 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12142 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, UNORDERED_EXPR))
12143 : 0 : return true;
12144 : : }
12145 : 0 : break;
12146 : : }
12147 : 0 : case ORDERED_EXPR:
12148 : 0 : {
12149 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12150 : 0 : _q30 = do_valueize (valueize, _q30);
12151 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12152 : 0 : _q31 = do_valueize (valueize, _q31);
12153 : 0 : if (tree_swap_operands_p (_q30, _q31))
12154 : 0 : std::swap (_q30, _q31);
12155 : 0 : {
12156 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12157 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, ORDERED_EXPR))
12158 : 0 : return true;
12159 : : }
12160 : 0 : break;
12161 : : }
12162 : 0 : case UNLT_EXPR:
12163 : 0 : {
12164 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12165 : 0 : _q30 = do_valueize (valueize, _q30);
12166 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12167 : 0 : _q31 = do_valueize (valueize, _q31);
12168 : 0 : {
12169 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12170 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, UNLT_EXPR))
12171 : 0 : return true;
12172 : : }
12173 : 0 : break;
12174 : : }
12175 : 0 : case UNLE_EXPR:
12176 : 0 : {
12177 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12178 : 0 : _q30 = do_valueize (valueize, _q30);
12179 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12180 : 0 : _q31 = do_valueize (valueize, _q31);
12181 : 0 : {
12182 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12183 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, UNLE_EXPR))
12184 : 0 : return true;
12185 : : }
12186 : 0 : break;
12187 : : }
12188 : 0 : case UNGT_EXPR:
12189 : 0 : {
12190 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12191 : 0 : _q30 = do_valueize (valueize, _q30);
12192 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12193 : 0 : _q31 = do_valueize (valueize, _q31);
12194 : 0 : {
12195 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12196 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, UNGT_EXPR))
12197 : 0 : return true;
12198 : : }
12199 : 0 : break;
12200 : : }
12201 : 0 : case UNGE_EXPR:
12202 : 0 : {
12203 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12204 : 0 : _q30 = do_valueize (valueize, _q30);
12205 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12206 : 0 : _q31 = do_valueize (valueize, _q31);
12207 : 0 : {
12208 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12209 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, UNGE_EXPR))
12210 : 0 : return true;
12211 : : }
12212 : 0 : break;
12213 : : }
12214 : 0 : case UNEQ_EXPR:
12215 : 0 : {
12216 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12217 : 0 : _q30 = do_valueize (valueize, _q30);
12218 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12219 : 0 : _q31 = do_valueize (valueize, _q31);
12220 : 0 : if (tree_swap_operands_p (_q30, _q31))
12221 : 0 : std::swap (_q30, _q31);
12222 : 0 : {
12223 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12224 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, UNEQ_EXPR))
12225 : 0 : return true;
12226 : : }
12227 : 0 : break;
12228 : : }
12229 : 0 : case LTGT_EXPR:
12230 : 0 : {
12231 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
12232 : 0 : _q30 = do_valueize (valueize, _q30);
12233 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
12234 : 0 : _q31 = do_valueize (valueize, _q31);
12235 : 0 : if (tree_swap_operands_p (_q30, _q31))
12236 : 0 : std::swap (_q30, _q31);
12237 : 0 : {
12238 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1 };
12239 : 0 : if (gimple_simplify_193 (res_op, seq, valueize, type, captures, LTGT_EXPR))
12240 : 0 : return true;
12241 : : }
12242 : 0 : break;
12243 : : }
12244 : : default:;
12245 : : }
12246 : : }
12247 : : break;
12248 : 4882619 : default:;
12249 : : }
12250 : 4882619 : if (gimple_negate_expr_p (_q20, valueize))
12251 : : {
12252 : 16232 : switch (TREE_CODE (_p1))
12253 : : {
12254 : 5207 : case SSA_NAME:
12255 : 5207 : if (gimple *_d2 = get_def (valueize, _p1))
12256 : : {
12257 : 4941 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12258 : 5939 : switch (gimple_assign_rhs_code (_a2))
12259 : : {
12260 : 2558 : CASE_CONVERT:
12261 : 2558 : {
12262 : 2558 : tree _q40 = gimple_assign_rhs1 (_a2);
12263 : 2558 : _q40 = do_valueize (valueize, _q40);
12264 : 2558 : switch (TREE_CODE (_q40))
12265 : : {
12266 : 2558 : case SSA_NAME:
12267 : 2558 : if (gimple *_d3 = get_def (valueize, _q40))
12268 : : {
12269 : 2528 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12270 : 3577 : switch (gimple_assign_rhs_code (_a3))
12271 : : {
12272 : 8 : case NEGATE_EXPR:
12273 : 8 : {
12274 : 8 : tree _q50 = gimple_assign_rhs1 (_a3);
12275 : 8 : _q50 = do_valueize (valueize, _q50);
12276 : 8 : {
12277 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q50, _q20 };
12278 : 8 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12279 : 2 : return true;
12280 : : }
12281 : 6 : break;
12282 : : }
12283 : : default:;
12284 : : }
12285 : : }
12286 : : break;
12287 : : default:;
12288 : : }
12289 : : break;
12290 : : }
12291 : 0 : case NEGATE_EXPR:
12292 : 0 : {
12293 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12294 : 0 : _q40 = do_valueize (valueize, _q40);
12295 : 0 : {
12296 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
12297 : 0 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12298 : 0 : return true;
12299 : : }
12300 : 0 : break;
12301 : : }
12302 : : default:;
12303 : : }
12304 : : }
12305 : : break;
12306 : : default:;
12307 : : }
12308 : : }
12309 : : break;
12310 : : }
12311 : 38287 : case NEGATE_EXPR:
12312 : 38287 : {
12313 : 38287 : tree _q20 = gimple_assign_rhs1 (_a1);
12314 : 38287 : _q20 = do_valueize (valueize, _q20);
12315 : 38287 : switch (TREE_CODE (_p1))
12316 : : {
12317 : 34827 : case SSA_NAME:
12318 : 34827 : if (gimple *_d2 = get_def (valueize, _p1))
12319 : : {
12320 : 32756 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12321 : 31270 : switch (gimple_assign_rhs_code (_a2))
12322 : : {
12323 : 1889 : CASE_CONVERT:
12324 : 1889 : {
12325 : 1889 : tree _q40 = gimple_assign_rhs1 (_a2);
12326 : 1889 : _q40 = do_valueize (valueize, _q40);
12327 : 1889 : if (gimple_negate_expr_p (_q40, valueize))
12328 : : {
12329 : 0 : {
12330 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
12331 : 0 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12332 : 0 : return true;
12333 : : }
12334 : : }
12335 : : break;
12336 : : }
12337 : : default:;
12338 : : }
12339 : : }
12340 : : break;
12341 : 38287 : default:;
12342 : : }
12343 : 38287 : if (gimple_negate_expr_p (_p1, valueize))
12344 : : {
12345 : 611 : {
12346 : 611 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
12347 : 611 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12348 : 611 : return true;
12349 : : }
12350 : : }
12351 : : break;
12352 : : }
12353 : : default:;
12354 : : }
12355 : : }
12356 : : break;
12357 : 34082766 : default:;
12358 : : }
12359 : 34082766 : if (gimple_negate_expr_p (_p0, valueize))
12360 : : {
12361 : 148357 : switch (TREE_CODE (_p1))
12362 : : {
12363 : 50225 : case SSA_NAME:
12364 : 50225 : if (gimple *_d1 = get_def (valueize, _p1))
12365 : : {
12366 : 47382 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12367 : 52520 : switch (gimple_assign_rhs_code (_a1))
12368 : : {
12369 : 2705 : CASE_CONVERT:
12370 : 2705 : {
12371 : 2705 : tree _q30 = gimple_assign_rhs1 (_a1);
12372 : 2705 : _q30 = do_valueize (valueize, _q30);
12373 : 2705 : switch (TREE_CODE (_q30))
12374 : : {
12375 : 2705 : case SSA_NAME:
12376 : 2705 : if (gimple *_d2 = get_def (valueize, _q30))
12377 : : {
12378 : 2696 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12379 : 3409 : switch (gimple_assign_rhs_code (_a2))
12380 : : {
12381 : 0 : case NEGATE_EXPR:
12382 : 0 : {
12383 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12384 : 0 : _q40 = do_valueize (valueize, _q40);
12385 : 0 : {
12386 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _p0 };
12387 : 0 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12388 : 0 : return true;
12389 : : }
12390 : 0 : break;
12391 : : }
12392 : : default:;
12393 : : }
12394 : : }
12395 : : break;
12396 : : default:;
12397 : : }
12398 : : break;
12399 : : }
12400 : 9 : case NEGATE_EXPR:
12401 : 9 : {
12402 : 9 : tree _q30 = gimple_assign_rhs1 (_a1);
12403 : 9 : _q30 = do_valueize (valueize, _q30);
12404 : 9 : {
12405 : 9 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p0 };
12406 : 9 : if (gimple_simplify_192 (res_op, seq, valueize, type, captures))
12407 : 5 : return true;
12408 : : }
12409 : 4 : break;
12410 : : }
12411 : : default:;
12412 : : }
12413 : : }
12414 : : break;
12415 : : default:;
12416 : : }
12417 : : }
12418 : 34082761 : if (gimple_zero_one_valued_p (_p0, valueize))
12419 : : {
12420 : 67015 : if (gimple_zero_one_valued_p (_p1, valueize))
12421 : : {
12422 : 243 : {
12423 : 243 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
12424 : 243 : if (INTEGRAL_TYPE_P (type)
12425 : : )
12426 : : {
12427 : 243 : gimple_seq *lseq = seq;
12428 : 243 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1702;
12429 : 243 : {
12430 : 243 : res_op->set_op (BIT_AND_EXPR, type, 2);
12431 : 243 : res_op->ops[0] = captures[0];
12432 : 243 : res_op->ops[1] = captures[1];
12433 : 243 : res_op->resimplify (lseq, valueize);
12434 : 243 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1002, __FILE__, __LINE__, true);
12435 : 243 : return true;
12436 : : }
12437 : 0 : next_after_fail1702:;
12438 : : }
12439 : : }
12440 : : }
12441 : : }
12442 : 34082518 : switch (TREE_CODE (_p1))
12443 : : {
12444 : 5613271 : case SSA_NAME:
12445 : 5613271 : if (gimple *_d1 = get_def (valueize, _p1))
12446 : : {
12447 : 4272170 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12448 : 4403888 : switch (gimple_assign_rhs_code (_a1))
12449 : : {
12450 : 572788 : CASE_CONVERT:
12451 : 572788 : {
12452 : 572788 : tree _q30 = gimple_assign_rhs1 (_a1);
12453 : 572788 : _q30 = do_valueize (valueize, _q30);
12454 : 572788 : switch (TREE_CODE (_q30))
12455 : : {
12456 : 572788 : case SSA_NAME:
12457 : 572788 : if (gimple *_d2 = get_def (valueize, _q30))
12458 : : {
12459 : 562080 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12460 : 608827 : switch (gimple_assign_rhs_code (_a2))
12461 : : {
12462 : 23 : case LT_EXPR:
12463 : 23 : {
12464 : 23 : tree _q40 = gimple_assign_rhs1 (_a2);
12465 : 23 : _q40 = do_valueize (valueize, _q40);
12466 : 23 : tree _q41 = gimple_assign_rhs2 (_a2);
12467 : 23 : _q41 = do_valueize (valueize, _q41);
12468 : 23 : {
12469 : 23 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12470 : 23 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, LT_EXPR))
12471 : 20 : return true;
12472 : : }
12473 : 3 : break;
12474 : : }
12475 : 119 : case LE_EXPR:
12476 : 119 : {
12477 : 119 : tree _q40 = gimple_assign_rhs1 (_a2);
12478 : 119 : _q40 = do_valueize (valueize, _q40);
12479 : 119 : tree _q41 = gimple_assign_rhs2 (_a2);
12480 : 119 : _q41 = do_valueize (valueize, _q41);
12481 : 119 : {
12482 : 119 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12483 : 119 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, LE_EXPR))
12484 : 26 : return true;
12485 : : }
12486 : 93 : break;
12487 : : }
12488 : 110 : case EQ_EXPR:
12489 : 110 : {
12490 : 110 : tree _q40 = gimple_assign_rhs1 (_a2);
12491 : 110 : _q40 = do_valueize (valueize, _q40);
12492 : 110 : tree _q41 = gimple_assign_rhs2 (_a2);
12493 : 110 : _q41 = do_valueize (valueize, _q41);
12494 : 110 : if (tree_swap_operands_p (_q40, _q41))
12495 : 0 : std::swap (_q40, _q41);
12496 : 110 : {
12497 : 110 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12498 : 110 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, EQ_EXPR))
12499 : 36 : return true;
12500 : : }
12501 : 74 : break;
12502 : : }
12503 : 490 : case NE_EXPR:
12504 : 490 : {
12505 : 490 : tree _q40 = gimple_assign_rhs1 (_a2);
12506 : 490 : _q40 = do_valueize (valueize, _q40);
12507 : 490 : tree _q41 = gimple_assign_rhs2 (_a2);
12508 : 490 : _q41 = do_valueize (valueize, _q41);
12509 : 490 : if (tree_swap_operands_p (_q40, _q41))
12510 : 3 : std::swap (_q40, _q41);
12511 : 490 : {
12512 : 490 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12513 : 490 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, NE_EXPR))
12514 : 124 : return true;
12515 : : }
12516 : 366 : break;
12517 : : }
12518 : 19 : case GE_EXPR:
12519 : 19 : {
12520 : 19 : tree _q40 = gimple_assign_rhs1 (_a2);
12521 : 19 : _q40 = do_valueize (valueize, _q40);
12522 : 19 : tree _q41 = gimple_assign_rhs2 (_a2);
12523 : 19 : _q41 = do_valueize (valueize, _q41);
12524 : 19 : {
12525 : 19 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12526 : 19 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, GE_EXPR))
12527 : 0 : return true;
12528 : : }
12529 : 19 : break;
12530 : : }
12531 : 36 : case GT_EXPR:
12532 : 36 : {
12533 : 36 : tree _q40 = gimple_assign_rhs1 (_a2);
12534 : 36 : _q40 = do_valueize (valueize, _q40);
12535 : 36 : tree _q41 = gimple_assign_rhs2 (_a2);
12536 : 36 : _q41 = do_valueize (valueize, _q41);
12537 : 36 : {
12538 : 36 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12539 : 36 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, GT_EXPR))
12540 : 18 : return true;
12541 : : }
12542 : 18 : break;
12543 : : }
12544 : 0 : case UNORDERED_EXPR:
12545 : 0 : {
12546 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12547 : 0 : _q40 = do_valueize (valueize, _q40);
12548 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12549 : 0 : _q41 = do_valueize (valueize, _q41);
12550 : 0 : if (tree_swap_operands_p (_q40, _q41))
12551 : 0 : std::swap (_q40, _q41);
12552 : 0 : {
12553 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12554 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, UNORDERED_EXPR))
12555 : 0 : return true;
12556 : : }
12557 : 0 : break;
12558 : : }
12559 : 0 : case ORDERED_EXPR:
12560 : 0 : {
12561 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12562 : 0 : _q40 = do_valueize (valueize, _q40);
12563 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12564 : 0 : _q41 = do_valueize (valueize, _q41);
12565 : 0 : if (tree_swap_operands_p (_q40, _q41))
12566 : 0 : std::swap (_q40, _q41);
12567 : 0 : {
12568 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12569 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, ORDERED_EXPR))
12570 : 0 : return true;
12571 : : }
12572 : 0 : break;
12573 : : }
12574 : 0 : case UNLT_EXPR:
12575 : 0 : {
12576 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12577 : 0 : _q40 = do_valueize (valueize, _q40);
12578 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12579 : 0 : _q41 = do_valueize (valueize, _q41);
12580 : 0 : {
12581 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12582 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, UNLT_EXPR))
12583 : 0 : return true;
12584 : : }
12585 : 0 : break;
12586 : : }
12587 : 0 : case UNLE_EXPR:
12588 : 0 : {
12589 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12590 : 0 : _q40 = do_valueize (valueize, _q40);
12591 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12592 : 0 : _q41 = do_valueize (valueize, _q41);
12593 : 0 : {
12594 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12595 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, UNLE_EXPR))
12596 : 0 : return true;
12597 : : }
12598 : 0 : break;
12599 : : }
12600 : 0 : case UNGT_EXPR:
12601 : 0 : {
12602 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12603 : 0 : _q40 = do_valueize (valueize, _q40);
12604 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12605 : 0 : _q41 = do_valueize (valueize, _q41);
12606 : 0 : {
12607 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12608 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, UNGT_EXPR))
12609 : 0 : return true;
12610 : : }
12611 : 0 : break;
12612 : : }
12613 : 0 : case UNGE_EXPR:
12614 : 0 : {
12615 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12616 : 0 : _q40 = do_valueize (valueize, _q40);
12617 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12618 : 0 : _q41 = do_valueize (valueize, _q41);
12619 : 0 : {
12620 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12621 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, UNGE_EXPR))
12622 : 0 : return true;
12623 : : }
12624 : 0 : break;
12625 : : }
12626 : 0 : case UNEQ_EXPR:
12627 : 0 : {
12628 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12629 : 0 : _q40 = do_valueize (valueize, _q40);
12630 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12631 : 0 : _q41 = do_valueize (valueize, _q41);
12632 : 0 : if (tree_swap_operands_p (_q40, _q41))
12633 : 0 : std::swap (_q40, _q41);
12634 : 0 : {
12635 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12636 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, UNEQ_EXPR))
12637 : 0 : return true;
12638 : : }
12639 : 0 : break;
12640 : : }
12641 : 0 : case LTGT_EXPR:
12642 : 0 : {
12643 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
12644 : 0 : _q40 = do_valueize (valueize, _q40);
12645 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
12646 : 0 : _q41 = do_valueize (valueize, _q41);
12647 : 0 : if (tree_swap_operands_p (_q40, _q41))
12648 : 0 : std::swap (_q40, _q41);
12649 : 0 : {
12650 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q40, _q41, _p0 };
12651 : 0 : if (gimple_simplify_194 (res_op, seq, valueize, type, captures, LTGT_EXPR))
12652 : 0 : return true;
12653 : : }
12654 : 0 : break;
12655 : : }
12656 : : default:;
12657 : : }
12658 : : }
12659 : : break;
12660 : : default:;
12661 : : }
12662 : : break;
12663 : : }
12664 : : default:;
12665 : : }
12666 : : }
12667 : : break;
12668 : 34082294 : default:;
12669 : : }
12670 : 34082294 : switch (TREE_CODE (_p0))
12671 : : {
12672 : 33607525 : case SSA_NAME:
12673 : 33607525 : if (gimple *_d1 = get_def (valueize, _p0))
12674 : : {
12675 : 13345164 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12676 : 12948271 : switch (gimple_assign_rhs_code (_a1))
12677 : : {
12678 : 4882491 : CASE_CONVERT:
12679 : 4882491 : {
12680 : 4882491 : tree _q20 = gimple_assign_rhs1 (_a1);
12681 : 4882491 : _q20 = do_valueize (valueize, _q20);
12682 : 4882491 : switch (TREE_CODE (_q20))
12683 : : {
12684 : 4882284 : case SSA_NAME:
12685 : 4882284 : if (gimple *_d2 = get_def (valueize, _q20))
12686 : : {
12687 : 4432048 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12688 : 3444534 : switch (gimple_assign_rhs_code (_a2))
12689 : : {
12690 : 73860 : case EXACT_DIV_EXPR:
12691 : 73860 : {
12692 : 73860 : tree _q30 = gimple_assign_rhs1 (_a2);
12693 : 73860 : _q30 = do_valueize (valueize, _q30);
12694 : 73860 : tree _q31 = gimple_assign_rhs2 (_a2);
12695 : 73860 : _q31 = do_valueize (valueize, _q31);
12696 : 73860 : switch (TREE_CODE (_p1))
12697 : : {
12698 : 152 : case SSA_NAME:
12699 : 152 : if (gimple *_d3 = get_def (valueize, _p1))
12700 : : {
12701 : 146 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12702 : 146 : switch (gimple_assign_rhs_code (_a3))
12703 : : {
12704 : 122 : CASE_CONVERT:
12705 : 122 : {
12706 : 122 : tree _q60 = gimple_assign_rhs1 (_a3);
12707 : 122 : _q60 = do_valueize (valueize, _q60);
12708 : 122 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
12709 : : {
12710 : 0 : {
12711 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q31 };
12712 : 0 : if (gimple_simplify_195 (res_op, seq, valueize, type, captures))
12713 : 0 : return true;
12714 : : }
12715 : : }
12716 : : break;
12717 : : }
12718 : : default:;
12719 : : }
12720 : : }
12721 : : break;
12722 : 73860 : default:;
12723 : : }
12724 : 73860 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
12725 : : {
12726 : 67766 : {
12727 : 67766 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q31 };
12728 : 67766 : if (gimple_simplify_195 (res_op, seq, valueize, type, captures))
12729 : 67766 : return true;
12730 : : }
12731 : : }
12732 : : break;
12733 : : }
12734 : 839600 : case PLUS_EXPR:
12735 : 839600 : {
12736 : 839600 : tree _q30 = gimple_assign_rhs1 (_a2);
12737 : 839600 : _q30 = do_valueize (valueize, _q30);
12738 : 839600 : tree _q31 = gimple_assign_rhs2 (_a2);
12739 : 839600 : _q31 = do_valueize (valueize, _q31);
12740 : 839600 : if (tree_swap_operands_p (_q30, _q31))
12741 : 108226 : std::swap (_q30, _q31);
12742 : 839600 : switch (TREE_CODE (_q30))
12743 : : {
12744 : 839600 : case SSA_NAME:
12745 : 839600 : if (gimple *_d3 = get_def (valueize, _q30))
12746 : : {
12747 : 769093 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12748 : 671800 : switch (gimple_assign_rhs_code (_a3))
12749 : : {
12750 : 59594 : CASE_CONVERT:
12751 : 59594 : {
12752 : 59594 : tree _q40 = gimple_assign_rhs1 (_a3);
12753 : 59594 : _q40 = do_valueize (valueize, _q40);
12754 : 59594 : switch (TREE_CODE (_q40))
12755 : : {
12756 : 59573 : case SSA_NAME:
12757 : 59573 : if (gimple *_d4 = get_def (valueize, _q40))
12758 : : {
12759 : 56463 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
12760 : 51608 : switch (gimple_assign_rhs_code (_a4))
12761 : : {
12762 : 53 : case EXACT_DIV_EXPR:
12763 : 53 : {
12764 : 53 : tree _q50 = gimple_assign_rhs1 (_a4);
12765 : 53 : _q50 = do_valueize (valueize, _q50);
12766 : 53 : tree _q51 = gimple_assign_rhs2 (_a4);
12767 : 53 : _q51 = do_valueize (valueize, _q51);
12768 : 53 : switch (TREE_CODE (_q51))
12769 : : {
12770 : 53 : case INTEGER_CST:
12771 : 53 : {
12772 : 53 : switch (TREE_CODE (_q31))
12773 : : {
12774 : 27 : case INTEGER_CST:
12775 : 27 : {
12776 : 27 : if ((_p1 == _q51 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q51, 0))
12777 : : {
12778 : 19 : {
12779 : 19 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _q31, _q51 };
12780 : 19 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, PLUS_EXPR))
12781 : 0 : return true;
12782 : : }
12783 : : }
12784 : : break;
12785 : : }
12786 : : default:;
12787 : : }
12788 : : break;
12789 : : }
12790 : : default:;
12791 : : }
12792 : : break;
12793 : : }
12794 : : default:;
12795 : : }
12796 : : }
12797 : : break;
12798 : : default:;
12799 : : }
12800 : : break;
12801 : : }
12802 : 1711 : case EXACT_DIV_EXPR:
12803 : 1711 : {
12804 : 1711 : tree _q40 = gimple_assign_rhs1 (_a3);
12805 : 1711 : _q40 = do_valueize (valueize, _q40);
12806 : 1711 : tree _q41 = gimple_assign_rhs2 (_a3);
12807 : 1711 : _q41 = do_valueize (valueize, _q41);
12808 : 1711 : switch (TREE_CODE (_q41))
12809 : : {
12810 : 1711 : case INTEGER_CST:
12811 : 1711 : {
12812 : 1711 : switch (TREE_CODE (_q31))
12813 : : {
12814 : 1668 : case INTEGER_CST:
12815 : 1668 : {
12816 : 1668 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q41, 0))
12817 : : {
12818 : 1502 : {
12819 : 1502 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _q31, _q41 };
12820 : 1502 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, PLUS_EXPR))
12821 : 696 : return true;
12822 : : }
12823 : : }
12824 : : break;
12825 : : }
12826 : : default:;
12827 : : }
12828 : : break;
12829 : : }
12830 : : default:;
12831 : : }
12832 : : break;
12833 : : }
12834 : : default:;
12835 : : }
12836 : : }
12837 : : break;
12838 : : default:;
12839 : : }
12840 : 34011215 : break;
12841 : : }
12842 : 102288 : case MINUS_EXPR:
12843 : 102288 : {
12844 : 102288 : tree _q30 = gimple_assign_rhs1 (_a2);
12845 : 102288 : _q30 = do_valueize (valueize, _q30);
12846 : 102288 : tree _q31 = gimple_assign_rhs2 (_a2);
12847 : 102288 : _q31 = do_valueize (valueize, _q31);
12848 : 102288 : switch (TREE_CODE (_q30))
12849 : : {
12850 : 68947 : case SSA_NAME:
12851 : 68947 : if (gimple *_d3 = get_def (valueize, _q30))
12852 : : {
12853 : 59874 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
12854 : 39763 : switch (gimple_assign_rhs_code (_a3))
12855 : : {
12856 : 5552 : CASE_CONVERT:
12857 : 5552 : {
12858 : 5552 : tree _q40 = gimple_assign_rhs1 (_a3);
12859 : 5552 : _q40 = do_valueize (valueize, _q40);
12860 : 5552 : switch (TREE_CODE (_q40))
12861 : : {
12862 : 5522 : case SSA_NAME:
12863 : 5522 : if (gimple *_d4 = get_def (valueize, _q40))
12864 : : {
12865 : 5414 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
12866 : 4703 : switch (gimple_assign_rhs_code (_a4))
12867 : : {
12868 : 24 : case EXACT_DIV_EXPR:
12869 : 24 : {
12870 : 24 : tree _q50 = gimple_assign_rhs1 (_a4);
12871 : 24 : _q50 = do_valueize (valueize, _q50);
12872 : 24 : tree _q51 = gimple_assign_rhs2 (_a4);
12873 : 24 : _q51 = do_valueize (valueize, _q51);
12874 : 24 : switch (TREE_CODE (_q51))
12875 : : {
12876 : 24 : case INTEGER_CST:
12877 : 24 : {
12878 : 24 : switch (TREE_CODE (_q31))
12879 : : {
12880 : 0 : case INTEGER_CST:
12881 : 0 : {
12882 : 0 : if ((_p1 == _q51 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q51, 0))
12883 : : {
12884 : 0 : {
12885 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q50, _q51, _q31, _q51 };
12886 : 0 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, MINUS_EXPR))
12887 : 0 : return true;
12888 : : }
12889 : : }
12890 : : break;
12891 : : }
12892 : : default:;
12893 : : }
12894 : : break;
12895 : : }
12896 : : default:;
12897 : : }
12898 : : break;
12899 : : }
12900 : : default:;
12901 : : }
12902 : : }
12903 : : break;
12904 : : default:;
12905 : : }
12906 : : break;
12907 : : }
12908 : 413 : case EXACT_DIV_EXPR:
12909 : 413 : {
12910 : 413 : tree _q40 = gimple_assign_rhs1 (_a3);
12911 : 413 : _q40 = do_valueize (valueize, _q40);
12912 : 413 : tree _q41 = gimple_assign_rhs2 (_a3);
12913 : 413 : _q41 = do_valueize (valueize, _q41);
12914 : 413 : switch (TREE_CODE (_q41))
12915 : : {
12916 : 413 : case INTEGER_CST:
12917 : 413 : {
12918 : 413 : switch (TREE_CODE (_q31))
12919 : : {
12920 : 16 : case INTEGER_CST:
12921 : 16 : {
12922 : 16 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q41, 0))
12923 : : {
12924 : 16 : {
12925 : 16 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _q31, _q41 };
12926 : 16 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, MINUS_EXPR))
12927 : 0 : return true;
12928 : : }
12929 : : }
12930 : : break;
12931 : : }
12932 : : default:;
12933 : : }
12934 : : break;
12935 : : }
12936 : : default:;
12937 : : }
12938 : : break;
12939 : : }
12940 : : default:;
12941 : : }
12942 : : }
12943 : : break;
12944 : : default:;
12945 : : }
12946 : : break;
12947 : : }
12948 : : default:;
12949 : : }
12950 : : }
12951 : : break;
12952 : : default:;
12953 : : }
12954 : : break;
12955 : : }
12956 : 4360 : case EXACT_DIV_EXPR:
12957 : 4360 : {
12958 : 4360 : tree _q20 = gimple_assign_rhs1 (_a1);
12959 : 4360 : _q20 = do_valueize (valueize, _q20);
12960 : 4360 : tree _q21 = gimple_assign_rhs2 (_a1);
12961 : 4360 : _q21 = do_valueize (valueize, _q21);
12962 : 4360 : switch (TREE_CODE (_p1))
12963 : : {
12964 : 858 : case SSA_NAME:
12965 : 858 : if (gimple *_d2 = get_def (valueize, _p1))
12966 : : {
12967 : 725 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12968 : 725 : switch (gimple_assign_rhs_code (_a2))
12969 : : {
12970 : 687 : CASE_CONVERT:
12971 : 687 : {
12972 : 687 : tree _q50 = gimple_assign_rhs1 (_a2);
12973 : 687 : _q50 = do_valueize (valueize, _q50);
12974 : 687 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q21, 0))
12975 : : {
12976 : 0 : {
12977 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q21 };
12978 : 0 : if (gimple_simplify_195 (res_op, seq, valueize, type, captures))
12979 : 0 : return true;
12980 : : }
12981 : : }
12982 : : break;
12983 : : }
12984 : : default:;
12985 : : }
12986 : : }
12987 : : break;
12988 : 4360 : default:;
12989 : : }
12990 : 4360 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q21, 0))
12991 : : {
12992 : 279 : {
12993 : 279 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q21 };
12994 : 279 : if (gimple_simplify_195 (res_op, seq, valueize, type, captures))
12995 : 279 : return true;
12996 : : }
12997 : : }
12998 : : break;
12999 : : }
13000 : 1783479 : case PLUS_EXPR:
13001 : 1783479 : {
13002 : 1783479 : tree _q20 = gimple_assign_rhs1 (_a1);
13003 : 1783479 : _q20 = do_valueize (valueize, _q20);
13004 : 1783479 : tree _q21 = gimple_assign_rhs2 (_a1);
13005 : 1783479 : _q21 = do_valueize (valueize, _q21);
13006 : 1783479 : if (tree_swap_operands_p (_q20, _q21))
13007 : 68713 : std::swap (_q20, _q21);
13008 : 1783479 : switch (TREE_CODE (_q20))
13009 : : {
13010 : 1783479 : case SSA_NAME:
13011 : 1783479 : if (gimple *_d2 = get_def (valueize, _q20))
13012 : : {
13013 : 1673477 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13014 : 1502278 : switch (gimple_assign_rhs_code (_a2))
13015 : : {
13016 : 291822 : CASE_CONVERT:
13017 : 291822 : {
13018 : 291822 : tree _q30 = gimple_assign_rhs1 (_a2);
13019 : 291822 : _q30 = do_valueize (valueize, _q30);
13020 : 291822 : switch (TREE_CODE (_q30))
13021 : : {
13022 : 291819 : case SSA_NAME:
13023 : 291819 : if (gimple *_d3 = get_def (valueize, _q30))
13024 : : {
13025 : 285981 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13026 : 225439 : switch (gimple_assign_rhs_code (_a3))
13027 : : {
13028 : 7460 : case EXACT_DIV_EXPR:
13029 : 7460 : {
13030 : 7460 : tree _q40 = gimple_assign_rhs1 (_a3);
13031 : 7460 : _q40 = do_valueize (valueize, _q40);
13032 : 7460 : tree _q41 = gimple_assign_rhs2 (_a3);
13033 : 7460 : _q41 = do_valueize (valueize, _q41);
13034 : 7460 : switch (TREE_CODE (_q41))
13035 : : {
13036 : 7460 : case INTEGER_CST:
13037 : 7460 : {
13038 : 7460 : switch (TREE_CODE (_q21))
13039 : : {
13040 : 5692 : case INTEGER_CST:
13041 : 5692 : {
13042 : 5692 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q41, 0))
13043 : : {
13044 : 3596 : {
13045 : 3596 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _q21, _q41 };
13046 : 3596 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, PLUS_EXPR))
13047 : 2325 : return true;
13048 : : }
13049 : : }
13050 : : break;
13051 : : }
13052 : : default:;
13053 : : }
13054 : : break;
13055 : : }
13056 : : default:;
13057 : : }
13058 : : break;
13059 : : }
13060 : : default:;
13061 : : }
13062 : : }
13063 : : break;
13064 : : default:;
13065 : : }
13066 : : break;
13067 : : }
13068 : 187 : case EXACT_DIV_EXPR:
13069 : 187 : {
13070 : 187 : tree _q30 = gimple_assign_rhs1 (_a2);
13071 : 187 : _q30 = do_valueize (valueize, _q30);
13072 : 187 : tree _q31 = gimple_assign_rhs2 (_a2);
13073 : 187 : _q31 = do_valueize (valueize, _q31);
13074 : 187 : switch (TREE_CODE (_q31))
13075 : : {
13076 : 187 : case INTEGER_CST:
13077 : 187 : {
13078 : 187 : switch (TREE_CODE (_q21))
13079 : : {
13080 : 131 : case INTEGER_CST:
13081 : 131 : {
13082 : 131 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
13083 : : {
13084 : 13 : {
13085 : 13 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q21, _q31 };
13086 : 13 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, PLUS_EXPR))
13087 : 13 : return true;
13088 : : }
13089 : : }
13090 : : break;
13091 : : }
13092 : : default:;
13093 : : }
13094 : : break;
13095 : : }
13096 : : default:;
13097 : : }
13098 : : break;
13099 : : }
13100 : : default:;
13101 : : }
13102 : : }
13103 : : break;
13104 : : default:;
13105 : : }
13106 : 34011215 : break;
13107 : : }
13108 : 275353 : case MINUS_EXPR:
13109 : 275353 : {
13110 : 275353 : tree _q20 = gimple_assign_rhs1 (_a1);
13111 : 275353 : _q20 = do_valueize (valueize, _q20);
13112 : 275353 : tree _q21 = gimple_assign_rhs2 (_a1);
13113 : 275353 : _q21 = do_valueize (valueize, _q21);
13114 : 275353 : switch (TREE_CODE (_q20))
13115 : : {
13116 : 241860 : case SSA_NAME:
13117 : 241860 : if (gimple *_d2 = get_def (valueize, _q20))
13118 : : {
13119 : 233092 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13120 : 222982 : switch (gimple_assign_rhs_code (_a2))
13121 : : {
13122 : 54625 : CASE_CONVERT:
13123 : 54625 : {
13124 : 54625 : tree _q30 = gimple_assign_rhs1 (_a2);
13125 : 54625 : _q30 = do_valueize (valueize, _q30);
13126 : 54625 : switch (TREE_CODE (_q30))
13127 : : {
13128 : 54589 : case SSA_NAME:
13129 : 54589 : if (gimple *_d3 = get_def (valueize, _q30))
13130 : : {
13131 : 52127 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
13132 : 89687 : switch (gimple_assign_rhs_code (_a3))
13133 : : {
13134 : 402 : case EXACT_DIV_EXPR:
13135 : 402 : {
13136 : 402 : tree _q40 = gimple_assign_rhs1 (_a3);
13137 : 402 : _q40 = do_valueize (valueize, _q40);
13138 : 402 : tree _q41 = gimple_assign_rhs2 (_a3);
13139 : 402 : _q41 = do_valueize (valueize, _q41);
13140 : 402 : switch (TREE_CODE (_q41))
13141 : : {
13142 : 402 : case INTEGER_CST:
13143 : 402 : {
13144 : 402 : switch (TREE_CODE (_q21))
13145 : : {
13146 : 0 : case INTEGER_CST:
13147 : 0 : {
13148 : 0 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q41, 0))
13149 : : {
13150 : 0 : {
13151 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q40, _q41, _q21, _q41 };
13152 : 0 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, MINUS_EXPR))
13153 : 0 : return true;
13154 : : }
13155 : : }
13156 : : break;
13157 : : }
13158 : : default:;
13159 : : }
13160 : : break;
13161 : : }
13162 : : default:;
13163 : : }
13164 : : break;
13165 : : }
13166 : : default:;
13167 : : }
13168 : : }
13169 : : break;
13170 : : default:;
13171 : : }
13172 : : break;
13173 : : }
13174 : 14890 : case EXACT_DIV_EXPR:
13175 : 14890 : {
13176 : 14890 : tree _q30 = gimple_assign_rhs1 (_a2);
13177 : 14890 : _q30 = do_valueize (valueize, _q30);
13178 : 14890 : tree _q31 = gimple_assign_rhs2 (_a2);
13179 : 14890 : _q31 = do_valueize (valueize, _q31);
13180 : 14890 : switch (TREE_CODE (_q31))
13181 : : {
13182 : 14890 : case INTEGER_CST:
13183 : 14890 : {
13184 : 14890 : switch (TREE_CODE (_q21))
13185 : : {
13186 : 0 : case INTEGER_CST:
13187 : 0 : {
13188 : 0 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
13189 : : {
13190 : 0 : {
13191 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q21, _q31 };
13192 : 0 : if (gimple_simplify_196 (res_op, seq, valueize, type, captures, MINUS_EXPR))
13193 : 0 : return true;
13194 : : }
13195 : : }
13196 : : break;
13197 : : }
13198 : : default:;
13199 : : }
13200 : : break;
13201 : : }
13202 : : default:;
13203 : : }
13204 : : break;
13205 : : }
13206 : : default:;
13207 : : }
13208 : : }
13209 : : break;
13210 : : default:;
13211 : : }
13212 : : break;
13213 : : }
13214 : : default:;
13215 : : }
13216 : : }
13217 : : break;
13218 : 34011215 : default:;
13219 : : }
13220 : 34011215 : if (integer_minus_onep (_p1))
13221 : : {
13222 : 11300 : {
13223 : 11300 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
13224 : 11300 : gimple_seq *lseq = seq;
13225 : 11300 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1703;
13226 : 11300 : {
13227 : 11300 : res_op->set_op (NEGATE_EXPR, type, 1);
13228 : 11300 : res_op->ops[0] = captures[0];
13229 : 11300 : res_op->resimplify (lseq, valueize);
13230 : 11300 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1003, __FILE__, __LINE__, true);
13231 : 11300 : return true;
13232 : : }
13233 : 0 : next_after_fail1703:;
13234 : : }
13235 : : }
13236 : 33999915 : switch (TREE_CODE (_p0))
13237 : : {
13238 : 33525196 : case SSA_NAME:
13239 : 33525196 : if (gimple *_d1 = get_def (valueize, _p0))
13240 : : {
13241 : 13268660 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13242 : 12872471 : switch (gimple_assign_rhs_code (_a1))
13243 : : {
13244 : 354564 : case MULT_EXPR:
13245 : 354564 : {
13246 : 354564 : tree _q20 = gimple_assign_rhs1 (_a1);
13247 : 354564 : _q20 = do_valueize (valueize, _q20);
13248 : 354564 : tree _q21 = gimple_assign_rhs2 (_a1);
13249 : 354564 : _q21 = do_valueize (valueize, _q21);
13250 : 354564 : if (tree_swap_operands_p (_q20, _q21))
13251 : 22499 : std::swap (_q20, _q21);
13252 : 354564 : switch (TREE_CODE (_q21))
13253 : : {
13254 : 7278 : case INTEGER_CST:
13255 : 7278 : {
13256 : 7278 : {
13257 : 7278 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
13258 : 7278 : if (gimple_simplify_197 (res_op, seq, valueize, type, captures))
13259 : 695 : return true;
13260 : : }
13261 : 6583 : break;
13262 : : }
13263 : : default:;
13264 : : }
13265 : 33999220 : break;
13266 : : }
13267 : : default:;
13268 : : }
13269 : : }
13270 : : break;
13271 : 33999220 : default:;
13272 : : }
13273 : 33999220 : switch (TREE_CODE (_p1))
13274 : : {
13275 : 5612352 : case SSA_NAME:
13276 : 5612352 : if (gimple *_d1 = get_def (valueize, _p1))
13277 : : {
13278 : 4271308 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13279 : 4403442 : switch (gimple_assign_rhs_code (_a1))
13280 : : {
13281 : 164692 : case MULT_EXPR:
13282 : 164692 : {
13283 : 164692 : tree _q30 = gimple_assign_rhs1 (_a1);
13284 : 164692 : _q30 = do_valueize (valueize, _q30);
13285 : 164692 : tree _q31 = gimple_assign_rhs2 (_a1);
13286 : 164692 : _q31 = do_valueize (valueize, _q31);
13287 : 164692 : if (tree_swap_operands_p (_q30, _q31))
13288 : 15349 : std::swap (_q30, _q31);
13289 : 164692 : switch (TREE_CODE (_q31))
13290 : : {
13291 : 13398 : case INTEGER_CST:
13292 : 13398 : {
13293 : 13398 : {
13294 : 13398 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q31, _p0 };
13295 : 13398 : if (gimple_simplify_197 (res_op, seq, valueize, type, captures))
13296 : 2323 : return true;
13297 : : }
13298 : 11075 : break;
13299 : : }
13300 : : default:;
13301 : : }
13302 : 33996897 : break;
13303 : : }
13304 : : default:;
13305 : : }
13306 : : }
13307 : : break;
13308 : 33996897 : default:;
13309 : : }
13310 : 33996897 : switch (TREE_CODE (_p0))
13311 : : {
13312 : 33522178 : case SSA_NAME:
13313 : 33522178 : if (gimple *_d1 = get_def (valueize, _p0))
13314 : : {
13315 : 13265843 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13316 : 12870598 : switch (gimple_assign_rhs_code (_a1))
13317 : : {
13318 : 234 : case VEC_COND_EXPR:
13319 : 234 : {
13320 : 234 : tree _q20 = gimple_assign_rhs1 (_a1);
13321 : 234 : _q20 = do_valueize (valueize, _q20);
13322 : 234 : tree _q21 = gimple_assign_rhs2 (_a1);
13323 : 234 : _q21 = do_valueize (valueize, _q21);
13324 : 234 : tree _q22 = gimple_assign_rhs3 (_a1);
13325 : 234 : _q22 = do_valueize (valueize, _q22);
13326 : 234 : switch (TREE_CODE (_p1))
13327 : : {
13328 : 154 : case SSA_NAME:
13329 : 154 : if (gimple *_d2 = get_def (valueize, _p1))
13330 : : {
13331 : 153 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13332 : 202 : switch (gimple_assign_rhs_code (_a2))
13333 : : {
13334 : 26 : case VEC_COND_EXPR:
13335 : 26 : {
13336 : 26 : tree _q60 = gimple_assign_rhs1 (_a2);
13337 : 26 : _q60 = do_valueize (valueize, _q60);
13338 : 26 : tree _q61 = gimple_assign_rhs2 (_a2);
13339 : 26 : _q61 = do_valueize (valueize, _q61);
13340 : 26 : tree _q62 = gimple_assign_rhs3 (_a2);
13341 : 26 : _q62 = do_valueize (valueize, _q62);
13342 : 26 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
13343 : : {
13344 : 0 : {
13345 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
13346 : 0 : if (TREE_CODE_CLASS (MULT_EXPR) != tcc_comparison
13347 : : || types_match (type, TREE_TYPE (captures[2]))
13348 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]), ERROR_MARK)
13349 : : || (optimize_vectors_before_lowering_p ()
13350 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]),
13351 : : TREE_TYPE (captures[1]), ERROR_MARK))
13352 : : )
13353 : : {
13354 : 0 : gimple_seq *lseq = seq;
13355 : 0 : if (lseq
13356 : 0 : && (!single_use (captures[0])
13357 : 0 : || !single_use (captures[4])))
13358 : 0 : lseq = NULL;
13359 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1704;
13360 : 0 : {
13361 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
13362 : 0 : res_op->ops[0] = captures[1];
13363 : 0 : {
13364 : 0 : tree _o1[2], _r1;
13365 : 0 : _o1[0] = captures[2];
13366 : 0 : _o1[1] = captures[5];
13367 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13368 : 0 : tem_op.resimplify (NULL, valueize);
13369 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13370 : 0 : if (!_r1) goto next_after_fail1704;
13371 : 0 : res_op->ops[1] = _r1;
13372 : : }
13373 : 0 : {
13374 : 0 : tree _o1[2], _r1;
13375 : 0 : _o1[0] = captures[3];
13376 : 0 : _o1[1] = captures[6];
13377 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13378 : 0 : tem_op.resimplify (NULL, valueize);
13379 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13380 : 0 : if (!_r1) goto next_after_fail1704;
13381 : 0 : res_op->ops[2] = _r1;
13382 : : }
13383 : 0 : res_op->resimplify (lseq, valueize);
13384 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 925, __FILE__, __LINE__, true);
13385 : 0 : return true;
13386 : : }
13387 : 0 : next_after_fail1704:;
13388 : : }
13389 : : }
13390 : : }
13391 : : break;
13392 : : }
13393 : : default:;
13394 : : }
13395 : : }
13396 : : break;
13397 : 234 : default:;
13398 : : }
13399 : 234 : {
13400 : 234 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
13401 : 234 : if (TREE_CODE_CLASS (MULT_EXPR) != tcc_comparison
13402 : : || types_match (type, TREE_TYPE (captures[2]))
13403 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]), ERROR_MARK)
13404 : : || (optimize_vectors_before_lowering_p ()
13405 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]),
13406 : : TREE_TYPE (captures[1]), ERROR_MARK))
13407 : : )
13408 : : {
13409 : 234 : gimple_seq *lseq = seq;
13410 : 234 : if (lseq
13411 : 78 : && (!single_use (captures[0])))
13412 : 176 : lseq = NULL;
13413 : 234 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1705;
13414 : 234 : {
13415 : 234 : res_op->set_op (VEC_COND_EXPR, type, 3);
13416 : 234 : res_op->ops[0] = captures[1];
13417 : 234 : {
13418 : 234 : tree _o1[2], _r1;
13419 : 234 : _o1[0] = captures[2];
13420 : 234 : _o1[1] = captures[4];
13421 : 234 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13422 : 234 : tem_op.resimplify (NULL, valueize);
13423 : 234 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13424 : 234 : if (!_r1) goto next_after_fail1705;
13425 : 72 : res_op->ops[1] = _r1;
13426 : : }
13427 : 72 : {
13428 : 72 : tree _o1[2], _r1;
13429 : 72 : _o1[0] = captures[3];
13430 : 72 : _o1[1] = captures[4];
13431 : 72 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13432 : 72 : tem_op.resimplify (NULL, valueize);
13433 : 72 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13434 : 72 : if (!_r1) goto next_after_fail1705;
13435 : 6 : res_op->ops[2] = _r1;
13436 : : }
13437 : 6 : res_op->resimplify (lseq, valueize);
13438 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
13439 : 6 : return true;
13440 : : }
13441 : 228 : next_after_fail1705:;
13442 : : }
13443 : : }
13444 : 228 : break;
13445 : : }
13446 : : default:;
13447 : : }
13448 : : }
13449 : : break;
13450 : 33996891 : default:;
13451 : : }
13452 : 33996891 : switch (TREE_CODE (_p1))
13453 : : {
13454 : 5610023 : case SSA_NAME:
13455 : 5610023 : if (gimple *_d1 = get_def (valueize, _p1))
13456 : : {
13457 : 4268979 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13458 : 4401113 : switch (gimple_assign_rhs_code (_a1))
13459 : : {
13460 : 507 : case VEC_COND_EXPR:
13461 : 507 : {
13462 : 507 : tree _q30 = gimple_assign_rhs1 (_a1);
13463 : 507 : _q30 = do_valueize (valueize, _q30);
13464 : 507 : tree _q31 = gimple_assign_rhs2 (_a1);
13465 : 507 : _q31 = do_valueize (valueize, _q31);
13466 : 507 : tree _q32 = gimple_assign_rhs3 (_a1);
13467 : 507 : _q32 = do_valueize (valueize, _q32);
13468 : 507 : {
13469 : 507 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
13470 : 507 : if (TREE_CODE_CLASS (MULT_EXPR) != tcc_comparison
13471 : : || types_match (type, TREE_TYPE (captures[3]))
13472 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]), ERROR_MARK)
13473 : : || (optimize_vectors_before_lowering_p ()
13474 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]),
13475 : : TREE_TYPE (captures[2]), ERROR_MARK))
13476 : : )
13477 : : {
13478 : 507 : gimple_seq *lseq = seq;
13479 : 507 : if (lseq
13480 : 140 : && (!single_use (captures[1])))
13481 : 405 : lseq = NULL;
13482 : 507 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1706;
13483 : 507 : {
13484 : 507 : res_op->set_op (VEC_COND_EXPR, type, 3);
13485 : 507 : res_op->ops[0] = captures[2];
13486 : 507 : {
13487 : 507 : tree _o1[2], _r1;
13488 : 507 : _o1[0] = captures[0];
13489 : 507 : _o1[1] = captures[3];
13490 : 507 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13491 : 507 : tem_op.resimplify (NULL, valueize);
13492 : 507 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13493 : 507 : if (!_r1) goto next_after_fail1706;
13494 : 86 : res_op->ops[1] = _r1;
13495 : : }
13496 : 86 : {
13497 : 86 : tree _o1[2], _r1;
13498 : 86 : _o1[0] = captures[0];
13499 : 86 : _o1[1] = captures[4];
13500 : 86 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13501 : 86 : tem_op.resimplify (NULL, valueize);
13502 : 86 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13503 : 86 : if (!_r1) goto next_after_fail1706;
13504 : 68 : res_op->ops[2] = _r1;
13505 : : }
13506 : 68 : res_op->resimplify (lseq, valueize);
13507 : 68 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
13508 : 68 : return true;
13509 : : }
13510 : 439 : next_after_fail1706:;
13511 : : }
13512 : : }
13513 : 439 : break;
13514 : : }
13515 : : default:;
13516 : : }
13517 : : }
13518 : : break;
13519 : 33996823 : default:;
13520 : : }
13521 : 33996823 : switch (TREE_CODE (_p0))
13522 : : {
13523 : 33522104 : case SSA_NAME:
13524 : 33522104 : if (gimple *_d1 = get_def (valueize, _p0))
13525 : : {
13526 : 13265769 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
13527 : 294705 : switch (gimple_call_combined_fn (_c1))
13528 : : {
13529 : 1793 : case CFN_BUILT_IN_SQRTF:
13530 : 1793 : if (gimple_call_num_args (_c1) == 1)
13531 : : {
13532 : 1793 : tree _q20 = gimple_call_arg (_c1, 0);
13533 : 1793 : _q20 = do_valueize (valueize, _q20);
13534 : 1793 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
13535 : : {
13536 : 0 : {
13537 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
13538 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF))
13539 : 0 : return true;
13540 : : }
13541 : : }
13542 : 1793 : switch (TREE_CODE (_p1))
13543 : : {
13544 : 1609 : case SSA_NAME:
13545 : 1609 : if (gimple *_d2 = get_def (valueize, _p1))
13546 : : {
13547 : 1567 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13548 : 704 : switch (gimple_call_combined_fn (_c2))
13549 : : {
13550 : 696 : case CFN_BUILT_IN_SQRTF:
13551 : 696 : if (gimple_call_num_args (_c2) == 1)
13552 : : {
13553 : 696 : tree _q40 = gimple_call_arg (_c2, 0);
13554 : 696 : _q40 = do_valueize (valueize, _q40);
13555 : 696 : {
13556 : 696 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13557 : 696 : if (flag_unsafe_math_optimizations
13558 : : )
13559 : : {
13560 : 0 : gimple_seq *lseq = seq;
13561 : 0 : if (lseq
13562 : 0 : && (!single_use (captures[0])
13563 : 0 : || !single_use (captures[2])))
13564 : 0 : lseq = NULL;
13565 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1707;
13566 : 0 : {
13567 : 0 : res_op->set_op (CFN_BUILT_IN_SQRTF, type, 1);
13568 : 0 : {
13569 : 0 : tree _o1[2], _r1;
13570 : 0 : _o1[0] = captures[1];
13571 : 0 : _o1[1] = captures[3];
13572 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13573 : 0 : tem_op.resimplify (lseq, valueize);
13574 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13575 : 0 : if (!_r1) goto next_after_fail1707;
13576 : 0 : res_op->ops[0] = _r1;
13577 : : }
13578 : 0 : res_op->resimplify (lseq, valueize);
13579 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
13580 : 0 : return true;
13581 : : }
13582 : 696 : next_after_fail1707:;
13583 : : }
13584 : : }
13585 : : }
13586 : : break;
13587 : : default:;
13588 : : }
13589 : : }
13590 : : break;
13591 : : default:;
13592 : : }
13593 : : }
13594 : : break;
13595 : 1622 : case CFN_BUILT_IN_SQRTL:
13596 : 1622 : if (gimple_call_num_args (_c1) == 1)
13597 : : {
13598 : 1622 : tree _q20 = gimple_call_arg (_c1, 0);
13599 : 1622 : _q20 = do_valueize (valueize, _q20);
13600 : 1622 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
13601 : : {
13602 : 0 : {
13603 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
13604 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTL))
13605 : 0 : return true;
13606 : : }
13607 : : }
13608 : 1622 : switch (TREE_CODE (_p1))
13609 : : {
13610 : 1462 : case SSA_NAME:
13611 : 1462 : if (gimple *_d2 = get_def (valueize, _p1))
13612 : : {
13613 : 1426 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13614 : 618 : switch (gimple_call_combined_fn (_c2))
13615 : : {
13616 : 616 : case CFN_BUILT_IN_SQRTL:
13617 : 616 : if (gimple_call_num_args (_c2) == 1)
13618 : : {
13619 : 616 : tree _q40 = gimple_call_arg (_c2, 0);
13620 : 616 : _q40 = do_valueize (valueize, _q40);
13621 : 616 : {
13622 : 616 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13623 : 616 : if (flag_unsafe_math_optimizations
13624 : : )
13625 : : {
13626 : 0 : gimple_seq *lseq = seq;
13627 : 0 : if (lseq
13628 : 0 : && (!single_use (captures[0])
13629 : 0 : || !single_use (captures[2])))
13630 : 0 : lseq = NULL;
13631 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1708;
13632 : 0 : {
13633 : 0 : res_op->set_op (CFN_BUILT_IN_SQRTL, type, 1);
13634 : 0 : {
13635 : 0 : tree _o1[2], _r1;
13636 : 0 : _o1[0] = captures[1];
13637 : 0 : _o1[1] = captures[3];
13638 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13639 : 0 : tem_op.resimplify (lseq, valueize);
13640 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13641 : 0 : if (!_r1) goto next_after_fail1708;
13642 : 0 : res_op->ops[0] = _r1;
13643 : : }
13644 : 0 : res_op->resimplify (lseq, valueize);
13645 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
13646 : 0 : return true;
13647 : : }
13648 : 616 : next_after_fail1708:;
13649 : : }
13650 : : }
13651 : : }
13652 : : break;
13653 : : default:;
13654 : : }
13655 : : }
13656 : : break;
13657 : : default:;
13658 : : }
13659 : : }
13660 : : break;
13661 : 722 : case CFN_BUILT_IN_COS:
13662 : 722 : if (gimple_call_num_args (_c1) == 1)
13663 : : {
13664 : 722 : tree _q20 = gimple_call_arg (_c1, 0);
13665 : 722 : _q20 = do_valueize (valueize, _q20);
13666 : 722 : switch (TREE_CODE (_p1))
13667 : : {
13668 : 561 : case SSA_NAME:
13669 : 561 : if (gimple *_d2 = get_def (valueize, _p1))
13670 : : {
13671 : 561 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13672 : 240 : switch (gimple_call_combined_fn (_c2))
13673 : : {
13674 : 0 : case CFN_BUILT_IN_TAN:
13675 : 0 : if (gimple_call_num_args (_c2) == 1)
13676 : : {
13677 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
13678 : 0 : _q40 = do_valueize (valueize, _q40);
13679 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
13680 : : {
13681 : 0 : {
13682 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q20, _p0 };
13683 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TAN, CFN_BUILT_IN_COS, CFN_BUILT_IN_SIN))
13684 : 0 : return true;
13685 : : }
13686 : : }
13687 : : }
13688 : : break;
13689 : : default:;
13690 : : }
13691 : : }
13692 : : break;
13693 : : default:;
13694 : : }
13695 : : }
13696 : : break;
13697 : 2616 : case CFN_BUILT_IN_EXP:
13698 : 2616 : if (gimple_call_num_args (_c1) == 1)
13699 : : {
13700 : 2616 : tree _q20 = gimple_call_arg (_c1, 0);
13701 : 2616 : _q20 = do_valueize (valueize, _q20);
13702 : 2616 : switch (TREE_CODE (_p1))
13703 : : {
13704 : 1406 : case SSA_NAME:
13705 : 1406 : if (gimple *_d2 = get_def (valueize, _p1))
13706 : : {
13707 : 1346 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13708 : 176 : switch (gimple_call_combined_fn (_c2))
13709 : : {
13710 : 90 : case CFN_BUILT_IN_EXP:
13711 : 90 : if (gimple_call_num_args (_c2) == 1)
13712 : : {
13713 : 90 : tree _q40 = gimple_call_arg (_c2, 0);
13714 : 90 : _q40 = do_valueize (valueize, _q40);
13715 : 90 : {
13716 : 90 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13717 : 90 : if (flag_unsafe_math_optimizations
13718 : : )
13719 : : {
13720 : 0 : gimple_seq *lseq = seq;
13721 : 0 : if (lseq
13722 : 0 : && (!single_use (captures[0])
13723 : 0 : || !single_use (captures[2])))
13724 : 0 : lseq = NULL;
13725 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1709;
13726 : 0 : {
13727 : 0 : res_op->set_op (CFN_BUILT_IN_EXP, type, 1);
13728 : 0 : {
13729 : 0 : tree _o1[2], _r1;
13730 : 0 : _o1[0] = captures[1];
13731 : 0 : _o1[1] = captures[3];
13732 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13733 : 0 : tem_op.resimplify (lseq, valueize);
13734 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13735 : 0 : if (!_r1) goto next_after_fail1709;
13736 : 0 : res_op->ops[0] = _r1;
13737 : : }
13738 : 0 : res_op->resimplify (lseq, valueize);
13739 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
13740 : 0 : return true;
13741 : : }
13742 : 90 : next_after_fail1709:;
13743 : : }
13744 : : }
13745 : : }
13746 : : break;
13747 : 8 : case CFN_BUILT_IN_POW:
13748 : 8 : if (gimple_call_num_args (_c2) == 2)
13749 : : {
13750 : 8 : tree _q40 = gimple_call_arg (_c2, 0);
13751 : 8 : _q40 = do_valueize (valueize, _q40);
13752 : 8 : tree _q41 = gimple_call_arg (_c2, 1);
13753 : 8 : _q41 = do_valueize (valueize, _q41);
13754 : 8 : switch (TREE_CODE (_q40))
13755 : : {
13756 : 0 : case REAL_CST:
13757 : 0 : {
13758 : 0 : {
13759 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
13760 : 0 : if (flag_unsafe_math_optimizations
13761 : : )
13762 : : {
13763 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
13764 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
13765 : : )
13766 : : {
13767 : 0 : gimple_seq *lseq = seq;
13768 : 0 : if (lseq
13769 : 0 : && (!single_use (captures[0])
13770 : 0 : || !single_use (captures[3])))
13771 : 0 : lseq = NULL;
13772 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1710;
13773 : 0 : {
13774 : 0 : res_op->set_op (CFN_BUILT_IN_EXP, type, 1);
13775 : 0 : {
13776 : 0 : tree _o1[2], _r1;
13777 : 0 : {
13778 : 0 : tree _o2[2], _r2;
13779 : 0 : {
13780 : 0 : tree _o3[1], _r3;
13781 : 0 : _o3[0] = captures[1];
13782 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG, TREE_TYPE (_o3[0]), _o3[0]);
13783 : 0 : tem_op.resimplify (lseq, valueize);
13784 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
13785 : 0 : if (!_r3) goto next_after_fail1710;
13786 : 0 : _o2[0] = _r3;
13787 : : }
13788 : 0 : _o2[1] = captures[2];
13789 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
13790 : 0 : tem_op.resimplify (lseq, valueize);
13791 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
13792 : 0 : if (!_r2) goto next_after_fail1710;
13793 : 0 : _o1[0] = _r2;
13794 : : }
13795 : 0 : _o1[1] = captures[4];
13796 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13797 : 0 : tem_op.resimplify (lseq, valueize);
13798 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13799 : 0 : if (!_r1) goto next_after_fail1710;
13800 : 0 : res_op->ops[0] = _r1;
13801 : : }
13802 : 0 : res_op->resimplify (lseq, valueize);
13803 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
13804 : 0 : return true;
13805 : : }
13806 : 0 : next_after_fail1710:;
13807 : : }
13808 : : }
13809 : : }
13810 : 0 : break;
13811 : : }
13812 : : default:;
13813 : : }
13814 : : }
13815 : : break;
13816 : : default:;
13817 : : }
13818 : : }
13819 : : break;
13820 : : default:;
13821 : : }
13822 : : }
13823 : : break;
13824 : 541 : case CFN_BUILT_IN_POW:
13825 : 541 : if (gimple_call_num_args (_c1) == 2)
13826 : : {
13827 : 541 : tree _q20 = gimple_call_arg (_c1, 0);
13828 : 541 : _q20 = do_valueize (valueize, _q20);
13829 : 541 : tree _q21 = gimple_call_arg (_c1, 1);
13830 : 541 : _q21 = do_valueize (valueize, _q21);
13831 : 541 : switch (TREE_CODE (_q20))
13832 : : {
13833 : 312 : case REAL_CST:
13834 : 312 : {
13835 : 312 : switch (TREE_CODE (_p1))
13836 : : {
13837 : 279 : case SSA_NAME:
13838 : 279 : if (gimple *_d2 = get_def (valueize, _p1))
13839 : : {
13840 : 279 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13841 : 240 : switch (gimple_call_combined_fn (_c2))
13842 : : {
13843 : 1 : case CFN_BUILT_IN_EXP:
13844 : 1 : if (gimple_call_num_args (_c2) == 1)
13845 : : {
13846 : 1 : tree _q50 = gimple_call_arg (_c2, 0);
13847 : 1 : _q50 = do_valueize (valueize, _q50);
13848 : 1 : {
13849 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
13850 : 1 : if (flag_unsafe_math_optimizations
13851 : : )
13852 : : {
13853 : 1 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
13854 : 1 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
13855 : : )
13856 : : {
13857 : 1 : gimple_seq *lseq = seq;
13858 : 1 : if (lseq
13859 : 1 : && (!single_use (captures[0])
13860 : 1 : || !single_use (captures[3])))
13861 : 0 : lseq = NULL;
13862 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1711;
13863 : 1 : {
13864 : 1 : res_op->set_op (CFN_BUILT_IN_EXP, type, 1);
13865 : 1 : {
13866 : 1 : tree _o1[2], _r1;
13867 : 1 : {
13868 : 1 : tree _o2[2], _r2;
13869 : 1 : {
13870 : 1 : tree _o3[1], _r3;
13871 : 1 : _o3[0] = captures[1];
13872 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG, TREE_TYPE (_o3[0]), _o3[0]);
13873 : 1 : tem_op.resimplify (lseq, valueize);
13874 : 1 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
13875 : 1 : if (!_r3) goto next_after_fail1711;
13876 : 1 : _o2[0] = _r3;
13877 : : }
13878 : 1 : _o2[1] = captures[2];
13879 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
13880 : 1 : tem_op.resimplify (lseq, valueize);
13881 : 1 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
13882 : 1 : if (!_r2) goto next_after_fail1711;
13883 : 1 : _o1[0] = _r2;
13884 : : }
13885 : 1 : _o1[1] = captures[4];
13886 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13887 : 1 : tem_op.resimplify (lseq, valueize);
13888 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13889 : 1 : if (!_r1) goto next_after_fail1711;
13890 : 1 : res_op->ops[0] = _r1;
13891 : : }
13892 : 1 : res_op->resimplify (lseq, valueize);
13893 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
13894 : 1 : return true;
13895 : : }
13896 : 0 : next_after_fail1711:;
13897 : : }
13898 : : }
13899 : : }
13900 : : }
13901 : : break;
13902 : 0 : case CFN_BUILT_IN_EXP2:
13903 : 0 : if (gimple_call_num_args (_c2) == 1)
13904 : : {
13905 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
13906 : 0 : _q50 = do_valueize (valueize, _q50);
13907 : 0 : {
13908 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
13909 : 0 : if (flag_unsafe_math_optimizations
13910 : : )
13911 : : {
13912 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
13913 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
13914 : : )
13915 : : {
13916 : 0 : gimple_seq *lseq = seq;
13917 : 0 : if (lseq
13918 : 0 : && (!single_use (captures[0])
13919 : 0 : || !single_use (captures[3])))
13920 : 0 : lseq = NULL;
13921 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1712;
13922 : 0 : {
13923 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2, type, 1);
13924 : 0 : {
13925 : 0 : tree _o1[2], _r1;
13926 : 0 : {
13927 : 0 : tree _o2[2], _r2;
13928 : 0 : {
13929 : 0 : tree _o3[1], _r3;
13930 : 0 : _o3[0] = captures[1];
13931 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2, TREE_TYPE (_o3[0]), _o3[0]);
13932 : 0 : tem_op.resimplify (lseq, valueize);
13933 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
13934 : 0 : if (!_r3) goto next_after_fail1712;
13935 : 0 : _o2[0] = _r3;
13936 : : }
13937 : 0 : _o2[1] = captures[2];
13938 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
13939 : 0 : tem_op.resimplify (lseq, valueize);
13940 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
13941 : 0 : if (!_r2) goto next_after_fail1712;
13942 : 0 : _o1[0] = _r2;
13943 : : }
13944 : 0 : _o1[1] = captures[4];
13945 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13946 : 0 : tem_op.resimplify (lseq, valueize);
13947 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
13948 : 0 : if (!_r1) goto next_after_fail1712;
13949 : 0 : res_op->ops[0] = _r1;
13950 : : }
13951 : 0 : res_op->resimplify (lseq, valueize);
13952 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
13953 : 0 : return true;
13954 : : }
13955 : 0 : next_after_fail1712:;
13956 : : }
13957 : : }
13958 : : }
13959 : : }
13960 : : break;
13961 : 0 : case CFN_BUILT_IN_EXP10:
13962 : 0 : if (gimple_call_num_args (_c2) == 1)
13963 : : {
13964 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
13965 : 0 : _q50 = do_valueize (valueize, _q50);
13966 : 0 : {
13967 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
13968 : 0 : if (flag_unsafe_math_optimizations
13969 : : )
13970 : : {
13971 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
13972 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
13973 : : )
13974 : : {
13975 : 0 : gimple_seq *lseq = seq;
13976 : 0 : if (lseq
13977 : 0 : && (!single_use (captures[0])
13978 : 0 : || !single_use (captures[3])))
13979 : 0 : lseq = NULL;
13980 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1713;
13981 : 0 : {
13982 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10, type, 1);
13983 : 0 : {
13984 : 0 : tree _o1[2], _r1;
13985 : 0 : {
13986 : 0 : tree _o2[2], _r2;
13987 : 0 : {
13988 : 0 : tree _o3[1], _r3;
13989 : 0 : _o3[0] = captures[1];
13990 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o3[0]), _o3[0]);
13991 : 0 : tem_op.resimplify (lseq, valueize);
13992 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
13993 : 0 : if (!_r3) goto next_after_fail1713;
13994 : 0 : _o2[0] = _r3;
13995 : : }
13996 : 0 : _o2[1] = captures[2];
13997 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
13998 : 0 : tem_op.resimplify (lseq, valueize);
13999 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14000 : 0 : if (!_r2) goto next_after_fail1713;
14001 : 0 : _o1[0] = _r2;
14002 : : }
14003 : 0 : _o1[1] = captures[4];
14004 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14005 : 0 : tem_op.resimplify (lseq, valueize);
14006 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14007 : 0 : if (!_r1) goto next_after_fail1713;
14008 : 0 : res_op->ops[0] = _r1;
14009 : : }
14010 : 0 : res_op->resimplify (lseq, valueize);
14011 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14012 : 0 : return true;
14013 : : }
14014 : 0 : next_after_fail1713:;
14015 : : }
14016 : : }
14017 : : }
14018 : : }
14019 : : break;
14020 : 0 : case CFN_BUILT_IN_POW10:
14021 : 0 : if (gimple_call_num_args (_c2) == 1)
14022 : : {
14023 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
14024 : 0 : _q50 = do_valueize (valueize, _q50);
14025 : 0 : {
14026 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
14027 : 0 : if (flag_unsafe_math_optimizations
14028 : : )
14029 : : {
14030 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14031 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14032 : : )
14033 : : {
14034 : 0 : gimple_seq *lseq = seq;
14035 : 0 : if (lseq
14036 : 0 : && (!single_use (captures[0])
14037 : 0 : || !single_use (captures[3])))
14038 : 0 : lseq = NULL;
14039 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1714;
14040 : 0 : {
14041 : 0 : res_op->set_op (CFN_BUILT_IN_POW10, type, 1);
14042 : 0 : {
14043 : 0 : tree _o1[2], _r1;
14044 : 0 : {
14045 : 0 : tree _o2[2], _r2;
14046 : 0 : {
14047 : 0 : tree _o3[1], _r3;
14048 : 0 : _o3[0] = captures[1];
14049 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o3[0]), _o3[0]);
14050 : 0 : tem_op.resimplify (lseq, valueize);
14051 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
14052 : 0 : if (!_r3) goto next_after_fail1714;
14053 : 0 : _o2[0] = _r3;
14054 : : }
14055 : 0 : _o2[1] = captures[2];
14056 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
14057 : 0 : tem_op.resimplify (lseq, valueize);
14058 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14059 : 0 : if (!_r2) goto next_after_fail1714;
14060 : 0 : _o1[0] = _r2;
14061 : : }
14062 : 0 : _o1[1] = captures[4];
14063 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14064 : 0 : tem_op.resimplify (lseq, valueize);
14065 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14066 : 0 : if (!_r1) goto next_after_fail1714;
14067 : 0 : res_op->ops[0] = _r1;
14068 : : }
14069 : 0 : res_op->resimplify (lseq, valueize);
14070 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14071 : 0 : return true;
14072 : : }
14073 : 0 : next_after_fail1714:;
14074 : : }
14075 : : }
14076 : : }
14077 : : }
14078 : : break;
14079 : : default:;
14080 : : }
14081 : : }
14082 : : break;
14083 : : default:;
14084 : : }
14085 : : break;
14086 : : }
14087 : 540 : default:;
14088 : : }
14089 : 540 : switch (TREE_CODE (_q21))
14090 : : {
14091 : 93 : case REAL_CST:
14092 : 93 : {
14093 : 93 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
14094 : : {
14095 : 0 : {
14096 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
14097 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POW))
14098 : 0 : return true;
14099 : : }
14100 : : }
14101 : : break;
14102 : : }
14103 : : default:;
14104 : : }
14105 : : }
14106 : : break;
14107 : 49 : case CFN_BUILT_IN_TAN:
14108 : 49 : if (gimple_call_num_args (_c1) == 1)
14109 : : {
14110 : 49 : tree _q20 = gimple_call_arg (_c1, 0);
14111 : 49 : _q20 = do_valueize (valueize, _q20);
14112 : 49 : switch (TREE_CODE (_p1))
14113 : : {
14114 : 5 : case SSA_NAME:
14115 : 5 : if (gimple *_d2 = get_def (valueize, _p1))
14116 : : {
14117 : 4 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14118 : 0 : switch (gimple_call_combined_fn (_c2))
14119 : : {
14120 : 0 : case CFN_BUILT_IN_COS:
14121 : 0 : if (gimple_call_num_args (_c2) == 1)
14122 : : {
14123 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14124 : 0 : _q40 = do_valueize (valueize, _q40);
14125 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
14126 : : {
14127 : 0 : {
14128 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
14129 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TAN, CFN_BUILT_IN_COS, CFN_BUILT_IN_SIN))
14130 : 0 : return true;
14131 : : }
14132 : : }
14133 : : }
14134 : : break;
14135 : : default:;
14136 : : }
14137 : : }
14138 : : break;
14139 : : default:;
14140 : : }
14141 : : }
14142 : : break;
14143 : 0 : case CFN_BUILT_IN_EXP10F:
14144 : 0 : if (gimple_call_num_args (_c1) == 1)
14145 : : {
14146 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14147 : 0 : _q20 = do_valueize (valueize, _q20);
14148 : 0 : switch (TREE_CODE (_p1))
14149 : : {
14150 : 0 : case SSA_NAME:
14151 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
14152 : : {
14153 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14154 : 0 : switch (gimple_call_combined_fn (_c2))
14155 : : {
14156 : 0 : case CFN_BUILT_IN_EXP10F:
14157 : 0 : if (gimple_call_num_args (_c2) == 1)
14158 : : {
14159 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14160 : 0 : _q40 = do_valueize (valueize, _q40);
14161 : 0 : {
14162 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
14163 : 0 : if (flag_unsafe_math_optimizations
14164 : : )
14165 : : {
14166 : 0 : gimple_seq *lseq = seq;
14167 : 0 : if (lseq
14168 : 0 : && (!single_use (captures[0])
14169 : 0 : || !single_use (captures[2])))
14170 : 0 : lseq = NULL;
14171 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1715;
14172 : 0 : {
14173 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10F, type, 1);
14174 : 0 : {
14175 : 0 : tree _o1[2], _r1;
14176 : 0 : _o1[0] = captures[1];
14177 : 0 : _o1[1] = captures[3];
14178 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14179 : 0 : tem_op.resimplify (lseq, valueize);
14180 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14181 : 0 : if (!_r1) goto next_after_fail1715;
14182 : 0 : res_op->ops[0] = _r1;
14183 : : }
14184 : 0 : res_op->resimplify (lseq, valueize);
14185 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
14186 : 0 : return true;
14187 : : }
14188 : 0 : next_after_fail1715:;
14189 : : }
14190 : : }
14191 : : }
14192 : : break;
14193 : 0 : case CFN_BUILT_IN_POWF:
14194 : 0 : if (gimple_call_num_args (_c2) == 2)
14195 : : {
14196 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14197 : 0 : _q40 = do_valueize (valueize, _q40);
14198 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
14199 : 0 : _q41 = do_valueize (valueize, _q41);
14200 : 0 : switch (TREE_CODE (_q40))
14201 : : {
14202 : 0 : case REAL_CST:
14203 : 0 : {
14204 : 0 : {
14205 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
14206 : 0 : if (flag_unsafe_math_optimizations
14207 : : )
14208 : : {
14209 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14210 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14211 : : )
14212 : : {
14213 : 0 : gimple_seq *lseq = seq;
14214 : 0 : if (lseq
14215 : 0 : && (!single_use (captures[0])
14216 : 0 : || !single_use (captures[3])))
14217 : 0 : lseq = NULL;
14218 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1716;
14219 : 0 : {
14220 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10F, type, 1);
14221 : 0 : {
14222 : 0 : tree _o1[2], _r1;
14223 : 0 : {
14224 : 0 : tree _o2[2], _r2;
14225 : 0 : {
14226 : 0 : tree _o3[1], _r3;
14227 : 0 : _o3[0] = captures[1];
14228 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10F, TREE_TYPE (_o3[0]), _o3[0]);
14229 : 0 : tem_op.resimplify (lseq, valueize);
14230 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
14231 : 0 : if (!_r3) goto next_after_fail1716;
14232 : 0 : _o2[0] = _r3;
14233 : : }
14234 : 0 : _o2[1] = captures[2];
14235 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
14236 : 0 : tem_op.resimplify (lseq, valueize);
14237 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14238 : 0 : if (!_r2) goto next_after_fail1716;
14239 : 0 : _o1[0] = _r2;
14240 : : }
14241 : 0 : _o1[1] = captures[4];
14242 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14243 : 0 : tem_op.resimplify (lseq, valueize);
14244 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14245 : 0 : if (!_r1) goto next_after_fail1716;
14246 : 0 : res_op->ops[0] = _r1;
14247 : : }
14248 : 0 : res_op->resimplify (lseq, valueize);
14249 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14250 : 0 : return true;
14251 : : }
14252 : 0 : next_after_fail1716:;
14253 : : }
14254 : : }
14255 : : }
14256 : 0 : break;
14257 : : }
14258 : : default:;
14259 : : }
14260 : : }
14261 : : break;
14262 : : default:;
14263 : : }
14264 : : }
14265 : : break;
14266 : : default:;
14267 : : }
14268 : : }
14269 : : break;
14270 : 0 : case CFN_BUILT_IN_EXP10L:
14271 : 0 : if (gimple_call_num_args (_c1) == 1)
14272 : : {
14273 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14274 : 0 : _q20 = do_valueize (valueize, _q20);
14275 : 0 : switch (TREE_CODE (_p1))
14276 : : {
14277 : 0 : case SSA_NAME:
14278 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
14279 : : {
14280 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14281 : 0 : switch (gimple_call_combined_fn (_c2))
14282 : : {
14283 : 0 : case CFN_BUILT_IN_EXP10L:
14284 : 0 : if (gimple_call_num_args (_c2) == 1)
14285 : : {
14286 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14287 : 0 : _q40 = do_valueize (valueize, _q40);
14288 : 0 : {
14289 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
14290 : 0 : if (flag_unsafe_math_optimizations
14291 : : )
14292 : : {
14293 : 0 : gimple_seq *lseq = seq;
14294 : 0 : if (lseq
14295 : 0 : && (!single_use (captures[0])
14296 : 0 : || !single_use (captures[2])))
14297 : 0 : lseq = NULL;
14298 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1717;
14299 : 0 : {
14300 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10L, type, 1);
14301 : 0 : {
14302 : 0 : tree _o1[2], _r1;
14303 : 0 : _o1[0] = captures[1];
14304 : 0 : _o1[1] = captures[3];
14305 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14306 : 0 : tem_op.resimplify (lseq, valueize);
14307 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14308 : 0 : if (!_r1) goto next_after_fail1717;
14309 : 0 : res_op->ops[0] = _r1;
14310 : : }
14311 : 0 : res_op->resimplify (lseq, valueize);
14312 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
14313 : 0 : return true;
14314 : : }
14315 : 0 : next_after_fail1717:;
14316 : : }
14317 : : }
14318 : : }
14319 : : break;
14320 : 0 : case CFN_BUILT_IN_POWL:
14321 : 0 : if (gimple_call_num_args (_c2) == 2)
14322 : : {
14323 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14324 : 0 : _q40 = do_valueize (valueize, _q40);
14325 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
14326 : 0 : _q41 = do_valueize (valueize, _q41);
14327 : 0 : switch (TREE_CODE (_q40))
14328 : : {
14329 : 0 : case REAL_CST:
14330 : 0 : {
14331 : 0 : {
14332 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
14333 : 0 : if (flag_unsafe_math_optimizations
14334 : : )
14335 : : {
14336 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14337 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14338 : : )
14339 : : {
14340 : 0 : gimple_seq *lseq = seq;
14341 : 0 : if (lseq
14342 : 0 : && (!single_use (captures[0])
14343 : 0 : || !single_use (captures[3])))
14344 : 0 : lseq = NULL;
14345 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1718;
14346 : 0 : {
14347 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10L, type, 1);
14348 : 0 : {
14349 : 0 : tree _o1[2], _r1;
14350 : 0 : {
14351 : 0 : tree _o2[2], _r2;
14352 : 0 : {
14353 : 0 : tree _o3[1], _r3;
14354 : 0 : _o3[0] = captures[1];
14355 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10L, TREE_TYPE (_o3[0]), _o3[0]);
14356 : 0 : tem_op.resimplify (lseq, valueize);
14357 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
14358 : 0 : if (!_r3) goto next_after_fail1718;
14359 : 0 : _o2[0] = _r3;
14360 : : }
14361 : 0 : _o2[1] = captures[2];
14362 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
14363 : 0 : tem_op.resimplify (lseq, valueize);
14364 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14365 : 0 : if (!_r2) goto next_after_fail1718;
14366 : 0 : _o1[0] = _r2;
14367 : : }
14368 : 0 : _o1[1] = captures[4];
14369 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14370 : 0 : tem_op.resimplify (lseq, valueize);
14371 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14372 : 0 : if (!_r1) goto next_after_fail1718;
14373 : 0 : res_op->ops[0] = _r1;
14374 : : }
14375 : 0 : res_op->resimplify (lseq, valueize);
14376 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14377 : 0 : return true;
14378 : : }
14379 : 0 : next_after_fail1718:;
14380 : : }
14381 : : }
14382 : : }
14383 : 0 : break;
14384 : : }
14385 : : default:;
14386 : : }
14387 : : }
14388 : : break;
14389 : : default:;
14390 : : }
14391 : : }
14392 : : break;
14393 : : default:;
14394 : : }
14395 : : }
14396 : : break;
14397 : 4 : case CFN_BUILT_IN_CBRT:
14398 : 4 : if (gimple_call_num_args (_c1) == 1)
14399 : : {
14400 : 4 : tree _q20 = gimple_call_arg (_c1, 0);
14401 : 4 : _q20 = do_valueize (valueize, _q20);
14402 : 4 : switch (TREE_CODE (_p1))
14403 : : {
14404 : 4 : case SSA_NAME:
14405 : 4 : if (gimple *_d2 = get_def (valueize, _p1))
14406 : : {
14407 : 4 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14408 : 4 : switch (gimple_call_combined_fn (_c2))
14409 : : {
14410 : 4 : case CFN_BUILT_IN_CBRT:
14411 : 4 : if (gimple_call_num_args (_c2) == 1)
14412 : : {
14413 : 4 : tree _q40 = gimple_call_arg (_c2, 0);
14414 : 4 : _q40 = do_valueize (valueize, _q40);
14415 : 4 : {
14416 : 4 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
14417 : 4 : if (flag_unsafe_math_optimizations
14418 : : )
14419 : : {
14420 : 4 : gimple_seq *lseq = seq;
14421 : 4 : if (lseq
14422 : 2 : && (!single_use (captures[0])
14423 : 0 : || !single_use (captures[2])))
14424 : 4 : lseq = NULL;
14425 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1719;
14426 : 4 : {
14427 : 4 : res_op->set_op (CFN_BUILT_IN_CBRT, type, 1);
14428 : 4 : {
14429 : 4 : tree _o1[2], _r1;
14430 : 4 : _o1[0] = captures[1];
14431 : 4 : _o1[1] = captures[3];
14432 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14433 : 4 : tem_op.resimplify (lseq, valueize);
14434 : 4 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14435 : 4 : if (!_r1) goto next_after_fail1719;
14436 : 0 : res_op->ops[0] = _r1;
14437 : : }
14438 : 0 : res_op->resimplify (lseq, valueize);
14439 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
14440 : 0 : return true;
14441 : : }
14442 : 4 : next_after_fail1719:;
14443 : : }
14444 : : }
14445 : : }
14446 : : break;
14447 : : default:;
14448 : : }
14449 : : }
14450 : : break;
14451 : : default:;
14452 : : }
14453 : : }
14454 : : break;
14455 : 884 : case CFN_BUILT_IN_COSF:
14456 : 884 : if (gimple_call_num_args (_c1) == 1)
14457 : : {
14458 : 884 : tree _q20 = gimple_call_arg (_c1, 0);
14459 : 884 : _q20 = do_valueize (valueize, _q20);
14460 : 884 : switch (TREE_CODE (_p1))
14461 : : {
14462 : 810 : case SSA_NAME:
14463 : 810 : if (gimple *_d2 = get_def (valueize, _p1))
14464 : : {
14465 : 808 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14466 : 314 : switch (gimple_call_combined_fn (_c2))
14467 : : {
14468 : 0 : case CFN_BUILT_IN_TANF:
14469 : 0 : if (gimple_call_num_args (_c2) == 1)
14470 : : {
14471 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14472 : 0 : _q40 = do_valueize (valueize, _q40);
14473 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
14474 : : {
14475 : 0 : {
14476 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q20, _p0 };
14477 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TANF, CFN_BUILT_IN_COSF, CFN_BUILT_IN_SINF))
14478 : 0 : return true;
14479 : : }
14480 : : }
14481 : : }
14482 : : break;
14483 : : default:;
14484 : : }
14485 : : }
14486 : : break;
14487 : : default:;
14488 : : }
14489 : : }
14490 : : break;
14491 : 518 : case CFN_BUILT_IN_COSL:
14492 : 518 : if (gimple_call_num_args (_c1) == 1)
14493 : : {
14494 : 518 : tree _q20 = gimple_call_arg (_c1, 0);
14495 : 518 : _q20 = do_valueize (valueize, _q20);
14496 : 518 : switch (TREE_CODE (_p1))
14497 : : {
14498 : 444 : case SSA_NAME:
14499 : 444 : if (gimple *_d2 = get_def (valueize, _p1))
14500 : : {
14501 : 442 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14502 : 162 : switch (gimple_call_combined_fn (_c2))
14503 : : {
14504 : 0 : case CFN_BUILT_IN_TANL:
14505 : 0 : if (gimple_call_num_args (_c2) == 1)
14506 : : {
14507 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14508 : 0 : _q40 = do_valueize (valueize, _q40);
14509 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
14510 : : {
14511 : 0 : {
14512 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q20, _p0 };
14513 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TANL, CFN_BUILT_IN_COSL, CFN_BUILT_IN_SINL))
14514 : 0 : return true;
14515 : : }
14516 : : }
14517 : : }
14518 : : break;
14519 : : default:;
14520 : : }
14521 : : }
14522 : : break;
14523 : : default:;
14524 : : }
14525 : : }
14526 : : break;
14527 : 0 : case CFN_BUILT_IN_EXP2:
14528 : 0 : if (gimple_call_num_args (_c1) == 1)
14529 : : {
14530 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14531 : 0 : _q20 = do_valueize (valueize, _q20);
14532 : 0 : switch (TREE_CODE (_p1))
14533 : : {
14534 : 0 : case SSA_NAME:
14535 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
14536 : : {
14537 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14538 : 0 : switch (gimple_call_combined_fn (_c2))
14539 : : {
14540 : 0 : case CFN_BUILT_IN_POW:
14541 : 0 : if (gimple_call_num_args (_c2) == 2)
14542 : : {
14543 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14544 : 0 : _q40 = do_valueize (valueize, _q40);
14545 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
14546 : 0 : _q41 = do_valueize (valueize, _q41);
14547 : 0 : switch (TREE_CODE (_q40))
14548 : : {
14549 : 0 : case REAL_CST:
14550 : 0 : {
14551 : 0 : {
14552 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
14553 : 0 : if (flag_unsafe_math_optimizations
14554 : : )
14555 : : {
14556 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14557 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14558 : : )
14559 : : {
14560 : 0 : gimple_seq *lseq = seq;
14561 : 0 : if (lseq
14562 : 0 : && (!single_use (captures[0])
14563 : 0 : || !single_use (captures[3])))
14564 : 0 : lseq = NULL;
14565 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1720;
14566 : 0 : {
14567 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2, type, 1);
14568 : 0 : {
14569 : 0 : tree _o1[2], _r1;
14570 : 0 : {
14571 : 0 : tree _o2[2], _r2;
14572 : 0 : {
14573 : 0 : tree _o3[1], _r3;
14574 : 0 : _o3[0] = captures[1];
14575 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2, TREE_TYPE (_o3[0]), _o3[0]);
14576 : 0 : tem_op.resimplify (lseq, valueize);
14577 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
14578 : 0 : if (!_r3) goto next_after_fail1720;
14579 : 0 : _o2[0] = _r3;
14580 : : }
14581 : 0 : _o2[1] = captures[2];
14582 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
14583 : 0 : tem_op.resimplify (lseq, valueize);
14584 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14585 : 0 : if (!_r2) goto next_after_fail1720;
14586 : 0 : _o1[0] = _r2;
14587 : : }
14588 : 0 : _o1[1] = captures[4];
14589 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14590 : 0 : tem_op.resimplify (lseq, valueize);
14591 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14592 : 0 : if (!_r1) goto next_after_fail1720;
14593 : 0 : res_op->ops[0] = _r1;
14594 : : }
14595 : 0 : res_op->resimplify (lseq, valueize);
14596 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14597 : 0 : return true;
14598 : : }
14599 : 0 : next_after_fail1720:;
14600 : : }
14601 : : }
14602 : : }
14603 : 0 : break;
14604 : : }
14605 : : default:;
14606 : : }
14607 : : }
14608 : : break;
14609 : 0 : case CFN_BUILT_IN_EXP2:
14610 : 0 : if (gimple_call_num_args (_c2) == 1)
14611 : : {
14612 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
14613 : 0 : _q40 = do_valueize (valueize, _q40);
14614 : 0 : {
14615 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
14616 : 0 : if (flag_unsafe_math_optimizations
14617 : : )
14618 : : {
14619 : 0 : gimple_seq *lseq = seq;
14620 : 0 : if (lseq
14621 : 0 : && (!single_use (captures[0])
14622 : 0 : || !single_use (captures[2])))
14623 : 0 : lseq = NULL;
14624 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1721;
14625 : 0 : {
14626 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2, type, 1);
14627 : 0 : {
14628 : 0 : tree _o1[2], _r1;
14629 : 0 : _o1[0] = captures[1];
14630 : 0 : _o1[1] = captures[3];
14631 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14632 : 0 : tem_op.resimplify (lseq, valueize);
14633 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14634 : 0 : if (!_r1) goto next_after_fail1721;
14635 : 0 : res_op->ops[0] = _r1;
14636 : : }
14637 : 0 : res_op->resimplify (lseq, valueize);
14638 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
14639 : 0 : return true;
14640 : : }
14641 : 0 : next_after_fail1721:;
14642 : : }
14643 : : }
14644 : : }
14645 : : break;
14646 : : default:;
14647 : : }
14648 : : }
14649 : : break;
14650 : : default:;
14651 : : }
14652 : : }
14653 : : break;
14654 : 1708 : case CFN_BUILT_IN_EXPF:
14655 : 1708 : if (gimple_call_num_args (_c1) == 1)
14656 : : {
14657 : 1708 : tree _q20 = gimple_call_arg (_c1, 0);
14658 : 1708 : _q20 = do_valueize (valueize, _q20);
14659 : 1708 : switch (TREE_CODE (_p1))
14660 : : {
14661 : 1105 : case SSA_NAME:
14662 : 1105 : if (gimple *_d2 = get_def (valueize, _p1))
14663 : : {
14664 : 1085 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14665 : 424 : switch (gimple_call_combined_fn (_c2))
14666 : : {
14667 : 60 : case CFN_BUILT_IN_EXPF:
14668 : 60 : if (gimple_call_num_args (_c2) == 1)
14669 : : {
14670 : 60 : tree _q40 = gimple_call_arg (_c2, 0);
14671 : 60 : _q40 = do_valueize (valueize, _q40);
14672 : 60 : {
14673 : 60 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
14674 : 60 : if (flag_unsafe_math_optimizations
14675 : : )
14676 : : {
14677 : 0 : gimple_seq *lseq = seq;
14678 : 0 : if (lseq
14679 : 0 : && (!single_use (captures[0])
14680 : 0 : || !single_use (captures[2])))
14681 : 0 : lseq = NULL;
14682 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1722;
14683 : 0 : {
14684 : 0 : res_op->set_op (CFN_BUILT_IN_EXPF, type, 1);
14685 : 0 : {
14686 : 0 : tree _o1[2], _r1;
14687 : 0 : _o1[0] = captures[1];
14688 : 0 : _o1[1] = captures[3];
14689 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14690 : 0 : tem_op.resimplify (lseq, valueize);
14691 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14692 : 0 : if (!_r1) goto next_after_fail1722;
14693 : 0 : res_op->ops[0] = _r1;
14694 : : }
14695 : 0 : res_op->resimplify (lseq, valueize);
14696 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
14697 : 0 : return true;
14698 : : }
14699 : 60 : next_after_fail1722:;
14700 : : }
14701 : : }
14702 : : }
14703 : : break;
14704 : 4 : case CFN_BUILT_IN_POWF:
14705 : 4 : if (gimple_call_num_args (_c2) == 2)
14706 : : {
14707 : 4 : tree _q40 = gimple_call_arg (_c2, 0);
14708 : 4 : _q40 = do_valueize (valueize, _q40);
14709 : 4 : tree _q41 = gimple_call_arg (_c2, 1);
14710 : 4 : _q41 = do_valueize (valueize, _q41);
14711 : 4 : switch (TREE_CODE (_q40))
14712 : : {
14713 : 0 : case REAL_CST:
14714 : 0 : {
14715 : 0 : {
14716 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
14717 : 0 : if (flag_unsafe_math_optimizations
14718 : : )
14719 : : {
14720 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14721 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14722 : : )
14723 : : {
14724 : 0 : gimple_seq *lseq = seq;
14725 : 0 : if (lseq
14726 : 0 : && (!single_use (captures[0])
14727 : 0 : || !single_use (captures[3])))
14728 : 0 : lseq = NULL;
14729 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1723;
14730 : 0 : {
14731 : 0 : res_op->set_op (CFN_BUILT_IN_EXPF, type, 1);
14732 : 0 : {
14733 : 0 : tree _o1[2], _r1;
14734 : 0 : {
14735 : 0 : tree _o2[2], _r2;
14736 : 0 : {
14737 : 0 : tree _o3[1], _r3;
14738 : 0 : _o3[0] = captures[1];
14739 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGF, TREE_TYPE (_o3[0]), _o3[0]);
14740 : 0 : tem_op.resimplify (lseq, valueize);
14741 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
14742 : 0 : if (!_r3) goto next_after_fail1723;
14743 : 0 : _o2[0] = _r3;
14744 : : }
14745 : 0 : _o2[1] = captures[2];
14746 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
14747 : 0 : tem_op.resimplify (lseq, valueize);
14748 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14749 : 0 : if (!_r2) goto next_after_fail1723;
14750 : 0 : _o1[0] = _r2;
14751 : : }
14752 : 0 : _o1[1] = captures[4];
14753 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14754 : 0 : tem_op.resimplify (lseq, valueize);
14755 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14756 : 0 : if (!_r1) goto next_after_fail1723;
14757 : 0 : res_op->ops[0] = _r1;
14758 : : }
14759 : 0 : res_op->resimplify (lseq, valueize);
14760 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14761 : 0 : return true;
14762 : : }
14763 : 0 : next_after_fail1723:;
14764 : : }
14765 : : }
14766 : : }
14767 : 0 : break;
14768 : : }
14769 : : default:;
14770 : : }
14771 : : }
14772 : : break;
14773 : : default:;
14774 : : }
14775 : : }
14776 : : break;
14777 : : default:;
14778 : : }
14779 : : }
14780 : : break;
14781 : 1305 : case CFN_BUILT_IN_EXPL:
14782 : 1305 : if (gimple_call_num_args (_c1) == 1)
14783 : : {
14784 : 1305 : tree _q20 = gimple_call_arg (_c1, 0);
14785 : 1305 : _q20 = do_valueize (valueize, _q20);
14786 : 1305 : switch (TREE_CODE (_p1))
14787 : : {
14788 : 750 : case SSA_NAME:
14789 : 750 : if (gimple *_d2 = get_def (valueize, _p1))
14790 : : {
14791 : 736 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14792 : 328 : switch (gimple_call_combined_fn (_c2))
14793 : : {
14794 : 60 : case CFN_BUILT_IN_EXPL:
14795 : 60 : if (gimple_call_num_args (_c2) == 1)
14796 : : {
14797 : 60 : tree _q40 = gimple_call_arg (_c2, 0);
14798 : 60 : _q40 = do_valueize (valueize, _q40);
14799 : 60 : {
14800 : 60 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
14801 : 60 : if (flag_unsafe_math_optimizations
14802 : : )
14803 : : {
14804 : 0 : gimple_seq *lseq = seq;
14805 : 0 : if (lseq
14806 : 0 : && (!single_use (captures[0])
14807 : 0 : || !single_use (captures[2])))
14808 : 0 : lseq = NULL;
14809 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1724;
14810 : 0 : {
14811 : 0 : res_op->set_op (CFN_BUILT_IN_EXPL, type, 1);
14812 : 0 : {
14813 : 0 : tree _o1[2], _r1;
14814 : 0 : _o1[0] = captures[1];
14815 : 0 : _o1[1] = captures[3];
14816 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14817 : 0 : tem_op.resimplify (lseq, valueize);
14818 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14819 : 0 : if (!_r1) goto next_after_fail1724;
14820 : 0 : res_op->ops[0] = _r1;
14821 : : }
14822 : 0 : res_op->resimplify (lseq, valueize);
14823 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
14824 : 0 : return true;
14825 : : }
14826 : 60 : next_after_fail1724:;
14827 : : }
14828 : : }
14829 : : }
14830 : : break;
14831 : 4 : case CFN_BUILT_IN_POWL:
14832 : 4 : if (gimple_call_num_args (_c2) == 2)
14833 : : {
14834 : 4 : tree _q40 = gimple_call_arg (_c2, 0);
14835 : 4 : _q40 = do_valueize (valueize, _q40);
14836 : 4 : tree _q41 = gimple_call_arg (_c2, 1);
14837 : 4 : _q41 = do_valueize (valueize, _q41);
14838 : 4 : switch (TREE_CODE (_q40))
14839 : : {
14840 : 0 : case REAL_CST:
14841 : 0 : {
14842 : 0 : {
14843 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
14844 : 0 : if (flag_unsafe_math_optimizations
14845 : : )
14846 : : {
14847 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14848 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14849 : : )
14850 : : {
14851 : 0 : gimple_seq *lseq = seq;
14852 : 0 : if (lseq
14853 : 0 : && (!single_use (captures[0])
14854 : 0 : || !single_use (captures[3])))
14855 : 0 : lseq = NULL;
14856 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1725;
14857 : 0 : {
14858 : 0 : res_op->set_op (CFN_BUILT_IN_EXPL, type, 1);
14859 : 0 : {
14860 : 0 : tree _o1[2], _r1;
14861 : 0 : {
14862 : 0 : tree _o2[2], _r2;
14863 : 0 : {
14864 : 0 : tree _o3[1], _r3;
14865 : 0 : _o3[0] = captures[1];
14866 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGL, TREE_TYPE (_o3[0]), _o3[0]);
14867 : 0 : tem_op.resimplify (lseq, valueize);
14868 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
14869 : 0 : if (!_r3) goto next_after_fail1725;
14870 : 0 : _o2[0] = _r3;
14871 : : }
14872 : 0 : _o2[1] = captures[2];
14873 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
14874 : 0 : tem_op.resimplify (lseq, valueize);
14875 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14876 : 0 : if (!_r2) goto next_after_fail1725;
14877 : 0 : _o1[0] = _r2;
14878 : : }
14879 : 0 : _o1[1] = captures[4];
14880 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14881 : 0 : tem_op.resimplify (lseq, valueize);
14882 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14883 : 0 : if (!_r1) goto next_after_fail1725;
14884 : 0 : res_op->ops[0] = _r1;
14885 : : }
14886 : 0 : res_op->resimplify (lseq, valueize);
14887 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14888 : 0 : return true;
14889 : : }
14890 : 0 : next_after_fail1725:;
14891 : : }
14892 : : }
14893 : : }
14894 : 0 : break;
14895 : : }
14896 : : default:;
14897 : : }
14898 : : }
14899 : : break;
14900 : : default:;
14901 : : }
14902 : : }
14903 : : break;
14904 : : default:;
14905 : : }
14906 : : }
14907 : : break;
14908 : 294 : case CFN_BUILT_IN_POWF:
14909 : 294 : if (gimple_call_num_args (_c1) == 2)
14910 : : {
14911 : 294 : tree _q20 = gimple_call_arg (_c1, 0);
14912 : 294 : _q20 = do_valueize (valueize, _q20);
14913 : 294 : tree _q21 = gimple_call_arg (_c1, 1);
14914 : 294 : _q21 = do_valueize (valueize, _q21);
14915 : 294 : switch (TREE_CODE (_q20))
14916 : : {
14917 : 168 : case REAL_CST:
14918 : 168 : {
14919 : 168 : switch (TREE_CODE (_p1))
14920 : : {
14921 : 168 : case SSA_NAME:
14922 : 168 : if (gimple *_d2 = get_def (valueize, _p1))
14923 : : {
14924 : 168 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
14925 : 168 : switch (gimple_call_combined_fn (_c2))
14926 : : {
14927 : 0 : case CFN_BUILT_IN_EXP10F:
14928 : 0 : if (gimple_call_num_args (_c2) == 1)
14929 : : {
14930 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
14931 : 0 : _q50 = do_valueize (valueize, _q50);
14932 : 0 : {
14933 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
14934 : 0 : if (flag_unsafe_math_optimizations
14935 : : )
14936 : : {
14937 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14938 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14939 : : )
14940 : : {
14941 : 0 : gimple_seq *lseq = seq;
14942 : 0 : if (lseq
14943 : 0 : && (!single_use (captures[0])
14944 : 0 : || !single_use (captures[3])))
14945 : 0 : lseq = NULL;
14946 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1726;
14947 : 0 : {
14948 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10F, type, 1);
14949 : 0 : {
14950 : 0 : tree _o1[2], _r1;
14951 : 0 : {
14952 : 0 : tree _o2[2], _r2;
14953 : 0 : {
14954 : 0 : tree _o3[1], _r3;
14955 : 0 : _o3[0] = captures[1];
14956 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10F, TREE_TYPE (_o3[0]), _o3[0]);
14957 : 0 : tem_op.resimplify (lseq, valueize);
14958 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
14959 : 0 : if (!_r3) goto next_after_fail1726;
14960 : 0 : _o2[0] = _r3;
14961 : : }
14962 : 0 : _o2[1] = captures[2];
14963 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
14964 : 0 : tem_op.resimplify (lseq, valueize);
14965 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
14966 : 0 : if (!_r2) goto next_after_fail1726;
14967 : 0 : _o1[0] = _r2;
14968 : : }
14969 : 0 : _o1[1] = captures[4];
14970 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14971 : 0 : tem_op.resimplify (lseq, valueize);
14972 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14973 : 0 : if (!_r1) goto next_after_fail1726;
14974 : 0 : res_op->ops[0] = _r1;
14975 : : }
14976 : 0 : res_op->resimplify (lseq, valueize);
14977 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
14978 : 0 : return true;
14979 : : }
14980 : 0 : next_after_fail1726:;
14981 : : }
14982 : : }
14983 : : }
14984 : : }
14985 : : break;
14986 : 0 : case CFN_BUILT_IN_EXPF:
14987 : 0 : if (gimple_call_num_args (_c2) == 1)
14988 : : {
14989 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
14990 : 0 : _q50 = do_valueize (valueize, _q50);
14991 : 0 : {
14992 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
14993 : 0 : if (flag_unsafe_math_optimizations
14994 : : )
14995 : : {
14996 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
14997 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
14998 : : )
14999 : : {
15000 : 0 : gimple_seq *lseq = seq;
15001 : 0 : if (lseq
15002 : 0 : && (!single_use (captures[0])
15003 : 0 : || !single_use (captures[3])))
15004 : 0 : lseq = NULL;
15005 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1727;
15006 : 0 : {
15007 : 0 : res_op->set_op (CFN_BUILT_IN_EXPF, type, 1);
15008 : 0 : {
15009 : 0 : tree _o1[2], _r1;
15010 : 0 : {
15011 : 0 : tree _o2[2], _r2;
15012 : 0 : {
15013 : 0 : tree _o3[1], _r3;
15014 : 0 : _o3[0] = captures[1];
15015 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGF, TREE_TYPE (_o3[0]), _o3[0]);
15016 : 0 : tem_op.resimplify (lseq, valueize);
15017 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15018 : 0 : if (!_r3) goto next_after_fail1727;
15019 : 0 : _o2[0] = _r3;
15020 : : }
15021 : 0 : _o2[1] = captures[2];
15022 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15023 : 0 : tem_op.resimplify (lseq, valueize);
15024 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15025 : 0 : if (!_r2) goto next_after_fail1727;
15026 : 0 : _o1[0] = _r2;
15027 : : }
15028 : 0 : _o1[1] = captures[4];
15029 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15030 : 0 : tem_op.resimplify (lseq, valueize);
15031 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15032 : 0 : if (!_r1) goto next_after_fail1727;
15033 : 0 : res_op->ops[0] = _r1;
15034 : : }
15035 : 0 : res_op->resimplify (lseq, valueize);
15036 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15037 : 0 : return true;
15038 : : }
15039 : 0 : next_after_fail1727:;
15040 : : }
15041 : : }
15042 : : }
15043 : : }
15044 : : break;
15045 : 0 : case CFN_BUILT_IN_POW10F:
15046 : 0 : if (gimple_call_num_args (_c2) == 1)
15047 : : {
15048 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15049 : 0 : _q50 = do_valueize (valueize, _q50);
15050 : 0 : {
15051 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15052 : 0 : if (flag_unsafe_math_optimizations
15053 : : )
15054 : : {
15055 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15056 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15057 : : )
15058 : : {
15059 : 0 : gimple_seq *lseq = seq;
15060 : 0 : if (lseq
15061 : 0 : && (!single_use (captures[0])
15062 : 0 : || !single_use (captures[3])))
15063 : 0 : lseq = NULL;
15064 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1728;
15065 : 0 : {
15066 : 0 : res_op->set_op (CFN_BUILT_IN_POW10F, type, 1);
15067 : 0 : {
15068 : 0 : tree _o1[2], _r1;
15069 : 0 : {
15070 : 0 : tree _o2[2], _r2;
15071 : 0 : {
15072 : 0 : tree _o3[1], _r3;
15073 : 0 : _o3[0] = captures[1];
15074 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10F, TREE_TYPE (_o3[0]), _o3[0]);
15075 : 0 : tem_op.resimplify (lseq, valueize);
15076 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15077 : 0 : if (!_r3) goto next_after_fail1728;
15078 : 0 : _o2[0] = _r3;
15079 : : }
15080 : 0 : _o2[1] = captures[2];
15081 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15082 : 0 : tem_op.resimplify (lseq, valueize);
15083 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15084 : 0 : if (!_r2) goto next_after_fail1728;
15085 : 0 : _o1[0] = _r2;
15086 : : }
15087 : 0 : _o1[1] = captures[4];
15088 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15089 : 0 : tem_op.resimplify (lseq, valueize);
15090 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15091 : 0 : if (!_r1) goto next_after_fail1728;
15092 : 0 : res_op->ops[0] = _r1;
15093 : : }
15094 : 0 : res_op->resimplify (lseq, valueize);
15095 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15096 : 0 : return true;
15097 : : }
15098 : 0 : next_after_fail1728:;
15099 : : }
15100 : : }
15101 : : }
15102 : : }
15103 : : break;
15104 : 0 : case CFN_BUILT_IN_EXP2F:
15105 : 0 : if (gimple_call_num_args (_c2) == 1)
15106 : : {
15107 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15108 : 0 : _q50 = do_valueize (valueize, _q50);
15109 : 0 : {
15110 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15111 : 0 : if (flag_unsafe_math_optimizations
15112 : : )
15113 : : {
15114 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15115 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15116 : : )
15117 : : {
15118 : 0 : gimple_seq *lseq = seq;
15119 : 0 : if (lseq
15120 : 0 : && (!single_use (captures[0])
15121 : 0 : || !single_use (captures[3])))
15122 : 0 : lseq = NULL;
15123 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1729;
15124 : 0 : {
15125 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2F, type, 1);
15126 : 0 : {
15127 : 0 : tree _o1[2], _r1;
15128 : 0 : {
15129 : 0 : tree _o2[2], _r2;
15130 : 0 : {
15131 : 0 : tree _o3[1], _r3;
15132 : 0 : _o3[0] = captures[1];
15133 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2F, TREE_TYPE (_o3[0]), _o3[0]);
15134 : 0 : tem_op.resimplify (lseq, valueize);
15135 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15136 : 0 : if (!_r3) goto next_after_fail1729;
15137 : 0 : _o2[0] = _r3;
15138 : : }
15139 : 0 : _o2[1] = captures[2];
15140 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15141 : 0 : tem_op.resimplify (lseq, valueize);
15142 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15143 : 0 : if (!_r2) goto next_after_fail1729;
15144 : 0 : _o1[0] = _r2;
15145 : : }
15146 : 0 : _o1[1] = captures[4];
15147 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15148 : 0 : tem_op.resimplify (lseq, valueize);
15149 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15150 : 0 : if (!_r1) goto next_after_fail1729;
15151 : 0 : res_op->ops[0] = _r1;
15152 : : }
15153 : 0 : res_op->resimplify (lseq, valueize);
15154 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15155 : 0 : return true;
15156 : : }
15157 : 0 : next_after_fail1729:;
15158 : : }
15159 : : }
15160 : : }
15161 : : }
15162 : : break;
15163 : : default:;
15164 : : }
15165 : : }
15166 : : break;
15167 : : default:;
15168 : : }
15169 : : break;
15170 : : }
15171 : 294 : default:;
15172 : : }
15173 : 294 : switch (TREE_CODE (_q21))
15174 : : {
15175 : 58 : case REAL_CST:
15176 : 58 : {
15177 : 58 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
15178 : : {
15179 : 0 : {
15180 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
15181 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF))
15182 : 0 : return true;
15183 : : }
15184 : : }
15185 : : break;
15186 : : }
15187 : : default:;
15188 : : }
15189 : : }
15190 : : break;
15191 : 128 : case CFN_BUILT_IN_POWL:
15192 : 128 : if (gimple_call_num_args (_c1) == 2)
15193 : : {
15194 : 128 : tree _q20 = gimple_call_arg (_c1, 0);
15195 : 128 : _q20 = do_valueize (valueize, _q20);
15196 : 128 : tree _q21 = gimple_call_arg (_c1, 1);
15197 : 128 : _q21 = do_valueize (valueize, _q21);
15198 : 128 : switch (TREE_CODE (_q20))
15199 : : {
15200 : 108 : case REAL_CST:
15201 : 108 : {
15202 : 108 : switch (TREE_CODE (_p1))
15203 : : {
15204 : 108 : case SSA_NAME:
15205 : 108 : if (gimple *_d2 = get_def (valueize, _p1))
15206 : : {
15207 : 108 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15208 : 108 : switch (gimple_call_combined_fn (_c2))
15209 : : {
15210 : 0 : case CFN_BUILT_IN_EXP10L:
15211 : 0 : if (gimple_call_num_args (_c2) == 1)
15212 : : {
15213 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15214 : 0 : _q50 = do_valueize (valueize, _q50);
15215 : 0 : {
15216 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15217 : 0 : if (flag_unsafe_math_optimizations
15218 : : )
15219 : : {
15220 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15221 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15222 : : )
15223 : : {
15224 : 0 : gimple_seq *lseq = seq;
15225 : 0 : if (lseq
15226 : 0 : && (!single_use (captures[0])
15227 : 0 : || !single_use (captures[3])))
15228 : 0 : lseq = NULL;
15229 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1730;
15230 : 0 : {
15231 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10L, type, 1);
15232 : 0 : {
15233 : 0 : tree _o1[2], _r1;
15234 : 0 : {
15235 : 0 : tree _o2[2], _r2;
15236 : 0 : {
15237 : 0 : tree _o3[1], _r3;
15238 : 0 : _o3[0] = captures[1];
15239 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10L, TREE_TYPE (_o3[0]), _o3[0]);
15240 : 0 : tem_op.resimplify (lseq, valueize);
15241 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15242 : 0 : if (!_r3) goto next_after_fail1730;
15243 : 0 : _o2[0] = _r3;
15244 : : }
15245 : 0 : _o2[1] = captures[2];
15246 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15247 : 0 : tem_op.resimplify (lseq, valueize);
15248 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15249 : 0 : if (!_r2) goto next_after_fail1730;
15250 : 0 : _o1[0] = _r2;
15251 : : }
15252 : 0 : _o1[1] = captures[4];
15253 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15254 : 0 : tem_op.resimplify (lseq, valueize);
15255 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15256 : 0 : if (!_r1) goto next_after_fail1730;
15257 : 0 : res_op->ops[0] = _r1;
15258 : : }
15259 : 0 : res_op->resimplify (lseq, valueize);
15260 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15261 : 0 : return true;
15262 : : }
15263 : 0 : next_after_fail1730:;
15264 : : }
15265 : : }
15266 : : }
15267 : : }
15268 : : break;
15269 : 0 : case CFN_BUILT_IN_EXPL:
15270 : 0 : if (gimple_call_num_args (_c2) == 1)
15271 : : {
15272 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15273 : 0 : _q50 = do_valueize (valueize, _q50);
15274 : 0 : {
15275 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15276 : 0 : if (flag_unsafe_math_optimizations
15277 : : )
15278 : : {
15279 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15280 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15281 : : )
15282 : : {
15283 : 0 : gimple_seq *lseq = seq;
15284 : 0 : if (lseq
15285 : 0 : && (!single_use (captures[0])
15286 : 0 : || !single_use (captures[3])))
15287 : 0 : lseq = NULL;
15288 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1731;
15289 : 0 : {
15290 : 0 : res_op->set_op (CFN_BUILT_IN_EXPL, type, 1);
15291 : 0 : {
15292 : 0 : tree _o1[2], _r1;
15293 : 0 : {
15294 : 0 : tree _o2[2], _r2;
15295 : 0 : {
15296 : 0 : tree _o3[1], _r3;
15297 : 0 : _o3[0] = captures[1];
15298 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOGL, TREE_TYPE (_o3[0]), _o3[0]);
15299 : 0 : tem_op.resimplify (lseq, valueize);
15300 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15301 : 0 : if (!_r3) goto next_after_fail1731;
15302 : 0 : _o2[0] = _r3;
15303 : : }
15304 : 0 : _o2[1] = captures[2];
15305 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15306 : 0 : tem_op.resimplify (lseq, valueize);
15307 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15308 : 0 : if (!_r2) goto next_after_fail1731;
15309 : 0 : _o1[0] = _r2;
15310 : : }
15311 : 0 : _o1[1] = captures[4];
15312 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15313 : 0 : tem_op.resimplify (lseq, valueize);
15314 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15315 : 0 : if (!_r1) goto next_after_fail1731;
15316 : 0 : res_op->ops[0] = _r1;
15317 : : }
15318 : 0 : res_op->resimplify (lseq, valueize);
15319 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15320 : 0 : return true;
15321 : : }
15322 : 0 : next_after_fail1731:;
15323 : : }
15324 : : }
15325 : : }
15326 : : }
15327 : : break;
15328 : 0 : case CFN_BUILT_IN_POW10L:
15329 : 0 : if (gimple_call_num_args (_c2) == 1)
15330 : : {
15331 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15332 : 0 : _q50 = do_valueize (valueize, _q50);
15333 : 0 : {
15334 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15335 : 0 : if (flag_unsafe_math_optimizations
15336 : : )
15337 : : {
15338 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15339 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15340 : : )
15341 : : {
15342 : 0 : gimple_seq *lseq = seq;
15343 : 0 : if (lseq
15344 : 0 : && (!single_use (captures[0])
15345 : 0 : || !single_use (captures[3])))
15346 : 0 : lseq = NULL;
15347 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1732;
15348 : 0 : {
15349 : 0 : res_op->set_op (CFN_BUILT_IN_POW10L, type, 1);
15350 : 0 : {
15351 : 0 : tree _o1[2], _r1;
15352 : 0 : {
15353 : 0 : tree _o2[2], _r2;
15354 : 0 : {
15355 : 0 : tree _o3[1], _r3;
15356 : 0 : _o3[0] = captures[1];
15357 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10L, TREE_TYPE (_o3[0]), _o3[0]);
15358 : 0 : tem_op.resimplify (lseq, valueize);
15359 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15360 : 0 : if (!_r3) goto next_after_fail1732;
15361 : 0 : _o2[0] = _r3;
15362 : : }
15363 : 0 : _o2[1] = captures[2];
15364 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15365 : 0 : tem_op.resimplify (lseq, valueize);
15366 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15367 : 0 : if (!_r2) goto next_after_fail1732;
15368 : 0 : _o1[0] = _r2;
15369 : : }
15370 : 0 : _o1[1] = captures[4];
15371 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15372 : 0 : tem_op.resimplify (lseq, valueize);
15373 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15374 : 0 : if (!_r1) goto next_after_fail1732;
15375 : 0 : res_op->ops[0] = _r1;
15376 : : }
15377 : 0 : res_op->resimplify (lseq, valueize);
15378 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15379 : 0 : return true;
15380 : : }
15381 : 0 : next_after_fail1732:;
15382 : : }
15383 : : }
15384 : : }
15385 : : }
15386 : : break;
15387 : 0 : case CFN_BUILT_IN_EXP2L:
15388 : 0 : if (gimple_call_num_args (_c2) == 1)
15389 : : {
15390 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15391 : 0 : _q50 = do_valueize (valueize, _q50);
15392 : 0 : {
15393 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15394 : 0 : if (flag_unsafe_math_optimizations
15395 : : )
15396 : : {
15397 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15398 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15399 : : )
15400 : : {
15401 : 0 : gimple_seq *lseq = seq;
15402 : 0 : if (lseq
15403 : 0 : && (!single_use (captures[0])
15404 : 0 : || !single_use (captures[3])))
15405 : 0 : lseq = NULL;
15406 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1733;
15407 : 0 : {
15408 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2L, type, 1);
15409 : 0 : {
15410 : 0 : tree _o1[2], _r1;
15411 : 0 : {
15412 : 0 : tree _o2[2], _r2;
15413 : 0 : {
15414 : 0 : tree _o3[1], _r3;
15415 : 0 : _o3[0] = captures[1];
15416 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2L, TREE_TYPE (_o3[0]), _o3[0]);
15417 : 0 : tem_op.resimplify (lseq, valueize);
15418 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15419 : 0 : if (!_r3) goto next_after_fail1733;
15420 : 0 : _o2[0] = _r3;
15421 : : }
15422 : 0 : _o2[1] = captures[2];
15423 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15424 : 0 : tem_op.resimplify (lseq, valueize);
15425 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15426 : 0 : if (!_r2) goto next_after_fail1733;
15427 : 0 : _o1[0] = _r2;
15428 : : }
15429 : 0 : _o1[1] = captures[4];
15430 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15431 : 0 : tem_op.resimplify (lseq, valueize);
15432 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15433 : 0 : if (!_r1) goto next_after_fail1733;
15434 : 0 : res_op->ops[0] = _r1;
15435 : : }
15436 : 0 : res_op->resimplify (lseq, valueize);
15437 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15438 : 0 : return true;
15439 : : }
15440 : 0 : next_after_fail1733:;
15441 : : }
15442 : : }
15443 : : }
15444 : : }
15445 : : break;
15446 : : default:;
15447 : : }
15448 : : }
15449 : : break;
15450 : : default:;
15451 : : }
15452 : : break;
15453 : : }
15454 : 128 : default:;
15455 : : }
15456 : 128 : switch (TREE_CODE (_q21))
15457 : : {
15458 : 0 : case REAL_CST:
15459 : 0 : {
15460 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
15461 : : {
15462 : 0 : {
15463 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
15464 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWL))
15465 : 0 : return true;
15466 : : }
15467 : : }
15468 : : break;
15469 : : }
15470 : : default:;
15471 : : }
15472 : : }
15473 : : break;
15474 : 3090 : case CFN_BUILT_IN_SQRT:
15475 : 3090 : if (gimple_call_num_args (_c1) == 1)
15476 : : {
15477 : 3090 : tree _q20 = gimple_call_arg (_c1, 0);
15478 : 3090 : _q20 = do_valueize (valueize, _q20);
15479 : 3090 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15480 : : {
15481 : 1 : {
15482 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
15483 : 1 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRT))
15484 : 1 : return true;
15485 : : }
15486 : : }
15487 : 3089 : switch (TREE_CODE (_p1))
15488 : : {
15489 : 2577 : case SSA_NAME:
15490 : 2577 : if (gimple *_d2 = get_def (valueize, _p1))
15491 : : {
15492 : 2485 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15493 : 1342 : switch (gimple_call_combined_fn (_c2))
15494 : : {
15495 : 1036 : case CFN_BUILT_IN_SQRT:
15496 : 1036 : if (gimple_call_num_args (_c2) == 1)
15497 : : {
15498 : 1036 : tree _q40 = gimple_call_arg (_c2, 0);
15499 : 1036 : _q40 = do_valueize (valueize, _q40);
15500 : 1036 : {
15501 : 1036 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15502 : 1036 : if (flag_unsafe_math_optimizations
15503 : : )
15504 : : {
15505 : 36 : gimple_seq *lseq = seq;
15506 : 36 : if (lseq
15507 : 7 : && (!single_use (captures[0])
15508 : 0 : || !single_use (captures[2])))
15509 : 36 : lseq = NULL;
15510 : 36 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1734;
15511 : 36 : {
15512 : 36 : res_op->set_op (CFN_BUILT_IN_SQRT, type, 1);
15513 : 36 : {
15514 : 36 : tree _o1[2], _r1;
15515 : 36 : _o1[0] = captures[1];
15516 : 36 : _o1[1] = captures[3];
15517 : 36 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15518 : 36 : tem_op.resimplify (lseq, valueize);
15519 : 36 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15520 : 36 : if (!_r1) goto next_after_fail1734;
15521 : 2 : res_op->ops[0] = _r1;
15522 : : }
15523 : 2 : res_op->resimplify (lseq, valueize);
15524 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
15525 : 2 : return true;
15526 : : }
15527 : 1034 : next_after_fail1734:;
15528 : : }
15529 : : }
15530 : : }
15531 : : break;
15532 : : default:;
15533 : : }
15534 : : }
15535 : : break;
15536 : : default:;
15537 : : }
15538 : : }
15539 : : break;
15540 : 0 : case CFN_BUILT_IN_TANF:
15541 : 0 : if (gimple_call_num_args (_c1) == 1)
15542 : : {
15543 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15544 : 0 : _q20 = do_valueize (valueize, _q20);
15545 : 0 : switch (TREE_CODE (_p1))
15546 : : {
15547 : 0 : case SSA_NAME:
15548 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15549 : : {
15550 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15551 : 0 : switch (gimple_call_combined_fn (_c2))
15552 : : {
15553 : 0 : case CFN_BUILT_IN_COSF:
15554 : 0 : if (gimple_call_num_args (_c2) == 1)
15555 : : {
15556 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
15557 : 0 : _q40 = do_valueize (valueize, _q40);
15558 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
15559 : : {
15560 : 0 : {
15561 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
15562 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TANF, CFN_BUILT_IN_COSF, CFN_BUILT_IN_SINF))
15563 : 0 : return true;
15564 : : }
15565 : : }
15566 : : }
15567 : : break;
15568 : : default:;
15569 : : }
15570 : : }
15571 : : break;
15572 : : default:;
15573 : : }
15574 : : }
15575 : : break;
15576 : 0 : case CFN_BUILT_IN_TANL:
15577 : 0 : if (gimple_call_num_args (_c1) == 1)
15578 : : {
15579 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15580 : 0 : _q20 = do_valueize (valueize, _q20);
15581 : 0 : switch (TREE_CODE (_p1))
15582 : : {
15583 : 0 : case SSA_NAME:
15584 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15585 : : {
15586 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15587 : 0 : switch (gimple_call_combined_fn (_c2))
15588 : : {
15589 : 0 : case CFN_BUILT_IN_COSL:
15590 : 0 : if (gimple_call_num_args (_c2) == 1)
15591 : : {
15592 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
15593 : 0 : _q40 = do_valueize (valueize, _q40);
15594 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
15595 : : {
15596 : 0 : {
15597 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
15598 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TANL, CFN_BUILT_IN_COSL, CFN_BUILT_IN_SINL))
15599 : 0 : return true;
15600 : : }
15601 : : }
15602 : : }
15603 : : break;
15604 : : default:;
15605 : : }
15606 : : }
15607 : : break;
15608 : : default:;
15609 : : }
15610 : : }
15611 : : break;
15612 : 290 : case CFN_BUILT_IN_SQRTF128:
15613 : 290 : if (gimple_call_num_args (_c1) == 1)
15614 : : {
15615 : 290 : tree _q20 = gimple_call_arg (_c1, 0);
15616 : 290 : _q20 = do_valueize (valueize, _q20);
15617 : 290 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15618 : : {
15619 : 0 : {
15620 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
15621 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF128))
15622 : 0 : return true;
15623 : : }
15624 : : }
15625 : : }
15626 : : break;
15627 : 0 : case CFN_BUILT_IN_SQRTF32X:
15628 : 0 : if (gimple_call_num_args (_c1) == 1)
15629 : : {
15630 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15631 : 0 : _q20 = do_valueize (valueize, _q20);
15632 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15633 : : {
15634 : 0 : {
15635 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
15636 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF32X))
15637 : 0 : return true;
15638 : : }
15639 : : }
15640 : : }
15641 : : break;
15642 : 0 : case CFN_BUILT_IN_SQRTF64X:
15643 : 0 : if (gimple_call_num_args (_c1) == 1)
15644 : : {
15645 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15646 : 0 : _q20 = do_valueize (valueize, _q20);
15647 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15648 : : {
15649 : 0 : {
15650 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
15651 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF64X))
15652 : 0 : return true;
15653 : : }
15654 : : }
15655 : : }
15656 : : break;
15657 : 0 : case CFN_BUILT_IN_SQRTF16:
15658 : 0 : if (gimple_call_num_args (_c1) == 1)
15659 : : {
15660 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15661 : 0 : _q20 = do_valueize (valueize, _q20);
15662 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15663 : : {
15664 : 0 : {
15665 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
15666 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF16))
15667 : 0 : return true;
15668 : : }
15669 : : }
15670 : : }
15671 : : break;
15672 : 0 : case CFN_BUILT_IN_SQRTF32:
15673 : 0 : if (gimple_call_num_args (_c1) == 1)
15674 : : {
15675 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15676 : 0 : _q20 = do_valueize (valueize, _q20);
15677 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15678 : : {
15679 : 0 : {
15680 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
15681 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF32))
15682 : 0 : return true;
15683 : : }
15684 : : }
15685 : : }
15686 : : break;
15687 : 0 : case CFN_BUILT_IN_SQRTF64:
15688 : 0 : if (gimple_call_num_args (_c1) == 1)
15689 : : {
15690 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15691 : 0 : _q20 = do_valueize (valueize, _q20);
15692 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15693 : : {
15694 : 0 : {
15695 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
15696 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF64))
15697 : 0 : return true;
15698 : : }
15699 : : }
15700 : : }
15701 : : break;
15702 : 0 : case CFN_COS:
15703 : 0 : if (gimple_call_num_args (_c1) == 1)
15704 : : {
15705 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15706 : 0 : _q20 = do_valueize (valueize, _q20);
15707 : 0 : switch (TREE_CODE (_p1))
15708 : : {
15709 : 0 : case SSA_NAME:
15710 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15711 : : {
15712 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15713 : 0 : switch (gimple_call_combined_fn (_c2))
15714 : : {
15715 : 0 : case CFN_TAN:
15716 : 0 : if (gimple_call_num_args (_c2) == 1)
15717 : : {
15718 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
15719 : 0 : _q40 = do_valueize (valueize, _q40);
15720 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
15721 : : {
15722 : 0 : {
15723 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q20, _p0 };
15724 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_TAN, CFN_COS, CFN_SIN))
15725 : 0 : return true;
15726 : : }
15727 : : }
15728 : : }
15729 : : break;
15730 : : default:;
15731 : : }
15732 : : }
15733 : : break;
15734 : : default:;
15735 : : }
15736 : : }
15737 : : break;
15738 : 0 : case CFN_EXP:
15739 : 0 : if (gimple_call_num_args (_c1) == 1)
15740 : : {
15741 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15742 : 0 : _q20 = do_valueize (valueize, _q20);
15743 : 0 : switch (TREE_CODE (_p1))
15744 : : {
15745 : 0 : case SSA_NAME:
15746 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15747 : : {
15748 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15749 : 0 : switch (gimple_call_combined_fn (_c2))
15750 : : {
15751 : 0 : case CFN_EXP:
15752 : 0 : if (gimple_call_num_args (_c2) == 1)
15753 : : {
15754 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
15755 : 0 : _q40 = do_valueize (valueize, _q40);
15756 : 0 : {
15757 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15758 : 0 : if (flag_unsafe_math_optimizations
15759 : : )
15760 : : {
15761 : 0 : gimple_seq *lseq = seq;
15762 : 0 : if (lseq
15763 : 0 : && (!single_use (captures[0])
15764 : 0 : || !single_use (captures[2])))
15765 : 0 : lseq = NULL;
15766 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1735;
15767 : 0 : {
15768 : 0 : res_op->set_op (CFN_EXP, type, 1);
15769 : 0 : {
15770 : 0 : tree _o1[2], _r1;
15771 : 0 : _o1[0] = captures[1];
15772 : 0 : _o1[1] = captures[3];
15773 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15774 : 0 : tem_op.resimplify (lseq, valueize);
15775 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15776 : 0 : if (!_r1) goto next_after_fail1735;
15777 : 0 : res_op->ops[0] = _r1;
15778 : : }
15779 : 0 : res_op->resimplify (lseq, valueize);
15780 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
15781 : 0 : return true;
15782 : : }
15783 : 0 : next_after_fail1735:;
15784 : : }
15785 : : }
15786 : : }
15787 : : break;
15788 : 0 : case CFN_POW:
15789 : 0 : if (gimple_call_num_args (_c2) == 2)
15790 : : {
15791 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
15792 : 0 : _q40 = do_valueize (valueize, _q40);
15793 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
15794 : 0 : _q41 = do_valueize (valueize, _q41);
15795 : 0 : switch (TREE_CODE (_q40))
15796 : : {
15797 : 0 : case REAL_CST:
15798 : 0 : {
15799 : 0 : {
15800 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
15801 : 0 : if (flag_unsafe_math_optimizations
15802 : : )
15803 : : {
15804 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15805 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15806 : : )
15807 : : {
15808 : 0 : gimple_seq *lseq = seq;
15809 : 0 : if (lseq
15810 : 0 : && (!single_use (captures[0])
15811 : 0 : || !single_use (captures[3])))
15812 : 0 : lseq = NULL;
15813 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1736;
15814 : 0 : {
15815 : 0 : res_op->set_op (CFN_EXP, type, 1);
15816 : 0 : {
15817 : 0 : tree _o1[2], _r1;
15818 : 0 : {
15819 : 0 : tree _o2[2], _r2;
15820 : 0 : {
15821 : 0 : tree _o3[1], _r3;
15822 : 0 : _o3[0] = captures[1];
15823 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG, TREE_TYPE (_o3[0]), _o3[0]);
15824 : 0 : tem_op.resimplify (lseq, valueize);
15825 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15826 : 0 : if (!_r3) goto next_after_fail1736;
15827 : 0 : _o2[0] = _r3;
15828 : : }
15829 : 0 : _o2[1] = captures[2];
15830 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15831 : 0 : tem_op.resimplify (lseq, valueize);
15832 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15833 : 0 : if (!_r2) goto next_after_fail1736;
15834 : 0 : _o1[0] = _r2;
15835 : : }
15836 : 0 : _o1[1] = captures[4];
15837 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15838 : 0 : tem_op.resimplify (lseq, valueize);
15839 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15840 : 0 : if (!_r1) goto next_after_fail1736;
15841 : 0 : res_op->ops[0] = _r1;
15842 : : }
15843 : 0 : res_op->resimplify (lseq, valueize);
15844 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15845 : 0 : return true;
15846 : : }
15847 : 0 : next_after_fail1736:;
15848 : : }
15849 : : }
15850 : : }
15851 : 0 : break;
15852 : : }
15853 : : default:;
15854 : : }
15855 : : }
15856 : : break;
15857 : : default:;
15858 : : }
15859 : : }
15860 : : break;
15861 : : default:;
15862 : : }
15863 : : }
15864 : : break;
15865 : 0 : case CFN_POW:
15866 : 0 : if (gimple_call_num_args (_c1) == 2)
15867 : : {
15868 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15869 : 0 : _q20 = do_valueize (valueize, _q20);
15870 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
15871 : 0 : _q21 = do_valueize (valueize, _q21);
15872 : 0 : switch (TREE_CODE (_q20))
15873 : : {
15874 : 0 : case REAL_CST:
15875 : 0 : {
15876 : 0 : switch (TREE_CODE (_p1))
15877 : : {
15878 : 0 : case SSA_NAME:
15879 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15880 : : {
15881 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
15882 : 0 : switch (gimple_call_combined_fn (_c2))
15883 : : {
15884 : 0 : case CFN_EXP:
15885 : 0 : if (gimple_call_num_args (_c2) == 1)
15886 : : {
15887 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15888 : 0 : _q50 = do_valueize (valueize, _q50);
15889 : 0 : {
15890 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15891 : 0 : if (flag_unsafe_math_optimizations
15892 : : )
15893 : : {
15894 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15895 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15896 : : )
15897 : : {
15898 : 0 : gimple_seq *lseq = seq;
15899 : 0 : if (lseq
15900 : 0 : && (!single_use (captures[0])
15901 : 0 : || !single_use (captures[3])))
15902 : 0 : lseq = NULL;
15903 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1737;
15904 : 0 : {
15905 : 0 : res_op->set_op (CFN_EXP, type, 1);
15906 : 0 : {
15907 : 0 : tree _o1[2], _r1;
15908 : 0 : {
15909 : 0 : tree _o2[2], _r2;
15910 : 0 : {
15911 : 0 : tree _o3[1], _r3;
15912 : 0 : _o3[0] = captures[1];
15913 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG, TREE_TYPE (_o3[0]), _o3[0]);
15914 : 0 : tem_op.resimplify (lseq, valueize);
15915 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15916 : 0 : if (!_r3) goto next_after_fail1737;
15917 : 0 : _o2[0] = _r3;
15918 : : }
15919 : 0 : _o2[1] = captures[2];
15920 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15921 : 0 : tem_op.resimplify (lseq, valueize);
15922 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15923 : 0 : if (!_r2) goto next_after_fail1737;
15924 : 0 : _o1[0] = _r2;
15925 : : }
15926 : 0 : _o1[1] = captures[4];
15927 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15928 : 0 : tem_op.resimplify (lseq, valueize);
15929 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15930 : 0 : if (!_r1) goto next_after_fail1737;
15931 : 0 : res_op->ops[0] = _r1;
15932 : : }
15933 : 0 : res_op->resimplify (lseq, valueize);
15934 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15935 : 0 : return true;
15936 : : }
15937 : 0 : next_after_fail1737:;
15938 : : }
15939 : : }
15940 : : }
15941 : : }
15942 : : break;
15943 : 0 : case CFN_EXP2:
15944 : 0 : if (gimple_call_num_args (_c2) == 1)
15945 : : {
15946 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
15947 : 0 : _q50 = do_valueize (valueize, _q50);
15948 : 0 : {
15949 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
15950 : 0 : if (flag_unsafe_math_optimizations
15951 : : )
15952 : : {
15953 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
15954 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
15955 : : )
15956 : : {
15957 : 0 : gimple_seq *lseq = seq;
15958 : 0 : if (lseq
15959 : 0 : && (!single_use (captures[0])
15960 : 0 : || !single_use (captures[3])))
15961 : 0 : lseq = NULL;
15962 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1738;
15963 : 0 : {
15964 : 0 : res_op->set_op (CFN_EXP2, type, 1);
15965 : 0 : {
15966 : 0 : tree _o1[2], _r1;
15967 : 0 : {
15968 : 0 : tree _o2[2], _r2;
15969 : 0 : {
15970 : 0 : tree _o3[1], _r3;
15971 : 0 : _o3[0] = captures[1];
15972 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG2, TREE_TYPE (_o3[0]), _o3[0]);
15973 : 0 : tem_op.resimplify (lseq, valueize);
15974 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
15975 : 0 : if (!_r3) goto next_after_fail1738;
15976 : 0 : _o2[0] = _r3;
15977 : : }
15978 : 0 : _o2[1] = captures[2];
15979 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
15980 : 0 : tem_op.resimplify (lseq, valueize);
15981 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
15982 : 0 : if (!_r2) goto next_after_fail1738;
15983 : 0 : _o1[0] = _r2;
15984 : : }
15985 : 0 : _o1[1] = captures[4];
15986 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15987 : 0 : tem_op.resimplify (lseq, valueize);
15988 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15989 : 0 : if (!_r1) goto next_after_fail1738;
15990 : 0 : res_op->ops[0] = _r1;
15991 : : }
15992 : 0 : res_op->resimplify (lseq, valueize);
15993 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
15994 : 0 : return true;
15995 : : }
15996 : 0 : next_after_fail1738:;
15997 : : }
15998 : : }
15999 : : }
16000 : : }
16001 : : break;
16002 : 0 : case CFN_EXP10:
16003 : 0 : if (gimple_call_num_args (_c2) == 1)
16004 : : {
16005 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
16006 : 0 : _q50 = do_valueize (valueize, _q50);
16007 : 0 : {
16008 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
16009 : 0 : if (flag_unsafe_math_optimizations
16010 : : )
16011 : : {
16012 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
16013 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
16014 : : )
16015 : : {
16016 : 0 : gimple_seq *lseq = seq;
16017 : 0 : if (lseq
16018 : 0 : && (!single_use (captures[0])
16019 : 0 : || !single_use (captures[3])))
16020 : 0 : lseq = NULL;
16021 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1739;
16022 : 0 : {
16023 : 0 : res_op->set_op (CFN_EXP10, type, 1);
16024 : 0 : {
16025 : 0 : tree _o1[2], _r1;
16026 : 0 : {
16027 : 0 : tree _o2[2], _r2;
16028 : 0 : {
16029 : 0 : tree _o3[1], _r3;
16030 : 0 : _o3[0] = captures[1];
16031 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG10, TREE_TYPE (_o3[0]), _o3[0]);
16032 : 0 : tem_op.resimplify (lseq, valueize);
16033 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
16034 : 0 : if (!_r3) goto next_after_fail1739;
16035 : 0 : _o2[0] = _r3;
16036 : : }
16037 : 0 : _o2[1] = captures[2];
16038 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16039 : 0 : tem_op.resimplify (lseq, valueize);
16040 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16041 : 0 : if (!_r2) goto next_after_fail1739;
16042 : 0 : _o1[0] = _r2;
16043 : : }
16044 : 0 : _o1[1] = captures[4];
16045 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16046 : 0 : tem_op.resimplify (lseq, valueize);
16047 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16048 : 0 : if (!_r1) goto next_after_fail1739;
16049 : 0 : res_op->ops[0] = _r1;
16050 : : }
16051 : 0 : res_op->resimplify (lseq, valueize);
16052 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
16053 : 0 : return true;
16054 : : }
16055 : 0 : next_after_fail1739:;
16056 : : }
16057 : : }
16058 : : }
16059 : : }
16060 : : break;
16061 : : default:;
16062 : : }
16063 : : }
16064 : : break;
16065 : : default:;
16066 : : }
16067 : : break;
16068 : : }
16069 : 0 : default:;
16070 : : }
16071 : 0 : switch (TREE_CODE (_q21))
16072 : : {
16073 : 0 : case REAL_CST:
16074 : 0 : {
16075 : 0 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
16076 : : {
16077 : 0 : {
16078 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p0, _q21 };
16079 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_POW))
16080 : 0 : return true;
16081 : : }
16082 : : }
16083 : : break;
16084 : : }
16085 : : default:;
16086 : : }
16087 : : }
16088 : : break;
16089 : 0 : case CFN_TAN:
16090 : 0 : if (gimple_call_num_args (_c1) == 1)
16091 : : {
16092 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16093 : 0 : _q20 = do_valueize (valueize, _q20);
16094 : 0 : switch (TREE_CODE (_p1))
16095 : : {
16096 : 0 : case SSA_NAME:
16097 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16098 : : {
16099 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16100 : 0 : switch (gimple_call_combined_fn (_c2))
16101 : : {
16102 : 0 : case CFN_COS:
16103 : 0 : if (gimple_call_num_args (_c2) == 1)
16104 : : {
16105 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16106 : 0 : _q40 = do_valueize (valueize, _q40);
16107 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
16108 : : {
16109 : 0 : {
16110 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
16111 : 0 : if (gimple_simplify_200 (res_op, seq, valueize, type, captures, CFN_TAN, CFN_COS, CFN_SIN))
16112 : 0 : return true;
16113 : : }
16114 : : }
16115 : : }
16116 : : break;
16117 : : default:;
16118 : : }
16119 : : }
16120 : : break;
16121 : : default:;
16122 : : }
16123 : : }
16124 : : break;
16125 : 65 : case CFN_BUILT_IN_POW10F:
16126 : 65 : if (gimple_call_num_args (_c1) == 1)
16127 : : {
16128 : 65 : tree _q20 = gimple_call_arg (_c1, 0);
16129 : 65 : _q20 = do_valueize (valueize, _q20);
16130 : 65 : switch (TREE_CODE (_p1))
16131 : : {
16132 : 65 : case SSA_NAME:
16133 : 65 : if (gimple *_d2 = get_def (valueize, _p1))
16134 : : {
16135 : 60 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16136 : 18 : switch (gimple_call_combined_fn (_c2))
16137 : : {
16138 : 0 : case CFN_BUILT_IN_POWF:
16139 : 0 : if (gimple_call_num_args (_c2) == 2)
16140 : : {
16141 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16142 : 0 : _q40 = do_valueize (valueize, _q40);
16143 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
16144 : 0 : _q41 = do_valueize (valueize, _q41);
16145 : 0 : switch (TREE_CODE (_q40))
16146 : : {
16147 : 0 : case REAL_CST:
16148 : 0 : {
16149 : 0 : {
16150 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
16151 : 0 : if (flag_unsafe_math_optimizations
16152 : : )
16153 : : {
16154 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
16155 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
16156 : : )
16157 : : {
16158 : 0 : gimple_seq *lseq = seq;
16159 : 0 : if (lseq
16160 : 0 : && (!single_use (captures[0])
16161 : 0 : || !single_use (captures[3])))
16162 : 0 : lseq = NULL;
16163 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1740;
16164 : 0 : {
16165 : 0 : res_op->set_op (CFN_BUILT_IN_POW10F, type, 1);
16166 : 0 : {
16167 : 0 : tree _o1[2], _r1;
16168 : 0 : {
16169 : 0 : tree _o2[2], _r2;
16170 : 0 : {
16171 : 0 : tree _o3[1], _r3;
16172 : 0 : _o3[0] = captures[1];
16173 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10F, TREE_TYPE (_o3[0]), _o3[0]);
16174 : 0 : tem_op.resimplify (lseq, valueize);
16175 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
16176 : 0 : if (!_r3) goto next_after_fail1740;
16177 : 0 : _o2[0] = _r3;
16178 : : }
16179 : 0 : _o2[1] = captures[2];
16180 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16181 : 0 : tem_op.resimplify (lseq, valueize);
16182 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16183 : 0 : if (!_r2) goto next_after_fail1740;
16184 : 0 : _o1[0] = _r2;
16185 : : }
16186 : 0 : _o1[1] = captures[4];
16187 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16188 : 0 : tem_op.resimplify (lseq, valueize);
16189 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16190 : 0 : if (!_r1) goto next_after_fail1740;
16191 : 0 : res_op->ops[0] = _r1;
16192 : : }
16193 : 0 : res_op->resimplify (lseq, valueize);
16194 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
16195 : 0 : return true;
16196 : : }
16197 : 0 : next_after_fail1740:;
16198 : : }
16199 : : }
16200 : : }
16201 : 0 : break;
16202 : : }
16203 : : default:;
16204 : : }
16205 : : }
16206 : : break;
16207 : 18 : case CFN_BUILT_IN_POW10F:
16208 : 18 : if (gimple_call_num_args (_c2) == 1)
16209 : : {
16210 : 18 : tree _q40 = gimple_call_arg (_c2, 0);
16211 : 18 : _q40 = do_valueize (valueize, _q40);
16212 : 18 : {
16213 : 18 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16214 : 18 : if (flag_unsafe_math_optimizations
16215 : : )
16216 : : {
16217 : 18 : gimple_seq *lseq = seq;
16218 : 18 : if (lseq
16219 : 12 : && (!single_use (captures[0])
16220 : 12 : || !single_use (captures[2])))
16221 : 6 : lseq = NULL;
16222 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1741;
16223 : 18 : {
16224 : 18 : res_op->set_op (CFN_BUILT_IN_POW10F, type, 1);
16225 : 18 : {
16226 : 18 : tree _o1[2], _r1;
16227 : 18 : _o1[0] = captures[1];
16228 : 18 : _o1[1] = captures[3];
16229 : 18 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16230 : 18 : tem_op.resimplify (lseq, valueize);
16231 : 18 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16232 : 18 : if (!_r1) goto next_after_fail1741;
16233 : 12 : res_op->ops[0] = _r1;
16234 : : }
16235 : 12 : res_op->resimplify (lseq, valueize);
16236 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
16237 : 12 : return true;
16238 : : }
16239 : 6 : next_after_fail1741:;
16240 : : }
16241 : : }
16242 : : }
16243 : : break;
16244 : : default:;
16245 : : }
16246 : : }
16247 : : break;
16248 : : default:;
16249 : : }
16250 : : }
16251 : : break;
16252 : 65 : case CFN_BUILT_IN_POW10L:
16253 : 65 : if (gimple_call_num_args (_c1) == 1)
16254 : : {
16255 : 65 : tree _q20 = gimple_call_arg (_c1, 0);
16256 : 65 : _q20 = do_valueize (valueize, _q20);
16257 : 65 : switch (TREE_CODE (_p1))
16258 : : {
16259 : 65 : case SSA_NAME:
16260 : 65 : if (gimple *_d2 = get_def (valueize, _p1))
16261 : : {
16262 : 60 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16263 : 18 : switch (gimple_call_combined_fn (_c2))
16264 : : {
16265 : 0 : case CFN_BUILT_IN_POWL:
16266 : 0 : if (gimple_call_num_args (_c2) == 2)
16267 : : {
16268 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16269 : 0 : _q40 = do_valueize (valueize, _q40);
16270 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
16271 : 0 : _q41 = do_valueize (valueize, _q41);
16272 : 0 : switch (TREE_CODE (_q40))
16273 : : {
16274 : 0 : case REAL_CST:
16275 : 0 : {
16276 : 0 : {
16277 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
16278 : 0 : if (flag_unsafe_math_optimizations
16279 : : )
16280 : : {
16281 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
16282 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
16283 : : )
16284 : : {
16285 : 0 : gimple_seq *lseq = seq;
16286 : 0 : if (lseq
16287 : 0 : && (!single_use (captures[0])
16288 : 0 : || !single_use (captures[3])))
16289 : 0 : lseq = NULL;
16290 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1742;
16291 : 0 : {
16292 : 0 : res_op->set_op (CFN_BUILT_IN_POW10L, type, 1);
16293 : 0 : {
16294 : 0 : tree _o1[2], _r1;
16295 : 0 : {
16296 : 0 : tree _o2[2], _r2;
16297 : 0 : {
16298 : 0 : tree _o3[1], _r3;
16299 : 0 : _o3[0] = captures[1];
16300 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10L, TREE_TYPE (_o3[0]), _o3[0]);
16301 : 0 : tem_op.resimplify (lseq, valueize);
16302 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
16303 : 0 : if (!_r3) goto next_after_fail1742;
16304 : 0 : _o2[0] = _r3;
16305 : : }
16306 : 0 : _o2[1] = captures[2];
16307 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16308 : 0 : tem_op.resimplify (lseq, valueize);
16309 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16310 : 0 : if (!_r2) goto next_after_fail1742;
16311 : 0 : _o1[0] = _r2;
16312 : : }
16313 : 0 : _o1[1] = captures[4];
16314 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16315 : 0 : tem_op.resimplify (lseq, valueize);
16316 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16317 : 0 : if (!_r1) goto next_after_fail1742;
16318 : 0 : res_op->ops[0] = _r1;
16319 : : }
16320 : 0 : res_op->resimplify (lseq, valueize);
16321 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
16322 : 0 : return true;
16323 : : }
16324 : 0 : next_after_fail1742:;
16325 : : }
16326 : : }
16327 : : }
16328 : 0 : break;
16329 : : }
16330 : : default:;
16331 : : }
16332 : : }
16333 : : break;
16334 : 18 : case CFN_BUILT_IN_POW10L:
16335 : 18 : if (gimple_call_num_args (_c2) == 1)
16336 : : {
16337 : 18 : tree _q40 = gimple_call_arg (_c2, 0);
16338 : 18 : _q40 = do_valueize (valueize, _q40);
16339 : 18 : {
16340 : 18 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16341 : 18 : if (flag_unsafe_math_optimizations
16342 : : )
16343 : : {
16344 : 18 : gimple_seq *lseq = seq;
16345 : 18 : if (lseq
16346 : 12 : && (!single_use (captures[0])
16347 : 12 : || !single_use (captures[2])))
16348 : 6 : lseq = NULL;
16349 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1743;
16350 : 18 : {
16351 : 18 : res_op->set_op (CFN_BUILT_IN_POW10L, type, 1);
16352 : 18 : {
16353 : 18 : tree _o1[2], _r1;
16354 : 18 : _o1[0] = captures[1];
16355 : 18 : _o1[1] = captures[3];
16356 : 18 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16357 : 18 : tem_op.resimplify (lseq, valueize);
16358 : 18 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16359 : 18 : if (!_r1) goto next_after_fail1743;
16360 : 12 : res_op->ops[0] = _r1;
16361 : : }
16362 : 12 : res_op->resimplify (lseq, valueize);
16363 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
16364 : 12 : return true;
16365 : : }
16366 : 6 : next_after_fail1743:;
16367 : : }
16368 : : }
16369 : : }
16370 : : break;
16371 : : default:;
16372 : : }
16373 : : }
16374 : : break;
16375 : : default:;
16376 : : }
16377 : : }
16378 : : break;
16379 : 0 : case CFN_BUILT_IN_SQRTF128X:
16380 : 0 : if (gimple_call_num_args (_c1) == 1)
16381 : : {
16382 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16383 : 0 : _q20 = do_valueize (valueize, _q20);
16384 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
16385 : : {
16386 : 0 : {
16387 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
16388 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SQRTF128X))
16389 : 0 : return true;
16390 : : }
16391 : : }
16392 : : }
16393 : : break;
16394 : 0 : case CFN_EXP2:
16395 : 0 : if (gimple_call_num_args (_c1) == 1)
16396 : : {
16397 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16398 : 0 : _q20 = do_valueize (valueize, _q20);
16399 : 0 : switch (TREE_CODE (_p1))
16400 : : {
16401 : 0 : case SSA_NAME:
16402 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16403 : : {
16404 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16405 : 0 : switch (gimple_call_combined_fn (_c2))
16406 : : {
16407 : 0 : case CFN_POW:
16408 : 0 : if (gimple_call_num_args (_c2) == 2)
16409 : : {
16410 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16411 : 0 : _q40 = do_valueize (valueize, _q40);
16412 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
16413 : 0 : _q41 = do_valueize (valueize, _q41);
16414 : 0 : switch (TREE_CODE (_q40))
16415 : : {
16416 : 0 : case REAL_CST:
16417 : 0 : {
16418 : 0 : {
16419 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
16420 : 0 : if (flag_unsafe_math_optimizations
16421 : : )
16422 : : {
16423 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
16424 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
16425 : : )
16426 : : {
16427 : 0 : gimple_seq *lseq = seq;
16428 : 0 : if (lseq
16429 : 0 : && (!single_use (captures[0])
16430 : 0 : || !single_use (captures[3])))
16431 : 0 : lseq = NULL;
16432 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1744;
16433 : 0 : {
16434 : 0 : res_op->set_op (CFN_EXP2, type, 1);
16435 : 0 : {
16436 : 0 : tree _o1[2], _r1;
16437 : 0 : {
16438 : 0 : tree _o2[2], _r2;
16439 : 0 : {
16440 : 0 : tree _o3[1], _r3;
16441 : 0 : _o3[0] = captures[1];
16442 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG2, TREE_TYPE (_o3[0]), _o3[0]);
16443 : 0 : tem_op.resimplify (lseq, valueize);
16444 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
16445 : 0 : if (!_r3) goto next_after_fail1744;
16446 : 0 : _o2[0] = _r3;
16447 : : }
16448 : 0 : _o2[1] = captures[2];
16449 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16450 : 0 : tem_op.resimplify (lseq, valueize);
16451 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16452 : 0 : if (!_r2) goto next_after_fail1744;
16453 : 0 : _o1[0] = _r2;
16454 : : }
16455 : 0 : _o1[1] = captures[4];
16456 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16457 : 0 : tem_op.resimplify (lseq, valueize);
16458 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16459 : 0 : if (!_r1) goto next_after_fail1744;
16460 : 0 : res_op->ops[0] = _r1;
16461 : : }
16462 : 0 : res_op->resimplify (lseq, valueize);
16463 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
16464 : 0 : return true;
16465 : : }
16466 : 0 : next_after_fail1744:;
16467 : : }
16468 : : }
16469 : : }
16470 : 0 : break;
16471 : : }
16472 : : default:;
16473 : : }
16474 : : }
16475 : : break;
16476 : 0 : case CFN_EXP2:
16477 : 0 : if (gimple_call_num_args (_c2) == 1)
16478 : : {
16479 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16480 : 0 : _q40 = do_valueize (valueize, _q40);
16481 : 0 : {
16482 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16483 : 0 : if (flag_unsafe_math_optimizations
16484 : : )
16485 : : {
16486 : 0 : gimple_seq *lseq = seq;
16487 : 0 : if (lseq
16488 : 0 : && (!single_use (captures[0])
16489 : 0 : || !single_use (captures[2])))
16490 : 0 : lseq = NULL;
16491 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1745;
16492 : 0 : {
16493 : 0 : res_op->set_op (CFN_EXP2, type, 1);
16494 : 0 : {
16495 : 0 : tree _o1[2], _r1;
16496 : 0 : _o1[0] = captures[1];
16497 : 0 : _o1[1] = captures[3];
16498 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16499 : 0 : tem_op.resimplify (lseq, valueize);
16500 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16501 : 0 : if (!_r1) goto next_after_fail1745;
16502 : 0 : res_op->ops[0] = _r1;
16503 : : }
16504 : 0 : res_op->resimplify (lseq, valueize);
16505 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
16506 : 0 : return true;
16507 : : }
16508 : 0 : next_after_fail1745:;
16509 : : }
16510 : : }
16511 : : }
16512 : : break;
16513 : : default:;
16514 : : }
16515 : : }
16516 : : break;
16517 : : default:;
16518 : : }
16519 : : }
16520 : : break;
16521 : 998 : case CFN_SQRT:
16522 : 998 : if (gimple_call_num_args (_c1) == 1)
16523 : : {
16524 : 998 : tree _q20 = gimple_call_arg (_c1, 0);
16525 : 998 : _q20 = do_valueize (valueize, _q20);
16526 : 998 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
16527 : : {
16528 : 0 : {
16529 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
16530 : 0 : if (gimple_simplify_198 (res_op, seq, valueize, type, captures, CFN_SQRT))
16531 : 0 : return true;
16532 : : }
16533 : : }
16534 : 998 : switch (TREE_CODE (_p1))
16535 : : {
16536 : 860 : case SSA_NAME:
16537 : 860 : if (gimple *_d2 = get_def (valueize, _p1))
16538 : : {
16539 : 855 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16540 : 137 : switch (gimple_call_combined_fn (_c2))
16541 : : {
16542 : 12 : case CFN_SQRT:
16543 : 12 : if (gimple_call_num_args (_c2) == 1)
16544 : : {
16545 : 12 : tree _q40 = gimple_call_arg (_c2, 0);
16546 : 12 : _q40 = do_valueize (valueize, _q40);
16547 : 12 : {
16548 : 12 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16549 : 12 : if (flag_unsafe_math_optimizations
16550 : : )
16551 : : {
16552 : 0 : gimple_seq *lseq = seq;
16553 : 0 : if (lseq
16554 : 0 : && (!single_use (captures[0])
16555 : 0 : || !single_use (captures[2])))
16556 : 0 : lseq = NULL;
16557 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1746;
16558 : 0 : {
16559 : 0 : res_op->set_op (CFN_SQRT, type, 1);
16560 : 0 : {
16561 : 0 : tree _o1[2], _r1;
16562 : 0 : _o1[0] = captures[1];
16563 : 0 : _o1[1] = captures[3];
16564 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16565 : 0 : tem_op.resimplify (lseq, valueize);
16566 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16567 : 0 : if (!_r1) goto next_after_fail1746;
16568 : 0 : res_op->ops[0] = _r1;
16569 : : }
16570 : 0 : res_op->resimplify (lseq, valueize);
16571 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
16572 : 0 : return true;
16573 : : }
16574 : 12 : next_after_fail1746:;
16575 : : }
16576 : : }
16577 : : }
16578 : : break;
16579 : : default:;
16580 : : }
16581 : : }
16582 : : break;
16583 : : default:;
16584 : : }
16585 : : }
16586 : : break;
16587 : 0 : case CFN_EXP10:
16588 : 0 : if (gimple_call_num_args (_c1) == 1)
16589 : : {
16590 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16591 : 0 : _q20 = do_valueize (valueize, _q20);
16592 : 0 : switch (TREE_CODE (_p1))
16593 : : {
16594 : 0 : case SSA_NAME:
16595 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16596 : : {
16597 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16598 : 0 : switch (gimple_call_combined_fn (_c2))
16599 : : {
16600 : 0 : case CFN_POW:
16601 : 0 : if (gimple_call_num_args (_c2) == 2)
16602 : : {
16603 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16604 : 0 : _q40 = do_valueize (valueize, _q40);
16605 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
16606 : 0 : _q41 = do_valueize (valueize, _q41);
16607 : 0 : switch (TREE_CODE (_q40))
16608 : : {
16609 : 0 : case REAL_CST:
16610 : 0 : {
16611 : 0 : {
16612 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
16613 : 0 : if (flag_unsafe_math_optimizations
16614 : : )
16615 : : {
16616 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
16617 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
16618 : : )
16619 : : {
16620 : 0 : gimple_seq *lseq = seq;
16621 : 0 : if (lseq
16622 : 0 : && (!single_use (captures[0])
16623 : 0 : || !single_use (captures[3])))
16624 : 0 : lseq = NULL;
16625 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1747;
16626 : 0 : {
16627 : 0 : res_op->set_op (CFN_EXP10, type, 1);
16628 : 0 : {
16629 : 0 : tree _o1[2], _r1;
16630 : 0 : {
16631 : 0 : tree _o2[2], _r2;
16632 : 0 : {
16633 : 0 : tree _o3[1], _r3;
16634 : 0 : _o3[0] = captures[1];
16635 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_LOG10, TREE_TYPE (_o3[0]), _o3[0]);
16636 : 0 : tem_op.resimplify (lseq, valueize);
16637 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
16638 : 0 : if (!_r3) goto next_after_fail1747;
16639 : 0 : _o2[0] = _r3;
16640 : : }
16641 : 0 : _o2[1] = captures[2];
16642 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16643 : 0 : tem_op.resimplify (lseq, valueize);
16644 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16645 : 0 : if (!_r2) goto next_after_fail1747;
16646 : 0 : _o1[0] = _r2;
16647 : : }
16648 : 0 : _o1[1] = captures[4];
16649 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16650 : 0 : tem_op.resimplify (lseq, valueize);
16651 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16652 : 0 : if (!_r1) goto next_after_fail1747;
16653 : 0 : res_op->ops[0] = _r1;
16654 : : }
16655 : 0 : res_op->resimplify (lseq, valueize);
16656 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
16657 : 0 : return true;
16658 : : }
16659 : 0 : next_after_fail1747:;
16660 : : }
16661 : : }
16662 : : }
16663 : 0 : break;
16664 : : }
16665 : : default:;
16666 : : }
16667 : : }
16668 : : break;
16669 : 0 : case CFN_EXP10:
16670 : 0 : if (gimple_call_num_args (_c2) == 1)
16671 : : {
16672 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16673 : 0 : _q40 = do_valueize (valueize, _q40);
16674 : 0 : {
16675 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16676 : 0 : if (flag_unsafe_math_optimizations
16677 : : )
16678 : : {
16679 : 0 : gimple_seq *lseq = seq;
16680 : 0 : if (lseq
16681 : 0 : && (!single_use (captures[0])
16682 : 0 : || !single_use (captures[2])))
16683 : 0 : lseq = NULL;
16684 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1748;
16685 : 0 : {
16686 : 0 : res_op->set_op (CFN_EXP10, type, 1);
16687 : 0 : {
16688 : 0 : tree _o1[2], _r1;
16689 : 0 : _o1[0] = captures[1];
16690 : 0 : _o1[1] = captures[3];
16691 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16692 : 0 : tem_op.resimplify (lseq, valueize);
16693 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16694 : 0 : if (!_r1) goto next_after_fail1748;
16695 : 0 : res_op->ops[0] = _r1;
16696 : : }
16697 : 0 : res_op->resimplify (lseq, valueize);
16698 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
16699 : 0 : return true;
16700 : : }
16701 : 0 : next_after_fail1748:;
16702 : : }
16703 : : }
16704 : : }
16705 : : break;
16706 : : default:;
16707 : : }
16708 : : }
16709 : : break;
16710 : : default:;
16711 : : }
16712 : : }
16713 : : break;
16714 : 0 : case CFN_BUILT_IN_CBRTF:
16715 : 0 : if (gimple_call_num_args (_c1) == 1)
16716 : : {
16717 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16718 : 0 : _q20 = do_valueize (valueize, _q20);
16719 : 0 : switch (TREE_CODE (_p1))
16720 : : {
16721 : 0 : case SSA_NAME:
16722 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16723 : : {
16724 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16725 : 0 : switch (gimple_call_combined_fn (_c2))
16726 : : {
16727 : 0 : case CFN_BUILT_IN_CBRTF:
16728 : 0 : if (gimple_call_num_args (_c2) == 1)
16729 : : {
16730 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16731 : 0 : _q40 = do_valueize (valueize, _q40);
16732 : 0 : {
16733 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16734 : 0 : if (flag_unsafe_math_optimizations
16735 : : )
16736 : : {
16737 : 0 : gimple_seq *lseq = seq;
16738 : 0 : if (lseq
16739 : 0 : && (!single_use (captures[0])
16740 : 0 : || !single_use (captures[2])))
16741 : 0 : lseq = NULL;
16742 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1749;
16743 : 0 : {
16744 : 0 : res_op->set_op (CFN_BUILT_IN_CBRTF, type, 1);
16745 : 0 : {
16746 : 0 : tree _o1[2], _r1;
16747 : 0 : _o1[0] = captures[1];
16748 : 0 : _o1[1] = captures[3];
16749 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16750 : 0 : tem_op.resimplify (lseq, valueize);
16751 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16752 : 0 : if (!_r1) goto next_after_fail1749;
16753 : 0 : res_op->ops[0] = _r1;
16754 : : }
16755 : 0 : res_op->resimplify (lseq, valueize);
16756 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
16757 : 0 : return true;
16758 : : }
16759 : 0 : next_after_fail1749:;
16760 : : }
16761 : : }
16762 : : }
16763 : : break;
16764 : : default:;
16765 : : }
16766 : : }
16767 : : break;
16768 : : default:;
16769 : : }
16770 : : }
16771 : : break;
16772 : 0 : case CFN_BUILT_IN_CBRTL:
16773 : 0 : if (gimple_call_num_args (_c1) == 1)
16774 : : {
16775 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16776 : 0 : _q20 = do_valueize (valueize, _q20);
16777 : 0 : switch (TREE_CODE (_p1))
16778 : : {
16779 : 0 : case SSA_NAME:
16780 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16781 : : {
16782 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16783 : 0 : switch (gimple_call_combined_fn (_c2))
16784 : : {
16785 : 0 : case CFN_BUILT_IN_CBRTL:
16786 : 0 : if (gimple_call_num_args (_c2) == 1)
16787 : : {
16788 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16789 : 0 : _q40 = do_valueize (valueize, _q40);
16790 : 0 : {
16791 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16792 : 0 : if (flag_unsafe_math_optimizations
16793 : : )
16794 : : {
16795 : 0 : gimple_seq *lseq = seq;
16796 : 0 : if (lseq
16797 : 0 : && (!single_use (captures[0])
16798 : 0 : || !single_use (captures[2])))
16799 : 0 : lseq = NULL;
16800 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1750;
16801 : 0 : {
16802 : 0 : res_op->set_op (CFN_BUILT_IN_CBRTL, type, 1);
16803 : 0 : {
16804 : 0 : tree _o1[2], _r1;
16805 : 0 : _o1[0] = captures[1];
16806 : 0 : _o1[1] = captures[3];
16807 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16808 : 0 : tem_op.resimplify (lseq, valueize);
16809 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16810 : 0 : if (!_r1) goto next_after_fail1750;
16811 : 0 : res_op->ops[0] = _r1;
16812 : : }
16813 : 0 : res_op->resimplify (lseq, valueize);
16814 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1004, __FILE__, __LINE__, true);
16815 : 0 : return true;
16816 : : }
16817 : 0 : next_after_fail1750:;
16818 : : }
16819 : : }
16820 : : }
16821 : : break;
16822 : : default:;
16823 : : }
16824 : : }
16825 : : break;
16826 : : default:;
16827 : : }
16828 : : }
16829 : : break;
16830 : 0 : case CFN_BUILT_IN_EXP10:
16831 : 0 : if (gimple_call_num_args (_c1) == 1)
16832 : : {
16833 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16834 : 0 : _q20 = do_valueize (valueize, _q20);
16835 : 0 : switch (TREE_CODE (_p1))
16836 : : {
16837 : 0 : case SSA_NAME:
16838 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16839 : : {
16840 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16841 : 0 : switch (gimple_call_combined_fn (_c2))
16842 : : {
16843 : 0 : case CFN_BUILT_IN_POW:
16844 : 0 : if (gimple_call_num_args (_c2) == 2)
16845 : : {
16846 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16847 : 0 : _q40 = do_valueize (valueize, _q40);
16848 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
16849 : 0 : _q41 = do_valueize (valueize, _q41);
16850 : 0 : switch (TREE_CODE (_q40))
16851 : : {
16852 : 0 : case REAL_CST:
16853 : 0 : {
16854 : 0 : {
16855 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
16856 : 0 : if (flag_unsafe_math_optimizations
16857 : : )
16858 : : {
16859 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
16860 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
16861 : : )
16862 : : {
16863 : 0 : gimple_seq *lseq = seq;
16864 : 0 : if (lseq
16865 : 0 : && (!single_use (captures[0])
16866 : 0 : || !single_use (captures[3])))
16867 : 0 : lseq = NULL;
16868 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1751;
16869 : 0 : {
16870 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10, type, 1);
16871 : 0 : {
16872 : 0 : tree _o1[2], _r1;
16873 : 0 : {
16874 : 0 : tree _o2[2], _r2;
16875 : 0 : {
16876 : 0 : tree _o3[1], _r3;
16877 : 0 : _o3[0] = captures[1];
16878 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o3[0]), _o3[0]);
16879 : 0 : tem_op.resimplify (lseq, valueize);
16880 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
16881 : 0 : if (!_r3) goto next_after_fail1751;
16882 : 0 : _o2[0] = _r3;
16883 : : }
16884 : 0 : _o2[1] = captures[2];
16885 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
16886 : 0 : tem_op.resimplify (lseq, valueize);
16887 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
16888 : 0 : if (!_r2) goto next_after_fail1751;
16889 : 0 : _o1[0] = _r2;
16890 : : }
16891 : 0 : _o1[1] = captures[4];
16892 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16893 : 0 : tem_op.resimplify (lseq, valueize);
16894 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16895 : 0 : if (!_r1) goto next_after_fail1751;
16896 : 0 : res_op->ops[0] = _r1;
16897 : : }
16898 : 0 : res_op->resimplify (lseq, valueize);
16899 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
16900 : 0 : return true;
16901 : : }
16902 : 0 : next_after_fail1751:;
16903 : : }
16904 : : }
16905 : : }
16906 : 0 : break;
16907 : : }
16908 : : default:;
16909 : : }
16910 : : }
16911 : : break;
16912 : 0 : case CFN_BUILT_IN_EXP10:
16913 : 0 : if (gimple_call_num_args (_c2) == 1)
16914 : : {
16915 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16916 : 0 : _q40 = do_valueize (valueize, _q40);
16917 : 0 : {
16918 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
16919 : 0 : if (flag_unsafe_math_optimizations
16920 : : )
16921 : : {
16922 : 0 : gimple_seq *lseq = seq;
16923 : 0 : if (lseq
16924 : 0 : && (!single_use (captures[0])
16925 : 0 : || !single_use (captures[2])))
16926 : 0 : lseq = NULL;
16927 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1752;
16928 : 0 : {
16929 : 0 : res_op->set_op (CFN_BUILT_IN_EXP10, type, 1);
16930 : 0 : {
16931 : 0 : tree _o1[2], _r1;
16932 : 0 : _o1[0] = captures[1];
16933 : 0 : _o1[1] = captures[3];
16934 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
16935 : 0 : tem_op.resimplify (lseq, valueize);
16936 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16937 : 0 : if (!_r1) goto next_after_fail1752;
16938 : 0 : res_op->ops[0] = _r1;
16939 : : }
16940 : 0 : res_op->resimplify (lseq, valueize);
16941 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
16942 : 0 : return true;
16943 : : }
16944 : 0 : next_after_fail1752:;
16945 : : }
16946 : : }
16947 : : }
16948 : : break;
16949 : : default:;
16950 : : }
16951 : : }
16952 : : break;
16953 : : default:;
16954 : : }
16955 : : }
16956 : : break;
16957 : 0 : case CFN_BUILT_IN_EXP2F:
16958 : 0 : if (gimple_call_num_args (_c1) == 1)
16959 : : {
16960 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
16961 : 0 : _q20 = do_valueize (valueize, _q20);
16962 : 0 : switch (TREE_CODE (_p1))
16963 : : {
16964 : 0 : case SSA_NAME:
16965 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16966 : : {
16967 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
16968 : 0 : switch (gimple_call_combined_fn (_c2))
16969 : : {
16970 : 0 : case CFN_BUILT_IN_POWF:
16971 : 0 : if (gimple_call_num_args (_c2) == 2)
16972 : : {
16973 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
16974 : 0 : _q40 = do_valueize (valueize, _q40);
16975 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
16976 : 0 : _q41 = do_valueize (valueize, _q41);
16977 : 0 : switch (TREE_CODE (_q40))
16978 : : {
16979 : 0 : case REAL_CST:
16980 : 0 : {
16981 : 0 : {
16982 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
16983 : 0 : if (flag_unsafe_math_optimizations
16984 : : )
16985 : : {
16986 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
16987 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
16988 : : )
16989 : : {
16990 : 0 : gimple_seq *lseq = seq;
16991 : 0 : if (lseq
16992 : 0 : && (!single_use (captures[0])
16993 : 0 : || !single_use (captures[3])))
16994 : 0 : lseq = NULL;
16995 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1753;
16996 : 0 : {
16997 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2F, type, 1);
16998 : 0 : {
16999 : 0 : tree _o1[2], _r1;
17000 : 0 : {
17001 : 0 : tree _o2[2], _r2;
17002 : 0 : {
17003 : 0 : tree _o3[1], _r3;
17004 : 0 : _o3[0] = captures[1];
17005 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2F, TREE_TYPE (_o3[0]), _o3[0]);
17006 : 0 : tem_op.resimplify (lseq, valueize);
17007 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
17008 : 0 : if (!_r3) goto next_after_fail1753;
17009 : 0 : _o2[0] = _r3;
17010 : : }
17011 : 0 : _o2[1] = captures[2];
17012 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
17013 : 0 : tem_op.resimplify (lseq, valueize);
17014 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17015 : 0 : if (!_r2) goto next_after_fail1753;
17016 : 0 : _o1[0] = _r2;
17017 : : }
17018 : 0 : _o1[1] = captures[4];
17019 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17020 : 0 : tem_op.resimplify (lseq, valueize);
17021 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17022 : 0 : if (!_r1) goto next_after_fail1753;
17023 : 0 : res_op->ops[0] = _r1;
17024 : : }
17025 : 0 : res_op->resimplify (lseq, valueize);
17026 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
17027 : 0 : return true;
17028 : : }
17029 : 0 : next_after_fail1753:;
17030 : : }
17031 : : }
17032 : : }
17033 : 0 : break;
17034 : : }
17035 : : default:;
17036 : : }
17037 : : }
17038 : : break;
17039 : 0 : case CFN_BUILT_IN_EXP2F:
17040 : 0 : if (gimple_call_num_args (_c2) == 1)
17041 : : {
17042 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17043 : 0 : _q40 = do_valueize (valueize, _q40);
17044 : 0 : {
17045 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17046 : 0 : if (flag_unsafe_math_optimizations
17047 : : )
17048 : : {
17049 : 0 : gimple_seq *lseq = seq;
17050 : 0 : if (lseq
17051 : 0 : && (!single_use (captures[0])
17052 : 0 : || !single_use (captures[2])))
17053 : 0 : lseq = NULL;
17054 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1754;
17055 : 0 : {
17056 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2F, type, 1);
17057 : 0 : {
17058 : 0 : tree _o1[2], _r1;
17059 : 0 : _o1[0] = captures[1];
17060 : 0 : _o1[1] = captures[3];
17061 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17062 : 0 : tem_op.resimplify (lseq, valueize);
17063 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17064 : 0 : if (!_r1) goto next_after_fail1754;
17065 : 0 : res_op->ops[0] = _r1;
17066 : : }
17067 : 0 : res_op->resimplify (lseq, valueize);
17068 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
17069 : 0 : return true;
17070 : : }
17071 : 0 : next_after_fail1754:;
17072 : : }
17073 : : }
17074 : : }
17075 : : break;
17076 : : default:;
17077 : : }
17078 : : }
17079 : : break;
17080 : : default:;
17081 : : }
17082 : : }
17083 : : break;
17084 : 0 : case CFN_BUILT_IN_EXP2L:
17085 : 0 : if (gimple_call_num_args (_c1) == 1)
17086 : : {
17087 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
17088 : 0 : _q20 = do_valueize (valueize, _q20);
17089 : 0 : switch (TREE_CODE (_p1))
17090 : : {
17091 : 0 : case SSA_NAME:
17092 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
17093 : : {
17094 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17095 : 0 : switch (gimple_call_combined_fn (_c2))
17096 : : {
17097 : 0 : case CFN_BUILT_IN_POWL:
17098 : 0 : if (gimple_call_num_args (_c2) == 2)
17099 : : {
17100 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17101 : 0 : _q40 = do_valueize (valueize, _q40);
17102 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
17103 : 0 : _q41 = do_valueize (valueize, _q41);
17104 : 0 : switch (TREE_CODE (_q40))
17105 : : {
17106 : 0 : case REAL_CST:
17107 : 0 : {
17108 : 0 : {
17109 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
17110 : 0 : if (flag_unsafe_math_optimizations
17111 : : )
17112 : : {
17113 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
17114 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
17115 : : )
17116 : : {
17117 : 0 : gimple_seq *lseq = seq;
17118 : 0 : if (lseq
17119 : 0 : && (!single_use (captures[0])
17120 : 0 : || !single_use (captures[3])))
17121 : 0 : lseq = NULL;
17122 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1755;
17123 : 0 : {
17124 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2L, type, 1);
17125 : 0 : {
17126 : 0 : tree _o1[2], _r1;
17127 : 0 : {
17128 : 0 : tree _o2[2], _r2;
17129 : 0 : {
17130 : 0 : tree _o3[1], _r3;
17131 : 0 : _o3[0] = captures[1];
17132 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2L, TREE_TYPE (_o3[0]), _o3[0]);
17133 : 0 : tem_op.resimplify (lseq, valueize);
17134 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
17135 : 0 : if (!_r3) goto next_after_fail1755;
17136 : 0 : _o2[0] = _r3;
17137 : : }
17138 : 0 : _o2[1] = captures[2];
17139 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
17140 : 0 : tem_op.resimplify (lseq, valueize);
17141 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17142 : 0 : if (!_r2) goto next_after_fail1755;
17143 : 0 : _o1[0] = _r2;
17144 : : }
17145 : 0 : _o1[1] = captures[4];
17146 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17147 : 0 : tem_op.resimplify (lseq, valueize);
17148 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17149 : 0 : if (!_r1) goto next_after_fail1755;
17150 : 0 : res_op->ops[0] = _r1;
17151 : : }
17152 : 0 : res_op->resimplify (lseq, valueize);
17153 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
17154 : 0 : return true;
17155 : : }
17156 : 0 : next_after_fail1755:;
17157 : : }
17158 : : }
17159 : : }
17160 : 0 : break;
17161 : : }
17162 : : default:;
17163 : : }
17164 : : }
17165 : : break;
17166 : 0 : case CFN_BUILT_IN_EXP2L:
17167 : 0 : if (gimple_call_num_args (_c2) == 1)
17168 : : {
17169 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17170 : 0 : _q40 = do_valueize (valueize, _q40);
17171 : 0 : {
17172 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17173 : 0 : if (flag_unsafe_math_optimizations
17174 : : )
17175 : : {
17176 : 0 : gimple_seq *lseq = seq;
17177 : 0 : if (lseq
17178 : 0 : && (!single_use (captures[0])
17179 : 0 : || !single_use (captures[2])))
17180 : 0 : lseq = NULL;
17181 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1756;
17182 : 0 : {
17183 : 0 : res_op->set_op (CFN_BUILT_IN_EXP2L, type, 1);
17184 : 0 : {
17185 : 0 : tree _o1[2], _r1;
17186 : 0 : _o1[0] = captures[1];
17187 : 0 : _o1[1] = captures[3];
17188 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17189 : 0 : tem_op.resimplify (lseq, valueize);
17190 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17191 : 0 : if (!_r1) goto next_after_fail1756;
17192 : 0 : res_op->ops[0] = _r1;
17193 : : }
17194 : 0 : res_op->resimplify (lseq, valueize);
17195 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
17196 : 0 : return true;
17197 : : }
17198 : 0 : next_after_fail1756:;
17199 : : }
17200 : : }
17201 : : }
17202 : : break;
17203 : : default:;
17204 : : }
17205 : : }
17206 : : break;
17207 : : default:;
17208 : : }
17209 : : }
17210 : : break;
17211 : 65 : case CFN_BUILT_IN_POW10:
17212 : 65 : if (gimple_call_num_args (_c1) == 1)
17213 : : {
17214 : 65 : tree _q20 = gimple_call_arg (_c1, 0);
17215 : 65 : _q20 = do_valueize (valueize, _q20);
17216 : 65 : switch (TREE_CODE (_p1))
17217 : : {
17218 : 65 : case SSA_NAME:
17219 : 65 : if (gimple *_d2 = get_def (valueize, _p1))
17220 : : {
17221 : 60 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17222 : 18 : switch (gimple_call_combined_fn (_c2))
17223 : : {
17224 : 0 : case CFN_BUILT_IN_POW:
17225 : 0 : if (gimple_call_num_args (_c2) == 2)
17226 : : {
17227 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
17228 : 0 : _q40 = do_valueize (valueize, _q40);
17229 : 0 : tree _q41 = gimple_call_arg (_c2, 1);
17230 : 0 : _q41 = do_valueize (valueize, _q41);
17231 : 0 : switch (TREE_CODE (_q40))
17232 : : {
17233 : 0 : case REAL_CST:
17234 : 0 : {
17235 : 0 : {
17236 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _p0, _q20 };
17237 : 0 : if (flag_unsafe_math_optimizations
17238 : : )
17239 : : {
17240 : 0 : if (real_compare (GT_EXPR, TREE_REAL_CST_PTR (captures[1]), &dconst0)
17241 : 0 : && real_isfinite (TREE_REAL_CST_PTR (captures[1]))
17242 : : )
17243 : : {
17244 : 0 : gimple_seq *lseq = seq;
17245 : 0 : if (lseq
17246 : 0 : && (!single_use (captures[0])
17247 : 0 : || !single_use (captures[3])))
17248 : 0 : lseq = NULL;
17249 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1757;
17250 : 0 : {
17251 : 0 : res_op->set_op (CFN_BUILT_IN_POW10, type, 1);
17252 : 0 : {
17253 : 0 : tree _o1[2], _r1;
17254 : 0 : {
17255 : 0 : tree _o2[2], _r2;
17256 : 0 : {
17257 : 0 : tree _o3[1], _r3;
17258 : 0 : _o3[0] = captures[1];
17259 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG10, TREE_TYPE (_o3[0]), _o3[0]);
17260 : 0 : tem_op.resimplify (lseq, valueize);
17261 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
17262 : 0 : if (!_r3) goto next_after_fail1757;
17263 : 0 : _o2[0] = _r3;
17264 : : }
17265 : 0 : _o2[1] = captures[2];
17266 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
17267 : 0 : tem_op.resimplify (lseq, valueize);
17268 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17269 : 0 : if (!_r2) goto next_after_fail1757;
17270 : 0 : _o1[0] = _r2;
17271 : : }
17272 : 0 : _o1[1] = captures[4];
17273 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17274 : 0 : tem_op.resimplify (lseq, valueize);
17275 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17276 : 0 : if (!_r1) goto next_after_fail1757;
17277 : 0 : res_op->ops[0] = _r1;
17278 : : }
17279 : 0 : res_op->resimplify (lseq, valueize);
17280 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1006, __FILE__, __LINE__, true);
17281 : 0 : return true;
17282 : : }
17283 : 0 : next_after_fail1757:;
17284 : : }
17285 : : }
17286 : : }
17287 : 0 : break;
17288 : : }
17289 : : default:;
17290 : : }
17291 : : }
17292 : : break;
17293 : 18 : case CFN_BUILT_IN_POW10:
17294 : 18 : if (gimple_call_num_args (_c2) == 1)
17295 : : {
17296 : 18 : tree _q40 = gimple_call_arg (_c2, 0);
17297 : 18 : _q40 = do_valueize (valueize, _q40);
17298 : 18 : {
17299 : 18 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
17300 : 18 : if (flag_unsafe_math_optimizations
17301 : : )
17302 : : {
17303 : 18 : gimple_seq *lseq = seq;
17304 : 18 : if (lseq
17305 : 12 : && (!single_use (captures[0])
17306 : 12 : || !single_use (captures[2])))
17307 : 6 : lseq = NULL;
17308 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1758;
17309 : 18 : {
17310 : 18 : res_op->set_op (CFN_BUILT_IN_POW10, type, 1);
17311 : 18 : {
17312 : 18 : tree _o1[2], _r1;
17313 : 18 : _o1[0] = captures[1];
17314 : 18 : _o1[1] = captures[3];
17315 : 18 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17316 : 18 : tem_op.resimplify (lseq, valueize);
17317 : 18 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17318 : 18 : if (!_r1) goto next_after_fail1758;
17319 : 12 : res_op->ops[0] = _r1;
17320 : : }
17321 : 12 : res_op->resimplify (lseq, valueize);
17322 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1005, __FILE__, __LINE__, true);
17323 : 12 : return true;
17324 : : }
17325 : 6 : next_after_fail1758:;
17326 : : }
17327 : : }
17328 : : }
17329 : : break;
17330 : : default:;
17331 : : }
17332 : : }
17333 : : break;
17334 : : default:;
17335 : : }
17336 : : }
17337 : : break;
17338 : : default:;
17339 : : }
17340 : : }
17341 : : break;
17342 : 33996783 : default:;
17343 : : }
17344 : 33996783 : switch (TREE_CODE (_p1))
17345 : : {
17346 : 5609915 : case SSA_NAME:
17347 : 5609915 : if (gimple *_d1 = get_def (valueize, _p1))
17348 : : {
17349 : 4268871 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
17350 : 103601 : switch (gimple_call_combined_fn (_c1))
17351 : : {
17352 : 566 : case CFN_BUILT_IN_POW:
17353 : 566 : if (gimple_call_num_args (_c1) == 2)
17354 : : {
17355 : 566 : tree _q30 = gimple_call_arg (_c1, 0);
17356 : 566 : _q30 = do_valueize (valueize, _q30);
17357 : 566 : tree _q31 = gimple_call_arg (_c1, 1);
17358 : 566 : _q31 = do_valueize (valueize, _q31);
17359 : 566 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
17360 : : {
17361 : 0 : switch (TREE_CODE (_q31))
17362 : : {
17363 : 0 : case REAL_CST:
17364 : 0 : {
17365 : 0 : {
17366 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
17367 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POW))
17368 : 0 : return true;
17369 : : }
17370 : 0 : break;
17371 : : }
17372 : : default:;
17373 : : }
17374 : : }
17375 : : }
17376 : : break;
17377 : 343 : case CFN_BUILT_IN_POWF:
17378 : 343 : if (gimple_call_num_args (_c1) == 2)
17379 : : {
17380 : 343 : tree _q30 = gimple_call_arg (_c1, 0);
17381 : 343 : _q30 = do_valueize (valueize, _q30);
17382 : 343 : tree _q31 = gimple_call_arg (_c1, 1);
17383 : 343 : _q31 = do_valueize (valueize, _q31);
17384 : 343 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
17385 : : {
17386 : 0 : switch (TREE_CODE (_q31))
17387 : : {
17388 : 0 : case REAL_CST:
17389 : 0 : {
17390 : 0 : {
17391 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
17392 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF))
17393 : 0 : return true;
17394 : : }
17395 : 0 : break;
17396 : : }
17397 : : default:;
17398 : : }
17399 : : }
17400 : : }
17401 : : break;
17402 : 100 : case CFN_BUILT_IN_POWL:
17403 : 100 : if (gimple_call_num_args (_c1) == 2)
17404 : : {
17405 : 100 : tree _q30 = gimple_call_arg (_c1, 0);
17406 : 100 : _q30 = do_valueize (valueize, _q30);
17407 : 100 : tree _q31 = gimple_call_arg (_c1, 1);
17408 : 100 : _q31 = do_valueize (valueize, _q31);
17409 : 100 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
17410 : : {
17411 : 0 : switch (TREE_CODE (_q31))
17412 : : {
17413 : 0 : case REAL_CST:
17414 : 0 : {
17415 : 0 : {
17416 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
17417 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWL))
17418 : 0 : return true;
17419 : : }
17420 : 0 : break;
17421 : : }
17422 : : default:;
17423 : : }
17424 : : }
17425 : : }
17426 : : break;
17427 : 0 : case CFN_POW:
17428 : 0 : if (gimple_call_num_args (_c1) == 2)
17429 : : {
17430 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
17431 : 0 : _q30 = do_valueize (valueize, _q30);
17432 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
17433 : 0 : _q31 = do_valueize (valueize, _q31);
17434 : 0 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
17435 : : {
17436 : 0 : switch (TREE_CODE (_q31))
17437 : : {
17438 : 0 : case REAL_CST:
17439 : 0 : {
17440 : 0 : {
17441 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q31 };
17442 : 0 : if (gimple_simplify_199 (res_op, seq, valueize, type, captures, CFN_POW))
17443 : 0 : return true;
17444 : : }
17445 : 0 : break;
17446 : : }
17447 : : default:;
17448 : : }
17449 : : }
17450 : : }
17451 : : break;
17452 : : default:;
17453 : : }
17454 : : }
17455 : : break;
17456 : 33996783 : default:;
17457 : : }
17458 : 33996783 : switch (TREE_CODE (_p0))
17459 : : {
17460 : 33522064 : case SSA_NAME:
17461 : 33522064 : if (gimple *_d1 = get_def (valueize, _p0))
17462 : : {
17463 : 13265729 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17464 : 12870512 : switch (gimple_assign_rhs_code (_a1))
17465 : : {
17466 : 49158 : case VEC_PERM_EXPR:
17467 : 49158 : {
17468 : 49158 : tree _q20 = gimple_assign_rhs1 (_a1);
17469 : 49158 : _q20 = do_valueize (valueize, _q20);
17470 : 49158 : tree _q21 = gimple_assign_rhs2 (_a1);
17471 : 49158 : _q21 = do_valueize (valueize, _q21);
17472 : 49158 : tree _q22 = gimple_assign_rhs3 (_a1);
17473 : 49158 : _q22 = do_valueize (valueize, _q22);
17474 : 49158 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
17475 : : {
17476 : 8776 : switch (TREE_CODE (_p1))
17477 : : {
17478 : 6491 : case SSA_NAME:
17479 : 6491 : if (gimple *_d2 = get_def (valueize, _p1))
17480 : : {
17481 : 6090 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17482 : 8171 : switch (gimple_assign_rhs_code (_a2))
17483 : : {
17484 : 3345 : case VEC_PERM_EXPR:
17485 : 3345 : {
17486 : 3345 : tree _q60 = gimple_assign_rhs1 (_a2);
17487 : 3345 : _q60 = do_valueize (valueize, _q60);
17488 : 3345 : tree _q61 = gimple_assign_rhs2 (_a2);
17489 : 3345 : _q61 = do_valueize (valueize, _q61);
17490 : 3345 : tree _q62 = gimple_assign_rhs3 (_a2);
17491 : 3345 : _q62 = do_valueize (valueize, _q62);
17492 : 3345 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
17493 : : {
17494 : 3318 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
17495 : : {
17496 : 77 : {
17497 : 77 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
17498 : 77 : if (VECTOR_INTEGER_TYPE_P (type)
17499 : : )
17500 : : {
17501 : 2 : gimple_seq *lseq = seq;
17502 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1759;
17503 : 2 : {
17504 : 2 : res_op->set_op (VEC_PERM_EXPR, type, 3);
17505 : 2 : {
17506 : 2 : tree _o1[2], _r1;
17507 : 2 : _o1[0] = captures[0];
17508 : 2 : _o1[1] = captures[2];
17509 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17510 : 2 : tem_op.resimplify (lseq, valueize);
17511 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17512 : 2 : if (!_r1) goto next_after_fail1759;
17513 : 1 : captures[3] = _r1;
17514 : : }
17515 : 1 : res_op->ops[0] = captures[3];
17516 : 1 : res_op->ops[1] = captures[3];
17517 : 1 : res_op->ops[2] = captures[1];
17518 : 1 : res_op->resimplify (lseq, valueize);
17519 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
17520 : 1 : return true;
17521 : : }
17522 : : next_after_fail1759:;
17523 : : }
17524 : : }
17525 : : }
17526 : : }
17527 : : break;
17528 : : }
17529 : : default:;
17530 : : }
17531 : : }
17532 : : break;
17533 : 8775 : default:;
17534 : : }
17535 : 8775 : switch (TREE_CODE (_q22))
17536 : : {
17537 : 8775 : case VECTOR_CST:
17538 : 8775 : {
17539 : 8775 : switch (TREE_CODE (_p1))
17540 : : {
17541 : 6490 : case SSA_NAME:
17542 : 6490 : if (gimple *_d2 = get_def (valueize, _p1))
17543 : : {
17544 : 6089 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17545 : 8170 : switch (gimple_assign_rhs_code (_a2))
17546 : : {
17547 : 3344 : case VEC_PERM_EXPR:
17548 : 3344 : {
17549 : 3344 : tree _q60 = gimple_assign_rhs1 (_a2);
17550 : 3344 : _q60 = do_valueize (valueize, _q60);
17551 : 3344 : tree _q61 = gimple_assign_rhs2 (_a2);
17552 : 3344 : _q61 = do_valueize (valueize, _q61);
17553 : 3344 : tree _q62 = gimple_assign_rhs3 (_a2);
17554 : 3344 : _q62 = do_valueize (valueize, _q62);
17555 : 3344 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
17556 : : {
17557 : 3317 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
17558 : : {
17559 : 76 : switch (TREE_CODE (_q62))
17560 : : {
17561 : 76 : case VECTOR_CST:
17562 : 76 : {
17563 : 76 : {
17564 : 76 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
17565 : 76 : if (gimple_simplify_75 (res_op, seq, valueize, type, captures, MULT_EXPR))
17566 : 3 : return true;
17567 : : }
17568 : 73 : break;
17569 : : }
17570 : : default:;
17571 : : }
17572 : : }
17573 : : }
17574 : : break;
17575 : : }
17576 : : default:;
17577 : : }
17578 : : }
17579 : : break;
17580 : : default:;
17581 : : }
17582 : : break;
17583 : : }
17584 : : default:;
17585 : : }
17586 : : }
17587 : : break;
17588 : : }
17589 : : default:;
17590 : : }
17591 : 2601481 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
17592 : 294665 : switch (gimple_call_combined_fn (_c1))
17593 : : {
17594 : 540 : case CFN_BUILT_IN_POW:
17595 : 540 : if (gimple_call_num_args (_c1) == 2)
17596 : : {
17597 : 540 : tree _q20 = gimple_call_arg (_c1, 0);
17598 : 540 : _q20 = do_valueize (valueize, _q20);
17599 : 540 : tree _q21 = gimple_call_arg (_c1, 1);
17600 : 540 : _q21 = do_valueize (valueize, _q21);
17601 : 540 : switch (TREE_CODE (_p1))
17602 : : {
17603 : 497 : case SSA_NAME:
17604 : 497 : if (gimple *_d2 = get_def (valueize, _p1))
17605 : : {
17606 : 478 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17607 : 325 : switch (gimple_call_combined_fn (_c2))
17608 : : {
17609 : 56 : case CFN_BUILT_IN_POW:
17610 : 56 : if (gimple_call_num_args (_c2) == 2)
17611 : : {
17612 : 56 : tree _q50 = gimple_call_arg (_c2, 0);
17613 : 56 : _q50 = do_valueize (valueize, _q50);
17614 : 56 : tree _q51 = gimple_call_arg (_c2, 1);
17615 : 56 : _q51 = do_valueize (valueize, _q51);
17616 : 56 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
17617 : : {
17618 : 31 : {
17619 : 31 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
17620 : 31 : if (gimple_simplify_201 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POW))
17621 : 0 : return true;
17622 : : }
17623 : : }
17624 : 56 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
17625 : : {
17626 : 31 : {
17627 : 31 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
17628 : 31 : if (gimple_simplify_202 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POW))
17629 : 0 : return true;
17630 : : }
17631 : : }
17632 : : }
17633 : : break;
17634 : : default:;
17635 : : }
17636 : : }
17637 : : break;
17638 : : default:;
17639 : : }
17640 : : }
17641 : : break;
17642 : 294 : case CFN_BUILT_IN_POWF:
17643 : 294 : if (gimple_call_num_args (_c1) == 2)
17644 : : {
17645 : 294 : tree _q20 = gimple_call_arg (_c1, 0);
17646 : 294 : _q20 = do_valueize (valueize, _q20);
17647 : 294 : tree _q21 = gimple_call_arg (_c1, 1);
17648 : 294 : _q21 = do_valueize (valueize, _q21);
17649 : 294 : switch (TREE_CODE (_p1))
17650 : : {
17651 : 270 : case SSA_NAME:
17652 : 270 : if (gimple *_d2 = get_def (valueize, _p1))
17653 : : {
17654 : 266 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17655 : 205 : switch (gimple_call_combined_fn (_c2))
17656 : : {
17657 : 17 : case CFN_BUILT_IN_POWF:
17658 : 17 : if (gimple_call_num_args (_c2) == 2)
17659 : : {
17660 : 17 : tree _q50 = gimple_call_arg (_c2, 0);
17661 : 17 : _q50 = do_valueize (valueize, _q50);
17662 : 17 : tree _q51 = gimple_call_arg (_c2, 1);
17663 : 17 : _q51 = do_valueize (valueize, _q51);
17664 : 17 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
17665 : : {
17666 : 0 : {
17667 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
17668 : 0 : if (gimple_simplify_201 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF))
17669 : 0 : return true;
17670 : : }
17671 : : }
17672 : 17 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
17673 : : {
17674 : 0 : {
17675 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
17676 : 0 : if (gimple_simplify_202 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWF))
17677 : 0 : return true;
17678 : : }
17679 : : }
17680 : : }
17681 : : break;
17682 : : default:;
17683 : : }
17684 : : }
17685 : : break;
17686 : : default:;
17687 : : }
17688 : : }
17689 : : break;
17690 : 420 : case CFN_BUILT_IN_POWI:
17691 : 420 : if (gimple_call_num_args (_c1) == 2)
17692 : : {
17693 : 420 : tree _q20 = gimple_call_arg (_c1, 0);
17694 : 420 : _q20 = do_valueize (valueize, _q20);
17695 : 420 : tree _q21 = gimple_call_arg (_c1, 1);
17696 : 420 : _q21 = do_valueize (valueize, _q21);
17697 : 420 : switch (TREE_CODE (_p1))
17698 : : {
17699 : 301 : case SSA_NAME:
17700 : 301 : if (gimple *_d2 = get_def (valueize, _p1))
17701 : : {
17702 : 287 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17703 : 1 : switch (gimple_call_combined_fn (_c2))
17704 : : {
17705 : 1 : case CFN_BUILT_IN_POWI:
17706 : 1 : if (gimple_call_num_args (_c2) == 2)
17707 : : {
17708 : 1 : tree _q50 = gimple_call_arg (_c2, 0);
17709 : 1 : _q50 = do_valueize (valueize, _q50);
17710 : 1 : tree _q51 = gimple_call_arg (_c2, 1);
17711 : 1 : _q51 = do_valueize (valueize, _q51);
17712 : 1 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
17713 : : {
17714 : 1 : {
17715 : 1 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
17716 : 1 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
17717 : : )
17718 : : {
17719 : 1 : gimple_seq *lseq = seq;
17720 : 1 : if (lseq
17721 : 1 : && (!single_use (captures[0])
17722 : 1 : || !single_use (captures[3])))
17723 : 0 : lseq = NULL;
17724 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1760;
17725 : 1 : {
17726 : 1 : res_op->set_op (CFN_BUILT_IN_POWI, type, 2);
17727 : 1 : {
17728 : 1 : tree _o1[2], _r1;
17729 : 1 : _o1[0] = captures[1];
17730 : 1 : _o1[1] = captures[4];
17731 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17732 : 1 : tem_op.resimplify (lseq, valueize);
17733 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17734 : 1 : if (!_r1) goto next_after_fail1760;
17735 : 1 : res_op->ops[0] = _r1;
17736 : : }
17737 : 1 : res_op->ops[1] = captures[2];
17738 : 1 : res_op->resimplify (lseq, valueize);
17739 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
17740 : 1 : return true;
17741 : : }
17742 : 0 : next_after_fail1760:;
17743 : : }
17744 : : }
17745 : : }
17746 : : }
17747 : : break;
17748 : : default:;
17749 : : }
17750 : : }
17751 : : break;
17752 : : default:;
17753 : : }
17754 : : }
17755 : : break;
17756 : 128 : case CFN_BUILT_IN_POWL:
17757 : 128 : if (gimple_call_num_args (_c1) == 2)
17758 : : {
17759 : 128 : tree _q20 = gimple_call_arg (_c1, 0);
17760 : 128 : _q20 = do_valueize (valueize, _q20);
17761 : 128 : tree _q21 = gimple_call_arg (_c1, 1);
17762 : 128 : _q21 = do_valueize (valueize, _q21);
17763 : 128 : switch (TREE_CODE (_p1))
17764 : : {
17765 : 128 : case SSA_NAME:
17766 : 128 : if (gimple *_d2 = get_def (valueize, _p1))
17767 : : {
17768 : 128 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17769 : 122 : switch (gimple_call_combined_fn (_c2))
17770 : : {
17771 : 0 : case CFN_BUILT_IN_POWL:
17772 : 0 : if (gimple_call_num_args (_c2) == 2)
17773 : : {
17774 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
17775 : 0 : _q50 = do_valueize (valueize, _q50);
17776 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
17777 : 0 : _q51 = do_valueize (valueize, _q51);
17778 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
17779 : : {
17780 : 0 : {
17781 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
17782 : 0 : if (gimple_simplify_201 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWL))
17783 : 0 : return true;
17784 : : }
17785 : : }
17786 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
17787 : : {
17788 : 0 : {
17789 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
17790 : 0 : if (gimple_simplify_202 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POWL))
17791 : 0 : return true;
17792 : : }
17793 : : }
17794 : : }
17795 : : break;
17796 : : default:;
17797 : : }
17798 : : }
17799 : : break;
17800 : : default:;
17801 : : }
17802 : : }
17803 : : break;
17804 : 0 : case CFN_POW:
17805 : 0 : if (gimple_call_num_args (_c1) == 2)
17806 : : {
17807 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
17808 : 0 : _q20 = do_valueize (valueize, _q20);
17809 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
17810 : 0 : _q21 = do_valueize (valueize, _q21);
17811 : 0 : switch (TREE_CODE (_p1))
17812 : : {
17813 : 0 : case SSA_NAME:
17814 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
17815 : : {
17816 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17817 : 0 : switch (gimple_call_combined_fn (_c2))
17818 : : {
17819 : 0 : case CFN_POW:
17820 : 0 : if (gimple_call_num_args (_c2) == 2)
17821 : : {
17822 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
17823 : 0 : _q50 = do_valueize (valueize, _q50);
17824 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
17825 : 0 : _q51 = do_valueize (valueize, _q51);
17826 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
17827 : : {
17828 : 0 : {
17829 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
17830 : 0 : if (gimple_simplify_201 (res_op, seq, valueize, type, captures, CFN_POW))
17831 : 0 : return true;
17832 : : }
17833 : : }
17834 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
17835 : : {
17836 : 0 : {
17837 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
17838 : 0 : if (gimple_simplify_202 (res_op, seq, valueize, type, captures, CFN_POW))
17839 : 0 : return true;
17840 : : }
17841 : : }
17842 : : }
17843 : : break;
17844 : : default:;
17845 : : }
17846 : : }
17847 : : break;
17848 : : default:;
17849 : : }
17850 : : }
17851 : : break;
17852 : 76 : case CFN_BUILT_IN_POWIF:
17853 : 76 : if (gimple_call_num_args (_c1) == 2)
17854 : : {
17855 : 76 : tree _q20 = gimple_call_arg (_c1, 0);
17856 : 76 : _q20 = do_valueize (valueize, _q20);
17857 : 76 : tree _q21 = gimple_call_arg (_c1, 1);
17858 : 76 : _q21 = do_valueize (valueize, _q21);
17859 : 76 : switch (TREE_CODE (_p1))
17860 : : {
17861 : 73 : case SSA_NAME:
17862 : 73 : if (gimple *_d2 = get_def (valueize, _p1))
17863 : : {
17864 : 64 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17865 : 0 : switch (gimple_call_combined_fn (_c2))
17866 : : {
17867 : 0 : case CFN_BUILT_IN_POWIF:
17868 : 0 : if (gimple_call_num_args (_c2) == 2)
17869 : : {
17870 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
17871 : 0 : _q50 = do_valueize (valueize, _q50);
17872 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
17873 : 0 : _q51 = do_valueize (valueize, _q51);
17874 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
17875 : : {
17876 : 0 : {
17877 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
17878 : 0 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
17879 : : )
17880 : : {
17881 : 0 : gimple_seq *lseq = seq;
17882 : 0 : if (lseq
17883 : 0 : && (!single_use (captures[0])
17884 : 0 : || !single_use (captures[3])))
17885 : 0 : lseq = NULL;
17886 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1761;
17887 : 0 : {
17888 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
17889 : 0 : {
17890 : 0 : tree _o1[2], _r1;
17891 : 0 : _o1[0] = captures[1];
17892 : 0 : _o1[1] = captures[4];
17893 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17894 : 0 : tem_op.resimplify (lseq, valueize);
17895 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17896 : 0 : if (!_r1) goto next_after_fail1761;
17897 : 0 : res_op->ops[0] = _r1;
17898 : : }
17899 : 0 : res_op->ops[1] = captures[2];
17900 : 0 : res_op->resimplify (lseq, valueize);
17901 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
17902 : 0 : return true;
17903 : : }
17904 : 0 : next_after_fail1761:;
17905 : : }
17906 : : }
17907 : : }
17908 : : }
17909 : : break;
17910 : : default:;
17911 : : }
17912 : : }
17913 : : break;
17914 : : default:;
17915 : : }
17916 : : }
17917 : : break;
17918 : 0 : case CFN_BUILT_IN_POWIL:
17919 : 0 : if (gimple_call_num_args (_c1) == 2)
17920 : : {
17921 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
17922 : 0 : _q20 = do_valueize (valueize, _q20);
17923 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
17924 : 0 : _q21 = do_valueize (valueize, _q21);
17925 : 0 : switch (TREE_CODE (_p1))
17926 : : {
17927 : 0 : case SSA_NAME:
17928 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
17929 : : {
17930 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
17931 : 0 : switch (gimple_call_combined_fn (_c2))
17932 : : {
17933 : 0 : case CFN_BUILT_IN_POWIL:
17934 : 0 : if (gimple_call_num_args (_c2) == 2)
17935 : : {
17936 : 0 : tree _q50 = gimple_call_arg (_c2, 0);
17937 : 0 : _q50 = do_valueize (valueize, _q50);
17938 : 0 : tree _q51 = gimple_call_arg (_c2, 1);
17939 : 0 : _q51 = do_valueize (valueize, _q51);
17940 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
17941 : : {
17942 : 0 : {
17943 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
17944 : 0 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
17945 : : )
17946 : : {
17947 : 0 : gimple_seq *lseq = seq;
17948 : 0 : if (lseq
17949 : 0 : && (!single_use (captures[0])
17950 : 0 : || !single_use (captures[3])))
17951 : 0 : lseq = NULL;
17952 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1762;
17953 : 0 : {
17954 : 0 : res_op->set_op (CFN_BUILT_IN_POWIL, type, 2);
17955 : 0 : {
17956 : 0 : tree _o1[2], _r1;
17957 : 0 : _o1[0] = captures[1];
17958 : 0 : _o1[1] = captures[4];
17959 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
17960 : 0 : tem_op.resimplify (lseq, valueize);
17961 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17962 : 0 : if (!_r1) goto next_after_fail1762;
17963 : 0 : res_op->ops[0] = _r1;
17964 : : }
17965 : 0 : res_op->ops[1] = captures[2];
17966 : 0 : res_op->resimplify (lseq, valueize);
17967 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1007, __FILE__, __LINE__, true);
17968 : 0 : return true;
17969 : : }
17970 : 0 : next_after_fail1762:;
17971 : : }
17972 : : }
17973 : : }
17974 : : }
17975 : : break;
17976 : : default:;
17977 : : }
17978 : : }
17979 : : break;
17980 : : default:;
17981 : : }
17982 : : }
17983 : : break;
17984 : : default:;
17985 : : }
17986 : : }
17987 : : break;
17988 : : default:;
17989 : : }
17990 : : return false;
17991 : : }
17992 : : #pragma GCC diagnostic pop
|